@acorex-platform/extension-project-management-simpro-client 2.0.0-next.27 → 2.0.0-next.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-extension-project-management-simpro-client-contracts.mjs","sources":["../../../../libs/extensions/project-management/simpro/contracts/src/root-config.ts","../../../../libs/extensions/project-management/simpro/contracts/src/manifest.ts","../../../../libs/extensions/project-management/simpro/contracts/src/commands.keys.ts","../../../../libs/extensions/project-management/simpro/contracts/src/menu.keys.ts","../../../../libs/extensions/project-management/simpro/contracts/src/permission.keys.ts","../../../../libs/extensions/project-management/simpro/contracts/src/connection.types.ts","../../../../libs/extensions/project-management/simpro/contracts/src/oauth.api.types.ts","../../../../libs/extensions/project-management/simpro/contracts/src/project-sync.api.types.ts","../../../../libs/extensions/project-management/simpro/contracts/src/simpro.errors.ts","../../../../libs/extensions/project-management/simpro/contracts/src/acorex-platform-extension-project-management-simpro-client-contracts.ts"],"sourcesContent":["//#region ---- Module Config ----\n\nconst config = {\n i18n: 'extensions-simpro',\n};\n\nconst MODULE_NAME = 'SimproExtension';\n\nexport const RootConfig = {\n config,\n module: {\n name: MODULE_NAME,\n title: `@${config.i18n}:integration.display-name`,\n icon: 'fa-light fa-briefcase',\n },\n};\n\n//#endregion\n","//#region ---- Manifest ----\n\nimport { AXPModuleManifest } from '@acorex-platform/framework-shared/core';\nimport { RootConfig } from './root-config';\n\nexport const SimproExtensionManifest: AXPModuleManifest = {\n name: RootConfig.module.name,\n version: '1.0.0',\n title: RootConfig.module.title,\n icon: RootConfig.module.icon,\n i18n: RootConfig.config.i18n,\n type: 'integration',\n domain: 'project-management',\n dependencies: [],\n};\n\n//#endregion\n","//#region ---- Command Keys ----\n\nexport const AXESimproCommandKeys = {\n ConnectionConnect: 'simpro-extension.Connection:Connect',\n ConnectionCompleteOAuth: 'simpro-extension.Connection:CompleteOAuth',\n ConnectionLifecycle: 'simpro-extension.Connection:Lifecycle',\n OAuthStart: 'simpro-extension.OAuth:Start',\n OAuthComplete: 'simpro-extension.OAuth:Complete',\n OAuthValidate: 'simpro-extension.OAuth:Validate',\n ProjectImportFromSimpro: 'simpro-extension.Project:ImportFromSimpro',\n CustomerImportFromSimpro: 'simpro-extension.Customer:ImportFromSimpro',\n EmployeeSyncFromSimpro: 'simpro-extension.Employee:SyncFromSimpro',\n EmployeeLinkFromSimpro: 'simpro-extension.Employee:LinkFromSimpro',\n ContractorSyncFromSimpro: 'simpro-extension.Contractor:SyncFromSimpro',\n ProjectSync: 'simpro-extension.Project:Sync',\n JobsPull: 'simpro-extension.Jobs:Pull',\n JobsRefresh: 'simpro-extension.Jobs:Refresh',\n} as const;\n\n//#endregion\n","//#region ---- Menu Keys ----\n\nexport const AXESimproMenuKeys = {\n SimproExtensionConfig: 'simpro-extension:Menu:Configuration',\n} as const;\n\n//#endregion\n","//#region ---- Permission Keys ----\n\n/**\n * Administration capabilities used by this extension.\n * Domain capability keys for this module. Root groups live in `AXPCommonPermissionGroupKeys` (common contracts).\n */\nexport const AXPAdministrationPermissionKeys = {\n Access: 'Administration:Permission:Access',\n MaintainUsersAndRoles: 'Administration:Permission:MaintainUsersAndRoles',\n ManageSessions: 'Administration:Permission:ManageSessions',\n MaintainPolicies: 'Administration:Permission:MaintainPolicies',\n ViewIntegrations: 'Administration:Permission:ViewIntegrations',\n MaintainConnections: 'Administration:Permission:MaintainConnections',\n ManageIntegrationActions: 'Administration:Permission:ManageIntegrationActions',\n MaintainWorkflows: 'Administration:Permission:MaintainWorkflows',\n ManageWorkflowActions: 'Administration:Permission:ManageWorkflowActions',\n ViewRules: 'Administration:Permission:ViewRules',\n MaintainRules: 'Administration:Permission:MaintainRules',\n ManageRuleActions: 'Administration:Permission:ManageRuleActions',\n MaintainAi: 'Administration:Permission:MaintainAi',\n UseAiAssist: 'Administration:Permission:UseAiAssist',\n MaintainDashboards: 'Administration:Permission:MaintainDashboards',\n ViewJobs: 'Administration:Permission:ViewJobs',\n ManageJobActions: 'Administration:Permission:ManageJobActions',\n ViewObservability: 'Administration:Permission:ViewObservability',\n MaintainObservability: 'Administration:Permission:MaintainObservability',\n} as const;\n\n/**\n * @deprecated Prefer {@link AXPAdministrationPermissionKeys}.\n * Legacy nested shape kept so existing imports compile during migration.\n */\nexport const AXESimproPermissions = {\n SimproExtension: {\n Management: AXPAdministrationPermissionKeys.MaintainConnections,\n Catalog: {\n View: AXPAdministrationPermissionKeys.ViewIntegrations,\n },\n ProjectImport: {\n Execute: AXPAdministrationPermissionKeys.ManageIntegrationActions,\n },\n CustomerImport: {\n Execute: AXPAdministrationPermissionKeys.ManageIntegrationActions,\n },\n EmployeeImport: {\n Execute: AXPAdministrationPermissionKeys.ManageIntegrationActions,\n },\n ContractorImport: {\n Execute: AXPAdministrationPermissionKeys.ManageIntegrationActions,\n },\n ProjectSync: {\n Execute: AXPAdministrationPermissionKeys.ManageIntegrationActions,\n },\n },\n} as const;\n\n//#endregion\n","//#region ---- Simpro tenant connection config ----\n\n/** Stored on IntegrationManagement connection `config` for tenant-scoped Simpro (cloud-only). */\nexport interface AXESimproConnectionConfig {\n /** Simpro multi-company ID (0 for single-company builds). */\n companyId?: number;\n /** OAuth2 client ID from the Simpro application key file. */\n clientId?: string;\n /** OAuth2 client secret from the Simpro application key file. */\n clientSecret?: string;\n /** Optional override when it differs from `{buildUrl}/oauth2/login`. */\n authorizationUrl?: string;\n /** Current bearer token (authorization-code flow). */\n accessToken?: string;\n /** Refresh token from Simpro token response. */\n refreshToken?: string;\n /** ISO timestamp when `accessToken` expires. */\n tokenExpiresAt?: string;\n /** Full Simpro token JSON response (mirrors legacy SimproJson). */\n oauthTokenJson?: string;\n /** Background job pull sync state (server-managed). */\n jobsSync?: AXESimproJobsSyncState;\n}\n\n/** Simpro job pull sync state stored on the tenant connection `config.jobsSync`. */\nexport interface AXESimproJobsSyncState {\n /** ISO timestamp — last successful job pull (incremental sync watermark). */\n lastSyncAt?: string;\n /** ISO timestamp — last full snapshot reconcile (deactivation pass). */\n lastFullReconcileAt?: string;\n}\n\n//#endregion\n","//#region ---- Simpro OAuth API (client ↔ server) ----\n\nexport interface AXESimproOAuthStartRequest {\n redirectUri: string;\n connectionId?: string;\n}\n\nexport interface AXESimproOAuthStartResponse {\n redirectUrl: string;\n state: string;\n}\n\nexport interface AXESimproOAuthCompleteRequest {\n state: string;\n code: string;\n}\n\nexport interface AXESimproOAuthCompleteResponse {\n connectionId: string;\n}\n\nexport interface AXESimproOAuthValidateRequest {\n connectionId?: string;\n}\n\nexport interface AXESimproOAuthValidateResponse {\n valid: boolean;\n message?: string;\n}\n\n//#endregion\n","//#region ---- Remote Simpro DTOs ----\n\nimport type { AXESimproProjectSyncStrategy } from './sync.types';\n\nexport interface AXESimproRemotePartyRef {\n ID?: number;\n Name?: string | null;\n GivenName?: string | null;\n CompanyName?: string | null;\n}\n\nexport interface AXESimproRemoteAddress {\n Address?: string | null;\n City?: string | null;\n State?: string | null;\n PostalCode?: string | null;\n}\n\nexport interface AXESimproRemoteJob {\n ID: number;\n Name?: string | null;\n Description?: string | null;\n OrderNo?: string | null;\n RequestNo?: string | null;\n Type?: string | null;\n Stage?: string | { Name?: string } | null;\n DateIssued?: string | null;\n DueDate?: string | null;\n DueTime?: string | null;\n DateModified?: string | null;\n Status?: { ID?: number; Name?: string } | string | null;\n Customer?: AXESimproRemotePartyRef | string | null;\n Site?: AXESimproRemotePartyRef | string | null;\n}\n\nexport interface AXESimproRemoteCustomer {\n ID: number;\n GivenName?: string | null;\n FamilyName?: string | null;\n Title?: string | null;\n Phone?: string | null;\n Email?: string | null;\n EIN?: string | null;\n CompanyName?: string | null;\n Address?: AXESimproRemoteAddress | null;\n BillingAddress?: AXESimproRemoteAddress | null;\n}\n\nexport interface AXESimproRemoteSitePrimaryContact {\n CellPhone?: string | null;\n Email?: string | null;\n Contact?: { ID?: number } | null;\n}\n\nexport interface AXESimproRemoteSite {\n ID: number;\n Name?: string | null;\n Address?: AXESimproRemoteAddress | null;\n PrimaryContact?: AXESimproRemoteSitePrimaryContact | null;\n}\n\n/** Subset of Simpro `/employees/` fields cached as `resourceType=employee`. */\nexport interface AXESimproRemoteEmployee {\n ID: number;\n Name?: string | null;\n Position?: string | null;\n DateOfBirth?: string | null;\n DateOfHire?: string | null;\n Archived?: boolean | null;\n Address?: (AXESimproRemoteAddress & { Country?: string | null }) | null;\n PrimaryContact?: {\n Email?: string | null;\n SecondaryEmail?: string | null;\n WorkPhone?: string | null;\n Extension?: string | null;\n CellPhone?: string | null;\n Fax?: string | null;\n PreferredNotificationMethod?: string | null;\n } | null;\n AccountSetup?: {\n Username?: string | null;\n IsMobility?: boolean | null;\n SecurityGroups?: Array<{ ID?: number; Name?: string | null }> | null;\n } | null;\n UserProfile?: Record<string, unknown> | null;\n}\n\n/** Subset of Simpro `/contractors/` fields cached as `resourceType=contractor`. */\nexport interface AXESimproRemoteContractor {\n ID: number;\n Name?: string | null;\n Position?: string | null;\n Availability?: string | boolean | null;\n Address?: (AXESimproRemoteAddress & { Country?: string | null }) | null;\n DateOfHire?: string | null;\n DateOfBirth?: string | null;\n PrimaryContact?: {\n Email?: string | null;\n SecondaryEmail?: string | null;\n WorkPhone?: string | null;\n Extension?: string | null;\n CellPhone?: string | null;\n Fax?: string | null;\n PreferredNotificationMethod?: string | null;\n } | null;\n EmergencyContact?: {\n Name?: string | null;\n Relationship?: string | null;\n WorkPhone?: string | null;\n CellPhone?: string | null;\n AltPhone?: string | null;\n Address?: (AXESimproRemoteAddress & { Country?: string | null }) | string | null;\n } | null;\n Archived?: boolean | null;\n EIN?: string | null;\n CompanyNumber?: string | null;\n ContactName?: string | null;\n}\n\n//#endregion\n\n//#region ---- API request / response ----\n\nexport interface AXESimproPullJobsRequest {\n /** When set, pulls for this Simpro connection (required for multi-connection schedules). */\n connectionId?: string;\n /** Maximum Simpro jobs to pull into the cache (default 250, max 1000). */\n maxJobs?: number;\n /**\n * When true, runs a full snapshot (no incremental filter) and reconciles deactivations.\n * When false (default for schedules), pulls jobs modified since the last successful sync.\n */\n force?: boolean;\n}\n\nexport interface AXESimproPullJobsResponse {\n upserted: number;\n deactivated: number;\n /** True when incremental pull found no modified jobs in Simpro. */\n skipped?: boolean;\n /** Whether this run used incremental or full snapshot mode. */\n syncMode?: 'incremental' | 'full';\n /** Per data-type upsert counts (jobs / customers / sites / employees / contractors). */\n byResourceType?: {\n job?: { upserted: number; deactivated: number };\n customer?: { upserted: number; deactivated: number };\n site?: { upserted: number; deactivated: number };\n employee?: { upserted: number; deactivated: number };\n contractor?: { upserted: number; deactivated: number };\n };\n}\n\nexport interface AXESimproImportJobRequest {\n remoteRecordId: string;\n projectTypeId: string;\n syncStrategy: AXESimproProjectSyncStrategy;\n}\n\nexport interface AXESimproImportJobResponse {\n platformProjectId: string;\n created: boolean;\n}\n\nexport interface AXESimproImportCustomerRequest {\n remoteRecordId: string;\n}\n\nexport interface AXESimproImportCustomerResponse {\n platformCustomerId: string;\n created: boolean;\n}\n\n/** Username conflict: remote login username matches an unlinked platform employee's User. */\nexport interface AXESimproEmployeeUsernameConflict {\n remoteRecordId: string;\n remoteId: string;\n connectionId: string;\n username: string;\n remoteName: string;\n platformEmployeeId: string;\n platformEmployeeCode: string;\n platformEmployeeName?: string;\n}\n\nexport interface AXESimproSyncEmployeesRequest {\n /** Active Simpro connection ids to sync (defaults to all tenant connections with cache rows). */\n connectionIds?: string[];\n}\n\nexport interface AXESimproSyncEmployeesResponse {\n created: number;\n updated: number;\n skipped: number;\n conflicts: AXESimproEmployeeUsernameConflict[];\n errors: Array<{ remoteId: string; message: string }>;\n}\n\nexport interface AXESimproSyncContractorsRequest {\n /** Active Simpro connection ids to sync (defaults to all tenant connections with cache rows). */\n connectionIds?: string[];\n}\n\nexport interface AXESimproSyncContractorsResponse {\n created: number;\n updated: number;\n skipped: number;\n errors: Array<{ remoteId: string; message: string }>;\n}\n\nexport interface AXESimproLinkEmployeesRequest {\n links: Array<{ remoteRecordId: string; platformEmployeeId: string }>;\n}\n\nexport interface AXESimproLinkEmployeesResponse {\n linked: number;\n errors: Array<{ remoteRecordId: string; message: string }>;\n}\n\nexport interface AXESimproSyncPlatformProjectRequest {\n platformProjectId: string;\n}\n\nexport interface AXESimproConnectionLifecycleRequest {\n connectionId: string;\n action: 'connected' | 'disconnected' | 'deleted' | 'enabled' | 'disabled';\n}\n\nexport interface AXESimproConnectionLifecycleResponse {\n ok: true;\n}\n\n//#endregion\n","//#region ----- Simpro error codes -----\n\nexport const AXE_SIMPRO_ERROR_CODES = {\n COMPANY_ID_ZERO_MULTI: 'SIMPRO_COMPANY_ID_ZERO_MULTI',\n COMPANY_ID_INVALID: 'SIMPRO_COMPANY_ID_INVALID',\n} as const;\n\nexport type AXESimproErrorCode = (typeof AXE_SIMPRO_ERROR_CODES)[keyof typeof AXE_SIMPRO_ERROR_CODES];\n\n/** Client i18n keys for known Simpro error codes. */\nexport const AXE_SIMPRO_ERROR_I18N_KEYS: Record<AXESimproErrorCode, string> = {\n [AXE_SIMPRO_ERROR_CODES.COMPANY_ID_ZERO_MULTI]: '@extensions-simpro:errors.company-id-zero-multi',\n [AXE_SIMPRO_ERROR_CODES.COMPANY_ID_INVALID]: '@extensions-simpro:errors.company-id-invalid',\n};\n\n//#endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAAA;AAEA,MAAM,MAAM,GAAG;AACb,IAAA,IAAI,EAAE,mBAAmB;CAC1B;AAED,MAAM,WAAW,GAAG,iBAAiB;AAE9B,MAAM,UAAU,GAAG;IACxB,MAAM;AACN,IAAA,MAAM,EAAE;AACN,QAAA,IAAI,EAAE,WAAW;AACjB,QAAA,KAAK,EAAE,CAAA,CAAA,EAAI,MAAM,CAAC,IAAI,CAAA,yBAAA,CAA2B;AACjD,QAAA,IAAI,EAAE,uBAAuB;AAC9B,KAAA;;AAGH;;ACjBA;AAKO,MAAM,uBAAuB,GAAsB;AACxD,IAAA,IAAI,EAAE,UAA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AC,sBAAsB,CAAC,kBAAkB,GAAG,8CAA8C;;AAG7F;;ACfA;;AAEG;;"}
1
+ {"version":3,"file":"acorex-platform-extension-project-management-simpro-client-contracts.mjs","sources":["../../../../libs/extensions/project-management/simpro/contracts/src/root-config.ts","../../../../libs/extensions/project-management/simpro/contracts/src/manifest.ts","../../../../libs/extensions/project-management/simpro/contracts/src/commands.keys.ts","../../../../libs/extensions/project-management/simpro/contracts/src/menu.keys.ts","../../../../libs/extensions/project-management/simpro/contracts/src/permission.keys.ts","../../../../libs/extensions/project-management/simpro/contracts/src/connection.types.ts","../../../../libs/extensions/project-management/simpro/contracts/src/oauth.api.types.ts","../../../../libs/extensions/project-management/simpro/contracts/src/project-sync.api.types.ts","../../../../libs/extensions/project-management/simpro/contracts/src/simpro.errors.ts","../../../../libs/extensions/project-management/simpro/contracts/src/acorex-platform-extension-project-management-simpro-client-contracts.ts"],"sourcesContent":["//#region ---- Module Config ----\n\nconst config = {\n i18n: 'extensions-simpro',\n};\n\nconst MODULE_NAME = 'SimproExtension';\n\nexport const RootConfig = {\n config,\n module: {\n name: MODULE_NAME,\n title: `@${config.i18n}:integration.display-name`,\n icon: 'fa-light fa-briefcase',\n },\n};\n\n//#endregion\n","//#region ---- Manifest ----\n\nimport { AXPModuleManifest } from '@acorex-platform/framework-shared/core';\nimport { RootConfig } from './root-config';\n\nexport const SimproExtensionManifest: AXPModuleManifest = {\n name: RootConfig.module.name,\n version: '1.0.0',\n title: RootConfig.module.title,\n icon: RootConfig.module.icon,\n i18n: RootConfig.config.i18n,\n type: 'integration',\n domain: 'project-management',\n dependencies: [],\n};\n\n//#endregion\n","//#region ---- Command Keys ----\n\nexport const AXESimproCommandKeys = {\n ConnectionConnect: 'simpro-extension.Connection:Connect',\n ConnectionCompleteOAuth: 'simpro-extension.Connection:CompleteOAuth',\n ConnectionLifecycle: 'simpro-extension.Connection:Lifecycle',\n OAuthStart: 'simpro-extension.OAuth:Start',\n OAuthComplete: 'simpro-extension.OAuth:Complete',\n OAuthValidate: 'simpro-extension.OAuth:Validate',\n ProjectImportFromSimpro: 'simpro-extension.Project:ImportFromSimpro',\n CustomerImportFromSimpro: 'simpro-extension.Customer:ImportFromSimpro',\n EmployeeSyncFromSimpro: 'simpro-extension.Employee:SyncFromSimpro',\n EmployeeLinkFromSimpro: 'simpro-extension.Employee:LinkFromSimpro',\n ContractorSyncFromSimpro: 'simpro-extension.Contractor:SyncFromSimpro',\n ProjectSync: 'simpro-extension.Project:Sync',\n JobsPull: 'simpro-extension.Jobs:Pull',\n JobsRefresh: 'simpro-extension.Jobs:Refresh',\n} as const;\n\n//#endregion\n","//#region ---- Menu Keys ----\n\nexport const AXESimproMenuKeys = {\n SimproExtensionConfig: 'simpro-extension:Menu:Configuration',\n} as const;\n\n//#endregion\n","//#region ---- Permission Keys ----\n\n/**\n * Administration capabilities used by this extension.\n * Domain capability keys for this module. Root groups live in `AXPCommonPermissionGroupKeys` (common contracts).\n */\nexport const AXPAdministrationPermissionKeys = {\n Access: 'Administration:Permission:Access',\n MaintainUsersAndRoles: 'Administration:Permission:MaintainUsersAndRoles',\n ManageSessions: 'Administration:Permission:ManageSessions',\n MaintainPolicies: 'Administration:Permission:MaintainPolicies',\n ViewIntegrations: 'Administration:Permission:ViewIntegrations',\n MaintainConnections: 'Administration:Permission:MaintainConnections',\n ManageIntegrationActions: 'Administration:Permission:ManageIntegrationActions',\n MaintainWorkflows: 'Administration:Permission:MaintainWorkflows',\n ManageWorkflowActions: 'Administration:Permission:ManageWorkflowActions',\n ViewRules: 'Administration:Permission:ViewRules',\n MaintainRules: 'Administration:Permission:MaintainRules',\n ManageRuleActions: 'Administration:Permission:ManageRuleActions',\n MaintainAi: 'Administration:Permission:MaintainAi',\n UseAiAssist: 'Administration:Permission:UseAiAssist',\n MaintainDashboards: 'Administration:Permission:MaintainDashboards',\n ViewJobs: 'Administration:Permission:ViewJobs',\n ManageJobActions: 'Administration:Permission:ManageJobActions',\n ViewObservability: 'Administration:Permission:ViewObservability',\n MaintainObservability: 'Administration:Permission:MaintainObservability',\n} as const;\n\n/**\n * @deprecated Prefer {@link AXPAdministrationPermissionKeys}.\n * Legacy nested shape kept so existing imports compile during migration.\n */\nexport const AXESimproPermissions = {\n SimproExtension: {\n Management: AXPAdministrationPermissionKeys.MaintainConnections,\n Catalog: {\n View: AXPAdministrationPermissionKeys.ViewIntegrations,\n },\n ProjectImport: {\n Execute: AXPAdministrationPermissionKeys.ManageIntegrationActions,\n },\n CustomerImport: {\n Execute: AXPAdministrationPermissionKeys.ManageIntegrationActions,\n },\n EmployeeImport: {\n Execute: AXPAdministrationPermissionKeys.ManageIntegrationActions,\n },\n ContractorImport: {\n Execute: AXPAdministrationPermissionKeys.ManageIntegrationActions,\n },\n ProjectSync: {\n Execute: AXPAdministrationPermissionKeys.ManageIntegrationActions,\n },\n },\n} as const;\n\n//#endregion\n","//#region ---- Simpro tenant connection config ----\n\n/** Stored on IntegrationManagement connection `config` for tenant-scoped Simpro (cloud-only). */\nexport interface AXESimproConnectionConfig {\n /** Simpro multi-company ID (0 for single-company builds). */\n companyId?: number;\n /** OAuth2 client ID from the Simpro application key file. */\n clientId?: string;\n /** OAuth2 client secret from the Simpro application key file. */\n clientSecret?: string;\n /** Optional override when it differs from `{buildUrl}/oauth2/login`. */\n authorizationUrl?: string;\n /** Current bearer token (authorization-code flow). */\n accessToken?: string;\n /** Refresh token from Simpro token response. */\n refreshToken?: string;\n /** ISO timestamp when `accessToken` expires. */\n tokenExpiresAt?: string;\n /** Full Simpro token JSON response (mirrors legacy SimproJson). */\n oauthTokenJson?: string;\n /** Background job pull sync state (server-managed). */\n jobsSync?: AXESimproJobsSyncState;\n}\n\n/** Simpro job pull sync state stored on the tenant connection `config.jobsSync`. */\nexport interface AXESimproJobsSyncState {\n /** ISO timestamp — last successful job pull (incremental sync watermark). */\n lastSyncAt?: string;\n /** ISO timestamp — last full snapshot reconcile (deactivation pass). */\n lastFullReconcileAt?: string;\n}\n\n//#endregion\n","//#region ---- Simpro OAuth API (client ↔ server) ----\n\nexport interface AXESimproOAuthStartRequest {\n redirectUri: string;\n connectionId?: string;\n}\n\nexport interface AXESimproOAuthStartResponse {\n redirectUrl: string;\n state: string;\n}\n\nexport interface AXESimproOAuthCompleteRequest {\n state: string;\n code: string;\n}\n\nexport interface AXESimproOAuthCompleteResponse {\n connectionId: string;\n}\n\nexport interface AXESimproOAuthValidateRequest {\n connectionId?: string;\n}\n\nexport interface AXESimproOAuthValidateResponse {\n valid: boolean;\n message?: string;\n}\n\n//#endregion\n","//#region ---- Remote Simpro DTOs ----\n\nimport type { AXESimproProjectSyncStrategy } from './sync.types';\n\nexport interface AXESimproRemotePartyRef {\n ID?: number;\n Name?: string | null;\n GivenName?: string | null;\n CompanyName?: string | null;\n}\n\nexport interface AXESimproRemoteAddress {\n Address?: string | null;\n City?: string | null;\n State?: string | null;\n PostalCode?: string | null;\n}\n\nexport interface AXESimproRemoteJob {\n ID: number;\n Name?: string | null;\n Description?: string | null;\n OrderNo?: string | null;\n RequestNo?: string | null;\n Type?: string | null;\n Stage?: string | { Name?: string } | null;\n DateIssued?: string | null;\n DueDate?: string | null;\n DueTime?: string | null;\n DateModified?: string | null;\n Status?: { ID?: number; Name?: string } | string | null;\n Customer?: AXESimproRemotePartyRef | string | null;\n Site?: AXESimproRemotePartyRef | string | null;\n}\n\nexport interface AXESimproRemoteCustomer {\n ID: number;\n GivenName?: string | null;\n FamilyName?: string | null;\n Title?: string | null;\n Phone?: string | null;\n Email?: string | null;\n EIN?: string | null;\n CompanyName?: string | null;\n Address?: AXESimproRemoteAddress | null;\n BillingAddress?: AXESimproRemoteAddress | null;\n}\n\nexport interface AXESimproRemoteSitePrimaryContact {\n CellPhone?: string | null;\n Email?: string | null;\n Contact?: { ID?: number } | null;\n}\n\nexport interface AXESimproRemoteSite {\n ID: number;\n Name?: string | null;\n Address?: AXESimproRemoteAddress | null;\n PrimaryContact?: AXESimproRemoteSitePrimaryContact | null;\n}\n\n/** Subset of Simpro `/employees/` fields cached as `resourceType=employee`. */\nexport interface AXESimproRemoteEmployee {\n ID: number;\n Name?: string | null;\n Position?: string | null;\n DateOfBirth?: string | null;\n DateOfHire?: string | null;\n Archived?: boolean | null;\n Address?: (AXESimproRemoteAddress & { Country?: string | null }) | null;\n PrimaryContact?: {\n Email?: string | null;\n SecondaryEmail?: string | null;\n WorkPhone?: string | null;\n Extension?: string | null;\n CellPhone?: string | null;\n Fax?: string | null;\n PreferredNotificationMethod?: string | null;\n } | null;\n AccountSetup?: {\n Username?: string | null;\n IsMobility?: boolean | null;\n SecurityGroups?: Array<{ ID?: number; Name?: string | null }> | null;\n } | null;\n UserProfile?: Record<string, unknown> | null;\n}\n\n/** Subset of Simpro `/contractors/` fields cached as `resourceType=contractor`. */\nexport interface AXESimproRemoteContractor {\n ID: number;\n Name?: string | null;\n Position?: string | null;\n Availability?: string | boolean | null;\n Address?: (AXESimproRemoteAddress & { Country?: string | null }) | null;\n DateOfHire?: string | null;\n DateOfBirth?: string | null;\n PrimaryContact?: {\n Email?: string | null;\n SecondaryEmail?: string | null;\n WorkPhone?: string | null;\n Extension?: string | null;\n CellPhone?: string | null;\n Fax?: string | null;\n PreferredNotificationMethod?: string | null;\n } | null;\n EmergencyContact?: {\n Name?: string | null;\n Relationship?: string | null;\n WorkPhone?: string | null;\n CellPhone?: string | null;\n AltPhone?: string | null;\n Address?: (AXESimproRemoteAddress & { Country?: string | null }) | string | null;\n } | null;\n Archived?: boolean | null;\n EIN?: string | null;\n CompanyNumber?: string | null;\n ContactName?: string | null;\n}\n\n/** Subset of Simpro `/setup/labor/scheduleRates/` fields. */\nexport interface AXESimproRemoteScheduleRate {\n ID: number;\n Name?: string | null;\n Archived?: boolean | null;\n DateModified?: string | null;\n}\n\n/** Subset of Simpro `/setup/activities/` fields. */\nexport interface AXESimproRemoteActivity {\n ID: number;\n Name?: string | null;\n Billable?: boolean | null;\n ScheduleRate?: { ID?: number; Name?: string | null } | null;\n Archived?: boolean | null;\n DateModified?: string | null;\n}\n\n/** Subset of Simpro `/activitySchedules/` fields. */\nexport interface AXESimproRemoteActivitySchedule {\n ID: number;\n TotalHours?: number | null;\n Notes?: string | null;\n IsLocked?: boolean | null;\n Staff?: {\n ID?: number;\n Name?: string | null;\n Type?: string | null;\n TypeId?: number | null;\n } | null;\n Date?: string | null;\n Blocks?: unknown[] | null;\n DateModified?: string | null;\n Activity?: { ID?: number; Name?: string | null } | null;\n}\n\n//#endregion\n\n//#region ---- API request / response ----\n\nexport interface AXESimproPullJobsRequest {\n /** When set, pulls for this Simpro connection (required for multi-connection schedules). */\n connectionId?: string;\n /** Maximum Simpro jobs to pull into the cache (default 250, max 1000). */\n maxJobs?: number;\n /**\n * When true, runs a full snapshot (no incremental filter) and reconciles deactivations.\n * When false (default for schedules), pulls jobs modified since the last successful sync.\n */\n force?: boolean;\n}\n\nexport interface AXESimproPullJobsResponse {\n upserted: number;\n deactivated: number;\n /** True when incremental pull found no modified jobs in Simpro. */\n skipped?: boolean;\n /** Whether this run used incremental or full snapshot mode. */\n syncMode?: 'incremental' | 'full';\n /** Per data-type upsert counts for resources pulled into IntegrationRemoteRecord. */\n byResourceType?: {\n job?: { upserted: number; deactivated: number };\n customer?: { upserted: number; deactivated: number };\n site?: { upserted: number; deactivated: number };\n employee?: { upserted: number; deactivated: number };\n contractor?: { upserted: number; deactivated: number };\n scheduleRate?: { upserted: number; deactivated: number };\n activity?: { upserted: number; deactivated: number };\n activitySchedule?: { upserted: number; deactivated: number };\n };\n}\n\nexport interface AXESimproImportJobRequest {\n remoteRecordId: string;\n projectTypeId: string;\n syncStrategy: AXESimproProjectSyncStrategy;\n}\n\nexport interface AXESimproImportJobResponse {\n platformProjectId: string;\n created: boolean;\n}\n\nexport interface AXESimproImportCustomerRequest {\n remoteRecordId: string;\n}\n\nexport interface AXESimproImportCustomerResponse {\n platformCustomerId: string;\n created: boolean;\n}\n\n/** Username conflict: remote login username matches an unlinked platform employee's User. */\nexport interface AXESimproEmployeeUsernameConflict {\n remoteRecordId: string;\n remoteId: string;\n connectionId: string;\n username: string;\n remoteName: string;\n platformEmployeeId: string;\n platformEmployeeCode: string;\n platformEmployeeName?: string;\n}\n\nexport interface AXESimproSyncEmployeesRequest {\n /** Active Simpro connection ids to sync (defaults to all tenant connections with cache rows). */\n connectionIds?: string[];\n}\n\nexport interface AXESimproSyncEmployeesResponse {\n created: number;\n updated: number;\n skipped: number;\n conflicts: AXESimproEmployeeUsernameConflict[];\n errors: Array<{ remoteId: string; message: string }>;\n}\n\nexport interface AXESimproSyncContractorsRequest {\n /** Active Simpro connection ids to sync (defaults to all tenant connections with cache rows). */\n connectionIds?: string[];\n}\n\nexport interface AXESimproSyncContractorsResponse {\n created: number;\n updated: number;\n skipped: number;\n errors: Array<{ remoteId: string; message: string }>;\n}\n\nexport interface AXESimproLinkEmployeesRequest {\n links: Array<{ remoteRecordId: string; platformEmployeeId: string }>;\n}\n\nexport interface AXESimproLinkEmployeesResponse {\n linked: number;\n errors: Array<{ remoteRecordId: string; message: string }>;\n}\n\nexport interface AXESimproSyncPlatformProjectRequest {\n platformProjectId: string;\n}\n\nexport interface AXESimproConnectionLifecycleRequest {\n connectionId: string;\n action: 'connected' | 'disconnected' | 'deleted' | 'enabled' | 'disabled';\n}\n\nexport interface AXESimproConnectionLifecycleResponse {\n ok: true;\n}\n\n//#endregion\n","//#region ----- Simpro error codes -----\n\nexport const AXE_SIMPRO_ERROR_CODES = {\n COMPANY_ID_ZERO_MULTI: 'SIMPRO_COMPANY_ID_ZERO_MULTI',\n COMPANY_ID_INVALID: 'SIMPRO_COMPANY_ID_INVALID',\n} as const;\n\nexport type AXESimproErrorCode = (typeof AXE_SIMPRO_ERROR_CODES)[keyof typeof AXE_SIMPRO_ERROR_CODES];\n\n/** Client i18n keys for known Simpro error codes. */\nexport const AXE_SIMPRO_ERROR_I18N_KEYS: Record<AXESimproErrorCode, string> = {\n [AXE_SIMPRO_ERROR_CODES.COMPANY_ID_ZERO_MULTI]: '@extensions-simpro:errors.company-id-zero-multi',\n [AXE_SIMPRO_ERROR_CODES.COMPANY_ID_INVALID]: '@extensions-simpro:errors.company-id-invalid',\n};\n\n//#endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAAA;AAEA,MAAM,MAAM,GAAG;AACb,IAAA,IAAI,EAAE,mBAAmB;CAC1B;AAED,MAAM,WAAW,GAAG,iBAAiB;AAE9B,MAAM,UAAU,GAAG;IACxB,MAAM;AACN,IAAA,MAAM,EAAE;AACN,QAAA,IAAI,EAAE,WAAW;AACjB,QAAA,KAAK,EAAE,CAAA,CAAA,EAAI,MAAM,CAAC,IAAI,CAAA,yBAAA,CAA2B;AACjD,QAAA,IAAI,EAAE,uBAAuB;AAC9B,KAAA;;AAGH;;ACjBA;AAKO,MAAM,uBAAuB,GAAsB;AACxD,IAAA,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,IAAI;AAC5B,IAAA,OAAO,EAAE,OAAO;AAChB,IAAA,KAAK,EAAE,UAAU,CAAC,MAAM,CAAC,KAAK;AAC9B,IAAA,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,IAAI;AAC5B,IAAA,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,IAAI;AAC5B,IAAA,IAAI,EAAE,aAAa;AACnB,IAAA,MAAM,EAAE,oBAAoB;AAC5B,IAAA,YAAY,EAAE,EAAE;;AAGlB;;AChBA;AAEO,MAAM,oBAAoB,GAAG;AAClC,IAAA,iBAAiB,EAAE,qCAAqC;AACxD,IAAA,uBAAuB,EAAE,2CAA2C;AACpE,IAAA,mBAAmB,EAAE,uCAAuC;AAC5D,IAAA,UAAU,EAAE,8BAA8B;AAC1C,IAAA,aAAa,EAAE,iCAAiC;AAChD,IAAA,aAAa,EAAE,iCAAiC;AAChD,IAAA,uBAAuB,EAAE,2CAA2C;AACpE,IAAA,wBAAwB,EAAE,4CAA4C;AACtE,IAAA,sBAAsB,EAAE,0CAA0C;AAClE,IAAA,sBA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AAO,EAAE,+BAA+B,CAAC,wBAAwB;AAClE,SAAA;AACD,QAAA,cAAc,EAAE;YACd,OAAO,EAAE,+BAA+B,CAAC,wBAAwB;AAClE,SAAA;AACD,QAAA,gBAAgB,EAAE;YAChB,OAAO,EAAE,+BAA+B,CAAC,wBAAwB;AAClE,SAAA;AACD,QAAA,WAAW,EAAE;YACX,OAAO,EAAE,+BAA+B,CAAC,wBAAwB;AAClE,SAAA;AACF,KAAA;;AAGH;;ACxDA;AAgCA;;AChCA;AA8BA;;AC9BA;AA8QA;;AC9QA;AAEO,MAAM,sBAAsB,GAAG;AACpC,IAAA,qBAAqB,EAAE,8BAA8B;AACrD,IAAA,kBAAkB,EAAE,2BAA2B;;AAKjD;AACO,MAAM,0BAA0B,GAAuC;AAC5E,IAAA,CAAC,sBAAsB,CAAC,qBAAqB,GAAG,iDAAiD;AACjG,IAAA,CAAC,sBAAsB,CAAC,kBAAkB,GAAG,8CAA8C;;AAG7F;;ACfA;;AAEG;;"}
@@ -242,7 +242,7 @@
242
242
  "pull": {
243
243
  "progress": {
244
244
  "starting": "Starting Simpro job pull.",
245
- "fetching": "Fetching jobs, customers, sites, employees, and contractors.",
245
+ "fetching": "Fetching jobs, customers, sites, employees, contractors, schedule rates, activities, and activity schedules.",
246
246
  "related-customers": "Loading related customers.",
247
247
  "related-sites": "Loading related sites.",
248
248
  "saving-jobs": "Saving jobs.",
@@ -250,6 +250,9 @@
250
250
  "saving-sites": "Saving sites.",
251
251
  "saving-employees": "Saving employees.",
252
252
  "saving-contractors": "Saving contractors.",
253
+ "saving-schedule-rates": "Saving schedule rates.",
254
+ "saving-activities": "Saving activities.",
255
+ "saving-activity-schedules": "Saving activity schedules.",
253
256
  "finishing": "Finishing sync.",
254
257
  "skipped": "No modified jobs since last sync.",
255
258
  "complete-full": "Full sync finished.",
@@ -242,7 +242,7 @@
242
242
  "pull": {
243
243
  "progress": {
244
244
  "starting": "Starting Simpro job pull.",
245
- "fetching": "Fetching jobs, customers, sites, employees, and contractors.",
245
+ "fetching": "Fetching jobs, customers, sites, employees, contractors, schedule rates, activities, and activity schedules.",
246
246
  "related-customers": "Loading related customers.",
247
247
  "related-sites": "Loading related sites.",
248
248
  "saving-jobs": "Saving jobs.",
@@ -250,6 +250,9 @@
250
250
  "saving-sites": "Saving sites.",
251
251
  "saving-employees": "Saving employees.",
252
252
  "saving-contractors": "Saving contractors.",
253
+ "saving-schedule-rates": "Saving schedule rates.",
254
+ "saving-activities": "Saving activities.",
255
+ "saving-activity-schedules": "Saving activity schedules.",
253
256
  "finishing": "Finishing sync.",
254
257
  "skipped": "No modified jobs since last sync.",
255
258
  "complete-full": "Full sync finished.",
@@ -226,7 +226,7 @@
226
226
  "pull": {
227
227
  "progress": {
228
228
  "starting": "در حال شروع دریافت کارها از Simpro.",
229
- "fetching": "در حال دریافت کارها، مشتری‌ها، سایت‌ها، کارکنان و پیمانکاران.",
229
+ "fetching": "در حال دریافت کارها، مشتری‌ها، سایت‌ها، کارکنان، پیمانکاران، نرخ‌های زمان‌بندی، فعالیت‌ها و زمان‌بندی فعالیت‌ها.",
230
230
  "related-customers": "در حال بارگذاری مشتری‌های مرتبط.",
231
231
  "related-sites": "در حال بارگذاری سایت‌های مرتبط.",
232
232
  "saving-jobs": "در حال ذخیره کارها.",
@@ -234,6 +234,9 @@
234
234
  "saving-sites": "در حال ذخیره سایت‌ها.",
235
235
  "saving-employees": "در حال ذخیره کارکنان.",
236
236
  "saving-contractors": "در حال ذخیره پیمانکاران.",
237
+ "saving-schedule-rates": "در حال ذخیره نرخ‌های زمان‌بندی.",
238
+ "saving-activities": "در حال ذخیره فعالیت‌ها.",
239
+ "saving-activity-schedules": "در حال ذخیره زمان‌بندی فعالیت‌ها.",
237
240
  "finishing": "در حال نهایی‌سازی همگام‌سازی.",
238
241
  "skipped": "از همگام‌سازی قبلی تغییری نبود.",
239
242
  "complete-full": "همگام‌سازی کامل تمام شد.",
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@acorex-platform/extension-project-management-simpro-client",
3
- "version": "2.0.0-next.27",
3
+ "version": "2.0.0-next.30",
4
4
  "sideEffects": false,
5
5
  "peerDependencies": {
6
- "@acorex-platform/extension-project-management-core-client": "2.0.0-next.27",
6
+ "@acorex-platform/extension-project-management-core-client": "2.0.0-next.30",
7
7
  "@angular/common": "^21.0.0 || ^22.0.0",
8
8
  "@angular/core": "^21.0.0 || ^22.0.0"
9
9
  },
@@ -264,6 +264,45 @@ interface AXESimproRemoteContractor {
264
264
  CompanyNumber?: string | null;
265
265
  ContactName?: string | null;
266
266
  }
267
+ /** Subset of Simpro `/setup/labor/scheduleRates/` fields. */
268
+ interface AXESimproRemoteScheduleRate {
269
+ ID: number;
270
+ Name?: string | null;
271
+ Archived?: boolean | null;
272
+ DateModified?: string | null;
273
+ }
274
+ /** Subset of Simpro `/setup/activities/` fields. */
275
+ interface AXESimproRemoteActivity {
276
+ ID: number;
277
+ Name?: string | null;
278
+ Billable?: boolean | null;
279
+ ScheduleRate?: {
280
+ ID?: number;
281
+ Name?: string | null;
282
+ } | null;
283
+ Archived?: boolean | null;
284
+ DateModified?: string | null;
285
+ }
286
+ /** Subset of Simpro `/activitySchedules/` fields. */
287
+ interface AXESimproRemoteActivitySchedule {
288
+ ID: number;
289
+ TotalHours?: number | null;
290
+ Notes?: string | null;
291
+ IsLocked?: boolean | null;
292
+ Staff?: {
293
+ ID?: number;
294
+ Name?: string | null;
295
+ Type?: string | null;
296
+ TypeId?: number | null;
297
+ } | null;
298
+ Date?: string | null;
299
+ Blocks?: unknown[] | null;
300
+ DateModified?: string | null;
301
+ Activity?: {
302
+ ID?: number;
303
+ Name?: string | null;
304
+ } | null;
305
+ }
267
306
  interface AXESimproPullJobsRequest {
268
307
  /** When set, pulls for this Simpro connection (required for multi-connection schedules). */
269
308
  connectionId?: string;
@@ -282,7 +321,7 @@ interface AXESimproPullJobsResponse {
282
321
  skipped?: boolean;
283
322
  /** Whether this run used incremental or full snapshot mode. */
284
323
  syncMode?: 'incremental' | 'full';
285
- /** Per data-type upsert counts (jobs / customers / sites / employees / contractors). */
324
+ /** Per data-type upsert counts for resources pulled into IntegrationRemoteRecord. */
286
325
  byResourceType?: {
287
326
  job?: {
288
327
  upserted: number;
@@ -304,6 +343,18 @@ interface AXESimproPullJobsResponse {
304
343
  upserted: number;
305
344
  deactivated: number;
306
345
  };
346
+ scheduleRate?: {
347
+ upserted: number;
348
+ deactivated: number;
349
+ };
350
+ activity?: {
351
+ upserted: number;
352
+ deactivated: number;
353
+ };
354
+ activitySchedule?: {
355
+ upserted: number;
356
+ deactivated: number;
357
+ };
307
358
  };
308
359
  }
309
360
  interface AXESimproImportJobRequest {
@@ -393,4 +444,4 @@ type AXESimproErrorCode = (typeof AXE_SIMPRO_ERROR_CODES)[keyof typeof AXE_SIMPR
393
444
  declare const AXE_SIMPRO_ERROR_I18N_KEYS: Record<AXESimproErrorCode, string>;
394
445
 
395
446
  export { AXESimproCommandKeys, AXESimproMenuKeys, AXESimproPermissions, AXE_SIMPRO_ERROR_CODES, AXE_SIMPRO_ERROR_I18N_KEYS, AXPAdministrationPermissionKeys, RootConfig, SimproExtensionManifest };
396
- export type { AXESimproConnectionConfig, AXESimproConnectionLifecycleRequest, AXESimproConnectionLifecycleResponse, AXESimproEmployeeUsernameConflict, AXESimproErrorCode, AXESimproImportCustomerRequest, AXESimproImportCustomerResponse, AXESimproImportJobRequest, AXESimproImportJobResponse, AXESimproJobsSyncState, AXESimproLinkEmployeesRequest, AXESimproLinkEmployeesResponse, AXESimproOAuthCompleteRequest, AXESimproOAuthCompleteResponse, AXESimproOAuthStartRequest, AXESimproOAuthStartResponse, AXESimproOAuthValidateRequest, AXESimproOAuthValidateResponse, AXESimproPullJobsRequest, AXESimproPullJobsResponse, AXESimproRemoteAddress, AXESimproRemoteContractor, AXESimproRemoteCustomer, AXESimproRemoteEmployee, AXESimproRemoteJob, AXESimproRemotePartyRef, AXESimproRemoteSite, AXESimproRemoteSitePrimaryContact, AXESimproSyncContractorsRequest, AXESimproSyncContractorsResponse, AXESimproSyncEmployeesRequest, AXESimproSyncEmployeesResponse, AXESimproSyncPlatformProjectRequest };
447
+ export type { AXESimproConnectionConfig, AXESimproConnectionLifecycleRequest, AXESimproConnectionLifecycleResponse, AXESimproEmployeeUsernameConflict, AXESimproErrorCode, AXESimproImportCustomerRequest, AXESimproImportCustomerResponse, AXESimproImportJobRequest, AXESimproImportJobResponse, AXESimproJobsSyncState, AXESimproLinkEmployeesRequest, AXESimproLinkEmployeesResponse, AXESimproOAuthCompleteRequest, AXESimproOAuthCompleteResponse, AXESimproOAuthStartRequest, AXESimproOAuthStartResponse, AXESimproOAuthValidateRequest, AXESimproOAuthValidateResponse, AXESimproPullJobsRequest, AXESimproPullJobsResponse, AXESimproRemoteActivity, AXESimproRemoteActivitySchedule, AXESimproRemoteAddress, AXESimproRemoteContractor, AXESimproRemoteCustomer, AXESimproRemoteEmployee, AXESimproRemoteJob, AXESimproRemotePartyRef, AXESimproRemoteScheduleRate, AXESimproRemoteSite, AXESimproRemoteSitePrimaryContact, AXESimproSyncContractorsRequest, AXESimproSyncContractorsResponse, AXESimproSyncEmployeesRequest, AXESimproSyncEmployeesResponse, AXESimproSyncPlatformProjectRequest };