@scalar/workspace-store 0.37.0 → 0.38.1

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 CHANGED
@@ -1,5 +1,33 @@
1
1
  # @scalar/workspace-store
2
2
 
3
+ ## 0.38.1
4
+
5
+ ### Patch Changes
6
+
7
+ #### Updated Dependencies
8
+
9
+ - **@scalar/types@0.7.1**
10
+ - [#8381](https://github.com/scalar/scalar/pull/8381): feat: add mcp config support
11
+
12
+ - **@scalar/openapi-upgrader@0.2.0**
13
+
14
+ - **@scalar/snippetz@0.7.1**
15
+
16
+ ## 0.38.0
17
+
18
+ ### Minor Changes
19
+
20
+ - [#8365](https://github.com/scalar/scalar/pull/8365): feat: store oauth flow refresh tokens on the auth store
21
+
22
+ ### Patch Changes
23
+
24
+ - [#8347](https://github.com/scalar/scalar/pull/8347): chore: export server workspace type
25
+
26
+ #### Updated Dependencies
27
+
28
+ - **@scalar/json-magic@0.12.1**
29
+ - [#8357](https://github.com/scalar/scalar/pull/8357): chore: improve performance and memory usage of bundler
30
+
3
31
  ## 0.37.0
4
32
 
5
33
  ### Minor Changes
@@ -19,6 +19,8 @@ declare const SecretsOAuthFlowsSchema: import("@scalar/typebox").TObject<{
19
19
  'x-scalar-secret-client-id': import("@scalar/typebox").TString;
20
20
  }>, import("@scalar/typebox").TObject<{
21
21
  'x-scalar-secret-token': import("@scalar/typebox").TString;
22
+ }>, import("@scalar/typebox").TObject<{
23
+ 'x-scalar-secret-refresh-token': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
22
24
  }>]>, import("@scalar/typebox").TObject<{
23
25
  'x-scalar-secret-redirect-uri': import("@scalar/typebox").TString;
24
26
  }>]>>;
@@ -26,6 +28,8 @@ declare const SecretsOAuthFlowsSchema: import("@scalar/typebox").TObject<{
26
28
  'x-scalar-secret-client-id': import("@scalar/typebox").TString;
27
29
  }>, import("@scalar/typebox").TObject<{
28
30
  'x-scalar-secret-token': import("@scalar/typebox").TString;
31
+ }>, import("@scalar/typebox").TObject<{
32
+ 'x-scalar-secret-refresh-token': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
29
33
  }>]>, import("@scalar/typebox").TObject<{
30
34
  'x-scalar-secret-username': import("@scalar/typebox").TString;
31
35
  'x-scalar-secret-password': import("@scalar/typebox").TString;
@@ -38,6 +42,8 @@ declare const SecretsOAuthFlowsSchema: import("@scalar/typebox").TObject<{
38
42
  'x-scalar-secret-client-id': import("@scalar/typebox").TString;
39
43
  }>, import("@scalar/typebox").TObject<{
40
44
  'x-scalar-secret-token': import("@scalar/typebox").TString;
45
+ }>, import("@scalar/typebox").TObject<{
46
+ 'x-scalar-secret-refresh-token': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
41
47
  }>]>, import("@scalar/typebox").TObject<{
42
48
  'x-scalar-secret-client-secret': import("@scalar/typebox").TString;
43
49
  }>, import("@scalar/typebox").TObject<{
@@ -47,6 +53,8 @@ declare const SecretsOAuthFlowsSchema: import("@scalar/typebox").TObject<{
47
53
  'x-scalar-secret-client-id': import("@scalar/typebox").TString;
48
54
  }>, import("@scalar/typebox").TObject<{
49
55
  'x-scalar-secret-token': import("@scalar/typebox").TString;
56
+ }>, import("@scalar/typebox").TObject<{
57
+ 'x-scalar-secret-refresh-token': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
50
58
  }>]>, import("@scalar/typebox").TObject<{
51
59
  'x-scalar-secret-client-secret': import("@scalar/typebox").TString;
52
60
  }>, import("@scalar/typebox").TObject<{
@@ -63,6 +71,8 @@ declare const OAuthSchema: import("@scalar/typebox").TIntersect<[import("@scalar
63
71
  'x-scalar-secret-client-id': import("@scalar/typebox").TString;
64
72
  }>, import("@scalar/typebox").TObject<{
65
73
  'x-scalar-secret-token': import("@scalar/typebox").TString;
74
+ }>, import("@scalar/typebox").TObject<{
75
+ 'x-scalar-secret-refresh-token': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
66
76
  }>]>, import("@scalar/typebox").TObject<{
67
77
  'x-scalar-secret-redirect-uri': import("@scalar/typebox").TString;
68
78
  }>]>>;
@@ -70,6 +80,8 @@ declare const OAuthSchema: import("@scalar/typebox").TIntersect<[import("@scalar
70
80
  'x-scalar-secret-client-id': import("@scalar/typebox").TString;
71
81
  }>, import("@scalar/typebox").TObject<{
72
82
  'x-scalar-secret-token': import("@scalar/typebox").TString;
83
+ }>, import("@scalar/typebox").TObject<{
84
+ 'x-scalar-secret-refresh-token': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
73
85
  }>]>, import("@scalar/typebox").TObject<{
74
86
  'x-scalar-secret-username': import("@scalar/typebox").TString;
75
87
  'x-scalar-secret-password': import("@scalar/typebox").TString;
@@ -82,6 +94,8 @@ declare const OAuthSchema: import("@scalar/typebox").TIntersect<[import("@scalar
82
94
  'x-scalar-secret-client-id': import("@scalar/typebox").TString;
83
95
  }>, import("@scalar/typebox").TObject<{
84
96
  'x-scalar-secret-token': import("@scalar/typebox").TString;
97
+ }>, import("@scalar/typebox").TObject<{
98
+ 'x-scalar-secret-refresh-token': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
85
99
  }>]>, import("@scalar/typebox").TObject<{
86
100
  'x-scalar-secret-client-secret': import("@scalar/typebox").TString;
87
101
  }>, import("@scalar/typebox").TObject<{
@@ -91,6 +105,8 @@ declare const OAuthSchema: import("@scalar/typebox").TIntersect<[import("@scalar
91
105
  'x-scalar-secret-client-id': import("@scalar/typebox").TString;
92
106
  }>, import("@scalar/typebox").TObject<{
93
107
  'x-scalar-secret-token': import("@scalar/typebox").TString;
108
+ }>, import("@scalar/typebox").TObject<{
109
+ 'x-scalar-secret-refresh-token': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
94
110
  }>]>, import("@scalar/typebox").TObject<{
95
111
  'x-scalar-secret-client-secret': import("@scalar/typebox").TString;
96
112
  }>, import("@scalar/typebox").TObject<{
@@ -118,6 +134,8 @@ export declare const OpenIDConnectSchema: import("@scalar/typebox").TObject<{
118
134
  'x-scalar-secret-client-id': import("@scalar/typebox").TString;
119
135
  }>, import("@scalar/typebox").TObject<{
120
136
  'x-scalar-secret-token': import("@scalar/typebox").TString;
137
+ }>, import("@scalar/typebox").TObject<{
138
+ 'x-scalar-secret-refresh-token': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
121
139
  }>]>, import("@scalar/typebox").TObject<{
122
140
  'x-scalar-secret-redirect-uri': import("@scalar/typebox").TString;
123
141
  }>]>>;
@@ -138,6 +156,8 @@ export declare const OpenIDConnectSchema: import("@scalar/typebox").TObject<{
138
156
  'x-scalar-secret-client-id': import("@scalar/typebox").TString;
139
157
  }>, import("@scalar/typebox").TObject<{
140
158
  'x-scalar-secret-token': import("@scalar/typebox").TString;
159
+ }>, import("@scalar/typebox").TObject<{
160
+ 'x-scalar-secret-refresh-token': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
141
161
  }>]>, import("@scalar/typebox").TObject<{
142
162
  'x-scalar-secret-username': import("@scalar/typebox").TString;
143
163
  'x-scalar-secret-password': import("@scalar/typebox").TString;
@@ -163,6 +183,8 @@ export declare const OpenIDConnectSchema: import("@scalar/typebox").TObject<{
163
183
  'x-scalar-secret-client-id': import("@scalar/typebox").TString;
164
184
  }>, import("@scalar/typebox").TObject<{
165
185
  'x-scalar-secret-token': import("@scalar/typebox").TString;
186
+ }>, import("@scalar/typebox").TObject<{
187
+ 'x-scalar-secret-refresh-token': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
166
188
  }>]>, import("@scalar/typebox").TObject<{
167
189
  'x-scalar-secret-client-secret': import("@scalar/typebox").TString;
168
190
  }>, import("@scalar/typebox").TObject<{
@@ -188,6 +210,8 @@ export declare const OpenIDConnectSchema: import("@scalar/typebox").TObject<{
188
210
  'x-scalar-secret-client-id': import("@scalar/typebox").TString;
189
211
  }>, import("@scalar/typebox").TObject<{
190
212
  'x-scalar-secret-token': import("@scalar/typebox").TString;
213
+ }>, import("@scalar/typebox").TObject<{
214
+ 'x-scalar-secret-refresh-token': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
191
215
  }>]>, import("@scalar/typebox").TObject<{
192
216
  'x-scalar-secret-client-secret': import("@scalar/typebox").TString;
193
217
  }>, import("@scalar/typebox").TObject<{
@@ -215,6 +239,8 @@ export declare const SecretsAuthUnionSchema: import("@scalar/typebox").TUnion<[i
215
239
  'x-scalar-secret-client-id': import("@scalar/typebox").TString;
216
240
  }>, import("@scalar/typebox").TObject<{
217
241
  'x-scalar-secret-token': import("@scalar/typebox").TString;
242
+ }>, import("@scalar/typebox").TObject<{
243
+ 'x-scalar-secret-refresh-token': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
218
244
  }>]>, import("@scalar/typebox").TObject<{
219
245
  'x-scalar-secret-redirect-uri': import("@scalar/typebox").TString;
220
246
  }>]>>;
@@ -222,6 +248,8 @@ export declare const SecretsAuthUnionSchema: import("@scalar/typebox").TUnion<[i
222
248
  'x-scalar-secret-client-id': import("@scalar/typebox").TString;
223
249
  }>, import("@scalar/typebox").TObject<{
224
250
  'x-scalar-secret-token': import("@scalar/typebox").TString;
251
+ }>, import("@scalar/typebox").TObject<{
252
+ 'x-scalar-secret-refresh-token': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
225
253
  }>]>, import("@scalar/typebox").TObject<{
226
254
  'x-scalar-secret-username': import("@scalar/typebox").TString;
227
255
  'x-scalar-secret-password': import("@scalar/typebox").TString;
@@ -234,6 +262,8 @@ export declare const SecretsAuthUnionSchema: import("@scalar/typebox").TUnion<[i
234
262
  'x-scalar-secret-client-id': import("@scalar/typebox").TString;
235
263
  }>, import("@scalar/typebox").TObject<{
236
264
  'x-scalar-secret-token': import("@scalar/typebox").TString;
265
+ }>, import("@scalar/typebox").TObject<{
266
+ 'x-scalar-secret-refresh-token': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
237
267
  }>]>, import("@scalar/typebox").TObject<{
238
268
  'x-scalar-secret-client-secret': import("@scalar/typebox").TString;
239
269
  }>, import("@scalar/typebox").TObject<{
@@ -243,6 +273,8 @@ export declare const SecretsAuthUnionSchema: import("@scalar/typebox").TUnion<[i
243
273
  'x-scalar-secret-client-id': import("@scalar/typebox").TString;
244
274
  }>, import("@scalar/typebox").TObject<{
245
275
  'x-scalar-secret-token': import("@scalar/typebox").TString;
276
+ }>, import("@scalar/typebox").TObject<{
277
+ 'x-scalar-secret-refresh-token': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
246
278
  }>]>, import("@scalar/typebox").TObject<{
247
279
  'x-scalar-secret-client-secret': import("@scalar/typebox").TString;
248
280
  }>, import("@scalar/typebox").TObject<{
@@ -267,6 +299,8 @@ export declare const SecretsAuthUnionSchema: import("@scalar/typebox").TUnion<[i
267
299
  'x-scalar-secret-client-id': import("@scalar/typebox").TString;
268
300
  }>, import("@scalar/typebox").TObject<{
269
301
  'x-scalar-secret-token': import("@scalar/typebox").TString;
302
+ }>, import("@scalar/typebox").TObject<{
303
+ 'x-scalar-secret-refresh-token': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
270
304
  }>]>, import("@scalar/typebox").TObject<{
271
305
  'x-scalar-secret-redirect-uri': import("@scalar/typebox").TString;
272
306
  }>]>>;
