@memberjunction/integration-engine-base 6.2.0-edge.4 → 6.2.0-edge.6

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.
@@ -4,8 +4,10 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
+ var IntegrationEngineBase_1;
7
8
  import { BaseEngine, RegisterForStartup } from '@memberjunction/core';
8
- import { UUIDsEqual } from '@memberjunction/global';
9
+ import { NormalizeUUID, UUIDsEqual } from '@memberjunction/global';
10
+ import { ENTITY_COMPANY_INTEGRATION_OBJECTS, AsReadOnlyField, AsReadOnlyObject, ProjectCatalogFields, ProjectCatalogObjects, } from './CompanyIntegrationCatalog.js';
9
11
  /**
10
12
  * IntegrationEngineBase provides cached metadata for the MJ integration subsystem.
11
13
  *
@@ -36,7 +38,35 @@ let IntegrationEngineBase = class IntegrationEngineBase extends BaseEngine {
36
38
  */
37
39
  this._fieldsByObjectID = new Map();
38
40
  this._fieldsByObjectIDSource = null;
41
+ /**
42
+ * Second invalidation source for the field index. The index spans both field arrays, so
43
+ * keying it on the shared array alone would leave it stale whenever only the per-connection
44
+ * array reloaded — which is precisely what a discovery does.
45
+ */
46
+ this._fieldsByObjectIDScopedSource = null;
47
+ /**
48
+ * Per-connection catalog rows that were SEEDED rather than loaded — `SeedForTesting` and the
49
+ * offline replay tiers. Plain `BaseEntity` because no generated subclass exists for these
50
+ * entities (see CompanyIntegrationCatalog.ts). Nothing loads them in a live process any more:
51
+ * there the rows come from the catalog scope in force, through {@link CatalogDataResolver}.
52
+ */
53
+ this._companyIntegrationObjects = [];
54
+ this._companyIntegrationObjectFields = [];
55
+ /**
56
+ * Lazily-built projections, keyed by the identity of the row array they were built from, so a
57
+ * new array is a new projection with no invalidation hook to forget. Weakly held and per array
58
+ * because two connections' syncs run concurrently and alternate on every await: a single
59
+ * memo slot would re-project a whole catalog each time the other one read.
60
+ */
61
+ this._objectProjections = new WeakMap();
62
+ this._ownedObjectIDs = new WeakMap();
63
+ this._warmFieldProjections = new WeakMap();
64
+ this._edgesByOwner = new WeakMap();
65
+ /** The seeded field rows' projection: one array, so one slot is enough. */
66
+ this._ciofProjected = null;
67
+ this._ciofProjectedSource = null;
39
68
  }
69
+ static { IntegrationEngineBase_1 = this; }
40
70
  // ── BaseEngine Config ─────────────────────────────────────────────
41
71
  async Config(forceRefresh, contextUser, provider) {
42
72
  const params = [
@@ -81,6 +111,25 @@ let IntegrationEngineBase = class IntegrationEngineBase extends BaseEngine {
81
111
  CacheLocal: true,
82
112
  },
83
113
  ];
114
+ // The per-connection catalog is deliberately NOT among these (MJ-RUN-43).
115
+ //
116
+ // It used to be two more CacheLocal datasets, which loaded EVERY connection's objects and
117
+ // fields as BaseEntity rows into the process and held them for its lifetime. On a NetForum
118
+ // catalog (888 objects / 97,414 fields) a freshly booted server with nothing running
119
+ // measured 2.37 GB at 84s and 3.81 GB at 3m against a 4748 MB heap ceiling (2026-09-19).
120
+ // That is a FLOOR, not a peak: no discovery fits above it, and ordinary traffic ran with
121
+ // under 1 GB of headroom.
122
+ //
123
+ // The load was whole-tenant while every consumer is per-connection: the scoped getters are
124
+ // reached through CatalogScopeResolver, which always names one connection. So the rows are
125
+ // supplied per scope instead, by CatalogDataResolver, which the server-side engine installs
126
+ // and which loads a connection's rows when its scope is entered. The getters are synchronous
127
+ // and are called from connectors in another repository, so they cannot become queries; the
128
+ // load has to happen at the async boundary that opens the scope.
129
+ //
130
+ // Not registering them also keeps the property the conditional registration used to buy:
131
+ // the engine starts on a workspace that has this code but not the migration, because there
132
+ // is no dataset whose missing entity could fail its load and be retried forever.
84
133
  return await this.Load(params, provider, forceRefresh, contextUser);
85
134
  }
