app-v3-scripts-editor 1.35.0 → 1.35.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,3 @@
1
1
  import { default as React } from 'react';
2
- type CatchHookActionContainerProps = {};
3
- declare const CatchHookActionContainer: React.FC<CatchHookActionContainerProps>;
2
+ declare const CatchHookActionContainer: React.FC;
4
3
  export default CatchHookActionContainer;
@@ -1,7 +1,7 @@
1
+ import { IOutput } from '../../../../../services';
1
2
  type CatchHookOutputContainerProps = {
2
3
  id: string;
3
- action?: string;
4
- order?: number;
4
+ outputs: IOutput["outputs"];
5
5
  };
6
6
  declare const CatchHookOutputContainer: React.FC<CatchHookOutputContainerProps>;
7
7
  export default CatchHookOutputContainer;
@@ -1,4 +1,3 @@
1
1
  import { default as React } from 'react';
2
- type CatchHookSettingContainerProps = {};
3
- declare const CatchHookSettingContainer: React.FC<CatchHookSettingContainerProps>;
2
+ declare const CatchHookSettingContainer: React.FC;
4
3
  export default CatchHookSettingContainer;
@@ -0,0 +1,12 @@
1
+ import { IOutput } from '../../../../../services';
2
+ import { CatchHookBodyItem, CatchHookNodeData } from '../types';
3
+ export declare const buildCatchHookOutputsFromFields: ({ fields, nodeId, order, }: {
4
+ fields?: CatchHookBodyItem[] | string;
5
+ nodeId: string;
6
+ order?: number;
7
+ }) => IOutput["outputs"];
8
+ export declare const normalizeCatchHookFormValues: (data: CatchHookNodeData) => CatchHookNodeData;
9
+ export declare const serializeCatchHookFormValues: (values: CatchHookNodeData, { nodeId, order, }: {
10
+ nodeId: string;
11
+ order?: number;
12
+ }) => CatchHookNodeData;
@@ -2,19 +2,58 @@ import { Node, NodeProps } from '@xyflow/react';
2
2
  import { INodeBaseType } from '../../../../services';
3
3
  import { BlockTypeProps } from '../../../constants';
4
4
  export declare enum CATCH_HOOK_ACTION_TYPE {
5
- URL = "URL"
5
+ URL_TRIGGER = "URL_TRIGGER"
6
6
  }
7
7
  export declare const CatchHookTypeLabel: {
8
- URL: string;
8
+ URL_TRIGGER: string;
9
9
  };
10
10
  export declare const CatchHookTypeDescription: {
11
- URL: string;
11
+ URL_TRIGGER: string;
12
12
  };
13
13
  export declare const CatchHookTypeList: CATCH_HOOK_ACTION_TYPE[];
14
+ export declare enum CATCH_HOOK_CONTENT_TYPE {
15
+ JSON = "json"
16
+ }
17
+ export declare const CatchHookContentTypeLabel: {
18
+ json: string;
19
+ };
20
+ export declare const CatchHookContentTypeList: CATCH_HOOK_CONTENT_TYPE[];
21
+ export declare enum CATCH_HOOK_BODY_DATA_TYPE {
22
+ STRING = "string",
23
+ TEXT = "text",
24
+ INT = "int",
25
+ FLOAT = "float",
26
+ DATE = "date",
27
+ DATETIME = "datetime",
28
+ OBJECT = "object",
29
+ LIST = "list",
30
+ DOUBLE = "double",
31
+ BOOLEAN = "boolean"
32
+ }
33
+ export declare const CatchHookBodyDataTypeLabel: {
34
+ string: string;
35
+ text: string;
36
+ int: string;
37
+ float: string;
38
+ date: string;
39
+ datetime: string;
40
+ object: string;
41
+ list: string;
42
+ double: string;
43
+ boolean: string;
44
+ };
45
+ export declare const CatchHookBodyDataTypeList: CATCH_HOOK_BODY_DATA_TYPE[];
46
+ export interface CatchHookBodyItem {
47
+ key?: string;
48
+ type?: CATCH_HOOK_BODY_DATA_TYPE;
49
+ }
14
50
  export interface CatchHookNodeData extends INodeBaseType, Record<string, unknown> {
15
51
  title: string;
16
- type: CATCH_HOOK_ACTION_TYPE;
17
- url?: string;
52
+ action?: CATCH_HOOK_ACTION_TYPE;
53
+ webhook_url?: string;
54
+ authentication?: "x-api-key";
55
+ request_body_type?: CATCH_HOOK_CONTENT_TYPE;
56
+ fields?: CatchHookBodyItem[] | string;
18
57
  }
