app-v3-scripts-editor 1.17.0 → 1.17.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.
@@ -0,0 +1,5 @@
1
+ type ContactActionOutputContainerProps = {
2
+ id: string;
3
+ };
4
+ declare const ContactActionOutputContainer: React.FC<ContactActionOutputContainerProps>;
5
+ export default ContactActionOutputContainer;
@@ -1,22 +1,23 @@
1
1
  import { Node, NodeProps } from '@xyflow/react';
2
2
  import { IFilter } from '../../../../../services';
3
3
  import { BlockTypeProps } from '../../../../constants';
4
- export declare enum CONTACT_ACTION_TYPE {
4
+ import { DATA_TYPE_PROPERTY_V2 } from '../../../../constants/common';
5
+ export declare enum ACTION_CONTACT_TYPE {
5
6
  CREATE = "CREATE",
6
- READ = "READ",
7
+ GET = "GET",
7
8
  UPDATE = "UPDATE"
8
9
  }
9
10
  export declare const ContactActionTypeLabel: {
10
11
  CREATE: string;
11
12
  UPDATE: string;
12
- READ: string;
13
+ GET: string;
13
14
  };
14
15
  export declare const ContactActionTypeDescription: {
15
16
  CREATE: string;
16
17
  UPDATE: string;
17
- READ: string;
18
+ GET: string;
18
19
  };
19
- export declare const ContactActionTypeList: CONTACT_ACTION_TYPE[];
20
+ export declare const ContactActionTypeList: ACTION_CONTACT_TYPE[];
20
21
  interface ContactActionGroup {
21
22
  object?: string;
22
23
  filter_type?: "AND" | "OR";
@@ -24,11 +25,25 @@ interface ContactActionGroup {
24
25
  }
25
26
  export interface ContactActionNodeData extends Record<string, unknown> {
26
27
  title: string;
27
- type: CONTACT_ACTION_TYPE;
28
- setting: {
29
- filter_type?: "AND" | "OR";
30
- groups?: ContactActionGroup[];
31
- };
28
+ type: ACTION_CONTACT_TYPE;
29
+ filter_type?: "AND" | "OR";
30
+ groups?: ContactActionGroup[];
31
+ object?: string;
32
+ update_fields?: {
33
+ id?: string;
34
+ slug?: string;
35
+ name?: string;
36
+ value?: any;
37
+ type?: DATA_TYPE_PROPERTY_V2;
38
+ reference_type?: boolean;
39
+ }[];
40
+ output?: {
41
+ id: string;
42
+ name: string;
43
+ slug: string;
44
+ type: string;
45
+ object?: string;
46
+ }[];
32
47
  }
33
48
  export type BlockContactActionProps = BlockTypeProps<ContactActionNodeData>;
34
49
  export type ContactActionNodeProps = NodeProps<Node<ContactActionNodeData>>;
@@ -0,0 +1,8 @@
1
+ import { SelectProps } from 'antd';
2
+ import { IOptionValue } from '../../../../services';
3
+ type OptionSelectorV2Props = {
4
+ dataDefault?: IOptionValue | IOptionValue[];
5
+ propertyId?: string;
6
+ } & SelectProps;
7
+ declare const OptionSelectorV2: React.FC<OptionSelectorV2Props>;
8
+ export default OptionSelectorV2;
@@ -1,6 +1,7 @@
1
1
  import { default as React } from 'react';
2
2
  type FieldSettingContainerProps = {
3
3
  title: string;
4
+ formListName: string;
4
5
  model: "contact" | "enterprise" | "crmdeal" | "crmorder" | "crmproduct" | "ticket";
5
6
  };
6
7
  declare const FieldSettingContainer: React.FC<FieldSettingContainerProps>;
@@ -0,0 +1,8 @@
1
+ import { FormItemProps } from 'antd/es/form';
2
+ import { default as React } from 'react';
3
+ import { IPropertyV2 } from '../../../../services';
4
+ type InputByTypeContainerProps = {
5
+ property: IPropertyV2;
6
+ } & FormItemProps;
7
+ declare const InputByTypeContainer: React.FC<InputByTypeContainerProps>;
8
+ export default InputByTypeContainer;
@@ -0,0 +1,12 @@
1
+ import { FormListFieldData, FormListOperation } from 'antd';
2
+ import { default as React } from 'react';
3
+ import { IPropertyV2 } from '../../../../services';
4
+ type FieldSettingItemContainerProps = {
5
+ field: FormListFieldData;
6
+ index: number;
7
+ remove: FormListOperation["remove"];
8
+ allProperty: IPropertyV2[];
9
+ formListName: string;
10
+ };
11
+ declare const FieldSettingItemContainer: React.FC<FieldSettingItemContainerProps>;
12
+ export default FieldSettingItemContainer;
@@ -0,0 +1,6 @@
1
+ import { IOptionValue } from '../../../../services';
2
+ declare const useFilterColorOptionV2: (optionValue: IOptionValue[]) => {
3
+ value: string;
4
+ label: import("react/jsx-runtime").JSX.Element;
5
+ }[];
6
+ export default useFilterColorOptionV2;
@@ -1,4 +1,4 @@
1
1
  import { AutoCompleteProps } from 'antd';
2
2
  import { UseVariableSuggestOptions } from './type';
3
- declare const VariableSuggestAutoComplete: (props: UseVariableSuggestOptions & AutoCompleteProps) => import("react/jsx-runtime").JSX.Element;
4
- export default VariableSuggestAutoComplete;
3
+ declare const SuggestVariableNodeContainer: (props: UseVariableSuggestOptions & AutoCompleteProps) => import("react/jsx-runtime").JSX.Element;
4
+ export default SuggestVariableNodeContainer;
@@ -11,7 +11,7 @@ export declare enum BlockType {
11
11
  TRIGGER_CONTACT = "TRIGGER_CONTACT",
12
12
  CALLBOT_TRIGGER = "CALLBOT_TRIGGER",
13
13
  ORDER_TRIGGER = "ORDER_TRIGGER",
14
- CONTACT_ACTION = "CONTACT_ACTION",
14
+ ACTION_CONTACT = "ACTION_CONTACT",
15
15
  SCHEDULE_AT = "SCHEDULE_AT",
16
16
  CALLBOT_ACTION = "CALLBOT_ACTION",
17
17
  ORDER_ACTION = "ORDER_ACTION",
@@ -112,6 +112,33 @@ export declare enum DATA_TYPE_PROPERTY {
112
112
  multiemailproperty = "multiemailproperty",
113
113
  multiphoneproperty = "multiphoneproperty"
114
114
  }
115
+ export declare enum DATA_TYPE_PROPERTY_V2 {
116
+ singleline = "singleline",
117
+ multiline = "multiline",
118
+ richtext = "richtext",
119
+ email = "email",
120
+ phone = "phone",
121
+ url = "url",
122
+ boolean = "boolean",
123
+ file = "file",
124
+ integer = "integer",
125
+ float = "float",
126
+ percentage = "percentage",
127
+ date = "date",
128
+ datetime = "datetime",
129
+ duration = "duration",
130
+ singleoption = "singleoption",
131
+ multioption = "multioption",
132
+ optiongroup = "optiongroup",
133
+ singleuser = "singleuser",
134
+ multiuser = "multiuser",
135
+ singleassociate = "singleassociate",
136
+ multiassociate = "multiassociate",
137
+ formula = "formula",
138
+ multiphone = "multiphone",
139
+ multiemail = "multiemail",
140
+ array = "array"
141
+ }
115
142
  export declare const CAMPAIGN_TYPE_NAME: Record<string, string>;
116
143
  export declare const DATE_FORMAT_BY_OPERATOR: Record<string, string>;
117
144
  export declare const iconPropertyMap: Record<DATA_TYPE_PROPERTY | string, any>;
@@ -1,4 +1,5 @@
1
1
  export declare const DD_MM_YYYY = "DD/MM/YYYY";
2
+ export declare const YYYY_MM_DD = "YYYY-MM-DD";
2
3
  export declare const DD_MM_YYYY_HH_mm = "DD/MM/YYYY HH:mm";
3
4
  export declare const YYYY_MM_DD_HH_mm_ss = "YYYY-MM-DD HH:mm:ss";
4
5
  export declare const HH_mm_ss = "HH:mm:ss";
@@ -15,6 +15,7 @@ export declare const initialTitles: {
15
15
  CONDITION: string;
16
16
  NOTIFICATION: string;
17
17
  SCHEDULE_AT: string;
18
+ ACTION_CONTACT: string;
18
19
  };
19
20
  export declare const initialData: {
20
21
  AGENT: {
@@ -7,7 +7,7 @@ export declare const nodeTypes: {
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
9
  TRIGGER_CONTACT: import('react').FC<import('../components/Blocks/Contact/trigger/types').BlockContactTriggerProps>;
10
- CONTACT_ACTION: import('react').FC<import('../components/Blocks/Contact/action/types').BlockContactActionProps>;
10
+ ACTION_CONTACT: import('react').FC<import('../components/Blocks/Contact/action/types').BlockContactActionProps>;
11
11
  EMAIL: import('react').FC<import('../components/Blocks/Email/types').BlockEmailProps>;
12
12
  DELAY: import('react').FC<import('../components/Blocks/Delay/types').BlockDelayActionProps>;
13
13
  BRANCH: import('react').FC<import('../components/Blocks/Branch/types').BlockBranchProps>;
@@ -0,0 +1,9 @@
1
+ import { AxiosError, AxiosResponse } from 'axios';
2
+ import { IOptionValue, IPagination } from '../../lib';
3
+ export declare const filterInfiniteOptionKey = "filter-infinite-option-v2";
4
+ declare const useInfiniteFilterOptionV2: ({ property_id, currentFilters, pageSize, }: {
5
+ property_id: string;
6
+ currentFilters: Record<string, unknown>;
7
+ pageSize?: number;
8
+ }) => import('@tanstack/react-query').UseInfiniteQueryResult<import('@tanstack/react-query').InfiniteData<AxiosResponse<IPagination<IOptionValue>, any>, unknown>, AxiosError<unknown, any>>;
9
+ export default useInfiniteFilterOptionV2;
@@ -0,0 +1,5 @@
1
+ import { AxiosError, AxiosResponse } from 'axios';
2
+ import { IPropertyV2, PaginationInputs } from '../types';
3
+ export declare const useGetAllPropertyV2Key = "get_all_property_v2";
4
+ declare const useGetAllPropertyV2: ({ currentFilters, pagination, }: PaginationInputs) => import('@tanstack/react-query').UseQueryResult<AxiosResponse<IPropertyV2[], any>, AxiosError<unknown, any>>;
5
+ export default useGetAllPropertyV2;
@@ -261,3 +261,60 @@ export type IListTypeInputOption = {
261
261
  value?: string;
262
262
  title?: string;
263
263
  };
264
+ export type IPropertyGroupType = {
265
+ id: string;
266
+ name: string;
267
+ slug: string;
268
+ app_model?: string;
269
+ description?: string;
270
+ order?: number;
271
+ is_default?: boolean;
272
+ created_at?: string;
273
+ updated_at?: string;
274
+ created_by?: string | null;
275
+ changed_by?: string | null;
276
+ };
277
+ export interface PaginationInputs {
278
+ pagination?: {
279
+ page: number;
280
+ page_size: number;
281
+ };
282
+ currentFilters?: any;
283
+ is_color?: boolean;
284
+ }
285
+ export type IPropertyV2 = {
286
+ id: string;
287
+ name: string;
288
+ slug: string;
289
+ description: string;
290
+ order_default?: number;
291
+ can_delete?: boolean;
292
+ is_auto?: boolean;
293
+ is_must_fill?: boolean;
294
+ is_unique?: boolean;
295
+ default_in_form?: boolean;
296
+ allow_in_form?: boolean;
297
+ default_in_kanban?: boolean;
298
+ default_in_summary?: boolean;
299
+ default_in_table?: boolean;
300
+ group_name?: string;
301
+ can_edit_in_list_view?: boolean;
302
+ variant_config: string;
303
+ property_group?: IPropertyGroupType;
304
+ settings?: {
305
+ option_type?: string;
306
+ options?: IOptionValue[];
307
+ min_character_limit?: number | null;
308
+ max_character_limit?: number | null;
309
+ optionGroup?: {
310
+ name?: string;
311
+ };
312
+ };
313
+ changed_by?: string | null;
314
+ created_at?: string;
315
+ created_by?: string | null;
316
+ updated_at?: string;
317
+ app_model?: "contact" | "enterprise" | "crmproduct" | "crmdeal" | "crmorder" | "ticket";
318
+ label?: string;
319
+ variant?: string;
320
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "app-v3-scripts-editor",
3
3
  "private": false,
4
- "version": "1.17.0",
4
+ "version": "1.17.1",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/ucall-asia/app-v3-scripts-editor.git"