@useparagon/connect 2.2.9-experimental.1 → 2.3.0-experimental-18633.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.
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, UserProvidedIntegrationConfig } from './types';
|
|
9
|
+
import { AuthenticateOptions, AuthenticatedConnectUser, CompleteInstallOptions, ConnectInputValue, Props as ConnectModalProps, ConnectParams, ConnectUser, CreateConfigurationOptions, CredentialConfigOptions, CustomDropdownField, DataType, DeleteConfigurationOptions, DisableWorkflowOptions, DynamicDataSource, DynamicDefaultInput, DynamicFieldMappingLoaderType, DynamicFieldMappingOptionsResult, EnumInputValue, EventInfo, GetIntegrationAccountOptions, IConnectSDK, InputSources, InstallFlowStage, InstallIntegrationOptions, InstallOptions, IntegrationConfig, IntegrationConnectInput, IntegrationInstallEvent, KeyedSource, LoadCustomDropdownOptionsResult, ProxyRequestOptions, SerializedConnectInput, SetDataSourcesConfig, 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 {
|
|
@@ -51,6 +51,10 @@ export default class ConnectSDK extends SDKEventEmitter implements IConnectSDK {
|
|
|
51
51
|
* Dynamic field mapping loaders for handling dynamic object types and integration fields
|
|
52
52
|
*/
|
|
53
53
|
private dynamicFieldMappingLoaders;
|
|
54
|
+
private globalDropdownOptions;
|
|
55
|
+
private globalMapObjectFields;
|
|
56
|
+
private integrationSpecificDropdownOptions;
|
|
57
|
+
private integrationSpecificMapObjectFields;
|
|
54
58
|
installFlow: InstallFlow;
|
|
55
59
|
constructor(environmentsOrHost?: ConnectSdkEnvironments | string, flags?: {
|
|
56
60
|
skipBootstrapWithLastKnownState?: boolean;
|
|
@@ -188,6 +192,13 @@ export default class ConnectSDK extends SDKEventEmitter implements IConnectSDK {
|
|
|
188
192
|
_oauthErrorCallback(errorMessage: string | object, event?: MessageEvent): Promise<void>;
|
|
189
193
|
customDropdownOptionsLoaders: Record<string, (cursor?: string | undefined, search?: string | undefined) => LoadCustomDropdownOptionsResult>;
|
|
190
194
|
_loadCustomDropdownOptions(key: string, cursor?: string | undefined, search?: string | undefined): LoadCustomDropdownOptionsResult;
|
|
195
|
+
setDataSources(config: SetDataSourcesConfig): void;
|
|
196
|
+
private processDropdownSources;
|
|
197
|
+
private processMapObjectFieldSources;
|
|
198
|
+
resolveCustomDropdownSource(key: string | undefined, integrationName: string): CustomDropdownField[] | null;
|
|
199
|
+
private resolveMapObjectFieldSource;
|
|
200
|
+
private isDynamicFieldMappingConfig;
|
|
201
|
+
hasCustomDropdownLoader(key: string | undefined): boolean;
|
|
191
202
|
/**
|
|
192
203
|
* Send a Connect API request. Automatically handles authorization and errors.
|
|
193
204
|
*
|
|
@@ -384,9 +395,10 @@ export default class ConnectSDK extends SDKEventEmitter implements IConnectSDK {
|
|
|
384
395
|
* @param parameters - Optional array of parameters to be used in the request.
|
|
385
396
|
* @returns A promise that resolves with the field options or logs an error if the request fails.
|
|
386
397
|
*/
|
|
387
|
-
getFieldOptions({ integration, action, search, cursor, parameters, selectedCredentialId, }: {
|
|
398
|
+
getFieldOptions({ integration, action, source, search, cursor, parameters, selectedCredentialId, }: {
|
|
388
399
|
integration: string;
|
|
389
|
-
action
|
|
400
|
+
action?: string;
|
|
401
|
+
source?: DynamicDataSource<any>;
|
|
390
402
|
search?: string;
|
|
391
403
|
cursor?: string | number | false;
|
|
392
404
|
parameters?: KeyedSource<DataType.ANY>[];
|
|
@@ -397,6 +409,7 @@ export default class ConnectSDK extends SDKEventEmitter implements IConnectSDK {
|
|
|
397
409
|
nextPageCursor: string | null;
|
|
398
410
|
}>;
|
|
399
411
|
getDataSourceOptions(integrationName: string, action: string): Promise<import("./types").DataSource | undefined>;
|
|
412
|
+
getSourcesForInput(integrationName: string, action: string, input: SerializedConnectInput): InputSources | null;
|
|
400
413
|
getAccountTypeOptions(integrationName: string): import("./types").AccountType[];
|
|
401
414
|
getPreOptions(integrationName: string, accountTypeId?: string): IntegrationConnectInput[];
|
|
402
415
|
getPostOptions(integrationName: string): IntegrationConnectInput[];
|