86
135
  /**
@@ -93,6 +142,11 @@ let IntegrationEngineBase = class IntegrationEngineBase extends BaseEngine {
93
142
  * ARRAY IDENTITY, so they rebuild lazily on first read after the swap.
94
143
  */
95
144
  async RefreshCatalog(contextUser) {
145
+ // The SHARED pair only. A connection's own rows are no longer datasets of this engine (see
146
+ // Config), so they are not refreshed here: they belong to the catalog scope, which re-reads
147
+ // them itself. A caller that has just rewritten a connection's catalog inside an open scope
148
+ // — the two-pass discovery heal — must refresh that scope as well as calling this
149
+ // (`RefreshCatalogScope` in @memberjunction/integration-engine).
96
150
  for (const prop of ['_integrationObjects', '_integrationObjectFields']) {
97
151
  const cfg = this.Configs.find(c => c.PropertyName === prop);
98
152
  if (cfg)
@@ -137,6 +191,10 @@ let IntegrationEngineBase = class IntegrationEngineBase extends BaseEngine {
137
191
  this._entityMaps = seed.EntityMaps;
138
192
  if (seed.FieldMaps)
139
193
  this._fieldMaps = seed.FieldMaps;
194
+ if (seed.CompanyIntegrationObjects)
195
+ this._companyIntegrationObjects = seed.CompanyIntegrationObjects;
196
+ if (seed.CompanyIntegrationObjectFields)
197
+ this._companyIntegrationObjectFields = seed.CompanyIntegrationObjectFields;
140
198
  }
141
199
  // ── Public Accessors ──────────────────────────────────────────────
142
200
  /** All Integration definitions (e.g. YourMembership, HubSpot). */
@@ -218,17 +276,68 @@ let IntegrationEngineBase = class IntegrationEngineBase extends BaseEngine {
218
276
  return this.GetIntegrationByID(ci.IntegrationID);
219
277
  }
220
278
  // ── Integration Object Lookups ──────────────────────────────────
221
- /** Get all IntegrationObjects for a given Integration ID. */
279
+ /**
280
+ * Get all IntegrationObjects for a given Integration ID.
281
+ *
282
+ * SCOPE-AWARE. When a connection is in scope AND has a per-connection catalog, this answers
283
+ * from that catalog; otherwise it answers exactly as it always has. The scoping lives HERE, on
284
+ * the existing getters, rather than at the call sites — which is the only version that reaches
285
+ * the connectors in the separate Integrations repository. Two of them call these getters
286
+ * directly rather than going through the REST base, so a new method name would have left them
287
+ * reading the shared catalog forever while every other path was per-connection.
288
+ */
222
289
  GetIntegrationObjectsByIntegrationID(integrationID) {
290
+ const scoped = this.scopedObjects();
291
+ if (scoped)
292
+ return scoped;
223
293
  return this._integrationObjects.filter(o => UUIDsEqual(o.IntegrationID, integrationID));
224
294
  }
225
- /** Get a specific IntegrationObject by integration ID and object name. */
295
+ /**
296
+ * The connection in scope's objects, or undefined when there is no scope or no per-connection
297
+ * catalog for it. One place, so every getter below scopes identically.
298
+ */
299
+ scopedObjects() {
300
+ const ciID = IntegrationEngineBase_1.currentScope();
301
+ if (!ciID || !this.HasCompanyIntegrationCatalog(ciID))
302
+ return undefined;
303
+ return this.GetCompanyIntegrationObjects(ciID);
304
+ }
305
+ /** Get a specific IntegrationObject by integration ID and object name. SCOPE-AWARE. */
226
306
  GetIntegrationObject(integrationID, objectName) {
307
+ const scoped = this.scopedObjects();
308
+ // Once a connection HAS a per-connection catalog, a missing name means the object genuinely
309
+ // is not in this connection's catalog. Falling back to the shared one there would resurrect
310
+ // an object the connection does not have.
311
+ if (scoped)
312
+ return scoped.find(o => o.Name === objectName);
227
313
  return this._integrationObjects.find(o => UUIDsEqual(o.IntegrationID, integrationID) && o.Name === objectName);
228
314
  }
229
- /** Get a specific IntegrationObject by its ID. */
315
+ /**
316
+ * Get a specific IntegrationObject by its ID, from EITHER catalog.
317
+ *
318
+ * Id-polymorphic for exactly the reason `GetIntegrationObjectFields` is: object ids are UUIDs
319
+ * from two disjoint tables and cannot collide, so the id itself says which catalog the caller
320
+ * meant, and a caller holding an id needs no scope to resolve it. The field side was made
321
+ * polymorphic and this one was not, which left a hole precisely where the two sides meet — a
322
+ * parent object resolved through a per-connection FK edge.
323
+ *
324
+ * The hole, measured on the sandbox 2026-09-12: a connector's nested fetch resolves a child's
325
+ * parent to a per-connection object id (`RelatedCompanyIntegrationObjectID`, surfaced on the
326
+ * per-connection field as `RelatedIntegrationObjectID`), then asks for that object by id here.
327
+ * The shared-only lookup returned undefined and `LoadParentIDs` threw
328
+ * "Parent IntegrationObject not found: <id>" for EVERY child object — twenty of PheedLoop's
329
+ * twenty-seven — so each of them fetched nothing while the run still reported success: 330 rows
330
+ * where the same connector had synced about sixteen hundred. A parent that cannot be resolved
331
+ * is the one case where an over-broad shared answer is not available as a fallback, because the
332
+ * id is not in the shared table at all.
333
+ *
334
+ * Shared first, so a shared id costs exactly the scan it always did.
335
+ */
230
336
  GetIntegrationObjectByID(objectID) {
231
- return this._integrationObjects.find(o => UUIDsEqual(o.ID, objectID));
337
+ const shared = this._integrationObjects.find(o => UUIDsEqual(o.ID, objectID));
338
+ if (shared)
339
+ return shared;
340
+ return this.GetCompanyIntegrationObjectByID(objectID);
232
341
  }
233
342
  /**
234
343
  * Get all fields for a given IntegrationObject ID.
@@ -252,32 +361,74 @@ let IntegrationEngineBase = class IntegrationEngineBase extends BaseEngine {
252
361
  if (objectID == null) {
253
362
  return this._integrationObjectFields.filter(f => UUIDsEqual(f.IntegrationObjectID, objectID));
254
363
  }
255
- if (this._fieldsByObjectIDSource !== this._integrationObjectFields) {
364
+ // A connection's own fields, inside its catalog scope. They are not resident: the scope's
365
+ // owner warms them one object at a time into a bounded cache and the scope says which are
366
+ // warm. Object ids are UUIDs from disjoint tables, so the id alone says which catalog the
367
+ // caller meant and this lookup needs no other hint.
368
+ const scoped = IntegrationEngineBase_1.scopedCatalogData();
369
+ if (scoped) {
370
+ const warm = scoped.FieldsByObjectID.get(NormalizeUUID(objectID));
371
+ if (warm)
372
+ return this.projectWarmFields(warm).slice();
373
+ this.assertWarm(scoped, objectID);
374
+ }
375
+ // Everything else: the resident shared fields, plus any per-connection rows that were
376
+ // seeded rather than loaded. The index spans both arrays, so this one method answers for a
377
+ // shared object id and a seeded per-connection one alike, for the same disjoint-ids reason
378
+ // as above. Every read site that resolves fields from an object it already holds therefore
379
+ // needs no change.
380
+ const projectedFields = this.companyIntegrationObjectFields;
381
+ if (this._fieldsByObjectIDSource !== this._integrationObjectFields ||
382
+ this._fieldsByObjectIDScopedSource !== projectedFields) {
256
383
  const index = new Map();
257
- for (const field of this._integrationObjectFields) {
258
- const id = field.IntegrationObjectID;
259
- if (id == null)
260
- continue;
384
+ const add = (key, field) => {
385
+ if (key == null)
386
+ return;
261
387
  // Normalised the same way UUIDsEqual compares, so SQL Server's uppercase and
262
388
  // PostgreSQL's lowercase land on the same bucket.
263
- const key = id.trim().toLowerCase();
264
- const bucket = index.get(key);
389
+ const k = key.trim().toLowerCase();
390
+ const bucket = index.get(k);
265
391
  if (bucket)
266
392
  bucket.push(field);
267
393
  else
268
- index.set(key, [field]);
269
- }
394
+ index.set(k, [field]);
395
+ };
396
+ for (const field of this._integrationObjectFields)
397
+ add(field.IntegrationObjectID, field);
398
+ // The per-connection view aliases CompanyIntegrationObjectID as IntegrationObjectID, so
399
+ // both arrays key on the same property name and the loop body is identical.
400
+ for (const field of projectedFields)
401
+ add(field.IntegrationObjectID, AsReadOnlyField(field));
270
402
  this._fieldsByObjectID = index;
271
403
  this._fieldsByObjectIDSource = this._integrationObjectFields;
404
+ this._fieldsByObjectIDScopedSource = projectedFields;
272
405
  }
273
406
  return this._fieldsByObjectID.get(objectID.trim().toLowerCase())?.slice() ?? [];
274
407
  }
275
- /** Get active IntegrationObjects for an integration, sorted by Sequence. */
408
+ /** Get active IntegrationObjects for an integration, sorted by Sequence. SCOPE-AWARE. */
276
409
  GetActiveIntegrationObjects(integrationID) {
277
410
  return this.GetIntegrationObjectsByIntegrationID(integrationID)
278
411
  .filter(o => o.Status === 'Active')
279
412
  .sort((a, b) => a.Sequence - b.Sequence);
280
413
  }
414
+ /**
415
+ * SHARED objects, ignoring any scope.
416
+ *
417
+ * Two callers need this and both would be WRONG with the scoped answer. The declared floor a
418
+ * discovery overlays onto is by definition the shared, curated definition — reading the
419
+ * per-connection rows there would make a discovery overlay its own previous output and lose
420
+ * the link back to the declared row. And the Shared branch of
421
+ * {@link ResolveCompanyIntegrationCatalog} was explicitly asked not to read per-connection rows.
422
+ */
423
+ GetSharedIntegrationObjects(integrationID) {
424
+ return this._integrationObjects.filter(o => UUIDsEqual(o.IntegrationID, integrationID));
425
+ }
426
+ /** See {@link GetSharedIntegrationObjects}. Active only, sorted by Sequence. */
427
+ GetActiveSharedIntegrationObjects(integrationID) {
428
+ return this._integrationObjects
429
+ .filter(o => UUIDsEqual(o.IntegrationID, integrationID) && o.Status === 'Active')
430
+ .sort((a, b) => a.Sequence - b.Sequence);
431
+ }
281
432
  /**
282
433
  * Builds a topologically-sorted processing order for integration objects
283
434
  * based on FK relationships between objects (RelatedIntegrationObjectID on fields).
@@ -287,6 +438,12 @@ let IntegrationEngineBase = class IntegrationEngineBase extends BaseEngine {
287
438
  * @returns Objects sorted in dependency order (parents before children)
288
439
  */
289
440
  GetObjectsInDependencyOrder(integrationID) {
441
+ // SCOPE-AWARE. Two connections of one connector can legitimately disagree about the shape
442
+ // of this graph, because each edge is a field pointing at an object in the SAME catalog.
443
+ const ciID = IntegrationEngineBase_1.currentScope();
444
+ if (ciID && this.HasCompanyIntegrationCatalog(ciID)) {
445
+ return this.GetCompanyIntegrationObjectsInDependencyOrder(ciID);
446
+ }
290
447
  const objects = this.GetActiveIntegrationObjects(integrationID);
291
448
  const objectMap = new Map(objects.map(o => [o.ID.toUpperCase(), o]));
292
449
  // Build adjacency: object → set of object IDs it depends on
@@ -350,12 +507,319 @@ let IntegrationEngineBase = class IntegrationEngineBase extends BaseEngine {
350
507
  }
351
508
  return sorted;
352
509
  }
510
+ // ── Per-connection catalog ──────────────────────────────────────
511
+ /**
512
+ * Resolves the connection whose catalog a read belongs to, when one is in scope.
513
+ *
514
+ * Dependency inversion, deliberately: the scope itself is `AsyncLocalStorage`, which is a Node
515
+ * built-in this package must not import — it is loaded into the Angular client too. So the
516
+ * server package installs a resolver here at module load and the client never sets one, leaving
517
+ * every read on the shared catalog exactly as before.
518
+ *
519
+ * Same shape as the custom-column promoter registration the server already installs.
520
+ */
521
+ static { this.CatalogScopeResolver = undefined; }
522
+ static currentScope() {
523
+ try {
524
+ return IntegrationEngineBase_1.CatalogScopeResolver?.();
525
+ }
526
+ catch {
527
+ // A scope lookup must never be able to fail a read. Falling back to the shared catalog
528
+ // is the pre-existing behaviour, and it is the safe direction: a shared answer where a
529
+ // per-connection one was wanted is over-broad, never wrong about what exists.
530
+ return undefined;
531
+ }
532
+ }
533
+ /**
534
+ * Supplies the per-connection rows of the catalog scope in force (MJ-RUN-43).
535
+ *
536
+ * The same dependency inversion as {@link CatalogScopeResolver}, for the same reason: the rows
537
+ * are loaded at scope entry by the server-side engine, which owns the scope and the queries,
538
+ * and this package — bundled into the Angular client too — only reads them. Never set in a
539
+ * client bundle, where every read stays on the shared catalog and any seeded rows.
540
+ *
541
+ * Returns undefined when no scope is in force, or when the scope's catalog has not been loaded:
542
+ * both read the seeded arrays, which in a live process are empty — the shared catalog's
543
+ * answer, exactly as before a connection had a catalog of its own.
544
+ */
545
+ static { this.CatalogDataResolver = undefined; }
546
+ static scopedCatalogData() {
547
+ return IntegrationEngineBase_1.CatalogDataResolver?.();
548
+ }
549
+ /**
550
+ * Where per-connection object rows come from: the scope in force, else the seeded array.
551
+ *
552
+ * No scope in force is NOT an error. `HasCompanyIntegrationCatalog` is a probe whose whole job
553
+ * is to answer "no" from outside a scope, and a workspace that never adopted the per-connection
554
+ * catalog reads unscoped throughout. The loud failure belongs one level down, at an object that
555
+ * IS in scope whose fields were never warmed — see {@link AssertCatalogObjectWarm}.
556
+ */
557
+ static resolveScopedCatalogRows(seeded) {
558
+ return IntegrationEngineBase_1.scopedCatalogData()?.Objects ?? seeded;
559
+ }
560
+ /**
561
+ * The dependency edges of the scope in force, else of the seeded field rows.
562
+ *
563
+ * A scope that carries no edge set is refused rather than walked. Unlike a missing field row,
564
+ * a missing edge does not empty anything: it silently REORDERS a sync, children before
565
+ * parents, and surfaces as foreign-key failures far from here.
566
+ */
567
+ static resolveScopedCatalogEdges(seeded) {
568
+ const scoped = IntegrationEngineBase_1.scopedCatalogData();
569
+ if (!scoped)
570
+ return seeded();
571
+ if (!scoped.Edges) {
572
+ throw new Error('PER_CONNECTION_CATALOG_NO_EDGES: a catalog scope is in force but carries no edge set. '
573
+ + 'Dependency ordering would degrade SILENTLY to Sequence order without it — children '
574
+ + 'before parents, which surfaces as foreign-key failures far from here — so this '
575
+ + 'refuses rather than guesses.');
576
+ }
577
+ return scoped.Edges;
578
+ }
579
+ /**
580
+ * Throw when `objectID` belongs to the scope in force, its field rows were never warmed, and
581
+ * the scope's owner is one that warms what it reads.
582
+ *
583
+ * Field rows are fetched per object now, so an owned object with no warm rows means a warm
584
+ * site was missed. Answering `[]` there would show a connector a table with no columns and a
585
+ * sync would write nothing, on a run that reports success. An id the scope does not own — a
586
+ * shared object, another connection's object — is silence by design and reads as it always did.
587
+ */
588
+ AssertCatalogObjectWarm(objectID) {
589
+ const scoped = IntegrationEngineBase_1.scopedCatalogData();
590
+ if (scoped)
591
+ this.assertWarm(scoped, objectID);
592
+ }
593
+ assertWarm(scoped, objectID) {
594
+ if (!scoped.RequireWarmFields || objectID == null)
595
+ return;
596
+ const key = NormalizeUUID(objectID);
597
+ if (scoped.FieldsByObjectID.has(key))
598
+ return;
599
+ // Ownership is read off the PROJECTED rows. A loaded row has no `ID` property — these
600
+ // entities have no generated subclass, so the value is reachable only through Get() —
601
+ // and a check reading `row.ID` would find no owned object, ever, and never fire.
602
+ if (!this.ownedObjectIDs(this.projectObjects(scoped.Objects)).has(key))
603
+ return;
604
+ throw new Error(`PER_CONNECTION_CATALOG_OBJECT_COLD: fields for object ${objectID} were read before they were `
605
+ + `warmed. Field rows are no longer resident: the async orchestration point must await `
606
+ + `WarmCatalogObject(objectID) before any synchronous read of that object's fields.`);
607
+ }
608
+ /** Per-connection objects, projected for reading. See CompanyIntegrationCatalog.ts. */
609
+ get companyIntegrationObjects() {
610
+ return this.projectObjects(IntegrationEngineBase_1.resolveScopedCatalogRows(this._companyIntegrationObjects));
611
+ }
612
+ projectObjects(rows) {
613
+ let projected = this._objectProjections.get(rows);
614
+ if (!projected) {
615
+ projected = ProjectCatalogObjects(rows);
616
+ this._objectProjections.set(rows, projected);
617
+ }
618
+ return projected;
619
+ }
620
+ /** Lowercased ids of a projected object array, so an ownership test is a lookup, not a scan. */
621
+ ownedObjectIDs(objects) {
622
+ let ids = this._ownedObjectIDs.get(objects);
623
+ if (!ids) {
624
+ ids = new Set(objects.map(o => NormalizeUUID(o.ID)));
625
+ this._ownedObjectIDs.set(objects, ids);
626
+ }
627
+ return ids;
628
+ }
629
+ /** One warm object's field rows, projected once per loaded array. */
630
+ projectWarmFields(rows) {
631
+ let projected = this._warmFieldProjections.get(rows);
632
+ if (!projected) {
633
+ projected = ProjectCatalogFields(rows).map(AsReadOnlyField);
634
+ this._warmFieldProjections.set(rows, projected);
635
+ }
636
+ return projected;
637
+ }
638
+ /** Related object ids per owning object, built once per edge array. */
639
+ edgesByOwner(edges) {
640
+ let byOwner = this._edgesByOwner.get(edges);
641
+ if (!byOwner) {
642
+ const built = new Map();
643
+ const seenByOwner = new Map();
644
+ for (const edge of edges) {
645
+ const related = edge.RelatedCompanyIntegrationObjectID;
646
+ if (!related)
647
+ continue;
648
+ const owner = NormalizeUUID(edge.CompanyIntegrationObjectID);
649
+ let seen = seenByOwner.get(owner);
650
+ if (!seen) {
651
+ seen = new Set();
652
+ seenByOwner.set(owner, seen);
653
+ built.set(owner, []);
654
+ }
655
+ const key = NormalizeUUID(related);
656
+ if (!seen.has(key)) {
657
+ seen.add(key);
658
+ built.get(owner)?.push(related);
659
+ }
660
+ }
661
+ byOwner = built;
662
+ this._edgesByOwner.set(edges, byOwner);
663
+ }
664
+ return byOwner;
665
+ }
666
+ /**
667
+ * The ids of the objects this object's fields point at — its foreign-key parents.
668
+ *
669
+ * The dependency graph a sync builds needs exactly this and nothing else of a field, so a
670
+ * per-connection object of the scope in force answers from the scope's narrow edge set and
671
+ * never needs its full field rows warm — the graph is built before any of them are. Every other
672
+ * object (shared, or seeded without a scope) answers from its resident field rows.
673
+ */
674
+ GetRelatedIntegrationObjectIDs(objectID) {
675
+ if (objectID == null)
676
+ return [];
677
+ const scoped = IntegrationEngineBase_1.scopedCatalogData();
678
+ if (scoped && this.ownedObjectIDs(this.projectObjects(scoped.Objects)).has(NormalizeUUID(objectID))) {
679
+ const edges = IntegrationEngineBase_1.resolveScopedCatalogEdges(() => this.companyIntegrationObjectFields);
680
+ return this.edgesByOwner(edges).get(NormalizeUUID(objectID))?.slice() ?? [];
681
+ }
682
+ const related = [];
683
+ const seen = new Set();
684
+ for (const field of this.GetIntegrationObjectFields(objectID)) {
685
+ const id = field.RelatedIntegrationObjectID;
686
+ if (id && !seen.has(NormalizeUUID(id))) {
687
+ seen.add(NormalizeUUID(id));
688
+ related.push(id);
689
+ }
690
+ }
691
+ return related;
692
+ }
693
+ /** Per-connection fields that were SEEDED (see `_companyIntegrationObjectFields`), projected for reading. */
694
+ get companyIntegrationObjectFields() {
695
+ if (this._ciofProjectedSource !== this._companyIntegrationObjectFields || this._ciofProjected === null) {
696
+ this._ciofProjected = ProjectCatalogFields(this._companyIntegrationObjectFields);
697
+ this._ciofProjectedSource = this._companyIntegrationObjectFields;
698
+ }
699
+ return this._ciofProjected;
700
+ }
701
+ /** Does this connection have a per-connection catalog at all? */
702
+ HasCompanyIntegrationCatalog(companyIntegrationID) {
703
+ return this.companyIntegrationObjects.some(o => UUIDsEqual(o.CompanyIntegrationID, companyIntegrationID));
704
+ }
705
+ /** All per-connection objects for a connection. */
706
+ GetCompanyIntegrationObjects(companyIntegrationID) {
707
+ return this.companyIntegrationObjects
708
+ .filter(o => UUIDsEqual(o.CompanyIntegrationID, companyIntegrationID))
709
+ .map(AsReadOnlyObject);
710
+ }
711
+ /**
712
+ * One per-connection object by name.
713
+ *
714
+ * Matches rows of EVERY status, `Disabled` included, because the overlay reactivates a
715
+ * previously-absent object rather than inserting a second one — the unique constraint on
716
+ * (connection, name) is what makes that necessary and what makes a name-match on active rows
717
+ * only a constraint violation waiting to happen.
718
+ */
719
+ GetCompanyIntegrationObject(companyIntegrationID, objectName) {
720
+ const row = this.companyIntegrationObjects.find(o => UUIDsEqual(o.CompanyIntegrationID, companyIntegrationID) && o.Name === objectName);
721
+ return row ? AsReadOnlyObject(row) : undefined;
722
+ }
723
+ /** One per-connection object by its own id. */
724
+ GetCompanyIntegrationObjectByID(objectID) {
725
+ const row = this.companyIntegrationObjects.find(o => UUIDsEqual(o.ID, objectID));
726
+ return row ? AsReadOnlyObject(row) : undefined;
727
+ }
728
+ /** Active per-connection objects, sorted by Sequence. Mirrors GetActiveIntegrationObjects. */
729
+ GetActiveCompanyIntegrationObjects(companyIntegrationID) {
730
+ return this.companyIntegrationObjects
731
+ .filter(o => UUIDsEqual(o.CompanyIntegrationID, companyIntegrationID) && o.Status === 'Active')
732
+ .sort((a, b) => a.Sequence - b.Sequence)
733
+ .map(AsReadOnlyObject);
734
+ }
735
+ /**
736
+ * Per-connection dependency order. Same Kahn sort and same Sequence-order fallback on a cycle
737
+ * as the shared version, over this connection's own edges: a field's
738
+ * RelatedCompanyIntegrationObjectID points at an object belonging to the same connection, so
739
+ * two connections of one connector can legitimately disagree about the shape of the graph.
740
+ */
741
+ GetCompanyIntegrationObjectsInDependencyOrder(companyIntegrationID) {
742
+ const objects = this.GetActiveCompanyIntegrationObjects(companyIntegrationID);
743
+ const objectMap = new Map(objects.map(o => [o.ID.toUpperCase(), o]));
744
+ const deps = new Map();
745
+ for (const obj of objects)
746
+ deps.set(obj.ID.toUpperCase(), new Set());
747
+ // Edges from the NARROW edge set, not from full field rows. This walk needs every field of
748
+ // the connection (97,414 on a NetForum catalog) but reads two columns of each; holding full
749
+ // rows to answer it is what made the catalog a multi-gigabyte resident cost.
750
+ for (const field of IntegrationEngineBase_1.resolveScopedCatalogEdges(() => this.companyIntegrationObjectFields)) {
751
+ if (!field.RelatedCompanyIntegrationObjectID)
752
+ continue;
753
+ const parentKey = field.CompanyIntegrationObjectID.toUpperCase();
754
+ const depKey = field.RelatedCompanyIntegrationObjectID.toUpperCase();
755
+ if (deps.has(parentKey) && objectMap.has(depKey) && parentKey !== depKey) {
756
+ deps.get(parentKey).add(depKey);
757
+ }
758
+ }
759
+ return this.topologicalSort(objects, deps);
760
+ }
761
+ /**
762
+ * THE CUTOVER SEAM. Every read that wants "this connection's catalog" comes through here, and
763
+ * this is the one place that decides whether that means the per-connection tables or the shared
764
+ * ones.
765
+ *
766
+ * With `preferPerConnection` false — the default at deploy — the answer is byte-for-byte what
767
+ * the shared catalog returns today, so the tables can exist, be backfilled and be verified
768
+ * against production traffic before anything reads them.
769
+ *
770
+ * Per-connection field rows are not resident, so `FieldsByObjectID` carries what is warm in the
771
+ * scope in force; in a scope whose owner warms what it reads, a cold object throws rather than
772
+ * reporting no fields (see {@link AssertCatalogObjectWarm}).
773
+ *
774
+ * @param opts.preferPerConnection Read per-connection rows when they exist.
775
+ * @param opts.requirePerConnection Refuse rather than fall back. Set it wherever a silent
776
+ * shared answer would be indistinguishable from success — a shared answer carries objects
777
+ * this connection never discovered and omits the ones only it has, and a sync would run on it
778
+ * reporting no error at all.
779
+ */
780
+ ResolveCompanyIntegrationCatalog(companyIntegrationID, opts) {
781
+ const wantPerConnection = opts?.preferPerConnection === true || opts?.requirePerConnection === true;
782
+ const have = wantPerConnection && this.HasCompanyIntegrationCatalog(companyIntegrationID);
783
+ if (opts?.requirePerConnection === true && !have) {
784
+ throw new Error(`PER_CONNECTION_CATALOG_MISSING: connection ${companyIntegrationID} is configured for the `
785
+ + `per-connection catalog but has no rows in ${ENTITY_COMPANY_INTEGRATION_OBJECTS}. `
786
+ + `Run the catalog backfill for this connection, or set its catalog source back to shared. `
787
+ + `Refusing rather than reading the shared catalog, which would silently sync a different `
788
+ + `set of objects and report success.`);
789
+ }
790
+ const fieldsByObjectID = new Map();
791
+ if (!have) {
792
+ const ci = this.GetCompanyIntegrationByID(companyIntegrationID);
793
+ const objects = ci ? this.GetActiveSharedIntegrationObjects(ci.IntegrationID) : [];
794
+ for (const o of objects)
795
+ fieldsByObjectID.set(o.ID, this.GetIntegrationObjectFields(o.ID));
796
+ return {
797
+ Objects: objects,
798
+ FieldsByObjectID: fieldsByObjectID,
799
+ Source: 'Shared',
800
+ Provenance: { Declared: 0, Endpoint: 0, Sampled: 0 },
801
+ };
802
+ }
803
+ const rows = this.companyIntegrationObjects
804
+ .filter(o => UUIDsEqual(o.CompanyIntegrationID, companyIntegrationID) && o.Status === 'Active')
805
+ .sort((a, b) => a.Sequence - b.Sequence);
806
+ const provenance = { Declared: 0, Endpoint: 0, Sampled: 0 };
807
+ for (const r of rows) {
808
+ if (r.Provenance === 'Declared' || r.Provenance === 'Endpoint' || r.Provenance === 'Sampled') {
809
+ provenance[r.Provenance]++;
810
+ }
811
+ }
812
+ const objects = rows.map(AsReadOnlyObject);
813
+ for (const o of objects)
814
+ fieldsByObjectID.set(o.ID, this.GetIntegrationObjectFields(o.ID));
815
+ return { Objects: objects, FieldsByObjectID: fieldsByObjectID, Source: 'PerConnection', Provenance: provenance };
816
+ }
353
817
  // ── Singleton ─────────────────────────────────────────────────────
354
818
  static get Instance() {
355
819
  return super.getInstance();
356
820
  }
357
821
  };
358
- IntegrationEngineBase = __decorate([
822
+ IntegrationEngineBase = IntegrationEngineBase_1 = __decorate([
359
823
  RegisterForStartup()
360
824
  ], IntegrationEngineBase);
361
825
  export { IntegrationEngineBase };
@@ -1 +1 @@
1
- {"version":3,"file":"IntegrationEngineBase.js","sourceRoot":"","sources":["../src/IntegrationEngineBase.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAyD,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC7H,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAYpD;;;;;;;;;GASG;AAEI,IAAM,qBAAqB,GAA3B,MAAM,qBAAsB,SAAQ,UAAiC;IAArE;;QACH,qEAAqE;QAC7D,kBAAa,GAA0B,EAAE,CAAC;QAC1C,iBAAY,GAAoC,EAAE,CAAC;QACnD,yBAAoB,GAAiC,EAAE,CAAC;QACxD,gBAAW,GAA0C,EAAE,CAAC;QACxD,e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