@useparagon/connect 1.0.24-experimental.12 → 1.0.24-experimental.13

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.
Files changed (48) hide show
  1. package/dist/src/index.html +161 -0
  2. package/dist/src/index.js +5924 -0
  3. package/dist/src/sandbox/sandbox.d.ts +10 -0
  4. package/dist/src/sandbox.js +43817 -0
  5. package/dist/src/src/ConnectSDK.d.ts +266 -0
  6. package/dist/src/src/SDKEventEmitter.d.ts +56 -0
  7. package/dist/src/src/constants.d.ts +2 -0
  8. package/dist/src/src/entities/base.entity.d.ts +5 -0
  9. package/dist/src/src/entities/connectCredential.interface.d.ts +41 -0
  10. package/dist/src/src/entities/connectCredentialConfig.interface.d.ts +31 -0
  11. package/dist/src/src/entities/credential.interface.d.ts +15 -0
  12. package/dist/src/src/entities/customIntegration.interface.d.ts +60 -0
  13. package/dist/src/src/entities/integration.interface.d.ts +45 -0
  14. package/dist/src/src/entities/integrationConfig.interface.d.ts +9 -0
  15. package/dist/src/src/entities/license.interface.d.ts +6 -0
  16. package/dist/src/src/entities/persona.interface.d.ts +34 -0
  17. package/dist/src/src/entities/project.interface.d.ts +32 -0
  18. package/dist/src/src/entities/steps.d.ts +30 -0
  19. package/dist/src/src/entities/team.interface.d.ts +19 -0
  20. package/dist/src/src/entities/user.interface.d.ts +23 -0
  21. package/dist/src/src/entities/workflow.interface.d.ts +11 -0
  22. package/dist/src/src/file-picker/integrations/googledrive.d.ts +24 -0
  23. package/dist/src/src/file-picker/integrations/index.d.ts +7 -0
  24. package/dist/src/src/file-picker/integrations/onedrive.d.ts +35 -0
  25. package/dist/src/src/file-picker/types/baseFilePicker.d.ts +51 -0
  26. package/dist/src/src/file-picker/types/externalFilePicker.d.ts +9 -0
  27. package/dist/src/src/file-picker/types/index.d.ts +1 -0
  28. package/dist/src/src/helpers/ConnectUserContext.d.ts +18 -0
  29. package/dist/src/src/helpers/index.d.ts +29 -0
  30. package/dist/src/src/helpers/oauth.d.ts +22 -0
  31. package/dist/src/src/index.d.ts +8 -0
  32. package/dist/src/src/server.types.d.ts +14 -0
  33. package/dist/src/src/types/action.d.ts +266 -0
  34. package/dist/src/src/types/billing.d.ts +2 -0
  35. package/dist/src/src/types/connect.d.ts +226 -0
  36. package/dist/src/src/types/connectModal.d.ts +35 -0
  37. package/dist/src/src/types/environment.d.ts +16 -0
  38. package/dist/src/src/types/execution.d.ts +5 -0
  39. package/dist/src/src/types/index.d.ts +9 -0
  40. package/dist/src/src/types/resolvers.d.ts +297 -0
  41. package/dist/src/src/types/sdk.d.ts +391 -0
  42. package/dist/src/src/types/stripe.d.ts +23 -0
  43. package/dist/src/src/utils/connect.d.ts +19 -0
  44. package/dist/src/src/utils/crypto.d.ts +7 -0
  45. package/dist/src/src/utils/generic.d.ts +41 -0
  46. package/dist/src/src/utils/http.d.ts +57 -0
  47. package/dist/src/src/utils/throttle.d.ts +118 -0
  48. package/package.json +1 -1
