@integry/sdk 4.7.27 → 4.7.28

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.27",
3
+ "version": "4.7.28",
4
4
  "description": "Integry SDK",
5
5
  "main": "dist/umd/index.umd.js",
6
6
  "module": "dist/esm/index.csm.js",
@@ -42,6 +42,7 @@ interface FunctionFormPropsType extends StoreType {
42
42
  enabled: boolean,
43
43
  allAIAssistedFields: string[],
44
44
  ) => void; // Callback when AI assist toggle changes
45
+ allowWorkspaceConnectedAccounts?: boolean;
45
46
  }
46
47
 
47
48
  interface ActionFormStateType {
@@ -101,6 +102,7 @@ class FunctionForm extends Component<
101
102
  this.props.functionName,
102
103
  this.props.autoMapVars ? this.props.variables : {},
103
104
  this.props.version,
105
+ this.props.allowWorkspaceConnectedAccounts,
104
106
  )
105
107
  .then((response: any) => {
106
108
  this.setState({ functionDetails: response });
@@ -864,6 +866,9 @@ class FunctionForm extends Component<
864
866
  ? this.props.variables
865
867
  : null}
866
868
  isReadOnly=${isAIAssisted}
869
+ allowWorkspaceConnectedAccounts=${
870
+ !!this.props.allowWorkspaceConnectedAccounts
871
+ }
867
872
  ><//>
868
873
  `,
869
874
  )}
@@ -897,6 +902,9 @@ class FunctionForm extends Component<
897
902
  isDisabled=${isAIAssisted}
898
903
  isEditable=${false}
899
904
  allowTagsInText=${true}
905
+ allowWorkspaceConnectedAccounts=${
906
+ !!this.props.allowWorkspaceConnectedAccounts
907
+ }
900
908
  apiHandler=${this.props.apiHandler}
901
909
  idKeyPath=${field.idKeyPath}
902
910
  typeKeyPath=${field.typeKeyPath}
package/src/index.ts CHANGED
@@ -597,6 +597,7 @@ export class IntegryJS {
597
597
  connectedAccountId: '',
598
598
  autoMapPayload: false,
599
599
  version: null,
600
+ allow_workspace_connected_accounts: false,
600
601
  },
601
602
  ): Promise<Record<any, any>> => {
602
603
  const store = createSDKStore();
@@ -607,6 +608,7 @@ export class IntegryJS {
607
608
  functionName,
608
609
  options.autoMapPayload ? options.payload : {},
609
610
  options.version,
611
+ options.allow_workspace_connected_accounts,
610
612
  )
611
613
  .then((response: any) => {
612
614
  if (!response) {
@@ -675,6 +677,9 @@ export class IntegryJS {
675
677
  variables=${options.payload}
676
678
  autoMapVars=${options.autoMapPayload}
677
679
  version=${options.version}
680
+ allowWorkspaceConnectedAccounts=${
681
+ options.allow_workspace_connected_accounts
682
+ }
678
683
  apiHandler=${this.apiHandler}
679
684
  onClose=${(functionUIResponse: any) => {
680
685
  const authIdElement = document.getElementById(
@@ -1173,6 +1173,7 @@ class IntegryAPI {
1173
1173
  functionName: string,
1174
1174
  variables: Record<string, unknown> = {},
1175
1175
  version: string | null = null,
1176
+ allowWorkspaceConnectedAccounts = false,
1176
1177
  ): Promise<any | null> => {
1177
1178
  const url = new URL(
1178
1179
  `${this.config.baseAPIUrl}/functions/${functionName}/get/`,
@@ -1183,6 +1184,9 @@ class IntegryAPI {
1183
1184
  hash: this.config.hash,
1184
1185
  user_id: this.config.userId,
1185
1186
  include: 'meta',
1187
+ ...(allowWorkspaceConnectedAccounts && {
1188
+ allow_workspace_connected_accounts: true,
1189
+ }),
1186
1190
  });
1187
1191
 
1188
1192
  try {
@@ -316,4 +316,5 @@ export type ShowFunctionOptions = {
316
316
  connectedAccountId?: string;
317
317
  autoMapPayload?: boolean;
318
318
  version?: string | null;
319
+ allow_workspace_connected_accounts?: boolean;
319
320
  };