@@ -287,6 +321,8 @@ export declare const SecretsAuthUnionSchema: import("@scalar/typebox").TUnion<[i
287
321
  'x-scalar-secret-client-id': import("@scalar/typebox").TString;
288
322
  }>, import("@scalar/typebox").TObject<{
289
323
  'x-scalar-secret-token': import("@scalar/typebox").TString;
324
+ }>, import("@scalar/typebox").TObject<{
325
+ 'x-scalar-secret-refresh-token': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
290
326
  }>]>, import("@scalar/typebox").TObject<{
291
327
  'x-scalar-secret-username': import("@scalar/typebox").TString;
292
328
  'x-scalar-secret-password': import("@scalar/typebox").TString;
@@ -312,6 +348,8 @@ export declare const SecretsAuthUnionSchema: import("@scalar/typebox").TUnion<[i
312
348
  'x-scalar-secret-client-id': import("@scalar/typebox").TString;
313
349
  }>, import("@scalar/typebox").TObject<{
314
350
  'x-scalar-secret-token': import("@scalar/typebox").TString;
351
+ }>, import("@scalar/typebox").TObject<{
352
+ 'x-scalar-secret-refresh-token': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
315
353
  }>]>, import("@scalar/typebox").TObject<{
316
354
  'x-scalar-secret-client-secret': import("@scalar/typebox").TString;
317
355
  }>, import("@scalar/typebox").TObject<{
@@ -337,6 +375,8 @@ export declare const SecretsAuthUnionSchema: import("@scalar/typebox").TUnion<[i
337
375
  'x-scalar-secret-client-id': import("@scalar/typebox").TString;
338
376
  }>, import("@scalar/typebox").TObject<{
339
377
  'x-scalar-secret-token': import("@scalar/typebox").TString;
378
+ }>, import("@scalar/typebox").TObject<{
379
+ 'x-scalar-secret-refresh-token': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
340
380
  }>]>, import("@scalar/typebox").TObject<{
341
381
  'x-scalar-secret-client-secret': import("@scalar/typebox").TString;
342
382
  }>, import("@scalar/typebox").TObject<{
@@ -364,6 +404,8 @@ export declare const SecretsAuthSchema: import("@scalar/typebox").TRecord<import
364
404
  'x-scalar-secret-client-id': import("@scalar/typebox").TString;
365
405
  }>, import("@scalar/typebox").TObject<{
366
406
  'x-scalar-secret-token': import("@scalar/typebox").TString;
407
+ }>, import("@scalar/typebox").TObject<{
408
+ 'x-scalar-secret-refresh-token': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
367
409
  }>]>, import("@scalar/typebox").TObject<{
368
410
  'x-scalar-secret-redirect-uri': import("@scalar/typebox").TString;
369
411
  }>]>>;
@@ -371,6 +413,8 @@ export declare const SecretsAuthSchema: import("@scalar/typebox").TRecord<import
371
413
  'x-scalar-secret-client-id': import("@scalar/typebox").TString;
372
414
  }>, import("@scalar/typebox").TObject<{
373
415
  'x-scalar-secret-token': import("@scalar/typebox").TString;
416
+ }>, import("@scalar/typebox").TObject<{
417
+ 'x-scalar-secret-refresh-token': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
374
418
  }>]>, import("@scalar/typebox").TObject<{
375
419
  'x-scalar-secret-username': import("@scalar/typebox").TString;
376
420
  'x-scalar-secret-password': import("@scalar/typebox").TString;
@@ -383,6 +427,8 @@ export declare const SecretsAuthSchema: import("@scalar/typebox").TRecord<import
383
427
  'x-scalar-secret-client-id': import("@scalar/typebox").TString;
384
428
  }>, import("@scalar/typebox").TObject<{
385
429
  'x-scalar-secret-token': import("@scalar/typebox").TString;
430
+ }>, import("@scalar/typebox").TObject<{
431
+ 'x-scalar-secret-refresh-token': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
386
432
  }>]>, import("@scalar/typebox").TObject<{
387
433
  'x-scalar-secret-client-secret': import("@scalar/typebox").TString;
388
434
  }>, import("@scalar/typebox").TObject<{
@@ -392,6 +438,8 @@ export declare const SecretsAuthSchema: import("@scalar/typebox").TRecord<import
392
438
  'x-scalar-secret-client-id': import("@scalar/typebox").TString;
393
439
  }>, import("@scalar/typebox").TObject<{
394
440
  'x-scalar-secret-token': import("@scalar/typebox").TString;
441
+ }>, import("@scalar/typebox").TObject<{
442
+ 'x-scalar-secret-refresh-token': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
395
443
  }>]>, import("@scalar/typebox").TObject<{
396
444
  'x-scalar-secret-client-secret': import("@scalar/typebox").TString;
397
445
  }>, import("@scalar/typebox").TObject<{
@@ -416,6 +464,8 @@ export declare const SecretsAuthSchema: import("@scalar/typebox").TRecord<import
416
464
  'x-scalar-secret-client-id': import("@scalar/typebox").TString;
417
465
  }>, import("@scalar/typebox").TObject<{
418
466
  'x-scalar-secret-token': import("@scalar/typebox").TString;
467
+ }>, import("@scalar/typebox").TObject<{
468
+ 'x-scalar-secret-refresh-token': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
419
469
  }>]>, import("@scalar/typebox").TObject<{
420
470
  'x-scalar-secret-redirect-uri': import("@scalar/typebox").TString;
421
471
  }>]>>;
@@ -436,6 +486,8 @@ export declare const SecretsAuthSchema: import("@scalar/typebox").TRecord<import
436
486
  'x-scalar-secret-client-id': import("@scalar/typebox").TString;
437
487
  }>, import("@scalar/typebox").TObject<{
438
488
  'x-scalar-secret-token': import("@scalar/typebox").TString;
489
+ }>, import("@scalar/typebox").TObject<{
490
+ 'x-scalar-secret-refresh-token': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
439
491
  }>]>, import("@scalar/typebox").TObject<{
440
492
  'x-scalar-secret-username': import("@scalar/typebox").TString;
441
493
  'x-scalar-secret-password': import("@scalar/typebox").TString;
@@ -461,6 +513,8 @@ export declare const SecretsAuthSchema: import("@scalar/typebox").TRecord<import
461
513
  'x-scalar-secret-client-id': import("@scalar/typebox").TString;
462
514
  }>, import("@scalar/typebox").TObject<{
463
515
  'x-scalar-secret-token': import("@scalar/typebox").TString;
516
+ }>, import("@scalar/typebox").TObject<{
517
+ 'x-scalar-secret-refresh-token': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
464
518
  }>]>, import("@scalar/typebox").TObject<{
465
519
  'x-scalar-secret-client-secret': import("@scalar/typebox").TString;
466
520
  }>, import("@scalar/typebox").TObject<{
@@ -486,6 +540,8 @@ export declare const SecretsAuthSchema: import("@scalar/typebox").TRecord<import
486
540
  'x-scalar-secret-client-id': import("@scalar/typebox").TString;
487
541
  }>, import("@scalar/typebox").TObject<{
488
542
  'x-scalar-secret-token': import("@scalar/typebox").TString;
543
+ }>, import("@scalar/typebox").TObject<{
544
+ 'x-scalar-secret-refresh-token': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
489
545
  }>]>, import("@scalar/typebox").TObject<{
490
546
  'x-scalar-secret-client-secret': import("@scalar/typebox").TString;
491
547
  }>, import("@scalar/typebox").TObject<{
@@ -1919,6 +1975,8 @@ export declare const AuthSchema: import("@scalar/typebox").TObject<{
1919
1975
  'x-scalar-secret-client-id': import("@scalar/typebox").TString;
1920
1976
  }>, import("@scalar/typebox").TObject<{
1921
1977
  'x-scalar-secret-token': import("@scalar/typebox").TString;
1978
+ }>, import("@scalar/typebox").TObject<{
1979
+ 'x-scalar-secret-refresh-token': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
1922
1980
  }>]>, import("@scalar/typebox").TObject<{
1923
1981
  'x-scalar-secret-redirect-uri': import("@scalar/typebox").TString;
1924
1982
  }>]>>;
@@ -1926,6 +1984,8 @@ export declare const AuthSchema: import("@scalar/typebox").TObject<{
1926
1984
  'x-scalar-secret-client-id': import("@scalar/typebox").TString;
1927
1985
  }>, import("@scalar/typebox").TObject<{
1928
1986
  'x-scalar-secret-token': import("@scalar/typebox").TString;
1987
+ }>, import("@scalar/typebox").TObject<{
1988
+ 'x-scalar-secret-refresh-token': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
1929
1989
  }>]>, import("@scalar/typebox").TObject<{
1930
1990
  'x-scalar-secret-username': import("@scalar/typebox").TString;
1931
1991
  'x-scalar-secret-password': import("@scalar/typebox").TString;
@@ -1938,6 +1998,8 @@ export declare const AuthSchema: import("@scalar/typebox").TObject<{
1938
1998
  'x-scalar-secret-client-id': import("@scalar/typebox").TString;
1939
1999
  }>, import("@scalar/typebox").TObject<{
1940
2000
  'x-scalar-secret-token': import("@scalar/typebox").TString;
2001
+ }>, import("@scalar/typebox").TObject<{
2002
+ 'x-scalar-secret-refresh-token': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
1941
2003
  }>]>, import("@scalar/typebox").TObject<{
1942
2004
  'x-scalar-secret-client-secret': import("@scalar/typebox").TString;
1943
2005
  }>, import("@scalar/typebox").TObject<{
@@ -1947,6 +2009,8 @@ export declare const AuthSchema: import("@scalar/typebox").TObject<{
1947
2009
  'x-scalar-secret-client-id': import("@scalar/typebox").TString;
1948
2010
  }>, import("@scalar/typebox").TObject<{
1949
2011
  'x-scalar-secret-token': import("@scalar/typebox").TString;
2012
+ }>, import("@scalar/typebox").TObject<{
2013
+ 'x-scalar-secret-refresh-token': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
1950
2014
  }>]>, import("@scalar/typebox").TObject<{
1951
2015
  'x-scalar-secret-client-secret': import("@scalar/typebox").TString;
1952
2016
  }>, import("@scalar/typebox").TObject<{
@@ -1971,6 +2035,8 @@ export declare const AuthSchema: import("@scalar/typebox").TObject<{
1971
2035
  'x-scalar-secret-client-id': import("@scalar/typebox").TString;
1972
2036
  }>, import("@scalar/typebox").TObject<{
1973
2037
  'x-scalar-secret-token': import("@scalar/typebox").TString;
2038
+ }>, import("@scalar/typebox").TObject<{
2039
+ 'x-scalar-secret-refresh-token': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
1974
2040
  }>]>, import("@scalar/typebox").TObject<{
1975
2041
  'x-scalar-secret-redirect-uri': import("@scalar/typebox").TString;
1976
2042
  }>]>>;
@@ -1991,6 +2057,8 @@ export declare const AuthSchema: import("@scalar/typebox").TObject<{
1991
2057
  'x-scalar-secret-client-id': import("@scalar/typebox").TString;
1992
2058
  }>, import("@scalar/typebox").TObject<{
1993
2059
  'x-scalar-secret-token': import("@scalar/typebox").TString;
2060
+ }>, import("@scalar/typebox").TObject<{
2061
+ 'x-scalar-secret-refresh-token': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
1994
2062
  }>]>, import("@scalar/typebox").TObject<{
1995
2063
  'x-scalar-secret-username': import("@scalar/typebox").TString;
1996
2064
  'x-scalar-secret-password': import("@scalar/typebox").TString;
@@ -2016,6 +2084,8 @@ export declare const AuthSchema: import("@scalar/typebox").TObject<{
2016
2084
  'x-scalar-secret-client-id': import("@scalar/typebox").TString;
2017
2085
  }>, import("@scalar/typebox").TObject<{
2018
2086
  'x-scalar-secret-token': import("@scalar/typebox").TString;
2087
+ }>, import("@scalar/typebox").TObject<{
2088
+ 'x-scalar-secret-refresh-token': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
2019
2089
  }>]>, import("@scalar/typebox").TObject<{
2020
2090
  'x-scalar-secret-client-secret': import("@scalar/typebox").TString;
2021
2091
  }>, import("@scalar/typebox").TObject<{
@@ -2041,6 +2111,8 @@ export declare const AuthSchema: import("@scalar/typebox").TObject<{
2041
2111
  'x-scalar-secret-client-id': import("@scalar/typebox").TString;
2042
2112
  }>, import("@scalar/typebox").TObject<{
2043
2113
  'x-scalar-secret-token': import("@scalar/typebox").TString;
2114
+ }>, import("@scalar/typebox").TObject<{
2115
+ 'x-scalar-secret-refresh-token': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
2044
2116
  }>]>, import("@scalar/typebox").TObject<{
2045
2117
  'x-scalar-secret-client-secret': import("@scalar/typebox").TString;
2046
2118
  }>, import("@scalar/typebox").TObject<{
@@ -4880,6 +4952,8 @@ export declare const DocumentAuthSchema: import("@scalar/typebox").TRecord<impor
4880
4952
  'x-scalar-secret-client-id': import("@scalar/typebox").TString;
4881
4953
  }>, import("@scalar/typebox").TObject<{
4882
4954
  'x-scalar-secret-token': import("@scalar/typebox").TString;
4955
+ }>, import("@scalar/typebox").TObject<{
4956
+ 'x-scalar-secret-refresh-token': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
4883
4957
  }>]>, import("@scalar/typebox").TObject<{
4884
4958
  'x-scalar-secret-redirect-uri': import("@scalar/typebox").TString;
4885
4959
  }>]>>;
@@ -4887,6 +4961,8 @@ export declare const DocumentAuthSchema: import("@scalar/typebox").TRecord<impor
4887
4961
  'x-scalar-secret-client-id': import("@scalar/typebox").TString;
4888
4962
  }>, import("@scalar/typebox").TObject<{
4889
4963
  'x-scalar-secret-token': import("@scalar/typebox").TString;
4964
+ }>, import("@scalar/typebox").TObject<{
4965
+ 'x-scalar-secret-refresh-token': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
4890
4966
  }>]>, import("@scalar/typebox").TObject<{
4891
4967
  'x-scalar-secret-username': import("@scalar/typebox").TString;
4892
4968
  'x-scalar-secret-password': import("@scalar/typebox").TString;
@@ -4899,6 +4975,8 @@ export declare const DocumentAuthSchema: import("@scalar/typebox").TRecord<impor
4899
4975
  'x-scalar-secret-client-id': import("@scalar/typebox").TString;
4900
4976
  }>, import("@scalar/typebox").TObject<{
4901
4977
  'x-scalar-secret-token': import("@scalar/typebox").TString;
4978
+ }>, import("@scalar/typebox").TObject<{
4979
+ 'x-scalar-secret-refresh-token': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
4902
4980
  }>]>, import("@scalar/typebox").TObject<{
4903
4981
  'x-scalar-secret-client-secret': import("@scalar/typebox").TString;
4904
4982
  }>, import("@scalar/typebox").TObject<{
@@ -4908,6 +4986,8 @@ export declare const DocumentAuthSchema: import("@scalar/typebox").TRecord<impor
4908
4986
  'x-scalar-secret-client-id': import("@scalar/typebox").TString;
4909
4987
  }>, import("@scalar/typebox").TObject<{
4910
4988
  'x-scalar-secret-token': import("@scalar/typebox").TString;
4989
+ }>, import("@scalar/typebox").TObject<{
4990
+ 'x-scalar-secret-refresh-token': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
4911
4991
  }>]>, import("@scalar/typebox").TObject<{
4912
4992
  'x-scalar-secret-client-secret': import("@scalar/typebox").TString;
4913
4993
  }>, import("@scalar/typebox").TObject<{
@@ -4932,6 +5012,8 @@ export declare const DocumentAuthSchema: import("@scalar/typebox").TRecord<impor
4932
5012
  'x-scalar-secret-client-id': import("@scalar/typebox").TString;
4933
5013
  }>, import("@scalar/typebox").TObject<{
4934
5014
  'x-scalar-secret-token': import("@scalar/typebox").TString;
5015
+ }>, import("@scalar/typebox").TObject<{
5016
+ 'x-scalar-secret-refresh-token': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
4935
5017
  }>]>, import("@scalar/typebox").TObject<{
4936
5018
  'x-scalar-secret-redirect-uri': import("@scalar/typebox").TString;
4937
5019
  }>]>>;
