@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.
@@ -1,6 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { AuthenticationScheme } from '../entities/credential.interface';
3
- import { CustomDropdownField, DynamicMappingField, DynamicMappingOptions, InstructionStage, SidebarInput } from './connect';
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 | InstructionStage | PreOptionsStage | OAuthStage | PostOptionsStage | DoneStage;
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.
@@ -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,6 +1,6 @@
1
1
  {
2
2
  "name": "@useparagon/connect",
3
- "version": "2.2.3-experimental.1",
3
+ "version": "2.2.3-experimental.2",
4
4
  "description": "Embed integrations into your app with the Paragon SDK",
5
5
  "main": "dist/src/index.js",
6
6
  "types": "dist/src/index.d.ts",
@@ -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
- }