@scalar/oas-utils 0.2.121 → 0.2.123
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 +20 -0
- package/dist/entities/cookie/cookie.d.ts +4 -4
- package/dist/entities/cookie/cookie.js +1 -1
- package/dist/entities/cookie/index.d.ts +1 -1
- package/dist/entities/cookie/index.d.ts.map +1 -1
- package/dist/entities/environment/environment.d.ts +2 -2
- package/dist/entities/environment/environment.js +1 -1
- package/dist/entities/environment/index.d.ts +1 -1
- package/dist/entities/environment/index.d.ts.map +1 -1
- package/dist/entities/hotkeys/index.d.ts +1 -1
- package/dist/entities/hotkeys/index.d.ts.map +1 -1
- package/dist/entities/shared/index.d.ts +1 -1
- package/dist/entities/shared/index.d.ts.map +1 -1
- package/dist/entities/shared/index.js +1 -1
- package/dist/entities/shared/utility.d.ts +0 -16
- package/dist/entities/shared/utility.d.ts.map +1 -1
- package/dist/entities/shared/utility.js +1 -8
- package/dist/entities/spec/collection.d.ts +24 -24
- package/dist/entities/spec/collection.d.ts.map +1 -1
- package/dist/entities/spec/collection.js +3 -2
- package/dist/entities/spec/index.d.ts +10 -11
- package/dist/entities/spec/index.d.ts.map +1 -1
- package/dist/entities/spec/index.js +8 -8
- package/dist/entities/spec/operation.d.ts +23 -23
- package/dist/entities/spec/operation.d.ts.map +1 -1
- package/dist/entities/spec/parameters.d.ts +6 -6
- package/dist/entities/spec/request-examples.d.ts +244 -244
- package/dist/entities/spec/request-examples.d.ts.map +1 -1
- package/dist/entities/spec/request-examples.js +6 -71
- package/dist/entities/spec/requests.d.ts +47 -47
- package/dist/entities/spec/requests.d.ts.map +1 -1
- package/dist/entities/spec/requests.js +3 -2
- package/dist/entities/spec/security.d.ts +39 -39
- package/dist/entities/spec/security.d.ts.map +1 -1
- package/dist/entities/spec/security.js +4 -4
- package/dist/entities/spec/server.d.ts +99 -28
- package/dist/entities/spec/server.d.ts.map +1 -1
- package/dist/entities/spec/server.js +1 -1
- package/dist/entities/spec/spec-objects.d.ts +3 -3
- package/dist/entities/spec/spec-objects.js +1 -1
- package/dist/entities/spec/x-scalar-environments.d.ts +9 -9
- package/dist/entities/spec/x-scalar-secrets.d.ts +4 -4
- package/dist/entities/workspace/index.d.ts +1 -1
- package/dist/entities/workspace/index.d.ts.map +1 -1
- package/dist/entities/workspace/workspace.d.ts +18 -18
- package/dist/entities/workspace/workspace.js +1 -1
- package/dist/helpers/{createHash.d.ts → create-hash.d.ts} +1 -1
- package/dist/helpers/create-hash.d.ts.map +1 -0
- package/dist/helpers/ensure-protocol.js +1 -1
- package/dist/helpers/{fetchSpecFromUrl.d.ts → fetch-spec-from-url.d.ts} +1 -1
- package/dist/helpers/fetch-spec-from-url.d.ts.map +1 -0
- package/dist/helpers/{fetchSpecFromUrl.js → fetch-spec-from-url.js} +1 -1
- package/dist/helpers/{fetchWithProxyFallback.d.ts → fetch-with-proxy-fallback.d.ts} +1 -1
- package/dist/helpers/fetch-with-proxy-fallback.d.ts.map +1 -0
- package/dist/helpers/{fetchWithProxyFallback.js → fetch-with-proxy-fallback.js} +1 -1
- package/dist/helpers/find-variables.d.ts +5 -0
- package/dist/helpers/find-variables.d.ts.map +1 -0
- package/dist/helpers/{findVariables.js → find-variables.js} +1 -1
- package/dist/helpers/{httpMethods.d.ts → http-methods.d.ts} +2 -2
- package/dist/helpers/http-methods.d.ts.map +1 -0
- package/dist/helpers/{httpStatusCodes.d.ts → http-status-codes.d.ts} +1 -1
- package/dist/helpers/http-status-codes.d.ts.map +1 -0
- package/dist/helpers/index.d.ts +27 -26
- package/dist/helpers/index.d.ts.map +1 -1
- package/dist/helpers/index.js +21 -20
- package/dist/helpers/{isLocalUrl.d.ts → is-local-url.d.ts} +1 -1
- package/dist/helpers/is-local-url.d.ts.map +1 -0
- package/dist/helpers/{isValidUrl.d.ts → is-valid-url.d.ts} +1 -1
- package/dist/helpers/is-valid-url.d.ts.map +1 -0
- package/dist/helpers/{iterateTitle.d.ts → iterate-title.d.ts} +1 -1
- package/dist/helpers/iterate-title.d.ts.map +1 -0
- package/dist/helpers/{makeUrlAbsolute.d.ts → make-url-absolute.d.ts} +1 -1
- package/dist/helpers/make-url-absolute.d.ts.map +1 -0
- package/dist/helpers/merge-urls.d.ts.map +1 -1
- package/dist/helpers/merge-urls.js +2 -2
- package/dist/helpers/{normalizeMimeTypeObject.d.ts → normalize-mime-type-object.d.ts} +1 -1
- package/dist/helpers/normalize-mime-type-object.d.ts.map +1 -0
- package/dist/helpers/{normalizeMimeTypeObject.js → normalize-mime-type-object.js} +1 -1
- package/dist/helpers/{normalizeMimeType.d.ts → normalize-mime-type.d.ts} +1 -1
- package/dist/helpers/normalize-mime-type.d.ts.map +1 -0
- package/dist/helpers/parse.js +1 -1
- package/dist/helpers/{prettyPrintJson.d.ts → pretty-print-json.d.ts} +1 -1
- package/dist/helpers/pretty-print-json.d.ts.map +1 -0
- package/dist/helpers/{redirectToProxy.d.ts → redirect-to-proxy.d.ts} +1 -1
- package/dist/helpers/redirect-to-proxy.d.ts.map +1 -0
- package/dist/helpers/{redirectToProxy.js → redirect-to-proxy.js} +2 -2
- package/dist/helpers/{regexHelpers.d.ts → regex-helpers.d.ts} +1 -1
- package/dist/helpers/regex-helpers.d.ts.map +1 -0
- package/dist/helpers/{replaceVariables.d.ts → replace-variables.d.ts} +1 -1
- package/dist/helpers/replace-variables.d.ts.map +1 -0
- package/dist/helpers/{shouldIgnoreEntity.d.ts → should-ignore-entity.d.ts} +3 -2
- package/dist/helpers/should-ignore-entity.d.ts.map +1 -0
- package/dist/helpers/{ssrState.d.ts → ssr-state.d.ts} +1 -1
- package/dist/helpers/ssr-state.d.ts.map +1 -0
- package/dist/helpers/string.d.ts.map +1 -1
- package/dist/helpers/string.js +1 -1
- package/dist/migrations/index.d.ts +3 -3
- package/dist/migrations/index.d.ts.map +1 -1
- package/dist/migrations/local-storage.d.ts +1 -1
- package/dist/migrations/local-storage.d.ts.map +1 -1
- package/dist/migrations/migrator.d.ts +1 -1
- package/dist/migrations/migrator.d.ts.map +1 -1
- package/dist/migrations/semver.js +1 -1
- package/dist/migrations/v-2.1.0/migration.d.ts +2 -2
- package/dist/migrations/v-2.1.0/migration.d.ts.map +1 -1
- package/dist/migrations/v-2.1.0/migration.js +1 -1
- package/dist/migrations/v-2.2.0/migration.d.ts +2 -2
- package/dist/migrations/v-2.2.0/migration.d.ts.map +1 -1
- package/dist/migrations/v-2.3.0/migration.d.ts +2 -2
- package/dist/migrations/v-2.3.0/migration.d.ts.map +1 -1
- package/dist/migrations/v-2.4.0/migration.d.ts +2 -2
- package/dist/migrations/v-2.4.0/migration.d.ts.map +1 -1
- package/dist/migrations/v-2.5.0/migration.d.ts +2 -2
- package/dist/migrations/v-2.5.0/migration.d.ts.map +1 -1
- package/dist/migrations/v-2.5.0/migration.js +2 -3
- package/dist/migrations/v-2.5.0/types.generated.d.ts +9 -4
- package/dist/migrations/v-2.5.0/types.generated.d.ts.map +1 -1
- package/dist/spec-getters/{getExampleFromSchema.d.ts → get-example-from-schema.d.ts} +1 -1
- package/dist/spec-getters/get-example-from-schema.d.ts.map +1 -0
- package/dist/spec-getters/{getParametersFromOperation.d.ts → get-parameters-from-operation.d.ts} +1 -1
- package/dist/spec-getters/get-parameters-from-operation.d.ts.map +1 -0
- package/dist/spec-getters/{getParametersFromOperation.js → get-parameters-from-operation.js} +1 -1
- package/dist/spec-getters/{getRequestBodyFromOperation.d.ts → get-request-body-from-operation.d.ts} +2 -2
- package/dist/spec-getters/get-request-body-from-operation.d.ts.map +1 -0
- package/dist/spec-getters/{getRequestBodyFromOperation.js → get-request-body-from-operation.js} +7 -7
- package/dist/spec-getters/{getServerVariableExamples.d.ts → get-server-variable-examples.d.ts} +2 -2
- package/dist/spec-getters/get-server-variable-examples.d.ts.map +1 -0
- package/dist/spec-getters/index.d.ts +4 -4
- package/dist/spec-getters/index.d.ts.map +1 -1
- package/dist/spec-getters/index.js +4 -4
- package/dist/transforms/import-spec.d.ts +7 -3
- package/dist/transforms/import-spec.d.ts.map +1 -1
- package/dist/transforms/import-spec.js +35 -26
- package/dist/transforms/index.d.ts +1 -1
- package/dist/transforms/index.d.ts.map +1 -1
- package/dist/transforms/index.js +1 -1
- package/package.json +7 -45
- package/dist/diff/diff.d.ts +0 -13
- package/dist/diff/diff.d.ts.map +0 -1
- package/dist/diff/diff.js +0 -41
- package/dist/diff/index.d.ts +0 -2
- package/dist/diff/index.d.ts.map +0 -1
- package/dist/diff/index.js +0 -1
- package/dist/entities/index.d.ts +0 -2
- package/dist/entities/index.d.ts.map +0 -1
- package/dist/entities/index.js +0 -1
- package/dist/helpers/createHash.d.ts.map +0 -1
- package/dist/helpers/fetchSpecFromUrl.d.ts.map +0 -1
- package/dist/helpers/fetchWithProxyFallback.d.ts.map +0 -1
- package/dist/helpers/findVariables.d.ts +0 -5
- package/dist/helpers/findVariables.d.ts.map +0 -1
- package/dist/helpers/httpMethods.d.ts.map +0 -1
- package/dist/helpers/httpStatusCodes.d.ts.map +0 -1
- package/dist/helpers/isLocalUrl.d.ts.map +0 -1
- package/dist/helpers/isValidUrl.d.ts.map +0 -1
- package/dist/helpers/iterateTitle.d.ts.map +0 -1
- package/dist/helpers/makeUrlAbsolute.d.ts.map +0 -1
- package/dist/helpers/normalizeMimeType.d.ts.map +0 -1
- package/dist/helpers/normalizeMimeTypeObject.d.ts.map +0 -1
- package/dist/helpers/prettyPrintJson.d.ts.map +0 -1
- package/dist/helpers/redirectToProxy.d.ts.map +0 -1
- package/dist/helpers/regexHelpers.d.ts.map +0 -1
- package/dist/helpers/replaceVariables.d.ts.map +0 -1
- package/dist/helpers/shouldIgnoreEntity.d.ts.map +0 -1
- package/dist/helpers/ssrState.d.ts.map +0 -1
- package/dist/migrations/v-0.0.0/index.d.ts +0 -2
- package/dist/migrations/v-0.0.0/index.d.ts.map +0 -1
- package/dist/migrations/v-0.0.0/index.js +0 -1
- package/dist/migrations/v-2.1.0/index.d.ts +0 -3
- package/dist/migrations/v-2.1.0/index.d.ts.map +0 -1
- package/dist/migrations/v-2.1.0/index.js +0 -1
- package/dist/migrations/v-2.2.0/index.d.ts +0 -3
- package/dist/migrations/v-2.2.0/index.d.ts.map +0 -1
- package/dist/migrations/v-2.2.0/index.js +0 -1
- package/dist/migrations/v-2.3.0/index.d.ts +0 -3
- package/dist/migrations/v-2.3.0/index.d.ts.map +0 -1
- package/dist/migrations/v-2.3.0/index.js +0 -1
- package/dist/migrations/v-2.4.0/index.d.ts +0 -3
- package/dist/migrations/v-2.4.0/index.d.ts.map +0 -1
- package/dist/migrations/v-2.4.0/index.js +0 -1
- package/dist/migrations/v-2.5.0/index.d.ts +0 -3
- package/dist/migrations/v-2.5.0/index.d.ts.map +0 -1
- package/dist/migrations/v-2.5.0/index.js +0 -1
- package/dist/spec-getters/getExampleFromSchema.d.ts.map +0 -1
- package/dist/spec-getters/getParametersFromOperation.d.ts.map +0 -1
- package/dist/spec-getters/getRequestBodyFromOperation.d.ts.map +0 -1
- package/dist/spec-getters/getServerVariableExamples.d.ts.map +0 -1
- /package/dist/helpers/{createHash.js → create-hash.js} +0 -0
- /package/dist/helpers/{httpMethods.js → http-methods.js} +0 -0
- /package/dist/helpers/{httpStatusCodes.js → http-status-codes.js} +0 -0
- /package/dist/helpers/{isLocalUrl.js → is-local-url.js} +0 -0
- /package/dist/helpers/{isValidUrl.js → is-valid-url.js} +0 -0
- /package/dist/helpers/{iterateTitle.js → iterate-title.js} +0 -0
- /package/dist/helpers/{makeUrlAbsolute.js → make-url-absolute.js} +0 -0
- /package/dist/helpers/{normalizeMimeType.js → normalize-mime-type.js} +0 -0
- /package/dist/helpers/{prettyPrintJson.js → pretty-print-json.js} +0 -0
- /package/dist/helpers/{regexHelpers.js → regex-helpers.js} +0 -0
- /package/dist/helpers/{replaceVariables.js → replace-variables.js} +0 -0
- /package/dist/helpers/{shouldIgnoreEntity.js → should-ignore-entity.js} +0 -0
- /package/dist/helpers/{ssrState.js → ssr-state.js} +0 -0
- /package/dist/spec-getters/{getExampleFromSchema.js → get-example-from-schema.js} +0 -0
- /package/dist/spec-getters/{getServerVariableExamples.js → get-server-variable-examples.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request-examples.d.ts","sourceRoot":"","sources":["../../../src/entities/spec/request-examples.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"request-examples.d.ts","sourceRoot":"","sources":["../../../src/entities/spec/request-examples.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AACvD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAC5C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAKzC;;;;;GAKG;AACH,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuCvC,CAAA;AAEJ,+EAA+E;AAC/E,eAAO,MAAM,sBAAsB,WAAY,uBAAuB,EAAE,2BAIhE,CAAA;AAER,kFAAkF;AAClF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAA;AAEpF,eAAO,MAAM,sBAAsB;;;;;;;;;GAKtB,CAAA;AAEb;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAErE;;;;GAIG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAS/B,CAAA;AAEF,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAo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OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,cAAc,CA8GxG"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { keysOf } from '@scalar/object-utils/arrays';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
import { nanoidSchema } from '../shared/utility.js';
|
|
4
1
|
import { schemaModel } from '../../helpers/schema-model.js';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
2
|
+
import { getServerVariableExamples } from '../../spec-getters/get-server-variable-examples.js';
|
|
3
|
+
import { nanoidSchema } from '@scalar/types/utils';
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
import { getRequestBodyFromOperation } from '../../spec-getters/get-request-body-from-operation.js';
|
|
7
6
|
|
|
8
7
|
// ---------------------------------------------------------------------------
|
|
9
8
|
// Example Parameters
|
|
@@ -50,11 +49,6 @@ const requestExampleParametersSchema = z
|
|
|
50
49
|
}
|
|
51
50
|
return data;
|
|
52
51
|
});
|
|
53
|
-
/** Convert the array of parameters to an object keyed by the parameter name */
|
|
54
|
-
const parameterArrayToObject = (params) => params.reduce((map, param) => {
|
|
55
|
-
map[param.key] = param.value;
|
|
56
|
-
return map;
|
|
57
|
-
}, {});
|
|
58
52
|
const xScalarFileValueSchema = z
|
|
59
53
|
.object({
|
|
60
54
|
url: z.string(),
|
|
@@ -66,7 +60,7 @@ const xScalarFileValueSchema = z
|
|
|
66
60
|
*
|
|
67
61
|
* File values can be optionally fetched on import OR inserted as a base64 encoded string
|
|
68
62
|
*/
|
|
69
|
-
|
|
63
|
+
z.union([
|
|
70
64
|
z.object({
|
|
71
65
|
type: z.literal('string'),
|
|
72
66
|
value: z.string(),
|
|
@@ -98,15 +92,6 @@ const exampleBodyMime = [
|
|
|
98
92
|
/** Used for direct files */
|
|
99
93
|
'binary',
|
|
100
94
|
];
|
|
101
|
-
const contentMapping = {
|
|
102
|
-
json: 'application/json',
|
|
103
|
-
text: 'text/plain',
|
|
104
|
-
html: 'text/html',
|
|
105
|
-
javascript: 'application/javascript',
|
|
106
|
-
xml: 'application/xml',
|
|
107
|
-
yaml: 'application/yaml',
|
|
108
|
-
edn: 'application/edn',
|
|
109
|
-
};
|
|
110
95
|
/**
|
|
111
96
|
* TODO: Migrate away from this layout to the format used in the extension
|
|
112
97
|
*
|
|
@@ -175,56 +160,6 @@ const xScalarExampleSchema = z.object({
|
|
|
175
160
|
cookies: xScalarExampleParameterSchema,
|
|
176
161
|
}),
|
|
177
162
|
});
|
|
178
|
-
/**
|
|
179
|
-
* Convert a request example to the xScalar serialized format
|
|
180
|
-
*
|
|
181
|
-
* TODO: The base format should be migrated to align MUCH closer to the serialized format
|
|
182
|
-
*/
|
|
183
|
-
function convertExampleToXScalar(example) {
|
|
184
|
-
const active = example.body?.activeBody;
|
|
185
|
-
const xScalarBody = {
|
|
186
|
-
encoding: 'text/plain',
|
|
187
|
-
content: '',
|
|
188
|
-
};
|
|
189
|
-
if (example.body?.activeBody === 'binary') {
|
|
190
|
-
xScalarBody.encoding = 'binary';
|
|
191
|
-
// TODO: Need to allow users to set these properties
|
|
192
|
-
xScalarBody.file = null;
|
|
193
|
-
}
|
|
194
|
-
if (active === 'formData' && example.body?.[active]) {
|
|
195
|
-
const body = example.body[active];
|
|
196
|
-
xScalarBody.encoding = body.encoding === 'form-data' ? 'multipart/form-data' : 'application/x-www-form-urlencoded';
|
|
197
|
-
// TODO: Need to allow users to set these properties
|
|
198
|
-
xScalarBody.content = body.value.reduce((map, param) => {
|
|
199
|
-
/** TODO: We need to ensure only file or value is set */
|
|
200
|
-
map[param.key] = param.file
|
|
201
|
-
? {
|
|
202
|
-
type: 'file',
|
|
203
|
-
file: null,
|
|
204
|
-
}
|
|
205
|
-
: {
|
|
206
|
-
type: 'string',
|
|
207
|
-
value: param.value,
|
|
208
|
-
};
|
|
209
|
-
return map;
|
|
210
|
-
}, {});
|
|
211
|
-
}
|
|
212
|
-
if (example.body?.activeBody === 'raw') {
|
|
213
|
-
xScalarBody.encoding = contentMapping[example.body.raw?.encoding ?? 'text'] ?? 'text/plain';
|
|
214
|
-
xScalarBody.content = example.body.raw?.value ?? '';
|
|
215
|
-
}
|
|
216
|
-
const parameters = {};
|
|
217
|
-
keysOf(example.parameters ?? {}).forEach((key) => {
|
|
218
|
-
if (example.parameters?.[key].length) {
|
|
219
|
-
parameters[key] = parameterArrayToObject(example.parameters[key]);
|
|
220
|
-
}
|
|
221
|
-
});
|
|
222
|
-
return xScalarExampleSchema.parse({
|
|
223
|
-
/** Only add the body if we have content or the body should be a file */
|
|
224
|
-
body: xScalarBody.content || xScalarBody.encoding === 'binary' ? xScalarBody : undefined,
|
|
225
|
-
parameters,
|
|
226
|
-
});
|
|
227
|
-
}
|
|
228
163
|
// ---------------------------------------------------------------------------
|
|
229
164
|
// Example Helpers
|
|
230
165
|
/** Create new instance parameter from a request parameter */
|
|
@@ -375,4 +310,4 @@ function createExampleFromRequest(request, name, server) {
|
|
|
375
310
|
return example;
|
|
376
311
|
}
|
|
377
312
|
|
|
378
|
-
export {
|
|
313
|
+
export { createExampleFromRequest, createParamInstance, exampleBodyMime, exampleRequestBodyEncoding, exampleRequestBodySchema, requestExampleParametersSchema, requestExampleSchema, xScalarExampleBodySchema, xScalarExampleSchema, xScalarFileValueSchema };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { XScalarStability } from '@scalar/types';
|
|
3
|
-
import { type RequestExample } from './request-examples.
|
|
3
|
+
import { type RequestExample } from './request-examples.ts';
|
|
4
4
|
export declare const requestMethods: readonly ["connect", "delete", "get", "head", "options", "patch", "post", "put", "trace"];
|
|
5
5
|
export type RequestMethod = (typeof requestMethods)[number];
|
|
6
6
|
/** A single set of populated values for a sent request */
|
|
@@ -86,12 +86,12 @@ export declare const oasRequestSchema: z.ZodObject<{
|
|
|
86
86
|
summary?: string | undefined;
|
|
87
87
|
}>>, z.ZodArray<z.ZodUnknown, "many">]>>;
|
|
88
88
|
}, "strip", z.ZodTypeAny, {
|
|
89
|
-
required: boolean;
|
|
90
89
|
name: string;
|
|
91
|
-
|
|
90
|
+
required: boolean;
|
|
91
|
+
in: "cookie" | "path" | "query" | "header";
|
|
92
92
|
deprecated: boolean;
|
|
93
|
-
example?: unknown;
|
|
94
93
|
description?: string | undefined;
|
|
94
|
+
example?: unknown;
|
|
95
95
|
schema?: unknown;
|
|
96
96
|
content?: unknown;
|
|
97
97
|
style?: "matrix" | "simple" | "form" | "label" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
|
|
@@ -101,10 +101,10 @@ export declare const oasRequestSchema: z.ZodObject<{
|
|
|
101
101
|
}> | undefined;
|
|
102
102
|
}, {
|
|
103
103
|
name: string;
|
|
104
|
-
in: "
|
|
105
|
-
example?: unknown;
|
|
106
|
-
required?: boolean | undefined;
|
|
104
|
+
in: "cookie" | "path" | "query" | "header";
|
|
107
105
|
description?: string | undefined;
|
|
106
|
+
required?: boolean | undefined;
|
|
107
|
+
example?: unknown;
|
|
108
108
|
deprecated?: boolean | undefined;
|
|
109
109
|
schema?: unknown;
|
|
110
110
|
content?: unknown;
|
|
@@ -154,14 +154,14 @@ export declare const oasRequestSchema: z.ZodObject<{
|
|
|
154
154
|
}>>>;
|
|
155
155
|
}, "strip", z.ZodTypeAny, {
|
|
156
156
|
content: string | Record<string, any>;
|
|
157
|
-
encoding: "application/json" | "
|
|
157
|
+
encoding: "application/json" | "application/octet-stream" | "application/x-www-form-urlencoded" | "application/xml" | "multipart/form-data" | "text/plain" | "text/html" | "application/javascript" | "application/yaml" | "application/edn" | "binary";
|
|
158
158
|
file?: {
|
|
159
159
|
url: string;
|
|
160
160
|
base64?: string | undefined;
|
|
161
161
|
} | null | undefined;
|
|
162
162
|
}, {
|
|
163
163
|
content: string | Record<string, any>;
|
|
164
|
-
encoding: "application/json" | "
|
|
164
|
+
encoding: "application/json" | "application/octet-stream" | "application/x-www-form-urlencoded" | "application/xml" | "multipart/form-data" | "text/plain" | "text/html" | "application/javascript" | "application/yaml" | "application/edn" | "binary";
|
|
165
165
|
file?: {
|
|
166
166
|
url: string;
|
|
167
167
|
base64?: string | undefined;
|
|
@@ -174,26 +174,26 @@ export declare const oasRequestSchema: z.ZodObject<{
|
|
|
174
174
|
cookies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
175
175
|
}, "strip", z.ZodTypeAny, {
|
|
176
176
|
path?: Record<string, string> | undefined;
|
|
177
|
-
cookies?: Record<string, string> | undefined;
|
|
178
177
|
query?: Record<string, string> | undefined;
|
|
179
178
|
headers?: Record<string, string> | undefined;
|
|
179
|
+
cookies?: Record<string, string> | undefined;
|
|
180
180
|
}, {
|
|
181
181
|
path?: Record<string, string> | undefined;
|
|
182
|
-
cookies?: Record<string, string> | undefined;
|
|
183
182
|
query?: Record<string, string> | undefined;
|
|
184
183
|
headers?: Record<string, string> | undefined;
|
|
184
|
+
cookies?: Record<string, string> | undefined;
|
|
185
185
|
}>;
|
|
186
186
|
}, "strip", z.ZodTypeAny, {
|
|
187
187
|
parameters: {
|
|
188
188
|
path?: Record<string, string> | undefined;
|
|
189
|
-
cookies?: Record<string, string> | undefined;
|
|
190
189
|
query?: Record<string, string> | undefined;
|
|
191
190
|
headers?: Record<string, string> | undefined;
|
|
191
|
+
cookies?: Record<string, string> | undefined;
|
|
192
192
|
};
|
|
193
193
|
name?: string | undefined;
|
|
194
194
|
body?: {
|
|
195
195
|
content: string | Record<string, any>;
|
|
196
|
-
encoding: "application/json" | "
|
|
196
|
+
encoding: "application/json" | "application/octet-stream" | "application/x-www-form-urlencoded" | "application/xml" | "multipart/form-data" | "text/plain" | "text/html" | "application/javascript" | "application/yaml" | "application/edn" | "binary";
|
|
197
197
|
file?: {
|
|
198
198
|
url: string;
|
|
199
199
|
base64?: string | undefined;
|
|
@@ -202,14 +202,14 @@ export declare const oasRequestSchema: z.ZodObject<{
|
|
|
202
202
|
}, {
|
|
203
203
|
parameters: {
|
|
204
204
|
path?: Record<string, string> | undefined;
|
|
205
|
-
cookies?: Record<string, string> | undefined;
|
|
206
205
|
query?: Record<string, string> | undefined;
|
|
207
206
|
headers?: Record<string, string> | undefined;
|
|
207
|
+
cookies?: Record<string, string> | undefined;
|
|
208
208
|
};
|
|
209
209
|
name?: string | undefined;
|
|
210
210
|
body?: {
|
|
211
211
|
content: string | Record<string, any>;
|
|
212
|
-
encoding: "application/json" | "
|
|
212
|
+
encoding: "application/json" | "application/octet-stream" | "application/x-www-form-urlencoded" | "application/xml" | "multipart/form-data" | "text/plain" | "text/html" | "application/javascript" | "application/yaml" | "application/edn" | "binary";
|
|
213
213
|
file?: {
|
|
214
214
|
url: string;
|
|
215
215
|
base64?: string | undefined;
|
|
@@ -233,12 +233,12 @@ export declare const oasRequestSchema: z.ZodObject<{
|
|
|
233
233
|
deprecated?: boolean | undefined;
|
|
234
234
|
operationId?: string | undefined;
|
|
235
235
|
parameters?: {
|
|
236
|
-
required: boolean;
|
|
237
236
|
name: string;
|
|
238
|
-
|
|
237
|
+
required: boolean;
|
|
238
|
+
in: "cookie" | "path" | "query" | "header";
|
|
239
239
|
deprecated: boolean;
|
|
240
|
-
example?: unknown;
|
|
241
240
|
description?: string | undefined;
|
|
241
|
+
example?: unknown;
|
|
242
242
|
schema?: unknown;
|
|
243
243
|
content?: unknown;
|
|
244
244
|
style?: "matrix" | "simple" | "form" | "label" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
|
|
@@ -252,14 +252,14 @@ export declare const oasRequestSchema: z.ZodObject<{
|
|
|
252
252
|
'x-scalar-examples'?: Record<string, {
|
|
253
253
|
parameters: {
|
|
254
254
|
path?: Record<string, string> | undefined;
|
|
255
|
-
cookies?: Record<string, string> | undefined;
|
|
256
255
|
query?: Record<string, string> | undefined;
|
|
257
256
|
headers?: Record<string, string> | undefined;
|
|
257
|
+
cookies?: Record<string, string> | undefined;
|
|
258
258
|
};
|
|
259
259
|
name?: string | undefined;
|
|
260
260
|
body?: {
|
|
261
261
|
content: string | Record<string, any>;
|
|
262
|
-
encoding: "application/json" | "
|
|
262
|
+
encoding: "application/json" | "application/octet-stream" | "application/x-www-form-urlencoded" | "application/xml" | "multipart/form-data" | "text/plain" | "text/html" | "application/javascript" | "application/yaml" | "application/edn" | "binary";
|
|
263
263
|
file?: {
|
|
264
264
|
url: string;
|
|
265
265
|
base64?: string | undefined;
|
|
@@ -281,10 +281,10 @@ export declare const oasRequestSchema: z.ZodObject<{
|
|
|
281
281
|
operationId?: string | undefined;
|
|
282
282
|
parameters?: {
|
|
283
283
|
name: string;
|
|
284
|
-
in: "
|
|
285
|
-
example?: unknown;
|
|
286
|
-
required?: boolean | undefined;
|
|
284
|
+
in: "cookie" | "path" | "query" | "header";
|
|
287
285
|
description?: string | undefined;
|
|
286
|
+
required?: boolean | undefined;
|
|
287
|
+
example?: unknown;
|
|
288
288
|
deprecated?: boolean | undefined;
|
|
289
289
|
schema?: unknown;
|
|
290
290
|
content?: unknown;
|
|
@@ -299,14 +299,14 @@ export declare const oasRequestSchema: z.ZodObject<{
|
|
|
299
299
|
'x-scalar-examples'?: Record<string, {
|
|
300
300
|
parameters: {
|
|
301
301
|
path?: Record<string, string> | undefined;
|
|
302
|
-
cookies?: Record<string, string> | undefined;
|
|
303
302
|
query?: Record<string, string> | undefined;
|
|
304
303
|
headers?: Record<string, string> | undefined;
|
|
304
|
+
cookies?: Record<string, string> | undefined;
|
|
305
305
|
};
|
|
306
306
|
name?: string | undefined;
|
|
307
307
|
body?: {
|
|
308
308
|
content: string | Record<string, any>;
|
|
309
|
-
encoding: "application/json" | "
|
|
309
|
+
encoding: "application/json" | "application/octet-stream" | "application/x-www-form-urlencoded" | "application/xml" | "multipart/form-data" | "text/plain" | "text/html" | "application/javascript" | "application/yaml" | "application/edn" | "binary";
|
|
310
310
|
file?: {
|
|
311
311
|
url: string;
|
|
312
312
|
base64?: string | undefined;
|
|
@@ -372,12 +372,12 @@ export declare const requestSchema: z.ZodObject<z.objectUtil.extendShape<z.objec
|
|
|
372
372
|
summary?: string | undefined;
|
|
373
373
|
}>>, z.ZodArray<z.ZodUnknown, "many">]>>;
|
|
374
374
|
}, "strip", z.ZodTypeAny, {
|
|
375
|
-
required: boolean;
|
|
376
375
|
name: string;
|
|
377
|
-
|
|
376
|
+
required: boolean;
|
|
377
|
+
in: "cookie" | "path" | "query" | "header";
|
|
378
378
|
deprecated: boolean;
|
|
379
|
-
example?: unknown;
|
|
380
379
|
description?: string | undefined;
|
|
380
|
+
example?: unknown;
|
|
381
381
|
schema?: unknown;
|
|
382
382
|
content?: unknown;
|
|
383
383
|
style?: "matrix" | "simple" | "form" | "label" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
|
|
@@ -387,10 +387,10 @@ export declare const requestSchema: z.ZodObject<z.objectUtil.extendShape<z.objec
|
|
|
387
387
|
}> | undefined;
|
|
388
388
|
}, {
|
|
389
389
|
name: string;
|
|
390
|
-
in: "
|
|
391
|
-
example?: unknown;
|
|
392
|
-
required?: boolean | undefined;
|
|
390
|
+
in: "cookie" | "path" | "query" | "header";
|
|
393
391
|
description?: string | undefined;
|
|
392
|
+
required?: boolean | undefined;
|
|
393
|
+
example?: unknown;
|
|
394
394
|
deprecated?: boolean | undefined;
|
|
395
395
|
schema?: unknown;
|
|
396
396
|
content?: unknown;
|
|
@@ -440,14 +440,14 @@ export declare const requestSchema: z.ZodObject<z.objectUtil.extendShape<z.objec
|
|
|
440
440
|
}>>>;
|
|
441
441
|
}, "strip", z.ZodTypeAny, {
|
|
442
442
|
content: string | Record<string, any>;
|
|
443
|
-
encoding: "application/json" | "
|
|
443
|
+
encoding: "application/json" | "application/octet-stream" | "application/x-www-form-urlencoded" | "application/xml" | "multipart/form-data" | "text/plain" | "text/html" | "application/javascript" | "application/yaml" | "application/edn" | "binary";
|
|
444
444
|
file?: {
|
|
445
445
|
url: string;
|
|
446
446
|
base64?: string | undefined;
|
|
447
447
|
} | null | undefined;
|
|
448
448
|
}, {
|
|
449
449
|
content: string | Record<string, any>;
|
|
450
|
-
encoding: "application/json" | "
|
|
450
|
+
encoding: "application/json" | "application/octet-stream" | "application/x-www-form-urlencoded" | "application/xml" | "multipart/form-data" | "text/plain" | "text/html" | "application/javascript" | "application/yaml" | "application/edn" | "binary";
|
|
451
451
|
file?: {
|
|
452
452
|
url: string;
|
|
453
453
|
base64?: string | undefined;
|
|
@@ -460,26 +460,26 @@ export declare const requestSchema: z.ZodObject<z.objectUtil.extendShape<z.objec
|
|
|
460
460
|
cookies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
461
461
|
}, "strip", z.ZodTypeAny, {
|
|
462
462
|
path?: Record<string, string> | undefined;
|
|
463
|
-
cookies?: Record<string, string> | undefined;
|
|
464
463
|
query?: Record<string, string> | undefined;
|
|
465
464
|
headers?: Record<string, string> | undefined;
|
|
465
|
+
cookies?: Record<string, string> | undefined;
|
|
466
466
|
}, {
|
|
467
467
|
path?: Record<string, string> | undefined;
|
|
468
|
-
cookies?: Record<string, string> | undefined;
|
|
469
468
|
query?: Record<string, string> | undefined;
|
|
470
469
|
headers?: Record<string, string> | undefined;
|
|
470
|
+
cookies?: Record<string, string> | undefined;
|
|
471
471
|
}>;
|
|
472
472
|
}, "strip", z.ZodTypeAny, {
|
|
473
473
|
parameters: {
|
|
474
474
|
path?: Record<string, string> | undefined;
|
|
475
|
-
cookies?: Record<string, string> | undefined;
|
|
476
475
|
query?: Record<string, string> | undefined;
|
|
477
476
|
headers?: Record<string, string> | undefined;
|
|
477
|
+
cookies?: Record<string, string> | undefined;
|
|
478
478
|
};
|
|
479
479
|
name?: string | undefined;
|
|
480
480
|
body?: {
|
|
481
481
|
content: string | Record<string, any>;
|
|
482
|
-
encoding: "application/json" | "
|
|
482
|
+
encoding: "application/json" | "application/octet-stream" | "application/x-www-form-urlencoded" | "application/xml" | "multipart/form-data" | "text/plain" | "text/html" | "application/javascript" | "application/yaml" | "application/edn" | "binary";
|
|
483
483
|
file?: {
|
|
484
484
|
url: string;
|
|
485
485
|
base64?: string | undefined;
|
|
@@ -488,14 +488,14 @@ export declare const requestSchema: z.ZodObject<z.objectUtil.extendShape<z.objec
|
|
|
488
488
|
}, {
|
|
489
489
|
parameters: {
|
|
490
490
|
path?: Record<string, string> | undefined;
|
|
491
|
-
cookies?: Record<string, string> | undefined;
|
|
492
491
|
query?: Record<string, string> | undefined;
|
|
493
492
|
headers?: Record<string, string> | undefined;
|
|
493
|
+
cookies?: Record<string, string> | undefined;
|
|
494
494
|
};
|
|
495
495
|
name?: string | undefined;
|
|
496
496
|
body?: {
|
|
497
497
|
content: string | Record<string, any>;
|
|
498
|
-
encoding: "application/json" | "
|
|
498
|
+
encoding: "application/json" | "application/octet-stream" | "application/x-www-form-urlencoded" | "application/xml" | "multipart/form-data" | "text/plain" | "text/html" | "application/javascript" | "application/yaml" | "application/edn" | "binary";
|
|
499
499
|
file?: {
|
|
500
500
|
url: string;
|
|
501
501
|
base64?: string | undefined;
|
|
@@ -523,9 +523,9 @@ export declare const requestSchema: z.ZodObject<z.objectUtil.extendShape<z.objec
|
|
|
523
523
|
/** List of security scheme UIDs associated with the request */
|
|
524
524
|
selectedSecuritySchemeUids: z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodBranded<z.ZodString, "securityScheme">, z.ZodArray<z.ZodBranded<z.ZodString, "securityScheme">, "many">]>, "many">>;
|
|
525
525
|
}>, "strip", z.ZodTypeAny, {
|
|
526
|
+
uid: string & z.BRAND<"operation">;
|
|
526
527
|
path: string;
|
|
527
528
|
type: "request";
|
|
528
|
-
uid: string & z.BRAND<"operation">;
|
|
529
529
|
selectedSecuritySchemeUids: ((string & z.BRAND<"securityScheme">) | (string & z.BRAND<"securityScheme">)[])[];
|
|
530
530
|
selectedServerUid: (string & z.BRAND<"server">) | null;
|
|
531
531
|
servers: (string & z.BRAND<"server">)[];
|
|
@@ -544,12 +544,12 @@ export declare const requestSchema: z.ZodObject<z.objectUtil.extendShape<z.objec
|
|
|
544
544
|
deprecated?: boolean | undefined;
|
|
545
545
|
operationId?: string | undefined;
|
|
546
546
|
parameters?: {
|
|
547
|
-
required: boolean;
|
|
548
547
|
name: string;
|
|
549
|
-
|
|
548
|
+
required: boolean;
|
|
549
|
+
in: "cookie" | "path" | "query" | "header";
|
|
550
550
|
deprecated: boolean;
|
|
551
|
-
example?: unknown;
|
|
552
551
|
description?: string | undefined;
|
|
552
|
+
example?: unknown;
|
|
553
553
|
schema?: unknown;
|
|
554
554
|
content?: unknown;
|
|
555
555
|
style?: "matrix" | "simple" | "form" | "label" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
|
|
@@ -562,9 +562,9 @@ export declare const requestSchema: z.ZodObject<z.objectUtil.extendShape<z.objec
|
|
|
562
562
|
responses?: Record<string, any> | undefined;
|
|
563
563
|
'x-scalar-stability'?: XScalarStability | undefined;
|
|
564
564
|
}, {
|
|
565
|
+
uid?: string | undefined;
|
|
565
566
|
path?: string | undefined;
|
|
566
567
|
type?: "request" | undefined;
|
|
567
|
-
uid?: string | undefined;
|
|
568
568
|
description?: string | undefined;
|
|
569
569
|
summary?: string | undefined;
|
|
570
570
|
externalDocs?: {
|
|
@@ -583,10 +583,10 @@ export declare const requestSchema: z.ZodObject<z.objectUtil.extendShape<z.objec
|
|
|
583
583
|
operationId?: string | undefined;
|
|
584
584
|
parameters?: {
|
|
585
585
|
name: string;
|
|
586
|
-
in: "
|
|
587
|
-
example?: unknown;
|
|
588
|
-
required?: boolean | undefined;
|
|
586
|
+
in: "cookie" | "path" | "query" | "header";
|
|
589
587
|
description?: string | undefined;
|
|
588
|
+
required?: boolean | undefined;
|
|
589
|
+
example?: unknown;
|
|
590
590
|
deprecated?: boolean | undefined;
|
|
591
591
|
schema?: unknown;
|
|
592
592
|
content?: unknown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requests.d.ts","sourceRoot":"","sources":["../../../src/entities/spec/requests.ts"],"names":[],"mappings":"AAEA,OAAO,EAAkB,CAAC,EAAE,MAAM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from '../shared/utility.js';
|
|
2
|
+
import { nanoidSchema } from '@scalar/types/utils';
|
|
2
3
|
import { z } from 'zod';
|
|
3
4
|
import { XScalarStability } from '@scalar/types';
|
|
5
|
+
import { oasSecurityRequirementSchema } from '@scalar/types/entities';
|
|
4
6
|
import { oasParameterSchema } from './parameters.js';
|
|
5
7
|
import { xScalarExampleSchema } from './request-examples.js';
|
|
6
|
-
import { oasSecurityRequirementSchema } from './security.js';
|
|
7
8
|
import { oasExternalDocumentationSchema } from './spec-objects.js';
|
|
8
9
|
|
|
9
10
|
const requestMethods = ['connect', 'delete', 'get', 'head', 'options', 'patch', 'post', 'put', 'trace'];
|