@acorex-platform/extension-bamboohr-client 0.0.37 → 0.0.46
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-bamboohr-client-connect-bamboohr.command-BzjrQHyc.mjs → acorex-platform-extension-bamboohr-client-connect-bamboohr.command-CEVcfXk6.mjs} +16 -2
- package/fesm2022/acorex-platform-extension-bamboohr-client-connect-bamboohr.command-CEVcfXk6.mjs.map +1 -0
- package/fesm2022/acorex-platform-extension-bamboohr-client-contracts.mjs +23 -1
- package/fesm2022/acorex-platform-extension-bamboohr-client-contracts.mjs.map +1 -1
- package/fesm2022/acorex-platform-extension-bamboohr-client.mjs +58 -16
- package/fesm2022/acorex-platform-extension-bamboohr-client.mjs.map +1 -1
- package/package.json +1 -1
- package/types/acorex-platform-extension-bamboohr-client-contracts.d.ts +81 -2
- package/fesm2022/acorex-platform-extension-bamboohr-client-connect-bamboohr.command-BzjrQHyc.mjs.map +0 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AXP_INTEGRATION_CONNECTION_STATUS, AXP_INTEGRATION_AUTH_METHOD_TYPE } from '@acorex-platform/framework-shared/core';
|
|
2
|
+
import { AXP_INTEGRATION_CONNECTION_ESTABLISHED } from '@acorex-platform/framework-client/common';
|
|
2
3
|
import { AXMIntegrationConnectionManager, hasConfiguredIntegrationCredentials, AXP_INTEGRATION_CREDENTIAL_MASK, isMaskedIntegrationCredential, toSafeIntegrationConnectionDto } from '@acorex-platform/module-integration-management-client';
|
|
3
4
|
import { AXPLayoutBuilderService, resolveLayoutBuilderDialogResult } from '@acorex-platform/framework-client/layout/builder';
|
|
4
5
|
import * as i0 from '@angular/core';
|
|
@@ -12,6 +13,7 @@ class ConnectBambooHRCommand {
|
|
|
12
13
|
constructor() {
|
|
13
14
|
this.layoutBuilder = inject(AXPLayoutBuilderService);
|
|
14
15
|
this.connectionManager = inject(AXMIntegrationConnectionManager);
|
|
16
|
+
this.establishedHandlers = inject(AXP_INTEGRATION_CONNECTION_ESTABLISHED, { optional: true });
|
|
15
17
|
}
|
|
16
18
|
async execute(input = {}) {
|
|
17
19
|
try {
|
|
@@ -70,8 +72,10 @@ class ConnectBambooHRCommand {
|
|
|
70
72
|
isRevoked: false,
|
|
71
73
|
isDisabled: false,
|
|
72
74
|
});
|
|
75
|
+
const safe = toSafeIntegrationConnectionDto(connection);
|
|
76
|
+
await this.dispatchEstablished(safe);
|
|
73
77
|
return { success: true, kind: 'object',
|
|
74
|
-
data: { outcome: 'connected', connection:
|
|
78
|
+
data: { outcome: 'connected', connection: safe },
|
|
75
79
|
};
|
|
76
80
|
}
|
|
77
81
|
catch (error) {
|
|
@@ -137,6 +141,15 @@ class ConnectBambooHRCommand {
|
|
|
137
141
|
.show();
|
|
138
142
|
return resolveLayoutBuilderDialogResult(result);
|
|
139
143
|
}
|
|
144
|
+
async dispatchEstablished(connection) {
|
|
145
|
+
const list = this.establishedHandlers ?? [];
|
|
146
|
+
for (const handler of list) {
|
|
147
|
+
const resolved = handler instanceof Promise ? await handler : handler;
|
|
148
|
+
if (resolved.providerId === connection.providerId) {
|
|
149
|
+
await resolved.onEstablished(connection);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
140
153
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ConnectBambooHRCommand, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
141
154
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ConnectBambooHRCommand, providedIn: 'root' }); }
|
|
142
155
|
}
|
|
@@ -144,6 +157,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
144
157
|
type: Injectable,
|
|
145
158
|
args: [{ providedIn: 'root' }]
|
|
146
159
|
}] });
|
|
160
|
+
//#endregion
|
|
147
161
|
function normalizeCompanyDomain(raw) {
|
|
148
162
|
const value = trim(raw).toLowerCase();
|
|
149
163
|
if (!value) {
|
|
@@ -167,4 +181,4 @@ function normalizeCompanyDomain(raw) {
|
|
|
167
181
|
}
|
|
168
182
|
|
|
169
183
|
export { ConnectBambooHRCommand };
|
|
170
|
-
//# sourceMappingURL=acorex-platform-extension-bamboohr-client-connect-bamboohr.command-
|
|
184
|
+
//# sourceMappingURL=acorex-platform-extension-bamboohr-client-connect-bamboohr.command-CEVcfXk6.mjs.map
|
package/fesm2022/acorex-platform-extension-bamboohr-client-connect-bamboohr.command-CEVcfXk6.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-extension-bamboohr-client-connect-bamboohr.command-CEVcfXk6.mjs","sources":["../../../../libs/extensions/bamboohr/client/src/lib/features/connect/connect-bamboohr.command.ts"],"sourcesContent":["//#region ----- Imports -----\n\nimport { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport {\n AXP_INTEGRATION_AUTH_METHOD_TYPE,\n AXP_INTEGRATION_CONNECTION_STATUS,\n type AXPIntegrationConnectionScope,\n type AXPSafeIntegrationConnectionDto,\n} from '@acorex-platform/framework-shared/core';\nimport { AXP_INTEGRATION_CONNECTION_ESTABLISHED } from '@acorex-platform/framework-client/common';\nimport {\n AXMIntegrationConnectionManager,\n AXP_INTEGRATION_CREDENTIAL_MASK,\n hasConfiguredIntegrationCredentials,\n isMaskedIntegrationCredential,\n toSafeIntegrationConnectionDto,\n type ConnectCommandResult,\n} from '@acorex-platform/module-integration-management-client';\nimport {\n AXPLayoutBuilderService,\n resolveLayoutBuilderDialogResult,\n type AXPDialogRef,\n type IActionBuilder,\n type IDialogBuilder,\n type IFlexContainerBuilder,\n} from '@acorex-platform/framework-client/layout/builder';\nimport { Injectable, inject } from '@angular/core';\nimport { defaultTo, trim } from 'lodash-es';\nimport {\n AXE_BAMBOOHR_PROVIDER_ID,\n RootConfig,\n type AXEBambooHRConnectionConfig,\n} from '@acorex-platform/extension-bamboohr-client/contracts';\n\n//#endregion\n\n//#region ----- Types -----\n\nexport interface ConnectBambooHRCommandInput {\n providerId?: string;\n connectionScope?: AXPIntegrationConnectionScope;\n}\n\ninterface BambooHRConnectFormContext {\n companyDomain: string;\n apiKey: string;\n}\n\ninterface BambooHRConnectFormResult {\n companyDomain: string;\n apiKey: string;\n}\n\n//#endregion\n\n//#region ----- Command -----\n\n@Injectable({ providedIn: 'root' })\nexport class ConnectBambooHRCommand implements AXPCommand<ConnectBambooHRCommandInput, ConnectCommandResult> {\n private readonly layoutBuilder = inject(AXPLayoutBuilderService);\n private readonly connectionManager = inject(AXMIntegrationConnectionManager);\n private readonly establishedHandlers = inject(AXP_INTEGRATION_CONNECTION_ESTABLISHED, { optional: true });\n\n async execute(input: ConnectBambooHRCommandInput = {}): AXPCommandExecuteResultPromise<ConnectCommandResult> {\n try {\n const providerId = input.providerId ?? AXE_BAMBOOHR_PROVIDER_ID;\n const connectionScope = input.connectionScope ?? 'tenant';\n const I18N = `@${RootConfig.config.i18n}:integration.connect`;\n const existing = await this.connectionManager.findByUniqueKey({\n providerId,\n connectionScope,\n connectionKey: 'default',\n });\n const isReconfigure = hasConfiguredIntegrationCredentials(existing);\n const existingConfig = (existing?.config ?? {}) as AXEBambooHRConnectionConfig;\n\n const form = await this.openConnectDialog({\n i18nPrefix: I18N,\n isReconfigure,\n context: {\n companyDomain: defaultTo(existingConfig.companyDomain, ''),\n apiKey: isReconfigure ? AXP_INTEGRATION_CREDENTIAL_MASK : '',\n },\n });\n\n if (!form) {\n return { success: true, kind: 'object', data: { outcome: 'cancelled' } };\n }\n\n let apiKey = trim(form.apiKey);\n if (isMaskedIntegrationCredential(apiKey) && existing) {\n apiKey = trim(existingConfig.apiKey ?? '');\n }\n\n const companyDomain = normalizeCompanyDomain(form.companyDomain);\n if (!companyDomain) {\n return {\n success: false,\n message: { text: `${I18N}.errors.company-domain-required` },\n };\n }\n if (!apiKey) {\n return {\n success: false,\n message: { text: `${I18N}.errors.api-key-required` },\n };\n }\n\n const connection = await this.connectionManager.upsertConnection({\n providerId,\n authMethodType: AXP_INTEGRATION_AUTH_METHOD_TYPE.ApiToken,\n connectionScope,\n connectionKey: 'default',\n displayName: existing?.displayName ?? 'BambooHR',\n instanceUrl: `https://${companyDomain}.bamboohr.com`,\n externalAccountName: `${companyDomain}.bamboohr.com`,\n config: {\n ...existingConfig,\n companyDomain,\n apiKey,\n } satisfies AXEBambooHRConnectionConfig,\n status: AXP_INTEGRATION_CONNECTION_STATUS.Connected,\n isRevoked: false,\n isDisabled: false,\n });\n\n const safe = toSafeIntegrationConnectionDto(connection);\n await this.dispatchEstablished(safe);\n\n return { success: true, kind: 'object',\n data: { outcome: 'connected', connection: safe },\n };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to connect BambooHR.';\n return { success: false, message: { text: message } };\n }\n }\n\n private async openConnectDialog(input: {\n i18nPrefix: string;\n isReconfigure: boolean;\n context: BambooHRConnectFormContext;\n }): Promise<BambooHRConnectFormResult | null> {\n const result = await this.layoutBuilder\n .create()\n .dialog<BambooHRConnectFormResult | null>((dialog: IDialogBuilder<BambooHRConnectFormResult | null>) => {\n dialog\n .setTitle(\n input.isReconfigure\n ? `${input.i18nPrefix}.api-token-dialog.configure-title`\n : `${input.i18nPrefix}.api-token-dialog.title`,\n )\n .setSize('md')\n .setCloseButton(true)\n .setContext({ ...input.context })\n .content((flex: IFlexContainerBuilder) => {\n flex\n .setDirection('column')\n .setGap('12px')\n .customWidget('text-block-layout', {\n content: `${input.i18nPrefix}.api-token-dialog.instructions`,\n })\n .formField(`${input.i18nPrefix}.api-token-dialog.fields.company-domain`, (field) => {\n field.path('companyDomain');\n field.textBox({\n placeholder: `${input.i18nPrefix}.api-token-dialog.placeholders.company-domain`,\n validations: [{ rule: 'required' }],\n });\n })\n .formField(`${input.i18nPrefix}.api-token-dialog.fields.api-key`, (field) => {\n field.path('apiKey');\n field.passwordBox({\n placeholder: `${input.i18nPrefix}.api-token-dialog.placeholders.api-key`,\n revealToggle: true,\n validations: [{ rule: 'required' }],\n });\n });\n })\n .setActions((actions: IActionBuilder) => {\n actions\n .cancel('@general:actions.cancel.title')\n .submit(`${input.i18nPrefix}.api-token-dialog.actions.save`);\n })\n .onAction(async (ref: AXPDialogRef) => {\n if (ref.action() === 'cancel') {\n return null;\n }\n const ctx = ref.context() as BambooHRConnectFormContext;\n const companyDomain = trim(ctx.companyDomain);\n const apiKey = trim(ctx.apiKey);\n if (!companyDomain) {\n throw new Error(`${input.i18nPrefix}.errors.company-domain-required`);\n }\n if (!apiKey) {\n throw new Error(`${input.i18nPrefix}.errors.api-key-required`);\n }\n return { companyDomain, apiKey };\n });\n })\n .show();\n\n return resolveLayoutBuilderDialogResult<BambooHRConnectFormResult>(result);\n }\n\n private async dispatchEstablished(connection: AXPSafeIntegrationConnectionDto): Promise<void> {\n const list = this.establishedHandlers ?? [];\n for (const handler of list) {\n const resolved = handler instanceof Promise ? await handler : handler;\n if (resolved.providerId === connection.providerId) {\n await resolved.onEstablished(connection);\n }\n }\n }\n}\n\n//#endregion\n\nfunction normalizeCompanyDomain(raw: string): string {\n const value = trim(raw).toLowerCase();\n if (!value) {\n return '';\n }\n try {\n if (value.includes('://')) {\n const host = new URL(value).hostname;\n return host.replace(/\\.bamboohr\\.com$/i, '').split('.')[0] ?? '';\n }\n } catch {\n // fall through\n }\n return value\n .replace(/^https?:\\/\\//i, '')\n .replace(/\\.bamboohr\\.com.*$/i, '')\n .replace(/\\/+$/, '')\n .split('/')[0]\n ?.split('.')[0] ?? '';\n}\n"],"names":[],"mappings":";;;;;;;;;AAqDA;AAEA;MAGa,sBAAsB,CAAA;AADnC,IAAA,WAAA,GAAA;AAEmB,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,uBAAuB,CAAC;AAC/C,QAAA,IAAA,CAAA,iBAAiB,GAAG,MAAM,CAAC,+BAA+B,CA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AC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE;QAClE;IACF;AAAE,IAAA,MAAM;;IAER;AACA,IAAA,OAAO;AACJ,SAAA,OAAO,CAAC,eAAe,EAAE,EAAE;AAC3B,SAAA,OAAO,CAAC,qBAAqB,EAAE,EAAE;AACjC,SAAA,OAAO,CAAC,MAAM,EAAE,EAAE;AAClB,SAAA,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;UACX,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE;AACzB;;"}
|
|
@@ -6,6 +6,8 @@ const MODULE_NAME = 'BambooHRExtension';
|
|
|
6
6
|
const PROVIDER_ID = 'bamboohr';
|
|
7
7
|
const DOMAIN_ID = 'human-capital';
|
|
8
8
|
const RESOURCE_EMPLOYEE = 'employee';
|
|
9
|
+
const RESOURCE_TRAINING_TYPE = 'training-type';
|
|
10
|
+
const RESOURCE_TRAINING = 'training';
|
|
9
11
|
const RootConfig = {
|
|
10
12
|
config,
|
|
11
13
|
module: {
|
|
@@ -17,19 +19,36 @@ const RootConfig = {
|
|
|
17
19
|
providerId: PROVIDER_ID,
|
|
18
20
|
domainId: DOMAIN_ID,
|
|
19
21
|
resourceEmployee: RESOURCE_EMPLOYEE,
|
|
22
|
+
resourceTrainingType: RESOURCE_TRAINING_TYPE,
|
|
23
|
+
resourceTraining: RESOURCE_TRAINING,
|
|
20
24
|
},
|
|
21
25
|
};
|
|
22
26
|
const AXE_BAMBOOHR_DOMAIN_ID = DOMAIN_ID;
|
|
23
27
|
const AXE_BAMBOOHR_PROVIDER_ID = PROVIDER_ID;
|
|
24
28
|
const AXE_BAMBOOHR_RESOURCE_EMPLOYEE = RESOURCE_EMPLOYEE;
|
|
29
|
+
const AXE_BAMBOOHR_RESOURCE_TRAINING_TYPE = RESOURCE_TRAINING_TYPE;
|
|
30
|
+
const AXE_BAMBOOHR_RESOURCE_TRAINING = RESOURCE_TRAINING;
|
|
25
31
|
//#endregion
|
|
26
32
|
|
|
33
|
+
const BambooHRExtensionManifest = {
|
|
34
|
+
name: RootConfig.module.name,
|
|
35
|
+
version: '1.0.0',
|
|
36
|
+
title: RootConfig.module.title,
|
|
37
|
+
icon: RootConfig.module.icon,
|
|
38
|
+
i18n: RootConfig.config.i18n,
|
|
39
|
+
type: 'integration',
|
|
40
|
+
domain: 'human-capital',
|
|
41
|
+
dependencies: [],
|
|
42
|
+
};
|
|
43
|
+
|
|
27
44
|
//#region ----- Command Keys -----
|
|
28
45
|
const AXEBambooHRCommandKeys = {
|
|
29
46
|
ConnectionConnect: 'bamboohr-extension.Connection:Connect',
|
|
30
47
|
ConnectionValidate: 'bamboohr-extension.Connection:Validate',
|
|
48
|
+
ConnectionLifecycle: 'bamboohr-extension.Connection:Lifecycle',
|
|
31
49
|
EmployeeSyncFromBambooHR: 'bamboohr-extension.Employee:SyncFromBambooHR',
|
|
32
50
|
EmployeeSync: 'bamboohr-extension.Employee:Sync',
|
|
51
|
+
RecordsPull: 'bamboohr-extension.records.pull',
|
|
33
52
|
};
|
|
34
53
|
//#endregion
|
|
35
54
|
|
|
@@ -103,9 +122,12 @@ const AXE_BAMBOOHR_EMPLOYEE_SYNC_STRATEGIES = [
|
|
|
103
122
|
//#region ----- BambooHR employee sync API DTOs -----
|
|
104
123
|
//#endregion
|
|
105
124
|
|
|
125
|
+
//#region ----- BambooHR remote pull (IntegrationRemoteRecord cache) -----
|
|
126
|
+
//#endregion
|
|
127
|
+
|
|
106
128
|
/**
|
|
107
129
|
* Generated bundle index. Do not edit.
|
|
108
130
|
*/
|
|
109
131
|
|
|
110
|
-
export { AXEBambooHRCommandKeys, AXEBambooHRExtensionSettings, AXEBambooHRMenuKeys, AXEBambooHRPermissions, AXE_BAMBOOHR_DOMAIN_ID, AXE_BAMBOOHR_EMPLOYEE_SYNC_STRATEGIES, AXE_BAMBOOHR_PROVIDER_ID, AXE_BAMBOOHR_RESOURCE_EMPLOYEE, AXPAdministrationPermissionKeys, RootConfig };
|
|
132
|
+
export { AXEBambooHRCommandKeys, AXEBambooHRExtensionSettings, AXEBambooHRMenuKeys, AXEBambooHRPermissions, AXE_BAMBOOHR_DOMAIN_ID, AXE_BAMBOOHR_EMPLOYEE_SYNC_STRATEGIES, AXE_BAMBOOHR_PROVIDER_ID, AXE_BAMBOOHR_RESOURCE_EMPLOYEE, AXE_BAMBOOHR_RESOURCE_TRAINING, AXE_BAMBOOHR_RESOURCE_TRAINING_TYPE, AXPAdministrationPermissionKeys, BambooHRExtensionManifest, RootConfig };
|
|
111
133
|
//# sourceMappingURL=acorex-platform-extension-bamboohr-client-contracts.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-extension-bamboohr-client-contracts.mjs","sources":["../../../../libs/extensions/bamboohr/contracts/src/root-config.ts","../../../../libs/extensions/bamboohr/contracts/src/commands.keys.ts","../../../../libs/extensions/bamboohr/contracts/src/menu.keys.ts","../../../../libs/extensions/bamboohr/contracts/src/permission.keys.ts","../../../../libs/extensions/bamboohr/contracts/src/settings.keys.ts","../../../../libs/extensions/bamboohr/contracts/src/connection.types.ts","../../../../libs/extensions/bamboohr/contracts/src/employee-sync.api.types.ts","../../../../libs/extensions/bamboohr/contracts/src/acorex-platform-extension-bamboohr-client-contracts.ts"],"sourcesContent":["//#region ----- Module Config -----\n\nconst config = {\n i18n: 'extensions-bamboohr',\n};\n\nconst MODULE_NAME = 'BambooHRExtension';\nconst PROVIDER_ID = 'bamboohr';\nconst DOMAIN_ID = 'human-capital';\nconst RESOURCE_EMPLOYEE = 'employee';\n\nexport const RootConfig = {\n config,\n module: {\n name: MODULE_NAME,\n title: `@${config.i18n}:integration.display-name`,\n icon: 'fa-light fa-users',\n },\n integration: {\n providerId: PROVIDER_ID,\n domainId: DOMAIN_ID,\n resourceEmployee: RESOURCE_EMPLOYEE,\n },\n};\n\nexport const AXE_BAMBOOHR_DOMAIN_ID = DOMAIN_ID;\nexport const AXE_BAMBOOHR_PROVIDER_ID = PROVIDER_ID;\nexport const AXE_BAMBOOHR_RESOURCE_EMPLOYEE = RESOURCE_EMPLOYEE;\n\n//#endregion\n","//#region ----- Command Keys -----\n\nexport const AXEBambooHRCommandKeys = {\n ConnectionConnect: 'bamboohr-extension.Connection:Connect',\n ConnectionValidate: 'bamboohr-extension.Connection:Validate',\n EmployeeSyncFromBambooHR: 'bamboohr-extension.Employee:SyncFromBambooHR',\n EmployeeSync: 'bamboohr-extension.Employee:Sync',\n} as const;\n\n//#endregion\n","//#region ----- Menu Keys -----\n\nexport const AXEBambooHRMenuKeys = {\n BambooHRExtensionConfig: 'bamboohr-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 AXEBambooHRPermissions = {\n BambooHRExtension: {\n Management: AXPAdministrationPermissionKeys.MaintainConnections,\n Catalog: {\n View: AXPAdministrationPermissionKeys.ViewIntegrations,\n },\n EmployeeImport: {\n Execute: AXPAdministrationPermissionKeys.ManageIntegrationActions,\n },\n EmployeeSync: {\n Execute: AXPAdministrationPermissionKeys.ManageIntegrationActions,\n },\n },\n} as const;\n\n//#endregion\n","//#region ----- Setting Keys -----\n\nimport { RootConfig } from './root-config';\n\nconst moduleKey = RootConfig.module.name;\n\nexport const AXEBambooHRExtensionSettings = {\n ConnectionsPanel: `${moduleKey}:Setting:ConnectionsPanel`,\n} as const;\n\n//#endregion\n","//#region ----- BambooHR tenant connection config -----\n\n/** Stored on IntegrationManagement connection `config` for tenant-scoped BambooHR. */\nexport interface AXEBambooHRConnectionConfig {\n /** Company subdomain (e.g. `acme` for acme.bamboohr.com). */\n companyDomain?: string;\n /** BambooHR API key (Basic auth username). */\n apiKey?: string;\n /** Optional default employment type id for imported employees. */\n defaultEmploymentTypeId?: string;\n /** Default sync strategy for new links. */\n defaultSyncStrategy?: AXEBambooHREmployeeSyncStrategy;\n employeesSync?: AXEBambooHREmployeesSyncState;\n}\n\nexport interface AXEBambooHREmployeesSyncState {\n lastSyncAt?: string;\n}\n\nexport type AXEBambooHREmployeeSyncStrategy = 'remoteOverride' | 'localOverride' | 'merge';\n\nexport const AXE_BAMBOOHR_EMPLOYEE_SYNC_STRATEGIES: readonly AXEBambooHREmployeeSyncStrategy[] = [\n 'merge',\n 'remoteOverride',\n 'localOverride',\n] as const;\n\n//#endregion\n","//#region ----- BambooHR employee sync API DTOs -----\n\nimport type { AXEBambooHREmployeeSyncStrategy } from './connection.types';\n\n/** Subset of BambooHR employee fields used for platform mapping. */\nexport interface AXEBambooHRRemoteEmployee {\n id: string;\n firstName?: string;\n lastName?: string;\n middleName?: string;\n displayName?: string;\n preferredName?: string;\n workEmail?: string;\n homeEmail?: string;\n mobilePhone?: string;\n workPhone?: string;\n homePhone?: string;\n hireDate?: string;\n employeeNumber?: string;\n jobTitle?: string;\n department?: string;\n division?: string;\n location?: string;\n employmentHistoryStatus?: string;\n status?: string;\n supervisorId?: string;\n supervisorEId?: string;\n supervisor?: string;\n birthday?: string;\n gender?: string;\n maritalStatus?: string;\n address1?: string;\n address2?: string;\n city?: string;\n state?: string;\n country?: string;\n zipcode?: string;\n terminationDate?: string;\n [key: string]: unknown;\n}\n\nexport interface AXEBambooHRValidateConnectionRequest {\n companyDomain?: string;\n apiKey?: string;\n}\n\nexport interface AXEBambooHRValidateConnectionResponse {\n valid: boolean;\n message?: string;\n companyDomain?: string;\n}\n\nexport interface AXEBambooHRSyncEmployeesRequest {\n /** When true, overwrite linked employees even with localOverride strategy for missing remotes is unchanged. */\n force?: boolean;\n syncStrategy?: AXEBambooHREmployeeSyncStrategy;\n defaultEmploymentTypeId?: string;\n}\n\nexport interface AXEBambooHRSyncEmployeesResponse {\n created: number;\n updated: number;\n skipped: number;\n errors: Array<{ remoteId: string; message: string }>;\n lastSyncAt: string;\n}\n\nexport interface AXEBambooHRSyncPlatformEmployeeRequest {\n platformEmployeeId: string;\n}\n\nexport interface AXEBambooHRSyncPlatformEmployeeResponse {\n synced: true;\n platformEmployeeId: string;\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,qBAAqB;CAC5B;AAED,MAAM,WAAW,GAAG,mBAAmB;AACvC,MAAM,WAAW,GAAG,UAAU;AAC9B,MAAM,SAAS,GAAG,eAAe;AACjC,MAAM,iBAAiB,GAAG,UAAU;AAE7B,MAAM,UAAU,GAAG;IACxB,MAAM;AACN,IAAA,MAAM,EAAE;AACN,QAAA,IAAI,EAAE,WAAW;AACjB,QAAA,KAAK,EAAE,CAAA,CAAA,E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A6C;AAChE,IAAA,qBAAqB,EAAE,iDAAiD;;AAG1E;;;AAGG;AACI,MAAM,sBAAsB,GAAG;AACpC,IAAA,iBAAiB,EAAE;QACjB,UAAU,EAAE,+BAA+B,CAAC,mBAAmB;AAC/D,QAAA,OAAO,EAAE;YACP,IAAI,EAAE,+BAA+B,CAAC,gBAAgB;AACvD,SAAA;AACD,QAAA,cAAc,EAAE;YACd,OAAO,EAAE,+BAA+B,CAAC,wBAAwB;AAClE,SAAA;AACD,QAAA,YAAY,EAAE;YACZ,OAAO,EAAE,+BAA+B,CAAC,wBAAwB;AAClE,SAAA;AACF,KAAA;;AAGH;;AC/CA;AAIA,MAAM,SAAS,GAAG,UAAU,CAAC,MAAM,CAAC,IAAI;AAEjC,MAAM,4BAA4B,GAAG;IAC1C,gBAAgB,EAAE,CAAA,EAAG,SAAS,CAAA,yBAAA,CAA2B;;AAG3D;;ACVA;AAqBO,MAAM,qCAAqC,GAA+C;IAC/F,OAAO;IACP,gBAAgB;IAChB,eAAe;;AAGjB;;AC3BA;AA4EA;;AC5EA;;AAEG;;"}
|
|
1
|
+
{"version":3,"file":"acorex-platform-extension-bamboohr-client-contracts.mjs","sources":["../../../../libs/extensions/bamboohr/contracts/src/root-config.ts","../../../../libs/extensions/bamboohr/contracts/src/manifest.ts","../../../../libs/extensions/bamboohr/contracts/src/commands.keys.ts","../../../../libs/extensions/bamboohr/contracts/src/menu.keys.ts","../../../../libs/extensions/bamboohr/contracts/src/permission.keys.ts","../../../../libs/extensions/bamboohr/contracts/src/settings.keys.ts","../../../../libs/extensions/bamboohr/contracts/src/connection.types.ts","../../../../libs/extensions/bamboohr/contracts/src/employee-sync.api.types.ts","../../../../libs/extensions/bamboohr/contracts/src/remote-pull.api.types.ts","../../../../libs/extensions/bamboohr/contracts/src/acorex-platform-extension-bamboohr-client-contracts.ts"],"sourcesContent":["//#region ----- Module Config -----\n\nconst config = {\n i18n: 'extensions-bamboohr',\n};\n\nconst MODULE_NAME = 'BambooHRExtension';\nconst PROVIDER_ID = 'bamboohr';\nconst DOMAIN_ID = 'human-capital';\nconst RESOURCE_EMPLOYEE = 'employee';\nconst RESOURCE_TRAINING_TYPE = 'training-type';\nconst RESOURCE_TRAINING = 'training';\n\nexport const RootConfig = {\n config,\n module: {\n name: MODULE_NAME,\n title: `@${config.i18n}:integration.display-name`,\n icon: 'fa-light fa-users',\n },\n integration: {\n providerId: PROVIDER_ID,\n domainId: DOMAIN_ID,\n resourceEmployee: RESOURCE_EMPLOYEE,\n resourceTrainingType: RESOURCE_TRAINING_TYPE,\n resourceTraining: RESOURCE_TRAINING,\n },\n};\n\nexport const AXE_BAMBOOHR_DOMAIN_ID = DOMAIN_ID;\nexport const AXE_BAMBOOHR_PROVIDER_ID = PROVIDER_ID;\nexport const AXE_BAMBOOHR_RESOURCE_EMPLOYEE = RESOURCE_EMPLOYEE;\nexport const AXE_BAMBOOHR_RESOURCE_TRAINING_TYPE = RESOURCE_TRAINING_TYPE;\nexport const AXE_BAMBOOHR_RESOURCE_TRAINING = RESOURCE_TRAINING;\n\n//#endregion\n","\nimport { AXPModuleManifest } from '@acorex-platform/framework-shared/core';\nimport { RootConfig } from './root-config';\n\nexport const BambooHRExtensionManifest: 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: 'human-capital',\n dependencies: [],\n};\n","//#region ----- Command Keys -----\n\nexport const AXEBambooHRCommandKeys = {\n ConnectionConnect: 'bamboohr-extension.Connection:Connect',\n ConnectionValidate: 'bamboohr-extension.Connection:Validate',\n ConnectionLifecycle: 'bamboohr-extension.Connection:Lifecycle',\n EmployeeSyncFromBambooHR: 'bamboohr-extension.Employee:SyncFromBambooHR',\n EmployeeSync: 'bamboohr-extension.Employee:Sync',\n RecordsPull: 'bamboohr-extension.records.pull',\n} as const;\n\n//#endregion\n","//#region ----- Menu Keys -----\n\nexport const AXEBambooHRMenuKeys = {\n BambooHRExtensionConfig: 'bamboohr-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 AXEBambooHRPermissions = {\n BambooHRExtension: {\n Management: AXPAdministrationPermissionKeys.MaintainConnections,\n Catalog: {\n View: AXPAdministrationPermissionKeys.ViewIntegrations,\n },\n EmployeeImport: {\n Execute: AXPAdministrationPermissionKeys.ManageIntegrationActions,\n },\n EmployeeSync: {\n Execute: AXPAdministrationPermissionKeys.ManageIntegrationActions,\n },\n },\n} as const;\n\n//#endregion\n","//#region ----- Setting Keys -----\n\nimport { RootConfig } from './root-config';\n\nconst moduleKey = RootConfig.module.name;\n\nexport const AXEBambooHRExtensionSettings = {\n ConnectionsPanel: `${moduleKey}:Setting:ConnectionsPanel`,\n} as const;\n\n//#endregion\n","//#region ----- BambooHR tenant connection config -----\n\n/** Stored on IntegrationManagement connection `config` for tenant-scoped BambooHR. */\nexport interface AXEBambooHRConnectionConfig {\n /** Company subdomain (e.g. `acme` for acme.bamboohr.com). */\n companyDomain?: string;\n /** BambooHR API key (Basic auth username). */\n apiKey?: string;\n /** Optional default employment type id for imported employees. */\n defaultEmploymentTypeId?: string;\n /** Default sync strategy for new links. */\n defaultSyncStrategy?: AXEBambooHREmployeeSyncStrategy;\n employeesSync?: AXEBambooHREmployeesSyncState;\n}\n\nexport interface AXEBambooHREmployeesSyncState {\n lastSyncAt?: string;\n}\n\nexport type AXEBambooHREmployeeSyncStrategy = 'remoteOverride' | 'localOverride' | 'merge';\n\nexport const AXE_BAMBOOHR_EMPLOYEE_SYNC_STRATEGIES: readonly AXEBambooHREmployeeSyncStrategy[] = [\n 'merge',\n 'remoteOverride',\n 'localOverride',\n] as const;\n\n//#endregion\n","//#region ----- BambooHR employee sync API DTOs -----\n\nimport type { AXEBambooHREmployeeSyncStrategy } from './connection.types';\n\n/** Subset of BambooHR employee fields used for platform mapping. */\nexport interface AXEBambooHRRemoteEmployee {\n id: string;\n firstName?: string;\n lastName?: string;\n middleName?: string;\n displayName?: string;\n preferredName?: string;\n workEmail?: string;\n homeEmail?: string;\n mobilePhone?: string;\n workPhone?: string;\n homePhone?: string;\n hireDate?: string;\n employeeNumber?: string;\n jobTitle?: string;\n department?: string;\n division?: string;\n location?: string;\n employmentHistoryStatus?: string;\n status?: string;\n supervisorId?: string;\n supervisorEId?: string;\n supervisor?: string;\n birthday?: string;\n gender?: string;\n maritalStatus?: string;\n address1?: string;\n address2?: string;\n city?: string;\n state?: string;\n country?: string;\n zipcode?: string;\n terminationDate?: string;\n [key: string]: unknown;\n}\n\nexport interface AXEBambooHRValidateConnectionRequest {\n companyDomain?: string;\n apiKey?: string;\n}\n\nexport interface AXEBambooHRValidateConnectionResponse {\n valid: boolean;\n message?: string;\n companyDomain?: string;\n}\n\nexport interface AXEBambooHRSyncEmployeesRequest {\n /** When true, overwrite linked employees even with localOverride strategy for missing remotes is unchanged. */\n force?: boolean;\n syncStrategy?: AXEBambooHREmployeeSyncStrategy;\n defaultEmploymentTypeId?: string;\n}\n\nexport interface AXEBambooHRSyncEmployeesResponse {\n created: number;\n updated: number;\n skipped: number;\n errors: Array<{ remoteId: string; message: string }>;\n lastSyncAt: string;\n}\n\nexport interface AXEBambooHRSyncPlatformEmployeeRequest {\n platformEmployeeId: string;\n}\n\nexport interface AXEBambooHRSyncPlatformEmployeeResponse {\n synced: true;\n platformEmployeeId: string;\n}\n\n//#endregion\n","//#region ----- BambooHR remote pull (IntegrationRemoteRecord cache) -----\n\n/** Directory employee fields kept in IntegrationRemoteRecord.payloadJson. */\nexport interface AXEBambooHRDirectoryEmployee {\n id: string;\n displayName?: string;\n firstName?: string;\n lastName?: string;\n gender?: string;\n jobTitle?: string;\n workPhone?: string;\n location?: string;\n mobilePhone?: string;\n workEmail?: string;\n supervisor?: string;\n department?: string;\n status?: string;\n employeenumber?: string;\n}\n\nexport interface AXEBambooHRRemoteTrainingTypeCategory {\n id?: string;\n name?: string;\n}\n\nexport interface AXEBambooHRRemoteTrainingType {\n id: string;\n name?: string;\n category?: AXEBambooHRRemoteTrainingTypeCategory;\n linkUrl?: string;\n description?: string;\n}\n\nexport interface AXEBambooHRRemoteTraining {\n id: string;\n employeeId?: string;\n completed?: string;\n notes?: string;\n instructor?: string;\n hours?: number | string;\n credits?: number | string;\n cost?: number | string;\n}\n\nexport interface AXEBambooHRPullRecordsRequest {\n /** When set, pulls for this BambooHR connection (required for per-connection schedules). */\n connectionId?: string;\n}\n\nexport interface AXEBambooHRPullRecordsResponse {\n upserted: number;\n deactivated: number;\n byResourceType?: {\n employee?: { upserted: number; deactivated: number };\n 'training-type'?: { upserted: number; deactivated: number };\n training?: { upserted: number; deactivated: number };\n };\n}\n\nexport type AXEBambooHRConnectionLifecycleAction =\n | 'connected'\n | 'disconnected'\n | 'deleted'\n | 'enabled'\n | 'disabled';\n\nexport interface AXEBambooHRConnectionLifecycleRequest {\n connectionId: string;\n action: AXEBambooHRConnectionLifecycleAction;\n}\n\nexport interface AXEBambooHRConnectionLifecycleResponse {\n ok: true;\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,qBAAqB;CAC5B;AAED,MAAM,WAAW,GAAG,mBAAmB;AACvC,MAAM,WAAW,GAAG,UAAU;AAC9B,MAAM,SAAS,GAAG,eAAe;AACjC,MAAM,iBAAiB,GAAG,UAAU;AACpC,MAAM,sBAAsB,GAAG,eAAe;AAC9C,MAAM,iBAAiB,GAAG,UAAU;AAE7B,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,mBAAmB;AAC1B,KAAA;AACD,IAAA,WAAW,EAAE;AACX,QAAA,UAAU,EAAE,WAAW;AACvB,QAAA,QAAQ,EAAE,SAAS;AACnB,QAAA,gBAAgB,EAAE,iBAAiB;AACnC,QAAA,oBAAoB,EAAE,sBAAsB;AAC5C,QAAA,gBAAgB,EAAE,iBAAiB;AACpC,KAAA;;AAGI,MAAM,sBAAsB,GAAG;AAC/B,MAAM,wBAAwB,GAAG;AACjC,MAAM,8BAA8B,GAAG;AACvC,MAAM,mCAAmC,GAAG;AAC5C,MAAM,8BAA8B,GAAG;AAE9C;;AC/BO,MAAM,yBAAyB,GAAsB;AAC1D,IAAA,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,IAAI;AAC5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AAE,4CAA4C;AAC9D,IAAA,iBAAiB,EAAE,6CAA6C;AAChE,IAAA,qBAAqB,EAAE,iDAAiD;;AAG1E;;;AAGG;AACI,MAAM,sBAAsB,GAAG;AACpC,IAAA,iBAAiB,EAAE;QACjB,UAAU,EAAE,+BAA+B,CAAC,mBAAmB;AAC/D,QAAA,OAAO,EAAE;YACP,IAAI,EAAE,+BAA+B,CAAC,gBAAgB;AACvD,SAAA;AACD,QAAA,cAAc,EAAE;YACd,OAAO,EAAE,+BAA+B,CAAC,wBAAwB;AAClE,SAAA;AACD,QAAA,YAAY,EAAE;YACZ,OAAO,EAAE,+BAA+B,CAAC,wBAAwB;AAClE,SAAA;AACF,KAAA;;AAGH;;AC/CA;AAIA,MAAM,SAAS,GAAG,UAAU,CAAC,MAAM,CAAC,IAAI;AAEjC,MAAM,4BAA4B,GAAG;IAC1C,gBAAgB,EAAE,CAAA,EAAG,SAAS,CAAA,yBAAA,CAA2B;;AAG3D;;ACVA;AAqBO,MAAM,qCAAqC,GAA+C;IAC/F,OAAO;IACP,gBAAgB;IAChB,eAAe;;AAGjB;;AC3BA;AA4EA;;AC5EA;AA2EA;;AC3EA;;AAEG;;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AXMIntegrationManagementModule } from '@acorex-platform/module-integration-management-client';
|
|
2
|
-
import { AXPIntegrationRuntimeService, AXP_INTEGRATION_SECRET_STORE, AXP_INTEGRATION_RUNTIME_PROVIDER, AXP_SETTING_DEFINITION_PROVIDER, AXP_MENU_PROVIDER, AXP_INTEGRATION_DOMAIN_PROVIDER, AXP_INTEGRATION_PROVIDER } from '@acorex-platform/framework-client/common';
|
|
3
|
-
import { AXP_LOGO_PROVIDER,
|
|
2
|
+
import { AXPIntegrationRuntimeService, AXP_INTEGRATION_SECRET_STORE, AXP_INTEGRATION_RUNTIME_PROVIDER, AXP_INTEGRATION_CONNECTION_LIFECYCLE, AXP_INTEGRATION_CONNECTION_ESTABLISHED, AXP_SETTING_DEFINITION_PROVIDER, AXP_MENU_PROVIDER, AXP_INTEGRATION_DOMAIN_PROVIDER, AXP_INTEGRATION_PROVIDER } from '@acorex-platform/framework-client/common';
|
|
3
|
+
import { AXP_LOGO_PROVIDER, AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER } from '@acorex-platform/framework-client/core';
|
|
4
4
|
import { AXPEntityService, ensureListActions, actionExists, AXP_ENTITY_MODIFIER } from '@acorex-platform/framework-client/layout/entity';
|
|
5
|
-
import { provideCommandSetups } from '@acorex-platform/framework-client/runtime';
|
|
5
|
+
import { 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
8
|
import { AXE_BAMBOOHR_PROVIDER_ID, AXEBambooHRCommandKeys, RootConfig as RootConfig$1, AXE_BAMBOOHR_DOMAIN_ID, AXPAdministrationPermissionKeys, AXEBambooHRMenuKeys } from '@acorex-platform/extension-bamboohr-client/contracts';
|
|
@@ -239,15 +239,55 @@ const provideBambooHRIntegrationRuntimeProvider = {
|
|
|
239
239
|
multi: true,
|
|
240
240
|
};
|
|
241
241
|
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
242
|
+
//#region ----- Imports -----
|
|
243
|
+
//#endregion
|
|
244
|
+
//#region ----- Handler -----
|
|
245
|
+
class AXEBambooHRConnectionLifecycleHandler {
|
|
246
|
+
constructor() {
|
|
247
|
+
this.providerId = AXE_BAMBOOHR_PROVIDER_ID;
|
|
248
|
+
this.commandService = inject(AXPCommandService);
|
|
249
|
+
}
|
|
250
|
+
async onEstablished(connection) {
|
|
251
|
+
if (connection.status === AXP_INTEGRATION_CONNECTION_STATUS.Connected) {
|
|
252
|
+
await this.runLifecycle(connection.id, 'connected');
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
async onDisconnected(connection) {
|
|
256
|
+
await this.runLifecycle(connection.id, 'disconnected');
|
|
257
|
+
}
|
|
258
|
+
async onDeleted(connection) {
|
|
259
|
+
await this.runLifecycle(connection.id, 'deleted');
|
|
260
|
+
}
|
|
261
|
+
async onEnabledChanged(connection, enabled) {
|
|
262
|
+
if (enabled) {
|
|
263
|
+
if (connection.status === AXP_INTEGRATION_CONNECTION_STATUS.Connected) {
|
|
264
|
+
await this.runLifecycle(connection.id, 'enabled');
|
|
265
|
+
}
|
|
266
|
+
return;
|
|
267
|
+
}
|
|
268
|
+
await this.runLifecycle(connection.id, 'disabled');
|
|
269
|
+
}
|
|
270
|
+
async runLifecycle(connectionId, action) {
|
|
271
|
+
await this.commandService.execute(AXEBambooHRCommandKeys.ConnectionLifecycle, {
|
|
272
|
+
connectionId,
|
|
273
|
+
action,
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXEBambooHRConnectionLifecycleHandler, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
277
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXEBambooHRConnectionLifecycleHandler }); }
|
|
278
|
+
}
|
|
279
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXEBambooHRConnectionLifecycleHandler, decorators: [{
|
|
280
|
+
type: Injectable
|
|
281
|
+
}] });
|
|
282
|
+
const provideBambooHRConnectionLifecycleHandler = {
|
|
283
|
+
provide: AXP_INTEGRATION_CONNECTION_LIFECYCLE,
|
|
284
|
+
useClass: AXEBambooHRConnectionLifecycleHandler,
|
|
285
|
+
multi: true,
|
|
286
|
+
};
|
|
287
|
+
const provideBambooHRConnectionEstablishedHandler = {
|
|
288
|
+
provide: AXP_INTEGRATION_CONNECTION_ESTABLISHED,
|
|
289
|
+
useClass: AXEBambooHRConnectionLifecycleHandler,
|
|
290
|
+
multi: true,
|
|
251
291
|
};
|
|
252
292
|
|
|
253
293
|
//#region ----- Imports -----
|
|
@@ -326,7 +366,6 @@ class AXEBambooHRExtensionModule {
|
|
|
326
366
|
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.8", ngImport: i0, type: AXEBambooHRExtensionModule, imports: [AXMIntegrationManagementModule] }); }
|
|
327
367
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXEBambooHRExtensionModule, providers: [
|
|
328
368
|
AXE_BAMBOOHR_LOGO_PROVIDER,
|
|
329
|
-
{ provide: AXP_MODULE_MANIFEST_PROVIDER, useValue: BambooHRExtensionManifest, multi: true },
|
|
330
369
|
{ provide: AXP_MENU_PROVIDER, useClass: AXEBambooHRMenuProvider, multi: true },
|
|
331
370
|
{ provide: AXP_ENTITY_MODIFIER, useValue: AXEBambooHREmployeeEntityModifier, multi: true },
|
|
332
371
|
{
|
|
@@ -341,11 +380,13 @@ class AXEBambooHRExtensionModule {
|
|
|
341
380
|
},
|
|
342
381
|
{ provide: AXP_INTEGRATION_PROVIDER, useClass: AXEBambooHRIntegrationProvider, multi: true },
|
|
343
382
|
provideBambooHRIntegrationRuntimeProvider,
|
|
383
|
+
provideBambooHRConnectionLifecycleHandler,
|
|
384
|
+
provideBambooHRConnectionEstablishedHandler,
|
|
344
385
|
provideBambooHRSettingsProvider,
|
|
345
386
|
provideCommandSetups([
|
|
346
387
|
{
|
|
347
388
|
key: AXEBambooHRCommandKeys.ConnectionConnect,
|
|
348
|
-
command: () => import('./acorex-platform-extension-bamboohr-client-connect-bamboohr.command-
|
|
389
|
+
command: () => import('./acorex-platform-extension-bamboohr-client-connect-bamboohr.command-CEVcfXk6.mjs').then((c) => c.ConnectBambooHRCommand),
|
|
349
390
|
},
|
|
350
391
|
]),
|
|
351
392
|
], imports: [AXMIntegrationManagementModule] }); }
|
|
@@ -356,7 +397,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
356
397
|
imports: [AXMIntegrationManagementModule],
|
|
357
398
|
providers: [
|
|
358
399
|
AXE_BAMBOOHR_LOGO_PROVIDER,
|
|
359
|
-
{ provide: AXP_MODULE_MANIFEST_PROVIDER, useValue: BambooHRExtensionManifest, multi: true },
|
|
360
400
|
{ provide: AXP_MENU_PROVIDER, useClass: AXEBambooHRMenuProvider, multi: true },
|
|
361
401
|
{ provide: AXP_ENTITY_MODIFIER, useValue: AXEBambooHREmployeeEntityModifier, multi: true },
|
|
362
402
|
{
|
|
@@ -371,11 +411,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
371
411
|
},
|
|
372
412
|
{ provide: AXP_INTEGRATION_PROVIDER, useClass: AXEBambooHRIntegrationProvider, multi: true },
|
|
373
413
|
provideBambooHRIntegrationRuntimeProvider,
|
|
414
|
+
provideBambooHRConnectionLifecycleHandler,
|
|
415
|
+
provideBambooHRConnectionEstablishedHandler,
|
|
374
416
|
provideBambooHRSettingsProvider,
|
|
375
417
|
provideCommandSetups([
|
|
376
418
|
{
|
|
377
419
|
key: AXEBambooHRCommandKeys.ConnectionConnect,
|
|
378
|
-
command: () => import('./acorex-platform-extension-bamboohr-client-connect-bamboohr.command-
|
|
420
|
+
command: () => import('./acorex-platform-extension-bamboohr-client-connect-bamboohr.command-CEVcfXk6.mjs').then((c) => c.ConnectBambooHRCommand),
|
|
379
421
|
},
|
|
380
422
|
]),
|
|
381
423
|
],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-extension-bamboohr-client.mjs","sources":["../../../../libs/extensions/bamboohr/client/src/lib/features/human-capital/bamboohr-expression-scope.ts","../../../../libs/extensions/bamboohr/client/src/lib/features/human-capital/bamboohr-employee-link-expression-evaluator-scope.provider.ts","../../../../libs/extensions/bamboohr/client/src/lib/features/human-capital/employee-bamboohr.entity-modifier.ts","../../../../libs/extensions/bamboohr/client/src/lib/integration/human-capital.integration-domain.provider.ts","../../../../libs/extensions/bamboohr/client/src/lib/brand/bamboohr-logo-key.ts","../../../../libs/extensions/bamboohr/client/src/lib/integration/bamboohr.integration.provider.ts","../../../../libs/extensions/bamboohr/client/src/lib/integration/bamboohr.integration-runtime.provider.ts","../../../../libs/extensions/bamboohr/client/src/lib/manifest.ts","../../../../libs/extensions/bamboohr/client/src/lib/menu.provider.ts","../../../../libs/extensions/bamboohr/client/src/lib/settings.provider.ts","../../../../libs/extensions/bamboohr/client/src/lib/brand/bamboohr-logo.provider.ts","../../../../libs/extensions/bamboohr/client/src/lib/bamboohr-extension.module.ts","../../../../libs/extensions/bamboohr/client/src/lib/brand/bamboohr-mark.paths.ts","../../../../libs/extensions/bamboohr/client/src/lib/brand/bamboohr-logo.component.ts","../../../../libs/extensions/bamboohr/client/src/acorex-platform-extension-bamboohr-client.ts"],"sourcesContent":["export const AXE_BAMBOOHR_EXPRESSION_SCOPE = 'BambooHRExtension';\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_BAMBOOHR_PROVIDER_ID } from '@acorex-platform/extension-bamboohr-client/contracts';\nimport { RootConfig as HcmRootConfig } from '@acorex-platform/module-human-capital-management-client/contracts';\nimport type { AXMHumanCapitalManagementEmployeeEntityModel } from '@acorex-platform/module-human-capital-management-client/contracts';\nimport { AXE_BAMBOOHR_EXPRESSION_SCOPE } from './bamboohr-expression-scope';\n\n//#endregion\n\nexport class AXEBambooHREmployeeLinkExpressionEvaluatorScopeProvider 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_BAMBOOHR_EXPRESSION_SCOPE, {\n hasEmployeeLink: async (platformEmployeeIdRaw?: unknown): Promise<boolean> => {\n const platformEmployeeId = typeof platformEmployeeIdRaw === 'string' ? platformEmployeeIdRaw.trim() : '';\n if (!platformEmployeeId) {\n return false;\n }\n\n const employee = (await this.entityService\n .withEntity(HcmRootConfig.module.name, HcmRootConfig.entities.employee.name)\n .data<string, AXMHumanCapitalManagementEmployeeEntityModel>()\n .byKey(platformEmployeeId)) as AXMHumanCapitalManagementEmployeeEntityModel | null;\n\n return employee?.integrationRef?.source === AXE_BAMBOOHR_PROVIDER_ID;\n },\n hasBambooHRConnection: async (): Promise<boolean> => {\n try {\n await this.integrationRuntime.getConnection({\n providerId: AXE_BAMBOOHR_PROVIDER_ID,\n connectionScope: 'tenant',\n });\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 { AXEBambooHRCommandKeys } from '@acorex-platform/extension-bamboohr-client/contracts';\nimport { RootConfig as HcmRootConfig } from '@acorex-platform/module-human-capital-management-client/contracts';\nimport { AXE_BAMBOOHR_EXPRESSION_SCOPE } from './bamboohr-expression-scope';\n\n//#endregion\n\nconst SYNC_ALL_ORDER = 36;\nconst SYNC_ONE_ORDER = 37;\n\nfunction buildSyncAllAction(): AXPEntityAction {\n return {\n name: AXEBambooHRCommandKeys.EmployeeSyncFromBambooHR,\n title: '@extensions-bamboohr:actions.sync-from-bamboohr.title',\n command: { name: AXEBambooHRCommandKeys.EmployeeSyncFromBambooHR },\n priority: 'secondary',\n type: AXPSystemActionType.Import,\n icon: 'fa-light fa-users',\n scope: AXPEntityCommandScope.TypeLevel,\n order: SYNC_ALL_ORDER,\n };\n}\n\nfunction buildSyncOneAction(): AXPEntityAction {\n return {\n name: AXEBambooHRCommandKeys.EmployeeSync,\n title: '@extensions-bamboohr:actions.sync.title',\n command: {\n name: AXEBambooHRCommandKeys.EmployeeSync,\n options: { platformEmployeeId: '{{ 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_ONE_ORDER,\n hidden: `{{ !(await ${AXE_BAMBOOHR_EXPRESSION_SCOPE}.hasEmployeeLink(context.eval(\"id\"))) }}`,\n };\n}\n\n/** Adds BambooHR sync actions to HumanCapitalManagement.Employee views. */\nexport const AXEBambooHREmployeeEntityModifier: AXPEntityModifierProvider = {\n entityName: HcmRootConfig.entities.employee.name,\n order: 50,\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, AXEBambooHRCommandKeys.EmployeeSyncFromBambooHR)) {\n listActions.push(buildSyncAllAction());\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, AXEBambooHRCommandKeys.EmployeeSync)) {\n singleActions.push(buildSyncOneAction());\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 { AXP_INTEGRATION_CATEGORY, AXP_INTEGRATION_CAPABILITY } from '@acorex-platform/framework-shared/core';\nimport {\n type AXPIntegrationDomainProvider,\n AXPIntegrationDomainProviderContext,\n} from '@acorex-platform/framework-client/common';\nimport { Injectable } from '@angular/core';\nimport { AXE_BAMBOOHR_DOMAIN_ID, RootConfig } from '@acorex-platform/extension-bamboohr-client/contracts';\n\n//#endregion\n\n@Injectable()\nexport class AXEHumanCapitalIntegrationDomainProvider implements AXPIntegrationDomainProvider {\n async provide(context: AXPIntegrationDomainProviderContext): Promise<void> {\n const I18N = `@${RootConfig.config.i18n}:integration.domain`;\n\n context.register({\n id: AXE_BAMBOOHR_DOMAIN_ID,\n module: RootConfig.module.name,\n displayName: `${I18N}.title`,\n description: `${I18N}.description`,\n icon: RootConfig.module.icon,\n category: AXP_INTEGRATION_CATEGORY.HumanCapital,\n capabilities: [AXP_INTEGRATION_CAPABILITY.Sync, AXP_INTEGRATION_CAPABILITY.Import],\n sortOrder: 25,\n });\n }\n}\n\n//#endregion\n","//#region ----- BambooHR logo registry key -----\n\nexport const axpBambooHRLogoKey = 'bamboohr' as const;\n\n//#endregion\n","//#region ----- Imports -----\n\nimport {\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 {\n AXE_BAMBOOHR_DOMAIN_ID,\n AXE_BAMBOOHR_PROVIDER_ID,\n AXEBambooHRCommandKeys,\n RootConfig,\n} from '@acorex-platform/extension-bamboohr-client/contracts';\nimport { axpBambooHRLogoKey } from '../brand/bamboohr-logo-key';\n\n//#endregion\n\n@Injectable()\nexport class AXEBambooHRIntegrationProvider implements AXPIntegrationProvider {\n async provide(context: AXPIntegrationProviderContext): Promise<void> {\n const I18N = `@${RootConfig.config.i18n}:integration`;\n\n context.register({\n domainId: AXE_BAMBOOHR_DOMAIN_ID,\n id: AXE_BAMBOOHR_PROVIDER_ID,\n module: RootConfig.module.name,\n displayName: `${I18N}.display-name`,\n description: `${I18N}.description`,\n icon: RootConfig.module.icon,\n logoKey: axpBambooHRLogoKey,\n capabilities: [AXP_INTEGRATION_CAPABILITY.Sync, AXP_INTEGRATION_CAPABILITY.Import],\n connectionScopes: [AXP_INTEGRATION_CONNECTION_SCOPE.Tenant],\n allowMultipleConnections: false,\n defaultConnectionKey: 'default',\n connectCommandKey: AXEBambooHRCommandKeys.ConnectionConnect,\n authMethods: [\n {\n type: AXP_INTEGRATION_AUTH_METHOD_TYPE.ApiToken,\n label: `${I18N}.auth.api-token.label`,\n instructions: `${I18N}.auth.api-token.instructions`,\n supportsValidation: true,\n fields: [\n {\n type: AXPWidgetsList.Editors.TextBox,\n path: 'companyDomain',\n options: { placeholder: `${I18N}.auth.api-token.company-domain.placeholder` },\n },\n {\n type: AXPWidgetsList.Editors.PasswordBox,\n path: 'apiKey',\n options: { placeholder: `${I18N}.auth.api-token.api-key.placeholder` },\n },\n ],\n },\n ],\n });\n }\n}\n\n//#endregion\n","//#region ----- Imports -----\n\nimport {\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 { AXEBambooHRConnectionConfig } from '@acorex-platform/extension-bamboohr-client/contracts';\nimport { AXE_BAMBOOHR_PROVIDER_ID } from '@acorex-platform/extension-bamboohr-client/contracts';\nimport { Injectable, inject } from '@angular/core';\nimport { defaultTo, trim } from 'lodash-es';\n\n//#endregion\n\n@Injectable()\nexport class AXEBambooHRIntegrationRuntimeProvider implements AXPIntegrationRuntimeProvider {\n readonly providerId = AXE_BAMBOOHR_PROVIDER_ID;\n\n private readonly secretStore = inject(AXP_INTEGRATION_SECRET_STORE, { optional: true });\n\n async getHooks(): Promise<AXPIntegrationProviderRuntimeHooks> {\n return {\n validateConnection: (ctx) => this.validateConnection(ctx),\n };\n }\n\n private async validateConnection(ctx: AXPIntegrationRuntimeContext): Promise<AXPIntegrationValidationResult> {\n const config = (ctx.config ?? {}) as AXEBambooHRConnectionConfig;\n const companyDomain = trim(defaultTo(config.companyDomain, ''));\n const apiKey = trim(defaultTo(config.apiKey, await this.resolveApiKeyFromSecret(ctx)));\n\n if (!companyDomain || !apiKey) {\n return {\n valid: false,\n status: AXP_INTEGRATION_CONNECTION_STATUS.Invalid,\n errorMessage: 'BambooHR company domain and API key are required.',\n };\n }\n\n return {\n valid: true,\n status: AXP_INTEGRATION_CONNECTION_STATUS.Connected,\n externalAccountName: `${companyDomain}.bamboohr.com`,\n };\n }\n\n private async resolveApiKeyFromSecret(ctx: AXPIntegrationRuntimeContext): Promise<string> {\n if (!this.secretStore || !trim(defaultTo(ctx.secretRef, ''))) {\n return '';\n }\n const credentials = await this.secretStore.resolve(ctx.secretRef, ctx);\n return trim(defaultTo(credentials.apiToken ?? credentials.token ?? credentials.password, ''));\n }\n}\n\nexport const provideBambooHRIntegrationRuntimeProvider = {\n provide: AXP_INTEGRATION_RUNTIME_PROVIDER,\n useClass: AXEBambooHRIntegrationRuntimeProvider,\n multi: true,\n};\n\n//#endregion\n","import { AXPModuleManifest } from '@acorex-platform/framework-client/core';\nimport { RootConfig } from '@acorex-platform/extension-bamboohr-client/contracts';\n\nexport const BambooHRExtensionManifest: 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: 'human-capital',\n dependencies: [],\n};\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 AXEBambooHRMenuKeys,\n RootConfig,\n AXPAdministrationPermissionKeys\n} from '@acorex-platform/extension-bamboohr-client/contracts';\n\n//#endregion\n\n@Injectable()\nexport class AXEBambooHRMenuProvider 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(AXEBambooHRMenuKeys.BambooHRExtensionConfig).exists) {\n configMenu.addItems([\n {\n name: AXEBambooHRMenuKeys.BambooHRExtensionConfig,\n text: '@extensions-bamboohr:module.menus.configuration.title',\n icon: module.icon,\n type: 'menu',\n priority: 8930,\n policy,\n children: [],\n },\n ]);\n }\n }\n}\n\n//#endregion\n","//#region ----- Imports -----\n\nimport {\n AXP_SETTING_DEFINITION_PROVIDER,\n AXPSettingDefinitionProvider,\n AXPSettingDefinitionProviderContext,\n} from '@acorex-platform/framework-client/common';\nimport { Injectable } from '@angular/core';\n\n//#endregion\n\n//#region ----- Provider -----\n\n@Injectable()\nexport class AXEBambooHRSettingsProvider implements AXPSettingDefinitionProvider {\n async provide(_context: AXPSettingDefinitionProviderContext): Promise<void> {\n // Tenant BambooHR connections are managed on Administration → Integrations.\n }\n}\n\nexport const provideBambooHRSettingsProvider = {\n provide: AXP_SETTING_DEFINITION_PROVIDER,\n useClass: AXEBambooHRSettingsProvider,\n multi: true,\n};\n\n//#endregion\n","//#region ----- Imports -----\n\nimport {\n AXP_LOGO_PROVIDER,\n type AXPLogoProvider,\n type AXPLogoRequest,\n type AXPLogoView,\n} from '@acorex-platform/framework-client/core';\nimport { axpBambooHRLogoKey } from './bamboohr-logo-key';\n\n//#endregion\n\nconst bambooHRLogoProvider: AXPLogoProvider = {\n key: axpBambooHRLogoKey,\n resolve: async (request: AXPLogoRequest): Promise<AXPLogoView> => ({\n kind: 'component',\n load: () => import('./bamboohr-logo.component').then((module) => module.AXEBambooHRLogoComponent),\n inputs: {\n appearance: request.appearance,\n size: request.size,\n },\n }),\n};\n\nexport const AXE_BAMBOOHR_LOGO_PROVIDER = {\n provide: AXP_LOGO_PROVIDER,\n useValue: bambooHRLogoProvider,\n multi: true,\n} as const;\n","//#region ----- Imports -----\n\nimport { AXMIntegrationManagementModule } from '@acorex-platform/module-integration-management-client';\nimport {\n AXP_INTEGRATION_DOMAIN_PROVIDER,\n AXP_INTEGRATION_PROVIDER,\n AXP_MENU_PROVIDER,\n} 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 { AXEBambooHRCommandKeys } from '@acorex-platform/extension-bamboohr-client/contracts';\nimport { AXEBambooHREmployeeLinkExpressionEvaluatorScopeProvider } from './features/human-capital/bamboohr-employee-link-expression-evaluator-scope.provider';\nimport { AXEBambooHREmployeeEntityModifier } from './features/human-capital/employee-bamboohr.entity-modifier';\nimport { AXEHumanCapitalIntegrationDomainProvider } from './integration/human-capital.integration-domain.provider';\nimport { AXEBambooHRIntegrationProvider } from './integration/bamboohr.integration.provider';\nimport { provideBambooHRIntegrationRuntimeProvider } from './integration/bamboohr.integration-runtime.provider';\nimport { BambooHRExtensionManifest } from './manifest';\nimport { AXEBambooHRMenuProvider } from './menu.provider';\nimport { provideBambooHRSettingsProvider } from './settings.provider';\nimport { AXE_BAMBOOHR_LOGO_PROVIDER } from './brand/bamboohr-logo.provider';\n\n//#endregion\n\n@NgModule({\n imports: [AXMIntegrationManagementModule],\n providers: [\n AXE_BAMBOOHR_LOGO_PROVIDER,\n { provide: AXP_MODULE_MANIFEST_PROVIDER, useValue: BambooHRExtensionManifest, multi: true },\n { provide: AXP_MENU_PROVIDER, useClass: AXEBambooHRMenuProvider, multi: true },\n { provide: AXP_ENTITY_MODIFIER, useValue: AXEBambooHREmployeeEntityModifier, multi: true },\n {\n provide: AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER,\n useClass: AXEBambooHREmployeeLinkExpressionEvaluatorScopeProvider,\n multi: true,\n },\n {\n provide: AXP_INTEGRATION_DOMAIN_PROVIDER,\n useClass: AXEHumanCapitalIntegrationDomainProvider,\n multi: true,\n },\n { provide: AXP_INTEGRATION_PROVIDER, useClass: AXEBambooHRIntegrationProvider, multi: true },\n provideBambooHRIntegrationRuntimeProvider,\n provideBambooHRSettingsProvider,\n provideCommandSetups([\n {\n key: AXEBambooHRCommandKeys.ConnectionConnect,\n command: () =>\n import('./features/connect/connect-bamboohr.command').then((c) => c.ConnectBambooHRCommand),\n },\n ]),\n ],\n})\nexport class AXEBambooHRExtensionModule {}\n\n//#endregion\n","//#region ----- BambooHR mark vector paths -----\n\n/** Official BambooHR brand green (sampled from bamboohr.com wordmark). */\nexport const AXE_BAMBOOHR_MARK_GREEN = '#73C41D';\n\n/**\n * Icon-only BambooHR sprout (two leaves, no wordmark).\n * Traced from the official leaf mark on bamboohr.com media assets and fitted to 24×24.\n */\nexport const AXE_BAMBOOHR_MARK_PATH =\n 'M11.39 3.37 Q 14.66 4.84 16.92 7.49 Q 18.39 9.23 19.32 11.53 L 22 20.21 Q 21.82 20.63 21.63 20.29 L 19.54 19.85 L 17.74 19.69 L 15.65 19.09 L 12.81 17.74 L 11.08 16.32 L 8.1 12.73 L 3.98 8.62 L 2.11 7.04 Q 2 6.71 2.34 6.82 L 5.62 7.43 L 10.56 9.36 L 13.84 11.16 L 16.76 13.56 L 16.76 13.78 L 18.94 15.95 L 19.02 15.73 Q 17.2 11.55 14.82 7.94 L 11.39 3.37 Z';\n\n//#endregion\n","//#region ----- Imports -----\n\nimport type { AXPLogoAppearance } from '@acorex-platform/framework-client/core';\nimport { Component, computed, input, ChangeDetectionStrategy } from '@angular/core';\nimport { AXE_BAMBOOHR_MARK_GREEN, AXE_BAMBOOHR_MARK_PATH } from './bamboohr-mark.paths';\n\n//#endregion\n\n//#region ----- Component -----\n\n@Component({\n selector: 'axe-bamboohr-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 <path fill=\"currentColor\" [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 <path [attr.fill]=\"markGreen\" [attr.d]=\"markPath\" />\n </svg>\n }\n }\n `,\n})\nexport class AXEBambooHRLogoComponent {\n appearance = input<AXPLogoAppearance>('colored');\n size = input(20);\n\n protected readonly markPath = AXE_BAMBOOHR_MARK_PATH;\n protected readonly markGreen = AXE_BAMBOOHR_MARK_GREEN;\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":["HcmRootConfig","RootConfig"],"mappings":";;;;;;;;;;;;;;AAAO,MAAM,6BAA6B,GAAG,mBAAmB;;ACAhE;AAWA;MAEa,uDAAuD,CAAA;AAApE,IAAA,WAAA,GAAA;AACmB,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACxC,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,4BAA4B,CAAC;IA8B5E;IA5BE,MAAM,OAAO,CAAC,OAAmD,EAAA;AAC/D,QAAA,OAAO,CAAC,QAAQ,CAAC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AA,CAAA,uBAAA,CAAA,KAAA,EAAA,CAAA,CAAA;;2FAEU,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAnBpC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,mBAAmB;AAC7B,oBAAA,IAAI,EAAE,EAAE,KAAK,EAAE,yCAAyC,EAAE;oBAC1D,eAAe,EAAE,uBAAuB,CAAC,KAAK;AAC9C,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;AAaT,EAAA,CAAA;AACF,iBAAA;;;;;;;;AC5BD;;AAEG;;"}
|
|
1
|
+
{"version":3,"file":"acorex-platform-extension-bamboohr-client.mjs","sources":["../../../../libs/extensions/bamboohr/client/src/lib/features/human-capital/bamboohr-expression-scope.ts","../../../../libs/extensions/bamboohr/client/src/lib/features/human-capital/bamboohr-employee-link-expression-evaluator-scope.provider.ts","../../../../libs/extensions/bamboohr/client/src/lib/features/human-capital/employee-bamboohr.entity-modifier.ts","../../../../libs/extensions/bamboohr/client/src/lib/integration/human-capital.integration-domain.provider.ts","../../../../libs/extensions/bamboohr/client/src/lib/brand/bamboohr-logo-key.ts","../../../../libs/extensions/bamboohr/client/src/lib/integration/bamboohr.integration.provider.ts","../../../../libs/extensions/bamboohr/client/src/lib/integration/bamboohr.integration-runtime.provider.ts","../../../../libs/extensions/bamboohr/client/src/lib/integration/bamboohr.connection-lifecycle.handler.ts","../../../../libs/extensions/bamboohr/client/src/lib/menu.provider.ts","../../../../libs/extensions/bamboohr/client/src/lib/settings.provider.ts","../../../../libs/extensions/bamboohr/client/src/lib/brand/bamboohr-logo.provider.ts","../../../../libs/extensions/bamboohr/client/src/lib/bamboohr-extension.module.ts","../../../../libs/extensions/bamboohr/client/src/lib/brand/bamboohr-mark.paths.ts","../../../../libs/extensions/bamboohr/client/src/lib/brand/bamboohr-logo.component.ts","../../../../libs/extensions/bamboohr/client/src/acorex-platform-extension-bamboohr-client.ts"],"sourcesContent":["export const AXE_BAMBOOHR_EXPRESSION_SCOPE = 'BambooHRExtension';\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_BAMBOOHR_PROVIDER_ID } from '@acorex-platform/extension-bamboohr-client/contracts';\nimport { RootConfig as HcmRootConfig } from '@acorex-platform/module-human-capital-management-client/contracts';\nimport type { AXMHumanCapitalManagementEmployeeEntityModel } from '@acorex-platform/module-human-capital-management-client/contracts';\nimport { AXE_BAMBOOHR_EXPRESSION_SCOPE } from './bamboohr-expression-scope';\n\n//#endregion\n\nexport class AXEBambooHREmployeeLinkExpressionEvaluatorScopeProvider 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_BAMBOOHR_EXPRESSION_SCOPE, {\n hasEmployeeLink: async (platformEmployeeIdRaw?: unknown): Promise<boolean> => {\n const platformEmployeeId = typeof platformEmployeeIdRaw === 'string' ? platformEmployeeIdRaw.trim() : '';\n if (!platformEmployeeId) {\n return false;\n }\n\n const employee = (await this.entityService\n .withEntity(HcmRootConfig.module.name, HcmRootConfig.entities.employee.name)\n .data<string, AXMHumanCapitalManagementEmployeeEntityModel>()\n .byKey(platformEmployeeId)) as AXMHumanCapitalManagementEmployeeEntityModel | null;\n\n return employee?.integrationRef?.source === AXE_BAMBOOHR_PROVIDER_ID;\n },\n hasBambooHRConnection: async (): Promise<boolean> => {\n try {\n await this.integrationRuntime.getConnection({\n providerId: AXE_BAMBOOHR_PROVIDER_ID,\n connectionScope: 'tenant',\n });\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 { AXEBambooHRCommandKeys } from '@acorex-platform/extension-bamboohr-client/contracts';\nimport { RootConfig as HcmRootConfig } from '@acorex-platform/module-human-capital-management-client/contracts';\nimport { AXE_BAMBOOHR_EXPRESSION_SCOPE } from './bamboohr-expression-scope';\n\n//#endregion\n\nconst SYNC_ALL_ORDER = 36;\nconst SYNC_ONE_ORDER = 37;\n\nfunction buildSyncAllAction(): AXPEntityAction {\n return {\n name: AXEBambooHRCommandKeys.EmployeeSyncFromBambooHR,\n title: '@extensions-bamboohr:actions.sync-from-bamboohr.title',\n command: { name: AXEBambooHRCommandKeys.EmployeeSyncFromBambooHR },\n priority: 'secondary',\n type: AXPSystemActionType.Import,\n icon: 'fa-light fa-users',\n scope: AXPEntityCommandScope.TypeLevel,\n order: SYNC_ALL_ORDER,\n };\n}\n\nfunction buildSyncOneAction(): AXPEntityAction {\n return {\n name: AXEBambooHRCommandKeys.EmployeeSync,\n title: '@extensions-bamboohr:actions.sync.title',\n command: {\n name: AXEBambooHRCommandKeys.EmployeeSync,\n options: { platformEmployeeId: '{{ 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_ONE_ORDER,\n hidden: `{{ !(await ${AXE_BAMBOOHR_EXPRESSION_SCOPE}.hasEmployeeLink(context.eval(\"id\"))) }}`,\n };\n}\n\n/** Adds BambooHR sync actions to HumanCapitalManagement.Employee views. */\nexport const AXEBambooHREmployeeEntityModifier: AXPEntityModifierProvider = {\n entityName: HcmRootConfig.entities.employee.name,\n order: 50,\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, AXEBambooHRCommandKeys.EmployeeSyncFromBambooHR)) {\n listActions.push(buildSyncAllAction());\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, AXEBambooHRCommandKeys.EmployeeSync)) {\n singleActions.push(buildSyncOneAction());\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 { AXP_INTEGRATION_CATEGORY, AXP_INTEGRATION_CAPABILITY } from '@acorex-platform/framework-shared/core';\nimport {\n type AXPIntegrationDomainProvider,\n AXPIntegrationDomainProviderContext,\n} from '@acorex-platform/framework-client/common';\nimport { Injectable } from '@angular/core';\nimport { AXE_BAMBOOHR_DOMAIN_ID, RootConfig } from '@acorex-platform/extension-bamboohr-client/contracts';\n\n//#endregion\n\n@Injectable()\nexport class AXEHumanCapitalIntegrationDomainProvider implements AXPIntegrationDomainProvider {\n async provide(context: AXPIntegrationDomainProviderContext): Promise<void> {\n const I18N = `@${RootConfig.config.i18n}:integration.domain`;\n\n context.register({\n id: AXE_BAMBOOHR_DOMAIN_ID,\n module: RootConfig.module.name,\n displayName: `${I18N}.title`,\n description: `${I18N}.description`,\n icon: RootConfig.module.icon,\n category: AXP_INTEGRATION_CATEGORY.HumanCapital,\n capabilities: [AXP_INTEGRATION_CAPABILITY.Sync, AXP_INTEGRATION_CAPABILITY.Import],\n sortOrder: 25,\n });\n }\n}\n\n//#endregion\n","//#region ----- BambooHR logo registry key -----\n\nexport const axpBambooHRLogoKey = 'bamboohr' as const;\n\n//#endregion\n","//#region ----- Imports -----\n\nimport {\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 {\n AXE_BAMBOOHR_DOMAIN_ID,\n AXE_BAMBOOHR_PROVIDER_ID,\n AXEBambooHRCommandKeys,\n RootConfig,\n} from '@acorex-platform/extension-bamboohr-client/contracts';\nimport { axpBambooHRLogoKey } from '../brand/bamboohr-logo-key';\n\n//#endregion\n\n@Injectable()\nexport class AXEBambooHRIntegrationProvider implements AXPIntegrationProvider {\n async provide(context: AXPIntegrationProviderContext): Promise<void> {\n const I18N = `@${RootConfig.config.i18n}:integration`;\n\n context.register({\n domainId: AXE_BAMBOOHR_DOMAIN_ID,\n id: AXE_BAMBOOHR_PROVIDER_ID,\n module: RootConfig.module.name,\n displayName: `${I18N}.display-name`,\n description: `${I18N}.description`,\n icon: RootConfig.module.icon,\n logoKey: axpBambooHRLogoKey,\n capabilities: [AXP_INTEGRATION_CAPABILITY.Sync, AXP_INTEGRATION_CAPABILITY.Import],\n connectionScopes: [AXP_INTEGRATION_CONNECTION_SCOPE.Tenant],\n allowMultipleConnections: false,\n defaultConnectionKey: 'default',\n connectCommandKey: AXEBambooHRCommandKeys.ConnectionConnect,\n authMethods: [\n {\n type: AXP_INTEGRATION_AUTH_METHOD_TYPE.ApiToken,\n label: `${I18N}.auth.api-token.label`,\n instructions: `${I18N}.auth.api-token.instructions`,\n supportsValidation: true,\n fields: [\n {\n type: AXPWidgetsList.Editors.TextBox,\n path: 'companyDomain',\n options: { placeholder: `${I18N}.auth.api-token.company-domain.placeholder` },\n },\n {\n type: AXPWidgetsList.Editors.PasswordBox,\n path: 'apiKey',\n options: { placeholder: `${I18N}.auth.api-token.api-key.placeholder` },\n },\n ],\n },\n ],\n });\n }\n}\n\n//#endregion\n","//#region ----- Imports -----\n\nimport {\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 { AXEBambooHRConnectionConfig } from '@acorex-platform/extension-bamboohr-client/contracts';\nimport { AXE_BAMBOOHR_PROVIDER_ID } from '@acorex-platform/extension-bamboohr-client/contracts';\nimport { Injectable, inject } from '@angular/core';\nimport { defaultTo, trim } from 'lodash-es';\n\n//#endregion\n\n@Injectable()\nexport class AXEBambooHRIntegrationRuntimeProvider implements AXPIntegrationRuntimeProvider {\n readonly providerId = AXE_BAMBOOHR_PROVIDER_ID;\n\n private readonly secretStore = inject(AXP_INTEGRATION_SECRET_STORE, { optional: true });\n\n async getHooks(): Promise<AXPIntegrationProviderRuntimeHooks> {\n return {\n validateConnection: (ctx) => this.validateConnection(ctx),\n };\n }\n\n private async validateConnection(ctx: AXPIntegrationRuntimeContext): Promise<AXPIntegrationValidationResult> {\n const config = (ctx.config ?? {}) as AXEBambooHRConnectionConfig;\n const companyDomain = trim(defaultTo(config.companyDomain, ''));\n const apiKey = trim(defaultTo(config.apiKey, await this.resolveApiKeyFromSecret(ctx)));\n\n if (!companyDomain || !apiKey) {\n return {\n valid: false,\n status: AXP_INTEGRATION_CONNECTION_STATUS.Invalid,\n errorMessage: 'BambooHR company domain and API key are required.',\n };\n }\n\n return {\n valid: true,\n status: AXP_INTEGRATION_CONNECTION_STATUS.Connected,\n externalAccountName: `${companyDomain}.bamboohr.com`,\n };\n }\n\n private async resolveApiKeyFromSecret(ctx: AXPIntegrationRuntimeContext): Promise<string> {\n if (!this.secretStore || !trim(defaultTo(ctx.secretRef, ''))) {\n return '';\n }\n const credentials = await this.secretStore.resolve(ctx.secretRef, ctx);\n return trim(defaultTo(credentials.apiToken ?? credentials.token ?? credentials.password, ''));\n }\n}\n\nexport const provideBambooHRIntegrationRuntimeProvider = {\n provide: AXP_INTEGRATION_RUNTIME_PROVIDER,\n useClass: AXEBambooHRIntegrationRuntimeProvider,\n multi: true,\n};\n\n//#endregion\n","//#region ----- Imports -----\n\nimport {\n AXP_INTEGRATION_CONNECTION_ESTABLISHED,\n AXP_INTEGRATION_CONNECTION_LIFECYCLE,\n type AXPIntegrationConnectionEstablishedHandler,\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 {\n AXE_BAMBOOHR_PROVIDER_ID,\n AXEBambooHRCommandKeys,\n type AXEBambooHRConnectionLifecycleAction,\n} from '@acorex-platform/extension-bamboohr-client/contracts';\nimport { Injectable, inject } from '@angular/core';\n\n//#endregion\n\n//#region ----- Handler -----\n\n@Injectable()\nexport class AXEBambooHRConnectionLifecycleHandler\n implements AXPIntegrationConnectionLifecycleHandler, AXPIntegrationConnectionEstablishedHandler\n{\n readonly providerId = AXE_BAMBOOHR_PROVIDER_ID;\n\n private readonly commandService = inject(AXPCommandService);\n\n async onEstablished(connection: AXPSafeIntegrationConnectionDto): Promise<void> {\n if (connection.status === AXP_INTEGRATION_CONNECTION_STATUS.Connected) {\n await this.runLifecycle(connection.id, 'connected');\n }\n }\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: AXEBambooHRConnectionLifecycleAction,\n ): Promise<void> {\n await this.commandService.execute(AXEBambooHRCommandKeys.ConnectionLifecycle, {\n connectionId,\n action,\n });\n }\n}\n\nexport const provideBambooHRConnectionLifecycleHandler = {\n provide: AXP_INTEGRATION_CONNECTION_LIFECYCLE,\n useClass: AXEBambooHRConnectionLifecycleHandler,\n multi: true,\n};\n\nexport const provideBambooHRConnectionEstablishedHandler = {\n provide: AXP_INTEGRATION_CONNECTION_ESTABLISHED,\n useClass: AXEBambooHRConnectionLifecycleHandler,\n multi: true,\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 AXEBambooHRMenuKeys,\n RootConfig,\n AXPAdministrationPermissionKeys\n} from '@acorex-platform/extension-bamboohr-client/contracts';\n\n//#endregion\n\n@Injectable()\nexport class AXEBambooHRMenuProvider 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(AXEBambooHRMenuKeys.BambooHRExtensionConfig).exists) {\n configMenu.addItems([\n {\n name: AXEBambooHRMenuKeys.BambooHRExtensionConfig,\n text: '@extensions-bamboohr:module.menus.configuration.title',\n icon: module.icon,\n type: 'menu',\n priority: 8930,\n policy,\n children: [],\n },\n ]);\n }\n }\n}\n\n//#endregion\n","//#region ----- Imports -----\n\nimport {\n AXP_SETTING_DEFINITION_PROVIDER,\n AXPSettingDefinitionProvider,\n AXPSettingDefinitionProviderContext,\n} from '@acorex-platform/framework-client/common';\nimport { Injectable } from '@angular/core';\n\n//#endregion\n\n//#region ----- Provider -----\n\n@Injectable()\nexport class AXEBambooHRSettingsProvider implements AXPSettingDefinitionProvider {\n async provide(_context: AXPSettingDefinitionProviderContext): Promise<void> {\n // Tenant BambooHR connections are managed on Administration → Integrations.\n }\n}\n\nexport const provideBambooHRSettingsProvider = {\n provide: AXP_SETTING_DEFINITION_PROVIDER,\n useClass: AXEBambooHRSettingsProvider,\n multi: true,\n};\n\n//#endregion\n","//#region ----- Imports -----\n\nimport {\n AXP_LOGO_PROVIDER,\n type AXPLogoProvider,\n type AXPLogoRequest,\n type AXPLogoView,\n} from '@acorex-platform/framework-client/core';\nimport { axpBambooHRLogoKey } from './bamboohr-logo-key';\n\n//#endregion\n\nconst bambooHRLogoProvider: AXPLogoProvider = {\n key: axpBambooHRLogoKey,\n resolve: async (request: AXPLogoRequest): Promise<AXPLogoView> => ({\n kind: 'component',\n load: () => import('./bamboohr-logo.component').then((module) => module.AXEBambooHRLogoComponent),\n inputs: {\n appearance: request.appearance,\n size: request.size,\n },\n }),\n};\n\nexport const AXE_BAMBOOHR_LOGO_PROVIDER = {\n provide: AXP_LOGO_PROVIDER,\n useValue: bambooHRLogoProvider,\n multi: true,\n} as const;\n","//#region ----- Imports -----\n\nimport { AXMIntegrationManagementModule } from '@acorex-platform/module-integration-management-client';\nimport {\n AXP_INTEGRATION_DOMAIN_PROVIDER,\n AXP_INTEGRATION_PROVIDER,\n AXP_MENU_PROVIDER,\n} 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 { AXEBambooHRCommandKeys } from '@acorex-platform/extension-bamboohr-client/contracts';\nimport { AXEBambooHREmployeeLinkExpressionEvaluatorScopeProvider } from './features/human-capital/bamboohr-employee-link-expression-evaluator-scope.provider';\nimport { AXEBambooHREmployeeEntityModifier } from './features/human-capital/employee-bamboohr.entity-modifier';\nimport { AXEHumanCapitalIntegrationDomainProvider } from './integration/human-capital.integration-domain.provider';\nimport { AXEBambooHRIntegrationProvider } from './integration/bamboohr.integration.provider';\nimport { provideBambooHRIntegrationRuntimeProvider } from './integration/bamboohr.integration-runtime.provider';\nimport {\n provideBambooHRConnectionEstablishedHandler,\n provideBambooHRConnectionLifecycleHandler,\n} from './integration/bamboohr.connection-lifecycle.handler';\nimport { AXEBambooHRMenuProvider } from './menu.provider';\nimport { provideBambooHRSettingsProvider } from './settings.provider';\nimport { AXE_BAMBOOHR_LOGO_PROVIDER } from './brand/bamboohr-logo.provider';\n\n//#endregion\n\n@NgModule({\n imports: [AXMIntegrationManagementModule],\n providers: [\n AXE_BAMBOOHR_LOGO_PROVIDER,\n { provide: AXP_MENU_PROVIDER, useClass: AXEBambooHRMenuProvider, multi: true },\n { provide: AXP_ENTITY_MODIFIER, useValue: AXEBambooHREmployeeEntityModifier, multi: true },\n {\n provide: AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER,\n useClass: AXEBambooHREmployeeLinkExpressionEvaluatorScopeProvider,\n multi: true,\n },\n {\n provide: AXP_INTEGRATION_DOMAIN_PROVIDER,\n useClass: AXEHumanCapitalIntegrationDomainProvider,\n multi: true,\n },\n { provide: AXP_INTEGRATION_PROVIDER, useClass: AXEBambooHRIntegrationProvider, multi: true },\n provideBambooHRIntegrationRuntimeProvider,\n provideBambooHRConnectionLifecycleHandler,\n provideBambooHRConnectionEstablishedHandler,\n provideBambooHRSettingsProvider,\n provideCommandSetups([\n {\n key: AXEBambooHRCommandKeys.ConnectionConnect,\n command: () =>\n import('./features/connect/connect-bamboohr.command').then((c) => c.ConnectBambooHRCommand),\n },\n ]),\n ],\n})\nexport class AXEBambooHRExtensionModule {}\n\n//#endregion\n","//#region ----- BambooHR mark vector paths -----\n\n/** Official BambooHR brand green (sampled from bamboohr.com wordmark). */\nexport const AXE_BAMBOOHR_MARK_GREEN = '#73C41D';\n\n/**\n * Icon-only BambooHR sprout (two leaves, no wordmark).\n * Traced from the official leaf mark on bamboohr.com media assets and fitted to 24×24.\n */\nexport const AXE_BAMBOOHR_MARK_PATH =\n 'M11.39 3.37 Q 14.66 4.84 16.92 7.49 Q 18.39 9.23 19.32 11.53 L 22 20.21 Q 21.82 20.63 21.63 20.29 L 19.54 19.85 L 17.74 19.69 L 15.65 19.09 L 12.81 17.74 L 11.08 16.32 L 8.1 12.73 L 3.98 8.62 L 2.11 7.04 Q 2 6.71 2.34 6.82 L 5.62 7.43 L 10.56 9.36 L 13.84 11.16 L 16.76 13.56 L 16.76 13.78 L 18.94 15.95 L 19.02 15.73 Q 17.2 11.55 14.82 7.94 L 11.39 3.37 Z';\n\n//#endregion\n","//#region ----- Imports -----\n\nimport type { AXPLogoAppearance } from '@acorex-platform/framework-client/core';\nimport { Component, computed, input, ChangeDetectionStrategy } from '@angular/core';\nimport { AXE_BAMBOOHR_MARK_GREEN, AXE_BAMBOOHR_MARK_PATH } from './bamboohr-mark.paths';\n\n//#endregion\n\n//#region ----- Component -----\n\n@Component({\n selector: 'axe-bamboohr-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 <path fill=\"currentColor\" [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 <path [attr.fill]=\"markGreen\" [attr.d]=\"markPath\" />\n </svg>\n }\n }\n `,\n})\nexport class AXEBambooHRLogoComponent {\n appearance = input<AXPLogoAppearance>('colored');\n size = input(20);\n\n protected readonly markPath = AXE_BAMBOOHR_MARK_PATH;\n protected readonly markGreen = AXE_BAMBOOHR_MARK_GREEN;\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":["HcmRootConfig","RootConfig"],"mappings":";;;;;;;;;;;;;;AAAO,MAAM,6BAA6B,GAAG,mBAAmB;;ACAhE;AAWA;MAEa,uDAAuD,CAAA;AAApE,IAAA,WAAA,GAAA;AACmB,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACxC,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,4BAA4B,CAAC;IA8B5E;IA5BE,MAAM,OAAO,CAAC,OAAmD,EAAA;AAC/D,QAAA,OAAO,CAAC,QAAQ,CAAC,6BAA6B,EAAE;AAC9C,YAAA,eAAe,EAAE,OAAO,qBAA+B,KAAsB;AAC3E,gBAAA,MAAM,kBAAkB,GAAG,OAAO,qBAAqB,KAAK,QAAQ,GAAG,qBAAqB,CAAC,IAAI,EAAE,GAAG,EAAE;gBACxG,IAAI,CAAC,kBAAkB,EAAE;AACvB,oBAAA,OAAO,KAAK;gBACd;AAEA,gBAAA,MAAM,QAAQ,IAAI,MAAM,IAAI,CAAC;AAC1B,qBAAA,UAAU,CAACA,UAAa,CAAC,MAAM,CAAC,IAAI,EAAEA,UAAa,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI;AAC1E,qBAAA,IAAI;AACJ,qBAAA,KAAK,CAAC,kBAAkB,CAAC,CAAwD;AAEpF,gBAAA,OAAO,QAAQ,EAAE,cAAc,EAAE,MAAM,KAAK,wBAAwB;YACtE,CAAC;YACD,qBAAqB,EAAE,YAA6B;AAClD,gBAAA,IAAI;AACF,oBAAA,MAAM,IAAI,CAAC,kBAAkB,CAAC,aAAa,CAAC;AAC1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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,EAfzB;;;;;;;;;;;;;AAaT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,KAAA,EAAA,CAAA,CAAA;;2FAEU,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAnBpC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,mBAAmB;AAC7B,oBAAA,IAAI,EAAE,EAAE,KAAK,EAAE,yCAAyC,EAAE;oBAC1D,eAAe,EAAE,uBAAuB,CAAC,KAAK;AAC9C,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;AAaT,EAAA,CAAA;AACF,iBAAA;;;;;;;;AC5BD;;AAEG;;"}
|
package/package.json
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { AXPModuleManifest } from '@acorex-platform/framework-shared/core';
|
|
2
|
+
|
|
1
3
|
declare const RootConfig: {
|
|
2
4
|
config: {
|
|
3
5
|
i18n: string;
|
|
@@ -11,17 +13,25 @@ declare const RootConfig: {
|
|
|
11
13
|
providerId: string;
|
|
12
14
|
domainId: string;
|
|
13
15
|
resourceEmployee: string;
|
|
16
|
+
resourceTrainingType: string;
|
|
17
|
+
resourceTraining: string;
|
|
14
18
|
};
|
|
15
19
|
};
|
|
16
20
|
declare const AXE_BAMBOOHR_DOMAIN_ID = "human-capital";
|
|
17
21
|
declare const AXE_BAMBOOHR_PROVIDER_ID = "bamboohr";
|
|
18
22
|
declare const AXE_BAMBOOHR_RESOURCE_EMPLOYEE = "employee";
|
|
23
|
+
declare const AXE_BAMBOOHR_RESOURCE_TRAINING_TYPE = "training-type";
|
|
24
|
+
declare const AXE_BAMBOOHR_RESOURCE_TRAINING = "training";
|
|
25
|
+
|
|
26
|
+
declare const BambooHRExtensionManifest: AXPModuleManifest;
|
|
19
27
|
|
|
20
28
|
declare const AXEBambooHRCommandKeys: {
|
|
21
29
|
readonly ConnectionConnect: "bamboohr-extension.Connection:Connect";
|
|
22
30
|
readonly ConnectionValidate: "bamboohr-extension.Connection:Validate";
|
|
31
|
+
readonly ConnectionLifecycle: "bamboohr-extension.Connection:Lifecycle";
|
|
23
32
|
readonly EmployeeSyncFromBambooHR: "bamboohr-extension.Employee:SyncFromBambooHR";
|
|
24
33
|
readonly EmployeeSync: "bamboohr-extension.Employee:Sync";
|
|
34
|
+
readonly RecordsPull: "bamboohr-extension.records.pull";
|
|
25
35
|
};
|
|
26
36
|
|
|
27
37
|
declare const AXEBambooHRMenuKeys: {
|
|
@@ -163,5 +173,74 @@ interface AXEBambooHRSyncPlatformEmployeeResponse {
|
|
|
163
173
|
platformEmployeeId: string;
|
|
164
174
|
}
|
|
165
175
|
|
|
166
|
-
|
|
167
|
-
|
|
176
|
+
/** Directory employee fields kept in IntegrationRemoteRecord.payloadJson. */
|
|
177
|
+
interface AXEBambooHRDirectoryEmployee {
|
|
178
|
+
id: string;
|
|
179
|
+
displayName?: string;
|
|
180
|
+
firstName?: string;
|
|
181
|
+
lastName?: string;
|
|
182
|
+
gender?: string;
|
|
183
|
+
jobTitle?: string;
|
|
184
|
+
workPhone?: string;
|
|
185
|
+
location?: string;
|
|
186
|
+
mobilePhone?: string;
|
|
187
|
+
workEmail?: string;
|
|
188
|
+
supervisor?: string;
|
|
189
|
+
department?: string;
|
|
190
|
+
status?: string;
|
|
191
|
+
employeenumber?: string;
|
|
192
|
+
}
|
|
193
|
+
interface AXEBambooHRRemoteTrainingTypeCategory {
|
|
194
|
+
id?: string;
|
|
195
|
+
name?: string;
|
|
196
|
+
}
|
|
197
|
+
interface AXEBambooHRRemoteTrainingType {
|
|
198
|
+
id: string;
|
|
199
|
+
name?: string;
|
|
200
|
+
category?: AXEBambooHRRemoteTrainingTypeCategory;
|
|
201
|
+
linkUrl?: string;
|
|
202
|
+
description?: string;
|
|
203
|
+
}
|
|
204
|
+
interface AXEBambooHRRemoteTraining {
|
|
205
|
+
id: string;
|
|
206
|
+
employeeId?: string;
|
|
207
|
+
completed?: string;
|
|
208
|
+
notes?: string;
|
|
209
|
+
instructor?: string;
|
|
210
|
+
hours?: number | string;
|
|
211
|
+
credits?: number | string;
|
|
212
|
+
cost?: number | string;
|
|
213
|
+
}
|
|
214
|
+
interface AXEBambooHRPullRecordsRequest {
|
|
215
|
+
/** When set, pulls for this BambooHR connection (required for per-connection schedules). */
|
|
216
|
+
connectionId?: string;
|
|
217
|
+
}
|
|
218
|
+
interface AXEBambooHRPullRecordsResponse {
|
|
219
|
+
upserted: number;
|
|
220
|
+
deactivated: number;
|
|
221
|
+
byResourceType?: {
|
|
222
|
+
employee?: {
|
|
223
|
+
upserted: number;
|
|
224
|
+
deactivated: number;
|
|
225
|
+
};
|
|
226
|
+
'training-type'?: {
|
|
227
|
+
upserted: number;
|
|
228
|
+
deactivated: number;
|
|
229
|
+
};
|
|
230
|
+
training?: {
|
|
231
|
+
upserted: number;
|
|
232
|
+
deactivated: number;
|
|
233
|
+
};
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
type AXEBambooHRConnectionLifecycleAction = 'connected' | 'disconnected' | 'deleted' | 'enabled' | 'disabled';
|
|
237
|
+
interface AXEBambooHRConnectionLifecycleRequest {
|
|
238
|
+
connectionId: string;
|
|
239
|
+
action: AXEBambooHRConnectionLifecycleAction;
|
|
240
|
+
}
|
|
241
|
+
interface AXEBambooHRConnectionLifecycleResponse {
|
|
242
|
+
ok: true;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
export { AXEBambooHRCommandKeys, AXEBambooHRExtensionSettings, AXEBambooHRMenuKeys, AXEBambooHRPermissions, AXE_BAMBOOHR_DOMAIN_ID, AXE_BAMBOOHR_EMPLOYEE_SYNC_STRATEGIES, AXE_BAMBOOHR_PROVIDER_ID, AXE_BAMBOOHR_RESOURCE_EMPLOYEE, AXE_BAMBOOHR_RESOURCE_TRAINING, AXE_BAMBOOHR_RESOURCE_TRAINING_TYPE, AXPAdministrationPermissionKeys, BambooHRExtensionManifest, RootConfig };
|
|
246
|
+
export type { AXEBambooHRConnectionConfig, AXEBambooHRConnectionLifecycleAction, AXEBambooHRConnectionLifecycleRequest, AXEBambooHRConnectionLifecycleResponse, AXEBambooHRDirectoryEmployee, AXEBambooHREmployeeSyncStrategy, AXEBambooHREmployeesSyncState, AXEBambooHRPullRecordsRequest, AXEBambooHRPullRecordsResponse, AXEBambooHRRemoteEmployee, AXEBambooHRRemoteTraining, AXEBambooHRRemoteTrainingType, AXEBambooHRRemoteTrainingTypeCategory, AXEBambooHRSyncEmployeesRequest, AXEBambooHRSyncEmployeesResponse, AXEBambooHRSyncPlatformEmployeeRequest, AXEBambooHRSyncPlatformEmployeeResponse, AXEBambooHRValidateConnectionRequest, AXEBambooHRValidateConnectionResponse };
|
package/fesm2022/acorex-platform-extension-bamboohr-client-connect-bamboohr.command-BzjrQHyc.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-extension-bamboohr-client-connect-bamboohr.command-BzjrQHyc.mjs","sources":["../../../../libs/extensions/bamboohr/client/src/lib/features/connect/connect-bamboohr.command.ts"],"sourcesContent":["//#region ----- Imports -----\n\nimport { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport {\n AXP_INTEGRATION_AUTH_METHOD_TYPE,\n AXP_INTEGRATION_CONNECTION_STATUS,\n type AXPRuntimeCommandResult,\n type AXPIntegrationConnectionScope,\n} from '@acorex-platform/framework-shared/core';\nimport {\n AXMIntegrationConnectionManager,\n AXP_INTEGRATION_CREDENTIAL_MASK,\n hasConfiguredIntegrationCredentials,\n isMaskedIntegrationCredential,\n toSafeIntegrationConnectionDto,\n type ConnectCommandResult,\n} from '@acorex-platform/module-integration-management-client';\nimport {\n AXPLayoutBuilderService,\n resolveLayoutBuilderDialogResult,\n type AXPDialogRef,\n type IActionBuilder,\n type IDialogBuilder,\n type IFlexContainerBuilder,\n} from '@acorex-platform/framework-client/layout/builder';\nimport { Injectable, inject } from '@angular/core';\nimport { defaultTo, trim } from 'lodash-es';\nimport {\n AXE_BAMBOOHR_PROVIDER_ID,\n RootConfig,\n type AXEBambooHRConnectionConfig,\n} from '@acorex-platform/extension-bamboohr-client/contracts';\n\n//#endregion\n\n//#region ----- Types -----\n\nexport interface ConnectBambooHRCommandInput {\n providerId?: string;\n connectionScope?: AXPIntegrationConnectionScope;\n}\n\ninterface BambooHRConnectFormContext {\n companyDomain: string;\n apiKey: string;\n}\n\ninterface BambooHRConnectFormResult {\n companyDomain: string;\n apiKey: string;\n}\n\n//#endregion\n\n//#region ----- Command -----\n\n@Injectable({ providedIn: 'root' })\nexport class ConnectBambooHRCommand implements AXPCommand<ConnectBambooHRCommandInput, ConnectCommandResult> {\n private readonly layoutBuilder = inject(AXPLayoutBuilderService);\n private readonly connectionManager = inject(AXMIntegrationConnectionManager);\n\n async execute(input: ConnectBambooHRCommandInput = {}): AXPCommandExecuteResultPromise<ConnectCommandResult> {\n try {\n const providerId = input.providerId ?? AXE_BAMBOOHR_PROVIDER_ID;\n const connectionScope = input.connectionScope ?? 'tenant';\n const I18N = `@${RootConfig.config.i18n}:integration.connect`;\n const existing = await this.connectionManager.findByUniqueKey({\n providerId,\n connectionScope,\n connectionKey: 'default',\n });\n const isReconfigure = hasConfiguredIntegrationCredentials(existing);\n const existingConfig = (existing?.config ?? {}) as AXEBambooHRConnectionConfig;\n\n const form = await this.openConnectDialog({\n i18nPrefix: I18N,\n isReconfigure,\n context: {\n companyDomain: defaultTo(existingConfig.companyDomain, ''),\n apiKey: isReconfigure ? AXP_INTEGRATION_CREDENTIAL_MASK : '',\n },\n });\n\n if (!form) {\n return { success: true, kind: 'object', data: { outcome: 'cancelled' } };\n }\n\n let apiKey = trim(form.apiKey);\n if (isMaskedIntegrationCredential(apiKey) && existing) {\n apiKey = trim(existingConfig.apiKey ?? '');\n }\n\n const companyDomain = normalizeCompanyDomain(form.companyDomain);\n if (!companyDomain) {\n return {\n success: false,\n message: { text: `${I18N}.errors.company-domain-required` },\n };\n }\n if (!apiKey) {\n return {\n success: false,\n message: { text: `${I18N}.errors.api-key-required` },\n };\n }\n\n const connection = await this.connectionManager.upsertConnection({\n providerId,\n authMethodType: AXP_INTEGRATION_AUTH_METHOD_TYPE.ApiToken,\n connectionScope,\n connectionKey: 'default',\n displayName: existing?.displayName ?? 'BambooHR',\n instanceUrl: `https://${companyDomain}.bamboohr.com`,\n externalAccountName: `${companyDomain}.bamboohr.com`,\n config: {\n ...existingConfig,\n companyDomain,\n apiKey,\n } satisfies AXEBambooHRConnectionConfig,\n status: AXP_INTEGRATION_CONNECTION_STATUS.Connected,\n isRevoked: false,\n isDisabled: false,\n });\n\n return { success: true, kind: 'object',\n data: { outcome: 'connected', connection: toSafeIntegrationConnectionDto(connection) },\n };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to connect BambooHR.';\n return { success: false, message: { text: message } };\n }\n }\n\n private async openConnectDialog(input: {\n i18nPrefix: string;\n isReconfigure: boolean;\n context: BambooHRConnectFormContext;\n }): Promise<BambooHRConnectFormResult | null> {\n const result = await this.layoutBuilder\n .create()\n .dialog<BambooHRConnectFormResult | null>((dialog: IDialogBuilder<BambooHRConnectFormResult | null>) => {\n dialog\n .setTitle(\n input.isReconfigure\n ? `${input.i18nPrefix}.api-token-dialog.configure-title`\n : `${input.i18nPrefix}.api-token-dialog.title`,\n )\n .setSize('md')\n .setCloseButton(true)\n .setContext({ ...input.context })\n .content((flex: IFlexContainerBuilder) => {\n flex\n .setDirection('column')\n .setGap('12px')\n .customWidget('text-block-layout', {\n content: `${input.i18nPrefix}.api-token-dialog.instructions`,\n })\n .formField(`${input.i18nPrefix}.api-token-dialog.fields.company-domain`, (field) => {\n field.path('companyDomain');\n field.textBox({\n placeholder: `${input.i18nPrefix}.api-token-dialog.placeholders.company-domain`,\n validations: [{ rule: 'required' }],\n });\n })\n .formField(`${input.i18nPrefix}.api-token-dialog.fields.api-key`, (field) => {\n field.path('apiKey');\n field.passwordBox({\n placeholder: `${input.i18nPrefix}.api-token-dialog.placeholders.api-key`,\n revealToggle: true,\n validations: [{ rule: 'required' }],\n });\n });\n })\n .setActions((actions: IActionBuilder) => {\n actions\n .cancel('@general:actions.cancel.title')\n .submit(`${input.i18nPrefix}.api-token-dialog.actions.save`);\n })\n .onAction(async (ref: AXPDialogRef) => {\n if (ref.action() === 'cancel') {\n return null;\n }\n const ctx = ref.context() as BambooHRConnectFormContext;\n const companyDomain = trim(ctx.companyDomain);\n const apiKey = trim(ctx.apiKey);\n if (!companyDomain) {\n throw new Error(`${input.i18nPrefix}.errors.company-domain-required`);\n }\n if (!apiKey) {\n throw new Error(`${input.i18nPrefix}.errors.api-key-required`);\n }\n return { companyDomain, apiKey };\n });\n })\n .show();\n\n return resolveLayoutBuilderDialogResult<BambooHRConnectFormResult>(result);\n }\n}\n\nfunction normalizeCompanyDomain(raw: string): string {\n const value = trim(raw).toLowerCase();\n if (!value) {\n return '';\n }\n try {\n if (value.includes('://')) {\n const host = new URL(value).hostname;\n return host.replace(/\\.bamboohr\\.com$/i, '').split('.')[0] ?? '';\n }\n } catch {\n // fall through\n }\n return value\n .replace(/^https?:\\/\\//i, '')\n .replace(/\\.bamboohr\\.com.*$/i, '')\n .replace(/\\/+$/, '')\n .split('/')[0]\n ?.split('.')[0] ?? '';\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;;AAoDA;AAEA;MAGa,sBAAsB,CAAA;AADnC,IAAA,WAAA,GAAA;AAEmB,QAAA,IAAA,CAAA,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