@memberjunction/integration-engine 6.1.0-edge.3 → 6.1.0-edge.5
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/BaseIntegrationConnector.d.ts +26 -2
- package/dist/BaseIntegrationConnector.d.ts.map +1 -1
- package/dist/BaseIntegrationConnector.js +145 -23
- package/dist/BaseIntegrationConnector.js.map +1 -1
- package/dist/BaseRESTIntegrationConnector.d.ts +62 -8
- package/dist/BaseRESTIntegrationConnector.d.ts.map +1 -1
- package/dist/BaseRESTIntegrationConnector.js +200 -20
- package/dist/BaseRESTIntegrationConnector.js.map +1 -1
- package/dist/BatchIdentity.d.ts +47 -0
- package/dist/BatchIdentity.d.ts.map +1 -0
- package/dist/BatchIdentity.js +78 -0
- package/dist/BatchIdentity.js.map +1 -0
- package/dist/DeclaredSampleMerge.d.ts +74 -0
- package/dist/DeclaredSampleMerge.d.ts.map +1 -0
- package/dist/DeclaredSampleMerge.js +104 -0
- package/dist/DeclaredSampleMerge.js.map +1 -0
- package/dist/DiscoveryWatchdog.d.ts +103 -0
- package/dist/DiscoveryWatchdog.d.ts.map +1 -0
- package/dist/DiscoveryWatchdog.js +166 -0
- package/dist/DiscoveryWatchdog.js.map +1 -0
- package/dist/FieldMapValidation.d.ts +40 -0
- package/dist/FieldMapValidation.d.ts.map +1 -0
- package/dist/FieldMapValidation.js +58 -0
- package/dist/FieldMapValidation.js.map +1 -0
- package/dist/FieldMappingEngine.d.ts +1 -13
- package/dist/FieldMappingEngine.d.ts.map +1 -1
- package/dist/FieldMappingEngine.js +18 -3
- package/dist/FieldMappingEngine.js.map +1 -1
- package/dist/IntegrationConnectorCreationPipeline.d.ts +20 -0
- package/dist/IntegrationConnectorCreationPipeline.d.ts.map +1 -1
- package/dist/IntegrationConnectorCreationPipeline.js +203 -30
- package/dist/IntegrationConnectorCreationPipeline.js.map +1 -1
- package/dist/IntegrationEngine.d.ts +204 -1
- package/dist/IntegrationEngine.d.ts.map +1 -1
- package/dist/IntegrationEngine.js +1224 -262
- package/dist/IntegrationEngine.js.map +1 -1
- package/dist/IntegrationSchemaSync.d.ts +54 -2
- package/dist/IntegrationSchemaSync.d.ts.map +1 -1
- package/dist/IntegrationSchemaSync.js +122 -16
- package/dist/IntegrationSchemaSync.js.map +1 -1
- package/dist/KeylessRecordGuard.d.ts +56 -0
- package/dist/KeylessRecordGuard.d.ts.map +1 -0
- package/dist/KeylessRecordGuard.js +80 -0
- package/dist/KeylessRecordGuard.js.map +1 -0
- package/dist/ResumeConcurrency.d.ts +46 -0
- package/dist/ResumeConcurrency.d.ts.map +1 -0
- package/dist/ResumeConcurrency.js +74 -0
- package/dist/ResumeConcurrency.js.map +1 -0
- package/dist/RetryAfter.d.ts +50 -0
- package/dist/RetryAfter.d.ts.map +1 -0
- package/dist/RetryAfter.js +127 -0
- package/dist/RetryAfter.js.map +1 -0
- package/dist/RetryRunner.d.ts +26 -2
- package/dist/RetryRunner.d.ts.map +1 -1
- package/dist/RetryRunner.js +11 -3
- package/dist/RetryRunner.js.map +1 -1
- package/dist/StreamingDiscovery.d.ts +11 -0
- package/dist/StreamingDiscovery.d.ts.map +1 -1
- package/dist/StreamingDiscovery.js +13 -3
- package/dist/StreamingDiscovery.js.map +1 -1
- package/dist/SyncDirectives.d.ts +66 -0
- package/dist/SyncDirectives.d.ts.map +1 -0
- package/dist/SyncDirectives.js +123 -0
- package/dist/SyncDirectives.js.map +1 -0
- package/dist/SyncLogger.d.ts +2 -1
- package/dist/SyncLogger.d.ts.map +1 -1
- package/dist/SyncLogger.js +1 -0
- package/dist/SyncLogger.js.map +1 -1
- package/dist/WatermarkService.d.ts +15 -0
- package/dist/WatermarkService.d.ts.map +1 -1
- package/dist/WatermarkService.js +26 -0
- package/dist/WatermarkService.js.map +1 -1
- package/dist/WriteSerializer.d.ts +44 -0
- package/dist/WriteSerializer.d.ts.map +1 -0
- package/dist/WriteSerializer.js +70 -0
- package/dist/WriteSerializer.js.map +1 -0
- package/dist/index.d.ts +10 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -1
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +45 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +66 -1
- package/dist/types.js.map +1 -1
- package/package.json +7 -7
|
@@ -33,6 +33,26 @@ export declare class SchemaNotGeneratedError extends Error {
|
|
|
33
33
|
readonly StoredProcedureName: string;
|
|
34
34
|
constructor(entityName: string, storedProcedureName: string);
|
|
35
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* Thrown by a connector when the vendor says THIS account cannot serve an object it nonetheless
|
|
38
|
+
* lists in its catalog (e.g. a record type the account has not enabled). Distinct from a fetch
|
|
39
|
+
* failure: retrying cannot help WITHIN a run, so the map ends cleanly instead of climbing a retry
|
|
40
|
+
* ladder — one warning, watermark untouched.
|
|
41
|
+
*
|
|
42
|
+
* It is deliberately not remembered ACROSS runs. The next run simply asks again, which is what makes
|
|
43
|
+
* an account change self-healing with no marker, no recheck clock and no override to get right.
|
|
44
|
+
*
|
|
45
|
+
* Connectors are NOT required to import this class — the engine also recognises any error carrying
|
|
46
|
+
* `code === 'OBJECT_UNAVAILABLE'`, so a connector can classify one without a peer version bump.
|
|
47
|
+
*/
|
|
48
|
+
export declare class ObjectUnavailableError extends Error {
|
|
49
|
+
readonly code = "OBJECT_UNAVAILABLE";
|
|
50
|
+
/** The vendor's own explanation, surfaced to the operator verbatim. */
|
|
51
|
+
readonly VendorMessage: string;
|
|
52
|
+
constructor(objectName: string, vendorMessage: string);
|
|
53
|
+
}
|
|
54
|
+
/** Recognises an unavailability signal from a connector that imported the class OR just set the code. */
|
|
55
|
+
export declare function IsObjectUnavailable(err: unknown): boolean;
|
|
36
56
|
/**
|
|
37
57
|
* §29 — base of the VALUE-FIT error family: a mapped value cannot fit/coerce into its destination
|
|
38
58
|
* column's type. Per the bounded-typing policy (small columns; large content is an explicit text/json
|
|
@@ -81,6 +101,14 @@ export declare class NumericOverflowError extends ValueFitError {
|
|
|
81
101
|
* Exported so the guard itself is unit-testable without standing up a sync.
|
|
82
102
|
*/
|
|
83
103
|
export declare function PositiveInt(v: unknown): number | undefined;
|
|
104
|
+
/**
|
|
105
|
+
* How many deferred writes may accumulate in one batched group before it is submitted and replaced.
|
|
106
|
+
*
|
|
107
|
+
* `undefined` (unset, or any unusable value) means no mid-batch flush at all — the batch is one
|
|
108
|
+
* group and one transaction, which is the default and the behaviour that shipped. An explicit value
|
|
109
|
+
* trades that atomicity for bounded memory on a heap-constrained box.
|
|
110
|
+
*/
|
|
111
|
+
export declare function ReadFlushCeiling(env: NodeJS.ProcessEnv): number | undefined;
|
|
84
112
|
export declare class IntegrationEngine extends BaseSingleton<IntegrationEngine> {
|
|
85
113
|
constructor();
|
|
86
114
|
/**
|
|
@@ -123,8 +151,69 @@ export declare class IntegrationEngine extends BaseSingleton<IntegrationEngine>
|
|
|
123
151
|
* calls without threading a parameter through ~20 private signatures.
|
|
124
152
|
*/
|
|
125
153
|
private static readonly runContext;
|
|
154
|
+
/**
|
|
155
|
+
* The connection's opt-in write mode, from `CompanyIntegration.Configuration`.
|
|
156
|
+
*
|
|
157
|
+
* Returns `''` for absent, unparseable or wrongly-typed configuration. Every failure mode
|
|
158
|
+
* therefore lands on the proven per-record path: a connection has to ASK for batched writes,
|
|
159
|
+
* and a malformed request is not an ask.
|
|
160
|
+
*/
|
|
161
|
+
private ReadWriteMode;
|
|
126
162
|
/** The current run's context, when called from inside a sync run. */
|
|
127
163
|
private get currentRunContext();
|
|
164
|
+
/**
|
|
165
|
+
* Defers this entity's write into the batch's group, when the connection asked for that.
|
|
166
|
+
*
|
|
167
|
+
* A no-op when no group is active, which is every existing caller — an entity constructed
|
|
168
|
+
* outside a batched apply saves immediately, exactly as before. What this does NOT do is skip
|
|
169
|
+
* any part of the save: `Save()` still validates, still checks row scope, still renders the
|
|
170
|
+
* generated procedure call, and still fires its post-save hook. Only the moment the SQL travels
|
|
171
|
+
* changes, and the group is what makes N of them travel together.
|
|
172
|
+
*/
|
|
173
|
+
private enrolInWriteGroup;
|
|
174
|
+
/**
|
|
175
|
+
* True when the entity's identity is a SINGLE auto-increment column — the one primary-key
|
|
176
|
+
* shape whose value cannot be known until the insert has executed. See {@link enrolInWriteGroup}.
|
|
177
|
+
*/
|
|
178
|
+
private hasIdentityOnlyPrimaryKey;
|
|
179
|
+
/**
|
|
180
|
+
* The MAP-level twin of {@link hasIdentityOnlyPrimaryKey}, asked BEFORE a write group is
|
|
181
|
+
* created. The entity-level guard refuses enrolment per record, which is total at the seam —
|
|
182
|
+
* but for a map whose target is that shape it refuses EVERY record, and the branch around it
|
|
183
|
+
* has already committed to being atomic by construction: it skips `BeginTransaction` because
|
|
184
|
+
* a group exists. The result is a group that stays empty, no transaction, records saving
|
|
185
|
+
* one-by-one on their own, and an empty `Submit()` returning true — a NON-ATOMIC batch
|
|
186
|
+
* reporting success as an atomic one.
|
|
187
|
+
*
|
|
188
|
+
* Worse on the failure path: a mid-batch throw correctly skips the rollback (there is no
|
|
189
|
+
* transaction), then the fallback re-applies the WHOLE batch including rows that already
|
|
190
|
+
* committed. With a server-assigned identity there is nothing to recognise the first copy
|
|
191
|
+
* by, so those become duplicates — the very failure the enrolment guard exists to prevent,
|
|
192
|
+
* reached from the other side.
|
|
193
|
+
*
|
|
194
|
+
* So the decision is made here, at the map, and such a map falls to the `useTransaction`
|
|
195
|
+
* path and gets REAL atomicity instead of an empty group.
|
|
196
|
+
*
|
|
197
|
+
* Deliberately not asserted at `Submit()` instead: an empty group is a legitimate state —
|
|
198
|
+
* when the content-hash fast path skips every record in a batch, nothing enrols and the
|
|
199
|
+
* group is correctly empty. At submit time the harmful and benign cases are
|
|
200
|
+
* indistinguishable, which is exactly why this has to be decided up front.
|
|
201
|
+
*/
|
|
202
|
+
private entityMapHasIdentityOnlyPK;
|
|
203
|
+
/**
|
|
204
|
+
* The connection's write-side-effect mode from `CompanyIntegration.Configuration`. Returns ''
|
|
205
|
+
* for absent, unparseable or wrongly-typed configuration — every failure mode keeps the side
|
|
206
|
+
* effects ON. A connection has to ask, and a malformed request is not an ask.
|
|
207
|
+
*/
|
|
208
|
+
private ReadWriteSideEffects;
|
|
209
|
+
/**
|
|
210
|
+
* Save options for THIS run's machine writes: suppress the audit row + geocode lookup when
|
|
211
|
+
* the connection asked for it, undefined otherwise (identical to the pre-feature call).
|
|
212
|
+
* Scoped to the sync's own saves — never to any other writer of the same entities.
|
|
213
|
+
*/
|
|
214
|
+
private get syncSaveOptions();
|
|
215
|
+
/** Delete twin of {@link syncSaveOptions}. */
|
|
216
|
+
private get syncDeleteOptions();
|
|
128
217
|
/**
|
|
129
218
|
* Server-registered hook for post-sync custom-column promotion (gaps.md §2 / M2). The
|
|
130
219
|
* engine has no dependency on RSU/CodeGen — the server registers an implementation via
|
|
@@ -171,8 +260,23 @@ export declare class IntegrationEngine extends BaseSingleton<IntegrationEngine>
|
|
|
171
260
|
* phase stays parallel (the real throughput win — it's network-bound). WeakMap so a
|
|
172
261
|
* retired provider's chain entry is collectable.
|
|
173
262
|
*/
|
|
174
|
-
private static readonly
|
|
263
|
+
private static readonly writeSerializers;
|
|
264
|
+
/** The write lock for this engine's provider, created on first use. */
|
|
265
|
+
private writeSerializer;
|
|
266
|
+
/**
|
|
267
|
+
* Runs `fn` with NO other write in flight against the provider. Required for work that opens
|
|
268
|
+
* the provider's single global transaction — while it is open, any other write would join it.
|
|
269
|
+
*/
|
|
175
270
|
private runWriteExclusive;
|
|
271
|
+
/**
|
|
272
|
+
* Runs `fn` ordered against other writes for the SAME entity map, concurrently with other maps.
|
|
273
|
+
*
|
|
274
|
+
* Only for work that opens no provider transaction — watermark bookkeeping, match resolution,
|
|
275
|
+
* and the post-batch flushes of a batched (TransactionGroup-carrying) apply. Those were queued
|
|
276
|
+
* behind every other map's writes purely because the lock could not tell them apart from a
|
|
277
|
+
* transaction-holding section.
|
|
278
|
+
*/
|
|
279
|
+
private runWriteForMap;
|
|
176
280
|
/**
|
|
177
281
|
* Fence check at a batch boundary, BEFORE any write (PR 1 item 3). One SELECT of the run's
|
|
178
282
|
* ownership columns: if the fence has moved (the stale sweep or another worker reclaimed the
|
|
@@ -262,6 +366,20 @@ export declare class IntegrationEngine extends BaseSingleton<IntegrationEngine>
|
|
|
262
366
|
* Call this once during MJAPI startup after metadata is loaded.
|
|
263
367
|
*/
|
|
264
368
|
ResumeOrphanedSyncs(contextUser: UserInfo, provider?: IMetadataProvider): Promise<void>;
|
|
369
|
+
/**
|
|
370
|
+
* Resume ONE orphaned run, end to end: reserve the per-CompanyIntegration lock, claim the run,
|
|
371
|
+
* work out which entity maps already finished, and execute the rest under a fresh run context.
|
|
372
|
+
*
|
|
373
|
+
* Extracted from {@link ResumeOrphanedSyncs}'s loop so several runs can be in flight at once.
|
|
374
|
+
* NEVER THROWS — every failure path is handled here and recorded on the run row. A resume that
|
|
375
|
+
* threw out of this method would take a pool slot with it and, worse, could abandon the runs
|
|
376
|
+
* queued behind it, which is the exact failure this parallelisation exists to remove.
|
|
377
|
+
*
|
|
378
|
+
* The check-and-reserve on `activeSyncs` still has no `await` in front of it, so it stays
|
|
379
|
+
* atomic with several of these in flight: an async function runs synchronously up to its first
|
|
380
|
+
* await, and the pool always starts one from a synchronous call site.
|
|
381
|
+
*/
|
|
382
|
+
private ResumeOneOrphanedRun;
|
|
265
383
|
/**
|
|
266
384
|
* Executes a full sync run for a company integration.
|
|
267
385
|
* If a sync is already running for the same integration, waits for it to finish
|
|
@@ -393,6 +511,53 @@ export declare class IntegrationEngine extends BaseSingleton<IntegrationEngine>
|
|
|
393
511
|
private runBounded;
|
|
394
512
|
/** Per-integration request-spacing chain for the rate limiter (keyed by IntegrationID → last scheduled time). */
|
|
395
513
|
private readonly _rateLimiters;
|
|
514
|
+
/**
|
|
515
|
+
* Per-connection gate on SIMULTANEOUS vendor fetches — adaptive, throttle-detected.
|
|
516
|
+
*
|
|
517
|
+
* Vendors govern by concurrent requests per ACCOUNT (NetSuite's base tier is 5), and the
|
|
518
|
+
* punishment for exceeding the grant is served INSIDE the fetch: the request is rejected
|
|
519
|
+
* and the retry's backoff burns tens of seconds while every resource metric reads idle.
|
|
520
|
+
* Measured live: a tight cluster of ~31.5s fetch durations on an account whose grant was 5
|
|
521
|
+
* while the engine had ~16 requests in flight (lanes x prefetch).
|
|
522
|
+
*
|
|
523
|
+
* The gate caps in-flight fetches per connection so the overflow queues CLIENT-side for
|
|
524
|
+
* milliseconds instead of SERVER-side for seconds. Sync concurrency (how many entity maps
|
|
525
|
+
* run at once) is deliberately NOT reduced — only simultaneous wire calls are.
|
|
526
|
+
*
|
|
527
|
+
* The cap is adaptive (AIMD): it starts at `Configuration.fetchConcurrency ??
|
|
528
|
+
* connector.MaxConcurrencyHint ?? 5`, HALVES whenever a throttle is detected, and creeps
|
|
529
|
+
* back up by 1 per clean fetch. Throttles reach it from both directions: fetch-level
|
|
530
|
+
* RATE_LIMIT errors the engine sees itself, and throttles the connector absorbs inside
|
|
531
|
+
* its own retry loop and reports via `ctx.RateLimitReport` — both land in
|
|
532
|
+
* `reportRateOutcome`, which feeds this controller. The gate therefore FINDS the
|
|
533
|
+
* account's real grant with zero configuration, and scales up automatically on accounts
|
|
534
|
+
* with a larger one.
|
|
535
|
+
*/
|
|
536
|
+
private _fetchGates?;
|
|
537
|
+
private getFetchGate;
|
|
538
|
+
/**
|
|
539
|
+
* Runs `fn` holding one slot of the connection's fetch gate. A whole retry episode holds a
|
|
540
|
+
* single slot — retries of a throttled call must not add pressure to the account that just
|
|
541
|
+
* throttled us. FIFO: waiters resolve in arrival order as slots free or the cap grows.
|
|
542
|
+
*/
|
|
543
|
+
private withFetchGate;
|
|
544
|
+
/**
|
|
545
|
+
* One governed vendor fetch: rate-limit token, adaptive fetch gate, per-attempt timeout,
|
|
546
|
+
* transient-only retry with Retry-After pacing, and ONE multiplicative decrease per throttle
|
|
547
|
+
* EPISODE (not per rejected attempt — a 429 that survives three retries is three rejections
|
|
548
|
+
* but one congestion event, the same distinction TCP draws when it halves the window once per
|
|
549
|
+
* loss event). Extracted so the loop-top fetch and the pipelined prefetch (which starts the
|
|
550
|
+
* next page while the current one is processed) share EXACTLY the same pacing and error
|
|
551
|
+
* semantics — a prefetched page must be indistinguishable from a loop-top fetch to the vendor.
|
|
552
|
+
*
|
|
553
|
+
* Retry predicate: our OWN timeout is terminal for this page (WithTimeout is a Promise.race
|
|
554
|
+
* with no cancellation, so the abandoned attempt keeps running — retrying stacks a second full
|
|
555
|
+
* page of vendor requests on a source already too slow to finish one); a transport error is
|
|
556
|
+
* not (a reset socket IS worth retrying). A throttle honors the source's Retry-After via
|
|
557
|
+
* DelayForError, and every retry re-passes the rate limiter via BeforeRetry so it cannot
|
|
558
|
+
* bypass a freeze the throttle just applied.
|
|
559
|
+
*/
|
|
560
|
+
private governedFetch;
|
|
396
561
|
/** Minimum ms between outbound requests for this integration (Integration.BatchRequestWaitTime; 0 = disabled). */
|
|
397
562
|
private getRequestSpacingMs;
|
|
398
563
|
/**
|
|
@@ -438,6 +603,8 @@ export declare class IntegrationEngine extends BaseSingleton<IntegrationEngine>
|
|
|
438
603
|
* - Bidirectional: pull first, then push
|
|
439
604
|
*/
|
|
440
605
|
private ProcessSingleEntityMap;
|
|
606
|
+
/** Loads the map fresh and writes its Configuration through Save(), like every other engine write. */
|
|
607
|
+
private SaveEntityMapConfiguration;
|
|
441
608
|
/**
|
|
442
609
|
* Pull sync: fetch from external → map → match → validate → apply to MJ.
|
|
443
610
|
*/
|
|
@@ -521,6 +688,13 @@ export declare class IntegrationEngine extends BaseSingleton<IntegrationEngine>
|
|
|
521
688
|
* These records were deleted externally and should be removed from MJ.
|
|
522
689
|
*/
|
|
523
690
|
private DeleteOrphanedRecords;
|
|
691
|
+
/**
|
|
692
|
+
* Removes one 'MJ: Company Integration Record Maps' row after delete-detection has handled
|
|
693
|
+
* its orphan (deleted, archived, or found already gone). A failure here is logged and
|
|
694
|
+
* swallowed: the orphan itself was handled, and the worst consequence of a surviving map
|
|
695
|
+
* row is one redundant re-detection on the next full sync.
|
|
696
|
+
*/
|
|
697
|
+
private DeleteRecordMapRow;
|
|
524
698
|
/**
|
|
525
699
|
* Strips field-name prefixes from a RecordChange.RecordID to get the raw entity record ID.
|
|
526
700
|
* "hs_object_id|465950833372" → "465950833372"
|
|
@@ -624,6 +798,19 @@ export declare class IntegrationEngine extends BaseSingleton<IntegrationEngine>
|
|
|
624
798
|
* so the record is genuinely new and must be inserted. Used by CreateRecord for PK-safe upsert.
|
|
625
799
|
*/
|
|
626
800
|
private extractMappedPrimaryKey;
|
|
801
|
+
/**
|
|
802
|
+
* True ONLY when the batch prefetch PROVED this record's row does not exist: the prefetch covered
|
|
803
|
+
* every record in the batch AND this key is missing from the rows it found. Anything less is
|
|
804
|
+
* "unknown", and unknown must load — a wrong "absent" turns an update into a duplicate INSERT.
|
|
805
|
+
*
|
|
806
|
+
* `mappedPK` must be the '|'-joined key {@link extractMappedPrimaryKey} returns — the SAME shape
|
|
807
|
+
* {@link PrefetchContentHashes} keys `Present` with (`pkNames.map(n => row[n] ?? '').join('|')`).
|
|
808
|
+
* The first version of this check re-derived a key by indexing that string with PK field names,
|
|
809
|
+
* which evaluates to `''` for every record — so "provably absent" was unconditionally true and
|
|
810
|
+
* every upsert of an existing row became a blind duplicate INSERT. Kept as its own method so the
|
|
811
|
+
* decision is testable against the real extractor's output rather than a re-implementation.
|
|
812
|
+
*/
|
|
813
|
+
private isProvablyAbsent;
|
|
627
814
|
/**
|
|
628
815
|
* Updates an existing MJ record with pre-write validation.
|
|
629
816
|
* If the record cannot be loaded (e.g. it was deleted or never fully created),
|
|
@@ -656,6 +843,15 @@ export declare class IntegrationEngine extends BaseSingleton<IntegrationEngine>
|
|
|
656
843
|
* the same format written by BaseRESTIntegrationConnector.ToExternalRecord.
|
|
657
844
|
*/
|
|
658
845
|
private BuildEntityPrimaryKey;
|
|
846
|
+
/**
|
|
847
|
+
* Reports ACTIVE field maps whose MJ column does not exist, once per entity map per run.
|
|
848
|
+
*
|
|
849
|
+
* `BaseEntity.Set` no-ops on an unknown field — no throw, no log, no dirty flag — so a map
|
|
850
|
+
* pointing at a column that was never applied (or was renamed) drops its value for every
|
|
851
|
+
* record while the run reports those records as written. Checking it here costs one metadata
|
|
852
|
+
* read and happens before the first fetch, so the warning arrives before the wasted work.
|
|
853
|
+
*/
|
|
854
|
+
private WarnOnUnbindableFieldMaps;
|
|
659
855
|
/**
|
|
660
856
|
* Sets fields on a BaseEntity instance from a field value map.
|
|
661
857
|
*/
|
|
@@ -826,6 +1022,13 @@ export declare class IntegrationEngine extends BaseSingleton<IntegrationEngine>
|
|
|
826
1022
|
GetIntegrationObject(integrationID: string, objectName: string): MJIntegrationObjectEntity | undefined;
|
|
827
1023
|
GetIntegrationObjectByID(objectID: string): MJIntegrationObjectEntity | undefined;
|
|
828
1024
|
GetIntegrationObjectFields(objectID: string): MJIntegrationObjectFieldEntity[];
|
|
1025
|
+
/**
|
|
1026
|
+
* Source field names the connector declared as SyncDirective 'Exclude' for one
|
|
1027
|
+
* integration object, read from IntegrationObjectField.Configuration. Empty set
|
|
1028
|
+
* on any lookup miss (unknown object, no fields, no integration id) - a failed
|
|
1029
|
+
* lookup must never widen or narrow the sync beyond its declared behaviour.
|
|
1030
|
+
*/
|
|
1031
|
+
ResolveExcludedSourceNames(integrationID: string | null | undefined, externalObjectName: string): Set<string>;
|
|
829
1032
|
GetActiveIntegrationObjects(integrationID: string): MJIntegrationObjectEntity[];
|
|
830
1033
|
GetObjectsInDependencyOrder(integrationID: string): MJIntegrationObjectEntity[];
|
|
831
1034
|
static get Instance(): IntegrationEngine;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IntegrationEngine.d.ts","sourceRoot":"","sources":["../src/IntegrationEngine.ts"],"names":[],"mappings":"AACA,OAAO,EAAsC,iBAAiB,
|
|
1
|
+
{"version":3,"file":"IntegrationEngine.d.ts","sourceRoot":"","sources":["../src/IntegrationEngine.ts"],"names":[],"mappings":"AACA,OAAO,EAA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