app-v3-scripts-editor 1.28.1 → 1.29.0

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 AutoFlowHttpRequestActionSettingContainerProps = {};
3
- declare const AutoFlowHttpRequestActionSettingContainer: React.FC<AutoFlowHttpRequestActionSettingContainerProps>;
2
+ declare const AutoFlowHttpRequestActionSettingContainer: React.FC;
4
3
  export default AutoFlowHttpRequestActionSettingContainer;
@@ -0,0 +1,12 @@
1
+ import { IOutput } from '../../../../../services';
2
+ import { AutoFlowHttpRequestActionNodeData, AutoFlowHttpRequestBodyItem } from '../types';
3
+ export declare const buildHttpRequestOutputsFromResponseBody: ({ responseBody, nodeId, order, }: {
4
+ responseBody?: AutoFlowHttpRequestBodyItem[] | string;
5
+ nodeId: string;
6
+ order?: number;
7
+ }) => IOutput["outputs"];
8
+ export declare const normalizeHttpRequestFormValues: (data: AutoFlowHttpRequestActionNodeData) => AutoFlowHttpRequestActionNodeData;
9
+ export declare const serializeHttpRequestFormValues: (values: AutoFlowHttpRequestActionNodeData, { nodeId, order, }: {
10
+ nodeId: string;
11
+ order?: number;
12
+ }) => AutoFlowHttpRequestActionNodeData;
@@ -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 AUTO_FLOW_HTTP_REQUEST_ACTION_TYPE {
4
5
  GET = "GET",
@@ -8,9 +9,7 @@ export declare enum AUTO_FLOW_HTTP_REQUEST_ACTION_TYPE {
8
9
  DELETE = "DELETE"
9
10
  }
10
11
  export declare enum AUTO_FLOW_HTTP_REQUEST_CONTENT_TYPE {
11
- JSON = "application/json",
12
- FORM_URLENCODED = "application/x-www-form-urlencoded",
13
- MULTIPART_FORM_DATA = "multipart/form-data"
12
+ JSON = "json"
14
13
  }
15
14
  export declare const AutoFlowHttpRequestActionTypeLabel: {
16
15
  GET: string;
@@ -28,21 +27,45 @@ export declare const AutoFlowHttpRequestActionTypeDescription: {
28
27
  };
29
28
  export declare const AutoFlowHttpRequestActionTypeList: AUTO_FLOW_HTTP_REQUEST_ACTION_TYPE[];
30
29
  export declare const AutoFlowHttpRequestContentTypeLabel: {
31
- "application/json": string;
32
- "application/x-www-form-urlencoded": string;
33
- "multipart/form-data": string;
30
+ json: string;
34
31
  };
35
32
  export declare const AutoFlowHttpRequestContentTypeList: AUTO_FLOW_HTTP_REQUEST_CONTENT_TYPE[];
36
- export interface AutoFlowHttpRequestActionNodeData extends Record<string, unknown> {
33
+ export interface AutoFlowHttpRequestKeyValueItem {
34
+ key?: string;
35
+ value?: string;
36
+ }
37
+ export declare enum AUTO_FLOW_HTTP_REQUEST_BODY_DATA_TYPE {
38
+ STRING = "string",
39
+ INTEGER = "integer",
40
+ FLOAT = "float",
41
+ BOOLEAN = "boolean",
42
+ LIST = "list",
43
+ OBJECT = "object"
44
+ }
45
+ export declare const AutoFlowHttpRequestBodyDataTypeLabel: {
46
+ string: string;
47
+ integer: string;
48
+ float: string;
49
+ boolean: string;
50
+ list: string;
51
+ object: string;
52
+ };
53
+ export declare const AutoFlowHttpRequestBodyDataTypeList: AUTO_FLOW_HTTP_REQUEST_BODY_DATA_TYPE[];
54
+ export interface AutoFlowHttpRequestBodyItem extends AutoFlowHttpRequestKeyValueItem {
55
+ type?: AUTO_FLOW_HTTP_REQUEST_BODY_DATA_TYPE;
56
+ }
57
+ export interface AutoFlowHttpRequestActionSettingsFields {
58
+ api_url?: string;
59
+ params?: AutoFlowHttpRequestKeyValueItem[];
60
+ headers?: AutoFlowHttpRequestKeyValueItem[];
61
+ request_body_type?: AUTO_FLOW_HTTP_REQUEST_CONTENT_TYPE;
62
+ request_body?: AutoFlowHttpRequestBodyItem[] | string;
63
+ response_body_type?: AUTO_FLOW_HTTP_REQUEST_CONTENT_TYPE;
64
+ response_body?: AutoFlowHttpRequestBodyItem[] | string;
65
+ }
66
+ export interface AutoFlowHttpRequestActionNodeData extends INodeBaseType, Record<string, unknown>, AutoFlowHttpRequestActionSettingsFields {
37
67
  title: string;
38
- type: AUTO_FLOW_HTTP_REQUEST_ACTION_TYPE;
39
- url?: string;
40
- content_type?: AUTO_FLOW_HTTP_REQUEST_CONTENT_TYPE;
41
- request_header?: string;
42
- body?: {
43
- field?: string;
44
- data?: unknown;
45
- };
68
+ action?: AUTO_FLOW_HTTP_REQUEST_ACTION_TYPE;
46
69
  }
47
70
  export type BlockAutoFlowHttpRequestActionProps = BlockTypeProps<AutoFlowHttpRequestActionNodeData>;
48
71
  export type AutoFlowHttpRequestActionNodeProps = NodeProps<Node<AutoFlowHttpRequestActionNodeData>>;
@@ -0,0 +1,2 @@
1
+ export declare const wrapper: string;
2
+ export declare const error: string;
@@ -0,0 +1,9 @@
1
+ type JsonEditorProps = {
2
+ value?: string;
3
+ onChange?: (value: string) => void;
4
+ editorLabel?: string;
5
+ resetLabel?: string;
6
+ };
7
+ declare const JsonEditor: ({ value, onChange, editorLabel, resetLabel, }: JsonEditorProps) => import("react/jsx-runtime").JSX.Element;
8
+ export type { JsonEditorProps };
9
+ export default JsonEditor;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "app-v3-scripts-editor",
3
3
  "private": false,
4
- "version": "1.28.1",
4
+ "version": "1.29.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/ucall-asia/app-v3-scripts-editor.git"