@useparagon/connect 2.2.3-experimental.2 → 2.2.3-experimental.3
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 +14 -3
- package/dist/src/ConnectSDK.js +1 -1
- package/dist/src/entities/integration.interface.d.ts +4 -0
- package/dist/src/file-picker/integrations/googledrive.d.ts +4 -0
- package/dist/src/index.js +1 -1
- package/dist/src/types/action.d.ts +2 -1
- package/dist/src/types/connect.d.ts +37 -3
- package/dist/src/types/sdk.d.ts +4 -2
- package/dist/src/utils/dedent.d.ts +1 -0
- package/package.json +1 -1
package/dist/src/ConnectSDK.d.ts
CHANGED
|
@@ -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, ProxyRequestOptions, 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, UserProvidedIntegrationConfig } 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 {
|
|
@@ -56,6 +56,7 @@ export default class ConnectSDK extends SDKEventEmitter implements IConnectSDK {
|
|
|
56
56
|
skipBootstrapWithLastKnownState?: boolean;
|
|
57
57
|
});
|
|
58
58
|
setHeadless(headless: boolean): void;
|
|
59
|
+
getAssetUrl(name: string): string;
|
|
59
60
|
/**
|
|
60
61
|
* post message handler
|
|
61
62
|
* @param event
|
|
@@ -133,8 +134,9 @@ 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>;
|
|
137
|
+
userProvidedIntegrationConfig?: UserProvidedIntegrationConfig;
|
|
136
138
|
}, options?: {
|
|
137
|
-
onSuccess?: (
|
|
139
|
+
onSuccess?: (installationEvent: IntegrationInstallEvent) => void;
|
|
138
140
|
onError?: (error: unknown) => void;
|
|
139
141
|
oauthTimeout?: number;
|
|
140
142
|
}): void;
|
|
@@ -164,7 +166,9 @@ export default class ConnectSDK extends SDKEventEmitter implements IConnectSDK {
|
|
|
164
166
|
*/
|
|
165
167
|
_getIntegration(integrationId: string): IConnectIntegrationWithCredentialInfo | undefined;
|
|
166
168
|
getIntegrationBySlug(integrationName: string): IConnectIntegrationWithCredentialInfo;
|
|
167
|
-
_oauthCallback(oauthResponse: OauthCallbackResponse, credentialId?: string
|
|
169
|
+
_oauthCallback(oauthResponse: OauthCallbackResponse, credentialId?: string, options?: {
|
|
170
|
+
installOptions?: InstallOptions;
|
|
171
|
+
}): Promise<IntegrationInstallEvent | undefined>;
|
|
168
172
|
_oauthErrorCallback(errorMessage: string | object, event?: MessageEvent): Promise<void>;
|
|
169
173
|
customDropdownOptionsLoaders: Record<string, (cursor?: string | undefined, search?: string | undefined) => LoadCustomDropdownOptionsResult>;
|
|
170
174
|
/**
|
|
@@ -394,9 +398,11 @@ export declare class InstallFlow {
|
|
|
394
398
|
private preOptionsValue;
|
|
395
399
|
private postOptionsValue;
|
|
396
400
|
private credentialId;
|
|
401
|
+
private hasFinishedInstruction;
|
|
397
402
|
constructor(paragon: ConnectSDK);
|
|
398
403
|
start(integrationName: string, startOptions?: StartOptions): void;
|
|
399
404
|
cancel(): Promise<void>;
|
|
405
|
+
private getInstallOptions;
|
|
400
406
|
private asyncStart;
|
|
401
407
|
private handleError;
|
|
402
408
|
private handleNext;
|
|
@@ -405,13 +411,18 @@ export declare class InstallFlow {
|
|
|
405
411
|
private getIntegrationName;
|
|
406
412
|
private getSelectedAccountTypeOption;
|
|
407
413
|
private requiresAccountType;
|
|
414
|
+
private getIntegrationInstructionMetadata;
|
|
415
|
+
private getSalesforceInstructionMetadata;
|
|
416
|
+
private requiresInstruction;
|
|
408
417
|
private requiresPreOptions;
|
|
409
418
|
private requiresPostOptions;
|
|
419
|
+
private requiresOAuth;
|
|
410
420
|
/** Starts an OAuth authentication flow through a window Pop-up */
|
|
411
421
|
private handleOAuth;
|
|
412
422
|
setAccountType(accountType: string): Promise<void>;
|
|
413
423
|
setPreOptions(options: Record<string, ConnectInputValue>): Promise<void>;
|
|
414
424
|
setPostOptions(options: Record<string, ConnectInputValue>): Promise<void>;
|
|
425
|
+
private setHasFinishedInstruction;
|
|
415
426
|
getAccountTypeValue(): string | null;
|
|
416
427
|
getPreOptionsValue(): Record<string, ConnectInputValue> | null;
|
|
417
428
|
getPostOptionsValue(): Record<string, ConnectInputValue> | null;
|