@@ -4952,6 +5034,8 @@ export declare const DocumentAuthSchema: import("@scalar/typebox").TRecord<impor
4952
5034
  'x-scalar-secret-client-id': import("@scalar/typebox").TString;
4953
5035
  }>, import("@scalar/typebox").TObject<{
4954
5036
  'x-scalar-secret-token': import("@scalar/typebox").TString;
5037
+ }>, import("@scalar/typebox").TObject<{
5038
+ 'x-scalar-secret-refresh-token': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
4955
5039
  }>]>, import("@scalar/typebox").TObject<{
4956
5040
  'x-scalar-secret-username': import("@scalar/typebox").TString;
4957
5041
  'x-scalar-secret-password': import("@scalar/typebox").TString;
@@ -4977,6 +5061,8 @@ export declare const DocumentAuthSchema: import("@scalar/typebox").TRecord<impor
4977
5061
  'x-scalar-secret-client-id': import("@scalar/typebox").TString;
4978
5062
  }>, import("@scalar/typebox").TObject<{
4979
5063
  'x-scalar-secret-token': import("@scalar/typebox").TString;
5064
+ }>, import("@scalar/typebox").TObject<{
5065
+ 'x-scalar-secret-refresh-token': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
4980
5066
  }>]>, import("@scalar/typebox").TObject<{
4981
5067
  'x-scalar-secret-client-secret': import("@scalar/typebox").TString;
4982
5068
  }>, import("@scalar/typebox").TObject<{
@@ -5002,6 +5088,8 @@ export declare const DocumentAuthSchema: import("@scalar/typebox").TRecord<impor
5002
5088
  'x-scalar-secret-client-id': import("@scalar/typebox").TString;
5003
5089
  }>, import("@scalar/typebox").TObject<{
5004
5090
  'x-scalar-secret-token': import("@scalar/typebox").TString;
5091
+ }>, import("@scalar/typebox").TObject<{
5092
+ 'x-scalar-secret-refresh-token': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
5005
5093
  }>]>, import("@scalar/typebox").TObject<{
5006
5094
  'x-scalar-secret-client-secret': import("@scalar/typebox").TString;
5007
5095
  }>, import("@scalar/typebox").TObject<{
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/entities/auth/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAQ,MAAM,iBAAiB,CAAA;AAmBnD,QAAA,MAAM,mBAAmB;;;;IAKxB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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAyC,CAAA;AACxE,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA"}
@@ -5,6 +5,7 @@ import {
5
5
  XScalarSecretClientIdSchema,
6
6
  XScalarSecretClientSecretSchema,
7
7
  XScalarSecretHTTPSchema,
8
+ XScalarSecretRefreshTokenSchema,
8
9
  XScalarSecretRedirectUriSchema,
9
10
  XScalarSecretTokenSchema
10
11
  } from "../../schemas/extensions/security/x-scalar-security-secrets.js";
@@ -28,7 +29,11 @@ const SecretsHttpSchema = compose(
28
29
  XScalarSecretTokenSchema,
29
30
  XScalarSecretHTTPSchema
30
31
  );
31
- const SecretsOAuthFlowCommonSchema = compose(XScalarSecretClientIdSchema, XScalarSecretTokenSchema);
32
+ const SecretsOAuthFlowCommonSchema = compose(
33
+ XScalarSecretClientIdSchema,
34
+ XScalarSecretTokenSchema,
35
+ XScalarSecretRefreshTokenSchema
36
+ );
32
37
  const SecretsOAuthFlowsSchema = Type.Object({
33
38
  implicit: Type.Optional(compose(SecretsOAuthFlowCommonSchema, XScalarSecretRedirectUriSchema)),
34
39
  password: Type.Optional(
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/entities/auth/schema.ts"],
4
- "sourcesContent": ["import { type Static, Type } from '@scalar/typebox'\n\nimport { compose } from '@/schemas/compose'\nimport { XScalarCredentialsLocationSchema } from '@/schemas/extensions/security/x-scalar-credentials-location'\nimport {\n XScalarSecretClientIdSchema,\n XScalarSecretClientSecretSchema,\n XScalarSecretHTTPSchema,\n XScalarSecretRedirectUriSchema,\n XScalarSecretTokenSchema,\n} from '@/schemas/extensions/security/x-scalar-security-secrets'\nimport {\n OAuthFlowAuthorizationCodeSchema,\n OAuthFlowClientCredentialsSchema,\n OAuthFlowImplicitSchema,\n OAuthFlowPasswordSchema,\n} from '@/schemas/v3.1/strict/oauth-flow'\nimport { SecurityRequirementObjectSchema } from '@/schemas/v3.1/strict/openapi-document'\n\nconst SecretsApiKeySchema = compose(\n Type.Object({\n type: Type.Literal('apiKey'),\n }),\n XScalarSecretTokenSchema,\n)\n\nexport type SecretsApiKey = Static<typeof SecretsApiKeySchema>\n\nconst SecretsHttpSchema = compose(\n Type.Object({\n type: Type.Literal('http'),\n }),\n XScalarSecretTokenSchema,\n XScalarSecretHTTPSchema,\n)\n\nexport type SecretsHttp = Static<typeof SecretsHttpSchema>\n\nconst SecretsOAuthFlowCommonSchema = compose(XScalarSecretClientIdSchema, XScalarSecretTokenSchema)\n\nconst SecretsOAuthFlowsSchema = Type.Object({\n implicit: Type.Optional(compose(SecretsOAuthFlowCommonSchema, XScalarSecretRedirectUriSchema)),\n password: Type.Optional(\n compose(\n SecretsOAuthFlowCommonSchema,\n XScalarSecretHTTPSchema,\n XScalarSecretClientSecretSchema,\n XScalarCredentialsLocationSchema,\n ),\n ),\n clientCredentials: Type.Optional(\n compose(SecretsOAuthFlowCommonSchema, XScalarSecretClientSecretSchema, XScalarCredentialsLocationSchema),\n ),\n authorizationCode: Type.Optional(\n compose(\n SecretsOAuthFlowCommonSchema,\n XScalarSecretClientSecretSchema,\n XScalarSecretRedirectUriSchema,\n XScalarCredentialsLocationSchema,\n ),\n ),\n})\n\nexport type SecretsOAuthFlows = Static<typeof SecretsOAuthFlowsSchema>\n\nconst OAuthSchema = compose(\n Type.Object({\n type: Type.Literal('oauth2'),\n }),\n SecretsOAuthFlowsSchema,\n)\n\nexport type SecretsOAuth = Static<typeof OAuthSchema>\n\n/** OpenID Connect schema contain the base flows as well since it doesn't exist in the spec */\nexport const OpenIDConnectSchema = Type.Object({\n type: Type.Literal('openIdConnect'),\n implicit: Type.Optional(\n compose(OAuthFlowImplicitSchema, SecretsOAuthFlowCommonSchema, XScalarSecretRedirectUriSchema),\n ),\n password: Type.Optional(\n compose(\n OAuthFlowPasswordSchema,\n SecretsOAuthFlowCommonSchema,\n XScalarSecretHTTPSchema,\n XScalarSecretClientSecretSchema,\n XScalarCredentialsLocationSchema,\n ),\n ),\n clientCredentials: Type.Optional(\n compose(\n OAuthFlowClientCredentialsSchema,\n SecretsOAuthFlowCommonSchema,\n XScalarSecretClientSecretSchema,\n XScalarCredentialsLocationSchema,\n ),\n ),\n authorizationCode: Type.Optional(\n compose(\n OAuthFlowAuthorizationCodeSchema,\n SecretsOAuthFlowCommonSchema,\n XScalarSecretClientSecretSchema,\n XScalarSecretRedirectUriSchema,\n XScalarCredentialsLocationSchema,\n ),\n ),\n})\n\nexport type SecretsOpenIdConnect = Static<typeof OpenIDConnectSchema>\n\nexport const SecretsAuthUnionSchema = Type.Union([\n SecretsApiKeySchema,\n SecretsHttpSchema,\n OAuthSchema,\n OpenIDConnectSchema,\n])\nexport type SecretsAuthUnion = Static<typeof SecretsAuthUnionSchema>\n\nexport const SecretsAuthSchema = Type.Record(Type.String(), SecretsAuthUnionSchema)\nexport type SecretsAuth = Static<typeof SecretsAuthSchema>\n\nconst SelectedSecuritySchema = Type.Object({\n selectedIndex: Type.Number(),\n selectedSchemes: Type.Array(SecurityRequirementObjectSchema),\n})\n\nexport type SelectedSecurity = Static<typeof SelectedSecuritySchema>\n\nexport const AuthSchema = Type.Object({\n secrets: SecretsAuthSchema,\n selected: Type.Object({\n document: Type.Optional(SelectedSecuritySchema),\n path: Type.Optional(Type.Record(Type.String(), Type.Record(Type.String(), Type.Optional(SelectedSecuritySchema)))),\n }),\n})\n\nexport type Auth = Static<typeof AuthSchema>\n\nexport const DocumentAuthSchema = Type.Record(Type.String(), AuthSchema)\nexport type DocumentAuth = Record<string, Auth>\n"],
5
- "mappings": "AAAA,SAAsB,YAAY;AAElC,SAAS,eAAe;AACxB,SAAS,wCAAwC;AACjD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,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A,IACF;AAAA,EACF;AAAA,EACA,mBAAmB,KAAK;AAAA,IACtB;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACF,CAAC;AAIM,MAAM,yBAAyB,KAAK,MAAM;AAAA,EAC/C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAGM,MAAM,oBAAoB,KAAK,OAAO,KAAK,OAAO,GAAG,sBAAsB;AAGlF,MAAM,yBAAyB,KAAK,OAAO;AAAA,EACzC,eAAe,KAAK,OAAO;AAAA,EAC3B,iBAAiB,KAAK,MAAM,+BAA+B;AAC7D,CAAC;AAIM,MAAM,aAAa,KAAK,OAAO;AAAA,EACpC,SAAS;AAAA,EACT,UAAU,KAAK,OAAO;AAAA,IACpB,UAAU,KAAK,SAAS,sBAAsB;AAAA,IAC9C,MAAM,KAAK,SAAS,KAAK,OAAO,KAAK,OAAO,GAAG,KAAK,OAAO,KAAK,OAAO,GAAG,KAAK,SAAS,sBAAsB,CAAC,CAAC,CAAC;AAAA,EACnH,CAAC;AACH,CAAC;AAIM,MAAM,qBAAqB,KAAK,OAAO,KAAK,OAAO,GAAG,UAAU;",
4
+ "sourcesContent": ["import { type Static, Type } from '@scalar/typebox'\n\nimport { compose } from '@/schemas/compose'\nimport { XScalarCredentialsLocationSchema } from '@/schemas/extensions/security/x-scalar-credentials-location'\nimport {\n XScalarSecretClientIdSchema,\n XScalarSecretClientSecretSchema,\n XScalarSecretHTTPSchema,\n XScalarSecretRefreshTokenSchema,\n XScalarSecretRedirectUriSchema,\n XScalarSecretTokenSchema,\n} from '@/schemas/extensions/security/x-scalar-security-secrets'\nimport {\n OAuthFlowAuthorizationCodeSchema,\n OAuthFlowClientCredentialsSchema,\n OAuthFlowImplicitSchema,\n OAuthFlowPasswordSchema,\n} from '@/schemas/v3.1/strict/oauth-flow'\nimport { SecurityRequirementObjectSchema } from '@/schemas/v3.1/strict/openapi-document'\n\nconst SecretsApiKeySchema = compose(\n Type.Object({\n type: Type.Literal('apiKey'),\n }),\n XScalarSecretTokenSchema,\n)\n\nexport type SecretsApiKey = Static<typeof SecretsApiKeySchema>\n\nconst SecretsHttpSchema = compose(\n Type.Object({\n type: Type.Literal('http'),\n }),\n XScalarSecretTokenSchema,\n XScalarSecretHTTPSchema,\n)\n\nexport type SecretsHttp = Static<typeof SecretsHttpSchema>\n\nconst SecretsOAuthFlowCommonSchema = compose(\n XScalarSecretClientIdSchema,\n XScalarSecretTokenSchema,\n XScalarSecretRefreshTokenSchema,\n)\n\nconst SecretsOAuthFlowsSchema = Type.Object({\n implicit: Type.Optional(compose(SecretsOAuthFlowCommonSchema, XScalarSecretRedirectUriSchema)),\n password: Type.Optional(\n compose(\n SecretsOAuthFlowCommonSchema,\n XScalarSecretHTTPSchema,\n XScalarSecretClientSecretSchema,\n XScalarCredentialsLocationSchema,\n ),\n ),\n clientCredentials: Type.Optional(\n compose(SecretsOAuthFlowCommonSchema, XScalarSecretClientSecretSchema, XScalarCredentialsLocationSchema),\n ),\n authorizationCode: Type.Optional(\n compose(\n SecretsOAuthFlowCommonSchema,\n XScalarSecretClientSecretSchema,\n XScalarSecretRedirectUriSchema,\n XScalarCredentialsLocationSchema,\n ),\n ),\n})\n\nexport type SecretsOAuthFlows = Static<typeof SecretsOAuthFlowsSchema>\n\nconst OAuthSchema = compose(\n Type.Object({\n type: Type.Literal('oauth2'),\n }),\n SecretsOAuthFlowsSchema,\n)\n\nexport type SecretsOAuth = Static<typeof OAuthSchema>\n\n/** OpenID Connect schema contain the base flows as well since it doesn't exist in the spec */\nexport const OpenIDConnectSchema = Type.Object({\n type: Type.Literal('openIdConnect'),\n implicit: Type.Optional(\n compose(OAuthFlowImplicitSchema, SecretsOAuthFlowCommonSchema, XScalarSecretRedirectUriSchema),\n ),\n password: Type.Optional(\n compose(\n OAuthFlowPasswordSchema,\n SecretsOAuthFlowCommonSchema,\n XScalarSecretHTTPSchema,\n XScalarSecretClientSecretSchema,\n XScalarCredentialsLocationSchema,\n ),\n ),\n clientCredentials: Type.Optional(\n compose(\n OAuthFlowClientCredentialsSchema,\n SecretsOAuthFlowCommonSchema,\n XScalarSecretClientSecretSchema,\n XScalarCredentialsLocationSchema,\n ),\n ),\n authorizationCode: Type.Optional(\n compose(\n OAuthFlowAuthorizationCodeSchema,\n SecretsOAuthFlowCommonSchema,\n XScalarSecretClientSecretSchema,\n XScalarSecretRedirectUriSchema,\n XScalarCredentialsLocationSchema,\n ),\n ),\n})\n\nexport type SecretsOpenIdConnect = Static<typeof OpenIDConnectSchema>\n\nexport const SecretsAuthUnionSchema = Type.Union([\n SecretsApiKeySchema,\n SecretsHttpSchema,\n OAuthSchema,\n OpenIDConnectSchema,\n])\nexport type SecretsAuthUnion = Static<typeof SecretsAuthUnionSchema>\n\nexport const SecretsAuthSchema = Type.Record(Type.String(), SecretsAuthUnionSchema)\nexport type SecretsAuth = Static<typeof SecretsAuthSchema>\n\nconst SelectedSecuritySchema = Type.Object({\n selectedIndex: Type.Number(),\n selectedSchemes: Type.Array(SecurityRequirementObjectSchema),\n})\n\nexport type SelectedSecurity = Static<typeof SelectedSecuritySchema>\n\nexport const AuthSchema = Type.Object({\n secrets: SecretsAuthSchema,\n selected: Type.Object({\n document: Type.Optional(SelectedSecuritySchema),\n path: Type.Optional(Type.Record(Type.String(), Type.Record(Type.String(), Type.Optional(SelectedSecuritySchema)))),\n }),\n})\n\nexport type Auth = Static<typeof AuthSchema>\n\nexport const DocumentAuthSchema = Type.Record(Type.String(), AuthSchema)\nexport type DocumentAuth = Record<string, Auth>\n"],
5
+ "mappings": "AAAA,SAAsB,YAAY;AAElC,SAAS,eAAe;AACxB,SAAS,wCAAwC;AACjD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,uCAAuC;AAEhD,MAAM,sBAAsB;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AA,MACA;AAAA,IACF;AAAA,EACF;AACF,CAAC;AAIM,MAAM,yBAAyB,KAAK,MAAM;AAAA,EAC/C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAGM,MAAM,oBAAoB,KAAK,OAAO,KAAK,OAAO,GAAG,sBAAsB;AAGlF,MAAM,yBAAyB,KAAK,OAAO;AAAA,EACzC,eAAe,KAAK,OAAO;AAAA,EAC3B,iBAAiB,KAAK,MAAM,+BAA+B;AAC7D,CAAC;AAIM,MAAM,aAAa,KAAK,OAAO;AAAA,EACpC,SAAS;AAAA,EACT,UAAU,KAAK,OAAO;AAAA,IACpB,UAAU,KAAK,SAAS,sBAAsB;AAAA,IAC9C,MAAM,KAAK,SAAS,KAAK,OAAO,KAAK,OAAO,GAAG,KAAK,OAAO,KAAK,OAAO,GAAG,KAAK,SAAS,sBAAsB,CAAC,CAAC,CAAC;AAAA,EACnH,CAAC;AACH,CAAC;AAIM,MAAM,qBAAqB,KAAK,OAAO,KAAK,OAAO,GAAG,UAAU;",
6
6
  "names": []
7
7
  }
@@ -1,2 +1,2 @@
1
- export type { XScalarSecretClientId, XScalarSecretClientSecret, XScalarSecretHTTP, XScalarSecretRedirectUri, XScalarSecretToken, } from './x-scalar-security-secrets.js';
1
+ export type { XScalarSecretClientId, XScalarSecretClientSecret, XScalarSecretHTTP, XScalarSecretRedirectUri, XScalarSecretRefreshToken, XScalarSecretToken, } from './x-scalar-security-secrets.js';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/schemas/extensions/security/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,qBAAqB,EACrB,yBAAyB,EACzB,iBAAiB,EACjB,wBAAwB,EACxB,kBAAkB,GACnB,MAAM,6BAA6B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/schemas/extensions/security/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,qBAAqB,EACrB,yBAAyB,EACzB,iBAAiB,EACjB,wBAAwB,EACxB,yBAAyB,EACzB,kBAAkB,GACnB,MAAM,6BAA6B,CAAA"}
@@ -14,6 +14,22 @@ export declare const XScalarSecretTokenSchema: import("@scalar/typebox").TObject
14
14
  export type XScalarSecretToken = {
15
15
  'x-scalar-secret-token': string;
16
16
  };
17
+ /**
18
+ * OAuth refresh token
19
+ *
20
+ * We should not export this when exporting the document
21
+ */
22
+ export declare const XScalarSecretRefreshTokenSchema: import("@scalar/typebox").TObject<{
23
+ 'x-scalar-secret-refresh-token': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
24
+ }>;
25
+ /**
26
+ * OAuth refresh token
27
+ *
28
+ * We should not export this when exporting the document
29
+ */
30
+ export type XScalarSecretRefreshToken = {
31
+ 'x-scalar-secret-refresh-token'?: string;
32
+ };
17
33
  /**
18
34
  * Username and password for HTTP authentication
19
35
  *
@@ -1 +1 @@
1
- {"version":3,"file":"x-scalar-security-secrets.d.ts","sourceRoot":"","sources":["../../../../src/schemas/extensions/security/x-scalar-security-secrets.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,eAAO,MAAM,wBAAwB;;EAEnC,CAAA;AAEF;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,uBAAuB,EAAE,MAAM,CAAA;CAChC,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,uBAAuB;;;EAGlC,CAAA;AAEF;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,0BAA0B,EAAE,MAAM,CAAA;IAClC,0BAA0B,EAAE,MAAM,CAAA;CACnC,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,+BAA+B;;EAE1C,CAAA;AAEF;;;;GAIG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC,+BAA+B,EAAE,MAAM,CAAA;CACxC,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,2BAA2B;;EAEtC,CAAA;AAEF;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,2BAA2B,EAAE,MAAM,CAAA;CACpC,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,8BAA8B;;EAEzC,CAAA;AAEF;;;;GAIG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC,8BAA8B,EAAE,MAAM,CAAA;CACvC,CAAA"}
1
+ {"version":3,"file":"x-scalar-security-secrets.d.ts","sourceRoot":"","sources":["../../../../src/schemas/extensions/security/x-scalar-security-secrets.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,eAAO,MAAM,wBAAwB;;EAEnC,CAAA;AAEF;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,uBAAuB,EAAE,MAAM,CAAA;CAChC,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,+BAA+B;;EAE1C,CAAA;AAEF;;;;GAIG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC,+BAA+B,CAAC,EAAE,MAAM,CAAA;CACzC,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,uBAAuB;;;EAGlC,CAAA;AAEF;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,0BAA0B,EAAE,MAAM,CAAA;IAClC,0BAA0B,EAAE,MAAM,CAAA;CACnC,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,+BAA+B;;EAE1C,CAAA;AAEF;;;;GAIG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC,+BAA+B,EAAE,MAAM,CAAA;CACxC,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,2BAA2B;;EAEtC,CAAA;AAEF;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,2BAA2B,EAAE,MAAM,CAAA;CACpC,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,8BAA8B;;EAEzC,CAAA;AAEF;;;;GAIG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC,8BAA8B,EAAE,MAAM,CAAA;CACvC,CAAA"}
@@ -2,6 +2,9 @@ import { Type } from "@scalar/typebox";
2
2
  const XScalarSecretTokenSchema = Type.Object({
3
3
  "x-scalar-secret-token": Type.String()
4
4
  });
5
+ const XScalarSecretRefreshTokenSchema = Type.Object({
6
+ "x-scalar-secret-refresh-token": Type.Optional(Type.String())
7
+ });
5
8
  const XScalarSecretHTTPSchema = Type.Object({
6
9
  "x-scalar-secret-username": Type.String(),
7
10
  "x-scalar-secret-password": Type.String()
@@ -20,6 +23,7 @@ export {
20
23
  XScalarSecretClientSecretSchema,
21
24
  XScalarSecretHTTPSchema,
22
25
  XScalarSecretRedirectUriSchema,
26
+ XScalarSecretRefreshTokenSchema,
23
27
  XScalarSecretTokenSchema
24
28
  };
25
29
  //# sourceMappingURL=x-scalar-security-secrets.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/schemas/extensions/security/x-scalar-security-secrets.ts"],
4
- "sourcesContent": ["import { Type } from '@scalar/typebox'\n\n/**\n * A scalar secret token\n *\n * We should not export this when exporting the document\n */\nexport const XScalarSecretTokenSchema = Type.Object({\n 'x-scalar-secret-token': Type.String(),\n})\n\n/**\n * A scalar secret token\n *\n * We should not export this when exporting the document\n */\nexport type XScalarSecretToken = {\n 'x-scalar-secret-token': string\n}\n\n/**\n * Username and password for HTTP authentication\n *\n * We should not export this when exporting the document\n */\nexport const XScalarSecretHTTPSchema = Type.Object({\n 'x-scalar-secret-username': Type.String(),\n 'x-scalar-secret-password': Type.String(),\n})\n\n/**\n * Username and password for HTTP authentication\n *\n * We should not export this when exporting the document\n */\nexport type XScalarSecretHTTP = {\n 'x-scalar-secret-username': string\n 'x-scalar-secret-password': string\n}\n\n/**\n * Oauth client secret\n *\n * We should not export this when exporting the document\n */\nexport const XScalarSecretClientSecretSchema = Type.Object({\n 'x-scalar-secret-client-secret': Type.String(),\n})\n\n/**\n * Oauth client secret\n *\n * We should not export this when exporting the document\n */\nexport type XScalarSecretClientSecret = {\n 'x-scalar-secret-client-secret': string\n}\n\n/**\n * Oauth client ID\n *\n * We should not export this when exporting the document\n */\nexport const XScalarSecretClientIdSchema = Type.Object({\n 'x-scalar-secret-client-id': Type.String(),\n})\n\n/**\n * Oauth client ID\n *\n * We should not export this when exporting the document\n */\nexport type XScalarSecretClientId = {\n 'x-scalar-secret-client-id': string\n}\n\n/**\n * Oauth Redirect URI\n *\n * We should not export this when exporting the document\n */\nexport const XScalarSecretRedirectUriSchema = Type.Object({\n 'x-scalar-secret-redirect-uri': Type.String(),\n})\n\n/**\n * Oauth Redirect URI\n *\n * We should not export this when exporting the document\n */\nexport type XScalarSecretRedirectUri = {\n 'x-scalar-secret-redirect-uri': string\n}\n"],
5
- "mappings": "AAAA,SAAS,YAAY;AAOd,MAAM,2BAA2B,KAAK,OAAO;AAAA,EAClD,yBAAyB,KAAK,OAAO;AACvC,CAAC;AAgBM,MAAM,0BAA0B,KAAK,OAAO;AAAA,EACjD,4BAA4B,KAAK,OAAO;AAAA,EACxC,4BAA4B,KAAK,OAAO;AAC1C,CAAC;AAiBM,MAAM,kCAAkC,KAAK,OAAO;AAAA,EACzD,iCAAiC,KAAK,OAAO;AAC/C,CAAC;AAgBM,MAAM,8BAA8B,KAAK,OAAO;AAAA,EACrD,6BAA6B,KAAK,OAAO;AAC3C,CAAC;AAgBM,MAAM,iCAAiC,KAAK,OAAO;AAAA,EACxD,gCAAgC,KAAK,OAAO;AAC9C,CAAC;",
4
+ "sourcesContent": ["import { Type } from '@scalar/typebox'\n\n/**\n * A scalar secret token\n *\n * We should not export this when exporting the document\n */\nexport const XScalarSecretTokenSchema = Type.Object({\n 'x-scalar-secret-token': Type.String(),\n})\n\n/**\n * A scalar secret token\n *\n * We should not export this when exporting the document\n */\nexport type XScalarSecretToken = {\n 'x-scalar-secret-token': string\n}\n\n/**\n * OAuth refresh token\n *\n * We should not export this when exporting the document\n */\nexport const XScalarSecretRefreshTokenSchema = Type.Object({\n 'x-scalar-secret-refresh-token': Type.Optional(Type.String()),\n})\n\n/**\n * OAuth refresh token\n *\n * We should not export this when exporting the document\n */\nexport type XScalarSecretRefreshToken = {\n 'x-scalar-secret-refresh-token'?: string\n}\n\n/**\n * Username and password for HTTP authentication\n *\n * We should not export this when exporting the document\n */\nexport const XScalarSecretHTTPSchema = Type.Object({\n 'x-scalar-secret-username': Type.String(),\n 'x-scalar-secret-password': Type.String(),\n})\n\n/**\n * Username and password for HTTP authentication\n *\n * We should not export this when exporting the document\n */\nexport type XScalarSecretHTTP = {\n 'x-scalar-secret-username': string\n 'x-scalar-secret-password': string\n}\n\n/**\n * Oauth client secret\n *\n * We should not export this when exporting the document\n */\nexport const XScalarSecretClientSecretSchema = Type.Object({\n 'x-scalar-secret-client-secret': Type.String(),\n})\n\n/**\n * Oauth client secret\n *\n * We should not export this when exporting the document\n */\nexport type XScalarSecretClientSecret = {\n 'x-scalar-secret-client-secret': string\n}\n\n/**\n * Oauth client ID\n *\n * We should not export this when exporting the document\n */\nexport const XScalarSecretClientIdSchema = Type.Object({\n 'x-scalar-secret-client-id': Type.String(),\n})\n\n/**\n * Oauth client ID\n *\n * We should not export this when exporting the document\n */\nexport type XScalarSecretClientId = {\n 'x-scalar-secret-client-id': string\n}\n\n/**\n * Oauth Redirect URI\n *\n * We should not export this when exporting the document\n */\nexport const XScalarSecretRedirectUriSchema = Type.Object({\n 'x-scalar-secret-redirect-uri': Type.String(),\n})\n\n/**\n * Oauth Redirect URI\n *\n * We should not export this when exporting the document\n */\nexport type XScalarSecretRedirectUri = {\n 'x-scalar-secret-redirect-uri': string\n}\n"],
5
+ "mappings": "AAAA,SAAS,YAAY;AAOd,MAAM,2BAA2B,KAAK,OAAO;AAAA,EAClD,yBAAyB,KAAK,OAAO;AACvC,CAAC;AAgBM,MAAM,kCAAkC,KAAK,OAAO;AAAA,EACzD,iCAAiC,KAAK,SAAS,KAAK,OAAO,CAAC;AAC9D,CAAC;AAgBM,MAAM,0BAA0B,KAAK,OAAO;AAAA,EACjD,4BAA4B,KAAK,OAAO;AAAA,EACxC,4BAA4B,KAAK,OAAO;AAC1C,CAAC;AAiBM,MAAM,kCAAkC,KAAK,OAAO;AAAA,EACzD,iCAAiC,KAAK,OAAO;AAC/C,CAAC;AAgBM,MAAM,8BAA8B,KAAK,OAAO;AAAA,EACrD,6BAA6B,KAAK,OAAO;AAC3C,CAAC;AAgBM,MAAM,iCAAiC,KAAK,OAAO;AAAA,EACxD,gCAAgC,KAAK,OAAO;AAC9C,CAAC;",
6
6
  "names": []
7
7
  }
@@ -1526,6 +1526,8 @@ export declare const InMemoryWorkspaceSchema: import("@scalar/typebox").TObject<
1526
1526
  'x-scalar-secret-client-id': import("@scalar/typebox").TString;
1527
1527
  }>, import("@scalar/typebox").TObject<{
1528
1528
  'x-scalar-secret-token': import("@scalar/typebox").TString;
1529
+ }>, import("@scalar/typebox").TObject<{
1530
+ 'x-scalar-secret-refresh-token': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
1529
1531
  }>]>, import("@scalar/typebox").TObject<{
1530
1532
  'x-scalar-secret-redirect-uri': import("@scalar/typebox").TString;
1531
1533
  }>]>>;
