@integry/sdk 4.7.25 → 4.7.26

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@integry/sdk",
3
- "version": "4.7.25",
3
+ "version": "4.7.26",
4
4
  "description": "Integry SDK",
5
5
  "main": "dist/umd/index.umd.js",
6
6
  "module": "dist/esm/index.csm.js",
package/src/index.ts CHANGED
@@ -84,13 +84,15 @@ export class IntegryJS {
84
84
 
85
85
  static RenderModes: typeof RenderModes = RenderModes;
86
86
 
87
- static TemplateFormRenderModes: typeof TemplateFormRenderModes = TemplateFormRenderModes;
87
+ static TemplateFormRenderModes: typeof TemplateFormRenderModes =
88
+ TemplateFormRenderModes;
88
89
 
89
90
  static Layouts: typeof Layouts = Layouts;
90
91
 
91
92
  static ViewStyles: typeof ViewStyles = ViewStyles;
92
93
 
93
- static MarketplaceRenderModes: typeof MarketplaceRenderModes = MarketplaceRenderModes;
94
+ static MarketplaceRenderModes: typeof MarketplaceRenderModes =
95
+ MarketplaceRenderModes;
94
96
 
95
97
  static Helpers: {
96
98
  getAuthHash: (key: string, message: string) => Promise<string>;
@@ -523,8 +525,8 @@ export class IntegryJS {
523
525
  userConfig: this.config.userConfig,
524
526
  genericData: {
525
527
  ...initialState.genericData,
526
- implicitAuthEnabled: !!this.config.xIntegryConfig?.appAuth
527
- ?.apiKey,
528
+ implicitAuthEnabled:
529
+ !!this.config.xIntegryConfig?.appAuth?.apiKey,
528
530
  deploymentId: Number(this.config.deploymentId),
529
531
  isAnonymous: !!this.config.xIntegryConfig?.isAnonymous,
530
532
  },
@@ -634,8 +636,8 @@ export class IntegryJS {
634
636
  userConfig: this.config.userConfig,
635
637
  genericData: {
636
638
  ...initialState.genericData,
637
- implicitAuthEnabled: !!this.config.xIntegryConfig?.appAuth
638
- ?.apiKey,
639
+ implicitAuthEnabled:
640
+ !!this.config.xIntegryConfig?.appAuth?.apiKey,
639
641
  deploymentId: Number(this.config.deploymentId),
640
642
  isAnonymous: !!this.config.xIntegryConfig?.isAnonymous,
641
643
  },
@@ -741,6 +743,7 @@ export class IntegryJS {
741
743
  } = {},
742
744
  connectedAccountId: string,
743
745
  version: string | null = null,
746
+ allow_workspace_connected_accounts = false,
744
747
  ): Promise<Record<any, any>> =>
745
748
  new Promise((resolve, reject) => {
746
749
  // Prepare the request body by encoding `args` to JSON
@@ -750,9 +753,13 @@ export class IntegryJS {
750
753
  if (version) {
751
754
  headers.Version = version;
752
755
  }
756
+ let url = `${this.getBaseAPIUrl()}/functions/${functionName}/call/`;
757
+ if (allow_workspace_connected_accounts) {
758
+ url += '?allow_workspace_connected_accounts=true';
759
+ }
753
760
  const functionDetails = {
754
761
  method: this.getMethod(),
755
- url: `${this.getBaseAPIUrl()}/functions/${functionName}/call/`,
762
+ url,
756
763
  headers,
757
764
  args: params,
758
765
  vars,
@@ -1028,9 +1035,7 @@ export class IntegryJS {
1028
1035
  );
1029
1036
  };
1030
1037
 
1031
- public async removeAuthorization(data: {
1032
- authorizationId: number;
1033
- }): Promise<{
1038
+ public async removeAuthorization(data: { authorizationId: number }): Promise<{
1034
1039
  data: string | null;
1035
1040
  status: number;
1036
1041
  } | null> {