@scalar/types 0.2.9 → 0.2.11
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/entities/security-scheme.d.ts +69 -0
- package/dist/entities/security-scheme.d.ts.map +1 -1
- package/dist/entities/security-scheme.js +7 -3
- package/dist/entities/security-scheme.js.map +2 -2
- package/dist/legacy/reference-config.d.ts +1 -6
- package/dist/legacy/reference-config.d.ts.map +1 -1
- package/dist/legacy/reference-config.js.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @scalar/types
|
|
2
2
|
|
|
3
|
+
## 0.2.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- ccf875a: feat: support x-scalar-credentials-location extension
|
|
8
|
+
- 94d6d0c: fix: remove old ssr state and update nuxt for workspace store
|
|
9
|
+
- Updated dependencies [ccf875a]
|
|
10
|
+
- @scalar/openapi-types@0.3.7
|
|
11
|
+
|
|
12
|
+
## 0.2.10
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- fb62e1b: feat: add externalDocs
|
|
17
|
+
|
|
3
18
|
## 0.2.9
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -193,6 +193,7 @@ export declare const securityOauthSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
193
193
|
clientSecret: z.ZodDefault<z.ZodString>;
|
|
194
194
|
username: z.ZodDefault<z.ZodString>;
|
|
195
195
|
password: z.ZodDefault<z.ZodString>;
|
|
196
|
+
'x-scalar-credentials-location': z.ZodOptional<z.ZodEnum<["header", "body"]>>;
|
|
196
197
|
}>, "strip", z.ZodTypeAny, {
|
|
197
198
|
type: "password";
|
|
198
199
|
username: string;
|
|
@@ -207,6 +208,7 @@ export declare const securityOauthSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
207
208
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
208
209
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
209
210
|
'x-tokenName'?: string | undefined;
|
|
211
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
210
212
|
}, {
|
|
211
213
|
type?: "password" | undefined;
|
|
212
214
|
username?: string | undefined;
|
|
@@ -221,6 +223,7 @@ export declare const securityOauthSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
221
223
|
'x-tokenName'?: string | undefined;
|
|
222
224
|
tokenUrl?: string | undefined;
|
|
223
225
|
clientSecret?: string | undefined;
|
|
226
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
224
227
|
}>>;
|
|
225
228
|
clientCredentials: z.ZodOptional<z.ZodObject<z.objectUtil.extendShape<{
|
|
226
229
|
/**
|
|
@@ -248,6 +251,7 @@ export declare const securityOauthSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
248
251
|
type: z.ZodDefault<z.ZodLiteral<"clientCredentials">>;
|
|
249
252
|
tokenUrl: z.ZodDefault<z.ZodString>;
|
|
250
253
|
clientSecret: z.ZodDefault<z.ZodString>;
|
|
254
|
+
'x-scalar-credentials-location': z.ZodOptional<z.ZodEnum<["header", "body"]>>;
|
|
251
255
|
}>, "strip", z.ZodTypeAny, {
|
|
252
256
|
type: "clientCredentials";
|
|
253
257
|
token: string;
|
|
@@ -260,6 +264,7 @@ export declare const securityOauthSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
260
264
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
261
265
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
262
266
|
'x-tokenName'?: string | undefined;
|
|
267
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
263
268
|
}, {
|
|
264
269
|
type?: "clientCredentials" | undefined;
|
|
265
270
|
token?: string | undefined;
|
|
@@ -272,6 +277,7 @@ export declare const securityOauthSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
272
277
|
'x-tokenName'?: string | undefined;
|
|
273
278
|
tokenUrl?: string | undefined;
|
|
274
279
|
clientSecret?: string | undefined;
|
|
280
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
275
281
|
}>>;
|
|
276
282
|
authorizationCode: z.ZodOptional<z.ZodObject<z.objectUtil.extendShape<{
|
|
277
283
|
/**
|
|
@@ -302,6 +308,7 @@ export declare const securityOauthSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
302
308
|
'x-scalar-redirect-uri': z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
303
309
|
tokenUrl: z.ZodDefault<z.ZodString>;
|
|
304
310
|
clientSecret: z.ZodDefault<z.ZodString>;
|
|
311
|
+
'x-scalar-credentials-location': z.ZodOptional<z.ZodEnum<["header", "body"]>>;
|
|
305
312
|
}>, "strip", z.ZodTypeAny, {
|
|
306
313
|
type: "authorizationCode";
|
|
307
314
|
token: string;
|
|
@@ -317,6 +324,7 @@ export declare const securityOauthSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
317
324
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
318
325
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
319
326
|
'x-tokenName'?: string | undefined;
|
|
327
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
320
328
|
}, {
|
|
321
329
|
type?: "authorizationCode" | undefined;
|
|
322
330
|
token?: string | undefined;
|
|
@@ -331,6 +339,7 @@ export declare const securityOauthSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
331
339
|
'x-scalar-redirect-uri'?: string | undefined;
|
|
332
340
|
tokenUrl?: string | undefined;
|
|
333
341
|
clientSecret?: string | undefined;
|
|
342
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
334
343
|
'x-usePkce'?: "SHA-256" | "plain" | "no" | undefined;
|
|
335
344
|
}>>;
|
|
336
345
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -348,6 +357,7 @@ export declare const securityOauthSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
348
357
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
349
358
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
350
359
|
'x-tokenName'?: string | undefined;
|
|
360
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
351
361
|
} | undefined;
|
|
352
362
|
implicit?: {
|
|
353
363
|
type: "implicit";
|
|
@@ -374,6 +384,7 @@ export declare const securityOauthSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
374
384
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
375
385
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
376
386
|
'x-tokenName'?: string | undefined;
|
|
387
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
377
388
|
} | undefined;
|
|
378
389
|
authorizationCode?: {
|
|
379
390
|
type: "authorizationCode";
|
|
@@ -390,6 +401,7 @@ export declare const securityOauthSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
390
401
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
391
402
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
392
403
|
'x-tokenName'?: string | undefined;
|
|
404
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
393
405
|
} | undefined;
|
|
394
406
|
}, {
|
|
395
407
|
password?: {
|
|
@@ -406,6 +418,7 @@ export declare const securityOauthSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
406
418
|
'x-tokenName'?: string | undefined;
|
|
407
419
|
tokenUrl?: string | undefined;
|
|
408
420
|
clientSecret?: string | undefined;
|
|
421
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
409
422
|
} | undefined;
|
|
410
423
|
implicit?: {
|
|
411
424
|
type?: "implicit" | undefined;
|
|
@@ -432,6 +445,7 @@ export declare const securityOauthSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
432
445
|
'x-tokenName'?: string | undefined;
|
|
433
446
|
tokenUrl?: string | undefined;
|
|
434
447
|
clientSecret?: string | undefined;
|
|
448
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
435
449
|
} | undefined;
|
|
436
450
|
authorizationCode?: {
|
|
437
451
|
type?: "authorizationCode" | undefined;
|
|
@@ -447,6 +461,7 @@ export declare const securityOauthSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
447
461
|
'x-scalar-redirect-uri'?: string | undefined;
|
|
448
462
|
tokenUrl?: string | undefined;
|
|
449
463
|
clientSecret?: string | undefined;
|
|
464
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
450
465
|
'x-usePkce'?: "SHA-256" | "plain" | "no" | undefined;
|
|
451
466
|
} | undefined;
|
|
452
467
|
}>>;
|
|
@@ -473,6 +488,7 @@ export declare const securityOauthSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
473
488
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
474
489
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
475
490
|
'x-tokenName'?: string | undefined;
|
|
491
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
476
492
|
} | undefined;
|
|
477
493
|
implicit?: {
|
|
478
494
|
type: "implicit";
|
|
@@ -499,6 +515,7 @@ export declare const securityOauthSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
499
515
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
500
516
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
501
517
|
'x-tokenName'?: string | undefined;
|
|
518
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
502
519
|
} | undefined;
|
|
503
520
|
authorizationCode?: {
|
|
504
521
|
type: "authorizationCode";
|
|
@@ -515,6 +532,7 @@ export declare const securityOauthSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
515
532
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
516
533
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
517
534
|
'x-tokenName'?: string | undefined;
|
|
535
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
518
536
|
} | undefined;
|
|
519
537
|
};
|
|
520
538
|
description?: string | undefined;
|
|
@@ -540,6 +558,7 @@ export declare const securityOauthSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
540
558
|
'x-tokenName'?: string | undefined;
|
|
541
559
|
tokenUrl?: string | undefined;
|
|
542
560
|
clientSecret?: string | undefined;
|
|
561
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
543
562
|
} | undefined;
|
|
544
563
|
implicit?: {
|
|
545
564
|
type?: "implicit" | undefined;
|
|
@@ -566,6 +585,7 @@ export declare const securityOauthSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
566
585
|
'x-tokenName'?: string | undefined;
|
|
567
586
|
tokenUrl?: string | undefined;
|
|
568
587
|
clientSecret?: string | undefined;
|
|
588
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
569
589
|
} | undefined;
|
|
570
590
|
authorizationCode?: {
|
|
571
591
|
type?: "authorizationCode" | undefined;
|
|
@@ -581,6 +601,7 @@ export declare const securityOauthSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
581
601
|
'x-scalar-redirect-uri'?: string | undefined;
|
|
582
602
|
tokenUrl?: string | undefined;
|
|
583
603
|
clientSecret?: string | undefined;
|
|
604
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
584
605
|
'x-usePkce'?: "SHA-256" | "plain" | "no" | undefined;
|
|
585
606
|
} | undefined;
|
|
586
607
|
} | undefined;
|
|
@@ -732,6 +753,7 @@ export declare const oasSecuritySchemeSchema: z.ZodUnion<[z.ZodObject<z.objectUt
|
|
|
732
753
|
clientSecret: z.ZodDefault<z.ZodString>;
|
|
733
754
|
username: z.ZodDefault<z.ZodString>;
|
|
734
755
|
password: z.ZodDefault<z.ZodString>;
|
|
756
|
+
'x-scalar-credentials-location': z.ZodOptional<z.ZodEnum<["header", "body"]>>;
|
|
735
757
|
}>, "strip", z.ZodTypeAny, {
|
|
736
758
|
type: "password";
|
|
737
759
|
username: string;
|
|
@@ -746,6 +768,7 @@ export declare const oasSecuritySchemeSchema: z.ZodUnion<[z.ZodObject<z.objectUt
|
|
|
746
768
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
747
769
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
748
770
|
'x-tokenName'?: string | undefined;
|
|
771
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
749
772
|
}, {
|
|
750
773
|
type?: "password" | undefined;
|
|
751
774
|
username?: string | undefined;
|
|
@@ -760,6 +783,7 @@ export declare const oasSecuritySchemeSchema: z.ZodUnion<[z.ZodObject<z.objectUt
|
|
|
760
783
|
'x-tokenName'?: string | undefined;
|
|
761
784
|
tokenUrl?: string | undefined;
|
|
762
785
|
clientSecret?: string | undefined;
|
|
786
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
763
787
|
}>>;
|
|
764
788
|
clientCredentials: z.ZodOptional<z.ZodObject<z.objectUtil.extendShape<{
|
|
765
789
|
/**
|
|
@@ -787,6 +811,7 @@ export declare const oasSecuritySchemeSchema: z.ZodUnion<[z.ZodObject<z.objectUt
|
|
|
787
811
|
type: z.ZodDefault<z.ZodLiteral<"clientCredentials">>;
|
|
788
812
|
tokenUrl: z.ZodDefault<z.ZodString>;
|
|
789
813
|
clientSecret: z.ZodDefault<z.ZodString>;
|
|
814
|
+
'x-scalar-credentials-location': z.ZodOptional<z.ZodEnum<["header", "body"]>>;
|
|
790
815
|
}>, "strip", z.ZodTypeAny, {
|
|
791
816
|
type: "clientCredentials";
|
|
792
817
|
token: string;
|
|
@@ -799,6 +824,7 @@ export declare const oasSecuritySchemeSchema: z.ZodUnion<[z.ZodObject<z.objectUt
|
|
|
799
824
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
800
825
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
801
826
|
'x-tokenName'?: string | undefined;
|
|
827
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
802
828
|
}, {
|
|
803
829
|
type?: "clientCredentials" | undefined;
|
|
804
830
|
token?: string | undefined;
|
|
@@ -811,6 +837,7 @@ export declare const oasSecuritySchemeSchema: z.ZodUnion<[z.ZodObject<z.objectUt
|
|
|
811
837
|
'x-tokenName'?: string | undefined;
|
|
812
838
|
tokenUrl?: string | undefined;
|
|
813
839
|
clientSecret?: string | undefined;
|
|
840
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
814
841
|
}>>;
|
|
815
842
|
authorizationCode: z.ZodOptional<z.ZodObject<z.objectUtil.extendShape<{
|
|
816
843
|
/**
|
|
@@ -841,6 +868,7 @@ export declare const oasSecuritySchemeSchema: z.ZodUnion<[z.ZodObject<z.objectUt
|
|
|
841
868
|
'x-scalar-redirect-uri': z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
842
869
|
tokenUrl: z.ZodDefault<z.ZodString>;
|
|
843
870
|
clientSecret: z.ZodDefault<z.ZodString>;
|
|
871
|
+
'x-scalar-credentials-location': z.ZodOptional<z.ZodEnum<["header", "body"]>>;
|
|
844
872
|
}>, "strip", z.ZodTypeAny, {
|
|
845
873
|
type: "authorizationCode";
|
|
846
874
|
token: string;
|
|
@@ -856,6 +884,7 @@ export declare const oasSecuritySchemeSchema: z.ZodUnion<[z.ZodObject<z.objectUt
|
|
|
856
884
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
857
885
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
858
886
|
'x-tokenName'?: string | undefined;
|
|
887
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
859
888
|
}, {
|
|
860
889
|
type?: "authorizationCode" | undefined;
|
|
861
890
|
token?: string | undefined;
|
|
@@ -870,6 +899,7 @@ export declare const oasSecuritySchemeSchema: z.ZodUnion<[z.ZodObject<z.objectUt
|
|
|
870
899
|
'x-scalar-redirect-uri'?: string | undefined;
|
|
871
900
|
tokenUrl?: string | undefined;
|
|
872
901
|
clientSecret?: string | undefined;
|
|
902
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
873
903
|
'x-usePkce'?: "SHA-256" | "plain" | "no" | undefined;
|
|
874
904
|
}>>;
|
|
875
905
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -887,6 +917,7 @@ export declare const oasSecuritySchemeSchema: z.ZodUnion<[z.ZodObject<z.objectUt
|
|
|
887
917
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
888
918
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
889
919
|
'x-tokenName'?: string | undefined;
|
|
920
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
890
921
|
} | undefined;
|
|
891
922
|
implicit?: {
|
|
892
923
|
type: "implicit";
|
|
@@ -913,6 +944,7 @@ export declare const oasSecuritySchemeSchema: z.ZodUnion<[z.ZodObject<z.objectUt
|
|
|
913
944
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
914
945
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
915
946
|
'x-tokenName'?: string | undefined;
|
|
947
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
916
948
|
} | undefined;
|
|
917
949
|
authorizationCode?: {
|
|
918
950
|
type: "authorizationCode";
|
|
@@ -929,6 +961,7 @@ export declare const oasSecuritySchemeSchema: z.ZodUnion<[z.ZodObject<z.objectUt
|
|
|
929
961
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
930
962
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
931
963
|
'x-tokenName'?: string | undefined;
|
|
964
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
932
965
|
} | undefined;
|
|
933
966
|
}, {
|
|
934
967
|
password?: {
|
|
@@ -945,6 +978,7 @@ export declare const oasSecuritySchemeSchema: z.ZodUnion<[z.ZodObject<z.objectUt
|
|
|
945
978
|
'x-tokenName'?: string | undefined;
|
|
946
979
|
tokenUrl?: string | undefined;
|
|
947
980
|
clientSecret?: string | undefined;
|
|
981
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
948
982
|
} | undefined;
|
|
949
983
|
implicit?: {
|
|
950
984
|
type?: "implicit" | undefined;
|
|
@@ -971,6 +1005,7 @@ export declare const oasSecuritySchemeSchema: z.ZodUnion<[z.ZodObject<z.objectUt
|
|
|
971
1005
|
'x-tokenName'?: string | undefined;
|
|
972
1006
|
tokenUrl?: string | undefined;
|
|
973
1007
|
clientSecret?: string | undefined;
|
|
1008
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
974
1009
|
} | undefined;
|
|
975
1010
|
authorizationCode?: {
|
|
976
1011
|
type?: "authorizationCode" | undefined;
|
|
@@ -986,6 +1021,7 @@ export declare const oasSecuritySchemeSchema: z.ZodUnion<[z.ZodObject<z.objectUt
|
|
|
986
1021
|
'x-scalar-redirect-uri'?: string | undefined;
|
|
987
1022
|
tokenUrl?: string | undefined;
|
|
988
1023
|
clientSecret?: string | undefined;
|
|
1024
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
989
1025
|
'x-usePkce'?: "SHA-256" | "plain" | "no" | undefined;
|
|
990
1026
|
} | undefined;
|
|
991
1027
|
}>>;
|
|
@@ -1006,6 +1042,7 @@ export declare const oasSecuritySchemeSchema: z.ZodUnion<[z.ZodObject<z.objectUt
|
|
|
1006
1042
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
1007
1043
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
1008
1044
|
'x-tokenName'?: string | undefined;
|
|
1045
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
1009
1046
|
} | undefined;
|
|
1010
1047
|
implicit?: {
|
|
1011
1048
|
type: "implicit";
|
|
@@ -1032,6 +1069,7 @@ export declare const oasSecuritySchemeSchema: z.ZodUnion<[z.ZodObject<z.objectUt
|
|
|
1032
1069
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
1033
1070
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
1034
1071
|
'x-tokenName'?: string | undefined;
|
|
1072
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
1035
1073
|
} | undefined;
|
|
1036
1074
|
authorizationCode?: {
|
|
1037
1075
|
type: "authorizationCode";
|
|
@@ -1048,6 +1086,7 @@ export declare const oasSecuritySchemeSchema: z.ZodUnion<[z.ZodObject<z.objectUt
|
|
|
1048
1086
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
1049
1087
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
1050
1088
|
'x-tokenName'?: string | undefined;
|
|
1089
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
1051
1090
|
} | undefined;
|
|
1052
1091
|
};
|
|
1053
1092
|
description?: string | undefined;
|
|
@@ -1071,6 +1110,7 @@ export declare const oasSecuritySchemeSchema: z.ZodUnion<[z.ZodObject<z.objectUt
|
|
|
1071
1110
|
'x-tokenName'?: string | undefined;
|
|
1072
1111
|
tokenUrl?: string | undefined;
|
|
1073
1112
|
clientSecret?: string | undefined;
|
|
1113
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
1074
1114
|
} | undefined;
|
|
1075
1115
|
implicit?: {
|
|
1076
1116
|
type?: "implicit" | undefined;
|
|
@@ -1097,6 +1137,7 @@ export declare const oasSecuritySchemeSchema: z.ZodUnion<[z.ZodObject<z.objectUt
|
|
|
1097
1137
|
'x-tokenName'?: string | undefined;
|
|
1098
1138
|
tokenUrl?: string | undefined;
|
|
1099
1139
|
clientSecret?: string | undefined;
|
|
1140
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
1100
1141
|
} | undefined;
|
|
1101
1142
|
authorizationCode?: {
|
|
1102
1143
|
type?: "authorizationCode" | undefined;
|
|
@@ -1112,6 +1153,7 @@ export declare const oasSecuritySchemeSchema: z.ZodUnion<[z.ZodObject<z.objectUt
|
|
|
1112
1153
|
'x-scalar-redirect-uri'?: string | undefined;
|
|
1113
1154
|
tokenUrl?: string | undefined;
|
|
1114
1155
|
clientSecret?: string | undefined;
|
|
1156
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
1115
1157
|
'x-usePkce'?: "SHA-256" | "plain" | "no" | undefined;
|
|
1116
1158
|
} | undefined;
|
|
1117
1159
|
} | undefined;
|
|
@@ -1319,6 +1361,7 @@ export declare const securitySchemeSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
1319
1361
|
clientSecret: z.ZodDefault<z.ZodString>;
|
|
1320
1362
|
username: z.ZodDefault<z.ZodString>;
|
|
1321
1363
|
password: z.ZodDefault<z.ZodString>;
|
|
1364
|
+
'x-scalar-credentials-location': z.ZodOptional<z.ZodEnum<["header", "body"]>>;
|
|
1322
1365
|
}>, "strip", z.ZodTypeAny, {
|
|
1323
1366
|
type: "password";
|
|
1324
1367
|
username: string;
|
|
@@ -1333,6 +1376,7 @@ export declare const securitySchemeSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
1333
1376
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
1334
1377
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
1335
1378
|
'x-tokenName'?: string | undefined;
|
|
1379
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
1336
1380
|
}, {
|
|
1337
1381
|
type?: "password" | undefined;
|
|
1338
1382
|
username?: string | undefined;
|
|
@@ -1347,6 +1391,7 @@ export declare const securitySchemeSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
1347
1391
|
'x-tokenName'?: string | undefined;
|
|
1348
1392
|
tokenUrl?: string | undefined;
|
|
1349
1393
|
clientSecret?: string | undefined;
|
|
1394
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
1350
1395
|
}>>;
|
|
1351
1396
|
clientCredentials: z.ZodOptional<z.ZodObject<z.objectUtil.extendShape<{
|
|
1352
1397
|
/**
|
|
@@ -1374,6 +1419,7 @@ export declare const securitySchemeSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
1374
1419
|
type: z.ZodDefault<z.ZodLiteral<"clientCredentials">>;
|
|
1375
1420
|
tokenUrl: z.ZodDefault<z.ZodString>;
|
|
1376
1421
|
clientSecret: z.ZodDefault<z.ZodString>;
|
|
1422
|
+
'x-scalar-credentials-location': z.ZodOptional<z.ZodEnum<["header", "body"]>>;
|
|
1377
1423
|
}>, "strip", z.ZodTypeAny, {
|
|
1378
1424
|
type: "clientCredentials";
|
|
1379
1425
|
token: string;
|
|
@@ -1386,6 +1432,7 @@ export declare const securitySchemeSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
1386
1432
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
1387
1433
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
1388
1434
|
'x-tokenName'?: string | undefined;
|
|
1435
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
1389
1436
|
}, {
|
|
1390
1437
|
type?: "clientCredentials" | undefined;
|
|
1391
1438
|
token?: string | undefined;
|
|
@@ -1398,6 +1445,7 @@ export declare const securitySchemeSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
1398
1445
|
'x-tokenName'?: string | undefined;
|
|
1399
1446
|
tokenUrl?: string | undefined;
|
|
1400
1447
|
clientSecret?: string | undefined;
|
|
1448
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
1401
1449
|
}>>;
|
|
1402
1450
|
authorizationCode: z.ZodOptional<z.ZodObject<z.objectUtil.extendShape<{
|
|
1403
1451
|
/**
|
|
@@ -1428,6 +1476,7 @@ export declare const securitySchemeSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
1428
1476
|
'x-scalar-redirect-uri': z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
1429
1477
|
tokenUrl: z.ZodDefault<z.ZodString>;
|
|
1430
1478
|
clientSecret: z.ZodDefault<z.ZodString>;
|
|
1479
|
+
'x-scalar-credentials-location': z.ZodOptional<z.ZodEnum<["header", "body"]>>;
|
|
1431
1480
|
}>, "strip", z.ZodTypeAny, {
|
|
1432
1481
|
type: "authorizationCode";
|
|
1433
1482
|
token: string;
|
|
@@ -1443,6 +1492,7 @@ export declare const securitySchemeSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
1443
1492
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
1444
1493
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
1445
1494
|
'x-tokenName'?: string | undefined;
|
|
1495
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
1446
1496
|
}, {
|
|
1447
1497
|
type?: "authorizationCode" | undefined;
|
|
1448
1498
|
token?: string | undefined;
|
|
@@ -1457,6 +1507,7 @@ export declare const securitySchemeSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
1457
1507
|
'x-scalar-redirect-uri'?: string | undefined;
|
|
1458
1508
|
tokenUrl?: string | undefined;
|
|
1459
1509
|
clientSecret?: string | undefined;
|
|
1510
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
1460
1511
|
'x-usePkce'?: "SHA-256" | "plain" | "no" | undefined;
|
|
1461
1512
|
}>>;
|
|
1462
1513
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -1474,6 +1525,7 @@ export declare const securitySchemeSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
1474
1525
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
1475
1526
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
1476
1527
|
'x-tokenName'?: string | undefined;
|
|
1528
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
1477
1529
|
} | undefined;
|
|
1478
1530
|
implicit?: {
|
|
1479
1531
|
type: "implicit";
|
|
@@ -1500,6 +1552,7 @@ export declare const securitySchemeSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
1500
1552
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
1501
1553
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
1502
1554
|
'x-tokenName'?: string | undefined;
|
|
1555
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
1503
1556
|
} | undefined;
|
|
1504
1557
|
authorizationCode?: {
|
|
1505
1558
|
type: "authorizationCode";
|
|
@@ -1516,6 +1569,7 @@ export declare const securitySchemeSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
1516
1569
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
1517
1570
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
1518
1571
|
'x-tokenName'?: string | undefined;
|
|
1572
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
1519
1573
|
} | undefined;
|
|
1520
1574
|
}, {
|
|
1521
1575
|
password?: {
|
|
@@ -1532,6 +1586,7 @@ export declare const securitySchemeSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
1532
1586
|
'x-tokenName'?: string | undefined;
|
|
1533
1587
|
tokenUrl?: string | undefined;
|
|
1534
1588
|
clientSecret?: string | undefined;
|
|
1589
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
1535
1590
|
} | undefined;
|
|
1536
1591
|
implicit?: {
|
|
1537
1592
|
type?: "implicit" | undefined;
|
|
@@ -1558,6 +1613,7 @@ export declare const securitySchemeSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
1558
1613
|
'x-tokenName'?: string | undefined;
|
|
1559
1614
|
tokenUrl?: string | undefined;
|
|
1560
1615
|
clientSecret?: string | undefined;
|
|
1616
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
1561
1617
|
} | undefined;
|
|
1562
1618
|
authorizationCode?: {
|
|
1563
1619
|
type?: "authorizationCode" | undefined;
|
|
@@ -1573,6 +1629,7 @@ export declare const securitySchemeSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
1573
1629
|
'x-scalar-redirect-uri'?: string | undefined;
|
|
1574
1630
|
tokenUrl?: string | undefined;
|
|
1575
1631
|
clientSecret?: string | undefined;
|
|
1632
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
1576
1633
|
'x-usePkce'?: "SHA-256" | "plain" | "no" | undefined;
|
|
1577
1634
|
} | undefined;
|
|
1578
1635
|
}>>;
|
|
@@ -1599,6 +1656,7 @@ export declare const securitySchemeSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
1599
1656
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
1600
1657
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
1601
1658
|
'x-tokenName'?: string | undefined;
|
|
1659
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
1602
1660
|
} | undefined;
|
|
1603
1661
|
implicit?: {
|
|
1604
1662
|
type: "implicit";
|
|
@@ -1625,6 +1683,7 @@ export declare const securitySchemeSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
1625
1683
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
1626
1684
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
1627
1685
|
'x-tokenName'?: string | undefined;
|
|
1686
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
1628
1687
|
} | undefined;
|
|
1629
1688
|
authorizationCode?: {
|
|
1630
1689
|
type: "authorizationCode";
|
|
@@ -1641,6 +1700,7 @@ export declare const securitySchemeSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
1641
1700
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
1642
1701
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
1643
1702
|
'x-tokenName'?: string | undefined;
|
|
1703
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
1644
1704
|
} | undefined;
|
|
1645
1705
|
};
|
|
1646
1706
|
description?: string | undefined;
|
|
@@ -1666,6 +1726,7 @@ export declare const securitySchemeSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
1666
1726
|
'x-tokenName'?: string | undefined;
|
|
1667
1727
|
tokenUrl?: string | undefined;
|
|
1668
1728
|
clientSecret?: string | undefined;
|
|
1729
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
1669
1730
|
} | undefined;
|
|
1670
1731
|
implicit?: {
|
|
1671
1732
|
type?: "implicit" | undefined;
|
|
@@ -1692,6 +1753,7 @@ export declare const securitySchemeSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
1692
1753
|
'x-tokenName'?: string | undefined;
|
|
1693
1754
|
tokenUrl?: string | undefined;
|
|
1694
1755
|
clientSecret?: string | undefined;
|
|
1756
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
1695
1757
|
} | undefined;
|
|
1696
1758
|
authorizationCode?: {
|
|
1697
1759
|
type?: "authorizationCode" | undefined;
|
|
@@ -1707,6 +1769,7 @@ export declare const securitySchemeSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
1707
1769
|
'x-scalar-redirect-uri'?: string | undefined;
|
|
1708
1770
|
tokenUrl?: string | undefined;
|
|
1709
1771
|
clientSecret?: string | undefined;
|
|
1772
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
1710
1773
|
'x-usePkce'?: "SHA-256" | "plain" | "no" | undefined;
|
|
1711
1774
|
} | undefined;
|
|
1712
1775
|
} | undefined;
|
|
@@ -1753,6 +1816,7 @@ export declare const securitySchemeSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
1753
1816
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
1754
1817
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
1755
1818
|
'x-tokenName'?: string | undefined;
|
|
1819
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
1756
1820
|
} | undefined;
|
|
1757
1821
|
implicit?: {
|
|
1758
1822
|
type: "implicit";
|
|
@@ -1779,6 +1843,7 @@ export declare const securitySchemeSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
1779
1843
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
1780
1844
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
1781
1845
|
'x-tokenName'?: string | undefined;
|
|
1846
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
1782
1847
|
} | undefined;
|
|
1783
1848
|
authorizationCode?: {
|
|
1784
1849
|
type: "authorizationCode";
|
|
@@ -1795,6 +1860,7 @@ export declare const securitySchemeSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
1795
1860
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
1796
1861
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
1797
1862
|
'x-tokenName'?: string | undefined;
|
|
1863
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
1798
1864
|
} | undefined;
|
|
1799
1865
|
};
|
|
1800
1866
|
description?: string | undefined;
|
|
@@ -1844,6 +1910,7 @@ export declare const securitySchemeSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
1844
1910
|
'x-tokenName'?: string | undefined;
|
|
1845
1911
|
tokenUrl?: string | undefined;
|
|
1846
1912
|
clientSecret?: string | undefined;
|
|
1913
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
1847
1914
|
} | undefined;
|
|
1848
1915
|
implicit?: {
|
|
1849
1916
|
type?: "implicit" | undefined;
|
|
@@ -1870,6 +1937,7 @@ export declare const securitySchemeSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
1870
1937
|
'x-tokenName'?: string | undefined;
|
|
1871
1938
|
tokenUrl?: string | undefined;
|
|
1872
1939
|
clientSecret?: string | undefined;
|
|
1940
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
1873
1941
|
} | undefined;
|
|
1874
1942
|
authorizationCode?: {
|
|
1875
1943
|
type?: "authorizationCode" | undefined;
|
|
@@ -1885,6 +1953,7 @@ export declare const securitySchemeSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
1885
1953
|
'x-scalar-redirect-uri'?: string | undefined;
|
|
1886
1954
|
tokenUrl?: string | undefined;
|
|
1887
1955
|
clientSecret?: string | undefined;
|
|
1956
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
1888
1957
|
'x-usePkce'?: "SHA-256" | "plain" | "no" | undefined;
|
|
1889
1958
|
} | undefined;
|
|
1890
1959
|
} | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"security-scheme.d.ts","sourceRoot":"","sources":["../../src/entities/security-scheme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAsBvB,eAAO,MAAM,sBAAsB,wCAAyC,CAAA;AAc5E,eAAO,MAAM,oBAAoB;;;;IAV/B,8EAA8E;;IAE9E,6FAA6F;;;;IAb7F,0EAA0E;;;;;;;;;;;;;;;;;;;;EAqBsC,CAAA;AAClH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAkCvE,eAAO,MAAM,kBAAkB;;;;IA3B7B;;;OAGG;;IAOH;;;;OAIG;;;;IA3CH,0EAA0E;;;;;;;;;;;;;;;;;;;;;;;;;;EAwDgC,CAAA;AAC5G,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAanE,eAAO,MAAM,oBAAoB;;;;IAP/B;;;OAGG;;;;IAlEH,0EAA0E;;;;;;;;;;;;;;EAsEa,CAAA;AACzF,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,O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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2NxE,CAAA;AAEJ;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA;AACjE,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA"}
|
|
@@ -77,6 +77,7 @@ const flowsCommon = z.object({
|
|
|
77
77
|
});
|
|
78
78
|
const defaultRedirectUri = typeof window !== "undefined" ? window.location.origin + window.location.pathname : "";
|
|
79
79
|
const pkceOptions = ["SHA-256", "plain", "no"];
|
|
80
|
+
const credentialsLocationExtension = z.enum(["header", "body"]).optional();
|
|
80
81
|
const oasSecuritySchemeOauth2 = commonProps.extend({
|
|
81
82
|
type: z.literal("oauth2"),
|
|
82
83
|
/** The default scopes for the oauth flow */
|
|
@@ -95,13 +96,15 @@ const oasSecuritySchemeOauth2 = commonProps.extend({
|
|
|
95
96
|
tokenUrl,
|
|
96
97
|
clientSecret: z.string().default(""),
|
|
97
98
|
username: z.string().default(""),
|
|
98
|
-
password: z.string().default("")
|
|
99
|
+
password: z.string().default(""),
|
|
100
|
+
"x-scalar-credentials-location": credentialsLocationExtension
|
|
99
101
|
}),
|
|
100
102
|
/** Configuration for the OAuth Client Credentials flow. Previously called application in OpenAPI 2.0. */
|
|
101
103
|
clientCredentials: flowsCommon.extend({
|
|
102
104
|
type: z.literal("clientCredentials").default("clientCredentials"),
|
|
103
105
|
tokenUrl,
|
|
104
|
-
clientSecret: z.string().default("")
|
|
106
|
+
clientSecret: z.string().default(""),
|
|
107
|
+
"x-scalar-credentials-location": credentialsLocationExtension
|
|
105
108
|
}),
|
|
106
109
|
/** Configuration for the OAuth Authorization Code flow. Previously called accessCode in OpenAPI 2.0.*/
|
|
107
110
|
authorizationCode: flowsCommon.extend({
|
|
@@ -110,7 +113,8 @@ const oasSecuritySchemeOauth2 = commonProps.extend({
|
|
|
110
113
|
"x-usePkce": z.enum(pkceOptions).optional().default("no"),
|
|
111
114
|
"x-scalar-redirect-uri": z.string().optional().default(defaultRedirectUri),
|
|
112
115
|
tokenUrl,
|
|
113
|
-
|
|
116
|
+
clientSecret: z.string().default(""),
|
|
117
|
+
"x-scalar-credentials-location": credentialsLocationExtension
|
|
114
118
|
})
|
|
115
119
|
}).partial().default({
|
|
116
120
|
implicit: { type: "implicit", authorizationUrl: "http://localhost:8080" }
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/entities/security-scheme.ts"],
|
|
4
|
-
"sourcesContent": ["import { z } from 'zod'\n\nimport { type ENTITY_BRANDS, nanoidSchema } from '../utils/nanoid'\n\n// ---------------------------------------------------------------------------\n// COMMON PROPS FOR ALL SECURITY SCHEMES\n\n/** Some common properties used in all security schemes */\nconst commonProps = z.object({\n /* A description for security scheme. CommonMark syntax MAY be used for rich text representation. */\n description: z.string().optional(),\n})\n\nconst extendedSecuritySchema = z.object({\n uid: nanoidSchema.brand<ENTITY_BRANDS['SECURITY_SCHEME']>(),\n /** The name key that links a security requirement to a security object */\n nameKey: z.string().optional().default(''),\n})\n\n// ---------------------------------------------------------------------------\n// API KEY\n\nexport const securitySchemeApiKeyIn = ['query', 'header', 'cookie'] as const\n\nconst oasSecuritySchemeApiKey = commonProps.extend({\n type: z.literal('apiKey'),\n /** REQUIRED. The name of the header, query or cookie parameter to be used. */\n name: z.string().optional().default(''),\n /** REQUIRED. The location of the API key. Valid values are \"query\", \"header\" or \"cookie\". */\n in: z.enum(securitySchemeApiKeyIn).optional().default('header').catch('header'),\n})\n\nconst apiKeyValueSchema = z.object({\n value: z.string().default(''),\n})\n\nexport const securityApiKeySchema = oasSecuritySchemeApiKey.merge(extendedSecuritySchema).merge(apiKeyValueSchema)\nexport type SecuritySchemeApiKey = z.infer<typeof securityApiKeySchema>\n\n// ---------------------------------------------------------------------------\n// HTTP\n\nconst oasSecuritySchemeHttp = commonProps.extend({\n type: z.literal('http'),\n /**\n * REQUIRED. The name of the HTTP Authorization scheme to be used in the Authorization header as defined in\n * [RFC7235]. The values used SHOULD be registered in the IANA Authentication Scheme registry.\n */\n scheme: z\n .string()\n .toLowerCase()\n .pipe(z.enum(['basic', 'bearer']))\n .optional()\n .default('basic'),\n /**\n * A hint to the client to identify how the bearer token is formatted.\n * Bearer tokens are usually generated by an authorization server, so\n * this information is primarily for documentation purposes.\n */\n bearerFormat: z\n .union([z.literal('JWT'), z.string()])\n .optional()\n .default('JWT'),\n})\n\nconst httpValueSchema = z.object({\n username: z.string().default(''),\n password: z.string().default(''),\n token: z.string().default(''),\n})\n\nexport const securityHttpSchema = oasSecuritySchemeHttp.merge(extendedSecuritySchema).merge(httpValueSchema)\nexport type SecuritySchemaHttp = z.infer<typeof securityHttpSchema>\n\n// ---------------------------------------------------------------------------\n// OPENID CONNECT\nconst oasSecuritySchemeOpenId = commonProps.extend({\n type: z.literal('openIdConnect'),\n /**\n * REQUIRED. OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the\n * form of a URL. The OpenID Connect standard requires the use of TLS.\n */\n openIdConnectUrl: z.string().optional().default(''),\n})\n\nexport const securityOpenIdSchema = oasSecuritySchemeOpenId.merge(extendedSecuritySchema)\nexport type SecuritySchemaOpenId = z.infer<typeof securityOpenIdSchema>\n\n// ---------------------------------------------------------------------------\n\n/**\n * REQUIRED. The authorization URL to be used for this flow. This MUST be in\n * the form of a URL. The OAuth2 standard requires the use of TLS.\n */\nconst authorizationUrl = z.string().default('')\n\n/**\n * REQUIRED. The token URL to be used for this flow. This MUST be in the\n * form of a URL. The OAuth2 standard requires the use of TLS.\n */\nconst tokenUrl = z.string().default('')\n\n/** Common properties used across all oauth2 flows */\nconst flowsCommon = z.object({\n /**\n * The URL to be used for obtaining refresh tokens. This MUST be in the form of a\n * URL. The OAuth2 standard requires the use of TLS.\n */\n 'refreshUrl': z.string().optional().default(''),\n /**\n * REQUIRED. The available scopes for the OAuth2 security scheme. A map\n * between the scope name and a short description for it. The map MAY be empty.\n */\n 'scopes': z.record(z.string(), z.string().optional().default('')).optional().default({}).catch({}),\n 'selectedScopes': z.array(z.string()).optional().default([]),\n /** Extension to save the client Id associated with an oauth flow */\n 'x-scalar-client-id': z.string().optional().default(''),\n /** The auth token */\n 'token': z.string().default(''),\n /** Additional query parameters for the OAuth authorization request. Example: { prompt: 'consent', audience: 'scalar' }. */\n 'x-scalar-security-query': z.record(z.string(), z.string()).optional(),\n /** Additional body parameters for the OAuth token request. Example: { audience: 'foo' }. */\n 'x-scalar-security-body': z.record(z.string(), z.string()).optional(),\n /** Extension to specify custom token name in the response (defaults to 'access_token') */\n 'x-tokenName': z.string().optional(),\n})\n\n/** Setup a default redirect uri if we can */\nconst defaultRedirectUri = typeof window !== 'undefined' ? window.location.origin + window.location.pathname : ''\n\n/** Options for the x-usePkce extension */\nexport const pkceOptions = ['SHA-256', 'plain', 'no'] as const\n\n/** Oauth2 security scheme */\nconst oasSecuritySchemeOauth2 = commonProps.extend({\n type: z.literal('oauth2'),\n /** The default scopes for the oauth flow */\n 'x-default-scopes': z.string().or(z.array(z.string())).optional(),\n /** REQUIRED. An object containing configuration information for the flow types supported. */\n flows: z\n .object({\n /** Configuration for the OAuth Implicit flow */\n implicit: flowsCommon.extend({\n 'type': z.literal('implicit').default('implicit'),\n authorizationUrl,\n 'x-scalar-redirect-uri': z.string().optional().default(defaultRedirectUri),\n }),\n /** Configuration for the OAuth Resource Owner Password flow */\n password: flowsCommon.extend({\n type: z.literal('password').default('password'),\n tokenUrl,\n clientSecret: z.string().default(''),\n username: z.string().default(''),\n password: z.string().default(''),\n }),\n /** Configuration for the OAuth Client Credentials flow. Previously called application in OpenAPI 2.0. */\n clientCredentials: flowsCommon.extend({\n type: z.literal('clientCredentials').default('clientCredentials'),\n tokenUrl,\n clientSecret: z.string().default(''),\n }),\n /** Configuration for the OAuth Authorization Code flow. Previously called accessCode in OpenAPI 2.0.*/\n authorizationCode: flowsCommon.extend({\n 'type': z.literal('authorizationCode').default('authorizationCode'),\n authorizationUrl,\n 'x-usePkce': z.enum(pkceOptions).optional().default('no'),\n 'x-scalar-redirect-uri': z.string().optional().default(defaultRedirectUri),\n tokenUrl,\n 'clientSecret': z.string().default(''),\n }),\n })\n .partial()\n .default({\n implicit: { type: 'implicit', authorizationUrl: 'http://localhost:8080' },\n }),\n})\n\nexport const securityOauthSchema = oasSecuritySchemeOauth2.merge(extendedSecuritySchema)\n\nexport type SecuritySchemeOauth2 = z.infer<typeof securityOauthSchema>\nexport type SecuritySchemeOauth2Payload = z.input<typeof securityOauthSchema>\nexport type Oauth2Flow = NonNullable<\n SecuritySchemeOauth2['flows']['authorizationCode' | 'clientCredentials' | 'implicit' | 'password']\n>\n/** Payload for the oauth 2 flows + extensions */\nexport type Oauth2FlowPayload = NonNullable<SecuritySchemeOauth2Payload['flows']>[\n | 'authorizationCode'\n | 'clientCredentials'\n | 'implicit'\n | 'password'] &\n Record<`x-${string}`, string>\n\n// ---------------------------------------------------------------------------\n// Final Types\n\n/**\n * Security Requirement\n * Lists the required security schemes to execute this operation OR the whole collection/spec.\n * The name used for each property MUST correspond to a security scheme declared in the Security\n * Schemes under the Components Object.\n *\n * The key (name) here will be matched to the key of the securityScheme for linking\n *\n * @see https://spec.openapis.org/oas/latest.html#security-requirement-object\n */\nexport const oasSecurityRequirementSchema = z.record(z.string(), z.array(z.string()).optional().default([]))\n\n/** OAS Compliant security schemes */\nexport const oasSecuritySchemeSchema = z.union([\n oasSecuritySchemeApiKey,\n oasSecuritySchemeHttp,\n oasSecuritySchemeOauth2,\n oasSecuritySchemeOpenId,\n])\n\n/** Extended security schemes for workspace usage */\nexport const securitySchemeSchema = z\n .discriminatedUnion('type', [securityApiKeySchema, securityHttpSchema, securityOpenIdSchema, securityOauthSchema])\n .transform((data) => {\n // Set selected scopes from x-default-scopes\n if (data.type === 'oauth2' && data['x-default-scopes']?.length) {\n const keys = Object.keys(data.flows) as Array<keyof typeof data.flows>\n keys.forEach((key) => {\n if (data.flows[key]?.selectedScopes && data['x-default-scopes']) {\n data.flows[key].selectedScopes = [data['x-default-scopes']].flat()\n }\n })\n }\n return data\n })\n\n/**\n * Security Scheme Object\n *\n * @see https://spec.openapis.org/oas/latest.html#security-scheme-object\n */\nexport type SecurityScheme = z.infer<typeof securitySchemeSchema>\nexport type SecuritySchemePayload = z.input<typeof securitySchemeSchema>\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,SAAS;AAElB,SAA6B,oBAAoB;AAMjD,MAAM,cAAc,EAAE,OAAO;AAAA;AAAA,EAE3B,aAAa,EAAE,OAAO,EAAE,SAAS;AACnC,CAAC;AAED,MAAM,yBAAyB,EAAE,OAAO;AAAA,EACtC,KAAK,aAAa,MAAwC;AAAA;AAAA,EAE1D,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE;AAC3C,CAAC;AAKM,MAAM,yBAAyB,CAAC,SAAS,UAAU,QAAQ;AAElE,MAAM,0BAA0B,YAAY,OAAO;AAAA,EACjD,MAAM,EAAE,QAAQ,QAAQ;AAAA;AAAA,EAExB,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE;AAAA;AAAA,EAEtC,IAAI,EAAE,KAAK,sBAAsB,EAAE,SAAS,EAAE,QAAQ,QAAQ,EAAE,MAAM,QAAQ;AAChF,CAAC;AAED,MAAM,oBAAoB,EAAE,OAAO;AAAA,EACjC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE;AAC9B,CAAC;AAEM,MAAM,uBAAuB,wBAAwB,MAAM,sBAAsB,E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E,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;AAAA,EACjG,kBAAkB,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;AAAA;AAAA,EAE3D,sBAAsB,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE;AAAA;AAAA,EAEtD,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE;AAAA;AAAA,EAE9B,2BAA2B,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,OAAO,CAAC,EAAE,SAAS;AAAA;AAAA,EAErE,0BAA0B,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,OAAO,CAAC,EAAE,SAAS;AAAA;AAAA,EAEpE,eAAe,EAAE,OAAO,EAAE,SAAS;AACrC,CAAC;AAGD,MAAM,qBAAqB,OAAO,WAAW,cAAc,OAAO,SAAS,SAAS,OAAO,SAAS,WAAW;AAGxG,MAAM,cAAc,CAAC,WAAW,SAAS,IAAI;
|
|
4
|
+
"sourcesContent": ["import { z } from 'zod'\n\nimport { type ENTITY_BRANDS, nanoidSchema } from '../utils/nanoid'\n\n// ---------------------------------------------------------------------------\n// COMMON PROPS FOR ALL SECURITY SCHEMES\n\n/** Some common properties used in all security schemes */\nconst commonProps = z.object({\n /* A description for security scheme. CommonMark syntax MAY be used for rich text representation. */\n description: z.string().optional(),\n})\n\nconst extendedSecuritySchema = z.object({\n uid: nanoidSchema.brand<ENTITY_BRANDS['SECURITY_SCHEME']>(),\n /** The name key that links a security requirement to a security object */\n nameKey: z.string().optional().default(''),\n})\n\n// ---------------------------------------------------------------------------\n// API KEY\n\nexport const securitySchemeApiKeyIn = ['query', 'header', 'cookie'] as const\n\nconst oasSecuritySchemeApiKey = commonProps.extend({\n type: z.literal('apiKey'),\n /** REQUIRED. The name of the header, query or cookie parameter to be used. */\n name: z.string().optional().default(''),\n /** REQUIRED. The location of the API key. Valid values are \"query\", \"header\" or \"cookie\". */\n in: z.enum(securitySchemeApiKeyIn).optional().default('header').catch('header'),\n})\n\nconst apiKeyValueSchema = z.object({\n value: z.string().default(''),\n})\n\nexport const securityApiKeySchema = oasSecuritySchemeApiKey.merge(extendedSecuritySchema).merge(apiKeyValueSchema)\nexport type SecuritySchemeApiKey = z.infer<typeof securityApiKeySchema>\n\n// ---------------------------------------------------------------------------\n// HTTP\n\nconst oasSecuritySchemeHttp = commonProps.extend({\n type: z.literal('http'),\n /**\n * REQUIRED. The name of the HTTP Authorization scheme to be used in the Authorization header as defined in\n * [RFC7235]. The values used SHOULD be registered in the IANA Authentication Scheme registry.\n */\n scheme: z\n .string()\n .toLowerCase()\n .pipe(z.enum(['basic', 'bearer']))\n .optional()\n .default('basic'),\n /**\n * A hint to the client to identify how the bearer token is formatted.\n * Bearer tokens are usually generated by an authorization server, so\n * this information is primarily for documentation purposes.\n */\n bearerFormat: z\n .union([z.literal('JWT'), z.string()])\n .optional()\n .default('JWT'),\n})\n\nconst httpValueSchema = z.object({\n username: z.string().default(''),\n password: z.string().default(''),\n token: z.string().default(''),\n})\n\nexport const securityHttpSchema = oasSecuritySchemeHttp.merge(extendedSecuritySchema).merge(httpValueSchema)\nexport type SecuritySchemaHttp = z.infer<typeof securityHttpSchema>\n\n// ---------------------------------------------------------------------------\n// OPENID CONNECT\nconst oasSecuritySchemeOpenId = commonProps.extend({\n type: z.literal('openIdConnect'),\n /**\n * REQUIRED. OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the\n * form of a URL. The OpenID Connect standard requires the use of TLS.\n */\n openIdConnectUrl: z.string().optional().default(''),\n})\n\nexport const securityOpenIdSchema = oasSecuritySchemeOpenId.merge(extendedSecuritySchema)\nexport type SecuritySchemaOpenId = z.infer<typeof securityOpenIdSchema>\n\n// ---------------------------------------------------------------------------\n\n/**\n * REQUIRED. The authorization URL to be used for this flow. This MUST be in\n * the form of a URL. The OAuth2 standard requires the use of TLS.\n */\nconst authorizationUrl = z.string().default('')\n\n/**\n * REQUIRED. The token URL to be used for this flow. This MUST be in the\n * form of a URL. The OAuth2 standard requires the use of TLS.\n */\nconst tokenUrl = z.string().default('')\n\n/** Common properties used across all oauth2 flows */\nconst flowsCommon = z.object({\n /**\n * The URL to be used for obtaining refresh tokens. This MUST be in the form of a\n * URL. The OAuth2 standard requires the use of TLS.\n */\n 'refreshUrl': z.string().optional().default(''),\n /**\n * REQUIRED. The available scopes for the OAuth2 security scheme. A map\n * between the scope name and a short description for it. The map MAY be empty.\n */\n 'scopes': z.record(z.string(), z.string().optional().default('')).optional().default({}).catch({}),\n 'selectedScopes': z.array(z.string()).optional().default([]),\n /** Extension to save the client Id associated with an oauth flow */\n 'x-scalar-client-id': z.string().optional().default(''),\n /** The auth token */\n 'token': z.string().default(''),\n /** Additional query parameters for the OAuth authorization request. Example: { prompt: 'consent', audience: 'scalar' }. */\n 'x-scalar-security-query': z.record(z.string(), z.string()).optional(),\n /** Additional body parameters for the OAuth token request. Example: { audience: 'foo' }. */\n 'x-scalar-security-body': z.record(z.string(), z.string()).optional(),\n /** Extension to specify custom token name in the response (defaults to 'access_token') */\n 'x-tokenName': z.string().optional(),\n})\n\n/** Setup a default redirect uri if we can */\nconst defaultRedirectUri = typeof window !== 'undefined' ? window.location.origin + window.location.pathname : ''\n\n/** Options for the x-usePkce extension */\nexport const pkceOptions = ['SHA-256', 'plain', 'no'] as const\n\nconst credentialsLocationExtension = z.enum(['header', 'body']).optional()\n\n/** Oauth2 security scheme */\nconst oasSecuritySchemeOauth2 = commonProps.extend({\n type: z.literal('oauth2'),\n /** The default scopes for the oauth flow */\n 'x-default-scopes': z.string().or(z.array(z.string())).optional(),\n /** REQUIRED. An object containing configuration information for the flow types supported. */\n flows: z\n .object({\n /** Configuration for the OAuth Implicit flow */\n implicit: flowsCommon.extend({\n 'type': z.literal('implicit').default('implicit'),\n authorizationUrl,\n 'x-scalar-redirect-uri': z.string().optional().default(defaultRedirectUri),\n }),\n /** Configuration for the OAuth Resource Owner Password flow */\n password: flowsCommon.extend({\n type: z.literal('password').default('password'),\n tokenUrl,\n clientSecret: z.string().default(''),\n username: z.string().default(''),\n password: z.string().default(''),\n 'x-scalar-credentials-location': credentialsLocationExtension,\n }),\n /** Configuration for the OAuth Client Credentials flow. Previously called application in OpenAPI 2.0. */\n clientCredentials: flowsCommon.extend({\n type: z.literal('clientCredentials').default('clientCredentials'),\n tokenUrl,\n clientSecret: z.string().default(''),\n 'x-scalar-credentials-location': credentialsLocationExtension,\n }),\n /** Configuration for the OAuth Authorization Code flow. Previously called accessCode in OpenAPI 2.0.*/\n authorizationCode: flowsCommon.extend({\n 'type': z.literal('authorizationCode').default('authorizationCode'),\n authorizationUrl,\n 'x-usePkce': z.enum(pkceOptions).optional().default('no'),\n 'x-scalar-redirect-uri': z.string().optional().default(defaultRedirectUri),\n tokenUrl,\n clientSecret: z.string().default(''),\n 'x-scalar-credentials-location': credentialsLocationExtension,\n }),\n })\n .partial()\n .default({\n implicit: { type: 'implicit', authorizationUrl: 'http://localhost:8080' },\n }),\n})\n\nexport const securityOauthSchema = oasSecuritySchemeOauth2.merge(extendedSecuritySchema)\n\nexport type SecuritySchemeOauth2 = z.infer<typeof securityOauthSchema>\nexport type SecuritySchemeOauth2Payload = z.input<typeof securityOauthSchema>\nexport type Oauth2Flow = NonNullable<\n SecuritySchemeOauth2['flows']['authorizationCode' | 'clientCredentials' | 'implicit' | 'password']\n>\n/** Payload for the oauth 2 flows + extensions */\nexport type Oauth2FlowPayload = NonNullable<SecuritySchemeOauth2Payload['flows']>[\n | 'authorizationCode'\n | 'clientCredentials'\n | 'implicit'\n | 'password'] &\n Record<`x-${string}`, string>\n\n// ---------------------------------------------------------------------------\n// Final Types\n\n/**\n * Security Requirement\n * Lists the required security schemes to execute this operation OR the whole collection/spec.\n * The name used for each property MUST correspond to a security scheme declared in the Security\n * Schemes under the Components Object.\n *\n * The key (name) here will be matched to the key of the securityScheme for linking\n *\n * @see https://spec.openapis.org/oas/latest.html#security-requirement-object\n */\nexport const oasSecurityRequirementSchema = z.record(z.string(), z.array(z.string()).optional().default([]))\n\n/** OAS Compliant security schemes */\nexport const oasSecuritySchemeSchema = z.union([\n oasSecuritySchemeApiKey,\n oasSecuritySchemeHttp,\n oasSecuritySchemeOauth2,\n oasSecuritySchemeOpenId,\n])\n\n/** Extended security schemes for workspace usage */\nexport const securitySchemeSchema = z\n .discriminatedUnion('type', [securityApiKeySchema, securityHttpSchema, securityOpenIdSchema, securityOauthSchema])\n .transform((data) => {\n // Set selected scopes from x-default-scopes\n if (data.type === 'oauth2' && data['x-default-scopes']?.length) {\n const keys = Object.keys(data.flows) as Array<keyof typeof data.flows>\n keys.forEach((key) => {\n if (data.flows[key]?.selectedScopes && data['x-default-scopes']) {\n data.flows[key].selectedScopes = [data['x-default-scopes']].flat()\n }\n })\n }\n return data\n })\n\n/**\n * Security Scheme Object\n *\n * @see https://spec.openapis.org/oas/latest.html#security-scheme-object\n */\nexport type SecurityScheme = z.infer<typeof securitySchemeSchema>\nexport type SecuritySchemePayload = z.input<typeof securitySchemeSchema>\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,SAAS;AAElB,SAA6B,oBAAoB;AAMjD,MAAM,cAAc,EAAE,OAAO;AAAA;AAAA,EAE3B,aAAa,EAAE,OAAO,EAAE,SAAS;AACnC,CAAC;AAED,MAAM,yBAAyB,EAAE,OAAO;AAAA,EACtC,KAAK,aAAa,MAAwC;AAAA;AAAA,EAE1D,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE;AAC3C,CAAC;AAKM,MAAM,yBAAyB,CAAC,SAAS,UAAU,QAAQ;AAElE,MAAM,0BAA0B,YAAY,OAAO;AAAA,EACjD,MAAM,EAAE,QAAQ,QAAQ;AAAA;AAAA,EAExB,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE;AAAA;AAAA,EAEtC,IAAI,EAAE,KAAK,sBAAsB,EAAE,SAAS,EAAE,QAAQ,QAAQ,EAAE,MAAM,QAAQ;AAChF,CAAC;AAED,MAAM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QAAQ,CAAC,sBAAsB,oBAAoB,sBAAsB,mBAAmB,CAAC,EAChH,UAAU,CAAC,SAAS;AAEnB,MAAI,KAAK,SAAS,YAAY,KAAK,kBAAkB,GAAG,QAAQ;AAC9D,UAAM,OAAO,OAAO,KAAK,KAAK,KAAK;AACnC,SAAK,QAAQ,CAAC,QAAQ;AACpB,UAAI,KAAK,MAAM,GAAG,GAAG,kBAAkB,KAAK,kBAAkB,GAAG;AAC/D,aAAK,MAAM,GAAG,EAAE,iBAAiB,CAAC,KAAK,kBAAkB,CAAC,EAAE,KAAK;AAAA,MACnE;AAAA,IACF,CAAC;AAAA,EACH;AACA,SAAO;AACT,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -172,17 +172,12 @@ export type ScalarState = {
|
|
|
172
172
|
content: string;
|
|
173
173
|
}[];
|
|
174
174
|
};
|
|
175
|
-
export type SSRState = {
|
|
176
|
-
payload: {
|
|
177
|
-
data: ScalarState;
|
|
178
|
-
};
|
|
179
|
-
url: string;
|
|
180
|
-
};
|
|
181
175
|
export type Tag = {
|
|
182
176
|
'name': string;
|
|
183
177
|
'description': string;
|
|
184
178
|
'operations': TransformedOperation[];
|
|
185
179
|
'x-displayName'?: string;
|
|
180
|
+
'externalDocs'?: OpenAPIV3_1.ExternalDocumentationObject;
|
|
186
181
|
};
|
|
187
182
|
export type TagGroup = {
|
|
188
183
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reference-config.d.ts","sourceRoot":"","sources":["../../src/legacy/reference-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAEvF,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAA;AACvE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAEjD;;;GAGG;AACH,YAAY,EACV,OAAO,EACP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AAE,MAAM,CAAA;QACX,WAAW,CAAC,EAAE,MAAM,CAAA;KACrB,CAAA;IACD,SAAS,CAAC,EAAE,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,WAAW,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAA;IAC3E,YAAY,CAAC,EAAE,SAAS,CAAC,gBAAgB,GAAG,WAAW,CAAC,gBAAgB,CAAA;IACxE,UAAU,CAAC,EAAE,oBAAoB,EAAE,CAAA;IACnC,aAAa,CAAC,EAAE,WAAW,CAAA;IAC3B,SAAS,CAAC,EAAE,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAA;IACzC,SAAS,CAAC,EAAE,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,WAAW,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAA;IAC3E,aAAa,CAAC,EAAE,QAAQ,EAAE,CAAA;IAC1B,UAAU,CAAC,EAAE,SAAS,CAAC,yBAAyB,EAAE,CAAA;CACnD,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/legacy/reference-config.ts"],
|
|
4
|
-
"sourcesContent": ["import type { OpenAPI, OpenAPIV2, OpenAPIV3, OpenAPIV3_1 } from '@scalar/openapi-types'\n\nimport type { ApiReferenceConfiguration } from '../api-reference/index'\nimport type { TargetId } from '../snippetz/index'\n\n/**\n * This re-export is needed due to a typescript issue\n * @see https://github.com/microsoft/TypeScript/issues/42873\n */\nexport type {\n OpenAPI,\n OpenAPIV2,\n OpenAPIV3,\n OpenAPIV3_1,\n} from '@scalar/openapi-types'\n\nexport type ClientInfo = {\n key: string\n title: string\n link: string\n description: string\n}\n\n/**\n * Alias for the OpenAPI 3.1 ServerObject type\n *\n * @deprecated Use OpenAPIV3_1.ServerObject instead\n */\nexport type Server = OpenAPIV3_1.ServerObject\n\nexport type TargetInfo = {\n key: TargetId\n title: string\n extname: `.${string}` | null\n default: string\n}\n\nexport type HiddenClients =\n // Just hide all\n | true\n // Exclude whole targets or just specific clients\n | Partial<Record<TargetInfo['key'], boolean | ClientInfo['key'][]>>\n // Backwards compatibility with the previous behavior ['fetch', 'xhr']\n | ClientInfo['key'][]\n\nexport type PathRouting = {\n basePath: string\n}\n\n/**\n * @deprecated Use ApiReferenceConfiguration instead\n *\n * @example import type { ApiReferenceConfiguration } from '@scalar/types/api-reference'\n */\nexport type ReferenceConfiguration = Partial<ApiReferenceConfiguration>\n\nexport type BaseParameter = {\n name: string\n description?: string | null\n value: string | number | Record<string, any>\n required?: boolean\n enabled: boolean\n}\n\ntype OptionalCharset = string | null\n\nexport type ContentType =\n | `application/json${OptionalCharset}`\n | `application/xml${OptionalCharset}`\n | `text/plain${OptionalCharset}`\n | `text/html${OptionalCharset}`\n | `application/octet-stream${OptionalCharset}`\n | `application/x-www-form-urlencoded${OptionalCharset}`\n | `multipart/form-data${OptionalCharset}`\n | `*/*${OptionalCharset}`\n | `application/vnd.${string}+json${OptionalCharset}`\n\nexport type Cookie = {\n name: string\n value: string\n}\n\nexport type CustomRequestExample = {\n lang: string\n label: string\n source: string\n}\n\nexport type Header = {\n name: string\n value: string\n}\n\nexport enum XScalarStability {\n Deprecated = 'deprecated',\n Experimental = 'experimental',\n Stable = 'stable',\n}\n\nexport type Operation = {\n id: string\n httpVerb: OpenAPIV3_1.HttpMethods\n path: string\n name: string\n isWebhook: boolean\n description?: string\n information: OpenAPIV3_1.OperationObject\n servers?: OpenAPIV3_1.ServerObject[]\n pathParameters?: OpenAPIV3_1.ParameterObject[]\n}\n\n/**\n * @deprecated Use Parameter instead\n */\nexport type Parameters = Parameter\n\nexport type Parameter = {\n // Fixed Fields\n name: string\n in?: string\n description?: string\n required?: boolean\n deprecated?: boolean\n allowEmptyValue?: boolean\n // Other\n style?: 'form' | 'simple'\n explode?: boolean\n allowReserved?: boolean\n schema?: Schema\n example?: any\n examples?: Map<string, any>\n content?: RequestBodyMimeTypes\n headers?: { [key: string]: OpenAPI.HeaderObject }\n}\n\nexport type Query = {\n name: string\n value: string\n}\n\n// Create a mapped type to ensure keys are a subset of ContentType\nexport type RequestBodyMimeTypes = {\n [K in ContentType]?: {\n schema?: any\n example?: any\n examples?: any\n }\n}\n\nexport type RequestBody = {\n description?: string\n required?: boolean\n content?: RequestBodyMimeTypes\n}\n\nexport type Schema = {\n type: string\n name?: string\n example?: any\n default?: any\n format?: string\n description?: string\n properties?: Record<string, Schema>\n}\n\n/**\n * This is a very strange and custom way to represent the operation object.\n * It's the outcome of the `parse` helper.\n *\n * @deprecated This is evil. Stop using it. We'll transition to use the new store.\n */\nexport type TransformedOperation = Operation & {\n pathParameters?: Parameter[]\n}\n\nexport type CollapsedSidebarItems = Record<string, boolean>\n\nexport type AuthenticationState = {\n customSecurity?: boolean\n /** You can pre-select a single security scheme, multiple, or complex security using an array of arrays */\n preferredSecurityScheme?: string | (string | string[])[] | null\n securitySchemes?:\n | OpenAPIV2.SecurityDefinitionsObject\n | OpenAPIV3.ComponentsObject['securitySchemes']\n | OpenAPIV3_1.ComponentsObject['securitySchemes']\n http?: {\n basic?: {\n username?: string\n password?: string\n }\n bearer?: {\n token?: string\n }\n }\n apiKey?: {\n token?: string\n }\n oAuth2?: {\n clientId?: string\n scopes?: string[]\n accessToken?: string\n state?: string\n username?: string\n password?: string\n }\n}\n\nexport type Heading = {\n depth: number\n value: string\n slug?: string\n}\n\nexport type CodeBlockSSRKey = `components-scalar-code-block${number}`\nexport type DescriptionSectionSSRKey = `components-Content-Introduction-Description-sections${number}`\n\nexport type ScalarState = {\n 'hash'?: string\n 'useGlobalStore-authentication'?: AuthenticationState\n 'useSidebarContent-collapsedSidebarItems'?: CollapsedSidebarItems\n [key: CodeBlockSSRKey]: string\n [key: DescriptionSectionSSRKey]: {\n heading: Heading\n content: string\n }[]\n}\n\nexport type
|
|
4
|
+
"sourcesContent": ["import type { OpenAPI, OpenAPIV2, OpenAPIV3, OpenAPIV3_1 } from '@scalar/openapi-types'\n\nimport type { ApiReferenceConfiguration } from '../api-reference/index'\nimport type { TargetId } from '../snippetz/index'\n\n/**\n * This re-export is needed due to a typescript issue\n * @see https://github.com/microsoft/TypeScript/issues/42873\n */\nexport type {\n OpenAPI,\n OpenAPIV2,\n OpenAPIV3,\n OpenAPIV3_1,\n} from '@scalar/openapi-types'\n\nexport type ClientInfo = {\n key: string\n title: string\n link: string\n description: string\n}\n\n/**\n * Alias for the OpenAPI 3.1 ServerObject type\n *\n * @deprecated Use OpenAPIV3_1.ServerObject instead\n */\nexport type Server = OpenAPIV3_1.ServerObject\n\nexport type TargetInfo = {\n key: TargetId\n title: string\n extname: `.${string}` | null\n default: string\n}\n\nexport type HiddenClients =\n // Just hide all\n | true\n // Exclude whole targets or just specific clients\n | Partial<Record<TargetInfo['key'], boolean | ClientInfo['key'][]>>\n // Backwards compatibility with the previous behavior ['fetch', 'xhr']\n | ClientInfo['key'][]\n\nexport type PathRouting = {\n basePath: string\n}\n\n/**\n * @deprecated Use ApiReferenceConfiguration instead\n *\n * @example import type { ApiReferenceConfiguration } from '@scalar/types/api-reference'\n */\nexport type ReferenceConfiguration = Partial<ApiReferenceConfiguration>\n\nexport type BaseParameter = {\n name: string\n description?: string | null\n value: string | number | Record<string, any>\n required?: boolean\n enabled: boolean\n}\n\ntype OptionalCharset = string | null\n\nexport type ContentType =\n | `application/json${OptionalCharset}`\n | `application/xml${OptionalCharset}`\n | `text/plain${OptionalCharset}`\n | `text/html${OptionalCharset}`\n | `application/octet-stream${OptionalCharset}`\n | `application/x-www-form-urlencoded${OptionalCharset}`\n | `multipart/form-data${OptionalCharset}`\n | `*/*${OptionalCharset}`\n | `application/vnd.${string}+json${OptionalCharset}`\n\nexport type Cookie = {\n name: string\n value: string\n}\n\nexport type CustomRequestExample = {\n lang: string\n label: string\n source: string\n}\n\nexport type Header = {\n name: string\n value: string\n}\n\nexport enum XScalarStability {\n Deprecated = 'deprecated',\n Experimental = 'experimental',\n Stable = 'stable',\n}\n\nexport type Operation = {\n id: string\n httpVerb: OpenAPIV3_1.HttpMethods\n path: string\n name: string\n isWebhook: boolean\n description?: string\n information: OpenAPIV3_1.OperationObject\n servers?: OpenAPIV3_1.ServerObject[]\n pathParameters?: OpenAPIV3_1.ParameterObject[]\n}\n\n/**\n * @deprecated Use Parameter instead\n */\nexport type Parameters = Parameter\n\nexport type Parameter = {\n // Fixed Fields\n name: string\n in?: string\n description?: string\n required?: boolean\n deprecated?: boolean\n allowEmptyValue?: boolean\n // Other\n style?: 'form' | 'simple'\n explode?: boolean\n allowReserved?: boolean\n schema?: Schema\n example?: any\n examples?: Map<string, any>\n content?: RequestBodyMimeTypes\n headers?: { [key: string]: OpenAPI.HeaderObject }\n}\n\nexport type Query = {\n name: string\n value: string\n}\n\n// Create a mapped type to ensure keys are a subset of ContentType\nexport type RequestBodyMimeTypes = {\n [K in ContentType]?: {\n schema?: any\n example?: any\n examples?: any\n }\n}\n\nexport type RequestBody = {\n description?: string\n required?: boolean\n content?: RequestBodyMimeTypes\n}\n\nexport type Schema = {\n type: string\n name?: string\n example?: any\n default?: any\n format?: string\n description?: string\n properties?: Record<string, Schema>\n}\n\n/**\n * This is a very strange and custom way to represent the operation object.\n * It's the outcome of the `parse` helper.\n *\n * @deprecated This is evil. Stop using it. We'll transition to use the new store.\n */\nexport type TransformedOperation = Operation & {\n pathParameters?: Parameter[]\n}\n\nexport type CollapsedSidebarItems = Record<string, boolean>\n\nexport type AuthenticationState = {\n customSecurity?: boolean\n /** You can pre-select a single security scheme, multiple, or complex security using an array of arrays */\n preferredSecurityScheme?: string | (string | string[])[] | null\n securitySchemes?:\n | OpenAPIV2.SecurityDefinitionsObject\n | OpenAPIV3.ComponentsObject['securitySchemes']\n | OpenAPIV3_1.ComponentsObject['securitySchemes']\n http?: {\n basic?: {\n username?: string\n password?: string\n }\n bearer?: {\n token?: string\n }\n }\n apiKey?: {\n token?: string\n }\n oAuth2?: {\n clientId?: string\n scopes?: string[]\n accessToken?: string\n state?: string\n username?: string\n password?: string\n }\n}\n\nexport type Heading = {\n depth: number\n value: string\n slug?: string\n}\n\nexport type CodeBlockSSRKey = `components-scalar-code-block${number}`\nexport type DescriptionSectionSSRKey = `components-Content-Introduction-Description-sections${number}`\n\nexport type ScalarState = {\n 'hash'?: string\n 'useGlobalStore-authentication'?: AuthenticationState\n 'useSidebarContent-collapsedSidebarItems'?: CollapsedSidebarItems\n [key: CodeBlockSSRKey]: string\n [key: DescriptionSectionSSRKey]: {\n heading: Heading\n content: string\n }[]\n}\n\nexport type Tag = {\n 'name': string\n 'description': string\n 'operations': TransformedOperation[]\n 'x-displayName'?: string\n 'externalDocs'?: OpenAPIV3_1.ExternalDocumentationObject\n}\n\nexport type TagGroup = {\n name: string\n tags: string[]\n}\n\nexport type Definitions = OpenAPIV2.DefinitionsObject\n\n/**\n * Webhook (after our super custom transformation process)\n *\n * @deprecated Let's get rid of those super custom transformed entities and use the store instead.\n */\nexport type Webhooks = Record<\n string,\n Record<\n OpenAPIV3_1.HttpMethods,\n TransformedOperation & {\n 'x-internal'?: boolean\n }\n >\n>\n\n/**\n * The native OpenAPI Webhook object, but with the x-internal and x-scalar-ignore properties\n */\nexport type Webhook = (OpenAPIV3.OperationObject | OpenAPIV3_1.OperationObject) & {\n 'x-internal'?: boolean\n 'x-scalar-ignore'?: boolean\n}\n\n/**\n * @deprecated Use `@scalar/openapi-types` instead\n */\nexport type Spec = {\n 'tags'?: Tag[]\n 'info':\n | Partial<OpenAPIV2.Document['info']>\n | Partial<OpenAPIV3.Document['info']>\n | Partial<OpenAPIV3_1.Document['info']>\n 'host'?: OpenAPIV2.Document['host']\n 'basePath'?: OpenAPIV2.Document['basePath']\n 'schemes'?: OpenAPIV2.Document['schemes']\n 'externalDocs'?: {\n url: string\n description?: string\n }\n 'servers'?: OpenAPIV3.Document['servers'] | OpenAPIV3_1.Document['servers']\n 'components'?: OpenAPIV3.ComponentsObject | OpenAPIV3_1.ComponentsObject\n 'webhooks'?: TransformedOperation[]\n 'definitions'?: Definitions\n 'swagger'?: OpenAPIV2.Document['swagger']\n 'openapi'?: OpenAPIV3.Document['openapi'] | OpenAPIV3_1.Document['openapi']\n 'x-tagGroups'?: TagGroup[]\n 'security'?: OpenAPIV3.SecurityRequirementObject[]\n}\n"],
|
|
5
5
|
"mappings": "AA6FO,IAAK,mBAAL,kBAAKA,sBAAL;AACL,EAAAA,kBAAA,gBAAa;AACb,EAAAA,kBAAA,kBAAe;AACf,EAAAA,kBAAA,YAAS;AAHC,SAAAA;AAAA,GAAA;",
|
|
6
6
|
"names": ["XScalarStability"]
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"scalar",
|
|
17
17
|
"references"
|
|
18
18
|
],
|
|
19
|
-
"version": "0.2.
|
|
19
|
+
"version": "0.2.11",
|
|
20
20
|
"engines": {
|
|
21
21
|
"node": ">=20"
|
|
22
22
|
},
|
|
@@ -66,12 +66,12 @@
|
|
|
66
66
|
"dependencies": {
|
|
67
67
|
"nanoid": "5.1.5",
|
|
68
68
|
"zod": "3.24.1",
|
|
69
|
-
"@scalar/openapi-types": "0.3.
|
|
69
|
+
"@scalar/openapi-types": "0.3.7"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@types/har-format": "^1.2.15",
|
|
73
73
|
"type-fest": "4.41.0",
|
|
74
|
-
"vite": "
|
|
74
|
+
"vite": "6.1.6",
|
|
75
75
|
"@scalar/build-tooling": "0.2.4"
|
|
76
76
|
},
|
|
77
77
|
"scripts": {
|