@@ -1533,6 +1535,8 @@ export declare const InMemoryWorkspaceSchema: import("@scalar/typebox").TObject<
1533
1535
  'x-scalar-secret-client-id': import("@scalar/typebox").TString;
1534
1536
  }>, import("@scalar/typebox").TObject<{
1535
1537
  'x-scalar-secret-token': import("@scalar/typebox").TString;
1538
+ }>, import("@scalar/typebox").TObject<{
1539
+ 'x-scalar-secret-refresh-token': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
1536
1540
  }>]>, import("@scalar/typebox").TObject<{
1537
1541
  'x-scalar-secret-username': import("@scalar/typebox").TString;
1538
1542
  'x-scalar-secret-password': import("@scalar/typebox").TString;
@@ -1545,6 +1549,8 @@ export declare const InMemoryWorkspaceSchema: import("@scalar/typebox").TObject<
1545
1549
  'x-scalar-secret-client-id': import("@scalar/typebox").TString;
1546
1550
  }>, import("@scalar/typebox").TObject<{
1547
1551
  'x-scalar-secret-token': import("@scalar/typebox").TString;
1552
+ }>, import("@scalar/typebox").TObject<{
1553
+ 'x-scalar-secret-refresh-token': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
1548
1554
  }>]>, import("@scalar/typebox").TObject<{
1549
1555
  'x-scalar-secret-client-secret': import("@scalar/typebox").TString;
1550
1556
  }>, import("@scalar/typebox").TObject<{
@@ -1554,6 +1560,8 @@ export declare const InMemoryWorkspaceSchema: import("@scalar/typebox").TObject<
1554
1560
  'x-scalar-secret-client-id': import("@scalar/typebox").TString;
1555
1561
  }>, import("@scalar/typebox").TObject<{
1556
1562
  'x-scalar-secret-token': import("@scalar/typebox").TString;
1563
+ }>, import("@scalar/typebox").TObject<{
1564
+ 'x-scalar-secret-refresh-token': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
1557
1565
  }>]>, import("@scalar/typebox").TObject<{
1558
1566
  'x-scalar-secret-client-secret': import("@scalar/typebox").TString;
1559
1567
  }>, import("@scalar/typebox").TObject<{
@@ -1578,6 +1586,8 @@ export declare const InMemoryWorkspaceSchema: import("@scalar/typebox").TObject<
1578
1586
  'x-scalar-secret-client-id': import("@scalar/typebox").TString;
1579
1587
  }>, import("@scalar/typebox").TObject<{
1580
1588
  'x-scalar-secret-token': import("@scalar/typebox").TString;
1589
+ }>, import("@scalar/typebox").TObject<{
1590
+ 'x-scalar-secret-refresh-token': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
1581
1591
  }>]>, import("@scalar/typebox").TObject<{
1582
1592
  'x-scalar-secret-redirect-uri': import("@scalar/typebox").TString;
1583
1593
  }>]>>;
