@useparagon/connect 2.1.2-experimental.8 → 2.1.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.
@@ -6,7 +6,7 @@ import { PersonaMeta } from './entities/persona.interface';
6
6
  import { ExternalFilePicker } from './file-picker/types';
7
7
  import SDKEventEmitter from './SDKEventEmitter';
8
8
  import { ConnectSdkEnvironments } from './server.types';
9
- import { AuthenticateOptions, AuthenticatedConnectUser, CompleteInstallOptions, ConnectInputValue, Props as ConnectModalProps, ConnectParams, ConnectUser, CreateConfigurationOptions, CredentialConfigOptions, DataType, DeleteConfigurationOptions, DisableWorkflowOptions, DynamicDefaultInput, DynamicFieldMappingLoaderType, DynamicFieldMappingOptionsResult, EnumInputValue, EventInfo, GetIntegrationAccountOptions, IConnectSDK, InstallFlowStage, InstallIntegrationOptions, InstallOptions, IntegrationConfig, IntegrationConnectInput, IntegrationInstallEvent, KeyedSource, LoadCustomDropdownOptionsResult, StartOptions, TriggerWorkflowRequest, UninstallOptions, UpdateConfigurationOptions, UpdateWorkflowStateResponse } from './types';
9
+ import { AuthenticateOptions, AuthenticatedConnectUser, CompleteInstallOptions, ConnectInputValue, Props as ConnectModalProps, ConnectParams, ConnectUser, CreateConfigurationOptions, CredentialConfigOptions, DataType, DeleteConfigurationOptions, DisableWorkflowOptions, DynamicDefaultInput, DynamicFieldMappingLoaderType, DynamicFieldMappingOptionsResult, EnumInputValue, EventInfo, GetIntegrationAccountOptions, IConnectSDK, InstallFlowStage, InstallIntegrationOptions, InstallOptions, IntegrationConfig, IntegrationConnectInput, IntegrationInstallEvent, KeyedSource, LoadCustomDropdownOptionsResult, ProxyRequestOptions, StartOptions, TriggerWorkflowRequest, UninstallOptions, UpdateConfigurationOptions, UpdateWorkflowStateResponse } from './types';
10
10
  export declare const PARAGON_OVERFLOW_EMPTY_VALUE = "PARAGON_OVERFLOW_EMPTY_VALUE";
11
11
  export { ExternalFilePicker };
12
12
  export default class ConnectSDK extends SDKEventEmitter implements IConnectSDK {
@@ -80,6 +80,11 @@ export default class ConnectSDK extends SDKEventEmitter implements IConnectSDK {
80
80
  * @returns boolean value
81
81
  */
82
82
  private isAlreadyInstalled;
83
+ /**
84
+ * Checks if an integration has the given credential or a default credential if none is provided.
85
+ * Installation status will be not be considered.
86
+ */
87
+ private hasCredential;
83
88
  private bootstrapSDKState;
84
89
  setModalState(statePartial: Partial<ConnectModalProps>): void;
85
90
  /**
@@ -186,12 +191,7 @@ export default class ConnectSDK extends SDKEventEmitter implements IConnectSDK {
186
191
  * @param init
187
192
  * @returns api request response
188
193
  */
189
- request<TResponse>(action: string, path: string, init: {
190
- selectedCredentialId?: string;
191
- method: RequestInit['method'];
192
- body: RequestInit['body'] | object;
193
- headers: RequestInit['headers'];
194
- }): Promise<TResponse | undefined>;
194
+ request<TResponse>(action: string, path: string, init: ProxyRequestOptions): Promise<TResponse | undefined>;
195
195
  event(name: string, payload: Record<string, unknown>, options?: CredentialConfigOptions): Promise<void>;
196
196
  /**
197
197
  * @summary this will be called to close the modal
@@ -388,6 +388,7 @@ export declare class InstallFlow {
388
388
  private credentialId;
389
389
  constructor(paragon: ConnectSDK);
390
390
  start(integrationName: string, startOptions?: StartOptions): void;
391
+ cancel(): Promise<void>;
391
392
  private asyncStart;
392
393
  private handleError;
393
394
  private handleNext;