@acorex-platform/extension-bamboohr-client 0.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/acorex-platform-extension-bamboohr-client-connect-bamboohr.command-BzjrQHyc.mjs +170 -0
- package/fesm2022/acorex-platform-extension-bamboohr-client-connect-bamboohr.command-BzjrQHyc.mjs.map +1 -0
- package/fesm2022/acorex-platform-extension-bamboohr-client-contracts.mjs +111 -0
- package/fesm2022/acorex-platform-extension-bamboohr-client-contracts.mjs.map +1 -0
- package/fesm2022/acorex-platform-extension-bamboohr-client.mjs +460 -0
- package/fesm2022/acorex-platform-extension-bamboohr-client.mjs.map +1 -0
- package/package.json +28 -0
- package/types/acorex-platform-extension-bamboohr-client-contracts.d.ts +167 -0
- package/types/acorex-platform-extension-bamboohr-client.d.ts +37 -0
package/fesm2022/acorex-platform-extension-bamboohr-client-connect-bamboohr.command-BzjrQHyc.mjs
ADDED
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import { AXP_INTEGRATION_CONNECTION_STATUS, AXP_INTEGRATION_AUTH_METHOD_TYPE } from '@acorex-platform/framework-shared/core';
|
|
2
|
+
import { AXMIntegrationConnectionManager, hasConfiguredIntegrationCredentials, AXP_INTEGRATION_CREDENTIAL_MASK, isMaskedIntegrationCredential, toSafeIntegrationConnectionDto } from '@acorex-platform/module-integration-management-client';
|
|
3
|
+
import { AXPLayoutBuilderService, resolveLayoutBuilderDialogResult } from '@acorex-platform/framework-client/layout/builder';
|
|
4
|
+
import * as i0 from '@angular/core';
|
|
5
|
+
import { inject, Injectable } from '@angular/core';
|
|
6
|
+
import { defaultTo, trim } from 'lodash-es';
|
|
7
|
+
import { AXE_BAMBOOHR_PROVIDER_ID, RootConfig } from '@acorex-platform/extension-bamboohr-client/contracts';
|
|
8
|
+
|
|
9
|
+
//#endregion
|
|
10
|
+
//#region ----- Command -----
|
|
11
|
+
class ConnectBambooHRCommand {
|
|
12
|
+
constructor() {
|
|
13
|
+
this.layoutBuilder = inject(AXPLayoutBuilderService);
|
|
14
|
+
this.connectionManager = inject(AXMIntegrationConnectionManager);
|
|
15
|
+
}
|
|
16
|
+
async execute(input = {}) {
|
|
17
|
+
try {
|
|
18
|
+
const providerId = input.providerId ?? AXE_BAMBOOHR_PROVIDER_ID;
|
|
19
|
+
const connectionScope = input.connectionScope ?? 'tenant';
|
|
20
|
+
const I18N = `@${RootConfig.config.i18n}:integration.connect`;
|
|
21
|
+
const existing = await this.connectionManager.findByUniqueKey({
|
|
22
|
+
providerId,
|
|
23
|
+
connectionScope,
|
|
24
|
+
connectionKey: 'default',
|
|
25
|
+
});
|
|
26
|
+
const isReconfigure = hasConfiguredIntegrationCredentials(existing);
|
|
27
|
+
const existingConfig = (existing?.config ?? {});
|
|
28
|
+
const form = await this.openConnectDialog({
|
|
29
|
+
i18nPrefix: I18N,
|
|
30
|
+
isReconfigure,
|
|
31
|
+
context: {
|
|
32
|
+
companyDomain: defaultTo(existingConfig.companyDomain, ''),
|
|
33
|
+
apiKey: isReconfigure ? AXP_INTEGRATION_CREDENTIAL_MASK : '',
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
if (!form) {
|
|
37
|
+
return { success: true, kind: 'object', data: { outcome: 'cancelled' } };
|
|
38
|
+
}
|
|
39
|
+
let apiKey = trim(form.apiKey);
|
|
40
|
+
if (isMaskedIntegrationCredential(apiKey) && existing) {
|
|
41
|
+
apiKey = trim(existingConfig.apiKey ?? '');
|
|
42
|
+
}
|
|
43
|
+
const companyDomain = normalizeCompanyDomain(form.companyDomain);
|
|
44
|
+
if (!companyDomain) {
|
|
45
|
+
return {
|
|
46
|
+
success: false,
|
|
47
|
+
message: { text: `${I18N}.errors.company-domain-required` },
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
if (!apiKey) {
|
|
51
|
+
return {
|
|
52
|
+
success: false,
|
|
53
|
+
message: { text: `${I18N}.errors.api-key-required` },
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
const connection = await this.connectionManager.upsertConnection({
|
|
57
|
+
providerId,
|
|
58
|
+
authMethodType: AXP_INTEGRATION_AUTH_METHOD_TYPE.ApiToken,
|
|
59
|
+
connectionScope,
|
|
60
|
+
connectionKey: 'default',
|
|
61
|
+
displayName: existing?.displayName ?? 'BambooHR',
|
|
62
|
+
instanceUrl: `https://${companyDomain}.bamboohr.com`,
|
|
63
|
+
externalAccountName: `${companyDomain}.bamboohr.com`,
|
|
64
|
+
config: {
|
|
65
|
+
...existingConfig,
|
|
66
|
+
companyDomain,
|
|
67
|
+
apiKey,
|
|
68
|
+
},
|
|
69
|
+
status: AXP_INTEGRATION_CONNECTION_STATUS.Connected,
|
|
70
|
+
isRevoked: false,
|
|
71
|
+
isDisabled: false,
|
|
72
|
+
});
|
|
73
|
+
return { success: true, kind: 'object',
|
|
74
|
+
data: { outcome: 'connected', connection: toSafeIntegrationConnectionDto(connection) },
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
catch (error) {
|
|
78
|
+
const message = error instanceof Error ? error.message : 'Failed to connect BambooHR.';
|
|
79
|
+
return { success: false, message: { text: message } };
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
async openConnectDialog(input) {
|
|
83
|
+
const result = await this.layoutBuilder
|
|
84
|
+
.create()
|
|
85
|
+
.dialog((dialog) => {
|
|
86
|
+
dialog
|
|
87
|
+
.setTitle(input.isReconfigure
|
|
88
|
+
? `${input.i18nPrefix}.api-token-dialog.configure-title`
|
|
89
|
+
: `${input.i18nPrefix}.api-token-dialog.title`)
|
|
90
|
+
.setSize('md')
|
|
91
|
+
.setCloseButton(true)
|
|
92
|
+
.setContext({ ...input.context })
|
|
93
|
+
.content((flex) => {
|
|
94
|
+
flex
|
|
95
|
+
.setDirection('column')
|
|
96
|
+
.setGap('12px')
|
|
97
|
+
.customWidget('text-block-layout', {
|
|
98
|
+
content: `${input.i18nPrefix}.api-token-dialog.instructions`,
|
|
99
|
+
})
|
|
100
|
+
.formField(`${input.i18nPrefix}.api-token-dialog.fields.company-domain`, (field) => {
|
|
101
|
+
field.path('companyDomain');
|
|
102
|
+
field.textBox({
|
|
103
|
+
placeholder: `${input.i18nPrefix}.api-token-dialog.placeholders.company-domain`,
|
|
104
|
+
validations: [{ rule: 'required' }],
|
|
105
|
+
});
|
|
106
|
+
})
|
|
107
|
+
.formField(`${input.i18nPrefix}.api-token-dialog.fields.api-key`, (field) => {
|
|
108
|
+
field.path('apiKey');
|
|
109
|
+
field.passwordBox({
|
|
110
|
+
placeholder: `${input.i18nPrefix}.api-token-dialog.placeholders.api-key`,
|
|
111
|
+
revealToggle: true,
|
|
112
|
+
validations: [{ rule: 'required' }],
|
|
113
|
+
});
|
|
114
|
+
});
|
|
115
|
+
})
|
|
116
|
+
.setActions((actions) => {
|
|
117
|
+
actions
|
|
118
|
+
.cancel('@general:actions.cancel.title')
|
|
119
|
+
.submit(`${input.i18nPrefix}.api-token-dialog.actions.save`);
|
|
120
|
+
})
|
|
121
|
+
.onAction(async (ref) => {
|
|
122
|
+
if (ref.action() === 'cancel') {
|
|
123
|
+
return null;
|
|
124
|
+
}
|
|
125
|
+
const ctx = ref.context();
|
|
126
|
+
const companyDomain = trim(ctx.companyDomain);
|
|
127
|
+
const apiKey = trim(ctx.apiKey);
|
|
128
|
+
if (!companyDomain) {
|
|
129
|
+
throw new Error(`${input.i18nPrefix}.errors.company-domain-required`);
|
|
130
|
+
}
|
|
131
|
+
if (!apiKey) {
|
|
132
|
+
throw new Error(`${input.i18nPrefix}.errors.api-key-required`);
|
|
133
|
+
}
|
|
134
|
+
return { companyDomain, apiKey };
|
|
135
|
+
});
|
|
136
|
+
})
|
|
137
|
+
.show();
|
|
138
|
+
return resolveLayoutBuilderDialogResult(result);
|
|
139
|
+
}
|
|
140
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ConnectBambooHRCommand, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
141
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ConnectBambooHRCommand, providedIn: 'root' }); }
|
|
142
|
+
}
|
|
143
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ConnectBambooHRCommand, decorators: [{
|
|
144
|
+
type: Injectable,
|
|
145
|
+
args: [{ providedIn: 'root' }]
|
|
146
|
+
}] });
|
|
147
|
+
function normalizeCompanyDomain(raw) {
|
|
148
|
+
const value = trim(raw).toLowerCase();
|
|
149
|
+
if (!value) {
|
|
150
|
+
return '';
|
|
151
|
+
}
|
|
152
|
+
try {
|
|
153
|
+
if (value.includes('://')) {
|
|
154
|
+
const host = new URL(value).hostname;
|
|
155
|
+
return host.replace(/\.bamboohr\.com$/i, '').split('.')[0] ?? '';
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
catch {
|
|
159
|
+
// fall through
|
|
160
|
+
}
|
|
161
|
+
return value
|
|
162
|
+
.replace(/^https?:\/\//i, '')
|
|
163
|
+
.replace(/\.bamboohr\.com.*$/i, '')
|
|
164
|
+
.replace(/\/+$/, '')
|
|
165
|
+
.split('/')[0]
|
|
166
|
+
?.split('.')[0] ?? '';
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export { ConnectBambooHRCommand };
|
|
170
|
+
//# sourceMappingURL=acorex-platform-extension-bamboohr-client-connect-bamboohr.command-BzjrQHyc.mjs.map
|
package/fesm2022/acorex-platform-extension-bamboohr-client-connect-bamboohr.command-BzjrQHyc.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
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.*$/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,CAAC,CAAC;UACX,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE;AACzB;;;;"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
//#region ----- Module Config -----
|
|
2
|
+
const config = {
|
|
3
|
+
i18n: 'extensions-bamboohr',
|
|
4
|
+
};
|
|
5
|
+
const MODULE_NAME = 'BambooHRExtension';
|
|
6
|
+
const PROVIDER_ID = 'bamboohr';
|
|
7
|
+
const DOMAIN_ID = 'human-capital';
|
|
8
|
+
const RESOURCE_EMPLOYEE = 'employee';
|
|
9
|
+
const RootConfig = {
|
|
10
|
+
config,
|
|
11
|
+
module: {
|
|
12
|
+
name: MODULE_NAME,
|
|
13
|
+
title: `@${config.i18n}:integration.display-name`,
|
|
14
|
+
icon: 'fa-light fa-users',
|
|
15
|
+
},
|
|
16
|
+
integration: {
|
|
17
|
+
providerId: PROVIDER_ID,
|
|
18
|
+
domainId: DOMAIN_ID,
|
|
19
|
+
resourceEmployee: RESOURCE_EMPLOYEE,
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
const AXE_BAMBOOHR_DOMAIN_ID = DOMAIN_ID;
|
|
23
|
+
const AXE_BAMBOOHR_PROVIDER_ID = PROVIDER_ID;
|
|
24
|
+
const AXE_BAMBOOHR_RESOURCE_EMPLOYEE = RESOURCE_EMPLOYEE;
|
|
25
|
+
//#endregion
|
|
26
|
+
|
|
27
|
+
//#region ----- Command Keys -----
|
|
28
|
+
const AXEBambooHRCommandKeys = {
|
|
29
|
+
ConnectionConnect: 'bamboohr-extension.Connection:Connect',
|
|
30
|
+
ConnectionValidate: 'bamboohr-extension.Connection:Validate',
|
|
31
|
+
EmployeeSyncFromBambooHR: 'bamboohr-extension.Employee:SyncFromBambooHR',
|
|
32
|
+
EmployeeSync: 'bamboohr-extension.Employee:Sync',
|
|
33
|
+
};
|
|
34
|
+
//#endregion
|
|
35
|
+
|
|
36
|
+
//#region ----- Menu Keys -----
|
|
37
|
+
const AXEBambooHRMenuKeys = {
|
|
38
|
+
BambooHRExtensionConfig: 'bamboohr-extension:Menu:Configuration',
|
|
39
|
+
};
|
|
40
|
+
//#endregion
|
|
41
|
+
|
|
42
|
+
//#region ----- Permission Keys -----
|
|
43
|
+
/**
|
|
44
|
+
* Administration capabilities used by this extension.
|
|
45
|
+
* Domain capability keys for this module. Root groups live in `AXPCommonPermissionGroupKeys` (common contracts).
|
|
46
|
+
*/
|
|
47
|
+
const AXPAdministrationPermissionKeys = {
|
|
48
|
+
Access: 'Administration:Permission:Access',
|
|
49
|
+
MaintainUsersAndRoles: 'Administration:Permission:MaintainUsersAndRoles',
|
|
50
|
+
ManageSessions: 'Administration:Permission:ManageSessions',
|
|
51
|
+
MaintainPolicies: 'Administration:Permission:MaintainPolicies',
|
|
52
|
+
ViewIntegrations: 'Administration:Permission:ViewIntegrations',
|
|
53
|
+
MaintainConnections: 'Administration:Permission:MaintainConnections',
|
|
54
|
+
ManageIntegrationActions: 'Administration:Permission:ManageIntegrationActions',
|
|
55
|
+
MaintainWorkflows: 'Administration:Permission:MaintainWorkflows',
|
|
56
|
+
ManageWorkflowActions: 'Administration:Permission:ManageWorkflowActions',
|
|
57
|
+
ViewRules: 'Administration:Permission:ViewRules',
|
|
58
|
+
MaintainRules: 'Administration:Permission:MaintainRules',
|
|
59
|
+
ManageRuleActions: 'Administration:Permission:ManageRuleActions',
|
|
60
|
+
MaintainAi: 'Administration:Permission:MaintainAi',
|
|
61
|
+
UseAiAssist: 'Administration:Permission:UseAiAssist',
|
|
62
|
+
MaintainDashboards: 'Administration:Permission:MaintainDashboards',
|
|
63
|
+
ViewJobs: 'Administration:Permission:ViewJobs',
|
|
64
|
+
ManageJobActions: 'Administration:Permission:ManageJobActions',
|
|
65
|
+
ViewObservability: 'Administration:Permission:ViewObservability',
|
|
66
|
+
MaintainObservability: 'Administration:Permission:MaintainObservability',
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* @deprecated Prefer {@link AXPAdministrationPermissionKeys}.
|
|
70
|
+
* Legacy nested shape kept so existing imports compile during migration.
|
|
71
|
+
*/
|
|
72
|
+
const AXEBambooHRPermissions = {
|
|
73
|
+
BambooHRExtension: {
|
|
74
|
+
Management: AXPAdministrationPermissionKeys.MaintainConnections,
|
|
75
|
+
Catalog: {
|
|
76
|
+
View: AXPAdministrationPermissionKeys.ViewIntegrations,
|
|
77
|
+
},
|
|
78
|
+
EmployeeImport: {
|
|
79
|
+
Execute: AXPAdministrationPermissionKeys.ManageIntegrationActions,
|
|
80
|
+
},
|
|
81
|
+
EmployeeSync: {
|
|
82
|
+
Execute: AXPAdministrationPermissionKeys.ManageIntegrationActions,
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
};
|
|
86
|
+
//#endregion
|
|
87
|
+
|
|
88
|
+
//#region ----- Setting Keys -----
|
|
89
|
+
const moduleKey = RootConfig.module.name;
|
|
90
|
+
const AXEBambooHRExtensionSettings = {
|
|
91
|
+
ConnectionsPanel: `${moduleKey}:Setting:ConnectionsPanel`,
|
|
92
|
+
};
|
|
93
|
+
//#endregion
|
|
94
|
+
|
|
95
|
+
//#region ----- BambooHR tenant connection config -----
|
|
96
|
+
const AXE_BAMBOOHR_EMPLOYEE_SYNC_STRATEGIES = [
|
|
97
|
+
'merge',
|
|
98
|
+
'remoteOverride',
|
|
99
|
+
'localOverride',
|
|
100
|
+
];
|
|
101
|
+
//#endregion
|
|
102
|
+
|
|
103
|
+
//#region ----- BambooHR employee sync API DTOs -----
|
|
104
|
+
//#endregion
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Generated bundle index. Do not edit.
|
|
108
|
+
*/
|
|
109
|
+
|
|
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 };
|
|
111
|
+
//# sourceMappingURL=acorex-platform-extension-bamboohr-client-contracts.mjs.map
|
|
@@ -0,0 +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,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;AACpC,KAAA;;AAGI,MAAM,sBAAsB,GAAG;AAC/B,MAAM,wBAAwB,GAAG;AACjC,MAAM,8BAA8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E,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;;;;"}
|
|
@@ -0,0 +1,460 @@
|
|
|
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, AXP_MODULE_MANIFEST_PROVIDER, AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER } from '@acorex-platform/framework-client/core';
|
|
4
|
+
import { AXPEntityService, ensureListActions, actionExists, AXP_ENTITY_MODIFIER } from '@acorex-platform/framework-client/layout/entity';
|
|
5
|
+
import { provideCommandSetups } from '@acorex-platform/framework-client/runtime';
|
|
6
|
+
import * as i0 from '@angular/core';
|
|
7
|
+
import { inject, Injectable, NgModule, input, computed, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
8
|
+
import { AXE_BAMBOOHR_PROVIDER_ID, AXEBambooHRCommandKeys, RootConfig as RootConfig$1, AXE_BAMBOOHR_DOMAIN_ID, AXPAdministrationPermissionKeys, AXEBambooHRMenuKeys } from '@acorex-platform/extension-bamboohr-client/contracts';
|
|
9
|
+
import { RootConfig } from '@acorex-platform/module-human-capital-management-client/contracts';
|
|
10
|
+
import { AXPSystemActionType, AXP_INTEGRATION_CAPABILITY, AXP_INTEGRATION_CATEGORY, AXPWidgetsList, AXP_INTEGRATION_AUTH_METHOD_TYPE, AXP_INTEGRATION_CONNECTION_SCOPE, AXP_INTEGRATION_CONNECTION_STATUS } from '@acorex-platform/framework-shared/core';
|
|
11
|
+
import { AXPEntityCommandScope } from '@acorex-platform/framework-shared/entity';
|
|
12
|
+
import { trim, defaultTo } from 'lodash-es';
|
|
13
|
+
import { AXPCommonMenuKeys } from '@acorex-platform/module-common-client/contracts';
|
|
14
|
+
|
|
15
|
+
const AXE_BAMBOOHR_EXPRESSION_SCOPE = 'BambooHRExtension';
|
|
16
|
+
|
|
17
|
+
//#region ----- Imports -----
|
|
18
|
+
//#endregion
|
|
19
|
+
class AXEBambooHREmployeeLinkExpressionEvaluatorScopeProvider {
|
|
20
|
+
constructor() {
|
|
21
|
+
this.entityService = inject(AXPEntityService);
|
|
22
|
+
this.integrationRuntime = inject(AXPIntegrationRuntimeService);
|
|
23
|
+
}
|
|
24
|
+
async provide(context) {
|
|
25
|
+
context.addScope(AXE_BAMBOOHR_EXPRESSION_SCOPE, {
|
|
26
|
+
hasEmployeeLink: async (platformEmployeeIdRaw) => {
|
|
27
|
+
const platformEmployeeId = typeof platformEmployeeIdRaw === 'string' ? platformEmployeeIdRaw.trim() : '';
|
|
28
|
+
if (!platformEmployeeId) {
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
const employee = (await this.entityService
|
|
32
|
+
.withEntity(RootConfig.module.name, RootConfig.entities.employee.name)
|
|
33
|
+
.data()
|
|
34
|
+
.byKey(platformEmployeeId));
|
|
35
|
+
return employee?.integrationRef?.source === AXE_BAMBOOHR_PROVIDER_ID;
|
|
36
|
+
},
|
|
37
|
+
hasBambooHRConnection: async () => {
|
|
38
|
+
try {
|
|
39
|
+
await this.integrationRuntime.getConnection({
|
|
40
|
+
providerId: AXE_BAMBOOHR_PROVIDER_ID,
|
|
41
|
+
connectionScope: 'tenant',
|
|
42
|
+
});
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
catch {
|
|
46
|
+
return false;
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
//#endregion
|
|
53
|
+
|
|
54
|
+
//#region ----- Imports -----
|
|
55
|
+
//#endregion
|
|
56
|
+
const SYNC_ALL_ORDER = 36;
|
|
57
|
+
const SYNC_ONE_ORDER = 37;
|
|
58
|
+
function buildSyncAllAction() {
|
|
59
|
+
return {
|
|
60
|
+
name: AXEBambooHRCommandKeys.EmployeeSyncFromBambooHR,
|
|
61
|
+
title: '@extensions-bamboohr:actions.sync-from-bamboohr.title',
|
|
62
|
+
command: { name: AXEBambooHRCommandKeys.EmployeeSyncFromBambooHR },
|
|
63
|
+
priority: 'secondary',
|
|
64
|
+
type: AXPSystemActionType.Import,
|
|
65
|
+
icon: 'fa-light fa-users',
|
|
66
|
+
scope: AXPEntityCommandScope.TypeLevel,
|
|
67
|
+
order: SYNC_ALL_ORDER,
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
function buildSyncOneAction() {
|
|
71
|
+
return {
|
|
72
|
+
name: AXEBambooHRCommandKeys.EmployeeSync,
|
|
73
|
+
title: '@extensions-bamboohr:actions.sync.title',
|
|
74
|
+
command: {
|
|
75
|
+
name: AXEBambooHRCommandKeys.EmployeeSync,
|
|
76
|
+
options: { platformEmployeeId: '{{ context.eval("id") }}' },
|
|
77
|
+
},
|
|
78
|
+
priority: 'secondary',
|
|
79
|
+
type: AXPSystemActionType.Sync,
|
|
80
|
+
icon: 'fa-light fa-arrows-rotate',
|
|
81
|
+
scope: AXPEntityCommandScope.Individual,
|
|
82
|
+
order: SYNC_ONE_ORDER,
|
|
83
|
+
hidden: `{{ !(await ${AXE_BAMBOOHR_EXPRESSION_SCOPE}.hasEmployeeLink(context.eval("id"))) }}`,
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
/** Adds BambooHR sync actions to HumanCapitalManagement.Employee views. */
|
|
87
|
+
const AXEBambooHREmployeeEntityModifier = {
|
|
88
|
+
entityName: RootConfig.entities.employee.name,
|
|
89
|
+
order: 50,
|
|
90
|
+
modifier: (ctx) => {
|
|
91
|
+
if (ctx.module.get() !== RootConfig.module.name) {
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
ensureListActions(ctx);
|
|
95
|
+
ctx.interfaces.update((interfaces) => {
|
|
96
|
+
const next = (interfaces ?? {});
|
|
97
|
+
const master = (next['master'] ?? {});
|
|
98
|
+
const list = (master['list'] ?? { actions: [], views: [] });
|
|
99
|
+
const listActions = (list['actions'] ?? []);
|
|
100
|
+
if (!actionExists(listActions, AXEBambooHRCommandKeys.EmployeeSyncFromBambooHR)) {
|
|
101
|
+
listActions.push(buildSyncAllAction());
|
|
102
|
+
}
|
|
103
|
+
list['actions'] = listActions;
|
|
104
|
+
master['list'] = list;
|
|
105
|
+
const single = master['single'];
|
|
106
|
+
if (single) {
|
|
107
|
+
const singleActions = (single['actions'] ?? []);
|
|
108
|
+
if (!actionExists(singleActions, AXEBambooHRCommandKeys.EmployeeSync)) {
|
|
109
|
+
singleActions.push(buildSyncOneAction());
|
|
110
|
+
}
|
|
111
|
+
single['actions'] = singleActions;
|
|
112
|
+
}
|
|
113
|
+
next['master'] = master;
|
|
114
|
+
return next;
|
|
115
|
+
});
|
|
116
|
+
},
|
|
117
|
+
};
|
|
118
|
+
//#endregion
|
|
119
|
+
|
|
120
|
+
//#region ----- Imports -----
|
|
121
|
+
//#endregion
|
|
122
|
+
class AXEHumanCapitalIntegrationDomainProvider {
|
|
123
|
+
async provide(context) {
|
|
124
|
+
const I18N = `@${RootConfig$1.config.i18n}:integration.domain`;
|
|
125
|
+
context.register({
|
|
126
|
+
id: AXE_BAMBOOHR_DOMAIN_ID,
|
|
127
|
+
module: RootConfig$1.module.name,
|
|
128
|
+
displayName: `${I18N}.title`,
|
|
129
|
+
description: `${I18N}.description`,
|
|
130
|
+
icon: RootConfig$1.module.icon,
|
|
131
|
+
category: AXP_INTEGRATION_CATEGORY.HumanCapital,
|
|
132
|
+
capabilities: [AXP_INTEGRATION_CAPABILITY.Sync, AXP_INTEGRATION_CAPABILITY.Import],
|
|
133
|
+
sortOrder: 25,
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXEHumanCapitalIntegrationDomainProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
137
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXEHumanCapitalIntegrationDomainProvider }); }
|
|
138
|
+
}
|
|
139
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXEHumanCapitalIntegrationDomainProvider, decorators: [{
|
|
140
|
+
type: Injectable
|
|
141
|
+
}] });
|
|
142
|
+
|
|
143
|
+
//#region ----- BambooHR logo registry key -----
|
|
144
|
+
const axpBambooHRLogoKey = 'bamboohr';
|
|
145
|
+
//#endregion
|
|
146
|
+
|
|
147
|
+
//#region ----- Imports -----
|
|
148
|
+
//#endregion
|
|
149
|
+
class AXEBambooHRIntegrationProvider {
|
|
150
|
+
async provide(context) {
|
|
151
|
+
const I18N = `@${RootConfig$1.config.i18n}:integration`;
|
|
152
|
+
context.register({
|
|
153
|
+
domainId: AXE_BAMBOOHR_DOMAIN_ID,
|
|
154
|
+
id: AXE_BAMBOOHR_PROVIDER_ID,
|
|
155
|
+
module: RootConfig$1.module.name,
|
|
156
|
+
displayName: `${I18N}.display-name`,
|
|
157
|
+
description: `${I18N}.description`,
|
|
158
|
+
icon: RootConfig$1.module.icon,
|
|
159
|
+
logoKey: axpBambooHRLogoKey,
|
|
160
|
+
capabilities: [AXP_INTEGRATION_CAPABILITY.Sync, AXP_INTEGRATION_CAPABILITY.Import],
|
|
161
|
+
connectionScopes: [AXP_INTEGRATION_CONNECTION_SCOPE.Tenant],
|
|
162
|
+
allowMultipleConnections: false,
|
|
163
|
+
defaultConnectionKey: 'default',
|
|
164
|
+
connectCommandKey: AXEBambooHRCommandKeys.ConnectionConnect,
|
|
165
|
+
authMethods: [
|
|
166
|
+
{
|
|
167
|
+
type: AXP_INTEGRATION_AUTH_METHOD_TYPE.ApiToken,
|
|
168
|
+
label: `${I18N}.auth.api-token.label`,
|
|
169
|
+
instructions: `${I18N}.auth.api-token.instructions`,
|
|
170
|
+
supportsValidation: true,
|
|
171
|
+
fields: [
|
|
172
|
+
{
|
|
173
|
+
type: AXPWidgetsList.Editors.TextBox,
|
|
174
|
+
path: 'companyDomain',
|
|
175
|
+
options: { placeholder: `${I18N}.auth.api-token.company-domain.placeholder` },
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
type: AXPWidgetsList.Editors.PasswordBox,
|
|
179
|
+
path: 'apiKey',
|
|
180
|
+
options: { placeholder: `${I18N}.auth.api-token.api-key.placeholder` },
|
|
181
|
+
},
|
|
182
|
+
],
|
|
183
|
+
},
|
|
184
|
+
],
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXEBambooHRIntegrationProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
188
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXEBambooHRIntegrationProvider }); }
|
|
189
|
+
}
|
|
190
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXEBambooHRIntegrationProvider, decorators: [{
|
|
191
|
+
type: Injectable
|
|
192
|
+
}] });
|
|
193
|
+
|
|
194
|
+
//#region ----- Imports -----
|
|
195
|
+
//#endregion
|
|
196
|
+
class AXEBambooHRIntegrationRuntimeProvider {
|
|
197
|
+
constructor() {
|
|
198
|
+
this.providerId = AXE_BAMBOOHR_PROVIDER_ID;
|
|
199
|
+
this.secretStore = inject(AXP_INTEGRATION_SECRET_STORE, { optional: true });
|
|
200
|
+
}
|
|
201
|
+
async getHooks() {
|
|
202
|
+
return {
|
|
203
|
+
validateConnection: (ctx) => this.validateConnection(ctx),
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
async validateConnection(ctx) {
|
|
207
|
+
const config = (ctx.config ?? {});
|
|
208
|
+
const companyDomain = trim(defaultTo(config.companyDomain, ''));
|
|
209
|
+
const apiKey = trim(defaultTo(config.apiKey, await this.resolveApiKeyFromSecret(ctx)));
|
|
210
|
+
if (!companyDomain || !apiKey) {
|
|
211
|
+
return {
|
|
212
|
+
valid: false,
|
|
213
|
+
status: AXP_INTEGRATION_CONNECTION_STATUS.Invalid,
|
|
214
|
+
errorMessage: 'BambooHR company domain and API key are required.',
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
return {
|
|
218
|
+
valid: true,
|
|
219
|
+
status: AXP_INTEGRATION_CONNECTION_STATUS.Connected,
|
|
220
|
+
externalAccountName: `${companyDomain}.bamboohr.com`,
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
async resolveApiKeyFromSecret(ctx) {
|
|
224
|
+
if (!this.secretStore || !trim(defaultTo(ctx.secretRef, ''))) {
|
|
225
|
+
return '';
|
|
226
|
+
}
|
|
227
|
+
const credentials = await this.secretStore.resolve(ctx.secretRef, ctx);
|
|
228
|
+
return trim(defaultTo(credentials.apiToken ?? credentials.token ?? credentials.password, ''));
|
|
229
|
+
}
|
|
230
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXEBambooHRIntegrationRuntimeProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
231
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXEBambooHRIntegrationRuntimeProvider }); }
|
|
232
|
+
}
|
|
233
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXEBambooHRIntegrationRuntimeProvider, decorators: [{
|
|
234
|
+
type: Injectable
|
|
235
|
+
}] });
|
|
236
|
+
const provideBambooHRIntegrationRuntimeProvider = {
|
|
237
|
+
provide: AXP_INTEGRATION_RUNTIME_PROVIDER,
|
|
238
|
+
useClass: AXEBambooHRIntegrationRuntimeProvider,
|
|
239
|
+
multi: true,
|
|
240
|
+
};
|
|
241
|
+
|
|
242
|
+
const BambooHRExtensionManifest = {
|
|
243
|
+
name: RootConfig$1.module.name,
|
|
244
|
+
version: '1.0.0',
|
|
245
|
+
title: RootConfig$1.module.title,
|
|
246
|
+
icon: RootConfig$1.module.icon,
|
|
247
|
+
i18n: RootConfig$1.config.i18n,
|
|
248
|
+
type: 'integration',
|
|
249
|
+
domain: 'human-capital',
|
|
250
|
+
dependencies: [],
|
|
251
|
+
};
|
|
252
|
+
|
|
253
|
+
//#region ----- Imports -----
|
|
254
|
+
//#endregion
|
|
255
|
+
class AXEBambooHRMenuProvider {
|
|
256
|
+
async provide(context) {
|
|
257
|
+
const module = RootConfig$1.module;
|
|
258
|
+
const policy = {
|
|
259
|
+
features: [module.name],
|
|
260
|
+
permissions: [AXPAdministrationPermissionKeys.MaintainConnections],
|
|
261
|
+
};
|
|
262
|
+
const configMenu = context.find(AXPCommonMenuKeys.Configuration);
|
|
263
|
+
if (!context.find(AXEBambooHRMenuKeys.BambooHRExtensionConfig).exists) {
|
|
264
|
+
configMenu.addItems([
|
|
265
|
+
{
|
|
266
|
+
name: AXEBambooHRMenuKeys.BambooHRExtensionConfig,
|
|
267
|
+
text: '@extensions-bamboohr:module.menus.configuration.title',
|
|
268
|
+
icon: module.icon,
|
|
269
|
+
type: 'menu',
|
|
270
|
+
priority: 8930,
|
|
271
|
+
policy,
|
|
272
|
+
children: [],
|
|
273
|
+
},
|
|
274
|
+
]);
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXEBambooHRMenuProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
278
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXEBambooHRMenuProvider }); }
|
|
279
|
+
}
|
|
280
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXEBambooHRMenuProvider, decorators: [{
|
|
281
|
+
type: Injectable
|
|
282
|
+
}] });
|
|
283
|
+
|
|
284
|
+
//#region ----- Imports -----
|
|
285
|
+
//#endregion
|
|
286
|
+
//#region ----- Provider -----
|
|
287
|
+
class AXEBambooHRSettingsProvider {
|
|
288
|
+
async provide(_context) {
|
|
289
|
+
// Tenant BambooHR connections are managed on Administration → Integrations.
|
|
290
|
+
}
|
|
291
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXEBambooHRSettingsProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
292
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXEBambooHRSettingsProvider }); }
|
|
293
|
+
}
|
|
294
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXEBambooHRSettingsProvider, decorators: [{
|
|
295
|
+
type: Injectable
|
|
296
|
+
}] });
|
|
297
|
+
const provideBambooHRSettingsProvider = {
|
|
298
|
+
provide: AXP_SETTING_DEFINITION_PROVIDER,
|
|
299
|
+
useClass: AXEBambooHRSettingsProvider,
|
|
300
|
+
multi: true,
|
|
301
|
+
};
|
|
302
|
+
|
|
303
|
+
//#region ----- Imports -----
|
|
304
|
+
//#endregion
|
|
305
|
+
const bambooHRLogoProvider = {
|
|
306
|
+
key: axpBambooHRLogoKey,
|
|
307
|
+
resolve: async (request) => ({
|
|
308
|
+
kind: 'component',
|
|
309
|
+
load: () => Promise.resolve().then(function () { return bamboohrLogo_component; }).then((module) => module.AXEBambooHRLogoComponent),
|
|
310
|
+
inputs: {
|
|
311
|
+
appearance: request.appearance,
|
|
312
|
+
size: request.size,
|
|
313
|
+
},
|
|
314
|
+
}),
|
|
315
|
+
};
|
|
316
|
+
const AXE_BAMBOOHR_LOGO_PROVIDER = {
|
|
317
|
+
provide: AXP_LOGO_PROVIDER,
|
|
318
|
+
useValue: bambooHRLogoProvider,
|
|
319
|
+
multi: true,
|
|
320
|
+
};
|
|
321
|
+
|
|
322
|
+
//#region ----- Imports -----
|
|
323
|
+
//#endregion
|
|
324
|
+
class AXEBambooHRExtensionModule {
|
|
325
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXEBambooHRExtensionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
326
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.8", ngImport: i0, type: AXEBambooHRExtensionModule, imports: [AXMIntegrationManagementModule] }); }
|
|
327
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXEBambooHRExtensionModule, providers: [
|
|
328
|
+
AXE_BAMBOOHR_LOGO_PROVIDER,
|
|
329
|
+
{ provide: AXP_MODULE_MANIFEST_PROVIDER, useValue: BambooHRExtensionManifest, multi: true },
|
|
330
|
+
{ provide: AXP_MENU_PROVIDER, useClass: AXEBambooHRMenuProvider, multi: true },
|
|
331
|
+
{ provide: AXP_ENTITY_MODIFIER, useValue: AXEBambooHREmployeeEntityModifier, multi: true },
|
|
332
|
+
{
|
|
333
|
+
provide: AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER,
|
|
334
|
+
useClass: AXEBambooHREmployeeLinkExpressionEvaluatorScopeProvider,
|
|
335
|
+
multi: true,
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
provide: AXP_INTEGRATION_DOMAIN_PROVIDER,
|
|
339
|
+
useClass: AXEHumanCapitalIntegrationDomainProvider,
|
|
340
|
+
multi: true,
|
|
341
|
+
},
|
|
342
|
+
{ provide: AXP_INTEGRATION_PROVIDER, useClass: AXEBambooHRIntegrationProvider, multi: true },
|
|
343
|
+
provideBambooHRIntegrationRuntimeProvider,
|
|
344
|
+
provideBambooHRSettingsProvider,
|
|
345
|
+
provideCommandSetups([
|
|
346
|
+
{
|
|
347
|
+
key: AXEBambooHRCommandKeys.ConnectionConnect,
|
|
348
|
+
command: () => import('./acorex-platform-extension-bamboohr-client-connect-bamboohr.command-BzjrQHyc.mjs').then((c) => c.ConnectBambooHRCommand),
|
|
349
|
+
},
|
|
350
|
+
]),
|
|
351
|
+
], imports: [AXMIntegrationManagementModule] }); }
|
|
352
|
+
}
|
|
353
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXEBambooHRExtensionModule, decorators: [{
|
|
354
|
+
type: NgModule,
|
|
355
|
+
args: [{
|
|
356
|
+
imports: [AXMIntegrationManagementModule],
|
|
357
|
+
providers: [
|
|
358
|
+
AXE_BAMBOOHR_LOGO_PROVIDER,
|
|
359
|
+
{ provide: AXP_MODULE_MANIFEST_PROVIDER, useValue: BambooHRExtensionManifest, multi: true },
|
|
360
|
+
{ provide: AXP_MENU_PROVIDER, useClass: AXEBambooHRMenuProvider, multi: true },
|
|
361
|
+
{ provide: AXP_ENTITY_MODIFIER, useValue: AXEBambooHREmployeeEntityModifier, multi: true },
|
|
362
|
+
{
|
|
363
|
+
provide: AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER,
|
|
364
|
+
useClass: AXEBambooHREmployeeLinkExpressionEvaluatorScopeProvider,
|
|
365
|
+
multi: true,
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
provide: AXP_INTEGRATION_DOMAIN_PROVIDER,
|
|
369
|
+
useClass: AXEHumanCapitalIntegrationDomainProvider,
|
|
370
|
+
multi: true,
|
|
371
|
+
},
|
|
372
|
+
{ provide: AXP_INTEGRATION_PROVIDER, useClass: AXEBambooHRIntegrationProvider, multi: true },
|
|
373
|
+
provideBambooHRIntegrationRuntimeProvider,
|
|
374
|
+
provideBambooHRSettingsProvider,
|
|
375
|
+
provideCommandSetups([
|
|
376
|
+
{
|
|
377
|
+
key: AXEBambooHRCommandKeys.ConnectionConnect,
|
|
378
|
+
command: () => import('./acorex-platform-extension-bamboohr-client-connect-bamboohr.command-BzjrQHyc.mjs').then((c) => c.ConnectBambooHRCommand),
|
|
379
|
+
},
|
|
380
|
+
]),
|
|
381
|
+
],
|
|
382
|
+
}]
|
|
383
|
+
}] });
|
|
384
|
+
|
|
385
|
+
//#region ----- BambooHR mark vector paths -----
|
|
386
|
+
/** Official BambooHR brand green (sampled from bamboohr.com wordmark). */
|
|
387
|
+
const AXE_BAMBOOHR_MARK_GREEN = '#73C41D';
|
|
388
|
+
/**
|
|
389
|
+
* Icon-only BambooHR sprout (two leaves, no wordmark).
|
|
390
|
+
* Traced from the official leaf mark on bamboohr.com media assets and fitted to 24×24.
|
|
391
|
+
*/
|
|
392
|
+
const AXE_BAMBOOHR_MARK_PATH = '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';
|
|
393
|
+
//#endregion
|
|
394
|
+
|
|
395
|
+
//#endregion
|
|
396
|
+
//#region ----- Component -----
|
|
397
|
+
class AXEBambooHRLogoComponent {
|
|
398
|
+
constructor() {
|
|
399
|
+
this.appearance = input('colored', /* @ts-ignore */
|
|
400
|
+
...(ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []));
|
|
401
|
+
this.size = input(20, /* @ts-ignore */
|
|
402
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
403
|
+
this.markPath = AXE_BAMBOOHR_MARK_PATH;
|
|
404
|
+
this.markGreen = AXE_BAMBOOHR_MARK_GREEN;
|
|
405
|
+
this.resolvedAppearance = computed(() => {
|
|
406
|
+
const value = this.appearance();
|
|
407
|
+
return value === 'monochrome' ? 'monochrome' : 'colored';
|
|
408
|
+
}, /* @ts-ignore */
|
|
409
|
+
...(ngDevMode ? [{ debugName: "resolvedAppearance" }] : /* istanbul ignore next */ []));
|
|
410
|
+
}
|
|
411
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXEBambooHRLogoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
412
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXEBambooHRLogoComponent, isStandalone: true, selector: "axe-bamboohr-logo", inputs: { appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "inline-flex items-center justify-center" }, ngImport: i0, template: `
|
|
413
|
+
@switch (resolvedAppearance()) {
|
|
414
|
+
@case ('monochrome') {
|
|
415
|
+
<svg [attr.width]="size()" [attr.height]="size()" viewBox="0 0 24 24" aria-hidden="true">
|
|
416
|
+
<path fill="currentColor" [attr.d]="markPath" />
|
|
417
|
+
</svg>
|
|
418
|
+
}
|
|
419
|
+
@default {
|
|
420
|
+
<svg [attr.width]="size()" [attr.height]="size()" viewBox="0 0 24 24" aria-hidden="true">
|
|
421
|
+
<path [attr.fill]="markGreen" [attr.d]="markPath" />
|
|
422
|
+
</svg>
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.Eager }); }
|
|
426
|
+
}
|
|
427
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXEBambooHRLogoComponent, decorators: [{
|
|
428
|
+
type: Component,
|
|
429
|
+
args: [{
|
|
430
|
+
selector: 'axe-bamboohr-logo',
|
|
431
|
+
host: { class: 'inline-flex items-center justify-center' },
|
|
432
|
+
changeDetection: ChangeDetectionStrategy.Eager,
|
|
433
|
+
template: `
|
|
434
|
+
@switch (resolvedAppearance()) {
|
|
435
|
+
@case ('monochrome') {
|
|
436
|
+
<svg [attr.width]="size()" [attr.height]="size()" viewBox="0 0 24 24" aria-hidden="true">
|
|
437
|
+
<path fill="currentColor" [attr.d]="markPath" />
|
|
438
|
+
</svg>
|
|
439
|
+
}
|
|
440
|
+
@default {
|
|
441
|
+
<svg [attr.width]="size()" [attr.height]="size()" viewBox="0 0 24 24" aria-hidden="true">
|
|
442
|
+
<path [attr.fill]="markGreen" [attr.d]="markPath" />
|
|
443
|
+
</svg>
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
`,
|
|
447
|
+
}]
|
|
448
|
+
}], propDecorators: { appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }] } });
|
|
449
|
+
|
|
450
|
+
var bamboohrLogo_component = /*#__PURE__*/Object.freeze({
|
|
451
|
+
__proto__: null,
|
|
452
|
+
AXEBambooHRLogoComponent: AXEBambooHRLogoComponent
|
|
453
|
+
});
|
|
454
|
+
|
|
455
|
+
/**
|
|
456
|
+
* Generated bundle index. Do not edit.
|
|
457
|
+
*/
|
|
458
|
+
|
|
459
|
+
export { AXEBambooHRExtensionModule, AXEBambooHRLogoComponent, AXE_BAMBOOHR_LOGO_PROVIDER, AXE_BAMBOOHR_MARK_GREEN, AXE_BAMBOOHR_MARK_PATH, axpBambooHRLogoKey };
|
|
460
|
+
//# sourceMappingURL=acorex-platform-extension-bamboohr-client.mjs.map
|
|
@@ -0,0 +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,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;AAC1C,wBAAA,UAAU,EAAE,wBAAwB;AACpC,wBAAA,eAAe,EAAE,QAAQ;AAC1B,qBAAA,CAAC;AACF,oBAAA,OAA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EAAA,MAAA,EAAA,EAAA,UAAA,EAAA,EAAA,iBAAA,EAAA,YAAA,EAAA,UAAA,EAAA,YAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,IAAA,EAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,cAAA,EAAA,yCAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,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
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@acorex-platform/extension-bamboohr-client",
|
|
3
|
+
"version": "0.0.21",
|
|
4
|
+
"sideEffects": false,
|
|
5
|
+
"peerDependencies": {
|
|
6
|
+
"@angular/common": "^21.0.0",
|
|
7
|
+
"@angular/core": "^21.0.0"
|
|
8
|
+
},
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"tslib": "^2.3.0"
|
|
11
|
+
},
|
|
12
|
+
"module": "fesm2022/acorex-platform-extension-bamboohr-client.mjs",
|
|
13
|
+
"typings": "types/acorex-platform-extension-bamboohr-client.d.ts",
|
|
14
|
+
"exports": {
|
|
15
|
+
"./package.json": {
|
|
16
|
+
"default": "./package.json"
|
|
17
|
+
},
|
|
18
|
+
".": {
|
|
19
|
+
"types": "./types/acorex-platform-extension-bamboohr-client.d.ts",
|
|
20
|
+
"default": "./fesm2022/acorex-platform-extension-bamboohr-client.mjs"
|
|
21
|
+
},
|
|
22
|
+
"./contracts": {
|
|
23
|
+
"types": "./types/acorex-platform-extension-bamboohr-client-contracts.d.ts",
|
|
24
|
+
"default": "./fesm2022/acorex-platform-extension-bamboohr-client-contracts.mjs"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"type": "module"
|
|
28
|
+
}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
declare const RootConfig: {
|
|
2
|
+
config: {
|
|
3
|
+
i18n: string;
|
|
4
|
+
};
|
|
5
|
+
module: {
|
|
6
|
+
name: string;
|
|
7
|
+
title: string;
|
|
8
|
+
icon: string;
|
|
9
|
+
};
|
|
10
|
+
integration: {
|
|
11
|
+
providerId: string;
|
|
12
|
+
domainId: string;
|
|
13
|
+
resourceEmployee: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
declare const AXE_BAMBOOHR_DOMAIN_ID = "human-capital";
|
|
17
|
+
declare const AXE_BAMBOOHR_PROVIDER_ID = "bamboohr";
|
|
18
|
+
declare const AXE_BAMBOOHR_RESOURCE_EMPLOYEE = "employee";
|
|
19
|
+
|
|
20
|
+
declare const AXEBambooHRCommandKeys: {
|
|
21
|
+
readonly ConnectionConnect: "bamboohr-extension.Connection:Connect";
|
|
22
|
+
readonly ConnectionValidate: "bamboohr-extension.Connection:Validate";
|
|
23
|
+
readonly EmployeeSyncFromBambooHR: "bamboohr-extension.Employee:SyncFromBambooHR";
|
|
24
|
+
readonly EmployeeSync: "bamboohr-extension.Employee:Sync";
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
declare const AXEBambooHRMenuKeys: {
|
|
28
|
+
readonly BambooHRExtensionConfig: "bamboohr-extension:Menu:Configuration";
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Administration capabilities used by this extension.
|
|
33
|
+
* Domain capability keys for this module. Root groups live in `AXPCommonPermissionGroupKeys` (common contracts).
|
|
34
|
+
*/
|
|
35
|
+
declare const AXPAdministrationPermissionKeys: {
|
|
36
|
+
readonly Access: "Administration:Permission:Access";
|
|
37
|
+
readonly MaintainUsersAndRoles: "Administration:Permission:MaintainUsersAndRoles";
|
|
38
|
+
readonly ManageSessions: "Administration:Permission:ManageSessions";
|
|
39
|
+
readonly MaintainPolicies: "Administration:Permission:MaintainPolicies";
|
|
40
|
+
readonly ViewIntegrations: "Administration:Permission:ViewIntegrations";
|
|
41
|
+
readonly MaintainConnections: "Administration:Permission:MaintainConnections";
|
|
42
|
+
readonly ManageIntegrationActions: "Administration:Permission:ManageIntegrationActions";
|
|
43
|
+
readonly MaintainWorkflows: "Administration:Permission:MaintainWorkflows";
|
|
44
|
+
readonly ManageWorkflowActions: "Administration:Permission:ManageWorkflowActions";
|
|
45
|
+
readonly ViewRules: "Administration:Permission:ViewRules";
|
|
46
|
+
readonly MaintainRules: "Administration:Permission:MaintainRules";
|
|
47
|
+
readonly ManageRuleActions: "Administration:Permission:ManageRuleActions";
|
|
48
|
+
readonly MaintainAi: "Administration:Permission:MaintainAi";
|
|
49
|
+
readonly UseAiAssist: "Administration:Permission:UseAiAssist";
|
|
50
|
+
readonly MaintainDashboards: "Administration:Permission:MaintainDashboards";
|
|
51
|
+
readonly ViewJobs: "Administration:Permission:ViewJobs";
|
|
52
|
+
readonly ManageJobActions: "Administration:Permission:ManageJobActions";
|
|
53
|
+
readonly ViewObservability: "Administration:Permission:ViewObservability";
|
|
54
|
+
readonly MaintainObservability: "Administration:Permission:MaintainObservability";
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* @deprecated Prefer {@link AXPAdministrationPermissionKeys}.
|
|
58
|
+
* Legacy nested shape kept so existing imports compile during migration.
|
|
59
|
+
*/
|
|
60
|
+
declare const AXEBambooHRPermissions: {
|
|
61
|
+
readonly BambooHRExtension: {
|
|
62
|
+
readonly Management: "Administration:Permission:MaintainConnections";
|
|
63
|
+
readonly Catalog: {
|
|
64
|
+
readonly View: "Administration:Permission:ViewIntegrations";
|
|
65
|
+
};
|
|
66
|
+
readonly EmployeeImport: {
|
|
67
|
+
readonly Execute: "Administration:Permission:ManageIntegrationActions";
|
|
68
|
+
};
|
|
69
|
+
readonly EmployeeSync: {
|
|
70
|
+
readonly Execute: "Administration:Permission:ManageIntegrationActions";
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
declare const AXEBambooHRExtensionSettings: {
|
|
76
|
+
readonly ConnectionsPanel: `${string}:Setting:ConnectionsPanel`;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
/** Stored on IntegrationManagement connection `config` for tenant-scoped BambooHR. */
|
|
80
|
+
interface AXEBambooHRConnectionConfig {
|
|
81
|
+
/** Company subdomain (e.g. `acme` for acme.bamboohr.com). */
|
|
82
|
+
companyDomain?: string;
|
|
83
|
+
/** BambooHR API key (Basic auth username). */
|
|
84
|
+
apiKey?: string;
|
|
85
|
+
/** Optional default employment type id for imported employees. */
|
|
86
|
+
defaultEmploymentTypeId?: string;
|
|
87
|
+
/** Default sync strategy for new links. */
|
|
88
|
+
defaultSyncStrategy?: AXEBambooHREmployeeSyncStrategy;
|
|
89
|
+
employeesSync?: AXEBambooHREmployeesSyncState;
|
|
90
|
+
}
|
|
91
|
+
interface AXEBambooHREmployeesSyncState {
|
|
92
|
+
lastSyncAt?: string;
|
|
93
|
+
}
|
|
94
|
+
type AXEBambooHREmployeeSyncStrategy = 'remoteOverride' | 'localOverride' | 'merge';
|
|
95
|
+
declare const AXE_BAMBOOHR_EMPLOYEE_SYNC_STRATEGIES: readonly AXEBambooHREmployeeSyncStrategy[];
|
|
96
|
+
|
|
97
|
+
/** Subset of BambooHR employee fields used for platform mapping. */
|
|
98
|
+
interface AXEBambooHRRemoteEmployee {
|
|
99
|
+
id: string;
|
|
100
|
+
firstName?: string;
|
|
101
|
+
lastName?: string;
|
|
102
|
+
middleName?: string;
|
|
103
|
+
displayName?: string;
|
|
104
|
+
preferredName?: string;
|
|
105
|
+
workEmail?: string;
|
|
106
|
+
homeEmail?: string;
|
|
107
|
+
mobilePhone?: string;
|
|
108
|
+
workPhone?: string;
|
|
109
|
+
homePhone?: string;
|
|
110
|
+
hireDate?: string;
|
|
111
|
+
employeeNumber?: string;
|
|
112
|
+
jobTitle?: string;
|
|
113
|
+
department?: string;
|
|
114
|
+
division?: string;
|
|
115
|
+
location?: string;
|
|
116
|
+
employmentHistoryStatus?: string;
|
|
117
|
+
status?: string;
|
|
118
|
+
supervisorId?: string;
|
|
119
|
+
supervisorEId?: string;
|
|
120
|
+
supervisor?: string;
|
|
121
|
+
birthday?: string;
|
|
122
|
+
gender?: string;
|
|
123
|
+
maritalStatus?: string;
|
|
124
|
+
address1?: string;
|
|
125
|
+
address2?: string;
|
|
126
|
+
city?: string;
|
|
127
|
+
state?: string;
|
|
128
|
+
country?: string;
|
|
129
|
+
zipcode?: string;
|
|
130
|
+
terminationDate?: string;
|
|
131
|
+
[key: string]: unknown;
|
|
132
|
+
}
|
|
133
|
+
interface AXEBambooHRValidateConnectionRequest {
|
|
134
|
+
companyDomain?: string;
|
|
135
|
+
apiKey?: string;
|
|
136
|
+
}
|
|
137
|
+
interface AXEBambooHRValidateConnectionResponse {
|
|
138
|
+
valid: boolean;
|
|
139
|
+
message?: string;
|
|
140
|
+
companyDomain?: string;
|
|
141
|
+
}
|
|
142
|
+
interface AXEBambooHRSyncEmployeesRequest {
|
|
143
|
+
/** When true, overwrite linked employees even with localOverride strategy for missing remotes is unchanged. */
|
|
144
|
+
force?: boolean;
|
|
145
|
+
syncStrategy?: AXEBambooHREmployeeSyncStrategy;
|
|
146
|
+
defaultEmploymentTypeId?: string;
|
|
147
|
+
}
|
|
148
|
+
interface AXEBambooHRSyncEmployeesResponse {
|
|
149
|
+
created: number;
|
|
150
|
+
updated: number;
|
|
151
|
+
skipped: number;
|
|
152
|
+
errors: Array<{
|
|
153
|
+
remoteId: string;
|
|
154
|
+
message: string;
|
|
155
|
+
}>;
|
|
156
|
+
lastSyncAt: string;
|
|
157
|
+
}
|
|
158
|
+
interface AXEBambooHRSyncPlatformEmployeeRequest {
|
|
159
|
+
platformEmployeeId: string;
|
|
160
|
+
}
|
|
161
|
+
interface AXEBambooHRSyncPlatformEmployeeResponse {
|
|
162
|
+
synced: true;
|
|
163
|
+
platformEmployeeId: string;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export { AXEBambooHRCommandKeys, AXEBambooHRExtensionSettings, AXEBambooHRMenuKeys, AXEBambooHRPermissions, AXE_BAMBOOHR_DOMAIN_ID, AXE_BAMBOOHR_EMPLOYEE_SYNC_STRATEGIES, AXE_BAMBOOHR_PROVIDER_ID, AXE_BAMBOOHR_RESOURCE_EMPLOYEE, AXPAdministrationPermissionKeys, RootConfig };
|
|
167
|
+
export type { AXEBambooHRConnectionConfig, AXEBambooHREmployeeSyncStrategy, AXEBambooHREmployeesSyncState, AXEBambooHRRemoteEmployee, AXEBambooHRSyncEmployeesRequest, AXEBambooHRSyncEmployeesResponse, AXEBambooHRSyncPlatformEmployeeRequest, AXEBambooHRSyncPlatformEmployeeResponse, AXEBambooHRValidateConnectionRequest, AXEBambooHRValidateConnectionResponse };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import * as i1 from '@acorex-platform/module-integration-management-client';
|
|
3
|
+
import { AXPLogoAppearance, AXPLogoProvider } from '@acorex-platform/framework-client/core';
|
|
4
|
+
|
|
5
|
+
declare class AXEBambooHRExtensionModule {
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXEBambooHRExtensionModule, never>;
|
|
7
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AXEBambooHRExtensionModule, never, [typeof i1.AXMIntegrationManagementModule], never>;
|
|
8
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<AXEBambooHRExtensionModule>;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
declare class AXEBambooHRLogoComponent {
|
|
12
|
+
appearance: i0.InputSignal<AXPLogoAppearance>;
|
|
13
|
+
size: i0.InputSignal<number>;
|
|
14
|
+
protected readonly markPath = "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";
|
|
15
|
+
protected readonly markGreen = "#73C41D";
|
|
16
|
+
protected readonly resolvedAppearance: i0.Signal<"colored" | "monochrome">;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXEBambooHRLogoComponent, never>;
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AXEBambooHRLogoComponent, "axe-bamboohr-logo", never, { "appearance": { "alias": "appearance"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
declare const axpBambooHRLogoKey: "bamboohr";
|
|
22
|
+
|
|
23
|
+
/** Official BambooHR brand green (sampled from bamboohr.com wordmark). */
|
|
24
|
+
declare const AXE_BAMBOOHR_MARK_GREEN = "#73C41D";
|
|
25
|
+
/**
|
|
26
|
+
* Icon-only BambooHR sprout (two leaves, no wordmark).
|
|
27
|
+
* Traced from the official leaf mark on bamboohr.com media assets and fitted to 24×24.
|
|
28
|
+
*/
|
|
29
|
+
declare const AXE_BAMBOOHR_MARK_PATH = "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";
|
|
30
|
+
|
|
31
|
+
declare const AXE_BAMBOOHR_LOGO_PROVIDER: {
|
|
32
|
+
readonly provide: i0.InjectionToken<AXPLogoProvider[]>;
|
|
33
|
+
readonly useValue: AXPLogoProvider;
|
|
34
|
+
readonly multi: true;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export { AXEBambooHRExtensionModule, AXEBambooHRLogoComponent, AXE_BAMBOOHR_LOGO_PROVIDER, AXE_BAMBOOHR_MARK_GREEN, AXE_BAMBOOHR_MARK_PATH, axpBambooHRLogoKey };
|