import { Validators } from "@angular/forms"; /** * @path // the path of the controller relative to the BaseService file * @clsName // class name * @action // class method to invoke */ export interface EnvConfig { clientAppGuid: string; appId: string; production: boolean; apiEndpoint: string; sioEndpoint: string; wsEndpoint: string; wsMode: string; pushConfig: any; consumerToken: string; USER_RESOURCES: string; apiHost: string; sioHost: string; shellHost: string; CD_PORT?: number; consumer: string; clientAppId: number; SOCKET_IO_PORT: number; mfManifestPath?: string; apiOptions?: any; sioOptions?: any; wsOptions?: any; firebaseConfig?: any; } export interface EnvelopFValItem { query?: any; data?: any; } export interface EnvelopDat { f_vals: EnvelopFValItem[]; token: string | null; } export declare const SYS_CTX = "Sys"; export declare const DEFAULT_DAT: EnvelopDat; export declare const DEFAULT_ARGS: {}; export declare const DEFAULT_ENVELOPE_CREATE: ICdRequest; export declare const DEFAULT_ENVELOPE_GET: ICdRequest; export declare const DEFAULT_ENVELOPE_GET_PAGED: ICdRequest; export declare const DEFAULT_ENVELOPE_GET_TYPE: ICdRequest; export declare const DEFAULT_ENVELOPE_UPDATE: ICdRequest; export declare const DEFAULT_ENVELOPE_DELETE: ICdRequest; export interface CdResponse { app_state: IAppState; data: any[]; } export interface ICdResponse { app_state: IAppState; data: any; } export interface IServerConfig { usePush: boolean; usePolling: boolean; useCacheStore: boolean; } export declare const DEFAULT_CD_RESPONSE: ICdResponse; export declare const DEFAULT_CD_REQUEST: ICdRequest; export interface IAppState { success: boolean; info: IRespInfo | null; sess: ISessResp | null; cache: object | null; sConfig?: IServerConfig; } export interface CdRequest { ctx: string; m: string; c: string; a: string; dat: object; args: object; } export interface IControllerContext { path: string; clsName: string; action: string; } export interface IModelRules { create: object; update: object; remove: object; } export interface ICdRequest { ctx: string; m: string; c: string; a: string; dat: EnvelopDat; args: any | null; } export declare enum ModuleScope { Sys = 0, App = 1 } export interface ISessResp { cd_token?: string; userId?: number | string | null; jwt: { jwtToken: string | null; checked: boolean; checkTime: number | null; authorized: boolean; ttl: number | null; } | null; ttl: number; initUuid?: string; initTime?: string; } export interface IRespInfo { messages: string[]; code: string | null; app_msg: string | null; } export interface ICdPushEnvelop { pushData: { appId?: string; appSockets?: ISocketItem[]; pushGuid: string; m?: string; pushRecepients: ICommConversationSub[]; triggerEvent: string; emittEvent: string; token: string; commTrack: CommTrack; isNotification: boolean | null; isAppInit?: boolean | null; }; req: ICdRequest | null; resp: ICdResponse | null; } export interface ISocketItem { socketId: string; name: string; socketGuid?: string; } export interface CdObjId { appId: string; ngModule: string | null; resourceName: string | null; resourceGuid: string | null; jwtToken: string | null; socket: any; commTrack: CommTrack | null; } export interface IServiceInput { svInstance: any; serviceModel: any; serviceModelInstance?: any; docName?: string; cmd?: any; data?: any; dSource?: number; } export interface IDoc { docId?: number; docGuid?: string; docName?: string; docDescription?: string; companyId?: number; docFrom: number; docTypeId: number; docDate?: Date; attachGuid?: string; docExpireDate?: Date; } export type ClassRef = new (...args: any[]) => any; export type Fn = () => void; export interface IUser { userID: number; userGUID: string; userName: string; } export interface IBase { cdToken: string; cRules: object; uRules: object; dRules: object; } export interface ICommConversationSub { userId: number; subTypeId: number; commconversationId?: number; commconversationsubId?: number; commconversationsubInvited?: boolean; commconversationsubAccepted?: boolean; groupId?: number; cdObjId: CdObjId; } export interface CommTrack { initTime: number | string | null; relayTime: number | string | null; pushed: boolean; pushTime: number | string | null; relayed: boolean; deliveryTime: number | string | null; delivered: boolean; completed?: boolean; completedTime?: number | string | null; cached?: boolean; cachedTime?: number | string | null; saved?: boolean; savedTime?: number | string | null; } export declare const DEFAULT_CD_OBJ_ID: CdObjId; export declare const DEFAULT_COMM_TRACK: { initTime: any; relayTime: any; relayed: boolean; deliveryTime: any; deliverd: boolean; pushed: boolean; pushTime: any; delivered: boolean; }; export interface IAclCtx { memberGuid: string; moduleGroupGuid: any; consumerId: number; moduleName: string; currentUser: any; module: any; } export declare const controlFormatt: { text: (string | (typeof Validators.required)[])[]; textDisabled: (string | (typeof Validators.required)[])[]; email: (string | import("@angular/forms").ValidatorFn[])[]; url: (string | import("@angular/forms").ValidatorFn[])[]; digits: (string | import("@angular/forms").ValidatorFn[])[]; number: (string | import("@angular/forms").ValidatorFn[])[]; alphanum: (string | import("@angular/forms").ValidatorFn[])[]; textarea: (string | (typeof Validators.required)[])[]; password: (string | import("@angular/forms").ValidatorFn[])[]; confirmpwd: (string | typeof Validators.required)[]; }; export interface IQuery { select?: string[]; update?: object; where: IQueryWhere; jsonUpdate?: IJsonUpdate[]; distinct?: boolean; take?: number; skip?: number; jFilters?: IJFilter[]; order?: any; class?: string; extData?: any; } export interface IQueryWhere { andWhere?: Array; orWhere?: Array; [field: string]: any; } export interface IJsonUpdate { modelField?: any; path: any; value: any; } export interface IJFilter { jField: string; jPath: string; pathValue: any; } export interface IQbInput { select?: string[]; update?: object; where: IQbFilter[]; distinct?: boolean; take?: number; skip?: number; } /** * constraining the update attribute to specific models in different services. * By using Array for the select attribute, you constrain the select array to valid fields of the model type T. * This approach improves type safety and ensures that you don't accidentally select invalid fields. * This type-safe approach helps prevent errors at compile-time, making your code more reliable and maintainable. */ export interface QueryInput { select?: string[]; where?: any; update?: Record; take?: number; skip?: number; } export interface IQbFilter { field: string; operator: string; val: string; conjType?: string; dataType: string; jPath?: string; } export declare enum FieldType { number = 0, string = 1, boolean = 2, date = 3, json = 4, enum = 5, action = 6, geoLocation = 7, decimal = 8, any = 9 } export declare const INIT_CD_RESP: { app_state: { success: boolean; info: { messages: any[]; code: string; app_msg: string; }; sess: { cd_token: any; jwt: any; ttl: number; }; cache: {}; }; data: any; }; export interface CacheData { key: string; value?: string; initUuid?: string; initTime?: string; }