@integry/sdk 4.7.26 → 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/dist/esm/index.csm.d.ts +1 -0
- package/dist/esm/index.csm.js +1 -1
- package/dist/umd/index.umd.d.ts +1 -0
- package/dist/umd/index.umd.js +1 -1
- package/package.json +1 -1
- package/src/components/MultipurposeField/index.tsx +3 -0
- package/src/features/common/FunctionForm/index.ts +8 -0
- package/src/index.ts +5 -0
- package/src/modules/api/index.ts +4 -0
- package/src/types/index.ts +1 -0
package/package.json
CHANGED
|
@@ -407,6 +407,9 @@ const MultipurposeField = (props: MultipurposeFieldProps) => {
|
|
|
407
407
|
|
|
408
408
|
// Returns all those strings which are enclosed in curly braces {}
|
|
409
409
|
const getTags = (str: string) => {
|
|
410
|
+
if (typeof str !== 'string') {
|
|
411
|
+
return [];
|
|
412
|
+
}
|
|
410
413
|
return str.match(/{[^{}"'<>:]+}/g) || [];
|
|
411
414
|
};
|
|
412
415
|
|
|
@@ -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(
|
package/src/modules/api/index.ts
CHANGED
|
@@ -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 {
|