@digi-frontend/dgate-api-documentation 1.0.31 → 1.0.32

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.
Files changed (104) hide show
  1. package/.editorconfig +12 -12
  2. package/.prettierignore +7 -7
  3. package/.prettierrc +15 -15
  4. package/dist/{2e10bbdb265df50e.svg → 43595976d1fdccbf.svg} +4 -4
  5. package/dist/{8789eb84283ea95b.svg → 56dc416b683db280.svg} +5 -5
  6. package/dist/{bb8b87cace25e052.svg → 64efc2716808c4a4.svg} +3 -3
  7. package/dist/{d32ce84bbd78babd.svg → 72db3b05a96dd600.svg} +3 -3
  8. package/dist/{d501922060662842.svg → 844eba3f2e42a9eb.svg} +3 -3
  9. package/dist/_virtual/index3.js +1 -1
  10. package/dist/_virtual/index4.js +1 -1
  11. package/dist/_virtual/index5.js +1 -1
  12. package/dist/_virtual/index6.js +1 -1
  13. package/dist/{070dc6ecd197bc80.svg → a7568b270e175038.svg} +8 -8
  14. package/dist/{9bdff13f8d8fa48a.svg → af16a554be8c4d69.svg} +3 -3
  15. package/dist/{7f54eeb0bb2d1150.svg → b82c7612e73342f3.svg} +3 -3
  16. package/dist/node_modules/toposort/index.js +1 -1
  17. package/dist/node_modules/yup/index.esm.js +1 -1
  18. package/dist/src/assets/icons/AddRow.svg.js +1 -1
  19. package/dist/src/assets/icons/AddRow.svg.js.map +1 -1
  20. package/dist/src/assets/icons/CheckMarkSquare.svg.js +1 -1
  21. package/dist/src/assets/icons/CheckMarkSquare.svg.js.map +1 -1
  22. package/dist/src/assets/icons/CloseIcon.svg.js +1 -1
  23. package/dist/src/assets/icons/CloseIcon.svg.js.map +1 -1
  24. package/dist/src/assets/icons/DeleteIcon.svg.js +1 -1
  25. package/dist/src/assets/icons/DeleteIcon.svg.js.map +1 -1
  26. package/dist/src/assets/icons/DownArrow.svg.js +1 -1
  27. package/dist/src/assets/icons/DownArrow.svg.js.map +1 -1
  28. package/dist/src/assets/icons/EditIcon.svg.js +1 -1
  29. package/dist/src/assets/icons/EditIcon.svg.js.map +1 -1
  30. package/dist/src/assets/icons/UpArrow.svg.js +1 -1
  31. package/dist/src/assets/icons/UpArrow.svg.js.map +1 -1
  32. package/dist/src/assets/icons/deleteOutlinedIcon.svg.js +1 -1
  33. package/dist/src/assets/icons/deleteOutlinedIcon.svg.js.map +1 -1
  34. package/dist/src/components/Chips/Chips.js.map +1 -1
  35. package/dist/src/components/InfoForm/InfoForm.js +1 -1
  36. package/dist/src/components/InfoForm/InfoForm.js.map +1 -1
  37. package/dist/src/components/JsonInput/JsonInput.js.map +1 -1
  38. package/dist/src/components/LivePreview/LivePreview.js.map +1 -1
  39. package/dist/src/components/MethodAccordion/MethodAccordion.js.map +1 -1
  40. package/dist/src/components/SVGLoader/SVGLoader.js.map +1 -1
  41. package/dist/src/components/SectionHead/SectionHead.js.map +1 -1
  42. package/dist/src/components/SimpleLabelValue/SimpleLabelValue.js.map +1 -1
  43. package/dist/src/components/Tooltip/Tooltip.js.map +1 -1
  44. package/dist/src/components/dialog/index.js.map +1 -1
  45. package/dist/src/components/table/table.js.map +1 -1
  46. package/dist/src/components/table/tags-table.js +1 -1
  47. package/dist/src/components/table/tags-table.js.map +1 -1
  48. package/dist/src/constants/index.js.map +1 -1
  49. package/dist/src/constants/regex.js +1 -1
  50. package/dist/src/constants/regex.js.map +1 -1
  51. package/dist/src/helpers/layout.helper.js.map +1 -1
  52. package/dist/src/helpers/methodAccordion.helper.js.map +1 -1
  53. package/dist/src/layout/layout.js.map +1 -1
  54. package/dist/src/validator/form.scheme.js.map +1 -1
  55. package/dist/styles.css +335 -335
  56. package/package.json +43 -43
  57. package/rollup.config.js +35 -35
  58. package/src/assets/icons/AddRow.svg +3 -3
  59. package/src/assets/icons/CheckMarkSquare.svg +5 -5
  60. package/src/assets/icons/CloseIcon.svg +4 -4
  61. package/src/assets/icons/DeleteIcon.svg +3 -3
  62. package/src/assets/icons/DownArrow.svg +3 -3
  63. package/src/assets/icons/EditIcon.svg +3 -3
  64. package/src/assets/icons/UpArrow.svg +3 -3
  65. package/src/assets/icons/deleteOutlinedIcon.svg +8 -8
  66. package/src/assets/icons/index.ts +8 -8
  67. package/src/components/Chips/Chips.tsx +87 -87
  68. package/src/components/Chips/style.scss +147 -147
  69. package/src/components/InfoForm/InfoForm.module.scss +165 -165
  70. package/src/components/InfoForm/InfoForm.tsx +424 -426
  71. package/src/components/JsonInput/JsonInput.tsx +149 -149
  72. package/src/components/JsonInput/style.module.scss +133 -133
  73. package/src/components/LivePreview/LivePreview.module.scss +24 -24
  74. package/src/components/LivePreview/LivePreview.tsx +184 -184
  75. package/src/components/MethodAccordion/MethodAccordion.module.scss +338 -338
  76. package/src/components/MethodAccordion/MethodAccordion.tsx +515 -515
  77. package/src/components/SVGLoader/SVGLoader.tsx +94 -94
  78. package/src/components/SectionHead/SectionHead.scss +29 -29
  79. package/src/components/SectionHead/SectionHead.tsx +22 -22
  80. package/src/components/SimpleLabelValue/SimpleLabelValue.tsx +31 -31
  81. package/src/components/SimpleLabelValue/index.ts +1 -1
  82. package/src/components/SimpleLabelValue/style.scss +30 -30
  83. package/src/components/Tooltip/Tooltip.scss +133 -133
  84. package/src/components/Tooltip/Tooltip.tsx +85 -85
  85. package/src/components/_global.scss +337 -337
  86. package/src/components/dialog/dialog.ts +54 -54
  87. package/src/components/dialog/index.tsx +85 -85
  88. package/src/components/dialog/style.scss +104 -104
  89. package/src/components/table/style.scss +190 -190
  90. package/src/components/table/table.tsx +327 -327
  91. package/src/components/table/tags-table.tsx +348 -348
  92. package/src/constants/index.ts +93 -93
  93. package/src/constants/regex.ts +7 -7
  94. package/src/global.d.ts +13 -13
  95. package/src/helpers/layout.helper.ts +162 -162
  96. package/src/helpers/methodAccordion.helper.ts +19 -19
  97. package/src/index.ts +1 -1
  98. package/src/layout/layout.module.css +61 -61
  99. package/src/layout/layout.tsx +150 -150
  100. package/src/types/layout.type.ts +30 -30
  101. package/src/types/openApi.ts +108 -108
  102. package/src/types/transformedOpenApi.ts +52 -52
  103. package/src/validator/form.scheme.ts +70 -70
  104. package/tsconfig.json +33 -33
