app-v3-scripts-editor 1.32.1 → 1.33.1
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/app-v3-scripts-editor.css +1 -1
- package/dist/app-v3-scripts-editor.es.js +42764 -40715
- package/dist/app-v3-scripts-editor.umd.js +217 -217
- package/dist/src/lib/components/Blocks/Condition/types.d.ts +6 -1
- package/dist/src/lib/components/Blocks/DataCRM/block.d.ts +3 -0
- package/dist/src/lib/components/Blocks/DataCRM/index.css.d.ts +18 -0
- package/dist/src/lib/components/Blocks/DataCRM/index.d.ts +4 -0
- package/dist/src/lib/components/Blocks/DataCRM/index.settings.d.ts +3 -0
- package/dist/src/lib/components/Blocks/DataCRM/node.d.ts +3 -0
- package/dist/src/lib/components/Blocks/DataCRM/setting/Action.d.ts +2 -0
- package/dist/src/lib/components/Blocks/DataCRM/setting/CreateAction.d.ts +6 -0
- package/dist/src/lib/components/Blocks/DataCRM/setting/GetDataAction.d.ts +6 -0
- package/dist/src/lib/components/Blocks/DataCRM/setting/Output.d.ts +7 -0
- package/dist/src/lib/components/Blocks/DataCRM/setting/UpdateAction.d.ts +6 -0
- package/dist/src/lib/components/Blocks/DataCRM/types.d.ts +65 -0
- package/dist/src/lib/components/Blocks/HttpRequest/block.d.ts +3 -0
- package/dist/src/lib/components/Blocks/HttpRequest/index.css.d.ts +19 -0
- package/dist/src/lib/components/Blocks/HttpRequest/index.d.ts +4 -0
- package/dist/src/lib/components/Blocks/HttpRequest/index.settings.d.ts +3 -0
- package/dist/src/lib/components/Blocks/HttpRequest/node.d.ts +3 -0
- package/dist/src/lib/components/Blocks/HttpRequest/setting/Action.d.ts +3 -0
- package/dist/src/lib/components/Blocks/HttpRequest/setting/Output.d.ts +7 -0
- package/dist/src/lib/components/Blocks/HttpRequest/setting/Setting.d.ts +3 -0
- package/dist/src/lib/components/Blocks/HttpRequest/setting/helpers.d.ts +12 -0
- package/dist/src/lib/components/Blocks/HttpRequest/types.d.ts +71 -0
- package/dist/src/lib/components/Blocks/SmsCampaign/block.d.ts +3 -0
- package/dist/src/lib/components/Blocks/SmsCampaign/index.css.d.ts +12 -0
- package/dist/src/lib/components/Blocks/SmsCampaign/index.d.ts +4 -0
- package/dist/src/lib/components/Blocks/SmsCampaign/index.settings.d.ts +3 -0
- package/dist/src/lib/components/Blocks/SmsCampaign/node.d.ts +3 -0
- package/dist/src/lib/components/Blocks/SmsCampaign/setting/Action.d.ts +2 -0
- package/dist/src/lib/components/Blocks/SmsCampaign/setting/Output.d.ts +7 -0
- package/dist/src/lib/components/Blocks/SmsCampaign/setting/Setting.d.ts +2 -0
- package/dist/src/lib/components/Blocks/SmsCampaign/types.d.ts +26 -0
- package/dist/src/lib/components/Blocks/Task/block.d.ts +3 -0
- package/dist/src/lib/components/Blocks/Task/index.css.d.ts +1 -0
- package/dist/src/lib/components/Blocks/Task/index.d.ts +4 -0
- package/dist/src/lib/components/Blocks/Task/index.settings.d.ts +3 -0
- package/dist/src/lib/components/Blocks/Task/node.d.ts +3 -0
- package/dist/src/lib/components/Blocks/Task/setting/Action.d.ts +2 -0
- package/dist/src/lib/components/Blocks/Task/setting/CreateAction.d.ts +2 -0
- package/dist/src/lib/components/Blocks/Task/setting/GetDataAction.d.ts +2 -0
- package/dist/src/lib/components/Blocks/Task/setting/Output.d.ts +7 -0
- package/dist/src/lib/components/Blocks/Task/setting/UpdateAction.d.ts +2 -0
- package/dist/src/lib/components/Blocks/Task/types.d.ts +44 -0
- package/dist/src/lib/components/Blocks/Transfer/index.css.d.ts +30 -3
- package/dist/src/lib/components/Blocks/Transfer/settings/TransferDynamicSettings.d.ts +2 -0
- package/dist/src/lib/components/Blocks/Transfer/types.d.ts +14 -11
- package/dist/src/lib/components/Selector/Campaign/index.d.ts +1 -1
- package/dist/src/lib/components/Selector/Option/variable.d.ts +1 -0
- package/dist/src/lib/components/Selector/Task/index.d.ts +7 -0
- package/dist/src/lib/components/Selector/User/variable.d.ts +1 -0
- package/dist/src/lib/components/Shared/FieldSetting/index.d.ts +1 -1
- package/dist/src/lib/components/Shared/GroupCondition/index.d.ts +1 -1
- package/dist/src/lib/components/Shared/SuggestVariableNode/type.d.ts +2 -1
- package/dist/src/lib/components/Shared/VariableSuggestSelect/helpers.d.ts +6 -1
- package/dist/src/lib/components/Shared/VariableSuggestSelect/index.d.ts +1 -1
- package/dist/src/lib/components/Shared/VariableSuggestSelect/types.d.ts +2 -1
- package/dist/src/lib/constants/block-types.d.ts +5 -2
- package/dist/src/lib/constants/common.d.ts +2 -0
- package/dist/src/lib/constants/initial-script.d.ts +19 -2
- package/dist/src/lib/constants/node-types.d.ts +7 -1
- package/dist/src/lib/styles/colors.d.ts +1 -0
- package/dist/src/services/task/useInfiniteTask.d.ts +9 -0
- package/dist/src/services/types.d.ts +14 -2
- package/package.json +1 -1
|
@@ -7,7 +7,7 @@ export interface VariableLeaf {
|
|
|
7
7
|
objectLabel?: string;
|
|
8
8
|
type: DATA_TYPE_PROPERTY;
|
|
9
9
|
slug: string;
|
|
10
|
-
|
|
10
|
+
fullname?: string[];
|
|
11
11
|
fullPath: string;
|
|
12
12
|
value: string;
|
|
13
13
|
order?: number;
|
|
@@ -33,6 +33,7 @@ export interface UseVariableSuggestOptions {
|
|
|
33
33
|
export interface VariableGroupOption {
|
|
34
34
|
id?: string;
|
|
35
35
|
label: string;
|
|
36
|
+
fullname?: string[];
|
|
36
37
|
type: string;
|
|
37
38
|
node_type?: BlockType;
|
|
38
39
|
order?: number;
|
|
@@ -6,6 +6,10 @@ import { VariableSelectLabeledValue, VariableSelectValue } from './types';
|
|
|
6
6
|
export declare const isLabeledValue: (value: unknown) => value is VariableSelectLabeledValue;
|
|
7
7
|
export declare const extractValueString: (value: unknown) => string;
|
|
8
8
|
export declare const readDisplayTitle: (option?: DefaultOptionType | VariableSelectLabeledValue) => string;
|
|
9
|
+
type VariableLabelSource = Pick<VariableLeaf, "fullname" | "fullPath" | "slug">;
|
|
10
|
+
export declare const readVariableLeafLabel: (data?: VariableLabelSource) => string;
|
|
11
|
+
export declare const readVariableDisplayLabel: (data?: VariableLabelSource, separator?: string) => string;
|
|
12
|
+
export declare const readVariableSearchTarget: (data: VariableLabelSource) => string;
|
|
9
13
|
export declare function filterOptionsByKeyword(opt: VariableAutoCompleteOption, keyword: string): VariableAutoCompleteOption | null;
|
|
10
14
|
export declare const normalizeValues: (value?: VariableSelectValue) => string[];
|
|
11
15
|
export declare const buildVariableValueString: (data: VariableLeaf, mode?: OutputMode) => string;
|
|
@@ -22,10 +26,11 @@ export declare const buildDeletedVariableMeta: (value: string) => {
|
|
|
22
26
|
object: string;
|
|
23
27
|
type: DATA_TYPE_PROPERTY.singlelineproperty;
|
|
24
28
|
slug: string;
|
|
25
|
-
|
|
29
|
+
fullname: string[];
|
|
26
30
|
fullPath: string;
|
|
27
31
|
value: string;
|
|
28
32
|
mode: "ALL_MATCHES" | "FIRST_MATCH" | "SPECIFIC_FIELD" | "COUNT";
|
|
29
33
|
isDeleted: true;
|
|
30
34
|
};
|
|
31
35
|
export declare const buildOptionMap: (options?: SelectProps["options"]) => Map<string, DefaultOptionType>;
|
|
36
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { VariableSuggestSelectProps } from './types';
|
|
2
|
-
export declare const VariableSuggestSelect: ({ defaultOptions, variableFilterTypes, tabLabels, onVariableInsert, dropdownClassName, options, open: controlledOpen, onDropdownVisibleChange, onSearch: externalOnSearch, onChange: externalOnChange, onSelect: externalOnSelect, getPopupContainer, showSearch, children, value: controlledValue, defaultValue, mode: selectMode, tagRender, className, labelInValue, onClear, ...restProps }: VariableSuggestSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const VariableSuggestSelect: ({ defaultOptions, variableFilterTypes, tabLabels, onVariableInsert, exclusiveTabSelection, dropdownClassName, options, open: controlledOpen, onDropdownVisibleChange, onSearch: externalOnSearch, onChange: externalOnChange, onSelect: externalOnSelect, getPopupContainer, showSearch, children, value: controlledValue, defaultValue, mode: selectMode, tagRender, className, labelInValue, onClear, ...restProps }: VariableSuggestSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default function VariableSuggestSelectWithProvider(props: VariableSuggestSelectProps): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export type { TabKey, TabLabels, VariableSuggestSelectProps } from './types';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SelectProps } from 'antd';
|
|
2
2
|
import { DefaultOptionType } from 'antd/es/select';
|
|
3
|
-
import { DATA_TYPE_PROPERTY } from '../../../constants/common';
|
|
4
3
|
import { ReactNode } from 'react';
|
|
4
|
+
import { DATA_TYPE_PROPERTY } from '../../../constants/common';
|
|
5
5
|
import { VariableLeaf } from '../SuggestVariableNode/type';
|
|
6
6
|
export type TabKey = "default" | "variables";
|
|
7
7
|
export type TabLabels = {
|
|
@@ -24,4 +24,5 @@ export interface VariableSuggestSelectProps extends SelectProps<VariableSelectVa
|
|
|
24
24
|
variableFilterTypes?: DATA_TYPE_PROPERTY[];
|
|
25
25
|
tabLabels?: TabLabels;
|
|
26
26
|
onVariableInsert?: (value: string) => void;
|
|
27
|
+
exclusiveTabSelection?: boolean;
|
|
27
28
|
}
|
|
@@ -6,7 +6,7 @@ export declare enum BlockType {
|
|
|
6
6
|
SPEAK = "SPEAK",
|
|
7
7
|
LISTEN = "LISTEN",
|
|
8
8
|
TRANSFER = "TRANSFER",
|
|
9
|
-
|
|
9
|
+
DATA_CRM = "DATA_CRM",
|
|
10
10
|
HTTP_REQUEST = "HTTP_REQUEST",
|
|
11
11
|
CONDITION = "CONDITION",
|
|
12
12
|
GROUP = "GROUP",
|
|
@@ -18,6 +18,8 @@ export declare enum BlockType {
|
|
|
18
18
|
CALLBOT_CUSTOMER = "CALLBOT_CUSTOMER",
|
|
19
19
|
ACTION_CONTACT = "ACTION_CONTACT",
|
|
20
20
|
ACTION_CALLBOT = "ACTION_CALLBOT",
|
|
21
|
+
SMS_CAMPAIGN = "SMS_CAMPAIGN",
|
|
22
|
+
TASK = "TASK",
|
|
21
23
|
ACTION_CRMORDER = "ACTION_CRMORDER",
|
|
22
24
|
EMAIL = "EMAIL",
|
|
23
25
|
DELAY = "DELAY",
|
|
@@ -37,7 +39,8 @@ export declare enum LISTEN_TYPE {
|
|
|
37
39
|
}
|
|
38
40
|
export declare enum TRANSFER_TYPE {
|
|
39
41
|
INTERNAL = "INTERNAL",
|
|
40
|
-
EXTERNAL = "EXTERNAL"
|
|
42
|
+
EXTERNAL = "EXTERNAL",
|
|
43
|
+
DYNAMIC = "DYNAMIC"
|
|
41
44
|
}
|
|
42
45
|
export interface BlockTypeProps<T> {
|
|
43
46
|
id: string;
|
|
@@ -7,6 +7,7 @@ export declare enum CRM_OBJECT_TYPE {
|
|
|
7
7
|
CONTACT = "contact",
|
|
8
8
|
ENTERPRISE = "enterprise",
|
|
9
9
|
CRMORDER = "crmorder",
|
|
10
|
+
CRMTASK = "crmtask",
|
|
10
11
|
CRMDEAL = "crmdeal",
|
|
11
12
|
CRMPRODUCT = "crmproduct",
|
|
12
13
|
TICKET = "ticket",
|
|
@@ -16,6 +17,7 @@ export declare const CrmObjectTypeLabel: {
|
|
|
16
17
|
contact: string;
|
|
17
18
|
enterprise: string;
|
|
18
19
|
crmorder: string;
|
|
20
|
+
crmtask: string;
|
|
19
21
|
crmdeal: string;
|
|
20
22
|
crmproduct: string;
|
|
21
23
|
ticket: string;
|
|
@@ -6,6 +6,8 @@ export declare const initialTitles: {
|
|
|
6
6
|
START: string;
|
|
7
7
|
LISTEN: string;
|
|
8
8
|
TRANSFER: string;
|
|
9
|
+
DATA_CRM: string;
|
|
10
|
+
HTTP_REQUEST: string;
|
|
9
11
|
GROUP: string;
|
|
10
12
|
TRIGGER_CONTACT: string;
|
|
11
13
|
EMAIL: string;
|
|
@@ -21,6 +23,8 @@ export declare const initialTitles: {
|
|
|
21
23
|
TRIGGER_CALLBOT: string;
|
|
22
24
|
AUTO_FLOW_HTTP_REQUEST: string;
|
|
23
25
|
ACTION_CALLBOT: string;
|
|
26
|
+
SMS_CAMPAIGN: string;
|
|
27
|
+
TASK: string;
|
|
24
28
|
CALLBOT_CUSTOMER: string;
|
|
25
29
|
};
|
|
26
30
|
export declare const initialData: {
|
|
@@ -73,6 +77,7 @@ export declare const initialData: {
|
|
|
73
77
|
label: string;
|
|
74
78
|
}[];
|
|
75
79
|
type: TRANSFER_TYPE;
|
|
80
|
+
transfer_mode: string;
|
|
76
81
|
internal: {
|
|
77
82
|
value: any;
|
|
78
83
|
maximum_try: number;
|
|
@@ -82,7 +87,6 @@ export declare const initialData: {
|
|
|
82
87
|
detect_gender: boolean;
|
|
83
88
|
personalize: boolean;
|
|
84
89
|
};
|
|
85
|
-
prompt: {};
|
|
86
90
|
};
|
|
87
91
|
external: {
|
|
88
92
|
value: any;
|
|
@@ -93,12 +97,22 @@ export declare const initialData: {
|
|
|
93
97
|
detect_gender: boolean;
|
|
94
98
|
personalize: boolean;
|
|
95
99
|
};
|
|
96
|
-
|
|
100
|
+
};
|
|
101
|
+
dynamic: {
|
|
102
|
+
value: any;
|
|
103
|
+
maximum_try: number;
|
|
104
|
+
type: SPEAK_TYPE;
|
|
105
|
+
machine: {};
|
|
106
|
+
record: {
|
|
107
|
+
detect_gender: boolean;
|
|
108
|
+
personalize: boolean;
|
|
109
|
+
};
|
|
97
110
|
};
|
|
98
111
|
};
|
|
99
112
|
GROUP: {
|
|
100
113
|
type: string;
|
|
101
114
|
};
|
|
115
|
+
DATA_CRM: {};
|
|
102
116
|
TRIGGER_CONTACT: {
|
|
103
117
|
object: string;
|
|
104
118
|
groups: {}[];
|
|
@@ -116,11 +130,14 @@ export declare const initialData: {
|
|
|
116
130
|
};
|
|
117
131
|
};
|
|
118
132
|
};
|
|
133
|
+
HTTP_REQUEST: {};
|
|
119
134
|
TRIGGER_CRMORDER: {
|
|
120
135
|
object: string;
|
|
121
136
|
groups: {}[];
|
|
122
137
|
filter_type: string;
|
|
123
138
|
};
|
|
139
|
+
SMS_CAMPAIGN: {};
|
|
140
|
+
TASK: {};
|
|
124
141
|
};
|
|
125
142
|
export declare const getInitialData: (blockType: BlockType) => any;
|
|
126
143
|
export declare const initialNodes: Node[];
|
|
@@ -6,6 +6,8 @@ export declare const nodeTypes: {
|
|
|
6
6
|
TRANSFER: import('react').FC<import('../components/Blocks/Transfer/types').TransferNodeProps>;
|
|
7
7
|
GROUP: import('react').FC<import('../components/Blocks/Group/types').GroupNodeProps>;
|
|
8
8
|
CONDITION: import('react').FC<import('../components/Blocks/Condition/types').ConditionNodeProps>;
|
|
9
|
+
DATA_CRM: import('react').FC<import('../components/Blocks/DataCRM/types').BlockDataCRMProps>;
|
|
10
|
+
HTTP_REQUEST: import('react').FC<import('../components/Blocks/HttpRequest/types').BlockHttpRequestActionProps>;
|
|
9
11
|
TRIGGER_CONTACT: import('react').FC<import('../components/Blocks/Contact/trigger/types').BlockContactTriggerProps>;
|
|
10
12
|
TRIGGER_CRMORDER: import('react').FC<import('../components/Blocks/Order/trigger/types').BlockOrderTriggerProps>;
|
|
11
13
|
TRIGGER_CALLBOT: import('react').FC<import('../components/Blocks/Callbot/trigger/types').BlockCallbotTriggerProps>;
|
|
@@ -16,6 +18,8 @@ export declare const nodeTypes: {
|
|
|
16
18
|
CONTACT_ASSIGN: import('react').FC<import('../components/Blocks/Contact/assign/types').BlockContactAssignProps>;
|
|
17
19
|
ACTION_CRMORDER: import('react').FC<import('../components/Blocks/Order/action/types').BlockOrderActionProps>;
|
|
18
20
|
ACTION_CALLBOT: import('react').FC<import('../components/Blocks/Callbot/action/types').BlockCallbotActionProps>;
|
|
21
|
+
SMS_CAMPAIGN: import('react').FC<import('../components/Blocks/SmsCampaign/types').BlockSmsCampaignProps>;
|
|
22
|
+
TASK: import('react').FC<import('../components/Blocks/Task/types').BlockTaskProps>;
|
|
19
23
|
EMAIL: import('react').FC<import('../components/Blocks/Email/types').BlockEmailProps>;
|
|
20
24
|
DELAY: import('react').FC<import('../components/Blocks/Delay/types').BlockDelayActionProps>;
|
|
21
25
|
BRANCH: import('react').FC<import('../components/Blocks/Branch/types').BlockBranchProps>;
|
|
@@ -23,5 +27,7 @@ export declare const nodeTypes: {
|
|
|
23
27
|
NOTIFICATION: import('react').FC<import('../components/Blocks/Notification/types').BlockNotificationProps>;
|
|
24
28
|
AUTO_FLOW_HTTP_REQUEST: import('react').FC<import('../components/Blocks/AutoFlowHttpRequest/types').BlockAutoFlowHttpRequestActionProps>;
|
|
25
29
|
};
|
|
26
|
-
export declare const getNodeColor: (node:
|
|
30
|
+
export declare const getNodeColor: (node: {
|
|
31
|
+
type?: string;
|
|
32
|
+
}) => string;
|
|
27
33
|
export default nodeTypes;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AxiosError, AxiosResponse } from 'axios';
|
|
2
|
+
import { ICrmTask, IPagination } from '../../lib';
|
|
3
|
+
export declare const filterInfiniteTaskKey = "filter-infinite-task";
|
|
4
|
+
declare const useInfiniteFilterTask: ({ currentFilters, pageSize, enabled, }: {
|
|
5
|
+
currentFilters: Record<string, unknown>;
|
|
6
|
+
pageSize?: number;
|
|
7
|
+
enabled?: boolean;
|
|
8
|
+
}) => import('@tanstack/react-query').UseInfiniteQueryResult<import('@tanstack/react-query').InfiniteData<AxiosResponse<IPagination<ICrmTask>, any>, unknown>, AxiosError<unknown, any>>;
|
|
9
|
+
export default useInfiniteFilterTask;
|
|
@@ -102,7 +102,7 @@ export interface IProperty {
|
|
|
102
102
|
slug?: string;
|
|
103
103
|
type?: DATA_TYPE_PROPERTY;
|
|
104
104
|
updated_at?: string;
|
|
105
|
-
app_model?: "contact" | "enterprise" | "crmproduct" | "crmdeal" | "crmorder" | "ticket" | "call";
|
|
105
|
+
app_model?: "contact" | "enterprise" | "crmproduct" | "crmdeal" | "crmorder" | "crmtask" | "ticket" | "call";
|
|
106
106
|
}
|
|
107
107
|
export interface IProfileCompany {
|
|
108
108
|
profilecompany?: string;
|
|
@@ -185,6 +185,18 @@ export interface IContact {
|
|
|
185
185
|
changed_by?: string | null;
|
|
186
186
|
can_update?: boolean;
|
|
187
187
|
}
|
|
188
|
+
export interface ICrmTask {
|
|
189
|
+
id: string;
|
|
190
|
+
company?: string;
|
|
191
|
+
title?: string;
|
|
192
|
+
name?: string;
|
|
193
|
+
properties?: IProperty[];
|
|
194
|
+
updated_at?: string;
|
|
195
|
+
created_at?: string;
|
|
196
|
+
created_by?: string | null;
|
|
197
|
+
changed_by?: string | null;
|
|
198
|
+
can_update?: boolean;
|
|
199
|
+
}
|
|
188
200
|
export type PriceItem = {
|
|
189
201
|
price: number;
|
|
190
202
|
discount_price: number;
|
|
@@ -340,7 +352,7 @@ export type IPropertyV2 = {
|
|
|
340
352
|
created_at?: string;
|
|
341
353
|
created_by?: string | null;
|
|
342
354
|
updated_at?: string;
|
|
343
|
-
app_model?: "contact" | "enterprise" | "crmproduct" | "crmdeal" | "crmorder" | "ticket";
|
|
355
|
+
app_model?: "contact" | "enterprise" | "crmproduct" | "crmdeal" | "crmorder" | "crmtask" | "ticket";
|
|
344
356
|
label?: string;
|
|
345
357
|
variant?: string;
|
|
346
358
|
};
|