@scalar/oas-utils 0.2.26 → 0.2.28

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.
Files changed (32) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/entities/workspace/collection/collection.d.ts.map +1 -1
  3. package/dist/entities/workspace/collection/collection.js +1 -1
  4. package/dist/entities/workspace/consts/hot-keys.d.ts +13 -0
  5. package/dist/entities/workspace/consts/hot-keys.d.ts.map +1 -0
  6. package/dist/entities/workspace/consts/hot-keys.js +92 -0
  7. package/dist/entities/workspace/consts/index.d.ts +2 -0
  8. package/dist/entities/workspace/consts/index.d.ts.map +1 -0
  9. package/dist/entities/workspace/consts/index.js +1 -0
  10. package/dist/entities/workspace/cookie/cookie.js +1 -1
  11. package/dist/entities/workspace/environment/environment.js +1 -1
  12. package/dist/entities/workspace/folder/folder.js +1 -1
  13. package/dist/entities/workspace/security/security-schemes.js +1 -1
  14. package/dist/entities/workspace/server/server.d.ts.map +1 -1
  15. package/dist/entities/workspace/server/server.js +1 -1
  16. package/dist/entities/workspace/spec/request-examples.d.ts +40 -40
  17. package/dist/entities/workspace/spec/request-examples.d.ts.map +1 -1
  18. package/dist/entities/workspace/spec/request-examples.js +1 -1
  19. package/dist/entities/workspace/spec/requests.d.ts.map +1 -1
  20. package/dist/entities/workspace/spec/requests.js +1 -1
  21. package/dist/entities/workspace/workspace.d.ts +60 -0
  22. package/dist/entities/workspace/workspace.d.ts.map +1 -1
  23. package/dist/entities/workspace/workspace.js +17 -0
  24. package/dist/helpers/index.d.ts +0 -1
  25. package/dist/helpers/index.d.ts.map +1 -1
  26. package/dist/helpers/index.js +0 -1
  27. package/dist/spec-getters/getExampleFromSchema.d.ts.map +1 -1
  28. package/dist/spec-getters/getExampleFromSchema.js +15 -30
  29. package/package.json +7 -2
  30. package/dist/helpers/deepMerge.d.ts +0 -7
  31. package/dist/helpers/deepMerge.d.ts.map +0 -1
  32. package/dist/helpers/deepMerge.js +0 -28
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @scalar/oas-utils
2
2
 
3
+ ## 0.2.28
4
+
5
+ ### Patch Changes
6
+
7
+ - dba83e4: Support circular refs
8
+ - Updated dependencies [60e63d3]
9
+ - Updated dependencies [dba83e4]
10
+ - @scalar/themes@0.9.22
11
+ - @scalar/object-utils@1.1.6
12
+
13
+ ## 0.2.27
14
+
15
+ ### Patch Changes
16
+
17
+ - 17e06de: fix: additionalProperties are not rendered correctly
18
+
3
19
  ## 0.2.26
4
20
 
5
21
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"collection.d.ts","sourceRoot":"","sources":["../../../../src/entities/workspace/collection/collection.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AA+DvB;;;;;GAKG;AACH,QAAA,MAAM,0BAA0B;IAC9B,6GAA6G;;IAE7G,yFAAyF;;;;;;;;EAEzF,CAAA;AACF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAA;AAwC9E,QAAA,MAAM,gBAAgB;;;;QAjBpB;;;;;;WAMG;;QAEH,eAAe;;YA9Df,sCAAsC;;YAEtC,kCAAkC;;YAElC,4FAA4F;;YAE5F,oFAAoF;;YAEpF,mDAAmD;;gBAxBnD,+DAA+D;;gBAE/D,sFAAsF;;gBAEtF,0GAA0G;;;;;;;;;;;YAsB1G,mDAAmD;;gBA5CnD,mDAAmD;;gBAEnD,2GAA2G;;gBAE3G;;;mBAGG;;;;;;;;;;;YAuCH;;;eAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAiDH,wDAAwD;;QAExD,eAAe;;YAzBf,qCAAqC;;YAErC,6FAA6F;;YAE7F,sDAAsD;;gBAnBtD,6GAA6G;;gBAE7G,yFAAyF;;;;;;;;;;;;;;;;;;;;;;;;;YAFzF,6GAA6G;;YAE7G,yFAAyF;;;;;;;;;;;;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,sDAAsD;;gBAnBtD,6GAA6G;;gBAE7G,yFAAyF;;;;;;;;;;;;;;;;;;;;;;;;;YAFzF,6GAA6G;;YAE7G,yFAAyF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA8CzF,iGAAiG;;IAEjG,oCAAoC;;IAEpC,sEAAsE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEtE,CAAA;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA;AACzD,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAEhE,8BAA8B;AAC9B,eAAO,MAAM,gBAAgB,YAAa,iBAAiB,KAAG,UACS,CAAA"}
@@ -1,7 +1,7 @@
1
+ import { deepMerge } from '@scalar/object-utils/merge';
1
2
  import { z } from 'zod';
2
3
  import { securityRequirement } from '../security/security-requirement.js';
3
4
  import { nanoidSchema } from '../shared/utility.js';
4
- import { deepMerge } from '../../../helpers/deepMerge.js';
5
5
 
