export type TSdkFolderStructure = { path: string; importPath: string | null; baseName: string; containerName: string | null; isContainerFolder: boolean; hasClients: boolean; hasSubContainers: boolean; apiBasePath: string; clients: { importPath: string; alias: string; className: string; apiBasePath: string; }[]; containers: TSdkFolderStructure[]; }; export type TModuleFolderStructure = { path: string; isMainModule: boolean; folderName: string | null; moduleName: string | null; apiBasePath: string | null; moduleClassName: string | null; controllerName: string | null; modules: string[]; mainModules: TModuleFolderStructure[]; }; /** * @example "spc.state-zone" */ export type THandlebarsTemplateParams = { /** * Paths */ PATH_TO_SOURCE_DIR: string; PATH_TO_ROUTE_DIR: string; /** * Global */ CURRENT_DATE: string; CURRENT_TIME: string; /** * Entity related */ ENTITY_NAMING: { entity: string; entityCamel: string; entityKebab: string; entityWords: string; entityPlural: string; entitySingular: string; entityCapitalized: string; entityCapitalizedPlural: string; entityCapitalizedWords: string; }; /** * @example "stateZones" */ ENTITY_CAMELCASED_PLURAL: string; /** * @example "stateZone" */ ENTITY_CAMELCASED_SINGULAR: string; /** * @example "spcStateZones" */ SUB_MODULE_ENTITY_CAMELCASED_PLURAL: string; /** * @example "spcStateZone" */ SUB_MODULE_ENTITY_CAMELCASED_SINGULAR: string; /** * @example "spc.stateZones" */ SUB_MODULE_DOT_ENTITY_CAMELCASED_PLURAL: string; /** * @example "spc.stateZone" */ SUB_MODULE_DOT_ENTITY_CAMELCASED_SINGULAR: string; /** * @example "StateZones" */ ENTITY_CAMELCASED_CAPITALIZED_PLURAL: string; /** * @example "StateZone" */ ENTITY_CAMELCASED_CAPITALIZED_SINGULAR: string; /** * @example "SpcStateZones" */ SUB_MODULE_ENTITY_CAMELCASED_CAPITALIZED_PLURAL: string; /** * @example "SpcStateZone" */ SUB_MODULE_ENTITY_CAMELCASED_CAPITALIZED_SINGULAR: string; /** * @example "Spc.StateZones" */ SUB_MODULE_DOT_ENTITY_CAMELCASED_CAPITALIZED_PLURAL: string; /** * @example "Spc.StateZone" */ SUB_MODULE_DOT_ENTITY_CAMELCASED_CAPITALIZED_SINGULAR: string; /** * @example "state-zones" */ ENTITY_KEBABCASED_PLURAL: string; /** * @example "state-zone" */ ENTITY_KEBABCASED_SINGULAR: string; /** * @example "spc-state-zones" */ SUB_MODULE_ENTITY_KEBABCASED_PLURAL: string; /** * @example "spc-state-zone" */ SUB_MODULE_ENTITY_KEBABCASED_SINGULAR: string; /** * @example "spc.state-zones" */ SUB_MODULE_DOT_ENTITY_KEBABCASED_PLURAL: string; /** * @example "spc.state-zone" */ SUB_MODULE_DOT_ENTITY_KEBABCASED_SINGULAR: string; /** * ---------------------------------------- * Sub module management */ IN_SUB_MODULE: boolean; SUBMODULE_NAME_CAPITALIZED?: string; SUBMODULE_NAME_LOWERCASED?: string; /** * ---------------------------------------- * Files related */ ENTITY_FILE_NAME_PREFIX_SINGULAR: string; ENTITY_FILE_NAME_PREFIX_PLURAL: string; /** * ---------------------------------------- * Events related */ ENTITY_EVENTS_ROOT: string; ENTITY_ACTIONS: { name: string; method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH'; path: string; serviceMethosName: string; requestType: string; responseType: string; }[]; ENTITY_EVENTS: string[]; /** * ---------------------------------------- * Events */ EVENTS: { name: { path: string; segments: string[]; }; payload: { path: string; segments: string[]; }; }[]; EVENTS_OBJECT_NAME: string; EVENTS_OBJECT: { [name: string]: string; }; EVENT_PAYLOADS: { path: string; pathSegments: string[]; defaultEntityAlias: string; names: string[]; }; /** * ---------------------------------------- * Aliasing */ ENTITY_TYPING_ALIAS: string; API_TYPING_ALIAS: string; MONGOOSE_MODEL_TYPING_ALIAS: string; MONGOOSE_DOCUMENT_TYPING_ALIAS: string; EVENT_PAYLOADS_TYPING_ALIAS: string; EVENTS_OBJECT_PATH: string; /** * ---------------------------------------- * Entity properties */ HAS_CUSTOM_SCHEMA: boolean; HAS_TRACKING_ID_PROPERTY: boolean; HAS_NAME_PROPERTY: boolean; HAS_TITLE_PROPERTY: boolean; HAS_COMPANY_PROPERTY: boolean; HAS_STORE_PROPERTY: boolean; HAS_SEARCH_META_PROPERTY: boolean; IS_IMPORTABLE: boolean; /** * ---------------------------------------- * Related to Export Service Permissions */ SERVICE_PERMISSION_GROUP_NAME: string; SERVICE_PERMISSIONS: string[]; /** * ---------------------------------------- * Analyse result */ ANALYSE_RESULT: DTSAnalysisResult; MODEL_FOUND: boolean; MODEL_FULL_NAME: string; MODEL_NAME: string; DOCUMENT_NAME: string; DOCUMENT_FOUND: boolean; ENTITY_FOUND: boolean; DOCUMENT_FULL_NAME: string; ENTITY_NAME: string; ENTITY_FULL_NAME: string; ENTITY: ItemDetails; ENTITY_META: TEntityMeta; /** * ---------------------------------------- * Service related */ MODULE: { DESCRIPTION: string; CLASS_NAME: string; BASE_ROUTE: string; CONTROLLER: { DESCRIPTION: string; CLASS_NAME: string; INSTANCE_NAME: string; BASE_ROUTE: string; ROUTE_SEGMENTS: string[]; }; SERVICE: { DESCRIPTION: string; CLASS_NAME: string; INSTANCE_NAME: string; INJECTIONS: { name: string; type: string; }[]; }; API: { METHODS: ApiMethod[]; }; }; }; export type TEntityMeta = IJsmEntityComments & { has_custom_schema: boolean; is_creatable: boolean; is_importable: boolean; has_search_meta: boolean; has_tracking_id: boolean; has_name: boolean; has_slug: boolean; has_title: boolean; has_attributes: boolean; has_snapshots: boolean; has_settings: boolean; has_insights: boolean; has_location: boolean; has_preferences: boolean; has_embedded_objects: boolean; embedded_object_properties: { [Property: string]: { name: string; full_name: string; type: "module" | "namespace" | "interface" | "type"; interface_heritage?: string[]; type_properties?: { type: string; }; interface_properties?: InterfaceProperties; }; }; }; export type ApiMethod = { name: string; fullName: string; meta?: IJsmApiComments; requestFullName?: string; responseFullName?: string; scopeFullName?: string; scripts: { logic?: string; sdkHandler?: string; controller?: string; sanitizer?: string; validator?: string; }; }; export type DTSAnalysisResult = { modelFound?: boolean; modelName?: string; modelFullName?: string; documentFound?: boolean; documentName?: string; documentFullName?: string; entityFound?: boolean; entityFullName?: string; entityName?: string; entity?: ItemDetails; apiAliasFullName?: string; apiMethods?: ApiMethod[]; moduleNames?: string[]; modules?: IJsmModuleComments[]; }; export type ParsedDTS = { module?: ItemDetails; }; export type ItemDetails = { parents: string[]; full_name: string; name: string; type: "module" | "namespace" | "interface" | "type"; comments?: string[]; module_meta?: IJsmModuleComments; api_meta?: IJsmApiComments; api_method_meta?: { is_api_method: boolean; has_request: boolean; has_response: boolean; has_scope: boolean; }; entity_meta?: TEntityMeta; interface_properties?: InterfaceProperties; interface_heritage?: string[]; type_properties?: { type: string; }; children?: { [name: string]: ItemDetails; }; }; export type TMethodLink = { path: string; full_path: string; fires: { service: string; method: string; }; }; export type IJsmApiComments = { method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS' | 'TRACE' | 'CONNECT'; links: TMethodLink[]; description?: string; permission_group: string; permissions: string[]; emited_event: { name_path?: string; payload_typing_alias?: string; }; has_request_type: boolean; has_response_type: boolean; has_scope_type: boolean; has_custom_controller: boolean; has_custom_logic: boolean; has_custom_sdk_handler: boolean; has_custom_sanitizer: boolean; has_custom_validator: boolean; no_sanitizer: boolean; no_validator: boolean; }; export type IJsmModuleComments = { description?: string; module: string; permissionGroup: string; link?: string; full_path?: string; parents: IJsmModuleComments[]; injections: { name: string; type: string; }[]; }; export type IJsmEntityComments = { description?: string; indexes: { key: string; unique?: boolean; sparse?: boolean; expires?: string; partialFilterExpression?: string; }[]; }; export type PropertyDetails = { name: string; type: string; normalized_type: TNormalizedType; optional: boolean; }; export type IPropertyComments = { description?: string; required: boolean; optional: boolean; nullable: boolean; default?: string | null | boolean | number | undefined; example?: string; ref?: string; schema?: string; type?: string; minLength?: number; maxLength?: number; }; export type InterfaceProperties = { [property: string]: { name: string; type: string; normalized_type: TNormalizedType; isArray: boolean; indexSignature?: { key: string; type: string; }; meta?: IPropertyComments; properties?: InterfaceProperties; }; }; export type TNormalizedType = 'number' | 'string' | 'boolean' | 'date' | 'location' | 'address' | 'any' | 'user_snapshot'; //# sourceMappingURL=interfaces.d.ts.map