@useparagon/connect 2.2.3-experimental.2 → 2.2.4-experimental-15311.1
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/src/ConnectSDK.d.ts +11 -3
- package/dist/src/ConnectSDK.js +1 -1
- package/dist/src/entities/integration.interface.d.ts +4 -0
- package/dist/src/file-picker/integrations/googledrive.d.ts +4 -0
- package/dist/src/index.js +1 -1
- package/dist/src/types/connect.d.ts +8 -2
- package/dist/src/types/sdk.d.ts +20 -3
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@ import { PersonaMeta } from '../entities/persona.interface';
|
|
|
5
5
|
import { AccountType, BooleanInput, ComboInput, CopyableButtonInput, CustomDropdownInput, DataSource, DynamicComboInput, DynamicEnumInput, EmailInput, FieldMapperInput, FileInput, IntegrationConnectInput, NumberInput, PasswordInput, PermissionInput, SidebarInputType, SwitchInput, URLInput, ValueTextInput } from './action';
|
|
6
6
|
import { InstallFlowError } from './errors';
|
|
7
7
|
import { OrConditions } from './resolvers';
|
|
8
|
-
import { CredentialConfigOptions } from './sdk';
|
|
8
|
+
import { CredentialConfigOptions, IntegrationInstallEvent, LoadCustomDropdownOptionsResult } from './sdk';
|
|
9
9
|
export { CredentialStatus } from '../entities/connectCredential.interface';
|
|
10
10
|
export type { IntegrationMetadata } from '../entities/integration.interface';
|
|
11
11
|
export * from './errors';
|
|
@@ -173,6 +173,9 @@ export type CustomDropdownField = {
|
|
|
173
173
|
label: string;
|
|
174
174
|
value: string;
|
|
175
175
|
};
|
|
176
|
+
export type CustomDropdownOptions = {
|
|
177
|
+
loadOptions: (cursor: string | undefined, search: string | undefined) => LoadCustomDropdownOptionsResult;
|
|
178
|
+
};
|
|
176
179
|
export type DynamicMappingField = {
|
|
177
180
|
label: string;
|
|
178
181
|
value: string;
|
|
@@ -272,7 +275,7 @@ export type StartOptions = {
|
|
|
272
275
|
/**
|
|
273
276
|
* Callback to be called when the installation is complete
|
|
274
277
|
*/
|
|
275
|
-
onComplete?:
|
|
278
|
+
onComplete?: (installationEvent: IntegrationInstallEvent) => void;
|
|
276
279
|
onNext?: (nextState: InstallFlowStage) => void;
|
|
277
280
|
/**
|
|
278
281
|
* Callback to be called when the installation fails.
|
|
@@ -294,4 +297,7 @@ export type StartOptions = {
|
|
|
294
297
|
* Closes the popup and raises an error if the flow is not completed within the given timeout.
|
|
295
298
|
*/
|
|
296
299
|
oauthTimeout?: number;
|
|
300
|
+
allowMultipleCredentials?: boolean;
|
|
301
|
+
overrideRedirectUrl?: string;
|
|
302
|
+
selectedCredentialId?: string;
|
|
297
303
|
};
|
package/dist/src/types/sdk.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { IConnectIntegrationWithCredentialInfo, IntegrationMetadata } from '../e
|
|
|
7
7
|
import { PersonaMeta } from '../entities/persona.interface';
|
|
8
8
|
import { IConnectUserContext } from '../helpers/ConnectUserContext';
|
|
9
9
|
import { ConnectSdkEnvironments } from '../server.types';
|
|
10
|
-
import { AuthenticatedConnectUser, DisableWorkflowOptions, DynamicMappingField, DynamicMappingOptions, GetIntegrationAccountOptions, IntegrationWorkflowMeta, IntegrationWorkflowState, SerializedConnectInput, UninstallOptions } from '../types/connect';
|
|
10
|
+
import { AuthenticatedConnectUser, CustomDropdownField, CustomDropdownOptions, DisableWorkflowOptions, DynamicMappingField, DynamicMappingOptions, GetIntegrationAccountOptions, IntegrationWorkflowMeta, IntegrationWorkflowState, SerializedConnectInput, UninstallOptions } from '../types/connect';
|
|
11
11
|
import { DataSource, DynamicDefaultInput, EnumInputValue } from './action';
|
|
12
12
|
import { Props as ConnectModalProps } from './connectModal';
|
|
13
13
|
import { DataType, KeyedSource } from './resolvers';
|
|
@@ -72,6 +72,20 @@ export type LoadCustomDropdownOptionsResult = Promise<{
|
|
|
72
72
|
}[];
|
|
73
73
|
nextPageCursor: string | null;
|
|
74
74
|
}>;
|
|
75
|
+
export type CustomDropdownOptionResult = {
|
|
76
|
+
fieldKey: string;
|
|
77
|
+
source: 'shared' | 'workflow';
|
|
78
|
+
workflowId?: string;
|
|
79
|
+
} & ({
|
|
80
|
+
type: 'static';
|
|
81
|
+
options: Array<{
|
|
82
|
+
label: string;
|
|
83
|
+
value: string;
|
|
84
|
+
}>;
|
|
85
|
+
} | {
|
|
86
|
+
type: 'dynamic';
|
|
87
|
+
loadOptions: (cursor?: string, search?: string) => LoadCustomDropdownOptionsResult;
|
|
88
|
+
});
|
|
75
89
|
export type DynamicFieldMappingOptionsResult = {
|
|
76
90
|
options: {
|
|
77
91
|
label: string;
|
|
@@ -118,7 +132,7 @@ export interface IConnectSDK {
|
|
|
118
132
|
* Invoked by the OAuth popup after finishing the credential exchange.
|
|
119
133
|
* @private
|
|
120
134
|
*/
|
|
121
|
-
_oauthCallback(credential: OauthCallbackResponse, credentialId?: string): Promise<
|
|
135
|
+
_oauthCallback(credential: OauthCallbackResponse, credentialId?: string): Promise<IntegrationInstallEvent | undefined>;
|
|
122
136
|
/**
|
|
123
137
|
* **Do not call this function directly.**
|
|
124
138
|
*
|
|
@@ -262,7 +276,7 @@ export interface IConnectSDK {
|
|
|
262
276
|
getPreOptions(params: string): any;
|
|
263
277
|
getPostOptions(params: string): any;
|
|
264
278
|
startOAuthFlow(action: string, apiInstallationOptions: InstallOptions & CredentialConfigOptions, options?: {
|
|
265
|
-
onSuccess?: (
|
|
279
|
+
onSuccess?: (installationEvent: IntegrationInstallEvent) => void;
|
|
266
280
|
onError?: (error: unknown) => void;
|
|
267
281
|
}): void;
|
|
268
282
|
getFieldOptions(options: {
|
|
@@ -277,6 +291,8 @@ export interface IConnectSDK {
|
|
|
277
291
|
nextPageCursor: string | null;
|
|
278
292
|
}>;
|
|
279
293
|
getDataSourceOptions(integrationName: string, action: string): Promise<DataSource | undefined>;
|
|
294
|
+
setCustomDropdownOptions(action: string, dropdowns: Record<string, CustomDropdownField[] | CustomDropdownOptions>): void;
|
|
295
|
+
getCustomDropdownOptions(action: string, fieldKey?: string): CustomDropdownOptionResult[];
|
|
280
296
|
installFlow: InstallFlow;
|
|
281
297
|
}
|
|
282
298
|
/**
|
|
@@ -440,6 +456,7 @@ export type FilePickerOptions = {
|
|
|
440
456
|
googledrive?: {
|
|
441
457
|
viewMode?: google.picker.DocsViewMode;
|
|
442
458
|
includeFolders?: boolean;
|
|
459
|
+
enableSharedDrives?: boolean;
|
|
443
460
|
};
|
|
444
461
|
box?: {
|
|
445
462
|
container?: string;
|
package/package.json
CHANGED