6
6
  /**
7
7
  * License information for the exposed API.
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Array of all of the events that we support
3
+ */
4
+ export declare const HOTKEY_EVENT_NAMES: readonly ["closeModal"];
5
+ export type HotkeyEventName = (typeof HOTKEY_EVENT_NAMES)[number];
6
+ /**
7
+ * Array of all of the hotkeys that we support
8
+ *
9
+ * Space is a special case because its actually ' ' but we name it space here and will handle it separately
10
+ */
11
+ export declare const KEYDOWN_KEYS: readonly ["Space", "Backspace", "Tab", "Enter", "Escape", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "*", "+", "-", ".", "/", "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12", ";", "=", ",", "-", ".", "/", "`", "[", "\\", "]", ""];
12
+ export type KeydownKey = (typeof KEYDOWN_KEYS)[number];
13
+ //# sourceMappingURL=hot-keys.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hot-keys.d.ts","sourceRoot":"","sources":["../../../../src/entities/workspace/consts/hot-keys.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,kBAAkB,yBAA0B,CAAA;AACzD,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAA;AAEjE;;;;GAIG;AACH,eAAO,MAAM,YAAY,4bAgFf,CAAA;AACV,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAA"}
@@ -0,0 +1,92 @@
1
+ /**
2
+ * Array of all of the events that we support
3
+ */
4
+ const HOTKEY_EVENT_NAMES = ['closeModal'];
5
+ /**
6
+ * Array of all of the hotkeys that we support
7
+ *
8
+ * Space is a special case because its actually ' ' but we name it space here and will handle it separately
9
+ */
10
+ const KEYDOWN_KEYS = [
11
+ 'Space',
12
+ 'Backspace',
13
+ 'Tab',
14
+ 'Enter',
15
+ 'Escape',
16
+ '0',
17
+ '1',
18
+ '2',
19
+ '3',
20
+ '4',
21
+ '5',
22
+ '6',
23
+ '7',
24
+ '8',
25
+ '9',
26
+ 'a',
27
+ 'b',
28
+ 'c',
29
+ 'd',
30
+ 'e',
31
+ 'f',
32
+ 'g',
33
+ 'h',
34
+ 'i',
35
+ 'j',
36
+ 'k',
37
+ 'l',
38
+ 'm',
39
+ 'n',
40
+ 'o',
41
+ 'p',
42
+ 'q',
43
+ 'r',
44
+ 's',
45
+ 't',
46
+ 'u',
47
+ 'v',
48
+ 'w',
49
+ 'x',
50
+ 'y',
51
+ 'z',
52
+ '0',
53
+ '1',
54
+ '2',
55
+ '3',
56
+ '4',
57
+ '5',
58
+ '6',
59
+ '7',
60
+ '8',
61
+ '9',
62
+ '*',
63
+ '+',
64
+ '-',
65
+ '.',
66
+ '/',
67
+ 'F1',
68
+ 'F2',
69
+ 'F3',
70
+ 'F4',
71
+ 'F5',
72
+ 'F6',
73
+ 'F7',
74
+ 'F8',
75
+ 'F9',
76
+ 'F10',
77
+ 'F11',
78
+ 'F12',
79
+ ';',
80
+ '=',
81
+ ',',
82
+ '-',
83
+ '.',
84
+ '/',
85
+ '`',
86
+ '[',
87
+ '\\',
88
+ ']',
89
+ '',
90
+ ];
91
+
92
+ export { HOTKEY_EVENT_NAMES, KEYDOWN_KEYS };
@@ -0,0 +1,2 @@
1
+ export * from './hot-keys.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/entities/workspace/consts/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA"}
@@ -0,0 +1 @@
1
+ export { HOTKEY_EVENT_NAMES, KEYDOWN_KEYS } from './hot-keys.js';
@@ -1,6 +1,6 @@
1
+ import { deepMerge } from '@scalar/object-utils/merge';
1
2
  import { z } from 'zod';
2
3
  import { nanoidSchema } from '../shared/utility.js';
3
- import { deepMerge } from '../../../helpers/deepMerge.js';
4
4
 
