@onecx/integration-interface 8.9.0 → 8.11.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/index.cjs CHANGED
@@ -30,6 +30,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
30
30
  // libs/integration-interface/src/index.ts
31
31
  var index_exports = {};
32
32
  __export(index_exports, {
33
+ AiContextGatherer: () => AiContextGatherer,
33
34
  ConfigurationTopic: () => ConfigurationTopic,
34
35
  CurrentLocationTopic: () => CurrentLocationTopic,
35
36
  CurrentMfeTopic: () => CurrentMfeTopic,
@@ -463,6 +464,80 @@ var Topic = class extends TopicPublisher {
463
464
  // libs/accelerator/src/lib/topic/mocks/fake-topic.ts
464
465
  var import_rxjs2 = require("rxjs");
465
466
 
467
+ // libs/accelerator/src/lib/utils/gatherer.ts
468
+ var Gatherer = class _Gatherer {
469
+ logger;
470
+ static id = 0;
471
+ topic;
472
+ ownIds = /* @__PURE__ */ new Set();
473
+ topicSub = null;
474
+ topicName;
475
+ constructor(name, version, callback) {
476
+ this.topicName = name;
477
+ this.logger = createLogger(`Gatherer:${name}`);
478
+ this.logger.debug(`Gatherer ${name}: ${version} created`);
479
+ this.topic = new Topic(name, version, false);
480
+ this.topicSub = this.topic.subscribe((m) => {
481
+ if (!this.isOwnerOfRequest(m) && topicTabId["@onecx/accelerator"].gatherer.promises) {
482
+ this.logReceivedIfDebug(name, version, m);
483
+ if (!topicTabId["@onecx/accelerator"].gatherer.promises[m.id]) {
484
+ this.logger.warn("Expected an array of promises to gather for id ", m.id, " but the id was not present");
485
+ return;
486
+ }
487
+ let resolve;
488
+ topicTabId["@onecx/accelerator"].gatherer.promises[m.id].push(
489
+ new Promise((r) => {
490
+ resolve = r;
491
+ })
492
+ );
493
+ callback(m.request).then((response) => {
494
+ resolve(response);
495
+ this.logAnsweredIfDebug(name, version, m, response);
496
+ });
497
+ }
498
+ });
499
+ }
500
+ destroy() {
501
+ this.logger.debug(`Gatherer ${this.topic.name}: ${this.topic.version} destroyed`);
502
+ this.topicSub?.unsubscribe();
503
+ this.topic.destroy();
504
+ for (const id of this.ownIds) {
505
+ if (topicTabId["@onecx/accelerator"].gatherer.promises?.[id]) {
506
+ delete topicTabId["@onecx/accelerator"].gatherer.promises[id];
507
+ }
508
+ }
509
+ }
510
+ async gather(request) {
511
+ if (!topicTabId["@onecx/accelerator"].gatherer?.promises) {
512
+ throw new Error("Gatherer is not initialized");
513
+ }
514
+ const id = _Gatherer.id++;
515
+ this.ownIds.add(id);
516
+ topicTabId["@onecx/accelerator"].gatherer.promises[id] = [];
517
+ const message = { id, request };
518
+ await this.topic.publish(message);
519
+ const promises = topicTabId["@onecx/accelerator"].gatherer.promises[id];
520
+ delete topicTabId["@onecx/accelerator"].gatherer.promises[id];
521
+ this.ownIds.delete(id);
522
+ return Promise.all(promises).then((v) => {
523
+ this.logger.debug("Finished gathering responses", v);
524
+ return v;
525
+ });
526
+ }
527
+ logReceivedIfDebug(name, version, m) {
528
+ this.logger.debug("Gatherer " + name + ": " + version + " received request " + m.request);
529
+ }
530
+ logAnsweredIfDebug(name, version, m, response) {
531
+ this.logger.debug(
532
+ "Gatherer " + name + ": " + version + " answered request " + m.request + " with response",
533
+ response
534
+ );
535
+ }
536
+ isOwnerOfRequest(m) {
537
+ return this.ownIds.has(m.id);
538
+ }
539
+ };
540
+
466
541
  // libs/accelerator/src/lib/utils/get-onecx-shared-recommendations.ts
467
542
  var sharedLibraryPatterns = [
468
543
  /^@angular.*$/,
@@ -470,7 +545,8 @@ var sharedLibraryPatterns = [
470
545
  /^rxjs.*$/,
471
546
  /^primeng.*$/,
472
547
  /^@ngx-translate.*$/,
473
- /^@ngrx.*$/
548
+ /^@ngrx.*$/,
549
+ /^react.*$/
474
550
  ];
475
551
  function getOneCXSharedRecommendations(libraryName, sharedConfig) {
476
552
  if (!sharedLibraryPatterns.some((pattern) => pattern.test(libraryName))) {
@@ -484,6 +560,7 @@ function getOneCXSharedRecommendations(libraryName, sharedConfig) {
484
560
 
485
561
  // libs/accelerator/src/lib/utils/get-onecx-shared-library-config.ts
486
562
  var angularCore = "@angular/core";
563
+ var react = "react";
487
564
  var logger = createLogger("getOneCXSharedLibraryConfig");
488
565
  function getNodeRequire() {
489
566
  try {
@@ -516,7 +593,25 @@ var DEFAULT_FULL_PACKAGE_BLACKLIST = [
516
593
  "primeng/resources/",
517
594
  "primeng/editor",
518
595
  "@onecx/angular-accelerator/testing",
519
- "@onecx/angular-accelerator/migrations.json"
596
+ "@onecx/angular-accelerator/migrations.json",
597
+ "react/jsx-dev-runtime",
598
+ "react/compiler-runtime",
599
+ "react-dom/server",
600
+ "react-dom/server.browser",
601
+ "react-dom/server.bun",
602
+ "react-dom/server.edge",
603
+ "react-dom/server.node",
604
+ "react-dom/static",
605
+ "react-dom/static.browser",
606
+ "react-dom/static.edge",
607
+ "react-dom/static.node",
608
+ "react-dom/profiling",
609
+ "react-dom/test-utils",
610
+ "react-router/internal",
611
+ "react-router/internal/react-server-client",
612
+ "@onecx/react-utils/prime-base-theme",
613
+ "@onecx/react-utils/prime-base-theme.css",
614
+ "@onecx/react-integration-interface/mocks"
520
615
  ];
521
616
  function removeExportPrefix(str) {
522
617
  return str.replace("./", "");
@@ -586,11 +681,14 @@ function getOneCXSharedLibraryConfig(dependencies, shouldGenerateSubDeps, option
586
681
  const sharedEntries = allDependencies.reduce((acc, packageEntry) => {
587
682
  const sharedLibConfig = {};
588
683
  sharedLibConfig["requiredVersion"] = packageEntry.requiredVersion;
589
- sharedLibConfig["shareScope"] = "default";
684
+ const reactVersion = (dependencies[react] || "").split(".")[0].replace("^", "");
590
685
  const angularCoreVersion = (dependencies[angularCore] || "").split(".")[0].replace("^", "");
591
- if (angularCoreVersion && parseInt(angularCoreVersion, 10) >= 21) {
592
- const shareScope = "angular_".concat(angularCoreVersion);
593
- sharedLibConfig["shareScope"] = shareScope;
686
+ if (reactVersion && Number.parseInt(reactVersion, 10) >= 19) {
687
+ sharedLibConfig["shareScope"] = "react_".concat(reactVersion);
688
+ } else if (angularCoreVersion && parseInt(angularCoreVersion, 10) >= 21) {
689
+ sharedLibConfig["shareScope"] = "angular_".concat(angularCoreVersion);
690
+ } else {
691
+ sharedLibConfig["shareScope"] = "default";
594
692
  }
595
693
  const onecxRecommendation = getOneCXSharedRecommendations(packageEntry.name, sharedLibConfig);
596
694
  if (!onecxRecommendation) {
@@ -1504,3 +1602,10 @@ var NotificationService = class {
1504
1602
  this.notificationTopic.destroy();
1505
1603
  }
1506
1604
  };
1605
+
1606
+ // libs/integration-interface/src/lib/gatherers/ai-context/v1/ai-context.gatherer.ts
1607
+ var AiContextGatherer = class extends Gatherer {
1608
+ constructor(callback) {
1609
+ super("aiContext", 1, callback);
1610
+ }
1611
+ };
package/dist/index.mjs CHANGED
@@ -372,6 +372,80 @@ var Topic = class extends TopicPublisher {
372
372
  // libs/accelerator/src/lib/topic/mocks/fake-topic.ts
373
373
  import { BehaviorSubject as BehaviorSubject2, ReplaySubject } from "rxjs";
374
374
 
375
+ // libs/accelerator/src/lib/utils/gatherer.ts
376
+ var Gatherer = class _Gatherer {
377
+ logger;
378
+ static id = 0;
379
+ topic;
380
+ ownIds = /* @__PURE__ */ new Set();
381
+ topicSub = null;
382
+ topicName;
383
+ constructor(name, version, callback) {
384
+ this.topicName = name;
385
+ this.logger = createLogger(`Gatherer:${name}`);
386
+ this.logger.debug(`Gatherer ${name}: ${version} created`);
387
+ this.topic = new Topic(name, version, false);
388
+ this.topicSub = this.topic.subscribe((m) => {
389
+ if (!this.isOwnerOfRequest(m) && topicTabId["@onecx/accelerator"].gatherer.promises) {
390
+ this.logReceivedIfDebug(name, version, m);
391
+ if (!topicTabId["@onecx/accelerator"].gatherer.promises[m.id]) {
392
+ this.logger.warn("Expected an array of promises to gather for id ", m.id, " but the id was not present");
393
+ return;
394
+ }
395
+ let resolve;
396
+ topicTabId["@onecx/accelerator"].gatherer.promises[m.id].push(
397
+ new Promise((r) => {
398
+ resolve = r;
399
+ })
400
+ );
401
+ callback(m.request).then((response) => {
402
+ resolve(response);
403
+ this.logAnsweredIfDebug(name, version, m, response);
404
+ });
405
+ }
406
+ });
407
+ }
408
+ destroy() {
409
+ this.logger.debug(`Gatherer ${this.topic.name}: ${this.topic.version} destroyed`);
410
+ this.topicSub?.unsubscribe();
411
+ this.topic.destroy();
412
+ for (const id of this.ownIds) {
413
+ if (topicTabId["@onecx/accelerator"].gatherer.promises?.[id]) {
414
+ delete topicTabId["@onecx/accelerator"].gatherer.promises[id];
415
+ }
416
+ }
417
+ }
418
+ async gather(request) {
419
+ if (!topicTabId["@onecx/accelerator"].gatherer?.promises) {
420
+ throw new Error("Gatherer is not initialized");
421
+ }
422
+ const id = _Gatherer.id++;
423
+ this.ownIds.add(id);
424
+ topicTabId["@onecx/accelerator"].gatherer.promises[id] = [];
425
+ const message = { id, request };
426
+ await this.topic.publish(message);
427
+ const promises = topicTabId["@onecx/accelerator"].gatherer.promises[id];
428
+ delete topicTabId["@onecx/accelerator"].gatherer.promises[id];
429
+ this.ownIds.delete(id);
430
+ return Promise.all(promises).then((v) => {
431
+ this.logger.debug("Finished gathering responses", v);
432
+ return v;
433
+ });
434
+ }
435
+ logReceivedIfDebug(name, version, m) {
436
+ this.logger.debug("Gatherer " + name + ": " + version + " received request " + m.request);
437
+ }
438
+ logAnsweredIfDebug(name, version, m, response) {
439
+ this.logger.debug(
440
+ "Gatherer " + name + ": " + version + " answered request " + m.request + " with response",
441
+ response
442
+ );
443
+ }
444
+ isOwnerOfRequest(m) {
445
+ return this.ownIds.has(m.id);
446
+ }
447
+ };
448
+
375
449
  // libs/accelerator/src/lib/utils/get-onecx-shared-recommendations.ts
376
450
  var sharedLibraryPatterns = [
377
451
  /^@angular.*$/,
@@ -379,7 +453,8 @@ var sharedLibraryPatterns = [
379
453
  /^rxjs.*$/,
380
454
  /^primeng.*$/,
381
455
  /^@ngx-translate.*$/,
382
- /^@ngrx.*$/
456
+ /^@ngrx.*$/,
457
+ /^react.*$/
383
458
  ];
384
459
  function getOneCXSharedRecommendations(libraryName, sharedConfig) {
385
460
  if (!sharedLibraryPatterns.some((pattern) => pattern.test(libraryName))) {
@@ -393,6 +468,7 @@ function getOneCXSharedRecommendations(libraryName, sharedConfig) {
393
468
 
394
469
  // libs/accelerator/src/lib/utils/get-onecx-shared-library-config.ts
395
470
  var angularCore = "@angular/core";
471
+ var react = "react";
396
472
  var logger = createLogger("getOneCXSharedLibraryConfig");
397
473
  function getNodeRequire() {
398
474
  try {
@@ -425,7 +501,25 @@ var DEFAULT_FULL_PACKAGE_BLACKLIST = [
425
501
  "primeng/resources/",
426
502
  "primeng/editor",
427
503
  "@onecx/angular-accelerator/testing",
428
- "@onecx/angular-accelerator/migrations.json"
504
+ "@onecx/angular-accelerator/migrations.json",
505
+ "react/jsx-dev-runtime",
506
+ "react/compiler-runtime",
507
+ "react-dom/server",
508
+ "react-dom/server.browser",
509
+ "react-dom/server.bun",
510
+ "react-dom/server.edge",
511
+ "react-dom/server.node",
512
+ "react-dom/static",
513
+ "react-dom/static.browser",
514
+ "react-dom/static.edge",
515
+ "react-dom/static.node",
516
+ "react-dom/profiling",
517
+ "react-dom/test-utils",
518
+ "react-router/internal",
519
+ "react-router/internal/react-server-client",
520
+ "@onecx/react-utils/prime-base-theme",
521
+ "@onecx/react-utils/prime-base-theme.css",
522
+ "@onecx/react-integration-interface/mocks"
429
523
  ];
430
524
  function removeExportPrefix(str) {
431
525
  return str.replace("./", "");
@@ -495,11 +589,14 @@ function getOneCXSharedLibraryConfig(dependencies, shouldGenerateSubDeps, option
495
589
  const sharedEntries = allDependencies.reduce((acc, packageEntry) => {
496
590
  const sharedLibConfig = {};
497
591
  sharedLibConfig["requiredVersion"] = packageEntry.requiredVersion;
498
- sharedLibConfig["shareScope"] = "default";
592
+ const reactVersion = (dependencies[react] || "").split(".")[0].replace("^", "");
499
593
  const angularCoreVersion = (dependencies[angularCore] || "").split(".")[0].replace("^", "");
500
- if (angularCoreVersion && parseInt(angularCoreVersion, 10) >= 21) {
501
- const shareScope = "angular_".concat(angularCoreVersion);
502
- sharedLibConfig["shareScope"] = shareScope;
594
+ if (reactVersion && Number.parseInt(reactVersion, 10) >= 19) {
595
+ sharedLibConfig["shareScope"] = "react_".concat(reactVersion);
596
+ } else if (angularCoreVersion && parseInt(angularCoreVersion, 10) >= 21) {
597
+ sharedLibConfig["shareScope"] = "angular_".concat(angularCoreVersion);
598
+ } else {
599
+ sharedLibConfig["shareScope"] = "default";
503
600
  }
504
601
  const onecxRecommendation = getOneCXSharedRecommendations(packageEntry.name, sharedLibConfig);
505
602
  if (!onecxRecommendation) {
@@ -1413,7 +1510,15 @@ var NotificationService = class {
1413
1510
  this.notificationTopic.destroy();
1414
1511
  }
1415
1512
  };
1513
+
1514
+ // libs/integration-interface/src/lib/gatherers/ai-context/v1/ai-context.gatherer.ts
1515
+ var AiContextGatherer = class extends Gatherer {
1516
+ constructor(callback) {
1517
+ super("aiContext", 1, callback);
1518
+ }
1519
+ };
1416
1520
  export {
1521
+ AiContextGatherer,
1417
1522
  ConfigurationTopic,
1418
1523
  CurrentLocationTopic,
1419
1524
  CurrentMfeTopic,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onecx/integration-interface",
3
- "version": "8.9.0",
3
+ "version": "8.11.0",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -8,7 +8,7 @@
8
8
  },
9
9
  "peerDependencies": {
10
10
  "rxjs": "^7.8.1",
11
- "@onecx/accelerator": "^8.9.0"
11
+ "@onecx/accelerator": "8.11.0"
12
12
  },
13
13
  "type": "module",
14
14
  "dependencies": {
package/src/index.d.ts CHANGED
@@ -59,3 +59,5 @@ export * from './lib/utils/portal-message.utils';
59
59
  export * from './lib/topics/notification/v1/notification.model';
60
60
  export * from './lib/topics/notification/v1/notification.topic';
61
61
  export * from './lib/services/notification.service';
62
+ export * from './lib/gatherers/ai-context/v1/ai-context.model';
63
+ export * from './lib/gatherers/ai-context/v1/ai-context.gatherer';
package/src/index.js CHANGED
@@ -59,4 +59,6 @@ export * from './lib/utils/portal-message.utils';
59
59
  export * from './lib/topics/notification/v1/notification.model';
60
60
  export * from './lib/topics/notification/v1/notification.topic';
61
61
  export * from './lib/services/notification.service';
62
+ export * from './lib/gatherers/ai-context/v1/ai-context.model';
63
+ export * from './lib/gatherers/ai-context/v1/ai-context.gatherer';
62
64
  //# sourceMappingURL=index.js.map
package/src/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/integration-interface/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,+CAA+C,CAAA;AAC7D,cAAc,4CAA4C,CAAA;AAC1D,cAAc,iDAAiD,CAAA;AAC/D,cAAc,8CAA8C,CAAA;AAE5D,cAAc,iDAAiD,CAAA;AAE/D,cAAc,qDAAqD,CAAA;AAEnE,cAAc,mDAAmD,CAAA;AACjE,cAAc,2CAA2C,CAAA;AACzD,cAAc,oDAAoD,CAAA;AAElE,cAAc,iDAAiD,CAAA;AAC/D,cAAc,iDAAiD,CAAA;AAE/D,cAAc,mDAAmD,CAAA;AAEjE,cAAc,2DAA2D,CAAA;AACzE,cAAc,iEAAiE,CAAA;AAC/E,cAAc,mDAAmD,CAAA;AACjE,cAAc,+CAA+C,CAAA;AAC7D,cAAc,kDAAkD,CAAA;AAEhE,cAAc,wDAAwD,CAAA;AAEtE,cAAc,uCAAuC,CAAA;AACrD,cAAc,uCAAuC,CAAA;AAErD,cAAc,0DAA0D,CAAA;AACxE,cAAc,gEAAgE,CAAA;AAC9E,cAAc,8CAA8C,CAAA;AAC5D,cAAc,2DAA2D,CAAA;AAEzE,cAAc,+CAA+C,CAAA;AAE7D,cAAc,uDAAuD,CAAA;AACrE,cAAc,uDAAuD,CAAA;AAErE,cAAc,qCAAqC,CAAA;AACnD,cAAc,yCAAyC,CAAA;AACvD,cAAc,mCAAmC,CAAA;AACjD,cAAc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,cAAc,kCAAkC,CAAA;AAEhD,cAAc,iDAAiD,CAAA;AAC/D,cAAc,iDAAiD,CAAA;AAC/D,cAAc,qCAAqC,CAAA;AAEnD,cAAc,gDAAgD,CAAA;AAC9D,cAAc,mDAAmD,CAAA"}
@@ -0,0 +1,22 @@
1
+ import { Gatherer } from "@onecx/accelerator";
2
+ import type { AiContextRequest, AiContextResponse } from "./ai-context.model";
3
+ /**
4
+ * This class can be used to provide a context for AI-specific features.
5
+ * It allows gathering information about all applications, products, and contexts in which the AI is being used.
6
+ *
7
+ * @example
8
+ * ```ts
9
+ *
10
+ * // add a gatherer to the constructor of the page component that should provide AI context information
11
+ * // in ngOnDestroy, call the gatherer.destroy() method to clean up resources
12
+ *
13
+ * const aiContextGatherer = new AiContextGatherer(async (request) => {
14
+ * // decide if your app whats to contribute to the AI context or not
15
+ * // if you do not want to contribute, return null
16
+ * // if you want to contribute, return an AiContextResponse object
17
+ * });
18
+ * ```
19
+ */
20
+ export declare class AiContextGatherer extends Gatherer<AiContextRequest, AiContextResponse | null> {
21
+ constructor(callback: (request: AiContextRequest) => Promise<AiContextResponse | null>);
22
+ }
@@ -0,0 +1,24 @@
1
+ import { Gatherer } from "@onecx/accelerator";
2
+ /**
3
+ * This class can be used to provide a context for AI-specific features.
4
+ * It allows gathering information about all applications, products, and contexts in which the AI is being used.
5
+ *
6
+ * @example
7
+ * ```ts
8
+ *
9
+ * // add a gatherer to the constructor of the page component that should provide AI context information
10
+ * // in ngOnDestroy, call the gatherer.destroy() method to clean up resources
11
+ *
12
+ * const aiContextGatherer = new AiContextGatherer(async (request) => {
13
+ * // decide if your app whats to contribute to the AI context or not
14
+ * // if you do not want to contribute, return null
15
+ * // if you want to contribute, return an AiContextResponse object
16
+ * });
17
+ * ```
18
+ */
19
+ export class AiContextGatherer extends Gatherer {
20
+ constructor(callback) {
21
+ super("aiContext", 1, callback);
22
+ }
23
+ }
24
+ //# sourceMappingURL=ai-context.gatherer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-context.gatherer.js","sourceRoot":"","sources":["../../../../../../../../libs/integration-interface/src/lib/gatherers/ai-context/v1/ai-context.gatherer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAI7C;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,OAAO,iBAAkB,SAAQ,QAAoD;IAEvF,YAAY,QAA0E;QAClF,KAAK,CAAC,WAAW,EAAE,CAAC,EAAE,QAAQ,CAAC,CAAA;IACnC,CAAC;CACJ"}
@@ -0,0 +1,11 @@
1
+ export interface AiContextRequest {
2
+ agent: {
3
+ name: string;
4
+ };
5
+ }
6
+ export interface AiContextResponse {
7
+ productName: string;
8
+ appId: string;
9
+ appPath: string;
10
+ context: string;
11
+ }
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=ai-context.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-context.model.js","sourceRoot":"","sources":["../../../../../../../../libs/integration-interface/src/lib/gatherers/ai-context/v1/ai-context.model.ts"],"names":[],"mappings":""}
package/src/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  export declare const LIB_NAME = "@onecx/integration-interface";
2
- export declare const LIB_VERSION = "8.9.0";
2
+ export declare const LIB_VERSION = "8.11.0";
package/src/version.js CHANGED
@@ -1,3 +1,3 @@
1
1
  export const LIB_NAME = '@onecx/integration-interface';
2
- export const LIB_VERSION = '8.9.0';
2
+ export const LIB_VERSION = '8.11.0';
3
3
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../../../../libs/integration-interface/src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,QAAQ,GAAG,8BAA8B,CAAA;AACtD,MAAM,CAAC,MAAM,WAAW,GAAG,OAAO,CAAA"}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../../../libs/integration-interface/src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,QAAQ,GAAG,8BAA8B,CAAA;AACtD,MAAM,CAAC,MAAM,WAAW,GAAG,QAAQ,CAAA"}