@digi-frontend/dgate-api-documentation 1.0.7 → 1.0.8
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/_virtual/index5.js +1 -1
- package/dist/_virtual/index6.js +1 -1
- package/dist/node_modules/js-yaml/dist/js-yaml.mjs.js +3 -0
- package/dist/node_modules/js-yaml/dist/js-yaml.mjs.js.map +1 -0
- package/dist/node_modules/yup/index.esm.js +1 -1
- package/dist/src/components/InfoForm/InfoForm.js +1 -1
- package/dist/src/components/InfoForm/InfoForm.js.map +1 -1
- package/dist/src/components/JsonInput/JsonInput.js +2 -0
- package/dist/src/components/JsonInput/JsonInput.js.map +1 -0
- package/dist/src/components/JsonInput/style.module.scss.js +2 -0
- package/dist/src/components/JsonInput/style.module.scss.js.map +1 -0
- package/dist/src/components/MethodAccordion/MethodAccordion.js +1 -1
- package/dist/src/components/MethodAccordion/MethodAccordion.js.map +1 -1
- package/dist/src/components/table/table.js +1 -1
- package/dist/src/components/table/table.js.map +1 -1
- package/dist/src/components/table/tags-table.js +2 -0
- package/dist/src/components/table/tags-table.js.map +1 -0
- package/dist/src/constants/index.js +1 -1
- package/dist/src/constants/index.js.map +1 -1
- package/dist/src/helpers/layout.helper.js +1 -1
- package/dist/src/helpers/layout.helper.js.map +1 -1
- package/dist/src/layout/layout.js +1 -1
- package/dist/src/layout/layout.js.map +1 -1
- package/dist/src/layout/layout.module.css.js +1 -1
- package/dist/styles.css +543 -362
- package/dist/types/components/InfoForm/InfoForm.d.ts +3 -1
- package/dist/types/components/JsonInput/JsonInput.d.ts +13 -0
- package/dist/types/components/MethodAccordion/MethodAccordion.d.ts +1 -2
- package/dist/types/components/table/tags-table.d.ts +11 -0
- package/dist/types/constants/index.d.ts +18 -4
- package/dist/types/layout/layout.d.ts +1 -0
- package/dist/types/types/layout.type.d.ts +9 -1
- package/dist/types/types/openApi.d.ts +13 -1
- package/package.json +2 -2
- package/src/components/table/table.tsx +3 -3
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare const JsonInput: ({ placeholder, label, value, onValidation, onChange, dataId, className, errorMessage, acceptType, fieldIsDisabled, }: {
|
|
2
|
+
placeholder: any;
|
|
3
|
+
label: any;
|
|
4
|
+
value: any;
|
|
5
|
+
onValidation: any;
|
|
6
|
+
onChange: any;
|
|
7
|
+
dataId: any;
|
|
8
|
+
className?: string;
|
|
9
|
+
errorMessage: any;
|
|
10
|
+
acceptType?: string;
|
|
11
|
+
fieldIsDisabled: any;
|
|
12
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export default JsonInput;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { TransformedMethod } from '../../types/layout.type';
|
|
2
|
-
declare const MethodsAccordion: ({ method, path, setFieldValue, readOnly,
|
|
2
|
+
declare const MethodsAccordion: ({ method, path, setFieldValue, readOnly, }: {
|
|
3
3
|
method: TransformedMethod;
|
|
4
4
|
path: string;
|
|
5
5
|
setFieldValue: (key: string, value: string) => void;
|
|
6
6
|
readOnly?: boolean;
|
|
7
|
-
handleSave: (data: any) => unknown;
|
|
8
7
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
export default MethodsAccordion;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import './style.scss';
|
|
2
|
+
declare const TagsTable: ({ id, headCells, data, isFormOpen, setIsFormOpen, saveNewRow, readOnly }: {
|
|
3
|
+
id: any;
|
|
4
|
+
headCells: any;
|
|
5
|
+
data: any;
|
|
6
|
+
isFormOpen: any;
|
|
7
|
+
setIsFormOpen: any;
|
|
8
|
+
saveNewRow: any;
|
|
9
|
+
readOnly: any;
|
|
10
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export default TagsTable;
|
|
@@ -2,36 +2,50 @@ export declare const methodColorMapping: {
|
|
|
2
2
|
get: {
|
|
3
3
|
label: string;
|
|
4
4
|
color: string;
|
|
5
|
+
order: number;
|
|
5
6
|
};
|
|
6
7
|
post: {
|
|
7
8
|
label: string;
|
|
8
9
|
color: string;
|
|
10
|
+
order: number;
|
|
9
11
|
};
|
|
10
12
|
put: {
|
|
11
13
|
label: string;
|
|
12
14
|
color: string;
|
|
15
|
+
order: number;
|
|
13
16
|
};
|
|
14
17
|
delete: {
|
|
15
18
|
label: string;
|
|
16
19
|
color: string;
|
|
20
|
+
order: number;
|
|
17
21
|
};
|
|
18
|
-
|
|
22
|
+
patch: {
|
|
19
23
|
label: string;
|
|
20
24
|
color: string;
|
|
25
|
+
order: number;
|
|
21
26
|
};
|
|
22
|
-
|
|
27
|
+
options: {
|
|
23
28
|
label: string;
|
|
24
29
|
color: string;
|
|
30
|
+
order: number;
|
|
25
31
|
};
|
|
26
|
-
|
|
32
|
+
trace: {
|
|
27
33
|
label: string;
|
|
28
34
|
color: string;
|
|
35
|
+
order: number;
|
|
29
36
|
};
|
|
30
|
-
|
|
37
|
+
head: {
|
|
31
38
|
label: string;
|
|
32
39
|
color: string;
|
|
40
|
+
order: number;
|
|
33
41
|
};
|
|
34
42
|
};
|
|
43
|
+
export declare const tagsTableHeaders: {
|
|
44
|
+
id: string;
|
|
45
|
+
label: string;
|
|
46
|
+
sortable: boolean;
|
|
47
|
+
classes: string;
|
|
48
|
+
}[];
|
|
35
49
|
export declare const paramsTableHeaders: ({
|
|
36
50
|
id: string;
|
|
37
51
|
label: string;
|
|
@@ -2,6 +2,7 @@ import { JSX } from 'react';
|
|
|
2
2
|
import { OpenAPIFile } from '../types/openApi';
|
|
3
3
|
interface ILayoutProps {
|
|
4
4
|
openApiJson?: OpenAPIFile;
|
|
5
|
+
handleSave?: (values: unknown) => unknown;
|
|
5
6
|
}
|
|
6
7
|
declare const Layout: ({ openApiJson, handleSave }: ILayoutProps) => JSX.Element;
|
|
7
8
|
export default Layout;
|
|
@@ -3,7 +3,15 @@ export type TransformedMethod = {
|
|
|
3
3
|
type: HTTPMethod;
|
|
4
4
|
tags: string[];
|
|
5
5
|
parameters: any;
|
|
6
|
-
requestBody:
|
|
6
|
+
requestBody: {
|
|
7
|
+
content: {
|
|
8
|
+
contentType: string;
|
|
9
|
+
schema: {
|
|
10
|
+
properties: string;
|
|
11
|
+
type: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
};
|
|
7
15
|
responses: {
|
|
8
16
|
code: string;
|
|
9
17
|
content: {
|
|
@@ -33,6 +33,18 @@ export interface OpenAPIFile {
|
|
|
33
33
|
tags?: {
|
|
34
34
|
name: string;
|
|
35
35
|
description?: string;
|
|
36
|
+
externalDocs?: {
|
|
37
|
+
url: string;
|
|
38
|
+
description: string;
|
|
39
|
+
}[];
|
|
40
|
+
}[];
|
|
41
|
+
}
|
|
42
|
+
export interface Tags {
|
|
43
|
+
name: string;
|
|
44
|
+
description?: string;
|
|
45
|
+
externalDocs?: {
|
|
46
|
+
url: string;
|
|
47
|
+
description: string;
|
|
36
48
|
}[];
|
|
37
49
|
}
|
|
38
50
|
interface Parameter {
|
|
@@ -71,7 +83,7 @@ interface Schema {
|
|
|
71
83
|
enum?: string[];
|
|
72
84
|
required?: string[];
|
|
73
85
|
}
|
|
74
|
-
interface SecurityScheme {
|
|
86
|
+
export interface SecurityScheme {
|
|
75
87
|
type: 'apiKey' | 'http' | 'oauth2' | 'openIdConnect';
|
|
76
88
|
description?: string;
|
|
77
89
|
name?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digi-frontend/dgate-api-documentation",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.8",
|
|
4
4
|
"main": "dist/src/index.js",
|
|
5
5
|
"module": "dist/src/index.js",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"license": "ISC",
|
|
17
17
|
"description": "",
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"digitinary-ui": "^1.0.
|
|
19
|
+
"digitinary-ui": "^1.0.166",
|
|
20
20
|
"formik": "^2.4.6",
|
|
21
21
|
"html-react-parser": "^5.2.2",
|
|
22
22
|
"js-yaml": "^4.1.0",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useState } from 'react'
|
|
2
2
|
import './style.scss'
|
|
3
|
-
import { Button, Input,
|
|
3
|
+
import { Button, Input, SelectGroupV2, Switch, TextArea } from 'digitinary-ui'
|
|
4
4
|
import Tooltip from '../Tooltip/Tooltip'
|
|
5
5
|
import SVGLoader from '../SVGLoader/SVGLoader'
|
|
6
6
|
import { AddRow, EditIcon, DeleteIcon } from '../../assets/icons'
|
|
@@ -125,7 +125,7 @@ const ParamterTable = ({
|
|
|
125
125
|
|
|
126
126
|
<td key={'parameter in'}>
|
|
127
127
|
<div data-id="TEXT_DESCRIPTION" className="tableData">
|
|
128
|
-
<
|
|
128
|
+
<SelectGroupV2
|
|
129
129
|
disabled={readOnly}
|
|
130
130
|
value={{
|
|
131
131
|
label: capitalize(values.in),
|
|
@@ -152,7 +152,7 @@ const ParamterTable = ({
|
|
|
152
152
|
|
|
153
153
|
<td key={'parameter schema type'}>
|
|
154
154
|
<div data-id="TEXT_DESCRIPTION" className="tableData">
|
|
155
|
-
<
|
|
155
|
+
<SelectGroupV2
|
|
156
156
|
disabled={readOnly}
|
|
157
157
|
value={{
|
|
158
158
|
label: capitalize(values.schema.type),
|