@scalar/types 0.2.13 → 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 +6 -0
- package/dist/api-reference/api-reference-configuration.d.ts +52 -10
- package/dist/api-reference/api-reference-configuration.d.ts.map +1 -1
- package/dist/api-reference/api-reference-configuration.js +14 -0
- package/dist/api-reference/api-reference-configuration.js.map +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -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
|
|
@@ -1014,6 +1033,7 @@ declare const _apiReferenceConfigurationSchema: z.ZodObject<z.objectUtil.extendS
|
|
|
1014
1033
|
}>, "strip", z.ZodTypeAny, {
|
|
1015
1034
|
hideClientButton: boolean;
|
|
1016
1035
|
showSidebar: boolean;
|
|
1036
|
+
operationTitleSource: "path" | "summary";
|
|
1017
1037
|
theme: "alternate" | "default" | "moon" | "purple" | "solarized" | "bluePlanet" | "deepSpace" | "saturn" | "kepler" | "elysiajs" | "fastify" | "mars" | "laserwave" | "none";
|
|
1018
1038
|
persistAuth: boolean;
|
|
1019
1039
|
layout: "modern" | "classic";
|
|
@@ -1034,6 +1054,7 @@ declare const _apiReferenceConfigurationSchema: z.ZodObject<z.objectUtil.extendS
|
|
|
1034
1054
|
onBeforeRequest?: ((args_0: {
|
|
1035
1055
|
request: Request;
|
|
1036
1056
|
}, ...args: unknown[]) => void | Promise<void>) | undefined;
|
|
1057
|
+
fetch?: ((args_0: string | Request | URL, args_1: any, ...args: unknown[]) => Promise<Response>) | undefined;
|
|
1037
1058
|
url?: string | undefined;
|
|
1038
1059
|
content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
|
|
1039
1060
|
slug?: string | undefined;
|
|
@@ -1091,8 +1112,8 @@ declare const _apiReferenceConfigurationSchema: z.ZodObject<z.objectUtil.extendS
|
|
|
1091
1112
|
generateOperationSlug?: ((args_0: {
|
|
1092
1113
|
path: string;
|
|
1093
1114
|
method: string;
|
|
1094
|
-
operationId?: string | undefined;
|
|
1095
1115
|
summary?: string | undefined;
|
|
1116
|
+
operationId?: string | undefined;
|
|
1096
1117
|
}, ...args: unknown[]) => string) | undefined;
|
|
1097
1118
|
generateWebhookSlug?: ((args_0: {
|
|
1098
1119
|
name: string;
|
|
@@ -1106,6 +1127,7 @@ declare const _apiReferenceConfigurationSchema: z.ZodObject<z.objectUtil.extendS
|
|
|
1106
1127
|
onBeforeRequest?: ((args_0: {
|
|
1107
1128
|
request: Request;
|
|
1108
1129
|
}, ...args: unknown[]) => void | Promise<void>) | undefined;
|
|
1130
|
+
fetch?: ((args_0: string | Request | URL, args_1: any, ...args: unknown[]) => Promise<Response>) | undefined;
|
|
1109
1131
|
url?: string | undefined;
|
|
1110
1132
|
content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
|
|
1111
1133
|
slug?: string | undefined;
|
|
@@ -1122,6 +1144,7 @@ declare const _apiReferenceConfigurationSchema: z.ZodObject<z.objectUtil.extendS
|
|
|
1122
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;
|
|
1123
1145
|
servers?: any[] | undefined;
|
|
1124
1146
|
showSidebar?: unknown;
|
|
1147
|
+
operationTitleSource?: unknown;
|
|
1125
1148
|
theme?: unknown;
|
|
1126
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;
|
|
1127
1150
|
onRequestSent?: ((args_0: string, ...args: unknown[]) => void) | undefined;
|
|
@@ -1175,8 +1198,8 @@ declare const _apiReferenceConfigurationSchema: z.ZodObject<z.objectUtil.extendS
|
|
|
1175
1198
|
generateOperationSlug?: ((args_0: {
|
|
1176
1199
|
path: string;
|
|
1177
1200
|
method: string;
|
|
1178
|
-
operationId?: string | undefined;
|
|
1179
1201
|
summary?: string | undefined;
|
|
1202
|
+
operationId?: string | undefined;
|
|
1180
1203
|
}, ...args: unknown[]) => string) | undefined;
|
|
1181
1204
|
generateWebhookSlug?: ((args_0: {
|
|
1182
1205
|
name: string;
|
|
@@ -1319,6 +1342,11 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
1319
1342
|
* @default true
|
|
1320
1343
|
*/
|
|
1321
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"]>>>>;
|
|
1322
1350
|
/** A string to use one of the color presets */
|
|
1323
1351
|
theme: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<["alternate", "default", "moon", "purple", "solarized", "bluePlanet", "deepSpace", "saturn", "kepler", "elysiajs", "fastify", "mars", "laserwave", "none"]>>>>;
|
|
1324
1352
|
/** Integration type identifier */
|
|
@@ -1473,6 +1501,12 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
1473
1501
|
* @deprecated Use proxyUrl instead
|
|
1474
1502
|
*/
|
|
1475
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>>>>;
|
|
1476
1510
|
/**
|
|
1477
1511
|
* Plugins for the API reference
|
|
1478
1512
|
*/
|
|
@@ -1673,13 +1707,13 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
1673
1707
|
}, "strip", z.ZodTypeAny, {
|
|
1674
1708
|
path: string;
|
|
1675
1709
|
method: string;
|
|
1676
|
-
operationId?: string | undefined;
|
|
1677
1710
|
summary?: string | undefined;
|
|
1711
|
+
operationId?: string | undefined;
|
|
1678
1712
|
}, {
|
|
1679
1713
|
path: string;
|
|
1680
1714
|
method: string;
|
|
1681
|
-
operationId?: string | undefined;
|
|
1682
1715
|
summary?: string | undefined;
|
|
1716
|
+
operationId?: string | undefined;
|
|
1683
1717
|
}>], z.ZodUnknown>, z.ZodString>>;
|
|
1684
1718
|
/**
|
|
1685
1719
|
* Customize the webhook portion of the hash
|
|
@@ -1767,6 +1801,7 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
1767
1801
|
}>, "strip", z.ZodTypeAny, {
|
|
1768
1802
|
hideClientButton: boolean;
|
|
1769
1803
|
showSidebar: boolean;
|
|
1804
|
+
operationTitleSource: "path" | "summary";
|
|
1770
1805
|
theme: "alternate" | "default" | "moon" | "purple" | "solarized" | "bluePlanet" | "deepSpace" | "saturn" | "kepler" | "elysiajs" | "fastify" | "mars" | "laserwave" | "none";
|
|
1771
1806
|
persistAuth: boolean;
|
|
1772
1807
|
layout: "modern" | "classic";
|
|
@@ -1787,6 +1822,7 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
1787
1822
|
onBeforeRequest?: ((args_0: {
|
|
1788
1823
|
request: Request;
|
|
1789
1824
|
}, ...args: unknown[]) => void | Promise<void>) | undefined;
|
|
1825
|
+
fetch?: ((args_0: string | Request | URL, args_1: any, ...args: unknown[]) => Promise<Response>) | undefined;
|
|
1790
1826
|
url?: string | undefined;
|
|
1791
1827
|
content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
|
|
1792
1828
|
slug?: string | undefined;
|
|
@@ -1844,8 +1880,8 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
1844
1880
|
generateOperationSlug?: ((args_0: {
|
|
1845
1881
|
path: string;
|
|
1846
1882
|
method: string;
|
|
1847
|
-
operationId?: string | undefined;
|
|
1848
1883
|
summary?: string | undefined;
|
|
1884
|
+
operationId?: string | undefined;
|
|
1849
1885
|
}, ...args: unknown[]) => string) | undefined;
|
|
1850
1886
|
generateWebhookSlug?: ((args_0: {
|
|
1851
1887
|
name: string;
|
|
@@ -1859,6 +1895,7 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
1859
1895
|
onBeforeRequest?: ((args_0: {
|
|
1860
1896
|
request: Request;
|
|
1861
1897
|
}, ...args: unknown[]) => void | Promise<void>) | undefined;
|
|
1898
|
+
fetch?: ((args_0: string | Request | URL, args_1: any, ...args: unknown[]) => Promise<Response>) | undefined;
|
|
1862
1899
|
url?: string | undefined;
|
|
1863
1900
|
content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
|
|
1864
1901
|
slug?: string | undefined;
|
|
@@ -1875,6 +1912,7 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
1875
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;
|
|
1876
1913
|
servers?: any[] | undefined;
|
|
1877
1914
|
showSidebar?: unknown;
|
|
1915
|
+
operationTitleSource?: unknown;
|
|
1878
1916
|
theme?: unknown;
|
|
1879
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;
|
|
1880
1918
|
onRequestSent?: ((args_0: string, ...args: unknown[]) => void) | undefined;
|
|
@@ -1928,8 +1966,8 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
1928
1966
|
generateOperationSlug?: ((args_0: {
|
|
1929
1967
|
path: string;
|
|
1930
1968
|
method: string;
|
|
1931
|
-
operationId?: string | undefined;
|
|
1932
1969
|
summary?: string | undefined;
|
|
1970
|
+
operationId?: string | undefined;
|
|
1933
1971
|
}, ...args: unknown[]) => string) | undefined;
|
|
1934
1972
|
generateWebhookSlug?: ((args_0: {
|
|
1935
1973
|
name: string;
|
|
@@ -1947,6 +1985,7 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
1947
1985
|
}>, {
|
|
1948
1986
|
hideClientButton: boolean;
|
|
1949
1987
|
showSidebar: boolean;
|
|
1988
|
+
operationTitleSource: "path" | "summary";
|
|
1950
1989
|
theme: "alternate" | "default" | "moon" | "purple" | "solarized" | "bluePlanet" | "deepSpace" | "saturn" | "kepler" | "elysiajs" | "fastify" | "mars" | "laserwave" | "none";
|
|
1951
1990
|
persistAuth: boolean;
|
|
1952
1991
|
layout: "modern" | "classic";
|
|
@@ -1967,6 +2006,7 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
1967
2006
|
onBeforeRequest?: ((args_0: {
|
|
1968
2007
|
request: Request;
|
|
1969
2008
|
}, ...args: unknown[]) => void | Promise<void>) | undefined;
|
|
2009
|
+
fetch?: ((args_0: string | Request | URL, args_1: any, ...args: unknown[]) => Promise<Response>) | undefined;
|
|
1970
2010
|
url?: string | undefined;
|
|
1971
2011
|
content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
|
|
1972
2012
|
slug?: string | undefined;
|
|
@@ -2024,8 +2064,8 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
2024
2064
|
generateOperationSlug?: ((args_0: {
|
|
2025
2065
|
path: string;
|
|
2026
2066
|
method: string;
|
|
2027
|
-
operationId?: string | undefined;
|
|
2028
2067
|
summary?: string | undefined;
|
|
2068
|
+
operationId?: string | undefined;
|
|
2029
2069
|
}, ...args: unknown[]) => string) | undefined;
|
|
2030
2070
|
generateWebhookSlug?: ((args_0: {
|
|
2031
2071
|
name: string;
|
|
@@ -2039,6 +2079,7 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
2039
2079
|
onBeforeRequest?: ((args_0: {
|
|
2040
2080
|
request: Request;
|
|
2041
2081
|
}, ...args: unknown[]) => void | Promise<void>) | undefined;
|
|
2082
|
+
fetch?: ((args_0: string | Request | URL, args_1: any, ...args: unknown[]) => Promise<Response>) | undefined;
|
|
2042
2083
|
url?: string | undefined;
|
|
2043
2084
|
content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
|
|
2044
2085
|
slug?: string | undefined;
|
|
@@ -2055,6 +2096,7 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
2055
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;
|
|
2056
2097
|
servers?: any[] | undefined;
|
|
2057
2098
|
showSidebar?: unknown;
|
|
2099
|
+
operationTitleSource?: unknown;
|
|
2058
2100
|
theme?: unknown;
|
|
2059
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;
|
|
2060
2102
|
onRequestSent?: ((args_0: string, ...args: unknown[]) => void) | undefined;
|
|
@@ -2108,8 +2150,8 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
2108
2150
|
generateOperationSlug?: ((args_0: {
|
|
2109
2151
|
path: string;
|
|
2110
2152
|
method: string;
|
|
2111
|
-
operationId?: string | undefined;
|
|
2112
2153
|
summary?: string | undefined;
|
|
2154
|
+
operationId?: string | undefined;
|
|
2113
2155
|
}, ...args: unknown[]) => string) | undefined;
|
|
2114
2156
|
generateWebhookSlug?: ((args_0: {
|
|
2115
2157
|
name: string;
|
|
@@ -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;AAKvB,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,gCAAgC,CAAA;
|
|
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;AAKvB,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,gCAAgC,CAAA;AAgFjF,0DAA0D;AAC1D,eAAO,MAAM,uBAAuB;IAClC;;;;;;;;;;;;;;;;;QAiBI;;IAEJ;;;;;;;;;;;;;;;;;;;;QAoBI;;IAEJ;;;;;;OAMG;;IAEH;;;;;;;;;;OAUG;;;;;;;;;;;;EAEH,CAAA;AACF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA;AAQvE,uCAAuC;AACvC,eAAO,MAAM,4BAA4B;IACvC;;QAEI;;IAEJ;;;;;QAKI;;IAEJ;;;;OAIG;;IAEH;;;;;;;;OAQG;;IAEH;;;;QAII;;QAvGJ;;;;;;;;;;;;;;;;;YAiBI;;QAEJ;;;;;;;;;;;;;;;;;;;;YAoBI;;QAEJ;;;;;;WAMG;;QAEH;;;;;;;;;;WAUG;;;;;;;;;;;;;IA8CH,6BAA6B;;IAE7B,kCAAkC;;IAElC;;;OAGG;;IAEH,gDAAgD;;IAEhD,mFAA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,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
|
*/
|
|
@@ -488,6 +501,7 @@ const migrateConfiguration = (_configuration) => {
|
|
|
488
501
|
const apiReferenceConfigurationSchema = _apiReferenceConfigurationSchema.transform(migrateConfiguration);
|
|
489
502
|
const isConfigurationWithSources = (config) => Boolean(!Array.isArray(config) && config && "sources" in config && Array.isArray(config.sources));
|
|
490
503
|
export {
|
|
504
|
+
FetchLike,
|
|
491
505
|
apiClientConfigurationSchema,
|
|
492
506
|
apiReferenceConfigurationSchema,
|
|
493
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 * 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,CAA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|
|
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,EAAE,KAAK,CAAC,WAAW,MAAM,CAAC;AAGrD,MAAM,mBAAmB,EAAE,KAAK;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA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