@memberjunction/integration-engine 5.37.0 → 5.39.0
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/dist/ActionMetadataGenerator.d.ts +8 -1
- package/dist/ActionMetadataGenerator.d.ts.map +1 -1
- package/dist/ActionMetadataGenerator.js +22 -3
- package/dist/ActionMetadataGenerator.js.map +1 -1
- package/dist/AdaptiveConcurrency.d.ts +85 -0
- package/dist/AdaptiveConcurrency.d.ts.map +1 -0
- package/dist/AdaptiveConcurrency.js +148 -0
- package/dist/AdaptiveConcurrency.js.map +1 -0
- package/dist/BaseIntegrationConnector.d.ts +127 -3
- package/dist/BaseIntegrationConnector.d.ts.map +1 -1
- package/dist/BaseIntegrationConnector.js +126 -11
- package/dist/BaseIntegrationConnector.js.map +1 -1
- package/dist/BaseRESTIntegrationConnector.d.ts +80 -15
- package/dist/BaseRESTIntegrationConnector.d.ts.map +1 -1
- package/dist/BaseRESTIntegrationConnector.js +314 -64
- package/dist/BaseRESTIntegrationConnector.js.map +1 -1
- package/dist/ConflictRecency.d.ts +24 -0
- package/dist/ConflictRecency.d.ts.map +1 -0
- package/dist/ConflictRecency.js +25 -0
- package/dist/ConflictRecency.js.map +1 -0
- package/dist/ContentHash.d.ts +28 -0
- package/dist/ContentHash.d.ts.map +1 -0
- package/dist/ContentHash.js +54 -0
- package/dist/ContentHash.js.map +1 -0
- package/dist/EnrichSchemaConstraints.d.ts +59 -0
- package/dist/EnrichSchemaConstraints.d.ts.map +1 -0
- package/dist/EnrichSchemaConstraints.js +168 -0
- package/dist/EnrichSchemaConstraints.js.map +1 -0
- package/dist/FieldMappingEngine.d.ts +22 -0
- package/dist/FieldMappingEngine.d.ts.map +1 -1
- package/dist/FieldMappingEngine.js +66 -5
- package/dist/FieldMappingEngine.js.map +1 -1
- package/dist/HashDiff.d.ts +68 -0
- package/dist/HashDiff.d.ts.map +1 -0
- package/dist/HashDiff.js +108 -0
- package/dist/HashDiff.js.map +1 -0
- package/dist/IntegrationActionGenerator.d.ts +93 -0
- package/dist/IntegrationActionGenerator.d.ts.map +1 -0
- package/dist/IntegrationActionGenerator.js +313 -0
- package/dist/IntegrationActionGenerator.js.map +1 -0
- package/dist/IntegrationConnectorCreationPipeline.d.ts +86 -0
- package/dist/IntegrationConnectorCreationPipeline.d.ts.map +1 -0
- package/dist/IntegrationConnectorCreationPipeline.js +226 -0
- package/dist/IntegrationConnectorCreationPipeline.js.map +1 -0
- package/dist/IntegrationEngine.d.ts +199 -1
- package/dist/IntegrationEngine.d.ts.map +1 -1
- package/dist/IntegrationEngine.js +1592 -109
- package/dist/IntegrationEngine.js.map +1 -1
- package/dist/IntegrationSchemaSync.d.ts +82 -0
- package/dist/IntegrationSchemaSync.d.ts.map +1 -1
- package/dist/IntegrationSchemaSync.js +289 -42
- package/dist/IntegrationSchemaSync.js.map +1 -1
- package/dist/MatchEngine.d.ts.map +1 -1
- package/dist/MatchEngine.js +4 -0
- package/dist/MatchEngine.js.map +1 -1
- package/dist/RateLimiter.d.ts +117 -0
- package/dist/RateLimiter.d.ts.map +1 -0
- package/dist/RateLimiter.js +159 -0
- package/dist/RateLimiter.js.map +1 -0
- package/dist/SyncLogger.d.ts +106 -0
- package/dist/SyncLogger.d.ts.map +1 -0
- package/dist/SyncLogger.js +176 -0
- package/dist/SyncLogger.js.map +1 -0
- package/dist/WatermarkService.d.ts +36 -1
- package/dist/WatermarkService.d.ts.map +1 -1
- package/dist/WatermarkService.js +113 -3
- package/dist/WatermarkService.js.map +1 -1
- package/dist/index.d.ts +23 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -1
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +52 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +8 -6
|
@@ -32,15 +32,6 @@ export async function WithTimeout(promise, timeoutMs, operationName) {
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
/**
|
|
36
|
-
* Abstract base class for integration connectors.
|
|
37
|
-
* Each external system (HubSpot, Salesforce, etc.) implements this class
|
|
38
|
-
* to provide system-specific data access and discovery.
|
|
39
|
-
*
|
|
40
|
-
* Subclasses declare their capabilities via the `SupportsX` getters.
|
|
41
|
-
* Callers can interrogate a connector instance to determine which
|
|
42
|
-
* operations it supports before attempting them.
|
|
43
|
-
*/
|
|
44
35
|
export class BaseIntegrationConnector {
|
|
45
36
|
// ─── Capability Getters ──────────────────────────────────────────
|
|
46
37
|
// Override in subclasses to declare which operations the connector supports.
|
|
@@ -51,6 +42,11 @@ export class BaseIntegrationConnector {
|
|
|
51
42
|
get SupportsCreate() { return false; }
|
|
52
43
|
/** Whether this connector supports updating existing records in the external system. */
|
|
53
44
|
get SupportsUpdate() { return false; }
|
|
45
|
+
/**
|
|
46
|
+
* Whether this connector supports idempotent upserts (create-or-update keyed
|
|
47
|
+
* by a unique business property). Connectors override this AND `Upsert` to enable it.
|
|
48
|
+
*/
|
|
49
|
+
get SupportsUpsert() { return false; }
|
|
54
50
|
/** Whether this connector supports deleting records from the external system. */
|
|
55
51
|
get SupportsDelete() { return false; }
|
|
56
52
|
/** Whether this connector supports searching/querying records with filters. */
|
|
@@ -76,6 +72,15 @@ export class BaseIntegrationConnector {
|
|
|
76
72
|
async UpdateRecord(_ctx) {
|
|
77
73
|
throw new Error(`UpdateRecord is not supported by ${this.constructor.name}`);
|
|
78
74
|
}
|
|
75
|
+
/**
|
|
76
|
+
* Upserts a record — a single idempotent create-or-update keyed by a unique
|
|
77
|
+
* business property (e.g. email), eliminating the search-then-create race window.
|
|
78
|
+
* Override in subclasses whose external system exposes a keyed upsert primitive.
|
|
79
|
+
* Check `SupportsUpsert` before calling.
|
|
80
|
+
*/
|
|
81
|
+
async Upsert(_ctx) {
|
|
82
|
+
throw new Error(`Upsert is not supported by ${this.constructor.name}`);
|
|
83
|
+
}
|
|
79
84
|
/**
|
|
80
85
|
* Deletes a record from the external system.
|
|
81
86
|
* Override in subclasses that support delete operations.
|
|
@@ -107,6 +112,79 @@ export class BaseIntegrationConnector {
|
|
|
107
112
|
async ListRecords(_ctx) {
|
|
108
113
|
throw new Error(`ListRecords is not supported by ${this.constructor.name}`);
|
|
109
114
|
}
|
|
115
|
+
/**
|
|
116
|
+
* Builds a CRUDResult for a record CREATE, failing LOUDLY when the external system returned
|
|
117
|
+
* no usable record ID. A 2xx response with an empty/undefined ID means the create did not
|
|
118
|
+
* durably produce a record we can track — returning Success:true there silently loses the
|
|
119
|
+
* record and causes duplicate creates on the next sync (the HubSpot-association class of bug,
|
|
120
|
+
* fixed in next commit 9f718a7e). This makes that failure explicit at the connector boundary.
|
|
121
|
+
*/
|
|
122
|
+
BuildCreatedResult(externalID, statusCode, objectName) {
|
|
123
|
+
const id = externalID == null ? '' : String(externalID).trim();
|
|
124
|
+
if (id.length === 0) {
|
|
125
|
+
return {
|
|
126
|
+
Success: false,
|
|
127
|
+
StatusCode: statusCode,
|
|
128
|
+
ErrorMessage: `Create of "${objectName}" returned HTTP ${statusCode} but the response contained no record ID — treating as a failure to avoid silently losing the record (and duplicate creates on the next sync).`,
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
return { Success: true, StatusCode: statusCode, ExternalID: id };
|
|
132
|
+
}
|
|
133
|
+
// ─── §7/§10/§12 Sync-efficiency contract (composable; connector fills in) ─────────
|
|
134
|
+
// Optional hooks the universal sync engine consumes for peak-aware rate limiting, adaptive
|
|
135
|
+
// parallelism, keyset/no-watermark resume, aggressive batch writes, and type-driven
|
|
136
|
+
// post-processing. EVERY member has a safe default, so existing connectors are unaffected; a
|
|
137
|
+
// connector "fills out the contract" by overriding what its source supports (plan.md §7/§10/§12).
|
|
138
|
+
/**
|
|
139
|
+
* Token-bucket rate-limit policy for this connector's source API (plan.md §7 peak-aware rate
|
|
140
|
+
* limiting). `null` → the engine derives a conservative rate from Integration.BatchRequestWaitTime.
|
|
141
|
+
* Override to push to the source's real limits.
|
|
142
|
+
*/
|
|
143
|
+
get RateLimitPolicy() { return null; }
|
|
144
|
+
/**
|
|
145
|
+
* Parse a Retry-After / rate-limit signal out of a failed response or thrown error into
|
|
146
|
+
* milliseconds so the engine can back off precisely. Return `undefined` when the error is not a
|
|
147
|
+
* throttle (or carries no hint).
|
|
148
|
+
*/
|
|
149
|
+
ExtractRetryAfterMs(_error) { return undefined; }
|
|
150
|
+
/**
|
|
151
|
+
* Highest SAFE per-layer concurrency the source tolerates (plan.md §7 peak parallelization) — the
|
|
152
|
+
* ceiling the engine's adaptive controller ramps toward. `null` → use configured syncConcurrency.
|
|
153
|
+
*/
|
|
154
|
+
get MaxConcurrencyHint() { return null; }
|
|
155
|
+
/**
|
|
156
|
+
* Name of a stable, monotonic ordering key (PK/identity) usable for KEYSET/seek resume on
|
|
157
|
+
* watermark-less objects (plan.md §7 — resume from last-seen key, robust to mid-stream
|
|
158
|
+
* insert/delete). `null` → keyset resume unavailable for this object.
|
|
159
|
+
*/
|
|
160
|
+
StableOrderingKey(_objectName) { return null; }
|
|
161
|
+
/** Whether this connector supports batched target writes (plan.md §7 aggressive batching). */
|
|
162
|
+
get SupportsBatchWrite() { return false; }
|
|
163
|
+
/** Batch-create. Default loops single-record CreateRecord, so the engine may always call the batch form. */
|
|
164
|
+
async BatchCreateRecords(ctxs) {
|
|
165
|
+
return this.runBatchViaSingles(ctxs, c => this.CreateRecord(c));
|
|
166
|
+
}
|
|
167
|
+
/** Batch-update. Default loops single-record UpdateRecord. */
|
|
168
|
+
async BatchUpdateRecords(ctxs) {
|
|
169
|
+
return this.runBatchViaSingles(ctxs, c => this.UpdateRecord(c));
|
|
170
|
+
}
|
|
171
|
+
/** Batch-delete. Default loops single-record DeleteRecord. */
|
|
172
|
+
async BatchDeleteRecords(ctxs) {
|
|
173
|
+
return this.runBatchViaSingles(ctxs, c => this.DeleteRecord(c));
|
|
174
|
+
}
|
|
175
|
+
async runBatchViaSingles(ctxs, one) {
|
|
176
|
+
const out = [];
|
|
177
|
+
for (const c of ctxs)
|
|
178
|
+
out.push(await one(c));
|
|
179
|
+
return out;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Type-driven post-processing hook (plan.md §10): a connector may normalize/enforce a record's
|
|
183
|
+
* values to the resolved column formats AFTER transform/normalize and BEFORE write. Default
|
|
184
|
+
* returns the record unchanged. (Named for this system — NOT MCP, not `take`.) The engine ALSO
|
|
185
|
+
* applies target-type constraint enforcement; this is the connector-side complement.
|
|
186
|
+
*/
|
|
187
|
+
PostProcessRecord(record) { return record; }
|
|
110
188
|
/**
|
|
111
189
|
* Returns suggested default field mappings for an external object to MJ entity.
|
|
112
190
|
* Override in subclasses to provide intelligent defaults.
|
|
@@ -209,6 +287,14 @@ export class BaseIntegrationConnector {
|
|
|
209
287
|
if (myIdx >= total)
|
|
210
288
|
return;
|
|
211
289
|
const obj = objects[myIdx];
|
|
290
|
+
const objStart = Date.now();
|
|
291
|
+
console.log(JSON.stringify({
|
|
292
|
+
ts: new Date().toISOString(),
|
|
293
|
+
event: 'introspect.object.start',
|
|
294
|
+
objectIndex: myIdx + 1,
|
|
295
|
+
total,
|
|
296
|
+
objectName: obj.Name,
|
|
297
|
+
}));
|
|
212
298
|
let fields;
|
|
213
299
|
try {
|
|
214
300
|
fields = await this.DiscoverFields(companyIntegration, obj.Name, contextUser);
|
|
@@ -216,9 +302,29 @@ export class BaseIntegrationConnector {
|
|
|
216
302
|
catch (err) {
|
|
217
303
|
const msg = err instanceof Error ? err.message : String(err);
|
|
218
304
|
console.warn(`WARNING: Skipping object "${obj.Name}" — DiscoverFields failed: ${msg}`);
|
|
305
|
+
console.log(JSON.stringify({
|
|
306
|
+
ts: new Date().toISOString(),
|
|
307
|
+
event: 'introspect.object.skipped',
|
|
308
|
+
objectIndex: myIdx + 1,
|
|
309
|
+
total,
|
|
310
|
+
objectName: obj.Name,
|
|
311
|
+
error: msg,
|
|
312
|
+
durationMs: Date.now() - objStart,
|
|
313
|
+
}));
|
|
219
314
|
skipped++;
|
|
220
315
|
continue;
|
|
221
316
|
}
|
|
317
|
+
console.log(JSON.stringify({
|
|
318
|
+
ts: new Date().toISOString(),
|
|
319
|
+
event: 'introspect.object.complete',
|
|
320
|
+
objectIndex: myIdx + 1,
|
|
321
|
+
total,
|
|
322
|
+
objectName: obj.Name,
|
|
323
|
+
fieldsDiscovered: fields.length,
|
|
324
|
+
primaryKeyFields: fields.filter(f => f.IsPrimaryKey).map(f => f.Name),
|
|
325
|
+
foreignKeyFields: fields.filter(f => f.IsForeignKey).length,
|
|
326
|
+
durationMs: Date.now() - objStart,
|
|
327
|
+
}));
|
|
222
328
|
result.Objects.push({
|
|
223
329
|
ExternalName: obj.Name,
|
|
224
330
|
ExternalLabel: obj.Label,
|
|
@@ -229,15 +335,24 @@ export class BaseIntegrationConnector {
|
|
|
229
335
|
Description: f.Description,
|
|
230
336
|
SourceType: f.DataType,
|
|
231
337
|
IsRequired: f.IsRequired,
|
|
338
|
+
AllowsNull: f.AllowsNull,
|
|
232
339
|
MaxLength: f.MaxLength ?? null,
|
|
233
340
|
Precision: f.Precision ?? null,
|
|
234
341
|
Scale: f.Scale ?? null,
|
|
235
342
|
DefaultValue: f.DefaultValue ?? null,
|
|
236
|
-
IsPrimaryKey: f.
|
|
343
|
+
IsPrimaryKey: f.IsPrimaryKey ?? false,
|
|
344
|
+
IsUniqueKey: f.IsUniqueKey,
|
|
345
|
+
IsReadOnly: f.IsReadOnly,
|
|
237
346
|
IsForeignKey: f.IsForeignKey ?? false,
|
|
238
347
|
ForeignKeyTarget: f.ForeignKeyTarget ?? null,
|
|
239
348
|
})),
|
|
240
|
-
|
|
349
|
+
// Honest PK selection: only IsPrimaryKey=true fields qualify.
|
|
350
|
+
// Prior behavior used IsUniqueKey which is wrong — an object
|
|
351
|
+
// can have multiple unique fields (e.g. email + phone) of which
|
|
352
|
+
// only one is the PK. Connectors that don't yet set IsPrimaryKey
|
|
353
|
+
// on their DiscoverFields output will return an empty PrimaryKeyFields;
|
|
354
|
+
// the runtime PK classifier (Phase 0 D2/D4) handles the residual.
|
|
355
|
+
PrimaryKeyFields: fields.filter(f => f.IsPrimaryKey).map(f => f.Name),
|
|
241
356
|
Relationships: fields
|
|
242
357
|
.filter(f => (f.IsForeignKey ?? false) && f.ForeignKeyTarget)
|
|
243
358
|
.map(f => ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseIntegrationConnector.js","sourceRoot":"","sources":["../src/BaseIntegrationConnector.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BaseIntegrationConnector.js","sourceRoot":"","sources":["../src/BaseIntegrationConnector.ts"],"names":[],"mappings":"AAsLA,sDAAsD;AACtD,MAAM,CAAC,MAAM,0BAA0B,GAAsB;IACzD,gBAAgB,EAAE,IAAI;IACtB,iBAAiB,EAAE,KAAK;IACxB,gBAAgB,EAAE,KAAK;IACvB,cAAc,EAAE,KAAK;CACxB,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAC7B,OAAmB,EACnB,SAAiB,EACjB,aAAqB;IAErB,IAAI,aAAwD,CAAC;IAE7D,MAAM,cAAc,GAAG,IAAI,OAAO,CAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE;QAC3D,aAAa,GAAG,UAAU,CAAC,GAAG,EAAE;YAC5B,MAAM,CAAC,IAAI,KAAK,CAAC,cAAc,aAAa,qBAAqB,SAAS,IAAI,CAAC,CAAC,CAAC;QACrF,CAAC,EAAE,SAAS,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC;QACD,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC;QAC7D,OAAO,MAAM,CAAC;IAClB,CAAC;YAAS,CAAC;QACP,IAAI,aAAa,KAAK,SAAS,EAAE,CAAC;YAC9B,YAAY,CAAC,aAAa,CAAC,CAAC;QAChC,CAAC;IACL,CAAC;AACL,CAAC;AA+CD,MAAM,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wBACjC,WAAW,EAAE,IAAI;qBACpB,CAAC,CAAC;iBACV,CAAC,CAAC;gBACH,SAAS,EAAE,CAAC;gBACZ,MAAM,IAAI,GAAG,SAAS,GAAG,OAAO,CAAC;gBACjC,IAAI,IAAI,GAAG,GAAG,KAAK,CAAC,IAAI,IAAI,KAAK,KAAK,EAAE,CAAC;oBACrC,MAAM,UAAU,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;oBAC9D,OAAO,CAAC,GAAG,CACP,gCAAgC,IAAI,IAAI,KAAK,QAAQ,SAAS,aAAa,OAAO,OAAO,UAAU,WAAW,CACjH,CAAC;gBACN,CAAC;YACL,CAAC;QACL,CAAC,CAAC;QAEF,MAAM,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;QACjD,MAAM,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,EAAE,GAAG,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;QAEvE,OAAO,MAAM,CAAC;IAClB,CAAC;CAEJ"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type UserInfo } from '@memberjunction/core';
|
|
2
2
|
import type { MJCompanyIntegrationEntity, MJIntegrationObjectEntity, MJIntegrationObjectFieldEntity } from '@memberjunction/core-entities';
|
|
3
3
|
import { BaseIntegrationConnector, type ExternalObjectSchema, type ExternalFieldSchema, type FetchContext, type FetchBatchResult } from './BaseIntegrationConnector.js';
|
|
4
|
-
import type { SourceSchemaInfo } from './types.js';
|
|
4
|
+
import type { ExternalRecord, SourceSchemaInfo, CreateRecordContext, UpdateRecordContext, DeleteRecordContext, GetRecordContext, CRUDResult } from './types.js';
|
|
5
5
|
/** Authentication context returned by Authenticate(). Concrete connectors extend this. */
|
|
6
6
|
export interface RESTAuthContext {
|
|
7
7
|
/** Bearer or session token */
|
|
@@ -88,6 +88,20 @@ export declare abstract class BaseRESTIntegrationConnector extends BaseIntegrati
|
|
|
88
88
|
* Combined with the object's APIPath to form the full request URL.
|
|
89
89
|
*/
|
|
90
90
|
protected abstract GetBaseURL(companyIntegration: MJCompanyIntegrationEntity, auth: RESTAuthContext): string;
|
|
91
|
+
/**
|
|
92
|
+
* Optional per-record CUSTOMIZATION hook called between NormalizeResponse
|
|
93
|
+
* (vendor envelope-stripping) and ToExternalRecord (composite-PK assembly).
|
|
94
|
+
*
|
|
95
|
+
* Distinct from NormalizeResponse — that strips the vendor's response envelope
|
|
96
|
+
* to expose individual records. This hook is for vendor-specific record-level
|
|
97
|
+
* customization the standard pipeline shouldn't carry: nested-field flattening,
|
|
98
|
+
* empty-string→null coercion for date columns, computed fields, removing vendor
|
|
99
|
+
* metadata blobs (e.g. Salesforce 'attributes'), etc.
|
|
100
|
+
*
|
|
101
|
+
* Default is identity (no transform). Override only when a concrete connector
|
|
102
|
+
* needs vendor-specific shape changes.
|
|
103
|
+
*/
|
|
104
|
+
protected TransformRecord(raw: Record<string, unknown>, _obj: MJIntegrationObjectEntity, _fields: MJIntegrationObjectFieldEntity[]): Record<string, unknown>;
|
|
91
105
|
/**
|
|
92
106
|
* Discovers available objects from the IntegrationEngineBase cache.
|
|
93
107
|
*/
|
|
@@ -107,33 +121,84 @@ export declare abstract class BaseRESTIntegrationConnector extends BaseIntegrati
|
|
|
107
121
|
* Handles both flat endpoints and template-variable (per-parent) endpoints.
|
|
108
122
|
*/
|
|
109
123
|
FetchChanges(ctx: FetchContext): Promise<FetchBatchResult>;
|
|
124
|
+
/** Generic create: reads CreateAPIPath/Method/BodyShape/BodyKey/IDLocation from the IO row. */
|
|
125
|
+
CreateRecord(ctx: CreateRecordContext): Promise<CRUDResult>;
|
|
126
|
+
/** Generic update: reads UpdateAPIPath/Method/BodyShape/BodyKey/IDLocation from the IO row. */
|
|
127
|
+
UpdateRecord(ctx: UpdateRecordContext): Promise<CRUDResult>;
|
|
128
|
+
/** Generic delete: reads DeleteAPIPath/DeleteMethod/DeleteIDLocation from the IO row. */
|
|
129
|
+
DeleteRecord(ctx: DeleteRecordContext): Promise<CRUDResult>;
|
|
130
|
+
/** Generic get-one: hits APIPath/{ID} via GET. Override if API uses non-standard get shape. */
|
|
131
|
+
GetRecord(ctx: GetRecordContext): Promise<ExternalRecord | null>;
|
|
132
|
+
/**
|
|
133
|
+
* Build the operation request body per BodyShape:
|
|
134
|
+
* - 'flat' → body = attributes verbatim
|
|
135
|
+
* - 'wrapped' → body = { [BodyKey]: attributes }
|
|
136
|
+
* - 'literal' → connector should have overridden the operation; fall back to flat as safety net
|
|
137
|
+
* - null → default to flat (most common shape)
|
|
138
|
+
*/
|
|
139
|
+
protected BuildOperationBody(attributes: Record<string, unknown>, bodyShape: string | null, bodyKey: string | null): unknown;
|
|
140
|
+
/**
|
|
141
|
+
* Substitute the ExternalID into a URL path template at runtime. Path templates
|
|
142
|
+
* may use {ID}, {id}, or {ExternalID} as the placeholder; for symmetry with
|
|
143
|
+
* FetchChanges template-var handling, any unsubstituted {var} in the template
|
|
144
|
+
* is left in place (caller's responsibility to ensure consistency).
|
|
145
|
+
*
|
|
146
|
+
* For IDLocation='body' or 'header' the ID is not substituted into the path
|
|
147
|
+
* (caller must handle separately); we just return the raw path.
|
|
148
|
+
*/
|
|
149
|
+
protected SubstituteIDInPath(path: string, externalID: string, idLocation: string | null): string;
|
|
150
|
+
/** Best-effort error message extraction from a vendor response. Override for vendor-specific shapes. */
|
|
151
|
+
protected ExtractErrorMessage(response: RESTResponse): string | undefined;
|
|
152
|
+
/** Extract the new record's external ID from a create response per IDLocation. */
|
|
153
|
+
protected ExtractIDFromResponse(response: RESTResponse, idLocation: string | null): string | undefined;
|
|
110
154
|
/**
|
|
111
155
|
* Fetches records from a flat endpoint (no template variable substitution).
|
|
112
156
|
*/
|
|
113
157
|
private FetchFlat;
|
|
114
158
|
/**
|
|
115
|
-
* Fetches records from a template-variable endpoint
|
|
116
|
-
*
|
|
117
|
-
*
|
|
159
|
+
* Fetches records from a template-variable endpoint, generalized to MULTI-LEVEL
|
|
160
|
+
* (nested / chained) paths such as `/orgs/{OrgID}/depts/{DeptID}/employees`.
|
|
161
|
+
*
|
|
162
|
+
* Each `{var}` is resolved to a parent IntegrationObject; the engine then walks the
|
|
163
|
+
* FK dependency graph in path order (outermost first), loading each level's parent
|
|
164
|
+
* IDs — filtered by the OUTER parent via FK when one links them (true nested
|
|
165
|
+
* semantics, avoids a cartesian 404 storm), or unfiltered when the vars are
|
|
166
|
+
* independent — substituting them into the path until it is flat, then fetching.
|
|
167
|
+
* This is the connector-side realization of the topological traversal the engine
|
|
168
|
+
* already uses for sync ORDER. A single-var path behaves exactly as before.
|
|
118
169
|
*/
|
|
119
170
|
private FetchWithTemplateVars;
|
|
120
171
|
/**
|
|
121
|
-
*
|
|
172
|
+
* Recursive descent over the ordered template-var resolutions, one layer per level.
|
|
173
|
+
*
|
|
174
|
+
* Each layer's records are constrained to the valid SUBSET of the combinations of
|
|
175
|
+
* ALL prior layers: this level's parent is filtered by an FK to EVERY prior-layer
|
|
176
|
+
* parent it links to (AND-combined). A prior layer this parent has no FK to leaves
|
|
177
|
+
* that axis unconstrained (cartesian). So `outerStack` carries every prior layer's
|
|
178
|
+
* (objectID, idValue) — not just the immediate parent — which is what makes a
|
|
179
|
+
* layer-2 endpoint depending on both layer-0 and layer-1 prune correctly. At the leaf
|
|
180
|
+
* (all vars substituted) it fetches with pagination and tags each record with the
|
|
181
|
+
* resolved parent FK values.
|
|
182
|
+
*/
|
|
183
|
+
private DescendTemplateVars;
|
|
184
|
+
/**
|
|
185
|
+
* Resolves a SINGLE template variable to its parent object + FK field.
|
|
122
186
|
*
|
|
123
|
-
*
|
|
124
|
-
* 1. Explicit: FK field
|
|
125
|
-
* 2. PK fallback:
|
|
126
|
-
*
|
|
187
|
+
* Strategy (in order):
|
|
188
|
+
* 1. Explicit: an FK field (RelatedIntegrationObjectID) whose name matches the var.
|
|
189
|
+
* 2. PK fallback: a sibling integration object whose primary-key field name matches
|
|
190
|
+
* the var (e.g. {ProfileID} → the Members object whose PK field is "ProfileID"),
|
|
191
|
+
* allowing resolution without explicit FK metadata.
|
|
127
192
|
*
|
|
128
|
-
* Returns null
|
|
193
|
+
* Returns null when neither strategy matches.
|
|
129
194
|
*/
|
|
130
|
-
private
|
|
195
|
+
private ResolveParentForVar;
|
|
131
196
|
/**
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
*
|
|
197
|
+
* Finds the FK column on `innerObjectID` that points at `outerObjectID` — used to
|
|
198
|
+
* filter a child level by its parent in a nested path. Returns null when no FK links
|
|
199
|
+
* them, in which case that level loads unfiltered (independent vars / cartesian).
|
|
135
200
|
*/
|
|
136
|
-
private
|
|
201
|
+
private FindFKColumnToParent;
|
|
137
202
|
/**
|
|
138
203
|
* Loads parent record IDs from the local MJ database.
|
|
139
204
|
* Uses IntegrationEngineBase cache for object/field metadata lookups,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseRESTIntegrationConnector.d.ts","sourceRoot":"","sources":["../src/BaseRESTIntegrationConnector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAE9D,OAAO,KAAK,EAAE,0BAA0B,EAAE,yBAAyB,EAAE,8BAA8B,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"BaseRESTIntegrationConnector.d.ts","sourceRoot":"","sources":["../src/BaseRESTIntegrationConnector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAE9D,OAAO,KAAK,EAAE,0BAA0B,EAAE,yBAAyB,EAAE,8BAA8B,EAAE,MAAM,+BAA+B,CAAC;AAG3I,OAAO,EACH,wBAAwB,EACxB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK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