app-v3-scripts-editor 1.30.0 → 1.30.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.
@@ -1,5 +1,5 @@
1
1
  import { Edge, Node } from '@xyflow/react';
2
- import { SPEAK_TYPE, TRANSFER_TYPE } from './block-types';
2
+ import { BlockType, SPEAK_TYPE, TRANSFER_TYPE } from './block-types';
3
3
  export declare const initialTitles: {
4
4
  AGENT: string;
5
5
  SPEAK: string;
@@ -26,10 +26,11 @@ export declare const initialTitles: {
26
26
  export declare const initialData: {
27
27
  AGENT: {
28
28
  conditions: {
29
- name: string;
29
+ label: string;
30
30
  description: string;
31
31
  keywords: string;
32
32
  id: string;
33
+ slug: string;
33
34
  is_conversion: boolean;
34
35
  }[];
35
36
  };
@@ -55,10 +56,11 @@ export declare const initialData: {
55
56
  };
56
57
  LISTEN: {
57
58
  conditions: {
58
- name: string;
59
+ label: string;
59
60
  description: string;
60
61
  keywords: string;
61
62
  id: string;
63
+ slug: string;
62
64
  is_conversion: boolean;
63
65
  }[];
64
66
  maximum_retry: number;
@@ -119,6 +121,7 @@ export declare const initialData: {
119
121
  filter_type: string;
120
122
  };
121
123
  };
124
+ export declare const getInitialData: (blockType: BlockType) => any;
122
125
  export declare const initialNodes: Node[];
123
126
  export declare const initialEdges: Edge[];
124
127
  export declare const initialNodeProps: {
@@ -1,36 +1,36 @@
1
1
  export declare const INTENTS: {
2
2
  INTERESTED: {
3
- name: string;
3
+ label: string;
4
4
  description: string;
5
5
  keywords: string;
6
6
  };
7
7
  NOT_INTERESTED: {
8
- name: string;
8
+ label: string;
9
9
  description: string;
10
10
  keywords: string;
11
11
  };
12
12
  NOT_HEARD: {
13
- name: string;
13
+ label: string;
14
14
  description: string;
15
15
  keywords: string;
16
16
  };
17
17
  BUSY: {
18
- name: string;
18
+ label: string;
19
19
  description: string;
20
20
  keywords: string;
21
21
  };
22
22
  SILENT: {
23
- name: string;
23
+ label: string;
24
24
  description: string;
25
25
  keywords: string;
26
26
  };
27
27
  UNRECOGNIZED: {
28
- name: string;
28
+ label: string;
29
29
  description: string;
30
30
  keywords: string;
31
31
  };
32
32
  DEFAULT: {
33
- name: string;
33
+ label: string;
34
34
  description: string;
35
35
  keywords: string;
36
36
  };
@@ -1,3 +1,4 @@
1
1
  import { IIntent } from '../../services';
2
- export type NodeIntentCondition = Pick<IIntent, "id" | "name" | "description" | "keywords" | "is_conversion">;
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 getNodeIntentConditionHandleId: (intent: Pick<IIntent, "id" | "slug">) => string;
@@ -1,6 +1,6 @@
1
1
  import { AxiosError, AxiosResponse } from 'axios';
2
2
  import { IIntent } from '../../lib';
3
- type Variables = Pick<IIntent, "name" | "description" | "keywords" | "is_conversion"> & {
3
+ type Variables = Pick<IIntent, "label" | "description" | "keywords" | "is_conversion"> & {
4
4
  SCENARIO_ID: string;
5
5
  };
6
6
  declare function useCreateIntent(): import('@tanstack/react-query').UseMutationResult<AxiosResponse<IIntent, any>, AxiosError<unknown, any>, Variables, unknown>;
@@ -0,0 +1,10 @@
1
+ import { AxiosError, AxiosResponse } from 'axios';
2
+ import { IIntent, IPagination } from '../../lib';
3
+ export declare const getInfiniteIntentQueryKey: (COMPANY_ID?: string, SCENARIO_ID?: string, pageSize?: number) => readonly (number | string | undefined)[];
4
+ type Props = {
5
+ SCENARIO_ID: string;
6
+ enabled?: boolean;
7
+ pageSize?: number;
8
+ };
9
+ declare function useGetInfiniteIntent({ SCENARIO_ID, enabled, pageSize, }: Props): import('@tanstack/react-query').UseInfiniteQueryResult<import('@tanstack/react-query').InfiniteData<AxiosResponse<IPagination<IIntent>, any>, unknown>, AxiosError<unknown, any>>;
10
+ export default useGetInfiniteIntent;
@@ -1,9 +1,8 @@
1
1
  import { AxiosError, AxiosResponse } from 'axios';
2
- import { IIntent } from '../../lib';
3
- export declare const getListIntentQueryKey: (COMPANY_ID?: string, SCENARIO_ID?: string) => readonly ["get_list_intent_key", string, string];
4
- type Props = {
5
- SCENARIO_ID: string;
2
+ import { IIntent, IPagination, IPaginationInputs } from '../../lib';
3
+ export declare const getListIntentQueryKey: (COMPANY_ID?: string, SCENARIO_ID?: string, options?: Pick<IPaginationInputs, "pagination" | "currentFilters">) => readonly unknown[];
4
+ declare function useGetListIntent({ currentFilters, pagination, enabled, SCENARIO_ID, }: IPaginationInputs & {
6
5
  enabled?: boolean;
7
- };
8
- declare function useGetListIntent({ SCENARIO_ID, enabled }: Props): import('@tanstack/react-query').UseQueryResult<AxiosResponse<IIntent[], any>, AxiosError<unknown, any>>;
6
+ SCENARIO_ID: string;
7
+ }): import('@tanstack/react-query').UseQueryResult<AxiosResponse<IPagination<IIntent>, any>, AxiosError<unknown, any>>;
9
8
  export default useGetListIntent;
@@ -1,6 +1,6 @@
1
1
  import { AxiosError, AxiosResponse } from 'axios';
2
2
  import { IIntent } from '../types';
3
- type Variables = Pick<IIntent, "name" | "description" | "keywords" | "is_conversion"> & {
3
+ type Variables = Pick<IIntent, "label" | "description" | "keywords" | "is_conversion"> & {
4
4
  SCENARIO_ID: string;
5
5
  INTENT_ID: string;
6
6
  };
@@ -1,8 +1,8 @@
1
1
  import { Dayjs } from 'dayjs';
2
2
  import { BlockType } from '../lib';
3
3
  import { AI_MODEL } from '../lib/constants/ai-model';
4
- import { DATA_TYPE_PROPERTY, DATA_TYPE_PROPERTY_V2 } from '../lib/constants/common';
5
4
  import { NODE_STATUS } from './../lib/constants/common';
5
+ import { DATA_TYPE_PROPERTY, DATA_TYPE_PROPERTY_V2 } from '../lib/constants/common';
6
6
  export interface INodeBaseType {
7
7
  output?: IOutput["outputs"];
8
8
  variables?: {
@@ -366,7 +366,7 @@ export interface FilterFieldsCallCampaignType {
366
366
  export interface IIntent {
367
367
  id?: string | number;
368
368
  slug?: string;
369
- name?: string;
369
+ label?: string;
370
370
  description?: string;
371
371
  keywords?: string;
372
372
  is_conversion?: 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.30.0",
4
+ "version": "1.30.1",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/ucall-asia/app-v3-scripts-editor.git"