@digi-frontend/dgate-api-documentation 1.4.5 → 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.
- package/dist/assets/icons/index.d.ts +27 -0
- package/dist/components/Chips/Chips.d.ts +17 -0
- package/dist/components/InfoForm/InfoForm.d.ts +4 -0
- package/dist/components/JsonInput/JsonInput.d.ts +15 -0
- package/dist/components/LivePreview/LivePreview.d.ts +8 -0
- package/dist/components/MethodAccordion/MethodAccordion.d.ts +13 -0
- package/dist/components/SVGLoader/SVGLoader.d.ts +8 -0
- package/dist/components/SectionHead/SectionHead.d.ts +10 -0
- package/dist/components/SimpleLabelValue/SimpleLabelValue.d.ts +11 -0
- package/dist/components/SimpleLabelValue/index.d.ts +1 -0
- package/dist/components/Tooltip/Tooltip.d.ts +19 -0
- package/dist/components/dialog/dialog.d.ts +47 -0
- package/dist/components/dialog/index.d.ts +5 -0
- package/dist/components/table/table.d.ts +13 -0
- package/dist/components/table/tags-table.d.ts +11 -0
- package/dist/constants/index.d.ts +73 -0
- package/dist/constants/methods.constant.d.ts +16 -0
- package/dist/constants/regex.d.ts +7 -0
- package/dist/context/SectionToggleContext.d.ts +37 -0
- package/dist/helpers/docs.helper.d.ts +3 -0
- package/dist/helpers/layout.helper.d.ts +7 -0
- package/dist/helpers/methodAccordion.helper.d.ts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -0
- package/dist/layout/docsComponents/Codebox/Codebox.d.ts +5 -0
- package/dist/layout/docsComponents/DocsAside/DocsAside.d.ts +6 -0
- package/dist/layout/docsComponents/DocsContent/DocsContent.d.ts +12 -0
- package/dist/layout/docsComponents/DocsContent/EndpointPage/index.d.ts +7 -0
- package/dist/layout/docsComponents/DocsContent/OverviewPage/index.d.ts +10 -0
- package/dist/layout/docsComponents/DocsHeader/DocsHeader.d.ts +7 -0
- package/dist/layout/docsComponents/DocsSideMenuTree/DocsSideMenuTree.d.ts +18 -0
- package/dist/layout/docsComponents/index.d.ts +17 -0
- package/dist/layout/docsLayout.d.ts +31 -0
- package/dist/layout/layout.d.ts +10 -0
- package/dist/style.css +1 -1
- package/dist/types/docsLayout.type.d.ts +7 -0
- package/dist/types/index.d.ts +27 -2
- package/dist/types/layout.type.d.ts +29 -0
- package/dist/types/openApi.d.ts +98 -0
- package/dist/types/transformedOpenApi.d.ts +50 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/validator/form.scheme.d.ts +49 -0
- package/package.json +9 -8
- package/rollup.config.js +4 -14
- package/tsconfig.json +4 -3
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export { default as UpArrowIcon } from './UpArrow.svg';
|
|
2
|
+
export { default as DownArrowIcon } from './DownArrow.svg';
|
|
3
|
+
export { default as CloseIcon } from './CloseIcon.svg';
|
|
4
|
+
export { default as CheckMarkSquare } from './CheckMarkSquare.svg';
|
|
5
|
+
export { default as DeleteIcon } from './DeleteIcon.svg';
|
|
6
|
+
export { default as EditIcon } from './EditIcon.svg';
|
|
7
|
+
export { default as AddRow } from './AddRow.svg';
|
|
8
|
+
export { default as CopySticker } from './CopySticker.svg';
|
|
9
|
+
export { default as arrowDownGray } from './arrowDownGray.svg';
|
|
10
|
+
export { default as arrowRightGray } from './arrowRightGray.svg';
|
|
11
|
+
export { default as document } from './document.svg';
|
|
12
|
+
export { default as eye } from './eye.svg';
|
|
13
|
+
export { default as DeleteOutlinedIcon } from './DeleteOutlinedIcon.svg';
|
|
14
|
+
export { default as ApiIcon } from './ApiIcon.svg';
|
|
15
|
+
export { default as FilterIcon } from './FilterIcon.svg';
|
|
16
|
+
export { default as BookIcon } from './BookIcon.svg';
|
|
17
|
+
export { default as Closecircle } from './close-circle.svg';
|
|
18
|
+
export { default as InfoIcon } from './infoIcon.svg';
|
|
19
|
+
export { default as SearchIcon } from './searchIcon.svg';
|
|
20
|
+
export { default as Copy } from './copy.svg';
|
|
21
|
+
export { default as PlusIcon } from './Plus.svg';
|
|
22
|
+
export { default as PlusSquare } from './PlusSquare.svg';
|
|
23
|
+
export { default as RequestOption } from './RequestOption.svg';
|
|
24
|
+
export { default as ArrowBack } from './ArrowBack.svg';
|
|
25
|
+
export { default as arrowDown } from './arrow-down.svg';
|
|
26
|
+
export { default as newCopyIcon } from './newCopyIcon.svg';
|
|
27
|
+
export { default as arrowUp } from './arrow-up.svg';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './style.scss';
|
|
3
|
+
type ChipItemType = {
|
|
4
|
+
id: number | string;
|
|
5
|
+
label: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
[key: string]: unknown;
|
|
9
|
+
};
|
|
10
|
+
export type CustomChipsType = {
|
|
11
|
+
className?: string;
|
|
12
|
+
items: ChipItemType[];
|
|
13
|
+
onDelete?: (items: ChipItemType[]) => void;
|
|
14
|
+
onClick?: (item: ChipItemType) => void;
|
|
15
|
+
};
|
|
16
|
+
declare const Chips: ({ className, items, onDelete, onClick }: CustomChipsType) => React.JSX.Element;
|
|
17
|
+
export default Chips;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const JsonInput: ({ placeholder, label, value, onValidation, onChange, dataId, className, errorMessage, acceptType, fieldIsDisabled, withFooter, }: {
|
|
3
|
+
placeholder: any;
|
|
4
|
+
label: any;
|
|
5
|
+
value: any;
|
|
6
|
+
onValidation: any;
|
|
7
|
+
onChange: any;
|
|
8
|
+
dataId: any;
|
|
9
|
+
className?: string;
|
|
10
|
+
errorMessage: any;
|
|
11
|
+
acceptType?: string;
|
|
12
|
+
fieldIsDisabled: any;
|
|
13
|
+
withFooter?: boolean;
|
|
14
|
+
}) => React.JSX.Element;
|
|
15
|
+
export default JsonInput;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TransformedOpenApi } from '../../types/transformedOpenApi';
|
|
3
|
+
interface LivePreviewProps {
|
|
4
|
+
transformedData?: TransformedOpenApi;
|
|
5
|
+
openApiErrors?: any[];
|
|
6
|
+
}
|
|
7
|
+
declare const LivePreview: React.FC<LivePreviewProps>;
|
|
8
|
+
export default LivePreview;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TransformedMethod } from '../../types/layout.type';
|
|
2
|
+
import { Tags } from '@entities/openApi';
|
|
3
|
+
declare const MethodsAccordion: ({ method, path, setFieldValue, readOnly, tags, isOpen, setIsOpen, errors, }: {
|
|
4
|
+
method: TransformedMethod;
|
|
5
|
+
path: string;
|
|
6
|
+
setFieldValue?: (key: string, value: string | string[]) => void;
|
|
7
|
+
readOnly?: boolean;
|
|
8
|
+
tags: Tags[];
|
|
9
|
+
isOpen: boolean;
|
|
10
|
+
setIsOpen: (open: boolean) => void;
|
|
11
|
+
errors?: string;
|
|
12
|
+
}) => import("react").JSX.Element;
|
|
13
|
+
export default MethodsAccordion;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React, { type JSX } from 'react';
|
|
2
|
+
import './SectionHead.scss';
|
|
3
|
+
type SectionHeadProps = {
|
|
4
|
+
text: string | JSX.Element;
|
|
5
|
+
closeFunction?: () => void;
|
|
6
|
+
children?: JSX.Element;
|
|
7
|
+
className?: string;
|
|
8
|
+
};
|
|
9
|
+
declare const SectionHead: React.FC<SectionHeadProps>;
|
|
10
|
+
export default SectionHead;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './style.scss';
|
|
3
|
+
type SimpleLabelValueProps = {
|
|
4
|
+
label?: string | JSX.Element;
|
|
5
|
+
value?: string | number | JSX.Element | JSX.Element[];
|
|
6
|
+
color?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
dataId?: string;
|
|
9
|
+
};
|
|
10
|
+
declare const SimpleLabelValue: React.FC<SimpleLabelValueProps>;
|
|
11
|
+
export default SimpleLabelValue;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './SimpleLabelValue';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { TippyProps } from '@tippyjs/react';
|
|
3
|
+
import 'tippy.js/dist/tippy.css';
|
|
4
|
+
import './Tooltip.scss';
|
|
5
|
+
interface TooltipProps extends TippyProps {
|
|
6
|
+
content: ReactNode;
|
|
7
|
+
success?: boolean;
|
|
8
|
+
onMouseEnter?: (event: React.MouseEvent<HTMLDivElement>) => void;
|
|
9
|
+
onMouseLeave?: (event: React.MouseEvent<HTMLDivElement>) => void;
|
|
10
|
+
visible?: boolean;
|
|
11
|
+
delay?: [number, number];
|
|
12
|
+
type?: 'info' | 'function';
|
|
13
|
+
maxWidth?: number;
|
|
14
|
+
className?: string;
|
|
15
|
+
arrowWithBorder?: boolean;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
}
|
|
18
|
+
declare const Tooltip: React.FC<TooltipProps>;
|
|
19
|
+
export default Tooltip;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { JSX } from 'react';
|
|
2
|
+
export type DialogStatus = 'error' | 'info' | 'warning';
|
|
3
|
+
export type DialogSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
4
|
+
export type ButtonType = 'text' | 'submit' | 'reset';
|
|
5
|
+
export type ButtonVariant = 'outlined' | 'contained' | 'text' | 'link';
|
|
6
|
+
export type ButtonColor = 'inherit' | 'primary' | 'secondary' | 'success' | 'error' | 'info' | 'warning' | 'action' | 'normal';
|
|
7
|
+
export type ButtonSize = 'small' | 'medium' | 'large';
|
|
8
|
+
export interface BaseActionButtonProps {
|
|
9
|
+
text: string;
|
|
10
|
+
color?: ButtonColor;
|
|
11
|
+
variant?: ButtonVariant;
|
|
12
|
+
type?: ButtonType;
|
|
13
|
+
size?: ButtonSize;
|
|
14
|
+
id?: string;
|
|
15
|
+
className?: string;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
startIcon?: JSX.Element;
|
|
18
|
+
endIcon?: JSX.Element;
|
|
19
|
+
dataId?: string;
|
|
20
|
+
loading?: boolean;
|
|
21
|
+
fullWidth?: boolean;
|
|
22
|
+
active?: boolean;
|
|
23
|
+
onKeyDown?: () => void;
|
|
24
|
+
}
|
|
25
|
+
export interface SubmitButtonProps extends BaseActionButtonProps {
|
|
26
|
+
onClick: () => void;
|
|
27
|
+
}
|
|
28
|
+
export interface CancelButtonProps extends BaseActionButtonProps {
|
|
29
|
+
onClick?: () => void;
|
|
30
|
+
}
|
|
31
|
+
export interface CommonDialogProps {
|
|
32
|
+
status?: DialogStatus;
|
|
33
|
+
content?: React.ReactElement;
|
|
34
|
+
onSubmit?: SubmitButtonProps;
|
|
35
|
+
onCancel?: CancelButtonProps;
|
|
36
|
+
onClose: () => void;
|
|
37
|
+
open?: boolean;
|
|
38
|
+
icon?: JSX.Element | boolean;
|
|
39
|
+
size?: DialogSize;
|
|
40
|
+
children?: React.ReactElement;
|
|
41
|
+
statusTitle?: boolean;
|
|
42
|
+
isSubmitDisabled?: boolean;
|
|
43
|
+
submitBtnComponent?: JSX.Element | null;
|
|
44
|
+
withClose?: boolean;
|
|
45
|
+
noActions?: boolean;
|
|
46
|
+
closeIcon?: JSX.Element;
|
|
47
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './style.scss';
|
|
3
|
+
import { CommonDialogProps } from './dialog';
|
|
4
|
+
declare const CommonDialog: ({ status, content, onSubmit, onCancel, onClose, open, size, icon, noActions, closeIcon, }: CommonDialogProps) => React.JSX.Element;
|
|
5
|
+
export default CommonDialog;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './style.scss';
|
|
3
|
+
declare const ParamterTable: ({ id, headCells, data, isFormOpen, setIsFormOpen, saveNewRow, readOnly, isRequest, }: {
|
|
4
|
+
id: any;
|
|
5
|
+
headCells: any;
|
|
6
|
+
data: any;
|
|
7
|
+
isFormOpen: any;
|
|
8
|
+
setIsFormOpen: any;
|
|
9
|
+
saveNewRow: any;
|
|
10
|
+
readOnly: any;
|
|
11
|
+
isRequest?: boolean;
|
|
12
|
+
}) => React.JSX.Element;
|
|
13
|
+
export default ParamterTable;
|
|
@@ -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.Element;
|
|
11
|
+
export default TagsTable;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
export declare const methodColorMapping: {
|
|
2
|
+
get: {
|
|
3
|
+
label: string;
|
|
4
|
+
color: string;
|
|
5
|
+
order: number;
|
|
6
|
+
};
|
|
7
|
+
post: {
|
|
8
|
+
label: string;
|
|
9
|
+
color: string;
|
|
10
|
+
order: number;
|
|
11
|
+
};
|
|
12
|
+
put: {
|
|
13
|
+
label: string;
|
|
14
|
+
color: string;
|
|
15
|
+
order: number;
|
|
16
|
+
};
|
|
17
|
+
delete: {
|
|
18
|
+
label: string;
|
|
19
|
+
color: string;
|
|
20
|
+
order: number;
|
|
21
|
+
};
|
|
22
|
+
patch: {
|
|
23
|
+
label: string;
|
|
24
|
+
color: string;
|
|
25
|
+
order: number;
|
|
26
|
+
};
|
|
27
|
+
options: {
|
|
28
|
+
label: string;
|
|
29
|
+
color: string;
|
|
30
|
+
order: number;
|
|
31
|
+
};
|
|
32
|
+
trace: {
|
|
33
|
+
label: string;
|
|
34
|
+
color: string;
|
|
35
|
+
order: number;
|
|
36
|
+
};
|
|
37
|
+
head: {
|
|
38
|
+
label: string;
|
|
39
|
+
color: string;
|
|
40
|
+
order: number;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
export declare const tagsTableHeaders: ({
|
|
44
|
+
id: string;
|
|
45
|
+
label: string;
|
|
46
|
+
sortable: boolean;
|
|
47
|
+
classes: string;
|
|
48
|
+
} | {
|
|
49
|
+
id: string;
|
|
50
|
+
label: string;
|
|
51
|
+
sortable: boolean;
|
|
52
|
+
classes?: undefined;
|
|
53
|
+
})[];
|
|
54
|
+
export declare const paramsTableHeaders: ({
|
|
55
|
+
id: string;
|
|
56
|
+
label: string;
|
|
57
|
+
sortable: boolean;
|
|
58
|
+
required: boolean;
|
|
59
|
+
classes: string;
|
|
60
|
+
} | {
|
|
61
|
+
id: string;
|
|
62
|
+
label: string;
|
|
63
|
+
sortable: boolean;
|
|
64
|
+
classes: string;
|
|
65
|
+
required?: undefined;
|
|
66
|
+
} | {
|
|
67
|
+
id: string;
|
|
68
|
+
label: string;
|
|
69
|
+
sortable: boolean;
|
|
70
|
+
required?: undefined;
|
|
71
|
+
classes?: undefined;
|
|
72
|
+
})[];
|
|
73
|
+
export declare const httpStatusCodes: number[];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type MethodOption = {
|
|
2
|
+
label: string;
|
|
3
|
+
value: string;
|
|
4
|
+
color: string;
|
|
5
|
+
};
|
|
6
|
+
export declare const METHOD_OPTIONS: MethodOption[];
|
|
7
|
+
export declare const METHOD_OPTIONS_CONFIG: {
|
|
8
|
+
list: {
|
|
9
|
+
labelConfig: {
|
|
10
|
+
color: string;
|
|
11
|
+
text: string;
|
|
12
|
+
};
|
|
13
|
+
value: string;
|
|
14
|
+
data: MethodOption;
|
|
15
|
+
}[];
|
|
16
|
+
}[];
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
export declare enum SectionEnum {
|
|
3
|
+
OVERVIEW = "overview",
|
|
4
|
+
RESOURCE = "resource",
|
|
5
|
+
API_SECTION = "apiSection",
|
|
6
|
+
TAG_SECTION = "tagSection",
|
|
7
|
+
ENDPOINTS_SECTION = "endpointsSection"
|
|
8
|
+
}
|
|
9
|
+
type SectionKey = `api_${string}_${SectionEnum}` | `api_${string}_${SectionEnum}_${string | number}` | `api_${string}_${SectionEnum}_${string | number}_${string | number}`;
|
|
10
|
+
type ExpandedSections = Record<SectionKey, boolean>;
|
|
11
|
+
interface SectionToggleContextType {
|
|
12
|
+
expandedSections: ExpandedSections;
|
|
13
|
+
toggleSection: (apiId: string, sections: ToggleSectionDescriptor[], options?: ToggleOptions) => void;
|
|
14
|
+
generateSectionKey: ({ apiId, type, index, id }: GenerateSectionKeyParams) => SectionKey;
|
|
15
|
+
}
|
|
16
|
+
interface SectionToggleProviderProps {
|
|
17
|
+
children: ReactNode;
|
|
18
|
+
}
|
|
19
|
+
export interface ToggleSectionDescriptor {
|
|
20
|
+
type: SectionEnum;
|
|
21
|
+
index?: string | number;
|
|
22
|
+
setTo?: boolean;
|
|
23
|
+
id?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface ToggleOptions {
|
|
26
|
+
resetOthers?: boolean;
|
|
27
|
+
filterKeys?: SectionEnum[];
|
|
28
|
+
}
|
|
29
|
+
interface GenerateSectionKeyParams {
|
|
30
|
+
apiId: string;
|
|
31
|
+
type: SectionEnum;
|
|
32
|
+
index?: string | number;
|
|
33
|
+
id?: string | number;
|
|
34
|
+
}
|
|
35
|
+
export declare const useSectionToggle: () => SectionToggleContextType;
|
|
36
|
+
export declare const SectionToggleProvider: ({ children }: SectionToggleProviderProps) => React.JSX.Element;
|
|
37
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TransformedPathsArray } from '@entities/layout.type';
|
|
2
|
+
import { OpenAPIFile } from '@entities/openApi';
|
|
3
|
+
import { TransformedOpenApi } from '@entities/transformedOpenApi';
|
|
4
|
+
export declare const transformOpenApiObject: (openApiJson: OpenAPIFile) => TransformedOpenApi;
|
|
5
|
+
export declare const transformOpenApiObjectToOrigin: (values: TransformedOpenApi) => OpenAPIFile;
|
|
6
|
+
export declare const transformPathsToArray: (openApiJson: OpenAPIFile) => TransformedPathsArray | any;
|
|
7
|
+
export declare const transformPathsArrayToOrigin: (paths: TransformedPathsArray) => OpenAPIFile["paths"];
|
package/dist/index.d.ts
ADDED