@useparagon/connect 2.2.4-experimental-17218.1 → 2.2.4-experimental.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.
@@ -5,7 +5,7 @@ import { PersonaMeta } from '../entities/persona.interface';
5
5
  import { AccountType, BooleanInput, ComboInput, CopyableButtonInput, CustomDropdownInput, DataSource, DynamicComboInput, DynamicEnumInput, EmailInput, FieldMapperInput, FileInput, IntegrationConnectInput, NumberInput, PasswordInput, PermissionInput, SidebarInputType, SwitchInput, URLInput, ValueTextInput } from './action';
6
6
  import { InstallFlowError } from './errors';
7
7
  import { OrConditions } from './resolvers';
8
- import { CredentialConfigOptions, IntegrationInstallEvent } from './sdk';
8
+ import { CredentialConfigOptions, IntegrationInstallEvent, LoadCustomDropdownOptionsResult } from './sdk';
9
9
  export { CredentialStatus } from '../entities/connectCredential.interface';
10
10
  export type { IntegrationMetadata } from '../entities/integration.interface';
11
11
  export * from './errors';
@@ -173,6 +173,9 @@ export type CustomDropdownField = {
173
173
  label: string;
174
174
  value: string;
175
175
  };
176
+ export type CustomDropdownOptions = {
177
+ loadOptions: (cursor: string | undefined, search: string | undefined) => LoadCustomDropdownOptionsResult;
178
+ };
176
179
  export type DynamicMappingField = {
177
180
  label: string;
178
181
  value: string;
@@ -7,7 +7,7 @@ import { IConnectIntegrationWithCredentialInfo, IntegrationMetadata } from '../e
7
7
  import { PersonaMeta } from '../entities/persona.interface';
8
8
  import { IConnectUserContext } from '../helpers/ConnectUserContext';
9
9
  import { ConnectSdkEnvironments } from '../server.types';
10
- import { AuthenticatedConnectUser, DisableWorkflowOptions, DynamicMappingField, DynamicMappingOptions, GetIntegrationAccountOptions, IntegrationWorkflowMeta, IntegrationWorkflowState, SerializedConnectInput, UninstallOptions } from '../types/connect';
10
+ import { AuthenticatedConnectUser, CustomDropdownField, CustomDropdownOptions, DisableWorkflowOptions, DynamicMappingField, DynamicMappingOptions, GetIntegrationAccountOptions, IntegrationWorkflowMeta, IntegrationWorkflowState, SerializedConnectInput, UninstallOptions } from '../types/connect';
11
11
  import { DataSource, DynamicDefaultInput, EnumInputValue } from './action';
12
12
  import { Props as ConnectModalProps } from './connectModal';
13
13
  import { DataType, KeyedSource } from './resolvers';
@@ -66,10 +66,7 @@ export type CompleteInstallOptions = {
66
66
  };
67
67
  };
68
68
  export type LoadCustomDropdownOptionsResult = Promise<{
69
- options: {
70
- label: string;
71
- value: string;
72
- }[];
69
+ options: CustomDropdownField[];
73
70
  nextPageCursor: string | null;
74
71
  }>;
75
72
  export type DynamicFieldMappingOptionsResult = {
@@ -271,6 +268,7 @@ export interface IConnectSDK {
271
268
  search?: string;
272
269
  cursor?: string | number | false;
273
270
  parameters?: KeyedSource<DataType.ANY>[];
271
+ selectedCredentialId?: string;
274
272
  }): Promise<{
275
273
  data: EnumInputValue[];
276
274
  nestedData: DynamicDefaultInput[];
@@ -372,10 +370,7 @@ export type UserProvidedIntegrationConfig = {
372
370
  };
373
371
  };
374
372
  export type DropdownOptions = {
375
- dropdowns?: Record<string, Array<{
376
- label: string;
377
- value: string;
378
- }>>;
373
+ dropdowns?: Record<string, CustomDropdownField[] | CustomDropdownOptions>;
379
374
  };
380
375
  export type ConnectParams = CallbackMap & UserProvidedIntegrationConfig & InstallOptions & CredentialConfigOptions & DropdownOptions & CredentialConfigOptions & {
381
376
  /**
@@ -461,7 +456,11 @@ export type FilePickerOptions = {
461
456
  };
462
457
  };
463
458
  export type FilePickerInitOptions = {
464
- developerKey: string;
459
+ /**
460
+ * Required for googledrive.
461
+ * @link https://docs.useparagon.com/resources/integrations/google-drive#using-the-google-drive-file-picker
462
+ */
463
+ developerKey?: string;
465
464
  appId?: string;
466
465
  folderId?: string;
467
466
  selectedCredentialId?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useparagon/connect",
3
- "version": "2.2.4-experimental-17218.1",
3
+ "version": "2.2.4-experimental.2",
4
4
  "description": "Embed integrations into your app with the Paragon SDK",
5
5
  "main": "dist/src/index.js",
6
6
  "types": "dist/src/index.d.ts",