@digi-frontend/dgate-api-documentation 1.4.4 → 1.4.6

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 (53) hide show
  1. package/dist/_virtual/index6.js +1 -1
  2. package/dist/_virtual/index7.js +1 -1
  3. package/dist/assets/icons/index.d.ts +27 -0
  4. package/dist/components/Chips/Chips.d.ts +17 -0
  5. package/dist/components/InfoForm/InfoForm.d.ts +4 -0
  6. package/dist/components/JsonInput/JsonInput.d.ts +15 -0
  7. package/dist/components/LivePreview/LivePreview.d.ts +8 -0
  8. package/dist/components/MethodAccordion/MethodAccordion.d.ts +13 -0
  9. package/dist/components/SVGLoader/SVGLoader.d.ts +8 -0
  10. package/dist/components/SectionHead/SectionHead.d.ts +10 -0
  11. package/dist/components/SimpleLabelValue/SimpleLabelValue.d.ts +11 -0
  12. package/dist/components/SimpleLabelValue/index.d.ts +1 -0
  13. package/dist/components/Tooltip/Tooltip.d.ts +19 -0
  14. package/dist/components/dialog/dialog.d.ts +47 -0
  15. package/dist/components/dialog/index.d.ts +5 -0
  16. package/dist/components/table/table.d.ts +13 -0
  17. package/dist/components/table/tags-table.d.ts +11 -0
  18. package/dist/constants/index.d.ts +73 -0
  19. package/dist/constants/methods.constant.d.ts +16 -0
  20. package/dist/constants/regex.d.ts +7 -0
  21. package/dist/context/SectionToggleContext.d.ts +37 -0
  22. package/dist/helpers/docs.helper.d.ts +3 -0
  23. package/dist/helpers/layout.helper.d.ts +7 -0
  24. package/dist/helpers/methodAccordion.helper.d.ts +2 -0
  25. package/dist/index.d.ts +2 -0
  26. package/dist/index.js +13 -0
  27. package/dist/index.js.map +1 -0
  28. package/dist/layout/docsComponents/Codebox/Codebox.d.ts +5 -0
  29. package/dist/layout/docsComponents/DocsAside/DocsAside.d.ts +6 -0
  30. package/dist/layout/docsComponents/DocsContent/DocsContent.d.ts +12 -0
  31. package/dist/layout/docsComponents/DocsContent/EndpointPage/index.d.ts +7 -0
  32. package/dist/layout/docsComponents/DocsContent/OverviewPage/index.d.ts +10 -0
  33. package/dist/layout/docsComponents/DocsHeader/DocsHeader.d.ts +7 -0
  34. package/dist/layout/docsComponents/DocsSideMenuTree/DocsSideMenuTree.d.ts +18 -0
  35. package/dist/layout/docsComponents/index.d.ts +17 -0
  36. package/dist/layout/docsLayout.d.ts +31 -0
  37. package/dist/layout/layout.d.ts +10 -0
  38. package/dist/node_modules/yup/index.esm.js +1 -1
  39. package/dist/src/components/Tooltip/Tooltip.js +1 -1
  40. package/dist/src/components/Tooltip/Tooltip.js.map +1 -1
  41. package/dist/src/layout/layout.module.css.js +1 -1
  42. package/dist/style.css +1 -0
  43. package/dist/styles.css +858 -858
  44. package/dist/types/docsLayout.type.d.ts +7 -0
  45. package/dist/types/index.d.ts +27 -2
  46. package/dist/types/layout.type.d.ts +29 -0
  47. package/dist/types/openApi.d.ts +98 -0
  48. package/dist/types/transformedOpenApi.d.ts +50 -0
  49. package/dist/utils/index.d.ts +2 -0
  50. package/dist/validator/form.scheme.d.ts +49 -0
  51. package/package.json +9 -8
  52. package/rollup.config.js +5 -14
  53. package/tsconfig.json +4 -3
