@stoplight/elements-core 8.3.3 → 8.3.4
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/components/Docs/HttpOperation/Request.d.ts +1 -0
- package/components/TableOfContents/constants.d.ts +15 -27
- package/components/TryIt/Parameters/parameter-utils.d.ts +1 -1
- package/components/TryIt/Parameters/useOperationParameters.d.ts +1 -1
- package/constants.d.ts +9 -89
- package/index.esm.js +3826 -3829
- package/index.js +3692 -3734
- package/index.mjs +3826 -3829
- package/package.json +2 -2
- package/utils/exampleGeneration/exampleGeneration.d.ts +3 -1
- package/web-components/createElementClass.d.ts +1 -1
|
@@ -2,6 +2,7 @@ import { IHttpEndpointOperation } from '@stoplight/types';
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
interface IRequestProps {
|
|
4
4
|
operation: IHttpEndpointOperation;
|
|
5
|
+
hideSecurityInfo?: boolean;
|
|
5
6
|
onChange?: (requestBodyIndex: number) => void;
|
|
6
7
|
}
|
|
7
8
|
export declare const Request: React.FunctionComponent<IRequestProps>;
|
|
@@ -1,30 +1,18 @@
|
|
|
1
|
-
import { IIconProps } from '@stoplight/mosaic';
|
|
2
|
-
|
|
1
|
+
import { IIconProps, ITextColorProps } from '@stoplight/mosaic';
|
|
2
|
+
import { HttpMethod } from '@stoplight/types';
|
|
3
|
+
export declare const NODE_TYPE_TITLE_ICON: Readonly<{
|
|
3
4
|
[nodeType: string]: IIconProps['icon'];
|
|
4
|
-
}
|
|
5
|
-
export declare const NODE_GROUP_ICON: {
|
|
5
|
+
}>;
|
|
6
|
+
export declare const NODE_GROUP_ICON: Readonly<{
|
|
6
7
|
[itemType: string]: IIconProps['icon'];
|
|
7
|
-
}
|
|
8
|
-
export declare const NODE_TYPE_META_ICON: {
|
|
8
|
+
}>;
|
|
9
|
+
export declare const NODE_TYPE_META_ICON: Readonly<{
|
|
9
10
|
[nodeType: string]: IIconProps['icon'];
|
|
10
|
-
}
|
|
11
|
-
export declare const NODE_TYPE_ICON_COLOR: {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
export declare const
|
|
18
|
-
http_webhook: string;
|
|
19
|
-
model: string;
|
|
20
|
-
};
|
|
21
|
-
export declare const NODE_META_COLOR: {
|
|
22
|
-
get: string;
|
|
23
|
-
post: string;
|
|
24
|
-
put: string;
|
|
25
|
-
patch: string;
|
|
26
|
-
delete: string;
|
|
27
|
-
head: string;
|
|
28
|
-
options: string;
|
|
29
|
-
trace: string;
|
|
30
|
-
};
|
|
11
|
+
}>;
|
|
12
|
+
export declare const NODE_TYPE_ICON_COLOR: Readonly<{
|
|
13
|
+
[nodeType: string]: ITextColorProps['color'];
|
|
14
|
+
}>;
|
|
15
|
+
export declare const NODE_GROUP_ICON_COLOR: Readonly<{
|
|
16
|
+
[nodeType: string]: ITextColorProps['color'];
|
|
17
|
+
}>;
|
|
18
|
+
export declare const NODE_META_COLOR: Readonly<Record<HttpMethod, string>>;
|
|
@@ -30,7 +30,7 @@ export declare function mapSchemaPropertiesToParameters(properties: {
|
|
|
30
30
|
schema: JSONSchema7 | undefined;
|
|
31
31
|
examples: {
|
|
32
32
|
key: string;
|
|
33
|
-
value:
|
|
33
|
+
value: string | number | true | import("json-schema").JSONSchema7Object | import("json-schema").JSONSchema7Array;
|
|
34
34
|
}[] | undefined;
|
|
35
35
|
}[];
|
|
36
36
|
export declare function toParameterSpec(jsonTreeNode: RegularNode): ParameterSpec;
|
|
@@ -3,7 +3,7 @@ import { ParameterSpec } from './parameter-utils';
|
|
|
3
3
|
export declare const useRequestParameters: (httpOperation: IHttpEndpointOperation) => {
|
|
4
4
|
allParameters: ParameterSpec[];
|
|
5
5
|
parameterValuesWithDefaults: {
|
|
6
|
-
[k: string]:
|
|
6
|
+
[k: string]: string;
|
|
7
7
|
};
|
|
8
8
|
updateParameterValue: (name: string, value: string) => void;
|
|
9
9
|
};
|
package/constants.d.ts
CHANGED
|
@@ -1,94 +1,14 @@
|
|
|
1
1
|
import { IconDefinition } from '@fortawesome/free-solid-svg-icons';
|
|
2
2
|
import { IntentVals } from '@stoplight/mosaic';
|
|
3
|
-
import { Dictionary, HttpSecurityScheme, NodeType } from '@stoplight/types';
|
|
4
|
-
export declare const NodeTypeColors: Dictionary<string, NodeType
|
|
5
|
-
export declare const NodeTypePrettyName: Dictionary<string, NodeType
|
|
6
|
-
export declare const NodeTypeIconDefs: Dictionary<IconDefinition, NodeType
|
|
7
|
-
export declare const HttpSecuritySchemeColors: Partial<Record<HttpSecurityScheme['type'], string
|
|
8
|
-
export declare const HttpMethodColors:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
readonly put: "warning";
|
|
12
|
-
readonly patch: "warning";
|
|
13
|
-
readonly delete: "danger";
|
|
14
|
-
readonly head: "#9061F9";
|
|
15
|
-
readonly options: "#0D5AA7";
|
|
16
|
-
readonly trace: "#0D0B28";
|
|
17
|
-
};
|
|
18
|
-
export declare const HttpCodeColor: {
|
|
19
|
-
readonly 0: "red";
|
|
20
|
-
readonly 1: "gray";
|
|
21
|
-
readonly 2: "green";
|
|
22
|
-
readonly 3: "yellow";
|
|
23
|
-
readonly 4: "orange";
|
|
24
|
-
readonly 5: "red";
|
|
25
|
-
};
|
|
26
|
-
export declare const HttpCodeDescriptions: {
|
|
27
|
-
100: string;
|
|
28
|
-
101: string;
|
|
29
|
-
200: string;
|
|
30
|
-
201: string;
|
|
31
|
-
202: string;
|
|
32
|
-
203: string;
|
|
33
|
-
204: string;
|
|
34
|
-
205: string;
|
|
35
|
-
206: string;
|
|
36
|
-
422: string;
|
|
37
|
-
226: string;
|
|
38
|
-
300: string;
|
|
39
|
-
301: string;
|
|
40
|
-
302: string;
|
|
41
|
-
303: string;
|
|
42
|
-
304: string;
|
|
43
|
-
305: string;
|
|
44
|
-
306: string;
|
|
45
|
-
307: string;
|
|
46
|
-
308: string;
|
|
47
|
-
400: string;
|
|
48
|
-
401: string;
|
|
49
|
-
402: string;
|
|
50
|
-
403: string;
|
|
51
|
-
404: string;
|
|
52
|
-
405: string;
|
|
53
|
-
406: string;
|
|
54
|
-
407: string;
|
|
55
|
-
408: string;
|
|
56
|
-
409: string;
|
|
57
|
-
410: string;
|
|
58
|
-
411: string;
|
|
59
|
-
412: string;
|
|
60
|
-
413: string;
|
|
61
|
-
414: string;
|
|
62
|
-
415: string;
|
|
63
|
-
416: string;
|
|
64
|
-
417: string;
|
|
65
|
-
418: string;
|
|
66
|
-
420: string;
|
|
67
|
-
426: string;
|
|
68
|
-
428: string;
|
|
69
|
-
429: string;
|
|
70
|
-
431: string;
|
|
71
|
-
444: string;
|
|
72
|
-
449: string;
|
|
73
|
-
450: string;
|
|
74
|
-
451: string;
|
|
75
|
-
499: string;
|
|
76
|
-
500: string;
|
|
77
|
-
501: string;
|
|
78
|
-
502: string;
|
|
79
|
-
503: string;
|
|
80
|
-
504: string;
|
|
81
|
-
505: string;
|
|
82
|
-
506: string;
|
|
83
|
-
507: string;
|
|
84
|
-
508: string;
|
|
85
|
-
509: string;
|
|
86
|
-
510: string;
|
|
87
|
-
511: string;
|
|
88
|
-
598: string;
|
|
89
|
-
599: string;
|
|
90
|
-
};
|
|
3
|
+
import { Dictionary, HttpMethod, HttpSecurityScheme, NodeType } from '@stoplight/types';
|
|
4
|
+
export declare const NodeTypeColors: Readonly<Dictionary<string, NodeType>>;
|
|
5
|
+
export declare const NodeTypePrettyName: Readonly<Dictionary<string, NodeType>>;
|
|
6
|
+
export declare const NodeTypeIconDefs: Readonly<Dictionary<IconDefinition, NodeType>>;
|
|
7
|
+
export declare const HttpSecuritySchemeColors: Readonly<Partial<Record<HttpSecurityScheme['type'], string>>>;
|
|
8
|
+
export declare const HttpMethodColors: Readonly<Record<HttpMethod, string>>;
|
|
9
|
+
export declare const HttpCodeColor: Readonly<Record<number, string>>;
|
|
10
|
+
export declare const HttpCodeDescriptions: Readonly<Record<number, string>>;
|
|
91
11
|
export declare const badgeDefaultBackgroundColor = "#293742";
|
|
92
12
|
export declare const badgeDefaultColor = "#FFFFFF";
|
|
93
|
-
export declare const CodeToIntentMap: Record<number, IntentVals
|
|
13
|
+
export declare const CodeToIntentMap: Readonly<Record<number, IntentVals>>;
|
|
94
14
|
export declare const OptionalSecurityMessage = "Requiring authorization is optional. A user can access data without authorization or with authorization, if provided.";
|