@useparagon/connect 2.2.3-experimental-16047.2 → 2.2.3-experimental-16047.4
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 +45 -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/action.d.ts +0 -4
- package/dist/src/types/connect.d.ts +5 -2
- package/dist/src/types/sdk.d.ts +5 -4
- package/dist/src/utils/dedent.d.ts +1 -0
- package/package.json +1 -1
- package/dist/src/InstallFlow.d.ts +0 -38
|
@@ -400,8 +400,4 @@ export type AccountType = {
|
|
|
400
400
|
skipPostOAuthInputs?: boolean;
|
|
401
401
|
};
|
|
402
402
|
export type InstructionMetadata = Pick<InstructionStage, 'content' | 'ctas' | 'finish' | 'packageInstallUrl'>;
|
|
403
|
-
export declare const INTEGRATION_INSTRUCTION_METADATA: Record<string, InstructionMetadata | {
|
|
404
|
-
default?: InstructionMetadata;
|
|
405
|
-
accountTypes?: Record<string, InstructionMetadata>;
|
|
406
|
-
}>;
|
|
407
403
|
export {};
|
|
@@ -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: {
|
|
@@ -279,6 +278,7 @@ export interface IConnectSDK {
|
|
|
279
278
|
}>;
|
|
280
279
|
getDataSourceOptions(integrationName: string, action: string): Promise<DataSource | undefined>;
|
|
281
280
|
installFlow: InstallFlow;
|
|
281
|
+
getAssetUrl(name: string): string;
|
|
282
282
|
}
|
|
283
283
|
/**
|
|
284
284
|
* sdk install options
|
|
@@ -441,6 +441,7 @@ export type FilePickerOptions = {
|
|
|
441
441
|
googledrive?: {
|
|
442
442
|
viewMode?: google.picker.DocsViewMode;
|
|
443
443
|
includeFolders?: boolean;
|
|
444
|
+
enableSharedDrives?: boolean;
|
|
444
445
|
};
|
|
445
446
|
box?: {
|
|
446
447
|
container?: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function dedent(str: string): string;
|
package/package.json
CHANGED
|
@@ -1,38 +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 requiresInstruction;
|
|
25
|
-
private requiresPreOptions;
|
|
26
|
-
private requiresPostOptions;
|
|
27
|
-
private requiresOAuth;
|
|
28
|
-
/** Starts an OAuth authentication flow through a window Pop-up */
|
|
29
|
-
private handleOAuth;
|
|
30
|
-
setAccountType(accountType: string): Promise<void>;
|
|
31
|
-
setPreOptions(options: Record<string, ConnectInputValue>): Promise<void>;
|
|
32
|
-
setPostOptions(options: Record<string, ConnectInputValue>): Promise<void>;
|
|
33
|
-
setHasFinishedInstruction(): Promise<void>;
|
|
34
|
-
getAccountTypeValue(): string | null;
|
|
35
|
-
getPreOptionsValue(): Record<string, ConnectInputValue> | null;
|
|
36
|
-
getPostOptionsValue(): Record<string, ConnectInputValue> | null;
|
|
37
|
-
next(): InstallFlowStage;
|
|
38
|
-
}
|