5
5
  const cookieSchema = z.object({
6
6
  uid: nanoidSchema,
@@ -1,6 +1,6 @@
1
+ import { deepMerge } from '@scalar/object-utils/merge';
1
2
  import { z } from 'zod';
2
3
  import { nanoidSchema } from '../shared/utility.js';
3
- import { deepMerge } from '../../../helpers/deepMerge.js';
4
4
 
5
5
  const parsed = z.object({
6
6
  key: z.string(),
@@ -1,6 +1,6 @@
1
+ import { deepMerge } from '@scalar/object-utils/merge';
1
2
  import { z } from 'zod';
2
3
  import { nanoidSchema } from '../shared/utility.js';
3
- import { deepMerge } from '../../../helpers/deepMerge.js';
4
4
 
5
5
  const folderSchema = z.object({
6
6
  /** Used for database sync only */
@@ -1,6 +1,6 @@
1
+ import { deepMerge } from '@scalar/object-utils/merge';
1
2
  import { z } from 'zod';
2
3
  import { nanoidSchema } from '../shared/utility.js';
3
- import { deepMerge } from '../../../helpers/deepMerge.js';
4
4
 
5
5
  /** A generic string value used for filling in fields */
6
6
  const value = z.string().optional().default('');
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../../src/entities/workspace/server/server.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AA6BvB,QAAA,MAAM,YAAY;;IAEhB;;;;OAIG;;IAEH;;;OAGG;;IAEH,oHAAoH;;;QA9BpH;;;WAGG;;QAEH;;;;WAIG;;QAEH,mHAAmH;;QAEnH,gDAAgD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmBhD,CAAA;AAEF;;;;;GAKG;AACH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAA;AACjD,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAA;AAExD,2BAA2B;AAC3B,eAAO,MAAM,YAAY,YAAa,aAAa;;;;;;;;;;;CACP,CAAA"}
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../../src/entities/workspace/server/server.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AA6BvB,QAAA,MAAM,YAAY;;IAEhB;;;;OAIG;;IAEH;;;OAGG;;IAEH,oHAAoH;;;QA9BpH;;;WAGG;;QAEH;;;;WAIG;;QAEH,mHAAmH;;QAEnH,gDAAgD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmBhD,CAAA;AAEF;;;;;GAKG;AACH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAA;AACjD,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAA;AAExD,2BAA2B;AAC3B,eAAO,MAAM,YAAY,YAAa,aAAa;;;;;;;;;;;CACY,CAAA"}
@@ -1,6 +1,6 @@
1
+ import { deepMerge } from '@scalar/object-utils/merge';
1
2
  import { z } from 'zod';
2
3
  import { nanoidSchema } from '../shared/utility.js';
3
- import { deepMerge } from '../../../helpers/deepMerge.js';
4
4
 
5
5
  /**
6
6
  * Server variables
@@ -24,8 +24,8 @@ declare const requestExampleParametersSchema: z.ZodObject<{
24
24
  maximum?: number | undefined;
25
25
  description?: string | undefined;
26
26
  default?: any;
27
- enum?: string[] | undefined;
28
27
  required?: boolean | undefined;
28
+ enum?: string[] | undefined;
29
29
  file?: File | undefined;
30
30
  refUid?: string | undefined;
31
31
  format?: string | undefined;
@@ -37,9 +37,9 @@ declare const requestExampleParametersSchema: z.ZodObject<{
37
37
  value?: string | number | undefined;
38
38
  description?: string | undefined;
39
39
  default?: any;
40
+ required?: boolean | undefined;
40
41
  key?: string | undefined;
41
42
  enum?: string[] | undefined;
42
- required?: boolean | undefined;
43
43
  enabled?: boolean | undefined;
44
44
  file?: File | undefined;
45
45
  refUid?: string | undefined;
@@ -59,8 +59,8 @@ export declare const createRequestExampleParameter: (payload: RequestExamplePara
59
59
  maximum?: number | undefined;
60
60
  description?: string | undefined;
61
61
  default?: any;
62
- enum?: string[] | undefined;
63
62
  required?: boolean | undefined;
63
+ enum?: string[] | undefined;
64
64
  file?: File | undefined;
65
65
  refUid?: string | undefined;
66
66
  format?: string | undefined;
@@ -109,8 +109,8 @@ declare const requestExampleSchema: z.ZodObject<{
109
109
  maximum?: number | undefined;
110
110
  description?: string | undefined;
111
111
  default?: any;
112
- enum?: string[] | undefined;
113
112
  required?: boolean | undefined;
113
+ enum?: string[] | undefined;
114
114
  file?: File | undefined;
115
115
  refUid?: string | undefined;
116
116
  format?: string | undefined;
@@ -122,9 +122,9 @@ declare const requestExampleSchema: z.ZodObject<{
122
122
  value?: string | number | undefined;
123
123
  description?: string | undefined;
124
124
  default?: any;
125
+ required?: boolean | undefined;
125
126
  key?: string | undefined;
126
127
  enum?: string[] | undefined;
127
- required?: boolean | undefined;
128
128
  enabled?: boolean | undefined;
129
129
  file?: File | undefined;
130
130
  refUid?: string | undefined;
@@ -141,8 +141,8 @@ declare const requestExampleSchema: z.ZodObject<{
141
141
  maximum?: number | undefined;
142
142
  description?: string | undefined;
143
143
  default?: any;
144
- enum?: string[] | undefined;
145
144
  required?: boolean | undefined;
145
+ enum?: string[] | undefined;
146
146
  file?: File | undefined;
147
147
  refUid?: string | undefined;
148
148
  format?: string | undefined;
@@ -157,9 +157,9 @@ declare const requestExampleSchema: z.ZodObject<{
157
157
  value?: string | number | undefined;
158
158
  description?: string | undefined;
159
159
  default?: any;
160
+ required?: boolean | undefined;
160
161
  key?: string | undefined;
161
162
  enum?: string[] | undefined;
162
- required?: boolean | undefined;
163
163
  enabled?: boolean | undefined;
164
164
  file?: File | undefined;
165
165
  refUid?: string | undefined;
@@ -185,8 +185,8 @@ declare const requestExampleSchema: z.ZodObject<{
185
185
  maximum?: number | undefined;
186
186
  description?: string | undefined;
187
187
  default?: any;
188
- enum?: string[] | undefined;
189
188
  required?: boolean | undefined;
189
+ enum?: string[] | undefined;
190
190
  file?: File | undefined;
191
191
  refUid?: string | undefined;
192
192
  format?: string | undefined;
@@ -209,9 +209,9 @@ declare const requestExampleSchema: z.ZodObject<{
209
209
  value?: string | number | undefined;
210
210
  description?: string | undefined;
211
211
  default?: any;
212
+ required?: boolean | undefined;
212
213
  key?: string | undefined;
213
214
  enum?: string[] | undefined;
214
- required?: boolean | undefined;
215
215
  enabled?: boolean | undefined;
216
216
  file?: File | undefined;
217
217
  refUid?: string | undefined;
@@ -249,8 +249,8 @@ declare const requestExampleSchema: z.ZodObject<{
249
249
  maximum?: number | undefined;
250
250
  description?: string | undefined;
251
251
  default?: any;
252
- enum?: string[] | undefined;
253
252
  required?: boolean | undefined;
253
+ enum?: string[] | undefined;
254
254
  file?: File | undefined;
255
255
  refUid?: string | undefined;
256
256
  format?: string | undefined;
@@ -262,9 +262,9 @@ declare const requestExampleSchema: z.ZodObject<{
262
262
  value?: string | number | undefined;
263
263
  description?: string | undefined;
264
264
  default?: any;
265
+ required?: boolean | undefined;
265
266
  key?: string | undefined;
266
267
  enum?: string[] | undefined;
267
- required?: boolean | undefined;
268
268
  enabled?: boolean | undefined;
269
269
  file?: File | undefined;
270
270
  refUid?: string | undefined;
@@ -296,8 +296,8 @@ declare const requestExampleSchema: z.ZodObject<{
296
296
  maximum?: number | undefined;
297
297
  description?: string | undefined;
298
298
  default?: any;
299
- enum?: string[] | undefined;
300
299
  required?: boolean | undefined;
300
+ enum?: string[] | undefined;
301
301
  file?: File | undefined;
302
302
  refUid?: string | undefined;
303
303
  format?: string | undefined;
@@ -309,9 +309,9 @@ declare const requestExampleSchema: z.ZodObject<{
309
309
  value?: string | number | undefined;
310
310
  description?: string | undefined;
311
311
  default?: any;
312
+ required?: boolean | undefined;
312
313
  key?: string | undefined;
313
314
  enum?: string[] | undefined;
314
- required?: boolean | undefined;
315
315
  enabled?: boolean | undefined;
316
316
  file?: File | undefined;
317
317
  refUid?: string | undefined;
@@ -343,8 +343,8 @@ declare const requestExampleSchema: z.ZodObject<{
343
343
  maximum?: number | undefined;
344
344
  description?: string | undefined;
345
345
  default?: any;
346
- enum?: string[] | undefined;
347
346
  required?: boolean | undefined;
347
+ enum?: string[] | undefined;
348
348
  file?: File | undefined;
349
349
  refUid?: string | undefined;
350
350
  format?: string | undefined;
@@ -356,9 +356,9 @@ declare const requestExampleSchema: z.ZodObject<{
356
356
  value?: string | number | undefined;
357
357
  description?: string | undefined;
358
358
  default?: any;
359
+ required?: boolean | undefined;
359
360
  key?: string | undefined;
360
361
  enum?: string[] | undefined;
361
- required?: boolean | undefined;
362
362
  enabled?: boolean | undefined;
363
363
  file?: File | undefined;
364
364
  refUid?: string | undefined;
@@ -390,8 +390,8 @@ declare const requestExampleSchema: z.ZodObject<{
390
390
  maximum?: number | undefined;
391
391
  description?: string | undefined;
392
392
  default?: any;
393
- enum?: string[] | undefined;
394
393
  required?: boolean | undefined;
394
+ enum?: string[] | undefined;
395
395
  file?: File | undefined;
396
396
  refUid?: string | undefined;
397
397
  format?: string | undefined;
@@ -403,9 +403,9 @@ declare const requestExampleSchema: z.ZodObject<{
403
403
  value?: string | number | undefined;
404
404
  description?: string | undefined;
405
405
  default?: any;
406
+ required?: boolean | undefined;
406
407
  key?: string | undefined;
407
408
  enum?: string[] | undefined;
408
- required?: boolean | undefined;
409
409
  enabled?: boolean | undefined;
410
410
  file?: File | undefined;
411
411
  refUid?: string | undefined;
@@ -422,8 +422,8 @@ declare const requestExampleSchema: z.ZodObject<{
422
422
  maximum?: number | undefined;
423
423
  description?: string | undefined;
424
424
  default?: any;
425
- enum?: string[] | undefined;
426
425
  required?: boolean | undefined;
426
+ enum?: string[] | undefined;
427
427
  file?: File | undefined;
428
428
  refUid?: string | undefined;
429
429
  format?: string | undefined;
@@ -438,8 +438,8 @@ declare const requestExampleSchema: z.ZodObject<{
438
438
  maximum?: number | undefined;
439
439
  description?: string | undefined;
440
440
  default?: any;
441
- enum?: string[] | undefined;
442
441
  required?: boolean | undefined;
442
+ enum?: string[] | undefined;
443
443
  file?: File | undefined;
444
444
  refUid?: string | undefined;
445
445
  format?: string | undefined;
@@ -454,8 +454,8 @@ declare const requestExampleSchema: z.ZodObject<{
454
454
  maximum?: number | undefined;
455
455
  description?: string | undefined;
456
456
  default?: any;
457
- enum?: string[] | undefined;
458
457
  required?: boolean | undefined;
458
+ enum?: string[] | undefined;
459
459
  file?: File | undefined;
460
460
  refUid?: string | undefined;
461
461
  format?: string | undefined;
@@ -470,8 +470,8 @@ declare const requestExampleSchema: z.ZodObject<{
470
470
  maximum?: number | undefined;
471
471
  description?: string | undefined;
472
472
  default?: any;
473
- enum?: string[] | undefined;
474
473
  required?: boolean | undefined;
474
+ enum?: string[] | undefined;
475
475
  file?: File | undefined;
476
476
  refUid?: string | undefined;
477
477
  format?: string | undefined;
@@ -485,9 +485,9 @@ declare const requestExampleSchema: z.ZodObject<{
485
485
  value?: string | number | undefined;
486
486
  description?: string | undefined;
487
487
  default?: any;
488
+ required?: boolean | undefined;
488
489
  key?: string | undefined;
489
490
  enum?: string[] | undefined;
490
- required?: boolean | undefined;
491
491
  enabled?: boolean | undefined;
492
492
  file?: File | undefined;
493
493
  refUid?: string | undefined;
@@ -501,9 +501,9 @@ declare const requestExampleSchema: z.ZodObject<{
501
501
  value?: string | number | undefined;
502
502
  description?: string | undefined;
503
503
  default?: any;
504
+ required?: boolean | undefined;
504
505
  key?: string | undefined;
505
506
  enum?: string[] | undefined;
506
- required?: boolean | undefined;
507
507
  enabled?: boolean | undefined;
508
508
  file?: File | undefined;
509
509
  refUid?: string | undefined;
@@ -517,9 +517,9 @@ declare const requestExampleSchema: z.ZodObject<{
517
517
  value?: string | number | undefined;
518
518
  description?: string | undefined;
519
519
  default?: any;
520
+ required?: boolean | undefined;
520
521
  key?: string | undefined;
521
522
  enum?: string[] | undefined;
522
- required?: boolean | undefined;
523
523
  enabled?: boolean | undefined;
524
524
  file?: File | undefined;
525
525
  refUid?: string | undefined;
@@ -533,9 +533,9 @@ declare const requestExampleSchema: z.ZodObject<{
533
533
  value?: string | number | undefined;
534
534
  description?: string | undefined;
535
535
  default?: any;
536
+ required?: boolean | undefined;
536
537
  key?: string | undefined;
537
538
  enum?: string[] | undefined;
538
- required?: boolean | undefined;
539
539
  enabled?: boolean | undefined;
540
540
  file?: File | undefined;
541
541
  refUid?: string | undefined;
@@ -558,8 +558,8 @@ declare const requestExampleSchema: z.ZodObject<{
558
558
  maximum?: number | undefined;
559
559
  description?: string | undefined;
560
560
  default?: any;
561
- enum?: string[] | undefined;
562
561
  required?: boolean | undefined;
562
+ enum?: string[] | undefined;
563
563
  file?: File | undefined;
564
564
  refUid?: string | undefined;
565
565
  format?: string | undefined;
@@ -574,8 +574,8 @@ declare const requestExampleSchema: z.ZodObject<{
574
574
  maximum?: number | undefined;
575
575
  description?: string | undefined;
576
576
  default?: any;
577
- enum?: string[] | undefined;
578
577
  required?: boolean | undefined;
578
+ enum?: string[] | undefined;
579
579
  file?: File | undefined;
580
580
  refUid?: string | undefined;
581
581
  format?: string | undefined;
@@ -590,8 +590,8 @@ declare const requestExampleSchema: z.ZodObject<{
590
590
  maximum?: number | undefined;
591
591
  description?: string | undefined;
592
592
  default?: any;
593
- enum?: string[] | undefined;
594
593
  required?: boolean | undefined;
594
+ enum?: string[] | undefined;
595
595
  file?: File | undefined;
596
596
  refUid?: string | undefined;
597
597
  format?: string | undefined;
@@ -606,8 +606,8 @@ declare const requestExampleSchema: z.ZodObject<{
606
606
  maximum?: number | undefined;
607
607
  description?: string | undefined;
608
608
  default?: any;
609
- enum?: string[] | undefined;
610
609
  required?: boolean | undefined;
610
+ enum?: string[] | undefined;
611
611
  file?: File | undefined;
612
612
  refUid?: string | undefined;
613
613
  format?: string | undefined;
@@ -630,8 +630,8 @@ declare const requestExampleSchema: z.ZodObject<{
630
630
  maximum?: number | undefined;
631
631
  description?: string | undefined;
632
632
  default?: any;
633
- enum?: string[] | undefined;
634
633
  required?: boolean | undefined;
634
+ enum?: string[] | undefined;
635
635
  file?: File | undefined;
636
636
  refUid?: string | undefined;
637
637
  format?: string | undefined;
@@ -656,9 +656,9 @@ declare const requestExampleSchema: z.ZodObject<{
656
656
  value?: string | number | undefined;
657
657
  description?: string | undefined;
658
658
  default?: any;
659
+ required?: boolean | undefined;
659
660
  key?: string | undefined;
660
661
  enum?: string[] | undefined;
661
- required?: boolean | undefined;
662
662
  enabled?: boolean | undefined;
663
663
  file?: File | undefined;
664
664
  refUid?: string | undefined;
@@ -672,9 +672,9 @@ declare const requestExampleSchema: z.ZodObject<{
672
672
  value?: string | number | undefined;
673
673
  description?: string | undefined;
674
674
  default?: any;
675
+ required?: boolean | undefined;
675
676
  key?: string | undefined;
676
677
  enum?: string[] | undefined;
677
- required?: boolean | undefined;
678
678
  enabled?: boolean | undefined;
679
679
  file?: File | undefined;
680
680
  refUid?: string | undefined;
@@ -688,9 +688,9 @@ declare const requestExampleSchema: z.ZodObject<{
688
688
  value?: string | number | undefined;
689
689
  description?: string | undefined;
690
690
  default?: any;
691
+ required?: boolean | undefined;
691
692
  key?: string | undefined;
692
693
  enum?: string[] | undefined;
693
- required?: boolean | undefined;
694
694
  enabled?: boolean | undefined;
695
695
  file?: File | undefined;
696
696
  refUid?: string | undefined;
@@ -704,9 +704,9 @@ declare const requestExampleSchema: z.ZodObject<{
704
704
  value?: string | number | undefined;
705
705
  description?: string | undefined;
706
706
  default?: any;
707
+ required?: boolean | undefined;
707
708
  key?: string | undefined;
708
709
  enum?: string[] | undefined;
709
- required?: boolean | undefined;
710
710
  enabled?: boolean | undefined;
711
711
  file?: File | undefined;
712
712
  refUid?: string | undefined;
@@ -727,9 +727,9 @@ declare const requestExampleSchema: z.ZodObject<{
727
727
  value?: string | number | undefined;
728
728
  description?: string | undefined;
729
729
  default?: any;
730
+ required?: boolean | undefined;
730
731
  key?: string | undefined;
731
732
  enum?: string[] | undefined;
732
- required?: boolean | undefined;
733
733
  enabled?: boolean | undefined;
734
734
  file?: File | undefined;
735
735
  refUid?: string | undefined;
@@ -761,8 +761,8 @@ export declare const createRequestExample: (payload: RequestExamplePayload) => {
761
761
  maximum?: number | undefined;
762
762
  description?: string | undefined;
763
763
  default?: any;
764
- enum?: string[] | undefined;
765
764
  required?: boolean | undefined;
765
+ enum?: string[] | undefined;
766
766
  file?: File | undefined;
767
767
  refUid?: string | undefined;
768
768
  format?: string | undefined;
@@ -777,8 +777,8 @@ export declare const createRequestExample: (payload: RequestExamplePayload) => {
777
777
  maximum?: number | undefined;
778
778
  description?: string | undefined;
779
779
  default?: any;
780
- enum?: string[] | undefined;
781
780
  required?: boolean | undefined;
781
+ enum?: string[] | undefined;
782
782
  file?: File | undefined;
783
783
  refUid?: string | undefined;
784
784
  format?: string | undefined;
@@ -793,8 +793,8 @@ export declare const createRequestExample: (payload: RequestExamplePayload) => {
793
793
  maximum?: number | undefined;
794
794
  description?: string | undefined;
795
795
  default?: any;
796
- enum?: string[] | undefined;
797
796
  required?: boolean | undefined;
797
+ enum?: string[] | undefined;
798
798
  file?: File | undefined;
799
799
  refUid?: string | undefined;
800
800
  format?: string | undefined;
@@ -809,8 +809,8 @@ export declare const createRequestExample: (payload: RequestExamplePayload) => {
809
809
  maximum?: number | undefined;
810
810
  description?: string | undefined;
811
811
  default?: any;
812
- enum?: string[] | undefined;
813
812
  required?: boolean | undefined;
813
+ enum?: string[] | undefined;
814
814
  file?: File | undefined;
815
815
  refUid?: string | undefined;
816
816
  format?: string | undefined;
@@ -833,8 +833,8 @@ export declare const createRequestExample: (payload: RequestExamplePayload) => {
833
833
  maximum?: number | undefined;
834
834
  description?: string | undefined;
835
835
  default?: any;
836
- enum?: string[] | undefined;
837
836
  required?: boolean | undefined;
837
+ enum?: string[] | undefined;
838
838
  file?: File | undefined;
839
839
  refUid?: string | undefined;
840
840
  format?: string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"request-examples.d.ts","sourceRoot":"","sources":["../../../../src/entities/workspace/spec/request-examples.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,QAAA,MAAM,8BAA8B;;;;;;IAMlC,kFAAkF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUlF,CAAA;AAEF,kFAAkF;AAClF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAC3C,OAAO,8BAA8B,CACtC,CAAA;AACD,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAClD,OAAO,8BAA8B,CACtC,CAAA;AAED,8CAA8C;AAC9C,eAAO,MAAM,6BAA6B,YAC/B,8BAA8B;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8ElF,CAAA;AAEF,mDAAmD;AACnD,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA;AACjE,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAExE,oCAAoC;AACpC,eAAO,MAAM,oBAAoB,YAAa,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIhE,CAAA"}
@@ -1,6 +1,6 @@
1
+ import { deepMerge } from '@scalar/object-utils/merge';
1
2
  import { z } from 'zod';
2
3
  import { nanoidSchema } from '../shared/utility.js';
3
- import { deepMerge } from '../../../helpers/deepMerge.js';
4
4
 
5
5
  const requestExampleParametersSchema = z.object({
6
6
  key: z.string().default(''),
@@ -1 +1 @@
1
- {"version":3,"file":"requests.d.ts","sourceRoot":"","sources":["../../../../src/entities/workspace/spec/requests.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAC1C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAChD,OAAO,EAAkB,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAExD,0DAA0D;AAC1D,MAAM,MAAM,gBAAgB,GAAG,aAAa,GAAG;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AG,aAAa,GAAG;IAC7C,kCAAkC;IAClC,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,iEAAiE;AACjE,MAAM,MAAM,YAAY,GAAG;IACzB,OAAO,EAAE,cAAc,CAAA;IACvB,QAAQ,EAAE,gBAAgB,CAAA;IAC1B,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAQD,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;IAQjB;;;OAGG;;IAEH,kDAAkD;;IAElD,mHAAmH;;IAEnH;;;;OAIG;;;;;;;;;;;;;;;;;;IAUH;;;;;;OAMG;;IAEH,6EAA6E;;IAE7E,mEAAmE;;IAEnE;;;;;OAKG;;IAEH,0CAA0C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAG1C,CAAA;AAEF;;;;GAIG;AACH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,GAAG;IACpD,YAAY,CAAC,EAAE,WAAW,CAAC,2BAA2B,CAAA;CACvD,CAAA;AACD,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,GAAG;IAC3D,YAAY,CAAC,EAAE,WAAW,CAAC,2BAA2B,CAAA;CACvD,CAAA;AAED,4BAA4B;AAC5B,eAAO,MAAM,aAAa,YAAa,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;CACY,CAAA"}
@@ -1,9 +1,9 @@
1
+ import { deepMerge } from '@scalar/object-utils/merge';
1
2
  import { z } from 'zod';
2
3
  import { $refSchema } from './refs.js';
3
4
  import { REQUEST_METHODS } from '../../../helpers/httpMethods.js';
4
5
  import { nanoidSchema } from '../shared/utility.js';
5
6
  import { securityRequirement } from '../security/security-requirement.js';
6
- import { deepMerge } from '../../../helpers/deepMerge.js';
7
7
 
8
8
  const requestBodySchema = z.any();
9
9
  const parametersSchema = z.record(z.string(), z.any());
@@ -1,4 +1,17 @@
1
1
  import { z } from 'zod';
2
+ declare const modifier: z.ZodDefault<z.ZodOptional<z.ZodEnum<["Meta", "Control", "Shift", "Alt", "default"]>>>;
3
+ export type HotKeyModifier = z.infer<typeof modifier>;
4
+ declare const hotKeys: z.ZodRecord<z.ZodEnum<["Space", "Backspace", "Tab", "Enter", "Escape", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "*", "+", "-", ".", "/", "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12", ";", "=", ",", "-", ".", "/", "`", "[", "\\", "]", ""]>, z.ZodObject<{
5
+ modifier: z.ZodOptional<z.ZodBoolean>;
6
+ event: z.ZodEnum<["closeModal"]>;
7
+ }, "strip", z.ZodTypeAny, {
8
+ event: "closeModal";
9
+ modifier?: boolean | undefined;
10
+ }, {
11
+ event: "closeModal";
12
+ modifier?: boolean | undefined;
13
+ }>>;
14
+ export type HotKeyConfig = z.infer<typeof hotKeys>;
2
15
  declare const workspaceSchema: z.ZodObject<{
3
16
  uid: z.ZodDefault<z.ZodOptional<z.ZodString>>;
4
17
  name: z.ZodDefault<z.ZodString>;
@@ -10,6 +23,32 @@ declare const workspaceSchema: z.ZodObject<{
10
23
  collectionUids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
11
24
  /** List of all environment uids in a given workspace */
12
25
  environmentUids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
26
+ /** Customize hotkeys */
27
+ hotKeyConfig: z.ZodOptional<z.ZodObject<{
28
+ modifier: z.ZodDefault<z.ZodOptional<z.ZodEnum<["Meta", "Control", "Shift", "Alt", "default"]>>>;
29
+ hotKeys: z.ZodOptional<z.ZodRecord<z.ZodEnum<["Space", "Backspace", "Tab", "Enter", "Escape", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "*", "+", "-", ".", "/", "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12", ";", "=", ",", "-", ".", "/", "`", "[", "\\", "]", ""]>, z.ZodObject<{
30
+ modifier: z.ZodOptional<z.ZodBoolean>;
31
+ event: z.ZodEnum<["closeModal"]>;
32
+ }, "strip", z.ZodTypeAny, {
33
+ event: "closeModal";
34
+ modifier?: boolean | undefined;
35
+ }, {
36
+ event: "closeModal";
37
+ modifier?: boolean | undefined;
38
+ }>>>;
39
+ }, "strip", z.ZodTypeAny, {
40
+ modifier: "default" | "Meta" | "Control" | "Shift" | "Alt";
41
+ hotKeys?: Partial<Record<"" | "0" | "1" | "2" | "/" | "[" | "Space" | "Backspace" | "Tab" | "Enter" | "Escape" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | "*" | "+" | "-" | "." | "F1" | "F2" | "F3" | "F4" | "F5" | "F6" | "F7" | "F8" | "F9" | "F10" | "F11" | "F12" | ";" | "=" | "," | "`" | "\\" | "]", {
42
+ event: "closeModal";
43
+ modifier?: boolean | undefined;
44
+ }>> | undefined;
45
+ }, {
46
+ modifier?: "default" | "Meta" | "Control" | "Shift" | "Alt" | undefined;
47
+ hotKeys?: Partial<Record<"" | "0" | "1" | "2" | "/" | "[" | "Space" | "Backspace" | "Tab" | "Enter" | "Escape" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | "*" | "+" | "-" | "." | "F1" | "F2" | "F3" | "F4" | "F5" | "F6" | "F7" | "F8" | "F9" | "F10" | "F11" | "F12" | ";" | "=" | "," | "`" | "\\" | "]", {
48
+ event: "closeModal";
49
+ modifier?: boolean | undefined;
50
+ }>> | undefined;
51
+ }>>;
13
52
  /** List of all cookie uids in a given workspace */
14
53
  cookieUids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
15
54
  /** Workspace level proxy for all requests to be sent through */
@@ -25,6 +64,13 @@ declare const workspaceSchema: z.ZodObject<{
25
64
  environmentUids: string[];
26
65
  cookieUids: string[];
27
66
  themeId: "default" | "alternate" | "moon" | "purple" | "solarized" | "bluePlanet" | "deepSpace" | "saturn" | "kepler" | "mars" | "none";
67
+ hotKeyConfig?: {
68
+ modifier: "default" | "Meta" | "Control" | "Shift" | "Alt";
69
+ hotKeys?: Partial<Record<"" | "0" | "1" | "2" | "/" | "[" | "Space" | "Backspace" | "Tab" | "Enter" | "Escape" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | "*" | "+" | "-" | "." | "F1" | "F2" | "F3" | "F4" | "F5" | "F6" | "F7" | "F8" | "F9" | "F10" | "F11" | "F12" | ";" | "=" | "," | "`" | "\\" | "]", {
70
+ event: "closeModal";
71
+ modifier?: boolean | undefined;
72
+ }>> | undefined;
73
+ } | undefined;
28
74
  proxyUrl?: string | undefined;
29
75
  }, {
30
76
  uid?: string | undefined;
@@ -33,6 +79,13 @@ declare const workspaceSchema: z.ZodObject<{
33
79
  isReadOnly?: boolean | undefined;
34
80
  collectionUids?: string[] | undefined;
35
81
  environmentUids?: string[] | undefined;
82
+ hotKeyConfig?: {
83
+ modifier?: "default" | "Meta" | "Control" | "Shift" | "Alt" | undefined;
84
+ hotKeys?: Partial<Record<"" | "0" | "1" | "2" | "/" | "[" | "Space" | "Backspace" | "Tab" | "Enter" | "Escape" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | "*" | "+" | "-" | "." | "F1" | "F2" | "F3" | "F4" | "F5" | "F6" | "F7" | "F8" | "F9" | "F10" | "F11" | "F12" | ";" | "=" | "," | "`" | "\\" | "]", {
85
+ event: "closeModal";
86
+ modifier?: boolean | undefined;
87
+ }>> | undefined;
88
+ } | undefined;
36
89
  cookieUids?: string[] | undefined;
37
90
  proxyUrl?: string | undefined;
38
91
  themeId?: "default" | "alternate" | "moon" | "purple" | "solarized" | "bluePlanet" | "deepSpace" | "saturn" | "kepler" | "mars" | "none" | undefined;
@@ -49,6 +102,13 @@ export declare const createWorkspace: (payload: WorkspacePayload) => {
49
102
  environmentUids: string[];
50
103
  cookieUids: string[];
51
104
  themeId: "default" | "alternate" | "moon" | "purple" | "solarized" | "bluePlanet" | "deepSpace" | "saturn" | "kepler" | "mars" | "none";
105
+ hotKeyConfig?: {
106
+ modifier: "default" | "Meta" | "Control" | "Shift" | "Alt";
107
+ hotKeys?: Partial<Record<"" | "0" | "1" | "2" | "/" | "[" | "Space" | "Backspace" | "Tab" | "Enter" | "Escape" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | "*" | "+" | "-" | "." | "F1" | "F2" | "F3" | "F4" | "F5" | "F6" | "F7" | "F8" | "F9" | "F10" | "F11" | "F12" | ";" | "=" | "," | "`" | "\\" | "]", {
108
+ event: "closeModal";
109
+ modifier?: boolean | undefined;
110
+ }>> | undefined;
111
+ } | undefined;
52
112
  proxyUrl?: string | undefined;
53
113
  };
54
114
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"workspace.d.ts","sourceRoot":"","sources":["../../../src/entities/workspace/workspace.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,QAAA,MAAM,eAAe;;;IAGnB,4BAA4B;;IAE5B,6EAA6E;;IAE7E,uDAAuD;;IAEvD,wDAAwD;;IAExD,mDAAmD;;IAEnD,gEAAgE;;IAEhE,oEAAoE;;;;;;;;;;;;;;;;;;;;;;EAEpE,CAAA;AAEF,gCAAgC;AAChC,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAA;AACvD,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAA;AAE9D,eAAO,MAAM,eAAe,YAAa,gBAAgB;;;;;;;;;;CACzB,CAAA"}
1
+ {"version":3,"file":"workspace.d.ts","sourceRoot":"","sources":["../../../src/entities/workspace/workspace.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,QAAA,MAAM,QAAQ,wFAGO,CAAA;AAErB,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAA;AAErD,QAAA,MAAM,OAAO;;;;;;;;;GAMZ,CAAA;AACD,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,OAAO,CAAC,CAAA;AASlD,QAAA,MAAM,eAAe;;;IAGnB,4BAA4B;;IAE5B,6EAA6E;;IAE7E,uDAAuD;;IAEvD,wDAAwD;;IAExD,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;IAExB,mDAAmD;;IAEnD,gEAAgE;;IAEhE,oEAAoE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEpE,CAAA;AAEF,gCAAgC;AAChC,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAA;AACvD,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAA;AAE9D,eAAO,MAAM,eAAe,YAAa,gBAAgB;;;;;;;;;;;;;;;;;CACzB,CAAA"}
@@ -1,7 +1,22 @@
1
1
  import { themeIds } from '@scalar/themes';
2
2
  import { z } from 'zod';
3
+ import { KEYDOWN_KEYS, HOTKEY_EVENT_NAMES } from './consts/hot-keys.js';
3
4
  import { nanoidSchema } from './shared/utility.js';
4
5
 
6
+ const modifier = z
7
+ .enum(['Meta', 'Control', 'Shift', 'Alt', 'default'])
8
+ .optional()
9
+ .default('default');
10
+ const hotKeys = z.record(z.enum(KEYDOWN_KEYS), z.object({
11
+ modifier: z.boolean().optional(),
12
+ event: z.enum(HOTKEY_EVENT_NAMES),
13
+ }));
14
+ const hotKeyConfigSchema = z
15
+ .object({
16
+ modifier,
17
+ hotKeys: hotKeys.optional(),
18
+ })
19
+ .optional();
5
20
  const workspaceSchema = z.object({
6
21
  uid: nanoidSchema,
7
22
  name: z.string().default('Default Workspace'),
@@ -13,6 +28,8 @@ const workspaceSchema = z.object({
13
28
  collectionUids: z.array(z.string()).default([]),
14
29
  /** List of all environment uids in a given workspace */
15
30
  environmentUids: z.array(z.string()).default([]),
31
+ /** Customize hotkeys */
32
+ hotKeyConfig: hotKeyConfigSchema,
16
33
  /** List of all cookie uids in a given workspace */
17
34
  cookieUids: z.array(z.string()).default([]),
18
35
  /** Workspace level proxy for all requests to be sent through */
@@ -1,6 +1,5 @@
1
1
  export * from './concatenateUrlAndPath.js';
2
2
  export * from './createHash.js';
3
- export * from './deepMerge.js';
4
3
  export * from './fetchSpecFromUrl.js';
5
4
  export * from './findVariables.js';
6
5
  export * from './httpMethods.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAA;AACvC,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,oBAAoB,CAAA;AAClC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,mBAAmB,CAAA;AACjC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,qBAAqB,CAAA;AACnC,cAAc,2BAA2B,CAAA;AACzC,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA;AACjC,cAAc,oBAAoB,CAAA;AAClC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,cAAc,cAAc,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAA;AACvC,cAAc,cAAc,CAAA;AAC5B,cAAc,oBAAoB,CAAA;AAClC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,mBAAmB,CAAA;AACjC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,qBAAqB,CAAA;AACnC,cAAc,2BAA2B,CAAA;AACzC,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA;AACjC,cAAc,oBAAoB,CAAA;AAClC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,cAAc,cAAc,CAAA"}
@@ -1,6 +1,5 @@
1
1
  export { concatenateUrlAndPath } from './concatenateUrlAndPath.js';
2
2
  export { createHash } from './createHash.js';
3
- export { deepMerge } from './deepMerge.js';
4
3
  export { fetchSpecFromUrl } from './fetchSpecFromUrl.js';
5
4
  export { findVariables } from './findVariables.js';
6
5
  export { REQUEST_METHODS, getRequest } from './httpMethods.js';
@@ -1 +1 @@
1
- {"version":3,"file":"getExampleFromSchema.d.ts","sourceRoot":"","sources":["../../src/spec-getters/getExampleFromSchema.ts"],"names":[],"mappings":"AAsCA;;GAEG;AACH,eAAO,MAAM,oBAAoB,WACvB,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,YACjB;IACR;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;OAGG;IACH,GAAG,CAAC,EAAE,OAAO,CAAA;IACb;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IACvB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC/B;;OAEG;IACH,8BAA8B,CAAC,EAAE,OAAO,CAAA;CACzC,UACM,MAAM,iBACE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,SAC3B,MAAM,KACZ,GAkSF,CAAA"}
1
+ {"version":3,"file":"getExampleFromSchema.d.ts","sourceRoot":"","sources":["../../src/spec-getters/getExampleFromSchema.ts"],"names":[],"mappings":"AAsCA;;GAEG;AACH,eAAO,MAAM,oBAAoB,WACvB,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,YACjB;IACR;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;OAGG;IACH,GAAG,CAAC,EAAE,OAAO,CAAA;IACb;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IACvB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC/B;;OAEG;IACH,8BAA8B,CAAC,EAAE,OAAO,CAAA;CACzC,UACM,MAAM,iBACE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,SAC3B,MAAM,KACZ,GAqQF,CAAA"}
@@ -105,6 +105,21 @@ const getExampleFromSchema = (schema, options, level = 0, parentSchema, name) =>
105
105
  }
106
106
  });
107
107
  }
108
+ // Additional properties
109
+ if (schema.additionalProperties !== undefined) {
110
+ const anyTypeIsValid =
111
+ // true
112
+ schema.additionalProperties === true ||
113
+ // or an empty object {}
114
+ (typeof schema.additionalProperties === 'object' &&
115
+ !Object.keys(schema.additionalProperties).length);
116
+ if (anyTypeIsValid) {
117
+ response['ANY_ADDITIONAL_PROPERTY'] = 'anything';
118
+ }
119
+ else if (schema.additionalProperties !== false) {
120
+ response['ANY_ADDITIONAL_PROPERTY'] = getExampleFromSchema(schema.additionalProperties, options, level + 1);
121
+ }
122
+ }
108
123
  if (schema.anyOf !== undefined) {
109
124
  Object.assign(response, getExampleFromSchema(schema.anyOf[0]), options, level + 1);
110
125
  }
@@ -116,36 +131,6 @@ const getExampleFromSchema = (schema, options, level = 0, parentSchema, name) =>
116
131
  .map((item) => getExampleFromSchema(item, options, level + 1, schema))
117
132
  .filter((item) => item !== undefined));
118
133
  }
119
- // Merge additionalProperties
120
- if (schema.additionalProperties !== undefined &&
121
- schema.additionalProperties !== false) {
122
- const additionalSchema = getExampleFromSchema(schema.additionalProperties, options, level + 1);
123
- // Merge objects, but not arrays
124
- if (additionalSchema &&
125
- typeof additionalSchema === 'object' &&
126
- !Array.isArray(additionalSchema)) {
127
- return {
128
- ...response,
129
- ...getExampleFromSchema(schema.additionalProperties, options, level + 1),
130
- };
131
- }
132
- // Add an example for nullable properties
133
- if (additionalSchema === null) {
134
- return null;
135
- }
136
- // Otherwise, add an example of key-value pair
137
- const additionalProperties = getExampleFromSchema(schema.additionalProperties, {
138
- ...options,
139
- // Let’s just add the additionalProperties, even if they are optional.
140
- omitEmptyAndOptionalProperties: false,
141
- }, level + 1);
142
- return {
143
- ...response,
144
- ...(additionalProperties === undefined
145
- ? {}
146
- : { '{{key}}': additionalProperties }),
147
- };
148
- }
149
134
  return response;
150
135
  }
151
136
  // Array
package/package.json CHANGED
@@ -16,7 +16,7 @@
16
16
  "specification",
17
17
  "yaml"
18
18
  ],
19
- "version": "0.2.26",
19
+ "version": "0.2.28",
20
20
  "engines": {
21
21
  "node": ">=18"
22
22
  },
@@ -75,6 +75,10 @@
75
75
  "import": "./dist/entities/workspace/cookie/index.js",
76
76
  "types": "./dist/entities/workspace/cookie/index.d.ts"
77
77
  },
78
+ "./entities/workspace/consts": {
79
+ "import": "./dist/entities/workspace/consts/index.js",
80
+ "types": "./dist/entities/workspace/consts/index.d.ts"
81
+ },
78
82
  "./entities/workspace/collection": {
79
83
  "import": "./dist/entities/workspace/collection/index.js",
80
84
  "types": "./dist/entities/workspace/collection/index.d.ts"
@@ -90,7 +94,8 @@
90
94
  "nanoid": "^5.0.7",
91
95
  "yaml": "^2.4.5",
92
96
  "zod": "^3.22.4",
93
- "@scalar/themes": "0.9.21"
97
+ "@scalar/object-utils": "1.1.6",
98
+ "@scalar/themes": "0.9.22"
94
99
  },
95
100
  "devDependencies": {
96
101
  "@scalar/openapi-parser": "^0.7.2",
@@ -1,7 +0,0 @@
1
- /**
2
- * Kind of type safe deep merge for objects
3
- *
4
- * TODO Fix types but works for now with the as unknown as keyof
5
- */
6
- export declare const deepMerge: <T extends object, I extends object>(target: T, ...sources: I[]) => T;
7
- //# sourceMappingURL=deepMerge.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"deepMerge.d.ts","sourceRoot":"","sources":["../../src/helpers/deepMerge.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,eAAO,MAAM,SAAS,GAAI,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,MAAM,UAClD,CAAC,cACG,CAAC,EAAE,KACd,CAmBF,CAAA"}
@@ -1,28 +0,0 @@
1
- const isObject = (item) => {
2
- return item && typeof item === 'object' && !Array.isArray(item);
3
- };
4
- /**
5
- * Kind of type safe deep merge for objects
6
- *
7
- * TODO Fix types but works for now with the as unknown as keyof
8
- */
9
- const deepMerge = (target, ...sources) => {
10
- if (!sources.length)
11
- return target;
12
- const source = sources.shift();
13
- if (isObject(target) && isObject(source)) {
14
- for (const key in source) {
15
- if (isObject(source[key])) {
16
- if (!target[key])
17
- Object.assign(target, { [key]: {} });
18
- deepMerge(target[key], source[key]);
19
- }
20
- else {
21
- Object.assign(target, { [key]: source[key] });
22
- }
23
- }
24
- }
25
- return deepMerge(target, ...sources);
26
- };
27
-
28
- export { deepMerge };