UNPKG

dynamicsmobile

Version:

Allows development of off-line mobile and web business apps over the Dynamics Mobile platform. More info on https://www.dynamicsmobile.com

135 lines (134 loc) 3.92 kB
import { CoreAppService } from './app-service-app'; import { DmsApplicationService } from './application-context-service'; declare enum SystemEntityTypes { User = 0, Role = 1, App = 2, EventLog = 3, ApiKey = 4, JoinUser = 5, SyncLog = 6, AppArea = 7 } type $Values<T extends object> = T[keyof T]; export declare const SyncLogPacketTypes: { Data: number; DrPush: number; }; export declare const SyncLogStatuses: { Created: number; Pending: number; Success: number; InProgress: number; Error: number; Failure: number; Debug: number; }; export declare const SyncLogDirections: { Push: number; Pull: number; }; type SyncLogDirection = $Values<typeof SyncLogDirections>; type SyncLogStatus = $Values<typeof SyncLogStatuses>; type SyncLogPacketType = $Values<typeof SyncLogPacketTypes>; declare class SysEntity { } export declare class SystemEntityQuery<T extends SysEntity> extends CoreAppService { private sysEntityType; dms: DmsApplicationService; protected customAuthToken: string; private pk; constructor(sysEntityType: SystemEntityTypes, dms: DmsApplicationService, customAuthToken: string); private getSystemEntityName; filter(pk: any): void; executeSelect(): Promise<Array<T>>; executeDelete(entity: SysEntity | null | undefined): Promise<void>; executeCreate(entity: SysEntity | null | undefined): Promise<any>; executeUpdate(entity: SysEntity | null | undefined): Promise<void>; } export declare class SysEntityUser extends SysEntity { userName: string; roleId: string; disabled: boolean; userType: string; lastSignin: number; confirmed: boolean; modifiedOn: number; createdOn: number; static query(): SystemEntityQuery<SysEntityUser>; static create(): Promise<void>; delete(): Promise<void>; signOut(): Promise<void>; resetPassword(forced: boolean | undefined, forcePassword: string): Promise<void>; } export declare class SysEntityRole extends SysEntity { roleId: string; name: string; appCode: string; disabled: boolean; policy: string; settings: string; active: boolean; description: string; static query(): SystemEntityQuery<SysEntityRole>; } export declare class SysEntityApp extends SysEntity { appCode: string; name: string; type: string; source: string; version: string; ps_installed: boolean; static query(): SystemEntityQuery<SysEntityApp>; } export declare class SysEntityApiKey extends SysEntity { apiKey: string; static query(): SystemEntityQuery<SysEntityApiKey>; } export declare class SysEntityJoinUser extends SysEntity { userName: string; roleId: string; userType: string; static query(): SystemEntityQuery<SysEntityJoinUser>; } export declare class SysEntitySyncLog extends SysEntity { id: string; appArea: string; dataPath: string; userName: string; userRole: string; hash: string | null; appCode: string | null; packetType: SyncLogPacketType; direction: SyncLogDirection; groupId: string | null; companyId: string | null; status: SyncLogStatus; statusDateTime: string; errorMessage: string | null; operationHint: string | null; size: number; dateCreated: string; static query(): SystemEntityQuery<SysEntitySyncLog>; } export declare class SysEntityAppArea extends SysEntity { appArea: string; agentTs: number; accountState: string; companyName: string; agentIp: string; source: string; storageSizeLimit: string; agentVer: string; billingCustomerId: string; userRolesLimit: string; agentDeploy: string; dataBaseSizeLimit: string; enabled: boolean; agentHint: number; appsLimit: number; usersLimit: number; agentId: string; static query(): SystemEntityQuery<SysEntityAppArea>; } export {};