@scalar/workspace-store 0.54.5 → 0.55.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.
Files changed (68) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/channel-example/build-connection-url.d.ts +7 -0
  3. package/dist/channel-example/build-connection-url.d.ts.map +1 -1
  4. package/dist/channel-example/build-connection-url.js +10 -0
  5. package/dist/channel-example/get-async-api-protocols.d.ts +86 -0
  6. package/dist/channel-example/get-async-api-protocols.d.ts.map +1 -0
  7. package/dist/channel-example/get-async-api-protocols.js +110 -0
  8. package/dist/channel-example/index.d.ts +2 -0
  9. package/dist/channel-example/index.d.ts.map +1 -1
  10. package/dist/channel-example/index.js +1 -0
  11. package/dist/channel-example/servers.d.ts +7 -0
  12. package/dist/channel-example/servers.d.ts.map +1 -1
  13. package/dist/channel-example/servers.js +1 -1
  14. package/dist/client.d.ts.map +1 -1
  15. package/dist/client.js +11 -3
  16. package/dist/entities/auth/schema.d.ts +25 -0
  17. package/dist/entities/auth/schema.d.ts.map +1 -1
  18. package/dist/events/definitions/workspace.d.ts +8 -0
  19. package/dist/events/definitions/workspace.d.ts.map +1 -1
  20. package/dist/helpers/get-first-server.d.ts +9 -0
  21. package/dist/helpers/get-first-server.d.ts.map +1 -0
  22. package/dist/helpers/get-first-server.js +30 -0
  23. package/dist/helpers/get-resolved-ref-deep.d.ts.map +1 -1
  24. package/dist/helpers/get-resolved-ref-deep.js +13 -0
  25. package/dist/mutators/index.d.ts +1 -0
  26. package/dist/mutators/index.d.ts.map +1 -1
  27. package/dist/mutators/workspace.d.ts +8 -0
  28. package/dist/mutators/workspace.d.ts.map +1 -1
  29. package/dist/mutators/workspace.js +13 -0
  30. package/dist/request-example/builder/header/de-serialize-parameter.d.ts +14 -1
  31. package/dist/request-example/builder/header/de-serialize-parameter.d.ts.map +1 -1
  32. package/dist/request-example/builder/header/de-serialize-parameter.js +10 -4
  33. package/dist/request-example/builder/header/is-param-disabled.d.ts +2 -1
  34. package/dist/request-example/builder/header/is-param-disabled.d.ts.map +1 -1
  35. package/dist/request-example/builder/header/is-param-disabled.js +6 -1
  36. package/dist/request-example/builder/header/serialize-parameter.d.ts +1 -0
  37. package/dist/request-example/builder/header/serialize-parameter.d.ts.map +1 -1
  38. package/dist/request-example/builder/header/serialize-parameter.js +22 -9
  39. package/dist/request-example/builder/index.d.ts +2 -1
  40. package/dist/request-example/builder/index.d.ts.map +1 -1
  41. package/dist/request-example/builder/index.js +2 -1
  42. package/dist/request-example/index.d.ts +1 -1
  43. package/dist/request-example/index.d.ts.map +1 -1
  44. package/dist/request-example/index.js +1 -1
  45. package/dist/schemas/extensions/document/x-scalar-links.d.ts +25 -0
  46. package/dist/schemas/extensions/document/x-scalar-links.d.ts.map +1 -0
  47. package/dist/schemas/extensions/document/x-scalar-links.js +24 -0
  48. package/dist/schemas/extensions.d.ts +1 -0
  49. package/dist/schemas/extensions.d.ts.map +1 -1
  50. package/dist/schemas/extensions.js +1 -0
  51. package/dist/schemas/reference-config/index.d.ts +5 -0
  52. package/dist/schemas/reference-config/index.d.ts.map +1 -1
  53. package/dist/schemas/reference-config/settings.d.ts +5 -0
  54. package/dist/schemas/reference-config/settings.d.ts.map +1 -1
  55. package/dist/schemas/v3.1/openapi/index.d.ts +5 -0
  56. package/dist/schemas/v3.1/openapi/index.d.ts.map +1 -1
  57. package/dist/schemas/v3.1/openapi/index.js +10 -0
  58. package/dist/schemas/v3.1/strict/info.d.ts +7 -1
  59. package/dist/schemas/v3.1/strict/info.d.ts.map +1 -1
  60. package/dist/schemas/v3.1/strict/info.js +2 -1
  61. package/dist/schemas/v3.1/strict/openapi-document.d.ts +175 -0
  62. package/dist/schemas/v3.1/strict/openapi-document.d.ts.map +1 -1
  63. package/dist/schemas/workspace-specification/index.d.ts +1 -0
  64. package/dist/schemas/workspace-specification/index.d.ts.map +1 -1
  65. package/dist/schemas/workspace.d.ts +2 -0
  66. package/dist/schemas/workspace.d.ts.map +1 -1
  67. package/dist/schemas/workspace.js +3 -0
  68. package/package.json +8 -7
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mutators/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAa9C;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,cAAc,GAAG,IAAI;IAqC/D;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEH;;;OAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEH;;;;OAIG;gBACS,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAErB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mutators/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAa9C;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,cAAc,GAAG,IAAI;IAqC/D;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEH;;;OAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEH;;;;OAIG;gBACS,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAErB"}
@@ -36,6 +36,13 @@ export declare const updateActiveEnvironment: (workspace: Workspace | null, payl
36
36
  * @returns
37
37
  */
38
38
  export declare const updateSelectedClient: (workspace: Workspace | null, payload: WorkspaceEvents["workspace:update:selected-client"]) => void;
39
+ /**
40
+ * Updates the selected example on the workspace
41
+ *
42
+ * @param workspace - The workspace to update the selected example in
43
+ * @param payload - The example key to select across the document
44
+ */
45
+ export declare const updateSelectedExample: (workspace: Workspace | null, payload: WorkspaceEvents["workspace:update:selected-example"]) => void;
39
46
  export declare const workspaceMutatorsFactory: ({ workspace }: {
40
47
  workspace: Workspace | null;
41
48
  }) => {
@@ -43,6 +50,7 @@ export declare const workspaceMutatorsFactory: ({ workspace }: {
43
50
  updateColorMode: (payload: WorkspaceEvents["workspace:update:color-mode"]) => void;
44
51
  updateTheme: (payload: WorkspaceEvents["workspace:update:theme"]) => void;
45
52
  updateSelectedClient: (payload: WorkspaceEvents["workspace:update:selected-client"]) => void;
53
+ updateSelectedExample: (payload: WorkspaceEvents["workspace:update:selected-example"]) => void;
46
54
  updateActiveEnvironment: (payload: WorkspaceEvents["workspace:update:active-environment"]) => void;
47
55
  };
48
56
  //# sourceMappingURL=workspace.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"workspace.d.ts","sourceRoot":"","sources":["../../src/mutators/workspace.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAA;AACrE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAE1C;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,GAC5B,WAAW,SAAS,GAAG,IAAI,EAC3B,SAAS,eAAe,CAAC,+BAA+B,CAAC,SAQ1D,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,eAAe,GAC1B,WAAW,SAAS,GAAG,IAAI,EAC3B,SAAS,eAAe,CAAC,6BAA6B,CAAC,SAQxD,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,WAAW,GAAI,WAAW,SAAS,GAAG,IAAI,EAAE,SAAS,eAAe,CAAC,wBAAwB,CAAC,SAO1G,CAAA;AAED;;;;;GAKG;AACH,eAAO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W,SAAS,GAAG,IAAI,EAC3B,SAAS,eAAe,CAAC,kCAAkC,CAAC,SAM7D,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,GAChC,WAAW,SAAS,GAAG,IAAI,EAC3B,SAAS,eAAe,CAAC,mCAAmC,CAAC,SAM9D,CAAA;AAED,eAAO,MAAM,wBAAwB,GAAI,eAAe;IAAE,SAAS,EAAE,SAAS,GAAG,IAAI,CAAA;CAAE;iCAEtD,eAAe,CAAC,+BAA+B,CAAC;+BAElD,eAAe,CAAC,6BAA6B,CAAC;2BAClD,eAAe,CAAC,wBAAwB,CAAC;oCAChC,eAAe,CAAC,kCAAkC,CAAC;qCAElD,eAAe,CAAC,mCAAmC,CAAC;uCAElD,eAAe,CAAC,qCAAqC,CAAC;CAG5F,CAAA"}
@@ -67,12 +67,25 @@ export const updateSelectedClient = (workspace, payload) => {
67
67
  }
68
68
  workspace['x-scalar-default-client'] = payload;
69
69
  };
70
+ /**
71
+ * Updates the selected example on the workspace
72
+ *
73
+ * @param workspace - The workspace to update the selected example in
74
+ * @param payload - The example key to select across the document
75
+ */
76
+ export const updateSelectedExample = (workspace, payload) => {
77
+ if (!workspace) {
78
+ return;
79
+ }
80
+ workspace['x-scalar-default-example'] = payload;
81
+ };
70
82
  export const workspaceMutatorsFactory = ({ workspace }) => {
71
83
  return {
72
84
  updateActiveProxy: (payload) => updateActiveProxy(workspace, payload),
73
85
  updateColorMode: (payload) => updateColorMode(workspace, payload),
74
86
  updateTheme: (payload) => updateTheme(workspace, payload),
75
87
  updateSelectedClient: (payload) => updateSelectedClient(workspace, payload),
88
+ updateSelectedExample: (payload) => updateSelectedExample(workspace, payload),
76
89
  updateActiveEnvironment: (payload) => updateActiveEnvironment(workspace, payload),
77
90
  };
78
91
  };
@@ -1,7 +1,20 @@
1
- import type { ParameterObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
1
+ import type { ParameterObject, ParameterWithSchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
2
2
  /**
3
3
  * Coerces a parameter example from the UI (always a string from CodeInput) into a value
4
4
  * request building can serialize. Only structured types are parsed; primitives stay as strings.
5
5
  */
6
6
  export declare const deSerializeParameter: (example: unknown, param: ParameterObject) => any;
7
+ /**
8
+ * Coerces a single schema-typed value from the request editor (always a string from CodeInput)
9
+ * back into the structure its schema describes.
10
+ *
11
+ * Primitives (`string`, `integer`, `number`, `boolean`, `null`) are left as the typed string.
12
+ * Only `array` and `object` values are parsed so OpenAPI style serialization can expand them.
13
+ *
14
+ * Exposed on its own (not just through {@link deSerializeParameter}) so callers that reassemble an
15
+ * expanded object parameter from individual rows — e.g. a `deepObject` query parameter edited row by
16
+ * row in the API client — can coerce each leaf against its property schema. Otherwise an edited array
17
+ * leaf stays the comma-joined display string and collapses back into a single `key=1,2` entry.
18
+ */
19
+ export declare const deSerializeSchemaValue: (example: unknown, schema: ParameterWithSchemaObject["schema"]) => any;
7
20
  //# sourceMappingURL=de-serialize-parameter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"de-serialize-parameter.d.ts","sourceRoot":"","sources":["../../../../src/request-example/builder/header/de-serialize-parameter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,eAAe,EAEhB,MAAM,8DAA8D,CAAA;AAErE;;;GAGG;AACH,eAAO,MAAM,oBAAoB,GAAI,SAAS,OAAO,EAAE,OAAO,eAAe,QAS5E,CAAA"}
1
+ {"version":3,"file":"de-serialize-parameter.d.ts","sourceRoot":"","sources":["../../../../src/request-example/builder/header/de-serialize-parameter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,eAAe,EACf,yBAAyB,EAC1B,MAAM,8DAA8D,CAAA;AAErE;;;GAGG;AACH,eAAO,MAAM,oBAAoB,GAAI,SAAS,OAAO,EAAE,OAAO,eAAe,QAS5E,CAAA;AA0DD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,sBAAsB,GAAI,SAAS,OAAO,EAAE,QAAQ,yBAAyB,CAAC,QAAQ,CAAC,QAiBnG,CAAA"}
@@ -8,7 +8,7 @@ export const deSerializeParameter = (example, param) => {
8
8
  return deSerializeContentExample(example, Object.keys(param.content ?? {})[0] ?? '');
9
9
  }
10
10
  if ('schema' in param) {
11
- return deSerializeSchemaExample(example, param.schema);
11
+ return deSerializeSchemaValue(example, param.schema);
12
12
  }
13
13
  return example;
14
14
  };
@@ -64,12 +64,18 @@ const getStructuredType = (schema) => {
64
64
  return undefined;
65
65
  };
66
66
  /**
67
- * Schema-based parameters from the request editor.
67
+ * Coerces a single schema-typed value from the request editor (always a string from CodeInput)
68
+ * back into the structure its schema describes.
68
69
  *
69
- * Primitives (`string`, `integer`, `number`, `boolean`, `null`) are left as the typed string
70
+ * Primitives (`string`, `integer`, `number`, `boolean`, `null`) are left as the typed string.
70
71
  * Only `array` and `object` values are parsed so OpenAPI style serialization can expand them.
72
+ *
73
+ * Exposed on its own (not just through {@link deSerializeParameter}) so callers that reassemble an
74
+ * expanded object parameter from individual rows — e.g. a `deepObject` query parameter edited row by
75
+ * row in the API client — can coerce each leaf against its property schema. Otherwise an edited array
76
+ * leaf stays the comma-joined display string and collapses back into a single `key=1,2` entry.
71
77
  */
72
- const deSerializeSchemaExample = (example, schema) => {
78
+ export const deSerializeSchemaValue = (example, schema) => {
73
79
  if (typeof example === 'string') {
74
80
  const type = getStructuredType(schema);
75
81
  if (type) {
@@ -7,7 +7,8 @@ import type { ExampleObject, ParameterObject } from '@scalar/workspace-store/sch
7
7
  *
8
8
  * @param param - The parameter to check.
9
9
  * @param example - The example to check.
10
+ * @param defaultDisabled - When true (default), optional parameters are treated as disabled unless explicitly enabled. When false, only parameters explicitly marked `x-disabled: true` are disabled.
10
11
  * @returns true if the parameter is disabled, false otherwise.
11
12
  */
12
- export declare const isParamDisabled: (param: ParameterObject, example: ExampleObject | undefined) => boolean;
13
+ export declare const isParamDisabled: (param: ParameterObject, example: ExampleObject | undefined, defaultDisabled?: boolean) => boolean;
13
14
  //# sourceMappingURL=is-param-disabled.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"is-param-disabled.d.ts","sourceRoot":"","sources":["../../../../src/request-example/builder/header/is-param-disabled.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AAElH;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,GAAI,OAAO,eAAe,EAAE,SAAS,aAAa,GAAG,SAAS,YAUzF,CAAA"}
1
+ {"version":3,"file":"is-param-disabled.d.ts","sourceRoot":"","sources":["../../../../src/request-example/builder/header/is-param-disabled.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AAElH;;;;;;;;;;GAUG;AACH,eAAO,MAAM,eAAe,GAC1B,OAAO,eAAe,EACtB,SAAS,aAAa,GAAG,SAAS,EAClC,kBAAiB,OAAc,YAgBhC,CAAA"}
@@ -6,14 +6,19 @@
6
6
  *
7
7
  * @param param - The parameter to check.
8
8
  * @param example - The example to check.
9
+ * @param defaultDisabled - When true (default), optional parameters are treated as disabled unless explicitly enabled. When false, only parameters explicitly marked `x-disabled: true` are disabled.
9
10
  * @returns true if the parameter is disabled, false otherwise.
10
11
  */
11
- export const isParamDisabled = (param, example) => {
12
+ export const isParamDisabled = (param, example, defaultDisabled = true) => {
12
13
  const xDisabled = example?.['x-disabled'];
13
14
  // If x-disabled is explicitly set (true or false), use that value
14
15
  if (typeof xDisabled === 'boolean') {
15
16
  return xDisabled;
16
17
  }
18
+ // If the parameter is not disabled by default, return false
19
+ if (!defaultDisabled) {
20
+ return false;
21
+ }
17
22
  // Otherwise, disable optional parameters (except path parameters which are always required)
18
23
  return !param.required && param.in !== 'path';
19
24
  };
@@ -88,6 +88,7 @@ export declare const serializePipeDelimitedStyle: (value: unknown) => string;
88
88
  *
89
89
  * DeepObject: color[R]=100&color[G]=200&color[B]=150
90
90
  * Nested: user[name][first]=Alex&user[name][last]=Smith&user[role]=admin
91
+ * Arrays: filter[ids][]=1&filter[ids][]=2 (the common trailing-bracket convention)
91
92
  */
92
93
  export declare const serializeDeepObjectStyle: (paramName: string, value: unknown) => Array<{
93
94
  key: string;
@@ -1 +1 @@
1
- {"version":3,"file":"serialize-parameter.d.ts","sourceRoot":"","sources":["../../../../src/request-example/builder/header/serialize-parameter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB,GAAI,OAAO,OAAO,EAAE,aAAa,MAAM,KAAG,MAa3E,CAAA;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,oBAAoB,GAAI,OAAO,OAAO,EAAE,SAAS,OAAO,KAAG,OAqBvE,CAAA;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,kBAAkB,GAC7B,OAAO,OAAO,EACd,SAAS,OAAO,KACf,OAAO,GAAG,KAAK,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,CA4BjD,CAAA;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,4BAA4B,GACvC,OAAO,OAAO,EACd,SAAS,OAAO,KACf,OAAO,GAAG,KAAK,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,CA2CjD,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,4BAA4B,GAAI,OAAO,OAAO,KAAG,MAe7D,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B,GAAI,OAAO,OAAO,KAAG,MAe5D,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,GAAI,WAAW,MAAM,EAAE,OAAO,OAAO,KAAG,KAAK,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAyBhH,CAAA"}
1
+ {"version":3,"file":"serialize-parameter.d.ts","sourceRoot":"","sources":["../../../../src/request-example/builder/header/serialize-parameter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB,GAAI,OAAO,OAAO,EAAE,aAAa,MAAM,KAAG,MAa3E,CAAA;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,oBAAoB,GAAI,OAAO,OAAO,EAAE,SAAS,OAAO,KAAG,OAqBvE,CAAA;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,kBAAkB,GAC7B,OAAO,OAAO,EACd,SAAS,OAAO,KACf,OAAO,GAAG,KAAK,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,CA4BjD,CAAA;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,4BAA4B,GACvC,OAAO,OAAO,EACd,SAAS,OAAO,KACf,OAAO,GAAG,KAAK,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,CA2CjD,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,4BAA4B,GAAI,OAAO,OAAO,KAAG,MAe7D,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B,GAAI,OAAO,OAAO,KAAG,MAe5D,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,wBAAwB,GAAI,WAAW,MAAM,EAAE,OAAO,OAAO,KAAG,KAAK,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAoChH,CAAA"}
@@ -196,23 +196,36 @@ export const serializePipeDelimitedStyle = (value) => {
196
196
  *
197
197
  * DeepObject: color[R]=100&color[G]=200&color[B]=150
198
198
  * Nested: user[name][first]=Alex&user[name][last]=Smith&user[role]=admin
199
+ * Arrays: filter[ids][]=1&filter[ids][]=2 (the common trailing-bracket convention)
199
200
  */
200
201
  export const serializeDeepObjectStyle = (paramName, value) => {
201
202
  const result = [];
203
+ /**
204
+ * Appends a single value at the given key, recursing into nested objects and arrays.
205
+ *
206
+ * Array values use the de-facto `key[]` convention (qs, PHP, Rails) so that each item becomes
207
+ * its own query entry instead of collapsing into a comma-joined string. The OpenAPI spec leaves
208
+ * deepObject-on-array undefined, but this matches what most servers expect.
209
+ */
210
+ const append = (fullKey, val) => {
211
+ if (Array.isArray(val)) {
212
+ for (const item of val) {
213
+ append(`${fullKey}[]`, item);
214
+ }
215
+ }
216
+ else if (typeof val === 'object' && val !== null) {
217
+ flatten(val, fullKey);
218
+ }
219
+ else {
220
+ result.push({ key: fullKey, value: String(val) });
221
+ }
222
+ };
202
223
  /**
203
224
  * Recursively flattens nested objects into deepObject notation.
204
225
  */
205
226
  const flatten = (obj, prefix) => {
206
227
  for (const [key, val] of Object.entries(obj)) {
207
- const fullKey = `${prefix}[${key}]`;
208
- if (typeof val === 'object' && val !== null && !Array.isArray(val)) {
209
- // Recursively flatten nested objects
210
- flatten(val, fullKey);
211
- }
212
- else {
213
- // Add primitive values
214
- result.push({ key: fullKey, value: String(val) });
215
- }
228
+ append(`${prefix}[${key}]`, val);
216
229
  }
217
230
  };
218
231
  if (typeof value === 'object' && value !== null && !Array.isArray(value)) {
@@ -2,8 +2,9 @@ export { getExampleFromBody } from './body/get-request-body-example.js';
2
2
  export { getSelectedBodyContentType } from './body/get-selected-body-content-type.js';
3
3
  export { type SerializedFormProperty, serializeFormPropertyWithEncoding } from './body/serialize-form-property.js';
4
4
  export { BUILD_REQUEST_FAILED, type BuildRequestData, type BuildRequestFailureCode, type BuildRequestResult, type RequestPayload, buildRequest, resolveExecutableRequestUrl, } from './build-request.js';
5
- export { deSerializeParameter } from './header/de-serialize-parameter.js';
5
+ export { deSerializeParameter, deSerializeSchemaValue } from './header/de-serialize-parameter.js';
6
6
  export { filterGlobalCookie } from './header/filter-global-cookies.js';
7
+ export { isParamDisabled } from './header/is-param-disabled.js';
7
8
  export { serializeContentValue, serializeDeepObjectStyle, serializeFormStyle, serializeFormStyleForCookies, serializePipeDelimitedStyle, serializeSimpleStyle, serializeSpaceDelimitedStyle, } from './header/serialize-parameter.js';
8
9
  export { getEnvironmentVariables } from './helpers/get-environment-variables.js';
9
10
  export { getExample } from './helpers/get-example.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/request-example/builder/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAA;AACpE,OAAO,EAAE,0BAA0B,EAAE,MAAM,uCAAuC,CAAA;AAClF,OAAO,EAAE,KAAK,sBAAsB,EAAE,iCAAiC,EAAE,MAAM,gCAAgC,CAAA;AAC/G,OAAO,EACL,oBAAoB,EACpB,KAAK,gBAAgB,EACrB,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,YAAY,EACZ,2BAA2B,GAC5B,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAA;AACtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAA;AACnE,OAAO,EACL,qBAAqB,EACrB,wBAAwB,EACxB,kBAAkB,EAClB,4BAA4B,EAC5B,2BAA2B,EAC3B,oBAAoB,EACpB,4BAA4B,GAC7B,MAAM,8BAA8B,CAAA;AACrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAA;AAC7E,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAA;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAA;AACnE,YAAY,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,EACL,2BAA2B,EAC3B,2BAA2B,EAC3B,KAAK,6BAA6B,EAClC,KAAK,8BAA8B,EACnC,wBAAwB,GACzB,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAA;AACxE,YAAY,EACV,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,gCAAgC,EAChC,gCAAgC,EAChC,uBAAuB,EACvB,uBAAuB,EACvB,sBAAsB,EACtB,yBAAyB,EACzB,0BAA0B,GAC3B,MAAM,yBAAyB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/request-example/builder/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAA;AACpE,OAAO,EAAE,0BAA0B,EAAE,MAAM,uCAAuC,CAAA;AAClF,OAAO,EAAE,KAAK,sBAAsB,EAAE,iCAAiC,EAAE,MAAM,gCAAgC,CAAA;AAC/G,OAAO,EACL,oBAAoB,EACpB,KAAK,gBAAgB,EACrB,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,YAAY,EACZ,2BAA2B,GAC5B,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAA;AAC9F,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAA;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAC5D,OAAO,EACL,qBAAqB,EACrB,wBAAwB,EACxB,kBAAkB,EAClB,4BAA4B,EAC5B,2BAA2B,EAC3B,oBAAoB,EACpB,4BAA4B,GAC7B,MAAM,8BAA8B,CAAA;AACrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAA;AAC7E,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAA;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAA;AACnE,YAAY,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,EACL,2BAA2B,EAC3B,2BAA2B,EAC3B,KAAK,6BAA6B,EAClC,KAAK,8BAA8B,EACnC,wBAAwB,GACzB,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAA;AACxE,YAAY,EACV,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,gCAAgC,EAChC,gCAAgC,EAChC,uBAAuB,EACvB,uBAAuB,EACvB,sBAAsB,EACtB,yBAAyB,EACzB,0BAA0B,GAC3B,MAAM,yBAAyB,CAAA"}
@@ -2,8 +2,9 @@ export { getExampleFromBody } from './body/get-request-body-example.js';
2
2
  export { getSelectedBodyContentType } from './body/get-selected-body-content-type.js';
3
3
  export { serializeFormPropertyWithEncoding } from './body/serialize-form-property.js';
4
4
  export { BUILD_REQUEST_FAILED, buildRequest, resolveExecutableRequestUrl, } from './build-request.js';
5
- export { deSerializeParameter } from './header/de-serialize-parameter.js';
5
+ export { deSerializeParameter, deSerializeSchemaValue } from './header/de-serialize-parameter.js';
6
6
  export { filterGlobalCookie } from './header/filter-global-cookies.js';
7
+ export { isParamDisabled } from './header/is-param-disabled.js';
7
8
  export { serializeContentValue, serializeDeepObjectStyle, serializeFormStyle, serializeFormStyleForCookies, serializePipeDelimitedStyle, serializeSimpleStyle, serializeSpaceDelimitedStyle, } from './header/serialize-parameter.js';
8
9
  export { getEnvironmentVariables } from './helpers/get-environment-variables.js';
9
10
  export { getExample } from './helpers/get-example.js';
@@ -1,5 +1,5 @@
1
1
  export type { ApiKeyObjectSecret, BuildRequestData, BuildRequestFailureCode, BuildRequestResult, HttpObjectSecret, OAuth2ObjectSecret, OAuthFlowAuthorizationCodeSecret, OAuthFlowClientCredentialsSecret, OAuthFlowImplicitSecret, OAuthFlowPasswordSecret, OAuthFlowsObjectSecret, OpenIdConnectObjectSecret, RequestPayload, ResolveRequestFactoryUrlError, ResolveRequestFactoryUrlResult, SecuritySchemeObjectSecret, } from './builder/index.js';
2
- export { BUILD_REQUEST_FAILED, INVALID_REQUEST_FACTORY_URL, MISSING_REQUEST_SERVER_BASE, type RequestFactory, type SerializedFormProperty, buildRequest, buildRequestSecurity, deSerializeParameter, filterGlobalCookie, getEnvironmentVariables, getExample, getExampleFromBody, getExampleFromSchema, getResolvedUrl, getSelectedBodyContentType, getServerVariables, requestFactory, resolveExecutableRequestUrl, resolveRequestFactoryUrl, serializeContentValue, serializeDeepObjectStyle, serializeFormPropertyWithEncoding, serializeFormStyle, serializeFormStyleForCookies, serializePipeDelimitedStyle, serializeSimpleStyle, serializeSpaceDelimitedStyle, } from './builder/index.js';
2
+ export { BUILD_REQUEST_FAILED, INVALID_REQUEST_FACTORY_URL, MISSING_REQUEST_SERVER_BASE, type RequestFactory, type SerializedFormProperty, buildRequest, buildRequestSecurity, deSerializeParameter, deSerializeSchemaValue, filterGlobalCookie, getEnvironmentVariables, getExample, getExampleFromBody, getExampleFromSchema, getResolvedUrl, getSelectedBodyContentType, getServerVariables, isParamDisabled, requestFactory, resolveExecutableRequestUrl, resolveRequestFactoryUrl, serializeContentValue, serializeDeepObjectStyle, serializeFormPropertyWithEncoding, serializeFormStyle, serializeFormStyleForCookies, serializePipeDelimitedStyle, serializeSimpleStyle, serializeSpaceDelimitedStyle, } from './builder/index.js';
3
3
  export type { MergedSecuritySchemes } from './context/index.js';
4
4
  export { type BuildRequestExampleContext, combineParams, filterDisabledDefaultHeaders, getActiveEnvironment, getActiveProxyUrl, getDefaultHeaders, getRequestExampleContext, getSecurityRequirements, getSecuritySchemes, getSelectedSecurity, getSelectedServer, getServers, isAuthOptional, mergeSecurity, restoreConventionalDefaultHeaderNames, restoreConventionalHeaderName, } from './context/index.js';
5
5
  export { CONTEXT_FUNCTION_NAMES, type ContextFunctionEntry, type ContextFunctionName, POPULAR_CONTEXT_FUNCTION_KEYS, contextFunctions, getContextFunctionComment, isContextFunctionName, } from './functions.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/request-example/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,kBAAkB,EAClB,gBAAgB,EAChB,uBAAuB,EACvB,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,gCAAgC,EAChC,gCAAgC,EAChC,uBAAuB,EACvB,uBAAuB,EACvB,sBAAsB,EACtB,yBAAyB,EACzB,cAAc,EACd,6BAA6B,EAC7B,8BAA8B,EAC9B,0BAA0B,GAC3B,MAAM,WAAW,CAAA;AAClB,OAAO,EACL,oBAAoB,EACpB,2BAA2B,EAC3B,2BAA2B,EAC3B,KAAK,cAAc,EACnB,KAAK,sBAAsB,EAC3B,YAAY,EACZ,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,uBAAuB,EACvB,UAAU,EACV,kBAAkB,EAClB,oBAAoB,EACpB,cAAc,EACd,0BAA0B,EAC1B,kBAAkB,EAClB,cAAc,EACd,2BAA2B,EAC3B,wBAAwB,EACxB,qBAAqB,EACrB,wBAAwB,EACxB,iCAAiC,EACjC,kBAAkB,EAClB,4BAA4B,EAC5B,2BAA2B,EAC3B,oBAAoB,EACpB,4BAA4B,GAC7B,MAAM,WAAW,CAAA;AAClB,YAAY,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAA;AACtD,OAAO,EACL,KAAK,0BAA0B,EAC/B,aAAa,EACb,4BAA4B,EAC5B,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,wBAAwB,EACxB,uBAAuB,EACvB,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,UAAU,EACV,cAAc,EACd,aAAa,EACb,qCAAqC,EACrC,6BAA6B,GAC9B,MAAM,WAAW,CAAA;AAClB,OAAO,EACL,sBAAsB,EACtB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,6BAA6B,EAC7B,gBAAgB,EAChB,yBAAyB,EACzB,qBAAqB,GACtB,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,8BAA8B,EAAE,MAAM,kBAAkB,CAAA;AACjE,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/request-example/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,kBAAkB,EAClB,gBAAgB,EAChB,uBAAuB,EACvB,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,gCAAgC,EAChC,gCAAgC,EAChC,uBAAuB,EACvB,uBAAuB,EACvB,sBAAsB,EACtB,yBAAyB,EACzB,cAAc,EACd,6BAA6B,EAC7B,8BAA8B,EAC9B,0BAA0B,GAC3B,MAAM,WAAW,CAAA;AAClB,OAAO,EACL,oBAAoB,EACpB,2BAA2B,EAC3B,2BAA2B,EAC3B,KAAK,cAAc,EACnB,KAAK,sBAAsB,EAC3B,YAAY,EACZ,oBAAoB,EACpB,oBAAoB,EACpB,sBAAsB,EACtB,kBAAkB,EAClB,uBAAuB,EACvB,UAAU,EACV,kBAAkB,EAClB,oBAAoB,EACpB,cAAc,EACd,0BAA0B,EAC1B,kBAAkB,EAClB,eAAe,EACf,cAAc,EACd,2BAA2B,EAC3B,wBAAwB,EACxB,qBAAqB,EACrB,wBAAwB,EACxB,iCAAiC,EACjC,kBAAkB,EAClB,4BAA4B,EAC5B,2BAA2B,EAC3B,oBAAoB,EACpB,4BAA4B,GAC7B,MAAM,WAAW,CAAA;AAClB,YAAY,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAA;AACtD,OAAO,EACL,KAAK,0BAA0B,EAC/B,aAAa,EACb,4BAA4B,EAC5B,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,wBAAwB,EACxB,uBAAuB,EACvB,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,UAAU,EACV,cAAc,EACd,aAAa,EACb,qCAAqC,EACrC,6BAA6B,GAC9B,MAAM,WAAW,CAAA;AAClB,OAAO,EACL,sBAAsB,EACtB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,6BAA6B,EAC7B,gBAAgB,EAChB,yBAAyB,EACzB,qBAAqB,GACtB,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,8BAA8B,EAAE,MAAM,kBAAkB,CAAA;AACjE,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA"}
@@ -1,4 +1,4 @@
1
- export { BUILD_REQUEST_FAILED, INVALID_REQUEST_FACTORY_URL, MISSING_REQUEST_SERVER_BASE, buildRequest, buildRequestSecurity, deSerializeParameter, filterGlobalCookie, getEnvironmentVariables, getExample, getExampleFromBody, getExampleFromSchema, getResolvedUrl, getSelectedBodyContentType, getServerVariables, requestFactory, resolveExecutableRequestUrl, resolveRequestFactoryUrl, serializeContentValue, serializeDeepObjectStyle, serializeFormPropertyWithEncoding, serializeFormStyle, serializeFormStyleForCookies, serializePipeDelimitedStyle, serializeSimpleStyle, serializeSpaceDelimitedStyle, } from './builder/index.js';
1
+ export { BUILD_REQUEST_FAILED, INVALID_REQUEST_FACTORY_URL, MISSING_REQUEST_SERVER_BASE, buildRequest, buildRequestSecurity, deSerializeParameter, deSerializeSchemaValue, filterGlobalCookie, getEnvironmentVariables, getExample, getExampleFromBody, getExampleFromSchema, getResolvedUrl, getSelectedBodyContentType, getServerVariables, isParamDisabled, requestFactory, resolveExecutableRequestUrl, resolveRequestFactoryUrl, serializeContentValue, serializeDeepObjectStyle, serializeFormPropertyWithEncoding, serializeFormStyle, serializeFormStyleForCookies, serializePipeDelimitedStyle, serializeSimpleStyle, serializeSpaceDelimitedStyle, } from './builder/index.js';
2
2
  export { combineParams, filterDisabledDefaultHeaders, getActiveEnvironment, getActiveProxyUrl, getDefaultHeaders, getRequestExampleContext, getSecurityRequirements, getSecuritySchemes, getSelectedSecurity, getSelectedServer, getServers, isAuthOptional, mergeSecurity, restoreConventionalDefaultHeaderNames, restoreConventionalHeaderName, } from './context/index.js';
3
3
  export { CONTEXT_FUNCTION_NAMES, POPULAR_CONTEXT_FUNCTION_KEYS, contextFunctions, getContextFunctionComment, isContextFunctionName, } from './functions.js';
4
4
  export { createVariablesStoreForRequest } from './variable-store/index.js';
@@ -0,0 +1,25 @@
1
+ export declare const XScalarLinksSchema: import("@scalar/typebox").TObject<{
2
+ 'x-scalar-links': import("@scalar/typebox").TOptional<import("@scalar/typebox").TArray<import("@scalar/typebox").TObject<{
3
+ name: import("@scalar/typebox").TString;
4
+ url: import("@scalar/typebox").TString;
5
+ }>>>;
6
+ }>;
7
+ export type XScalarLinks = {
8
+ /**
9
+ * Additional named links to display alongside the API info, for example a privacy policy or an
10
+ * imprint. This is handy for the legal texts that some countries require on public websites.
11
+ */
12
+ 'x-scalar-links'?: {
13
+ /** The label to display for the link. */
14
+ name: string;
15
+ /** The URL the link points to. */
16
+ url: string;
17
+ }[];
18
+ };
19
+ export declare const XScalarLinks: import("@scalar/validation").ObjectSchema<{
20
+ 'x-scalar-links': import("@scalar/validation").OptionalSchema<import("@scalar/validation").ArraySchema<import("@scalar/validation").ObjectSchema<{
21
+ name: import("@scalar/validation").StringSchema;
22
+ url: import("@scalar/validation").StringSchema;
23
+ }>>>;
24
+ }>;
25
+ //# sourceMappingURL=x-scalar-links.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"x-scalar-links.d.ts","sourceRoot":"","sources":["../../../../src/schemas/extensions/document/x-scalar-links.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,kBAAkB;;;;;EAE7B,CAAA;AAaF,MAAM,MAAM,YAAY,GAAG;IACzB;;;OAGG;IACH,gBAAgB,CAAC,EAAE;QACjB,yCAAyC;QACzC,IAAI,EAAE,MAAM,CAAA;QACZ,kCAAkC;QAClC,GAAG,EAAE,MAAM,CAAA;KACZ,EAAE,CAAA;CACJ,CAAA;AAED,eAAO,MAAM,YAAY;;;;;EAYxB,CAAA"}
@@ -0,0 +1,24 @@
1
+ import { Type } from '@scalar/typebox';
2
+ import { array, object, optional, string } from '@scalar/validation';
3
+ const XScalarLinkItemSchema = Type.Object({
4
+ name: Type.String(),
5
+ url: Type.String(),
6
+ });
7
+ export const XScalarLinksSchema = Type.Object({
8
+ 'x-scalar-links': Type.Optional(Type.Array(XScalarLinkItemSchema)),
9
+ });
10
+ const XScalarLinkItem = object({
11
+ name: string(),
12
+ url: string(),
13
+ }, {
14
+ typeName: 'XScalarLinkItem',
15
+ typeComment: 'A named link to display alongside the API info',
16
+ });
17
+ export const XScalarLinks = object({
18
+ 'x-scalar-links': optional(array(XScalarLinkItem, {
19
+ typeComment: 'Additional named links to display alongside the API info (e.g. privacy policy, imprint)',
20
+ })),
21
+ }, {
22
+ typeName: 'XScalarLinks',
23
+ typeComment: 'Additional named links to display alongside the API info',
24
+ });
@@ -6,6 +6,7 @@ export declare const extensions: {
6
6
  readonly colorMode: "x-scalar-color-mode";
7
7
  readonly sidebarWidth: "x-scalar-sidebar-width";
8
8
  readonly defaultClient: "x-scalar-default-client";
9
+ readonly defaultExample: "x-scalar-default-example";
9
10
  readonly activeDocument: "x-scalar-active-document";
10
11
  readonly theme: "x-scalar-theme";
11
12
  };
@@ -1 +1 @@
1
- {"version":3,"file":"extensions.d.ts","sourceRoot":"","sources":["../../src/schemas/extensions.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;;;;;;;;CAWb,CAAA"}
1
+ {"version":3,"file":"extensions.d.ts","sourceRoot":"","sources":["../../src/schemas/extensions.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;;;;;;;;;CAYb,CAAA"}
@@ -6,6 +6,7 @@ export const extensions = {
6
6
  colorMode: 'x-scalar-color-mode',
7
7
  sidebarWidth: 'x-scalar-sidebar-width',
8
8
  defaultClient: 'x-scalar-default-client',
9
+ defaultExample: 'x-scalar-default-example',
9
10
  activeDocument: 'x-scalar-active-document',
10
11
  theme: 'x-scalar-theme',
11
12
  },
@@ -1277,6 +1277,11 @@ export declare const ReferenceConfigSchema: import("@scalar/typebox").TObject<{
1277
1277
  description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
1278
1278
  source: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
1279
1279
  }>>>;
1280
+ }>, import("@scalar/typebox").TObject<{
1281
+ 'x-scalar-links': import("@scalar/typebox").TOptional<TArray<import("@scalar/typebox").TObject<{
1282
+ name: import("@scalar/typebox").TString;
1283
+ url: import("@scalar/typebox").TString;
1284
+ }>>>;
1280
1285
  }>]>;
1281
1286
  ContactObject: import("@scalar/typebox").TObject<{
1282
1287
  name: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/schemas/reference-config/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,QAAQ,EAAQ,MAAM,iBAAiB,CAAA;AAClE,OAAO,EAA2C,KAAK,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AACvG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAE7C,OAAO,EAAE,KAAK,UAAU,EAAuC,MAAM,cAAc,CAAA;AACnF,OAAO,EAAE,KAAK,QAAQ,EAAmC,MAAM,YAAY,CAAA;AAC3E,OAAO,EAAE,KAAK,IAAI,EAA2B,MAAM,QAAQ,CAAA;AAC3D,OAAO,EAAE,KAAK,OAAO,EAAiC,MAAM,WAAW,CAAA;AACvE,OAAO,EAAE,KAAK,QAAQ,EAAmC,MAAM,YAAY,CAAA;AAE3E;;;;GAIG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqBjC,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,QAAQ,CAAA;IACnB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,UAAU,CAAC,EAAE,UAAU,CAAA;IACvB,QAAQ,CAAC,EAAE,QAAQ,CAAA;IACnB,IAAI,CAAC,EAAE,IAAI,CAAA;IACX,WAAW,CAAC,EAAE,gBAAgB,CAAA;CAC/B,CAAA;AAED,eAAO,MAAM,sBAAsB,EAAE,YAAY,CAAC,eAAe,CAgChE,CAAA"}
@@ -1263,6 +1263,11 @@ export declare const SettingsSchema: import("@scalar/typebox").TObject<{
1263
1263
  description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
1264
1264
  source: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
1265
1265
  }>>>;
1266
+ }>, import("@scalar/typebox").TObject<{
1267
+ 'x-scalar-links': import("@scalar/typebox").TOptional<import("@scalar/typebox").TArray<import("@scalar/typebox").TObject<{
1268
+ name: import("@scalar/typebox").TString;
1269
+ url: import("@scalar/typebox").TString;
1270
+ }>>>;
1266
1271
  }>]>;
1267
1272
  ContactObject: import("@scalar/typebox").TObject<{
1268
1273
  name: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>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;;;;;;;;;;;;;;;;;;;;;;;;;EAW1B,CAAA;AAED,MAAM,MAAM,QAAQ,GAAG;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,YAAY,EAAE,CAAA;IACxB,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,YAAY,CAAC,QAAQ,CAKlD,CAAA"}
@@ -23,6 +23,11 @@ export declare const generateSchema: (maybeRef: (inner: Schema) => Schema) => im
23
23
  description: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
24
24
  source: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
25
25
  }>>>;
26
+ }>, import("@scalar/validation").ObjectSchema<{
27
+ 'x-scalar-links': import("@scalar/validation").OptionalSchema<import("@scalar/validation").ArraySchema<import("@scalar/validation").ObjectSchema<{
28
+ name: import("@scalar/validation").StringSchema;
29
+ url: import("@scalar/validation").StringSchema;
30
+ }>>>;
26
31
  }>]>;
27
32
  jsonSchemaDialect: import("@scalar/validation").OptionalSchema<import("@scalar/validation").StringSchema>;
28
33
  servers: import("@scalar/validation").OptionalSchema<import("@scalar/validation").ArraySchema<import("@scalar/validation").ObjectSchema<{
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/schemas/v3.1/openapi/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,MAAM,EAaZ,MAAM,oBAAoB,CAAA;AA4C3B,eAAO,MAAM,cAAc,GAAI,UAAU,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA0jCjE,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/schemas/v3.1/openapi/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,MAAM,EAaZ,MAAM,oBAAoB,CAAA;AA6C3B,eAAO,MAAM,cAAc,GAAI,UAAU,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAukCjE,CAAA"}
@@ -5,6 +5,7 @@ import { XScalarEnvironments } from '../../../schemas/extensions/document/x-scal
5
5
  import { XScalarIcon } from '../../../schemas/extensions/document/x-scalar-icon.js';
6
6
  import { XScalarIgnore } from '../../../schemas/extensions/document/x-scalar-ignore.js';
7
7
  import { XScalarIsDirty } from '../../../schemas/extensions/document/x-scalar-is-dirty.js';
8
+ import { XScalarLinks } from '../../../schemas/extensions/document/x-scalar-links.js';
8
9
  import { XScalarOriginalDocumentHash } from '../../../schemas/extensions/document/x-scalar-original-document-hash.js';
9
10
  import { XScalarOriginalSourceUrl } from '../../../schemas/extensions/document/x-scalar-original-source-url.js';
10
11
  import { XScalarRegistryMeta } from '../../../schemas/extensions/document/x-scalar-registry-meta.js';
@@ -72,6 +73,7 @@ export const generateSchema = (maybeRef) => {
72
73
  license: optional(license),
73
74
  }, { typeName: 'InfoObject' }),
74
75
  XScalarSdkInstallation,
76
+ XScalarLinks,
75
77
  ]);
76
78
  const serverVariable = object({
77
79
  enum: optional(array(string(), {
@@ -156,6 +158,14 @@ export const generateSchema = (maybeRef) => {
156
158
  ];
157
159
  const coreSchemaProperties = object({
158
160
  name: optional(string({ typeComment: 'Schema name (extension).' })),
161
+ // JSON Schema 2020-12 core reference keywords. OpenAPI 3.1 Schema Objects may carry these for
162
+ // generic and recursive patterns such as `PaginatedResponse<T>`; keep them typed so coercion
163
+ // does not drop them. Resolution of `$dynamicRef` against the active `$dynamicAnchor` happens
164
+ // separately, see https://github.com/scalar/scalar/issues/9414.
165
+ $id: optional(string({ typeComment: 'JSON Schema 2020-12 schema identifier.' })),
166
+ $anchor: optional(string({ typeComment: 'JSON Schema 2020-12 plain-name anchor.' })),
167
+ $dynamicAnchor: optional(string({ typeComment: 'JSON Schema 2020-12 dynamic anchor; the target a matching `$dynamicRef` resolves to.' })),
168
+ $dynamicRef: optional(string({ typeComment: 'JSON Schema 2020-12 dynamic reference, resolved against the active `$dynamicAnchor`.' })),
159
169
  title: optional(string({ typeComment: 'A title for the schema.' })),
160
170
  description: optional(string({ typeComment: 'A description of the schema.' })),
161
171
  default: optional(any({ typeComment: 'Default value for the schema.' })),
@@ -1,3 +1,4 @@
1
+ import { type XScalarLinks } from '../../../schemas/extensions/document/x-scalar-links.js';
1
2
  import { type XScalarSdkInstallation } from '../../../schemas/extensions/document/x-scalar-sdk-installation.js';
2
3
  import type { ContactObject } from './contact.js';
3
4
  import type { LicenseObject } from './license.js';
@@ -25,6 +26,11 @@ export declare const InfoObjectSchemaDefinition: import("@scalar/typebox").TInte
25
26
  description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
26
27
  source: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
27
28
  }>>>;
29
+ }>, import("@scalar/typebox").TObject<{
30
+ 'x-scalar-links': import("@scalar/typebox").TOptional<import("@scalar/typebox").TArray<import("@scalar/typebox").TObject<{
31
+ name: import("@scalar/typebox").TString;
32
+ url: import("@scalar/typebox").TString;
33
+ }>>>;
28
34
  }>]>;
29
35
  /**
30
36
  * The object provides metadata about the API. The metadata MAY be used by the clients if needed, and MAY be presented in editing or documentation generation tools for convenience.
@@ -44,5 +50,5 @@ export type InfoObject = {
44
50
  contact?: ContactObject;
45
51
  /** The license information for the exposed API. */
46
52
  license?: LicenseObject;
47
- } & XScalarSdkInstallation;
53
+ } & XScalarSdkInstallation & XScalarLinks;
48
54
  //# sourceMappingURL=info.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"info.d.ts","sourceRoot":"","sources":["../../../../src/schemas/v3.1/strict/info.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,sBAAsB,EAE5B,MAAM,yDAAyD,CAAA;AAEhE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AAC9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AAG9C;;GAEG;AACH,eAAO,MAAM,0BAA0B;IAEnC,sCAAsC;;IAEtC,oMAAoM;;IAEpM,kCAAkC;;IAElC,4FAA4F;;IAE5F,qFAAqF;;IAErF,mDAAmD;;IAEnD,mDAAmD;;;;;;;;IAItD,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,sCAAsC;IACtC,KAAK,EAAE,MAAM,CAAA;IACb,oMAAoM;IACpM,OAAO,EAAE,MAAM,CAAA;IACf,kCAAkC;IAClC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,4FAA4F;IAC5F,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,qFAAqF;IACrF,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,mDAAmD;IACnD,OAAO,CAAC,EAAE,aAAa,CAAA;IACvB,mDAAmD;IACnD,OAAO,CAAC,EAAE,aAAa,CAAA;CACxB,GAAG,sBAAsB,CAAA"}
1
+ {"version":3,"file":"info.d.ts","sourceRoot":"","sources":["../../../../src/schemas/v3.1/strict/info.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,YAAY,EAAsB,MAAM,8CAA8C,CAAA;AACpG,OAAO,EACL,KAAK,sBAAsB,EAE5B,MAAM,yDAAyD,CAAA;AAEhE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AAC9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AAG9C;;GAEG;AACH,eAAO,MAAM,0BAA0B;IAEnC,sCAAsC;;IAEtC,oMAAoM;;IAEpM,kCAAkC;;IAElC,4FAA4F;;IAE5F,qFAAqF;;IAErF,mDAAmD;;IAEnD,mDAAmD;;;;;;;;;;;;;IAKtD,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,sCAAsC;IACtC,KAAK,EAAE,MAAM,CAAA;IACb,oMAAoM;IACpM,OAAO,EAAE,MAAM,CAAA;IACf,kCAAkC;IAClC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,4FAA4F;IAC5F,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,qFAAqF;IACrF,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,mDAAmD;IACnD,OAAO,CAAC,EAAE,aAAa,CAAA;IACvB,mDAAmD;IACnD,OAAO,CAAC,EAAE,aAAa,CAAA;CACxB,GAAG,sBAAsB,GACxB,YAAY,CAAA"}
@@ -1,5 +1,6 @@
1
1
  import { Type } from '@scalar/typebox';
2
2
  import { compose } from '../../../schemas/compose.js';
3
+ import { XScalarLinksSchema } from '../../../schemas/extensions/document/x-scalar-links.js';
3
4
  import { XScalarSdkInstallationSchema, } from '../../../schemas/extensions/document/x-scalar-sdk-installation.js';
4
5
  import { ContactObjectRef, LicenseObjectRef } from './ref-definitions.js';
5
6
  /**
@@ -20,4 +21,4 @@ export const InfoObjectSchemaDefinition = compose(Type.Object({
20
21
  contact: Type.Optional(ContactObjectRef),
21
22
  /** The license information for the exposed API. */
22
23
  license: Type.Optional(LicenseObjectRef),
23
- }), XScalarSdkInstallationSchema);
24
+ }), XScalarSdkInstallationSchema, XScalarLinksSchema);