@useparagon/connect 2.2.4-experimental-15311.1 → 2.2.4-experimental-15312.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.
|
@@ -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, LoadCustomDropdownOptionsResult } from './sdk';
|
|
8
|
+
import { CredentialConfigOptions, DynamicFieldMappingConfig, 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';
|
|
@@ -187,6 +187,21 @@ export type DynamicMappingOptions = {
|
|
|
187
187
|
defaultFields?: string[];
|
|
188
188
|
useBYOFieldMappingOption?: boolean;
|
|
189
189
|
};
|
|
190
|
+
export type FieldMappingConfig = DynamicMappingField[] | DynamicMappingOptions | DynamicFieldMappingConfig;
|
|
191
|
+
export type FieldMappingOptionResult = {
|
|
192
|
+
mappingKey: string;
|
|
193
|
+
source: 'shared' | 'workflow';
|
|
194
|
+
workflowId?: string;
|
|
195
|
+
} & ({
|
|
196
|
+
type: 'static-fields';
|
|
197
|
+
fields: DynamicMappingField[];
|
|
198
|
+
} | {
|
|
199
|
+
type: 'static-options';
|
|
200
|
+
config: DynamicMappingOptions;
|
|
201
|
+
} | {
|
|
202
|
+
type: 'dynamic';
|
|
203
|
+
config: DynamicFieldMappingConfig;
|
|
204
|
+
});
|
|
190
205
|
export type AuthenticatedConnectUser = {
|
|
191
206
|
authenticated: true;
|
|
192
207
|
token: string;
|
package/dist/src/types/sdk.d.ts
CHANGED
|
@@ -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, CustomDropdownField, CustomDropdownOptions, DisableWorkflowOptions, DynamicMappingField, DynamicMappingOptions, GetIntegrationAccountOptions, IntegrationWorkflowMeta, IntegrationWorkflowState, SerializedConnectInput, UninstallOptions } from '../types/connect';
|
|
10
|
+
import { AuthenticatedConnectUser, CustomDropdownField, CustomDropdownOptions, DisableWorkflowOptions, DynamicMappingField, DynamicMappingOptions, FieldMappingConfig, FieldMappingOptionResult, 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';
|
|
@@ -293,6 +293,8 @@ export interface IConnectSDK {
|
|
|
293
293
|
getDataSourceOptions(integrationName: string, action: string): Promise<DataSource | undefined>;
|
|
294
294
|
setCustomDropdownOptions(action: string, dropdowns: Record<string, CustomDropdownField[] | CustomDropdownOptions>): void;
|
|
295
295
|
getCustomDropdownOptions(action: string, fieldKey?: string): CustomDropdownOptionResult[];
|
|
296
|
+
setFieldMappingOptions(action: string, fieldMappings: Record<string, FieldMappingConfig>): void;
|
|
297
|
+
getFieldMappingOptions(action: string, mappingKey?: string): FieldMappingOptionResult[];
|
|
296
298
|
installFlow: InstallFlow;
|
|
297
299
|
}
|
|
298
300
|
/**
|
package/package.json
CHANGED