@useparagon/connect 2.2.8-experimental-18633.1 → 2.2.8-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, InputSources, InstallFlowStage, InstallIntegrationOptions, InstallOptions, IntegrationConfig, IntegrationConnectInput, IntegrationInstallEvent, KeyedSource, LoadCustomDropdownOptionsResult, ProxyRequestOptions, SerializedConnectInput, 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;
|
|
@@ -179,6 +183,13 @@ export default class ConnectSDK extends SDKEventEmitter implements IConnectSDK {
|
|
|
179
183
|
* Display the Paragon Connect modal
|
|
180
184
|
*/
|
|
181
185
|
_loadCustomDropdownOptions(key: string, cursor?: string | undefined, search?: string | undefined): LoadCustomDropdownOptionsResult;
|
|
186
|
+
setDataSources(config: SetDataSourcesConfig): void;
|
|
187
|
+
private processDropdownSources;
|
|
188
|
+
private processMapObjectFieldSources;
|
|
189
|
+
resolveCustomDropdownSource(key: string | undefined, integrationName: string): CustomDropdownField[] | null;
|
|
190
|
+
private resolveMapObjectFieldSource;
|
|
191
|
+
private isDynamicFieldMappingConfig;
|
|
192
|
+
hasCustomDropdownLoader(key: string | undefined): boolean;
|
|
182
193
|
/**
|
|
183
194
|
* Send a Connect API request. Automatically handles authorization and errors.
|
|
184
195
|
*
|
|
@@ -254,8 +265,12 @@ export default class ConnectSDK extends SDKEventEmitter implements IConnectSDK {
|
|
|
254
265
|
private getIntegrationForWorkflow;
|
|
255
266
|
private updateLocalState;
|
|
256
267
|
/**
|
|
257
|
-
*
|
|
258
|
-
|
|
268
|
+
* Sends user metadata to the API via PATCH /sdk/me (request body supports non-ASCII).
|
|
269
|
+
*/
|
|
270
|
+
private patchUserMetadata;
|
|
271
|
+
/**
|
|
272
|
+
* Gets the user data from api `/sdk/me`.
|
|
273
|
+
* User metadata is set via PATCH after this succeeds when provided in authenticate (see updateLocalState).
|
|
259
274
|
*/
|
|
260
275
|
private fetchUserData;
|
|
261
276
|
/**
|
|
@@ -371,9 +386,10 @@ export default class ConnectSDK extends SDKEventEmitter implements IConnectSDK {
|
|
|
371
386
|
* @param parameters - Optional array of parameters to be used in the request.
|
|
372
387
|
* @returns A promise that resolves with the field options or logs an error if the request fails.
|
|
373
388
|
*/
|
|
374
|
-
getFieldOptions({ integration, action, search, cursor, parameters, selectedCredentialId, }: {
|
|
389
|
+
getFieldOptions({ integration, action, source, search, cursor, parameters, selectedCredentialId, }: {
|
|
375
390
|
integration: string;
|
|
376
|
-
action
|
|
391
|
+
action?: string;
|
|
392
|
+
source?: DynamicDataSource<any>;
|
|
377
393
|
search?: string;
|
|
378
394
|
cursor?: string | number | false;
|
|
379
395
|
parameters?: KeyedSource<DataType.ANY>[];
|