@scalar/types 0.2.13 → 0.2.15
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 +66 -10
- package/dist/api-reference/api-reference-configuration.d.ts.map +1 -1
- package/dist/api-reference/api-reference-configuration.js +17 -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.15
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- abe3842: Add analytic events to api-client + add telemetry option
|
|
8
|
+
|
|
9
|
+
## 0.2.14
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 792c937: Configurable option for sidebar to show method path instead of method summary.
|
|
14
|
+
|
|
3
15
|
## 0.2.13
|
|
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 */
|
|
@@ -345,11 +350,15 @@ export declare const apiClientConfigurationSchema: z.ZodObject<{
|
|
|
345
350
|
}, ...args: unknown[]) => void | Promise<void>) | undefined;
|
|
346
351
|
} | undefined;
|
|
347
352
|
}>>, "many">>;
|
|
353
|
+
/** Enables / disables telemetry*/
|
|
354
|
+
telemetry: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
348
355
|
}, "strip", z.ZodTypeAny, {
|
|
349
356
|
hideClientButton: boolean;
|
|
350
357
|
showSidebar: boolean;
|
|
358
|
+
operationTitleSource: "path" | "summary";
|
|
351
359
|
theme: "alternate" | "default" | "moon" | "purple" | "solarized" | "bluePlanet" | "deepSpace" | "saturn" | "kepler" | "elysiajs" | "fastify" | "mars" | "laserwave" | "none";
|
|
352
360
|
persistAuth: boolean;
|
|
361
|
+
telemetry: boolean;
|
|
353
362
|
title?: string | undefined;
|
|
354
363
|
url?: string | undefined;
|
|
355
364
|
content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
|
|
@@ -409,6 +418,7 @@ export declare const apiClientConfigurationSchema: z.ZodObject<{
|
|
|
409
418
|
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
419
|
servers?: any[] | undefined;
|
|
411
420
|
showSidebar?: unknown;
|
|
421
|
+
operationTitleSource?: unknown;
|
|
412
422
|
theme?: unknown;
|
|
413
423
|
_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
424
|
onRequestSent?: ((args_0: string, ...args: unknown[]) => void) | undefined;
|
|
@@ -437,8 +447,10 @@ export declare const apiClientConfigurationSchema: z.ZodObject<{
|
|
|
437
447
|
}, ...args: unknown[]) => void | Promise<void>) | undefined;
|
|
438
448
|
} | undefined;
|
|
439
449
|
})[] | undefined;
|
|
450
|
+
telemetry?: boolean | undefined;
|
|
440
451
|
}>;
|
|
441
452
|
export type ApiClientConfiguration = z.infer<typeof apiClientConfigurationSchema>;
|
|
453
|
+
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
454
|
/** Configuration for the Api Client without the transform since it cannot be merged */
|
|
443
455
|
declare const _apiReferenceConfigurationSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
444
456
|
/**
|
|
@@ -566,6 +578,11 @@ declare const _apiReferenceConfigurationSchema: z.ZodObject<z.objectUtil.extendS
|
|
|
566
578
|
* @default true
|
|
567
579
|
*/
|
|
568
580
|
showSidebar: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
581
|
+
/**
|
|
582
|
+
* Whether to use the operation summary or the operation path for the sidebar and search
|
|
583
|
+
* @default 'summary'
|
|
584
|
+
*/
|
|
585
|
+
operationTitleSource: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<["summary", "path"]>>>>;
|
|
569
586
|
/** A string to use one of the color presets */
|
|
570
587
|
theme: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<["alternate", "default", "moon", "purple", "solarized", "bluePlanet", "deepSpace", "saturn", "kepler", "elysiajs", "fastify", "mars", "laserwave", "none"]>>>>;
|
|
571
588
|
/** Integration type identifier */
|
|
@@ -709,6 +726,8 @@ declare const _apiReferenceConfigurationSchema: z.ZodObject<z.objectUtil.extendS
|
|
|
709
726
|
}, ...args: unknown[]) => void | Promise<void>) | undefined;
|
|
710
727
|
} | undefined;
|
|
711
728
|
}>>, "many">>;
|
|
729
|
+
/** Enables / disables telemetry*/
|
|
730
|
+
telemetry: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
712
731
|
}, {
|
|
713
732
|
/**
|
|
714
733
|
* The layout to use for the references
|
|
@@ -720,6 +739,12 @@ declare const _apiReferenceConfigurationSchema: z.ZodObject<z.objectUtil.extendS
|
|
|
720
739
|
* @deprecated Use proxyUrl instead
|
|
721
740
|
*/
|
|
722
741
|
proxy: z.ZodOptional<z.ZodString>;
|
|
742
|
+
/**
|
|
743
|
+
* Custom fetch function for custom logic
|
|
744
|
+
*
|
|
745
|
+
* Can be used to add custom headers, handle auth, etc.
|
|
746
|
+
*/
|
|
747
|
+
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
748
|
/**
|
|
724
749
|
* Plugins for the API reference
|
|
725
750
|
*/
|
|
@@ -920,13 +945,13 @@ declare const _apiReferenceConfigurationSchema: z.ZodObject<z.objectUtil.extendS
|
|
|
920
945
|
}, "strip", z.ZodTypeAny, {
|
|
921
946
|
path: string;
|
|
922
947
|
method: string;
|
|
923
|
-
operationId?: string | undefined;
|
|
924
948
|
summary?: string | undefined;
|
|
949
|
+
operationId?: string | undefined;
|
|
925
950
|
}, {
|
|
926
951
|
path: string;
|
|
927
952
|
method: string;
|
|
928
|
-
operationId?: string | undefined;
|
|
929
953
|
summary?: string | undefined;
|
|
954
|
+
operationId?: string | undefined;
|
|
930
955
|
}>], z.ZodUnknown>, z.ZodString>>;
|
|
931
956
|
/**
|
|
932
957
|
* Customize the webhook portion of the hash
|
|
@@ -1014,8 +1039,10 @@ declare const _apiReferenceConfigurationSchema: z.ZodObject<z.objectUtil.extendS
|
|
|
1014
1039
|
}>, "strip", z.ZodTypeAny, {
|
|
1015
1040
|
hideClientButton: boolean;
|
|
1016
1041
|
showSidebar: boolean;
|
|
1042
|
+
operationTitleSource: "path" | "summary";
|
|
1017
1043
|
theme: "alternate" | "default" | "moon" | "purple" | "solarized" | "bluePlanet" | "deepSpace" | "saturn" | "kepler" | "elysiajs" | "fastify" | "mars" | "laserwave" | "none";
|
|
1018
1044
|
persistAuth: boolean;
|
|
1045
|
+
telemetry: boolean;
|
|
1019
1046
|
layout: "modern" | "classic";
|
|
1020
1047
|
isEditable: boolean;
|
|
1021
1048
|
isLoading: boolean;
|
|
@@ -1034,6 +1061,7 @@ declare const _apiReferenceConfigurationSchema: z.ZodObject<z.objectUtil.extendS
|
|
|
1034
1061
|
onBeforeRequest?: ((args_0: {
|
|
1035
1062
|
request: Request;
|
|
1036
1063
|
}, ...args: unknown[]) => void | Promise<void>) | undefined;
|
|
1064
|
+
fetch?: ((args_0: string | Request | URL, args_1: any, ...args: unknown[]) => Promise<Response>) | undefined;
|
|
1037
1065
|
url?: string | undefined;
|
|
1038
1066
|
content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
|
|
1039
1067
|
slug?: string | undefined;
|
|
@@ -1091,8 +1119,8 @@ declare const _apiReferenceConfigurationSchema: z.ZodObject<z.objectUtil.extendS
|
|
|
1091
1119
|
generateOperationSlug?: ((args_0: {
|
|
1092
1120
|
path: string;
|
|
1093
1121
|
method: string;
|
|
1094
|
-
operationId?: string | undefined;
|
|
1095
1122
|
summary?: string | undefined;
|
|
1123
|
+
operationId?: string | undefined;
|
|
1096
1124
|
}, ...args: unknown[]) => string) | undefined;
|
|
1097
1125
|
generateWebhookSlug?: ((args_0: {
|
|
1098
1126
|
name: string;
|
|
@@ -1106,6 +1134,7 @@ declare const _apiReferenceConfigurationSchema: z.ZodObject<z.objectUtil.extendS
|
|
|
1106
1134
|
onBeforeRequest?: ((args_0: {
|
|
1107
1135
|
request: Request;
|
|
1108
1136
|
}, ...args: unknown[]) => void | Promise<void>) | undefined;
|
|
1137
|
+
fetch?: ((args_0: string | Request | URL, args_1: any, ...args: unknown[]) => Promise<Response>) | undefined;
|
|
1109
1138
|
url?: string | undefined;
|
|
1110
1139
|
content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
|
|
1111
1140
|
slug?: string | undefined;
|
|
@@ -1122,6 +1151,7 @@ declare const _apiReferenceConfigurationSchema: z.ZodObject<z.objectUtil.extendS
|
|
|
1122
1151
|
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
1152
|
servers?: any[] | undefined;
|
|
1124
1153
|
showSidebar?: unknown;
|
|
1154
|
+
operationTitleSource?: unknown;
|
|
1125
1155
|
theme?: unknown;
|
|
1126
1156
|
_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
1157
|
onRequestSent?: ((args_0: string, ...args: unknown[]) => void) | undefined;
|
|
@@ -1134,6 +1164,7 @@ declare const _apiReferenceConfigurationSchema: z.ZodObject<z.objectUtil.extendS
|
|
|
1134
1164
|
renderer?: unknown;
|
|
1135
1165
|
}[];
|
|
1136
1166
|
})[] | undefined;
|
|
1167
|
+
telemetry?: boolean | undefined;
|
|
1137
1168
|
layout?: unknown;
|
|
1138
1169
|
proxy?: string | undefined;
|
|
1139
1170
|
isEditable?: unknown;
|
|
@@ -1175,8 +1206,8 @@ declare const _apiReferenceConfigurationSchema: z.ZodObject<z.objectUtil.extendS
|
|
|
1175
1206
|
generateOperationSlug?: ((args_0: {
|
|
1176
1207
|
path: string;
|
|
1177
1208
|
method: string;
|
|
1178
|
-
operationId?: string | undefined;
|
|
1179
1209
|
summary?: string | undefined;
|
|
1210
|
+
operationId?: string | undefined;
|
|
1180
1211
|
}, ...args: unknown[]) => string) | undefined;
|
|
1181
1212
|
generateWebhookSlug?: ((args_0: {
|
|
1182
1213
|
name: string;
|
|
@@ -1319,6 +1350,11 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
1319
1350
|
* @default true
|
|
1320
1351
|
*/
|
|
1321
1352
|
showSidebar: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
1353
|
+
/**
|
|
1354
|
+
* Whether to use the operation summary or the operation path for the sidebar and search
|
|
1355
|
+
* @default 'summary'
|
|
1356
|
+
*/
|
|
1357
|
+
operationTitleSource: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<["summary", "path"]>>>>;
|
|
1322
1358
|
/** A string to use one of the color presets */
|
|
1323
1359
|
theme: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<["alternate", "default", "moon", "purple", "solarized", "bluePlanet", "deepSpace", "saturn", "kepler", "elysiajs", "fastify", "mars", "laserwave", "none"]>>>>;
|
|
1324
1360
|
/** Integration type identifier */
|
|
@@ -1462,6 +1498,8 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
1462
1498
|
}, ...args: unknown[]) => void | Promise<void>) | undefined;
|
|
1463
1499
|
} | undefined;
|
|
1464
1500
|
}>>, "many">>;
|
|
1501
|
+
/** Enables / disables telemetry*/
|
|
1502
|
+
telemetry: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
1465
1503
|
}, {
|
|
1466
1504
|
/**
|
|
1467
1505
|
* The layout to use for the references
|
|
@@ -1473,6 +1511,12 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
1473
1511
|
* @deprecated Use proxyUrl instead
|
|
1474
1512
|
*/
|
|
1475
1513
|
proxy: z.ZodOptional<z.ZodString>;
|
|
1514
|
+
/**
|
|
1515
|
+
* Custom fetch function for custom logic
|
|
1516
|
+
*
|
|
1517
|
+
* Can be used to add custom headers, handle auth, etc.
|
|
1518
|
+
*/
|
|
1519
|
+
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
1520
|
/**
|
|
1477
1521
|
* Plugins for the API reference
|
|
1478
1522
|
*/
|
|
@@ -1673,13 +1717,13 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
1673
1717
|
}, "strip", z.ZodTypeAny, {
|
|
1674
1718
|
path: string;
|
|
1675
1719
|
method: string;
|
|
1676
|
-
operationId?: string | undefined;
|
|
1677
1720
|
summary?: string | undefined;
|
|
1721
|
+
operationId?: string | undefined;
|
|
1678
1722
|
}, {
|
|
1679
1723
|
path: string;
|
|
1680
1724
|
method: string;
|
|
1681
|
-
operationId?: string | undefined;
|
|
1682
1725
|
summary?: string | undefined;
|
|
1726
|
+
operationId?: string | undefined;
|
|
1683
1727
|
}>], z.ZodUnknown>, z.ZodString>>;
|
|
1684
1728
|
/**
|
|
1685
1729
|
* Customize the webhook portion of the hash
|
|
@@ -1767,8 +1811,10 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
1767
1811
|
}>, "strip", z.ZodTypeAny, {
|
|
1768
1812
|
hideClientButton: boolean;
|
|
1769
1813
|
showSidebar: boolean;
|
|
1814
|
+
operationTitleSource: "path" | "summary";
|
|
1770
1815
|
theme: "alternate" | "default" | "moon" | "purple" | "solarized" | "bluePlanet" | "deepSpace" | "saturn" | "kepler" | "elysiajs" | "fastify" | "mars" | "laserwave" | "none";
|
|
1771
1816
|
persistAuth: boolean;
|
|
1817
|
+
telemetry: boolean;
|
|
1772
1818
|
layout: "modern" | "classic";
|
|
1773
1819
|
isEditable: boolean;
|
|
1774
1820
|
isLoading: boolean;
|
|
@@ -1787,6 +1833,7 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
1787
1833
|
onBeforeRequest?: ((args_0: {
|
|
1788
1834
|
request: Request;
|
|
1789
1835
|
}, ...args: unknown[]) => void | Promise<void>) | undefined;
|
|
1836
|
+
fetch?: ((args_0: string | Request | URL, args_1: any, ...args: unknown[]) => Promise<Response>) | undefined;
|
|
1790
1837
|
url?: string | undefined;
|
|
1791
1838
|
content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
|
|
1792
1839
|
slug?: string | undefined;
|
|
@@ -1844,8 +1891,8 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
1844
1891
|
generateOperationSlug?: ((args_0: {
|
|
1845
1892
|
path: string;
|
|
1846
1893
|
method: string;
|
|
1847
|
-
operationId?: string | undefined;
|
|
1848
1894
|
summary?: string | undefined;
|
|
1895
|
+
operationId?: string | undefined;
|
|
1849
1896
|
}, ...args: unknown[]) => string) | undefined;
|
|
1850
1897
|
generateWebhookSlug?: ((args_0: {
|
|
1851
1898
|
name: string;
|
|
@@ -1859,6 +1906,7 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
1859
1906
|
onBeforeRequest?: ((args_0: {
|
|
1860
1907
|
request: Request;
|
|
1861
1908
|
}, ...args: unknown[]) => void | Promise<void>) | undefined;
|
|
1909
|
+
fetch?: ((args_0: string | Request | URL, args_1: any, ...args: unknown[]) => Promise<Response>) | undefined;
|
|
1862
1910
|
url?: string | undefined;
|
|
1863
1911
|
content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
|
|
1864
1912
|
slug?: string | undefined;
|
|
@@ -1875,6 +1923,7 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
1875
1923
|
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
1924
|
servers?: any[] | undefined;
|
|
1877
1925
|
showSidebar?: unknown;
|
|
1926
|
+
operationTitleSource?: unknown;
|
|
1878
1927
|
theme?: unknown;
|
|
1879
1928
|
_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
1929
|
onRequestSent?: ((args_0: string, ...args: unknown[]) => void) | undefined;
|
|
@@ -1887,6 +1936,7 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
1887
1936
|
renderer?: unknown;
|
|
1888
1937
|
}[];
|
|
1889
1938
|
})[] | undefined;
|
|
1939
|
+
telemetry?: boolean | undefined;
|
|
1890
1940
|
layout?: unknown;
|
|
1891
1941
|
proxy?: string | undefined;
|
|
1892
1942
|
isEditable?: unknown;
|
|
@@ -1928,8 +1978,8 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
1928
1978
|
generateOperationSlug?: ((args_0: {
|
|
1929
1979
|
path: string;
|
|
1930
1980
|
method: string;
|
|
1931
|
-
operationId?: string | undefined;
|
|
1932
1981
|
summary?: string | undefined;
|
|
1982
|
+
operationId?: string | undefined;
|
|
1933
1983
|
}, ...args: unknown[]) => string) | undefined;
|
|
1934
1984
|
generateWebhookSlug?: ((args_0: {
|
|
1935
1985
|
name: string;
|
|
@@ -1947,8 +1997,10 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
1947
1997
|
}>, {
|
|
1948
1998
|
hideClientButton: boolean;
|
|
1949
1999
|
showSidebar: boolean;
|
|
2000
|
+
operationTitleSource: "path" | "summary";
|
|
1950
2001
|
theme: "alternate" | "default" | "moon" | "purple" | "solarized" | "bluePlanet" | "deepSpace" | "saturn" | "kepler" | "elysiajs" | "fastify" | "mars" | "laserwave" | "none";
|
|
1951
2002
|
persistAuth: boolean;
|
|
2003
|
+
telemetry: boolean;
|
|
1952
2004
|
layout: "modern" | "classic";
|
|
1953
2005
|
isEditable: boolean;
|
|
1954
2006
|
isLoading: boolean;
|
|
@@ -1967,6 +2019,7 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
1967
2019
|
onBeforeRequest?: ((args_0: {
|
|
1968
2020
|
request: Request;
|
|
1969
2021
|
}, ...args: unknown[]) => void | Promise<void>) | undefined;
|
|
2022
|
+
fetch?: ((args_0: string | Request | URL, args_1: any, ...args: unknown[]) => Promise<Response>) | undefined;
|
|
1970
2023
|
url?: string | undefined;
|
|
1971
2024
|
content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
|
|
1972
2025
|
slug?: string | undefined;
|
|
@@ -2024,8 +2077,8 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
2024
2077
|
generateOperationSlug?: ((args_0: {
|
|
2025
2078
|
path: string;
|
|
2026
2079
|
method: string;
|
|
2027
|
-
operationId?: string | undefined;
|
|
2028
2080
|
summary?: string | undefined;
|
|
2081
|
+
operationId?: string | undefined;
|
|
2029
2082
|
}, ...args: unknown[]) => string) | undefined;
|
|
2030
2083
|
generateWebhookSlug?: ((args_0: {
|
|
2031
2084
|
name: string;
|
|
@@ -2039,6 +2092,7 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
2039
2092
|
onBeforeRequest?: ((args_0: {
|
|
2040
2093
|
request: Request;
|
|
2041
2094
|
}, ...args: unknown[]) => void | Promise<void>) | undefined;
|
|
2095
|
+
fetch?: ((args_0: string | Request | URL, args_1: any, ...args: unknown[]) => Promise<Response>) | undefined;
|
|
2042
2096
|
url?: string | undefined;
|
|
2043
2097
|
content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
|
|
2044
2098
|
slug?: string | undefined;
|
|
@@ -2055,6 +2109,7 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
2055
2109
|
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
2110
|
servers?: any[] | undefined;
|
|
2057
2111
|
showSidebar?: unknown;
|
|
2112
|
+
operationTitleSource?: unknown;
|
|
2058
2113
|
theme?: unknown;
|
|
2059
2114
|
_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
2115
|
onRequestSent?: ((args_0: string, ...args: unknown[]) => void) | undefined;
|
|
@@ -2067,6 +2122,7 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
2067
2122
|
renderer?: unknown;
|
|
2068
2123
|
}[];
|
|
2069
2124
|
})[] | undefined;
|
|
2125
|
+
telemetry?: boolean | undefined;
|
|
2070
2126
|
layout?: unknown;
|
|
2071
2127
|
proxy?: string | undefined;
|
|
2072
2128
|
isEditable?: unknown;
|
|
@@ -2108,8 +2164,8 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
2108
2164
|
generateOperationSlug?: ((args_0: {
|
|
2109
2165
|
path: string;
|
|
2110
2166
|
method: string;
|
|
2111
|
-
operationId?: string | undefined;
|
|
2112
2167
|
summary?: string | undefined;
|
|
2168
|
+
operationId?: string | undefined;
|
|
2113
2169
|
}, ...args: unknown[]) => string) | undefined;
|
|
2114
2170
|
generateWebhookSlug?: ((args_0: {
|
|
2115
2171
|
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,mFAAmF;;IAEnF,qCAAqC;;IAErC;;;OAGG;;IAEH;;;OAGG;;IAEH,+CAA+C;;IAE/C,kCAA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AI,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 */
|
|
@@ -200,8 +206,11 @@ const apiClientConfigurationSchema = z.object({
|
|
|
200
206
|
/** Whether to persist auth to local storage */
|
|
201
207
|
persistAuth: z.boolean().optional().default(false).catch(false),
|
|
202
208
|
/** Plugins for the API client */
|
|
203
|
-
plugins: z.array(ApiClientPluginSchema).optional()
|
|
209
|
+
plugins: z.array(ApiClientPluginSchema).optional(),
|
|
210
|
+
/** Enables / disables telemetry*/
|
|
211
|
+
telemetry: z.boolean().optional().default(true)
|
|
204
212
|
});
|
|
213
|
+
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
214
|
const _apiReferenceConfigurationSchema = apiClientConfigurationSchema.merge(
|
|
206
215
|
z.object({
|
|
207
216
|
/**
|
|
@@ -214,6 +223,12 @@ const _apiReferenceConfigurationSchema = apiClientConfigurationSchema.merge(
|
|
|
214
223
|
* @deprecated Use proxyUrl instead
|
|
215
224
|
*/
|
|
216
225
|
proxy: z.string().optional(),
|
|
226
|
+
/**
|
|
227
|
+
* Custom fetch function for custom logic
|
|
228
|
+
*
|
|
229
|
+
* Can be used to add custom headers, handle auth, etc.
|
|
230
|
+
*/
|
|
231
|
+
fetch: FetchLike,
|
|
217
232
|
/**
|
|
218
233
|
* Plugins for the API reference
|
|
219
234
|
*/
|
|
@@ -488,6 +503,7 @@ const migrateConfiguration = (_configuration) => {
|
|
|
488
503
|
const apiReferenceConfigurationSchema = _apiReferenceConfigurationSchema.transform(migrateConfiguration);
|
|
489
504
|
const isConfigurationWithSources = (config) => Boolean(!Array.isArray(config) && config && "sources" in config && Array.isArray(config.sources));
|
|
490
505
|
export {
|
|
506
|
+
FetchLike,
|
|
491
507
|
apiClientConfigurationSchema,
|
|
492
508
|
apiReferenceConfigurationSchema,
|
|
493
509
|
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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,EAAE,IAAI,CAAC,EAAE,SAAS;AAAA;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 /** Enables / disables telemetry*/\n telemetry: z.boolean().optional().default(true),\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;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