@@ -1598,6 +1608,8 @@ export declare const InMemoryWorkspaceSchema: import("@scalar/typebox").TObject<
1598
1608
  'x-scalar-secret-client-id': import("@scalar/typebox").TString;
1599
1609
  }>, import("@scalar/typebox").TObject<{
1600
1610
  'x-scalar-secret-token': import("@scalar/typebox").TString;
1611
+ }>, import("@scalar/typebox").TObject<{
1612
+ 'x-scalar-secret-refresh-token': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
1601
1613
  }>]>, import("@scalar/typebox").TObject<{
1602
1614
  'x-scalar-secret-username': import("@scalar/typebox").TString;
1603
1615
  'x-scalar-secret-password': import("@scalar/typebox").TString;
@@ -1623,6 +1635,8 @@ export declare const InMemoryWorkspaceSchema: import("@scalar/typebox").TObject<
1623
1635
  'x-scalar-secret-client-id': import("@scalar/typebox").TString;
1624
1636
  }>, import("@scalar/typebox").TObject<{
1625
1637
  'x-scalar-secret-token': import("@scalar/typebox").TString;
1638
+ }>, import("@scalar/typebox").TObject<{
1639
+ 'x-scalar-secret-refresh-token': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
1626
1640
  }>]>, import("@scalar/typebox").TObject<{
1627
1641
  'x-scalar-secret-client-secret': import("@scalar/typebox").TString;
1628
1642
  }>, import("@scalar/typebox").TObject<{
@@ -1648,6 +1662,8 @@ export declare const InMemoryWorkspaceSchema: import("@scalar/typebox").TObject<
1648
1662
  'x-scalar-secret-client-id': import("@scalar/typebox").TString;
1649
1663
  }>, import("@scalar/typebox").TObject<{
1650
1664
  'x-scalar-secret-token': import("@scalar/typebox").TString;
1665
+ }>, import("@scalar/typebox").TObject<{
1666
+ 'x-scalar-secret-refresh-token': import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
1651
1667
  }>]>, import("@scalar/typebox").TObject<{
1652
1668
  'x-scalar-secret-client-secret': import("@scalar/typebox").TString;
1653
1669
  }>, import("@scalar/typebox").TObject<{
@@ -1 +1 @@
1
- {"version":3,"file":"inmemory-workspace.d.ts","sourceRoot":"","sources":["../../src/schemas/inmemory-workspace.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAsB,MAAM,wBAAwB,CAAA;AAC9E,OAAO,EAAE,KAAK,eAAe,EAAyB,MAAM,2BAA2B,CAAA;AAEvF,OAAO,EACL,KAAK,iBAAiB,EAEtB,KAAK,mBAAmB,EAExB,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQlC,CAAA;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,aAAa,GAAG,mBAAmB,CAAA;IACzC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAA;IAC5C,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAA;IAC1D,qBAAqB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAA;IAC9D,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC9B,OAAO,EAAE,eAAe,CAAA;IACxB,IAAI,EAAE,YAAY,CAAA;CACnB,CAAA"}
package/dist/server.d.ts CHANGED
@@ -1,8 +1,6 @@
1
1
  import type { NavigationOptions } from './navigation/get-navigation-options.js';
2
- import { extensions } from './schemas/extensions.js';
3
- import type { TraversedDocument } from './schemas/navigation.js';
4
2
  import { type OpenApiDocument, type OperationObject, type PathsObject } from './schemas/v3.1/strict/openapi-document.js';
5
- import type { WorkspaceDocumentMeta, WorkspaceMeta } from './schemas/workspace.js';
3
+ import type { Workspace, WorkspaceDocumentMeta, WorkspaceMeta } from './schemas/workspace.js';
6
4
  export declare const WORKSPACE_FILE_NAME = "scalar-workspace.json";
7
5
  type WorkspaceDocumentMetaInput = {
8
6
  name: string;
@@ -23,7 +21,7 @@ type CreateServerWorkspaceStoreBase = {
23
21
  meta?: WorkspaceMeta;
24
22
  navigationOptions?: NavigationOptions;
25
23
  };
26
- type CreateServerWorkspaceStore = ({
24
+ type CreateServerWorkspaceStoreProps = ({
27
25
  directory?: string;
28
26
  mode: 'static';
29
27
  } & CreateServerWorkspaceStoreBase) | ({
@@ -87,75 +85,103 @@ export declare function externalizePathReferences(document: OpenApiDocument, met
87
85
  name: string;
88
86
  directory: string;
89
87
  }): Record<string, any>;
88
+ type ServerWorkspace = Omit<Workspace, 'activeDocument'>;
90
89
  /**
91
- * Create server state workspace store
90
+ * Server workspace store interface
92
91
  */
93
- export declare function createServerWorkspaceStore(workspaceProps: CreateServerWorkspaceStore): Promise<{
92
+ export type ServerWorkspaceStore = {
94
93
  /**
95
- * Generates workspace chunks by writing components and operations to the filesystem.
94
+ * Loads and registers a document in the workspace.
96
95
  *
97
- * This method is only available in static mode. It creates a directory structure containing:
98
- * - A workspace file with metadata and document references
99
- * - Component chunks split by type (schemas, parameters, etc)
100
- * - Operation chunks split by path and HTTP method
96
+ * Supported inputs include:
97
+ * - `url`: fetch and parse an OpenAPI document from a remote URL
98
+ * - `path`: read and parse an OpenAPI document from the filesystem
99
+ * - `document`: use an in-memory OpenAPI object directly
101
100
  *
102
- * The generated workspace references will be relative file paths pointing to these chunks.
101
+ * If loading fails, the document is not added.
103
102
  *
104
- * @throws {Error} If called when mode is not 'static'
103
+ * @example
104
+ * ```ts
105
+ * await store.addDocument({
106
+ * url: 'https://example.com/openapi.json',
107
+ * name: 'petstore',
108
+ * })
109
+ *
110
+ * await store.addDocument({
111
+ * path: './specs/billing.yaml',
112
+ * name: 'billing',
113
+ * })
114
+ * ```
115
+ *
116
+ * @param input - Source and metadata used to load and register the document
105
117
  */
106
- generateWorkspaceChunks: () => Promise<void>;
118
+ addDocument: (input: WorkspaceDocumentInput, navigationOptions?: NavigationOptions) => Promise<void>;
107
119
  /**
108
- * Returns the workspace document containing metadata and all sparse documents.
120
+ * Generates chunk files for all loaded documents.
121
+ *
122
+ * Only available in `static` mode. Writes chunk files for:
123
+ * - workspace metadata
124
+ * - components (schemas, parameters, responses, etc.)
125
+ * - operations (grouped by path and HTTP method)
109
126
  *
110
- * The workspace document includes:
111
- * - Global workspace metadata (theme, active document, etc)
112
- * - Document metadata and sparse document
113
- * - In SSR mode: References point to in-memory chunks
114
- * - In static mode: References point to filesystem chunks
127
+ * After generation, workspace references point to relative file paths.
128
+ *
129
+ * @example
130
+ * ```ts
131
+ * const store = await createServerWorkspaceStore({
132
+ * mode: 'static',
133
+ * outputPath: './dist/workspace',
134
+ * meta: { title: 'Docs' },
135
+ * })
136
+ *
137
+ * await store.generateWorkspaceChunks()
138
+ * ```
115
139
  *
116
- * @returns The complete workspace document
140
+ * @throws {Error} If called when mode is not 'static'
117
141
  */
118
- getWorkspace: () => {
119
- documents: Record<string, OpenApiDocument & {
120
- [extensions.document.navigation]: TraversedDocument;
121
- }>;
122
- "x-scalar-color-mode"?: import("./schemas/workspace.js").ColorMode;
123
- "x-scalar-default-client"?: import("@scalar/snippetz").AvailableClients[number];
124
- "x-scalar-active-document"?: string;
125
- "x-scalar-theme"?: string;
126
- "x-scalar-sidebar-width"?: number;
127
- 'x-scalar-active-proxy'?: string | null;
128
- };
142
+ generateWorkspaceChunks: () => Promise<void>;
129
143
  /**
130
- * Retrieves a chunk of data from the workspace using a JSON Pointer
144
+ * Returns the current workspace payload.
131
145
  *
132
- * A JSON Pointer is a string that references a specific location in a JSON document.
133
- * Only components and operations chunks can be retrieved.
146
+ * The payload contains workspace metadata plus sparse documents whose heavy
147
+ * sections are replaced by references:
148
+ * - in `ssr` mode, references resolve from in-memory assets
149
+ * - in `static` mode, references point to generated chunk files
134
150
  *
135
151
  * @example
136
152
  * ```ts
137
- * // Get a component
138
- * get('#/document-name/components/schemas/User')
153
+ * const workspace = store.getWorkspace()
139
154
  *
140
- * // Get an operation
141
- * get('#/document-name/operations/pets/get')
155
+ * // Read available document names
156
+ * const names = Object.keys(workspace.documents)
142
157
  * ```
143
158
  *
144
- * @param pointer - The JSON Pointer string to locate the chunk
145
- * @returns The chunk data if found, undefined otherwise
159
+ * @returns Workspace metadata and document references used by the client
146
160
  */
147
- get: (pointer: string) => unknown;
161
+ getWorkspace: () => ServerWorkspace;
148
162
  /**
149
- * Adds a new document to the workspace asynchronously.
163
+ * Resolves a chunk by JSON Pointer.
164
+ *
165
+ * Pointers can target component and operation chunks for loaded documents.
166
+ * Returns `undefined` when the pointer does not resolve.
167
+ *
168
+ * @example
169
+ * ```ts
170
+ * // Resolve a component chunk
171
+ * const userSchema = store.get('#/petstore/components/schemas/User')
150
172
  *
151
- * This function:
152
- * 1. Loads the document using the provided input
153
- * 2. Checks if the document loaded successfully
154
- * 3. If successful, adds the document to the workspace using addDocumentSync
173
+ * // Resolve an operation chunk
174
+ * const listPets = store.get('#/petstore/operations/pets/get')
175
+ * ```
155
176
  *
156
- * @param input - The document input containing the document source and metadata
177
+ * @param pointer - JSON Pointer to the desired chunk
178
+ * @returns The resolved chunk, or `undefined` when not found
157
179
  */
158
- addDocument: (input: WorkspaceDocumentInput, navigationOptions?: NavigationOptions) => Promise<void>;
159
- }>;
180
+ get: (pointer: string) => unknown;
181
+ };
182
+ /**
183
+ * Create server state workspace store
184
+ */
185
+ export declare function createServerWorkspaceStore(workspaceProps: CreateServerWorkspaceStoreProps): Promise<ServerWorkspaceStore>;
160
186
  export {};
161
187
  //# sourceMappingURL=server.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,iBAAiB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OAAO,CAAC,IAAI,CAAC,CAAA;IAC5C;;;;;;;;;;;;;;;;;OAiBG;IACH,YAAY,EAAE,MAAM,eAAe,CAAA;IACnC;;;;;;;;;;;;;;;;;OAiBG;IACH,GAAG,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAA;CAClC,CAAA;AAED;;GAEG;AACH,wBAAsB,0BAA0B,CAC9C,cAAc,EAAE,+BAA+B,GAC9C,OAAO,CAAC,oBAAoB,CAAC,CAwK/B"}
package/dist/server.js CHANGED
@@ -130,18 +130,6 @@ async function createServerWorkspaceStore(workspaceProps) {
130
130
  };
131
131
  await Promise.all(workspaceProps.documents.map((document) => addDocument(document)));
132
132
  return {
133
- /**
134
- * Generates workspace chunks by writing components and operations to the filesystem.
135
- *
136
- * This method is only available in static mode. It creates a directory structure containing:
137
- * - A workspace file with metadata and document references
138
- * - Component chunks split by type (schemas, parameters, etc)
139
- * - Operation chunks split by path and HTTP method
140
- *
141
- * The generated workspace references will be relative file paths pointing to these chunks.
142
- *
143
- * @throws {Error} If called when mode is not 'static'
144
- */
145
133
  generateWorkspaceChunks: async () => {
146
134
  if (workspaceProps.mode !== "static") {
147
135
  throw "Mode has to be set to `static` to generate filesystem workspace chunks";
@@ -170,38 +158,9 @@ async function createServerWorkspaceStore(workspaceProps) {
170
158
  }
171
159
  }
172
160
  },
173
- /**
174
- * Returns the workspace document containing metadata and all sparse documents.
175
- *
176
- * The workspace document includes:
177
- * - Global workspace metadata (theme, active document, etc)
178
- * - Document metadata and sparse document
179
- * - In SSR mode: References point to in-memory chunks
180
- * - In static mode: References point to filesystem chunks
181
- *
182
- * @returns The complete workspace document
183
- */
184
161
  getWorkspace: () => {
185
162
  return workspace;
186
163
  },
187
- /**
188
- * Retrieves a chunk of data from the workspace using a JSON Pointer
189
- *
190
- * A JSON Pointer is a string that references a specific location in a JSON document.
191
- * Only components and operations chunks can be retrieved.
192
- *
193
- * @example
194
- * ```ts
195
- * // Get a component
196
- * get('#/document-name/components/schemas/User')
197
- *
198
- * // Get an operation
199
- * get('#/document-name/operations/pets/get')
200
- * ```
201
- *
202
- * @param pointer - The JSON Pointer string to locate the chunk
203
- * @returns The chunk data if found, undefined otherwise
204
- */
205
164
  get: (pointer) => {
206
165
  const pointerPath = (() => {
207
166
  if (pointer.startsWith("#")) {
@@ -219,16 +178,6 @@ async function createServerWorkspaceStore(workspaceProps) {
219
178
  const path = parseJsonPointerSegments(pointerPath).map(escapeJsonPointer);
220
179
  return getValueAtPath(assets, path);
221
180
  },
222
- /**
223
- * Adds a new document to the workspace asynchronously.
224
- *
225
- * This function:
226
- * 1. Loads the document using the provided input
227
- * 2. Checks if the document loaded successfully
228
- * 3. If successful, adds the document to the workspace using addDocumentSync
229
- *
230
- * @param input - The document input containing the document source and metadata
231
- */
232
181
  addDocument
233
182
  };
234
183
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/server.ts"],
4
- "sourcesContent": ["import fs from 'node:fs/promises'\nimport { cwd } from 'node:process'\n\nimport { parseJsonPointerSegments } from '@scalar/helpers/json/parse-json-pointer-segments'\nimport { getValueAtPath } from '@scalar/helpers/object/get-value-at-path'\nimport type { LoaderPlugin } from '@scalar/json-magic/bundle'\nimport { fetchUrls, readFiles } from '@scalar/json-magic/bundle/plugins/node'\nimport { escapeJsonPointer } from '@scalar/json-magic/helpers/escape-json-pointer'\nimport { upgrade } from '@scalar/openapi-upgrader'\n\nimport { keyOf } from '@/helpers/general'\nimport { createNavigation } from '@/navigation'\nimport type { NavigationOptions } from '@/navigation/get-navigation-options'\nimport { extensions } from '@/schemas/extensions'\nimport type { TraversedDocument } from '@/schemas/navigation'\nimport { coerceValue } from '@/schemas/typebox-coerce'\nimport {\n type ComponentsObject,\n OpenAPIDocumentSchema,\n type OpenApiDocument,\n type OperationObject,\n type PathsObject,\n} from '@/schemas/v3.1/strict/openapi-document'\n\nimport type { WorkspaceDocumentMeta, WorkspaceMeta } from './schemas/workspace'\n\nconst DEFAULT_ASSETS_FOLDER = 'assets'\nexport const WORKSPACE_FILE_NAME = 'scalar-workspace.json'\n\ntype WorkspaceDocumentMetaInput = {\n name: string\n meta?: WorkspaceDocumentMeta\n}\n\ntype UrlDoc = { url: string } & WorkspaceDocumentMetaInput\ntype FileDoc = { path: string } & WorkspaceDocumentMetaInput\ntype ObjectDoc = { document: Record<string, unknown> } & WorkspaceDocumentMetaInput\n\ntype WorkspaceDocumentInput = UrlDoc | ObjectDoc | FileDoc\n\ntype CreateServerWorkspaceStoreBase = {\n documents: WorkspaceDocumentInput[]\n meta?: WorkspaceMeta\n navigationOptions?: NavigationOptions\n}\ntype CreateServerWorkspaceStore =\n | ({\n directory?: string\n mode: 'static'\n } & CreateServerWorkspaceStoreBase)\n | ({\n baseUrl: string\n mode: 'ssr'\n } & CreateServerWorkspaceStoreBase)\n\nconst httpMethods = new Set(['get', 'put', 'post', 'delete', 'options', 'head', 'patch', 'trace'])\n\n/**\n * Filters an OpenAPI PathsObject to only include standard HTTP methods.\n * Removes any vendor extensions or other non-HTTP properties.\n *\n * @param paths - The OpenAPI PathsObject to filter\n * @returns A new PathsObject containing only standard HTTP methods\n *\n * @example\n * Input: {\n * \"/users\": {\n * \"get\": {...},\n * \"x-custom\": {...},\n * \"post\": {...}\n * }\n * }\n * Output: {\n * \"/users\": {\n * \"get\": {...},\n * \"post\": {...}\n * }\n * }\n */\nexport function filterHttpMethodsOnly(paths: PathsObject): Record<string, Record<string, OperationObject>> {\n const result: Record<string, Record<string, OperationObject>> = {}\n\n // Todo: skip extension properties\n for (const [path, methods] of Object.entries(paths)) {\n if (!methods) {\n continue\n }\n\n const filteredMethods: Record<string, any> = {}\n\n for (const [method, operation] of Object.entries(methods)) {\n if (httpMethods.has(method.toLowerCase())) {\n filteredMethods[method] = operation\n }\n }\n\n if (Object.keys(filteredMethods).length > 0) {\n result[path] = filteredMethods\n }\n }\n\n return result\n}\n\n/**\n * Escapes path keys in an OpenAPI PathsObject to be JSON Pointer compatible.\n * This is necessary because OpenAPI paths can contain characters that need to be escaped\n * when used as JSON Pointer references (like '/' and '~').\n *\n * @example\n * Input: { \"/users/{id}\": { ... } }\n * Output: { \"/users~1{id}\": { ... } }\n */\nexport function escapePaths(\n paths: Record<string, Record<string, OperationObject>>,\n): Record<string, Record<string, OperationObject>> {\n const result: Record<string, Record<string, OperationObject>> = {}\n\n Object.keys(paths).forEach((path) => {\n if (paths[path]) {\n result[escapeJsonPointer(path)] = paths[path]\n }\n })\n\n return result\n}\n\n/**\n * Externalizes components by turning them into refs.\n */\nexport function externalizeComponentReferences(\n document: OpenApiDocument,\n meta: { mode: 'ssr'; name: string; baseUrl: string } | { mode: 'static'; name: string; directory: string },\n) {\n const result: Record<string, any> = {}\n\n if (!document.components) {\n return result\n }\n\n Object.entries(document.components).forEach(([type, component]) => {\n if (!component || typeof component !== 'object') {\n return\n }\n\n result[type] = {}\n Object.keys(component).forEach((name) => {\n const ref =\n meta.mode === 'ssr'\n ? `${meta.baseUrl}/${meta.name}/components/${type}/${name}#`\n : `./chunks/${meta.name}/components/${type}/${name}.json#`\n\n result[type][name] = { '$ref': ref, $global: true }\n })\n })\n\n return result\n}\n\n/**\n * Externalizes paths operations by turning them into refs.\n */\nexport function externalizePathReferences(\n document: OpenApiDocument,\n meta: { mode: 'ssr'; name: string; baseUrl: string } | { mode: 'static'; name: string; directory: string },\n) {\n const result: Record<string, any> = {}\n\n if (!document.paths) {\n return result\n }\n\n Object.entries(document.paths).forEach(([path, pathItem]) => {\n if (!pathItem || typeof pathItem !== 'object') {\n return\n }\n\n const pathItemRecord = pathItem as Record<string, unknown>\n\n result[path] = {}\n\n const escapedPath = escapeJsonPointer(path)\n\n keyOf(pathItemRecord).forEach((type) => {\n if (httpMethods.has(type)) {\n const ref =\n meta.mode === 'ssr'\n ? `${meta.baseUrl}/${meta.name}/operations/${escapedPath}/${type}#`\n : `./chunks/${meta.name}/operations/${escapedPath}/${type}.json#`\n\n result[path][type] = { '$ref': ref, $global: true }\n } else {\n result[path][type] = pathItemRecord[type]\n }\n })\n })\n\n return result\n}\n\n/**\n * Resolves a workspace document from various input sources (URL, local file, or direct document object).\n *\n * @param workspaceDocument - The document input to resolve, which can be:\n * - A URL to fetch the document from\n * - A local file path to read the document from\n * - A direct document object\n * @returns A promise that resolves to an object containing:\n * - ok: boolean indicating if the resolution was successful\n * - data: The resolved document data\n *\n * @example\n * // Resolve from URL\n * const urlDoc = await loadDocument({ name: 'api', url: 'https://api.example.com/openapi.json' })\n *\n * // Resolve direct document\n * const directDoc = await loadDocument({\n * name: 'inline',\n * document: { openapi: '3.0.0', paths: {} }\n * })\n */\nfunction loadDocument(workspaceDocument: WorkspaceDocumentInput): ReturnType<LoaderPlugin['exec']> {\n if ('url' in workspaceDocument) {\n return fetchUrls().exec(workspaceDocument.url)\n }\n\n if ('path' in workspaceDocument) {\n return readFiles().exec(workspaceDocument.path)\n }\n\n return Promise.resolve({\n ok: true,\n data: workspaceDocument.document,\n raw: JSON.stringify(workspaceDocument.document),\n })\n}\n\n/**\n * Create server state workspace store\n */\nexport async function createServerWorkspaceStore(workspaceProps: CreateServerWorkspaceStore) {\n /**\n * Base workspace document containing essential metadata and document references.\n *\n * This workspace document provides the minimal information needed for initial rendering.\n * All components and path operations are replaced with references to enable lazy loading.\n *\n * In SSR mode, references point to API endpoints.\n * In static mode, references point to filesystem chunks.\n */\n const workspace = {\n ...workspaceProps.meta,\n documents: {} as Record<string, OpenApiDocument & { [extensions.document.navigation]: TraversedDocument }>,\n }\n\n /**\n * A map of document chunks that can be loaded asynchronously by the client.\n * Each document is split into components and operations to enable lazy loading.\n * The keys are document names and values contain the components and operations\n * for that document.\n */\n const assets = {} as Record<\n string,\n { components?: ComponentsObject; operations?: Record<string, Record<string, OperationObject>> }\n >\n\n /**\n * Adds a new document to the workspace.\n *\n * This function processes an OpenAPI document by:\n * 1. Converting it to OpenAPI 3.1 format if needed\n * 2. Separating it into reusable components and path operations\n * 3. Externalizing references based on the workspace mode (SSR or static)\n * 4. Adding the processed document to the workspace with its metadata\n *\n * The resulting document contains minimal information with externalized references\n * that will be resolved on-demand through the workspace's get() method.\n *\n * @param document - The OpenAPI document to process and add\n * @param meta - Document metadata containing the required name and optional settings\n */\n const addDocumentSync = (\n document: Record<string, unknown>,\n meta: { name: string } & WorkspaceDocumentMeta,\n navigationOptions?: NavigationOptions,\n ) => {\n const { name, ...documentMeta } = meta\n\n const documentV3 = coerceValue(OpenAPIDocumentSchema, upgrade(document, '3.1'))\n\n // add the assets\n assets[meta.name] = {\n components: documentV3.components,\n operations: documentV3.paths && escapePaths(filterHttpMethodsOnly(documentV3.paths)),\n }\n\n const options =\n workspaceProps.mode === 'ssr'\n ? { mode: workspaceProps.mode, name, baseUrl: workspaceProps.baseUrl }\n : { mode: workspaceProps.mode, name, directory: workspaceProps.directory ?? DEFAULT_ASSETS_FOLDER }\n\n const components = externalizeComponentReferences(documentV3, options)\n const paths = externalizePathReferences(documentV3, options)\n\n // Build the sidebar entries\n const navigation = createNavigation(name, documentV3, navigationOptions ?? workspaceProps.navigationOptions)\n\n // The document is now a minimal version with externalized references to components and operations.\n // These references will be resolved asynchronously when needed through the workspace's get() method.\n workspace.documents[meta.name] = {\n ...documentMeta,\n ...documentV3,\n components,\n paths,\n [extensions.document.navigation]: navigation,\n }\n }\n\n /**\n * Adds a new document to the workspace asynchronously.\n *\n * This function:\n * 1. Loads the document using the provided input\n * 2. Checks if the document loaded successfully\n * 3. If successful, adds the document to the workspace using addDocumentSync\n *\n * @param input - The document input containing the document source and metadata\n */\n const addDocument = async (input: WorkspaceDocumentInput, navigationOptions?: NavigationOptions) => {\n const document = await loadDocument(input)\n\n if (!document.ok) {\n console.warn(`Failed to load document \"${input.name}`)\n return\n }\n\n addDocumentSync(document.data as Record<string, unknown>, { name: input.name, ...input.meta }, navigationOptions)\n }\n\n // Load and process all initial documents in parallel\n await Promise.all(workspaceProps.documents.map((document) => addDocument(document)))\n\n return {\n /**\n * Generates workspace chunks by writing components and operations to the filesystem.\n *\n * This method is only available in static mode. It creates a directory structure containing:\n * - A workspace file with metadata and document references\n * - Component chunks split by type (schemas, parameters, etc)\n * - Operation chunks split by path and HTTP method\n *\n * The generated workspace references will be relative file paths pointing to these chunks.\n *\n * @throws {Error} If called when mode is not 'static'\n */\n generateWorkspaceChunks: async () => {\n if (workspaceProps.mode !== 'static') {\n throw 'Mode has to be set to `static` to generate filesystem workspace chunks'\n }\n\n // Write the workspace document\n const basePath = `${cwd()}/${workspaceProps.directory ?? DEFAULT_ASSETS_FOLDER}`\n await fs.mkdir(basePath, { recursive: true })\n\n // Write the workspace contents on the file system\n await fs.writeFile(`${basePath}/${WORKSPACE_FILE_NAME}`, JSON.stringify(workspace))\n\n // Write the chunks\n for (const [name, { components, operations }] of Object.entries(assets)) {\n // Write the components chunks\n if (components) {\n for (const [type, component] of Object.entries(components as Record<string, Record<string, unknown>>)) {\n const componentPath = `${basePath}/chunks/${name}/components/${type}`\n await fs.mkdir(componentPath, { recursive: true })\n\n for (const [key, value] of Object.entries(component)) {\n await fs.writeFile(`${componentPath}/${key}.json`, JSON.stringify(value))\n }\n }\n }\n\n // Write the operations chunks\n if (operations) {\n for (const [path, methods] of Object.entries(operations)) {\n const operationPath = `${basePath}/chunks/${name}/operations/${path}`\n await fs.mkdir(operationPath, { recursive: true })\n\n for (const [method, operation] of Object.entries(methods)) {\n await fs.writeFile(`${operationPath}/${method}.json`, JSON.stringify(operation))\n }\n }\n }\n }\n },\n /**\n * Returns the workspace document containing metadata and all sparse documents.\n *\n * The workspace document includes:\n * - Global workspace metadata (theme, active document, etc)\n * - Document metadata and sparse document\n * - In SSR mode: References point to in-memory chunks\n * - In static mode: References point to filesystem chunks\n *\n * @returns The complete workspace document\n */\n getWorkspace: () => {\n return workspace\n },\n /**\n * Retrieves a chunk of data from the workspace using a JSON Pointer\n *\n * A JSON Pointer is a string that references a specific location in a JSON document.\n * Only components and operations chunks can be retrieved.\n *\n * @example\n * ```ts\n * // Get a component\n * get('#/document-name/components/schemas/User')\n *\n * // Get an operation\n * get('#/document-name/operations/pets/get')\n * ```\n *\n * @param pointer - The JSON Pointer string to locate the chunk\n * @returns The chunk data if found, undefined otherwise\n */\n get: (pointer: string) => {\n const pointerPath = (() => {\n if (pointer.startsWith('#')) {\n return pointer.slice(1)\n }\n\n if (pointer.startsWith('/')) {\n return pointer\n }\n\n try {\n return new URL(pointer).pathname\n } catch {\n return pointer\n }\n })()\n\n // Keep the path segments escaped cuz we store them on the filesystem as escaped sequences\n const path = parseJsonPointerSegments(pointerPath).map(escapeJsonPointer)\n return getValueAtPath(assets, path)\n },\n /**\n * Adds a new document to the workspace asynchronously.\n *\n * This function:\n * 1. Loads the document using the provided input\n * 2. Checks if the document loaded successfully\n * 3. If successful, adds the document to the workspace using addDocumentSync\n *\n * @param input - The document input containing the document source and metadata\n */\n addDocument,\n }\n}\n"],
5
- "mappings": "AAAA,OAAO,QAAQ;AACf,SAAS,WAAW;AAEpB,SAAS,gCAAgC;AACzC,SAAS,sBAAsB;AAE/B,SAAS,WAAW,iBAAiB;AACrC,SAAS,yBAAyB;AAClC,SAAS,eAAe;AAExB,SAAS,aAAa;AACtB,SAAS,wBAAwB;AAEjC,SAAS,kBAAkB;AAE3B,SAAS,mBAAmB;AAC5B;AAAA,EAEE;AAAA,OAIK;AAIP,MAAM,wBAAwB;AACvB,MAAM,sBAAsB;AA4BnC,MAAM,cAAc,oBAAI,IAAI,CAAC,OAAO,OAAO,QAAQ,UAAU,WAAW,QAAQ,SAAS,OAAO,CAAC;AAwB1F,SAAS,sBAAsB,OAAqE;AACzG,QAAM,SAA0D,CAAC;AAGjE,aAAW,CAAC,MAAM,OAAO,KAAK,OAAO,QAAQ,KAAK,GAAG;AACnD,QAAI,CAAC,SAAS;AACZ;AAAA,IACF;AAEA,UAAM,kBAAuC,CAAC;AAE9C,eAAW,CAAC,QAAQ,SAAS,KAAK,OAAO,QAAQ,OAAO,GAAG;AACzD,UAAI,YAAY,IAAI,OAAO,YAAY,CAA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AI,IAAI,OAAO,EAAE;AAAA,QAC1B,QAAQ;AACN,iBAAO;AAAA,QACT;AAAA,MACF,GAAG;AAGH,YAAM,OAAO,yBAAyB,WAAW,EAAE,IAAI,iBAAiB;AACxE,aAAO,eAAe,QAAQ,IAAI;AAAA,IACpC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAWA;AAAA,EACF;AACF;",
4
+ "sourcesContent": ["import fs from 'node:fs/promises'\nimport { cwd } from 'node:process'\n\nimport { parseJsonPointerSegments } from '@scalar/helpers/json/parse-json-pointer-segments'\nimport { getValueAtPath } from '@scalar/helpers/object/get-value-at-path'\nimport type { LoaderPlugin } from '@scalar/json-magic/bundle'\nimport { fetchUrls, readFiles } from '@scalar/json-magic/bundle/plugins/node'\nimport { escapeJsonPointer } from '@scalar/json-magic/helpers/escape-json-pointer'\nimport { upgrade } from '@scalar/openapi-upgrader'\n\nimport { keyOf } from '@/helpers/general'\nimport { createNavigation } from '@/navigation'\nimport type { NavigationOptions } from '@/navigation/get-navigation-options'\nimport { extensions } from '@/schemas/extensions'\nimport type { TraversedDocument } from '@/schemas/navigation'\nimport { coerceValue } from '@/schemas/typebox-coerce'\nimport {\n type ComponentsObject,\n OpenAPIDocumentSchema,\n type OpenApiDocument,\n type OperationObject,\n type PathsObject,\n} from '@/schemas/v3.1/strict/openapi-document'\n\nimport type { Workspace, WorkspaceDocumentMeta, WorkspaceMeta } from './schemas/workspace'\n\nconst DEFAULT_ASSETS_FOLDER = 'assets'\nexport const WORKSPACE_FILE_NAME = 'scalar-workspace.json'\n\ntype WorkspaceDocumentMetaInput = {\n name: string\n meta?: WorkspaceDocumentMeta\n}\n\ntype UrlDoc = { url: string } & WorkspaceDocumentMetaInput\ntype FileDoc = { path: string } & WorkspaceDocumentMetaInput\ntype ObjectDoc = { document: Record<string, unknown> } & WorkspaceDocumentMetaInput\n\ntype WorkspaceDocumentInput = UrlDoc | ObjectDoc | FileDoc\n\ntype CreateServerWorkspaceStoreBase = {\n documents: WorkspaceDocumentInput[]\n meta?: WorkspaceMeta\n navigationOptions?: NavigationOptions\n}\ntype CreateServerWorkspaceStoreProps =\n | ({\n directory?: string\n mode: 'static'\n } & CreateServerWorkspaceStoreBase)\n | ({\n baseUrl: string\n mode: 'ssr'\n } & CreateServerWorkspaceStoreBase)\n\nconst httpMethods = new Set(['get', 'put', 'post', 'delete', 'options', 'head', 'patch', 'trace'])\n\n/**\n * Filters an OpenAPI PathsObject to only include standard HTTP methods.\n * Removes any vendor extensions or other non-HTTP properties.\n *\n * @param paths - The OpenAPI PathsObject to filter\n * @returns A new PathsObject containing only standard HTTP methods\n *\n * @example\n * Input: {\n * \"/users\": {\n * \"get\": {...},\n * \"x-custom\": {...},\n * \"post\": {...}\n * }\n * }\n * Output: {\n * \"/users\": {\n * \"get\": {...},\n * \"post\": {...}\n * }\n * }\n */\nexport function filterHttpMethodsOnly(paths: PathsObject): Record<string, Record<string, OperationObject>> {\n const result: Record<string, Record<string, OperationObject>> = {}\n\n // Todo: skip extension properties\n for (const [path, methods] of Object.entries(paths)) {\n if (!methods) {\n continue\n }\n\n const filteredMethods: Record<string, any> = {}\n\n for (const [method, operation] of Object.entries(methods)) {\n if (httpMethods.has(method.toLowerCase())) {\n filteredMethods[method] = operation\n }\n }\n\n if (Object.keys(filteredMethods).length > 0) {\n result[path] = filteredMethods\n }\n }\n\n return result\n}\n\n/**\n * Escapes path keys in an OpenAPI PathsObject to be JSON Pointer compatible.\n * This is necessary because OpenAPI paths can contain characters that need to be escaped\n * when used as JSON Pointer references (like '/' and '~').\n *\n * @example\n * Input: { \"/users/{id}\": { ... } }\n * Output: { \"/users~1{id}\": { ... } }\n */\nexport function escapePaths(\n paths: Record<string, Record<string, OperationObject>>,\n): Record<string, Record<string, OperationObject>> {\n const result: Record<string, Record<string, OperationObject>> = {}\n\n Object.keys(paths).forEach((path) => {\n if (paths[path]) {\n result[escapeJsonPointer(path)] = paths[path]\n }\n })\n\n return result\n}\n\n/**\n * Externalizes components by turning them into refs.\n */\nexport function externalizeComponentReferences(\n document: OpenApiDocument,\n meta: { mode: 'ssr'; name: string; baseUrl: string } | { mode: 'static'; name: string; directory: string },\n) {\n const result: Record<string, any> = {}\n\n if (!document.components) {\n return result\n }\n\n Object.entries(document.components).forEach(([type, component]) => {\n if (!component || typeof component !== 'object') {\n return\n }\n\n result[type] = {}\n Object.keys(component).forEach((name) => {\n const ref =\n meta.mode === 'ssr'\n ? `${meta.baseUrl}/${meta.name}/components/${type}/${name}#`\n : `./chunks/${meta.name}/components/${type}/${name}.json#`\n\n result[type][name] = { '$ref': ref, $global: true }\n })\n })\n\n return result\n}\n\n/**\n * Externalizes paths operations by turning them into refs.\n */\nexport function externalizePathReferences(\n document: OpenApiDocument,\n meta: { mode: 'ssr'; name: string; baseUrl: string } | { mode: 'static'; name: string; directory: string },\n) {\n const result: Record<string, any> = {}\n\n if (!document.paths) {\n return result\n }\n\n Object.entries(document.paths).forEach(([path, pathItem]) => {\n if (!pathItem || typeof pathItem !== 'object') {\n return\n }\n\n const pathItemRecord = pathItem as Record<string, unknown>\n\n result[path] = {}\n\n const escapedPath = escapeJsonPointer(path)\n\n keyOf(pathItemRecord).forEach((type) => {\n if (httpMethods.has(type)) {\n const ref =\n meta.mode === 'ssr'\n ? `${meta.baseUrl}/${meta.name}/operations/${escapedPath}/${type}#`\n : `./chunks/${meta.name}/operations/${escapedPath}/${type}.json#`\n\n result[path][type] = { '$ref': ref, $global: true }\n } else {\n result[path][type] = pathItemRecord[type]\n }\n })\n })\n\n return result\n}\n\ntype ServerWorkspace = Omit<Workspace, 'activeDocument'>\n\n/**\n * Resolves a workspace document from various input sources (URL, local file, or direct document object).\n *\n * @param workspaceDocument - The document input to resolve, which can be:\n * - A URL to fetch the document from\n * - A local file path to read the document from\n * - A direct document object\n * @returns A promise that resolves to an object containing:\n * - ok: boolean indicating if the resolution was successful\n * - data: The resolved document data\n *\n * @example\n * // Resolve from URL\n * const urlDoc = await loadDocument({ name: 'api', url: 'https://api.example.com/openapi.json' })\n *\n * // Resolve direct document\n * const directDoc = await loadDocument({\n * name: 'inline',\n * document: { openapi: '3.0.0', paths: {} }\n * })\n */\nfunction loadDocument(workspaceDocument: WorkspaceDocumentInput): ReturnType<LoaderPlugin['exec']> {\n if ('url' in workspaceDocument) {\n return fetchUrls().exec(workspaceDocument.url)\n }\n\n if ('path' in workspaceDocument) {\n return readFiles().exec(workspaceDocument.path)\n }\n\n return Promise.resolve({\n ok: true,\n data: workspaceDocument.document,\n raw: JSON.stringify(workspaceDocument.document),\n })\n}\n\n/**\n * Server workspace store interface\n */\nexport type ServerWorkspaceStore = {\n /**\n * Loads and registers a document in the workspace.\n *\n * Supported inputs include:\n * - `url`: fetch and parse an OpenAPI document from a remote URL\n * - `path`: read and parse an OpenAPI document from the filesystem\n * - `document`: use an in-memory OpenAPI object directly\n *\n * If loading fails, the document is not added.\n *\n * @example\n * ```ts\n * await store.addDocument({\n * url: 'https://example.com/openapi.json',\n * name: 'petstore',\n * })\n *\n * await store.addDocument({\n * path: './specs/billing.yaml',\n * name: 'billing',\n * })\n * ```\n *\n * @param input - Source and metadata used to load and register the document\n */\n addDocument: (input: WorkspaceDocumentInput, navigationOptions?: NavigationOptions) => Promise<void>\n /**\n * Generates chunk files for all loaded documents.\n *\n * Only available in `static` mode. Writes chunk files for:\n * - workspace metadata\n * - components (schemas, parameters, responses, etc.)\n * - operations (grouped by path and HTTP method)\n *\n * After generation, workspace references point to relative file paths.\n *\n * @example\n * ```ts\n * const store = await createServerWorkspaceStore({\n * mode: 'static',\n * outputPath: './dist/workspace',\n * meta: { title: 'Docs' },\n * })\n *\n * await store.generateWorkspaceChunks()\n * ```\n *\n * @throws {Error} If called when mode is not 'static'\n */\n generateWorkspaceChunks: () => Promise<void>\n /**\n * Returns the current workspace payload.\n *\n * The payload contains workspace metadata plus sparse documents whose heavy\n * sections are replaced by references:\n * - in `ssr` mode, references resolve from in-memory assets\n * - in `static` mode, references point to generated chunk files\n *\n * @example\n * ```ts\n * const workspace = store.getWorkspace()\n *\n * // Read available document names\n * const names = Object.keys(workspace.documents)\n * ```\n *\n * @returns Workspace metadata and document references used by the client\n */\n getWorkspace: () => ServerWorkspace\n /**\n * Resolves a chunk by JSON Pointer.\n *\n * Pointers can target component and operation chunks for loaded documents.\n * Returns `undefined` when the pointer does not resolve.\n *\n * @example\n * ```ts\n * // Resolve a component chunk\n * const userSchema = store.get('#/petstore/components/schemas/User')\n *\n * // Resolve an operation chunk\n * const listPets = store.get('#/petstore/operations/pets/get')\n * ```\n *\n * @param pointer - JSON Pointer to the desired chunk\n * @returns The resolved chunk, or `undefined` when not found\n */\n get: (pointer: string) => unknown\n}\n\n/**\n * Create server state workspace store\n */\nexport async function createServerWorkspaceStore(\n workspaceProps: CreateServerWorkspaceStoreProps,\n): Promise<ServerWorkspaceStore> {\n /**\n * Base workspace document containing essential metadata and document references.\n *\n * This workspace document provides the minimal information needed for initial rendering.\n * All components and path operations are replaced with references to enable lazy loading.\n *\n * In SSR mode, references point to API endpoints.\n * In static mode, references point to filesystem chunks.\n */\n const workspace: ServerWorkspace = {\n ...workspaceProps.meta,\n documents: {} as Record<string, OpenApiDocument & { [extensions.document.navigation]: TraversedDocument }>,\n }\n\n /**\n * A map of document chunks that can be loaded asynchronously by the client.\n * Each document is split into components and operations to enable lazy loading.\n * The keys are document names and values contain the components and operations\n * for that document.\n */\n const assets = {} as Record<\n string,\n { components?: ComponentsObject; operations?: Record<string, Record<string, OperationObject>> }\n >\n\n /**\n * Adds a new document to the workspace.\n *\n * This function processes an OpenAPI document by:\n * 1. Converting it to OpenAPI 3.1 format if needed\n * 2. Separating it into reusable components and path operations\n * 3. Externalizing references based on the workspace mode (SSR or static)\n * 4. Adding the processed document to the workspace with its metadata\n *\n * The resulting document contains minimal information with externalized references\n * that will be resolved on-demand through the workspace's get() method.\n *\n * @param document - The OpenAPI document to process and add\n * @param meta - Document metadata containing the required name and optional settings\n */\n const addDocumentSync = (\n document: Record<string, unknown>,\n meta: { name: string } & WorkspaceDocumentMeta,\n navigationOptions?: NavigationOptions,\n ) => {\n const { name, ...documentMeta } = meta\n\n const documentV3 = coerceValue(OpenAPIDocumentSchema, upgrade(document, '3.1'))\n\n // add the assets\n assets[meta.name] = {\n components: documentV3.components,\n operations: documentV3.paths && escapePaths(filterHttpMethodsOnly(documentV3.paths)),\n }\n\n const options =\n workspaceProps.mode === 'ssr'\n ? { mode: workspaceProps.mode, name, baseUrl: workspaceProps.baseUrl }\n : { mode: workspaceProps.mode, name, directory: workspaceProps.directory ?? DEFAULT_ASSETS_FOLDER }\n\n const components = externalizeComponentReferences(documentV3, options)\n const paths = externalizePathReferences(documentV3, options)\n\n // Build the sidebar entries\n const navigation = createNavigation(name, documentV3, navigationOptions ?? workspaceProps.navigationOptions)\n\n // The document is now a minimal version with externalized references to components and operations.\n // These references will be resolved asynchronously when needed through the workspace's get() method.\n workspace.documents[meta.name] = {\n ...documentMeta,\n ...documentV3,\n components,\n paths,\n [extensions.document.navigation]: navigation,\n }\n }\n\n /**\n * Adds a new document to the workspace asynchronously.\n *\n * This function:\n * 1. Loads the document using the provided input\n * 2. Checks if the document loaded successfully\n * 3. If successful, adds the document to the workspace using addDocumentSync\n *\n * @param input - The document input containing the document source and metadata\n */\n const addDocument: ServerWorkspaceStore['addDocument'] = async (input, navigationOptions) => {\n const document = await loadDocument(input)\n\n if (!document.ok) {\n console.warn(`Failed to load document \"${input.name}`)\n return\n }\n\n addDocumentSync(document.data as Record<string, unknown>, { name: input.name, ...input.meta }, navigationOptions)\n }\n\n // Load and process all initial documents in parallel\n await Promise.all(workspaceProps.documents.map((document) => addDocument(document)))\n\n return {\n generateWorkspaceChunks: async () => {\n if (workspaceProps.mode !== 'static') {\n throw 'Mode has to be set to `static` to generate filesystem workspace chunks'\n }\n\n // Write the workspace document\n const basePath = `${cwd()}/${workspaceProps.directory ?? DEFAULT_ASSETS_FOLDER}`\n await fs.mkdir(basePath, { recursive: true })\n\n // Write the workspace contents on the file system\n await fs.writeFile(`${basePath}/${WORKSPACE_FILE_NAME}`, JSON.stringify(workspace))\n\n // Write the chunks\n for (const [name, { components, operations }] of Object.entries(assets)) {\n // Write the components chunks\n if (components) {\n for (const [type, component] of Object.entries(components as Record<string, Record<string, unknown>>)) {\n const componentPath = `${basePath}/chunks/${name}/components/${type}`\n await fs.mkdir(componentPath, { recursive: true })\n\n for (const [key, value] of Object.entries(component)) {\n await fs.writeFile(`${componentPath}/${key}.json`, JSON.stringify(value))\n }\n }\n }\n\n // Write the operations chunks\n if (operations) {\n for (const [path, methods] of Object.entries(operations)) {\n const operationPath = `${basePath}/chunks/${name}/operations/${path}`\n await fs.mkdir(operationPath, { recursive: true })\n\n for (const [method, operation] of Object.entries(methods)) {\n await fs.writeFile(`${operationPath}/${method}.json`, JSON.stringify(operation))\n }\n }\n }\n }\n },\n getWorkspace: () => {\n return workspace\n },\n get: (pointer: string) => {\n const pointerPath = (() => {\n if (pointer.startsWith('#')) {\n return pointer.slice(1)\n }\n\n if (pointer.startsWith('/')) {\n return pointer\n }\n\n try {\n return new URL(pointer).pathname\n } catch {\n return pointer\n }\n })()\n\n // Keep the path segments escaped cuz we store them on the filesystem as escaped sequences\n const path = parseJsonPointerSegments(pointerPath).map(escapeJsonPointer)\n return getValueAtPath(assets, path)\n },\n addDocument,\n }\n}\n"],
5
+ "mappings": "AAAA,OAAO,QAAQ;AACf,SAAS,WAAW;AAEpB,SAAS,gCAAgC;AACzC,SAAS,sBAAsB;AAE/B,SAAS,WAAW,iBAAiB;AACrC,SAAS,yBAAyB;AAClC,SAAS,eAAe;AAExB,SAAS,aAAa;AACtB,SAAS,wBAAwB;AAEjC,SAAS,kBAAkB;AAE3B,SAAS,mBAAmB;AAC5B;AAAA,EAEE;AAAA,OAIK;AAIP,MAAM,wBAAwB;AACvB,MAAM,sBAAsB;AA4BnC,MAAM,cAAc,oBAAI,IAAI,CAAC,OAAO,OAAO,QAAQ,UAAU,WAAW,QAAQ,SA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AG;AAC3B,iBAAO;AAAA,QACT;AAEA,YAAI;AACF,iBAAO,IAAI,IAAI,OAAO,EAAE;AAAA,QAC1B,QAAQ;AACN,iBAAO;AAAA,QACT;AAAA,MACF,GAAG;AAGH,YAAM,OAAO,yBAAyB,WAAW,EAAE,IAAI,iBAAiB;AACxE,aAAO,eAAe,QAAQ,IAAI;AAAA,IACpC;AAAA,IACA;AAAA,EACF;AACF;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -16,7 +16,7 @@
16
16
  "openapi",
17
17
  "scalar"
18
18
  ],
19
- "version": "0.37.0",
19
+ "version": "0.38.1",
20
20
  "engines": {
21
21
  "node": ">=22"
22
22
  },
@@ -138,13 +138,13 @@
138
138
  "type-fest": "^5.3.1",
139
139
  "vue": "^3.5.26",
140
140
  "yaml": "^2.8.0",
141
+ "@scalar/code-highlight": "0.3.0",
141
142
  "@scalar/helpers": "0.3.0",
143
+ "@scalar/json-magic": "0.12.1",
142
144
  "@scalar/object-utils": "1.3.0",
143
- "@scalar/code-highlight": "0.3.0",
144
145
  "@scalar/openapi-upgrader": "0.2.0",
145
- "@scalar/types": "0.7.0",
146
- "@scalar/snippetz": "0.7.0",
147
- "@scalar/json-magic": "0.12.0"
146
+ "@scalar/snippetz": "0.7.1",
147
+ "@scalar/types": "0.7.1"
148
148
  },
149
149
  "devDependencies": {
150
150
  "@google-cloud/storage": "7.16.0",