@@ -0,0 +1,7 @@
1
+ export declare enum SectionEnum {
2
+ OVERVIEW = "overview",
3
+ RESOURCE = "resource",
4
+ API_SECTION = "apiSection",
5
+ TAG_SECTION = "tagSection",
6
+ ENDPOINTS_SECTION = "endpointsSection"
7
+ }
@@ -1,2 +1,27 @@
1
- export { default as Layout } from './layout/layout';
2
- export { default as DocsLayout } from './layout/docsLayout';
1
+ import { OpenAPIFile } from './openApi';
2
+ export interface ApiSpecModel {
3
+ apiSpecId: string;
4
+ contextPath: string;
5
+ apiVersions: {
6
+ addVersionToContextPath: boolean;
7
+ apiSpecId: string;
8
+ name: string;
9
+ metaData: {
10
+ version: string;
11
+ };
12
+ }[];
13
+ associatedProduct: {
14
+ availableOnDevPortal: boolean;
15
+ name: string;
16
+ premium: boolean;
17
+ productId: number;
18
+ };
19
+ metaData: {
20
+ version: string;
21
+ apiVersionOf: string;
22
+ openApiJson: OpenAPIFile;
23
+ tags: string[];
24
+ createdDateTime: string;
25
+ lastUpdatedDateTime: string;
26
+ };
27
+ }
@@ -0,0 +1,29 @@
1
+ import { HTTPMethod } from './openApi';
2
+ export type TransformedMethod = {
3
+ type: HTTPMethod;
4
+ tags: string[];
5
+ summary?: string;
6
+ parameters: any;
7
+ requestBody: {
8
+ content: {
9
+ contentType: string;
10
+ schema: {
11
+ properties: string;
12
+ type: string;
13
+ };
14
+ };
15
+ };
16
+ responses: {
17
+ code: string;
18
+ content: {
19
+ contentType?: string;
20
+ schema?: unknown;
21
+ };
22
+ headers: any;
23
+ }[];
24
+ };
25
+ export type TransformedPath = {
26
+ path: string;
27
+ methods: TransformedMethod[];
28
+ };
29
+ export type TransformedPathsArray = TransformedPath[];
@@ -0,0 +1,98 @@
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<Record<HTTPMethod, {
14
+ tags: string[];
15
+ responses: Responses;
16
+ summary?: string;
17
+ description?: string;
18
+ parameters?: Parameter[];
19
+ requestBody?: RequestBody;
20
+ }>>;
21
+ };
22
+ components?: {
23
+ schemas?: {
24
+ [schemaName: string]: Schema;
25
+ };
26
+ securitySchemes?: {
27
+ [schemeName: string]: SecurityScheme;
28
+ };
29
+ };
30
+ security?: {
31
+ [schemeName: string]: string[];
32
+ }[];
33
+ tags?: {
34
+ name: string;
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;
48
+ }[];
49
+ }
50
+ export interface Parameter {
51
+ name: string;
52
+ in: 'query' | 'header' | 'path' | 'cookie';
53
+ description?: string;
54
+ required: boolean;
55
+ schema: Schema;
56
+ }
57
+ export interface RequestBody {
58
+ description?: string;
59
+ required: boolean;
60
+ content: {
61
+ [contentType: string]: {
62
+ schema: Schema;
63
+ };
64
+ };
65
+ }
66
+ export interface Responses {
67
+ [statusCode: string]: {
68
+ description: string;
69
+ headers?: any;
70
+ content?: {
71
+ [contentType: string]: {
72
+ schema: Schema;
73
+ };
74
+ };
75
+ };
76
+ }
77
+ interface Schema {
78
+ type?: string;
79
+ format?: string;
80
+ properties?: {
81
+ [propertyName: string]: Schema;
82
+ };
83
+ items?: Schema;
84
+ enum?: string[];
85
+ required?: string[];
86
+ }
87
+ export interface SecurityScheme {
88
+ type: 'apiKey' | 'http' | 'oauth2' | 'openIdConnect';
89
+ description?: string;
90
+ name?: string;
91
+ in?: 'query' | 'header' | 'cookie';
92
+ scheme?: string;
93
+ bearerFormat?: string;
94
+ flows?: any;
95
+ openIdConnectUrl?: string;
96
+ }
97
+ export type HTTPMethod = 'get' | 'put' | 'post' | 'delete' | 'options' | 'head' | 'patch' | 'trace';
98
+ export {};
@@ -0,0 +1,50 @@
1
+ import { TransformedPathsArray } from "./layout.type";
2
+ export interface TransformedOpenApi {
3
+ openapi: string;
4
+ info: {
5
+ title: string;
6
+ description?: string;
7
+ version: string;
8
+ };
9
+ servers?: {
10
+ url: string;
11
+ description?: string;
12
+ }[];
13
+ paths: TransformedPathsArray;
14
+ components?: {
15
+ schemas?: {
16
+ [schemaName: string]: Schema;
17
+ };
18
+ securitySchemes?: {
19
+ [schemeName: string]: SecurityScheme;
20
+ };
21
+ };
22
+ security?: {
23
+ [schemeName: string]: string[];
24
+ }[];
25
+ tags?: {
26
+ name: string;
27
+ description?: string;
28
+ }[];
29
+ }
30
+ interface Schema {
31
+ type?: string;
32
+ format?: string;
33
+ properties?: {
34
+ [propertyName: string]: Schema;
35
+ };
36
+ items?: Schema;
37
+ enum?: string[];
38
+ required?: string[];
39
+ }
40
+ interface SecurityScheme {
41
+ type: "apiKey" | "http" | "oauth2" | "openIdConnect";
42
+ description?: string;
43
+ name?: string;
44
+ in?: "query" | "header" | "cookie";
45
+ scheme?: string;
46
+ bearerFormat?: string;
47
+ flows?: any;
48
+ openIdConnectUrl?: string;
49
+ }
50
+ export {};
@@ -0,0 +1,2 @@
1
+ export declare const copyToClipboard: (text: string) => Promise<any>;
2
+ export declare const capitalizeFirstLetter: (text: string) => string;
@@ -0,0 +1,49 @@
1
+ import * as yup from 'yup';
2
+ export declare const schemaValidation: yup.ObjectSchema<{
3
+ openapi: string;
4
+ info: {
5
+ title?: string;
6
+ description?: string;
7
+ version?: string;
8
+ };
9
+ servers: {
10
+ description?: string;
11
+ url?: string;
12
+ }[];
13
+ paths: {
14
+ path?: string;
15
+ methods?: {
16
+ summary?: string;
17
+ type?: string;
18
+ description?: string;
19
+ tags?: string[];
20
+ requestBody?: {};
21
+ }[];
22
+ }[];
23
+ components: {
24
+ securitySchemes?: {};
25
+ schemas?: {};
26
+ };
27
+ security: {
28
+ schemeName?: string[];
29
+ }[];
30
+ tags: {
31
+ name?: string;
32
+ description?: string;
33
+ }[];
34
+ }, yup.AnyObject, {
35
+ openapi: undefined;
36
+ info: {
37
+ title: undefined;
38
+ description: undefined;
39
+ version: undefined;
40
+ };
41
+ servers: undefined;
42
+ paths: "";
43
+ components: {
44
+ schemas: undefined;
45
+ securitySchemes: {};
46
+ };
47
+ security: undefined;
48
+ tags: undefined;
49
+ }, "">;
package/package.json CHANGED
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "name": "@digi-frontend/dgate-api-documentation",
3
- "version": "1.4.4",
4
- "main": "dist/src/index.js",
5
- "module": "dist/src/index.js",
6
- "types": "dist/types/index.d.ts",
3
+ "version": "1.4.6",
4
+ "main": "dist/cjs/index.js",
5
+ "module": "dist/esm/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "style": "dist/style.css",
7
8
  "scripts": {
8
9
  "test": "echo \"Error: no test specified\" && exit 1",
9
10
  "build": "tsc --noEmit --skipLibCheck || true && rollup -c || true"
@@ -30,10 +31,10 @@
30
31
  "yup": "^1.6.1"
31
32
  },
