@useparagon/connect 1.0.35-experimental.14 → 1.0.35-experimental.16
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { AuthenticationScheme } from '../entities/credential.interface';
|
|
3
|
-
import { CustomDropdownField, SidebarInput } from './connect';
|
|
3
|
+
import { CustomDropdownField, DynamicMappingField, DynamicMappingOptions, SidebarInput } from './connect';
|
|
4
4
|
import { DataType, KeyedSource, Source } from './resolvers';
|
|
5
5
|
export declare enum SidebarInputType {
|
|
6
6
|
Auth = "AUTH",
|
|
@@ -33,7 +33,8 @@ export declare enum SidebarInputType {
|
|
|
33
33
|
FieldMapper = "FIELD_MAPPER",
|
|
34
34
|
ComboInput = "COMBO_INPUT",
|
|
35
35
|
Password = "PASSWORD",
|
|
36
|
-
Switch = "SWITCH"
|
|
36
|
+
Switch = "SWITCH",
|
|
37
|
+
DynamicComboInput = "DYNAMIC_COMBO_INPUT"
|
|
37
38
|
}
|
|
38
39
|
interface BaseInput {
|
|
39
40
|
id: string;
|
|
@@ -99,6 +100,26 @@ export interface ComboInput extends BaseInput {
|
|
|
99
100
|
label: string;
|
|
100
101
|
}[];
|
|
101
102
|
}
|
|
103
|
+
export interface DynamicComboInput extends BaseInput {
|
|
104
|
+
type: SidebarInputType.DynamicComboInput;
|
|
105
|
+
source: DynamicComboInputDataSource;
|
|
106
|
+
useDynamicFields?: boolean;
|
|
107
|
+
}
|
|
108
|
+
export interface FieldMapperInput extends BaseInput {
|
|
109
|
+
type: SidebarInputType.FieldMapper;
|
|
110
|
+
source: FieldMapperDataSource;
|
|
111
|
+
useDynamicMapper?: boolean;
|
|
112
|
+
dynamicObjectName?: string;
|
|
113
|
+
dynamicObjectOptions?: DynamicMappingOptions | DynamicMappingField[];
|
|
114
|
+
/**
|
|
115
|
+
* Represents the array of field mappings that this input should be used for. For every field
|
|
116
|
+
* mapping included in this array, a nested input will be included that is backed by the
|
|
117
|
+
* `source.fieldSource`.
|
|
118
|
+
*/
|
|
119
|
+
savedFieldMappings: {
|
|
120
|
+
label: string;
|
|
121
|
+
}[];
|
|
122
|
+
}
|
|
102
123
|
export interface IntegrationConnectInput extends BaseInput {
|
|
103
124
|
type: SidebarInputType.ValueText | SidebarInputType.Password | SidebarInputType.DynamicEnum | SidebarInputType.ComboInput | SidebarInputType.Enum | SidebarInputType.Switch | SidebarInputType.ValueTextArea;
|
|
104
125
|
inputType?: string;
|
|
@@ -265,6 +286,14 @@ export type ComboInputDataSource = BasicDataSource & {
|
|
|
265
286
|
dependentInputSource: DynamicDataSource<(EnumSection | EnumInputValue)[]>;
|
|
266
287
|
fieldSource?: DynamicDataSource<(EnumSection | EnumInputValue)[]>;
|
|
267
288
|
};
|
|
289
|
+
export type DynamicComboInputDataSource = BasicDataSource & {
|
|
290
|
+
id: string;
|
|
291
|
+
type: DataSourceType.DYNAMIC_COMBO_INPUT;
|
|
292
|
+
mainInputSource: DynamicDataSource<(EnumSection | EnumInputValue)[]>;
|
|
293
|
+
dependentInputSource: DynamicDataSource<(EnumSection | EnumInputValue)[]>;
|
|
294
|
+
variableInputSource?: DynamicDataSource<(EnumSection | EnumInputValue)[]>;
|
|
295
|
+
hoverDisplayText: string;
|
|
296
|
+
};
|
|
268
297
|
type BaseActionStepParameters = {
|
|
269
298
|
actionType: string;
|
|
270
299
|
credentials: string[];
|
|
@@ -275,7 +304,8 @@ declare enum DataSourceType {
|
|
|
275
304
|
DYNAMIC = "DYNAMIC_DATA_SOURCE",
|
|
276
305
|
STATIC_ENUM = "STATIC_ENUM_DATA_SOURCE",
|
|
277
306
|
FIELD_MAPPER = "FIELD_MAPPER_DATA_SOURCE",
|
|
278
|
-
COMBO_INPUT = "COMBO_INPUT_DATA_SOURCE"
|
|
307
|
+
COMBO_INPUT = "COMBO_INPUT_DATA_SOURCE",
|
|
308
|
+
DYNAMIC_COMBO_INPUT = "DYNAMIC_COMBO_INPUT_DATA_SOURCE"
|
|
279
309
|
}
|
|
280
310
|
type ActionStepParameters = BaseActionStepParameters & {
|
|
281
311
|
intent: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ConnectCredentialProviderData, CredentialStatus, IConnectCredential } from '../entities/connectCredential.interface';
|
|
2
2
|
import { ConnectCredentialConfigMeta, IConnectCredentialConfig } from '../entities/connectCredentialConfig.interface';
|
|
3
3
|
import { PersonaMeta } from '../entities/persona.interface';
|
|
4
|
-
import { AccountType, BooleanInput, ComboInput, CustomDropdownInput, DataSource, DynamicEnumInput, EmailInput, IntegrationConnectInput, NumberInput, PasswordInput, SidebarInputType, URLInput, ValueTextInput } from './action';
|
|
4
|
+
import { AccountType, BooleanInput, ComboInput, CustomDropdownInput, DataSource, DynamicComboInput, DynamicEnumInput, EmailInput, FieldMapperInput, IntegrationConnectInput, NumberInput, PasswordInput, SidebarInputType, URLInput, ValueTextInput } from './action';
|
|
5
5
|
import { OrConditions } from './resolvers';
|
|
6
6
|
import { CredentialConfigOptions } from './sdk';
|
|
7
7
|
export interface SDKConnectCredentialConfig {
|
|
@@ -88,9 +88,9 @@ type IntegrationSharedMeta = {
|
|
|
88
88
|
*/
|
|
89
89
|
inputs?: SerializedConnectInput[];
|
|
90
90
|
};
|
|
91
|
-
declare const SupportedConnectInputTypes: readonly [SidebarInputType.ValueText, SidebarInputType.DynamicEnum, SidebarInputType.Enum, SidebarInputType.Number, SidebarInputType.Email, SidebarInputType.URL, SidebarInputType.FieldMapper, SidebarInputType.BooleanInput, SidebarInputType.ComboInput, SidebarInputType.Password, SidebarInputType.Switch, SidebarInputType.ValueTextArea, SidebarInputType.CustomDropdown];
|
|
91
|
+
declare const SupportedConnectInputTypes: readonly [SidebarInputType.ValueText, SidebarInputType.DynamicEnum, SidebarInputType.Enum, SidebarInputType.Number, SidebarInputType.Email, SidebarInputType.URL, SidebarInputType.FieldMapper, SidebarInputType.BooleanInput, SidebarInputType.ComboInput, SidebarInputType.Password, SidebarInputType.Switch, SidebarInputType.ValueTextArea, SidebarInputType.CustomDropdown, SidebarInputType.DynamicComboInput, SidebarInputType.FieldMapper];
|
|
92
92
|
export type SupportedConnectInputType = (typeof SupportedConnectInputTypes)[number];
|
|
93
|
-
export type SidebarInput = BooleanInput | ValueTextInput | NumberInput | EmailInput | URLInput | PasswordInput | CustomDropdownInput | DynamicEnumInput | ComboInput;
|
|
93
|
+
export type SidebarInput = BooleanInput | ValueTextInput | NumberInput | EmailInput | URLInput | PasswordInput | CustomDropdownInput | DynamicEnumInput | ComboInput | DynamicComboInput | FieldMapperInput;
|
|
94
94
|
type SupportedConnectInput<T extends SidebarInput = SidebarInput> = Extract<T, {
|
|
95
95
|
type: SupportedConnectInputType;
|
|
96
96
|
}>;
|
package/package.json
CHANGED