19
58
  export type BlockCatchHookProps = BlockTypeProps<CatchHookNodeData>;
20
59
  export type CatchHookNodeProps = NodeProps<Node<CatchHookNodeData>>;
@@ -0,0 +1,5 @@
1
+ import { SelectProps } from 'antd';
2
+ import { default as React } from 'react';
3
+ type CallbotStatusSelectorProps = SelectProps & {};
4
+ declare const CallbotStatusSelector: React.FC<CallbotStatusSelectorProps>;
5
+ export default CallbotStatusSelector;
@@ -15,7 +15,7 @@ export declare enum BlockType {
15
15
  TRIGGER_CRMORDER = "TRIGGER_CRMORDER",
16
16
  TRIGGER_TICKET = "TRIGGER_TICKET",
17
17
  SCHEDULE_AT = "SCHEDULE_AT",
18
- CATCH_HOOK = "CATCH_HOOK",
18
+ TRIGGER_CATCH_HOOK = "TRIGGER_CATCH_HOOK",
19
19
  CALLBOT_CUSTOMER = "CALLBOT_CUSTOMER",
20
20
  ACTION_CONTACT = "ACTION_CONTACT",
21
21
  ACTION_CALLBOT = "ACTION_CALLBOT",
@@ -178,3 +178,9 @@ export declare const AUTO_CALL_CONFIG: {
178
178
  label: string;
179
179
  type: TYPE_HOTLINE;
180
180
  }[];
181
+ export declare const CALLBOT_STATUS: {
182
+ INIT: string;
183
+ STOP: string;
184
+ RUN: string;
185
+ DONE: string;
186
+ };
@@ -20,7 +20,7 @@ export declare const initialTitles: {
20
20
  NOTIFICATION: string;
21
21
  SCHEDULE_AT: string;
22
22
  ACTION_CONTACT: string;
23
- CATCH_HOOK: string;
23
+ TRIGGER_CATCH_HOOK: string;
24
24
  CONTACT_ASSIGN: string;
25
25
  TRIGGER_CALLBOT: string;
26
26
  AUTO_FLOW_HTTP_REQUEST: string;
@@ -13,7 +13,7 @@ export declare const nodeTypes: {
13
13
  TRIGGER_TICKET: import('react').FC<import('../components/Blocks/Ticket/trigger/types').BlockTicketTriggerProps>;
14
14
  TRIGGER_CALLBOT: import('react').FC<import('../components/Blocks/Callbot/trigger/types').BlockCallbotTriggerProps>;
15
15
  SCHEDULE_AT: import('react').FC<import('../components/Blocks/Schedule/types').BlockScheduleProps>;
16
- CATCH_HOOK: import('react').FC<import('../components/Blocks/CatchHook/types').BlockCatchHookProps>;
16
+ TRIGGER_CATCH_HOOK: import('react').FC<import('../components/Blocks/CatchHook/types').BlockCatchHookProps>;
17
17
  CALLBOT_CUSTOMER: import('react').FC<import('../components/Blocks/CallbotCustomer/types').BlockCallbotCustomerProps>;
18
18
  ACTION_CONTACT: import('react').FC<import('../components/Blocks/Contact/action/types').BlockContactActionProps>;
19
19
  CONTACT_ASSIGN: import('react').FC<import('../components/Blocks/Contact/assign/types').BlockContactAssignProps>;
@@ -1,6 +1,7 @@
1
1
  export interface ScriptsEvents {
2
2
  openIntegrationEmailPage: {};
3
3
  openWorkShiftSettingPage: {};
4
+ openXApiKeySettingPage: {};
4
5
  }
5
6
  type Callback<T = any> = (data: T) => void;
6
7
  declare class EventBus {
@@ -3,10 +3,11 @@ type ReconnectEdge = Connection & {
3
3
  type: string;
4
4
  };
5
5
  type DeletedNode = Pick<Node, "id">;
6
- declare const useCreateReconnectEdge: () => ({ deletedNodeId, deletedNodeIds, edges, defaultEdgeType, }: {
6
+ declare const useCreateReconnectEdge: () => ({ deletedNodeId, deletedNodeIds, edges, nodes, defaultEdgeType, }: {
7
7
  deletedNodeId: string;
8
8
  deletedNodeIds: Set<string>;
9
9
  edges: Edge[];
10
+ nodes: Node[];
10
11
  defaultEdgeType: string;
11
12
  }) => ReconnectEdge | null;
12
13
  export type { DeletedNode, ReconnectEdge };
@@ -1,8 +1,9 @@
1
- import { Edge } from '@xyflow/react';
1
+ import { Edge, Node } from '@xyflow/react';
2
2
  import { DeletedNode, ReconnectEdge } from '../use-create-reconnect-edge';
3
- declare const useReconnectEdges: () => ({ deletedNodes, edges, defaultEdgeType, }: {
3
+ declare const useReconnectEdges: () => ({ deletedNodes, edges, nodes, defaultEdgeType, }: {
4
4
  deletedNodes: DeletedNode[];
5
5
  edges: Edge[];
6
+ nodes: Node[];
6
7
  defaultEdgeType: string;
7
8
  }) => ReconnectEdge[];
8
9
  export default useReconnectEdges;
@@ -5,5 +5,5 @@ type SyncNodeDataArrayItemByIdParams<TItem extends NodeDataArrayItemWithId> = {
5
5
  dataKey: string;
6
6
  item: TItem;
7
7
  };
8
- export declare function useSyncNodeDataArrayItemById(): <TItem extends NodeDataArrayItemWithId>({ dataKey, item }: SyncNodeDataArrayItemByIdParams<TItem>) => void;
8
+ export declare function useSyncNodeDataArrayItemById(): <TItem extends NodeDataArrayItemWithId>({ dataKey, item, }: SyncNodeDataArrayItemByIdParams<TItem>) => void;
9
9
  export default useSyncNodeDataArrayItemById;
@@ -10,6 +10,7 @@ export interface ContextProps {
10
10
  export interface InstanceContextProps {
11
11
  axiosInstance: AxiosInstance;
12
12
  reactFlowRef: React.RefObject<HTMLDivElement>;
13
+ BASE_URL: string;
13
14
  context: ContextProps;
14
15
  BLOCKS_ENABLED?: BlockType[];
15
16
  type: "autocall" | "autoflow";
@@ -1,6 +1,7 @@
1
1
  import { IIntent } from '../../services';
2
2
  export type NodeIntentCondition = Pick<IIntent, "id" | "slug" | "label" | "description" | "keywords" | "is_conversion">;
3
3
  export declare const pickNodeIntentCondition: (intent: IIntent) => NodeIntentCondition;
4
+ export declare const pickSyncedNodeIntentCondition: (intent: IIntent) => Omit<NodeIntentCondition, "slug">;
4
5
  export declare const getNodeIntentConditionHandleId: (intent: Pick<IIntent, "id" | "slug">) => string;
5
6
  export declare const isSilenceNodeIntentCondition: (condition?: Pick<IIntent, "id" | "label">) => boolean;
6
7
  export declare const isNoResponseNodeIntentCondition: (condition?: Pick<IIntent, "id" | "label">) => boolean;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "app-v3-scripts-editor",
3
3
  "private": false,
4
- "version": "1.35.0",
4
+ "version": "1.35.2",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/ucall-asia/app-v3-scripts-editor.git"
@@ -1,4 +0,0 @@
1
- import { default as React } from 'react';
2
- type CatchHookTestContainerProps = {};
3
- declare const CatchHookTestContainer: React.FC<CatchHookTestContainerProps>;
4
- export default CatchHookTestContainer;