@useparagon/connect 1.0.20 → 1.0.21
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,9 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SDKConnectCredentialConfig } from '../types/connect';
|
|
2
|
+
import { IConnectCredentialConfig } from './connectCredentialConfig.interface';
|
|
2
3
|
export interface IConnectCredential {
|
|
3
4
|
id: string;
|
|
4
5
|
projectId: string;
|
|
5
6
|
integrationId: string;
|
|
6
|
-
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated
|
|
9
|
+
*/
|
|
10
|
+
config: SDKConnectCredentialConfig;
|
|
11
|
+
configurations?: IConnectCredentialConfig[];
|
|
7
12
|
personaId: string;
|
|
8
13
|
isPreviewCredential: boolean;
|
|
9
14
|
/**
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { IntegrationSharedInputStateMap, IntegrationWorkflowStateMap } from '../types';
|
|
2
|
+
import { IBaseEntity } from './base.entity';
|
|
3
|
+
export type ConnectCredentialConfigMeta = {
|
|
4
|
+
isIntegrationEnableTriggered?: boolean;
|
|
5
|
+
};
|
|
6
|
+
export interface IConnectCredentialConfig extends IBaseEntity {
|
|
7
|
+
/**
|
|
8
|
+
* connect credential id config is associated to
|
|
9
|
+
*/
|
|
10
|
+
connectCredentialId: string;
|
|
11
|
+
/**
|
|
12
|
+
* workflow settings defined for config
|
|
13
|
+
*/
|
|
14
|
+
workflowSettings: IntegrationWorkflowStateMap;
|
|
15
|
+
/**
|
|
16
|
+
* shared settings defined for config
|
|
17
|
+
*/
|
|
18
|
+
sharedSettings: IntegrationSharedInputStateMap;
|
|
19
|
+
/**
|
|
20
|
+
* other information defined ex. postOauthFilled , triggered integration enabled workflow
|
|
21
|
+
*/
|
|
22
|
+
configMeta: ConnectCredentialConfigMeta;
|
|
23
|
+
/**
|
|
24
|
+
* id defined by user for config
|
|
25
|
+
*/
|
|
26
|
+
externalId?: string;
|
|
27
|
+
/**
|
|
28
|
+
* if this config is default config or created separately by sdk
|
|
29
|
+
*/
|
|
30
|
+
isDefault: boolean;
|
|
31
|
+
}
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
import { ConnectCredentialProviderData, CredentialStatus, IConnectCredential } from '../entities/connectCredential.interface';
|
|
2
|
+
import { ConnectCredentialConfigMeta, IConnectCredentialConfig } from '../entities/connectCredentialConfig.interface';
|
|
2
3
|
import { PersonaMeta } from '../entities/persona.interface';
|
|
3
4
|
import { AccountType, DataSource, IntegrationConnectInput, SidebarInputType } from './action';
|
|
4
5
|
import { OrConditions } from './resolvers';
|
|
5
|
-
export interface
|
|
6
|
+
export interface SDKConnectCredentialConfig {
|
|
7
|
+
sharedSettings?: IntegrationSharedInputStateMap;
|
|
8
|
+
workflowSettings?: IntegrationWorkflowStateMap;
|
|
9
|
+
configMeta?: ConnectCredentialConfigMeta;
|
|
10
|
+
/**
|
|
11
|
+
* this refer `externalId` of credential config containing shared/workflow settings
|
|
12
|
+
*/
|
|
13
|
+
externalId?: string;
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated - use `workflowSettings`
|
|
16
|
+
*/
|
|
6
17
|
configuredWorkflows?: IntegrationWorkflowStateMap;
|
|
7
|
-
sharedSettings?: {
|
|
8
|
-
[inputId: string]: ConnectInputValue | undefined;
|
|
9
|
-
};
|
|
10
18
|
}
|
|
11
19
|
type ConnectInputValue = string | number | boolean | FieldMappingValue | ComboInputValue | undefined;
|
|
12
20
|
type FieldMappingValue = {
|
|
@@ -34,7 +42,7 @@ type ComboInputValue = {
|
|
|
34
42
|
[label: string]: string | undefined;
|
|
35
43
|
};
|
|
36
44
|
};
|
|
37
|
-
type IntegrationWorkflowStateMap = {
|
|
45
|
+
export type IntegrationWorkflowStateMap = {
|
|
38
46
|
[workflowId: string]: IntegrationWorkflowState | undefined;
|
|
39
47
|
};
|
|
40
48
|
export type IntegrationWorkflowState = {
|
|
@@ -43,6 +51,9 @@ export type IntegrationWorkflowState = {
|
|
|
43
51
|
[inputId: string]: ConnectInputValue | undefined;
|
|
44
52
|
};
|
|
45
53
|
};
|
|
54
|
+
export type IntegrationSharedInputStateMap = {
|
|
55
|
+
[inputId: string]: ConnectInputValue | undefined;
|
|
56
|
+
};
|
|
46
57
|
export type ModalConfig = {
|
|
47
58
|
/**
|
|
48
59
|
* A primary color for the background color of the Connect modal.
|
|
@@ -173,11 +184,13 @@ export type SDKResourceState = {
|
|
|
173
184
|
export type SDKIntegration = {
|
|
174
185
|
enabled: boolean;
|
|
175
186
|
credentialId?: string;
|
|
187
|
+
credentialConfigId?: string;
|
|
176
188
|
credentialStatus?: CredentialStatus;
|
|
177
189
|
providerId?: string;
|
|
178
190
|
providerData?: ConnectCredentialProviderData;
|
|
179
191
|
allCredentials: IConnectCredential[];
|
|
180
|
-
|
|
192
|
+
allConfigurations?: IConnectCredentialConfig[];
|
|
193
|
+
} & SDKConnectCredentialConfig;
|
|
181
194
|
export type SDKIntegrationConfig = {
|
|
182
195
|
oauthInputs: IntegrationConnectInput[];
|
|
183
196
|
accountTypes: AccountType[];
|