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.
- package/dist/app-v3-scripts-editor.css +1 -1
- package/dist/app-v3-scripts-editor.es.js +26020 -25639
- package/dist/app-v3-scripts-editor.umd.js +167 -167
- package/dist/src/lib/components/Blocks/CatchHook/setting/Action.d.ts +1 -2
- package/dist/src/lib/components/Blocks/CatchHook/setting/Output.d.ts +2 -2
- package/dist/src/lib/components/Blocks/CatchHook/setting/Setting.d.ts +1 -2
- package/dist/src/lib/components/Blocks/CatchHook/setting/helpers.d.ts +12 -0
- package/dist/src/lib/components/Blocks/CatchHook/types.d.ts +44 -5
- package/dist/src/lib/components/Selector/Callbot/Status.d.ts +5 -0
- package/dist/src/lib/constants/block-types.d.ts +1 -1
- package/dist/src/lib/constants/common.d.ts +6 -0
- package/dist/src/lib/constants/initial-script.d.ts +1 -1
- package/dist/src/lib/constants/node-types.d.ts +1 -1
- package/dist/src/lib/events/emit-to-parent/event.d.ts +1 -0
- package/dist/src/lib/hooks/use-create-reconnect-edge/index.d.ts +2 -1
- package/dist/src/lib/hooks/use-reconnect-edges/index.d.ts +3 -2
- package/dist/src/lib/hooks/use-sync-node-data-array-item/index.d.ts +1 -1
- package/dist/src/lib/provider/instance-context/index.d.ts +1 -0
- package/dist/src/lib/utils/node-intent-condition.d.ts +1 -0
- package/package.json +1 -1
- package/dist/src/lib/components/Blocks/CatchHook/setting/Test.d.ts +0 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { IOutput } from '../../../../../services';
|
|
1
2
|
type CatchHookOutputContainerProps = {
|
|
2
3
|
id: string;
|
|
3
|
-
|
|
4
|
-
order?: number;
|
|
4
|
+
outputs: IOutput["outputs"];
|
|
5
5
|
};
|
|
6
6
|
declare const CatchHookOutputContainer: React.FC<CatchHookOutputContainerProps>;
|
|
7
7
|
export default CatchHookOutputContainer;
|
|
@@ -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
|
-
|
|
5
|
+
URL_TRIGGER = "URL_TRIGGER"
|
|
6
6
|
}
|
|
7
7
|
export declare const CatchHookTypeLabel: {
|
|
8
|
-
|
|
8
|
+
URL_TRIGGER: string;
|
|
9
9
|
};
|
|
10
10
|
export declare const CatchHookTypeDescription: {
|
|
11
|
-
|
|
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
|
-
|
|
17
|
-
|
|
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>>;
|
|
@@ -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
|
-
|
|
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",
|
|
@@ -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
|
-
|
|
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>;
|
|
@@ -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