@useparagon/connect 1.0.35-experimental.6 → 1.0.35-experimental.8
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 +1 -56
- package/dist/src/ConnectSDK.js +1 -1
- package/dist/src/entities/integration.interface.d.ts +0 -4
- package/dist/src/index.js +1 -1
- package/dist/src/types/action.d.ts +1 -27
- package/dist/src/types/connect.d.ts +7 -15
- package/dist/src/types/sdk.d.ts +1 -31
- package/package.json +1 -1
|
@@ -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,
|
|
4
|
+
import { AccountType, DataSource, IntegrationConnectInput, SidebarInputType } from './action';
|
|
5
5
|
import { OrConditions } from './resolvers';
|
|
6
6
|
import { CredentialConfigOptions } from './sdk';
|
|
7
7
|
export interface SDKConnectCredentialConfig {
|
|
@@ -17,7 +17,7 @@ export interface SDKConnectCredentialConfig {
|
|
|
17
17
|
*/
|
|
18
18
|
configuredWorkflows?: IntegrationWorkflowStateMap;
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
type ConnectInputValue = string | number | boolean | FieldMappingValue | ComboInputValue | undefined;
|
|
21
21
|
type FieldMappingValue = {
|
|
22
22
|
objectMapping?: string;
|
|
23
23
|
fieldMappings?: {
|
|
@@ -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
|
|
92
|
-
|
|
93
|
-
export type SidebarInput =
|
|
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];
|
|
92
|
+
type SupportedConnectInputType = (typeof SupportedConnectInputTypes)[number];
|
|
93
|
+
export type SidebarInput = IntegrationConnectInput;
|
|
94
94
|
type SupportedConnectInput<T extends SidebarInput = SidebarInput> = Extract<T, {
|
|
95
95
|
type: SupportedConnectInputType;
|
|
96
96
|
}>;
|
|
@@ -98,7 +98,7 @@ type SupportedConnectInput<T extends SidebarInput = SidebarInput> = Extract<T, {
|
|
|
98
98
|
* A SerializedConnectInput is one that excludes the properties of a DynamicDataSource, which are
|
|
99
99
|
* loaded in at runtime rather than saved in the DB.
|
|
100
100
|
*/
|
|
101
|
-
|
|
101
|
+
type SerializedConnectInput<TInputType extends SupportedConnectInputType = SupportedConnectInputType> = {
|
|
102
102
|
[T in SupportedConnectInputType]: Extract<SupportedConnectInput, {
|
|
103
103
|
type: T;
|
|
104
104
|
}> extends {
|
|
@@ -125,15 +125,11 @@ export type SerializedConnectInput<TInputType extends SupportedConnectInputType
|
|
|
125
125
|
type IntegrationWorkflowMetaMap = {
|
|
126
126
|
[id: string]: IntegrationWorkflowMeta;
|
|
127
127
|
};
|
|
128
|
-
|
|
128
|
+
type IntegrationWorkflowMeta = {
|
|
129
129
|
/**
|
|
130
130
|
* The ID of the WorkflowEntity.
|
|
131
131
|
*/
|
|
132
132
|
id: string;
|
|
133
|
-
/**
|
|
134
|
-
* The description of the WorkflowEntity.
|
|
135
|
-
*/
|
|
136
|
-
description?: string;
|
|
137
133
|
/**
|
|
138
134
|
* A longer-form description for the Workflow's functionality. Acts as a "subtitle" to the
|
|
139
135
|
* WorkflowEntity's `description` property.
|
|
@@ -164,10 +160,6 @@ export type IntegrationWorkflowMeta = {
|
|
|
164
160
|
*/
|
|
165
161
|
permissions?: OrConditions;
|
|
166
162
|
};
|
|
167
|
-
export type CustomDropdownField = {
|
|
168
|
-
label: string;
|
|
169
|
-
value: string;
|
|
170
|
-
};
|
|
171
163
|
export type DynamicMappingField = {
|
|
172
164
|
label: string;
|
|
173
165
|
value: string;
|
package/dist/src/types/sdk.d.ts
CHANGED
|
@@ -7,9 +7,8 @@ import { IConnectIntegrationWithCredentialInfo, IIntegrationMetadata } from '../
|
|
|
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,
|
|
10
|
+
import { AuthenticatedConnectUser, DisableWorkflowOptions, DynamicMappingField, DynamicMappingOptions, GetIntegrationAccountOptions, IntegrationWorkflowState, UninstallOptions } from '../types/connect';
|
|
11
11
|
import { Props as ConnectModalProps } from './connectModal';
|
|
12
|
-
import { DataType, KeyedSource } from './resolvers';
|
|
13
12
|
export type ConnectUser = {
|
|
14
13
|
authenticated: false;
|
|
15
14
|
} | AuthenticatedConnectUser;
|
|
@@ -66,9 +65,6 @@ export type LoadCustomDropdownOptionsResult = Promise<{
|
|
|
66
65
|
}[];
|
|
67
66
|
nextPageCursor: string | null;
|
|
68
67
|
}>;
|
|
69
|
-
export type ConnectResult = {
|
|
70
|
-
output: any;
|
|
71
|
-
};
|
|
72
68
|
export interface IConnectSDK {
|
|
73
69
|
authenticate(projectId: string, token: string, options?: AuthenticateOptions): Promise<void>;
|
|
74
70
|
connect(action: string, options: ConnectParams): void;
|
|
@@ -205,17 +201,6 @@ export interface IConnectSDK {
|
|
|
205
201
|
*/
|
|
206
202
|
destroyConfiguration(params: DeleteConfigurationOptions): Promise<void>;
|
|
207
203
|
updateConfiguration(dto: UpdateConfigurationOptions): Promise<IConnectCredentialConfig>;
|
|
208
|
-
getIntegrationConfig(integration: string): IntegrationConfig;
|
|
209
|
-
updateIntegrationUserSettings(integration: string, userSettingsUpdate: Record<string, any>, settings?: CredentialConfigOptions): Promise<{
|
|
210
|
-
userState: AuthenticatedConnectUser;
|
|
211
|
-
errors: string[];
|
|
212
|
-
}>;
|
|
213
|
-
updateWorkflowUserSettings(integration: string, workflowId: string, userSettingsUpdate: Record<string, any>, settings?: CredentialConfigOptions): Promise<{
|
|
214
|
-
userState: AuthenticatedConnectUser;
|
|
215
|
-
errors: string[];
|
|
216
|
-
}>;
|
|
217
|
-
updateWorkflowState(workflowStateUpdate: Record<string, boolean>, options?: CredentialConfigOptions): Promise<UpdateWorkflowStateResponse>;
|
|
218
|
-
getFieldOptions(integration: string, action: string, search?: string, cursor?: string | number | false, parameters?: KeyedSource<DataType.ANY>[]): Promise<ConnectResult | undefined>;
|
|
219
204
|
}
|
|
220
205
|
/**
|
|
221
206
|
* sdk install options
|
|
@@ -383,19 +368,4 @@ export interface ExternalFilePickerConstruct {
|
|
|
383
368
|
new (action: string, options: FilePickerOptions): IFilePicker;
|
|
384
369
|
(action: string, options: FilePickerOptions): IFilePicker;
|
|
385
370
|
}
|
|
386
|
-
export type IntegrationConfig = {
|
|
387
|
-
shortDescription?: string;
|
|
388
|
-
longDescription?: string;
|
|
389
|
-
availableUserSettings?: SerializedConnectInput[];
|
|
390
|
-
availableWorkflows: Omit<IntegrationWorkflowMeta, 'order' | 'permissions'>[];
|
|
391
|
-
hiddenWorkflows: Omit<IntegrationWorkflowMeta, 'order' | 'permissions'>[];
|
|
392
|
-
};
|
|
393
|
-
export type UpdateWorkflowStateError = {
|
|
394
|
-
workflowId: string;
|
|
395
|
-
message: string;
|
|
396
|
-
};
|
|
397
|
-
export type UpdateWorkflowStateResponse = {
|
|
398
|
-
user: ConnectUser;
|
|
399
|
-
errors: UpdateWorkflowStateError[];
|
|
400
|
-
};
|
|
401
371
|
export {};
|
package/package.json
CHANGED