@scalar/types 0.1.2 → 0.1.4
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 +15 -0
- package/dist/api-reference/api-reference-configuration.d.ts +37 -737
- package/dist/api-reference/api-reference-configuration.d.ts.map +1 -1
- package/dist/api-reference/api-reference-configuration.js +3 -7
- package/dist/api-reference/authentication-configuration.d.ts +53 -0
- package/dist/api-reference/authentication-configuration.d.ts.map +1 -0
- package/dist/api-reference/authentication-configuration.test-d.d.ts +2 -0
- package/dist/api-reference/authentication-configuration.test-d.d.ts.map +1 -0
- package/dist/api-reference/index.d.ts +1 -1
- package/dist/api-reference/index.d.ts.map +1 -1
- package/dist/api-reference/index.js +1 -1
- package/dist/entities/index.d.ts +2 -0
- package/dist/entities/index.d.ts.map +1 -0
- package/dist/entities/index.js +1 -0
- package/dist/entities/security-scheme.d.ts +1436 -0
- package/dist/entities/security-scheme.d.ts.map +1 -0
- package/dist/entities/security-scheme.js +179 -0
- package/dist/legacy/reference-config.d.ts +15 -19
- package/dist/legacy/reference-config.d.ts.map +1 -1
- package/dist/utils/index.d.ts +2 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/nanoid.d.ts +18 -0
- package/dist/utils/nanoid.d.ts.map +1 -0
- package/dist/utils/nanoid.js +11 -0
- package/package.json +8 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import type { AuthenticationConfiguration } from '../api-reference/authentication-configuration.ts';
|
|
2
3
|
/** Configuration for the OpenAPI/Swagger specification */
|
|
3
4
|
export declare const specConfigurationSchema: z.ZodObject<{
|
|
4
5
|
/**
|
|
@@ -222,7 +223,7 @@ export declare const apiClientConfigurationSchema: z.ZodObject<{
|
|
|
222
223
|
authentication?: any;
|
|
223
224
|
baseServerURL?: string | undefined;
|
|
224
225
|
proxyUrl?: string | undefined;
|
|
225
|
-
searchHotKey?: "
|
|
226
|
+
searchHotKey?: "o" | "n" | "c" | "r" | "a" | "b" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "p" | "q" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | undefined;
|
|
226
227
|
servers?: any[] | undefined;
|
|
227
228
|
_integration?: "go" | "elysiajs" | "fastify" | "adonisjs" | "docusaurus" | "dotnet" | "express" | "fastapi" | "hono" | "html" | "laravel" | "litestar" | "nestjs" | "nextjs" | "nitro" | "nuxt" | "platformatic" | "react" | "rust" | "vue" | null | undefined;
|
|
228
229
|
}, {
|
|
@@ -240,7 +241,7 @@ export declare const apiClientConfigurationSchema: z.ZodObject<{
|
|
|
240
241
|
baseServerURL?: string | undefined;
|
|
241
242
|
hideClientButton?: unknown;
|
|
242
243
|
proxyUrl?: string | undefined;
|
|
243
|
-
searchHotKey?: "
|
|
244
|
+
searchHotKey?: "o" | "n" | "c" | "r" | "a" | "b" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "p" | "q" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | undefined;
|
|
244
245
|
servers?: any[] | undefined;
|
|
245
246
|
showSidebar?: unknown;
|
|
246
247
|
theme?: unknown;
|
|
@@ -446,13 +447,13 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
446
447
|
hiddenClients: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>>, z.ZodArray<z.ZodString, "many">, z.ZodLiteral<true>]>>;
|
|
447
448
|
/** Determine the HTTP client that's selected by default */
|
|
448
449
|
defaultHttpClient: z.ZodOptional<z.ZodObject<{
|
|
449
|
-
targetKey: z.ZodType<"
|
|
450
|
+
targetKey: z.ZodType<"http" | "c" | "clojure" | "csharp" | "go" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart", z.ZodTypeDef, "http" | "c" | "clojure" | "csharp" | "go" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart">;
|
|
450
451
|
clientKey: z.ZodString;
|
|
451
452
|
}, "strip", z.ZodTypeAny, {
|
|
452
|
-
targetKey: "
|
|
453
|
+
targetKey: "http" | "c" | "clojure" | "csharp" | "go" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart";
|
|
453
454
|
clientKey: string;
|
|
454
455
|
}, {
|
|
455
|
-
targetKey: "
|
|
456
|
+
targetKey: "http" | "c" | "clojure" | "csharp" | "go" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart";
|
|
456
457
|
clientKey: string;
|
|
457
458
|
}>>;
|
|
458
459
|
/** Custom CSS to be added to the page */
|
|
@@ -461,6 +462,8 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
461
462
|
onSpecUpdate: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodVoid>>;
|
|
462
463
|
/** onServerChange is fired on selected server change */
|
|
463
464
|
onServerChange: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodVoid>>;
|
|
465
|
+
/** onDocumentSelect is fired when the config is selected */
|
|
466
|
+
onDocumentSelect: z.ZodOptional<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnion<[z.ZodVoid, z.ZodPromise<z.ZodVoid>]>>>;
|
|
464
467
|
/**
|
|
465
468
|
* Route using paths instead of hashes, your server MUST support this
|
|
466
469
|
* @example '/standalone-api-reference/:custom(.*)?'
|
|
@@ -618,7 +621,7 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
618
621
|
authentication?: any;
|
|
619
622
|
baseServerURL?: string | undefined;
|
|
620
623
|
proxyUrl?: string | undefined;
|
|
621
|
-
searchHotKey?: "
|
|
624
|
+
searchHotKey?: "o" | "n" | "c" | "r" | "a" | "b" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "p" | "q" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | undefined;
|
|
622
625
|
servers?: any[] | undefined;
|
|
623
626
|
_integration?: "go" | "elysiajs" | "fastify" | "adonisjs" | "docusaurus" | "dotnet" | "express" | "fastapi" | "hono" | "html" | "laravel" | "litestar" | "nestjs" | "nextjs" | "nitro" | "nuxt" | "platformatic" | "react" | "rust" | "vue" | null | undefined;
|
|
624
627
|
proxy?: string | undefined;
|
|
@@ -628,12 +631,13 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
628
631
|
favicon?: string | undefined;
|
|
629
632
|
hiddenClients?: true | string[] | Record<string, boolean | string[]> | undefined;
|
|
630
633
|
defaultHttpClient?: {
|
|
631
|
-
targetKey: "
|
|
634
|
+
targetKey: "http" | "c" | "clojure" | "csharp" | "go" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart";
|
|
632
635
|
clientKey: string;
|
|
633
636
|
} | undefined;
|
|
634
637
|
customCss?: string | undefined;
|
|
635
638
|
onSpecUpdate?: ((args_0: string, ...args: unknown[]) => void) | undefined;
|
|
636
639
|
onServerChange?: ((args_0: string, ...args: unknown[]) => void) | undefined;
|
|
640
|
+
onDocumentSelect?: ((...args: unknown[]) => void | Promise<void>) | undefined;
|
|
637
641
|
pathRouting?: {
|
|
638
642
|
basePath: string;
|
|
639
643
|
} | undefined;
|
|
@@ -676,7 +680,7 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
676
680
|
baseServerURL?: string | undefined;
|
|
677
681
|
hideClientButton?: unknown;
|
|
678
682
|
proxyUrl?: string | undefined;
|
|
679
|
-
searchHotKey?: "
|
|
683
|
+
searchHotKey?: "o" | "n" | "c" | "r" | "a" | "b" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "p" | "q" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | undefined;
|
|
680
684
|
servers?: any[] | undefined;
|
|
681
685
|
showSidebar?: unknown;
|
|
682
686
|
theme?: unknown;
|
|
@@ -696,12 +700,13 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
696
700
|
favicon?: string | undefined;
|
|
697
701
|
hiddenClients?: true | string[] | Record<string, boolean | string[]> | undefined;
|
|
698
702
|
defaultHttpClient?: {
|
|
699
|
-
targetKey: "
|
|
703
|
+
targetKey: "http" | "c" | "clojure" | "csharp" | "go" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart";
|
|
700
704
|
clientKey: string;
|
|
701
705
|
} | undefined;
|
|
702
706
|
customCss?: string | undefined;
|
|
703
707
|
onSpecUpdate?: ((args_0: string, ...args: unknown[]) => void) | undefined;
|
|
704
708
|
onServerChange?: ((args_0: string, ...args: unknown[]) => void) | undefined;
|
|
709
|
+
onDocumentSelect?: ((...args: unknown[]) => void | Promise<void>) | undefined;
|
|
705
710
|
pathRouting?: {
|
|
706
711
|
basePath: string;
|
|
707
712
|
} | undefined;
|
|
@@ -756,7 +761,7 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
756
761
|
authentication?: any;
|
|
757
762
|
baseServerURL?: string | undefined;
|
|
758
763
|
proxyUrl?: string | undefined;
|
|
759
|
-
searchHotKey?: "
|
|
764
|
+
searchHotKey?: "o" | "n" | "c" | "r" | "a" | "b" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "p" | "q" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | undefined;
|
|
760
765
|
servers?: any[] | undefined;
|
|
761
766
|
_integration?: "go" | "elysiajs" | "fastify" | "adonisjs" | "docusaurus" | "dotnet" | "express" | "fastapi" | "hono" | "html" | "laravel" | "litestar" | "nestjs" | "nextjs" | "nitro" | "nuxt" | "platformatic" | "react" | "rust" | "vue" | null | undefined;
|
|
762
767
|
proxy?: string | undefined;
|
|
@@ -766,12 +771,13 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
766
771
|
favicon?: string | undefined;
|
|
767
772
|
hiddenClients?: true | string[] | Record<string, boolean | string[]> | undefined;
|
|
768
773
|
defaultHttpClient?: {
|
|
769
|
-
targetKey: "
|
|
774
|
+
targetKey: "http" | "c" | "clojure" | "csharp" | "go" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart";
|
|
770
775
|
clientKey: string;
|
|
771
776
|
} | undefined;
|
|
772
777
|
customCss?: string | undefined;
|
|
773
778
|
onSpecUpdate?: ((args_0: string, ...args: unknown[]) => void) | undefined;
|
|
774
779
|
onServerChange?: ((args_0: string, ...args: unknown[]) => void) | undefined;
|
|
780
|
+
onDocumentSelect?: ((...args: unknown[]) => void | Promise<void>) | undefined;
|
|
775
781
|
pathRouting?: {
|
|
776
782
|
basePath: string;
|
|
777
783
|
} | undefined;
|
|
@@ -814,7 +820,7 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
814
820
|
baseServerURL?: string | undefined;
|
|
815
821
|
hideClientButton?: unknown;
|
|
816
822
|
proxyUrl?: string | undefined;
|
|
817
|
-
searchHotKey?: "
|
|
823
|
+
searchHotKey?: "o" | "n" | "c" | "r" | "a" | "b" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "p" | "q" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | undefined;
|
|
818
824
|
servers?: any[] | undefined;
|
|
819
825
|
showSidebar?: unknown;
|
|
820
826
|
theme?: unknown;
|
|
@@ -834,12 +840,13 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
834
840
|
favicon?: string | undefined;
|
|
835
841
|
hiddenClients?: true | string[] | Record<string, boolean | string[]> | undefined;
|
|
836
842
|
defaultHttpClient?: {
|
|
837
|
-
targetKey: "
|
|
843
|
+
targetKey: "http" | "c" | "clojure" | "csharp" | "go" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart";
|
|
838
844
|
clientKey: string;
|
|
839
845
|
} | undefined;
|
|
840
846
|
customCss?: string | undefined;
|
|
841
847
|
onSpecUpdate?: ((args_0: string, ...args: unknown[]) => void) | undefined;
|
|
842
848
|
onServerChange?: ((args_0: string, ...args: unknown[]) => void) | undefined;
|
|
849
|
+
onDocumentSelect?: ((...args: unknown[]) => void | Promise<void>) | undefined;
|
|
843
850
|
pathRouting?: {
|
|
844
851
|
basePath: string;
|
|
845
852
|
} | undefined;
|
|
@@ -870,730 +877,23 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
870
877
|
operationsSorter?: "method" | "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
|
|
871
878
|
}>;
|
|
872
879
|
/** Configuration after parsing, this is the main type */
|
|
873
|
-
export type ApiReferenceConfiguration = Omit<z.infer<typeof apiReferenceConfigurationSchema>, 'proxy' | 'spec'
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
/**
|
|
888
|
-
* The title of the OpenAPI document.
|
|
889
|
-
*
|
|
890
|
-
* @example 'Scalar Galaxy'
|
|
891
|
-
*/
|
|
892
|
-
title: z.ZodOptional<z.ZodString>;
|
|
893
|
-
/**
|
|
894
|
-
* The slug of the OpenAPI document used in the URL.
|
|
895
|
-
*
|
|
896
|
-
* If none is passed, the title will be used.
|
|
897
|
-
*
|
|
898
|
-
* If no title is used, it’ll just use the index.
|
|
899
|
-
*
|
|
900
|
-
* @example 'scalar-galaxy'
|
|
901
|
-
*/
|
|
902
|
-
slug: z.ZodOptional<z.ZodString>;
|
|
903
|
-
/**
|
|
904
|
-
* The OpenAPI/Swagger document to render
|
|
905
|
-
*
|
|
906
|
-
* @deprecated Use `url` and `content` on the top level instead.
|
|
907
|
-
**/
|
|
908
|
-
spec: z.ZodOptional<z.ZodObject<{
|
|
909
|
-
/**
|
|
910
|
-
* URL to an OpenAPI/Swagger document
|
|
911
|
-
*
|
|
912
|
-
* @deprecated Please move `url` to the top level and remove the `spec` prefix.
|
|
913
|
-
*
|
|
914
|
-
* @example
|
|
915
|
-
* ```ts
|
|
916
|
-
* const oldConfiguration = {
|
|
917
|
-
* spec: {
|
|
918
|
-
* url: 'https://example.com/openapi.json',
|
|
919
|
-
* },
|
|
920
|
-
* }
|
|
921
|
-
*
|
|
922
|
-
* const newConfiguration = {
|
|
923
|
-
* url: 'https://example.com/openapi.json',
|
|
924
|
-
* }
|
|
925
|
-
* ```
|
|
926
|
-
**/
|
|
927
|
-
url: z.ZodOptional<z.ZodString>;
|
|
928
|
-
/**
|
|
929
|
-
* Directly embed the OpenAPI document.
|
|
930
|
-
* Can be a string, object, function returning an object, or null.
|
|
931
|
-
*
|
|
932
|
-
* @remarks It's recommended to pass a URL instead of content.
|
|
933
|
-
*
|
|
934
|
-
* @deprecated Please move `content` to the top level and remove the `spec` prefix.
|
|
935
|
-
*
|
|
936
|
-
* @example
|
|
937
|
-
* ```ts
|
|
938
|
-
* const oldConfiguration = {
|
|
939
|
-
* spec: {
|
|
940
|
-
* content: '…',
|
|
941
|
-
* },
|
|
942
|
-
* }
|
|
943
|
-
*
|
|
944
|
-
* const newConfiguration = {
|
|
945
|
-
* content: '…',
|
|
946
|
-
* }
|
|
947
|
-
* ```
|
|
948
|
-
**/
|
|
949
|
-
content: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodAny>>, z.ZodNull]>>;
|
|
950
|
-
/**
|
|
951
|
-
* The title of the OpenAPI document.
|
|
952
|
-
*
|
|
953
|
-
* @example 'Scalar Galaxy'
|
|
954
|
-
*
|
|
955
|
-
* @deprecated Please move `title` to the top level and remove the `spec` prefix.
|
|
956
|
-
*/
|
|
957
|
-
title: z.ZodOptional<z.ZodString>;
|
|
958
|
-
/**
|
|
959
|
-
* The slug of the OpenAPI document used in the URL.
|
|
960
|
-
*
|
|
961
|
-
* If none is passed, the title will be used.
|
|
962
|
-
*
|
|
963
|
-
* If no title is used, it’ll just use the index.
|
|
964
|
-
*
|
|
965
|
-
* @example 'scalar-galaxy'
|
|
966
|
-
*
|
|
967
|
-
* @deprecated Please move `slug` to the top level and remove the `spec` prefix.
|
|
968
|
-
*/
|
|
969
|
-
slug: z.ZodOptional<z.ZodString>;
|
|
970
|
-
}, "strip", z.ZodTypeAny, {
|
|
971
|
-
url?: string | undefined;
|
|
972
|
-
content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
|
|
973
|
-
title?: string | undefined;
|
|
974
|
-
slug?: string | undefined;
|
|
975
|
-
}, {
|
|
976
|
-
url?: string | undefined;
|
|
977
|
-
content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
|
|
978
|
-
title?: string | undefined;
|
|
979
|
-
slug?: string | undefined;
|
|
980
|
-
}>>;
|
|
981
|
-
/** Prefill authentication */
|
|
982
|
-
authentication: z.ZodOptional<z.ZodAny>;
|
|
983
|
-
/** Base URL for the API server */
|
|
984
|
-
baseServerURL: z.ZodOptional<z.ZodString>;
|
|
985
|
-
/**
|
|
986
|
-
* Whether to hide the client button
|
|
987
|
-
* @default false
|
|
988
|
-
*/
|
|
989
|
-
hideClientButton: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
990
|
-
/** URL to a request proxy for the API client */
|
|
991
|
-
proxyUrl: z.ZodOptional<z.ZodString>;
|
|
992
|
-
/** Key used with CTRL/CMD to open the search modal (defaults to 'k' e.g. CMD+k) */
|
|
993
|
-
searchHotKey: z.ZodOptional<z.ZodEnum<["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]>>;
|
|
994
|
-
/** List of OpenAPI server objects */
|
|
995
|
-
servers: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
|
|
996
|
-
/**
|
|
997
|
-
* Whether to show the sidebar
|
|
998
|
-
* @default true
|
|
999
|
-
*/
|
|
1000
|
-
showSidebar: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
1001
|
-
/** A string to use one of the color presets */
|
|
1002
|
-
theme: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<["alternate", "default", "moon", "purple", "solarized", "bluePlanet", "deepSpace", "saturn", "kepler", "elysiajs", "fastify", "mars", "none"]>>>>;
|
|
1003
|
-
/** Integration type identifier */
|
|
1004
|
-
_integration: z.ZodOptional<z.ZodNullable<z.ZodEnum<["adonisjs", "docusaurus", "dotnet", "elysiajs", "express", "fastapi", "fastify", "go", "hono", "html", "laravel", "litestar", "nestjs", "nextjs", "nitro", "nuxt", "platformatic", "react", "rust", "vue"]>>>;
|
|
1005
|
-
}, {
|
|
1006
|
-
/**
|
|
1007
|
-
* The layout to use for the references
|
|
1008
|
-
* @default 'modern'
|
|
1009
|
-
*/
|
|
1010
|
-
layout: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<["modern", "classic"]>>>>;
|
|
1011
|
-
/**
|
|
1012
|
-
* URL to a request proxy for the API client
|
|
1013
|
-
* @deprecated Use proxyUrl instead
|
|
1014
|
-
*/
|
|
1015
|
-
proxy: z.ZodOptional<z.ZodString>;
|
|
1016
|
-
/**
|
|
1017
|
-
* Whether the spec input should show
|
|
1018
|
-
* @default false
|
|
1019
|
-
*/
|
|
1020
|
-
isEditable: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
1021
|
-
/**
|
|
1022
|
-
* Controls whether the references show a loading state in the intro
|
|
1023
|
-
* @default false
|
|
1024
|
-
*/
|
|
1025
|
-
isLoading: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
1026
|
-
/**
|
|
1027
|
-
* Whether to show models in the sidebar, search, and content.
|
|
1028
|
-
* @default false
|
|
1029
|
-
*/
|
|
1030
|
-
hideModels: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
1031
|
-
/**
|
|
1032
|
-
* Whether to show the "Download OpenAPI Document" button
|
|
1033
|
-
* @default false
|
|
1034
|
-
*/
|
|
1035
|
-
hideDownloadButton: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
1036
|
-
/**
|
|
1037
|
-
* Whether to show the "Test Request" button
|
|
1038
|
-
* @default false
|
|
1039
|
-
*/
|
|
1040
|
-
hideTestRequestButton: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
1041
|
-
/**
|
|
1042
|
-
* Whether to show the sidebar search bar
|
|
1043
|
-
* @default false
|
|
1044
|
-
*/
|
|
1045
|
-
hideSearch: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
1046
|
-
/** Whether dark mode is on or off initially (light mode) */
|
|
1047
|
-
darkMode: z.ZodOptional<z.ZodBoolean>;
|
|
1048
|
-
/** forceDarkModeState makes it always this state no matter what */
|
|
1049
|
-
forceDarkModeState: z.ZodOptional<z.ZodEnum<["dark", "light"]>>;
|
|
1050
|
-
/**
|
|
1051
|
-
* Whether to show the dark mode toggle
|
|
1052
|
-
* @default false
|
|
1053
|
-
*/
|
|
1054
|
-
hideDarkModeToggle: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
1055
|
-
/**
|
|
1056
|
-
* If used, passed data will be added to the HTML header
|
|
1057
|
-
* @see https://unhead.unjs.io/usage/composables/use-seo-meta
|
|
1058
|
-
*/
|
|
1059
|
-
metaData: z.ZodOptional<z.ZodAny>;
|
|
1060
|
-
/**
|
|
1061
|
-
* Path to a favicon image
|
|
1062
|
-
* @default undefined
|
|
1063
|
-
* @example '/favicon.svg'
|
|
1064
|
-
*/
|
|
1065
|
-
favicon: z.ZodOptional<z.ZodString>;
|
|
1066
|
-
/**
|
|
1067
|
-
* List of httpsnippet clients to hide from the clients menu
|
|
1068
|
-
* By default hides Unirest, pass `[]` to show all clients
|
|
1069
|
-
*/
|
|
1070
|
-
hiddenClients: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>>, z.ZodArray<z.ZodString, "many">, z.ZodLiteral<true>]>>;
|
|
1071
|
-
/** Determine the HTTP client that's selected by default */
|
|
1072
|
-
defaultHttpClient: z.ZodOptional<z.ZodObject<{
|
|
1073
|
-
targetKey: z.ZodType<"c" | "clojure" | "csharp" | "go" | "http" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart", z.ZodTypeDef, "c" | "clojure" | "csharp" | "go" | "http" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart">;
|
|
1074
|
-
clientKey: z.ZodString;
|
|
1075
|
-
}, "strip", z.ZodTypeAny, {
|
|
1076
|
-
targetKey: "c" | "clojure" | "csharp" | "go" | "http" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart";
|
|
1077
|
-
clientKey: string;
|
|
1078
|
-
}, {
|
|
1079
|
-
targetKey: "c" | "clojure" | "csharp" | "go" | "http" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart";
|
|
1080
|
-
clientKey: string;
|
|
1081
|
-
}>>;
|
|
1082
|
-
/** Custom CSS to be added to the page */
|
|
1083
|
-
customCss: z.ZodOptional<z.ZodString>;
|
|
1084
|
-
/** onSpecUpdate is fired on spec/swagger content change */
|
|
1085
|
-
onSpecUpdate: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodVoid>>;
|
|
1086
|
-
/** onServerChange is fired on selected server change */
|
|
1087
|
-
onServerChange: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodVoid>>;
|
|
1088
|
-
/**
|
|
1089
|
-
* Route using paths instead of hashes, your server MUST support this
|
|
1090
|
-
* @example '/standalone-api-reference/:custom(.*)?'
|
|
1091
|
-
* @experimental
|
|
1092
|
-
* @default undefined
|
|
1093
|
-
*/
|
|
1094
|
-
pathRouting: z.ZodOptional<z.ZodObject<{
|
|
1095
|
-
/** Base path for the API reference */
|
|
1096
|
-
basePath: z.ZodString;
|
|
1097
|
-
}, "strip", z.ZodTypeAny, {
|
|
1098
|
-
basePath: string;
|
|
1099
|
-
}, {
|
|
1100
|
-
basePath: string;
|
|
1101
|
-
}>>;
|
|
1102
|
-
/**
|
|
1103
|
-
* Customize the heading portion of the hash
|
|
1104
|
-
* @param heading - The heading object
|
|
1105
|
-
* @returns A string ID used to generate the URL hash
|
|
1106
|
-
* @default (heading) => `#description/${heading.slug}`
|
|
1107
|
-
*/
|
|
1108
|
-
generateHeadingSlug: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodObject<{
|
|
1109
|
-
slug: z.ZodDefault<z.ZodString>;
|
|
1110
|
-
}, "strip", z.ZodTypeAny, {
|
|
1111
|
-
slug: string;
|
|
1112
|
-
}, {
|
|
1113
|
-
slug?: string | undefined;
|
|
1114
|
-
}>], z.ZodUnknown>, z.ZodString>>;
|
|
1115
|
-
/**
|
|
1116
|
-
* Customize the model portion of the hash
|
|
1117
|
-
* @param model - The model object with a name property
|
|
1118
|
-
* @returns A string ID used to generate the URL hash
|
|
1119
|
-
* @default (model) => slug(model.name)
|
|
1120
|
-
*/
|
|
1121
|
-
generateModelSlug: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodObject<{
|
|
1122
|
-
name: z.ZodDefault<z.ZodString>;
|
|
1123
|
-
}, "strip", z.ZodTypeAny, {
|
|
1124
|
-
name: string;
|
|
1125
|
-
}, {
|
|
1126
|
-
name?: string | undefined;
|
|
1127
|
-
}>], z.ZodUnknown>, z.ZodString>>;
|
|
1128
|
-
/**
|
|
1129
|
-
* Customize the tag portion of the hash
|
|
1130
|
-
* @param tag - The tag object
|
|
1131
|
-
* @returns A string ID used to generate the URL hash
|
|
1132
|
-
* @default (tag) => slug(tag.name)
|
|
1133
|
-
*/
|
|
1134
|
-
generateTagSlug: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodObject<{
|
|
1135
|
-
name: z.ZodDefault<z.ZodString>;
|
|
1136
|
-
}, "strip", z.ZodTypeAny, {
|
|
1137
|
-
name: string;
|
|
1138
|
-
}, {
|
|
1139
|
-
name?: string | undefined;
|
|
1140
|
-
}>], z.ZodUnknown>, z.ZodString>>;
|
|
1141
|
-
/**
|
|
1142
|
-
* Customize the operation portion of the hash
|
|
1143
|
-
* @param operation - The operation object
|
|
1144
|
-
* @returns A string ID used to generate the URL hash
|
|
1145
|
-
* @default (operation) => `${operation.method}${operation.path}`
|
|
1146
|
-
*/
|
|
1147
|
-
generateOperationSlug: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodObject<{
|
|
1148
|
-
path: z.ZodString;
|
|
1149
|
-
operationId: z.ZodOptional<z.ZodString>;
|
|
1150
|
-
method: z.ZodString;
|
|
1151
|
-
summary: z.ZodOptional<z.ZodString>;
|
|
1152
|
-
}, "strip", z.ZodTypeAny, {
|
|
1153
|
-
path: string;
|
|
1154
|
-
method: string;
|
|
1155
|
-
operationId?: string | undefined;
|
|
1156
|
-
summary?: string | undefined;
|
|
1157
|
-
}, {
|
|
1158
|
-
path: string;
|
|
1159
|
-
method: string;
|
|
1160
|
-
operationId?: string | undefined;
|
|
1161
|
-
summary?: string | undefined;
|
|
1162
|
-
}>], z.ZodUnknown>, z.ZodString>>;
|
|
1163
|
-
/**
|
|
1164
|
-
* Customize the webhook portion of the hash
|
|
1165
|
-
* @param webhook - The webhook object
|
|
1166
|
-
* @returns A string ID used to generate the URL hash
|
|
1167
|
-
* @default (webhook) => slug(webhook.name)
|
|
1168
|
-
*/
|
|
1169
|
-
generateWebhookSlug: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodObject<{
|
|
1170
|
-
name: z.ZodString;
|
|
1171
|
-
method: z.ZodOptional<z.ZodString>;
|
|
1172
|
-
}, "strip", z.ZodTypeAny, {
|
|
1173
|
-
name: string;
|
|
1174
|
-
method?: string | undefined;
|
|
1175
|
-
}, {
|
|
1176
|
-
name: string;
|
|
1177
|
-
method?: string | undefined;
|
|
1178
|
-
}>], z.ZodUnknown>, z.ZodString>>;
|
|
1179
|
-
/** Callback fired when the reference is fully loaded */
|
|
1180
|
-
onLoaded: z.ZodOptional<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodVoid>>;
|
|
1181
|
-
/**
|
|
1182
|
-
* To handle redirects, pass a function that will recieve:
|
|
1183
|
-
* - The current path with hash if pathRouting is enabled
|
|
1184
|
-
* - The current hash if hashRouting (default)
|
|
1185
|
-
* And then passes that to history.replaceState
|
|
1186
|
-
*
|
|
1187
|
-
* @example hashRouting (default)
|
|
1188
|
-
* ```ts
|
|
1189
|
-
* redirect: (hash: string) => hash.replace('#v1/old-path', '#v2/new-path')
|
|
1190
|
-
* ```
|
|
1191
|
-
* @example pathRouting
|
|
1192
|
-
* ```ts
|
|
1193
|
-
* redirect: (pathWithHash: string) => {
|
|
1194
|
-
* if (pathWithHash.includes('#')) {
|
|
1195
|
-
* return pathWithHash.replace('/v1/tags/user#operation/get-user', '/v1/tags/user/operation/get-user')
|
|
1196
|
-
* }
|
|
1197
|
-
* return null
|
|
1198
|
-
* }
|
|
1199
|
-
* ```
|
|
1200
|
-
*/
|
|
1201
|
-
redirect: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodOptional<z.ZodNullable<z.ZodString>>>>;
|
|
1202
|
-
/**
|
|
1203
|
-
* Whether to include default fonts
|
|
1204
|
-
* @default true
|
|
1205
|
-
*/
|
|
1206
|
-
withDefaultFonts: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
1207
|
-
/** Whether to expand all tags by default */
|
|
1208
|
-
defaultOpenAllTags: z.ZodOptional<z.ZodBoolean>;
|
|
1209
|
-
/**
|
|
1210
|
-
* Function to sort tags
|
|
1211
|
-
* @default 'alpha' for alphabetical sorting
|
|
1212
|
-
*/
|
|
1213
|
-
tagsSorter: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"alpha">, z.ZodFunction<z.ZodTuple<[z.ZodAny, z.ZodAny], z.ZodUnknown>, z.ZodNumber>]>>;
|
|
1214
|
-
/**
|
|
1215
|
-
* Function to sort operations
|
|
1216
|
-
* @default 'alpha' for alphabetical sorting
|
|
1217
|
-
*/
|
|
1218
|
-
operationsSorter: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"alpha">, z.ZodLiteral<"method">, z.ZodFunction<z.ZodTuple<[z.ZodAny, z.ZodAny], z.ZodUnknown>, z.ZodNumber>]>>;
|
|
1219
|
-
}>, {
|
|
1220
|
-
sources: z.ZodArray<z.ZodObject<{
|
|
1221
|
-
/**
|
|
1222
|
-
* URL to an OpenAPI/Swagger document
|
|
1223
|
-
*
|
|
1224
|
-
* @deprecated Please move `url` to the top level and remove the `spec` prefix.
|
|
1225
|
-
*
|
|
1226
|
-
* @example
|
|
1227
|
-
* ```ts
|
|
1228
|
-
* const oldConfiguration = {
|
|
1229
|
-
* spec: {
|
|
1230
|
-
* url: 'https://example.com/openapi.json',
|
|
1231
|
-
* },
|
|
1232
|
-
* }
|
|
1233
|
-
*
|
|
1234
|
-
* const newConfiguration = {
|
|
1235
|
-
* url: 'https://example.com/openapi.json',
|
|
1236
|
-
* }
|
|
1237
|
-
* ```
|
|
1238
|
-
**/
|
|
1239
|
-
url: z.ZodOptional<z.ZodString>;
|
|
1240
|
-
/**
|
|
1241
|
-
* Directly embed the OpenAPI document.
|
|
1242
|
-
* Can be a string, object, function returning an object, or null.
|
|
1243
|
-
*
|
|
1244
|
-
* @remarks It's recommended to pass a URL instead of content.
|
|
1245
|
-
*
|
|
1246
|
-
* @deprecated Please move `content` to the top level and remove the `spec` prefix.
|
|
1247
|
-
*
|
|
1248
|
-
* @example
|
|
1249
|
-
* ```ts
|
|
1250
|
-
* const oldConfiguration = {
|
|
1251
|
-
* spec: {
|
|
1252
|
-
* content: '…',
|
|
1253
|
-
* },
|
|
1254
|
-
* }
|
|
1255
|
-
*
|
|
1256
|
-
* const newConfiguration = {
|
|
1257
|
-
* content: '…',
|
|
1258
|
-
* }
|
|
1259
|
-
* ```
|
|
1260
|
-
**/
|
|
1261
|
-
content: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodAny>>, z.ZodNull]>>;
|
|
1262
|
-
/**
|
|
1263
|
-
* The title of the OpenAPI document.
|
|
1264
|
-
*
|
|
1265
|
-
* @example 'Scalar Galaxy'
|
|
1266
|
-
*
|
|
1267
|
-
* @deprecated Please move `title` to the top level and remove the `spec` prefix.
|
|
1268
|
-
*/
|
|
1269
|
-
title: z.ZodOptional<z.ZodString>;
|
|
1270
|
-
/**
|
|
1271
|
-
* The slug of the OpenAPI document used in the URL.
|
|
1272
|
-
*
|
|
1273
|
-
* If none is passed, the title will be used.
|
|
1274
|
-
*
|
|
1275
|
-
* If no title is used, it’ll just use the index.
|
|
1276
|
-
*
|
|
1277
|
-
* @example 'scalar-galaxy'
|
|
1278
|
-
*
|
|
1279
|
-
* @deprecated Please move `slug` to the top level and remove the `spec` prefix.
|
|
1280
|
-
*/
|
|
1281
|
-
slug: z.ZodOptional<z.ZodString>;
|
|
1282
|
-
}, "strip", z.ZodTypeAny, {
|
|
1283
|
-
url?: string | undefined;
|
|
1284
|
-
content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
|
|
1285
|
-
title?: string | undefined;
|
|
1286
|
-
slug?: string | undefined;
|
|
1287
|
-
}, {
|
|
1288
|
-
url?: string | undefined;
|
|
1289
|
-
content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
|
|
1290
|
-
title?: string | undefined;
|
|
1291
|
-
slug?: string | undefined;
|
|
1292
|
-
}>, "many">;
|
|
1293
|
-
}>, "strip", z.ZodTypeAny, {
|
|
1294
|
-
hideClientButton: boolean;
|
|
1295
|
-
showSidebar: boolean;
|
|
1296
|
-
theme: "alternate" | "default" | "moon" | "purple" | "solarized" | "bluePlanet" | "deepSpace" | "saturn" | "kepler" | "elysiajs" | "fastify" | "mars" | "none";
|
|
1297
|
-
layout: "modern" | "classic";
|
|
1298
|
-
isEditable: boolean;
|
|
1299
|
-
isLoading: boolean;
|
|
1300
|
-
hideModels: boolean;
|
|
1301
|
-
hideDownloadButton: boolean;
|
|
1302
|
-
hideTestRequestButton: boolean;
|
|
1303
|
-
hideSearch: boolean;
|
|
1304
|
-
hideDarkModeToggle: boolean;
|
|
1305
|
-
withDefaultFonts: boolean;
|
|
1306
|
-
sources: {
|
|
1307
|
-
url?: string | undefined;
|
|
1308
|
-
content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
|
|
1309
|
-
title?: string | undefined;
|
|
1310
|
-
slug?: string | undefined;
|
|
1311
|
-
}[];
|
|
1312
|
-
url?: string | undefined;
|
|
1313
|
-
content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
|
|
1314
|
-
title?: string | undefined;
|
|
1315
|
-
slug?: string | undefined;
|
|
1316
|
-
spec?: {
|
|
1317
|
-
url?: string | undefined;
|
|
1318
|
-
content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
|
|
1319
|
-
title?: string | undefined;
|
|
1320
|
-
slug?: string | undefined;
|
|
1321
|
-
} | undefined;
|
|
1322
|
-
authentication?: any;
|
|
1323
|
-
baseServerURL?: string | undefined;
|
|
1324
|
-
proxyUrl?: string | undefined;
|
|
1325
|
-
searchHotKey?: "c" | "r" | "o" | "n" | "a" | "b" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "p" | "q" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | undefined;
|
|
1326
|
-
servers?: any[] | undefined;
|
|
1327
|
-
_integration?: "go" | "elysiajs" | "fastify" | "adonisjs" | "docusaurus" | "dotnet" | "express" | "fastapi" | "hono" | "html" | "laravel" | "litestar" | "nestjs" | "nextjs" | "nitro" | "nuxt" | "platformatic" | "react" | "rust" | "vue" | null | undefined;
|
|
1328
|
-
proxy?: string | undefined;
|
|
1329
|
-
darkMode?: boolean | undefined;
|
|
1330
|
-
forceDarkModeState?: "dark" | "light" | undefined;
|
|
1331
|
-
metaData?: any;
|
|
1332
|
-
favicon?: string | undefined;
|
|
1333
|
-
hiddenClients?: true | string[] | Record<string, boolean | string[]> | undefined;
|
|
1334
|
-
defaultHttpClient?: {
|
|
1335
|
-
targetKey: "c" | "clojure" | "csharp" | "go" | "http" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart";
|
|
1336
|
-
clientKey: string;
|
|
1337
|
-
} | undefined;
|
|
1338
|
-
customCss?: string | undefined;
|
|
1339
|
-
onSpecUpdate?: ((args_0: string, ...args: unknown[]) => void) | undefined;
|
|
1340
|
-
onServerChange?: ((args_0: string, ...args: unknown[]) => void) | undefined;
|
|
1341
|
-
pathRouting?: {
|
|
1342
|
-
basePath: string;
|
|
1343
|
-
} | undefined;
|
|
1344
|
-
generateHeadingSlug?: ((args_0: {
|
|
1345
|
-
slug?: string | undefined;
|
|
1346
|
-
}, ...args: unknown[]) => string) | undefined;
|
|
1347
|
-
generateModelSlug?: ((args_0: {
|
|
1348
|
-
name?: string | undefined;
|
|
1349
|
-
}, ...args: unknown[]) => string) | undefined;
|
|
1350
|
-
generateTagSlug?: ((args_0: {
|
|
1351
|
-
name?: string | undefined;
|
|
1352
|
-
}, ...args: unknown[]) => string) | undefined;
|
|
1353
|
-
generateOperationSlug?: ((args_0: {
|
|
1354
|
-
path: string;
|
|
1355
|
-
method: string;
|
|
1356
|
-
operationId?: string | undefined;
|
|
1357
|
-
summary?: string | undefined;
|
|
1358
|
-
}, ...args: unknown[]) => string) | undefined;
|
|
1359
|
-
generateWebhookSlug?: ((args_0: {
|
|
1360
|
-
name: string;
|
|
1361
|
-
method?: string | undefined;
|
|
1362
|
-
}, ...args: unknown[]) => string) | undefined;
|
|
1363
|
-
onLoaded?: ((...args: unknown[]) => void) | undefined;
|
|
1364
|
-
redirect?: ((args_0: string, ...args: unknown[]) => string | null | undefined) | undefined;
|
|
1365
|
-
defaultOpenAllTags?: boolean | undefined;
|
|
1366
|
-
tagsSorter?: "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
|
|
1367
|
-
operationsSorter?: "method" | "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
|
|
1368
|
-
}, {
|
|
1369
|
-
sources: {
|
|
1370
|
-
url?: string | undefined;
|
|
1371
|
-
content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
|
|
1372
|
-
title?: string | undefined;
|
|
1373
|
-
slug?: string | undefined;
|
|
1374
|
-
}[];
|
|
1375
|
-
url?: string | undefined;
|
|
1376
|
-
content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
|
|
1377
|
-
title?: string | undefined;
|
|
1378
|
-
slug?: string | undefined;
|
|
1379
|
-
spec?: {
|
|
1380
|
-
url?: string | undefined;
|
|
1381
|
-
content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
|
|
1382
|
-
title?: string | undefined;
|
|
1383
|
-
slug?: string | undefined;
|
|
1384
|
-
} | undefined;
|
|
1385
|
-
authentication?: any;
|
|
1386
|
-
baseServerURL?: string | undefined;
|
|
1387
|
-
hideClientButton?: unknown;
|
|
1388
|
-
proxyUrl?: string | undefined;
|
|
1389
|
-
searchHotKey?: "c" | "r" | "o" | "n" | "a" | "b" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "p" | "q" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | undefined;
|
|
1390
|
-
servers?: any[] | undefined;
|
|
1391
|
-
showSidebar?: unknown;
|
|
1392
|
-
theme?: unknown;
|
|
1393
|
-
_integration?: "go" | "elysiajs" | "fastify" | "adonisjs" | "docusaurus" | "dotnet" | "express" | "fastapi" | "hono" | "html" | "laravel" | "litestar" | "nestjs" | "nextjs" | "nitro" | "nuxt" | "platformatic" | "react" | "rust" | "vue" | null | undefined;
|
|
1394
|
-
layout?: unknown;
|
|
1395
|
-
proxy?: string | undefined;
|
|
1396
|
-
isEditable?: unknown;
|
|
1397
|
-
isLoading?: unknown;
|
|
1398
|
-
hideModels?: unknown;
|
|
1399
|
-
hideDownloadButton?: unknown;
|
|
1400
|
-
hideTestRequestButton?: unknown;
|
|
1401
|
-
hideSearch?: unknown;
|
|
1402
|
-
darkMode?: boolean | undefined;
|
|
1403
|
-
forceDarkModeState?: "dark" | "light" | undefined;
|
|
1404
|
-
hideDarkModeToggle?: unknown;
|
|
1405
|
-
metaData?: any;
|
|
1406
|
-
favicon?: string | undefined;
|
|
1407
|
-
hiddenClients?: true | string[] | Record<string, boolean | string[]> | undefined;
|
|
1408
|
-
defaultHttpClient?: {
|
|
1409
|
-
targetKey: "c" | "clojure" | "csharp" | "go" | "http" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart";
|
|
1410
|
-
clientKey: string;
|
|
1411
|
-
} | undefined;
|
|
1412
|
-
customCss?: string | undefined;
|
|
1413
|
-
onSpecUpdate?: ((args_0: string, ...args: unknown[]) => void) | undefined;
|
|
1414
|
-
onServerChange?: ((args_0: string, ...args: unknown[]) => void) | undefined;
|
|
1415
|
-
pathRouting?: {
|
|
1416
|
-
basePath: string;
|
|
1417
|
-
} | undefined;
|
|
1418
|
-
generateHeadingSlug?: ((args_0: {
|
|
1419
|
-
slug: string;
|
|
1420
|
-
}, ...args: unknown[]) => string) | undefined;
|
|
1421
|
-
generateModelSlug?: ((args_0: {
|
|
1422
|
-
name: string;
|
|
1423
|
-
}, ...args: unknown[]) => string) | undefined;
|
|
1424
|
-
generateTagSlug?: ((args_0: {
|
|
1425
|
-
name: string;
|
|
1426
|
-
}, ...args: unknown[]) => string) | undefined;
|
|
1427
|
-
generateOperationSlug?: ((args_0: {
|
|
1428
|
-
path: string;
|
|
1429
|
-
method: string;
|
|
1430
|
-
operationId?: string | undefined;
|
|
1431
|
-
summary?: string | undefined;
|
|
1432
|
-
}, ...args: unknown[]) => string) | undefined;
|
|
1433
|
-
generateWebhookSlug?: ((args_0: {
|
|
1434
|
-
name: string;
|
|
1435
|
-
method?: string | undefined;
|
|
1436
|
-
}, ...args: unknown[]) => string) | undefined;
|
|
1437
|
-
onLoaded?: ((...args: unknown[]) => void) | undefined;
|
|
1438
|
-
redirect?: ((args_0: string, ...args: unknown[]) => string | null | undefined) | undefined;
|
|
1439
|
-
withDefaultFonts?: unknown;
|
|
1440
|
-
defaultOpenAllTags?: boolean | undefined;
|
|
1441
|
-
tagsSorter?: "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
|
|
1442
|
-
operationsSorter?: "method" | "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
|
|
1443
|
-
}>, {
|
|
1444
|
-
hideClientButton: boolean;
|
|
1445
|
-
showSidebar: boolean;
|
|
1446
|
-
theme: "alternate" | "default" | "moon" | "purple" | "solarized" | "bluePlanet" | "deepSpace" | "saturn" | "kepler" | "elysiajs" | "fastify" | "mars" | "none";
|
|
1447
|
-
layout: "modern" | "classic";
|
|
1448
|
-
isEditable: boolean;
|
|
1449
|
-
isLoading: boolean;
|
|
1450
|
-
hideModels: boolean;
|
|
1451
|
-
hideDownloadButton: boolean;
|
|
1452
|
-
hideTestRequestButton: boolean;
|
|
1453
|
-
hideSearch: boolean;
|
|
1454
|
-
hideDarkModeToggle: boolean;
|
|
1455
|
-
withDefaultFonts: boolean;
|
|
1456
|
-
sources: {
|
|
1457
|
-
url?: string | undefined;
|
|
1458
|
-
content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
|
|
1459
|
-
title?: string | undefined;
|
|
1460
|
-
slug?: string | undefined;
|
|
1461
|
-
}[];
|
|
1462
|
-
url?: string | undefined;
|
|
1463
|
-
content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
|
|
1464
|
-
title?: string | undefined;
|
|
1465
|
-
slug?: string | undefined;
|
|
1466
|
-
spec?: {
|
|
1467
|
-
url?: string | undefined;
|
|
1468
|
-
content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
|
|
1469
|
-
title?: string | undefined;
|
|
1470
|
-
slug?: string | undefined;
|
|
1471
|
-
} | undefined;
|
|
1472
|
-
authentication?: any;
|
|
1473
|
-
baseServerURL?: string | undefined;
|
|
1474
|
-
proxyUrl?: string | undefined;
|
|
1475
|
-
searchHotKey?: "c" | "r" | "o" | "n" | "a" | "b" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "p" | "q" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | undefined;
|
|
1476
|
-
servers?: any[] | undefined;
|
|
1477
|
-
_integration?: "go" | "elysiajs" | "fastify" | "adonisjs" | "docusaurus" | "dotnet" | "express" | "fastapi" | "hono" | "html" | "laravel" | "litestar" | "nestjs" | "nextjs" | "nitro" | "nuxt" | "platformatic" | "react" | "rust" | "vue" | null | undefined;
|
|
1478
|
-
proxy?: string | undefined;
|
|
1479
|
-
darkMode?: boolean | undefined;
|
|
1480
|
-
forceDarkModeState?: "dark" | "light" | undefined;
|
|
1481
|
-
metaData?: any;
|
|
1482
|
-
favicon?: string | undefined;
|
|
1483
|
-
hiddenClients?: true | string[] | Record<string, boolean | string[]> | undefined;
|
|
1484
|
-
defaultHttpClient?: {
|
|
1485
|
-
targetKey: "c" | "clojure" | "csharp" | "go" | "http" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart";
|
|
1486
|
-
clientKey: string;
|
|
1487
|
-
} | undefined;
|
|
1488
|
-
customCss?: string | undefined;
|
|
1489
|
-
onSpecUpdate?: ((args_0: string, ...args: unknown[]) => void) | undefined;
|
|
1490
|
-
onServerChange?: ((args_0: string, ...args: unknown[]) => void) | undefined;
|
|
1491
|
-
pathRouting?: {
|
|
1492
|
-
basePath: string;
|
|
1493
|
-
} | undefined;
|
|
1494
|
-
generateHeadingSlug?: ((args_0: {
|
|
1495
|
-
slug?: string | undefined;
|
|
1496
|
-
}, ...args: unknown[]) => string) | undefined;
|
|
1497
|
-
generateModelSlug?: ((args_0: {
|
|
1498
|
-
name?: string | undefined;
|
|
1499
|
-
}, ...args: unknown[]) => string) | undefined;
|
|
1500
|
-
generateTagSlug?: ((args_0: {
|
|
1501
|
-
name?: string | undefined;
|
|
1502
|
-
}, ...args: unknown[]) => string) | undefined;
|
|
1503
|
-
generateOperationSlug?: ((args_0: {
|
|
1504
|
-
path: string;
|
|
1505
|
-
method: string;
|
|
1506
|
-
operationId?: string | undefined;
|
|
1507
|
-
summary?: string | undefined;
|
|
1508
|
-
}, ...args: unknown[]) => string) | undefined;
|
|
1509
|
-
generateWebhookSlug?: ((args_0: {
|
|
1510
|
-
name: string;
|
|
1511
|
-
method?: string | undefined;
|
|
1512
|
-
}, ...args: unknown[]) => string) | undefined;
|
|
1513
|
-
onLoaded?: ((...args: unknown[]) => void) | undefined;
|
|
1514
|
-
redirect?: ((args_0: string, ...args: unknown[]) => string | null | undefined) | undefined;
|
|
1515
|
-
defaultOpenAllTags?: boolean | undefined;
|
|
1516
|
-
tagsSorter?: "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
|
|
1517
|
-
operationsSorter?: "method" | "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
|
|
1518
|
-
}, {
|
|
1519
|
-
sources: {
|
|
1520
|
-
url?: string | undefined;
|
|
1521
|
-
content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
|
|
1522
|
-
title?: string | undefined;
|
|
1523
|
-
slug?: string | undefined;
|
|
1524
|
-
}[];
|
|
1525
|
-
url?: string | undefined;
|
|
1526
|
-
content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
|
|
1527
|
-
title?: string | undefined;
|
|
1528
|
-
slug?: string | undefined;
|
|
1529
|
-
spec?: {
|
|
1530
|
-
url?: string | undefined;
|
|
1531
|
-
content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
|
|
1532
|
-
title?: string | undefined;
|
|
1533
|
-
slug?: string | undefined;
|
|
1534
|
-
} | undefined;
|
|
1535
|
-
authentication?: any;
|
|
1536
|
-
baseServerURL?: string | undefined;
|
|
1537
|
-
hideClientButton?: unknown;
|
|
1538
|
-
proxyUrl?: string | undefined;
|
|
1539
|
-
searchHotKey?: "c" | "r" | "o" | "n" | "a" | "b" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "p" | "q" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | undefined;
|
|
1540
|
-
servers?: any[] | undefined;
|
|
1541
|
-
showSidebar?: unknown;
|
|
1542
|
-
theme?: unknown;
|
|
1543
|
-
_integration?: "go" | "elysiajs" | "fastify" | "adonisjs" | "docusaurus" | "dotnet" | "express" | "fastapi" | "hono" | "html" | "laravel" | "litestar" | "nestjs" | "nextjs" | "nitro" | "nuxt" | "platformatic" | "react" | "rust" | "vue" | null | undefined;
|
|
1544
|
-
layout?: unknown;
|
|
1545
|
-
proxy?: string | undefined;
|
|
1546
|
-
isEditable?: unknown;
|
|
1547
|
-
isLoading?: unknown;
|
|
1548
|
-
hideModels?: unknown;
|
|
1549
|
-
hideDownloadButton?: unknown;
|
|
1550
|
-
hideTestRequestButton?: unknown;
|
|
1551
|
-
hideSearch?: unknown;
|
|
1552
|
-
darkMode?: boolean | undefined;
|
|
1553
|
-
forceDarkModeState?: "dark" | "light" | undefined;
|
|
1554
|
-
hideDarkModeToggle?: unknown;
|
|
1555
|
-
metaData?: any;
|
|
1556
|
-
favicon?: string | undefined;
|
|
1557
|
-
hiddenClients?: true | string[] | Record<string, boolean | string[]> | undefined;
|
|
1558
|
-
defaultHttpClient?: {
|
|
1559
|
-
targetKey: "c" | "clojure" | "csharp" | "go" | "http" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart";
|
|
1560
|
-
clientKey: string;
|
|
1561
|
-
} | undefined;
|
|
1562
|
-
customCss?: string | undefined;
|
|
1563
|
-
onSpecUpdate?: ((args_0: string, ...args: unknown[]) => void) | undefined;
|
|
1564
|
-
onServerChange?: ((args_0: string, ...args: unknown[]) => void) | undefined;
|
|
1565
|
-
pathRouting?: {
|
|
1566
|
-
basePath: string;
|
|
1567
|
-
} | undefined;
|
|
1568
|
-
generateHeadingSlug?: ((args_0: {
|
|
1569
|
-
slug: string;
|
|
1570
|
-
}, ...args: unknown[]) => string) | undefined;
|
|
1571
|
-
generateModelSlug?: ((args_0: {
|
|
1572
|
-
name: string;
|
|
1573
|
-
}, ...args: unknown[]) => string) | undefined;
|
|
1574
|
-
generateTagSlug?: ((args_0: {
|
|
1575
|
-
name: string;
|
|
1576
|
-
}, ...args: unknown[]) => string) | undefined;
|
|
1577
|
-
generateOperationSlug?: ((args_0: {
|
|
1578
|
-
path: string;
|
|
1579
|
-
method: string;
|
|
1580
|
-
operationId?: string | undefined;
|
|
1581
|
-
summary?: string | undefined;
|
|
1582
|
-
}, ...args: unknown[]) => string) | undefined;
|
|
1583
|
-
generateWebhookSlug?: ((args_0: {
|
|
1584
|
-
name: string;
|
|
1585
|
-
method?: string | undefined;
|
|
1586
|
-
}, ...args: unknown[]) => string) | undefined;
|
|
1587
|
-
onLoaded?: ((...args: unknown[]) => void) | undefined;
|
|
1588
|
-
redirect?: ((args_0: string, ...args: unknown[]) => string | null | undefined) | undefined;
|
|
1589
|
-
withDefaultFonts?: unknown;
|
|
1590
|
-
defaultOpenAllTags?: boolean | undefined;
|
|
1591
|
-
tagsSorter?: "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
|
|
1592
|
-
operationsSorter?: "method" | "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
|
|
1593
|
-
}>;
|
|
1594
|
-
export type ApiReferenceConfigurationWithSources = Omit<z.infer<typeof apiReferenceConfigurationWithSourcesSchema>, 'proxy' | 'spec'>;
|
|
880
|
+
export type ApiReferenceConfiguration = Omit<z.infer<typeof apiReferenceConfigurationSchema>, 'proxy' | 'spec'> & {
|
|
881
|
+
authentication?: AuthenticationConfiguration;
|
|
882
|
+
};
|
|
883
|
+
/** Api Config which includes the default config */
|
|
884
|
+
type ApiReferenceConfigurationWithDefault = ApiReferenceConfiguration & {
|
|
885
|
+
/** Whether to use this config as the default one */
|
|
886
|
+
default?: boolean;
|
|
887
|
+
};
|
|
888
|
+
/** Configuration for a single config with sources */
|
|
889
|
+
export type ApiReferenceConfigurationWithSources = Omit<ApiReferenceConfigurationWithDefault, 'default'> & {
|
|
890
|
+
sources: (SpecConfiguration & {
|
|
891
|
+
default?: boolean;
|
|
892
|
+
})[];
|
|
893
|
+
};
|
|
1595
894
|
/** Configuration for multiple Api References */
|
|
1596
|
-
export type
|
|
895
|
+
export type AnyApiReferenceConfiguration = Partial<ApiReferenceConfiguration> | Partial<ApiReferenceConfigurationWithSources> | Partial<ApiReferenceConfigurationWithDefault>[];
|
|
1597
896
|
/** Typeguard to check to narrow the configs to the one with sources */
|
|
1598
|
-
export declare const isConfigurationWithSources: (config:
|
|
897
|
+
export declare const isConfigurationWithSources: (config: AnyApiReferenceConfiguration) => config is Partial<ApiReferenceConfigurationWithSources>;
|
|
898
|
+
export {};
|
|
1599
899
|
//# sourceMappingURL=api-reference-configuration.d.ts.map
|