@acorex-platform/extension-project-management-aroflo-server 2.0.0-next.50 → 2.0.0-next.54
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/contracts/src/aroflo.constants.d.ts +30 -8
- package/contracts/src/aroflo.constants.js +31 -11
- package/contracts/src/aroflo.constants.js.map +1 -1
- package/contracts/src/connection.types.d.ts +3 -11
- package/contracts/src/connection.types.js.map +1 -1
- package/contracts/src/project-sync.api.types.d.ts +39 -11
- package/contracts/src/project-sync.api.types.js.map +1 -1
- package/package.json +12 -12
- package/server/src/lib/project-sync/aroflo-bearer.util.d.ts +9 -0
- package/server/src/lib/project-sync/aroflo-bearer.util.js +17 -0
- package/server/src/lib/project-sync/aroflo-bearer.util.js.map +1 -0
- package/server/src/lib/project-sync/aroflo-connection-validation.service.d.ts +5 -3
- package/server/src/lib/project-sync/aroflo-connection-validation.service.js +23 -13
- package/server/src/lib/project-sync/aroflo-connection-validation.service.js.map +1 -1
- package/server/src/lib/project-sync/aroflo-connection.resolver.d.ts +2 -2
- package/server/src/lib/project-sync/aroflo-connection.resolver.js +6 -10
- package/server/src/lib/project-sync/aroflo-connection.resolver.js.map +1 -1
- package/server/src/lib/project-sync/aroflo-customer-site-upsert.service.js +30 -23
- package/server/src/lib/project-sync/aroflo-customer-site-upsert.service.js.map +1 -1
- package/server/src/lib/project-sync/aroflo-employee-upsert.service.js +4 -4
- package/server/src/lib/project-sync/aroflo-employee-upsert.service.js.map +1 -1
- package/server/src/lib/project-sync/aroflo-field.util.d.ts +7 -4
- package/server/src/lib/project-sync/aroflo-field.util.js +43 -10
- package/server/src/lib/project-sync/aroflo-field.util.js.map +1 -1
- package/server/src/lib/project-sync/aroflo-hmac.util.d.ts +3 -26
- package/server/src/lib/project-sync/aroflo-hmac.util.js +6 -46
- package/server/src/lib/project-sync/aroflo-hmac.util.js.map +1 -1
- package/server/src/lib/project-sync/aroflo-remote-pull.service.d.ts +2 -2
- package/server/src/lib/project-sync/aroflo-remote-pull.service.js +22 -13
- package/server/src/lib/project-sync/aroflo-remote-pull.service.js.map +1 -1
- package/server/src/lib/project-sync/aroflo-resource-response.util.d.ts +19 -0
- package/server/src/lib/project-sync/aroflo-resource-response.util.js +80 -0
- package/server/src/lib/project-sync/aroflo-resource-response.util.js.map +1 -0
- package/server/src/lib/project-sync/aroflo-rest-api.service.d.ts +71 -18
- package/server/src/lib/project-sync/aroflo-rest-api.service.js +400 -54
- package/server/src/lib/project-sync/aroflo-rest-api.service.js.map +1 -1
- package/server/src/lib/project-sync/aroflo-to-platform-employee.mapper.d.ts +4 -0
- package/server/src/lib/project-sync/aroflo-to-platform-employee.mapper.js +21 -5
- package/server/src/lib/project-sync/aroflo-to-platform-employee.mapper.js.map +1 -1
- package/server/src/lib/project-sync/aroflo-to-platform-project.mapper.js +50 -15
- package/server/src/lib/project-sync/aroflo-to-platform-project.mapper.js.map +1 -1
- package/server/src/lib/project-sync/aroflo-to-remote-record.mapper.d.ts +12 -4
- package/server/src/lib/project-sync/aroflo-to-remote-record.mapper.js +278 -72
- package/server/src/lib/project-sync/aroflo-to-remote-record.mapper.js.map +1 -1
- package/server/src/lib/project-sync/aroflo-zone-response.util.d.ts +3 -13
- package/server/src/lib/project-sync/aroflo-zone-response.util.js +7 -55
- package/server/src/lib/project-sync/aroflo-zone-response.util.js.map +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
//#region ---- AroFlo REST client (server) ----
|
|
2
|
+
//#region ---- AroFlo REST client (server, APIv2) ----
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.AroFloRestApiService = void 0;
|
|
5
5
|
const tslib_1 = require("tslib");
|
|
@@ -7,18 +7,34 @@ const common_1 = require("@nestjs/common");
|
|
|
7
7
|
const extension_project_management_aroflo_contracts_1 = require("@acorex-platform/extension-project-management-aroflo-client/contracts");
|
|
8
8
|
const aroflo_background_job_util_1 = require("../background-job/aroflo-background-job.util");
|
|
9
9
|
const aroflo_field_util_1 = require("./aroflo-field.util");
|
|
10
|
-
const
|
|
10
|
+
const aroflo_bearer_util_1 = require("./aroflo-bearer.util");
|
|
11
11
|
const aroflo_outbound_http_logger_1 = require("./aroflo-outbound-http.logger");
|
|
12
12
|
const aroflo_connection_resolver_1 = require("./aroflo-connection.resolver");
|
|
13
|
-
const
|
|
13
|
+
const aroflo_resource_response_util_1 = require("./aroflo-resource-response.util");
|
|
14
14
|
//#endregion
|
|
15
15
|
//#region ----- Constants -----
|
|
16
|
-
/**
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
/**
|
|
17
|
+
* Resources that AroFlo scopes with `orgId` (business unit id).
|
|
18
|
+
* `businessunits` itself is the source of those ids and is called without `orgId`.
|
|
19
|
+
*/
|
|
20
|
+
const ORG_SCOPED_RESOURCES = new Set([
|
|
21
|
+
extension_project_management_aroflo_contracts_1.AXE_AROFLO_RESOURCES.Projects,
|
|
22
|
+
extension_project_management_aroflo_contracts_1.AXE_AROFLO_RESOURCES.Clients,
|
|
23
|
+
extension_project_management_aroflo_contracts_1.AXE_AROFLO_RESOURCES.Users,
|
|
24
|
+
]);
|
|
25
|
+
/** Field that uniquely identifies a record per resource (first match wins). */
|
|
26
|
+
const RESOURCE_ID_FIELDS = {
|
|
27
|
+
[extension_project_management_aroflo_contracts_1.AXE_AROFLO_RESOURCES.Projects]: ['project_id', 'projectid', 'id'],
|
|
28
|
+
[extension_project_management_aroflo_contracts_1.AXE_AROFLO_RESOURCES.Clients]: ['client_id', 'clientid', 'id'],
|
|
29
|
+
[extension_project_management_aroflo_contracts_1.AXE_AROFLO_RESOURCES.Users]: ['user_id', 'userid', 'id'],
|
|
30
|
+
[extension_project_management_aroflo_contracts_1.AXE_AROFLO_RESOURCES.BusinessUnits]: [
|
|
31
|
+
'orgId',
|
|
32
|
+
'orgid',
|
|
33
|
+
'business_unit_id',
|
|
34
|
+
'businessunitid',
|
|
35
|
+
'business_unit',
|
|
36
|
+
'id',
|
|
37
|
+
],
|
|
22
38
|
};
|
|
23
39
|
//#endregion
|
|
24
40
|
//#region ----- Helpers -----
|
|
@@ -27,7 +43,42 @@ function resolveMaxRecords(maxRecords) {
|
|
|
27
43
|
}
|
|
28
44
|
function resolveBaseUrl(baseUrl) {
|
|
29
45
|
const trimmed = String(baseUrl !== null && baseUrl !== void 0 ? baseUrl : extension_project_management_aroflo_contracts_1.AXE_AROFLO_API_BASE_URL).trim().replace(/\/+$/, '');
|
|
30
|
-
return
|
|
46
|
+
return trimmed || extension_project_management_aroflo_contracts_1.AXE_AROFLO_API_BASE_URL.replace(/\/+$/, '');
|
|
47
|
+
}
|
|
48
|
+
function readRecordId(record, resource) {
|
|
49
|
+
return (0, aroflo_field_util_1.readAroFloString)(record, ...RESOURCE_ID_FIELDS[resource]);
|
|
50
|
+
}
|
|
51
|
+
function authErrorMessage() {
|
|
52
|
+
return 'AroFlo rejected the API token. Generate a new APIv2 token in Site Administration → AroFlo API.';
|
|
53
|
+
}
|
|
54
|
+
/** Pulls a useful message from AroFlo JSON error bodies. */
|
|
55
|
+
function formatAroFloHttpError(statusCode, data) {
|
|
56
|
+
if ((0, aroflo_field_util_1.isAroFloRecord)(data)) {
|
|
57
|
+
const message = (0, aroflo_field_util_1.readAroFloString)(data, 'message', 'error', 'statusmessage', 'detail', 'title') ||
|
|
58
|
+
(0, aroflo_field_util_1.readAroFloString)(data, 'errorcode', 'error_code', 'code');
|
|
59
|
+
if (message) {
|
|
60
|
+
return `AroFlo request failed (${statusCode}): ${message}`;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
if (typeof data === 'string' && data.trim()) {
|
|
64
|
+
return `AroFlo request failed (${statusCode}): ${data.trim().slice(0, 300)}`;
|
|
65
|
+
}
|
|
66
|
+
return `AroFlo request failed (${statusCode}).`;
|
|
67
|
+
}
|
|
68
|
+
function appendQuery(params, query) {
|
|
69
|
+
if (!query) {
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
for (const [key, value] of Object.entries(query)) {
|
|
73
|
+
if (value == null) {
|
|
74
|
+
continue;
|
|
75
|
+
}
|
|
76
|
+
const text = String(value).trim();
|
|
77
|
+
if (!text) {
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
params.set(key, text);
|
|
81
|
+
}
|
|
31
82
|
}
|
|
32
83
|
//#endregion
|
|
33
84
|
let AroFloRestApiService = class AroFloRestApiService {
|
|
@@ -36,127 +87,422 @@ let AroFloRestApiService = class AroFloRestApiService {
|
|
|
36
87
|
}
|
|
37
88
|
//#region ----- Single page -----
|
|
38
89
|
/**
|
|
39
|
-
* Fetches one page of an
|
|
40
|
-
* Used by connect validation (no stored connection yet) and by {@link
|
|
90
|
+
* Fetches one page of an APIv2 resource with explicit credentials.
|
|
91
|
+
* Used by connect validation (no stored connection yet) and by {@link listResource}.
|
|
41
92
|
*/
|
|
42
|
-
|
|
43
|
-
return tslib_1.__awaiter(this, arguments, void 0, function* (credentials,
|
|
44
|
-
|
|
45
|
-
const
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
|
|
93
|
+
fetchResourcePage(credentials_1, resource_1) {
|
|
94
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* (credentials, resource, options = {}) {
|
|
95
|
+
var _a, _b;
|
|
96
|
+
const base = resolveBaseUrl(options.baseUrl);
|
|
97
|
+
const params = new URLSearchParams();
|
|
98
|
+
params.set('limit', String((_a = options.limit) !== null && _a !== void 0 ? _a : extension_project_management_aroflo_contracts_1.AXE_AROFLO_PAGE_LIMIT));
|
|
99
|
+
appendQuery(params, options.query);
|
|
100
|
+
const cursor = String((_b = options.cursor) !== null && _b !== void 0 ? _b : '').trim();
|
|
101
|
+
if (cursor) {
|
|
102
|
+
params.set('cursor', cursor);
|
|
103
|
+
}
|
|
104
|
+
const url = `${base}/${resource}?${params.toString()}`;
|
|
105
|
+
const headers = (0, aroflo_bearer_util_1.buildAroFloBearerHeaders)(credentials);
|
|
106
|
+
const response = yield (0, aroflo_outbound_http_logger_1.executeAroFloOutboundRequest)({ tenantId: options.tenantId, operation: `${resource}/list` }, url, Object.assign({}, headers));
|
|
49
107
|
if (response.statusCode === 401 || response.statusCode === 403) {
|
|
50
|
-
throw new Error(
|
|
108
|
+
throw new Error(authErrorMessage());
|
|
51
109
|
}
|
|
52
110
|
if (!response.ok) {
|
|
53
|
-
throw new Error(
|
|
111
|
+
throw new Error(formatAroFloHttpError(response.statusCode, response.data));
|
|
54
112
|
}
|
|
55
|
-
return (0,
|
|
113
|
+
return (0, aroflo_resource_response_util_1.parseAroFloResourcePage)(response.data, resource);
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
/** @deprecated Prefer {@link fetchResourcePage}. */
|
|
117
|
+
fetchZonePage(credentials_1, zone_1, _page_1) {
|
|
118
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* (credentials, zone, _page, options = {}) {
|
|
119
|
+
return this.fetchResourcePage(credentials, zone, options);
|
|
56
120
|
});
|
|
57
121
|
}
|
|
58
122
|
//#endregion
|
|
59
123
|
//#region ----- Single record -----
|
|
60
|
-
/** GET clients
|
|
124
|
+
/** GET `/v2/clients/{id}`. */
|
|
61
125
|
getClient(clientId, connectionId) {
|
|
62
126
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
63
127
|
const remoteId = String(clientId !== null && clientId !== void 0 ? clientId : '').trim();
|
|
64
128
|
if (!remoteId) {
|
|
65
129
|
throw new Error('AroFlo client id is required.');
|
|
66
130
|
}
|
|
67
|
-
const record = yield this.
|
|
131
|
+
const record = yield this.fetchResourceById(extension_project_management_aroflo_contracts_1.AXE_AROFLO_RESOURCES.Clients, remoteId, connectionId);
|
|
68
132
|
if (!record) {
|
|
69
133
|
throw new Error(`AroFlo client "${remoteId}" was not found.`);
|
|
70
134
|
}
|
|
71
135
|
return record;
|
|
72
136
|
});
|
|
73
137
|
}
|
|
74
|
-
/** GET
|
|
75
|
-
|
|
138
|
+
/** GET `/v2/projects/{id}`. */
|
|
139
|
+
getProject(projectId, connectionId) {
|
|
76
140
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
77
|
-
const remoteId = String(
|
|
141
|
+
const remoteId = String(projectId !== null && projectId !== void 0 ? projectId : '').trim();
|
|
78
142
|
if (!remoteId) {
|
|
79
|
-
throw new Error('AroFlo
|
|
143
|
+
throw new Error('AroFlo project id is required.');
|
|
80
144
|
}
|
|
81
|
-
const record = yield this.
|
|
145
|
+
const record = yield this.fetchResourceById(extension_project_management_aroflo_contracts_1.AXE_AROFLO_RESOURCES.Projects, remoteId, connectionId);
|
|
82
146
|
if (!record) {
|
|
83
|
-
throw new Error(`AroFlo
|
|
147
|
+
throw new Error(`AroFlo project "${remoteId}" was not found.`);
|
|
84
148
|
}
|
|
85
149
|
return record;
|
|
86
150
|
});
|
|
87
151
|
}
|
|
88
152
|
/**
|
|
89
|
-
*
|
|
90
|
-
*
|
|
153
|
+
* Merges list rows with `GET /v2/{resource}/{id}` details so nested fields
|
|
154
|
+
* (addresses, location, contactuser, stages, …) are present when the list is thin.
|
|
91
155
|
*/
|
|
92
|
-
|
|
93
|
-
return tslib_1.__awaiter(this,
|
|
156
|
+
enrichListedRecords(resource_1, records_1) {
|
|
157
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* (resource, records, options = {}) {
|
|
94
158
|
var _a;
|
|
159
|
+
const shouldAbort = (_a = options.shouldAbort) !== null && _a !== void 0 ? _a : (() => tslib_1.__awaiter(this, void 0, void 0, function* () { return false; }));
|
|
160
|
+
const enriched = [];
|
|
161
|
+
for (const row of records) {
|
|
162
|
+
if (yield shouldAbort()) {
|
|
163
|
+
throw new aroflo_background_job_util_1.AroFloBackgroundJobCancelledError();
|
|
164
|
+
}
|
|
165
|
+
const id = readRecordId(row, resource);
|
|
166
|
+
if (!id) {
|
|
167
|
+
enriched.push(row);
|
|
168
|
+
continue;
|
|
169
|
+
}
|
|
170
|
+
const orgId = (0, aroflo_field_util_1.readAroFloString)(row, 'orgId', '__orgId', 'orgid');
|
|
171
|
+
try {
|
|
172
|
+
const detail = yield this.fetchResourceById(resource, id, options.connectionId, Object.assign({}, (orgId ? { orgId } : {})));
|
|
173
|
+
enriched.push(detail ? Object.assign(Object.assign({}, row), detail) : row);
|
|
174
|
+
}
|
|
175
|
+
catch (_b) {
|
|
176
|
+
enriched.push(row);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
return enriched;
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Best-effort GET `/v2/contacts/{id}` (not always published).
|
|
184
|
+
* Prefer IntegrationRemoteRecord cache — APIv2 contacts are listed under `/clients/{id}/contacts`.
|
|
185
|
+
*/
|
|
186
|
+
getContact(contactId, connectionId) {
|
|
187
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
188
|
+
const remoteId = String(contactId !== null && contactId !== void 0 ? contactId : '').trim();
|
|
189
|
+
if (!remoteId) {
|
|
190
|
+
throw new Error('AroFlo contact id is required.');
|
|
191
|
+
}
|
|
192
|
+
const resolved = yield this.connectionResolver.resolveTenantConnection(connectionId);
|
|
193
|
+
const url = `${resolveBaseUrl(resolved.baseUrl)}/contacts/${encodeURIComponent(remoteId)}`;
|
|
194
|
+
const headers = (0, aroflo_bearer_util_1.buildAroFloBearerHeaders)(resolved.credentials);
|
|
195
|
+
const response = yield (0, aroflo_outbound_http_logger_1.executeAroFloOutboundRequest)({ tenantId: resolved.tenantId, operation: 'contacts/get' }, url, Object.assign({}, headers));
|
|
196
|
+
if (response.statusCode === 404) {
|
|
197
|
+
throw new Error(`AroFlo contact "${remoteId}" was not found. Pull contacts again (listed under each client).`);
|
|
198
|
+
}
|
|
199
|
+
if (response.statusCode === 401 || response.statusCode === 403) {
|
|
200
|
+
throw new Error(authErrorMessage());
|
|
201
|
+
}
|
|
202
|
+
if (!response.ok) {
|
|
203
|
+
throw new Error(formatAroFloHttpError(response.statusCode, response.data));
|
|
204
|
+
}
|
|
205
|
+
const record = (0, aroflo_resource_response_util_1.parseAroFloResourceRecord)(response.data, 'contacts');
|
|
206
|
+
if (!record) {
|
|
207
|
+
throw new Error(`AroFlo contact "${remoteId}" was not found.`);
|
|
208
|
+
}
|
|
209
|
+
return record;
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
/** GET `/v2/{resource}/{id}` (optional `orgId` query for scoped tenants). */
|
|
213
|
+
fetchResourceById(resource, idValue, connectionId, query) {
|
|
214
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
95
215
|
const resolved = yield this.connectionResolver.resolveTenantConnection(connectionId);
|
|
96
|
-
const
|
|
97
|
-
|
|
98
|
-
const
|
|
99
|
-
const url = `${resolveBaseUrl(resolved.baseUrl)}
|
|
100
|
-
const headers = (0,
|
|
101
|
-
const response = yield (0, aroflo_outbound_http_logger_1.executeAroFloOutboundRequest)({ tenantId: resolved.tenantId, operation: `${
|
|
216
|
+
const params = new URLSearchParams();
|
|
217
|
+
appendQuery(params, query);
|
|
218
|
+
const qs = params.toString();
|
|
219
|
+
const url = `${resolveBaseUrl(resolved.baseUrl)}/${resource}/${encodeURIComponent(idValue)}${qs ? `?${qs}` : ''}`;
|
|
220
|
+
const headers = (0, aroflo_bearer_util_1.buildAroFloBearerHeaders)(resolved.credentials);
|
|
221
|
+
const response = yield (0, aroflo_outbound_http_logger_1.executeAroFloOutboundRequest)({ tenantId: resolved.tenantId, operation: `${resource}/get` }, url, Object.assign({}, headers));
|
|
222
|
+
if (response.statusCode === 404) {
|
|
223
|
+
return null;
|
|
224
|
+
}
|
|
102
225
|
if (response.statusCode === 401 || response.statusCode === 403) {
|
|
103
|
-
throw new Error(
|
|
226
|
+
throw new Error(authErrorMessage());
|
|
104
227
|
}
|
|
105
228
|
if (!response.ok) {
|
|
106
|
-
throw new Error(
|
|
229
|
+
throw new Error(formatAroFloHttpError(response.statusCode, response.data));
|
|
107
230
|
}
|
|
108
|
-
|
|
109
|
-
|
|
231
|
+
return (0, aroflo_resource_response_util_1.parseAroFloResourceRecord)(response.data, resource);
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
//#endregion
|
|
235
|
+
//#region ----- Business units / orgId -----
|
|
236
|
+
/**
|
|
237
|
+
* Lists business units (`GET /v2/businessunits`) — source of APIv2 `orgId` values.
|
|
238
|
+
*/
|
|
239
|
+
listBusinessUnitIds() {
|
|
240
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* (options = {}) {
|
|
241
|
+
var _a, _b;
|
|
242
|
+
const shouldAbort = (_a = options.shouldAbort) !== null && _a !== void 0 ? _a : (() => tslib_1.__awaiter(this, void 0, void 0, function* () { return false; }));
|
|
243
|
+
let credentials = options.credentials;
|
|
244
|
+
let baseUrl = options.baseUrl;
|
|
245
|
+
let tenantId = options.tenantId;
|
|
246
|
+
if (!credentials) {
|
|
247
|
+
const resolved = yield this.connectionResolver.resolveTenantConnection(options.connectionId);
|
|
248
|
+
credentials = resolved.credentials;
|
|
249
|
+
baseUrl = resolved.baseUrl;
|
|
250
|
+
tenantId = resolved.tenantId;
|
|
251
|
+
}
|
|
252
|
+
const ids = [];
|
|
253
|
+
let cursor;
|
|
254
|
+
for (let page = 1; page <= extension_project_management_aroflo_contracts_1.AXE_AROFLO_MAX_PAGES; page += 1) {
|
|
255
|
+
if (yield shouldAbort()) {
|
|
256
|
+
throw new aroflo_background_job_util_1.AroFloBackgroundJobCancelledError();
|
|
257
|
+
}
|
|
258
|
+
const result = yield this.fetchResourcePage(credentials, extension_project_management_aroflo_contracts_1.AXE_AROFLO_RESOURCES.BusinessUnits, {
|
|
259
|
+
baseUrl,
|
|
260
|
+
tenantId,
|
|
261
|
+
cursor,
|
|
262
|
+
limit: extension_project_management_aroflo_contracts_1.AXE_AROFLO_PAGE_LIMIT,
|
|
263
|
+
});
|
|
264
|
+
if (result.records.length === 0) {
|
|
265
|
+
break;
|
|
266
|
+
}
|
|
267
|
+
for (const record of result.records) {
|
|
268
|
+
const id = readRecordId(record, extension_project_management_aroflo_contracts_1.AXE_AROFLO_RESOURCES.BusinessUnits);
|
|
269
|
+
if (id && !ids.includes(id)) {
|
|
270
|
+
ids.push(id);
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
const next = ((_b = result.nextCursor) === null || _b === void 0 ? void 0 : _b.trim()) || null;
|
|
274
|
+
if (!next) {
|
|
275
|
+
break;
|
|
276
|
+
}
|
|
277
|
+
cursor = next;
|
|
278
|
+
}
|
|
279
|
+
return ids;
|
|
110
280
|
});
|
|
111
281
|
}
|
|
112
282
|
//#endregion
|
|
113
283
|
//#region ----- Paged list -----
|
|
114
284
|
/**
|
|
115
|
-
* Lists a
|
|
285
|
+
* Lists a resource page by page via `cursor` / `next_cursor` until exhausted,
|
|
116
286
|
* the record cap is reached, or the safety page cap is hit.
|
|
287
|
+
*
|
|
288
|
+
* For org-scoped resources (`projects`, `clients`, `users`) when `query.orgId` is
|
|
289
|
+
* not already set, automatically walks every business unit and sends `orgId`.
|
|
117
290
|
*/
|
|
118
|
-
|
|
119
|
-
return tslib_1.__awaiter(this, arguments, void 0, function* (
|
|
291
|
+
listResource(resource_1) {
|
|
292
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* (resource, options = {}) {
|
|
293
|
+
var _a, _b, _c, _d;
|
|
294
|
+
const explicitOrgId = String((_d = (_b = (_a = options.query) === null || _a === void 0 ? void 0 : _a['orgId']) !== null && _b !== void 0 ? _b : (_c = options.query) === null || _c === void 0 ? void 0 : _c['orgid']) !== null && _d !== void 0 ? _d : '').trim();
|
|
295
|
+
if (ORG_SCOPED_RESOURCES.has(resource) && !explicitOrgId) {
|
|
296
|
+
return this.listResourceAcrossOrgs(resource, options);
|
|
297
|
+
}
|
|
298
|
+
return this.listResourceOnce(resource, options);
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* Lists an org-scoped resource for every business unit, merging by remote id.
|
|
303
|
+
* APIv2 requires `orgId` (business unit id) on these list endpoints.
|
|
304
|
+
*/
|
|
305
|
+
listResourceAcrossOrgs(resource_1) {
|
|
306
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* (resource, options = {}) {
|
|
307
|
+
var _a, _b;
|
|
308
|
+
const maxRecords = resolveMaxRecords(options.maxRecords);
|
|
309
|
+
const shouldAbort = (_a = options.shouldAbort) !== null && _a !== void 0 ? _a : (() => tslib_1.__awaiter(this, void 0, void 0, function* () { return false; }));
|
|
310
|
+
const orgIds = yield this.listBusinessUnitIds({
|
|
311
|
+
connectionId: options.connectionId,
|
|
312
|
+
shouldAbort,
|
|
313
|
+
});
|
|
314
|
+
if (orgIds.length === 0) {
|
|
315
|
+
throw new Error('AroFlo returned no business units (orgId). Check the APIv2 token permissions in Site Administration → AroFlo API.');
|
|
316
|
+
}
|
|
317
|
+
const byId = new Map();
|
|
318
|
+
let truncated = false;
|
|
319
|
+
for (const orgId of orgIds) {
|
|
320
|
+
if (yield shouldAbort()) {
|
|
321
|
+
throw new aroflo_background_job_util_1.AroFloBackgroundJobCancelledError();
|
|
322
|
+
}
|
|
323
|
+
if (byId.size >= maxRecords) {
|
|
324
|
+
truncated = true;
|
|
325
|
+
break;
|
|
326
|
+
}
|
|
327
|
+
const remaining = maxRecords - byId.size;
|
|
328
|
+
const page = yield this.listResourceOnce(resource, {
|
|
329
|
+
connectionId: options.connectionId,
|
|
330
|
+
maxRecords: remaining,
|
|
331
|
+
shouldAbort,
|
|
332
|
+
query: Object.assign(Object.assign({}, options.query), { orgId }),
|
|
333
|
+
onPage: options.onPage
|
|
334
|
+
? (done, total) => tslib_1.__awaiter(this, void 0, void 0, function* () { var _a; return (_a = options.onPage) === null || _a === void 0 ? void 0 : _a.call(options, Math.min(byId.size + done, maxRecords), total); })
|
|
335
|
+
: undefined,
|
|
336
|
+
});
|
|
337
|
+
truncated = truncated || page.truncated;
|
|
338
|
+
for (const record of page.records) {
|
|
339
|
+
const id = readRecordId(record, resource);
|
|
340
|
+
// Stamp the orgId used for this page so nested calls (e.g. client contacts) can reuse it.
|
|
341
|
+
const stamped = Object.assign(Object.assign({}, record), { orgId, __orgId: orgId });
|
|
342
|
+
if (id) {
|
|
343
|
+
if (!byId.has(id)) {
|
|
344
|
+
byId.set(id, stamped);
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
else {
|
|
348
|
+
byId.set(`__row_${byId.size}`, stamped);
|
|
349
|
+
}
|
|
350
|
+
if (byId.size >= maxRecords) {
|
|
351
|
+
truncated = true;
|
|
352
|
+
break;
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
yield ((_b = options.onPage) === null || _b === void 0 ? void 0 : _b.call(options, Math.min(byId.size, maxRecords), maxRecords));
|
|
357
|
+
return { records: Array.from(byId.values()).slice(0, maxRecords), truncated };
|
|
358
|
+
});
|
|
359
|
+
}
|
|
360
|
+
/**
|
|
361
|
+
* Lists contacts for each client via `GET /v2/clients/{clientId}/contacts`.
|
|
362
|
+
* APIv2 has no top-level `/contacts` resource (Legacy `zone=contacts`).
|
|
363
|
+
*/
|
|
364
|
+
listClientContacts(clients_1) {
|
|
365
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* (clients, options = {}) {
|
|
366
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
367
|
+
const maxRecords = resolveMaxRecords(options.maxRecords);
|
|
368
|
+
const shouldAbort = (_a = options.shouldAbort) !== null && _a !== void 0 ? _a : (() => tslib_1.__awaiter(this, void 0, void 0, function* () { return false; }));
|
|
369
|
+
const resolved = yield this.connectionResolver.resolveTenantConnection(options.connectionId);
|
|
370
|
+
const byId = new Map();
|
|
371
|
+
let truncated = false;
|
|
372
|
+
for (const client of clients) {
|
|
373
|
+
if (yield shouldAbort()) {
|
|
374
|
+
throw new aroflo_background_job_util_1.AroFloBackgroundJobCancelledError();
|
|
375
|
+
}
|
|
376
|
+
if (byId.size >= maxRecords) {
|
|
377
|
+
truncated = true;
|
|
378
|
+
break;
|
|
379
|
+
}
|
|
380
|
+
const clientId = (0, aroflo_field_util_1.readAroFloString)(client, 'client_id', 'clientid', 'id');
|
|
381
|
+
if (!clientId) {
|
|
382
|
+
continue;
|
|
383
|
+
}
|
|
384
|
+
const orgId = (_b = (0, aroflo_field_util_1.readAroFloString)(client, 'orgId', '__orgId', 'orgid')) !== null && _b !== void 0 ? _b : (String((_d = (_c = options.query) === null || _c === void 0 ? void 0 : _c['orgId']) !== null && _d !== void 0 ? _d : '').trim() || null);
|
|
385
|
+
let cursor;
|
|
386
|
+
for (let page = 1; page <= extension_project_management_aroflo_contracts_1.AXE_AROFLO_MAX_PAGES; page += 1) {
|
|
387
|
+
if (yield shouldAbort()) {
|
|
388
|
+
throw new aroflo_background_job_util_1.AroFloBackgroundJobCancelledError();
|
|
389
|
+
}
|
|
390
|
+
const params = new URLSearchParams();
|
|
391
|
+
params.set('limit', String(extension_project_management_aroflo_contracts_1.AXE_AROFLO_PAGE_LIMIT));
|
|
392
|
+
if (orgId) {
|
|
393
|
+
params.set('orgId', orgId);
|
|
394
|
+
}
|
|
395
|
+
if (cursor) {
|
|
396
|
+
params.set('cursor', cursor);
|
|
397
|
+
}
|
|
398
|
+
const url = `${resolveBaseUrl(resolved.baseUrl)}/clients/${encodeURIComponent(clientId)}/contacts?${params.toString()}`;
|
|
399
|
+
const headers = (0, aroflo_bearer_util_1.buildAroFloBearerHeaders)(resolved.credentials);
|
|
400
|
+
const response = yield (0, aroflo_outbound_http_logger_1.executeAroFloOutboundRequest)({ tenantId: resolved.tenantId, operation: 'clients/contacts/list' }, url, Object.assign({}, headers));
|
|
401
|
+
if (response.statusCode === 401 || response.statusCode === 403) {
|
|
402
|
+
throw new Error(authErrorMessage());
|
|
403
|
+
}
|
|
404
|
+
if (response.statusCode === 404) {
|
|
405
|
+
break;
|
|
406
|
+
}
|
|
407
|
+
if (!response.ok) {
|
|
408
|
+
throw new Error(formatAroFloHttpError(response.statusCode, response.data));
|
|
409
|
+
}
|
|
410
|
+
const parsed = (0, aroflo_resource_response_util_1.parseAroFloResourcePage)(response.data, 'contacts');
|
|
411
|
+
if (parsed.records.length === 0) {
|
|
412
|
+
break;
|
|
413
|
+
}
|
|
414
|
+
for (const record of parsed.records) {
|
|
415
|
+
const contactId = (_e = (0, aroflo_field_util_1.readAroFloString)(record, 'contact_id', 'contactid', 'userid', 'user_id', 'id')) !== null && _e !== void 0 ? _e : null;
|
|
416
|
+
const stamped = Object.assign(Object.assign(Object.assign({}, record), { client_id: clientId, clientid: clientId }), (orgId ? { orgId } : {}));
|
|
417
|
+
if (contactId) {
|
|
418
|
+
if (!byId.has(contactId)) {
|
|
419
|
+
byId.set(contactId, stamped);
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
else {
|
|
423
|
+
byId.set(`__row_${byId.size}`, stamped);
|
|
424
|
+
}
|
|
425
|
+
if (byId.size >= maxRecords) {
|
|
426
|
+
truncated = true;
|
|
427
|
+
break;
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
yield ((_f = options.onPage) === null || _f === void 0 ? void 0 : _f.call(options, Math.min(byId.size, maxRecords), maxRecords));
|
|
431
|
+
if (byId.size >= maxRecords) {
|
|
432
|
+
truncated = true;
|
|
433
|
+
break;
|
|
434
|
+
}
|
|
435
|
+
const next = ((_g = parsed.nextCursor) === null || _g === void 0 ? void 0 : _g.trim()) || null;
|
|
436
|
+
if (!next) {
|
|
437
|
+
break;
|
|
438
|
+
}
|
|
439
|
+
cursor = next;
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
yield ((_h = options.onPage) === null || _h === void 0 ? void 0 : _h.call(options, Math.min(byId.size, maxRecords), maxRecords));
|
|
443
|
+
return { records: Array.from(byId.values()).slice(0, maxRecords), truncated };
|
|
444
|
+
});
|
|
445
|
+
}
|
|
446
|
+
/** Single-org (or unscoped) paged list. */
|
|
447
|
+
listResourceOnce(resource_1) {
|
|
448
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* (resource, options = {}) {
|
|
120
449
|
var _a, _b, _c;
|
|
121
450
|
const maxRecords = resolveMaxRecords(options.maxRecords);
|
|
122
451
|
const shouldAbort = (_a = options.shouldAbort) !== null && _a !== void 0 ? _a : (() => tslib_1.__awaiter(this, void 0, void 0, function* () { return false; }));
|
|
123
452
|
const resolved = yield this.connectionResolver.resolveTenantConnection(options.connectionId);
|
|
124
|
-
const idField = ZONE_ID_FIELD[zone];
|
|
125
453
|
const byId = new Map();
|
|
126
|
-
let
|
|
454
|
+
let cursor;
|
|
127
455
|
for (let page = 1; page <= extension_project_management_aroflo_contracts_1.AXE_AROFLO_MAX_PAGES; page += 1) {
|
|
128
456
|
if (yield shouldAbort()) {
|
|
129
457
|
throw new aroflo_background_job_util_1.AroFloBackgroundJobCancelledError();
|
|
130
458
|
}
|
|
131
|
-
const result = yield this.
|
|
459
|
+
const result = yield this.fetchResourcePage(resolved.credentials, resource, {
|
|
132
460
|
baseUrl: resolved.baseUrl,
|
|
133
461
|
tenantId: resolved.tenantId,
|
|
462
|
+
cursor,
|
|
463
|
+
query: options.query,
|
|
134
464
|
});
|
|
135
465
|
if (result.records.length === 0) {
|
|
136
466
|
break;
|
|
137
467
|
}
|
|
138
468
|
let added = 0;
|
|
139
469
|
for (const record of result.records) {
|
|
140
|
-
const id = (
|
|
470
|
+
const id = readRecordId(record, resource);
|
|
141
471
|
if (id && !byId.has(id)) {
|
|
142
472
|
byId.set(id, record);
|
|
143
473
|
added += 1;
|
|
144
474
|
}
|
|
475
|
+
else if (!id) {
|
|
476
|
+
byId.set(`__row_${byId.size}`, record);
|
|
477
|
+
added += 1;
|
|
478
|
+
}
|
|
145
479
|
}
|
|
146
480
|
yield ((_b = options.onPage) === null || _b === void 0 ? void 0 : _b.call(options, Math.min(byId.size, maxRecords), maxRecords));
|
|
147
481
|
if (byId.size >= maxRecords || added === 0) {
|
|
148
482
|
break;
|
|
149
483
|
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
if (result.records.length < pageSize) {
|
|
484
|
+
const next = ((_c = result.nextCursor) === null || _c === void 0 ? void 0 : _c.trim()) || null;
|
|
485
|
+
if (!next) {
|
|
153
486
|
break;
|
|
154
487
|
}
|
|
488
|
+
cursor = next;
|
|
155
489
|
}
|
|
156
490
|
const all = Array.from(byId.values());
|
|
157
491
|
return { records: all.slice(0, maxRecords), truncated: all.length >= maxRecords };
|
|
158
492
|
});
|
|
159
493
|
}
|
|
494
|
+
/** Lists users across all business units (`orgId` required by APIv2). */
|
|
495
|
+
listUsers() {
|
|
496
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* (options = {}) {
|
|
497
|
+
return this.listResource(extension_project_management_aroflo_contracts_1.AXE_AROFLO_RESOURCES.Users, options);
|
|
498
|
+
});
|
|
499
|
+
}
|
|
500
|
+
/** @deprecated Prefer {@link listResource}. */
|
|
501
|
+
listZone(zone_1) {
|
|
502
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* (zone, options = {}) {
|
|
503
|
+
return this.listResource(zone, options);
|
|
504
|
+
});
|
|
505
|
+
}
|
|
160
506
|
};
|
|
161
507
|
exports.AroFloRestApiService = AroFloRestApiService;
|
|
162
508
|
exports.AroFloRestApiService = AroFloRestApiService = tslib_1.__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aroflo-rest-api.service.js","sourceRoot":"","sources":["../../../../../../../libs/extensions/project-management/aroflo/server/src/lib/project-sync/aroflo-rest-api.service.ts"],"names":[],"mappings":";AAAA,+CAA+C;;;;AAE/C,2CAA4C;AAC5C,kIAOwE;AAExE,6FAAiG;AACjG,2DAA0E;AAC1E,yDAAsF;AACtF,+EAA6E;AAC7E,6EAAwE;AACxE,2EAA2F;AAkB3F,YAAY;AAEZ,+BAA+B;AAE/B,wDAAwD;AACxD,MAAM,aAAa,GAAkC;IACnD,CAAC,gEAAgB,CAAC,QAAQ,CAAC,EAAE,WAAW;IACxC,CAAC,gEAAgB,CAAC,OAAO,CAAC,EAAE,UAAU;IACtC,CAAC,gEAAgB,CAAC,QAAQ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Y"}
|
|
1
|
+
{"version":3,"file":"aroflo-rest-api.service.js","sourceRoot":"","sources":["../../../../../../../libs/extensions/project-management/aroflo/server/src/lib/project-sync/aroflo-rest-api.service.ts"],"names":[],"mappings":";AAAA,sDAAsD;;;;AAEtD,2CAA4C;AAC5C,kIAQwE;AAExE,6FAAiG;AACjG,2DAA0F;AAC1F,6DAAwF;AACxF,+EAA6E;AAC7E,6EAAwE;AACxE,mFAA8H;AAyB9H,YAAY;AAEZ,+BAA+B;AAE/B;;;GAGG;AACH,MAAM,oBAAoB,GAAG,IAAI,GAAG,CAAoB;IACtD,oEAAoB,CAAC,QAAQ;IAC7B,oEAAoB,CAAC,OAAO;IAC5B,oEAAoB,CAAC,KAAK;CAC3B,CAAC,CAAC;AAEH,+EAA+E;AAC/E,MAAM,kBAAkB,GAAiD;IACvE,CAAC,oEAAoB,CAAC,QAAQ,CAAC,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,IAAI,CAAC;IAClE,CAAC,oEAAoB,CAAC,OAAO,CAAC,EAAE,CAAC,WAAW,EAAE,UAAU,EAAE,IAAI,CAAC;IAC/D,CAAC,oEAAoB,CAAC,KAAK,CAAC,EAAE,CAAC,SAAS,EAAE,QAAQ,EAAE,IAAI,CAAC;IACzD,CAAC,oEAAoB,CAAC,aAAa,CAAC,EAAE;QACpC,OAAO;QACP,OAAO;QACP,kBAAkB;QAClB,gBAAgB;QAChB,eAAe;QACf,IAAI;KACL;CACF,CAAC;AAEF,YAAY;AAEZ,6BAA6B;AAE7B,SAAS,iBAAiB,CAAC,UAAmB;IAC5C,OAAO,IAAI,CAAC,GAAG,CACb,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,UAAU,aAAV,UAAU,cAAV,UAAU,GAAI,8EAA8B,CAAC,IAAI,8EAA8B,CAAC,EACnG,sEAAsB,CACvB,CAAC;AACJ,CAAC;AAED,SAAS,cAAc,CAAC,OAA2B;IACjD,MAAM,OAAO,GAAG,MAAM,CAAC,OA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C;gBAED,MAAM,CAAA,MAAA,OAAO,CAAC,MAAM,wDAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC,EAAE,UAAU,CAAC,CAAA,CAAC;gBAEpE,IAAI,IAAI,CAAC,IAAI,IAAI,UAAU,IAAI,KAAK,KAAK,CAAC,EAAE,CAAC;oBAC3C,MAAM;gBACR,CAAC;gBAED,MAAM,IAAI,GAAG,CAAA,MAAA,MAAM,CAAC,UAAU,0CAAE,IAAI,EAAE,KAAI,IAAI,CAAC;gBAC/C,IAAI,CAAC,IAAI,EAAE,CAAC;oBACV,MAAM;gBACR,CAAC;gBACD,MAAM,GAAG,IAAI,CAAC;YAChB,CAAC;YAED,MAAM,GAAG,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;YACtC,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,CAAC,MAAM,IAAI,UAAU,EAAE,CAAC;QACpF,CAAC;KAAA;IAED,yEAAyE;IACnE,SAAS;qEAAC,UAAqC,EAAE;YACrD,OAAO,IAAI,CAAC,YAAY,CAAC,oEAAoB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QAChE,CAAC;KAAA;IAED,+CAA+C;IACzC,QAAQ;qEACZ,IAAgC,EAChC,UAAqC,EAAE;YAEvC,OAAO,IAAI,CAAC,YAAY,CAAC,IAAyB,EAAE,OAAO,CAAC,CAAC;QAC/D,CAAC;KAAA;CAGF,CAAA;AA9gBY,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,mBAAU,GAAE;6CAEsC,qDAAwB;GAD9D,oBAAoB,CA8gBhC;AAED,YAAY"}
|
|
@@ -20,9 +20,13 @@ export interface AXEAroFloMappedEmployeePayload {
|
|
|
20
20
|
/** Flexible remote shape from API or IntegrationRemoteRecord.payloadJson.remote. */
|
|
21
21
|
export type AXEAroFloEmployeeRemoteShape = AXEAroFloRemoteUser & {
|
|
22
22
|
userid?: string | number | null;
|
|
23
|
+
user_id?: string | number | null;
|
|
23
24
|
givennames?: string | null;
|
|
25
|
+
first_name?: string | null;
|
|
24
26
|
surname?: string | null;
|
|
27
|
+
last_name?: string | null;
|
|
25
28
|
username?: string | null;
|
|
29
|
+
name?: string | null;
|
|
26
30
|
phone?: string | null;
|
|
27
31
|
mobile?: string | null;
|
|
28
32
|
email?: string | null;
|