feat(M08-D): 补多小程序与租户配置
This commit is contained in:
@@ -19,6 +19,7 @@ import type {
|
||||
OrderHistoryItem,
|
||||
OrderStatus,
|
||||
PaymentAuthorizationStatus,
|
||||
PlatformApplication,
|
||||
ProfitSharingSnapshot,
|
||||
PayoutStateFilter,
|
||||
StaffRole,
|
||||
@@ -29,6 +30,7 @@ import type {
|
||||
RoomInput,
|
||||
RoomOperationalStatus,
|
||||
StoreInput,
|
||||
TenantApplicationConfig,
|
||||
ThirdPartyMode,
|
||||
ThirdPartyProvider,
|
||||
ThirdPartyRecords,
|
||||
@@ -419,6 +421,20 @@ export function controlDevice(session: ApiSession, action: 'door' | 'power' | 's
|
||||
return request<{ commandId?: string; status?: string }>(session, `/device-control/${action}`, { method: 'POST', body: JSON.stringify(input) });
|
||||
}
|
||||
|
||||
export function listPlatformApplications(session: ApiSession) {
|
||||
return request<PlatformApplication[]>(session, '/platform-apps');
|
||||
}
|
||||
|
||||
export function updatePlatformApplicationConfig(session: ApiSession, platformAppId: string, input: TenantApplicationConfig) {
|
||||
return request<{ platformAppId: string; updated: boolean }>(session, `/platform-apps/${encodeURIComponent(platformAppId)}/config`, { method: 'PUT', body: JSON.stringify(input) });
|
||||
}
|
||||
|
||||
export function bindPlatformApplication(session: ApiSession, input: {
|
||||
appId: string; appName: string; appStatus: 'ACTIVE' | 'DISABLED'; config: TenantApplicationConfig;
|
||||
}) {
|
||||
return request<{ platformAppId: string; bound: boolean }>(session, '/platform-apps/bind', { method: 'POST', body: JSON.stringify(input) });
|
||||
}
|
||||
|
||||
export function createStaffUser(
|
||||
session: ApiSession,
|
||||
input: { nickname: string; phone: string; note?: string; roles: StaffRole[]; storeIds: string[] }
|
||||
|
||||
Reference in New Issue
Block a user