32
33
  "devDependencies": {
33
- "@rollup/plugin-commonjs": "^28.0.2",
34
+ "@rollup/plugin-commonjs": "^28.0.6",
34
35
  "@rollup/plugin-json": "^6.1.0",
35
- "@rollup/plugin-node-resolve": "^16.0.0",
36
- "@rollup/plugin-typescript": "^12.1.2",
36
+ "@rollup/plugin-node-resolve": "^16.0.1",
37
+ "@rollup/plugin-typescript": "^12.1.4",
37
38
  "@rollup/plugin-url": "^8.0.2",
38
39
  "@types/react": "^19.0.7",
39
40
  "@types/react-dom": "^19.0.3",
@@ -41,7 +42,7 @@
41
42
  "rollup-plugin-postcss": "^4.0.2",
42
43
  "rollup-plugin-sass": "^1.15.2",
43
44
  "rollup-plugin-terser": "^7.0.2",
44
- "sass": "^1.83.4",
45
+ "sass": "^1.90.0",
45
46
  "typescript": "^5.7.3",
46
47
  "typescript-plugin-css-modules": "^5.1.0"
47
48
  }
package/rollup.config.js CHANGED
@@ -9,28 +9,19 @@ import json from '@rollup/plugin-json'
9
9
 
10
10
  export default {
11
11
  input: 'src/index.ts',
12
- output: [
13
- {
14
- dir: 'dist',
15
- format: 'esm',
16
- preserveModules: true,
17
- sourcemap: true,
18
- },
19
- ],
12
+ output: [{ dir: 'dist', format: 'esm', sourcemap: true }],
20
13
  plugins: [
21
14
  resolve(),
22
15
  commonjs(),
23
- typescript({ tsconfig: './tsconfig.json' }),
16
+ typescript({ tsconfig: './tsconfig.json', declaration: true, declarationMap: false }),
24
17
  postcss({
25
- modules: false,
26
- extract: false,
18
+ modules: true,
19
+ extract: 'style.css',
20
+ use: ['sass'],
27
21
  minimize: true,
28
22
  }),
29
23
  terser(),
30
24
  url({ limit: 0 }),
31
- sass({
32
- output: 'dist/styles.css',
33
- }),
34
25
  json(),
35
26
  ],
36
27
  external: ['react', 'react-dom'],
package/tsconfig.json CHANGED
@@ -2,14 +2,15 @@
2
2
  "compilerOptions": {
3
3
  "outDir": "dist",
4
4
  "module": "ESNext",
5
- "target": "ES6",
5
+ "target": "es6",
6
6
  "lib": ["DOM", "DOM.Iterable", "ESNext"],
7
7
  "declaration": true,
8
- "declarationDir": "dist/types",
9
- "jsx": "react-jsx",
8
+ "jsx": "react",
10
9
  "strict": false,
11
10
  "moduleResolution": "node",
12
11
  "esModuleInterop": true,
12
+ "emitDeclarationOnly": true,
13
+
13
14
  "skipLibCheck": true,
14
15
  "forceConsistentCasingInFileNames": true,
15
16
  "importHelpers": true,