@useparagon/connect 2.2.3-experimental.1 → 2.2.3-experimental.2
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 +32 -2
- package/dist/src/ConnectSDK.js +1 -1
- package/dist/src/entities/integration.interface.d.ts +0 -4
- package/dist/src/index.d.ts +0 -2
- package/dist/src/index.js +1 -1
- package/dist/src/types/action.d.ts +1 -6
- package/dist/src/types/connect.d.ts +1 -27
- package/dist/src/types/sdk.d.ts +1 -2
- package/package.json +1 -1
- package/dist/src/InstallFlow.d.ts +0 -39
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { AuthenticationScheme } from '../entities/credential.interface';
|
|
3
|
-
import { CustomDropdownField, DynamicMappingField, DynamicMappingOptions,
|
|
3
|
+
import { CustomDropdownField, DynamicMappingField, DynamicMappingOptions, SidebarInput } from './connect';
|
|
4
4
|
import { DataType, KeyedSource, Source } from './resolvers';
|
|
5
5
|
export declare enum SidebarInputType {
|
|
6
6
|
Auth = "AUTH",
|
|
@@ -399,9 +399,4 @@ export type AccountType = {
|
|
|
399
399
|
*/
|
|
400
400
|
skipPostOAuthInputs?: boolean;
|
|
401
401
|
};
|
|
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
402
|
export {};
|
|
@@ -217,7 +217,6 @@ export type SDKIntegrationConfig = {
|
|
|
217
217
|
dataSources: {
|
|
218
218
|
[key: string]: DataSource;
|
|
219
219
|
};
|
|
220
|
-
allowedCredentialValues?: Record<string, any>;
|
|
221
220
|
};
|
|
222
221
|
/**
|
|
223
222
|
* The contents of the `integrations` field for an authenticated ConnectUser.
|
|
@@ -243,32 +242,11 @@ export declare const INFER_CONTENT_TYPE_FROM_CONNECT_OPTIONS = "auto";
|
|
|
243
242
|
export declare const SELECTED_CREDENTIAL_ID_HEADER = "X-Paragon-Credential";
|
|
244
243
|
export declare const SELECTED_CREDENTIAL_CONFIG_ID_HEADER = "X-Paragon-Configuration-Id";
|
|
245
244
|
export declare const SDK_VERSION_HEADER = "X-Paragon-SDK-Version";
|
|
246
|
-
export type Link = {
|
|
247
|
-
label: string;
|
|
248
|
-
type: 'link';
|
|
249
|
-
};
|
|
250
|
-
export type FinishButton = {
|
|
251
|
-
type: 'finishButton';
|
|
252
|
-
label: string;
|
|
253
|
-
};
|
|
254
|
-
export type CopyButton = {
|
|
255
|
-
label: string;
|
|
256
|
-
type: 'copyButton';
|
|
257
|
-
};
|
|
258
|
-
export type CTA = Link | CopyButton;
|
|
259
245
|
export type AccountTypeStage = {
|
|
260
246
|
stage: 'accountType';
|
|
261
247
|
options: AccountType[];
|
|
262
248
|
done: false;
|
|
263
249
|
};
|
|
264
|
-
export type InstructionStage = {
|
|
265
|
-
stage: 'instruction';
|
|
266
|
-
content: string;
|
|
267
|
-
ctas: CTA[];
|
|
268
|
-
finish?: FinishButton;
|
|
269
|
-
packageInstallUrl: string;
|
|
270
|
-
done: false;
|
|
271
|
-
};
|
|
272
250
|
export type PreOptionsStage = {
|
|
273
251
|
stage: 'preOptions';
|
|
274
252
|
options: IntegrationConnectInput[];
|
|
@@ -279,15 +257,11 @@ export type PostOptionsStage = {
|
|
|
279
257
|
options: IntegrationConnectInput[];
|
|
280
258
|
done: false;
|
|
281
259
|
};
|
|
282
|
-
export type OAuthStage = {
|
|
283
|
-
stage: 'oauth';
|
|
284
|
-
done: false;
|
|
285
|
-
};
|
|
286
260
|
export type DoneStage = {
|
|
287
261
|
stage: 'done';
|
|
288
262
|
done: true;
|
|
289
263
|
};
|
|
290
|
-
export type InstallFlowStage = AccountTypeStage |
|
|
264
|
+
export type InstallFlowStage = AccountTypeStage | PreOptionsStage | PostOptionsStage | DoneStage;
|
|
291
265
|
export type OnErrorContext = {
|
|
292
266
|
/**
|
|
293
267
|
* The stage of the install flow that failed.
|
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';
|
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 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
|
-
startOAuth(): Promise<void>;
|
|
33
|
-
setPostOptions(options: Record<string, ConnectInputValue>): Promise<void>;
|
|
34
|
-
setHasFinishedInstruction(): void;
|
|
35
|
-
getAccountTypeValue(): string | null;
|
|
36
|
-
getPreOptionsValue(): Record<string, ConnectInputValue> | null;
|
|
37
|
-
getPostOptionsValue(): Record<string, ConnectInputValue> | null;
|
|
38
|
-
next(): InstallFlowStage;
|
|
39
|
-
}
|