@scalar/workspace-store 0.16.2 → 0.17.1
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 +33 -0
- package/dist/client.d.ts +14 -14
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +43 -20
- package/dist/client.js.map +2 -2
- package/dist/mutators/request.d.ts +1 -1
- package/dist/mutators/request.d.ts.map +1 -1
- package/dist/mutators/request.js.map +1 -1
- package/dist/navigation/helpers/traverse-examples.d.ts +8 -0
- package/dist/navigation/helpers/traverse-examples.d.ts.map +1 -0
- package/dist/navigation/helpers/traverse-examples.js +46 -0
- package/dist/navigation/helpers/traverse-examples.js.map +7 -0
- package/dist/navigation/helpers/traverse-paths.d.ts.map +1 -1
- package/dist/navigation/helpers/traverse-paths.js +9 -1
- package/dist/navigation/helpers/traverse-paths.js.map +2 -2
- package/dist/schemas/extensions/example/x-disabled.d.ts +18 -0
- package/dist/schemas/extensions/example/x-disabled.d.ts.map +1 -0
- package/dist/schemas/extensions/example/x-disabled.js +8 -0
- package/dist/schemas/extensions/example/x-disabled.js.map +7 -0
- package/dist/schemas/extensions/parameter/x-global.d.ts +13 -0
- package/dist/schemas/extensions/parameter/x-global.d.ts.map +1 -0
- package/dist/schemas/extensions/parameter/x-global.js +8 -0
- package/dist/schemas/extensions/parameter/x-global.js.map +7 -0
- package/dist/schemas/inmemory-workspace.d.ts +40 -12
- package/dist/schemas/inmemory-workspace.d.ts.map +1 -1
- package/dist/schemas/navigation.d.ts +21 -1
- package/dist/schemas/navigation.d.ts.map +1 -1
- package/dist/schemas/navigation.js +12 -2
- package/dist/schemas/navigation.js.map +2 -2
- package/dist/schemas/reference-config/index.d.ts +21 -7
- package/dist/schemas/reference-config/index.d.ts.map +1 -1
- package/dist/schemas/reference-config/index.js.map +1 -1
- package/dist/schemas/reference-config/settings.d.ts +20 -6
- package/dist/schemas/reference-config/settings.d.ts.map +1 -1
- package/dist/schemas/reference-config/settings.js.map +1 -1
- package/dist/schemas/v3.1/strict/example.d.ts +13 -2
- package/dist/schemas/v3.1/strict/example.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/example.js +15 -10
- package/dist/schemas/v3.1/strict/example.js.map +2 -2
- package/dist/schemas/v3.1/strict/openapi-document.d.ts +646 -170
- package/dist/schemas/v3.1/strict/openapi-document.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/parameter.d.ts +21 -6
- package/dist/schemas/v3.1/strict/parameter.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/parameter.js +21 -17
- package/dist/schemas/v3.1/strict/parameter.js.map +2 -2
- package/dist/schemas/v3.1/strict/schema.d.ts +2 -2
- package/dist/schemas/v3.1/strict/schema.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/schema.js +1 -1
- package/dist/schemas/v3.1/strict/schema.js.map +2 -2
- package/dist/schemas/workspace-specification/config.d.ts +20 -6
- package/dist/schemas/workspace-specification/config.d.ts.map +1 -1
- package/dist/schemas/workspace-specification/index.d.ts +22 -8
- package/dist/schemas/workspace-specification/index.d.ts.map +1 -1
- package/dist/schemas/workspace-specification/index.js.map +1 -1
- package/dist/schemas/workspace.d.ts +135 -37
- package/dist/schemas/workspace.d.ts.map +1 -1
- package/package.json +7 -7
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AVAILABLE_CLIENTS, type AvailableClientsArray } from '@scalar/types/snippetz';
|
|
2
|
-
import type { RequiredDeep } from 'type-fest
|
|
2
|
+
import type { RequiredDeep } from 'type-fest';
|
|
3
3
|
import { type Appearance } from './appearance.js';
|
|
4
4
|
import { type Features } from './features.js';
|
|
5
5
|
import { type Meta } from './meta.js';
|
|
@@ -311,7 +311,7 @@ export declare const ReferenceConfigSchema: import("@scalar/typebox").TObject<{
|
|
|
311
311
|
'x-scalar-stability': import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"deprecated">, import("@scalar/typebox").TLiteral<"experimental">, import("@scalar/typebox").TLiteral<"stable">]>>;
|
|
312
312
|
}>]>;
|
|
313
313
|
SchemaObject: import("@scalar/typebox").TUnion<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
314
|
-
|
|
314
|
+
__scalar_: import("@scalar/typebox").TString;
|
|
315
315
|
}>, import("@scalar/typebox").TObject<{
|
|
316
316
|
name: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
317
317
|
title: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
@@ -1027,7 +1027,7 @@ export declare const ReferenceConfigSchema: import("@scalar/typebox").TObject<{
|
|
|
1027
1027
|
}>]>, import("@scalar/typebox").TObject<{
|
|
1028
1028
|
'$ref-value': import("@scalar/typebox").TRef<"ResponseObject">;
|
|
1029
1029
|
}>]>]>>;
|
|
1030
|
-
ParameterObject: import("@scalar/typebox").TUnion<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
1030
|
+
ParameterObject: import("@scalar/typebox").TUnion<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
1031
1031
|
name: import("@scalar/typebox").TString;
|
|
1032
1032
|
in: import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"query">, import("@scalar/typebox").TLiteral<"header">, import("@scalar/typebox").TLiteral<"path">, import("@scalar/typebox").TLiteral<"cookie">]>;
|
|
1033
1033
|
description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
@@ -1035,6 +1035,8 @@ export declare const ReferenceConfigSchema: import("@scalar/typebox").TObject<{
|
|
|
1035
1035
|
deprecated: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
1036
1036
|
allowEmptyValue: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
1037
1037
|
}>, import("@scalar/typebox").TObject<{
|
|
1038
|
+
'x-global': import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
1039
|
+
}>]>, import("@scalar/typebox").TObject<{
|
|
1038
1040
|
style: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
1039
1041
|
explode: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
1040
1042
|
schema: import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TRef<"SchemaObject">, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
@@ -1058,7 +1060,7 @@ export declare const ReferenceConfigSchema: import("@scalar/typebox").TObject<{
|
|
|
1058
1060
|
}>]>, import("@scalar/typebox").TObject<{
|
|
1059
1061
|
'$ref-value': import("@scalar/typebox").TRef<"ExampleObject">;
|
|
1060
1062
|
}>]>]>>>;
|
|
1061
|
-
}>]>, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
1063
|
+
}>]>, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
1062
1064
|
name: import("@scalar/typebox").TString;
|
|
1063
1065
|
in: import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"query">, import("@scalar/typebox").TLiteral<"header">, import("@scalar/typebox").TLiteral<"path">, import("@scalar/typebox").TLiteral<"cookie">]>;
|
|
1064
1066
|
description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
@@ -1066,14 +1068,18 @@ export declare const ReferenceConfigSchema: import("@scalar/typebox").TObject<{
|
|
|
1066
1068
|
deprecated: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
1067
1069
|
allowEmptyValue: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
1068
1070
|
}>, import("@scalar/typebox").TObject<{
|
|
1071
|
+
'x-global': import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
1072
|
+
}>]>, import("@scalar/typebox").TObject<{
|
|
1069
1073
|
content: import("@scalar/typebox").TOptional<import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TRef<"MediaTypeObject">>>;
|
|
1070
1074
|
}>]>]>;
|
|
1071
|
-
ExampleObject: import("@scalar/typebox").TObject<{
|
|
1075
|
+
ExampleObject: import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
1072
1076
|
summary: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
1073
1077
|
description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
1074
1078
|
value: import("@scalar/typebox").TOptional<import("@scalar/typebox").TAny>;
|
|
1075
1079
|
externalValue: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
1076
|
-
}
|
|
1080
|
+
}>, import("@scalar/typebox").TObject<{
|
|
1081
|
+
'x-disabled': import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
1082
|
+
}>]>;
|
|
1077
1083
|
RequestBodyObject: import("@scalar/typebox").TObject<{
|
|
1078
1084
|
description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
1079
1085
|
content: import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TRef<"MediaTypeObject">>;
|
|
@@ -1278,6 +1284,7 @@ export declare const ReferenceConfigSchema: import("@scalar/typebox").TObject<{
|
|
|
1278
1284
|
method: import("@scalar/typebox").TLiteral<import("@scalar/helpers/http/http-methods").HttpMethod>;
|
|
1279
1285
|
path: import("@scalar/typebox").TString;
|
|
1280
1286
|
isDeprecated: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
1287
|
+
children: import("@scalar/typebox").TOptional<import("@scalar/typebox").TArray<import("@scalar/typebox").TRef<"TraversedEntryObject">>>;
|
|
1281
1288
|
}>]>;
|
|
1282
1289
|
TraversedSchemaObject: import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
1283
1290
|
id: import("@scalar/typebox").TString;
|
|
@@ -1324,6 +1331,7 @@ export declare const ReferenceConfigSchema: import("@scalar/typebox").TObject<{
|
|
|
1324
1331
|
method: import("@scalar/typebox").TLiteral<import("@scalar/helpers/http/http-methods").HttpMethod>;
|
|
1325
1332
|
path: import("@scalar/typebox").TString;
|
|
1326
1333
|
isDeprecated: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
1334
|
+
children: import("@scalar/typebox").TOptional<import("@scalar/typebox").TArray<import("@scalar/typebox").TRef<"TraversedEntryObject">>>;
|
|
1327
1335
|
}>]>, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
1328
1336
|
id: import("@scalar/typebox").TString;
|
|
1329
1337
|
title: import("@scalar/typebox").TString;
|
|
@@ -1351,6 +1359,12 @@ export declare const ReferenceConfigSchema: import("@scalar/typebox").TObject<{
|
|
|
1351
1359
|
method: import("@scalar/typebox").TLiteral<import("@scalar/helpers/http/http-methods").HttpMethod>;
|
|
1352
1360
|
name: import("@scalar/typebox").TString;
|
|
1353
1361
|
isDeprecated: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
1362
|
+
}>]>, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
1363
|
+
id: import("@scalar/typebox").TString;
|
|
1364
|
+
title: import("@scalar/typebox").TString;
|
|
1365
|
+
}>, import("@scalar/typebox").TObject<{
|
|
1366
|
+
type: import("@scalar/typebox").TLiteral<"example">;
|
|
1367
|
+
name: import("@scalar/typebox").TString;
|
|
1354
1368
|
}>]>]>;
|
|
1355
1369
|
}, "ServerObject">>>;
|
|
1356
1370
|
baseServerUrl: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
@@ -1387,7 +1401,7 @@ export declare const ReferenceConfigSchema: import("@scalar/typebox").TObject<{
|
|
|
1387
1401
|
ogImage: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
1388
1402
|
twitterCard: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
1389
1403
|
}>>;
|
|
1390
|
-
httpClients: import("@scalar/typebox").TOptional<import("@scalar/typebox").TArray<import("@scalar/typebox").TUnion<import("@scalar/typebox").TLiteral<"c/libcurl" | "clojure/clj_http" | "csharp/httpclient" | "csharp/restsharp" | "dart/http" | "go/native" | "http/http1.1" | "java/asynchttp" | "java/nethttp" | "java/okhttp" | "java/unirest" | "js/axios" | "js/fetch" | "js/jquery" | "js/ofetch" | "js/xhr" | "kotlin/okhttp" | "node/axios" | "node/fetch" | "node/ofetch" | "node/undici" | "objc/nsurlsession" | "ocaml/cohttp" | "php/curl" | "php/guzzle" | "powershell/restmethod" | "powershell/webrequest" | "python/python3" | "python/requests" | "python/httpx_sync" | "python/httpx_async" | "r/httr" | "ruby/native" | "rust/reqwest" | "shell/curl" | "shell/httpie" | "shell/wget" | "swift/nsurlsession">[]>>>;
|
|
1404
|
+
httpClients: import("@scalar/typebox").TOptional<import("@scalar/typebox").TArray<import("@scalar/typebox").TUnion<import("@scalar/typebox").TLiteral<"c/libcurl" | "clojure/clj_http" | "csharp/httpclient" | "csharp/restsharp" | "dart/http" | "fsharp/httpclient" | "go/native" | "http/http1.1" | "java/asynchttp" | "java/nethttp" | "java/okhttp" | "java/unirest" | "js/axios" | "js/fetch" | "js/jquery" | "js/ofetch" | "js/xhr" | "kotlin/okhttp" | "node/axios" | "node/fetch" | "node/ofetch" | "node/undici" | "objc/nsurlsession" | "ocaml/cohttp" | "php/curl" | "php/guzzle" | "powershell/restmethod" | "powershell/webrequest" | "python/python3" | "python/requests" | "python/httpx_sync" | "python/httpx_async" | "r/httr" | "ruby/native" | "rust/reqwest" | "shell/curl" | "shell/httpie" | "shell/wget" | "swift/nsurlsession">[]>>>;
|
|
1391
1405
|
}>;
|
|
1392
1406
|
export type ReferenceConfig = {
|
|
1393
1407
|
title?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/schemas/reference-config/index.ts"],"names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,CAAC,EAAE,QAAQ,CAAA;IACnB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,UAAU,CAAC,EAAE,UAAU,CAAA;IACvB,QAAQ,CAAC,EAAE,QAAQ,CAAA;IACnB,IAAI,CAAC,EAAE,IAAI,CAAA;IACX,WAAW,CAAC,EAAE,qBAAqB,GAAG,OAAO,iBAAiB,CAAA;CAC/D,CAAA;AAED,eAAO,MAAM,sBAAsB,EAAE,YAAY,CAAC,eAAe,CAgChE,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/schemas/reference-config/index.ts"],
|
|
4
|
-
"sourcesContent": ["import { Type } from '@scalar/typebox'\nimport { AVAILABLE_CLIENTS, type AvailableClientsArray } from '@scalar/types/snippetz'\nimport type { RequiredDeep } from 'type-fest
|
|
4
|
+
"sourcesContent": ["import { Type } from '@scalar/typebox'\nimport { AVAILABLE_CLIENTS, type AvailableClientsArray } from '@scalar/types/snippetz'\nimport type { RequiredDeep } from 'type-fest'\n\nimport { type Appearance, AppearanceSchema, defaultAppearance } from './appearance'\nimport { type Features, FeaturesSchema, defaultFeatures } from './features'\nimport { type Meta, MetaSchema, defaultMeta } from './meta'\nimport { type Routing, RoutingSchema, defaultRouting } from './routing'\nimport { type Settings, SettingsSchema, defaultSettings } from './settings'\n\n/**\n * ReferenceConfigSchema defines the shape of the configuration object\n * for the API Reference. All properties are optional due to Type.Partial.\n * This schema is used for validating and typing the configuration.\n */\nexport const ReferenceConfigSchema = Type.Partial(\n Type.Object({\n /** Document level title */\n title: Type.String(),\n /** Unique slug to identify the document */\n slug: Type.String(),\n /** Settings for the API reference (controls behavior and options) */\n settings: SettingsSchema,\n /** Routing configuration (controls navigation) */\n routing: RoutingSchema,\n /** Appearance configuration (controls theming and UI options) */\n appearance: AppearanceSchema,\n /** Features configuration (toggles for enabling/disabling features) */\n features: FeaturesSchema,\n /** Meta information */\n meta: MetaSchema,\n /** List of enabled HTTP clients for code samples */\n httpClients: Type.Array(Type.Union(AVAILABLE_CLIENTS.map((client) => Type.Literal(client)))),\n }),\n)\n\nexport type ReferenceConfig = {\n title?: string\n slug?: string\n settings?: Settings\n routing?: Routing\n appearance?: Appearance\n features?: Features\n meta?: Meta\n httpClients?: AvailableClientsArray | typeof AVAILABLE_CLIENTS\n}\n\nexport const defaultReferenceConfig: RequiredDeep<ReferenceConfig> = {\n title: 'Scalar API Reference',\n slug: 'scalar-api-reference',\n\n /**\n * Default settings for the API reference.\n */\n settings: defaultSettings,\n\n /**\n * Default routing configuration for the API reference.\n */\n routing: defaultRouting,\n /**\n * Default appearance configuration for the API reference.\n */\n appearance: defaultAppearance,\n\n /**\n * Default features configuration for the API reference.\n */\n features: defaultFeatures,\n\n /**\n * Default meta configuration for the API reference.\n */\n meta: defaultMeta,\n\n /**\n * Default HTTP clients for the API reference.\n */\n httpClients: AVAILABLE_CLIENTS,\n}\n"],
|
|
5
5
|
"mappings": "AAAA,SAAS,YAAY;AACrB,SAAS,yBAAqD;AAG9D,SAA0B,kBAAkB,yBAAyB;AACrE,SAAwB,gBAAgB,uBAAuB;AAC/D,SAAoB,YAAY,mBAAmB;AACnD,SAAuB,eAAe,sBAAsB;AAC5D,SAAwB,gBAAgB,uBAAuB;AAOxD,MAAM,wBAAwB,KAAK;AAAA,EACxC,KAAK,OAAO;AAAA;AAAA,IAEV,OAAO,KAAK,OAAO;AAAA;AAAA,IAEnB,MAAM,KAAK,OAAO;AAAA;AAAA,IAElB,UAAU;AAAA;AAAA,IAEV,SAAS;AAAA;AAAA,IAET,YAAY;AAAA;AAAA,IAEZ,UAAU;AAAA;AAAA,IAEV,MAAM;AAAA;AAAA,IAEN,aAAa,KAAK,MAAM,KAAK,MAAM,kBAAkB,IAAI,CAAC,WAAW,KAAK,QAAQ,MAAM,CAAC,CAAC,CAAC;AAAA,EAC7F,CAAC;AACH;AAaO,MAAM,yBAAwD;AAAA,EACnE,OAAO;AAAA,EACP,MAAM;AAAA;AAAA;AAAA;AAAA,EAKN,UAAU;AAAA;AAAA;AAAA;AAAA,EAKV,SAAS;AAAA;AAAA;AAAA;AAAA,EAIT,YAAY;AAAA;AAAA;AAAA;AAAA,EAKZ,UAAU;AAAA;AAAA;AAAA;AAAA,EAKV,MAAM;AAAA;AAAA;AAAA;AAAA,EAKN,aAAa;AACf;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RequiredDeep } from 'type-fest
|
|
1
|
+
import type { RequiredDeep } from 'type-fest';
|
|
2
2
|
import type { ServerObject } from '../../schemas/v3.1/strict/server.js';
|
|
3
3
|
export declare const SettingsSchema: import("@scalar/typebox").TObject<{
|
|
4
4
|
proxyUrl: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
@@ -298,7 +298,7 @@ export declare const SettingsSchema: import("@scalar/typebox").TObject<{
|
|
|
298
298
|
'x-scalar-stability': import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"deprecated">, import("@scalar/typebox").TLiteral<"experimental">, import("@scalar/typebox").TLiteral<"stable">]>>;
|
|
299
299
|
}>]>;
|
|
300
300
|
SchemaObject: import("@scalar/typebox").TUnion<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
301
|
-
|
|
301
|
+
__scalar_: import("@scalar/typebox").TString;
|
|
302
302
|
}>, import("@scalar/typebox").TObject<{
|
|
303
303
|
name: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
304
304
|
title: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
@@ -1014,7 +1014,7 @@ export declare const SettingsSchema: import("@scalar/typebox").TObject<{
|
|
|
1014
1014
|
}>]>, import("@scalar/typebox").TObject<{
|
|
1015
1015
|
'$ref-value': import("@scalar/typebox").TRef<"ResponseObject">;
|
|
1016
1016
|
}>]>]>>;
|
|
1017
|
-
ParameterObject: import("@scalar/typebox").TUnion<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
1017
|
+
ParameterObject: import("@scalar/typebox").TUnion<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
1018
1018
|
name: import("@scalar/typebox").TString;
|
|
1019
1019
|
in: import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"query">, import("@scalar/typebox").TLiteral<"header">, import("@scalar/typebox").TLiteral<"path">, import("@scalar/typebox").TLiteral<"cookie">]>;
|
|
1020
1020
|
description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
@@ -1022,6 +1022,8 @@ export declare const SettingsSchema: import("@scalar/typebox").TObject<{
|
|
|
1022
1022
|
deprecated: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
1023
1023
|
allowEmptyValue: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
1024
1024
|
}>, import("@scalar/typebox").TObject<{
|
|
1025
|
+
'x-global': import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
1026
|
+
}>]>, import("@scalar/typebox").TObject<{
|
|
1025
1027
|
style: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
1026
1028
|
explode: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
1027
1029
|
schema: import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TRef<"SchemaObject">, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
@@ -1045,7 +1047,7 @@ export declare const SettingsSchema: import("@scalar/typebox").TObject<{
|
|
|
1045
1047
|
}>]>, import("@scalar/typebox").TObject<{
|
|
1046
1048
|
'$ref-value': import("@scalar/typebox").TRef<"ExampleObject">;
|
|
1047
1049
|
}>]>]>>>;
|
|
1048
|
-
}>]>, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
1050
|
+
}>]>, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
1049
1051
|
name: import("@scalar/typebox").TString;
|
|
1050
1052
|
in: import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"query">, import("@scalar/typebox").TLiteral<"header">, import("@scalar/typebox").TLiteral<"path">, import("@scalar/typebox").TLiteral<"cookie">]>;
|
|
1051
1053
|
description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
@@ -1053,14 +1055,18 @@ export declare const SettingsSchema: import("@scalar/typebox").TObject<{
|
|
|
1053
1055
|
deprecated: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
1054
1056
|
allowEmptyValue: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
1055
1057
|
}>, import("@scalar/typebox").TObject<{
|
|
1058
|
+
'x-global': import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
1059
|
+
}>]>, import("@scalar/typebox").TObject<{
|
|
1056
1060
|
content: import("@scalar/typebox").TOptional<import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TRef<"MediaTypeObject">>>;
|
|
1057
1061
|
}>]>]>;
|
|
1058
|
-
ExampleObject: import("@scalar/typebox").TObject<{
|
|
1062
|
+
ExampleObject: import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
1059
1063
|
summary: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
1060
1064
|
description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
1061
1065
|
value: import("@scalar/typebox").TOptional<import("@scalar/typebox").TAny>;
|
|
1062
1066
|
externalValue: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
1063
|
-
}
|
|
1067
|
+
}>, import("@scalar/typebox").TObject<{
|
|
1068
|
+
'x-disabled': import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
1069
|
+
}>]>;
|
|
1064
1070
|
RequestBodyObject: import("@scalar/typebox").TObject<{
|
|
1065
1071
|
description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
1066
1072
|
content: import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TRef<"MediaTypeObject">>;
|
|
@@ -1265,6 +1271,7 @@ export declare const SettingsSchema: import("@scalar/typebox").TObject<{
|
|
|
1265
1271
|
method: import("@scalar/typebox").TLiteral<import("@scalar/helpers/http/http-methods").HttpMethod>;
|
|
1266
1272
|
path: import("@scalar/typebox").TString;
|
|
1267
1273
|
isDeprecated: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
1274
|
+
children: import("@scalar/typebox").TOptional<import("@scalar/typebox").TArray<import("@scalar/typebox").TRef<"TraversedEntryObject">>>;
|
|
1268
1275
|
}>]>;
|
|
1269
1276
|
TraversedSchemaObject: import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
1270
1277
|
id: import("@scalar/typebox").TString;
|
|
@@ -1311,6 +1318,7 @@ export declare const SettingsSchema: import("@scalar/typebox").TObject<{
|
|
|
1311
1318
|
method: import("@scalar/typebox").TLiteral<import("@scalar/helpers/http/http-methods").HttpMethod>;
|
|
1312
1319
|
path: import("@scalar/typebox").TString;
|
|
1313
1320
|
isDeprecated: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
1321
|
+
children: import("@scalar/typebox").TOptional<import("@scalar/typebox").TArray<import("@scalar/typebox").TRef<"TraversedEntryObject">>>;
|
|
1314
1322
|
}>]>, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
1315
1323
|
id: import("@scalar/typebox").TString;
|
|
1316
1324
|
title: import("@scalar/typebox").TString;
|
|
@@ -1338,6 +1346,12 @@ export declare const SettingsSchema: import("@scalar/typebox").TObject<{
|
|
|
1338
1346
|
method: import("@scalar/typebox").TLiteral<import("@scalar/helpers/http/http-methods").HttpMethod>;
|
|
1339
1347
|
name: import("@scalar/typebox").TString;
|
|
1340
1348
|
isDeprecated: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
1349
|
+
}>]>, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
1350
|
+
id: import("@scalar/typebox").TString;
|
|
1351
|
+
title: import("@scalar/typebox").TString;
|
|
1352
|
+
}>, import("@scalar/typebox").TObject<{
|
|
1353
|
+
type: import("@scalar/typebox").TLiteral<"example">;
|
|
1354
|
+
name: import("@scalar/typebox").TString;
|
|
1341
1355
|
}>]>]>;
|
|
1342
1356
|
}, "ServerObject">>>;
|
|
1343
1357
|
baseServerUrl: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../src/schemas/reference-config/settings.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../src/schemas/reference-config/settings.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAG7C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAEhE,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;EAS1B,CAAA;AAED,MAAM,MAAM,QAAQ,GAAG;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,YAAY,EAAE,CAAA;IACxB,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,YAAY,CAAC,QAAQ,CAKlD,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/schemas/reference-config/settings.ts"],
|
|
4
|
-
"sourcesContent": ["import { Type } from '@scalar/typebox'\nimport type { RequiredDeep } from 'type-fest
|
|
4
|
+
"sourcesContent": ["import { Type } from '@scalar/typebox'\nimport type { RequiredDeep } from 'type-fest'\n\nimport { ServerObjectSchema } from '@/schemas/v3.1/strict/openapi-document'\nimport type { ServerObject } from '@/schemas/v3.1/strict/server'\n\nexport const SettingsSchema = Type.Partial(\n Type.Object({\n proxyUrl: Type.String(),\n searchKey: Type.String(),\n /** Array of server configurations */\n servers: Type.Array(ServerObjectSchema),\n /** Base server URL for API requests */\n baseServerUrl: Type.String(),\n }),\n)\n\nexport type Settings = {\n proxyUrl?: string\n searchKey?: string\n servers?: ServerObject[]\n baseServerUrl?: string\n}\n\nexport const defaultSettings: RequiredDeep<Settings> = {\n proxyUrl: 'https://proxy.scalar.com',\n searchKey: 'k',\n servers: [],\n baseServerUrl: '',\n}\n"],
|
|
5
5
|
"mappings": "AAAA,SAAS,YAAY;AAGrB,SAAS,0BAA0B;AAG5B,MAAM,iBAAiB,KAAK;AAAA,EACjC,KAAK,OAAO;AAAA,IACV,UAAU,KAAK,OAAO;AAAA,IACtB,WAAW,KAAK,OAAO;AAAA;AAAA,IAEvB,SAAS,KAAK,MAAM,kBAAkB;AAAA;AAAA,IAEtC,eAAe,KAAK,OAAO;AAAA,EAC7B,CAAC;AACH;AASO,MAAM,kBAA0C;AAAA,EACrD,UAAU;AAAA,EACV,WAAW;AAAA,EACX,SAAS,CAAC;AAAA,EACV,eAAe;AACjB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Examples allow demonstration of the usage of properties, parameters and objects within OpenAPI.
|
|
5
5
|
*/
|
|
6
|
-
export declare const ExampleObjectSchemaDefinition: import("@scalar/typebox").TObject<{
|
|
6
|
+
export declare const ExampleObjectSchemaDefinition: import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
7
7
|
/** Short description for the example. */
|
|
8
8
|
summary: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
9
9
|
/** Long description for the example. CommonMark syntax MAY be used for rich text representation. */
|
|
@@ -12,7 +12,9 @@ export declare const ExampleObjectSchemaDefinition: import("@scalar/typebox").TO
|
|
|
12
12
|
value: import("@scalar/typebox").TOptional<import("@scalar/typebox").TAny>;
|
|
13
13
|
/** A URI that identifies the literal example. This provides the capability to reference examples that cannot easily be included in JSON or YAML documents. The value field and externalValue field are mutually exclusive. See the rules for resolving Relative References. */
|
|
14
14
|
externalValue: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
15
|
-
}
|
|
15
|
+
}>, import("@scalar/typebox").TObject<{
|
|
16
|
+
'x-disabled': import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
17
|
+
}>]>;
|
|
16
18
|
/**
|
|
17
19
|
* An object grouping an internal or external example value with basic summary and description metadata. This object is typically used in fields named examples (plural), and is a referenceable alternative to older example (singular) fields that do not support referencing or metadata.
|
|
18
20
|
*
|
|
@@ -27,5 +29,14 @@ export type ExampleObject = {
|
|
|
27
29
|
value?: any;
|
|
28
30
|
/** A URI that identifies the literal example. This provides the capability to reference examples that cannot easily be included in JSON or YAML documents. The value field and externalValue field are mutually exclusive. See the rules for resolving Relative References. */
|
|
29
31
|
externalValue?: string;
|
|
32
|
+
/**
|
|
33
|
+
* OpenAPI extension to control whether a parameter example is enabled (checkbox on) or disabled (checkbox off).
|
|
34
|
+
*
|
|
35
|
+
* This extension is typically used in API tools to determine if a parameter (such as a header, query, or cookie)
|
|
36
|
+
* should be included in the request when sending an example. If `x-disabled: true`, the parameter example is considered
|
|
37
|
+
* "off" (checkbox unchecked) and will not be sent with the request. If `x-disabled: false` or omitted, the parameter
|
|
38
|
+
* example is "on" (checkbox checked) and will be sent.
|
|
39
|
+
*/
|
|
40
|
+
'x-disabled'?: boolean;
|
|
30
41
|
};
|
|
31
42
|
//# sourceMappingURL=example.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"example.d.ts","sourceRoot":"","sources":["../../../../src/schemas/v3.1/strict/example.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"example.d.ts","sourceRoot":"","sources":["../../../../src/schemas/v3.1/strict/example.ts"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,eAAO,MAAM,6BAA6B;IAEtC,yCAAyC;;IAEzC,oGAAoG;;IAEpG,6PAA6P;;IAE7P,+QAA+Q;;;;IAIlR,CAAA;AAED;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,yCAAyC;IACzC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,oGAAoG;IACpG,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,6PAA6P;IAC7P,KAAK,CAAC,EAAE,GAAG,CAAA;IACX,+QAA+Q;IAC/Q,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB,CAAA"}
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
import { Type } from "@scalar/typebox";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
import { compose } from "../../../schemas/compose.js";
|
|
3
|
+
import { XDisabled } from "../../../schemas/extensions/example/x-disabled.js";
|
|
4
|
+
const ExampleObjectSchemaDefinition = compose(
|
|
5
|
+
Type.Object({
|
|
6
|
+
/** Short description for the example. */
|
|
7
|
+
summary: Type.Optional(Type.String()),
|
|
8
|
+
/** Long description for the example. CommonMark syntax MAY be used for rich text representation. */
|
|
9
|
+
description: Type.Optional(Type.String()),
|
|
10
|
+
/** Embedded literal example. The value field and externalValue field are mutually exclusive. To represent examples of media types that cannot naturally represented in JSON or YAML, use a string value to contain the example, escaping where necessary. */
|
|
11
|
+
value: Type.Optional(Type.Any()),
|
|
12
|
+
/** A URI that identifies the literal example. This provides the capability to reference examples that cannot easily be included in JSON or YAML documents. The value field and externalValue field are mutually exclusive. See the rules for resolving Relative References. */
|
|
13
|
+
externalValue: Type.Optional(Type.String())
|
|
14
|
+
}),
|
|
15
|
+
XDisabled
|
|
16
|
+
);
|
|
12
17
|
export {
|
|
13
18
|
ExampleObjectSchemaDefinition
|
|
14
19
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/schemas/v3.1/strict/example.ts"],
|
|
4
|
-
"sourcesContent": ["import { Type } from '@scalar/typebox'\n\n/**\n * An object grouping an internal or external example value with basic summary and description metadata. This object is typically used in fields named examples (plural), and is a referenceable alternative to older example (singular) fields that do not support referencing or metadata.\n *\n * Examples allow demonstration of the usage of properties, parameters and objects within OpenAPI.\n */\nexport const ExampleObjectSchemaDefinition = Type.Object({\n
|
|
5
|
-
"mappings": "AAAA,SAAS,YAAY;
|
|
4
|
+
"sourcesContent": ["import { Type } from '@scalar/typebox'\n\nimport { compose } from '@/schemas/compose'\nimport { XDisabled } from '@/schemas/extensions/example/x-disabled'\n\n/**\n * An object grouping an internal or external example value with basic summary and description metadata. This object is typically used in fields named examples (plural), and is a referenceable alternative to older example (singular) fields that do not support referencing or metadata.\n *\n * Examples allow demonstration of the usage of properties, parameters and objects within OpenAPI.\n */\nexport const ExampleObjectSchemaDefinition = compose(\n Type.Object({\n /** Short description for the example. */\n summary: Type.Optional(Type.String()),\n /** Long description for the example. CommonMark syntax MAY be used for rich text representation. */\n description: Type.Optional(Type.String()),\n /** Embedded literal example. The value field and externalValue field are mutually exclusive. To represent examples of media types that cannot naturally represented in JSON or YAML, use a string value to contain the example, escaping where necessary. */\n value: Type.Optional(Type.Any()),\n /** A URI that identifies the literal example. This provides the capability to reference examples that cannot easily be included in JSON or YAML documents. The value field and externalValue field are mutually exclusive. See the rules for resolving Relative References. */\n externalValue: Type.Optional(Type.String()),\n }),\n XDisabled,\n)\n\n/**\n * An object grouping an internal or external example value with basic summary and description metadata. This object is typically used in fields named examples (plural), and is a referenceable alternative to older example (singular) fields that do not support referencing or metadata.\n *\n * Examples allow demonstration of the usage of properties, parameters and objects within OpenAPI.\n */\nexport type ExampleObject = {\n /** Short description for the example. */\n summary?: string\n /** Long description for the example. CommonMark syntax MAY be used for rich text representation. */\n description?: string\n /** Embedded literal example. The value field and externalValue field are mutually exclusive. To represent examples of media types that cannot naturally represented in JSON or YAML, use a string value to contain the example, escaping where necessary. */\n value?: any\n /** A URI that identifies the literal example. This provides the capability to reference examples that cannot easily be included in JSON or YAML documents. The value field and externalValue field are mutually exclusive. See the rules for resolving Relative References. */\n externalValue?: string\n /**\n * OpenAPI extension to control whether a parameter example is enabled (checkbox on) or disabled (checkbox off).\n *\n * This extension is typically used in API tools to determine if a parameter (such as a header, query, or cookie)\n * should be included in the request when sending an example. If `x-disabled: true`, the parameter example is considered\n * \"off\" (checkbox unchecked) and will not be sent with the request. If `x-disabled: false` or omitted, the parameter\n * example is \"on\" (checkbox checked) and will be sent.\n */\n 'x-disabled'?: boolean\n}\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,YAAY;AAErB,SAAS,eAAe;AACxB,SAAS,iBAAiB;AAOnB,MAAM,gCAAgC;AAAA,EAC3C,KAAK,OAAO;AAAA;AAAA,IAEV,SAAS,KAAK,SAAS,KAAK,OAAO,CAAC;AAAA;AAAA,IAEpC,aAAa,KAAK,SAAS,KAAK,OAAO,CAAC;AAAA;AAAA,IAExC,OAAO,KAAK,SAAS,KAAK,IAAI,CAAC;AAAA;AAAA,IAE/B,eAAe,KAAK,SAAS,KAAK,OAAO,CAAC;AAAA,EAC5C,CAAC;AAAA,EACD;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|