@acorex-platform/extension-project-management-simpro-client 0.0.21
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-complete-simpro-oauth.command-BA01rFnU.mjs +52 -0
- package/fesm2022/acorex-platform-extension-project-management-simpro-client-complete-simpro-oauth.command-BA01rFnU.mjs.map +1 -0
- package/fesm2022/acorex-platform-extension-project-management-simpro-client-connect-simpro.command-BPDls4Yt.mjs +271 -0
- package/fesm2022/acorex-platform-extension-project-management-simpro-client-connect-simpro.command-BPDls4Yt.mjs.map +1 -0
- package/fesm2022/acorex-platform-extension-project-management-simpro-client-contracts.mjs +115 -0
- package/fesm2022/acorex-platform-extension-project-management-simpro-client-contracts.mjs.map +1 -0
- package/fesm2022/acorex-platform-extension-project-management-simpro-client-simpro-command-error.util-BTtAPZsK.mjs +66 -0
- package/fesm2022/acorex-platform-extension-project-management-simpro-client-simpro-command-error.util-BTtAPZsK.mjs.map +1 -0
- package/fesm2022/acorex-platform-extension-project-management-simpro-client.mjs +579 -0
- package/fesm2022/acorex-platform-extension-project-management-simpro-client.mjs.map +1 -0
- package/package.json +28 -0
- package/types/acorex-platform-extension-project-management-simpro-client-contracts.d.ts +260 -0
- package/types/acorex-platform-extension-project-management-simpro-client.d.ts +34 -0
|
@@ -0,0 +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/manifest.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 { AXESimproConnectionConfig } from '@acorex-platform/extension-project-management-simpro-client/contracts';\n\nconst SIMPRO_I18N = '@extensions-simpro:integration.badges';\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\nexport async function resolveSimproConnectionSettingsBadges(\n ctx: AXPIntegrationConnectionSettingsContext,\n formatService: AXFormatService,\n settingsService: AXPSettingsService,\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 if (!lastSync) {\n return [\n {\n labelKey: `${SIMPRO_I18N}.never-synced`,\n color: 'warning',\n },\n ];\n }\n\n const datetime = await formatSyncTimestamp(lastSync, formatService, settingsService);\n if (!datetime) {\n return [];\n }\n\n return [\n {\n labelKey: `${SIMPRO_I18N}.last-sync`,\n params: { datetime },\n color: 'success',\n },\n ];\n}\n\n//#endregion\n","import {\n AXP_INTEGRATION_CONNECTION_STATUS,\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 { resolveSimproConnectionSettingsBadges } 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\n async getHooks(): Promise<AXPIntegrationProviderRuntimeHooks> {\n return {\n validateConnection: (ctx) => this.validateConnection(ctx),\n createClient: (ctx) => this.createClient(ctx),\n getConnectionSettingsBadges: (ctx) =>\n resolveSimproConnectionSettingsBadges(ctx, this.formatService, this.settingsService),\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\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 ---- Manifest ----\n\nimport { AXPModuleManifest } from '@acorex-platform/framework-client/core';\nimport { RootConfig } from '@acorex-platform/extension-project-management-simpro-client/contracts';\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 ---- 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, AXP_MODULE_MANIFEST_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 { SimproExtensionManifest } from './manifest';\nimport { AXESimproMenuProvider } from './menu.provider';\n\n//#endregion\n\n@NgModule({\n imports: [AXMIntegrationManagementModule],\n providers: [\n AXE_SIMPRO_LOGO_PROVIDER,\n { provide: AXP_MODULE_MANIFEST_PROVIDER, useValue: SimproExtensionManifest, multi: true },\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","RootCon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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;;;;"}
|
package/package.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@acorex-platform/extension-project-management-simpro-client",
|
|
3
|
+
"version": "0.0.21",
|
|
4
|
+
"sideEffects": false,
|
|
5
|
+
"peerDependencies": {
|
|
6
|
+
"@angular/common": "^21.0.0",
|
|
7
|
+
"@angular/core": "^21.0.0"
|
|
8
|
+
},
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"tslib": "^2.3.0"
|
|
11
|
+
},
|
|
12
|
+
"module": "fesm2022/acorex-platform-extension-project-management-simpro-client.mjs",
|
|
13
|
+
"typings": "types/acorex-platform-extension-project-management-simpro-client.d.ts",
|
|
14
|
+
"exports": {
|
|
15
|
+
"./package.json": {
|
|
16
|
+
"default": "./package.json"
|
|
17
|
+
},
|
|
18
|
+
".": {
|
|
19
|
+
"types": "./types/acorex-platform-extension-project-management-simpro-client.d.ts",
|
|
20
|
+
"default": "./fesm2022/acorex-platform-extension-project-management-simpro-client.mjs"
|
|
21
|
+
},
|
|
22
|
+
"./contracts": {
|
|
23
|
+
"types": "./types/acorex-platform-extension-project-management-simpro-client-contracts.d.ts",
|
|
24
|
+
"default": "./fesm2022/acorex-platform-extension-project-management-simpro-client-contracts.mjs"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"type": "module"
|
|
28
|
+
}
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
import { AXEPMProjectSyncStrategy } from '@acorex-platform/extension-project-management-core-contracts';
|
|
2
|
+
export { AXEPMProjectSyncStrategy, AXEPMProjectSyncStrategy as AXESimproProjectSyncStrategy, AXE_PM_PROJECT_SYNC_STRATEGIES as AXE_SIMPRO_PROJECT_SYNC_STRATEGIES } from '@acorex-platform/extension-project-management-core-contracts';
|
|
3
|
+
|
|
4
|
+
declare const RootConfig: {
|
|
5
|
+
config: {
|
|
6
|
+
i18n: string;
|
|
7
|
+
};
|
|
8
|
+
module: {
|
|
9
|
+
name: string;
|
|
10
|
+
title: string;
|
|
11
|
+
icon: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
declare const AXESimproCommandKeys: {
|
|
16
|
+
readonly ConnectionConnect: "simpro-extension.Connection:Connect";
|
|
17
|
+
readonly ConnectionCompleteOAuth: "simpro-extension.Connection:CompleteOAuth";
|
|
18
|
+
readonly ConnectionLifecycle: "simpro-extension.Connection:Lifecycle";
|
|
19
|
+
readonly OAuthStart: "simpro-extension.OAuth:Start";
|
|
20
|
+
readonly OAuthComplete: "simpro-extension.OAuth:Complete";
|
|
21
|
+
readonly OAuthValidate: "simpro-extension.OAuth:Validate";
|
|
22
|
+
readonly ProjectImportFromSimpro: "simpro-extension.Project:ImportFromSimpro";
|
|
23
|
+
readonly CustomerImportFromSimpro: "simpro-extension.Customer:ImportFromSimpro";
|
|
24
|
+
readonly ProjectSync: "simpro-extension.Project:Sync";
|
|
25
|
+
readonly JobsPull: "simpro-extension.Jobs:Pull";
|
|
26
|
+
readonly JobsRefresh: "simpro-extension.Jobs:Refresh";
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
declare const AXESimproMenuKeys: {
|
|
30
|
+
readonly SimproExtensionConfig: "simpro-extension:Menu:Configuration";
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Administration capabilities used by this extension.
|
|
35
|
+
* Domain capability keys for this module. Root groups live in `AXPCommonPermissionGroupKeys` (common contracts).
|
|
36
|
+
*/
|
|
37
|
+
declare const AXPAdministrationPermissionKeys: {
|
|
38
|
+
readonly Access: "Administration:Permission:Access";
|
|
39
|
+
readonly MaintainUsersAndRoles: "Administration:Permission:MaintainUsersAndRoles";
|
|
40
|
+
readonly ManageSessions: "Administration:Permission:ManageSessions";
|
|
41
|
+
readonly MaintainPolicies: "Administration:Permission:MaintainPolicies";
|
|
42
|
+
readonly ViewIntegrations: "Administration:Permission:ViewIntegrations";
|
|
43
|
+
readonly MaintainConnections: "Administration:Permission:MaintainConnections";
|
|
44
|
+
readonly ManageIntegrationActions: "Administration:Permission:ManageIntegrationActions";
|
|
45
|
+
readonly MaintainWorkflows: "Administration:Permission:MaintainWorkflows";
|
|
46
|
+
readonly ManageWorkflowActions: "Administration:Permission:ManageWorkflowActions";
|
|
47
|
+
readonly ViewRules: "Administration:Permission:ViewRules";
|
|
48
|
+
readonly MaintainRules: "Administration:Permission:MaintainRules";
|
|
49
|
+
readonly ManageRuleActions: "Administration:Permission:ManageRuleActions";
|
|
50
|
+
readonly MaintainAi: "Administration:Permission:MaintainAi";
|
|
51
|
+
readonly UseAiAssist: "Administration:Permission:UseAiAssist";
|
|
52
|
+
readonly MaintainDashboards: "Administration:Permission:MaintainDashboards";
|
|
53
|
+
readonly ViewJobs: "Administration:Permission:ViewJobs";
|
|
54
|
+
readonly ManageJobActions: "Administration:Permission:ManageJobActions";
|
|
55
|
+
readonly ViewObservability: "Administration:Permission:ViewObservability";
|
|
56
|
+
readonly MaintainObservability: "Administration:Permission:MaintainObservability";
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* @deprecated Prefer {@link AXPAdministrationPermissionKeys}.
|
|
60
|
+
* Legacy nested shape kept so existing imports compile during migration.
|
|
61
|
+
*/
|
|
62
|
+
declare const AXESimproPermissions: {
|
|
63
|
+
readonly SimproExtension: {
|
|
64
|
+
readonly Management: "Administration:Permission:MaintainConnections";
|
|
65
|
+
readonly Catalog: {
|
|
66
|
+
readonly View: "Administration:Permission:ViewIntegrations";
|
|
67
|
+
};
|
|
68
|
+
readonly ProjectImport: {
|
|
69
|
+
readonly Execute: "Administration:Permission:ManageIntegrationActions";
|
|
70
|
+
};
|
|
71
|
+
readonly CustomerImport: {
|
|
72
|
+
readonly Execute: "Administration:Permission:ManageIntegrationActions";
|
|
73
|
+
};
|
|
74
|
+
readonly ProjectSync: {
|
|
75
|
+
readonly Execute: "Administration:Permission:ManageIntegrationActions";
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
/** Stored on IntegrationManagement connection `config` for tenant-scoped Simpro (cloud-only). */
|
|
81
|
+
interface AXESimproConnectionConfig {
|
|
82
|
+
/** Simpro multi-company ID (0 for single-company builds). */
|
|
83
|
+
companyId?: number;
|
|
84
|
+
/** OAuth2 client ID from the Simpro application key file. */
|
|
85
|
+
clientId?: string;
|
|
86
|
+
/** OAuth2 client secret from the Simpro application key file. */
|
|
87
|
+
clientSecret?: string;
|
|
88
|
+
/** Optional override when it differs from `{buildUrl}/oauth2/login`. */
|
|
89
|
+
authorizationUrl?: string;
|
|
90
|
+
/** Current bearer token (authorization-code flow). */
|
|
91
|
+
accessToken?: string;
|
|
92
|
+
/** Refresh token from Simpro token response. */
|
|
93
|
+
refreshToken?: string;
|
|
94
|
+
/** ISO timestamp when `accessToken` expires. */
|
|
95
|
+
tokenExpiresAt?: string;
|
|
96
|
+
/** Full Simpro token JSON response (mirrors legacy SimproJson). */
|
|
97
|
+
oauthTokenJson?: string;
|
|
98
|
+
/** Background job pull sync state (server-managed). */
|
|
99
|
+
jobsSync?: AXESimproJobsSyncState;
|
|
100
|
+
}
|
|
101
|
+
/** Simpro job pull sync state stored on the tenant connection `config.jobsSync`. */
|
|
102
|
+
interface AXESimproJobsSyncState {
|
|
103
|
+
/** ISO timestamp — last successful job pull (incremental sync watermark). */
|
|
104
|
+
lastSyncAt?: string;
|
|
105
|
+
/** ISO timestamp — last full snapshot reconcile (deactivation pass). */
|
|
106
|
+
lastFullReconcileAt?: string;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
interface AXESimproOAuthStartRequest {
|
|
110
|
+
redirectUri: string;
|
|
111
|
+
connectionId?: string;
|
|
112
|
+
}
|
|
113
|
+
interface AXESimproOAuthStartResponse {
|
|
114
|
+
redirectUrl: string;
|
|
115
|
+
state: string;
|
|
116
|
+
}
|
|
117
|
+
interface AXESimproOAuthCompleteRequest {
|
|
118
|
+
state: string;
|
|
119
|
+
code: string;
|
|
120
|
+
}
|
|
121
|
+
interface AXESimproOAuthCompleteResponse {
|
|
122
|
+
connectionId: string;
|
|
123
|
+
}
|
|
124
|
+
interface AXESimproOAuthValidateRequest {
|
|
125
|
+
connectionId?: string;
|
|
126
|
+
}
|
|
127
|
+
interface AXESimproOAuthValidateResponse {
|
|
128
|
+
valid: boolean;
|
|
129
|
+
message?: string;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
interface AXESimproRemotePartyRef {
|
|
133
|
+
ID?: number;
|
|
134
|
+
Name?: string | null;
|
|
135
|
+
GivenName?: string | null;
|
|
136
|
+
CompanyName?: string | null;
|
|
137
|
+
}
|
|
138
|
+
interface AXESimproRemoteAddress {
|
|
139
|
+
Address?: string | null;
|
|
140
|
+
City?: string | null;
|
|
141
|
+
State?: string | null;
|
|
142
|
+
PostalCode?: string | null;
|
|
143
|
+
}
|
|
144
|
+
interface AXESimproRemoteJob {
|
|
145
|
+
ID: number;
|
|
146
|
+
Name?: string | null;
|
|
147
|
+
Description?: string | null;
|
|
148
|
+
OrderNo?: string | null;
|
|
149
|
+
RequestNo?: string | null;
|
|
150
|
+
Type?: string | null;
|
|
151
|
+
Stage?: string | {
|
|
152
|
+
Name?: string;
|
|
153
|
+
} | null;
|
|
154
|
+
DateIssued?: string | null;
|
|
155
|
+
DueDate?: string | null;
|
|
156
|
+
DueTime?: string | null;
|
|
157
|
+
DateModified?: string | null;
|
|
158
|
+
Status?: {
|
|
159
|
+
ID?: number;
|
|
160
|
+
Name?: string;
|
|
161
|
+
} | string | null;
|
|
162
|
+
Customer?: AXESimproRemotePartyRef | string | null;
|
|
163
|
+
Site?: AXESimproRemotePartyRef | string | null;
|
|
164
|
+
}
|
|
165
|
+
interface AXESimproRemoteCustomer {
|
|
166
|
+
ID: number;
|
|
167
|
+
GivenName?: string | null;
|
|
168
|
+
FamilyName?: string | null;
|
|
169
|
+
Title?: string | null;
|
|
170
|
+
Phone?: string | null;
|
|
171
|
+
Email?: string | null;
|
|
172
|
+
EIN?: string | null;
|
|
173
|
+
CompanyName?: string | null;
|
|
174
|
+
Address?: AXESimproRemoteAddress | null;
|
|
175
|
+
BillingAddress?: AXESimproRemoteAddress | null;
|
|
176
|
+
}
|
|
177
|
+
interface AXESimproRemoteSitePrimaryContact {
|
|
178
|
+
CellPhone?: string | null;
|
|
179
|
+
Email?: string | null;
|
|
180
|
+
Contact?: {
|
|
181
|
+
ID?: number;
|
|
182
|
+
} | null;
|
|
183
|
+
}
|
|
184
|
+
interface AXESimproRemoteSite {
|
|
185
|
+
ID: number;
|
|
186
|
+
Name?: string | null;
|
|
187
|
+
Address?: AXESimproRemoteAddress | null;
|
|
188
|
+
PrimaryContact?: AXESimproRemoteSitePrimaryContact | null;
|
|
189
|
+
}
|
|
190
|
+
interface AXESimproPullJobsRequest {
|
|
191
|
+
/** When set, pulls for this Simpro connection (required for multi-connection schedules). */
|
|
192
|
+
connectionId?: string;
|
|
193
|
+
/** Maximum Simpro jobs to pull into the cache (default 250, max 1000). */
|
|
194
|
+
maxJobs?: number;
|
|
195
|
+
/**
|
|
196
|
+
* When true, runs a full snapshot (no incremental filter) and reconciles deactivations.
|
|
197
|
+
* When false (default for schedules), pulls jobs modified since the last successful sync.
|
|
198
|
+
*/
|
|
199
|
+
force?: boolean;
|
|
200
|
+
}
|
|
201
|
+
interface AXESimproPullJobsResponse {
|
|
202
|
+
upserted: number;
|
|
203
|
+
deactivated: number;
|
|
204
|
+
/** True when incremental pull found no modified jobs in Simpro. */
|
|
205
|
+
skipped?: boolean;
|
|
206
|
+
/** Whether this run used incremental or full snapshot mode. */
|
|
207
|
+
syncMode?: 'incremental' | 'full';
|
|
208
|
+
/** Per data-type upsert counts (jobs / customers / sites). */
|
|
209
|
+
byResourceType?: {
|
|
210
|
+
job?: {
|
|
211
|
+
upserted: number;
|
|
212
|
+
deactivated: number;
|
|
213
|
+
};
|
|
214
|
+
customer?: {
|
|
215
|
+
upserted: number;
|
|
216
|
+
deactivated: number;
|
|
217
|
+
};
|
|
218
|
+
site?: {
|
|
219
|
+
upserted: number;
|
|
220
|
+
deactivated: number;
|
|
221
|
+
};
|
|
222
|
+
};
|
|
223
|
+
}
|
|
224
|
+
interface AXESimproImportJobRequest {
|
|
225
|
+
remoteRecordId: string;
|
|
226
|
+
projectTypeId: string;
|
|
227
|
+
syncStrategy: AXEPMProjectSyncStrategy;
|
|
228
|
+
}
|
|
229
|
+
interface AXESimproImportJobResponse {
|
|
230
|
+
platformProjectId: string;
|
|
231
|
+
created: boolean;
|
|
232
|
+
}
|
|
233
|
+
interface AXESimproImportCustomerRequest {
|
|
234
|
+
remoteRecordId: string;
|
|
235
|
+
}
|
|
236
|
+
interface AXESimproImportCustomerResponse {
|
|
237
|
+
platformCustomerId: string;
|
|
238
|
+
created: boolean;
|
|
239
|
+
}
|
|
240
|
+
interface AXESimproSyncPlatformProjectRequest {
|
|
241
|
+
platformProjectId: string;
|
|
242
|
+
}
|
|
243
|
+
interface AXESimproConnectionLifecycleRequest {
|
|
244
|
+
connectionId: string;
|
|
245
|
+
action: 'connected' | 'disconnected' | 'deleted' | 'enabled' | 'disabled';
|
|
246
|
+
}
|
|
247
|
+
interface AXESimproConnectionLifecycleResponse {
|
|
248
|
+
ok: true;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
declare const AXE_SIMPRO_ERROR_CODES: {
|
|
252
|
+
readonly COMPANY_ID_ZERO_MULTI: "SIMPRO_COMPANY_ID_ZERO_MULTI";
|
|
253
|
+
readonly COMPANY_ID_INVALID: "SIMPRO_COMPANY_ID_INVALID";
|
|
254
|
+
};
|
|
255
|
+
type AXESimproErrorCode = (typeof AXE_SIMPRO_ERROR_CODES)[keyof typeof AXE_SIMPRO_ERROR_CODES];
|
|
256
|
+
/** Client i18n keys for known Simpro error codes. */
|
|
257
|
+
declare const AXE_SIMPRO_ERROR_I18N_KEYS: Record<AXESimproErrorCode, string>;
|
|
258
|
+
|
|
259
|
+
export { AXESimproCommandKeys, AXESimproMenuKeys, AXESimproPermissions, AXE_SIMPRO_ERROR_CODES, AXE_SIMPRO_ERROR_I18N_KEYS, AXPAdministrationPermissionKeys, RootConfig };
|
|
260
|
+
export type { AXESimproConnectionConfig, AXESimproConnectionLifecycleRequest, AXESimproConnectionLifecycleResponse, AXESimproErrorCode, AXESimproImportCustomerRequest, AXESimproImportCustomerResponse, AXESimproImportJobRequest, AXESimproImportJobResponse, AXESimproJobsSyncState, AXESimproOAuthCompleteRequest, AXESimproOAuthCompleteResponse, AXESimproOAuthStartRequest, AXESimproOAuthStartResponse, AXESimproOAuthValidateRequest, AXESimproOAuthValidateResponse, AXESimproPullJobsRequest, AXESimproPullJobsResponse, AXESimproRemoteAddress, AXESimproRemoteCustomer, AXESimproRemoteJob, AXESimproRemotePartyRef, AXESimproRemoteSite, AXESimproRemoteSitePrimaryContact, AXESimproSyncPlatformProjectRequest };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import * as i1 from '@acorex-platform/module-integration-management-client';
|
|
3
|
+
import { AXPLogoAppearance, AXPLogoProvider } from '@acorex-platform/framework-client/core';
|
|
4
|
+
|
|
5
|
+
declare class AXESimproExtensionModule {
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXESimproExtensionModule, never>;
|
|
7
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AXESimproExtensionModule, never, [typeof i1.AXMIntegrationManagementModule], never>;
|
|
8
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<AXESimproExtensionModule>;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
declare class AXESimproLogoComponent {
|
|
12
|
+
appearance: i0.InputSignal<AXPLogoAppearance>;
|
|
13
|
+
size: i0.InputSignal<number>;
|
|
14
|
+
protected readonly markPath = "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";
|
|
15
|
+
protected readonly markBlue = "#00338D";
|
|
16
|
+
protected readonly markGold = "#FFCC00";
|
|
17
|
+
protected readonly resolvedAppearance: i0.Signal<"colored" | "monochrome">;
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXESimproLogoComponent, never>;
|
|
19
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AXESimproLogoComponent, "axe-simpro-logo", never, { "appearance": { "alias": "appearance"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
declare const axpSimproLogoKey: "simpro";
|
|
23
|
+
|
|
24
|
+
declare const AXE_SIMPRO_MARK_BLUE = "#00338D";
|
|
25
|
+
declare const AXE_SIMPRO_MARK_GOLD = "#FFCC00";
|
|
26
|
+
declare 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";
|
|
27
|
+
|
|
28
|
+
declare const AXE_SIMPRO_LOGO_PROVIDER: {
|
|
29
|
+
readonly provide: i0.InjectionToken<AXPLogoProvider[]>;
|
|
30
|
+
readonly useValue: AXPLogoProvider;
|
|
31
|
+
readonly multi: true;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export { AXESimproExtensionModule, AXESimproLogoComponent, AXE_SIMPRO_LOGO_PROVIDER, AXE_SIMPRO_MARK_BLUE, AXE_SIMPRO_MARK_GOLD, AXE_SIMPRO_MARK_PATH, axpSimproLogoKey };
|