@crowdstrike/foundry-js 0.14.0 → 0.15.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/api.d.ts CHANGED
@@ -70,7 +70,10 @@ export default class FalconApi<DATA extends LocalData = LocalData> {
70
70
  *
71
71
  * This establishes a connection to send messages between the extension and the Falcon Console. Only when established you will be able to call other APIs.
72
72
  */
73
- connect(): Promise<void>;
73
+ connect(): Promise<{
74
+ origin: string;
75
+ data?: DATA;
76
+ }>;
74
77
  /**
75
78
  * The ID of the Foundry app this UI extension belongs to.
76
79
  */
package/dist/index.js CHANGED
@@ -3000,13 +3000,14 @@ class FalconApi {
3000
3000
  async connect() {
3001
3001
  const response = await this.bridge.postMessage({ type: 'connect' });
3002
3002
  if (response !== undefined) {
3003
- const { origin, data } = response;
3003
+ const { data, origin } = response;
3004
3004
  this.bridge.setOrigin(origin);
3005
3005
  this.data = data;
3006
3006
  this.updateTheme(data?.theme);
3007
3007
  this.isConnected = true;
3008
3008
  }
3009
3009
  this.resizeTracker = new ResizeTracker(this.bridge);
3010
+ return response;
3010
3011
  }
3011
3012
  /**
3012
3013
  * The ID of the Foundry app this UI extension belongs to.