@useparagon/connect 2.2.3-experimental-16047.3 → 2.2.3-experimental-16047.5
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 +44 -4
- package/dist/src/ConnectSDK.js +1 -1
- package/dist/src/file-picker/integrations/googledrive.d.ts +4 -0
- package/dist/src/index.d.ts +0 -2
- package/dist/src/index.js +1 -1
- package/dist/src/types/connect.d.ts +5 -2
- package/dist/src/types/sdk.d.ts +4 -4
- package/package.json +1 -1
- package/dist/src/InstallFlow.d.ts +0 -39
|
@@ -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 } from './sdk';
|
|
9
9
|
export { CredentialStatus } from '../entities/connectCredential.interface';
|
|
10
10
|
export type { IntegrationMetadata } from '../entities/integration.interface';
|
|
11
11
|
export * from './errors';
|
|
@@ -299,7 +299,7 @@ export type StartOptions = {
|
|
|
299
299
|
/**
|
|
300
300
|
* Callback to be called when the installation is complete
|
|
301
301
|
*/
|
|
302
|
-
onComplete?:
|
|
302
|
+
onComplete?: (installationEvent: IntegrationInstallEvent) => void;
|
|
303
303
|
onNext?: (nextState: InstallFlowStage) => void;
|
|
304
304
|
/**
|
|
305
305
|
* Callback to be called when the installation fails.
|
|
@@ -321,4 +321,7 @@ export type StartOptions = {
|
|
|
321
321
|
* Closes the popup and raises an error if the flow is not completed within the given timeout.
|
|
322
322
|
*/
|
|
323
323
|
oauthTimeout?: number;
|
|
324
|
+
allowMultipleCredentials?: boolean;
|
|
325
|
+
overrideRedirectUrl?: string;
|
|
326
|
+
selectedCredentialId?: string;
|
|
324
327
|
};
|
package/dist/src/types/sdk.d.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
/// <reference types="google.picker" />
|
|
2
|
-
import ConnectSDK from '../ConnectSDK';
|
|
2
|
+
import ConnectSDK, { InstallFlow } from '../ConnectSDK';
|
|
3
3
|
import { IConnectCredential } from '../entities/connectCredential.interface';
|
|
4
4
|
import { IConnectCredentialConfig } from '../entities/connectCredentialConfig.interface';
|
|
5
5
|
import { OauthCallbackResponse } from '../entities/credential.interface';
|
|
6
6
|
import { IConnectIntegrationWithCredentialInfo, IntegrationMetadata } from '../entities/integration.interface';
|
|
7
7
|
import { PersonaMeta } from '../entities/persona.interface';
|
|
8
8
|
import { IConnectUserContext } from '../helpers/ConnectUserContext';
|
|
9
|
-
import { InstallFlow } from '../InstallFlow';
|
|
10
9
|
import { ConnectSdkEnvironments } from '../server.types';
|
|
11
10
|
import { AuthenticatedConnectUser, DisableWorkflowOptions, DynamicMappingField, DynamicMappingOptions, GetIntegrationAccountOptions, IntegrationWorkflowMeta, IntegrationWorkflowState, SerializedConnectInput, UninstallOptions } from '../types/connect';
|
|
12
11
|
import { DataSource, DynamicDefaultInput, EnumInputValue } from './action';
|
|
@@ -119,7 +118,7 @@ export interface IConnectSDK {
|
|
|
119
118
|
* Invoked by the OAuth popup after finishing the credential exchange.
|
|
120
119
|
* @private
|
|
121
120
|
*/
|
|
122
|
-
_oauthCallback(credential: OauthCallbackResponse, credentialId?: string): Promise<
|
|
121
|
+
_oauthCallback(credential: OauthCallbackResponse, credentialId?: string): Promise<IntegrationInstallEvent | undefined>;
|
|
123
122
|
/**
|
|
124
123
|
* **Do not call this function directly.**
|
|
125
124
|
*
|
|
@@ -263,7 +262,7 @@ export interface IConnectSDK {
|
|
|
263
262
|
getPreOptions(params: string): any;
|
|
264
263
|
getPostOptions(params: string): any;
|
|
265
264
|
startOAuthFlow(action: string, apiInstallationOptions: InstallOptions & CredentialConfigOptions, options?: {
|
|
266
|
-
onSuccess?: (
|
|
265
|
+
onSuccess?: (installationEvent: IntegrationInstallEvent) => void;
|
|
267
266
|
onError?: (error: unknown) => void;
|
|
268
267
|
}): void;
|
|
269
268
|
getFieldOptions(options: {
|
|
@@ -442,6 +441,7 @@ export type FilePickerOptions = {
|
|
|
442
441
|
googledrive?: {
|
|
443
442
|
viewMode?: google.picker.DocsViewMode;
|
|
444
443
|
includeFolders?: boolean;
|
|
444
|
+
enableSharedDrives?: boolean;
|
|
445
445
|
};
|
|
446
446
|
box?: {
|
|
447
447
|
container?: string;
|
package/package.json
CHANGED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import type ConnectSDK from './ConnectSDK';
|
|
2
|
-
import { ConnectInputValue, InstallFlowStage, StartOptions } from './types';
|
|
3
|
-
export declare class InstallFlow {
|
|
4
|
-
private readonly paragon;
|
|
5
|
-
private startOptions;
|
|
6
|
-
private integrationName;
|
|
7
|
-
private accountTypeValue;
|
|
8
|
-
private preOptionsValue;
|
|
9
|
-
private postOptionsValue;
|
|
10
|
-
private credentialId;
|
|
11
|
-
private hasFinishedInstruction;
|
|
12
|
-
constructor(paragon: ConnectSDK);
|
|
13
|
-
start(integrationName: string, startOptions?: StartOptions): void;
|
|
14
|
-
cancel(): Promise<void>;
|
|
15
|
-
private asyncStart;
|
|
16
|
-
private handleError;
|
|
17
|
-
private handleNext;
|
|
18
|
-
private handleComplete;
|
|
19
|
-
private getScheme;
|
|
20
|
-
private getIntegrationName;
|
|
21
|
-
private getSelectedAccountTypeOption;
|
|
22
|
-
private requiresAccountType;
|
|
23
|
-
private getIntegrationInstructionMetadata;
|
|
24
|
-
private getSalesforceInstructionMetadata;
|
|
25
|
-
private requiresInstruction;
|
|
26
|
-
private requiresPreOptions;
|
|
27
|
-
private requiresPostOptions;
|
|
28
|
-
private requiresOAuth;
|
|
29
|
-
/** Starts an OAuth authentication flow through a window Pop-up */
|
|
30
|
-
private handleOAuth;
|
|
31
|
-
setAccountType(accountType: string): Promise<void>;
|
|
32
|
-
setPreOptions(options: Record<string, ConnectInputValue>): Promise<void>;
|
|
33
|
-
setPostOptions(options: Record<string, ConnectInputValue>): Promise<void>;
|
|
34
|
-
setHasFinishedInstruction(): Promise<void>;
|
|
35
|
-
getAccountTypeValue(): string | null;
|
|
36
|
-
getPreOptionsValue(): Record<string, ConnectInputValue> | null;
|
|
37
|
-
getPostOptionsValue(): Record<string, ConnectInputValue> | null;
|
|
38
|
-
next(): InstallFlowStage;
|
|
39
|
-
}
|