@useparagon/connect 2.3.2-experimental.1 → 2.4.0-experimental-19855.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.
@@ -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, 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';
9
+ import { AuthenticateOptions, AuthenticatedConnectUser, CompleteInstallOptions, ConditionalSource, ConnectInputValue, Props as ConnectModalProps, ConnectParams, ConnectUser, CreateConfigurationOptions, CredentialConfigOptions, CustomDropdownField, DataType, DeleteConfigurationOptions, DisableWorkflowOptions, DynamicDataSource, DynamicDefaultInput, DynamicFieldMappingLoaderType, DynamicFieldMappingOptionsResult, EnumInputValue, EnumSection, EventInfo, GetIntegrationAccountOptions, GetTriggerTypesResponse, IConnectSDK, InputSources, InstallFlowStage, InstallIntegrationOptions, InstallOptions, IntegrationConfig, IntegrationConnectInput, IntegrationInstallEvent, IntentInputKeyConfig, KeyedSource, LoadCustomDropdownOptionsResult, ProxyRequestOptions, SerializedConnectInput, SetDataSourcesConfig, SingleSource, 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 {
@@ -220,8 +220,9 @@ export default class ConnectSDK extends SDKEventEmitter implements IConnectSDK {
220
220
  * @param init
221
221
  * @returns api request response
222
222
  */
223
- request<TResponse>(action: string, path: string, init?: ProxyRequestOptions): Promise<TResponse | undefined>;
223
+ request<TResponse>(action: string, path: string, init: ProxyRequestOptions): Promise<TResponse | undefined>;
224
224
  event(name: string, payload: Record<string, unknown>, options?: CredentialConfigOptions): Promise<void>;
225
+ getTriggers(action: string, credentialOptions?: Pick<CredentialConfigOptions, 'selectedCredentialId'>): Promise<GetTriggerTypesResponse>;
225
226
  /**
226
227
  * @summary this will be called to close the modal
227
228
  * @param forceClose is set when modal is closed by cross btn
@@ -404,12 +405,21 @@ export default class ConnectSDK extends SDKEventEmitter implements IConnectSDK {
404
405
  parameters?: KeyedSource<DataType.ANY>[];
405
406
  selectedCredentialId?: string;
406
407
  }): Promise<{
407
- data: EnumInputValue<any>[];
408
+ data: EnumInputValue<any>[] | EnumSection<any>[];
408
409
  nestedData: DynamicDefaultInput[];
409
410
  nextPageCursor: string | null;
410
411
  }>;
411
412
  getDataSourceOptions(integrationName: string, action: string): Promise<import("./types").DataSource | undefined>;
412
413
  getSourcesForInput(integrationName: string, input: SerializedConnectInput): InputSources | null;
414
+ /**
415
+ * Resolves an `IntentInputKeyConfig` (used by trigger parameters) into an
416
+ * `InputSources` descriptor.
417
+ *
418
+ * Returns `SingleSource` (dynamic or static) when the input has options to
419
+ * resolve, or `null` for plain inputs (text, boolean, number, etc.) that the
420
+ * consumer renders directly from `input.type`.
421
+ */
422
+ getSourcesForActionInput(input: IntentInputKeyConfig): SingleSource | ConditionalSource | null;
413
423
  getAccountTypeOptions(integrationName: string): import("./types").AccountType[];
414
424
  getPreOptions(integrationName: string, accountTypeId?: string): IntegrationConnectInput[];
415
425
  getPostOptions(integrationName: string): IntegrationConnectInput[];