@integry/sdk 4.5.2 → 4.5.4
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/.vscode/launch.json +2 -2
- package/THIRD_PARTY_LICENSES +0 -37
- package/dist/esm/index.csm.d.ts +12 -2
- package/dist/esm/index.csm.js +7262 -1
- package/dist/umd/index.umd.d.ts +9 -1
- package/dist/umd/index.umd.js +7262 -1
- package/jest.config.cjs +10 -0
- package/package.json +10 -4
- package/src/components/AddTagButton/index.ts +23 -0
- package/src/components/BasicSelect/index.ts +114 -0
- package/src/components/BasicSelect/styles.module.scss +44 -0
- package/src/components/Button/index.ts +94 -0
- package/src/components/Button/styles.module.scss +152 -0
- package/src/components/CheckboxGroup/Checkbox.ts +104 -0
- package/src/components/CheckboxGroup/index.ts +190 -0
- package/src/components/CheckboxGroup/styles.module.scss +63 -0
- package/src/components/CollapsedMenu/index.ts +101 -0
- package/src/components/CollapsedMenu/styles.module.scss +46 -0
- package/src/components/ConfigureFieldWrapper/index.ts +85 -0
- package/src/components/ConfigureFieldWrapper/styles.module.scss +57 -0
- package/src/components/EditableText/index.ts +121 -0
- package/src/components/EditableText/styles.module.scss +38 -0
- package/src/components/EditableTextArea/index.ts +143 -0
- package/src/components/EditableTextArea/styles.module.scss +91 -0
- package/src/components/ErrorMessage/index.ts +16 -0
- package/src/components/ErrorMessage/styles.module.scss +19 -0
- package/src/components/ErrorPage/index.ts +42 -0
- package/src/components/ErrorPage/styles.module.scss +26 -0
- package/src/components/Footer/index.ts +41 -0
- package/src/components/Footer/styles.module.scss +40 -0
- package/src/components/HTMLContent/index.tsx +275 -0
- package/src/components/HTMLContent/styles.module.scss +3 -0
- package/src/components/InfoBox/index.ts +48 -0
- package/src/components/InfoBox/styles.module.scss +21 -0
- package/src/components/Input/BaseInput/index.ts +170 -0
- package/src/components/Input/BaseInput/styles.module.scss +94 -0
- package/src/components/Input/DateInput/index.ts +103 -0
- package/src/components/Input/DateInput/styles.module.scss +50 -0
- package/src/components/Input/Input/index.ts +206 -0
- package/src/components/Input/Input/styles.module.scss +14 -0
- package/src/components/Input/PasswordInput/index.ts +164 -0
- package/src/components/Input/PasswordInput/styles.module.scss +37 -0
- package/src/components/Input/index.ts +7 -0
- package/src/components/Label/index.ts +61 -0
- package/src/components/Label/styles.module.scss +41 -0
- package/src/components/LargeLoader/index.ts +25 -0
- package/src/components/LargeLoader/styles.module.scss +16 -0
- package/src/components/Listbox/ListBoxItem.ts +57 -0
- package/src/components/Listbox/index.ts +479 -0
- package/src/components/Listbox/styles.module.scss +197 -0
- package/src/components/Loader/index.ts +25 -0
- package/src/components/Loader/styles.module.scss +16 -0
- package/src/components/MediaGallery/MediaGalleryModal.ts +82 -0
- package/src/components/MediaGallery/MediaSlider.ts +76 -0
- package/src/components/MediaGallery/index.ts +92 -0
- package/src/components/MediaGallery/styles.module.scss +156 -0
- package/src/components/MediaUpload/index.ts +233 -0
- package/src/components/MediaUpload/styles.module.scss +118 -0
- package/src/components/Modal/index.ts +87 -0
- package/src/components/Modal/styles.module.scss +441 -0
- package/src/components/MultipurposeField/Dropdown/ListBoxItem.tsx +58 -0
- package/src/components/MultipurposeField/Dropdown/index.tsx +981 -0
- package/src/components/MultipurposeField/Dropdown/styles.module.scss +208 -0
- package/src/components/MultipurposeField/TagMenu/index.ts +384 -0
- package/src/components/MultipurposeField/TagMenu/styles.module.scss +136 -0
- package/src/components/MultipurposeField/TagOptions/index.tsx +83 -0
- package/src/components/MultipurposeField/TagOptions/styles.module.scss +95 -0
- package/src/components/MultipurposeField/index.tsx +687 -0
- package/src/components/MultipurposeField/styles.module.scss +56 -0
- package/src/components/NewModal/index.ts +69 -0
- package/src/components/NewModal/styles.module.scss +70 -0
- package/src/components/OverflowTooltip/index.tsx +59 -0
- package/src/components/PopUp/ConfirmationPopUp/index.ts +58 -0
- package/src/components/PopUp/ConfirmationPopUp/styles.module.scss +49 -0
- package/src/components/PopUp/SuccessPopUp/index.ts +62 -0
- package/src/components/PopUp/SuccessPopUp/styles.module.scss +38 -0
- package/src/components/RadioGroup/Radio.ts +129 -0
- package/src/components/RadioGroup/index.ts +169 -0
- package/src/components/RadioGroup/styles.module.scss +81 -0
- package/src/components/Search/index.ts +69 -0
- package/src/components/Search/styles.module.scss +149 -0
- package/src/components/TabBar/Tab.ts +33 -0
- package/src/components/TabBar/index.ts +64 -0
- package/src/components/TabBar/styles.module.scss +43 -0
- package/src/components/Tag/index.ts +29 -0
- package/src/components/Tag/styles.module.scss +57 -0
- package/src/components/TextArea/index.ts +172 -0
- package/src/components/TextArea/styles.module.scss +70 -0
- package/src/components/TextContent/index.tsx +128 -0
- package/src/components/TextContent/styles.module.scss +6 -0
- package/src/components/ThreeDotLoader/index.ts +39 -0
- package/src/components/ThreeDotLoader/styles.module.scss +41 -0
- package/src/components/TimeInput/index.ts +129 -0
- package/src/components/TimeInput/styles.module.scss +16 -0
- package/src/components/Toggle/index.ts +34 -0
- package/src/components/Toggle/styles.module.scss +56 -0
- package/src/components/Toggle-v2/index.ts +40 -0
- package/src/components/Toggle-v2/styles.module.scss +86 -0
- package/src/components/Tooltip/index.ts +271 -0
- package/src/components/Tooltip/styles.module.scss +105 -0
- package/src/components/form/ObjectField/index.ts +364 -0
- package/src/components/form/ObjectField/styles.module.scss +103 -0
- package/src/components/form/index.ts +3 -0
- package/src/contexts/AppContext.ts +12 -0
- package/src/declaration.d.ts +7 -0
- package/src/extensions/HMAC.ts +25 -0
- package/src/extensions/IntegryAPIError.ts +19 -0
- package/src/features/common/AccountDropdown/index.ts +291 -0
- package/src/features/common/AccountDropdown/styles.module.scss +19 -0
- package/src/features/common/ActionForm/index.ts +1818 -0
- package/src/features/common/ActionForm/styles.module.scss +23 -0
- package/src/features/common/AppCard/index.ts +207 -0
- package/src/features/common/AppCard/styles.module.scss +117 -0
- package/src/features/common/AppCardCompact/index.ts +189 -0
- package/src/features/common/AppCardCompact/styles.module.scss +141 -0
- package/src/features/common/AuthSelector/index.ts +537 -0
- package/src/features/common/AuthSelector/styles.module.scss +161 -0
- package/src/features/common/AuthSelectorCompact/index.ts +706 -0
- package/src/features/common/AuthSelectorCompact/styles.module.scss +219 -0
- package/src/features/common/AuthSelectorDropdown/index.ts +704 -0
- package/src/features/common/AuthSelectorDropdown/styles.module.scss +361 -0
- package/src/features/common/DynamicField/index.ts +229 -0
- package/src/features/common/DynamicField/styles.module.scss +67 -0
- package/src/features/common/DynamicTypedField/index.ts +217 -0
- package/src/features/common/DynamicTypedField/styles.module.scss +67 -0
- package/src/features/common/FunctionForm/index.ts +862 -0
- package/src/features/common/FunctionForm/styles.module.scss +163 -0
- package/src/features/common/MappingUI/index.ts +649 -0
- package/src/features/common/MappingUI/styles.module.scss +121 -0
- package/src/features/common/MarketplaceAppCard/index.ts +279 -0
- package/src/features/common/MarketplaceAppCard/styles.module.scss +231 -0
- package/src/features/common/MarketplaceAppCardCompact/index.ts +283 -0
- package/src/features/common/MarketplaceAppCardCompact/styles.module.scss +255 -0
- package/src/features/common/NewMappingUI/index.ts +515 -0
- package/src/features/common/NewMappingUI/styles.module.scss +113 -0
- package/src/features/common/RequestAppWidget/RequestAppModal/index.ts +67 -0
- package/src/features/common/RequestAppWidget/RequestAppModal/styles.module.scss +23 -0
- package/src/features/common/RequestAppWidget/index.ts +48 -0
- package/src/features/common/RequestAppWidget/request-app-form.ts +89 -0
- package/src/features/common/RequestAppWidget/styles.module.scss +43 -0
- package/src/features/common/SectionField/index.ts +272 -0
- package/src/features/common/SectionField/styles.module.scss +67 -0
- package/src/features/common/Step/index.ts +827 -0
- package/src/features/common/Step/styles.module.scss +12 -0
- package/src/features/common/StepNavigation/CollapsedSteps.ts +125 -0
- package/src/features/common/StepNavigation/NavItem.ts +111 -0
- package/src/features/common/StepNavigation/index.ts +257 -0
- package/src/features/common/StepNavigation/styles.module.scss +117 -0
- package/src/features/common/Steps/index.ts +1139 -0
- package/src/features/common/Steps/styles.module.scss +314 -0
- package/src/features/containers/AppFlowContainer/AppFlowListing/compactStyles.module.scss +383 -0
- package/src/features/containers/AppFlowContainer/AppFlowListing/flow-instance.tsx +367 -0
- package/src/features/containers/AppFlowContainer/AppFlowListing/flowCard.tsx +194 -0
- package/src/features/containers/AppFlowContainer/AppFlowListing/flowCardCompact.tsx +389 -0
- package/src/features/containers/AppFlowContainer/AppFlowListing/flowInstanceCompact.tsx +577 -0
- package/src/features/containers/AppFlowContainer/AppFlowListing/index.tsx +83 -0
- package/src/features/containers/AppFlowContainer/AppFlowListing/styles.module.scss +212 -0
- package/src/features/containers/AppFlowContainer/AppFlowWrap/app-page-loader.tsx +45 -0
- package/src/features/containers/AppFlowContainer/AppFlowWrap/index.tsx +1081 -0
- package/src/features/containers/AppFlowContainer/AppFlowWrap/styles.module.scss +452 -0
- package/src/features/containers/AppFlowContainer/Authentication/index.ts +610 -0
- package/src/features/containers/AppFlowContainer/Authentication/styles.module.scss +468 -0
- package/src/features/containers/AppFlowContainer/index.ts +114 -0
- package/src/features/containers/AppPageContainer/AppPage/index.tsx +262 -0
- package/src/features/containers/AppPageContainer/AppPage/styles.module.scss +120 -0
- package/src/features/containers/AppPageContainer/IntegrationCard/index.ts +165 -0
- package/src/features/containers/AppPageContainer/IntegrationCard/styles.module.scss +81 -0
- package/src/features/containers/AppPageContainer/index.tsx +93 -0
- package/src/features/containers/AppPageContainer/styles.module.scss +0 -0
- package/src/features/containers/AppsForFlows/index.ts +161 -0
- package/src/features/containers/AppsForFlows/styles.module.scss +280 -0
- package/src/features/containers/AppsForFlowsCompact/index.ts +161 -0
- package/src/features/containers/AppsForFlowsCompact/styles.module.scss +279 -0
- package/src/features/containers/AuthSetupContainer/AppSelection.ts +73 -0
- package/src/features/containers/AuthSetupContainer/AuthTypeSelection.ts +67 -0
- package/src/features/containers/AuthSetupContainer/Footer.ts +32 -0
- package/src/features/containers/AuthSetupContainer/Header.ts +39 -0
- package/src/features/containers/AuthSetupContainer/PostAdditionPopup.ts +27 -0
- package/src/features/containers/AuthSetupContainer/index.ts +349 -0
- package/src/features/containers/AuthSetupContainer/styles.module.scss +229 -0
- package/src/features/containers/FlowSetupContainer/index.ts +390 -0
- package/src/features/containers/FlowSetupContainer/styles.module.scss +18 -0
- package/src/features/containers/MarkeplaceApps/index.ts +574 -0
- package/src/features/containers/MarkeplaceApps/styles.module.scss +559 -0
- package/src/features/containers/MarketplaceAppsCompact/index.ts +576 -0
- package/src/features/containers/MarketplaceAppsCompact/styles.module.scss +546 -0
- package/src/features/containers/MarketplaceAppsContainer/index.ts +83 -0
- package/src/features/containers/MarketplaceContainer/AppCard/index.ts +91 -0
- package/src/features/containers/MarketplaceContainer/AppCard/styles.module.scss +66 -0
- package/src/features/containers/MarketplaceContainer/AppListing/index.ts +34 -0
- package/src/features/containers/MarketplaceContainer/AppListing/styles.module.scss +10 -0
- package/src/features/containers/MarketplaceContainer/MarketplaceContentWrap/index.ts +132 -0
- package/src/features/containers/MarketplaceContainer/MarketplaceContentWrap/styles.module.scss +117 -0
- package/src/features/containers/MarketplaceContainer/index.ts +242 -0
- package/src/features/containers/MarketplaceContainer/styles.module.scss +84 -0
- package/src/features/containers/SDKContainer/index.ts +817 -0
- package/src/features/containers/SDKContainer/styles.module.scss +266 -0
- package/src/features/containers/SDKDebugContainer/index.ts +137 -0
- package/src/features/containers/SDKDebugContainer/styles.module.scss +37 -0
- package/src/features/containers/SDKFailedContainer/index.ts +117 -0
- package/src/features/containers/SDKFailedContainer/styles.module.scss +57 -0
- package/src/features/integrations/IntegrationRow/Icons.ts +77 -0
- package/src/features/integrations/IntegrationRow/index.ts +129 -0
- package/src/features/integrations/IntegrationRow/styles.module.scss +62 -0
- package/src/features/integrations/IntegrationsHeader/index.ts +34 -0
- package/src/features/integrations/IntegrationsHeader/styles.module.scss +47 -0
- package/src/features/integrations/IntegrationsList/index.ts +252 -0
- package/src/features/integrations/IntegrationsList/styles.module.scss +67 -0
- package/src/features/templates/Template/index.ts +295 -0
- package/src/features/templates/Template/styles.module.scss +226 -0
- package/src/features/templates/TemplatesView/index.ts +368 -0
- package/src/features/templates/TemplatesView/styles.module.scss +71 -0
- package/src/features/templates/TemplatesViewCompact/index.ts +364 -0
- package/src/features/templates/TemplatesViewCompact/styles.module.scss +141 -0
- package/src/hooks/useAutosizeTextArea.ts +22 -0
- package/src/hooks/useCustomRef.ts +13 -0
- package/src/hooks/useDebounce.ts +17 -0
- package/src/hooks/useElementResize.ts +40 -0
- package/src/hooks/useEventListener.ts +44 -0
- package/src/hooks/useHover.ts +40 -0
- package/src/hooks/useOnClickOutside.ts +32 -0
- package/src/index.ts +2051 -0
- package/src/index.umd.ts +13 -0
- package/src/interfaces/index.ts +924 -0
- package/src/modules/api/index.ts +1315 -0
- package/src/modules/api/responseHandler.ts +38 -0
- package/src/modules/event-emitter/index.ts +72 -0
- package/src/modules/event-emitter/runners/abstract.ts +21 -0
- package/src/modules/event-emitter/runners/default.ts +11 -0
- package/src/modules/event-emitter/runners/ntimes.ts +28 -0
- package/src/modules/event-emitter/types.ts +34 -0
- package/src/store/actionFunctions.ts +1573 -0
- package/src/store/index.ts +17 -0
- package/src/store/initialState.ts +58 -0
- package/src/stories/Button.stories.tsx +83 -0
- package/src/stories/Checkbox/Checkbox.stories.tsx +41 -0
- package/src/stories/Checkbox/CheckboxGroup.stories.tsx +46 -0
- package/src/stories/EditableText.stories.tsx +35 -0
- package/src/stories/Input/BaseInput.stories.tsx +48 -0
- package/src/stories/Input/DateInput.stories.tsx +28 -0
- package/src/stories/Input/Input.stories.tsx +24 -0
- package/src/stories/Input/PasswordInput.stories.tsx +26 -0
- package/src/stories/Introduction.stories.mdx +211 -0
- package/src/stories/Label.stories.tsx +27 -0
- package/src/stories/Listbox.stories.tsx +122 -0
- package/src/stories/Radio/Radio.stories.tsx +39 -0
- package/src/stories/Radio/RadioGroup.stories.tsx +46 -0
- package/src/stories/StepNavigation/NavItem.stories.tsx +31 -0
- package/src/stories/StepNavigation/StepNavigation.stories.tsx +50 -0
- package/src/stories/TabBar.stories.tsx +31 -0
- package/src/stories/TextArea.stories.tsx +23 -0
- package/src/stories/TimeInput.stories.tsx +37 -0
- package/src/stories/Toggle.stories.tsx +33 -0
- package/src/stories/assets/code-brackets.svg +1 -0
- package/src/stories/assets/colors.svg +1 -0
- package/src/stories/assets/comments.svg +1 -0
- package/src/stories/assets/direction.svg +1 -0
- package/src/stories/assets/flow.svg +1 -0
- package/src/stories/assets/plugin.svg +1 -0
- package/src/stories/assets/repo.svg +1 -0
- package/src/stories/assets/stackalt.svg +1 -0
- package/src/types/index.ts +293 -0
- package/src/types/store.ts +366 -0
- package/src/types/utils.ts +19 -0
- package/src/utils/ActivityOutputUtils.ts +163 -0
- package/src/utils/common.ts +20 -0
- package/src/utils/copyToClipboard.ts +24 -0
- package/src/utils/datetime.ts +101 -0
- package/src/utils/getUrlParam.ts +11 -0
- package/src/utils/isAuthMessage.ts +16 -0
- package/src/utils/isBrowser.ts +1 -0
- package/src/utils/jsonEncodeDecode.ts +15 -0
- package/src/utils/objectUtils.ts +116 -0
- package/src/utils/popup.ts +30 -0
- package/src/utils/searchJson.ts +51 -0
- package/src/utils/stepUtils.ts +45 -0
- package/src/utils/truncate.ts +6 -0
- package/test/setup.ts +1 -0
- package/vitest.config.ts +10 -0
|
@@ -0,0 +1,924 @@
|
|
|
1
|
+
// eslint-disable-next-line import/no-cycle
|
|
2
|
+
import { FlowCardProps } from '@/features/templates/Template';
|
|
3
|
+
import {
|
|
4
|
+
Authorization,
|
|
5
|
+
AuthorizationTypes,
|
|
6
|
+
TemplateFormRenderModes,
|
|
7
|
+
MarketplaceRenderModes,
|
|
8
|
+
} from '@/types';
|
|
9
|
+
import { VNode } from 'preact';
|
|
10
|
+
import {
|
|
11
|
+
array,
|
|
12
|
+
boolean,
|
|
13
|
+
date,
|
|
14
|
+
Describe,
|
|
15
|
+
nullable,
|
|
16
|
+
number,
|
|
17
|
+
object,
|
|
18
|
+
optional,
|
|
19
|
+
size,
|
|
20
|
+
string,
|
|
21
|
+
} from 'superstruct';
|
|
22
|
+
|
|
23
|
+
export interface NestedObject {
|
|
24
|
+
[key: string]: string | number | NestedObject;
|
|
25
|
+
}
|
|
26
|
+
export interface UserConfig {
|
|
27
|
+
availableFlowsLabel?: string;
|
|
28
|
+
myFlowsLabel?: string;
|
|
29
|
+
hideWebhookUrlScreen?: boolean;
|
|
30
|
+
hideAppConnectionModal?: boolean;
|
|
31
|
+
customComponents?: {
|
|
32
|
+
flowCard?: (props: FlowCardProps) => VNode;
|
|
33
|
+
};
|
|
34
|
+
autoRedirectToMyFlows?: boolean;
|
|
35
|
+
isReadOnly?: boolean;
|
|
36
|
+
marketplaceModalTitle?: string;
|
|
37
|
+
buttonLabelToSaveIntegration?: string;
|
|
38
|
+
objects?: NestedObject;
|
|
39
|
+
tags?: string[];
|
|
40
|
+
hideExistingIntegrations?: boolean;
|
|
41
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
42
|
+
[other: string]: any;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export type SDKOptions = UserConfig; // rename user config to options for better understanding
|
|
46
|
+
export interface SDKConfig {
|
|
47
|
+
baseUrl?: string;
|
|
48
|
+
debug?: boolean;
|
|
49
|
+
integrationId?: number;
|
|
50
|
+
xIntegryConfig?: {
|
|
51
|
+
isAnonymous?: boolean;
|
|
52
|
+
appAuth?: {
|
|
53
|
+
apiKey?: string;
|
|
54
|
+
authId?: string;
|
|
55
|
+
extras?: Record<string, string | number>;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
userConfig?: UserConfig;
|
|
59
|
+
options?: SDKOptions;
|
|
60
|
+
payloads?: NestedObject;
|
|
61
|
+
user?: NestedObject;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export interface ConfigWithObject extends SDKConfig {
|
|
65
|
+
appKey: string;
|
|
66
|
+
hash: string;
|
|
67
|
+
userId: string;
|
|
68
|
+
deploymentId?: string;
|
|
69
|
+
marketplaceId?: string;
|
|
70
|
+
appId?: number;
|
|
71
|
+
showApps?: boolean;
|
|
72
|
+
showTemplates?: boolean;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export interface ConfigWithUrlParams extends SDKConfig {
|
|
76
|
+
useUrlParams?: boolean;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export interface APIConfig {
|
|
80
|
+
baseUrl: string;
|
|
81
|
+
baseUrlv2: string;
|
|
82
|
+
endpointsUrl: string;
|
|
83
|
+
appKey: string;
|
|
84
|
+
hash: string;
|
|
85
|
+
userId: string;
|
|
86
|
+
oauthVerifyPath: string;
|
|
87
|
+
apiKey?: string;
|
|
88
|
+
authId?: string;
|
|
89
|
+
extras?: Record<string, string | number>;
|
|
90
|
+
defaultIntegrationStatus?: boolean;
|
|
91
|
+
baseAPIUrl: string;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export interface Template {
|
|
95
|
+
id: number;
|
|
96
|
+
name: string;
|
|
97
|
+
description: string;
|
|
98
|
+
can_add_integration: boolean;
|
|
99
|
+
integration_count: number;
|
|
100
|
+
app: {
|
|
101
|
+
icon_url: string;
|
|
102
|
+
category: string[];
|
|
103
|
+
tags: string;
|
|
104
|
+
};
|
|
105
|
+
branding_app: {
|
|
106
|
+
id: string;
|
|
107
|
+
name: string;
|
|
108
|
+
icon_url: string;
|
|
109
|
+
category: string[];
|
|
110
|
+
tags: string;
|
|
111
|
+
};
|
|
112
|
+
is_manual?: boolean;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export interface Integration {
|
|
116
|
+
name: string;
|
|
117
|
+
branding_app: {
|
|
118
|
+
id: string;
|
|
119
|
+
name: string;
|
|
120
|
+
icon_url: string;
|
|
121
|
+
category: string[];
|
|
122
|
+
tags: string;
|
|
123
|
+
};
|
|
124
|
+
id: number;
|
|
125
|
+
runs_count: number;
|
|
126
|
+
bundle_instance: number;
|
|
127
|
+
created: Date;
|
|
128
|
+
delete_link: string;
|
|
129
|
+
disable_link: string;
|
|
130
|
+
edit_link: string;
|
|
131
|
+
enable_link: string;
|
|
132
|
+
icon_url: string;
|
|
133
|
+
is_visible: number;
|
|
134
|
+
last_modified: Date;
|
|
135
|
+
status: string;
|
|
136
|
+
template: number;
|
|
137
|
+
template_detail: {
|
|
138
|
+
id: number;
|
|
139
|
+
name: string;
|
|
140
|
+
description: string;
|
|
141
|
+
};
|
|
142
|
+
task_execution: {
|
|
143
|
+
integration_created_at: Date;
|
|
144
|
+
last_execution_at: {
|
|
145
|
+
date: Date;
|
|
146
|
+
timezone: string;
|
|
147
|
+
timezone_type: number;
|
|
148
|
+
} | null;
|
|
149
|
+
status: string | null;
|
|
150
|
+
};
|
|
151
|
+
loading: boolean;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export interface IntegrationSaveResponse {
|
|
155
|
+
id: number;
|
|
156
|
+
connected_account_id: number;
|
|
157
|
+
is_visible: number | boolean;
|
|
158
|
+
name: string;
|
|
159
|
+
bundle_name: string;
|
|
160
|
+
bundle_instance_id: number;
|
|
161
|
+
status: string;
|
|
162
|
+
template: number;
|
|
163
|
+
steps: {
|
|
164
|
+
id: number;
|
|
165
|
+
template_step: number;
|
|
166
|
+
returned_data: string | null;
|
|
167
|
+
activity_id: number;
|
|
168
|
+
step_name: string;
|
|
169
|
+
}[];
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
export interface AppsForAuthConnection {
|
|
173
|
+
id: number;
|
|
174
|
+
name: string;
|
|
175
|
+
description: string;
|
|
176
|
+
icon_url: string;
|
|
177
|
+
color: string;
|
|
178
|
+
status: 0 | 1;
|
|
179
|
+
system_app: boolean;
|
|
180
|
+
publishing_status: string;
|
|
181
|
+
is_workspace: boolean;
|
|
182
|
+
account_id: number;
|
|
183
|
+
authorization_type: {
|
|
184
|
+
id: number;
|
|
185
|
+
type: AuthorizationTypes;
|
|
186
|
+
provider: string;
|
|
187
|
+
app_id: number;
|
|
188
|
+
}[];
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
export interface AppsForAuthConnectionResponse {
|
|
192
|
+
has_next: boolean;
|
|
193
|
+
next_page_number: number;
|
|
194
|
+
apps: AppsForAuthConnection[];
|
|
195
|
+
}
|
|
196
|
+
export interface BundleResponse {
|
|
197
|
+
meta: {
|
|
198
|
+
status: number;
|
|
199
|
+
};
|
|
200
|
+
templates: Template[];
|
|
201
|
+
integrations: Integration[];
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
type SaveIntegrationRequestStep = {
|
|
205
|
+
id: number;
|
|
206
|
+
authorization: number;
|
|
207
|
+
template_step: number;
|
|
208
|
+
app_user_data: {
|
|
209
|
+
id: number;
|
|
210
|
+
value: string;
|
|
211
|
+
template_field: number;
|
|
212
|
+
}[];
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
export interface SaveOrUpdateIntegrationBody {
|
|
216
|
+
isAnonymous: boolean;
|
|
217
|
+
id?: number;
|
|
218
|
+
name: string;
|
|
219
|
+
notification_email: string;
|
|
220
|
+
template: number;
|
|
221
|
+
bundle_id: number;
|
|
222
|
+
bundle_instance_id?: number;
|
|
223
|
+
steps: SaveIntegrationRequestStep[];
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
export interface GetAppsForAuthConnectionBody {
|
|
227
|
+
deploymentId?: number;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
export type App = {
|
|
231
|
+
id: number;
|
|
232
|
+
name: string;
|
|
233
|
+
description: string;
|
|
234
|
+
icon_url: string;
|
|
235
|
+
color: string;
|
|
236
|
+
publishing_status: string;
|
|
237
|
+
category: string[];
|
|
238
|
+
app_type?: string;
|
|
239
|
+
action_url?: string | null;
|
|
240
|
+
created_at?: Date;
|
|
241
|
+
tags: string;
|
|
242
|
+
};
|
|
243
|
+
|
|
244
|
+
type Activity = {
|
|
245
|
+
id: number;
|
|
246
|
+
name: string;
|
|
247
|
+
type: string;
|
|
248
|
+
endpoint: string;
|
|
249
|
+
auth_required: boolean;
|
|
250
|
+
total_fields: number;
|
|
251
|
+
app: App;
|
|
252
|
+
activity_output: string | null;
|
|
253
|
+
activity_output_url: string | null;
|
|
254
|
+
dynamic_field_data_endpoint: string | null;
|
|
255
|
+
};
|
|
256
|
+
|
|
257
|
+
export type AuthorizationType = {
|
|
258
|
+
id: number;
|
|
259
|
+
type: string;
|
|
260
|
+
authorizations: Authorization[];
|
|
261
|
+
provider: string;
|
|
262
|
+
is_sandbox_enabled: boolean;
|
|
263
|
+
is_userinfo_required?: boolean;
|
|
264
|
+
authorization_url_sandbox: string;
|
|
265
|
+
app: {
|
|
266
|
+
icon_url: string;
|
|
267
|
+
id: number;
|
|
268
|
+
name: string;
|
|
269
|
+
};
|
|
270
|
+
};
|
|
271
|
+
|
|
272
|
+
export type IntegryStep = {
|
|
273
|
+
id: number;
|
|
274
|
+
weight: number;
|
|
275
|
+
title: string;
|
|
276
|
+
is_visible: boolean;
|
|
277
|
+
activity: Activity;
|
|
278
|
+
hide_authorization: boolean;
|
|
279
|
+
source_steps: any;
|
|
280
|
+
};
|
|
281
|
+
|
|
282
|
+
export interface TemplateResponse {
|
|
283
|
+
id: number;
|
|
284
|
+
name: string;
|
|
285
|
+
description: string;
|
|
286
|
+
app: App;
|
|
287
|
+
branding_app: App;
|
|
288
|
+
button_text: string | null;
|
|
289
|
+
is_wizard: boolean;
|
|
290
|
+
steps: IntegryStep[];
|
|
291
|
+
publishing_status: string;
|
|
292
|
+
level?: number;
|
|
293
|
+
parent_id?: number;
|
|
294
|
+
execution_type?: 'ON_DEMAND' | 'AUTOMATIC';
|
|
295
|
+
execution_behaviour?: 'SAVE_ONLY' | 'SAVE_AND_EXECUTE';
|
|
296
|
+
parameters?: Record<string, any>;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
export interface UiFieldDataSource {
|
|
300
|
+
body: Record<string, unknown>;
|
|
301
|
+
headers: Record<string, string>;
|
|
302
|
+
method: string;
|
|
303
|
+
url: string;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
export interface UiField {
|
|
307
|
+
is_multiselect: boolean;
|
|
308
|
+
option_key_path: string;
|
|
309
|
+
type: string;
|
|
310
|
+
value_key_path: string;
|
|
311
|
+
data_source: UiFieldDataSource;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
export interface TemplateField {
|
|
315
|
+
id: number;
|
|
316
|
+
is_required: boolean;
|
|
317
|
+
is_hidden: boolean;
|
|
318
|
+
default_value: string | null;
|
|
319
|
+
weight: number;
|
|
320
|
+
description: string;
|
|
321
|
+
summary: string | null;
|
|
322
|
+
activity_field: {
|
|
323
|
+
is_editable?: boolean;
|
|
324
|
+
id: number;
|
|
325
|
+
machine_name: string;
|
|
326
|
+
type: string;
|
|
327
|
+
title: string;
|
|
328
|
+
description: string;
|
|
329
|
+
weight: number;
|
|
330
|
+
is_required: boolean;
|
|
331
|
+
child_fields: string | null;
|
|
332
|
+
placeholder: string | null;
|
|
333
|
+
is_dynamic: boolean;
|
|
334
|
+
data_src: string | null;
|
|
335
|
+
data_src_endpoint: number | null;
|
|
336
|
+
parent_fields: string | null;
|
|
337
|
+
dynamic_field_src: string | null;
|
|
338
|
+
default_value: string | null;
|
|
339
|
+
auto_machine_name: string;
|
|
340
|
+
dynamic_field_src_endpoint: number | null;
|
|
341
|
+
regex: string | null;
|
|
342
|
+
regex_error_message?: string | null;
|
|
343
|
+
is_searchable: boolean;
|
|
344
|
+
conditional_fields?: string | null;
|
|
345
|
+
} | null;
|
|
346
|
+
title: string | null;
|
|
347
|
+
type: string;
|
|
348
|
+
placeholder: string | null;
|
|
349
|
+
// manual_template: unknown | null;
|
|
350
|
+
child_field: string | null;
|
|
351
|
+
child_field_value: string | null;
|
|
352
|
+
// template_fields: unknown[];
|
|
353
|
+
button_text: string | null;
|
|
354
|
+
// field_actions: unknown[];
|
|
355
|
+
icon_url: string | null;
|
|
356
|
+
long_description: string | null;
|
|
357
|
+
regex: string | null;
|
|
358
|
+
regex_msg: string | null;
|
|
359
|
+
is_visible: boolean;
|
|
360
|
+
app_user_data?: {
|
|
361
|
+
app_user: number;
|
|
362
|
+
id: number;
|
|
363
|
+
value: string | number;
|
|
364
|
+
is_changed: boolean;
|
|
365
|
+
changed_dynamic_fields: string;
|
|
366
|
+
}[];
|
|
367
|
+
added_in_mapping?: boolean;
|
|
368
|
+
field_mapping_source?: string;
|
|
369
|
+
is_mappable: boolean;
|
|
370
|
+
is_editable: boolean;
|
|
371
|
+
allow_tags_in_text: boolean;
|
|
372
|
+
is_default_value_auto_mapped?: boolean;
|
|
373
|
+
source_flow_integration_invocation_url?: string;
|
|
374
|
+
is_multiselect?: boolean;
|
|
375
|
+
template_fields?: any[];
|
|
376
|
+
ui_field?: UiField;
|
|
377
|
+
is_button_enabled?: boolean;
|
|
378
|
+
on_button_click_script?: string;
|
|
379
|
+
button_script_requires_auth_token?: boolean;
|
|
380
|
+
data_type?: string;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
export interface DynamicField {
|
|
384
|
+
id: number;
|
|
385
|
+
is_required: boolean;
|
|
386
|
+
is_hidden: boolean;
|
|
387
|
+
default_value: string | null;
|
|
388
|
+
weight: number;
|
|
389
|
+
description: string;
|
|
390
|
+
summary: string | null;
|
|
391
|
+
title: string | null;
|
|
392
|
+
type: string;
|
|
393
|
+
placeholder: string | null;
|
|
394
|
+
// manual_template: unknown | null;
|
|
395
|
+
child_field: string | null;
|
|
396
|
+
child_field_value: string | null;
|
|
397
|
+
// template_fields: unknown[];
|
|
398
|
+
button_text: string | null;
|
|
399
|
+
// field_actions: unknown[];
|
|
400
|
+
icon_url: string | null;
|
|
401
|
+
long_description: string | null;
|
|
402
|
+
regex: string | null;
|
|
403
|
+
regex_msg: string | null;
|
|
404
|
+
is_visible: boolean;
|
|
405
|
+
app_user_data?: {
|
|
406
|
+
app_user: number;
|
|
407
|
+
id: number;
|
|
408
|
+
value: string | number;
|
|
409
|
+
is_changed: boolean;
|
|
410
|
+
changed_dynamic_fields: string;
|
|
411
|
+
}[];
|
|
412
|
+
added_in_mapping?: boolean;
|
|
413
|
+
field_mapping_source?: string;
|
|
414
|
+
is_mappable: boolean;
|
|
415
|
+
is_editable: boolean;
|
|
416
|
+
allow_tags_in_text: boolean;
|
|
417
|
+
is_default_value_auto_mapped?: boolean;
|
|
418
|
+
source_flow_integration_invocation_url?: string;
|
|
419
|
+
is_multiselect?: boolean;
|
|
420
|
+
template_fields?: any[];
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
export interface ConditionalFields {
|
|
424
|
+
value: string;
|
|
425
|
+
field_array: string;
|
|
426
|
+
}
|
|
427
|
+
export interface TemplateStep {
|
|
428
|
+
id: number;
|
|
429
|
+
weight: number;
|
|
430
|
+
title: string;
|
|
431
|
+
description?: string;
|
|
432
|
+
is_visible: boolean;
|
|
433
|
+
activity: Activity;
|
|
434
|
+
authorization_type: AuthorizationType;
|
|
435
|
+
template_fields: TemplateField[];
|
|
436
|
+
step_instance?: number | null;
|
|
437
|
+
allow_multiple_authorizations: boolean;
|
|
438
|
+
step_authorization: number | null;
|
|
439
|
+
button_text: string | null;
|
|
440
|
+
is_self_step: boolean;
|
|
441
|
+
summary: string | null;
|
|
442
|
+
is_workspace_app_step: boolean;
|
|
443
|
+
auth_description: string | null;
|
|
444
|
+
hide_authorization: boolean;
|
|
445
|
+
// step_condition: unknown | null;
|
|
446
|
+
machine_name: string | null;
|
|
447
|
+
is_custom_machine_name: boolean;
|
|
448
|
+
source_steps: any;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
export interface InitConfig {
|
|
452
|
+
containerId: string;
|
|
453
|
+
templateContainerId?: string;
|
|
454
|
+
renderMode: TemplateFormRenderModes;
|
|
455
|
+
renderFlowsMode?: TemplateFormRenderModes;
|
|
456
|
+
renderFlowSetupMode?: TemplateFormRenderModes;
|
|
457
|
+
renderAppsPageMode?: TemplateFormRenderModes;
|
|
458
|
+
renderAppPageMode?: TemplateFormRenderModes;
|
|
459
|
+
appId?: number;
|
|
460
|
+
showApps?: boolean;
|
|
461
|
+
showTemplates?: boolean;
|
|
462
|
+
skipOnDemand?: boolean;
|
|
463
|
+
skipAccountConnectionOnLoad?: boolean;
|
|
464
|
+
deploymentIdFromConfig?: number;
|
|
465
|
+
testMultipurpose?: boolean;
|
|
466
|
+
viewStyle?: string;
|
|
467
|
+
flowId?: number;
|
|
468
|
+
integrationId?: number;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
export interface MarketplaceConfig {
|
|
472
|
+
containerId: string;
|
|
473
|
+
renderMode: MarketplaceRenderModes;
|
|
474
|
+
apps?: any;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
export interface AppFlowConfig {
|
|
478
|
+
containerId: string;
|
|
479
|
+
renderMode: MarketplaceRenderModes;
|
|
480
|
+
appId: number;
|
|
481
|
+
}
|
|
482
|
+
export interface IntegrationResponse {
|
|
483
|
+
id: number;
|
|
484
|
+
guid: string;
|
|
485
|
+
name: string;
|
|
486
|
+
notification_email: string;
|
|
487
|
+
bundle_name: string;
|
|
488
|
+
template: number;
|
|
489
|
+
template_detail: {
|
|
490
|
+
id: number;
|
|
491
|
+
name: string;
|
|
492
|
+
description: string;
|
|
493
|
+
};
|
|
494
|
+
steps: {
|
|
495
|
+
id: number;
|
|
496
|
+
endpoint: string | null;
|
|
497
|
+
authorization: string | number | null;
|
|
498
|
+
app_user_data: {
|
|
499
|
+
id: number;
|
|
500
|
+
value: string;
|
|
501
|
+
template_field: number;
|
|
502
|
+
}[];
|
|
503
|
+
template_step: number;
|
|
504
|
+
returned_data: null | string;
|
|
505
|
+
verb?: string | null;
|
|
506
|
+
}[];
|
|
507
|
+
is_visible: number;
|
|
508
|
+
parent_integration: number | null;
|
|
509
|
+
status: string;
|
|
510
|
+
is_test_integration: boolean;
|
|
511
|
+
task_execution: {
|
|
512
|
+
last_execution_at: string | null;
|
|
513
|
+
status: string | null;
|
|
514
|
+
integration_created_at: string;
|
|
515
|
+
};
|
|
516
|
+
created: string;
|
|
517
|
+
last_modified: string;
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
export interface ActivityCustomField {
|
|
521
|
+
value: string;
|
|
522
|
+
tag: string;
|
|
523
|
+
text: string;
|
|
524
|
+
sample_data: string;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
export interface TemplatePreviewData {
|
|
528
|
+
id: number;
|
|
529
|
+
name: string;
|
|
530
|
+
description: string;
|
|
531
|
+
app: App;
|
|
532
|
+
branding_app: App;
|
|
533
|
+
button_text: string | null;
|
|
534
|
+
is_wizard: boolean;
|
|
535
|
+
publishing_status: string;
|
|
536
|
+
level?: number;
|
|
537
|
+
parent_id?: number;
|
|
538
|
+
steps: TemplateStep[];
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
export const TemplatePreviewDataType: any = object({
|
|
542
|
+
id: number(),
|
|
543
|
+
name: string(),
|
|
544
|
+
description: string(),
|
|
545
|
+
app: object({
|
|
546
|
+
id: number(),
|
|
547
|
+
name: string(),
|
|
548
|
+
description: string(),
|
|
549
|
+
icon_url: string(),
|
|
550
|
+
color: string(),
|
|
551
|
+
publishing_status: string(),
|
|
552
|
+
category: array(string()),
|
|
553
|
+
app_type: optional(string()),
|
|
554
|
+
action_url: nullable(optional(string())),
|
|
555
|
+
created_at: optional(date()),
|
|
556
|
+
tags: string(),
|
|
557
|
+
}),
|
|
558
|
+
branding_app: object({
|
|
559
|
+
id: number(),
|
|
560
|
+
name: string(),
|
|
561
|
+
description: string(),
|
|
562
|
+
icon_url: string(),
|
|
563
|
+
color: string(),
|
|
564
|
+
publishing_status: string(),
|
|
565
|
+
category: array(string()),
|
|
566
|
+
app_type: optional(string()),
|
|
567
|
+
action_url: nullable(optional(string())),
|
|
568
|
+
created_at: optional(date()),
|
|
569
|
+
tags: string(),
|
|
570
|
+
}),
|
|
571
|
+
button_text: nullable(string()),
|
|
572
|
+
is_wizard: boolean(),
|
|
573
|
+
publishing_status: string(),
|
|
574
|
+
steps: size(
|
|
575
|
+
array(
|
|
576
|
+
object({
|
|
577
|
+
id: number(),
|
|
578
|
+
weight: number(),
|
|
579
|
+
title: string(),
|
|
580
|
+
is_visible: boolean(),
|
|
581
|
+
is_workspace_app_step: boolean(),
|
|
582
|
+
activity: object({
|
|
583
|
+
id: number(),
|
|
584
|
+
name: string(),
|
|
585
|
+
type: string(),
|
|
586
|
+
endpoint: string(),
|
|
587
|
+
auth_required: boolean(),
|
|
588
|
+
total_fields: number(),
|
|
589
|
+
app: object({
|
|
590
|
+
id: number(),
|
|
591
|
+
name: string(),
|
|
592
|
+
description: string(),
|
|
593
|
+
icon_url: string(),
|
|
594
|
+
color: string(),
|
|
595
|
+
publishing_status: string(),
|
|
596
|
+
category: array(string()),
|
|
597
|
+
app_type: optional(string()),
|
|
598
|
+
action_url: nullable(optional(string())),
|
|
599
|
+
created_at: optional(date()),
|
|
600
|
+
tags: string(),
|
|
601
|
+
}),
|
|
602
|
+
activity_output: nullable(string()),
|
|
603
|
+
activity_output_url: nullable(string()),
|
|
604
|
+
dynamic_field_data_endpoint: nullable(string()),
|
|
605
|
+
}),
|
|
606
|
+
authorization_type: object({
|
|
607
|
+
id: number(),
|
|
608
|
+
type: string(),
|
|
609
|
+
authorizations: array(
|
|
610
|
+
object({
|
|
611
|
+
id: number(),
|
|
612
|
+
authorization_type: string(),
|
|
613
|
+
app_user: optional(number()),
|
|
614
|
+
app_user_id: optional(number()),
|
|
615
|
+
disable_link: optional(string()),
|
|
616
|
+
integration_count: optional(number()),
|
|
617
|
+
user_identity: string(),
|
|
618
|
+
}),
|
|
619
|
+
),
|
|
620
|
+
provider: string(),
|
|
621
|
+
is_sandbox_enabled: boolean(),
|
|
622
|
+
is_userinfo_required: optional(boolean()),
|
|
623
|
+
authorization_url_sandbox: string(),
|
|
624
|
+
app: object({
|
|
625
|
+
id: number(),
|
|
626
|
+
name: string(),
|
|
627
|
+
icon_url: string(),
|
|
628
|
+
}),
|
|
629
|
+
}),
|
|
630
|
+
template_fields: array(
|
|
631
|
+
object({
|
|
632
|
+
id: number(),
|
|
633
|
+
is_required: boolean(),
|
|
634
|
+
is_hidden: boolean(),
|
|
635
|
+
default_value: nullable(string()),
|
|
636
|
+
weight: number(),
|
|
637
|
+
description: string(),
|
|
638
|
+
summary: nullable(string()),
|
|
639
|
+
placeholder: nullable(string()),
|
|
640
|
+
added_in_mapping: optional(boolean()),
|
|
641
|
+
field_mapping_source: optional(string()),
|
|
642
|
+
activity_field: nullable(
|
|
643
|
+
object({
|
|
644
|
+
id: number(),
|
|
645
|
+
machine_name: string(),
|
|
646
|
+
type: string(),
|
|
647
|
+
title: string(),
|
|
648
|
+
description: string(),
|
|
649
|
+
weight: number(),
|
|
650
|
+
placeholder: nullable(string()),
|
|
651
|
+
is_required: boolean(),
|
|
652
|
+
child_fields: nullable(string()),
|
|
653
|
+
is_dynamic: boolean(),
|
|
654
|
+
data_src: nullable(string()),
|
|
655
|
+
data_src_endpoint: nullable(number()),
|
|
656
|
+
parent_fields: nullable(string()),
|
|
657
|
+
dynamic_field_src: nullable(string()),
|
|
658
|
+
default_value: nullable(string()),
|
|
659
|
+
auto_machine_name: string(),
|
|
660
|
+
dynamic_field_src_endpoint: nullable(number()),
|
|
661
|
+
regex: nullable(string()),
|
|
662
|
+
is_searchable: boolean(),
|
|
663
|
+
conditional_fields: nullable(optional(string())),
|
|
664
|
+
}),
|
|
665
|
+
),
|
|
666
|
+
title: nullable(string()),
|
|
667
|
+
type: string(),
|
|
668
|
+
// manual_template: unknown | null;
|
|
669
|
+
child_field: nullable(string()),
|
|
670
|
+
child_field_value: nullable(string()),
|
|
671
|
+
// template_fields: unknown[];
|
|
672
|
+
button_text: nullable(string()),
|
|
673
|
+
// field_actions: unknown[];
|
|
674
|
+
icon_url: nullable(string()),
|
|
675
|
+
long_description: nullable(string()),
|
|
676
|
+
regex: nullable(string()),
|
|
677
|
+
regex_msg: nullable(string()),
|
|
678
|
+
is_visible: boolean(),
|
|
679
|
+
}),
|
|
680
|
+
),
|
|
681
|
+
// step_instance: unknown | null;
|
|
682
|
+
allow_multiple_authorizations: boolean(),
|
|
683
|
+
step_authorization: nullable(number()),
|
|
684
|
+
button_text: nullable(string()),
|
|
685
|
+
is_self_step: boolean(),
|
|
686
|
+
summary: nullable(string()),
|
|
687
|
+
auth_description: nullable(string()),
|
|
688
|
+
hide_authorization: boolean(),
|
|
689
|
+
// step_condition: unknown | null;
|
|
690
|
+
machine_name: nullable(string()),
|
|
691
|
+
step_instance: optional(nullable(number())),
|
|
692
|
+
is_custom_machine_name: boolean(),
|
|
693
|
+
}),
|
|
694
|
+
),
|
|
695
|
+
0,
|
|
696
|
+
Number.POSITIVE_INFINITY,
|
|
697
|
+
),
|
|
698
|
+
});
|
|
699
|
+
|
|
700
|
+
export interface PreviewMetadata {
|
|
701
|
+
stepId: number | null;
|
|
702
|
+
type: 'AUTH' | 'CONFIGURATION' | 'CONFIRMATION' | 'SECTION';
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
export interface PreviewPayload {
|
|
706
|
+
templateData: TemplatePreviewData;
|
|
707
|
+
metadata: PreviewMetadata;
|
|
708
|
+
previewContainerId: string;
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
export enum AppConnectionStatus {
|
|
712
|
+
VERIFYING = 'VERIFYING',
|
|
713
|
+
CONNECTED = 'CONNECTED',
|
|
714
|
+
ERROR = 'ERROR',
|
|
715
|
+
NONE = '',
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
export enum IntegrationStatus {
|
|
719
|
+
PUBLISHED = 'PUBLISHED',
|
|
720
|
+
DRAFT = 'DRAFT',
|
|
721
|
+
ARCHIVED = 'ARCHIVED',
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
export enum MediaType {
|
|
725
|
+
IMAGE = 'IMAGE',
|
|
726
|
+
VIDEO = 'VIDEO',
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
export interface MarketplaceDetail {
|
|
730
|
+
accept_app_requests: boolean;
|
|
731
|
+
name: string;
|
|
732
|
+
templates?: { description: string; id: number; name: string }[];
|
|
733
|
+
}
|
|
734
|
+
export interface MarketplaceAppAuthorizationType {
|
|
735
|
+
id: number;
|
|
736
|
+
type: string;
|
|
737
|
+
default_authorization: number;
|
|
738
|
+
provider: string;
|
|
739
|
+
is_sandbox_enabled: boolean;
|
|
740
|
+
authorization_url_sandbox: string;
|
|
741
|
+
authorizations: Authorization[];
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
export interface ConnectedAccount {
|
|
745
|
+
id: string;
|
|
746
|
+
display_name: string;
|
|
747
|
+
modified_at: string;
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
export interface MarketplaceApp {
|
|
751
|
+
id: number;
|
|
752
|
+
name: string;
|
|
753
|
+
title: string;
|
|
754
|
+
connected_accounts?: ConnectedAccount[];
|
|
755
|
+
description: string;
|
|
756
|
+
icon_url: string;
|
|
757
|
+
color: string;
|
|
758
|
+
publishing_status: string;
|
|
759
|
+
category: string[];
|
|
760
|
+
app_type: string;
|
|
761
|
+
authorization_type: MarketplaceAppAuthorizationType;
|
|
762
|
+
docs_url: string;
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
export interface MarketplaceAppIntegration {
|
|
766
|
+
id: number;
|
|
767
|
+
name: string;
|
|
768
|
+
description: string;
|
|
769
|
+
status: IntegrationStatus;
|
|
770
|
+
version: number;
|
|
771
|
+
meta?: {
|
|
772
|
+
created: string;
|
|
773
|
+
has_runs: boolean;
|
|
774
|
+
integration_id: number;
|
|
775
|
+
integration_name: string;
|
|
776
|
+
is_deleted: boolean;
|
|
777
|
+
last_run_end_time: string;
|
|
778
|
+
last_run_start_time: string;
|
|
779
|
+
last_run_status: string;
|
|
780
|
+
status: string;
|
|
781
|
+
};
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
export interface MediaObject {
|
|
785
|
+
id: number;
|
|
786
|
+
url: string;
|
|
787
|
+
type: MediaType;
|
|
788
|
+
index?: number;
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
export interface UploadFileObj {
|
|
792
|
+
id?: number;
|
|
793
|
+
url: string;
|
|
794
|
+
type: MediaType;
|
|
795
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
796
|
+
file?: any;
|
|
797
|
+
uploading?: boolean;
|
|
798
|
+
index?: number;
|
|
799
|
+
}
|
|
800
|
+
export interface MarketplaceAppBundle {
|
|
801
|
+
id: number;
|
|
802
|
+
created: Date;
|
|
803
|
+
modified: Date;
|
|
804
|
+
app: MarketplaceApp;
|
|
805
|
+
integrations?: MarketplaceAppIntegration[];
|
|
806
|
+
connectionStatus?: AppConnectionStatus;
|
|
807
|
+
long_description?: string;
|
|
808
|
+
media?: MediaObject[];
|
|
809
|
+
}
|
|
810
|
+
export interface AppRequestFormData {
|
|
811
|
+
app: string;
|
|
812
|
+
description: string;
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
export interface FileUploadFormData {
|
|
816
|
+
file: File;
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
// interface for app flows
|
|
820
|
+
export interface Instance {
|
|
821
|
+
status: string;
|
|
822
|
+
last_run_status: string;
|
|
823
|
+
id: number;
|
|
824
|
+
last_run_start_time: string;
|
|
825
|
+
name: string;
|
|
826
|
+
error_app_name: string;
|
|
827
|
+
error_code: number;
|
|
828
|
+
first_error_received_at: string;
|
|
829
|
+
usage_limit_reached_at: string;
|
|
830
|
+
is_test_integration: boolean;
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
export interface BrandingAppAuthorizationType {
|
|
834
|
+
id: number;
|
|
835
|
+
type: string;
|
|
836
|
+
authorizations: { id: number; user_identity: string }[];
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
export interface BrandingApp {
|
|
840
|
+
id: number;
|
|
841
|
+
name: string;
|
|
842
|
+
icon_url: string;
|
|
843
|
+
authorization_type: BrandingAppAuthorizationType;
|
|
844
|
+
default_bundle_id: number;
|
|
845
|
+
}
|
|
846
|
+
export interface Flow {
|
|
847
|
+
id: number;
|
|
848
|
+
name: string;
|
|
849
|
+
description: null;
|
|
850
|
+
execution_type: 'ON_DEMAND' | 'AUTOMATIC';
|
|
851
|
+
allow_multiple_instances: boolean;
|
|
852
|
+
instances: Instance[];
|
|
853
|
+
execution_behaviour: 'SAVE_ONLY' | 'SAVE_AND_EXECUTE';
|
|
854
|
+
button_text: string;
|
|
855
|
+
branding_app?: BrandingApp;
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
export interface AppFlowsResponse {
|
|
859
|
+
count: number;
|
|
860
|
+
total_pages: number;
|
|
861
|
+
results: Flow[];
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
// Flow execution response:
|
|
865
|
+
export interface ExecuteFlowResponse {
|
|
866
|
+
status: string;
|
|
867
|
+
response: {
|
|
868
|
+
status_code: string;
|
|
869
|
+
status_code_description: string;
|
|
870
|
+
body: string;
|
|
871
|
+
headers: string;
|
|
872
|
+
};
|
|
873
|
+
request: {
|
|
874
|
+
method: string;
|
|
875
|
+
url: string;
|
|
876
|
+
body: string;
|
|
877
|
+
headers: string;
|
|
878
|
+
};
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
export interface IncomingWebhookObject {
|
|
882
|
+
payload: string;
|
|
883
|
+
name: string;
|
|
884
|
+
id: number;
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
export interface IncomingWebhookPayload {
|
|
888
|
+
[fieldId: string]: string | Record<string, string>;
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
export interface MultipurposeFieldType {
|
|
892
|
+
activityOutputData: NestedObject;
|
|
893
|
+
activityOutputDataRaw?: NestedObject;
|
|
894
|
+
title: string;
|
|
895
|
+
description: string;
|
|
896
|
+
placeholder: string;
|
|
897
|
+
value?: string;
|
|
898
|
+
regex?: string | null;
|
|
899
|
+
regexErrorMessage?: string | null;
|
|
900
|
+
isRequired?: boolean;
|
|
901
|
+
showStepValidation?: boolean;
|
|
902
|
+
onChange?: (val: string, passesRegexTest?: boolean) => void;
|
|
903
|
+
isReadOnly?: boolean;
|
|
904
|
+
isChanged?: boolean;
|
|
905
|
+
className?: string;
|
|
906
|
+
containerClass: string;
|
|
907
|
+
type: string;
|
|
908
|
+
key: string;
|
|
909
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
910
|
+
apiHandler?: any;
|
|
911
|
+
isSearchable: boolean;
|
|
912
|
+
endpointUrl: string;
|
|
913
|
+
isDynamic: boolean;
|
|
914
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
915
|
+
endpointData?: any;
|
|
916
|
+
skipOptionFetch: boolean;
|
|
917
|
+
isMappable?: boolean;
|
|
918
|
+
accountConnected?: boolean;
|
|
919
|
+
isEditable?: boolean;
|
|
920
|
+
allowTagsInText?: boolean;
|
|
921
|
+
hideTabs?: boolean;
|
|
922
|
+
fieldId?: string;
|
|
923
|
+
enableTagify?: boolean;
|
|
924
|
+
}
|