@openfin/core 43.100.90 → 43.100.92

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.
@@ -4578,7 +4578,22 @@ declare type DomainSettings = {
4578
4578
  };
4579
4579
 
4580
4580
  /**
4581
- * Map of preload scripts that can enable new scripts or disable options defined preloadScripts.
4581
+ * Enables or disables specific preload scripts by URL.
4582
+ *
4583
+ * Uses the script's full URL as the key and an object
4584
+ * with an `enabled` boolean property as the value.
4585
+ * @example
4586
+ * ```js
4587
+ * {
4588
+ "match": ["<all_urls>"],
4589
+ "options": {
4590
+ "preloadScripts": {
4591
+ "http://localhost:53000/block-preload.js": { "enabled": false }
4592
+ "http://localhost:53000/allow-preload.js": { "enabled": true }
4593
+ }
4594
+ }
4595
+ }
4596
+ * ```
4582
4597
  */
4583
4598
  declare type DomainSettingsPreloadScripts = Record<string, {
4584
4599
  enabled: boolean;
@@ -6636,6 +6651,7 @@ declare class InteropBroker extends Base {
6636
6651
  private sessionContextGroupMap;
6637
6652
  private channel;
6638
6653
  private logging;
6654
+ private privateChannelProviderMap;
6639
6655
  /* Excluded from this release type: __constructor */
6640
6656
  private getProvider;
6641
6657
  static createClosedConstructor(...args: ConstructorParameters<typeof InteropBroker>): {
@@ -4578,7 +4578,22 @@ declare type DomainSettings = {
4578
4578
  };
4579
4579
 
4580
4580
  /**
4581
- * Map of preload scripts that can enable new scripts or disable options defined preloadScripts.
4581
+ * Enables or disables specific preload scripts by URL.
4582
+ *
4583
+ * Uses the script's full URL as the key and an object
4584
+ * with an `enabled` boolean property as the value.
4585
+ * @example
4586
+ * ```js
4587
+ * {
4588
+ "match": ["<all_urls>"],
4589
+ "options": {
4590
+ "preloadScripts": {
4591
+ "http://localhost:53000/block-preload.js": { "enabled": false }
4592
+ "http://localhost:53000/allow-preload.js": { "enabled": true }
4593
+ }
4594
+ }
4595
+ }
4596
+ * ```
4582
4597
  */
4583
4598
  declare type DomainSettingsPreloadScripts = Record<string, {
4584
4599
  enabled: boolean;
@@ -6636,6 +6651,7 @@ declare class InteropBroker extends Base {
6636
6651
  private sessionContextGroupMap;
6637
6652
  private channel;
6638
6653
  private logging;
6654
+ private privateChannelProviderMap;
6639
6655
  /* Excluded from this release type: __constructor */
6640
6656
  private getProvider;
6641
6657
  static createClosedConstructor(...args: ConstructorParameters<typeof InteropBroker>): {
@@ -4578,7 +4578,22 @@ declare type DomainSettings = {
4578
4578
  };
4579
4579
 
4580
4580
  /**
4581
- * Map of preload scripts that can enable new scripts or disable options defined preloadScripts.
4581
+ * Enables or disables specific preload scripts by URL.
4582
+ *
4583
+ * Uses the script's full URL as the key and an object
4584
+ * with an `enabled` boolean property as the value.
4585
+ * @example
4586
+ * ```js
4587
+ * {
4588
+ "match": ["<all_urls>"],
4589
+ "options": {
4590
+ "preloadScripts": {
4591
+ "http://localhost:53000/block-preload.js": { "enabled": false }
4592
+ "http://localhost:53000/allow-preload.js": { "enabled": true }
4593
+ }
4594
+ }
4595
+ }
4596
+ * ```
4582
4597
  */
4583
4598
  declare type DomainSettingsPreloadScripts = Record<string, {
4584
4599
  enabled: boolean;
@@ -6636,6 +6651,7 @@ declare class InteropBroker extends Base {
6636
6651
  private sessionContextGroupMap;
6637
6652
  private channel;
6638
6653
  private logging;
6654
+ private privateChannelProviderMap;
6639
6655
  /* Excluded from this release type: __constructor */
6640
6656
  private getProvider;
6641
6657
  static createClosedConstructor(...args: ConstructorParameters<typeof InteropBroker>): {
package/out/stub.d.ts CHANGED
@@ -4637,7 +4637,22 @@ declare type DomainSettings = {
4637
4637
  };
4638
4638
 
4639
4639
  /**
4640
- * Map of preload scripts that can enable new scripts or disable options defined preloadScripts.
4640
+ * Enables or disables specific preload scripts by URL.
4641
+ *
4642
+ * Uses the script's full URL as the key and an object
4643
+ * with an `enabled` boolean property as the value.
4644
+ * @example
4645
+ * ```js
4646
+ * {
4647
+ "match": ["<all_urls>"],
4648
+ "options": {
4649
+ "preloadScripts": {
4650
+ "http://localhost:53000/block-preload.js": { "enabled": false }
4651
+ "http://localhost:53000/allow-preload.js": { "enabled": true }
4652
+ }
4653
+ }
4654
+ }
4655
+ * ```
4641
4656
  */
4642
4657
  declare type DomainSettingsPreloadScripts = Record<string, {
4643
4658
  enabled: boolean;
@@ -6742,6 +6757,7 @@ declare class InteropBroker extends Base {
6742
6757
  private sessionContextGroupMap;
6743
6758
  private channel;
6744
6759
  private logging;
6760
+ private privateChannelProviderMap;
6745
6761
  /**
6746
6762
  * @internal
6747
6763
  */
package/out/stub.js CHANGED
@@ -9035,7 +9035,7 @@ var __classPrivateFieldGet$c = (commonjsGlobal && commonjsGlobal.__classPrivateF
9035
9035
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
9036
9036
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
9037
9037
  };
9038
- var __importDefault$5 = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
9038
+ var __importDefault$6 = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
9039
9039
  return (mod && mod.__esModule) ? mod : { "default": mod };
9040
9040
  };
9041
9041
  var _ConnectionManager_messageReceiver, _ConnectionManager_rtcConnectionManager;
@@ -9049,7 +9049,7 @@ const ice_manager_1 = iceManager;
9049
9049
  const provider_1$1 = provider;
9050
9050
  const message_receiver_1 = messageReceiver;
9051
9051
  const protocol_manager_1 = protocolManager;
9052
- const strategy_3 = __importDefault$5(strategy);
9052
+ const strategy_3 = __importDefault$6(strategy);
9053
9053
  class ConnectionManager extends base_1$j.Base {
9054
9054
  static getProtocolOptionsFromStrings(protocols) {
9055
9055
  return protocols.map((protocol) => {
@@ -13431,7 +13431,7 @@ Object.defineProperty(PrivateChannelProvider$1, "__esModule", { value: true });
13431
13431
  PrivateChannelProvider$1.PrivateChannelProvider = void 0;
13432
13432
  const utils_1$8 = utils$3;
13433
13433
  class PrivateChannelProvider {
13434
- constructor(provider, id) {
13434
+ constructor(provider, id, removePrivateChannelProvider) {
13435
13435
  this.provider = provider;
13436
13436
  this.id = id;
13437
13437
  this.clients = new Map();
@@ -13439,6 +13439,7 @@ class PrivateChannelProvider {
13439
13439
  this.contextByContextType = new Map();
13440
13440
  this.lastContext = undefined;
13441
13441
  this.provider.onConnection((clientIdentity) => this.registerNewClient(clientIdentity));
13442
+ this.removePrivateChannelProvider = removePrivateChannelProvider;
13442
13443
  this.provider.onDisconnection(async (clientIdentity) => {
13443
13444
  const { endpointId } = clientIdentity;
13444
13445
  if (this.clients.has(endpointId)) {
@@ -13446,6 +13447,7 @@ class PrivateChannelProvider {
13446
13447
  }
13447
13448
  if ((await this.provider.getAllClientInfo()).length === 0) {
13448
13449
  this.provider.destroy();
13450
+ this.removePrivateChannelProvider(this.id);
13449
13451
  }
13450
13452
  });
13451
13453
  }
@@ -13697,8 +13699,8 @@ class PrivateChannelProvider {
13697
13699
  });
13698
13700
  });
13699
13701
  }
13700
- static init(channelProvider, id) {
13701
- return new PrivateChannelProvider(channelProvider, id);
13702
+ static init(channelProvider, id, removePrivateChannelProvider) {
13703
+ return new PrivateChannelProvider(channelProvider, id, removePrivateChannelProvider);
13702
13704
  }
13703
13705
  }
13704
13706
  PrivateChannelProvider$1.PrivateChannelProvider = PrivateChannelProvider;
@@ -13714,16 +13716,16 @@ var __classPrivateFieldGet$6 = (commonjsGlobal && commonjsGlobal.__classPrivateF
13714
13716
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
13715
13717
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
13716
13718
  };
13717
- var __importDefault$4 = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
13719
+ var __importDefault$5 = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
13718
13720
  return (mod && mod.__esModule) ? mod : { "default": mod };
13719
13721
  };
13720
13722
  var _InteropBroker_fdc3Info, _InteropBroker_contextGroups, _InteropBroker_providerPromise;
13721
13723
  Object.defineProperty(InteropBroker$1, "__esModule", { value: true });
13722
13724
  InteropBroker$1.InteropBroker = void 0;
13723
13725
  const base_1$6 = base;
13724
- const SessionContextGroupBroker_1 = __importDefault$4(SessionContextGroupBroker$1);
13726
+ const SessionContextGroupBroker_1 = __importDefault$5(SessionContextGroupBroker$1);
13725
13727
  const utils_1$7 = utils$3;
13726
- const isEqual_1$1 = __importDefault$4(require$$3);
13728
+ const isEqual_1$2 = __importDefault$5(require$$3);
13727
13729
  const PrivateChannelProvider_1 = PrivateChannelProvider$1;
13728
13730
  const lazy_1$1 = lazy;
13729
13731
  const defaultContextGroups = [
@@ -13912,6 +13914,7 @@ class InteropBroker extends base_1$6.Base {
13912
13914
  this.intentClientMap = new Map();
13913
13915
  this.lastContextMap = new Map();
13914
13916
  this.sessionContextGroupMap = new Map();
13917
+ this.privateChannelProviderMap = new Map();
13915
13918
  __classPrivateFieldSet$6(this, _InteropBroker_providerPromise, new lazy_1$1.Lazy(createProvider), "f");
13916
13919
  this.setContextGroupMap();
13917
13920
  this.setupChannelProvider();
@@ -13921,7 +13924,7 @@ class InteropBroker extends base_1$6.Base {
13921
13924
  constructor(...unused) {
13922
13925
  if (unused.length) {
13923
13926
  const [_ignore1, ignore2, opts] = unused;
13924
- if (opts && typeof opts === 'object' && !(0, isEqual_1$1.default)(opts, args[2])) {
13927
+ if (opts && typeof opts === 'object' && !(0, isEqual_1$2.default)(opts, args[2])) {
13925
13928
  // eslint-disable-next-line no-console
13926
13929
  console.warn('You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme.');
13927
13930
  super(args[0], args[1], opts);
@@ -14932,7 +14935,15 @@ class InteropBroker extends base_1$6.Base {
14932
14935
  channel.register('createPrivateChannelProvider', async (payload) => {
14933
14936
  const { channelId } = payload;
14934
14937
  const channelProvider = await this.fin.InterApplicationBus.Channel.create(channelId);
14935
- PrivateChannelProvider_1.PrivateChannelProvider.init(channelProvider, channelId);
14938
+ const removePrivateChannelProvider = (channelId) => {
14939
+ this.privateChannelProviderMap.delete(channelId);
14940
+ };
14941
+ const privateChannelProvider = PrivateChannelProvider_1.PrivateChannelProvider.init(channelProvider, channelId, removePrivateChannelProvider);
14942
+ this.privateChannelProviderMap.set(channelId, privateChannelProvider);
14943
+ });
14944
+ channel.register('isIdUsedByPrivateChannel', async (payload) => {
14945
+ const { channelId } = payload;
14946
+ return this.privateChannelProviderMap.has(channelId);
14936
14947
  });
14937
14948
  }
14938
14949
  /**
@@ -15065,14 +15076,14 @@ var __classPrivateFieldGet$4 = (commonjsGlobal && commonjsGlobal.__classPrivateF
15065
15076
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
15066
15077
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
15067
15078
  };
15068
- var __importDefault$3 = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
15079
+ var __importDefault$4 = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
15069
15080
  return (mod && mod.__esModule) ? mod : { "default": mod };
15070
15081
  };
15071
15082
  var _InteropClient_clientPromise, _InteropClient_sessionContextGroups, _InteropClient_fdc3Factory;
15072
15083
  Object.defineProperty(InteropClient$1, "__esModule", { value: true });
15073
15084
  InteropClient$1.InteropClient = void 0;
15074
15085
  const base_1$4 = base;
15075
- const SessionContextGroupClient_1 = __importDefault$3(SessionContextGroupClient$1);
15086
+ const SessionContextGroupClient_1 = __importDefault$4(SessionContextGroupClient$1);
15076
15087
  const utils_1$5 = utils$3;
15077
15088
  /**
15078
15089
  * The Interop Client API is broken up into two groups:
@@ -15814,15 +15825,86 @@ class PrivateChannelClient {
15814
15825
  }
15815
15826
  PrivateChannelClient$1.PrivateChannelClient = PrivateChannelClient;
15816
15827
 
15828
+ var fdc3Channels2_0 = {};
15829
+
15830
+ var fdc3Channels1_2 = {};
15831
+
15832
+ var __importDefault$3 = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
15833
+ return (mod && mod.__esModule) ? mod : { "default": mod };
15834
+ };
15835
+ Object.defineProperty(fdc3Channels1_2, "__esModule", { value: true });
15836
+ fdc3Channels1_2.createV1Channel = void 0;
15837
+ const isEqual_1$1 = __importDefault$3(require$$3);
15838
+ const createV1Channel = (sessionContextGroup) => {
15839
+ return {
15840
+ id: sessionContextGroup.id,
15841
+ type: 'app',
15842
+ broadcast: sessionContextGroup.setContext,
15843
+ getCurrentContext: async (contextType) => {
15844
+ const context = await sessionContextGroup.getCurrentContext(contextType);
15845
+ return context === undefined ? null : context;
15846
+ },
15847
+ // @ts-expect-error TODO [CORE-1524]
15848
+ addContextListener: (contextType, handler) => {
15849
+ let realHandler;
15850
+ let realType;
15851
+ if (typeof contextType === 'function') {
15852
+ console.warn('addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)');
15853
+ realHandler = contextType;
15854
+ }
15855
+ else {
15856
+ realHandler = handler;
15857
+ if (typeof contextType === 'string') {
15858
+ realType = contextType;
15859
+ }
15860
+ }
15861
+ const listener = (async () => {
15862
+ let first = true;
15863
+ const currentContext = await sessionContextGroup.getCurrentContext(realType);
15864
+ const wrappedHandler = (context, contextMetadata) => {
15865
+ if (first) {
15866
+ first = false;
15867
+ if ((0, isEqual_1$1.default)(currentContext, context)) {
15868
+ return;
15869
+ }
15870
+ }
15871
+ // eslint-disable-next-line consistent-return
15872
+ return realHandler(context, contextMetadata);
15873
+ };
15874
+ return sessionContextGroup.addContextHandler(wrappedHandler, realType);
15875
+ })();
15876
+ return {
15877
+ ...listener,
15878
+ unsubscribe: () => listener.then((l) => l.unsubscribe())
15879
+ };
15880
+ }
15881
+ };
15882
+ };
15883
+ fdc3Channels1_2.createV1Channel = createV1Channel;
15884
+
15885
+ Object.defineProperty(fdc3Channels2_0, "__esModule", { value: true });
15886
+ fdc3Channels2_0.createV2Channel = void 0;
15887
+ const fdc3_channels_1_2_1$1 = fdc3Channels1_2;
15888
+ const createV2Channel = (sessionContextGroup) => {
15889
+ const channel = (0, fdc3_channels_1_2_1$1.createV1Channel)(sessionContextGroup);
15890
+ return {
15891
+ ...channel,
15892
+ // @ts-expect-error Type incompatibility on signature.
15893
+ addContextListener: async (...args) => channel.addContextListener(...args)
15894
+ };
15895
+ };
15896
+ fdc3Channels2_0.createV2Channel = createV2Channel;
15897
+
15817
15898
  (function (exports) {
15818
15899
  var __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
15819
15900
  return (mod && mod.__esModule) ? mod : { "default": mod };
15820
15901
  };
15821
15902
  Object.defineProperty(exports, "__esModule", { value: true });
15822
- exports.getIntentResolution = exports.isChannel = exports.isContext = exports.connectPrivateChannel = exports.buildAppChannelObject = exports.buildPrivateChannelObject = exports.ChannelError = exports.ResultError = exports.UnsupportedChannelApiError = exports.getUnsupportedChannelApis = void 0;
15903
+ exports.getIntentResolution = exports.isChannel = exports.isContext = exports.connectPrivateChannel = exports.buildPrivateChannelObject = exports.ChannelError = exports.ResultError = exports.UnsupportedChannelApiError = exports.getUnsupportedChannelApis = void 0;
15823
15904
  const utils_1 = utils$3;
15824
15905
  const PrivateChannelClient_1 = PrivateChannelClient$1;
15825
- const isEqual_1 = __importDefault(require$$3);
15906
+ __importDefault(require$$3);
15907
+ const fdc3_channels_2_0_1 = fdc3Channels2_0;
15826
15908
  const getUnsupportedChannelApis = (channelType) => {
15827
15909
  return {
15828
15910
  addContextListener: () => {
@@ -15921,52 +16003,6 @@ PrivateChannelClient$1.PrivateChannelClient = PrivateChannelClient;
15921
16003
  };
15922
16004
  };
15923
16005
  exports.buildPrivateChannelObject = buildPrivateChannelObject;
15924
- const buildAppChannelObject = (sessionContextGroup) => {
15925
- return {
15926
- id: sessionContextGroup.id,
15927
- type: 'app',
15928
- broadcast: sessionContextGroup.setContext,
15929
- getCurrentContext: async (contextType) => {
15930
- const context = await sessionContextGroup.getCurrentContext(contextType);
15931
- return context === undefined ? null : context;
15932
- },
15933
- // @ts-expect-error TODO [CORE-1524]
15934
- addContextListener: (contextType, handler) => {
15935
- let realHandler;
15936
- let realType;
15937
- if (typeof contextType === 'function') {
15938
- console.warn('addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)');
15939
- realHandler = contextType;
15940
- }
15941
- else {
15942
- realHandler = handler;
15943
- if (typeof contextType === 'string') {
15944
- realType = contextType;
15945
- }
15946
- }
15947
- const listener = (async () => {
15948
- let first = true;
15949
- const currentContext = await sessionContextGroup.getCurrentContext(realType);
15950
- const wrappedHandler = (context, contextMetadata) => {
15951
- if (first) {
15952
- first = false;
15953
- if ((0, isEqual_1.default)(currentContext, context)) {
15954
- return;
15955
- }
15956
- }
15957
- // eslint-disable-next-line consistent-return
15958
- return realHandler(context, contextMetadata);
15959
- };
15960
- return sessionContextGroup.addContextHandler(wrappedHandler, realType);
15961
- })();
15962
- return {
15963
- ...listener,
15964
- unsubscribe: () => listener.then((l) => l.unsubscribe())
15965
- };
15966
- }
15967
- };
15968
- };
15969
- exports.buildAppChannelObject = buildAppChannelObject;
15970
16006
  const connectPrivateChannel = async (channelId) => {
15971
16007
  try {
15972
16008
  const channelClient = await fin.InterApplicationBus.Channel.connect(channelId);
@@ -15998,6 +16034,10 @@ PrivateChannelClient$1.PrivateChannelClient = PrivateChannelClient;
15998
16034
  // Generate an ID to make a session context group with. We will pass that ID to the Broker.
15999
16035
  // The broker will then setContext on that session context group later with our Intent Result,
16000
16036
  const guid = (0, utils_1.generateId)(); // TODO make this undefined in web
16037
+ let isPromiseSettled = false;
16038
+ // Adding the intentResolutionResultId to the intentObj. Because fireIntent only accepts a single arg, we have to slap it in here.
16039
+ const metadata = app ? { target: app, intentResolutionResultId: guid } : { intentResolutionResultId: guid };
16040
+ const intentObj = intent ? { name: intent, context, metadata } : { ...context, metadata };
16001
16041
  // Promise we'll use in getResult
16002
16042
  const getResultPromise = new Promise((resolve, reject) => {
16003
16043
  fin.InterApplicationBus.subscribe({ uuid: '*' }, guid, (intentResult) => {
@@ -16010,13 +16050,24 @@ PrivateChannelClient$1.PrivateChannelClient = PrivateChannelClient;
16010
16050
  reject(new Error('getResult is not supported in this environment'));
16011
16051
  });
16012
16052
  });
16013
- // Adding the intentResolutionResultId to the intentObj. Because fireIntent only accepts a single arg, we have to slap it in here.
16014
- const metadata = app ? { target: app, intentResolutionResultId: guid } : { intentResolutionResultId: guid };
16015
- const intentObj = intent ? { name: intent, context, metadata } : { ...context, metadata };
16053
+ getResultPromise
16054
+ .then(() => {
16055
+ isPromiseSettled = true;
16056
+ })
16057
+ .catch(() => {
16058
+ isPromiseSettled = true;
16059
+ });
16016
16060
  // Set up the getResult call.
16017
16061
  const getResult = async () => {
16062
+ // All this mumbo jumbo is needed to make sure that getResult resolves correctly and conforms to the FDC3 spec.
16063
+ if (!isPromiseSettled) {
16064
+ return undefined;
16065
+ }
16018
16066
  let intentResult = await getResultPromise;
16019
- if (!intentResult || typeof intentResult !== 'object') {
16067
+ if (isPromiseSettled && !intentResult) {
16068
+ return undefined;
16069
+ }
16070
+ if (typeof intentResult !== 'object') {
16020
16071
  throw new Error(ResultError.NoResultReturned);
16021
16072
  }
16022
16073
  const { error } = intentResult;
@@ -16032,7 +16083,7 @@ PrivateChannelClient$1.PrivateChannelClient = PrivateChannelClient;
16032
16083
  }
16033
16084
  case 'app': {
16034
16085
  const sessionContextGroup = await interopModule.joinSessionContextGroup(id);
16035
- intentResult = (0, exports.buildAppChannelObject)(sessionContextGroup);
16086
+ intentResult = (0, fdc3_channels_2_0_1.createV2Channel)(sessionContextGroup);
16036
16087
  break;
16037
16088
  }
16038
16089
  }
@@ -16142,10 +16193,16 @@ class FDC3ModuleBase {
16142
16193
  *
16143
16194
  * @tutorial fdc3.getOrCreateChannel
16144
16195
  */
16145
- async getOrCreateChannel(channelId) {
16196
+ async getOrCreateChannel(channelId, fdc3Factory) {
16146
16197
  this.wire.sendAction('fdc3-get-or-create-channel').catch((e) => {
16147
16198
  // we do not want to expose this error, just continue if this analytics-only call fails
16148
16199
  });
16200
+ const hasChannelIdBeenUsed = await InteropClient_1$2.InteropClient.ferryFdc3Call(this.client, 'isIdUsedByPrivateChannel', {
16201
+ channelId
16202
+ });
16203
+ if (hasChannelIdBeenUsed) {
16204
+ throw new Error(utils_1$4.ChannelError.AccessDenied);
16205
+ }
16149
16206
  const systemChannels = await this._getChannels();
16150
16207
  const userChannel = systemChannels.find((channel) => channel.id === channelId);
16151
16208
  if (userChannel) {
@@ -16153,7 +16210,7 @@ class FDC3ModuleBase {
16153
16210
  }
16154
16211
  try {
16155
16212
  const sessionContextGroup = await this.client.joinSessionContextGroup(channelId);
16156
- return (0, utils_1$4.buildAppChannelObject)(sessionContextGroup);
16213
+ return fdc3Factory(sessionContextGroup);
16157
16214
  }
16158
16215
  catch (error) {
16159
16216
  console.error(error.message);
@@ -16303,6 +16360,7 @@ Object.defineProperty(fdc31_2, "__esModule", { value: true });
16303
16360
  fdc31_2.Fdc3Module = void 0;
16304
16361
  const utils_1$3 = utils$3;
16305
16362
  const fdc3_common_1$1 = fdc3Common;
16363
+ const fdc3_channels_1_2_1 = fdc3Channels1_2;
16306
16364
  /**
16307
16365
  * @version 1.2
16308
16366
  * The FDC3 Client Library provides a set APIs to be used for FDC3 compliance,
@@ -16485,7 +16543,7 @@ class Fdc3Module extends fdc3_common_1$1.FDC3ModuleBase {
16485
16543
  * @tutorial fdc3.getOrCreateChannel
16486
16544
  */
16487
16545
  async getOrCreateChannel(channelId) {
16488
- return super.getOrCreateChannel(channelId);
16546
+ return super.getOrCreateChannel(channelId, fdc3_channels_1_2_1.createV1Channel);
16489
16547
  }
16490
16548
  /**
16491
16549
  * Returns metadata relating to the FDC3 object and its provider, including the supported version of the FDC3 specification and the name of the provider of the implementation.
@@ -16515,6 +16573,7 @@ const utils_1$2 = utils$3;
16515
16573
  const InteropClient_1$1 = InteropClient$1;
16516
16574
  const utils_2 = utils$2;
16517
16575
  const PrivateChannelClient_1 = PrivateChannelClient$1;
16576
+ const fdc3_channels_2_0_1 = fdc3Channels2_0;
16518
16577
  /**
16519
16578
  * @version 2.0
16520
16579
  * The FDC3 Client Library provides a set APIs to be used for FDC3 compliance,
@@ -16766,7 +16825,7 @@ class Fdc3Module2 extends fdc3_common_1.FDC3ModuleBase {
16766
16825
  * @tutorial fdc3.getOrCreateChannel
16767
16826
  */
16768
16827
  async getOrCreateChannel(channelId) {
16769
- return super.getOrCreateChannel(channelId);
16828
+ return super.getOrCreateChannel(channelId, fdc3_channels_2_0_1.createV2Channel);
16770
16829
  }
16771
16830
  /**
16772
16831
  * Returns a Channel with an auto-generated identity that is intended for private communication between applications. Primarily used to create channels that will be returned to other applications via an IntentResolution for a raised intent.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/core",
3
- "version": "43.100.90",
3
+ "version": "43.100.92",
4
4
  "description": "The core renderer entry point of OpenFin",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "main": "out/stub.js",