@@ -1,108 +1,108 @@
1
- export interface OpenAPIFile {
2
- openapi: string
3
- info: {
4
- title: string
5
- description?: string
6
- version: string
7
- }
8
- servers?: {
9
- url: string
10
- description?: string
11
- }[]
12
- paths: {
13
- [path: string]: Partial<
14
- Record<
15
- HTTPMethod,
16
- {
17
- tags: string[]
18
- responses: Responses
19
- summary?: string
20
- description?: string
21
- parameters?: Parameter[]
22
- requestBody?: RequestBody
23
- }
24
- >
25
- >
26
- }
27
- components?: {
28
- schemas?: {
29
- [schemaName: string]: Schema
30
- }
31
- securitySchemes?: {
32
- [schemeName: string]: SecurityScheme
33
- }
34
- }
35
- security?: {
36
- [schemeName: string]: string[]
37
- }[]
38
- tags?: {
39
- name: string
40
- description?: string
41
- externalDocs?: {
42
- url: string
43
- description: string
44
- }[]
45
- }[]
46
- }
47
-
48
- export interface Tags {
49
- name: string
50
- description?: string
51
- externalDocs?: {
52
- url: string
53
- description: string
54
- }[]
55
- }
56
-
57
- interface Parameter {
58
- name: string
59
- in: 'query' | 'header' | 'path' | 'cookie'
60
- description?: string
61
- required: boolean
62
- schema: Schema
63
- }
64
-
65
- interface RequestBody {
66
- description?: string
67
- required: boolean
68
- content: {
69
- [contentType: string]: {
70
- schema: Schema
71
- }
72
- }
73
- }
74
-
75
- interface Responses {
76
- [statusCode: string]: {
77
- description: string
78
- content?: {
79
- [contentType: string]: {
80
- schema: Schema
81
- }
82
- }
83
- }
84
- }
85
-
86
- interface Schema {
87
- type?: string
88
- format?: string
89
- properties?: {
90
- [propertyName: string]: Schema
91
- }
92
- items?: Schema
93
- enum?: string[]
94
- required?: string[]
95
- }
96
-
97
- export interface SecurityScheme {
98
- type: 'apiKey' | 'http' | 'oauth2' | 'openIdConnect'
99
- description?: string
100
- name?: string
101
- in?: 'query' | 'header' | 'cookie'
102
- scheme?: string
103
- bearerFormat?: string
104
- flows?: any
105
- openIdConnectUrl?: string
106
- }
107
-
108
- export type HTTPMethod = 'get' | 'put' | 'post' | 'delete' | 'options' | 'head' | 'patch' | 'trace'
1
+ export interface OpenAPIFile {
2
+ openapi: string
3
+ info: {
4
+ title: string
5
+ description?: string
6
+ version: string
7
+ }
8
+ servers?: {
9
+ url: string
10
+ description?: string
11
+ }[]
12
+ paths: {
13
+ [path: string]: Partial<
14
+ Record<
15
+ HTTPMethod,
16
+ {
17
+ tags: string[]
18
+ responses: Responses
19
+ summary?: string
20
+ description?: string
21
+ parameters?: Parameter[]
22
+ requestBody?: RequestBody
23
+ }
24
+ >
25
+ >
26
+ }
27
+ components?: {
28
+ schemas?: {
29
+ [schemaName: string]: Schema
30
+ }
31
+ securitySchemes?: {
32
+ [schemeName: string]: SecurityScheme
33
+ }
34
+ }
35
+ security?: {
36
+ [schemeName: string]: string[]
37
+ }[]
38
+ tags?: {
39
+ name: string
40
+ description?: string
41
+ externalDocs?: {
42
+ url: string
43
+ description: string
44
+ }[]
45
+ }[]
46
+ }
47
+
48
+ export interface Tags {
49
+ name: string
50
+ description?: string
51
+ externalDocs?: {
52
+ url: string
53
+ description: string
54
+ }[]
55
+ }
56
+
57
+ interface Parameter {
58
+ name: string
59
+ in: 'query' | 'header' | 'path' | 'cookie'
60
+ description?: string
61
+ required: boolean
62
+ schema: Schema
63
+ }
64
+
65
+ interface RequestBody {
66
+ description?: string
67
+ required: boolean
68
+ content: {
69
+ [contentType: string]: {
70
+ schema: Schema
71
+ }
72
+ }
73
+ }
74
+
75
+ interface Responses {
76
+ [statusCode: string]: {
77
+ description: string
78
+ content?: {
79
+ [contentType: string]: {
80
+ schema: Schema
81
+ }
82
+ }
83
+ }
84
+ }
85
+
86
+ interface Schema {
87
+ type?: string
88
+ format?: string
89
+ properties?: {
90
+ [propertyName: string]: Schema
91
+ }
92
+ items?: Schema
93
+ enum?: string[]
94
+ required?: string[]
95
+ }
96
+
97
+ export interface SecurityScheme {
98
+ type: 'apiKey' | 'http' | 'oauth2' | 'openIdConnect'
99
+ description?: string
100
+ name?: string
101
+ in?: 'query' | 'header' | 'cookie'
102
+ scheme?: string
103
+ bearerFormat?: string
104
+ flows?: any
105
+ openIdConnectUrl?: string
106
+ }
107
+
108
+ export type HTTPMethod = 'get' | 'put' | 'post' | 'delete' | 'options' | 'head' | 'patch' | 'trace'
@@ -1,52 +1,52 @@
1
- import { TransformedPathsArray } from "./layout.type";
2
-
3
- export interface TransformedOpenApi {
4
- openapi: string;
5
- info: {
6
- title: string;
7
- description?: string;
8
- version: string;
9
- };
10
- servers?: {
11
- url: string;
12
- description?: string;
13
- }[];
14
- paths: TransformedPathsArray;
15
- components?: {
16
- schemas?: {
17
- [schemaName: string]: Schema;
18
- };
19
- securitySchemes?: {
20
- [schemeName: string]: SecurityScheme;
21
- };
22
- };
23
- security?: {
24
- [schemeName: string]: string[];
25
- }[];
26
- tags?: {
27
- name: string;
28
- description?: string;
29
- }[];
30
- }
31
-
32
- interface Schema {
33
- type?: string;
34
- format?: string;
35
- properties?: {
36
- [propertyName: string]: Schema;
37
- };
38
- items?: Schema;
39
- enum?: string[];
40
- required?: string[];
41
- }
42
-
43
- interface SecurityScheme {
44
- type: "apiKey" | "http" | "oauth2" | "openIdConnect";
45
- description?: string;
46
- name?: string;
47
- in?: "query" | "header" | "cookie";
48
- scheme?: string;
49
- bearerFormat?: string;
50
- flows?: any;
51
- openIdConnectUrl?: string;
52
- }
1
+ import { TransformedPathsArray } from "./layout.type";
2
+
3
+ export interface TransformedOpenApi {
4
+ openapi: string;
5
+ info: {
6
+ title: string;
7
+ description?: string;
8
+ version: string;
9
+ };
10
+ servers?: {
11
+ url: string;
12
+ description?: string;
13
+ }[];
14
+ paths: TransformedPathsArray;
15
+ components?: {
16
+ schemas?: {
17
+ [schemaName: string]: Schema;
18
+ };
19
+ securitySchemes?: {
20
+ [schemeName: string]: SecurityScheme;
21
+ };
22
+ };
23
+ security?: {
24
+ [schemeName: string]: string[];
25
+ }[];
26
+ tags?: {
27
+ name: string;
28
+ description?: string;
29
+ }[];
30
+ }
31
+
32
+ interface Schema {
33
+ type?: string;
34
+ format?: string;
35
+ properties?: {
36
+ [propertyName: string]: Schema;
37
+ };
38
+ items?: Schema;
39
+ enum?: string[];
40
+ required?: string[];
41
+ }
42
+
43
+ interface SecurityScheme {
44
+ type: "apiKey" | "http" | "oauth2" | "openIdConnect";
45
+ description?: string;
46
+ name?: string;
47
+ in?: "query" | "header" | "cookie";
48
+ scheme?: string;
49
+ bearerFormat?: string;
50
+ flows?: any;
51
+ openIdConnectUrl?: string;
52
+ }
@@ -1,70 +1,70 @@
1
- import * as yup from 'yup'
2
- export const schemaValidation = yup.object({
3
- openapi: yup.string().required(),
4
- info: yup
5
- .object({
6
- title: yup.string().trim().required('API Name is required.'),
7
- description: yup.string().trim().required('API Description is required.'),
8
- version: yup.string().required('API Version is required'),
9
- })
10
- .required(),
11
- servers: yup
12
- .array(
13
- yup.object({
14
- url: yup.string().url().required(),
15
- description: yup.string().optional(),
16
- })
17
- )
18
- .optional(),
19
- paths: yup.mixed().required(), // Assuming TransformedPathsArray is validated elsewhere
20
- components: yup
21
- .object({
22
- schemas: yup
23
- .lazy((value) =>
24
- yup.object(
25
- value
26
- ? Object.keys(value).reduce((acc, key) => {
27
- acc[key] = yup.object({
28
- type: yup.string().optional(),
29
- format: yup.string().optional(),
30
- properties: yup
31
- .lazy((props) =>
32
- yup.object(
33
- props
34
- ? Object.keys(props).reduce((acc, propKey) => {
35
- acc[propKey] = yup.mixed()
36
- return acc
37
- }, {})
38
- : {}
39
- )
40
- )
41
- .optional(),
42
- items: yup.mixed().optional(),
43
- enum: yup.array(yup.string()).optional(),
44
- required: yup.array(yup.string()).optional(),
45
- })
46
- return acc
47
- }, {})
48
- : {}
49
- )
50
- )
51
- .optional(),
52
- securitySchemes: yup.object().optional(),
53
- })
54
- .optional(),
55
- security: yup
56
- .array(
57
- yup.object().shape({
58
- schemeName: yup.array(yup.string()).optional(),
59
- })
60
- )
61
- .optional(),
62
- tags: yup
63
- .array(
64
- yup.object({
65
- name: yup.string().required(),
66
- description: yup.string().optional(),
67
- })
68
- )
69
- .optional(),
70
- })
1
+ import * as yup from 'yup'
2
+ export const schemaValidation = yup.object({
3
+ openapi: yup.string().required(),
4
+ info: yup
5
+ .object({
6
+ title: yup.string().trim().required('API Name is required.'),
7
+ description: yup.string().trim().required('API Description is required.'),
8
+ version: yup.string().required('API Version is required'),
9
+ })
10
+ .required(),
11
+ servers: yup
12
+ .array(
13
+ yup.object({
14
+ url: yup.string().url().required(),
15
+ description: yup.string().optional(),
16
+ })
17
+ )
18
+ .optional(),
19
+ paths: yup.mixed().required(), // Assuming TransformedPathsArray is validated elsewhere
20
+ components: yup
21
+ .object({
22
+ schemas: yup
23
+ .lazy((value) =>
24
+ yup.object(
25
+ value
26
+ ? Object.keys(value).reduce((acc, key) => {
27
+ acc[key] = yup.object({
28
+ type: yup.string().optional(),
29
+ format: yup.string().optional(),
30
+ properties: yup
31
+ .lazy((props) =>
32
+ yup.object(
33
+ props
34
+ ? Object.keys(props).reduce((acc, propKey) => {
35
+ acc[propKey] = yup.mixed()
36
+ return acc
37
+ }, {})
38
+ : {}
39
+ )
40
+ )
41
+ .optional(),
42
+ items: yup.mixed().optional(),
43
+ enum: yup.array(yup.string()).optional(),
44
+ required: yup.array(yup.string()).optional(),
45
+ })
46
+ return acc
47
+ }, {})
48
+ : {}
49
+ )
50
+ )
51
+ .optional(),
52
+ securitySchemes: yup.object().optional(),
53
+ })
54
+ .optional(),
55
+ security: yup
56
+ .array(
57
+ yup.object().shape({
58
+ schemeName: yup.array(yup.string()).optional(),
59
+ })
60
+ )
61
+ .optional(),
62
+ tags: yup
63
+ .array(
64
+ yup.object({
65
+ name: yup.string().required(),
66
+ description: yup.string().optional(),
67
+ })
68
+ )
69
+ .optional(),
70
+ })
package/tsconfig.json CHANGED
@@ -1,33 +1,33 @@
1
- {
2
- "compilerOptions": {
3
- "outDir": "dist",
4
- "module": "ESNext",
5
- "target": "ES6",
6
- "lib": ["DOM", "DOM.Iterable", "ESNext"],
7
- "declaration": true,
8
- "declarationDir": "dist/types",
9
- "jsx": "react-jsx",
10
- "strict": false,
11
- "moduleResolution": "node",
12
- "esModuleInterop": true,
13
- "skipLibCheck": true,
14
- "forceConsistentCasingInFileNames": true,
15
- "importHelpers": true,
16
- "resolveJsonModule": true,
17
- "plugins": [
18
- {
19
- "name": "typescript-plugin-css-modules"
20
- }
21
- ],
22
- "baseUrl": "./",
23
- "paths": {
24
- "@components/*": ["src/components/*"],
25
- "@icons": ["src/assets/icons"],
26
- "@constants/*": ["src/constants/*"],
27
- "@entities/*": ["src/types/*"],
28
- "@helpers/*": ["src/helpers/*"]
29
- }
30
- },
31
- "include": ["src", "src/global.d.ts"], // Add "src/global.d.ts" here
32
- "exclude": ["node_modules", "dist"]
33
- }
1
+ {
2
+ "compilerOptions": {
3
+ "outDir": "dist",
4
+ "module": "ESNext",
5
+ "target": "ES6",
6
+ "lib": ["DOM", "DOM.Iterable", "ESNext"],
7
+ "declaration": true,
8
+ "declarationDir": "dist/types",
9
+ "jsx": "react-jsx",
10
+ "strict": false,
11
+ "moduleResolution": "node",
12
+ "esModuleInterop": true,
13
+ "skipLibCheck": true,
14
+ "forceConsistentCasingInFileNames": true,
15
+ "importHelpers": true,
16
+ "resolveJsonModule": true,
17
+ "plugins": [
18
+ {
19
+ "name": "typescript-plugin-css-modules"
20
+ }
21
+ ],
22
+ "baseUrl": "./",
23
+ "paths": {
24
+ "@components/*": ["src/components/*"],
25
+ "@icons": ["src/assets/icons"],
26
+ "@constants/*": ["src/constants/*"],
27
+ "@entities/*": ["src/types/*"],
28
+ "@helpers/*": ["src/helpers/*"]
29
+ }
30
+ },
31
+ "include": ["src", "src/global.d.ts"], // Add "src/global.d.ts" here
32
+ "exclude": ["node_modules", "dist"]
33
+ }