@scalar/workspace-store 0.17.1 → 0.18.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 +53 -0
- package/dist/client.d.ts +31 -19
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +267 -88
- package/dist/client.js.map +3 -3
- package/dist/events/bus.d.ts +96 -0
- package/dist/events/bus.d.ts.map +1 -0
- package/dist/events/bus.js +60 -0
- package/dist/events/bus.js.map +7 -0
- package/dist/events/definitions/analytics.d.ts +27 -0
- package/dist/events/definitions/analytics.d.ts.map +1 -0
- package/dist/events/definitions/analytics.js +1 -0
- package/dist/events/definitions/analytics.js.map +7 -0
- package/dist/events/definitions/auth.d.ts +30 -0
- package/dist/events/definitions/auth.d.ts.map +1 -0
- package/dist/events/definitions/auth.js +1 -0
- package/dist/events/definitions/auth.js.map +7 -0
- package/dist/events/definitions/common.d.ts +5 -0
- package/dist/events/definitions/common.d.ts.map +1 -0
- package/dist/events/definitions/common.js +1 -0
- package/dist/events/definitions/common.js.map +7 -0
- package/dist/events/definitions/document.d.ts +14 -0
- package/dist/events/definitions/document.d.ts.map +1 -0
- package/dist/events/definitions/document.js +1 -0
- package/dist/events/definitions/document.js.map +7 -0
- package/dist/events/definitions/environment.d.ts +37 -0
- package/dist/events/definitions/environment.d.ts.map +1 -0
- package/dist/events/definitions/environment.js +1 -0
- package/dist/events/definitions/environment.js.map +7 -0
- package/dist/events/definitions/index.d.ts +12 -0
- package/dist/events/definitions/index.d.ts.map +1 -0
- package/dist/events/definitions/index.js +1 -0
- package/dist/events/definitions/index.js.map +7 -0
- package/dist/events/definitions/meta.d.ts +17 -0
- package/dist/events/definitions/meta.d.ts.map +1 -0
- package/dist/events/definitions/meta.js +1 -0
- package/dist/events/definitions/meta.js.map +7 -0
- package/dist/events/definitions/operation.d.ts +11 -0
- package/dist/events/definitions/operation.d.ts.map +1 -0
- package/dist/events/definitions/operation.js +1 -0
- package/dist/events/definitions/operation.js.map +7 -0
- package/dist/events/definitions/server.d.ts +50 -0
- package/dist/events/definitions/server.d.ts.map +1 -0
- package/dist/events/definitions/server.js +1 -0
- package/dist/events/definitions/server.js.map +7 -0
- package/dist/events/definitions/ui.d.ts +52 -0
- package/dist/events/definitions/ui.d.ts.map +1 -0
- package/dist/events/definitions/ui.js +1 -0
- package/dist/events/definitions/ui.js.map +7 -0
- package/dist/events/index.d.ts +3 -1
- package/dist/events/index.d.ts.map +1 -1
- package/dist/events/index.js +3 -1
- package/dist/events/index.js.map +2 -2
- package/dist/events/listeners.d.ts +2 -1
- package/dist/events/listeners.d.ts.map +1 -1
- package/dist/events/listeners.js.map +2 -2
- package/dist/events/{definitions.d.ts → old-definitions.d.ts} +35 -11
- package/dist/events/old-definitions.d.ts.map +1 -0
- package/dist/events/{definitions.js → old-definitions.js} +1 -1
- package/dist/events/old-definitions.js.map +7 -0
- package/dist/helpers/debounce.d.ts +28 -0
- package/dist/helpers/debounce.d.ts.map +1 -0
- package/dist/helpers/debounce.js +31 -0
- package/dist/helpers/debounce.js.map +7 -0
- package/dist/helpers/detect-changes-proxy.d.ts +47 -0
- package/dist/helpers/detect-changes-proxy.d.ts.map +1 -0
- package/dist/helpers/detect-changes-proxy.js +59 -0
- package/dist/helpers/detect-changes-proxy.js.map +7 -0
- package/dist/helpers/overrides-proxy.d.ts +17 -6
- package/dist/helpers/overrides-proxy.d.ts.map +1 -1
- package/dist/helpers/overrides-proxy.js +33 -18
- package/dist/helpers/overrides-proxy.js.map +3 -3
- package/dist/helpers/unpack-proxy.d.ts +6 -0
- package/dist/helpers/unpack-proxy.d.ts.map +1 -0
- package/dist/helpers/unpack-proxy.js +9 -0
- package/dist/helpers/unpack-proxy.js.map +7 -0
- package/dist/mutators/environment.d.ts +21 -13
- package/dist/mutators/environment.d.ts.map +1 -1
- package/dist/mutators/environment.js +46 -25
- package/dist/mutators/environment.js.map +2 -2
- package/dist/mutators/index.d.ts +4 -12
- package/dist/mutators/index.d.ts.map +1 -1
- package/dist/mutators/index.js +7 -4
- package/dist/mutators/index.js.map +2 -2
- package/dist/navigation/get-navigation-options.d.ts +1 -1
- package/dist/navigation/get-navigation-options.d.ts.map +1 -1
- package/dist/navigation/get-navigation-options.js +66 -54
- package/dist/navigation/get-navigation-options.js.map +2 -2
- package/dist/navigation/helpers/get-tag.d.ts +7 -2
- package/dist/navigation/helpers/get-tag.d.ts.map +1 -1
- package/dist/navigation/helpers/get-tag.js +16 -2
- package/dist/navigation/helpers/get-tag.js.map +2 -2
- package/dist/navigation/helpers/traverse-description.d.ts +7 -2
- package/dist/navigation/helpers/traverse-description.d.ts.map +1 -1
- package/dist/navigation/helpers/traverse-description.js +24 -6
- package/dist/navigation/helpers/traverse-description.js.map +2 -2
- package/dist/navigation/helpers/traverse-document.d.ts +5 -2
- package/dist/navigation/helpers/traverse-document.d.ts.map +1 -1
- package/dist/navigation/helpers/traverse-document.js +53 -15
- package/dist/navigation/helpers/traverse-document.js.map +2 -2
- package/dist/navigation/helpers/traverse-paths.d.ts +9 -3
- package/dist/navigation/helpers/traverse-paths.d.ts.map +1 -1
- package/dist/navigation/helpers/traverse-paths.js +63 -9
- package/dist/navigation/helpers/traverse-paths.js.map +2 -2
- package/dist/navigation/helpers/traverse-schemas.d.ts +7 -8
- package/dist/navigation/helpers/traverse-schemas.d.ts.map +1 -1
- package/dist/navigation/helpers/traverse-schemas.js +35 -7
- package/dist/navigation/helpers/traverse-schemas.js.map +2 -2
- package/dist/navigation/helpers/traverse-tags.d.ts +8 -4
- package/dist/navigation/helpers/traverse-tags.d.ts.map +1 -1
- package/dist/navigation/helpers/traverse-tags.js +65 -17
- package/dist/navigation/helpers/traverse-tags.js.map +2 -2
- package/dist/navigation/helpers/traverse-webhooks.d.ts +9 -3
- package/dist/navigation/helpers/traverse-webhooks.d.ts.map +1 -1
- package/dist/navigation/helpers/traverse-webhooks.js +43 -17
- package/dist/navigation/helpers/traverse-webhooks.js.map +2 -2
- package/dist/navigation/types.d.ts +5 -24
- package/dist/navigation/types.d.ts.map +1 -1
- package/dist/persistence/index.d.ts +86 -0
- package/dist/persistence/index.d.ts.map +1 -0
- package/dist/persistence/index.js +196 -0
- package/dist/persistence/index.js.map +7 -0
- package/dist/persistence/indexdb.d.ts +87 -0
- package/dist/persistence/indexdb.d.ts.map +1 -0
- package/dist/persistence/indexdb.js +125 -0
- package/dist/persistence/indexdb.js.map +7 -0
- package/dist/{plugins.d.ts → plugins/bundler/index.d.ts} +1 -1
- package/dist/plugins/bundler/index.d.ts.map +1 -0
- package/dist/{plugins.js → plugins/bundler/index.js} +2 -2
- package/dist/{plugins.js.map → plugins/bundler/index.js.map} +1 -1
- package/dist/plugins/client/index.d.ts +3 -0
- package/dist/plugins/client/index.d.ts.map +1 -0
- package/dist/plugins/client/index.js +5 -0
- package/dist/plugins/client/index.js.map +7 -0
- package/dist/plugins/client/persistence.d.ts +13 -0
- package/dist/plugins/client/persistence.d.ts.map +1 -0
- package/dist/plugins/client/persistence.js +57 -0
- package/dist/plugins/client/persistence.js.map +7 -0
- package/dist/schemas/extensions/document/x-scalar-environments.d.ts +52 -0
- package/dist/schemas/extensions/document/x-scalar-environments.d.ts.map +1 -0
- package/dist/schemas/extensions/document/x-scalar-environments.js +25 -0
- package/dist/schemas/extensions/document/x-scalar-environments.js.map +7 -0
- package/dist/schemas/extensions/workspace/x-scalar-active-environment.d.ts +8 -0
- package/dist/schemas/extensions/workspace/x-scalar-active-environment.d.ts.map +1 -0
- package/dist/schemas/extensions/workspace/x-scalar-active-environment.js +8 -0
- package/dist/schemas/extensions/workspace/x-scalar-active-environment.js.map +7 -0
- package/dist/schemas/extensions.d.ts +1 -0
- package/dist/schemas/extensions.d.ts.map +1 -1
- package/dist/schemas/extensions.js +1 -0
- package/dist/schemas/extensions.js.map +2 -2
- package/dist/schemas/inmemory-workspace.d.ts +95 -28
- package/dist/schemas/inmemory-workspace.d.ts.map +1 -1
- package/dist/schemas/inmemory-workspace.js +1 -9
- package/dist/schemas/inmemory-workspace.js.map +2 -2
- package/dist/schemas/navigation.d.ts +128 -1
- package/dist/schemas/navigation.d.ts.map +1 -1
- package/dist/schemas/navigation.js +20 -1
- package/dist/schemas/navigation.js.map +2 -2
- package/dist/schemas/reference-config/index.d.ts +243 -206
- package/dist/schemas/reference-config/index.d.ts.map +1 -1
- package/dist/schemas/reference-config/index.js.map +2 -2
- package/dist/schemas/reference-config/settings.d.ts +45 -9
- package/dist/schemas/reference-config/settings.d.ts.map +1 -1
- package/dist/schemas/reference-config/settings.js +1 -1
- package/dist/schemas/reference-config/settings.js.map +1 -1
- package/dist/schemas/v3.1/strict/openapi-document.d.ts +1540 -311
- package/dist/schemas/v3.1/strict/openapi-document.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/openapi-document.js +20 -13
- package/dist/schemas/v3.1/strict/openapi-document.js.map +2 -2
- package/dist/schemas/v3.1/strict/parameter.d.ts +23 -1
- package/dist/schemas/v3.1/strict/parameter.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/parameter.js +5 -1
- package/dist/schemas/v3.1/strict/parameter.js.map +2 -2
- package/dist/schemas/v3.1/strict/ref-definitions.d.ts +2 -0
- package/dist/schemas/v3.1/strict/ref-definitions.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/ref-definitions.js +4 -1
- package/dist/schemas/v3.1/strict/ref-definitions.js.map +2 -2
- package/dist/schemas/workspace-specification/config.d.ts +46 -15
- package/dist/schemas/workspace-specification/config.d.ts.map +1 -1
- package/dist/schemas/workspace-specification/config.js.map +1 -1
- package/dist/schemas/workspace-specification/index.d.ts +48 -11
- package/dist/schemas/workspace-specification/index.d.ts.map +1 -1
- package/dist/schemas/workspace.d.ts +353 -85
- package/dist/schemas/workspace.d.ts.map +1 -1
- package/dist/schemas/workspace.js +19 -11
- package/dist/schemas/workspace.js.map +2 -2
- package/dist/server.d.ts +4 -3
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +7 -6
- package/dist/server.js.map +2 -2
- package/dist/workspace-plugin.d.ts +49 -0
- package/dist/workspace-plugin.d.ts.map +1 -0
- package/dist/workspace-plugin.js +1 -0
- package/dist/workspace-plugin.js.map +7 -0
- package/package.json +26 -9
- package/dist/events/definitions.d.ts.map +0 -1
- package/dist/events/definitions.js.map +0 -7
- package/dist/plugins.d.ts.map +0 -1
- package/dist/schemas/v3.1/strict/client-config-extensions/x-scalar-client-config-environments.d.ts +0 -33
- package/dist/schemas/v3.1/strict/client-config-extensions/x-scalar-client-config-environments.d.ts.map +0 -1
- package/dist/schemas/v3.1/strict/client-config-extensions/x-scalar-client-config-environments.js +0 -23
- package/dist/schemas/v3.1/strict/client-config-extensions/x-scalar-client-config-environments.js.map +0 -7
|
@@ -5,7 +5,8 @@ export declare const InMemoryWorkspaceSchema: import("@scalar/typebox").TObject<
|
|
|
5
5
|
"x-scalar-dark-mode": import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
6
6
|
"x-scalar-default-client": import("@scalar/typebox").TOptional<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">[]>>;
|
|
7
7
|
"x-scalar-active-document": import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
8
|
-
"x-scalar-theme": import("@scalar/typebox").TOptional<import("@scalar/typebox").
|
|
8
|
+
"x-scalar-theme": import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<import("@scalar/typebox").TLiteral<"default" | "alternate" | "moon" | "purple" | "solarized" | "bluePlanet" | "deepSpace" | "saturn" | "kepler" | "elysiajs" | "fastify" | "mars" | "laserwave" | "none">[]>>;
|
|
9
|
+
"x-scalar-sidebar-width": import("@scalar/typebox").TOptional<import("@scalar/typebox").TNumber>;
|
|
9
10
|
}>;
|
|
10
11
|
documentConfigs: import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TObject<{
|
|
11
12
|
'x-scalar-reference-config': import("@scalar/typebox").TOptional<import("@scalar/typebox").TObject<{
|
|
@@ -1034,6 +1035,10 @@ export declare const InMemoryWorkspaceSchema: import("@scalar/typebox").TObject<
|
|
|
1034
1035
|
allowEmptyValue: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
1035
1036
|
}>, import("@scalar/typebox").TObject<{
|
|
1036
1037
|
'x-global': import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
1038
|
+
}>, import("@scalar/typebox").TObject<{
|
|
1039
|
+
'x-internal': import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
1040
|
+
}>, import("@scalar/typebox").TObject<{
|
|
1041
|
+
'x-scalar-ignore': import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
1037
1042
|
}>]>, import("@scalar/typebox").TObject<{
|
|
1038
1043
|
style: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
1039
1044
|
explode: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
@@ -1067,6 +1072,10 @@ export declare const InMemoryWorkspaceSchema: import("@scalar/typebox").TObject<
|
|
|
1067
1072
|
allowEmptyValue: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
1068
1073
|
}>, import("@scalar/typebox").TObject<{
|
|
1069
1074
|
'x-global': import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
1075
|
+
}>, import("@scalar/typebox").TObject<{
|
|
1076
|
+
'x-internal': import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
1077
|
+
}>, import("@scalar/typebox").TObject<{
|
|
1078
|
+
'x-scalar-ignore': import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
1070
1079
|
}>]>, import("@scalar/typebox").TObject<{
|
|
1071
1080
|
content: import("@scalar/typebox").TOptional<import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TRef<"MediaTypeObject">>>;
|
|
1072
1081
|
}>]>]>;
|
|
@@ -1243,14 +1252,6 @@ export declare const InMemoryWorkspaceSchema: import("@scalar/typebox").TObject<
|
|
|
1243
1252
|
}>, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
1244
1253
|
'x-scalar-client-config-active-environment': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
1245
1254
|
'x-scalar-client-config-icon': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
1246
|
-
'x-scalar-client-config-environments': import("@scalar/typebox").TOptional<import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TObject<{
|
|
1247
|
-
description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
1248
|
-
color: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
1249
|
-
variables: import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TUnion<[import("@scalar/typebox").TObject<{
|
|
1250
|
-
description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
1251
|
-
default: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
1252
|
-
}>, import("@scalar/typebox").TString]>>;
|
|
1253
|
-
}>>>;
|
|
1254
1255
|
'x-scalar-client-config-cookies': import("@scalar/typebox").TOptional<import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TObject<{
|
|
1255
1256
|
name: import("@scalar/typebox").TString;
|
|
1256
1257
|
value: import("@scalar/typebox").TString;
|
|
@@ -1259,12 +1260,28 @@ export declare const InMemoryWorkspaceSchema: import("@scalar/typebox").TObject<
|
|
|
1259
1260
|
}>>>;
|
|
1260
1261
|
'x-original-oas-version': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
1261
1262
|
'x-scalar-selected-security': import("@scalar/typebox").TOptional<import("@scalar/typebox").TArray<import("@scalar/typebox").TRef<"SecurityRequirementObject">>>;
|
|
1262
|
-
|
|
1263
|
+
'x-scalar-original-source-url': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
1264
|
+
'x-scalar-watch-mode': import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
1265
|
+
"x-scalar-navigation": import("@scalar/typebox").TOptional<import("@scalar/typebox").TRef<"TraversedDocumentObject">>;
|
|
1263
1266
|
}>, import("@scalar/typebox").TObject<{
|
|
1264
1267
|
'x-tagGroups': import("@scalar/typebox").TOptional<import("@scalar/typebox").TArray<import("@scalar/typebox").TObject<{
|
|
1265
1268
|
name: import("@scalar/typebox").TString;
|
|
1266
1269
|
tags: import("@scalar/typebox").TArray<import("@scalar/typebox").TString>;
|
|
1267
1270
|
}>>>;
|
|
1271
|
+
}>, import("@scalar/typebox").TObject<{
|
|
1272
|
+
'x-scalar-environments': import("@scalar/typebox").TOptional<import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TObject<{
|
|
1273
|
+
description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
1274
|
+
color: import("@scalar/typebox").TString;
|
|
1275
|
+
variables: import("@scalar/typebox").TArray<import("@scalar/typebox").TObject<{
|
|
1276
|
+
name: import("@scalar/typebox").TString;
|
|
1277
|
+
value: import("@scalar/typebox").TUnion<[import("@scalar/typebox").TObject<{
|
|
1278
|
+
description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
1279
|
+
default: import("@scalar/typebox").TString;
|
|
1280
|
+
}>, import("@scalar/typebox").TString]>;
|
|
1281
|
+
}>>;
|
|
1282
|
+
}>>>;
|
|
1283
|
+
}>, import("@scalar/typebox").TObject<{
|
|
1284
|
+
'x-scalar-original-document-hash': import("@scalar/typebox").TString;
|
|
1268
1285
|
}>]>]>;
|
|
1269
1286
|
TraversedDescriptionObject: import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
1270
1287
|
id: import("@scalar/typebox").TString;
|
|
@@ -1363,7 +1380,27 @@ export declare const InMemoryWorkspaceSchema: import("@scalar/typebox").TObject<
|
|
|
1363
1380
|
}>, import("@scalar/typebox").TObject<{
|
|
1364
1381
|
type: import("@scalar/typebox").TLiteral<"example">;
|
|
1365
1382
|
name: import("@scalar/typebox").TString;
|
|
1383
|
+
}>]>, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
1384
|
+
id: import("@scalar/typebox").TString;
|
|
1385
|
+
title: import("@scalar/typebox").TString;
|
|
1386
|
+
}>, import("@scalar/typebox").TObject<{
|
|
1387
|
+
type: import("@scalar/typebox").TLiteral<"document">;
|
|
1388
|
+
children: import("@scalar/typebox").TOptional<import("@scalar/typebox").TArray<import("@scalar/typebox").TRef<"TraversedEntryObject">>>;
|
|
1389
|
+
}>]>, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
1390
|
+
id: import("@scalar/typebox").TString;
|
|
1391
|
+
title: import("@scalar/typebox").TString;
|
|
1392
|
+
}>, import("@scalar/typebox").TObject<{
|
|
1393
|
+
type: import("@scalar/typebox").TLiteral<"models">;
|
|
1394
|
+
name: import("@scalar/typebox").TString;
|
|
1395
|
+
children: import("@scalar/typebox").TOptional<import("@scalar/typebox").TArray<import("@scalar/typebox").TRef<"TraversedEntryObject">>>;
|
|
1366
1396
|
}>]>]>;
|
|
1397
|
+
TraversedDocumentObject: import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
1398
|
+
id: import("@scalar/typebox").TString;
|
|
1399
|
+
title: import("@scalar/typebox").TString;
|
|
1400
|
+
}>, import("@scalar/typebox").TObject<{
|
|
1401
|
+
type: import("@scalar/typebox").TLiteral<"document">;
|
|
1402
|
+
children: import("@scalar/typebox").TOptional<import("@scalar/typebox").TArray<import("@scalar/typebox").TRef<"TraversedEntryObject">>>;
|
|
1403
|
+
}>]>;
|
|
1367
1404
|
}, "ServerObject">>>;
|
|
1368
1405
|
baseServerUrl: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
1369
1406
|
}>>;
|
|
@@ -1399,7 +1436,7 @@ export declare const InMemoryWorkspaceSchema: import("@scalar/typebox").TObject<
|
|
|
1399
1436
|
ogImage: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
1400
1437
|
twitterCard: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
1401
1438
|
}>>;
|
|
1402
|
-
httpClients: import("@scalar/typebox").TOptional<import("@scalar/typebox").TArray<import("@scalar/typebox").
|
|
1439
|
+
httpClients: import("@scalar/typebox").TOptional<import("@scalar/typebox").TArray<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">>>;
|
|
1403
1440
|
}>>;
|
|
1404
1441
|
}>>;
|
|
1405
1442
|
documents: import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
@@ -2425,6 +2462,10 @@ export declare const InMemoryWorkspaceSchema: import("@scalar/typebox").TObject<
|
|
|
2425
2462
|
allowEmptyValue: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
2426
2463
|
}>, import("@scalar/typebox").TObject<{
|
|
2427
2464
|
'x-global': import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
2465
|
+
}>, import("@scalar/typebox").TObject<{
|
|
2466
|
+
'x-internal': import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
2467
|
+
}>, import("@scalar/typebox").TObject<{
|
|
2468
|
+
'x-scalar-ignore': import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
2428
2469
|
}>]>, import("@scalar/typebox").TObject<{
|
|
2429
2470
|
style: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
2430
2471
|
explode: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
@@ -2458,6 +2499,10 @@ export declare const InMemoryWorkspaceSchema: import("@scalar/typebox").TObject<
|
|
|
2458
2499
|
allowEmptyValue: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
2459
2500
|
}>, import("@scalar/typebox").TObject<{
|
|
2460
2501
|
'x-global': import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
2502
|
+
}>, import("@scalar/typebox").TObject<{
|
|
2503
|
+
'x-internal': import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
2504
|
+
}>, import("@scalar/typebox").TObject<{
|
|
2505
|
+
'x-scalar-ignore': import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
2461
2506
|
}>]>, import("@scalar/typebox").TObject<{
|
|
2462
2507
|
content: import("@scalar/typebox").TOptional<import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TRef<"MediaTypeObject">>>;
|
|
2463
2508
|
}>]>]>;
|
|
@@ -2634,14 +2679,6 @@ export declare const InMemoryWorkspaceSchema: import("@scalar/typebox").TObject<
|
|
|
2634
2679
|
}>, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
2635
2680
|
'x-scalar-client-config-active-environment': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
2636
2681
|
'x-scalar-client-config-icon': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
2637
|
-
'x-scalar-client-config-environments': import("@scalar/typebox").TOptional<import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TObject<{
|
|
2638
|
-
description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
2639
|
-
color: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
2640
|
-
variables: import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TUnion<[import("@scalar/typebox").TObject<{
|
|
2641
|
-
description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
2642
|
-
default: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
2643
|
-
}>, import("@scalar/typebox").TString]>>;
|
|
2644
|
-
}>>>;
|
|
2645
2682
|
'x-scalar-client-config-cookies': import("@scalar/typebox").TOptional<import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TObject<{
|
|
2646
2683
|
name: import("@scalar/typebox").TString;
|
|
2647
2684
|
value: import("@scalar/typebox").TString;
|
|
@@ -2650,12 +2687,28 @@ export declare const InMemoryWorkspaceSchema: import("@scalar/typebox").TObject<
|
|
|
2650
2687
|
}>>>;
|
|
2651
2688
|
'x-original-oas-version': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
2652
2689
|
'x-scalar-selected-security': import("@scalar/typebox").TOptional<import("@scalar/typebox").TArray<import("@scalar/typebox").TRef<"SecurityRequirementObject">>>;
|
|
2653
|
-
|
|
2690
|
+
'x-scalar-original-source-url': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
2691
|
+
'x-scalar-watch-mode': import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
2692
|
+
"x-scalar-navigation": import("@scalar/typebox").TOptional<import("@scalar/typebox").TRef<"TraversedDocumentObject">>;
|
|
2654
2693
|
}>, import("@scalar/typebox").TObject<{
|
|
2655
2694
|
'x-tagGroups': import("@scalar/typebox").TOptional<import("@scalar/typebox").TArray<import("@scalar/typebox").TObject<{
|
|
2656
2695
|
name: import("@scalar/typebox").TString;
|
|
2657
2696
|
tags: import("@scalar/typebox").TArray<import("@scalar/typebox").TString>;
|
|
2658
2697
|
}>>>;
|
|
2698
|
+
}>, import("@scalar/typebox").TObject<{
|
|
2699
|
+
'x-scalar-environments': import("@scalar/typebox").TOptional<import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TObject<{
|
|
2700
|
+
description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
2701
|
+
color: import("@scalar/typebox").TString;
|
|
2702
|
+
variables: import("@scalar/typebox").TArray<import("@scalar/typebox").TObject<{
|
|
2703
|
+
name: import("@scalar/typebox").TString;
|
|
2704
|
+
value: import("@scalar/typebox").TUnion<[import("@scalar/typebox").TObject<{
|
|
2705
|
+
description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
2706
|
+
default: import("@scalar/typebox").TString;
|
|
2707
|
+
}>, import("@scalar/typebox").TString]>;
|
|
2708
|
+
}>>;
|
|
2709
|
+
}>>>;
|
|
2710
|
+
}>, import("@scalar/typebox").TObject<{
|
|
2711
|
+
'x-scalar-original-document-hash': import("@scalar/typebox").TString;
|
|
2659
2712
|
}>]>]>;
|
|
2660
2713
|
TraversedDescriptionObject: import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
2661
2714
|
id: import("@scalar/typebox").TString;
|
|
@@ -2754,24 +2807,38 @@ export declare const InMemoryWorkspaceSchema: import("@scalar/typebox").TObject<
|
|
|
2754
2807
|
}>, import("@scalar/typebox").TObject<{
|
|
2755
2808
|
type: import("@scalar/typebox").TLiteral<"example">;
|
|
2756
2809
|
name: import("@scalar/typebox").TString;
|
|
2810
|
+
}>]>, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
2811
|
+
id: import("@scalar/typebox").TString;
|
|
2812
|
+
title: import("@scalar/typebox").TString;
|
|
2813
|
+
}>, import("@scalar/typebox").TObject<{
|
|
2814
|
+
type: import("@scalar/typebox").TLiteral<"document">;
|
|
2815
|
+
children: import("@scalar/typebox").TOptional<import("@scalar/typebox").TArray<import("@scalar/typebox").TRef<"TraversedEntryObject">>>;
|
|
2816
|
+
}>]>, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
2817
|
+
id: import("@scalar/typebox").TString;
|
|
2818
|
+
title: import("@scalar/typebox").TString;
|
|
2819
|
+
}>, import("@scalar/typebox").TObject<{
|
|
2820
|
+
type: import("@scalar/typebox").TLiteral<"models">;
|
|
2821
|
+
name: import("@scalar/typebox").TString;
|
|
2822
|
+
children: import("@scalar/typebox").TOptional<import("@scalar/typebox").TArray<import("@scalar/typebox").TRef<"TraversedEntryObject">>>;
|
|
2757
2823
|
}>]>]>;
|
|
2824
|
+
TraversedDocumentObject: import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
2825
|
+
id: import("@scalar/typebox").TString;
|
|
2826
|
+
title: import("@scalar/typebox").TString;
|
|
2827
|
+
}>, import("@scalar/typebox").TObject<{
|
|
2828
|
+
type: import("@scalar/typebox").TLiteral<"document">;
|
|
2829
|
+
children: import("@scalar/typebox").TOptional<import("@scalar/typebox").TArray<import("@scalar/typebox").TRef<"TraversedEntryObject">>>;
|
|
2830
|
+
}>]>;
|
|
2758
2831
|
}, "OpenApiDocument">]>>;
|
|
2759
2832
|
originalDocuments: import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TUnknown>>;
|
|
2760
2833
|
intermediateDocuments: import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TUnknown>>;
|
|
2761
2834
|
overrides: import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TAny>;
|
|
2762
|
-
documentMeta: import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TObject<{
|
|
2763
|
-
documentSource: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
2764
|
-
}>>;
|
|
2765
2835
|
}>;
|
|
2766
2836
|
export type InMemoryWorkspace = {
|
|
2767
2837
|
meta: WorkspaceMeta;
|
|
2768
2838
|
documentConfigs: Record<string, Config>;
|
|
2769
2839
|
documents: Record<string, WorkspaceDocument>;
|
|
2770
|
-
originalDocuments: Record<string, unknown
|
|
2771
|
-
intermediateDocuments: Record<string, unknown
|
|
2840
|
+
originalDocuments: Record<string, Record<string, unknown>>;
|
|
2841
|
+
intermediateDocuments: Record<string, Record<string, unknown>>;
|
|
2772
2842
|
overrides: Record<string, any>;
|
|
2773
|
-
documentMeta: Record<string, {
|
|
2774
|
-
documentSource?: string;
|
|
2775
|
-
}>;
|
|
2776
2843
|
};
|
|
2777
2844
|
//# sourceMappingURL=inmemory-workspace.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inmemory-workspace.d.ts","sourceRoot":"","sources":["../../src/schemas/inmemory-workspace.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,iBAAiB,EAEtB,KAAK,aAAa,EAEnB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,0CAA0C,CAAA;AAIpF,eAAO,MAAM,uBAAuB
|
|
1
|
+
{"version":3,"file":"inmemory-workspace.d.ts","sourceR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;IACnB,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACvC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAA;IAC5C,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAA;IAC1D,qBAAqB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAA;IAC9D,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAC/B,CAAA"}
|
|
@@ -11,15 +11,7 @@ const InMemoryWorkspaceSchema = Type.Object({
|
|
|
11
11
|
documents: Type.Record(Type.String(), WorkspaceDocumentSchema),
|
|
12
12
|
originalDocuments: Type.Record(Type.String(), UnknownObjectSchema),
|
|
13
13
|
intermediateDocuments: Type.Record(Type.String(), UnknownObjectSchema),
|
|
14
|
-
overrides: Type.Record(Type.String(), Type.Any())
|
|
15
|
-
documentMeta: Type.Record(
|
|
16
|
-
Type.String(),
|
|
17
|
-
Type.Partial(
|
|
18
|
-
Type.Object({
|
|
19
|
-
documentSource: Type.Optional(Type.String())
|
|
20
|
-
})
|
|
21
|
-
)
|
|
22
|
-
)
|
|
14
|
+
overrides: Type.Record(Type.String(), Type.Any())
|
|
23
15
|
});
|
|
24
16
|
export {
|
|
25
17
|
InMemoryWorkspaceSchema
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/schemas/inmemory-workspace.ts"],
|
|
4
|
-
"sourcesContent": ["import { Type } from '@scalar/typebox'\n\nimport {\n type WorkspaceDocument,\n WorkspaceDocumentSchema,\n type WorkspaceMeta,\n WorkspaceMetaSchema,\n} from '@/schemas/workspace'\nimport { type Config, ConfigSchema } from '@/schemas/workspace-specification/config'\n\nconst UnknownObjectSchema = Type.Record(Type.String(), Type.Unknown())\n\nexport const InMemoryWorkspaceSchema = Type.Object({\n meta: WorkspaceMetaSchema,\n documentConfigs: Type.Record(Type.String(), ConfigSchema),\n documents: Type.Record(Type.String(), WorkspaceDocumentSchema),\n originalDocuments: Type.Record(Type.String(), UnknownObjectSchema),\n intermediateDocuments: Type.Record(Type.String(), UnknownObjectSchema),\n overrides: Type.Record(Type.String(), Type.Any()),\n
|
|
5
|
-
"mappings": "AAAA,SAAS,YAAY;AAErB;AAAA,EAEE;AAAA,EAEA;AAAA,OACK;AACP,SAAsB,oBAAoB;AAE1C,MAAM,sBAAsB,KAAK,OAAO,KAAK,OAAO,GAAG,KAAK,QAAQ,CAAC;AAE9D,MAAM,0BAA0B,KAAK,OAAO;AAAA,EACjD,MAAM;AAAA,EACN,iBAAiB,KAAK,OAAO,KAAK,OAAO,GAAG,YAAY;AAAA,EACxD,WAAW,KAAK,OAAO,KAAK,OAAO,GAAG,uBAAuB;AAAA,EAC7D,mBAAmB,KAAK,OAAO,KAAK,OAAO,GAAG,mBAAmB;AAAA,EACjE,uBAAuB,KAAK,OAAO,KAAK,OAAO,GAAG,mBAAmB;AAAA,EACrE,WAAW,KAAK,OAAO,KAAK,OAAO,GAAG,KAAK,IAAI,CAAC;
|
|
4
|
+
"sourcesContent": ["import { Type } from '@scalar/typebox'\n\nimport {\n type WorkspaceDocument,\n WorkspaceDocumentSchema,\n type WorkspaceMeta,\n WorkspaceMetaSchema,\n} from '@/schemas/workspace'\nimport { type Config, ConfigSchema } from '@/schemas/workspace-specification/config'\n\nconst UnknownObjectSchema = Type.Record(Type.String(), Type.Unknown())\n\nexport const InMemoryWorkspaceSchema = Type.Object({\n meta: WorkspaceMetaSchema,\n documentConfigs: Type.Record(Type.String(), ConfigSchema),\n documents: Type.Record(Type.String(), WorkspaceDocumentSchema),\n originalDocuments: Type.Record(Type.String(), UnknownObjectSchema),\n intermediateDocuments: Type.Record(Type.String(), UnknownObjectSchema),\n overrides: Type.Record(Type.String(), Type.Any()),\n})\n\nexport type InMemoryWorkspace = {\n meta: WorkspaceMeta\n documentConfigs: Record<string, Config>\n documents: Record<string, WorkspaceDocument>\n originalDocuments: Record<string, Record<string, unknown>>\n intermediateDocuments: Record<string, Record<string, unknown>>\n overrides: Record<string, any>\n}\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,YAAY;AAErB;AAAA,EAEE;AAAA,EAEA;AAAA,OACK;AACP,SAAsB,oBAAoB;AAE1C,MAAM,sBAAsB,KAAK,OAAO,KAAK,OAAO,GAAG,KAAK,QAAQ,CAAC;AAE9D,MAAM,0BAA0B,KAAK,OAAO;AAAA,EACjD,MAAM;AAAA,EACN,iBAAiB,KAAK,OAAO,KAAK,OAAO,GAAG,YAAY;AAAA,EACxD,WAAW,KAAK,OAAO,KAAK,OAAO,GAAG,uBAAuB;AAAA,EAC7D,mBAAmB,KAAK,OAAO,KAAK,OAAO,GAAG,mBAAmB;AAAA,EACjE,uBAAuB,KAAK,OAAO,KAAK,OAAO,GAAG,mBAAmB;AAAA,EACrE,WAAW,KAAK,OAAO,KAAK,OAAO,GAAG,KAAK,IAAI,CAAC;AAClD,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,13 +1,39 @@
|
|
|
1
1
|
import { type HttpMethod } from '@scalar/helpers/http/http-methods';
|
|
2
2
|
import { type TLiteral } from '@scalar/typebox';
|
|
3
|
+
import type { InfoObject } from '../schemas/v3.1/strict/info.js';
|
|
4
|
+
import type { OperationObject } from '../schemas/v3.1/strict/operation.js';
|
|
5
|
+
import type { SchemaObject } from '../schemas/v3.1/strict/schema.js';
|
|
6
|
+
import type { TagObject } from '../schemas/v3.1/strict/tag.js';
|
|
3
7
|
export declare const NavigationBaseSchemaDefinition: import("@scalar/typebox").TObject<{
|
|
4
8
|
id: import("@scalar/typebox").TString;
|
|
5
9
|
title: import("@scalar/typebox").TString;
|
|
6
10
|
}>;
|
|
7
11
|
type BaseSchema = {
|
|
12
|
+
/**
|
|
13
|
+
* The unique identifier for the entry
|
|
14
|
+
*
|
|
15
|
+
* Must be unique across the entire navigation structure.
|
|
16
|
+
*/
|
|
8
17
|
id: string;
|
|
18
|
+
/** The user readable title of the entry */
|
|
9
19
|
title: string;
|
|
10
20
|
};
|
|
21
|
+
export declare const TraversedDocumentSchemaDefinition: import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
22
|
+
id: import("@scalar/typebox").TString;
|
|
23
|
+
title: import("@scalar/typebox").TString;
|
|
24
|
+
}>, import("@scalar/typebox").TObject<{
|
|
25
|
+
type: TLiteral<"document">;
|
|
26
|
+
children: import("@scalar/typebox").TOptional<import("@scalar/typebox").TArray<import("@scalar/typebox").TRef<"TraversedEntryObject">>>;
|
|
27
|
+
}>]>;
|
|
28
|
+
/**
|
|
29
|
+
* An entry representing an OpenAPI in the navigation structure.
|
|
30
|
+
*
|
|
31
|
+
* Used in the client to represent the root document and its operations or tags.
|
|
32
|
+
*/
|
|
33
|
+
export type TraversedDocument = BaseSchema & {
|
|
34
|
+
type: 'document';
|
|
35
|
+
children?: TraversedEntry[];
|
|
36
|
+
};
|
|
11
37
|
export declare const TraversedDescriptionSchemaDefinition: import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
12
38
|
id: import("@scalar/typebox").TString;
|
|
13
39
|
title: import("@scalar/typebox").TString;
|
|
@@ -15,6 +41,9 @@ export declare const TraversedDescriptionSchemaDefinition: import("@scalar/typeb
|
|
|
15
41
|
type: TLiteral<"text">;
|
|
16
42
|
children: import("@scalar/typebox").TOptional<import("@scalar/typebox").TArray<import("@scalar/typebox").TRef<"TraversedEntryObject">>>;
|
|
17
43
|
}>]>;
|
|
44
|
+
/**
|
|
45
|
+
* An entry representing a markdown description in the navigation structure.
|
|
46
|
+
*/
|
|
18
47
|
export type TraversedDescription = BaseSchema & {
|
|
19
48
|
type: 'text';
|
|
20
49
|
children?: TraversedEntry[];
|
|
@@ -26,6 +55,9 @@ export declare const TraversedExampleSchemaDefinition: import("@scalar/typebox")
|
|
|
26
55
|
type: TLiteral<"example">;
|
|
27
56
|
name: import("@scalar/typebox").TString;
|
|
28
57
|
}>]>;
|
|
58
|
+
/**
|
|
59
|
+
* An entry representing an operation example in the navigation structure.
|
|
60
|
+
*/
|
|
29
61
|
export type TraversedExample = BaseSchema & {
|
|
30
62
|
type: 'example';
|
|
31
63
|
name: string;
|
|
@@ -41,6 +73,9 @@ export declare const TraversedOperationSchemaDefinition: import("@scalar/typebox
|
|
|
41
73
|
isDeprecated: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
42
74
|
children: import("@scalar/typebox").TOptional<import("@scalar/typebox").TArray<import("@scalar/typebox").TRef<"TraversedEntryObject">>>;
|
|
43
75
|
}>]>;
|
|
76
|
+
/**
|
|
77
|
+
* An entry representing an operation in the navigation structure.
|
|
78
|
+
*/
|
|
44
79
|
export type TraversedOperation = BaseSchema & {
|
|
45
80
|
type: 'operation';
|
|
46
81
|
ref: string;
|
|
@@ -57,6 +92,9 @@ export declare const TraversedSchemaSchemaDefinition: import("@scalar/typebox").
|
|
|
57
92
|
ref: import("@scalar/typebox").TString;
|
|
58
93
|
name: import("@scalar/typebox").TString;
|
|
59
94
|
}>]>;
|
|
95
|
+
/**
|
|
96
|
+
* An entry representing a model in the navigation structure.
|
|
97
|
+
*/
|
|
60
98
|
export type TraversedSchema = BaseSchema & {
|
|
61
99
|
type: 'model';
|
|
62
100
|
ref: string;
|
|
@@ -72,6 +110,9 @@ export declare const TraversedWebhookSchemaDefinition: import("@scalar/typebox")
|
|
|
72
110
|
name: import("@scalar/typebox").TString;
|
|
73
111
|
isDeprecated: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
74
112
|
}>]>;
|
|
113
|
+
/**
|
|
114
|
+
* An entry representing a webhook in the navigation structure.
|
|
115
|
+
*/
|
|
75
116
|
export type TraversedWebhook = BaseSchema & {
|
|
76
117
|
type: 'webhook';
|
|
77
118
|
ref: string;
|
|
@@ -91,6 +132,11 @@ export declare const TraversedTagSchemaDefinition: import("@scalar/typebox").TIn
|
|
|
91
132
|
isWebhooks: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
92
133
|
xKeys: import("@scalar/typebox").TOptional<import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TUnknown>>;
|
|
93
134
|
}>]>;
|
|
135
|
+
/**
|
|
136
|
+
* An entry representing a tag in the navigation structure.
|
|
137
|
+
*
|
|
138
|
+
* Used to group operations or webhooks under a common heading.
|
|
139
|
+
*/
|
|
94
140
|
export type TraversedTag = BaseSchema & {
|
|
95
141
|
type: 'tag';
|
|
96
142
|
name: string;
|
|
@@ -100,6 +146,22 @@ export type TraversedTag = BaseSchema & {
|
|
|
100
146
|
isWebhooks?: boolean;
|
|
101
147
|
xKeys?: Record<string, unknown>;
|
|
102
148
|
};
|
|
149
|
+
export declare const TraversedModelsSchemaDefinition: import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
150
|
+
id: import("@scalar/typebox").TString;
|
|
151
|
+
title: import("@scalar/typebox").TString;
|
|
152
|
+
}>, import("@scalar/typebox").TObject<{
|
|
153
|
+
type: TLiteral<"models">;
|
|
154
|
+
name: import("@scalar/typebox").TString;
|
|
155
|
+
children: import("@scalar/typebox").TOptional<import("@scalar/typebox").TArray<import("@scalar/typebox").TRef<"TraversedEntryObject">>>;
|
|
156
|
+
}>]>;
|
|
157
|
+
/**
|
|
158
|
+
* Top level models navigation entry.
|
|
159
|
+
*/
|
|
160
|
+
export type TraversedModels = BaseSchema & {
|
|
161
|
+
type: 'models';
|
|
162
|
+
name: string;
|
|
163
|
+
children?: TraversedEntry[];
|
|
164
|
+
};
|
|
103
165
|
export declare const TraversedEntrySchemaDefinition: import("@scalar/typebox").TUnion<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
104
166
|
id: import("@scalar/typebox").TString;
|
|
105
167
|
title: import("@scalar/typebox").TString;
|
|
@@ -149,7 +211,72 @@ export declare const TraversedEntrySchemaDefinition: import("@scalar/typebox").T
|
|
|
149
211
|
}>, import("@scalar/typebox").TObject<{
|
|
150
212
|
type: TLiteral<"example">;
|
|
151
213
|
name: import("@scalar/typebox").TString;
|
|
214
|
+
}>]>, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
215
|
+
id: import("@scalar/typebox").TString;
|
|
216
|
+
title: import("@scalar/typebox").TString;
|
|
217
|
+
}>, import("@scalar/typebox").TObject<{
|
|
218
|
+
type: TLiteral<"document">;
|
|
219
|
+
children: import("@scalar/typebox").TOptional<import("@scalar/typebox").TArray<import("@scalar/typebox").TRef<"TraversedEntryObject">>>;
|
|
220
|
+
}>]>, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
221
|
+
id: import("@scalar/typebox").TString;
|
|
222
|
+
title: import("@scalar/typebox").TString;
|
|
223
|
+
}>, import("@scalar/typebox").TObject<{
|
|
224
|
+
type: TLiteral<"models">;
|
|
225
|
+
name: import("@scalar/typebox").TString;
|
|
226
|
+
children: import("@scalar/typebox").TOptional<import("@scalar/typebox").TArray<import("@scalar/typebox").TRef<"TraversedEntryObject">>>;
|
|
152
227
|
}>]>]>;
|
|
153
|
-
export type TraversedEntry = TraversedDescription | TraversedOperation | TraversedSchema | TraversedTag | TraversedWebhook | TraversedExample;
|
|
228
|
+
export type TraversedEntry = TraversedDescription | TraversedOperation | TraversedSchema | TraversedTag | TraversedWebhook | TraversedExample | TraversedDocument | TraversedModels;
|
|
229
|
+
export type DocumentIdProps = {
|
|
230
|
+
name: string;
|
|
231
|
+
info: InfoObject;
|
|
232
|
+
type: 'document';
|
|
233
|
+
};
|
|
234
|
+
type DescriptionIdProps = {
|
|
235
|
+
info: InfoObject;
|
|
236
|
+
type: 'text';
|
|
237
|
+
slug?: string;
|
|
238
|
+
depth?: number;
|
|
239
|
+
value: string;
|
|
240
|
+
parentId: string;
|
|
241
|
+
};
|
|
242
|
+
export type ParentTag = {
|
|
243
|
+
tag: TagObject;
|
|
244
|
+
id: string;
|
|
245
|
+
};
|
|
246
|
+
type TagProps = {
|
|
247
|
+
parentId: string;
|
|
248
|
+
tag: TagObject;
|
|
249
|
+
type: 'tag';
|
|
250
|
+
};
|
|
251
|
+
type OperationProps = {
|
|
252
|
+
parentId: string;
|
|
253
|
+
operation: OperationObject;
|
|
254
|
+
path: string;
|
|
255
|
+
method: string;
|
|
256
|
+
type: 'operation';
|
|
257
|
+
parentTag: ParentTag;
|
|
258
|
+
};
|
|
259
|
+
type WebhookProps = {
|
|
260
|
+
parentId: string;
|
|
261
|
+
webhook?: OperationObject;
|
|
262
|
+
name: string;
|
|
263
|
+
method?: string;
|
|
264
|
+
type: 'webhook';
|
|
265
|
+
parentTag?: ParentTag;
|
|
266
|
+
};
|
|
267
|
+
type ModelProps = {
|
|
268
|
+
parentId: string;
|
|
269
|
+
schema?: SchemaObject;
|
|
270
|
+
name?: string;
|
|
271
|
+
type: 'model';
|
|
272
|
+
parentTag?: ParentTag;
|
|
273
|
+
};
|
|
274
|
+
type ExampleProps = {
|
|
275
|
+
parentId: string;
|
|
276
|
+
name: string;
|
|
277
|
+
type: 'example';
|
|
278
|
+
};
|
|
279
|
+
export type IdGeneratorProps = DocumentIdProps | DescriptionIdProps | TagProps | OperationProps | WebhookProps | ModelProps | ExampleProps;
|
|
280
|
+
export type IdGenerator = (props: IdGeneratorProps) => string;
|
|
154
281
|
export {};
|
|
155
282
|
//# sourceMappingURL=navigation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../src/schemas/navigation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,UAAU,EAAE,MAAM,mCAAmC,CAAA;AACjF,OAAO,EAAE,KAAK,QAAQ,EAAQ,MAAM,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../src/schemas/navigation.ts"],"names":[],"mapp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,OAAO,CAAC,EAAE,eAAe,CAAA;IACzB,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,SAAS,CAAA;IACf,SAAS,CAAC,EAAE,SAAS,CAAA;CACtB,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,MAAM,MAAM,gBAAgB,GACxB,eAAe,GACf,kBAAkB,GAClB,QAAQ,GACR,cAAc,GACd,YAAY,GACZ,UAAU,GACV,YAAY,CAAA;AAEhB,MAAM,MAAM,WAAW,GAAG,CAAC,KAAK,EAAE,gBAAgB,KAAK,MAAM,CAAA"}
|
|
@@ -6,6 +6,13 @@ const NavigationBaseSchemaDefinition = Type.Object({
|
|
|
6
6
|
id: Type.String(),
|
|
7
7
|
title: Type.String()
|
|
8
8
|
});
|
|
9
|
+
const TraversedDocumentSchemaDefinition = compose(
|
|
10
|
+
NavigationBaseSchemaDefinition,
|
|
11
|
+
Type.Object({
|
|
12
|
+
type: Type.Literal("document"),
|
|
13
|
+
children: Type.Optional(Type.Array(TraversedEntryObjectRef))
|
|
14
|
+
})
|
|
15
|
+
);
|
|
9
16
|
const TraversedDescriptionSchemaDefinition = compose(
|
|
10
17
|
NavigationBaseSchemaDefinition,
|
|
11
18
|
Type.Object({
|
|
@@ -61,19 +68,31 @@ const TraversedTagSchemaDefinition = compose(
|
|
|
61
68
|
xKeys: Type.Optional(Type.Record(Type.String(), Type.Unknown()))
|
|
62
69
|
})
|
|
63
70
|
);
|
|
71
|
+
const TraversedModelsSchemaDefinition = compose(
|
|
72
|
+
NavigationBaseSchemaDefinition,
|
|
73
|
+
Type.Object({
|
|
74
|
+
type: Type.Literal("models"),
|
|
75
|
+
name: Type.String(),
|
|
76
|
+
children: Type.Optional(Type.Array(TraversedEntryObjectRef))
|
|
77
|
+
})
|
|
78
|
+
);
|
|
64
79
|
const TraversedEntrySchemaDefinition = Type.Union([
|
|
65
80
|
TraversedDescriptionSchemaDefinition,
|
|
66
81
|
TraversedOperationSchemaDefinition,
|
|
67
82
|
TraversedSchemaSchemaDefinition,
|
|
68
83
|
TraversedTagSchemaDefinition,
|
|
69
84
|
TraversedWebhookSchemaDefinition,
|
|
70
|
-
TraversedExampleSchemaDefinition
|
|
85
|
+
TraversedExampleSchemaDefinition,
|
|
86
|
+
TraversedDocumentSchemaDefinition,
|
|
87
|
+
TraversedModelsSchemaDefinition
|
|
71
88
|
]);
|
|
72
89
|
export {
|
|
73
90
|
NavigationBaseSchemaDefinition,
|
|
74
91
|
TraversedDescriptionSchemaDefinition,
|
|
92
|
+
TraversedDocumentSchemaDefinition,
|
|
75
93
|
TraversedEntrySchemaDefinition,
|
|
76
94
|
TraversedExampleSchemaDefinition,
|
|
95
|
+
TraversedModelsSchemaDefinition,
|
|
77
96
|
TraversedOperationSchemaDefinition,
|
|
78
97
|
TraversedSchemaSchemaDefinition,
|
|
79
98
|
TraversedTagSchemaDefinition,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/schemas/navigation.ts"],
|
|
4
|
-
"sourcesContent": ["import { HTTP_METHODS, type HttpMethod } from '@scalar/helpers/http/http-methods'\nimport { type TLiteral, Type } from '@scalar/typebox'\n\nimport { compose } from '@/schemas/compose'\nimport { TraversedEntryObjectRef } from '@/schemas/v3.1/strict/ref-definitions'\n\nexport const NavigationBaseSchemaDefinition = Type.Object({\n id: Type.String(),\n title: Type.String(),\n})\n\ntype BaseSchema = {\n id: string\n title: string\n}\n\nexport const TraversedDescriptionSchemaDefinition = compose(\n NavigationBaseSchemaDefinition,\n Type.Object({\n type: Type.Literal('text'),\n children: Type.Optional(Type.Array(TraversedEntryObjectRef)),\n }),\n)\n\nexport type TraversedDescription = BaseSchema & {\n type: 'text'\n children?: TraversedEntry[]\n}\n\nexport const TraversedExampleSchemaDefinition = compose(\n NavigationBaseSchemaDefinition,\n Type.Object({\n type: Type.Literal('example'),\n name: Type.String(),\n }),\n)\n\nexport type TraversedExample = BaseSchema & {\n type: 'example'\n name: string\n}\n\nexport const TraversedOperationSchemaDefinition = compose(\n NavigationBaseSchemaDefinition,\n Type.Object({\n type: Type.Literal('operation'),\n ref: Type.String(),\n method: Type.Union(HTTP_METHODS.map((method) => Type.Literal(method))) as unknown as TLiteral<HttpMethod>,\n path: Type.String(),\n isDeprecated: Type.Optional(Type.Boolean()),\n children: Type.Optional(Type.Array(TraversedEntryObjectRef)),\n }),\n)\n
|
|
5
|
-
"mappings": "AAAA,SAAS,oBAAqC;AAC9C,SAAwB,YAAY;AAEpC,SAAS,eAAe;
|
|
4
|
+
"sourcesContent": ["import { HTTP_METHODS, type HttpMethod } from '@scalar/helpers/http/http-methods'\nimport { type TLiteral, Type } from '@scalar/typebox'\n\nimport { compose } from '@/schemas/compose'\nimport type { InfoObject } from '@/schemas/v3.1/strict/info'\nimport type { OperationObject } from '@/schemas/v3.1/strict/operation'\nimport { TraversedEntryObjectRef } from '@/schemas/v3.1/strict/ref-definitions'\nimport type { SchemaObject } from '@/schemas/v3.1/strict/schema'\nimport type { TagObject } from '@/schemas/v3.1/strict/tag'\n\nexport const NavigationBaseSchemaDefinition = Type.Object({\n id: Type.String(),\n title: Type.String(),\n})\n\ntype BaseSchema = {\n /**\n * The unique identifier for the entry\n *\n * Must be unique across the entire navigation structure.\n */\n id: string\n /** The user readable title of the entry */\n title: string\n}\n\nexport const TraversedDocumentSchemaDefinition = compose(\n NavigationBaseSchemaDefinition,\n Type.Object({\n type: Type.Literal('document'),\n children: Type.Optional(Type.Array(TraversedEntryObjectRef)),\n }),\n)\n\n/**\n * An entry representing an OpenAPI in the navigation structure.\n *\n * Used in the client to represent the root document and its operations or tags.\n */\nexport type TraversedDocument = BaseSchema & {\n type: 'document'\n children?: TraversedEntry[]\n}\n\nexport const TraversedDescriptionSchemaDefinition = compose(\n NavigationBaseSchemaDefinition,\n Type.Object({\n type: Type.Literal('text'),\n children: Type.Optional(Type.Array(TraversedEntryObjectRef)),\n }),\n)\n\n/**\n * An entry representing a markdown description in the navigation structure.\n */\nexport type TraversedDescription = BaseSchema & {\n type: 'text'\n children?: TraversedEntry[]\n}\n\nexport const TraversedExampleSchemaDefinition = compose(\n NavigationBaseSchemaDefinition,\n Type.Object({\n type: Type.Literal('example'),\n name: Type.String(),\n }),\n)\n\n/**\n * An entry representing an operation example in the navigation structure.\n */\nexport type TraversedExample = BaseSchema & {\n type: 'example'\n name: string\n}\n\nexport const TraversedOperationSchemaDefinition = compose(\n NavigationBaseSchemaDefinition,\n Type.Object({\n type: Type.Literal('operation'),\n ref: Type.String(),\n method: Type.Union(HTTP_METHODS.map((method) => Type.Literal(method))) as unknown as TLiteral<HttpMethod>,\n path: Type.String(),\n isDeprecated: Type.Optional(Type.Boolean()),\n children: Type.Optional(Type.Array(TraversedEntryObjectRef)),\n }),\n)\n/**\n * An entry representing an operation in the navigation structure.\n */\nexport type TraversedOperation = BaseSchema & {\n type: 'operation'\n ref: string\n method: HttpMethod\n path: string\n isDeprecated?: boolean\n children?: TraversedEntry[]\n}\n\nexport const TraversedSchemaSchemaDefinition = compose(\n NavigationBaseSchemaDefinition,\n Type.Object({\n type: Type.Literal('model'),\n ref: Type.String(),\n name: Type.String(),\n }),\n)\n\n/**\n * An entry representing a model in the navigation structure.\n */\nexport type TraversedSchema = BaseSchema & {\n type: 'model'\n ref: string\n name: string\n}\n\nexport const TraversedWebhookSchemaDefinition = compose(\n NavigationBaseSchemaDefinition,\n Type.Object({\n type: Type.Literal('webhook'),\n ref: Type.String(),\n method: Type.Union(HTTP_METHODS.map((method) => Type.Literal(method))) as unknown as TLiteral<HttpMethod>,\n name: Type.String(),\n isDeprecated: Type.Optional(Type.Boolean()),\n }),\n)\n\n/**\n * An entry representing a webhook in the navigation structure.\n */\nexport type TraversedWebhook = BaseSchema & {\n type: 'webhook'\n ref: string\n method: HttpMethod\n name: string\n isDeprecated?: boolean\n}\n\nexport const TraversedTagSchemaDefinition = compose(\n NavigationBaseSchemaDefinition,\n Type.Object({\n type: Type.Literal('tag'),\n name: Type.String(),\n description: Type.Optional(Type.String()),\n children: Type.Optional(Type.Array(TraversedEntryObjectRef)),\n isGroup: Type.Boolean(),\n isWebhooks: Type.Optional(Type.Boolean()),\n xKeys: Type.Optional(Type.Record(Type.String(), Type.Unknown())),\n }),\n)\n\n/**\n * An entry representing a tag in the navigation structure.\n *\n * Used to group operations or webhooks under a common heading.\n */\nexport type TraversedTag = BaseSchema & {\n type: 'tag'\n name: string\n description?: string\n children?: TraversedEntry[]\n isGroup: boolean\n isWebhooks?: boolean\n xKeys?: Record<string, unknown>\n}\n\nexport const TraversedModelsSchemaDefinition = compose(\n NavigationBaseSchemaDefinition,\n Type.Object({\n type: Type.Literal('models'),\n name: Type.String(),\n children: Type.Optional(Type.Array(TraversedEntryObjectRef)),\n }),\n)\n/**\n * Top level models navigation entry.\n */\nexport type TraversedModels = BaseSchema & {\n type: 'models'\n name: string\n children?: TraversedEntry[]\n}\n\nexport const TraversedEntrySchemaDefinition = Type.Union([\n TraversedDescriptionSchemaDefinition,\n TraversedOperationSchemaDefinition,\n TraversedSchemaSchemaDefinition,\n TraversedTagSchemaDefinition,\n TraversedWebhookSchemaDefinition,\n TraversedExampleSchemaDefinition,\n TraversedDocumentSchemaDefinition,\n TraversedModelsSchemaDefinition,\n])\n\nexport type TraversedEntry =\n | TraversedDescription\n | TraversedOperation\n | TraversedSchema\n | TraversedTag\n | TraversedWebhook\n | TraversedExample\n | TraversedDocument\n | TraversedModels\n\nexport type DocumentIdProps = {\n name: string\n info: InfoObject\n type: 'document'\n}\n\ntype DescriptionIdProps = {\n info: InfoObject\n type: 'text'\n slug?: string\n depth?: number\n value: string\n parentId: string\n}\n\nexport type ParentTag = {\n tag: TagObject\n id: string\n}\n\ntype TagProps = {\n parentId: string\n tag: TagObject\n type: 'tag'\n}\n\ntype OperationProps = {\n parentId: string\n operation: OperationObject\n path: string\n method: string\n type: 'operation'\n parentTag: ParentTag\n}\n\ntype WebhookProps = {\n parentId: string\n webhook?: OperationObject\n name: string\n method?: string\n type: 'webhook'\n parentTag?: ParentTag\n}\n\ntype ModelProps = {\n parentId: string\n schema?: SchemaObject\n name?: string\n type: 'model'\n parentTag?: ParentTag\n}\n\ntype ExampleProps = {\n parentId: string\n name: string\n type: 'example'\n}\n\nexport type IdGeneratorProps =\n | DocumentIdProps\n | DescriptionIdProps\n | TagProps\n | OperationProps\n | WebhookProps\n | ModelProps\n | ExampleProps\n\nexport type IdGenerator = (props: IdGeneratorProps) => string\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,oBAAqC;AAC9C,SAAwB,YAAY;AAEpC,SAAS,eAAe;AAGxB,SAAS,+BAA+B;AAIjC,MAAM,iCAAiC,KAAK,OAAO;AAAA,EACxD,IAAI,KAAK,OAAO;AAAA,EAChB,OAAO,KAAK,OAAO;AACrB,CAAC;AAaM,MAAM,oCAAoC;AAAA,EAC/C;AAAA,EACA,KAAK,OAAO;AAAA,IACV,MAAM,KAAK,QAAQ,UAAU;AAAA,IAC7B,UAAU,KAAK,SAAS,KAAK,MAAM,uBAAuB,CAAC;AAAA,EAC7D,CAAC;AACH;AAYO,MAAM,uCAAuC;AAAA,EAClD;AAAA,EACA,KAAK,OAAO;AAAA,IACV,MAAM,KAAK,QAAQ,MAAM;AAAA,IACzB,UAAU,KAAK,SAAS,KAAK,MAAM,uBAAuB,CAAC;AAAA,EAC7D,CAAC;AACH;AAUO,MAAM,mCAAmC;AAAA,EAC9C;AAAA,EACA,KAAK,OAA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