@scalar/types 0.2.12 → 0.2.14
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 +12 -0
- package/dist/api-reference/api-reference-configuration.d.ts +84 -10
- package/dist/api-reference/api-reference-configuration.d.ts.map +1 -1
- package/dist/api-reference/api-reference-configuration.js +25 -1
- package/dist/api-reference/api-reference-configuration.js.map +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @scalar/types
|
|
2
2
|
|
|
3
|
+
## 0.2.14
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 792c937: Configurable option for sidebar to show method path instead of method summary.
|
|
8
|
+
|
|
9
|
+
## 0.2.13
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 50032be: feat: added config options for sorting schema properties
|
|
14
|
+
|
|
3
15
|
## 0.2.12
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -202,6 +202,11 @@ export declare const apiClientConfigurationSchema: z.ZodObject<{
|
|
|
202
202
|
* @default true
|
|
203
203
|
*/
|
|
204
204
|
showSidebar: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
205
|
+
/**
|
|
206
|
+
* Whether to use the operation summary or the operation path for the sidebar and search
|
|
207
|
+
* @default 'summary'
|
|
208
|
+
*/
|
|
209
|
+
operationTitleSource: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<["summary", "path"]>>>>;
|
|
205
210
|
/** A string to use one of the color presets */
|
|
206
211
|
theme: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<["alternate", "default", "moon", "purple", "solarized", "bluePlanet", "deepSpace", "saturn", "kepler", "elysiajs", "fastify", "mars", "laserwave", "none"]>>>>;
|
|
207
212
|
/** Integration type identifier */
|
|
@@ -348,6 +353,7 @@ export declare const apiClientConfigurationSchema: z.ZodObject<{
|
|
|
348
353
|
}, "strip", z.ZodTypeAny, {
|
|
349
354
|
hideClientButton: boolean;
|
|
350
355
|
showSidebar: boolean;
|
|
356
|
+
operationTitleSource: "path" | "summary";
|
|
351
357
|
theme: "alternate" | "default" | "moon" | "purple" | "solarized" | "bluePlanet" | "deepSpace" | "saturn" | "kepler" | "elysiajs" | "fastify" | "mars" | "laserwave" | "none";
|
|
352
358
|
persistAuth: boolean;
|
|
353
359
|
title?: string | undefined;
|
|
@@ -409,6 +415,7 @@ export declare const apiClientConfigurationSchema: z.ZodObject<{
|
|
|
409
415
|
searchHotKey?: "c" | "r" | "a" | "b" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | undefined;
|
|
410
416
|
servers?: any[] | undefined;
|
|
411
417
|
showSidebar?: unknown;
|
|
418
|
+
operationTitleSource?: unknown;
|
|
412
419
|
theme?: unknown;
|
|
413
420
|
_integration?: "go" | "rust" | "elysiajs" | "fastify" | "adonisjs" | "docusaurus" | "dotnet" | "express" | "fastapi" | "hono" | "html" | "laravel" | "litestar" | "nestjs" | "nextjs" | "nitro" | "nuxt" | "platformatic" | "react" | "svelte" | "vue" | null | undefined;
|
|
414
421
|
onRequestSent?: ((args_0: string, ...args: unknown[]) => void) | undefined;
|
|
@@ -439,6 +446,7 @@ export declare const apiClientConfigurationSchema: z.ZodObject<{
|
|
|
439
446
|
})[] | undefined;
|
|
440
447
|
}>;
|
|
441
448
|
export type ApiClientConfiguration = z.infer<typeof apiClientConfigurationSchema>;
|
|
449
|
+
export declare const FetchLike: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodUnion<[z.ZodString, z.ZodType<URL, z.ZodTypeDef, URL>, z.ZodType<Request, z.ZodTypeDef, Request>]>, z.ZodOptional<z.ZodAny>], z.ZodUnknown>, z.ZodPromise<z.ZodType<Response, z.ZodTypeDef, Response>>>>;
|
|
442
450
|
/** Configuration for the Api Client without the transform since it cannot be merged */
|
|
443
451
|
declare const _apiReferenceConfigurationSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
444
452
|
/**
|
|
@@ -566,6 +574,11 @@ declare const _apiReferenceConfigurationSchema: z.ZodObject<z.objectUtil.extendS
|
|
|
566
574
|
* @default true
|
|
567
575
|
*/
|
|
568
576
|
showSidebar: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
577
|
+
/**
|
|
578
|
+
* Whether to use the operation summary or the operation path for the sidebar and search
|
|
579
|
+
* @default 'summary'
|
|
580
|
+
*/
|
|
581
|
+
operationTitleSource: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<["summary", "path"]>>>>;
|
|
569
582
|
/** A string to use one of the color presets */
|
|
570
583
|
theme: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<["alternate", "default", "moon", "purple", "solarized", "bluePlanet", "deepSpace", "saturn", "kepler", "elysiajs", "fastify", "mars", "laserwave", "none"]>>>>;
|
|
571
584
|
/** Integration type identifier */
|
|
@@ -720,6 +733,12 @@ declare const _apiReferenceConfigurationSchema: z.ZodObject<z.objectUtil.extendS
|
|
|
720
733
|
* @deprecated Use proxyUrl instead
|
|
721
734
|
*/
|
|
722
735
|
proxy: z.ZodOptional<z.ZodString>;
|
|
736
|
+
/**
|
|
737
|
+
* Custom fetch function for custom logic
|
|
738
|
+
*
|
|
739
|
+
* Can be used to add custom headers, handle auth, etc.
|
|
740
|
+
*/
|
|
741
|
+
fetch: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodUnion<[z.ZodString, z.ZodType<URL, z.ZodTypeDef, URL>, z.ZodType<Request, z.ZodTypeDef, Request>]>, z.ZodOptional<z.ZodAny>], z.ZodUnknown>, z.ZodPromise<z.ZodType<Response, z.ZodTypeDef, Response>>>>;
|
|
723
742
|
/**
|
|
724
743
|
* Plugins for the API reference
|
|
725
744
|
*/
|
|
@@ -920,13 +939,13 @@ declare const _apiReferenceConfigurationSchema: z.ZodObject<z.objectUtil.extendS
|
|
|
920
939
|
}, "strip", z.ZodTypeAny, {
|
|
921
940
|
path: string;
|
|
922
941
|
method: string;
|
|
923
|
-
operationId?: string | undefined;
|
|
924
942
|
summary?: string | undefined;
|
|
943
|
+
operationId?: string | undefined;
|
|
925
944
|
}, {
|
|
926
945
|
path: string;
|
|
927
946
|
method: string;
|
|
928
|
-
operationId?: string | undefined;
|
|
929
947
|
summary?: string | undefined;
|
|
948
|
+
operationId?: string | undefined;
|
|
930
949
|
}>], z.ZodUnknown>, z.ZodString>>;
|
|
931
950
|
/**
|
|
932
951
|
* Customize the webhook portion of the hash
|
|
@@ -1001,9 +1020,20 @@ declare const _apiReferenceConfigurationSchema: z.ZodObject<z.objectUtil.extendS
|
|
|
1001
1020
|
* @default 'alpha' for alphabetical sorting
|
|
1002
1021
|
*/
|
|
1003
1022
|
operationsSorter: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"alpha">, z.ZodLiteral<"method">, z.ZodFunction<z.ZodTuple<[z.ZodAny, z.ZodAny], z.ZodUnknown>, z.ZodNumber>]>>;
|
|
1023
|
+
/**
|
|
1024
|
+
* Order the schema properties by
|
|
1025
|
+
* @default 'alpha' for alphabetical sorting
|
|
1026
|
+
*/
|
|
1027
|
+
orderSchemaPropertiesBy: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"alpha">, z.ZodLiteral<"preserve">]>>>>;
|
|
1028
|
+
/**
|
|
1029
|
+
* Sort the schema properties by required ones first
|
|
1030
|
+
* @default true
|
|
1031
|
+
*/
|
|
1032
|
+
orderRequiredPropertiesFirst: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
1004
1033
|
}>, "strip", z.ZodTypeAny, {
|
|
1005
1034
|
hideClientButton: boolean;
|
|
1006
1035
|
showSidebar: boolean;
|
|
1036
|
+
operationTitleSource: "path" | "summary";
|
|
1007
1037
|
theme: "alternate" | "default" | "moon" | "purple" | "solarized" | "bluePlanet" | "deepSpace" | "saturn" | "kepler" | "elysiajs" | "fastify" | "mars" | "laserwave" | "none";
|
|
1008
1038
|
persistAuth: boolean;
|
|
1009
1039
|
layout: "modern" | "classic";
|
|
@@ -1018,10 +1048,13 @@ declare const _apiReferenceConfigurationSchema: z.ZodObject<z.objectUtil.extendS
|
|
|
1018
1048
|
defaultOpenAllTags: boolean;
|
|
1019
1049
|
expandAllModelSections: boolean;
|
|
1020
1050
|
expandAllResponses: boolean;
|
|
1051
|
+
orderSchemaPropertiesBy: "alpha" | "preserve";
|
|
1052
|
+
orderRequiredPropertiesFirst: boolean;
|
|
1021
1053
|
title?: string | undefined;
|
|
1022
1054
|
onBeforeRequest?: ((args_0: {
|
|
1023
1055
|
request: Request;
|
|
1024
1056
|
}, ...args: unknown[]) => void | Promise<void>) | undefined;
|
|
1057
|
+
fetch?: ((args_0: string | Request | URL, args_1: any, ...args: unknown[]) => Promise<Response>) | undefined;
|
|
1025
1058
|
url?: string | undefined;
|
|
1026
1059
|
content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
|
|
1027
1060
|
slug?: string | undefined;
|
|
@@ -1079,8 +1112,8 @@ declare const _apiReferenceConfigurationSchema: z.ZodObject<z.objectUtil.extendS
|
|
|
1079
1112
|
generateOperationSlug?: ((args_0: {
|
|
1080
1113
|
path: string;
|
|
1081
1114
|
method: string;
|
|
1082
|
-
operationId?: string | undefined;
|
|
1083
1115
|
summary?: string | undefined;
|
|
1116
|
+
operationId?: string | undefined;
|
|
1084
1117
|
}, ...args: unknown[]) => string) | undefined;
|
|
1085
1118
|
generateWebhookSlug?: ((args_0: {
|
|
1086
1119
|
name: string;
|
|
@@ -1094,6 +1127,7 @@ declare const _apiReferenceConfigurationSchema: z.ZodObject<z.objectUtil.extendS
|
|
|
1094
1127
|
onBeforeRequest?: ((args_0: {
|
|
1095
1128
|
request: Request;
|
|
1096
1129
|
}, ...args: unknown[]) => void | Promise<void>) | undefined;
|
|
1130
|
+
fetch?: ((args_0: string | Request | URL, args_1: any, ...args: unknown[]) => Promise<Response>) | undefined;
|
|
1097
1131
|
url?: string | undefined;
|
|
1098
1132
|
content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
|
|
1099
1133
|
slug?: string | undefined;
|
|
@@ -1110,6 +1144,7 @@ declare const _apiReferenceConfigurationSchema: z.ZodObject<z.objectUtil.extendS
|
|
|
1110
1144
|
searchHotKey?: "c" | "r" | "a" | "b" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | undefined;
|
|
1111
1145
|
servers?: any[] | undefined;
|
|
1112
1146
|
showSidebar?: unknown;
|
|
1147
|
+
operationTitleSource?: unknown;
|
|
1113
1148
|
theme?: unknown;
|
|
1114
1149
|
_integration?: "go" | "rust" | "elysiajs" | "fastify" | "adonisjs" | "docusaurus" | "dotnet" | "express" | "fastapi" | "hono" | "html" | "laravel" | "litestar" | "nestjs" | "nextjs" | "nitro" | "nuxt" | "platformatic" | "react" | "svelte" | "vue" | null | undefined;
|
|
1115
1150
|
onRequestSent?: ((args_0: string, ...args: unknown[]) => void) | undefined;
|
|
@@ -1163,8 +1198,8 @@ declare const _apiReferenceConfigurationSchema: z.ZodObject<z.objectUtil.extendS
|
|
|
1163
1198
|
generateOperationSlug?: ((args_0: {
|
|
1164
1199
|
path: string;
|
|
1165
1200
|
method: string;
|
|
1166
|
-
operationId?: string | undefined;
|
|
1167
1201
|
summary?: string | undefined;
|
|
1202
|
+
operationId?: string | undefined;
|
|
1168
1203
|
}, ...args: unknown[]) => string) | undefined;
|
|
1169
1204
|
generateWebhookSlug?: ((args_0: {
|
|
1170
1205
|
name: string;
|
|
@@ -1177,6 +1212,8 @@ declare const _apiReferenceConfigurationSchema: z.ZodObject<z.objectUtil.extendS
|
|
|
1177
1212
|
expandAllResponses?: unknown;
|
|
1178
1213
|
tagsSorter?: "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
|
|
1179
1214
|
operationsSorter?: "method" | "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
|
|
1215
|
+
orderSchemaPropertiesBy?: unknown;
|
|
1216
|
+
orderRequiredPropertiesFirst?: unknown;
|
|
1180
1217
|
}>;
|
|
1181
1218
|
/** Configuration for the Api Reference */
|
|
1182
1219
|
export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z.objectUtil.extendShape<{
|
|
@@ -1305,6 +1342,11 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
1305
1342
|
* @default true
|
|
1306
1343
|
*/
|
|
1307
1344
|
showSidebar: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
1345
|
+
/**
|
|
1346
|
+
* Whether to use the operation summary or the operation path for the sidebar and search
|
|
1347
|
+
* @default 'summary'
|
|
1348
|
+
*/
|
|
1349
|
+
operationTitleSource: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<["summary", "path"]>>>>;
|
|
1308
1350
|
/** A string to use one of the color presets */
|
|
1309
1351
|
theme: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<["alternate", "default", "moon", "purple", "solarized", "bluePlanet", "deepSpace", "saturn", "kepler", "elysiajs", "fastify", "mars", "laserwave", "none"]>>>>;
|
|
1310
1352
|
/** Integration type identifier */
|
|
@@ -1459,6 +1501,12 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
1459
1501
|
* @deprecated Use proxyUrl instead
|
|
1460
1502
|
*/
|
|
1461
1503
|
proxy: z.ZodOptional<z.ZodString>;
|
|
1504
|
+
/**
|
|
1505
|
+
* Custom fetch function for custom logic
|
|
1506
|
+
*
|
|
1507
|
+
* Can be used to add custom headers, handle auth, etc.
|
|
1508
|
+
*/
|
|
1509
|
+
fetch: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodUnion<[z.ZodString, z.ZodType<URL, z.ZodTypeDef, URL>, z.ZodType<Request, z.ZodTypeDef, Request>]>, z.ZodOptional<z.ZodAny>], z.ZodUnknown>, z.ZodPromise<z.ZodType<Response, z.ZodTypeDef, Response>>>>;
|
|
1462
1510
|
/**
|
|
1463
1511
|
* Plugins for the API reference
|
|
1464
1512
|
*/
|
|
@@ -1659,13 +1707,13 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
1659
1707
|
}, "strip", z.ZodTypeAny, {
|
|
1660
1708
|
path: string;
|
|
1661
1709
|
method: string;
|
|
1662
|
-
operationId?: string | undefined;
|
|
1663
1710
|
summary?: string | undefined;
|
|
1711
|
+
operationId?: string | undefined;
|
|
1664
1712
|
}, {
|
|
1665
1713
|
path: string;
|
|
1666
1714
|
method: string;
|
|
1667
|
-
operationId?: string | undefined;
|
|
1668
1715
|
summary?: string | undefined;
|
|
1716
|
+
operationId?: string | undefined;
|
|
1669
1717
|
}>], z.ZodUnknown>, z.ZodString>>;
|
|
1670
1718
|
/**
|
|
1671
1719
|
* Customize the webhook portion of the hash
|
|
@@ -1740,9 +1788,20 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
1740
1788
|
* @default 'alpha' for alphabetical sorting
|
|
1741
1789
|
*/
|
|
1742
1790
|
operationsSorter: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"alpha">, z.ZodLiteral<"method">, z.ZodFunction<z.ZodTuple<[z.ZodAny, z.ZodAny], z.ZodUnknown>, z.ZodNumber>]>>;
|
|
1791
|
+
/**
|
|
1792
|
+
* Order the schema properties by
|
|
1793
|
+
* @default 'alpha' for alphabetical sorting
|
|
1794
|
+
*/
|
|
1795
|
+
orderSchemaPropertiesBy: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"alpha">, z.ZodLiteral<"preserve">]>>>>;
|
|
1796
|
+
/**
|
|
1797
|
+
* Sort the schema properties by required ones first
|
|
1798
|
+
* @default true
|
|
1799
|
+
*/
|
|
1800
|
+
orderRequiredPropertiesFirst: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
1743
1801
|
}>, "strip", z.ZodTypeAny, {
|
|
1744
1802
|
hideClientButton: boolean;
|
|
1745
1803
|
showSidebar: boolean;
|
|
1804
|
+
operationTitleSource: "path" | "summary";
|
|
1746
1805
|
theme: "alternate" | "default" | "moon" | "purple" | "solarized" | "bluePlanet" | "deepSpace" | "saturn" | "kepler" | "elysiajs" | "fastify" | "mars" | "laserwave" | "none";
|
|
1747
1806
|
persistAuth: boolean;
|
|
1748
1807
|
layout: "modern" | "classic";
|
|
@@ -1757,10 +1816,13 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
1757
1816
|
defaultOpenAllTags: boolean;
|
|
1758
1817
|
expandAllModelSections: boolean;
|
|
1759
1818
|
expandAllResponses: boolean;
|
|
1819
|
+
orderSchemaPropertiesBy: "alpha" | "preserve";
|
|
1820
|
+
orderRequiredPropertiesFirst: boolean;
|
|
1760
1821
|
title?: string | undefined;
|
|
1761
1822
|
onBeforeRequest?: ((args_0: {
|
|
1762
1823
|
request: Request;
|
|
1763
1824
|
}, ...args: unknown[]) => void | Promise<void>) | undefined;
|
|
1825
|
+
fetch?: ((args_0: string | Request | URL, args_1: any, ...args: unknown[]) => Promise<Response>) | undefined;
|
|
1764
1826
|
url?: string | undefined;
|
|
1765
1827
|
content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
|
|
1766
1828
|
slug?: string | undefined;
|
|
@@ -1818,8 +1880,8 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
1818
1880
|
generateOperationSlug?: ((args_0: {
|
|
1819
1881
|
path: string;
|
|
1820
1882
|
method: string;
|
|
1821
|
-
operationId?: string | undefined;
|
|
1822
1883
|
summary?: string | undefined;
|
|
1884
|
+
operationId?: string | undefined;
|
|
1823
1885
|
}, ...args: unknown[]) => string) | undefined;
|
|
1824
1886
|
generateWebhookSlug?: ((args_0: {
|
|
1825
1887
|
name: string;
|
|
@@ -1833,6 +1895,7 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
1833
1895
|
onBeforeRequest?: ((args_0: {
|
|
1834
1896
|
request: Request;
|
|
1835
1897
|
}, ...args: unknown[]) => void | Promise<void>) | undefined;
|
|
1898
|
+
fetch?: ((args_0: string | Request | URL, args_1: any, ...args: unknown[]) => Promise<Response>) | undefined;
|
|
1836
1899
|
url?: string | undefined;
|
|
1837
1900
|
content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
|
|
1838
1901
|
slug?: string | undefined;
|
|
@@ -1849,6 +1912,7 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
1849
1912
|
searchHotKey?: "c" | "r" | "a" | "b" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | undefined;
|
|
1850
1913
|
servers?: any[] | undefined;
|
|
1851
1914
|
showSidebar?: unknown;
|
|
1915
|
+
operationTitleSource?: unknown;
|
|
1852
1916
|
theme?: unknown;
|
|
1853
1917
|
_integration?: "go" | "rust" | "elysiajs" | "fastify" | "adonisjs" | "docusaurus" | "dotnet" | "express" | "fastapi" | "hono" | "html" | "laravel" | "litestar" | "nestjs" | "nextjs" | "nitro" | "nuxt" | "platformatic" | "react" | "svelte" | "vue" | null | undefined;
|
|
1854
1918
|
onRequestSent?: ((args_0: string, ...args: unknown[]) => void) | undefined;
|
|
@@ -1902,8 +1966,8 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
1902
1966
|
generateOperationSlug?: ((args_0: {
|
|
1903
1967
|
path: string;
|
|
1904
1968
|
method: string;
|
|
1905
|
-
operationId?: string | undefined;
|
|
1906
1969
|
summary?: string | undefined;
|
|
1970
|
+
operationId?: string | undefined;
|
|
1907
1971
|
}, ...args: unknown[]) => string) | undefined;
|
|
1908
1972
|
generateWebhookSlug?: ((args_0: {
|
|
1909
1973
|
name: string;
|
|
@@ -1916,9 +1980,12 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
1916
1980
|
expandAllResponses?: unknown;
|
|
1917
1981
|
tagsSorter?: "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
|
|
1918
1982
|
operationsSorter?: "method" | "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
|
|
1983
|
+
orderSchemaPropertiesBy?: unknown;
|
|
1984
|
+
orderRequiredPropertiesFirst?: unknown;
|
|
1919
1985
|
}>, {
|
|
1920
1986
|
hideClientButton: boolean;
|
|
1921
1987
|
showSidebar: boolean;
|
|
1988
|
+
operationTitleSource: "path" | "summary";
|
|
1922
1989
|
theme: "alternate" | "default" | "moon" | "purple" | "solarized" | "bluePlanet" | "deepSpace" | "saturn" | "kepler" | "elysiajs" | "fastify" | "mars" | "laserwave" | "none";
|
|
1923
1990
|
persistAuth: boolean;
|
|
1924
1991
|
layout: "modern" | "classic";
|
|
@@ -1933,10 +2000,13 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
1933
2000
|
defaultOpenAllTags: boolean;
|
|
1934
2001
|
expandAllModelSections: boolean;
|
|
1935
2002
|
expandAllResponses: boolean;
|
|
2003
|
+
orderSchemaPropertiesBy: "alpha" | "preserve";
|
|
2004
|
+
orderRequiredPropertiesFirst: boolean;
|
|
1936
2005
|
title?: string | undefined;
|
|
1937
2006
|
onBeforeRequest?: ((args_0: {
|
|
1938
2007
|
request: Request;
|
|
1939
2008
|
}, ...args: unknown[]) => void | Promise<void>) | undefined;
|
|
2009
|
+
fetch?: ((args_0: string | Request | URL, args_1: any, ...args: unknown[]) => Promise<Response>) | undefined;
|
|
1940
2010
|
url?: string | undefined;
|
|
1941
2011
|
content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
|
|
1942
2012
|
slug?: string | undefined;
|
|
@@ -1994,8 +2064,8 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
1994
2064
|
generateOperationSlug?: ((args_0: {
|
|
1995
2065
|
path: string;
|
|
1996
2066
|
method: string;
|
|
1997
|
-
operationId?: string | undefined;
|
|
1998
2067
|
summary?: string | undefined;
|
|
2068
|
+
operationId?: string | undefined;
|
|
1999
2069
|
}, ...args: unknown[]) => string) | undefined;
|
|
2000
2070
|
generateWebhookSlug?: ((args_0: {
|
|
2001
2071
|
name: string;
|
|
@@ -2009,6 +2079,7 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
2009
2079
|
onBeforeRequest?: ((args_0: {
|
|
2010
2080
|
request: Request;
|
|
2011
2081
|
}, ...args: unknown[]) => void | Promise<void>) | undefined;
|
|
2082
|
+
fetch?: ((args_0: string | Request | URL, args_1: any, ...args: unknown[]) => Promise<Response>) | undefined;
|
|
2012
2083
|
url?: string | undefined;
|
|
2013
2084
|
content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
|
|
2014
2085
|
slug?: string | undefined;
|
|
@@ -2025,6 +2096,7 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
2025
2096
|
searchHotKey?: "c" | "r" | "a" | "b" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | undefined;
|
|
2026
2097
|
servers?: any[] | undefined;
|
|
2027
2098
|
showSidebar?: unknown;
|
|
2099
|
+
operationTitleSource?: unknown;
|
|
2028
2100
|
theme?: unknown;
|
|
2029
2101
|
_integration?: "go" | "rust" | "elysiajs" | "fastify" | "adonisjs" | "docusaurus" | "dotnet" | "express" | "fastapi" | "hono" | "html" | "laravel" | "litestar" | "nestjs" | "nextjs" | "nitro" | "nuxt" | "platformatic" | "react" | "svelte" | "vue" | null | undefined;
|
|
2030
2102
|
onRequestSent?: ((args_0: string, ...args: unknown[]) => void) | undefined;
|
|
@@ -2078,8 +2150,8 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
2078
2150
|
generateOperationSlug?: ((args_0: {
|
|
2079
2151
|
path: string;
|
|
2080
2152
|
method: string;
|
|
2081
|
-
operationId?: string | undefined;
|
|
2082
2153
|
summary?: string | undefined;
|
|
2154
|
+
operationId?: string | undefined;
|
|
2083
2155
|
}, ...args: unknown[]) => string) | undefined;
|
|
2084
2156
|
generateWebhookSlug?: ((args_0: {
|
|
2085
2157
|
name: string;
|
|
@@ -2092,6 +2164,8 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
2092
2164
|
expandAllResponses?: unknown;
|
|
2093
2165
|
tagsSorter?: "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
|
|
2094
2166
|
operationsSorter?: "method" | "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
|
|
2167
|
+
orderSchemaPropertiesBy?: unknown;
|
|
2168
|
+
orderRequiredPropertiesFirst?: unknown;
|
|
2095
2169
|
}>;
|
|
2096
2170
|
/** Configuration after parsing, this is the main type */
|
|
2097
2171
|
export type ApiReferenceConfiguration = Omit<z.infer<typeof _apiReferenceConfigurationSchema>, 'proxy' | 'spec' | 'authentication'> & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-reference-configuration.d.ts","sourceRoot":"","sources":["../../src/api-reference/api-reference-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;A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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmEwG,CAAA;AAE/G,yDAAyD;AACzD,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAC1C,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,EAEhD,OAAO,GAAG,MAAM,GAAG,gBAAgB,CACpC,GAAG;IACF,cAAc,CAAC,EAAE,2BAA2B,CAAA;CAC7C,CAAA;AAED,mDAAmD;AACnD,KAAK,oCAAoC,GAAG,yBAAyB,GAAG;IACtE,oDAAoD;IACpD,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAED,qDAAqD;AACrD,MAAM,MAAM,oCAAoC,GAAG,IAAI,CAAC,oCAAoC,EAAE,SAAS,CAAC,GAAG;IACzG,OAAO,EAAE,CAAC,iBAAiB,GAAG;QAAE,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC,EAAE,CAAA;CACvD,CAAA;AAED,gDAAgD;AAChD,MAAM,MAAM,4BAA4B,GACpC,OAAO,CAAC,yBAAyB,CAAC,GAClC,OAAO,CAAC,oCAAoC,CAAC,GAC7C,OAAO,CAAC,oCAAoC,CAAC,EAAE,GAC/C,OAAO,CAAC,oCAAoC,CAAC,EAAE,CAAA;AAEnD,uEAAuE;AACvE,eAAO,MAAM,0BAA0B,GACrC,QAAQ,4BAA4B,KACnC,MAAM,IAAI,OAAO,CAAC,oCAAoC,CAC0C,CAAA"}
|
|
@@ -17,6 +17,7 @@ const themeIdEnum = z.enum([
|
|
|
17
17
|
"laserwave",
|
|
18
18
|
"none"
|
|
19
19
|
]);
|
|
20
|
+
const operationTitleEnum = z.enum(["summary", "path"]);
|
|
20
21
|
const searchHotKeyEnum = z.enum([
|
|
21
22
|
"a",
|
|
22
23
|
"b",
|
|
@@ -191,6 +192,11 @@ const apiClientConfigurationSchema = z.object({
|
|
|
191
192
|
* @default true
|
|
192
193
|
*/
|
|
193
194
|
showSidebar: z.boolean().optional().default(true).catch(true),
|
|
195
|
+
/**
|
|
196
|
+
* Whether to use the operation summary or the operation path for the sidebar and search
|
|
197
|
+
* @default 'summary'
|
|
198
|
+
*/
|
|
199
|
+
operationTitleSource: operationTitleEnum.optional().default("summary").catch("summary"),
|
|
194
200
|
/** A string to use one of the color presets */
|
|
195
201
|
theme: themeIdEnum.optional().default("default").catch("default"),
|
|
196
202
|
/** Integration type identifier */
|
|
@@ -202,6 +208,7 @@ const apiClientConfigurationSchema = z.object({
|
|
|
202
208
|
/** Plugins for the API client */
|
|
203
209
|
plugins: z.array(ApiClientPluginSchema).optional()
|
|
204
210
|
});
|
|
211
|
+
const FetchLike = z.function().args(z.union([z.string(), z.instanceof(URL), z.instanceof(Request)]), z.any().optional()).returns(z.promise(z.instanceof(Response))).optional();
|
|
205
212
|
const _apiReferenceConfigurationSchema = apiClientConfigurationSchema.merge(
|
|
206
213
|
z.object({
|
|
207
214
|
/**
|
|
@@ -214,6 +221,12 @@ const _apiReferenceConfigurationSchema = apiClientConfigurationSchema.merge(
|
|
|
214
221
|
* @deprecated Use proxyUrl instead
|
|
215
222
|
*/
|
|
216
223
|
proxy: z.string().optional(),
|
|
224
|
+
/**
|
|
225
|
+
* Custom fetch function for custom logic
|
|
226
|
+
*
|
|
227
|
+
* Can be used to add custom headers, handle auth, etc.
|
|
228
|
+
*/
|
|
229
|
+
fetch: FetchLike,
|
|
217
230
|
/**
|
|
218
231
|
* Plugins for the API reference
|
|
219
232
|
*/
|
|
@@ -429,7 +442,17 @@ const _apiReferenceConfigurationSchema = apiClientConfigurationSchema.merge(
|
|
|
429
442
|
* Function to sort operations
|
|
430
443
|
* @default 'alpha' for alphabetical sorting
|
|
431
444
|
*/
|
|
432
|
-
operationsSorter: z.union([z.literal("alpha"), z.literal("method"), z.function().args(z.any(), z.any()).returns(z.number())]).optional()
|
|
445
|
+
operationsSorter: z.union([z.literal("alpha"), z.literal("method"), z.function().args(z.any(), z.any()).returns(z.number())]).optional(),
|
|
446
|
+
/**
|
|
447
|
+
* Order the schema properties by
|
|
448
|
+
* @default 'alpha' for alphabetical sorting
|
|
449
|
+
*/
|
|
450
|
+
orderSchemaPropertiesBy: z.union([z.literal("alpha"), z.literal("preserve")]).optional().default("alpha").catch("alpha"),
|
|
451
|
+
/**
|
|
452
|
+
* Sort the schema properties by required ones first
|
|
453
|
+
* @default true
|
|
454
|
+
*/
|
|
455
|
+
orderRequiredPropertiesFirst: z.boolean().optional().default(true).catch(true)
|
|
433
456
|
})
|
|
434
457
|
);
|
|
435
458
|
const OLD_PROXY_URL = "https://api.scalar.com/request-proxy";
|
|
@@ -478,6 +501,7 @@ const migrateConfiguration = (_configuration) => {
|
|
|
478
501
|
const apiReferenceConfigurationSchema = _apiReferenceConfigurationSchema.transform(migrateConfiguration);
|
|
479
502
|
const isConfigurationWithSources = (config) => Boolean(!Array.isArray(config) && config && "sources" in config && Array.isArray(config.sources));
|
|
480
503
|
export {
|
|
504
|
+
FetchLike,
|
|
481
505
|
apiClientConfigurationSchema,
|
|
482
506
|
apiReferenceConfigurationSchema,
|
|
483
507
|
isConfigurationWithSources,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/api-reference/api-reference-configuration.ts"],
|
|
4
|
-
"sourcesContent": ["import { z } from 'zod'\n\nimport { ApiClientPluginSchema } from '../api-client'\nimport type { TargetId } from '../snippetz'\nimport { ApiReferencePluginSchema } from './api-reference-plugin'\nimport type { AuthenticationConfiguration } from './authentication-configuration'\n\n/** Available theme presets for the API reference */\nconst themeIdEnum = z.enum([\n 'alternate',\n 'default',\n 'moon',\n 'purple',\n 'solarized',\n 'bluePlanet',\n 'deepSpace',\n 'saturn',\n 'kepler',\n 'elysiajs',\n 'fastify',\n 'mars',\n 'laserwave',\n 'none',\n])\n\n/** Valid keys that can be used with CTRL/CMD to open the search modal */\nconst searchHotKeyEnum = z.enum([\n 'a',\n 'b',\n 'c',\n 'd',\n 'e',\n 'f',\n 'g',\n 'h',\n 'i',\n 'j',\n 'k',\n 'l',\n 'm',\n 'n',\n 'o',\n 'p',\n 'q',\n 'r',\n 's',\n 't',\n 'u',\n 'v',\n 'w',\n 'x',\n 'y',\n 'z',\n])\n\n/** Supported integration types */\nconst integrationEnum = z\n .enum([\n 'adonisjs',\n 'docusaurus',\n 'dotnet',\n 'elysiajs',\n 'express',\n 'fastapi',\n 'fastify',\n 'go',\n 'hono',\n 'html',\n 'laravel',\n 'litestar',\n 'nestjs',\n 'nextjs',\n 'nitro',\n 'nuxt',\n 'platformatic',\n 'react',\n 'rust',\n 'svelte',\n 'vue',\n ])\n .nullable()\n\n/** Configuration for the OpenAPI/Swagger specification */\nexport const specConfigurationSchema = z.object({\n /**\n * URL to an OpenAPI/Swagger document\n *\n * @deprecated Please move `url` to the top level and remove the `spec` prefix.\n *\n * @example\n * ```ts\n * const oldConfiguration = {\n * spec: {\n * url: 'https://example.com/openapi.json',\n * },\n * }\n *\n * const newConfiguration = {\n * url: 'https://example.com/openapi.json',\n * }\n * ```\n **/\n url: z.string().optional(),\n /**\n * Directly embed the OpenAPI document.\n * Can be a string, object, function returning an object, or null.\n *\n * @remarks It's recommended to pass a URL instead of content.\n *\n * @deprecated Please move `content` to the top level and remove the `spec` prefix.\n *\n * @example\n * ```ts\n * const oldConfiguration = {\n * spec: {\n * content: '\u2026',\n * },\n * }\n *\n * const newConfiguration = {\n * content: '\u2026',\n * }\n * ```\n **/\n content: z.union([z.string(), z.record(z.any()), z.function().returns(z.record(z.any())), z.null()]).optional(),\n /**\n * The title of the OpenAPI document.\n *\n * @example 'Scalar Galaxy'\n *\n * @deprecated Please move `title` to the top level and remove the `spec` prefix.\n */\n title: z.string().optional(),\n /**\n * The slug of the OpenAPI document used in the URL.\n *\n * If none is passed, the title will be used.\n *\n * If no title is used, it'll just use the index.\n *\n * @example 'scalar-galaxy'\n *\n * @deprecated Please move `slug` to the top level and remove the `spec` prefix.\n */\n slug: z.string().optional(),\n})\nexport type SpecConfiguration = z.infer<typeof specConfigurationSchema>\n\n/** Configuration for path-based routing */\nconst pathRoutingSchema = z.object({\n /** Base path for the API reference */\n basePath: z.string(),\n})\n\n/** Configuration for the Api Client */\nexport const apiClientConfigurationSchema = z.object({\n /**\n * URL to an OpenAPI/Swagger document\n **/\n url: z.string().optional(),\n /**\n * Directly embed the OpenAPI document.\n * Can be a string, object, function returning an object, or null.\n *\n * @remarks It's recommended to pass a URL instead of content.\n **/\n content: z.union([z.string(), z.record(z.any()), z.function().returns(z.record(z.any())), z.null()]).optional(),\n /**\n * The title of the OpenAPI document.\n *\n * @example 'Scalar Galaxy'\n */\n title: z.string().optional(),\n /**\n * The slug of the OpenAPI document used in the URL.\n *\n * If none is passed, the title will be used.\n *\n * If no title is used, it'll just use the index.\n *\n * @example 'scalar-galaxy'\n */\n slug: z.string().optional(),\n /**\n * The OpenAPI/Swagger document to render\n *\n * @deprecated Use `url` and `content` on the top level instead.\n **/\n spec: specConfigurationSchema.optional(),\n /** Prefill authentication */\n authentication: z.any().optional(), // Temp until we bring in the new auth\n /** Base URL for the API server */\n baseServerURL: z.string().optional(),\n /**\n * Whether to hide the client button\n * @default false\n */\n hideClientButton: z.boolean().optional().default(false).catch(false),\n /** URL to a request proxy for the API client */\n proxyUrl: z.string().optional(),\n /** Key used with CTRL/CMD to open the search modal (defaults to 'k' e.g. CMD+k) */\n searchHotKey: searchHotKeyEnum.optional(),\n /** List of OpenAPI server objects */\n servers: z.array(z.any()).optional(), // Using any for OpenAPIV3_1.ServerObject\n /**\n * Whether to show the sidebar\n * @default true\n */\n showSidebar: z.boolean().optional().default(true).catch(true),\n /** A string to use one of the color presets */\n theme: themeIdEnum.optional().default('default').catch('default'),\n /** Integration type identifier */\n _integration: integrationEnum.optional(),\n /** onRequestSent is fired when a request is sent */\n onRequestSent: z.function().args(z.string()).returns(z.void()).optional(),\n /** Whether to persist auth to local storage */\n persistAuth: z.boolean().optional().default(false).catch(false),\n /** Plugins for the API client */\n plugins: z.array(ApiClientPluginSchema).optional(),\n})\n\nexport type ApiClientConfiguration = z.infer<typeof apiClientConfigurationSchema>\n\n/** Configuration for the Api Client without the transform since it cannot be merged */\nconst _apiReferenceConfigurationSchema = apiClientConfigurationSchema.merge(\n z.object({\n /**\n * The layout to use for the references\n * @default 'modern'\n */\n layout: z.enum(['modern', 'classic']).optional().default('modern').catch('modern'),\n /**\n * URL to a request proxy for the API client\n * @deprecated Use proxyUrl instead\n */\n proxy: z.string().optional(),\n /**\n * Plugins for the API reference\n */\n plugins: z.array(ApiReferencePluginSchema).optional(),\n /**\n * Allows the user to inject an editor for the spec\n * @default false\n */\n isEditable: z.boolean().optional().default(false).catch(false),\n /**\n * Controls whether the references show a loading state in the intro\n * @default false\n */\n isLoading: z.boolean().optional().default(false).catch(false),\n /**\n * Whether to show models in the sidebar, search, and content.\n * @default false\n */\n hideModels: z.boolean().optional().default(false).catch(false),\n /**\n * Sets the file type of the document to download, set to `none` to hide the download button\n * @default 'both'\n */\n documentDownloadType: z.enum(['yaml', 'json', 'both', 'none']).optional().default('both').catch('both'),\n /**\n * Whether to show the \"Download OpenAPI Document\" button\n * @default false\n * @deprecated Use `documentDownloadType: 'none'` instead\n */\n hideDownloadButton: z.boolean().optional(),\n /**\n * Whether to show the \"Test Request\" button\n * @default false\n */\n hideTestRequestButton: z.boolean().optional().default(false).catch(false),\n /**\n * Whether to show the sidebar search bar\n * @default false\n */\n hideSearch: z.boolean().optional().default(false).catch(false),\n /** Whether dark mode is on or off initially (light mode) */\n darkMode: z.boolean().optional(),\n /** forceDarkModeState makes it always this state no matter what */\n forceDarkModeState: z.enum(['dark', 'light']).optional(),\n /**\n * Whether to show the dark mode toggle\n * @default false\n */\n hideDarkModeToggle: z.boolean().optional().default(false).catch(false),\n /**\n * If used, passed data will be added to the HTML header\n * @see https://unhead.unjs.io/usage/composables/use-seo-meta\n */\n metaData: z.any().optional(), // Using any for UseSeoMetaInput since it's an external type\n /**\n * Path to a favicon image\n * @default undefined\n * @example '/favicon.svg'\n */\n favicon: z.string().optional(),\n /**\n * List of httpsnippet clients to hide from the clients menu\n * By default hides Unirest, pass `[]` to show all clients\n */\n hiddenClients: z\n .union([z.record(z.union([z.boolean(), z.array(z.string())])), z.array(z.string()), z.literal(true)])\n .optional(),\n /** Determine the HTTP client that's selected by default */\n defaultHttpClient: z\n .object({\n targetKey: z.custom<TargetId>(),\n clientKey: z.string(),\n })\n .optional(),\n /** Custom CSS to be added to the page */\n customCss: z.string().optional(),\n /** onSpecUpdate is fired on spec/swagger content change */\n onSpecUpdate: z.function().args(z.string()).returns(z.void()).optional(),\n /** onServerChange is fired on selected server change */\n onServerChange: z.function().args(z.string()).returns(z.void()).optional(),\n /** onDocumentSelect is fired when the config is selected */\n onDocumentSelect: z.function().returns(z.void().or(z.void().promise())).optional(),\n /** Callback fired when the reference is fully loaded */\n onLoaded: z.function().returns(z.void().or(z.void().promise())).optional(),\n /** onBeforeRequest is fired before the request is sent. You can modify the request here. */\n onBeforeRequest: z\n .function()\n .args(z.object({ request: z.instanceof(Request) }))\n .returns(z.void().or(z.void().promise()))\n .optional(),\n /**\n * onShowMore is fired when the user clicks the \"Show more\" button on the references\n * @param tagId - The ID of the tag that was clicked\n */\n onShowMore: z.function().args(z.string()).returns(z.void().or(z.void().promise())).optional(),\n /**\n * onSidebarClick is fired when the user clicks on a sidebar item\n * @param href - The href of the sidebar item that was clicked\n */\n onSidebarClick: z.function().args(z.string()).returns(z.void().or(z.void().promise())).optional(),\n /**\n * Route using paths instead of hashes, your server MUST support this\n * @example '/standalone-api-reference/:custom(.*)?'\n * @experimental\n * @default undefined\n */\n pathRouting: pathRoutingSchema.optional(),\n /**\n * Customize the heading portion of the hash\n * @param heading - The heading object\n * @returns A string ID used to generate the URL hash\n * @default (heading) => `#description/${heading.slug}`\n */\n generateHeadingSlug: z\n .function()\n .args(\n z.object({\n slug: z.string().default('headingSlug'),\n }),\n )\n .returns(z.string())\n .optional(),\n /**\n * Customize the model portion of the hash\n * @param model - The model object with a name property\n * @returns A string ID used to generate the URL hash\n * @default (model) => slug(model.name)\n */\n generateModelSlug: z\n .function()\n .args(\n z.object({\n name: z.string().default('modelName'),\n }),\n )\n .returns(z.string())\n .optional(),\n /**\n * Customize the tag portion of the hash\n * @param tag - The tag object\n * @returns A string ID used to generate the URL hash\n * @default (tag) => slug(tag.name)\n */\n generateTagSlug: z\n .function()\n .args(\n z.object({\n name: z.string().default('tagName'),\n }),\n )\n .returns(z.string())\n .optional(),\n /**\n * Customize the operation portion of the hash\n * @param operation - The operation object\n * @returns A string ID used to generate the URL hash\n * @default (operation) => `${operation.method}${operation.path}`\n */\n generateOperationSlug: z\n .function()\n .args(\n z.object({\n path: z.string(),\n operationId: z.string().optional(),\n method: z.string(),\n summary: z.string().optional(),\n }),\n )\n .returns(z.string())\n .optional(),\n /**\n * Customize the webhook portion of the hash\n * @param webhook - The webhook object\n * @returns A string ID used to generate the URL hash\n * @default (webhook) => slug(webhook.name)\n */\n generateWebhookSlug: z\n .function()\n .args(\n z.object({\n name: z.string(),\n method: z.string().optional(),\n }),\n )\n .returns(z.string())\n .optional(),\n /**\n * To handle redirects, pass a function that will recieve:\n * - The current path with hash if pathRouting is enabled\n * - The current hash if hashRouting (default)\n * And then passes that to history.replaceState\n *\n * @example hashRouting (default)\n * ```ts\n * redirect: (hash: string) => hash.replace('#v1/old-path', '#v2/new-path')\n * ```\n * @example pathRouting\n * ```ts\n * redirect: (pathWithHash: string) => {\n * if (pathWithHash.includes('#')) {\n * return pathWithHash.replace('/v1/tags/user#operation/get-user', '/v1/tags/user/operation/get-user')\n * }\n * return null\n * }\n * ```\n */\n redirect: z.function().args(z.string()).returns(z.string().nullable().optional()).optional(),\n /**\n * Whether to include default fonts\n * @default true\n */\n withDefaultFonts: z.boolean().optional().default(true).catch(true),\n /**\n * Whether to expand all tags by default\n *\n * Warning this can cause performance issues on big documents\n * @default false\n */\n defaultOpenAllTags: z.boolean().optional().default(false).catch(false),\n /**\n * Whether to expand all models by default\n *\n * Warning this can cause performance issues on big documents\n * @default false\n */\n expandAllModelSections: z.boolean().optional().default(false).catch(false),\n /**\n * Whether to expand all responses by default\n *\n * Warning this can cause performance issues on big documents\n * @default false\n */\n expandAllResponses: z.boolean().optional().default(false).catch(false),\n /**\n * Function to sort tags\n * @default 'alpha' for alphabetical sorting\n */\n tagsSorter: z.union([z.literal('alpha'), z.function().args(z.any(), z.any()).returns(z.number())]).optional(),\n /**\n * Function to sort operations\n * @default 'alpha' for alphabetical sorting\n */\n operationsSorter: z\n .union([z.literal('alpha'), z.literal('method'), z.function().args(z.any(), z.any()).returns(z.number())])\n .optional(),\n }),\n)\n\nconst OLD_PROXY_URL = 'https://api.scalar.com/request-proxy'\nconst NEW_PROXY_URL = 'https://proxy.scalar.com'\n\n/** Migrate the configuration through a transform */\nconst migrateConfiguration = <T extends z.infer<typeof _apiReferenceConfigurationSchema>>(_configuration: T): T => {\n const configuration = { ..._configuration }\n\n // Migrate hideDownloadButton to documentDownloadType\n if (configuration.hideDownloadButton) {\n console.warn(\n `[DEPRECATED] You're using the deprecated 'hideDownloadButton' attribute. Use 'documentDownloadType: 'none'' instead.`,\n )\n\n configuration.documentDownloadType = 'none'\n }\n\n // Remove the spec prefix\n if (configuration.spec?.url) {\n console.warn(\n `[DEPRECATED] You're using the deprecated 'spec.url' attribute. Remove the spec prefix and move the 'url' attribute to the top level.`,\n )\n\n configuration.url = configuration.spec.url\n delete configuration.spec\n }\n\n if (configuration.spec?.content) {\n console.warn(\n `[DEPRECATED] You're using the deprecated 'spec.content' attribute. Remove the spec prefix and move the 'content' attribute to the top level.`,\n )\n\n configuration.content = configuration.spec.content\n delete configuration.spec\n }\n\n // Migrate proxy URL\n if (configuration.proxy) {\n console.warn(\n `[DEPRECATED] You're using the deprecated 'proxy' attribute, rename it to 'proxyUrl' or update the package.`,\n )\n\n if (!configuration.proxyUrl) {\n configuration.proxyUrl = configuration.proxy\n }\n\n delete configuration.proxy\n }\n\n if (configuration.proxyUrl === OLD_PROXY_URL) {\n console.warn(`[DEPRECATED] Warning: configuration.proxyUrl points to our old proxy (${OLD_PROXY_URL}).`)\n console.warn(`[DEPRECATED] We are overwriting the value and use the new proxy URL (${NEW_PROXY_URL}) instead.`)\n console.warn(\n `[DEPRECATED] Action Required: You should manually update your configuration to use the new URL (${NEW_PROXY_URL}). Read more: https://github.com/scalar/scalar`,\n )\n\n configuration.proxyUrl = NEW_PROXY_URL\n }\n\n return configuration\n}\n\n/** Configuration for the Api Reference */\nexport const apiReferenceConfigurationSchema = _apiReferenceConfigurationSchema.transform(migrateConfiguration)\n\n/** Configuration after parsing, this is the main type */\nexport type ApiReferenceConfiguration = Omit<\n z.infer<typeof _apiReferenceConfigurationSchema>,\n // Remove deprecated attributes\n 'proxy' | 'spec' | 'authentication'\n> & {\n authentication?: AuthenticationConfiguration\n}\n\n/** Api Config which includes the default config */\ntype ApiReferenceConfigurationWithDefault = ApiReferenceConfiguration & {\n /** Whether to use this config as the default one */\n default?: boolean\n}\n\n/** Configuration for a single config with sources */\nexport type ApiReferenceConfigurationWithSources = Omit<ApiReferenceConfigurationWithDefault, 'default'> & {\n sources: (SpecConfiguration & { default?: boolean })[]\n}\n\n/** Configuration for multiple Api References */\nexport type AnyApiReferenceConfiguration =\n | Partial<ApiReferenceConfiguration>\n | Partial<ApiReferenceConfigurationWithSources>\n | Partial<ApiReferenceConfigurationWithDefault>[]\n | Partial<ApiReferenceConfigurationWithSources>[]\n\n/** Typeguard to check to narrow the configs to the one with sources */\nexport const isConfigurationWithSources = (\n config: AnyApiReferenceConfiguration,\n): config is Partial<ApiReferenceConfigurationWithSources> =>\n Boolean(!Array.isArray(config) && config && 'sources' in config && Array.isArray(config.sources))\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,SAAS;AAElB,SAAS,6BAA6B;AAEtC,SAAS,gCAAgC;AAIzC,MAAM,cAAc,EAAE,KAAK;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA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AA;AAAA;AAAA;AAAA;AAAA;AAAA,EAKnC,aAAa,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,IAAI,EAAE,MAAM,IAAI;AAAA;AAAA,
|
|
4
|
+
"sourcesContent": ["import { z } from 'zod'\n\nimport { ApiClientPluginSchema } from '../api-client'\nimport type { TargetId } from '../snippetz'\nimport { ApiReferencePluginSchema } from './api-reference-plugin'\nimport type { AuthenticationConfiguration } from './authentication-configuration'\n\n/** Available theme presets for the API reference */\nconst themeIdEnum = z.enum([\n 'alternate',\n 'default',\n 'moon',\n 'purple',\n 'solarized',\n 'bluePlanet',\n 'deepSpace',\n 'saturn',\n 'kepler',\n 'elysiajs',\n 'fastify',\n 'mars',\n 'laserwave',\n 'none',\n])\n\n/** Whether to use the operation summary or the operation path for the sidebar and search */\nconst operationTitleEnum = z.enum(['summary', 'path'])\n\n/** Valid keys that can be used with CTRL/CMD to open the search modal */\nconst searchHotKeyEnum = z.enum([\n 'a',\n 'b',\n 'c',\n 'd',\n 'e',\n 'f',\n 'g',\n 'h',\n 'i',\n 'j',\n 'k',\n 'l',\n 'm',\n 'n',\n 'o',\n 'p',\n 'q',\n 'r',\n 's',\n 't',\n 'u',\n 'v',\n 'w',\n 'x',\n 'y',\n 'z',\n])\n\n/** Supported integration types */\nconst integrationEnum = z\n .enum([\n 'adonisjs',\n 'docusaurus',\n 'dotnet',\n 'elysiajs',\n 'express',\n 'fastapi',\n 'fastify',\n 'go',\n 'hono',\n 'html',\n 'laravel',\n 'litestar',\n 'nestjs',\n 'nextjs',\n 'nitro',\n 'nuxt',\n 'platformatic',\n 'react',\n 'rust',\n 'svelte',\n 'vue',\n ])\n .nullable()\n\n/** Configuration for the OpenAPI/Swagger specification */\nexport const specConfigurationSchema = z.object({\n /**\n * URL to an OpenAPI/Swagger document\n *\n * @deprecated Please move `url` to the top level and remove the `spec` prefix.\n *\n * @example\n * ```ts\n * const oldConfiguration = {\n * spec: {\n * url: 'https://example.com/openapi.json',\n * },\n * }\n *\n * const newConfiguration = {\n * url: 'https://example.com/openapi.json',\n * }\n * ```\n **/\n url: z.string().optional(),\n /**\n * Directly embed the OpenAPI document.\n * Can be a string, object, function returning an object, or null.\n *\n * @remarks It's recommended to pass a URL instead of content.\n *\n * @deprecated Please move `content` to the top level and remove the `spec` prefix.\n *\n * @example\n * ```ts\n * const oldConfiguration = {\n * spec: {\n * content: '\u2026',\n * },\n * }\n *\n * const newConfiguration = {\n * content: '\u2026',\n * }\n * ```\n **/\n content: z.union([z.string(), z.record(z.any()), z.function().returns(z.record(z.any())), z.null()]).optional(),\n /**\n * The title of the OpenAPI document.\n *\n * @example 'Scalar Galaxy'\n *\n * @deprecated Please move `title` to the top level and remove the `spec` prefix.\n */\n title: z.string().optional(),\n /**\n * The slug of the OpenAPI document used in the URL.\n *\n * If none is passed, the title will be used.\n *\n * If no title is used, it'll just use the index.\n *\n * @example 'scalar-galaxy'\n *\n * @deprecated Please move `slug` to the top level and remove the `spec` prefix.\n */\n slug: z.string().optional(),\n})\nexport type SpecConfiguration = z.infer<typeof specConfigurationSchema>\n\n/** Configuration for path-based routing */\nconst pathRoutingSchema = z.object({\n /** Base path for the API reference */\n basePath: z.string(),\n})\n\n/** Configuration for the Api Client */\nexport const apiClientConfigurationSchema = z.object({\n /**\n * URL to an OpenAPI/Swagger document\n **/\n url: z.string().optional(),\n /**\n * Directly embed the OpenAPI document.\n * Can be a string, object, function returning an object, or null.\n *\n * @remarks It's recommended to pass a URL instead of content.\n **/\n content: z.union([z.string(), z.record(z.any()), z.function().returns(z.record(z.any())), z.null()]).optional(),\n /**\n * The title of the OpenAPI document.\n *\n * @example 'Scalar Galaxy'\n */\n title: z.string().optional(),\n /**\n * The slug of the OpenAPI document used in the URL.\n *\n * If none is passed, the title will be used.\n *\n * If no title is used, it'll just use the index.\n *\n * @example 'scalar-galaxy'\n */\n slug: z.string().optional(),\n /**\n * The OpenAPI/Swagger document to render\n *\n * @deprecated Use `url` and `content` on the top level instead.\n **/\n spec: specConfigurationSchema.optional(),\n /** Prefill authentication */\n authentication: z.any().optional(), // Temp until we bring in the new auth\n /** Base URL for the API server */\n baseServerURL: z.string().optional(),\n /**\n * Whether to hide the client button\n * @default false\n */\n hideClientButton: z.boolean().optional().default(false).catch(false),\n /** URL to a request proxy for the API client */\n proxyUrl: z.string().optional(),\n /** Key used with CTRL/CMD to open the search modal (defaults to 'k' e.g. CMD+k) */\n searchHotKey: searchHotKeyEnum.optional(),\n /** List of OpenAPI server objects */\n servers: z.array(z.any()).optional(), // Using any for OpenAPIV3_1.ServerObject\n /**\n * Whether to show the sidebar\n * @default true\n */\n showSidebar: z.boolean().optional().default(true).catch(true),\n /**\n * Whether to use the operation summary or the operation path for the sidebar and search\n * @default 'summary'\n */\n operationTitleSource: operationTitleEnum.optional().default('summary').catch('summary'),\n /** A string to use one of the color presets */\n theme: themeIdEnum.optional().default('default').catch('default'),\n /** Integration type identifier */\n _integration: integrationEnum.optional(),\n /** onRequestSent is fired when a request is sent */\n onRequestSent: z.function().args(z.string()).returns(z.void()).optional(),\n /** Whether to persist auth to local storage */\n persistAuth: z.boolean().optional().default(false).catch(false),\n /** Plugins for the API client */\n plugins: z.array(ApiClientPluginSchema).optional(),\n})\n\nexport type ApiClientConfiguration = z.infer<typeof apiClientConfigurationSchema>\n\nexport const FetchLike = z\n .function()\n .args(z.union([z.string(), z.instanceof(URL), z.instanceof(Request)]), z.any().optional())\n .returns(z.promise(z.instanceof(Response)))\n .optional()\n\n/** Configuration for the Api Client without the transform since it cannot be merged */\nconst _apiReferenceConfigurationSchema = apiClientConfigurationSchema.merge(\n z.object({\n /**\n * The layout to use for the references\n * @default 'modern'\n */\n layout: z.enum(['modern', 'classic']).optional().default('modern').catch('modern'),\n /**\n * URL to a request proxy for the API client\n * @deprecated Use proxyUrl instead\n */\n proxy: z.string().optional(),\n /**\n * Custom fetch function for custom logic\n *\n * Can be used to add custom headers, handle auth, etc.\n */\n fetch: FetchLike,\n /**\n * Plugins for the API reference\n */\n plugins: z.array(ApiReferencePluginSchema).optional(),\n /**\n * Allows the user to inject an editor for the spec\n * @default false\n */\n isEditable: z.boolean().optional().default(false).catch(false),\n /**\n * Controls whether the references show a loading state in the intro\n * @default false\n */\n isLoading: z.boolean().optional().default(false).catch(false),\n /**\n * Whether to show models in the sidebar, search, and content.\n * @default false\n */\n hideModels: z.boolean().optional().default(false).catch(false),\n /**\n * Sets the file type of the document to download, set to `none` to hide the download button\n * @default 'both'\n */\n documentDownloadType: z.enum(['yaml', 'json', 'both', 'none']).optional().default('both').catch('both'),\n /**\n * Whether to show the \"Download OpenAPI Document\" button\n * @default false\n * @deprecated Use `documentDownloadType: 'none'` instead\n */\n hideDownloadButton: z.boolean().optional(),\n /**\n * Whether to show the \"Test Request\" button\n * @default false\n */\n hideTestRequestButton: z.boolean().optional().default(false).catch(false),\n /**\n * Whether to show the sidebar search bar\n * @default false\n */\n hideSearch: z.boolean().optional().default(false).catch(false),\n /** Whether dark mode is on or off initially (light mode) */\n darkMode: z.boolean().optional(),\n /** forceDarkModeState makes it always this state no matter what */\n forceDarkModeState: z.enum(['dark', 'light']).optional(),\n /**\n * Whether to show the dark mode toggle\n * @default false\n */\n hideDarkModeToggle: z.boolean().optional().default(false).catch(false),\n /**\n * If used, passed data will be added to the HTML header\n * @see https://unhead.unjs.io/usage/composables/use-seo-meta\n */\n metaData: z.any().optional(), // Using any for UseSeoMetaInput since it's an external type\n /**\n * Path to a favicon image\n * @default undefined\n * @example '/favicon.svg'\n */\n favicon: z.string().optional(),\n /**\n * List of httpsnippet clients to hide from the clients menu\n * By default hides Unirest, pass `[]` to show all clients\n */\n hiddenClients: z\n .union([z.record(z.union([z.boolean(), z.array(z.string())])), z.array(z.string()), z.literal(true)])\n .optional(),\n /** Determine the HTTP client that's selected by default */\n defaultHttpClient: z\n .object({\n targetKey: z.custom<TargetId>(),\n clientKey: z.string(),\n })\n .optional(),\n /** Custom CSS to be added to the page */\n customCss: z.string().optional(),\n /** onSpecUpdate is fired on spec/swagger content change */\n onSpecUpdate: z.function().args(z.string()).returns(z.void()).optional(),\n /** onServerChange is fired on selected server change */\n onServerChange: z.function().args(z.string()).returns(z.void()).optional(),\n /** onDocumentSelect is fired when the config is selected */\n onDocumentSelect: z.function().returns(z.void().or(z.void().promise())).optional(),\n /** Callback fired when the reference is fully loaded */\n onLoaded: z.function().returns(z.void().or(z.void().promise())).optional(),\n /** onBeforeRequest is fired before the request is sent. You can modify the request here. */\n onBeforeRequest: z\n .function()\n .args(z.object({ request: z.instanceof(Request) }))\n .returns(z.void().or(z.void().promise()))\n .optional(),\n /**\n * onShowMore is fired when the user clicks the \"Show more\" button on the references\n * @param tagId - The ID of the tag that was clicked\n */\n onShowMore: z.function().args(z.string()).returns(z.void().or(z.void().promise())).optional(),\n /**\n * onSidebarClick is fired when the user clicks on a sidebar item\n * @param href - The href of the sidebar item that was clicked\n */\n onSidebarClick: z.function().args(z.string()).returns(z.void().or(z.void().promise())).optional(),\n /**\n * Route using paths instead of hashes, your server MUST support this\n * @example '/standalone-api-reference/:custom(.*)?'\n * @experimental\n * @default undefined\n */\n pathRouting: pathRoutingSchema.optional(),\n /**\n * Customize the heading portion of the hash\n * @param heading - The heading object\n * @returns A string ID used to generate the URL hash\n * @default (heading) => `#description/${heading.slug}`\n */\n generateHeadingSlug: z\n .function()\n .args(\n z.object({\n slug: z.string().default('headingSlug'),\n }),\n )\n .returns(z.string())\n .optional(),\n /**\n * Customize the model portion of the hash\n * @param model - The model object with a name property\n * @returns A string ID used to generate the URL hash\n * @default (model) => slug(model.name)\n */\n generateModelSlug: z\n .function()\n .args(\n z.object({\n name: z.string().default('modelName'),\n }),\n )\n .returns(z.string())\n .optional(),\n /**\n * Customize the tag portion of the hash\n * @param tag - The tag object\n * @returns A string ID used to generate the URL hash\n * @default (tag) => slug(tag.name)\n */\n generateTagSlug: z\n .function()\n .args(\n z.object({\n name: z.string().default('tagName'),\n }),\n )\n .returns(z.string())\n .optional(),\n /**\n * Customize the operation portion of the hash\n * @param operation - The operation object\n * @returns A string ID used to generate the URL hash\n * @default (operation) => `${operation.method}${operation.path}`\n */\n generateOperationSlug: z\n .function()\n .args(\n z.object({\n path: z.string(),\n operationId: z.string().optional(),\n method: z.string(),\n summary: z.string().optional(),\n }),\n )\n .returns(z.string())\n .optional(),\n /**\n * Customize the webhook portion of the hash\n * @param webhook - The webhook object\n * @returns A string ID used to generate the URL hash\n * @default (webhook) => slug(webhook.name)\n */\n generateWebhookSlug: z\n .function()\n .args(\n z.object({\n name: z.string(),\n method: z.string().optional(),\n }),\n )\n .returns(z.string())\n .optional(),\n /**\n * To handle redirects, pass a function that will recieve:\n * - The current path with hash if pathRouting is enabled\n * - The current hash if hashRouting (default)\n * And then passes that to history.replaceState\n *\n * @example hashRouting (default)\n * ```ts\n * redirect: (hash: string) => hash.replace('#v1/old-path', '#v2/new-path')\n * ```\n * @example pathRouting\n * ```ts\n * redirect: (pathWithHash: string) => {\n * if (pathWithHash.includes('#')) {\n * return pathWithHash.replace('/v1/tags/user#operation/get-user', '/v1/tags/user/operation/get-user')\n * }\n * return null\n * }\n * ```\n */\n redirect: z.function().args(z.string()).returns(z.string().nullable().optional()).optional(),\n /**\n * Whether to include default fonts\n * @default true\n */\n withDefaultFonts: z.boolean().optional().default(true).catch(true),\n /**\n * Whether to expand all tags by default\n *\n * Warning this can cause performance issues on big documents\n * @default false\n */\n defaultOpenAllTags: z.boolean().optional().default(false).catch(false),\n /**\n * Whether to expand all models by default\n *\n * Warning this can cause performance issues on big documents\n * @default false\n */\n expandAllModelSections: z.boolean().optional().default(false).catch(false),\n /**\n * Whether to expand all responses by default\n *\n * Warning this can cause performance issues on big documents\n * @default false\n */\n expandAllResponses: z.boolean().optional().default(false).catch(false),\n /**\n * Function to sort tags\n * @default 'alpha' for alphabetical sorting\n */\n tagsSorter: z.union([z.literal('alpha'), z.function().args(z.any(), z.any()).returns(z.number())]).optional(),\n /**\n * Function to sort operations\n * @default 'alpha' for alphabetical sorting\n */\n operationsSorter: z\n .union([z.literal('alpha'), z.literal('method'), z.function().args(z.any(), z.any()).returns(z.number())])\n .optional(),\n /**\n * Order the schema properties by\n * @default 'alpha' for alphabetical sorting\n */\n orderSchemaPropertiesBy: z\n .union([z.literal('alpha'), z.literal('preserve')])\n .optional()\n .default('alpha')\n .catch('alpha'),\n /**\n * Sort the schema properties by required ones first\n * @default true\n */\n orderRequiredPropertiesFirst: z.boolean().optional().default(true).catch(true),\n }),\n)\n\nconst OLD_PROXY_URL = 'https://api.scalar.com/request-proxy'\nconst NEW_PROXY_URL = 'https://proxy.scalar.com'\n\n/** Migrate the configuration through a transform */\nconst migrateConfiguration = <T extends z.infer<typeof _apiReferenceConfigurationSchema>>(_configuration: T): T => {\n const configuration = { ..._configuration }\n\n // Migrate hideDownloadButton to documentDownloadType\n if (configuration.hideDownloadButton) {\n console.warn(\n `[DEPRECATED] You're using the deprecated 'hideDownloadButton' attribute. Use 'documentDownloadType: 'none'' instead.`,\n )\n\n configuration.documentDownloadType = 'none'\n }\n\n // Remove the spec prefix\n if (configuration.spec?.url) {\n console.warn(\n `[DEPRECATED] You're using the deprecated 'spec.url' attribute. Remove the spec prefix and move the 'url' attribute to the top level.`,\n )\n\n configuration.url = configuration.spec.url\n delete configuration.spec\n }\n\n if (configuration.spec?.content) {\n console.warn(\n `[DEPRECATED] You're using the deprecated 'spec.content' attribute. Remove the spec prefix and move the 'content' attribute to the top level.`,\n )\n\n configuration.content = configuration.spec.content\n delete configuration.spec\n }\n\n // Migrate proxy URL\n if (configuration.proxy) {\n console.warn(\n `[DEPRECATED] You're using the deprecated 'proxy' attribute, rename it to 'proxyUrl' or update the package.`,\n )\n\n if (!configuration.proxyUrl) {\n configuration.proxyUrl = configuration.proxy\n }\n\n delete configuration.proxy\n }\n\n if (configuration.proxyUrl === OLD_PROXY_URL) {\n console.warn(`[DEPRECATED] Warning: configuration.proxyUrl points to our old proxy (${OLD_PROXY_URL}).`)\n console.warn(`[DEPRECATED] We are overwriting the value and use the new proxy URL (${NEW_PROXY_URL}) instead.`)\n console.warn(\n `[DEPRECATED] Action Required: You should manually update your configuration to use the new URL (${NEW_PROXY_URL}). Read more: https://github.com/scalar/scalar`,\n )\n\n configuration.proxyUrl = NEW_PROXY_URL\n }\n\n return configuration\n}\n\n/** Configuration for the Api Reference */\nexport const apiReferenceConfigurationSchema = _apiReferenceConfigurationSchema.transform(migrateConfiguration)\n\n/** Configuration after parsing, this is the main type */\nexport type ApiReferenceConfiguration = Omit<\n z.infer<typeof _apiReferenceConfigurationSchema>,\n // Remove deprecated attributes\n 'proxy' | 'spec' | 'authentication'\n> & {\n authentication?: AuthenticationConfiguration\n}\n\n/** Api Config which includes the default config */\ntype ApiReferenceConfigurationWithDefault = ApiReferenceConfiguration & {\n /** Whether to use this config as the default one */\n default?: boolean\n}\n\n/** Configuration for a single config with sources */\nexport type ApiReferenceConfigurationWithSources = Omit<ApiReferenceConfigurationWithDefault, 'default'> & {\n sources: (SpecConfiguration & { default?: boolean })[]\n}\n\n/** Configuration for multiple Api References */\nexport type AnyApiReferenceConfiguration =\n | Partial<ApiReferenceConfiguration>\n | Partial<ApiReferenceConfigurationWithSources>\n | Partial<ApiReferenceConfigurationWithDefault>[]\n | Partial<ApiReferenceConfigurationWithSources>[]\n\n/** Typeguard to check to narrow the configs to the one with sources */\nexport const isConfigurationWithSources = (\n config: AnyApiReferenceConfiguration,\n): config is Partial<ApiReferenceConfigurationWithSources> =>\n Boolean(!Array.isArray(config) && config && 'sources' in config && Array.isArray(config.sources))\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,SAAS;AAElB,SAAS,6BAA6B;AAEtC,SAAS,gCAAgC;AAIzC,MAAM,cAAc,EAAE,KAAK;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAGD,MAAM,qBAAqB,EA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