@scalar/workspace-store 0.71.1 → 0.73.0
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/CHANGELOG.md +22 -0
- package/dist/client.d.ts +8 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +90 -30
- package/dist/entities/auth/schema.d.ts +100 -20
- package/dist/entities/auth/schema.d.ts.map +1 -1
- package/dist/mutators/auth.d.ts.map +1 -1
- package/dist/navigation/helpers/traverse-plugin-document.d.ts +11 -0
- package/dist/navigation/helpers/traverse-plugin-document.d.ts.map +1 -0
- package/dist/navigation/helpers/traverse-plugin-document.js +24 -0
- package/dist/navigation/helpers/update-order-ids.d.ts.map +1 -1
- package/dist/navigation/helpers/update-order-ids.js +2 -1
- package/dist/navigation/index.d.ts +1 -0
- package/dist/navigation/index.d.ts.map +1 -1
- package/dist/navigation/index.js +1 -0
- package/dist/plugins/bundler/code-sample-sources.d.ts +10 -0
- package/dist/plugins/bundler/code-sample-sources.d.ts.map +1 -0
- package/dist/plugins/bundler/code-sample-sources.js +174 -0
- package/dist/plugins/bundler/openapi-document.d.ts.map +1 -1
- package/dist/plugins/bundler/openapi-document.js +2 -4
- package/dist/schemas/extensions/operation/x-code-samples.d.ts +31 -10
- package/dist/schemas/extensions/operation/x-code-samples.d.ts.map +1 -1
- package/dist/schemas/extensions/operation/x-code-samples.js +2 -2
- package/dist/schemas/navigation.d.ts +32 -1
- package/dist/schemas/navigation.d.ts.map +1 -1
- package/dist/schemas/navigation.js +7 -0
- package/dist/schemas/plugin-document.d.ts +67 -0
- package/dist/schemas/plugin-document.d.ts.map +1 -0
- package/dist/schemas/plugin-document.js +20 -0
- package/dist/schemas/reference-config/index.d.ts +20 -4
- package/dist/schemas/reference-config/index.d.ts.map +1 -1
- package/dist/schemas/reference-config/settings.d.ts +20 -4
- package/dist/schemas/reference-config/settings.d.ts.map +1 -1
- package/dist/schemas/type-guards.d.ts +4 -2
- package/dist/schemas/type-guards.d.ts.map +1 -1
- package/dist/schemas/type-guards.js +7 -4
- package/dist/schemas/v3.1/strict/openapi-document.d.ts +700 -140
- package/dist/schemas/v3.1/strict/openapi-document.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/operation.d.ts +12 -4
- package/dist/schemas/v3.1/strict/operation.d.ts.map +1 -1
- package/dist/schemas/v3.2/strict/openapi-document.d.ts +700 -140
- package/dist/schemas/v3.2/strict/openapi-document.d.ts.map +1 -1
- package/dist/schemas/v3.2/strict/operation.d.ts +12 -4
- package/dist/schemas/v3.2/strict/operation.d.ts.map +1 -1
- package/dist/schemas/workspace.d.ts +2 -1
- package/dist/schemas/workspace.d.ts.map +1 -1
- package/dist/schemas.d.ts +1 -0
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +1 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +13 -3
- package/package.json +9 -9
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { isHttpMethod } from '@scalar/helpers/http/is-http-method';
|
|
2
|
+
import { parseJsonPointerSegments } from '@scalar/helpers/json/parse-json-pointer-segments';
|
|
3
|
+
import { isObject } from '@scalar/helpers/object/is-object';
|
|
4
|
+
import { resolveReferencePath, } from '@scalar/json-magic/bundle';
|
|
5
|
+
import { forEachPathItemOperation } from '../../helpers/for-each-path-item-operation.js';
|
|
6
|
+
import { resolveOpenApiDocument } from './openapi-document.js';
|
|
7
|
+
/** Recognize operations, including callbacks, without interpreting similarly named literal data. */
|
|
8
|
+
const isOperationPath = (path) => {
|
|
9
|
+
const start = (path[0] === 'paths' && !path[1]?.startsWith('x-')) || path[0] === 'webhooks'
|
|
10
|
+
? 2
|
|
11
|
+
: path[0] === 'components' && path[1] === 'pathItems'
|
|
12
|
+
? 3
|
|
13
|
+
: path[0] === 'components' && path[1] === 'callbacks'
|
|
14
|
+
? 4
|
|
15
|
+
: undefined;
|
|
16
|
+
if (start === undefined) {
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
const operation = (index) => {
|
|
20
|
+
const method = path[index];
|
|
21
|
+
const end = method === 'additionalOperations' ? index + 2 : index + 1;
|
|
22
|
+
if (method !== 'additionalOperations' && (!method || !isHttpMethod(method) || method !== method.toLowerCase())) {
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
if (end === path.length) {
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
return path[end] === 'callbacks' && end + 3 < path.length && operation(end + 3);
|
|
29
|
+
};
|
|
30
|
+
return operation(start);
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Resolve the two Redocly code-file extensions at operation nodes. Their contents remain opaque
|
|
34
|
+
* to document traversal: a `$ref` written inside the downloaded code is never another reference.
|
|
35
|
+
* `path` identifies the selected subtree during lazy resolution.
|
|
36
|
+
*/
|
|
37
|
+
export const codeSampleSources = (path = []) => {
|
|
38
|
+
const loadSources = createSourceLoader();
|
|
39
|
+
const locations = new Map();
|
|
40
|
+
return {
|
|
41
|
+
type: 'lifecycle',
|
|
42
|
+
resolveDocument: (document, retrievalUri) => {
|
|
43
|
+
const identity = resolveOpenApiDocument(document, retrievalUri);
|
|
44
|
+
const entries = locations.get(retrievalUri);
|
|
45
|
+
if (identity && entries) {
|
|
46
|
+
// Fragment locations are discovered at retrieval URLs, but node hooks use the declared identity.
|
|
47
|
+
locations.set(identity.baseUri, entries);
|
|
48
|
+
}
|
|
49
|
+
// Run before openApiDocument so its identity resolver still owns document registration.
|
|
50
|
+
return undefined;
|
|
51
|
+
},
|
|
52
|
+
onBeforeNodeProcess: async (node, context) => {
|
|
53
|
+
const external = context.path[0] === 'x-ext';
|
|
54
|
+
const localPath = external ? context.path.slice(2) : context.path;
|
|
55
|
+
const location = locations
|
|
56
|
+
.get(context.origin)
|
|
57
|
+
?.find(({ target }) => target.every((segment, index) => localPath[index] === segment));
|
|
58
|
+
const operationPath = location
|
|
59
|
+
? [...location.source, ...localPath.slice(location.target.length)]
|
|
60
|
+
: external
|
|
61
|
+
? [...path, ...(context.referencedFromPath ?? []), ...localPath]
|
|
62
|
+
: [...path, ...localPath];
|
|
63
|
+
// A referenced fragment can live under an arbitrary key in its file. Carry the referring
|
|
64
|
+
// operation/path-item/callback location across each hop instead of mistaking that key for an OAS field.
|
|
65
|
+
if (typeof node.$ref === 'string' &&
|
|
66
|
+
[operationPath, [...operationPath, 'get'], [...operationPath, '{}', 'get']].some(isOperationPath)) {
|
|
67
|
+
const [file, fragment = ''] = node.$ref.split('#');
|
|
68
|
+
if (!fragment || fragment.startsWith('/')) {
|
|
69
|
+
try {
|
|
70
|
+
const url = resolveReferencePath(context.origin, file ?? '');
|
|
71
|
+
const target = parseJsonPointerSegments(decodeURIComponent(fragment));
|
|
72
|
+
const entries = locations.get(url) ?? [];
|
|
73
|
+
entries.push({ target, source: operationPath });
|
|
74
|
+
entries.sort((a, b) => b.target.length - a.target.length);
|
|
75
|
+
locations.set(url, entries);
|
|
76
|
+
}
|
|
77
|
+
catch {
|
|
78
|
+
// The regular reference resolver reports invalid reference URIs.
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
if (isOperationPath(operationPath) || (external && isOperationPath(localPath))) {
|
|
83
|
+
await loadSources(node, context.origin, context.loaders);
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
const createSourceLoader = () => {
|
|
89
|
+
// Keep raw text separate from the bundler's parsed-document cache, even for the same URL.
|
|
90
|
+
const cache = new Map();
|
|
91
|
+
return async (node, origin, loaders) => {
|
|
92
|
+
for (const key of ['x-codeSamples', 'x-code-samples']) {
|
|
93
|
+
const samples = node[key];
|
|
94
|
+
if (!Array.isArray(samples)) {
|
|
95
|
+
continue;
|
|
96
|
+
}
|
|
97
|
+
for (const sample of samples) {
|
|
98
|
+
if (!isObject(sample) || !isObject(sample.source) || typeof sample.source.$ref !== 'string') {
|
|
99
|
+
continue;
|
|
100
|
+
}
|
|
101
|
+
const reference = sample.source.$ref;
|
|
102
|
+
// This convention includes whole code files, not JSON Pointer targets or arbitrary objects.
|
|
103
|
+
if (!reference || reference.includes('#')) {
|
|
104
|
+
continue;
|
|
105
|
+
}
|
|
106
|
+
if (origin === '/' && !/^(?:[a-z][a-z0-9+.-]*:|\/)/i.test(reference)) {
|
|
107
|
+
continue;
|
|
108
|
+
}
|
|
109
|
+
try {
|
|
110
|
+
const url = resolveReferencePath(origin, reference);
|
|
111
|
+
const loader = loaders.find((candidate) => candidate.validate(url));
|
|
112
|
+
// Keep the source's origin when an operation is moved into a server chunk or x-ext bucket.
|
|
113
|
+
sample.source.$ref = url;
|
|
114
|
+
if (!loader) {
|
|
115
|
+
continue;
|
|
116
|
+
}
|
|
117
|
+
if (!cache.has(url)) {
|
|
118
|
+
cache.set(url, loader.exec(url, { parseAs: 'text' }));
|
|
119
|
+
}
|
|
120
|
+
const result = await cache.get(url);
|
|
121
|
+
if (result?.ok) {
|
|
122
|
+
sample.source = result.raw;
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
console.warn(`Unable to load code sample from "${url}"`);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
catch {
|
|
129
|
+
// Retaining the reference keeps a failed download distinct from an authored empty sample.
|
|
130
|
+
console.warn(`Unable to load code sample from "${reference}"`);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
/** Load inline operations on the server without eagerly resolving its deferred OpenAPI references. */
|
|
137
|
+
export const loadCodeSampleSources = async (document, origin, loaders) => {
|
|
138
|
+
const loadSources = createSourceLoader();
|
|
139
|
+
const visited = new WeakSet();
|
|
140
|
+
const visitPathItems = async (items, extensions) => {
|
|
141
|
+
if (!isObject(items)) {
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
for (const [key, pathItem] of Object.entries(items)) {
|
|
145
|
+
if ((extensions && key.startsWith('x-')) || !isObject(pathItem) || visited.has(pathItem)) {
|
|
146
|
+
continue;
|
|
147
|
+
}
|
|
148
|
+
visited.add(pathItem);
|
|
149
|
+
const operations = [];
|
|
150
|
+
forEachPathItemOperation(pathItem, (_, operation) => operations.push(operation));
|
|
151
|
+
for (const operation of operations) {
|
|
152
|
+
if (!isObject(operation)) {
|
|
153
|
+
continue;
|
|
154
|
+
}
|
|
155
|
+
await loadSources(operation, origin, loaders);
|
|
156
|
+
if (isObject(operation.callbacks)) {
|
|
157
|
+
for (const callback of Object.values(operation.callbacks)) {
|
|
158
|
+
await visitPathItems(callback, true);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
await visitPathItems(document.paths, true);
|
|
165
|
+
await visitPathItems(document.webhooks, false);
|
|
166
|
+
if (isObject(document.components)) {
|
|
167
|
+
await visitPathItems(document.components.pathItems, false);
|
|
168
|
+
if (isObject(document.components.callbacks)) {
|
|
169
|
+
for (const callback of Object.values(document.components.callbacks)) {
|
|
170
|
+
await visitPathItems(callback, true);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openapi-document.d.ts","sourceRoot":"","sources":["../../../src/plugins/bundler/openapi-document.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,eAAe,EAAwB,MAAM,2BAA2B,CAAA;
|
|
1
|
+
{"version":3,"file":"openapi-document.d.ts","sourceRoot":"","sources":["../../../src/plugins/bundler/openapi-document.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,eAAe,EAAwB,MAAM,2BAA2B,CAAA;AAI7G,uFAAuF;AACvF,eAAO,MAAM,sBAAsB,EAAE,gBASpC,CAAA;AAED,8FAA8F;AAC9F,eAAO,MAAM,eAAe,QAAO,eAwClC,CAAA"}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { isObject } from '@scalar/helpers/object/is-object';
|
|
2
2
|
import { resolveReferencePath } from '@scalar/json-magic/bundle';
|
|
3
|
+
import { isOpenApiDocument } from '../../schemas/type-guards.js';
|
|
3
4
|
/** Resolves an OpenAPI document's declared identity against its retrieval location. */
|
|
4
5
|
export const resolveOpenApiDocument = (document, retrievalUri) => {
|
|
5
|
-
if (!
|
|
6
|
-
typeof document.openapi !== 'string' ||
|
|
7
|
-
!/^3\.2\.\d+$/.test(document.openapi) ||
|
|
8
|
-
typeof document.$self !== 'string') {
|
|
6
|
+
if (!isOpenApiDocument(document) || !/^3\.2\.\d+$/.test(document.openapi) || typeof document.$self !== 'string') {
|
|
9
7
|
return undefined;
|
|
10
8
|
}
|
|
11
9
|
const self = resolveReferencePath(retrievalUri, document.$self);
|
|
@@ -3,7 +3,9 @@ export declare const XCodeSamplesSchema: import("@scalar/typebox").TObject<{
|
|
|
3
3
|
lang: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
4
4
|
label: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
5
5
|
group: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
6
|
-
source: import("@scalar/typebox").TString
|
|
6
|
+
source: import("@scalar/typebox").TUnion<[import("@scalar/typebox").TString, import("@scalar/typebox").TObject<{
|
|
7
|
+
$ref: import("@scalar/typebox").TString;
|
|
8
|
+
}>]>;
|
|
7
9
|
example: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
8
10
|
contentType: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
9
11
|
}>>>;
|
|
@@ -11,7 +13,9 @@ export declare const XCodeSamplesSchema: import("@scalar/typebox").TObject<{
|
|
|
11
13
|
lang: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
12
14
|
label: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
13
15
|
group: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
14
|
-
source: import("@scalar/typebox").TString
|
|
16
|
+
source: import("@scalar/typebox").TUnion<[import("@scalar/typebox").TString, import("@scalar/typebox").TObject<{
|
|
17
|
+
$ref: import("@scalar/typebox").TString;
|
|
18
|
+
}>]>;
|
|
15
19
|
example: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
16
20
|
contentType: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
17
21
|
}>>>;
|
|
@@ -19,7 +23,9 @@ export declare const XCodeSamplesSchema: import("@scalar/typebox").TObject<{
|
|
|
19
23
|
lang: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
20
24
|
label: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
21
25
|
group: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
22
|
-
source: import("@scalar/typebox").TString
|
|
26
|
+
source: import("@scalar/typebox").TUnion<[import("@scalar/typebox").TString, import("@scalar/typebox").TObject<{
|
|
27
|
+
$ref: import("@scalar/typebox").TString;
|
|
28
|
+
}>]>;
|
|
23
29
|
example: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
24
30
|
contentType: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
25
31
|
}>>>;
|
|
@@ -47,7 +53,9 @@ export declare const XCodeSamplesSchema: import("@scalar/typebox").TObject<{
|
|
|
47
53
|
lang: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
48
54
|
label: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
49
55
|
group: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
50
|
-
source: import("@scalar/typebox").TString
|
|
56
|
+
source: import("@scalar/typebox").TUnion<[import("@scalar/typebox").TString, import("@scalar/typebox").TObject<{
|
|
57
|
+
$ref: import("@scalar/typebox").TString;
|
|
58
|
+
}>]>;
|
|
51
59
|
example: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
52
60
|
contentType: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
53
61
|
}>>>;
|
|
@@ -57,7 +65,10 @@ export type XCodeSample = {
|
|
|
57
65
|
label?: string;
|
|
58
66
|
/** Optional heading in the code sample picker. */
|
|
59
67
|
group?: string;
|
|
60
|
-
source
|
|
68
|
+
/** Inline source, or a code-file reference supported by x-codeSamples and x-code-samples. */
|
|
69
|
+
source: string | {
|
|
70
|
+
$ref: string;
|
|
71
|
+
};
|
|
61
72
|
/** Request body example key used by this sample. */
|
|
62
73
|
example?: string;
|
|
63
74
|
/** Request body media type used by this sample. */
|
|
@@ -81,7 +92,9 @@ export declare const XCodeSample: import("@scalar/validation").ObjectSchema<{
|
|
|
81
92
|
lang: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
|
|
82
93
|
label: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
|
|
83
94
|
group: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
|
|
84
|
-
source: import("@scalar/validation").StringSchema
|
|
95
|
+
source: import("@scalar/validation").UnionSchema<readonly [import("@scalar/validation").StringSchema, import("@scalar/validation").ObjectSchema<{
|
|
96
|
+
$ref: import("@scalar/validation").StringSchema;
|
|
97
|
+
}>]>;
|
|
85
98
|
example: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
|
|
86
99
|
contentType: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
|
|
87
100
|
}>;
|
|
@@ -102,7 +115,9 @@ export declare const XCodeSamples: import("@scalar/validation").ObjectSchema<{
|
|
|
102
115
|
lang: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
|
|
103
116
|
label: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
|
|
104
117
|
group: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
|
|
105
|
-
source: import("@scalar/validation").StringSchema
|
|
118
|
+
source: import("@scalar/validation").UnionSchema<readonly [import("@scalar/validation").StringSchema, import("@scalar/validation").ObjectSchema<{
|
|
119
|
+
$ref: import("@scalar/validation").StringSchema;
|
|
120
|
+
}>]>;
|
|
106
121
|
example: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
|
|
107
122
|
contentType: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
|
|
108
123
|
}>>>;
|
|
@@ -110,7 +125,9 @@ export declare const XCodeSamples: import("@scalar/validation").ObjectSchema<{
|
|
|
110
125
|
lang: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
|
|
111
126
|
label: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
|
|
112
127
|
group: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
|
|
113
|
-
source: import("@scalar/validation").StringSchema
|
|
128
|
+
source: import("@scalar/validation").UnionSchema<readonly [import("@scalar/validation").StringSchema, import("@scalar/validation").ObjectSchema<{
|
|
129
|
+
$ref: import("@scalar/validation").StringSchema;
|
|
130
|
+
}>]>;
|
|
114
131
|
example: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
|
|
115
132
|
contentType: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
|
|
116
133
|
}>>>;
|
|
@@ -118,7 +135,9 @@ export declare const XCodeSamples: import("@scalar/validation").ObjectSchema<{
|
|
|
118
135
|
lang: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
|
|
119
136
|
label: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
|
|
120
137
|
group: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
|
|
121
|
-
source: import("@scalar/validation").StringSchema
|
|
138
|
+
source: import("@scalar/validation").UnionSchema<readonly [import("@scalar/validation").StringSchema, import("@scalar/validation").ObjectSchema<{
|
|
139
|
+
$ref: import("@scalar/validation").StringSchema;
|
|
140
|
+
}>]>;
|
|
122
141
|
example: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
|
|
123
142
|
contentType: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
|
|
124
143
|
}>>>;
|
|
@@ -146,7 +165,9 @@ export declare const XCodeSamples: import("@scalar/validation").ObjectSchema<{
|
|
|
146
165
|
lang: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
|
|
147
166
|
label: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
|
|
148
167
|
group: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
|
|
149
|
-
source: import("@scalar/validation").StringSchema
|
|
168
|
+
source: import("@scalar/validation").UnionSchema<readonly [import("@scalar/validation").StringSchema, import("@scalar/validation").ObjectSchema<{
|
|
169
|
+
$ref: import("@scalar/validation").StringSchema;
|
|
170
|
+
}>]>;
|
|
150
171
|
example: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
|
|
151
172
|
contentType: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
|
|
152
173
|
}>>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"x-code-samples.d.ts","sourceRoot":"","sources":["../../../../src/schemas/extensions/operation/x-code-samples.ts"],"names":[],"mappings":"AAwCA,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"x-code-samples.d.ts","sourceRoot":"","sources":["../../../../src/schemas/extensions/operation/x-code-samples.ts"],"names":[],"mappings":"AAwCA,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQ7B,CAAA;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,kDAAkD;IAClD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,6FAA6F;IAC7F,MAAM,EAAE,MAAM,GAAG;QAAE,IAAI,EAAE,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CodeSampleSchema = Type.Object({
|
|
|
4
4
|
lang: Type.Optional(Type.String()),
|
|
5
5
|
label: Type.Optional(Type.String()),
|
|
6
6
|
group: Type.Optional(Type.String()),
|
|
7
|
-
source: Type.String(),
|
|
7
|
+
source: Type.Union([Type.String(), Type.Object({ $ref: Type.String() })]),
|
|
8
8
|
example: Type.Optional(Type.String()),
|
|
9
9
|
contentType: Type.Optional(Type.String()),
|
|
10
10
|
});
|
|
@@ -45,7 +45,7 @@ export const XCodeSample = object({
|
|
|
45
45
|
lang: optional(string()),
|
|
46
46
|
label: optional(string()),
|
|
47
47
|
group: optional(string()),
|
|
48
|
-
source: string(),
|
|
48
|
+
source: union([string(), object({ $ref: string() })]),
|
|
49
49
|
example: optional(string()),
|
|
50
50
|
contentType: optional(string()),
|
|
51
51
|
});
|
|
@@ -250,6 +250,29 @@ export type TraversedModels = BaseSchema & {
|
|
|
250
250
|
name: string;
|
|
251
251
|
children?: TraversedEntry[];
|
|
252
252
|
};
|
|
253
|
+
export declare const TraversedPluginEntrySchemaDefinition: import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
254
|
+
id: import("@scalar/typebox").TString;
|
|
255
|
+
title: import("@scalar/typebox").TString;
|
|
256
|
+
}>, import("@scalar/typebox").TObject<{
|
|
257
|
+
type: import("@scalar/typebox").TLiteral<"plugin">;
|
|
258
|
+
documentType: import("@scalar/typebox").TString;
|
|
259
|
+
kind: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
260
|
+
children: import("@scalar/typebox").TOptional<import("@scalar/typebox").TArray<import("@scalar/typebox").TRef<"TraversedEntryObject">>>;
|
|
261
|
+
}>]>;
|
|
262
|
+
/**
|
|
263
|
+
* An entry contributed by a registered document type (see `DocumentTypeDefinition`).
|
|
264
|
+
*
|
|
265
|
+
* The store and sidebar only rely on the base fields; `kind` lets the document type tell its own
|
|
266
|
+
* entries apart (e.g. a workflow and a step) when it renders them.
|
|
267
|
+
*/
|
|
268
|
+
export type TraversedPluginEntry = BaseSchema & {
|
|
269
|
+
type: 'plugin';
|
|
270
|
+
/** The document type that produced the entry */
|
|
271
|
+
documentType: string;
|
|
272
|
+
/** Free-form discriminator owned by the document type */
|
|
273
|
+
kind?: string;
|
|
274
|
+
children?: TraversedEntry[];
|
|
275
|
+
};
|
|
253
276
|
export declare const TraversedEntrySchemaDefinition: import("@scalar/typebox").TUnion<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
254
277
|
id: import("@scalar/typebox").TString;
|
|
255
278
|
title: import("@scalar/typebox").TString;
|
|
@@ -341,8 +364,16 @@ export declare const TraversedEntrySchemaDefinition: import("@scalar/typebox").T
|
|
|
341
364
|
type: import("@scalar/typebox").TLiteral<"models">;
|
|
342
365
|
name: import("@scalar/typebox").TString;
|
|
343
366
|
children: import("@scalar/typebox").TOptional<import("@scalar/typebox").TArray<import("@scalar/typebox").TRef<"TraversedEntryObject">>>;
|
|
367
|
+
}>]>, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
368
|
+
id: import("@scalar/typebox").TString;
|
|
369
|
+
title: import("@scalar/typebox").TString;
|
|
370
|
+
}>, import("@scalar/typebox").TObject<{
|
|
371
|
+
type: import("@scalar/typebox").TLiteral<"plugin">;
|
|
372
|
+
documentType: import("@scalar/typebox").TString;
|
|
373
|
+
kind: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
374
|
+
children: import("@scalar/typebox").TOptional<import("@scalar/typebox").TArray<import("@scalar/typebox").TRef<"TraversedEntryObject">>>;
|
|
344
375
|
}>]>]>;
|
|
345
|
-
export type TraversedEntry = TraversedDescription | TraversedOperation | TraversedAsyncApiOperation | TraversedAsyncApiChannel | TraversedAsyncApiMessage | TraversedSchema | TraversedTag | TraversedWebhook | TraversedExample | TraversedDocument | TraversedModels;
|
|
376
|
+
export type TraversedEntry = TraversedDescription | TraversedOperation | TraversedAsyncApiOperation | TraversedAsyncApiChannel | TraversedAsyncApiMessage | TraversedSchema | TraversedTag | TraversedWebhook | TraversedExample | TraversedDocument | TraversedModels | TraversedPluginEntry;
|
|
346
377
|
/**
|
|
347
378
|
* Type helper for when we are storing the parent entry in the entry itself.
|
|
348
379
|
* The parent is recursively defined to also include its own parent, except for
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../src/schemas/navigation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAEnE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAG7C,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,8CAA8C,CAAA;AAC/F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAA;AAC5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAA;AAEtE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAChE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAE1D;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG,YAAY,CAAC,UAAU,EAAE,MAAM,CAAC,CAAA;AAE9D,eAAO,MAAM,8BAA8B;;;EAGzC,CAAA;AAEF,KAAK,UAAU,GAAG;IAChB;;;;OAIG;IACH,EAAE,EAAE,MAAM,CAAA;IACV,2CAA2C;IAC3C,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED,eAAO,MAAM,iCAAiC;;;;;;;;IAQ7C,CAAA;AAED;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG,UAAU,GAAG;IAC3C,IAAI,EAAE,UAAU,CAAA;IAChB,oBAAoB;IACpB,IAAI,EAAE,MAAM,CAAA;IACZ,uCAAuC;IACvC,QAAQ,CAAC,EAAE,cAAc,EAAE,CAAA;IAC3B,IAA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tB,CAAA;AAED,KAAK,UAAU,GAAG;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,OAAO,CAAA;IACb,SAAS,CAAC,EAAE,SAAS,CAAA;CACtB,CAAA;AAED,KAAK,YAAY,GAAG;IAClB,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,SAAS,CAAA;CAChB,CAAA;AAED,KAAK,sBAAsB,GAAG;IAC5B,QAAQ,EAAE,MAAM,CAAA;IAChB,aAAa,EAAE,MAAM,CAAA;IACrB,IAAI,EAAE,oBAAoB,CAAA;IAC1B,SAAS,CAAC,EAAE,SAAS,CAAA;CACtB,CAAA;AAED,KAAK,oBAAoB,GAAG;IAC1B,QAAQ,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,kBAAkB,CAAA;IACxB,SAAS,CAAC,EAAE,SAAS,CAAA;CACtB,CAAA;AAED,KAAK,oBAAoB,GAAG;IAC1B,QAAQ,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,MAAM,CAAA;IACnB,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,kBAAkB,CAAA;CACzB,CAAA;AAED,MAAM,MAAM,gBAAgB,GACxB,eAAe,GACf,kBAAkB,GAClB,QAAQ,GACR,cAAc,GACd,sBAAsB,GACtB,oBAAoB,GACpB,oBAAoB,GACpB,YAAY,GACZ,UAAU,GACV,YAAY,CAAA;AAEhB,MAAM,MAAM,WAAW,GAAG,CAAC,KAAK,EAAE,gBAAgB,KAAK,MAAM,CAAA"}
|
|
@@ -74,6 +74,12 @@ export const TraversedModelsSchemaDefinition = compose(NavigationBaseSchemaDefin
|
|
|
74
74
|
name: Type.String(),
|
|
75
75
|
children: Type.Optional(Type.Array(TraversedEntryObjectRef)),
|
|
76
76
|
}));
|
|
77
|
+
export const TraversedPluginEntrySchemaDefinition = compose(NavigationBaseSchemaDefinition, Type.Object({
|
|
78
|
+
type: Type.Literal('plugin'),
|
|
79
|
+
documentType: Type.String(),
|
|
80
|
+
kind: Type.Optional(Type.String()),
|
|
81
|
+
children: Type.Optional(Type.Array(TraversedEntryObjectRef)),
|
|
82
|
+
}));
|
|
77
83
|
export const TraversedEntrySchemaDefinition = Type.Union([
|
|
78
84
|
TraversedDescriptionSchemaDefinition,
|
|
79
85
|
TraversedOperationSchemaDefinition,
|
|
@@ -86,4 +92,5 @@ export const TraversedEntrySchemaDefinition = Type.Union([
|
|
|
86
92
|
TraversedExampleSchemaDefinition,
|
|
87
93
|
TraversedDocumentSchemaDefinition,
|
|
88
94
|
TraversedModelsSchemaDefinition,
|
|
95
|
+
TraversedPluginEntrySchemaDefinition,
|
|
89
96
|
]);
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { UnknownObject } from '../helpers/general.js';
|
|
2
|
+
import type { TraversedEntry } from './navigation.js';
|
|
3
|
+
import type { OpenAPIExtensions } from './v3.2/strict/openapi-document.js';
|
|
4
|
+
/** Document extension that marks a document as owned by a registered document type. */
|
|
5
|
+
export declare const PLUGIN_DOCUMENT_TYPE_KEY = "x-scalar-document-type";
|
|
6
|
+
/**
|
|
7
|
+
* A document whose format is not built into the store (OpenAPI and AsyncAPI are).
|
|
8
|
+
*
|
|
9
|
+
* The store treats the content as opaque: it keeps the document as ingested, adds the bookkeeping
|
|
10
|
+
* extensions every workspace document carries, and leaves the rest to the registered document type.
|
|
11
|
+
*/
|
|
12
|
+
export type PluginDocument = Omit<OpenAPIExtensions, 'x-original-oas-version'> & {
|
|
13
|
+
/** The `type` of the document type definition that claimed this document. */
|
|
14
|
+
'x-scalar-document-type': string;
|
|
15
|
+
/**
|
|
16
|
+
* Document metadata. Taken from the format's own `info` object when it has one (Arazzo and Overlay do);
|
|
17
|
+
* otherwise the store adds an empty one, so every workspace document exposes `info`.
|
|
18
|
+
*/
|
|
19
|
+
info: {
|
|
20
|
+
title?: string;
|
|
21
|
+
version?: string;
|
|
22
|
+
description?: string;
|
|
23
|
+
} & Record<string, unknown>;
|
|
24
|
+
} & Record<string, unknown>;
|
|
25
|
+
/**
|
|
26
|
+
* Teaches the workspace store about a document format it does not support natively.
|
|
27
|
+
*
|
|
28
|
+
* A registered type is checked before the built-in OpenAPI and AsyncAPI pipelines, so a document it
|
|
29
|
+
* claims never goes through the OpenAPI upgrade or coercion.
|
|
30
|
+
*/
|
|
31
|
+
export type DocumentTypeDefinition = {
|
|
32
|
+
/** Stable identifier stored on every claimed document as `x-scalar-document-type`. */
|
|
33
|
+
type: string;
|
|
34
|
+
/** Whether this definition handles the raw (parsed) input document. */
|
|
35
|
+
detect: (document: UnknownObject) => boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Optional hook to upgrade, validate or normalize the raw document before it is stored.
|
|
38
|
+
* Receives a clone, so it may mutate and return the same object.
|
|
39
|
+
*/
|
|
40
|
+
ingest?: (document: UnknownObject, context: {
|
|
41
|
+
documentName: string;
|
|
42
|
+
}) => UnknownObject | Promise<UnknownObject>;
|
|
43
|
+
/**
|
|
44
|
+
* Resolve `$ref`s with the store's loaders (fetch, file loader) before storing the document.
|
|
45
|
+
* Defaults to `false`, since the reference semantics of a foreign format are not known to the store.
|
|
46
|
+
*/
|
|
47
|
+
bundle?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Build the sidebar entries for the document. The store wraps them in the document root entry.
|
|
50
|
+
* Ids must be unique across the workspace, so prefix them with the given `documentId`.
|
|
51
|
+
*/
|
|
52
|
+
traverse: (context: {
|
|
53
|
+
documentName: string;
|
|
54
|
+
documentId: string;
|
|
55
|
+
document: PluginDocument;
|
|
56
|
+
}) => TraversedEntry[];
|
|
57
|
+
};
|
|
58
|
+
/** Narrow a value to a document claimed by a registered document type. */
|
|
59
|
+
export declare const isPluginDocument: (value: unknown) => value is PluginDocument;
|
|
60
|
+
/**
|
|
61
|
+
* Find the registered document type that claims a raw document, if any.
|
|
62
|
+
*
|
|
63
|
+
* Every document goes through `detect`, so one that throws counts as "not mine". Otherwise a bug in a
|
|
64
|
+
* single document type would stop OpenAPI and AsyncAPI documents from loading too.
|
|
65
|
+
*/
|
|
66
|
+
export declare const findDocumentType: (documentTypes: readonly DocumentTypeDefinition[] | undefined, document: UnknownObject) => DocumentTypeDefinition | undefined;
|
|
67
|
+
//# sourceMappingURL=plugin-document.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-document.d.ts","sourceRoot":"","sources":["../../src/schemas/plugin-document.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEtD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,uFAAuF;AACvF,eAAO,MAAM,wBAAwB,2BAA2B,CAAA;AAEhE;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,iBAAiB,EAAE,wBAAwB,CAAC,GAAG;IAC/E,6EAA6E;IAC7E,wBAAwB,EAAE,MAAM,CAAA;IAChC;;;OAGG;IACH,IAAI,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAC3F,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAE3B;;;;;GAKG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC,sFAAsF;IACtF,IAAI,EAAE,MAAM,CAAA;IACZ,uEAAuE;IACvE,MAAM,EAAE,CAAC,QAAQ,EAAE,aAAa,KAAK,OAAO,CAAA;IAC5C;;;OAGG;IACH,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,aAAa,EAAE,OAAO,EAAE;QAAE,YAAY,EAAE,MAAM,CAAA;KAAE,KAAK,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC,CAAA;IAC/G;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB;;;OAGG;IACH,QAAQ,EAAE,CAAC,OAAO,EAAE;QAAE,YAAY,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,cAAc,CAAA;KAAE,KAAK,cAAc,EAAE,CAAA;CAChH,CAAA;AAED,0EAA0E;AAC1E,eAAO,MAAM,gBAAgB,UAAW,OAAO,KAAG,KAAK,IAAI,cACa,CAAA;AAExE;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,kBACZ,SAAS,sBAAsB,EAAE,GAAG,SAAS,YAClD,aAAa,KACtB,sBAAsB,GAAG,SAQxB,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { isObject } from '@scalar/helpers/object/is-object';
|
|
2
|
+
/** Document extension that marks a document as owned by a registered document type. */
|
|
3
|
+
export const PLUGIN_DOCUMENT_TYPE_KEY = 'x-scalar-document-type';
|
|
4
|
+
/** Narrow a value to a document claimed by a registered document type. */
|
|
5
|
+
export const isPluginDocument = (value) => isObject(value) && typeof value[PLUGIN_DOCUMENT_TYPE_KEY] === 'string';
|
|
6
|
+
/**
|
|
7
|
+
* Find the registered document type that claims a raw document, if any.
|
|
8
|
+
*
|
|
9
|
+
* Every document goes through `detect`, so one that throws counts as "not mine". Otherwise a bug in a
|
|
10
|
+
* single document type would stop OpenAPI and AsyncAPI documents from loading too.
|
|
11
|
+
*/
|
|
12
|
+
export const findDocumentType = (documentTypes, document) => documentTypes?.find((documentType) => {
|
|
13
|
+
try {
|
|
14
|
+
return documentType.detect(document);
|
|
15
|
+
}
|
|
16
|
+
catch (error) {
|
|
17
|
+
console.error(`Document type '${documentType.type}' failed to detect a document:`, error);
|
|
18
|
+
return false;
|
|
19
|
+
}
|
|
20
|
+
});
|
|
@@ -348,7 +348,9 @@ export declare const ReferenceConfigSchema: import("@scalar/typebox").TObject<{
|
|
|
348
348
|
lang: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
349
349
|
label: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
350
350
|
group: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
351
|
-
source: import("@scalar/typebox").TString
|
|
351
|
+
source: import("@scalar/typebox").TUnion<[import("@scalar/typebox").TString, import("@scalar/typebox").TObject<{
|
|
352
|
+
$ref: import("@scalar/typebox").TString;
|
|
353
|
+
}>]>;
|
|
352
354
|
example: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
353
355
|
contentType: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
354
356
|
}>>>;
|
|
@@ -356,7 +358,9 @@ export declare const ReferenceConfigSchema: import("@scalar/typebox").TObject<{
|
|
|
356
358
|
lang: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
357
359
|
label: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
358
360
|
group: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
359
|
-
source: import("@scalar/typebox").TString
|
|
361
|
+
source: import("@scalar/typebox").TUnion<[import("@scalar/typebox").TString, import("@scalar/typebox").TObject<{
|
|
362
|
+
$ref: import("@scalar/typebox").TString;
|
|
363
|
+
}>]>;
|
|
360
364
|
example: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
361
365
|
contentType: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
362
366
|
}>>>;
|
|
@@ -364,7 +368,9 @@ export declare const ReferenceConfigSchema: import("@scalar/typebox").TObject<{
|
|
|
364
368
|
lang: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
365
369
|
label: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
366
370
|
group: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
367
|
-
source: import("@scalar/typebox").TString
|
|
371
|
+
source: import("@scalar/typebox").TUnion<[import("@scalar/typebox").TString, import("@scalar/typebox").TObject<{
|
|
372
|
+
$ref: import("@scalar/typebox").TString;
|
|
373
|
+
}>]>;
|
|
368
374
|
example: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
369
375
|
contentType: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
370
376
|
}>>>;
|
|
@@ -392,7 +398,9 @@ export declare const ReferenceConfigSchema: import("@scalar/typebox").TObject<{
|
|
|
392
398
|
lang: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
393
399
|
label: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
394
400
|
group: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
395
|
-
source: import("@scalar/typebox").TString
|
|
401
|
+
source: import("@scalar/typebox").TUnion<[import("@scalar/typebox").TString, import("@scalar/typebox").TObject<{
|
|
402
|
+
$ref: import("@scalar/typebox").TString;
|
|
403
|
+
}>]>;
|
|
396
404
|
example: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
397
405
|
contentType: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
398
406
|
}>>>;
|
|
@@ -1939,6 +1947,14 @@ export declare const ReferenceConfigSchema: import("@scalar/typebox").TObject<{
|
|
|
1939
1947
|
type: TLiteral<"models">;
|
|
1940
1948
|
name: import("@scalar/typebox").TString;
|
|
1941
1949
|
children: import("@scalar/typebox").TOptional<TArray<import("@scalar/typebox").TRef<"TraversedEntryObject">>>;
|
|
1950
|
+
}>]>, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
1951
|
+
id: import("@scalar/typebox").TString;
|
|
1952
|
+
title: import("@scalar/typebox").TString;
|
|
1953
|
+
}>, import("@scalar/typebox").TObject<{
|
|
1954
|
+
type: TLiteral<"plugin">;
|
|
1955
|
+
documentType: import("@scalar/typebox").TString;
|
|
1956
|
+
kind: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
1957
|
+
children: import("@scalar/typebox").TOptional<TArray<import("@scalar/typebox").TRef<"TraversedEntryObject">>>;
|
|
1942
1958
|
}>]>]>;
|
|
1943
1959
|
TraversedDocumentObject: import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
1944
1960
|
id: import("@scalar/typebox").TString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/schemas/reference-config/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,QAAQ,EAAQ,MAAM,iBAAiB,CAAA;AAClE,OAAO,EAA2C,KAAK,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AACvG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAE7C,OAAO,EAAE,KAAK,UAAU,EAAuC,MAAM,cAAc,CAAA;AACnF,OAAO,EAAE,KAAK,QAAQ,EAAmC,MAAM,YAAY,CAAA;AAC3E,OAAO,EAAE,KAAK,IAAI,EAA2B,MAAM,QAAQ,CAAA;AAC3D,OAAO,EAAE,KAAK,OAAO,EAAiC,MAAM,WAAW,CAAA;AACvE,OAAO,EAAE,KAAK,QAAQ,EAAmC,MAAM,YAAY,CAAA;AAE3E;;;;GAIG;AACH,eAAO,MAAM,qBAAqB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/schemas/reference-config/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,QAAQ,EAAQ,MAAM,iBAAiB,CAAA;AAClE,OAAO,EAA2C,KAAK,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AACvG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAE7C,OAAO,EAAE,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