@useparagon/connect 2.2.2-experimental.1 → 2.2.3-experimental.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 +2 -32
- package/dist/src/ConnectSDK.js +1 -1
- package/dist/src/InstallFlow.d.ts +39 -0
- package/dist/src/file-picker/integrations/googledrive.d.ts +0 -4
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.js +1 -1
- package/dist/src/types/action.d.ts +6 -1
- package/dist/src/types/connect.d.ts +27 -1
- package/dist/src/types/sdk.d.ts +2 -2
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { AuthenticationScheme } from '../entities/credential.interface';
|
|
3
|
-
import { CustomDropdownField, DynamicMappingField, DynamicMappingOptions, SidebarInput } from './connect';
|
|
3
|
+
import { CustomDropdownField, DynamicMappingField, DynamicMappingOptions, InstructionStage, SidebarInput } from './connect';
|
|
4
4
|
import { DataType, KeyedSource, Source } from './resolvers';
|
|
5
5
|
export declare enum SidebarInputType {
|
|
6
6
|
Auth = "AUTH",
|
|
@@ -399,4 +399,9 @@ 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
|
+
}>;
|
|
402
407
|
export {};
|
|
@@ -217,6 +217,7 @@ export type SDKIntegrationConfig = {
|
|
|
217
217
|
dataSources: {
|
|
218
218
|
[key: string]: DataSource;
|
|
219
219
|
};
|
|
220
|
+
allowedCredentialValues?: Record<string, any>;
|
|
220
221
|
};
|
|
221
222
|
/**
|
|
222
223
|
* The contents of the `integrations` field for an authenticated ConnectUser.
|
|
@@ -242,11 +243,32 @@ export declare const INFER_CONTENT_TYPE_FROM_CONNECT_OPTIONS = "auto";
|
|
|
242
243
|
export declare const SELECTED_CREDENTIAL_ID_HEADER = "X-Paragon-Credential";
|
|
243
244
|
export declare const SELECTED_CREDENTIAL_CONFIG_ID_HEADER = "X-Paragon-Configuration-Id";
|
|
244
245
|
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;
|
|
245
259
|
export type AccountTypeStage = {
|
|
246
260
|
stage: 'accountType';
|
|
247
261
|
options: AccountType[];
|
|
248
262
|
done: false;
|
|
249
263
|
};
|
|
264
|
+
export type InstructionStage = {
|
|
265
|
+
stage: 'instruction';
|
|
266
|
+
content: string;
|
|
267
|
+
ctas: CTA[];
|
|
268
|
+
finish?: FinishButton;
|
|
269
|
+
packageInstallUrl: string;
|
|
270
|
+
done: false;
|
|
271
|
+
};
|
|
250
272
|
export type PreOptionsStage = {
|
|
251
273
|
stage: 'preOptions';
|
|
252
274
|
options: IntegrationConnectInput[];
|
|
@@ -257,11 +279,15 @@ export type PostOptionsStage = {
|
|
|
257
279
|
options: IntegrationConnectInput[];
|
|
258
280
|
done: false;
|
|
259
281
|
};
|
|
282
|
+
export type OAuthStage = {
|
|
283
|
+
stage: 'oauth';
|
|
284
|
+
done: false;
|
|
285
|
+
};
|
|
260
286
|
export type DoneStage = {
|
|
261
287
|
stage: 'done';
|
|
262
288
|
done: true;
|
|
263
289
|
};
|
|
264
|
-
export type InstallFlowStage = AccountTypeStage | PreOptionsStage | PostOptionsStage | DoneStage;
|
|
290
|
+
export type InstallFlowStage = AccountTypeStage | InstructionStage | PreOptionsStage | OAuthStage | PostOptionsStage | DoneStage;
|
|
265
291
|
export type OnErrorContext = {
|
|
266
292
|
/**
|
|
267
293
|
* The stage of the install flow that failed.
|
package/dist/src/types/sdk.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/// <reference types="google.picker" />
|
|
2
|
-
import ConnectSDK
|
|
2
|
+
import ConnectSDK 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';
|
|
9
10
|
import { ConnectSdkEnvironments } from '../server.types';
|
|
10
11
|
import { AuthenticatedConnectUser, DisableWorkflowOptions, DynamicMappingField, DynamicMappingOptions, GetIntegrationAccountOptions, IntegrationWorkflowMeta, IntegrationWorkflowState, SerializedConnectInput, UninstallOptions } from '../types/connect';
|
|
11
12
|
import { DataSource, DynamicDefaultInput, EnumInputValue } from './action';
|
|
@@ -440,7 +441,6 @@ export type FilePickerOptions = {
|
|
|
440
441
|
googledrive?: {
|
|
441
442
|
viewMode?: google.picker.DocsViewMode;
|
|
442
443
|
includeFolders?: boolean;
|
|
443
|
-
enableSharedDrives?: boolean;
|
|
444
444
|
};
|
|
445
445
|
box?: {
|
|
446
446
|
container?: string;
|
package/package.json
CHANGED