@useparagon/connect 2.2.2-experimental.2 → 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 +4 -38
- package/dist/src/ConnectSDK.js +1 -1
- package/dist/src/InstallFlow.d.ts +39 -0
- package/dist/src/index.d.ts +3 -1
- package/dist/src/index.js +1 -1
- package/dist/src/types/action.d.ts +6 -1
- package/dist/src/types/connect.d.ts +29 -6
- package/dist/src/types/sdk.d.ts +4 -3
- package/package.json +1 -1
package/dist/src/ConnectSDK.d.ts
CHANGED
|
@@ -4,9 +4,10 @@ import { OauthCallbackResponse } from './entities/credential.interface';
|
|
|
4
4
|
import { IConnectIntegrationWithCredentialInfo, IntegrationMetadata } from './entities/integration.interface';
|
|
5
5
|
import { PersonaMeta } from './entities/persona.interface';
|
|
6
6
|
import { ExternalFilePicker } from './file-picker/types';
|
|
7
|
+
import { InstallFlow } from './InstallFlow';
|
|
7
8
|
import SDKEventEmitter from './SDKEventEmitter';
|
|
8
9
|
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,
|
|
10
|
+
import { AuthenticateOptions, AuthenticatedConnectUser, CompleteInstallOptions, ConnectInputValue, Props as ConnectModalProps, ConnectParams, ConnectUser, CreateConfigurationOptions, CredentialConfigOptions, DataType, DeleteConfigurationOptions, DisableWorkflowOptions, DynamicDefaultInput, DynamicFieldMappingLoaderType, DynamicFieldMappingOptionsResult, EnumInputValue, EventInfo, GetIntegrationAccountOptions, IConnectSDK, InstallIntegrationOptions, InstallOptions, IntegrationConfig, IntegrationConnectInput, IntegrationInstallEvent, KeyedSource, LoadCustomDropdownOptionsResult, ProxyRequestOptions, TriggerWorkflowRequest, UninstallOptions, UpdateConfigurationOptions, UpdateWorkflowStateResponse } from './types';
|
|
10
11
|
export declare const PARAGON_OVERFLOW_EMPTY_VALUE = "PARAGON_OVERFLOW_EMPTY_VALUE";
|
|
11
12
|
export { ExternalFilePicker };
|
|
12
13
|
export default class ConnectSDK extends SDKEventEmitter implements IConnectSDK {
|
|
@@ -133,9 +134,8 @@ export default class ConnectSDK extends SDKEventEmitter implements IConnectSDK {
|
|
|
133
134
|
private removeOptionDuplicates;
|
|
134
135
|
startOAuthFlow(action: string, apiInstallationOptions: InstallOptions & CredentialConfigOptions & {
|
|
135
136
|
endUserSuppliedValues?: Record<string, ConnectInputValue>;
|
|
136
|
-
userProvidedIntegrationConfig?: UserProvidedIntegrationConfig;
|
|
137
137
|
}, options?: {
|
|
138
|
-
onSuccess?: (
|
|
138
|
+
onSuccess?: (connectCredentialId: string) => void;
|
|
139
139
|
onError?: (error: unknown) => void;
|
|
140
140
|
oauthTimeout?: number;
|
|
141
141
|
}): void;
|
|
@@ -165,9 +165,7 @@ export default class ConnectSDK extends SDKEventEmitter implements IConnectSDK {
|
|
|
165
165
|
*/
|
|
166
166
|
_getIntegration(integrationId: string): IConnectIntegrationWithCredentialInfo | undefined;
|
|
167
167
|
getIntegrationBySlug(integrationName: string): IConnectIntegrationWithCredentialInfo;
|
|
168
|
-
_oauthCallback(oauthResponse: OauthCallbackResponse, credentialId?: string
|
|
169
|
-
installOptions?: InstallOptions;
|
|
170
|
-
}): Promise<IntegrationInstallEvent | undefined>;
|
|
168
|
+
_oauthCallback(oauthResponse: OauthCallbackResponse, credentialId?: string): Promise<void>;
|
|
171
169
|
_oauthErrorCallback(errorMessage: string | object, event?: MessageEvent): Promise<void>;
|
|
172
170
|
customDropdownOptionsLoaders: Record<string, (cursor?: string | undefined, search?: string | undefined) => LoadCustomDropdownOptionsResult>;
|
|
173
171
|
/**
|
|
@@ -389,35 +387,3 @@ export default class ConnectSDK extends SDKEventEmitter implements IConnectSDK {
|
|
|
389
387
|
search?: string;
|
|
390
388
|
}): Promise<DynamicFieldMappingOptionsResult>;
|
|
391
389
|
}
|
|
392
|
-
export declare class InstallFlow {
|
|
393
|
-
private readonly paragon;
|
|
394
|
-
private startOptions;
|
|
395
|
-
private integrationName;
|
|
396
|
-
private accountTypeValue;
|
|
397
|
-
private preOptionsValue;
|
|
398
|
-
private postOptionsValue;
|
|
399
|
-
private credentialId;
|
|
400
|
-
constructor(paragon: ConnectSDK);
|
|
401
|
-
start(integrationName: string, startOptions?: StartOptions): void;
|
|
402
|
-
cancel(): Promise<void>;
|
|
403
|
-
private getInstallOptions;
|
|
404
|
-
private asyncStart;
|
|
405
|
-
private handleError;
|
|
406
|
-
private handleNext;
|
|
407
|
-
private handleComplete;
|
|
408
|
-
private getScheme;
|
|
409
|
-
private getIntegrationName;
|
|
410
|
-
private getSelectedAccountTypeOption;
|
|
411
|
-
private requiresAccountType;
|
|
412
|
-
private requiresPreOptions;
|
|
413
|
-
private requiresPostOptions;
|
|
414
|
-
/** Starts an OAuth authentication flow through a window Pop-up */
|
|
415
|
-
private handleOAuth;
|
|
416
|
-
setAccountType(accountType: string): Promise<void>;
|
|
417
|
-
setPreOptions(options: Record<string, ConnectInputValue>): Promise<void>;
|
|
418
|
-
setPostOptions(options: Record<string, ConnectInputValue>): Promise<void>;
|
|
419
|
-
getAccountTypeValue(): string | null;
|
|
420
|
-
getPreOptionsValue(): Record<string, ConnectInputValue> | null;
|
|
421
|
-
getPostOptionsValue(): Record<string, ConnectInputValue> | null;
|
|
422
|
-
next(): InstallFlowStage;
|
|
423
|
-
}
|