@acorex-platform/extension-project-management-simpro-client 2.0.0-next.3 → 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.
- package/fesm2022/acorex-platform-extension-project-management-simpro-client-contracts.mjs +9 -0
- package/fesm2022/acorex-platform-extension-project-management-simpro-client-contracts.mjs.map +1 -1
- package/fesm2022/acorex-platform-extension-project-management-simpro-client.mjs +117 -7
- package/fesm2022/acorex-platform-extension-project-management-simpro-client.mjs.map +1 -1
- package/i18n/en-AU/extensions-simpro.json +62 -1
- package/i18n/en-US/extensions-simpro.json +62 -1
- package/i18n/fa-IR/extensions-simpro.json +62 -1
- package/package.json +3 -3
- package/types/acorex-platform-extension-project-management-simpro-client-contracts.d.ts +153 -2
|
@@ -38,6 +38,9 @@ const AXESimproCommandKeys = {
|
|
|
38
38
|
OAuthValidate: 'simpro-extension.OAuth:Validate',
|
|
39
39
|
ProjectImportFromSimpro: 'simpro-extension.Project:ImportFromSimpro',
|
|
40
40
|
CustomerImportFromSimpro: 'simpro-extension.Customer:ImportFromSimpro',
|
|
41
|
+
EmployeeSyncFromSimpro: 'simpro-extension.Employee:SyncFromSimpro',
|
|
42
|
+
EmployeeLinkFromSimpro: 'simpro-extension.Employee:LinkFromSimpro',
|
|
43
|
+
ContractorSyncFromSimpro: 'simpro-extension.Contractor:SyncFromSimpro',
|
|
41
44
|
ProjectSync: 'simpro-extension.Project:Sync',
|
|
42
45
|
JobsPull: 'simpro-extension.Jobs:Pull',
|
|
43
46
|
JobsRefresh: 'simpro-extension.Jobs:Refresh',
|
|
@@ -92,6 +95,12 @@ const AXESimproPermissions = {
|
|
|
92
95
|
CustomerImport: {
|
|
93
96
|
Execute: AXPAdministrationPermissionKeys.ManageIntegrationActions,
|
|
94
97
|
},
|
|
98
|
+
EmployeeImport: {
|
|
99
|
+
Execute: AXPAdministrationPermissionKeys.ManageIntegrationActions,
|
|
100
|
+
},
|
|
101
|
+
ContractorImport: {
|
|
102
|
+
Execute: AXPAdministrationPermissionKeys.ManageIntegrationActions,
|
|
103
|
+
},
|
|
95
104
|
ProjectSync: {
|
|
96
105
|
Execute: AXPAdministrationPermissionKeys.ManageIntegrationActions,
|
|
97
106
|
},
|
package/fesm2022/acorex-platform-extension-project-management-simpro-client-contracts.mjs.map
CHANGED
|
@@ -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 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 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 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//#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). */\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 };\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\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,CA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4CAA4C;AAC9D,IAAA,iBAAiB,EAAE,6CAA6C;AAChE,IAAA,qBAAqB,EAAE,iDAAiD;;AAG1E;;;AAGG;AACI,MAAM,oBAAoB,GAAG;AAClC,IAAA,eAAe,EAAE;QACf,UAAU,EAAE,+BAA+B,CAAC,mBAAmB;AAC/D,QAAA,OAAO,EAAE;YACP,IAAI,EAAE,+BAA+B,CAAC,gBAAgB;AACvD,SAAA;AACD,QAAA,aAAa,EAAE;YACb,OAAO,EAAE,+BAA+B,CAAC,wBAAwB;AAClE,SAAA;AACD,QAAA,cAAc,EAAE;YACd,OAAO,EAAE,+BAA+B,CAAC,wBAAwB;AAClE,SAAA;AACD,QAAA,WAAW,EAAE;YACX,OAAO,EAAE,+BAA+B,CAAC,wBAAwB;AAClE,SAAA;AACF,KAAA;;AAGH;;AClDA;AAgCA;;AChCA;AA8BA;;AC9BA;AAuJA;;ACvJA;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;;"}
|
|
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;AA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0B,GAAuC;AAC5E,IAAA,CAAC,sBAAsB,CAAC,qBAAqB,GAAG,iDAAiD;AACjG,IAAA,CAAC,sBAAsB,CAAC,kBAAkB,GAAG,8CAA8C;;AAG7F;;ACfA;;AAEG;;"}
|
|
@@ -5,12 +5,14 @@ import { AXPEntityService, ensureListActions, actionExists, AXP_ENTITY_MODIFIER
|
|
|
5
5
|
import { AXPQueryService, AXPCommandService, provideCommandSetups } from '@acorex-platform/framework-client/runtime';
|
|
6
6
|
import * as i0 from '@angular/core';
|
|
7
7
|
import { inject, Injectable, NgModule, input, computed, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
8
|
-
import { AXESimproCommandKeys, RootConfig as RootConfig$
|
|
8
|
+
import { AXPAdministrationPermissionKeys, AXESimproCommandKeys, RootConfig as RootConfig$4, AXESimproMenuKeys } from '@acorex-platform/extension-project-management-simpro-client/contracts';
|
|
9
9
|
import { AXE_PM_INTEGRATION_PROVIDER_SIMPRO } from '@acorex-platform/extension-project-management-core-client/contracts';
|
|
10
10
|
import { RootConfig } from '@acorex-platform/module-project-management-client/contracts';
|
|
11
11
|
import { AXPSystemActionType, AXPWidgetsList, AXP_INTEGRATION_AUTH_METHOD_TYPE, AXP_INTEGRATION_CONNECTION_SCOPE, AXP_INTEGRATION_CAPABILITY, AXPRegionalSetting, AXP_INTEGRATION_CONNECTION_STATUS, runtimeQueryPayloadData } from '@acorex-platform/framework-shared/core';
|
|
12
12
|
import { AXPEntityCommandScope } from '@acorex-platform/framework-shared/entity';
|
|
13
13
|
import { RootConfig as RootConfig$1 } from '@acorex-platform/module-customer-management-client/contracts';
|
|
14
|
+
import { RootConfig as RootConfig$2 } from '@acorex-platform/module-human-capital-management-client/contracts';
|
|
15
|
+
import { RootConfig as RootConfig$3 } from '@acorex-platform/module-contractor-management-client/contracts';
|
|
14
16
|
import { AXFormatService } from '@acorex/core/format';
|
|
15
17
|
import { trim, defaultTo } from 'lodash-es';
|
|
16
18
|
import { AXPBackgroundJobQueryKeys } from '@acorex-platform/framework-shared/background-job';
|
|
@@ -55,7 +57,8 @@ class AXESimproProjectLinkExpressionEvaluatorScopeProvider {
|
|
|
55
57
|
//#region ---- Imports ----
|
|
56
58
|
//#endregion
|
|
57
59
|
const IMPORT_ORDER$1 = 36;
|
|
58
|
-
const SYNC_ORDER = 37;
|
|
60
|
+
const SYNC_ORDER$2 = 37;
|
|
61
|
+
const MANAGE_INTEGRATION_ACTIONS_HIDDEN$3 = `{{ !permission.check("${AXPAdministrationPermissionKeys.ManageIntegrationActions}") }}`;
|
|
59
62
|
function buildImportAction$1() {
|
|
60
63
|
return {
|
|
61
64
|
name: AXESimproCommandKeys.ProjectImportFromSimpro,
|
|
@@ -66,6 +69,8 @@ function buildImportAction$1() {
|
|
|
66
69
|
icon: 'fa-light fa-briefcase',
|
|
67
70
|
scope: AXPEntityCommandScope.TypeLevel,
|
|
68
71
|
order: IMPORT_ORDER$1,
|
|
72
|
+
permissions: [AXPAdministrationPermissionKeys.ManageIntegrationActions],
|
|
73
|
+
hidden: MANAGE_INTEGRATION_ACTIONS_HIDDEN$3,
|
|
69
74
|
};
|
|
70
75
|
}
|
|
71
76
|
function buildSyncAction() {
|
|
@@ -80,7 +85,7 @@ function buildSyncAction() {
|
|
|
80
85
|
type: AXPSystemActionType.Sync,
|
|
81
86
|
icon: 'fa-light fa-arrows-rotate',
|
|
82
87
|
scope: AXPEntityCommandScope.Individual,
|
|
83
|
-
order: SYNC_ORDER,
|
|
88
|
+
order: SYNC_ORDER$2,
|
|
84
89
|
hidden: `{{ !(await ${AXE_SIMPRO_EXPRESSION_SCOPE}.hasProjectLink(context.eval("id"))) }}`,
|
|
85
90
|
};
|
|
86
91
|
}
|
|
@@ -122,6 +127,7 @@ const AXESimproProjectEntityModifier = {
|
|
|
122
127
|
//#endregion
|
|
123
128
|
//#region ----- Constants -----
|
|
124
129
|
const IMPORT_ORDER = 36;
|
|
130
|
+
const MANAGE_INTEGRATION_ACTIONS_HIDDEN$2 = `{{ !permission.check("${AXPAdministrationPermissionKeys.ManageIntegrationActions}") }}`;
|
|
125
131
|
//#endregion
|
|
126
132
|
//#region ----- Actions -----
|
|
127
133
|
function buildImportAction() {
|
|
@@ -134,6 +140,8 @@ function buildImportAction() {
|
|
|
134
140
|
icon: 'fa-light fa-briefcase',
|
|
135
141
|
scope: AXPEntityCommandScope.TypeLevel,
|
|
136
142
|
order: IMPORT_ORDER,
|
|
143
|
+
permissions: [AXPAdministrationPermissionKeys.ManageIntegrationActions],
|
|
144
|
+
hidden: MANAGE_INTEGRATION_ACTIONS_HIDDEN$2,
|
|
137
145
|
};
|
|
138
146
|
}
|
|
139
147
|
//#endregion
|
|
@@ -164,20 +172,118 @@ const AXESimproCustomerEntityModifier = {
|
|
|
164
172
|
};
|
|
165
173
|
//#endregion
|
|
166
174
|
|
|
175
|
+
//#region ---- Imports ----
|
|
176
|
+
//#endregion
|
|
177
|
+
//#region ----- Constants -----
|
|
178
|
+
const SYNC_ORDER$1 = 38;
|
|
179
|
+
const MANAGE_INTEGRATION_ACTIONS_HIDDEN$1 = `{{ !permission.check("${AXPAdministrationPermissionKeys.ManageIntegrationActions}") }}`;
|
|
180
|
+
//#endregion
|
|
181
|
+
//#region ----- Actions -----
|
|
182
|
+
function buildSyncEmployeesAction() {
|
|
183
|
+
return {
|
|
184
|
+
name: AXESimproCommandKeys.EmployeeSyncFromSimpro,
|
|
185
|
+
title: '@extensions-simpro:actions.sync-employees-from-simpro.title',
|
|
186
|
+
command: { name: AXESimproCommandKeys.EmployeeSyncFromSimpro },
|
|
187
|
+
priority: 'secondary',
|
|
188
|
+
type: AXPSystemActionType.Import,
|
|
189
|
+
icon: 'fa-light fa-user-helmet-safety',
|
|
190
|
+
scope: AXPEntityCommandScope.TypeLevel,
|
|
191
|
+
order: SYNC_ORDER$1,
|
|
192
|
+
permissions: [AXPAdministrationPermissionKeys.ManageIntegrationActions],
|
|
193
|
+
hidden: MANAGE_INTEGRATION_ACTIONS_HIDDEN$1,
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
//#endregion
|
|
197
|
+
//#region ----- Modifier -----
|
|
198
|
+
/** Adds Simpro employee sync action to HumanCapitalManagement.Employee list views. */
|
|
199
|
+
const AXESimproEmployeeEntityModifier = {
|
|
200
|
+
entityName: RootConfig$2.entities.employee.name,
|
|
201
|
+
order: 52,
|
|
202
|
+
modifier: (ctx) => {
|
|
203
|
+
if (ctx.module.get() !== RootConfig$2.module.name) {
|
|
204
|
+
return;
|
|
205
|
+
}
|
|
206
|
+
ensureListActions(ctx);
|
|
207
|
+
ctx.interfaces.update((interfaces) => {
|
|
208
|
+
const next = (interfaces ?? {});
|
|
209
|
+
const master = (next['master'] ?? {});
|
|
210
|
+
const list = (master['list'] ?? { actions: [], views: [] });
|
|
211
|
+
const listActions = (list['actions'] ?? []);
|
|
212
|
+
if (!actionExists(listActions, AXESimproCommandKeys.EmployeeSyncFromSimpro)) {
|
|
213
|
+
listActions.push(buildSyncEmployeesAction());
|
|
214
|
+
}
|
|
215
|
+
list['actions'] = listActions;
|
|
216
|
+
master['list'] = list;
|
|
217
|
+
next['master'] = master;
|
|
218
|
+
return next;
|
|
219
|
+
});
|
|
220
|
+
},
|
|
221
|
+
};
|
|
222
|
+
//#endregion
|
|
223
|
+
|
|
224
|
+
//#region ---- Imports ----
|
|
225
|
+
//#endregion
|
|
226
|
+
//#region ----- Constants -----
|
|
227
|
+
const SYNC_ORDER = 38;
|
|
228
|
+
const MANAGE_INTEGRATION_ACTIONS_HIDDEN = `{{ !permission.check("${AXPAdministrationPermissionKeys.ManageIntegrationActions}") }}`;
|
|
229
|
+
//#endregion
|
|
230
|
+
//#region ----- Actions -----
|
|
231
|
+
function buildSyncContractorsAction() {
|
|
232
|
+
return {
|
|
233
|
+
name: AXESimproCommandKeys.ContractorSyncFromSimpro,
|
|
234
|
+
title: '@extensions-simpro:actions.sync-contractors-from-simpro.title',
|
|
235
|
+
command: { name: AXESimproCommandKeys.ContractorSyncFromSimpro },
|
|
236
|
+
priority: 'secondary',
|
|
237
|
+
type: AXPSystemActionType.Import,
|
|
238
|
+
icon: 'fa-light fa-helmet-safety',
|
|
239
|
+
scope: AXPEntityCommandScope.TypeLevel,
|
|
240
|
+
order: SYNC_ORDER,
|
|
241
|
+
permissions: [AXPAdministrationPermissionKeys.ManageIntegrationActions],
|
|
242
|
+
hidden: MANAGE_INTEGRATION_ACTIONS_HIDDEN,
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
//#endregion
|
|
246
|
+
//#region ----- Modifier -----
|
|
247
|
+
/** Adds Simpro contractor sync action to ContractorManagement.Contractor list views. */
|
|
248
|
+
const AXESimproContractorEntityModifier = {
|
|
249
|
+
entityName: RootConfig$3.entities.contractor.name,
|
|
250
|
+
order: 52,
|
|
251
|
+
modifier: (ctx) => {
|
|
252
|
+
if (ctx.module.get() !== RootConfig$3.module.name) {
|
|
253
|
+
return;
|
|
254
|
+
}
|
|
255
|
+
ensureListActions(ctx);
|
|
256
|
+
ctx.interfaces.update((interfaces) => {
|
|
257
|
+
const next = (interfaces ?? {});
|
|
258
|
+
const master = (next['master'] ?? {});
|
|
259
|
+
const list = (master['list'] ?? { actions: [], views: [] });
|
|
260
|
+
const listActions = (list['actions'] ?? []);
|
|
261
|
+
if (!actionExists(listActions, AXESimproCommandKeys.ContractorSyncFromSimpro)) {
|
|
262
|
+
listActions.push(buildSyncContractorsAction());
|
|
263
|
+
}
|
|
264
|
+
list['actions'] = listActions;
|
|
265
|
+
master['list'] = list;
|
|
266
|
+
next['master'] = master;
|
|
267
|
+
return next;
|
|
268
|
+
});
|
|
269
|
+
},
|
|
270
|
+
};
|
|
271
|
+
//#endregion
|
|
272
|
+
|
|
167
273
|
//#region ---- Simpro logo registry key ----
|
|
168
274
|
const axpSimproLogoKey = 'simpro';
|
|
169
275
|
//#endregion
|
|
170
276
|
|
|
171
277
|
class AXESimproIntegrationProvider {
|
|
172
278
|
async provide(context) {
|
|
173
|
-
const I18N = `@${RootConfig$
|
|
279
|
+
const I18N = `@${RootConfig$4.config.i18n}:integration`;
|
|
174
280
|
context.register({
|
|
175
281
|
domainId: 'project-management',
|
|
176
282
|
id: 'simpro',
|
|
177
|
-
module: RootConfig$
|
|
283
|
+
module: RootConfig$4.module.name,
|
|
178
284
|
displayName: `${I18N}.display-name`,
|
|
179
285
|
description: `${I18N}.description`,
|
|
180
|
-
icon: RootConfig$
|
|
286
|
+
icon: RootConfig$4.module.icon,
|
|
181
287
|
logoKey: axpSimproLogoKey,
|
|
182
288
|
capabilities: [AXP_INTEGRATION_CAPABILITY.Sync, AXP_INTEGRATION_CAPABILITY.Import],
|
|
183
289
|
connectionScopes: [AXP_INTEGRATION_CONNECTION_SCOPE.Tenant],
|
|
@@ -462,7 +568,7 @@ const AXE_SIMPRO_LOGO_PROVIDER = {
|
|
|
462
568
|
//#endregion
|
|
463
569
|
class AXESimproMenuProvider {
|
|
464
570
|
async provide(context) {
|
|
465
|
-
const module = RootConfig$
|
|
571
|
+
const module = RootConfig$4.module;
|
|
466
572
|
const policy = {
|
|
467
573
|
features: [module.name],
|
|
468
574
|
permissions: [AXPAdministrationPermissionKeys.MaintainConnections],
|
|
@@ -499,6 +605,8 @@ class AXESimproExtensionModule {
|
|
|
499
605
|
{ provide: AXP_MENU_PROVIDER, useClass: AXESimproMenuProvider, multi: true },
|
|
500
606
|
{ provide: AXP_ENTITY_MODIFIER, useValue: AXESimproProjectEntityModifier, multi: true },
|
|
501
607
|
{ provide: AXP_ENTITY_MODIFIER, useValue: AXESimproCustomerEntityModifier, multi: true },
|
|
608
|
+
{ provide: AXP_ENTITY_MODIFIER, useValue: AXESimproEmployeeEntityModifier, multi: true },
|
|
609
|
+
{ provide: AXP_ENTITY_MODIFIER, useValue: AXESimproContractorEntityModifier, multi: true },
|
|
502
610
|
{
|
|
503
611
|
provide: AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER,
|
|
504
612
|
useClass: AXESimproProjectLinkExpressionEvaluatorScopeProvider,
|
|
@@ -528,6 +636,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
528
636
|
{ provide: AXP_MENU_PROVIDER, useClass: AXESimproMenuProvider, multi: true },
|
|
529
637
|
{ provide: AXP_ENTITY_MODIFIER, useValue: AXESimproProjectEntityModifier, multi: true },
|
|
530
638
|
{ provide: AXP_ENTITY_MODIFIER, useValue: AXESimproCustomerEntityModifier, multi: true },
|
|
639
|
+
{ provide: AXP_ENTITY_MODIFIER, useValue: AXESimproEmployeeEntityModifier, multi: true },
|
|
640
|
+
{ provide: AXP_ENTITY_MODIFIER, useValue: AXESimproContractorEntityModifier, multi: true },
|
|
531
641
|
{
|
|
532
642
|
provide: AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER,
|
|
533
643
|
useClass: AXESimproProjectLinkExpressionEvaluatorScopeProvider,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-extension-project-management-simpro-client.mjs","sources":["../../../../libs/extensions/project-management/simpro/client/src/lib/features/project-management/simpro-expression-scope.ts","../../../../libs/extensions/project-management/simpro/client/src/lib/features/project-management/simpro-project-link-expression-evaluator-scope.provider.ts","../../../../libs/extensions/project-management/simpro/client/src/lib/features/project-management/project-simpro.entity-modifier.ts","../../../../libs/extensions/project-management/simpro/client/src/lib/features/customer-management/customer-simpro.entity-modifier.ts","../../../../libs/extensions/project-management/simpro/client/src/lib/brand/simpro-logo-key.ts","../../../../libs/extensions/project-management/simpro/client/src/lib/integration/simpro.integration.provider.ts","../../../../libs/extensions/project-management/simpro/client/src/lib/integration/simpro-integration-settings-badges.util.ts","../../../../libs/extensions/project-management/simpro/client/src/lib/integration/simpro.integration-runtime.provider.ts","../../../../libs/extensions/project-management/simpro/client/src/lib/integration/simpro.connection-lifecycle.handler.ts","../../../../libs/extensions/project-management/simpro/client/src/lib/brand/simpro-logo.provider.ts","../../../../libs/extensions/project-management/simpro/client/src/lib/menu.provider.ts","../../../../libs/extensions/project-management/simpro/client/src/lib/simpro-extension.module.ts","../../../../libs/extensions/project-management/simpro/client/src/lib/brand/simpro-mark.paths.ts","../../../../libs/extensions/project-management/simpro/client/src/lib/brand/simpro-logo.component.ts","../../../../libs/extensions/project-management/simpro/client/src/acorex-platform-extension-project-management-simpro-client.ts"],"sourcesContent":["export const AXE_SIMPRO_EXPRESSION_SCOPE = 'SimproExtension';\n","//#region ---- Imports ----\n\nimport { AXPExpressionEvaluatorScopeProvider, AXPExpressionEvaluatorScopeProviderContext } from '@acorex-platform/framework-shared/core';\nimport { AXPIntegrationRuntimeService } from '@acorex-platform/framework-client/common';\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport { inject } from '@angular/core';\nimport { AXE_PM_INTEGRATION_PROVIDER_SIMPRO } from '@acorex-platform/extension-project-management-core-client/contracts';\nimport { RootConfig as PmRootConfig } from '@acorex-platform/module-project-management-client/contracts';\nimport type { AXMProjectManagementProjectEntityModel } from '@acorex-platform/module-project-management-client/contracts';\nimport { AXE_SIMPRO_EXPRESSION_SCOPE } from './simpro-expression-scope';\n\n//#endregion\n\nexport class AXESimproProjectLinkExpressionEvaluatorScopeProvider implements AXPExpressionEvaluatorScopeProvider {\n private readonly entityService = inject(AXPEntityService);\n private readonly integrationRuntime = inject(AXPIntegrationRuntimeService);\n\n async provide(context: AXPExpressionEvaluatorScopeProviderContext): Promise<void> {\n context.addScope(AXE_SIMPRO_EXPRESSION_SCOPE, {\n hasProjectLink: async (platformProjectIdRaw?: unknown): Promise<boolean> => {\n const platformProjectId = typeof platformProjectIdRaw === 'string' ? platformProjectIdRaw.trim() : '';\n if (!platformProjectId) {\n return false;\n }\n\n const project = (await this.entityService\n .withEntity(PmRootConfig.module.name, PmRootConfig.entities.project.name)\n .data<string, AXMProjectManagementProjectEntityModel>()\n .byKey(platformProjectId)) as AXMProjectManagementProjectEntityModel | null;\n\n return project?.integrationRef?.source === AXE_PM_INTEGRATION_PROVIDER_SIMPRO;\n },\n hasSimproConnection: async (): Promise<boolean> => {\n try {\n await this.integrationRuntime.getConnection({ providerId: 'simpro', connectionScope: 'tenant' });\n return true;\n } catch {\n return false;\n }\n },\n });\n }\n}\n\n//#endregion\n","//#region ---- Imports ----\n\nimport { AXPSystemActionType } from '@acorex-platform/framework-shared/core';\nimport { AXPEntityAction, AXPEntityCommandScope } from '@acorex-platform/framework-shared/entity';\nimport {\n actionExists,\n AXPEntityModifierProvider,\n ensureListActions,\n} from '@acorex-platform/framework-client/layout/entity';\nimport { AXESimproCommandKeys } from '@acorex-platform/extension-project-management-simpro-client/contracts';\nimport { RootConfig as PmRootConfig } from '@acorex-platform/module-project-management-client/contracts';\nimport { AXE_SIMPRO_EXPRESSION_SCOPE } from './simpro-expression-scope';\n\n//#endregion\n\nconst IMPORT_ORDER = 36;\nconst SYNC_ORDER = 37;\n\nfunction buildImportAction(): AXPEntityAction {\n return {\n name: AXESimproCommandKeys.ProjectImportFromSimpro,\n title: '@extensions-simpro:actions.import-from-simpro.title',\n command: { name: AXESimproCommandKeys.ProjectImportFromSimpro },\n priority: 'secondary',\n type: AXPSystemActionType.Import,\n icon: 'fa-light fa-briefcase',\n scope: AXPEntityCommandScope.TypeLevel,\n order: IMPORT_ORDER,\n };\n}\n\nfunction buildSyncAction(): AXPEntityAction {\n return {\n name: AXESimproCommandKeys.ProjectSync,\n title: '@extensions-simpro:actions.sync.title',\n command: {\n name: AXESimproCommandKeys.ProjectSync,\n options: { platformProjectId: '{{ context.eval(\"id\") }}' },\n },\n priority: 'secondary',\n type: AXPSystemActionType.Sync,\n icon: 'fa-light fa-arrows-rotate',\n scope: AXPEntityCommandScope.Individual,\n order: SYNC_ORDER,\n hidden: `{{ !(await ${AXE_SIMPRO_EXPRESSION_SCOPE}.hasProjectLink(context.eval(\"id\"))) }}`,\n };\n}\n\n/** Adds Simpro import/sync actions to ProjectManagement.Project views. */\nexport const AXESimproProjectEntityModifier: AXPEntityModifierProvider = {\n entityName: PmRootConfig.entities.project.name,\n order: 50,\n modifier: (ctx) => {\n if (ctx.module.get() !== PmRootConfig.module.name) {\n return;\n }\n\n ensureListActions(ctx);\n\n ctx.interfaces.update((interfaces) => {\n const next = (interfaces ?? {}) as Record<string, unknown>;\n const master = (next['master'] ?? {}) as Record<string, unknown>;\n const list = (master['list'] ?? { actions: [], views: [] }) as Record<string, unknown>;\n const listActions = (list['actions'] ?? []) as AXPEntityAction[];\n\n if (!actionExists(listActions, AXESimproCommandKeys.ProjectImportFromSimpro)) {\n listActions.push(buildImportAction());\n }\n list['actions'] = listActions;\n master['list'] = list;\n\n const single = master['single'] as Record<string, unknown> | undefined;\n if (single) {\n const singleActions = (single['actions'] ?? []) as AXPEntityAction[];\n if (!actionExists(singleActions, AXESimproCommandKeys.ProjectSync)) {\n singleActions.push(buildSyncAction());\n }\n single['actions'] = singleActions;\n }\n\n next['master'] = master;\n return next as typeof interfaces;\n });\n },\n};\n\n//#endregion\n","//#region ---- Imports ----\n\nimport { AXPSystemActionType } from '@acorex-platform/framework-shared/core';\nimport { AXPEntityAction, AXPEntityCommandScope } from '@acorex-platform/framework-shared/entity';\nimport {\n actionExists,\n AXPEntityModifierProvider,\n ensureListActions,\n} from '@acorex-platform/framework-client/layout/entity';\nimport { AXESimproCommandKeys } from '@acorex-platform/extension-project-management-simpro-client/contracts';\nimport { RootConfig as CustomerRootConfig } from '@acorex-platform/module-customer-management-client/contracts';\n\n//#endregion\n\n//#region ----- Constants -----\n\nconst IMPORT_ORDER = 36;\n\n//#endregion\n\n//#region ----- Actions -----\n\nfunction buildImportAction(): AXPEntityAction {\n return {\n name: AXESimproCommandKeys.CustomerImportFromSimpro,\n title: '@extensions-simpro:actions.import-from-simpro.title',\n command: { name: AXESimproCommandKeys.CustomerImportFromSimpro },\n priority: 'secondary',\n type: AXPSystemActionType.Import,\n icon: 'fa-light fa-briefcase',\n scope: AXPEntityCommandScope.TypeLevel,\n order: IMPORT_ORDER,\n };\n}\n\n//#endregion\n\n//#region ----- Modifier -----\n\n/** Adds Simpro import action to CustomerManagement.Customer list views. */\nexport const AXESimproCustomerEntityModifier: AXPEntityModifierProvider = {\n entityName: CustomerRootConfig.entities.customer.name,\n order: 50,\n modifier: (ctx) => {\n if (ctx.module.get() !== CustomerRootConfig.module.name) {\n return;\n }\n\n ensureListActions(ctx);\n\n ctx.interfaces.update((interfaces) => {\n const next = (interfaces ?? {}) as Record<string, unknown>;\n const master = (next['master'] ?? {}) as Record<string, unknown>;\n const list = (master['list'] ?? { actions: [], views: [] }) as Record<string, unknown>;\n const listActions = (list['actions'] ?? []) as AXPEntityAction[];\n\n if (!actionExists(listActions, AXESimproCommandKeys.CustomerImportFromSimpro)) {\n listActions.push(buildImportAction());\n }\n list['actions'] = listActions;\n master['list'] = list;\n next['master'] = master;\n return next as typeof interfaces;\n });\n },\n};\n\n//#endregion\n","//#region ---- Simpro logo registry key ----\n\nexport const axpSimproLogoKey = 'simpro' as const;\n\n//#endregion\n","import {\n AXP_INTEGRATION_AUTH_METHOD_TYPE,\n AXP_INTEGRATION_CAPABILITY,\n AXP_INTEGRATION_CONNECTION_SCOPE,\n AXPWidgetsList,\n} from '@acorex-platform/framework-shared/core';\nimport { AXPIntegrationProvider, AXPIntegrationProviderContext } from '@acorex-platform/framework-client/common';\nimport { Injectable } from '@angular/core';\nimport { AXESimproCommandKeys, RootConfig } from '@acorex-platform/extension-project-management-simpro-client/contracts';\nimport { axpSimproLogoKey } from '../brand/simpro-logo-key';\n\n@Injectable()\nexport class AXESimproIntegrationProvider implements AXPIntegrationProvider {\n async provide(context: AXPIntegrationProviderContext): Promise<void> {\n const I18N = `@${RootConfig.config.i18n}:integration`;\n\n context.register({\n domainId: 'project-management',\n id: 'simpro',\n module: RootConfig.module.name,\n displayName: `${I18N}.display-name`,\n description: `${I18N}.description`,\n icon: RootConfig.module.icon,\n logoKey: axpSimproLogoKey,\n capabilities: [AXP_INTEGRATION_CAPABILITY.Sync, AXP_INTEGRATION_CAPABILITY.Import],\n connectionScopes: [AXP_INTEGRATION_CONNECTION_SCOPE.Tenant],\n allowMultipleConnections: true,\n defaultConnectionKey: 'default',\n connectCommandKey: AXESimproCommandKeys.ConnectionConnect,\n completeOAuthCommandKey: AXESimproCommandKeys.ConnectionCompleteOAuth,\n authMethods: [\n {\n type: AXP_INTEGRATION_AUTH_METHOD_TYPE.OAuth2,\n label: `${I18N}.auth.oauth.label`,\n instructions: `${I18N}.auth.oauth.instructions`,\n usesRedirect: false,\n supportsRefresh: true,\n supportsRevoke: false,\n supportsValidation: true,\n fields: [\n {\n type: AXPWidgetsList.Editors.TextBox,\n path: 'clientId',\n options: { placeholder: `${I18N}.auth.oauth.client-id.placeholder` },\n },\n {\n type: AXPWidgetsList.Editors.PasswordBox,\n path: 'clientSecret',\n options: { placeholder: `${I18N}.auth.oauth.client-secret.placeholder` },\n },\n ],\n },\n ],\n });\n }\n}\n","//#region ---- Simpro integration settings badges ----\n\nimport { AXFormatService } from '@acorex/core/format';\nimport { AXPSettingsService } from '@acorex-platform/framework-client/common';\nimport { AXPRegionalSetting } from '@acorex-platform/framework-shared/core';\nimport type {\n AXPIntegrationConnectionSettingsContext,\n AXPIntegrationSettingsRowBadge,\n} from '@acorex-platform/framework-shared/core';\nimport type { AXPBackgroundJobSchedule } from '@acorex-platform/framework-shared/background-job';\nimport type { AXESimproConnectionConfig } from '@acorex-platform/extension-project-management-simpro-client/contracts';\n\nconst SIMPRO_I18N = '@extensions-simpro:integration.badges';\n\n/** Must match `SIMPRO_PULL_JOBS_COMMAND_KEY` / schedule `command.key`. */\nexport const SIMPRO_PULL_JOBS_SCHEDULE_COMMAND_KEY = 'simpro-extension.jobs.pull';\n\nasync function formatSyncTimestamp(\n iso: string,\n formatService: AXFormatService,\n settingsService: AXPSettingsService,\n): Promise<string | undefined> {\n const parsed = Date.parse(iso);\n if (!Number.isFinite(parsed)) {\n return undefined;\n }\n\n const dateFormat = await settingsService.get(AXPRegionalSetting.ShortDate);\n const timeFormat = await settingsService.get(AXPRegionalSetting.ShortTime);\n const format = `${dateFormat} ${timeFormat}`.trim();\n\n return formatService.format(new Date(parsed), 'datetime', { format });\n}\n\nfunction isFailureNewer(schedule: AXPBackgroundJobSchedule): boolean {\n const failed = schedule.lastFailureAt ? Date.parse(schedule.lastFailureAt) : NaN;\n const succeeded = schedule.lastSuccessAt ? Date.parse(schedule.lastSuccessAt) : NaN;\n if (!Number.isFinite(failed)) {\n return false;\n }\n if (!Number.isFinite(succeeded)) {\n return true;\n }\n return failed >= succeeded;\n}\n\nexport async function resolveSimproConnectionSettingsBadges(\n ctx: AXPIntegrationConnectionSettingsContext,\n formatService: AXFormatService,\n settingsService: AXPSettingsService,\n schedule?: AXPBackgroundJobSchedule | null,\n): Promise<AXPIntegrationSettingsRowBadge[]> {\n const config = (ctx.connection.config ?? {}) as AXESimproConnectionConfig;\n const jobsSync = config.jobsSync as Record<string, unknown> | undefined;\n const lastSync =\n config.jobsSync?.lastSyncAt?.trim() ||\n (typeof jobsSync?.['lastSuccessfulSyncAt'] === 'string' ? jobsSync['lastSuccessfulSyncAt'].trim() : '');\n\n const badges: AXPIntegrationSettingsRowBadge[] = [];\n\n if (!lastSync) {\n badges.push({\n labelKey: `${SIMPRO_I18N}.never-synced`,\n color: 'warning',\n });\n } else {\n const datetime = await formatSyncTimestamp(lastSync, formatService, settingsService);\n if (datetime) {\n badges.push({\n labelKey: `${SIMPRO_I18N}.last-sync`,\n params: { datetime },\n color: 'success',\n });\n }\n }\n\n if (!schedule) {\n return badges;\n }\n\n if (schedule.status === 'pause') {\n badges.push({\n labelKey: `${SIMPRO_I18N}.schedule-paused`,\n color: 'warning',\n });\n } else if (schedule.status === 'disabled') {\n badges.push({\n labelKey: `${SIMPRO_I18N}.schedule-disabled`,\n color: 'warning',\n });\n }\n\n if (schedule.nextRunAt) {\n const datetime = await formatSyncTimestamp(schedule.nextRunAt, formatService, settingsService);\n if (datetime) {\n badges.push({\n labelKey: `${SIMPRO_I18N}.next-run`,\n params: { datetime },\n color: 'secondary',\n });\n }\n }\n\n if (isFailureNewer(schedule) && schedule.lastFailureAt) {\n const datetime = await formatSyncTimestamp(schedule.lastFailureAt, formatService, settingsService);\n if (datetime) {\n badges.push({\n labelKey: `${SIMPRO_I18N}.last-failure`,\n params: { datetime },\n color: 'danger',\n });\n }\n }\n\n return badges;\n}\n\n//#endregion\n","import {\n AXP_INTEGRATION_CONNECTION_STATUS,\n runtimeQueryPayloadData,\n type AXPIntegrationProviderRuntimeHooks,\n type AXPIntegrationRuntimeContext,\n type AXPIntegrationValidationResult,\n} from '@acorex-platform/framework-shared/core';\nimport {\n AXP_INTEGRATION_RUNTIME_PROVIDER,\n AXP_INTEGRATION_SECRET_STORE,\n type AXPIntegrationRuntimeProvider,\n} from '@acorex-platform/framework-client/common';\nimport type { AXESimproConnectionConfig } from '@acorex-platform/extension-project-management-simpro-client/contracts';\nimport { Injectable, inject } from '@angular/core';\nimport { AXFormatService } from '@acorex/core/format';\nimport { AXPSettingsService } from '@acorex-platform/framework-client/common';\nimport { defaultTo, trim } from 'lodash-es';\nimport { AXPQueryService } from '@acorex-platform/framework-client/runtime';\nimport {\n AXPBackgroundJobQueryKeys,\n type AXPBackgroundJobSchedule,\n} from '@acorex-platform/framework-shared/background-job';\nimport {\n resolveSimproConnectionSettingsBadges,\n SIMPRO_PULL_JOBS_SCHEDULE_COMMAND_KEY,\n} from './simpro-integration-settings-badges.util';\n\n@Injectable()\nexport class AXESimproIntegrationRuntimeProvider implements AXPIntegrationRuntimeProvider {\n readonly providerId = 'simpro';\n\n private readonly secretStore = inject(AXP_INTEGRATION_SECRET_STORE, { optional: true });\n private readonly formatService = inject(AXFormatService);\n private readonly settingsService = inject(AXPSettingsService);\n private readonly queryService = inject(AXPQueryService, { optional: true });\n\n async getHooks(): Promise<AXPIntegrationProviderRuntimeHooks> {\n return {\n validateConnection: (ctx) => this.validateConnection(ctx),\n createClient: (ctx) => this.createClient(ctx),\n getConnectionSettingsBadges: async (ctx) =>\n resolveSimproConnectionSettingsBadges(\n ctx,\n this.formatService,\n this.settingsService,\n await this.loadPullSchedule(ctx.connection.id),\n ),\n };\n }\n\n private async validateConnection(ctx: AXPIntegrationRuntimeContext): Promise<AXPIntegrationValidationResult> {\n const buildUrl = trim(defaultTo(ctx.instanceUrl, ''));\n if (!buildUrl) {\n return {\n valid: false,\n status: AXP_INTEGRATION_CONNECTION_STATUS.Invalid,\n errorMessage: 'Simpro build URL is missing on the connection.',\n };\n }\n\n if (!this.hasClientCredentials(ctx)) {\n return {\n valid: false,\n status: AXP_INTEGRATION_CONNECTION_STATUS.Invalid,\n errorMessage: 'Simpro client ID and client secret are required.',\n };\n }\n\n return {\n valid: true,\n status: AXP_INTEGRATION_CONNECTION_STATUS.Connected,\n externalAccountName: buildUrl,\n };\n }\n\n private async createClient(ctx: AXPIntegrationRuntimeContext): Promise<{ clientId: string; baseUrl?: string }> {\n const credentials = await this.resolveClientCredentials(ctx);\n return {\n clientId: credentials.clientId,\n baseUrl: defaultTo(ctx.instanceUrl, undefined),\n };\n }\n\n private hasClientCredentials(ctx: AXPIntegrationRuntimeContext): boolean {\n const config = (ctx.config ?? {}) as AXESimproConnectionConfig;\n const clientId = trim(defaultTo(config.clientId, ''));\n const clientSecret = trim(defaultTo(config.clientSecret, ''));\n const legacyToken = trim(defaultTo(config.accessToken, ''));\n const refreshToken = trim(defaultTo(config.refreshToken, ''));\n return Boolean((clientId && clientSecret) || legacyToken || refreshToken);\n }\n\n private async resolveClientCredentials(\n ctx: AXPIntegrationRuntimeContext,\n ): Promise<{ clientId: string; clientSecret?: string }> {\n const config = (ctx.config ?? {}) as AXESimproConnectionConfig;\n const configClientId = trim(defaultTo(config.clientId, ''));\n const configClientSecret = trim(defaultTo(config.clientSecret, ''));\n\n if (configClientId && configClientSecret) {\n return { clientId: configClientId, clientSecret: configClientSecret };\n }\n\n if (!this.secretStore || !trim(defaultTo(ctx.secretRef, ''))) {\n throw new Error('Simpro connection has no client credentials.');\n }\n\n const credentials = await this.secretStore.resolve(ctx.secretRef, ctx);\n const clientId = trim(defaultTo(credentials.token ?? credentials.email, ''));\n const clientSecret = trim(defaultTo(credentials.password ?? credentials.apiToken, ''));\n if (!clientId || !clientSecret) {\n throw new Error('Simpro connection has no usable client credentials.');\n }\n\n return { clientId, clientSecret };\n }\n\n private async loadPullSchedule(connectionId: string): Promise<AXPBackgroundJobSchedule | null> {\n if (!this.queryService || !connectionId.trim()) {\n return null;\n }\n try {\n const result = await this.queryService.fetch<\n { commandKey: string; connectionId?: string },\n AXPBackgroundJobSchedule | null\n >(AXPBackgroundJobQueryKeys.ScheduleGetByScope, {\n commandKey: SIMPRO_PULL_JOBS_SCHEDULE_COMMAND_KEY,\n connectionId,\n });\n return runtimeQueryPayloadData(result) ?? null;\n } catch {\n return null;\n }\n }\n}\n\nexport const provideSimproIntegrationRuntimeProvider = {\n provide: AXP_INTEGRATION_RUNTIME_PROVIDER,\n useClass: AXESimproIntegrationRuntimeProvider,\n multi: true,\n};\n","//#region ---- Imports ----\n\nimport {\n AXP_INTEGRATION_CONNECTION_LIFECYCLE,\n type AXPIntegrationConnectionLifecycleHandler,\n} from '@acorex-platform/framework-client/common';\nimport { AXP_INTEGRATION_CONNECTION_STATUS, type AXPSafeIntegrationConnectionDto } from '@acorex-platform/framework-shared/core';\nimport { AXPCommandService } from '@acorex-platform/framework-client/runtime';\nimport { AXESimproCommandKeys } from '@acorex-platform/extension-project-management-simpro-client/contracts';\nimport { Injectable, inject } from '@angular/core';\n\n//#endregion\n\n//#region ---- Handler ----\n\n@Injectable()\nexport class AXESimproConnectionLifecycleHandler implements AXPIntegrationConnectionLifecycleHandler {\n readonly providerId = 'simpro';\n\n private readonly commandService = inject(AXPCommandService);\n\n async onDisconnected(connection: AXPSafeIntegrationConnectionDto): Promise<void> {\n await this.runLifecycle(connection.id, 'disconnected');\n }\n\n async onDeleted(connection: AXPSafeIntegrationConnectionDto): Promise<void> {\n await this.runLifecycle(connection.id, 'deleted');\n }\n\n async onEnabledChanged(connection: AXPSafeIntegrationConnectionDto, enabled: boolean): Promise<void> {\n if (enabled) {\n if (connection.status === AXP_INTEGRATION_CONNECTION_STATUS.Connected) {\n await this.runLifecycle(connection.id, 'enabled');\n }\n return;\n }\n await this.runLifecycle(connection.id, 'disabled');\n }\n\n private async runLifecycle(\n connectionId: string,\n action: 'connected' | 'disconnected' | 'deleted' | 'enabled' | 'disabled',\n ): Promise<void> {\n await this.commandService.execute(AXESimproCommandKeys.ConnectionLifecycle, {\n connectionId,\n action,\n });\n }\n}\n\nexport const provideSimproConnectionLifecycleHandler = {\n provide: AXP_INTEGRATION_CONNECTION_LIFECYCLE,\n useClass: AXESimproConnectionLifecycleHandler,\n multi: true,\n};\n\n//#endregion\n","import {\n AXP_LOGO_PROVIDER,\n type AXPLogoProvider,\n type AXPLogoRequest,\n type AXPLogoView,\n} from '@acorex-platform/framework-client/core';\nimport { axpSimproLogoKey } from './simpro-logo-key';\n\nconst simproLogoProvider: AXPLogoProvider = {\n key: axpSimproLogoKey,\n resolve: async (request: AXPLogoRequest): Promise<AXPLogoView> => ({\n kind: 'component',\n load: () => import('./simpro-logo.component').then((module) => module.AXESimproLogoComponent),\n inputs: {\n appearance: request.appearance,\n size: request.size,\n },\n }),\n};\n\nexport const AXE_SIMPRO_LOGO_PROVIDER = {\n provide: AXP_LOGO_PROVIDER,\n useValue: simproLogoProvider,\n multi: true,\n} as const;\n","//#region ---- Imports ----\n\nimport {\n AXPCommonMenuKeys\n} from '@acorex-platform/module-common-client/contracts';\nimport { AXPMenuProvider, AXPMenuProviderContext } from '@acorex-platform/framework-client/common';\nimport { Injectable } from '@angular/core';\nimport {\n AXESimproMenuKeys,\n RootConfig,\n AXPAdministrationPermissionKeys\n} from '@acorex-platform/extension-project-management-simpro-client/contracts';\n\n//#endregion\n\n@Injectable()\nexport class AXESimproMenuProvider implements AXPMenuProvider {\n async provide(context: AXPMenuProviderContext): Promise<void> {\n const module = RootConfig.module;\n const policy = {\n features: [module.name],\n permissions: [AXPAdministrationPermissionKeys.MaintainConnections],\n };\n\n const configMenu = context.find(AXPCommonMenuKeys.Configuration);\n if (!context.find(AXESimproMenuKeys.SimproExtensionConfig).exists) {\n configMenu.addItems([\n {\n name: AXESimproMenuKeys.SimproExtensionConfig,\n text: '@extensions-simpro:module.menus.configuration.title',\n icon: module.icon,\n type: 'menu',\n priority: 8940,\n policy,\n children: [],\n },\n ]);\n }\n }\n}\n\n//#endregion\n","//#region ---- Imports ----\n\nimport { AXMIntegrationManagementModule } from '@acorex-platform/module-integration-management-client';\nimport { AXP_INTEGRATION_PROVIDER, AXP_MENU_PROVIDER } from '@acorex-platform/framework-client/common';\nimport { AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER } from '@acorex-platform/framework-client/core';\nimport { AXP_ENTITY_MODIFIER } from '@acorex-platform/framework-client/layout/entity';\nimport { provideCommandSetups } from '@acorex-platform/framework-client/runtime';\nimport { NgModule } from '@angular/core';\nimport { AXESimproCommandKeys } from '@acorex-platform/extension-project-management-simpro-client/contracts';\nimport { AXESimproProjectLinkExpressionEvaluatorScopeProvider } from './features/project-management/simpro-project-link-expression-evaluator-scope.provider';\nimport { AXESimproProjectEntityModifier } from './features/project-management/project-simpro.entity-modifier';\nimport { AXESimproCustomerEntityModifier } from './features/customer-management/customer-simpro.entity-modifier';\nimport { AXESimproIntegrationProvider } from './integration/simpro.integration.provider';\nimport { provideSimproIntegrationRuntimeProvider } from './integration/simpro.integration-runtime.provider';\nimport { provideSimproConnectionLifecycleHandler } from './integration/simpro.connection-lifecycle.handler';\nimport { AXE_SIMPRO_LOGO_PROVIDER } from './brand/simpro-logo.provider';\nimport { AXESimproMenuProvider } from './menu.provider';\n\n//#endregion\n\n@NgModule({\n imports: [AXMIntegrationManagementModule],\n providers: [\n AXE_SIMPRO_LOGO_PROVIDER,\n { provide: AXP_MENU_PROVIDER, useClass: AXESimproMenuProvider, multi: true },\n { provide: AXP_ENTITY_MODIFIER, useValue: AXESimproProjectEntityModifier, multi: true },\n { provide: AXP_ENTITY_MODIFIER, useValue: AXESimproCustomerEntityModifier, multi: true },\n {\n provide: AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER,\n useClass: AXESimproProjectLinkExpressionEvaluatorScopeProvider,\n multi: true,\n },\n { provide: AXP_INTEGRATION_PROVIDER, useClass: AXESimproIntegrationProvider, multi: true },\n provideSimproIntegrationRuntimeProvider,\n provideSimproConnectionLifecycleHandler,\n provideCommandSetups([\n {\n key: AXESimproCommandKeys.ConnectionConnect,\n command: () => import('./features/connect/connect-simpro.command').then((c) => c.ConnectSimproCommand),\n },\n {\n key: AXESimproCommandKeys.ConnectionCompleteOAuth,\n command: () =>\n import('./features/connect/complete-simpro-oauth.command').then((c) => c.CompleteSimproOAuthCommand),\n },\n ]),\n ],\n})\nexport class AXESimproExtensionModule {}\n\n//#endregion\n","//#region ---- Simpro mark vector paths ----\n\nexport const AXE_SIMPRO_MARK_BLUE = '#00338D';\nexport const AXE_SIMPRO_MARK_GOLD = '#FFCC00';\n\nexport const AXE_SIMPRO_MARK_PATH = 'M12 4.2C12.5 4.2 12.5 8.6 13.6 9.2C14.7 9.9 18.5 7.6 18.8 8.1C19 8.6 15.2 10.7 15.2 12C15.2 13.3 19 15.4 18.8 15.9C18.5 16.4 14.7 14.1 13.6 14.8C12.5 15.4 12.5 19.8 12 19.8C11.5 19.8 11.5 15.4 10.4 14.8C9.3 14.1 5.5 16.4 5.2 15.9C5 15.4 8.8 13.3 8.8 12C8.8 10.7 5 8.6 5.2 8.1C5.5 7.6 9.3 9.9 10.4 9.2C11.5 8.6 11.5 4.2 12 4.2Z';\n\n//#endregion\n","import type { AXPLogoAppearance } from '@acorex-platform/framework-client/core';\nimport { Component, computed, input, ChangeDetectionStrategy } from '@angular/core';\nimport { AXE_SIMPRO_MARK_BLUE, AXE_SIMPRO_MARK_GOLD, AXE_SIMPRO_MARK_PATH } from './simpro-mark.paths';\n\n//#region ---- Simpro brand logo (owned by Simpro extension) ----\n\n@Component({\n selector: 'axe-simpro-logo',\n host: { class: 'inline-flex items-center justify-center' },\n changeDetection: ChangeDetectionStrategy.Eager,\n template: `\n @switch (resolvedAppearance()) {\n @case ('monochrome') {\n <svg [attr.width]=\"size()\" [attr.height]=\"size()\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <circle cx=\"12\" cy=\"12\" r=\"12\" fill=\"currentColor\" />\n <path fill=\"#fff\" [attr.d]=\"markPath\" />\n </svg>\n }\n @default {\n <svg [attr.width]=\"size()\" [attr.height]=\"size()\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <circle cx=\"12\" cy=\"12\" r=\"12\" [attr.fill]=\"markBlue\" />\n <path [attr.fill]=\"markGold\" [attr.d]=\"markPath\" />\n </svg>\n }\n }\n `,\n})\nexport class AXESimproLogoComponent {\n appearance = input<AXPLogoAppearance>('colored');\n size = input(20);\n\n protected readonly markPath = AXE_SIMPRO_MARK_PATH;\n protected readonly markBlue = AXE_SIMPRO_MARK_BLUE;\n protected readonly markGold = AXE_SIMPRO_MARK_GOLD;\n\n protected readonly resolvedAppearance = computed(() => {\n const value = this.appearance();\n return value === 'monochrome' ? 'monochrome' : 'colored';\n });\n}\n\n//#endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["PmRootConfig","IMPORT_ORDER","buildImportAction","CustomerRootConfig","RootConfig"],"mappings":";;;;;;;;;;;;;;;;;;AAAO,MAAM,2BAA2B,GAAG,iBAAiB;;ACA5D;AAWA;MAEa,oDAAoD,CAAA;AAAjE,IAAA,WAAA,GAAA;AACmB,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACxC,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,4BAA4B,CAAC;IA2B5E;IAzBE,MAAM,OAAO,CAAC,OAAmD,EAAA;AAC/D,QAAA,OAAO,CAAC,QAAQ,CAAC,2BAA2B,EAAE;AAC5C,YAAA,cAAc,EAAE,OAAO,oBAA8B,KAAsB;AACzE,gBAAA,MAAM,i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AA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAtB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,sBAAsB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,EAAA,UAAA,EAAA,EAAA,iBAAA,EAAA,YAAA,EAAA,UAAA,EAAA,YAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,IAAA,EAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,cAAA,EAAA,yCAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAjBvB;;;;;;;;;;;;;;;AAeT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,KAAA,EAAA,CAAA,CAAA;;2FAEU,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBArBlC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,iBAAiB;AAC3B,oBAAA,IAAI,EAAE,EAAE,KAAK,EAAE,yCAAyC,EAAE;oBAC1D,eAAe,EAAE,uBAAuB,CAAC,KAAK;AAC9C,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;AAeT,EAAA,CAAA;AACF,iBAAA;;;;;;;;AC1BD;;AAEG;;"}
|
|
1
|
+
{"version":3,"file":"acorex-platform-extension-project-management-simpro-client.mjs","sources":["../../../../libs/extensions/project-management/simpro/client/src/lib/features/project-management/simpro-expression-scope.ts","../../../../libs/extensions/project-management/simpro/client/src/lib/features/project-management/simpro-project-link-expression-evaluator-scope.provider.ts","../../../../libs/extensions/project-management/simpro/client/src/lib/features/project-management/project-simpro.entity-modifier.ts","../../../../libs/extensions/project-management/simpro/client/src/lib/features/customer-management/customer-simpro.entity-modifier.ts","../../../../libs/extensions/project-management/simpro/client/src/lib/features/human-capital/employee-simpro.entity-modifier.ts","../../../../libs/extensions/project-management/simpro/client/src/lib/features/contractor-management/contractor-simpro.entity-modifier.ts","../../../../libs/extensions/project-management/simpro/client/src/lib/brand/simpro-logo-key.ts","../../../../libs/extensions/project-management/simpro/client/src/lib/integration/simpro.integration.provider.ts","../../../../libs/extensions/project-management/simpro/client/src/lib/integration/simpro-integration-settings-badges.util.ts","../../../../libs/extensions/project-management/simpro/client/src/lib/integration/simpro.integration-runtime.provider.ts","../../../../libs/extensions/project-management/simpro/client/src/lib/integration/simpro.connection-lifecycle.handler.ts","../../../../libs/extensions/project-management/simpro/client/src/lib/brand/simpro-logo.provider.ts","../../../../libs/extensions/project-management/simpro/client/src/lib/menu.provider.ts","../../../../libs/extensions/project-management/simpro/client/src/lib/simpro-extension.module.ts","../../../../libs/extensions/project-management/simpro/client/src/lib/brand/simpro-mark.paths.ts","../../../../libs/extensions/project-management/simpro/client/src/lib/brand/simpro-logo.component.ts","../../../../libs/extensions/project-management/simpro/client/src/acorex-platform-extension-project-management-simpro-client.ts"],"sourcesContent":["export const AXE_SIMPRO_EXPRESSION_SCOPE = 'SimproExtension';\n","//#region ---- Imports ----\n\nimport { AXPExpressionEvaluatorScopeProvider, AXPExpressionEvaluatorScopeProviderContext } from '@acorex-platform/framework-shared/core';\nimport { AXPIntegrationRuntimeService } from '@acorex-platform/framework-client/common';\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport { inject } from '@angular/core';\nimport { AXE_PM_INTEGRATION_PROVIDER_SIMPRO } from '@acorex-platform/extension-project-management-core-client/contracts';\nimport { RootConfig as PmRootConfig } from '@acorex-platform/module-project-management-client/contracts';\nimport type { AXMProjectManagementProjectEntityModel } from '@acorex-platform/module-project-management-client/contracts';\nimport { AXE_SIMPRO_EXPRESSION_SCOPE } from './simpro-expression-scope';\n\n//#endregion\n\nexport class AXESimproProjectLinkExpressionEvaluatorScopeProvider implements AXPExpressionEvaluatorScopeProvider {\n private readonly entityService = inject(AXPEntityService);\n private readonly integrationRuntime = inject(AXPIntegrationRuntimeService);\n\n async provide(context: AXPExpressionEvaluatorScopeProviderContext): Promise<void> {\n context.addScope(AXE_SIMPRO_EXPRESSION_SCOPE, {\n hasProjectLink: async (platformProjectIdRaw?: unknown): Promise<boolean> => {\n const platformProjectId = typeof platformProjectIdRaw === 'string' ? platformProjectIdRaw.trim() : '';\n if (!platformProjectId) {\n return false;\n }\n\n const project = (await this.entityService\n .withEntity(PmRootConfig.module.name, PmRootConfig.entities.project.name)\n .data<string, AXMProjectManagementProjectEntityModel>()\n .byKey(platformProjectId)) as AXMProjectManagementProjectEntityModel | null;\n\n return project?.integrationRef?.source === AXE_PM_INTEGRATION_PROVIDER_SIMPRO;\n },\n hasSimproConnection: async (): Promise<boolean> => {\n try {\n await this.integrationRuntime.getConnection({ providerId: 'simpro', connectionScope: 'tenant' });\n return true;\n } catch {\n return false;\n }\n },\n });\n }\n}\n\n//#endregion\n","//#region ---- Imports ----\n\nimport { AXPSystemActionType } from '@acorex-platform/framework-shared/core';\nimport { AXPEntityAction, AXPEntityCommandScope } from '@acorex-platform/framework-shared/entity';\nimport {\n actionExists,\n AXPEntityModifierProvider,\n ensureListActions,\n} from '@acorex-platform/framework-client/layout/entity';\nimport {\n AXESimproCommandKeys,\n AXPAdministrationPermissionKeys,\n} from '@acorex-platform/extension-project-management-simpro-client/contracts';\nimport { RootConfig as PmRootConfig } from '@acorex-platform/module-project-management-client/contracts';\nimport { AXE_SIMPRO_EXPRESSION_SCOPE } from './simpro-expression-scope';\n\n//#endregion\n\nconst IMPORT_ORDER = 36;\nconst SYNC_ORDER = 37;\n\nconst MANAGE_INTEGRATION_ACTIONS_HIDDEN = `{{ !permission.check(\"${AXPAdministrationPermissionKeys.ManageIntegrationActions}\") }}`;\n\nfunction buildImportAction(): AXPEntityAction {\n return {\n name: AXESimproCommandKeys.ProjectImportFromSimpro,\n title: '@extensions-simpro:actions.import-from-simpro.title',\n command: { name: AXESimproCommandKeys.ProjectImportFromSimpro },\n priority: 'secondary',\n type: AXPSystemActionType.Import,\n icon: 'fa-light fa-briefcase',\n scope: AXPEntityCommandScope.TypeLevel,\n order: IMPORT_ORDER,\n permissions: [AXPAdministrationPermissionKeys.ManageIntegrationActions],\n hidden: MANAGE_INTEGRATION_ACTIONS_HIDDEN,\n };\n}\n\nfunction buildSyncAction(): AXPEntityAction {\n return {\n name: AXESimproCommandKeys.ProjectSync,\n title: '@extensions-simpro:actions.sync.title',\n command: {\n name: AXESimproCommandKeys.ProjectSync,\n options: { platformProjectId: '{{ context.eval(\"id\") }}' },\n },\n priority: 'secondary',\n type: AXPSystemActionType.Sync,\n icon: 'fa-light fa-arrows-rotate',\n scope: AXPEntityCommandScope.Individual,\n order: SYNC_ORDER,\n hidden: `{{ !(await ${AXE_SIMPRO_EXPRESSION_SCOPE}.hasProjectLink(context.eval(\"id\"))) }}`,\n };\n}\n\n/** Adds Simpro import/sync actions to ProjectManagement.Project views. */\nexport const AXESimproProjectEntityModifier: AXPEntityModifierProvider = {\n entityName: PmRootConfig.entities.project.name,\n order: 50,\n modifier: (ctx) => {\n if (ctx.module.get() !== PmRootConfig.module.name) {\n return;\n }\n\n ensureListActions(ctx);\n\n ctx.interfaces.update((interfaces) => {\n const next = (interfaces ?? {}) as Record<string, unknown>;\n const master = (next['master'] ?? {}) as Record<string, unknown>;\n const list = (master['list'] ?? { actions: [], views: [] }) as Record<string, unknown>;\n const listActions = (list['actions'] ?? []) as AXPEntityAction[];\n\n if (!actionExists(listActions, AXESimproCommandKeys.ProjectImportFromSimpro)) {\n listActions.push(buildImportAction());\n }\n list['actions'] = listActions;\n master['list'] = list;\n\n const single = master['single'] as Record<string, unknown> | undefined;\n if (single) {\n const singleActions = (single['actions'] ?? []) as AXPEntityAction[];\n if (!actionExists(singleActions, AXESimproCommandKeys.ProjectSync)) {\n singleActions.push(buildSyncAction());\n }\n single['actions'] = singleActions;\n }\n\n next['master'] = master;\n return next as typeof interfaces;\n });\n },\n};\n\n//#endregion\n","//#region ---- Imports ----\n\nimport { AXPSystemActionType } from '@acorex-platform/framework-shared/core';\nimport { AXPEntityAction, AXPEntityCommandScope } from '@acorex-platform/framework-shared/entity';\nimport {\n actionExists,\n AXPEntityModifierProvider,\n ensureListActions,\n} from '@acorex-platform/framework-client/layout/entity';\nimport {\n AXESimproCommandKeys,\n AXPAdministrationPermissionKeys,\n} from '@acorex-platform/extension-project-management-simpro-client/contracts';\nimport { RootConfig as CustomerRootConfig } from '@acorex-platform/module-customer-management-client/contracts';\n\n//#endregion\n\n//#region ----- Constants -----\n\nconst IMPORT_ORDER = 36;\n\nconst MANAGE_INTEGRATION_ACTIONS_HIDDEN = `{{ !permission.check(\"${AXPAdministrationPermissionKeys.ManageIntegrationActions}\") }}`;\n\n//#endregion\n\n//#region ----- Actions -----\n\nfunction buildImportAction(): AXPEntityAction {\n return {\n name: AXESimproCommandKeys.CustomerImportFromSimpro,\n title: '@extensions-simpro:actions.import-from-simpro.title',\n command: { name: AXESimproCommandKeys.CustomerImportFromSimpro },\n priority: 'secondary',\n type: AXPSystemActionType.Import,\n icon: 'fa-light fa-briefcase',\n scope: AXPEntityCommandScope.TypeLevel,\n order: IMPORT_ORDER,\n permissions: [AXPAdministrationPermissionKeys.ManageIntegrationActions],\n hidden: MANAGE_INTEGRATION_ACTIONS_HIDDEN,\n };\n}\n\n//#endregion\n\n//#region ----- Modifier -----\n\n/** Adds Simpro import action to CustomerManagement.Customer list views. */\nexport const AXESimproCustomerEntityModifier: AXPEntityModifierProvider = {\n entityName: CustomerRootConfig.entities.customer.name,\n order: 50,\n modifier: (ctx) => {\n if (ctx.module.get() !== CustomerRootConfig.module.name) {\n return;\n }\n\n ensureListActions(ctx);\n\n ctx.interfaces.update((interfaces) => {\n const next = (interfaces ?? {}) as Record<string, unknown>;\n const master = (next['master'] ?? {}) as Record<string, unknown>;\n const list = (master['list'] ?? { actions: [], views: [] }) as Record<string, unknown>;\n const listActions = (list['actions'] ?? []) as AXPEntityAction[];\n\n if (!actionExists(listActions, AXESimproCommandKeys.CustomerImportFromSimpro)) {\n listActions.push(buildImportAction());\n }\n list['actions'] = listActions;\n master['list'] = list;\n next['master'] = master;\n return next as typeof interfaces;\n });\n },\n};\n\n//#endregion\n","//#region ---- Imports ----\n\nimport { AXPSystemActionType } from '@acorex-platform/framework-shared/core';\nimport { AXPEntityAction, AXPEntityCommandScope } from '@acorex-platform/framework-shared/entity';\nimport {\n actionExists,\n AXPEntityModifierProvider,\n ensureListActions,\n} from '@acorex-platform/framework-client/layout/entity';\nimport {\n AXESimproCommandKeys,\n AXPAdministrationPermissionKeys,\n} from '@acorex-platform/extension-project-management-simpro-client/contracts';\nimport { RootConfig as HcmRootConfig } from '@acorex-platform/module-human-capital-management-client/contracts';\n\n//#endregion\n\n//#region ----- Constants -----\n\nconst SYNC_ORDER = 38;\n\nconst MANAGE_INTEGRATION_ACTIONS_HIDDEN = `{{ !permission.check(\"${AXPAdministrationPermissionKeys.ManageIntegrationActions}\") }}`;\n\n//#endregion\n\n//#region ----- Actions -----\n\nfunction buildSyncEmployeesAction(): AXPEntityAction {\n return {\n name: AXESimproCommandKeys.EmployeeSyncFromSimpro,\n title: '@extensions-simpro:actions.sync-employees-from-simpro.title',\n command: { name: AXESimproCommandKeys.EmployeeSyncFromSimpro },\n priority: 'secondary',\n type: AXPSystemActionType.Import,\n icon: 'fa-light fa-user-helmet-safety',\n scope: AXPEntityCommandScope.TypeLevel,\n order: SYNC_ORDER,\n permissions: [AXPAdministrationPermissionKeys.ManageIntegrationActions],\n hidden: MANAGE_INTEGRATION_ACTIONS_HIDDEN,\n };\n}\n\n//#endregion\n\n//#region ----- Modifier -----\n\n/** Adds Simpro employee sync action to HumanCapitalManagement.Employee list views. */\nexport const AXESimproEmployeeEntityModifier: AXPEntityModifierProvider = {\n entityName: HcmRootConfig.entities.employee.name,\n order: 52,\n modifier: (ctx) => {\n if (ctx.module.get() !== HcmRootConfig.module.name) {\n return;\n }\n\n ensureListActions(ctx);\n\n ctx.interfaces.update((interfaces) => {\n const next = (interfaces ?? {}) as Record<string, unknown>;\n const master = (next['master'] ?? {}) as Record<string, unknown>;\n const list = (master['list'] ?? { actions: [], views: [] }) as Record<string, unknown>;\n const listActions = (list['actions'] ?? []) as AXPEntityAction[];\n\n if (!actionExists(listActions, AXESimproCommandKeys.EmployeeSyncFromSimpro)) {\n listActions.push(buildSyncEmployeesAction());\n }\n list['actions'] = listActions;\n master['list'] = list;\n next['master'] = master;\n return next as typeof interfaces;\n });\n },\n};\n\n//#endregion\n","//#region ---- Imports ----\n\nimport { AXPSystemActionType } from '@acorex-platform/framework-shared/core';\nimport { AXPEntityAction, AXPEntityCommandScope } from '@acorex-platform/framework-shared/entity';\nimport {\n actionExists,\n AXPEntityModifierProvider,\n ensureListActions,\n} from '@acorex-platform/framework-client/layout/entity';\nimport {\n AXESimproCommandKeys,\n AXPAdministrationPermissionKeys,\n} from '@acorex-platform/extension-project-management-simpro-client/contracts';\nimport { RootConfig as ContractorRootConfig } from '@acorex-platform/module-contractor-management-client/contracts';\n\n//#endregion\n\n//#region ----- Constants -----\n\nconst SYNC_ORDER = 38;\n\nconst MANAGE_INTEGRATION_ACTIONS_HIDDEN = `{{ !permission.check(\"${AXPAdministrationPermissionKeys.ManageIntegrationActions}\") }}`;\n\n//#endregion\n\n//#region ----- Actions -----\n\nfunction buildSyncContractorsAction(): AXPEntityAction {\n return {\n name: AXESimproCommandKeys.ContractorSyncFromSimpro,\n title: '@extensions-simpro:actions.sync-contractors-from-simpro.title',\n command: { name: AXESimproCommandKeys.ContractorSyncFromSimpro },\n priority: 'secondary',\n type: AXPSystemActionType.Import,\n icon: 'fa-light fa-helmet-safety',\n scope: AXPEntityCommandScope.TypeLevel,\n order: SYNC_ORDER,\n permissions: [AXPAdministrationPermissionKeys.ManageIntegrationActions],\n hidden: MANAGE_INTEGRATION_ACTIONS_HIDDEN,\n };\n}\n\n//#endregion\n\n//#region ----- Modifier -----\n\n/** Adds Simpro contractor sync action to ContractorManagement.Contractor list views. */\nexport const AXESimproContractorEntityModifier: AXPEntityModifierProvider = {\n entityName: ContractorRootConfig.entities.contractor.name,\n order: 52,\n modifier: (ctx) => {\n if (ctx.module.get() !== ContractorRootConfig.module.name) {\n return;\n }\n\n ensureListActions(ctx);\n\n ctx.interfaces.update((interfaces) => {\n const next = (interfaces ?? {}) as Record<string, unknown>;\n const master = (next['master'] ?? {}) as Record<string, unknown>;\n const list = (master['list'] ?? { actions: [], views: [] }) as Record<string, unknown>;\n const listActions = (list['actions'] ?? []) as AXPEntityAction[];\n\n if (!actionExists(listActions, AXESimproCommandKeys.ContractorSyncFromSimpro)) {\n listActions.push(buildSyncContractorsAction());\n }\n list['actions'] = listActions;\n master['list'] = list;\n next['master'] = master;\n return next as typeof interfaces;\n });\n },\n};\n\n//#endregion\n","//#region ---- Simpro logo registry key ----\n\nexport const axpSimproLogoKey = 'simpro' as const;\n\n//#endregion\n","import {\n AXP_INTEGRATION_AUTH_METHOD_TYPE,\n AXP_INTEGRATION_CAPABILITY,\n AXP_INTEGRATION_CONNECTION_SCOPE,\n AXPWidgetsList,\n} from '@acorex-platform/framework-shared/core';\nimport { AXPIntegrationProvider, AXPIntegrationProviderContext } from '@acorex-platform/framework-client/common';\nimport { Injectable } from '@angular/core';\nimport { AXESimproCommandKeys, RootConfig } from '@acorex-platform/extension-project-management-simpro-client/contracts';\nimport { axpSimproLogoKey } from '../brand/simpro-logo-key';\n\n@Injectable()\nexport class AXESimproIntegrationProvider implements AXPIntegrationProvider {\n async provide(context: AXPIntegrationProviderContext): Promise<void> {\n const I18N = `@${RootConfig.config.i18n}:integration`;\n\n context.register({\n domainId: 'project-management',\n id: 'simpro',\n module: RootConfig.module.name,\n displayName: `${I18N}.display-name`,\n description: `${I18N}.description`,\n icon: RootConfig.module.icon,\n logoKey: axpSimproLogoKey,\n capabilities: [AXP_INTEGRATION_CAPABILITY.Sync, AXP_INTEGRATION_CAPABILITY.Import],\n connectionScopes: [AXP_INTEGRATION_CONNECTION_SCOPE.Tenant],\n allowMultipleConnections: true,\n defaultConnectionKey: 'default',\n connectCommandKey: AXESimproCommandKeys.ConnectionConnect,\n completeOAuthCommandKey: AXESimproCommandKeys.ConnectionCompleteOAuth,\n authMethods: [\n {\n type: AXP_INTEGRATION_AUTH_METHOD_TYPE.OAuth2,\n label: `${I18N}.auth.oauth.label`,\n instructions: `${I18N}.auth.oauth.instructions`,\n usesRedirect: false,\n supportsRefresh: true,\n supportsRevoke: false,\n supportsValidation: true,\n fields: [\n {\n type: AXPWidgetsList.Editors.TextBox,\n path: 'clientId',\n options: { placeholder: `${I18N}.auth.oauth.client-id.placeholder` },\n },\n {\n type: AXPWidgetsList.Editors.PasswordBox,\n path: 'clientSecret',\n options: { placeholder: `${I18N}.auth.oauth.client-secret.placeholder` },\n },\n ],\n },\n ],\n });\n }\n}\n","//#region ---- Simpro integration settings badges ----\n\nimport { AXFormatService } from '@acorex/core/format';\nimport { AXPSettingsService } from '@acorex-platform/framework-client/common';\nimport { AXPRegionalSetting } from '@acorex-platform/framework-shared/core';\nimport type {\n AXPIntegrationConnectionSettingsContext,\n AXPIntegrationSettingsRowBadge,\n} from '@acorex-platform/framework-shared/core';\nimport type { AXPBackgroundJobSchedule } from '@acorex-platform/framework-shared/background-job';\nimport type { AXESimproConnectionConfig } from '@acorex-platform/extension-project-management-simpro-client/contracts';\n\nconst SIMPRO_I18N = '@extensions-simpro:integration.badges';\n\n/** Must match `SIMPRO_PULL_JOBS_COMMAND_KEY` / schedule `command.key`. */\nexport const SIMPRO_PULL_JOBS_SCHEDULE_COMMAND_KEY = 'simpro-extension.jobs.pull';\n\nasync function formatSyncTimestamp(\n iso: string,\n formatService: AXFormatService,\n settingsService: AXPSettingsService,\n): Promise<string | undefined> {\n const parsed = Date.parse(iso);\n if (!Number.isFinite(parsed)) {\n return undefined;\n }\n\n const dateFormat = await settingsService.get(AXPRegionalSetting.ShortDate);\n const timeFormat = await settingsService.get(AXPRegionalSetting.ShortTime);\n const format = `${dateFormat} ${timeFormat}`.trim();\n\n return formatService.format(new Date(parsed), 'datetime', { format });\n}\n\nfunction isFailureNewer(schedule: AXPBackgroundJobSchedule): boolean {\n const failed = schedule.lastFailureAt ? Date.parse(schedule.lastFailureAt) : NaN;\n const succeeded = schedule.lastSuccessAt ? Date.parse(schedule.lastSuccessAt) : NaN;\n if (!Number.isFinite(failed)) {\n return false;\n }\n if (!Number.isFinite(succeeded)) {\n return true;\n }\n return failed >= succeeded;\n}\n\nexport async function resolveSimproConnectionSettingsBadges(\n ctx: AXPIntegrationConnectionSettingsContext,\n formatService: AXFormatService,\n settingsService: AXPSettingsService,\n schedule?: AXPBackgroundJobSchedule | null,\n): Promise<AXPIntegrationSettingsRowBadge[]> {\n const config = (ctx.connection.config ?? {}) as AXESimproConnectionConfig;\n const jobsSync = config.jobsSync as Record<string, unknown> | undefined;\n const lastSync =\n config.jobsSync?.lastSyncAt?.trim() ||\n (typeof jobsSync?.['lastSuccessfulSyncAt'] === 'string' ? jobsSync['lastSuccessfulSyncAt'].trim() : '');\n\n const badges: AXPIntegrationSettingsRowBadge[] = [];\n\n if (!lastSync) {\n badges.push({\n labelKey: `${SIMPRO_I18N}.never-synced`,\n color: 'warning',\n });\n } else {\n const datetime = await formatSyncTimestamp(lastSync, formatService, settingsService);\n if (datetime) {\n badges.push({\n labelKey: `${SIMPRO_I18N}.last-sync`,\n params: { datetime },\n color: 'success',\n });\n }\n }\n\n if (!schedule) {\n return badges;\n }\n\n if (schedule.status === 'pause') {\n badges.push({\n labelKey: `${SIMPRO_I18N}.schedule-paused`,\n color: 'warning',\n });\n } else if (schedule.status === 'disabled') {\n badges.push({\n labelKey: `${SIMPRO_I18N}.schedule-disabled`,\n color: 'warning',\n });\n }\n\n if (schedule.nextRunAt) {\n const datetime = await formatSyncTimestamp(schedule.nextRunAt, formatService, settingsService);\n if (datetime) {\n badges.push({\n labelKey: `${SIMPRO_I18N}.next-run`,\n params: { datetime },\n color: 'secondary',\n });\n }\n }\n\n if (isFailureNewer(schedule) && schedule.lastFailureAt) {\n const datetime = await formatSyncTimestamp(schedule.lastFailureAt, formatService, settingsService);\n if (datetime) {\n badges.push({\n labelKey: `${SIMPRO_I18N}.last-failure`,\n params: { datetime },\n color: 'danger',\n });\n }\n }\n\n return badges;\n}\n\n//#endregion\n","import {\n AXP_INTEGRATION_CONNECTION_STATUS,\n runtimeQueryPayloadData,\n type AXPIntegrationProviderRuntimeHooks,\n type AXPIntegrationRuntimeContext,\n type AXPIntegrationValidationResult,\n} from '@acorex-platform/framework-shared/core';\nimport {\n AXP_INTEGRATION_RUNTIME_PROVIDER,\n AXP_INTEGRATION_SECRET_STORE,\n type AXPIntegrationRuntimeProvider,\n} from '@acorex-platform/framework-client/common';\nimport type { AXESimproConnectionConfig } from '@acorex-platform/extension-project-management-simpro-client/contracts';\nimport { Injectable, inject } from '@angular/core';\nimport { AXFormatService } from '@acorex/core/format';\nimport { AXPSettingsService } from '@acorex-platform/framework-client/common';\nimport { defaultTo, trim } from 'lodash-es';\nimport { AXPQueryService } from '@acorex-platform/framework-client/runtime';\nimport {\n AXPBackgroundJobQueryKeys,\n type AXPBackgroundJobSchedule,\n} from '@acorex-platform/framework-shared/background-job';\nimport {\n resolveSimproConnectionSettingsBadges,\n SIMPRO_PULL_JOBS_SCHEDULE_COMMAND_KEY,\n} from './simpro-integration-settings-badges.util';\n\n@Injectable()\nexport class AXESimproIntegrationRuntimeProvider implements AXPIntegrationRuntimeProvider {\n readonly providerId = 'simpro';\n\n private readonly secretStore = inject(AXP_INTEGRATION_SECRET_STORE, { optional: true });\n private readonly formatService = inject(AXFormatService);\n private readonly settingsService = inject(AXPSettingsService);\n private readonly queryService = inject(AXPQueryService, { optional: true });\n\n async getHooks(): Promise<AXPIntegrationProviderRuntimeHooks> {\n return {\n validateConnection: (ctx) => this.validateConnection(ctx),\n createClient: (ctx) => this.createClient(ctx),\n getConnectionSettingsBadges: async (ctx) =>\n resolveSimproConnectionSettingsBadges(\n ctx,\n this.formatService,\n this.settingsService,\n await this.loadPullSchedule(ctx.connection.id),\n ),\n };\n }\n\n private async validateConnection(ctx: AXPIntegrationRuntimeContext): Promise<AXPIntegrationValidationResult> {\n const buildUrl = trim(defaultTo(ctx.instanceUrl, ''));\n if (!buildUrl) {\n return {\n valid: false,\n status: AXP_INTEGRATION_CONNECTION_STATUS.Invalid,\n errorMessage: 'Simpro build URL is missing on the connection.',\n };\n }\n\n if (!this.hasClientCredentials(ctx)) {\n return {\n valid: false,\n status: AXP_INTEGRATION_CONNECTION_STATUS.Invalid,\n errorMessage: 'Simpro client ID and client secret are required.',\n };\n }\n\n return {\n valid: true,\n status: AXP_INTEGRATION_CONNECTION_STATUS.Connected,\n externalAccountName: buildUrl,\n };\n }\n\n private async createClient(ctx: AXPIntegrationRuntimeContext): Promise<{ clientId: string; baseUrl?: string }> {\n const credentials = await this.resolveClientCredentials(ctx);\n return {\n clientId: credentials.clientId,\n baseUrl: defaultTo(ctx.instanceUrl, undefined),\n };\n }\n\n private hasClientCredentials(ctx: AXPIntegrationRuntimeContext): boolean {\n const config = (ctx.config ?? {}) as AXESimproConnectionConfig;\n const clientId = trim(defaultTo(config.clientId, ''));\n const clientSecret = trim(defaultTo(config.clientSecret, ''));\n const legacyToken = trim(defaultTo(config.accessToken, ''));\n const refreshToken = trim(defaultTo(config.refreshToken, ''));\n return Boolean((clientId && clientSecret) || legacyToken || refreshToken);\n }\n\n private async resolveClientCredentials(\n ctx: AXPIntegrationRuntimeContext,\n ): Promise<{ clientId: string; clientSecret?: string }> {\n const config = (ctx.config ?? {}) as AXESimproConnectionConfig;\n const configClientId = trim(defaultTo(config.clientId, ''));\n const configClientSecret = trim(defaultTo(config.clientSecret, ''));\n\n if (configClientId && configClientSecret) {\n return { clientId: configClientId, clientSecret: configClientSecret };\n }\n\n if (!this.secretStore || !trim(defaultTo(ctx.secretRef, ''))) {\n throw new Error('Simpro connection has no client credentials.');\n }\n\n const credentials = await this.secretStore.resolve(ctx.secretRef, ctx);\n const clientId = trim(defaultTo(credentials.token ?? credentials.email, ''));\n const clientSecret = trim(defaultTo(credentials.password ?? credentials.apiToken, ''));\n if (!clientId || !clientSecret) {\n throw new Error('Simpro connection has no usable client credentials.');\n }\n\n return { clientId, clientSecret };\n }\n\n private async loadPullSchedule(connectionId: string): Promise<AXPBackgroundJobSchedule | null> {\n if (!this.queryService || !connectionId.trim()) {\n return null;\n }\n try {\n const result = await this.queryService.fetch<\n { commandKey: string; connectionId?: string },\n AXPBackgroundJobSchedule | null\n >(AXPBackgroundJobQueryKeys.ScheduleGetByScope, {\n commandKey: SIMPRO_PULL_JOBS_SCHEDULE_COMMAND_KEY,\n connectionId,\n });\n return runtimeQueryPayloadData(result) ?? null;\n } catch {\n return null;\n }\n }\n}\n\nexport const provideSimproIntegrationRuntimeProvider = {\n provide: AXP_INTEGRATION_RUNTIME_PROVIDER,\n useClass: AXESimproIntegrationRuntimeProvider,\n multi: true,\n};\n","//#region ---- Imports ----\n\nimport {\n AXP_INTEGRATION_CONNECTION_LIFECYCLE,\n type AXPIntegrationConnectionLifecycleHandler,\n} from '@acorex-platform/framework-client/common';\nimport { AXP_INTEGRATION_CONNECTION_STATUS, type AXPSafeIntegrationConnectionDto } from '@acorex-platform/framework-shared/core';\nimport { AXPCommandService } from '@acorex-platform/framework-client/runtime';\nimport { AXESimproCommandKeys } from '@acorex-platform/extension-project-management-simpro-client/contracts';\nimport { Injectable, inject } from '@angular/core';\n\n//#endregion\n\n//#region ---- Handler ----\n\n@Injectable()\nexport class AXESimproConnectionLifecycleHandler implements AXPIntegrationConnectionLifecycleHandler {\n readonly providerId = 'simpro';\n\n private readonly commandService = inject(AXPCommandService);\n\n async onDisconnected(connection: AXPSafeIntegrationConnectionDto): Promise<void> {\n await this.runLifecycle(connection.id, 'disconnected');\n }\n\n async onDeleted(connection: AXPSafeIntegrationConnectionDto): Promise<void> {\n await this.runLifecycle(connection.id, 'deleted');\n }\n\n async onEnabledChanged(connection: AXPSafeIntegrationConnectionDto, enabled: boolean): Promise<void> {\n if (enabled) {\n if (connection.status === AXP_INTEGRATION_CONNECTION_STATUS.Connected) {\n await this.runLifecycle(connection.id, 'enabled');\n }\n return;\n }\n await this.runLifecycle(connection.id, 'disabled');\n }\n\n private async runLifecycle(\n connectionId: string,\n action: 'connected' | 'disconnected' | 'deleted' | 'enabled' | 'disabled',\n ): Promise<void> {\n await this.commandService.execute(AXESimproCommandKeys.ConnectionLifecycle, {\n connectionId,\n action,\n });\n }\n}\n\nexport const provideSimproConnectionLifecycleHandler = {\n provide: AXP_INTEGRATION_CONNECTION_LIFECYCLE,\n useClass: AXESimproConnectionLifecycleHandler,\n multi: true,\n};\n\n//#endregion\n","import {\n AXP_LOGO_PROVIDER,\n type AXPLogoProvider,\n type AXPLogoRequest,\n type AXPLogoView,\n} from '@acorex-platform/framework-client/core';\nimport { axpSimproLogoKey } from './simpro-logo-key';\n\nconst simproLogoProvider: AXPLogoProvider = {\n key: axpSimproLogoKey,\n resolve: async (request: AXPLogoRequest): Promise<AXPLogoView> => ({\n kind: 'component',\n load: () => import('./simpro-logo.component').then((module) => module.AXESimproLogoComponent),\n inputs: {\n appearance: request.appearance,\n size: request.size,\n },\n }),\n};\n\nexport const AXE_SIMPRO_LOGO_PROVIDER = {\n provide: AXP_LOGO_PROVIDER,\n useValue: simproLogoProvider,\n multi: true,\n} as const;\n","//#region ---- Imports ----\n\nimport {\n AXPCommonMenuKeys\n} from '@acorex-platform/module-common-client/contracts';\nimport { AXPMenuProvider, AXPMenuProviderContext } from '@acorex-platform/framework-client/common';\nimport { Injectable } from '@angular/core';\nimport {\n AXESimproMenuKeys,\n RootConfig,\n AXPAdministrationPermissionKeys\n} from '@acorex-platform/extension-project-management-simpro-client/contracts';\n\n//#endregion\n\n@Injectable()\nexport class AXESimproMenuProvider implements AXPMenuProvider {\n async provide(context: AXPMenuProviderContext): Promise<void> {\n const module = RootConfig.module;\n const policy = {\n features: [module.name],\n permissions: [AXPAdministrationPermissionKeys.MaintainConnections],\n };\n\n const configMenu = context.find(AXPCommonMenuKeys.Configuration);\n if (!context.find(AXESimproMenuKeys.SimproExtensionConfig).exists) {\n configMenu.addItems([\n {\n name: AXESimproMenuKeys.SimproExtensionConfig,\n text: '@extensions-simpro:module.menus.configuration.title',\n icon: module.icon,\n type: 'menu',\n priority: 8940,\n policy,\n children: [],\n },\n ]);\n }\n }\n}\n\n//#endregion\n","//#region ---- Imports ----\n\nimport { AXMIntegrationManagementModule } from '@acorex-platform/module-integration-management-client';\nimport { AXP_INTEGRATION_PROVIDER, AXP_MENU_PROVIDER } from '@acorex-platform/framework-client/common';\nimport { AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER } from '@acorex-platform/framework-client/core';\nimport { AXP_ENTITY_MODIFIER } from '@acorex-platform/framework-client/layout/entity';\nimport { provideCommandSetups } from '@acorex-platform/framework-client/runtime';\nimport { NgModule } from '@angular/core';\nimport { AXESimproCommandKeys } from '@acorex-platform/extension-project-management-simpro-client/contracts';\nimport { AXESimproProjectLinkExpressionEvaluatorScopeProvider } from './features/project-management/simpro-project-link-expression-evaluator-scope.provider';\nimport { AXESimproProjectEntityModifier } from './features/project-management/project-simpro.entity-modifier';\nimport { AXESimproCustomerEntityModifier } from './features/customer-management/customer-simpro.entity-modifier';\nimport { AXESimproEmployeeEntityModifier } from './features/human-capital/employee-simpro.entity-modifier';\nimport { AXESimproContractorEntityModifier } from './features/contractor-management/contractor-simpro.entity-modifier';\nimport { AXESimproIntegrationProvider } from './integration/simpro.integration.provider';\nimport { provideSimproIntegrationRuntimeProvider } from './integration/simpro.integration-runtime.provider';\nimport { provideSimproConnectionLifecycleHandler } from './integration/simpro.connection-lifecycle.handler';\nimport { AXE_SIMPRO_LOGO_PROVIDER } from './brand/simpro-logo.provider';\nimport { AXESimproMenuProvider } from './menu.provider';\n\n//#endregion\n\n@NgModule({\n imports: [AXMIntegrationManagementModule],\n providers: [\n AXE_SIMPRO_LOGO_PROVIDER,\n { provide: AXP_MENU_PROVIDER, useClass: AXESimproMenuProvider, multi: true },\n { provide: AXP_ENTITY_MODIFIER, useValue: AXESimproProjectEntityModifier, multi: true },\n { provide: AXP_ENTITY_MODIFIER, useValue: AXESimproCustomerEntityModifier, multi: true },\n { provide: AXP_ENTITY_MODIFIER, useValue: AXESimproEmployeeEntityModifier, multi: true },\n { provide: AXP_ENTITY_MODIFIER, useValue: AXESimproContractorEntityModifier, multi: true },\n {\n provide: AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER,\n useClass: AXESimproProjectLinkExpressionEvaluatorScopeProvider,\n multi: true,\n },\n { provide: AXP_INTEGRATION_PROVIDER, useClass: AXESimproIntegrationProvider, multi: true },\n provideSimproIntegrationRuntimeProvider,\n provideSimproConnectionLifecycleHandler,\n provideCommandSetups([\n {\n key: AXESimproCommandKeys.ConnectionConnect,\n command: () => import('./features/connect/connect-simpro.command').then((c) => c.ConnectSimproCommand),\n },\n {\n key: AXESimproCommandKeys.ConnectionCompleteOAuth,\n command: () =>\n import('./features/connect/complete-simpro-oauth.command').then((c) => c.CompleteSimproOAuthCommand),\n },\n ]),\n ],\n})\nexport class AXESimproExtensionModule {}\n\n//#endregion\n","//#region ---- Simpro mark vector paths ----\n\nexport const AXE_SIMPRO_MARK_BLUE = '#00338D';\nexport const AXE_SIMPRO_MARK_GOLD = '#FFCC00';\n\nexport const AXE_SIMPRO_MARK_PATH = 'M12 4.2C12.5 4.2 12.5 8.6 13.6 9.2C14.7 9.9 18.5 7.6 18.8 8.1C19 8.6 15.2 10.7 15.2 12C15.2 13.3 19 15.4 18.8 15.9C18.5 16.4 14.7 14.1 13.6 14.8C12.5 15.4 12.5 19.8 12 19.8C11.5 19.8 11.5 15.4 10.4 14.8C9.3 14.1 5.5 16.4 5.2 15.9C5 15.4 8.8 13.3 8.8 12C8.8 10.7 5 8.6 5.2 8.1C5.5 7.6 9.3 9.9 10.4 9.2C11.5 8.6 11.5 4.2 12 4.2Z';\n\n//#endregion\n","import type { AXPLogoAppearance } from '@acorex-platform/framework-client/core';\nimport { Component, computed, input, ChangeDetectionStrategy } from '@angular/core';\nimport { AXE_SIMPRO_MARK_BLUE, AXE_SIMPRO_MARK_GOLD, AXE_SIMPRO_MARK_PATH } from './simpro-mark.paths';\n\n//#region ---- Simpro brand logo (owned by Simpro extension) ----\n\n@Component({\n selector: 'axe-simpro-logo',\n host: { class: 'inline-flex items-center justify-center' },\n changeDetection: ChangeDetectionStrategy.Eager,\n template: `\n @switch (resolvedAppearance()) {\n @case ('monochrome') {\n <svg [attr.width]=\"size()\" [attr.height]=\"size()\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <circle cx=\"12\" cy=\"12\" r=\"12\" fill=\"currentColor\" />\n <path fill=\"#fff\" [attr.d]=\"markPath\" />\n </svg>\n }\n @default {\n <svg [attr.width]=\"size()\" [attr.height]=\"size()\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <circle cx=\"12\" cy=\"12\" r=\"12\" [attr.fill]=\"markBlue\" />\n <path [attr.fill]=\"markGold\" [attr.d]=\"markPath\" />\n </svg>\n }\n }\n `,\n})\nexport class AXESimproLogoComponent {\n appearance = input<AXPLogoAppearance>('colored');\n size = input(20);\n\n protected readonly markPath = AXE_SIMPRO_MARK_PATH;\n protected readonly markBlue = AXE_SIMPRO_MARK_BLUE;\n protected readonly markGold = AXE_SIMPRO_MARK_GOLD;\n\n protected readonly resolvedAppearance = computed(() => {\n const value = this.appearance();\n return value === 'monochrome' ? 'monochrome' : 'colored';\n });\n}\n\n//#endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["PmRootConfig","IM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QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,IAAA,EAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,cAAA,EAAA,yCAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAjBvB;;;;;;;;;;;;;;;AAeT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,KAAA,EAAA,CAAA,CAAA;;2FAEU,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBArBlC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,iBAAiB;AAC3B,oBAAA,IAAI,EAAE,EAAE,KAAK,EAAE,yCAAyC,EAAE;oBAC1D,eAAe,EAAE,uBAAuB,CAAC,KAAK;AAC9C,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;AAeT,EAAA,CAAA;AACF,iBAAA;;;;;;;;AC1BD;;AAEG;;"}
|
|
@@ -127,10 +127,62 @@
|
|
|
127
127
|
"import-from-simpro": {
|
|
128
128
|
"title": "Import from Simpro"
|
|
129
129
|
},
|
|
130
|
+
"sync-employees-from-simpro": {
|
|
131
|
+
"title": "Sync from Simpro"
|
|
132
|
+
},
|
|
133
|
+
"sync-contractors-from-simpro": {
|
|
134
|
+
"title": "Sync from Simpro"
|
|
135
|
+
},
|
|
130
136
|
"sync": {
|
|
131
137
|
"title": "Sync"
|
|
132
138
|
}
|
|
133
139
|
},
|
|
140
|
+
"sync-employees": {
|
|
141
|
+
"not-connected": {
|
|
142
|
+
"title": "Connect Simpro to Sync Employees",
|
|
143
|
+
"message": "Simpro is not connected for this tenant. Open Administration → Integrations to connect your account, then try syncing again."
|
|
144
|
+
},
|
|
145
|
+
"success": "Synced employees from Simpro: {{created}} created, {{updated}} updated, {{skipped}} skipped, {{errors}} errors.",
|
|
146
|
+
"link-success": "Linked {{count}} employees to Simpro.",
|
|
147
|
+
"conflicts": {
|
|
148
|
+
"title": "Matching Usernames Found",
|
|
149
|
+
"message": "Some employees in the system have usernames that match Simpro staff, but they are not linked to Simpro. Select the records you want to link and update, then submit.",
|
|
150
|
+
"selector-title": "Link Matching Simpro Employees",
|
|
151
|
+
"submit": "Submit",
|
|
152
|
+
"matching-employee": "Matching Employee"
|
|
153
|
+
},
|
|
154
|
+
"loading": {
|
|
155
|
+
"fetch": {
|
|
156
|
+
"title": "Loading from Simpro",
|
|
157
|
+
"status": "Pulling employees into cache…"
|
|
158
|
+
},
|
|
159
|
+
"sync": {
|
|
160
|
+
"title": "Syncing Employees",
|
|
161
|
+
"status": "Creating and updating employees from Simpro…"
|
|
162
|
+
},
|
|
163
|
+
"link": {
|
|
164
|
+
"title": "Linking Employees",
|
|
165
|
+
"status": "Linking selected employees to Simpro…"
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
"sync-contractors": {
|
|
170
|
+
"not-connected": {
|
|
171
|
+
"title": "Connect Simpro to Sync Contractors",
|
|
172
|
+
"message": "Simpro is not connected for this tenant. Open Administration → Integrations to connect your account, then try syncing again."
|
|
173
|
+
},
|
|
174
|
+
"success": "Synced contractors from Simpro: {{created}} created, {{updated}} updated, {{skipped}} skipped, {{errors}} errors.",
|
|
175
|
+
"loading": {
|
|
176
|
+
"fetch": {
|
|
177
|
+
"title": "Loading from Simpro",
|
|
178
|
+
"status": "Pulling contractors into cache…"
|
|
179
|
+
},
|
|
180
|
+
"sync": {
|
|
181
|
+
"title": "Syncing Contractors",
|
|
182
|
+
"status": "Creating and updating contractors from Simpro…"
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
},
|
|
134
186
|
"import": {
|
|
135
187
|
"not-connected": {
|
|
136
188
|
"title": "Connect Simpro to import jobs",
|
|
@@ -190,13 +242,17 @@
|
|
|
190
242
|
"pull": {
|
|
191
243
|
"progress": {
|
|
192
244
|
"starting": "Starting Simpro job pull.",
|
|
193
|
-
"fetching": "Fetching jobs, customers, sites, and
|
|
245
|
+
"fetching": "Fetching jobs, customers, sites, employees, contractors, schedule rates, activities, and activity schedules.",
|
|
194
246
|
"related-customers": "Loading related customers.",
|
|
195
247
|
"related-sites": "Loading related sites.",
|
|
196
248
|
"saving-jobs": "Saving jobs.",
|
|
197
249
|
"saving-customers": "Saving customers.",
|
|
198
250
|
"saving-sites": "Saving sites.",
|
|
199
251
|
"saving-employees": "Saving employees.",
|
|
252
|
+
"saving-contractors": "Saving contractors.",
|
|
253
|
+
"saving-schedule-rates": "Saving schedule rates.",
|
|
254
|
+
"saving-activities": "Saving activities.",
|
|
255
|
+
"saving-activity-schedules": "Saving activity schedules.",
|
|
200
256
|
"finishing": "Finishing sync.",
|
|
201
257
|
"skipped": "No modified jobs since last sync.",
|
|
202
258
|
"complete-full": "Full sync finished.",
|
|
@@ -218,6 +274,11 @@
|
|
|
218
274
|
"pull-customers-failed": "Failed to pull Simpro customers.",
|
|
219
275
|
"import-failed": "Simpro import failed.",
|
|
220
276
|
"import-customers-failed": "Simpro customer import failed.",
|
|
277
|
+
"pull-employees-failed": "Failed to pull Simpro employees.",
|
|
278
|
+
"sync-employees-failed": "Simpro employee sync failed.",
|
|
279
|
+
"link-employees-failed": "Simpro employee link failed.",
|
|
280
|
+
"pull-contractors-failed": "Failed to pull Simpro contractors.",
|
|
281
|
+
"sync-contractors-failed": "Simpro contractor sync failed.",
|
|
221
282
|
"sync-failed": "Simpro sync failed.",
|
|
222
283
|
"connect-failed": "Failed to connect Simpro.",
|
|
223
284
|
"oauth-callback-failed": "Simpro authorization failed."
|
|
@@ -127,10 +127,62 @@
|
|
|
127
127
|
"import-from-simpro": {
|
|
128
128
|
"title": "Import from Simpro"
|
|
129
129
|
},
|
|
130
|
+
"sync-employees-from-simpro": {
|
|
131
|
+
"title": "Sync from Simpro"
|
|
132
|
+
},
|
|
133
|
+
"sync-contractors-from-simpro": {
|
|
134
|
+
"title": "Sync from Simpro"
|
|
135
|
+
},
|
|
130
136
|
"sync": {
|
|
131
137
|
"title": "Sync"
|
|
132
138
|
}
|
|
133
139
|
},
|
|
140
|
+
"sync-employees": {
|
|
141
|
+
"not-connected": {
|
|
142
|
+
"title": "Connect Simpro to Sync Employees",
|
|
143
|
+
"message": "Simpro is not connected for this tenant. Open Administration → Integrations to connect your account, then try syncing again."
|
|
144
|
+
},
|
|
145
|
+
"success": "Synced employees from Simpro: {{created}} created, {{updated}} updated, {{skipped}} skipped, {{errors}} errors.",
|
|
146
|
+
"link-success": "Linked {{count}} employees to Simpro.",
|
|
147
|
+
"conflicts": {
|
|
148
|
+
"title": "Matching Usernames Found",
|
|
149
|
+
"message": "Some employees in the system have usernames that match Simpro staff, but they are not linked to Simpro. Select the records you want to link and update, then submit.",
|
|
150
|
+
"selector-title": "Link Matching Simpro Employees",
|
|
151
|
+
"submit": "Submit",
|
|
152
|
+
"matching-employee": "Matching Employee"
|
|
153
|
+
},
|
|
154
|
+
"loading": {
|
|
155
|
+
"fetch": {
|
|
156
|
+
"title": "Loading from Simpro",
|
|
157
|
+
"status": "Pulling employees into cache…"
|
|
158
|
+
},
|
|
159
|
+
"sync": {
|
|
160
|
+
"title": "Syncing Employees",
|
|
161
|
+
"status": "Creating and updating employees from Simpro…"
|
|
162
|
+
},
|
|
163
|
+
"link": {
|
|
164
|
+
"title": "Linking Employees",
|
|
165
|
+
"status": "Linking selected employees to Simpro…"
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
"sync-contractors": {
|
|
170
|
+
"not-connected": {
|
|
171
|
+
"title": "Connect Simpro to Sync Contractors",
|
|
172
|
+
"message": "Simpro is not connected for this tenant. Open Administration → Integrations to connect your account, then try syncing again."
|
|
173
|
+
},
|
|
174
|
+
"success": "Synced contractors from Simpro: {{created}} created, {{updated}} updated, {{skipped}} skipped, {{errors}} errors.",
|
|
175
|
+
"loading": {
|
|
176
|
+
"fetch": {
|
|
177
|
+
"title": "Loading from Simpro",
|
|
178
|
+
"status": "Pulling contractors into cache…"
|
|
179
|
+
},
|
|
180
|
+
"sync": {
|
|
181
|
+
"title": "Syncing Contractors",
|
|
182
|
+
"status": "Creating and updating contractors from Simpro…"
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
},
|
|
134
186
|
"import": {
|
|
135
187
|
"not-connected": {
|
|
136
188
|
"title": "Connect Simpro to import jobs",
|
|
@@ -190,13 +242,17 @@
|
|
|
190
242
|
"pull": {
|
|
191
243
|
"progress": {
|
|
192
244
|
"starting": "Starting Simpro job pull.",
|
|
193
|
-
"fetching": "Fetching jobs, customers, sites, and
|
|
245
|
+
"fetching": "Fetching jobs, customers, sites, employees, contractors, schedule rates, activities, and activity schedules.",
|
|
194
246
|
"related-customers": "Loading related customers.",
|
|
195
247
|
"related-sites": "Loading related sites.",
|
|
196
248
|
"saving-jobs": "Saving jobs.",
|
|
197
249
|
"saving-customers": "Saving customers.",
|
|
198
250
|
"saving-sites": "Saving sites.",
|
|
199
251
|
"saving-employees": "Saving employees.",
|
|
252
|
+
"saving-contractors": "Saving contractors.",
|
|
253
|
+
"saving-schedule-rates": "Saving schedule rates.",
|
|
254
|
+
"saving-activities": "Saving activities.",
|
|
255
|
+
"saving-activity-schedules": "Saving activity schedules.",
|
|
200
256
|
"finishing": "Finishing sync.",
|
|
201
257
|
"skipped": "No modified jobs since last sync.",
|
|
202
258
|
"complete-full": "Full sync finished.",
|
|
@@ -218,6 +274,11 @@
|
|
|
218
274
|
"pull-customers-failed": "Failed to pull Simpro customers.",
|
|
219
275
|
"import-failed": "Simpro import failed.",
|
|
220
276
|
"import-customers-failed": "Simpro customer import failed.",
|
|
277
|
+
"pull-employees-failed": "Failed to pull Simpro employees.",
|
|
278
|
+
"sync-employees-failed": "Simpro employee sync failed.",
|
|
279
|
+
"link-employees-failed": "Simpro employee link failed.",
|
|
280
|
+
"pull-contractors-failed": "Failed to pull Simpro contractors.",
|
|
281
|
+
"sync-contractors-failed": "Simpro contractor sync failed.",
|
|
221
282
|
"sync-failed": "Simpro sync failed.",
|
|
222
283
|
"connect-failed": "Failed to connect Simpro.",
|
|
223
284
|
"oauth-callback-failed": "Simpro authorization failed."
|
|
@@ -111,10 +111,62 @@
|
|
|
111
111
|
"import-from-simpro": {
|
|
112
112
|
"title": "ورود از Simpro"
|
|
113
113
|
},
|
|
114
|
+
"sync-employees-from-simpro": {
|
|
115
|
+
"title": "همگامسازی از Simpro"
|
|
116
|
+
},
|
|
117
|
+
"sync-contractors-from-simpro": {
|
|
118
|
+
"title": "همگامسازی از Simpro"
|
|
119
|
+
},
|
|
114
120
|
"sync": {
|
|
115
121
|
"title": "همگامسازی"
|
|
116
122
|
}
|
|
117
123
|
},
|
|
124
|
+
"sync-employees": {
|
|
125
|
+
"not-connected": {
|
|
126
|
+
"title": "برای همگامسازی کارکنان Simpro را متصل کنید",
|
|
127
|
+
"message": "Simpro برای این tenant متصل نیست. برای اتصال حساب، مدیریت ← یکپارچهسازیها را باز کنید و دوباره همگامسازی را امتحان کنید."
|
|
128
|
+
},
|
|
129
|
+
"success": "همگامسازی کارکنان از Simpro: {{created}} ایجاد، {{updated}} بهروزرسانی، {{skipped}} رد شده، {{errors}} خطا.",
|
|
130
|
+
"link-success": "{{count}} کارمند به Simpro پیوند داده شد.",
|
|
131
|
+
"conflicts": {
|
|
132
|
+
"title": "نامهای کاربری منطبق پیدا شد",
|
|
133
|
+
"message": "برخی کارکنان در سیستم نام کاربری یکسان با کارکنان Simpro دارند اما به Simpro پیوند نشدهاند. رکوردهایی را که میخواهید پیوند و بهروزرسانی شوند انتخاب کنید و سپس ثبت کنید.",
|
|
134
|
+
"selector-title": "پیوند کارکنان منطبق Simpro",
|
|
135
|
+
"submit": "ثبت",
|
|
136
|
+
"matching-employee": "کارمند منطبق"
|
|
137
|
+
},
|
|
138
|
+
"loading": {
|
|
139
|
+
"fetch": {
|
|
140
|
+
"title": "بارگذاری از Simpro",
|
|
141
|
+
"status": "در حال کشیدن کارکنان به حافظه…"
|
|
142
|
+
},
|
|
143
|
+
"sync": {
|
|
144
|
+
"title": "همگامسازی کارکنان",
|
|
145
|
+
"status": "در حال ایجاد و بهروزرسانی کارکنان از Simpro…"
|
|
146
|
+
},
|
|
147
|
+
"link": {
|
|
148
|
+
"title": "پیوند کارکنان",
|
|
149
|
+
"status": "در حال پیوند کارکنان انتخابشده به Simpro…"
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
"sync-contractors": {
|
|
154
|
+
"not-connected": {
|
|
155
|
+
"title": "برای همگامسازی پیمانکاران Simpro را متصل کنید",
|
|
156
|
+
"message": "Simpro برای این tenant متصل نیست. برای اتصال حساب، مدیریت ← یکپارچهسازیها را باز کنید و دوباره همگامسازی را امتحان کنید."
|
|
157
|
+
},
|
|
158
|
+
"success": "همگامسازی پیمانکاران از Simpro: {{created}} ایجاد، {{updated}} بهروزرسانی، {{skipped}} رد شده، {{errors}} خطا.",
|
|
159
|
+
"loading": {
|
|
160
|
+
"fetch": {
|
|
161
|
+
"title": "بارگذاری از Simpro",
|
|
162
|
+
"status": "در حال کشیدن پیمانکاران به حافظه…"
|
|
163
|
+
},
|
|
164
|
+
"sync": {
|
|
165
|
+
"title": "همگامسازی پیمانکاران",
|
|
166
|
+
"status": "در حال ایجاد و بهروزرسانی پیمانکاران از Simpro…"
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
},
|
|
118
170
|
"import": {
|
|
119
171
|
"not-connected": {
|
|
120
172
|
"title": "برای وارد کردن Jobها Simpro را متصل کنید",
|
|
@@ -174,13 +226,17 @@
|
|
|
174
226
|
"pull": {
|
|
175
227
|
"progress": {
|
|
176
228
|
"starting": "در حال شروع دریافت کارها از Simpro.",
|
|
177
|
-
"fetching": "در حال دریافت کارها، مشتریها،
|
|
229
|
+
"fetching": "در حال دریافت کارها، مشتریها، سایتها، کارکنان، پیمانکاران، نرخهای زمانبندی، فعالیتها و زمانبندی فعالیتها.",
|
|
178
230
|
"related-customers": "در حال بارگذاری مشتریهای مرتبط.",
|
|
179
231
|
"related-sites": "در حال بارگذاری سایتهای مرتبط.",
|
|
180
232
|
"saving-jobs": "در حال ذخیره کارها.",
|
|
181
233
|
"saving-customers": "در حال ذخیره مشتریها.",
|
|
182
234
|
"saving-sites": "در حال ذخیره سایتها.",
|
|
183
235
|
"saving-employees": "در حال ذخیره کارکنان.",
|
|
236
|
+
"saving-contractors": "در حال ذخیره پیمانکاران.",
|
|
237
|
+
"saving-schedule-rates": "در حال ذخیره نرخهای زمانبندی.",
|
|
238
|
+
"saving-activities": "در حال ذخیره فعالیتها.",
|
|
239
|
+
"saving-activity-schedules": "در حال ذخیره زمانبندی فعالیتها.",
|
|
184
240
|
"finishing": "در حال نهاییسازی همگامسازی.",
|
|
185
241
|
"skipped": "از همگامسازی قبلی تغییری نبود.",
|
|
186
242
|
"complete-full": "همگامسازی کامل تمام شد.",
|
|
@@ -202,6 +258,11 @@
|
|
|
202
258
|
"pull-customers-failed": "دریافت مشتریان از Simpro ناموفق بود.",
|
|
203
259
|
"import-failed": "ورود از Simpro ناموفق بود.",
|
|
204
260
|
"import-customers-failed": "ورود مشتری از Simpro ناموفق بود.",
|
|
261
|
+
"pull-employees-failed": "دریافت کارکنان از Simpro ناموفق بود.",
|
|
262
|
+
"sync-employees-failed": "همگامسازی کارکنان از Simpro ناموفق بود.",
|
|
263
|
+
"link-employees-failed": "پیوند کارکنان به Simpro ناموفق بود.",
|
|
264
|
+
"pull-contractors-failed": "دریافت پیمانکاران از Simpro ناموفق بود.",
|
|
265
|
+
"sync-contractors-failed": "همگامسازی پیمانکاران از Simpro ناموفق بود.",
|
|
205
266
|
"sync-failed": "همگامسازی با Simpro ناموفق بود.",
|
|
206
267
|
"connect-failed": "اتصال Simpro ناموفق بود.",
|
|
207
268
|
"oauth-callback-failed": "مجوزدهی Simpro ناموفق بود."
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@acorex-platform/extension-project-management-simpro-client",
|
|
3
|
-
"version": "2.0.0-next.
|
|
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.30",
|
|
6
7
|
"@angular/common": "^21.0.0 || ^22.0.0",
|
|
7
|
-
"@angular/core": "^21.0.0 || ^22.0.0"
|
|
8
|
-
"@acorex-platform/extension-project-management-core-client": "2.0.0-next.3"
|
|
8
|
+
"@angular/core": "^21.0.0 || ^22.0.0"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"tslib": "^2.3.0"
|
|
@@ -24,6 +24,9 @@ declare const AXESimproCommandKeys: {
|
|
|
24
24
|
readonly OAuthValidate: "simpro-extension.OAuth:Validate";
|
|
25
25
|
readonly ProjectImportFromSimpro: "simpro-extension.Project:ImportFromSimpro";
|
|
26
26
|
readonly CustomerImportFromSimpro: "simpro-extension.Customer:ImportFromSimpro";
|
|
27
|
+
readonly EmployeeSyncFromSimpro: "simpro-extension.Employee:SyncFromSimpro";
|
|
28
|
+
readonly EmployeeLinkFromSimpro: "simpro-extension.Employee:LinkFromSimpro";
|
|
29
|
+
readonly ContractorSyncFromSimpro: "simpro-extension.Contractor:SyncFromSimpro";
|
|
27
30
|
readonly ProjectSync: "simpro-extension.Project:Sync";
|
|
28
31
|
readonly JobsPull: "simpro-extension.Jobs:Pull";
|
|
29
32
|
readonly JobsRefresh: "simpro-extension.Jobs:Refresh";
|
|
@@ -74,6 +77,12 @@ declare const AXESimproPermissions: {
|
|
|
74
77
|
readonly CustomerImport: {
|
|
75
78
|
readonly Execute: "Administration:Permission:ManageIntegrationActions";
|
|
76
79
|
};
|
|
80
|
+
readonly EmployeeImport: {
|
|
81
|
+
readonly Execute: "Administration:Permission:ManageIntegrationActions";
|
|
82
|
+
};
|
|
83
|
+
readonly ContractorImport: {
|
|
84
|
+
readonly Execute: "Administration:Permission:ManageIntegrationActions";
|
|
85
|
+
};
|
|
77
86
|
readonly ProjectSync: {
|
|
78
87
|
readonly Execute: "Administration:Permission:ManageIntegrationActions";
|
|
79
88
|
};
|
|
@@ -196,6 +205,7 @@ interface AXESimproRemoteEmployee {
|
|
|
196
205
|
Name?: string | null;
|
|
197
206
|
Position?: string | null;
|
|
198
207
|
DateOfBirth?: string | null;
|
|
208
|
+
DateOfHire?: string | null;
|
|
199
209
|
Archived?: boolean | null;
|
|
200
210
|
Address?: (AXESimproRemoteAddress & {
|
|
201
211
|
Country?: string | null;
|
|
@@ -219,6 +229,80 @@ interface AXESimproRemoteEmployee {
|
|
|
219
229
|
} | null;
|
|
220
230
|
UserProfile?: Record<string, unknown> | null;
|
|
221
231
|
}
|
|
232
|
+
/** Subset of Simpro `/contractors/` fields cached as `resourceType=contractor`. */
|
|
233
|
+
interface AXESimproRemoteContractor {
|
|
234
|
+
ID: number;
|
|
235
|
+
Name?: string | null;
|
|
236
|
+
Position?: string | null;
|
|
237
|
+
Availability?: string | boolean | null;
|
|
238
|
+
Address?: (AXESimproRemoteAddress & {
|
|
239
|
+
Country?: string | null;
|
|
240
|
+
}) | null;
|
|
241
|
+
DateOfHire?: string | null;
|
|
242
|
+
DateOfBirth?: string | null;
|
|
243
|
+
PrimaryContact?: {
|
|
244
|
+
Email?: string | null;
|
|
245
|
+
SecondaryEmail?: string | null;
|
|
246
|
+
WorkPhone?: string | null;
|
|
247
|
+
Extension?: string | null;
|
|
248
|
+
CellPhone?: string | null;
|
|
249
|
+
Fax?: string | null;
|
|
250
|
+
PreferredNotificationMethod?: string | null;
|
|
251
|
+
} | null;
|
|
252
|
+
EmergencyContact?: {
|
|
253
|
+
Name?: string | null;
|
|
254
|
+
Relationship?: string | null;
|
|
255
|
+
WorkPhone?: string | null;
|
|
256
|
+
CellPhone?: string | null;
|
|
257
|
+
AltPhone?: string | null;
|
|
258
|
+
Address?: (AXESimproRemoteAddress & {
|
|
259
|
+
Country?: string | null;
|
|
260
|
+
}) | string | null;
|
|
261
|
+
} | null;
|
|
262
|
+
Archived?: boolean | null;
|
|
263
|
+
EIN?: string | null;
|
|
264
|
+
CompanyNumber?: string | null;
|
|
265
|
+
ContactName?: string | null;
|
|
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
|
+
}
|
|
222
306
|
interface AXESimproPullJobsRequest {
|
|
223
307
|
/** When set, pulls for this Simpro connection (required for multi-connection schedules). */
|
|
224
308
|
connectionId?: string;
|
|
@@ -237,7 +321,7 @@ interface AXESimproPullJobsResponse {
|
|
|
237
321
|
skipped?: boolean;
|
|
238
322
|
/** Whether this run used incremental or full snapshot mode. */
|
|
239
323
|
syncMode?: 'incremental' | 'full';
|
|
240
|
-
/** Per data-type upsert counts
|
|
324
|
+
/** Per data-type upsert counts for resources pulled into IntegrationRemoteRecord. */
|
|
241
325
|
byResourceType?: {
|
|
242
326
|
job?: {
|
|
243
327
|
upserted: number;
|
|
@@ -255,6 +339,22 @@ interface AXESimproPullJobsResponse {
|
|
|
255
339
|
upserted: number;
|
|
256
340
|
deactivated: number;
|
|
257
341
|
};
|
|
342
|
+
contractor?: {
|
|
343
|
+
upserted: number;
|
|
344
|
+
deactivated: number;
|
|
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
|
+
};
|
|
258
358
|
};
|
|
259
359
|
}
|
|
260
360
|
interface AXESimproImportJobRequest {
|
|
@@ -273,6 +373,57 @@ interface AXESimproImportCustomerResponse {
|
|
|
273
373
|
platformCustomerId: string;
|
|
274
374
|
created: boolean;
|
|
275
375
|
}
|
|
376
|
+
/** Username conflict: remote login username matches an unlinked platform employee's User. */
|
|
377
|
+
interface AXESimproEmployeeUsernameConflict {
|
|
378
|
+
remoteRecordId: string;
|
|
379
|
+
remoteId: string;
|
|
380
|
+
connectionId: string;
|
|
381
|
+
username: string;
|
|
382
|
+
remoteName: string;
|
|
383
|
+
platformEmployeeId: string;
|
|
384
|
+
platformEmployeeCode: string;
|
|
385
|
+
platformEmployeeName?: string;
|
|
386
|
+
}
|
|
387
|
+
interface AXESimproSyncEmployeesRequest {
|
|
388
|
+
/** Active Simpro connection ids to sync (defaults to all tenant connections with cache rows). */
|
|
389
|
+
connectionIds?: string[];
|
|
390
|
+
}
|
|
391
|
+
interface AXESimproSyncEmployeesResponse {
|
|
392
|
+
created: number;
|
|
393
|
+
updated: number;
|
|
394
|
+
skipped: number;
|
|
395
|
+
conflicts: AXESimproEmployeeUsernameConflict[];
|
|
396
|
+
errors: Array<{
|
|
397
|
+
remoteId: string;
|
|
398
|
+
message: string;
|
|
399
|
+
}>;
|
|
400
|
+
}
|
|
401
|
+
interface AXESimproSyncContractorsRequest {
|
|
402
|
+
/** Active Simpro connection ids to sync (defaults to all tenant connections with cache rows). */
|
|
403
|
+
connectionIds?: string[];
|
|
404
|
+
}
|
|
405
|
+
interface AXESimproSyncContractorsResponse {
|
|
406
|
+
created: number;
|
|
407
|
+
updated: number;
|
|
408
|
+
skipped: number;
|
|
409
|
+
errors: Array<{
|
|
410
|
+
remoteId: string;
|
|
411
|
+
message: string;
|
|
412
|
+
}>;
|
|
413
|
+
}
|
|
414
|
+
interface AXESimproLinkEmployeesRequest {
|
|
415
|
+
links: Array<{
|
|
416
|
+
remoteRecordId: string;
|
|
417
|
+
platformEmployeeId: string;
|
|
418
|
+
}>;
|
|
419
|
+
}
|
|
420
|
+
interface AXESimproLinkEmployeesResponse {
|
|
421
|
+
linked: number;
|
|
422
|
+
errors: Array<{
|
|
423
|
+
remoteRecordId: string;
|
|
424
|
+
message: string;
|
|
425
|
+
}>;
|
|
426
|
+
}
|
|
276
427
|
interface AXESimproSyncPlatformProjectRequest {
|
|
277
428
|
platformProjectId: string;
|
|
278
429
|
}
|
|
@@ -293,4 +444,4 @@ type AXESimproErrorCode = (typeof AXE_SIMPRO_ERROR_CODES)[keyof typeof AXE_SIMPR
|
|
|
293
444
|
declare const AXE_SIMPRO_ERROR_I18N_KEYS: Record<AXESimproErrorCode, string>;
|
|
294
445
|
|
|
295
446
|
export { AXESimproCommandKeys, AXESimproMenuKeys, AXESimproPermissions, AXE_SIMPRO_ERROR_CODES, AXE_SIMPRO_ERROR_I18N_KEYS, AXPAdministrationPermissionKeys, RootConfig, SimproExtensionManifest };
|
|
296
|
-
export type { AXESimproConnectionConfig, AXESimproConnectionLifecycleRequest, AXESimproConnectionLifecycleResponse, AXESimproErrorCode, AXESimproImportCustomerRequest, AXESimproImportCustomerResponse, AXESimproImportJobRequest, AXESimproImportJobResponse, AXESimproJobsSyncState, AXESimproOAuthCompleteRequest, AXESimproOAuthCompleteResponse, AXESimproOAuthStartRequest, AXESimproOAuthStartResponse, AXESimproOAuthValidateRequest, AXESimproOAuthValidateResponse, AXESimproPullJobsRequest, AXESimproPullJobsResponse, AXESimproRemoteAddress, AXESimproRemoteCustomer, AXESimproRemoteEmployee, AXESimproRemoteJob, AXESimproRemotePartyRef, AXESimproRemoteSite, AXESimproRemoteSitePrimaryContact, 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 };
|