app-v3-scripts-editor 1.17.1 → 1.17.3

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 { Node, NodeProps } from '@xyflow/react';
2
- import { IFilterGroup } from '../../../../services';
2
+ import { IFilterGroup, INodeBaseType } from '../../../../services';
3
3
  import { BlockTypeProps } from '../../../constants';
4
4
  export declare enum BRANCH_TYPE {
5
5
  BRANCH = "BRANCH"
@@ -11,7 +11,7 @@ export declare const BranchTypeDescription: {
11
11
  BRANCH: string;
12
12
  };
13
13
  export declare const BranchTypeList: BRANCH_TYPE[];
14
- export interface BranchNodeData extends Record<string, unknown> {
14
+ export interface BranchNodeData extends INodeBaseType, Record<string, unknown> {
15
15
  title: string;
16
16
  type: BRANCH_TYPE;
17
17
  groups: IFilterGroup[];
@@ -1,5 +1,5 @@
1
1
  import { Node, NodeProps } from '@xyflow/react';
2
- import { IFilter } from '../../../../../services';
2
+ import { IFilter, INodeBaseType } from '../../../../../services';
3
3
  import { BlockTypeProps } from '../../../../constants';
4
4
  import { DATA_TYPE_PROPERTY_V2 } from '../../../../constants/common';
5
5
  export declare enum ACTION_CONTACT_TYPE {
@@ -23,7 +23,7 @@ interface ContactActionGroup {
23
23
  filter_type?: "AND" | "OR";
24
24
  conditions: IFilter[];
25
25
  }
26
- export interface ContactActionNodeData extends Record<string, unknown> {
26
+ export interface ContactActionNodeData extends INodeBaseType, Record<string, unknown> {
27
27
  title: string;
28
28
  type: ACTION_CONTACT_TYPE;
29
29
  filter_type?: "AND" | "OR";
@@ -37,13 +37,6 @@ export interface ContactActionNodeData extends Record<string, unknown> {
37
37
  type?: DATA_TYPE_PROPERTY_V2;
38
38
  reference_type?: boolean;
39
39
  }[];
40
- output?: {
41
- id: string;
42
- name: string;
43
- slug: string;
44
- type: string;
45
- object?: string;
46
- }[];
47
40
  }
48
41
  export type BlockContactActionProps = BlockTypeProps<ContactActionNodeData>;
49
42
  export type ContactActionNodeProps = NodeProps<Node<ContactActionNodeData>>;
@@ -1,4 +1,5 @@
1
1
  import { Node, NodeProps } from '@xyflow/react';
2
+ import { INodeBaseType } from '../../../../services';
2
3
  import { BlockTypeProps } from '../../../constants';
3
4
  export declare enum EMAIL_ACTION_TYPE {
4
5
  SEND_MAIL = "SEND_MAIL"
@@ -10,7 +11,7 @@ export declare const EmailTypeDescription: {
10
11
  SEND_MAIL: string;
11
12
  };
12
13
  export declare const EmailTypeList: EMAIL_ACTION_TYPE[];
13
- export interface EmailNodeData extends Record<string, unknown> {
14
+ export interface EmailNodeData extends INodeBaseType, Record<string, unknown> {
14
15
  title: string;
15
16
  type: EMAIL_ACTION_TYPE;
16
17
  mailconfig?: string;
@@ -26,11 +27,6 @@ export interface EmailNodeData extends Record<string, unknown> {
26
27
  template_id?: string;
27
28
  email_type?: "template" | "custom";
28
29
  };
29
- output: {
30
- object: string;
31
- slug: string;
32
- type: string;
33
- }[];
34
30
  }
35
31
  export type BlockEmailProps = BlockTypeProps<EmailNodeData>;
36
32
  export type EmailNodeProps = NodeProps<Node<EmailNodeData>>;
@@ -1,4 +1,5 @@
1
1
  import { Node, NodeProps } from '@xyflow/react';
2
+ import { INodeBaseType } from '../../../../services';
2
3
  import { BlockTypeProps } from '../../../constants';
3
4
  export declare enum NOTIFICATION_ACTION_TYPE {
4
5
  SEND_IN_APP_WEB = "SEND_IN_APP_WEB",
@@ -13,17 +14,12 @@ export declare const NotificationTypeDescription: {
13
14
  TELEGRAM: string;
14
15
  };
15
16
  export declare const NotificationTypeList: NOTIFICATION_ACTION_TYPE[];
16
- export interface NotificationNodeData extends Record<string, unknown> {
17
+ export interface NotificationNodeData extends INodeBaseType, Record<string, unknown> {
17
18
  title: string;
18
19
  type: NOTIFICATION_ACTION_TYPE;
19
20
  to: string;
20
21
  subject: string;
21
22
  content: string;
22
- output: {
23
- object: string;
24
- slug: string;
25
- type: string;
26
- }[];
27
23
  }
28
24
  export type BlockNotificationProps = BlockTypeProps<NotificationNodeData>;
29
25
  export type NotificationNodeProps = NodeProps<Node<NotificationNodeData>>;
@@ -1,7 +1,8 @@
1
- import { default as React } from 'react';
1
+ import { default as React, CSSProperties } from 'react';
2
2
  type AudioPlayVoiceContainerProps = {
3
- content: string;
3
+ record: string;
4
4
  className?: string;
5
+ style?: CSSProperties;
5
6
  };
6
7
  declare const AudioPlayVoiceContainer: React.FC<AudioPlayVoiceContainerProps>;
7
8
  export default AudioPlayVoiceContainer;
@@ -0,0 +1 @@
1
+ export declare const Label: string;
@@ -0,0 +1,7 @@
1
+ import { FormItemProps } from 'antd';
2
+ import { default as React } from 'react';
3
+ type FormItemVariableContainerProps = {
4
+ textLabel: string;
5
+ } & Omit<FormItemProps, "label">;
6
+ declare const FormItemVariableContainer: React.FC<FormItemVariableContainerProps>;
7
+ export default FormItemVariableContainer;
@@ -0,0 +1,2 @@
1
+ import { INodeBaseType } from '../../../services';
2
+ export declare function useFormatVariableSlugs(input: string[] | INodeBaseType["variables"]): INodeBaseType["variables"];
@@ -14,7 +14,7 @@ export interface InstanceContextProps {
14
14
  BLOCKS_ENABLED?: BlockType[];
15
15
  type: "autocall" | "autoflow";
16
16
  instanceId?: string;
17
- mode: "view" | "edit";
17
+ mode: "view" | "edit" | "history";
18
18
  }
19
19
  export interface InstanceScriptEditorProps {
20
20
  BASE_URL: string;
@@ -24,7 +24,7 @@ export interface InstanceScriptEditorProps {
24
24
  type: "autocall" | "autoflow";
25
25
  onAlertsChange?: (values: UseErrorsAndInfosReturn) => void;
26
26
  instanceId?: string;
27
- mode: "view" | "edit";
27
+ mode: "view" | "edit" | "history";
28
28
  onReady?: (ready: boolean) => void;
29
29
  }
30
30
  interface InstanceContextProviderProps extends InstanceScriptEditorProps {
@@ -46,4 +46,5 @@ export declare function buildOutPutTreeNodes(outputs: IOutput["outputs"]): (Tree
46
46
  iconType?: DATA_TYPE_PROPERTY;
47
47
  };
48
48
  })[];
49
+ export declare function getFormVariables(formValues: any): string[];
49
50
  export {};
@@ -1,6 +1,13 @@
1
1
  import { Dayjs } from 'dayjs';
2
2
  import { AI_MODEL } from '../lib/constants/ai-model';
3
3
  import { DATA_TYPE_PROPERTY } from '../lib/constants/common';
4
+ export interface INodeBaseType {
5
+ output?: IOutput["outputs"];
6
+ variables?: {
7
+ node_id: string;
8
+ slugs: string[];
9
+ }[];
10
+ }
4
11
  export interface IPaginationInputs {
5
12
  pagination?: {
6
13
  page: number;
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.1",
4
+ "version": "1.17.3",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/ucall-asia/app-v3-scripts-editor.git"