@@ -0,0 +1,226 @@
1
+ import { ConnectCredentialProviderData, CredentialStatus, IConnectCredential } from '../entities/connectCredential.interface';
2
+ import { ConnectCredentialConfigMeta, IConnectCredentialConfig } from '../entities/connectCredentialConfig.interface';
3
+ import { PersonaMeta } from '../entities/persona.interface';
4
+ import { AccountType, DataSource, IntegrationConnectInput, SidebarInputType } from './action';
5
+ import { OrConditions } from './resolvers';
6
+ import { CredentialConfigOptions } from './sdk';
7
+ export interface SDKConnectCredentialConfig {
8
+ sharedSettings?: IntegrationSharedInputStateMap;
9
+ workflowSettings?: IntegrationWorkflowStateMap;
10
+ configMeta?: ConnectCredentialConfigMeta;
11
+ /**
12
+ * this refer `externalId` of credential config containing shared/workflow settings
13
+ */
14
+ externalId?: string;
15
+ /**
16
+ * @deprecated - use `workflowSettings`
17
+ */
18
+ configuredWorkflows?: IntegrationWorkflowStateMap;
19
+ }
20
+ type ConnectInputValue = string | number | boolean | FieldMappingValue | ComboInputValue | undefined;
21
+ type FieldMappingValue = {
22
+ objectMapping?: string;
23
+ fieldMappings?: {
24
+ [label: string]: string | undefined;
25
+ };
26
+ dynamicMappings?: {
27
+ [mappingKey: string]: {
28
+ applicationField?: string;
29
+ integrationField?: string;
30
+ };
31
+ };
32
+ userCreatedFields?: string[];
33
+ /**
34
+ * Type of field mapper used for creating field mappings
35
+ * @default STATIC
36
+ */
37
+ mappingType?: 'STATIC' | 'DYNAMIC';
38
+ };
39
+ type ComboInputValue = {
40
+ mainInput?: string;
41
+ dependentInput?: string;
42
+ fieldMappings?: {
43
+ [label: string]: string | undefined;
44
+ };
45
+ };
46
+ export type IntegrationWorkflowStateMap = {
47
+ [workflowId: string]: IntegrationWorkflowState | undefined;
48
+ };
49
+ export type IntegrationSharedInputStateMap = {
50
+ [inputId: string]: ConnectInputValue | undefined;
51
+ };
52
+ export type IntegrationWorkflowState = {
53
+ enabled: boolean;
54
+ settings: {
55
+ [inputId: string]: ConnectInputValue | undefined;
56
+ };
57
+ };
58
+ export type ModalConfig = {
59
+ /**
60
+ * A primary color for the background color of the Connect modal.
61
+ */
62
+ accentColor?: string;
63
+ /**
64
+ * A boolean to show / hide paragon link in footer section. (default true)
65
+ */
66
+ paragonLink?: boolean;
67
+ /**
68
+ * A description for the integration's purpose. Appears just below the integration name.
69
+ */
70
+ description?: string;
71
+ /**
72
+ * A long-form description for the integration's purpose. Appears in the Overview tab of the
73
+ * Connect modal.
74
+ */
75
+ overview?: string;
76
+ /**
77
+ * Inputs and metadata about this integration's workflows.
78
+ */
79
+ workflowMeta?: IntegrationWorkflowMetaMap;
80
+ /**
81
+ * Inputs metadata for shared workflow settings
82
+ */
83
+ sharedMeta?: IntegrationSharedMeta;
84
+ };
85
+ type IntegrationSharedMeta = {
86
+ /**
87
+ * Inputs to intake global/shared user settings, configured in the Portal Editor.
88
+ */
89
+ inputs?: SerializedConnectInput[];
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
+ type SupportedConnectInputType = (typeof SupportedConnectInputTypes)[number];
93
+ export type SidebarInput = IntegrationConnectInput;
94
+ type SupportedConnectInput<T extends SidebarInput = SidebarInput> = Extract<T, {
95
+ type: SupportedConnectInputType;
96
+ }>;
97
+ /**
98
+ * A SerializedConnectInput is one that excludes the properties of a DynamicDataSource, which are
99
+ * loaded in at runtime rather than saved in the DB.
100
+ */
101
+ type SerializedConnectInput<TInputType extends SupportedConnectInputType = SupportedConnectInputType> = {
102
+ [T in SupportedConnectInputType]: Extract<SupportedConnectInput, {
103
+ type: T;
104
+ }> extends {
105
+ source: DataSource;
106
+ } | {
107
+ getValues: Function;
108
+ } ? Omit<Extract<SupportedConnectInput, {
109
+ type: T;
110
+ }>, 'source' | 'getValues'> & {
111
+ /**
112
+ * If a Connect input is dynamic and uses a DynamicDataSource, `sourceType` will match the
113
+ * `cacheKey` property of the source specified in the action's sources module.
114
+ *
115
+ * If it uses a FieldMapperDataSource, `sourceType` will match the `id` property of the source.
116
+ */
117
+ sourceType?: string;
118
+ fallbackText?: string;
119
+ } : Extract<SupportedConnectInput, {
120
+ type: T;
121
+ }>;
122
+ }[TInputType] & {
123
+ tooltip?: string;
124
+ };
125
+ type IntegrationWorkflowMetaMap = {
126
+ [id: string]: IntegrationWorkflowMeta;
127
+ };
128
+ type IntegrationWorkflowMeta = {
129
+ /**
130
+ * The ID of the WorkflowEntity.
131
+ */
132
+ id: string;
133
+ /**
134
+ * A longer-form description for the Workflow's functionality. Acts as a "subtitle" to the
135
+ * WorkflowEntity's `description` property.
136
+ */
137
+ infoText?: string;
138
+ /**
139
+ * Determine whether or not to enable workflow for connected user
140
+ * @default false
141
+ */
142
+ defaultEnabled?: boolean;
143
+ /**
144
+ * Determines whether or not the workflow displays in the Connect Portal.
145
+ * @default false
146
+ */
147
+ hidden?: boolean;
148
+ /**
149
+ * An index to track the positional order of a workflow in the list of displayed workflows.
150
+ * If `order` is undefined, the workflow will be sorted by its `createdAt` property (after those
151
+ * that are sorted manually by `order`.)
152
+ */
153
+ order?: number;
154
+ /**
155
+ * Inputs to intake workflow-specific settings, configured in the Portal Editor.
156
+ */
157
+ inputs: SerializedConnectInput[];
158
+ /**
159
+ * Conditions to evaluate permission for endUser based on persona metadata.
160
+ */
161
+ permissions?: OrConditions;
162
+ };
163
+ export type DynamicMappingField = {
164
+ label: string;
165
+ value: string;
166
+ };
167
+ export type DynamicMappingOptions = {
168
+ fields: DynamicMappingField[];
169
+ userCanRemoveMappings?: boolean;
170
+ userCanCreateFields?: boolean;
171
+ defaultFields?: string[];
172
+ };
173
+ export type AuthenticatedConnectUser = {
174
+ authenticated: true;
175
+ token: string;
176
+ userId: string;
177
+ integrations: SDKIntegrationState;
178
+ meta: PersonaMeta;
179
+ resources: SDKResourceState[];
180
+ };
181
+ export type SDKResourceState = {
182
+ id: string;
183
+ slug: string;
184
+ credentialId?: string;
185
+ credentialStatus?: CredentialStatus;
186
+ };
187
+ export type SDKIntegration = {
188
+ enabled: boolean;
189
+ credentialId?: string;
190
+ credentialConfigId?: string;
191
+ credentialStatus?: CredentialStatus;
192
+ providerId?: string;
193
+ providerData?: ConnectCredentialProviderData;
194
+ allCredentials: IConnectCredential[];
195
+ allConfigurations: IConnectCredentialConfig[];
196
+ } & SDKConnectCredentialConfig;
197
+ export type SDKIntegrationConfig = {
198
+ oauthInputs: IntegrationConnectInput[];
199
+ accountTypes: AccountType[];
200
+ authConfigInputs: IntegrationConnectInput[];
201
+ postOauthInputs: IntegrationConnectInput[];
202
+ dataSources: {
203
+ [key: string]: DataSource;
204
+ };
205
+ };
206
+ /**
207
+ * The contents of the `integrations` field for an authenticated ConnectUser.
208
+ *
209
+ * The fields from `ConnectCredentialConfig` are stored; all other fields are computed from other
210
+ * available entities.
211
+ */
212
+ export type SDKIntegrationState = Partial<Record<string, SDKIntegration>>;
213
+ export type UninstallOptions = Pick<CredentialConfigOptions, 'selectedCredentialId'>;
214
+ export type DisableWorkflowOptions = CredentialConfigOptions;
215
+ /**
216
+ * method options for getIntegrationAccount in sdk
217
+ */
218
+ export type GetIntegrationAccountOptions = {
219
+ includeAccountAuth?: boolean;
220
+ selectedCredentialId?: string;
221
+ };
222
+ export type IConnectUser = Omit<AuthenticatedConnectUser, 'token'>;
223
+ export declare const INFER_CONTENT_TYPE_FROM_CONNECT_OPTIONS = "auto";
224
+ export declare const SELECTED_CREDENTIAL_ID_HEADER = "X-Paragon-Credential";
225
+ export declare const SELECTED_CREDENTIAL_CONFIG_ID_HEADER = "X-Paragon-Configuration-Id";
226
+ export {};
@@ -0,0 +1,35 @@
1
+ /// <reference types="react" />
2
+ import { IPublishedCustomIntegration } from '../entities/customIntegration.interface';
3
+ import { IConnectIntegrationWithCredentialInfo } from '../entities/integration.interface';
4
+ import { AccountType } from './action';
5
+ import { ModalConfig } from './connect';
6
+ import { InstallOptions, ModalView } from './sdk';
7
+ type ModalApiInstallationOptions = InstallOptions & {
8
+ selectedAccountConfig?: AccountType;
9
+ };
10
+ export type Props = {
11
+ integration: IConnectIntegrationWithCredentialInfo | null;
12
+ customIntegration?: IPublishedCustomIntegration;
13
+ config?: ModalConfig;
14
+ contentStyle?: React.CSSProperties;
15
+ overlayStyle?: React.CSSProperties;
16
+ popupProps?: Record<string, string>;
17
+ hideCross?: boolean;
18
+ tabView?: ModalView;
19
+ isPreviewMode?: boolean;
20
+ onBeforeEnableIntegration?: () => void | Promise<void>;
21
+ onClose?: () => void;
22
+ onOpen?: () => void;
23
+ onTabViewChange?: (view: ModalView) => void;
24
+ /**
25
+ * this flag is for controlling the enabling behavior from outside this component.
26
+ * It is currently used in BYO to show input settings while adding them live
27
+ */
28
+ previewSettings?: {
29
+ isEnabling: boolean;
30
+ };
31
+ apiInstallationOptions?: ModalApiInstallationOptions;
32
+ connectionError?: string;
33
+ selectedCredentialId?: string;
34
+ };
35
+ export {};
@@ -0,0 +1,16 @@
1
+ export declare enum NODE_ENV {
2
+ PRODUCTION = "production",
3
+ DEVELOPMENT = "development",
4
+ TEST = "test"
5
+ }
6
+ export declare enum PLATFORM_ENV {
7
+ PRODUCTION = "production",
8
+ PRODUCTION_MIRROR_1 = "p-m1",
9
+ STAGING = "staging",
10
+ STAGING_MIRROR_1 = "s-m1",
11
+ DEVELOPMENT = "dev",
12
+ TEST = "test",
13
+ SANDBOX = "sandbox",
14
+ RELEASE = "release",
15
+ ENTERPRISE = "enterprise"
16
+ }
@@ -0,0 +1,5 @@
1
+ export type FanoutStackEntry = {
2
+ stepId: string;
3
+ instanceId: string;
4
+ index: number;
5
+ };
@@ -0,0 +1,9 @@
1
+ export * from './action';
2
+ export * from './billing';
3
+ export * from './connect';
4
+ export * from './connectModal';
5
+ export * from './environment';
6
+ export * from './execution';
7
+ export * from './resolvers';
8
+ export * from './sdk';
9
+ export * from './stripe';
@@ -0,0 +1,297 @@
1
+ /// <reference types="node" />
2
+ import { TokenType } from './action';
3
+ import { FanoutStackEntry } from './execution';
4
+ export declare enum DataType {
5
+ STRING = "STRING",
6
+ NUMBER = "NUMBER",
7
+ DATE = "DATE",
8
+ BOOLEAN = "BOOLEAN",
9
+ EMAIL = "EMAIL",
10
+ OBJECT = "OBJECT",
11
+ ARRAY = "ARRAY",
12
+ ANY = "ANY",
13
+ FILE = "FILE",
14
+ NON_DECIMAL = "NON_DECIMAL"
15
+ }
16
+ export type TokenizedSource<T extends DataType = DataType> = {
17
+ dataType?: T;
18
+ type: 'TOKENIZED';
19
+ parts: TokenizedValue[];
20
+ };
21
+ type TokenizedValue<T extends DataType = DataType> = ValueSource<T> | VariableSource<T> | SecretSource | ConnectCredentialSource | ObjectValueSource | PersonaMetadataSource;
22
+ type ObjectValueSource<T extends DataType = DataType> = {
23
+ type: 'OBJECT_VALUE';
24
+ name: string;
25
+ path: string[];
26
+ dataType?: T;
27
+ };
28
+ type VariableSource<T extends DataType = DataType> = {
29
+ dataType?: T;
30
+ type: 'VARIABLE';
31
+ stepId: string;
32
+ path: string[];
33
+ };
34
+ type SecretSource = {
35
+ type: 'ENVIRONMENT_SECRET';
36
+ environmentSecretId: string;
37
+ };
38
+ type ValueSource<T extends DataType = DataType> = {
39
+ dataType?: T;
40
+ type: 'VALUE';
41
+ value: DataTypeValues[T];
42
+ };
43
+ type ConnectCredentialSource = {
44
+ type: 'CONNECT_CREDENTIAL_FIELD';
45
+ fieldType: 'WORKFLOW_SETTING';
46
+ inputId: string;
47
+ /**
48
+ * @since PARA-3065: ConnectInputValue can now include more than a string/number type, so a
49
+ * path is specified similarly to VariableSource to traverse object types.
50
+ */
51
+ path?: string[];
52
+ } | {
53
+ type: 'CONNECT_CREDENTIAL_FIELD';
54
+ fieldType: 'SHARED_WORKFLOW_SETTING';
55
+ inputId: string;
56
+ path?: string[];
57
+ } | {
58
+ type: 'CONNECT_CREDENTIAL_FIELD';
59
+ fieldType: 'EXTERNAL_USER_ID';
60
+ } | {
61
+ type: 'CONNECT_CREDENTIAL_FIELD';
62
+ fieldType: 'EXTERNAL_USER_PROVIDER_ID';
63
+ } | {
64
+ type: 'CONNECT_CREDENTIAL_FIELD';
65
+ fieldType: 'OAUTH_ACCESS_TOKEN';
66
+ } | {
67
+ type: 'CONNECT_CREDENTIAL_FIELD';
68
+ fieldType: 'EXTERNAL_USER_PROVIDER_DATA';
69
+ dataKey: string;
70
+ };
71
+ type PersonaMetadataSource = {
72
+ type: 'PERSONA_METADATA';
73
+ path?: string[];
74
+ };
75
+ type DataTypeValues = {
76
+ [DataType.STRING]: string;
77
+ [DataType.NUMBER]: number;
78
+ [DataType.DATE]: Date;
79
+ [DataType.BOOLEAN]: boolean;
80
+ [DataType.EMAIL]: string;
81
+ [DataType.OBJECT]: object;
82
+ [DataType.ARRAY]: any[];
83
+ [DataType.ANY]: any;
84
+ [DataType.FILE]: FileValue;
85
+ [DataType.NON_DECIMAL]: number;
86
+ };
87
+ type FileDataType = Buffer;
88
+ type FileValue = {
89
+ data: FileDataType;
90
+ dataType: DataType.FILE;
91
+ encoding?: string;
92
+ id?: string;
93
+ mimeType?: string;
94
+ name?: string;
95
+ size?: string;
96
+ };
97
+ export type KeyedSource<T extends DataType = DataType> = {
98
+ key: string;
99
+ source: Source<T>;
100
+ };
101
+ export type Source<T extends DataType = DataType> = ValueSource<T> | VariableSource<T> | TokenizedSource<T> | ConditionSource | SecretSource | ExecutionSource | FanoutExecutionSource | UserSuppliedCredentialSource | ConnectCredentialSource | ObjectValueSource | PersonaMetadataSource;
102
+ type ConditionSource = {
103
+ type: 'CONDITION';
104
+ condition: ConditionWrapper;
105
+ };
106
+ type ConditionWrapper = JoinedConditions | OperatorCondition;
107
+ type JoinedConditions = AndConditions | OrConditions;
108
+ type AndConditions = {
109
+ type: 'JOIN';
110
+ join: 'AND';
111
+ conditions: ConditionWrapper[];
112
+ };
113
+ export type OrConditions = {
114
+ type: 'JOIN';
115
+ join: 'OR';
116
+ conditions: ConditionWrapper[];
117
+ };
118
+ type OperatorCondition = {
119
+ type: 'OPERATOR';
120
+ condition: Condition;
121
+ };
122
+ type Condition = {
123
+ operator: Operator.None;
124
+ variable: Source<DataType.ANY>;
125
+ } | {
126
+ operator: Operator.StringContains;
127
+ variable: Source<DataType.STRING>;
128
+ argument: Source<DataType.STRING>;
129
+ } | {
130
+ operator: Operator.StringDoesNotContain;
131
+ variable: Source<DataType.STRING>;
132
+ argument: Source<DataType.STRING>;
133
+ } | {
134
+ operator: Operator.StringExactlyMatches;
135
+ variable: Source<DataType.STRING>;
136
+ argument: Source<DataType.STRING>;
137
+ } | {
138
+ operator: Operator.StringDoesNotExactlyMatch;
139
+ variable: Source<DataType.STRING>;
140
+ argument: Source<DataType.STRING>;
141
+ } | {
142
+ operator: Operator.StringIsIn;
143
+ variable: Source<DataType.STRING>;
144
+ argument: Source<DataType.STRING>;
145
+ } | {
146
+ operator: Operator.StringIsNotIn;
147
+ variable: Source<DataType.STRING>;
148
+ argument: Source<DataType.STRING>;
149
+ } | {
150
+ operator: Operator.StringStartsWith;
151
+ variable: Source<DataType.STRING>;
152
+ argument: Source<DataType.STRING>;
153
+ } | {
154
+ operator: Operator.StringDoesNotStartWith;
155
+ variable: Source<DataType.STRING>;
156
+ argument: Source<DataType.STRING>;
157
+ } | {
158
+ operator: Operator.StringEndsWith;
159
+ variable: Source<DataType.STRING>;
160
+ argument: Source<DataType.STRING>;
161
+ } | {
162
+ operator: Operator.StringDoesNotEndWith;
163
+ variable: Source<DataType.STRING>;
164
+ argument: Source<DataType.STRING>;
165
+ } | {
166
+ operator: Operator.NumberGreaterThan;
167
+ variable: Source<DataType.NUMBER>;
168
+ argument: Source<DataType.NUMBER>;
169
+ } | {
170
+ operator: Operator.NumberLessThan;
171
+ variable: Source<DataType.NUMBER>;
172
+ argument: Source<DataType.NUMBER>;
173
+ } | {
174
+ operator: Operator.NumberGreaterThanOrEqualTo;
175
+ variable: Source<DataType.NUMBER>;
176
+ argument: Source<DataType.NUMBER>;
177
+ } | {
178
+ operator: Operator.NumberLessThanOrEqualTo;
179
+ variable: Source<DataType.NUMBER>;
180
+ argument: Source<DataType.NUMBER>;
181
+ } | {
182
+ operator: Operator.NumberEquals;
183
+ variable: Source<DataType.NUMBER>;
184
+ argument: Source<DataType.NUMBER>;
185
+ } | {
186
+ operator: Operator.NumberDoesNotEqual;
187
+ variable: Source<DataType.NUMBER>;
188
+ argument: Source<DataType.NUMBER>;
189
+ } | {
190
+ operator: Operator.DateTimeAfter;
191
+ variable: Source<DataType.DATE>;
192
+ argument: Source<DataType.DATE>;
193
+ } | {
194
+ operator: Operator.DateTimeBefore;
195
+ variable: Source<DataType.DATE>;
196
+ argument: Source<DataType.DATE>;
197
+ } | {
198
+ operator: Operator.DateTimeEquals;
199
+ variable: Source<DataType.DATE>;
200
+ argument: Source<DataType.DATE>;
201
+ } | {
202
+ operator: Operator.BooleanTrue;
203
+ variable: Source<DataType.BOOLEAN>;
204
+ } | {
205
+ operator: Operator.BooleanFalse;
206
+ variable: Source<DataType.BOOLEAN>;
207
+ } | {
208
+ operator: Operator.IsNull;
209
+ variable: Source;
210
+ } | {
211
+ operator: Operator.IsNotNull;
212
+ variable: Source;
213
+ } | {
214
+ operator: Operator.Exists;
215
+ variable: Source;
216
+ } | {
217
+ operator: Operator.DoesNotExist;
218
+ variable: Source;
219
+ } | {
220
+ operator: Operator.ArrayIsEmpty;
221
+ variable: Source<DataType.ARRAY>;
222
+ } | {
223
+ operator: Operator.ArrayIsNotEmpty;
224
+ variable: Source<DataType.ARRAY>;
225
+ } | {
226
+ operator: Operator.StringGreaterThan;
227
+ variable: Source<DataType.STRING>;
228
+ argument: Source<DataType.STRING>;
229
+ } | {
230
+ operator: Operator.StringLessThan;
231
+ variable: Source<DataType.STRING>;
232
+ argument: Source<DataType.STRING>;
233
+ };
234
+ declare enum Operator {
235
+ 'None' = "$none",
236
+ 'StringContains' = "$stringContains",
237
+ 'StringDoesNotContain' = "$stringDoesNotContain",
238
+ 'StringExactlyMatches' = "$stringExactlyMatches",
239
+ 'StringDoesNotExactlyMatch' = "$stringDoesNotExactlyMatch",
240
+ 'StringIsIn' = "$stringIsIn",
241
+ 'StringIsNotIn' = "$stringIsNotIn",
242
+ 'StringStartsWith' = "$stringStartsWith",
243
+ 'StringDoesNotStartWith' = "$stringDoesNotStartWith",
244
+ 'StringEndsWith' = "$stringEndsWith",
245
+ 'StringDoesNotEndWith' = "$stringDoesNotEndWith",
246
+ 'NumberGreaterThan' = "$numberGreaterThan",
247
+ 'NumberLessThan' = "$numberLessThan",
248
+ 'NumberEquals' = "$numberEquals",
249
+ 'NumberDoesNotEqual' = "$numberDoesNotEqual",
250
+ 'NumberLessThanOrEqualTo' = "$numberLessThanOrEqualTo",
251
+ 'NumberGreaterThanOrEqualTo' = "$numberGreaterThanOrEqualTo",
252
+ 'DateTimeAfter' = "$dateTimeAfter",
253
+ 'DateTimeBefore' = "$dateTimeBefore",
254
+ 'DateTimeEquals' = "$dateTimeEquals",
255
+ 'BooleanTrue' = "$booleanTrue",
256
+ 'BooleanFalse' = "$booleanFalse",
257
+ /** (PARA-5551) previously operators for Does Exist / Does Not Exist do a strict check for equality to null, resulting in a bug where value is undefined
258
+ * to handle this situation, we are adding 2 new operators IsNotNull and IsNull and changing functionality of
259
+ * Exist and DoesNotExist operators to handle undefined values
260
+ */
261
+ 'IsNotNull' = "$exists",
262
+ 'IsNull' = "$doesNotExist",
263
+ 'Exists' = "$isNotUndefinedOrNull",
264
+ 'DoesNotExist' = "$isUndefinedOrNull",
265
+ 'ArrayIsIn' = "$arrayIsIn",
266
+ 'ArrayIsNotIn' = "$arrayIsNotIn",
267
+ 'ArrayIsEmpty' = "$arrayIsEmpty",
268
+ 'ArrayIsNotEmpty' = "$arrayIsNotEmpty",
269
+ 'StringGreaterThan' = "$stringGreaterThan",
270
+ 'StringLessThan' = "$stringLessThan"
271
+ }
272
+ type ExecutionSource = {
273
+ type: 'EXECUTION';
274
+ id: string;
275
+ stepId: string;
276
+ /**
277
+ * a timestamp representing when the execution occurred
278
+ */
279
+ start: number;
280
+ fanoutStack: FanoutStackEntry[];
281
+ /**
282
+ * This flag suggests that the content of the variable will be stored on remmote storage service
283
+ * such as s3
284
+ */
285
+ remoteCached?: boolean;
286
+ };
287
+ type FanoutExecutionSource = {
288
+ type: 'FANOUT_EXECUTION';
289
+ stepId: string;
290
+ };
291
+ type UserSuppliedCredentialSource = {
292
+ type: 'USER_SUPPLIED_CREDENTIAL';
293
+ tokenType: TokenType;
294
+ providerType: string;
295
+ credential: TokenizedSource<DataType.STRING>;
296
+ };
297
+ export {};