@scalar/workspace-store 0.55.5 → 0.56.0

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 (44) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/README.md +2 -3
  3. package/dist/entities/auth/index.d.ts +1 -1
  4. package/dist/entities/auth/index.d.ts.map +1 -1
  5. package/dist/entities/auth/schema.d.ts +114 -4
  6. package/dist/entities/auth/schema.d.ts.map +1 -1
  7. package/dist/entities/auth/schema.js +29 -1
  8. package/dist/events/definitions/auth.d.ts +15 -2
  9. package/dist/events/definitions/auth.d.ts.map +1 -1
  10. package/dist/mutators/auth.d.ts +1 -1
  11. package/dist/mutators/auth.d.ts.map +1 -1
  12. package/dist/mutators/auth.js +19 -2
  13. package/dist/request-example/builder/body/build-request-body.d.ts.map +1 -1
  14. package/dist/request-example/builder/body/build-request-body.js +1 -99
  15. package/dist/request-example/builder/body/schema-value-coercion.d.ts +34 -0
  16. package/dist/request-example/builder/body/schema-value-coercion.d.ts.map +1 -0
  17. package/dist/request-example/builder/body/schema-value-coercion.js +120 -0
  18. package/dist/request-example/builder/helpers/get-example-from-schema.d.ts.map +1 -1
  19. package/dist/request-example/builder/helpers/get-example-from-schema.js +26 -5
  20. package/dist/request-example/builder/index.d.ts +3 -1
  21. package/dist/request-example/builder/index.d.ts.map +1 -1
  22. package/dist/request-example/builder/index.js +2 -0
  23. package/dist/request-example/builder/security/broker-scheme-types.d.ts +16 -0
  24. package/dist/request-example/builder/security/broker-scheme-types.d.ts.map +1 -0
  25. package/dist/request-example/builder/security/broker-scheme-types.js +12 -0
  26. package/dist/request-example/builder/security/secret-types.d.ts +19 -2
  27. package/dist/request-example/builder/security/secret-types.d.ts.map +1 -1
  28. package/dist/request-example/context/security/extract-security-scheme-secrets.d.ts.map +1 -1
  29. package/dist/request-example/context/security/extract-security-scheme-secrets.js +61 -4
  30. package/dist/request-example/index.d.ts +2 -2
  31. package/dist/request-example/index.d.ts.map +1 -1
  32. package/dist/request-example/index.js +1 -1
  33. package/dist/schemas/extensions/security/index.d.ts +1 -1
  34. package/dist/schemas/extensions/security/index.d.ts.map +1 -1
  35. package/dist/schemas/extensions/security/x-scalar-security-secrets.d.ts +48 -0
  36. package/dist/schemas/extensions/security/x-scalar-security-secrets.d.ts.map +1 -1
  37. package/dist/schemas/extensions/security/x-scalar-security-secrets.js +24 -0
  38. package/dist/schemas/reference-config/index.d.ts +1 -1
  39. package/dist/schemas/v3.1/openapi/index.d.ts +19 -1
  40. package/dist/schemas/v3.1/openapi/index.d.ts.map +1 -1
  41. package/dist/schemas/v3.1/openapi/index.js +115 -104
  42. package/dist/schemas/workspace-specification/index.d.ts +1 -1
  43. package/dist/schemas/workspace.d.ts +1 -1
  44. package/package.json +9 -9
package/CHANGELOG.md CHANGED
@@ -1,5 +1,36 @@
1
1
  # @scalar/workspace-store
2
2
 
3
+ ## 0.56.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#9726](https://github.com/scalar/scalar/pull/9726): feat: add a switchable form view for JSON and YAML request bodies
8
+
9
+ When a request body's content type is JSON or YAML and its schema (or the current example) describes an object, a "Form / Raw" toggle now appears next to the content type selector. The form view renders one row per schema property — with enum dropdowns, required badges, defaults, and per-field validation, matching the existing `multipart/form-data` editor — and folds edits back into a nested object using the schema's declared types (numbers, booleans, arrays, and nested objects survive the round-trip instead of becoming strings). The raw code editor remains the default and is unaffected for non-object bodies or unparseable text.
10
+
11
+ `@scalar/workspace-store` gains reusable exports for this: `buildDottedNestedRowPredicate`, `coerceLeafValueToSchemaType`, `coerceUntypedValue`, and `resolveLeafSchema` from `@scalar/workspace-store/request-example`, factored out of the existing multipart request-body builder.
12
+
13
+ ### Patch Changes
14
+
15
+ - [#9732](https://github.com/scalar/scalar/pull/9732): Render every `oneOf`/`anyOf` group of an `allOf` in place. Previously, when one object composed several mutually-exclusive choices as sibling `oneOf`/`anyOf` under `allOf`, only the first group was shown and the rest were silently dropped. Each choice group now renders its own selector in the position it was declared, and the generated request example stays in sync per group.
16
+ - [#9767](https://github.com/scalar/scalar/pull/9767): fix: honor document level `x-scalar-secret-*` extensions on apiKey and http security schemes
17
+
18
+ OAuth flows already read their secrets from the OpenAPI document, but the apiKey and http branches only looked at the auth store and at the config input fields (`value`, `token`, `username`, `password`). A token declared as `x-scalar-secret-token` directly on the security scheme was therefore ignored, and the request kept rendering the `YOUR_SECRET_TOKEN` placeholder. Both branches now follow the same precedence as the OAuth flows: auth store, then the document extension, then the config field.
19
+
20
+ - [#9697](https://github.com/scalar/scalar/pull/9697): Add credential input UIs for the AsyncAPI broker-specific security scheme types, which previously showed a "not supported yet" message in the Authentication selector. The SASL-style schemes (`userPassword`, `plain`, `scramSha256`, `scramSha512`) get a username + password form like HTTP basic, `X509` gets client certificate + private key (PEM) inputs, `symmetricEncryption`/`asymmetricEncryption` get a single key input, and `gssapi` gets a service name input. The entered credentials are persisted in the auth store with new type-specific secret shapes (`x-scalar-secret-client-certificate`, `x-scalar-secret-private-key`, `x-scalar-secret-service-name`, plus the existing username/password/token extensions) and round-trip through the merged scheme objects the same way as the OpenAPI types. The Galaxy AsyncAPI sample document now defines one scheme of each broker group so the inputs can be exercised.
21
+ - [#9594](https://github.com/scalar/scalar/pull/9594): Fix OAuth2 scope checkboxes losing selections on quick clicks. Each scope is now toggled against the stored selection instead of a list computed in the component, so the "Scopes Selected" counter and the scopes sent to the token endpoint stay in sync with the checkboxes.
22
+ - [#9802](https://github.com/scalar/scalar/pull/9802): Let callers supply their own Schema Object schema to `generateSchema`
23
+
24
+ The Schema Object subtree is now built by an exported `generateSchemaObject`, and `generateSchema` accepts a Schema Object through a `schemaObject` option. Passing nothing keeps the previous behavior exactly — the generated OpenAPI types are unchanged.
25
+
26
+ This gives consumers a way to change how schemas are represented without the workspace store carrying a flag for each variation. One case it enables: every branch of the default Schema Object union keys off `type`, so a schema without one — `{}`, or one carrying only annotations — is not a member of the type even though OpenAPI 3.1 allows it and reads it as "any JSON value". Coercion cannot report that, so it substitutes the internal `__scalar_` marker, and `false` under `additionalProperties`, which inverts "any additional property is allowed" into "none are". A caller that needs those schemas preserved can now supply a Schema Object that represents them.
27
+
28
+ ## 0.55.6
29
+
30
+ ### Patch Changes
31
+
32
+ - [#9719](https://github.com/scalar/scalar/pull/9719): docs: update the Scalar platform overview block in the README
33
+
3
34
  ## 0.55.5
4
35
 
5
36
  ## 0.55.4
package/README.md CHANGED
@@ -7,9 +7,8 @@ A powerful data store for managing OpenAPI documents. This package provides a fl
7
7
  Scalar is an open-source API platform for teams who want beautiful developer interfaces without vendor lock-in.
8
8
 
9
9
  - **[API References](https://scalar.com/products/api-references/getting-started)** — Interactive API documentation from OpenAPI and AsyncAPI specs.
10
- - **[Docs](https://scalar.com/products/docs/getting-started)** — Write in Markdown/MDX, generate API references, sync with two-way Git.
11
- - **[SDKs](https://scalar.com/products/sdks/getting-started)** — Type-safe client libraries in TypeScript, Python, Go, PHP, Java, and Ruby.
12
- - **[MCP Servers](https://scalar.com/products/agent/getting-started)** — Generate secure MCP servers from your API spec.
10
+ - **[Developer Docs](https://scalar.com/products/docs/getting-started)** — Write in Markdown/MDX, generate API references, sync with two-way Git.
11
+ - **[SDK Generator](https://scalar.com/products/sdk-generator/getting-started)** — Type-safe SDKs and CLIs in TypeScript, Python, Go, PHP, Java, and Ruby.
13
12
  - **[API Client](https://scalar.com/products/api-client/getting-started)** — Open-source, offline-first Postman alternative built on OpenAPI.
14
13
 
15
14
  20M+ monthly npm installs · 15,500+ GitHub stars · MIT licensed · [scalar.com](https://scalar.com)
@@ -1,6 +1,6 @@
1
1
  import type { PartialDeep } from 'type-fest';
2
2
  import { type DocumentAuth, type SecretsAuthUnion, type SelectedSecurity } from '../../entities/auth/schema.js';
3
- export type { Auth, SecretsApiKey, SecretsAuth, SecretsAuthUnion, SecretsHttp, SecretsOAuth, SecretsOAuthFlows, SecretsOpenIdConnect, SelectedSecurity, } from './schema.js';
3
+ export type { Auth, SecretsApiKey, SecretsAuth, SecretsAuthUnion, SecretsEncryption, SecretsGssapi, SecretsHttp, SecretsOAuth, SecretsOAuthFlows, SecretsOpenIdConnect, SecretsSasl, SecretsX509, SelectedSecurity, } from './schema.js';
4
4
  export { AuthSchema, OpenIDConnectSchema, SecretsAuthSchema, } from './schema.js';
5
5
  /**
6
6
  * Interface for the AuthStore used to manage authentication secrets and selection state.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/entities/auth/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAG5C,OAAO,EACL,KAAK,YAAY,EAEjB,KAAK,gBAAgB,EAErB,KAAK,gBAAgB,EACtB,MAAM,wBAAwB,CAAA;AAK/B,YAAY,EACV,IAAI,EACJ,aAAa,EACb,WAAW,EACX,gBAAgB,EAChB,WAAW,EACX,YAAY,EACZ,iBAAiB,EACjB,oBAAoB,EACpB,gBAAgB,GACjB,MAAM,UAAU,CAAA;AACjB,OAAO,EACL,UAAU,EACV,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,UAAU,CAAA;AAEjB;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG;IACtB;;;;;OAKG;IACH,cAAc,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,gBAAgB,GAAG,SAAS,CAAA;IAE1F;;;;OAIG;IACH,sBAAsB,EAAE,CACtB,OAAO,EACH;QAAE,IAAI,EAAE,UAAU,CAAC;QAAC,YAAY,EAAE,MAAM,CAAA;KAAE,GAC1C;QAAE,IAAI,EAAE,WAAW,CAAC;QAAC,YAAY,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,KAC1E,gBAAgB,GAAG,SAAS,CAAA;IAEjC;;;;OAIG;IACH,sBAAsB,EAAE,CACtB,OAAO,EACH;QAAE,IAAI,EAAE,UAAU,CAAC;QAAC,YAAY,EAAE,M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QAAC,YAAY,EAAE,MAAM,CAAA;KAAE,GAC1C;QAAE,IAAI,EAAE,WAAW,CAAC;QAAC,YAAY,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,KAC1E,IAAI,CAAA;IACT;;;;;OAKG;IACH,cAAc,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAA;IAEvG;;;;OAIG;IACH,gBAAgB,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,IAAI,CAAA;IAEpE;;;OAGG;IACH,iBAAiB,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAA;IAEjD;;;OAGG;IACH,IAAI,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,IAAI,CAAA;IAElC;;;OAGG;IACH,MAAM,EAAE,MAAM,YAAY,CAAA;CAC3B,CAAA;AAED,KAAK,sBAAsB,GAAG;IAC5B,KAAK,CAAC,EAAE;QACN,YAAY,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAA;KAC9C,CAAA;CACF,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,eAAe,GAAI,YAAW,sBAA2B,KAAG,SA0GxE,CAAA"}
@@ -237,6 +237,40 @@ export declare const OpenIDConnectSchema: import("@scalar/typebox").TObject<{
237
237
  }>]>>;
238
238
  }>;
239
239
  export type SecretsOpenIdConnect = Static<typeof OpenIDConnectSchema>;
240
+ /**
241
+ * AsyncAPI SASL-style broker schemes: all of them authenticate with a username + password pair,
242
+ * so they share one secrets shape and are matched to the scheme by the stored `type`.
243
+ */
244
+ declare const SecretsSaslSchema: import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
245
+ type: import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"userPassword">, import("@scalar/typebox").TLiteral<"plain">, import("@scalar/typebox").TLiteral<"scramSha256">, import("@scalar/typebox").TLiteral<"scramSha512">]>;
246
+ }>, import("@scalar/typebox").TObject<{
247
+ 'x-scalar-secret-username': import("@scalar/typebox").TString;
248
+ 'x-scalar-secret-password': import("@scalar/typebox").TString;
249
+ }>]>;
250
+ export type SecretsSasl = Static<typeof SecretsSaslSchema>;
251
+ /** AsyncAPI X509 broker scheme: a client certificate + private key pair (PEM). */
252
+ declare const SecretsX509Schema: import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
253
+ type: import("@scalar/typebox").TLiteral<"X509">;
254
+ }>, import("@scalar/typebox").TObject<{
255
+ 'x-scalar-secret-client-certificate': import("@scalar/typebox").TString;
256
+ }>, import("@scalar/typebox").TObject<{
257
+ 'x-scalar-secret-private-key': import("@scalar/typebox").TString;
258
+ }>]>;
259
+ export type SecretsX509 = Static<typeof SecretsX509Schema>;
260
+ /** AsyncAPI encryption broker schemes: a single key value, stored in the shared token slot. */
261
+ declare const SecretsEncryptionSchema: import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
262
+ type: import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"symmetricEncryption">, import("@scalar/typebox").TLiteral<"asymmetricEncryption">]>;
263
+ }>, import("@scalar/typebox").TObject<{
264
+ 'x-scalar-secret-token': import("@scalar/typebox").TString;
265
+ }>]>;
266
+ export type SecretsEncryption = Static<typeof SecretsEncryptionSchema>;
267
+ /** AsyncAPI GSSAPI (Kerberos) broker scheme: the service name the client authenticates against. */
268
+ declare const SecretsGssapiSchema: import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
269
+ type: import("@scalar/typebox").TLiteral<"gssapi">;
270
+ }>, import("@scalar/typebox").TObject<{
271
+ 'x-scalar-secret-service-name': import("@scalar/typebox").TString;
272
+ }>]>;
273
+ export type SecretsGssapi = Static<typeof SecretsGssapiSchema>;
240
274
  export declare const SecretsAuthUnionSchema: import("@scalar/typebox").TUnion<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
241
275
  type: import("@scalar/typebox").TLiteral<"apiKey">;
242
276
  }>, import("@scalar/typebox").TObject<{
@@ -416,7 +450,26 @@ export declare const SecretsAuthUnionSchema: import("@scalar/typebox").TUnion<[i
416
450
  }>, import("@scalar/typebox").TObject<{
417
451
  'x-scalar-credentials-location': import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"header">, import("@scalar/typebox").TLiteral<"body">]>>;
418
452
  }>]>>;
419
- }>]>;
453
+ }>, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
454
+ type: import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"userPassword">, import("@scalar/typebox").TLiteral<"plain">, import("@scalar/typebox").TLiteral<"scramSha256">, import("@scalar/typebox").TLiteral<"scramSha512">]>;
455
+ }>, import("@scalar/typebox").TObject<{
456
+ 'x-scalar-secret-username': import("@scalar/typebox").TString;
457
+ 'x-scalar-secret-password': import("@scalar/typebox").TString;
458
+ }>]>, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
459
+ type: import("@scalar/typebox").TLiteral<"X509">;
460
+ }>, import("@scalar/typebox").TObject<{
461
+ 'x-scalar-secret-client-certificate': import("@scalar/typebox").TString;
462
+ }>, import("@scalar/typebox").TObject<{
463
+ 'x-scalar-secret-private-key': import("@scalar/typebox").TString;
464
+ }>]>, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
465
+ type: import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"symmetricEncryption">, import("@scalar/typebox").TLiteral<"asymmetricEncryption">]>;
466
+ }>, import("@scalar/typebox").TObject<{
467
+ 'x-scalar-secret-token': import("@scalar/typebox").TString;
468
+ }>]>, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
469
+ type: import("@scalar/typebox").TLiteral<"gssapi">;
470
+ }>, import("@scalar/typebox").TObject<{
471
+ 'x-scalar-secret-service-name': import("@scalar/typebox").TString;
472
+ }>]>]>;
420
473
  export type SecretsAuthUnion = Static<typeof SecretsAuthUnionSchema>;
421
474
  export declare const SecretsAuthSchema: import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TUnion<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
422
475
  type: import("@scalar/typebox").TLiteral<"apiKey">;
@@ -597,7 +650,26 @@ export declare const SecretsAuthSchema: import("@scalar/typebox").TRecord<import
597
650
  }>, import("@scalar/typebox").TObject<{
598
651
  'x-scalar-credentials-location': import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"header">, import("@scalar/typebox").TLiteral<"body">]>>;
599
652
  }>]>>;
600
- }>]>>;
653
+ }>, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
654
+ type: import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"userPassword">, import("@scalar/typebox").TLiteral<"plain">, import("@scalar/typebox").TLiteral<"scramSha256">, import("@scalar/typebox").TLiteral<"scramSha512">]>;
655
+ }>, import("@scalar/typebox").TObject<{
656
+ 'x-scalar-secret-username': import("@scalar/typebox").TString;
657
+ 'x-scalar-secret-password': import("@scalar/typebox").TString;
658
+ }>]>, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
659
+ type: import("@scalar/typebox").TLiteral<"X509">;
660
+ }>, import("@scalar/typebox").TObject<{
661
+ 'x-scalar-secret-client-certificate': import("@scalar/typebox").TString;
662
+ }>, import("@scalar/typebox").TObject<{
663
+ 'x-scalar-secret-private-key': import("@scalar/typebox").TString;
664
+ }>]>, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
665
+ type: import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"symmetricEncryption">, import("@scalar/typebox").TLiteral<"asymmetricEncryption">]>;
666
+ }>, import("@scalar/typebox").TObject<{
667
+ 'x-scalar-secret-token': import("@scalar/typebox").TString;
668
+ }>]>, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
669
+ type: import("@scalar/typebox").TLiteral<"gssapi">;
670
+ }>, import("@scalar/typebox").TObject<{
671
+ 'x-scalar-secret-service-name': import("@scalar/typebox").TString;
672
+ }>]>]>>;
601
673
  export type SecretsAuth = Static<typeof SecretsAuthSchema>;
602
674
  declare const SelectedSecuritySchema: import("@scalar/typebox").TObject<{
603
675
  selectedIndex: import("@scalar/typebox").TNumber;
@@ -2544,7 +2616,26 @@ export declare const AuthSchema: import("@scalar/typebox").TObject<{
2544
2616
  }>, import("@scalar/typebox").TObject<{
2545
2617
  'x-scalar-credentials-location': import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"header">, import("@scalar/typebox").TLiteral<"body">]>>;
2546
2618
  }>]>>;
2547
- }>]>>;
2619
+ }>, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
2620
+ type: import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"userPassword">, import("@scalar/typebox").TLiteral<"plain">, import("@scalar/typebox").TLiteral<"scramSha256">, import("@scalar/typebox").TLiteral<"scramSha512">]>;
2621
+ }>, import("@scalar/typebox").TObject<{
2622
+ 'x-scalar-secret-username': import("@scalar/typebox").TString;
2623
+ 'x-scalar-secret-password': import("@scalar/typebox").TString;
2624
+ }>]>, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
2625
+ type: import("@scalar/typebox").TLiteral<"X509">;
2626
+ }>, import("@scalar/typebox").TObject<{
2627
+ 'x-scalar-secret-client-certificate': import("@scalar/typebox").TString;
2628
+ }>, import("@scalar/typebox").TObject<{
2629
+ 'x-scalar-secret-private-key': import("@scalar/typebox").TString;
2630
+ }>]>, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
2631
+ type: import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"symmetricEncryption">, import("@scalar/typebox").TLiteral<"asymmetricEncryption">]>;
2632
+ }>, import("@scalar/typebox").TObject<{
2633
+ 'x-scalar-secret-token': import("@scalar/typebox").TString;
2634
+ }>]>, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
2635
+ type: import("@scalar/typebox").TLiteral<"gssapi">;
2636
+ }>, import("@scalar/typebox").TObject<{
2637
+ 'x-scalar-secret-service-name': import("@scalar/typebox").TString;
2638
+ }>]>]>>;
2548
2639
  selected: import("@scalar/typebox").TObject<{
2549
2640
  document: import("@scalar/typebox").TOptional<import("@scalar/typebox").TObject<{
2550
2641
  selectedIndex: import("@scalar/typebox").TNumber;
@@ -6257,7 +6348,26 @@ export declare const DocumentAuthSchema: import("@scalar/typebox").TRecord<impor
6257
6348
  }>, import("@scalar/typebox").TObject<{
6258
6349
  'x-scalar-credentials-location': import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"header">, import("@scalar/typebox").TLiteral<"body">]>>;
6259
6350
  }>]>>;
6260
- }>]>>;
6351
+ }>, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
6352
+ type: import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"userPassword">, import("@scalar/typebox").TLiteral<"plain">, import("@scalar/typebox").TLiteral<"scramSha256">, import("@scalar/typebox").TLiteral<"scramSha512">]>;
6353
+ }>, import("@scalar/typebox").TObject<{
6354
+ 'x-scalar-secret-username': import("@scalar/typebox").TString;
6355
+ 'x-scalar-secret-password': import("@scalar/typebox").TString;
6356
+ }>]>, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
6357
+ type: import("@scalar/typebox").TLiteral<"X509">;
6358
+ }>, import("@scalar/typebox").TObject<{
6359
+ 'x-scalar-secret-client-certificate': import("@scalar/typebox").TString;
6360
+ }>, import("@scalar/typebox").TObject<{
6361
+ 'x-scalar-secret-private-key': import("@scalar/typebox").TString;
6362
+ }>]>, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
6363
+ type: import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"symmetricEncryption">, import("@scalar/typebox").TLiteral<"asymmetricEncryption">]>;
6364
+ }>, import("@scalar/typebox").TObject<{
6365
+ 'x-scalar-secret-token': import("@scalar/typebox").TString;
6366
+ }>]>, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
6367
+ type: import("@scalar/typebox").TLiteral<"gssapi">;
6368
+ }>, import("@scalar/typebox").TObject<{
6369
+ 'x-scalar-secret-service-name': import("@scalar/typebox").TString;
6370
+ }>]>]>>;
6261
6371
  selected: import("@scalar/typebox").TObject<{
6262
6372
  document: import("@scalar/typebox").TOptional<import("@scalar/typebox").TObject<{
6263
6373
  selectedIndex: import("@scalar/typebox").TNumber;
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/entities/auth/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAQ,MAAM,iBAAiB,CAAA;AAoBnD,QAAA,MAAM,mBAAmB;;;;IAKxB,CAAA;AAED,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAE9D,QAAA,MAAM,iBAAiB;;;;;;;IAMtB,CAAA;AAED,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAQ1D,QAAA,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqB3B,CAAA;AAEF,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,OAAO,uBAAuB,CAAC,CAAA;AAEtE,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAKhB,CAAA;AAED,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,OAAO,WAAW,CAAC,CAAA;AAErD,8FAA8F;AAC9F,eAAO,MAAM,mBAAmB;;;;;;;;;;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ar/typebox';
2
2
  import { compose } from '../../schemas/compose.js';
3
3
  import { XScalarCredentialsLocationSchema } from '../../schemas/extensions/security/x-scalar-credentials-location.js';
4
- import { XScalarSecretClientIdSchema, XScalarSecretClientSecretSchema, XScalarSecretHTTPSchema, XScalarSecretRefreshTokenSchema, XScalarSecretRedirectUriSchema, XScalarSecretTokenSchema, } from '../../schemas/extensions/security/x-scalar-security-secrets.js';
4
+ import { XScalarSecretClientCertificateSchema, XScalarSecretClientIdSchema, XScalarSecretClientSecretSchema, XScalarSecretHTTPSchema, XScalarSecretPrivateKeySchema, XScalarSecretRedirectUriSchema, XScalarSecretRefreshTokenSchema, XScalarSecretServiceNameSchema, XScalarSecretTokenSchema, } from '../../schemas/extensions/security/x-scalar-security-secrets.js';
5
5
  import { OAuthFlowAuthorizationCodeSchema, OAuthFlowClientCredentialsSchema, OAuthFlowImplicitSchema, OAuthFlowPasswordSchema, } from '../../schemas/v3.1/strict/oauth-flow.js';
6
6
  import { SecurityRequirementObjectSchema } from '../../schemas/v3.1/strict/openapi-document.js';
7
7
  const SecretsApiKeySchema = compose(Type.Object({
@@ -28,11 +28,39 @@ export const OpenIDConnectSchema = Type.Object({
28
28
  clientCredentials: Type.Optional(compose(OAuthFlowClientCredentialsSchema, SecretsOAuthFlowCommonSchema, XScalarSecretClientSecretSchema, XScalarCredentialsLocationSchema)),
29
29
  authorizationCode: Type.Optional(compose(OAuthFlowAuthorizationCodeSchema, SecretsOAuthFlowCommonSchema, XScalarSecretClientSecretSchema, XScalarSecretRedirectUriSchema, XScalarCredentialsLocationSchema)),
30
30
  });
31
+ /**
32
+ * AsyncAPI SASL-style broker schemes: all of them authenticate with a username + password pair,
33
+ * so they share one secrets shape and are matched to the scheme by the stored `type`.
34
+ */
35
+ const SecretsSaslSchema = compose(Type.Object({
36
+ type: Type.Union([
37
+ Type.Literal('userPassword'),
38
+ Type.Literal('plain'),
39
+ Type.Literal('scramSha256'),
40
+ Type.Literal('scramSha512'),
41
+ ]),
42
+ }), XScalarSecretHTTPSchema);
43
+ /** AsyncAPI X509 broker scheme: a client certificate + private key pair (PEM). */
44
+ const SecretsX509Schema = compose(Type.Object({
45
+ type: Type.Literal('X509'),
46
+ }), XScalarSecretClientCertificateSchema, XScalarSecretPrivateKeySchema);
47
+ /** AsyncAPI encryption broker schemes: a single key value, stored in the shared token slot. */
48
+ const SecretsEncryptionSchema = compose(Type.Object({
49
+ type: Type.Union([Type.Literal('symmetricEncryption'), Type.Literal('asymmetricEncryption')]),
50
+ }), XScalarSecretTokenSchema);
51
+ /** AsyncAPI GSSAPI (Kerberos) broker scheme: the service name the client authenticates against. */
52
+ const SecretsGssapiSchema = compose(Type.Object({
53
+ type: Type.Literal('gssapi'),
54
+ }), XScalarSecretServiceNameSchema);
31
55
  export const SecretsAuthUnionSchema = Type.Union([
32
56
  SecretsApiKeySchema,
33
57
  SecretsHttpSchema,
34
58
  OAuthSchema,
35
59
  OpenIDConnectSchema,
60
+ SecretsSaslSchema,
61
+ SecretsX509Schema,
62
+ SecretsEncryptionSchema,
63
+ SecretsGssapiSchema,
36
64
  ]);
37
65
  export const SecretsAuthSchema = Type.Record(Type.String(), SecretsAuthUnionSchema);
38
66
  const SelectedSecuritySchema = Type.Object({
@@ -112,14 +112,27 @@ export type AuthEvents = {
112
112
  /**
113
113
  * Update the selected scopes for a given security scheme.
114
114
  * Triggers when the user selects/deselects scopes for an OAuth2 (or other scopes-supporting) scheme in the UI.
115
+ *
116
+ * Provide either:
117
+ * - `scopes`: the absolute scope list (used by bulk actions like "Select All" / "Deselect All"), or
118
+ * - `scope` together with `selected`: a single-scope toggle applied against the scopes currently
119
+ * stored in the auth state. Toggling against the stored value (rather than a snapshot computed in
120
+ * the component) keeps rapid successive clicks from racing and dropping each other's changes.
121
+ *
122
+ * A payload that provides neither (or `scope` without `selected`) is ignored, so a malformed event
123
+ * can never silently clear the selection.
115
124
  */
116
125
  'auth:update:selected-scopes': {
117
126
  /** The id of the security scheme to update the scopes for */
118
127
  id: string[];
119
128
  /** The name of the security scheme to update the scopes for */
120
129
  name: string;
121
- /** The scopes to update the selected scopes with */
122
- scopes: string[];
130
+ /** The absolute scope list to store. Used by bulk actions. Mutually exclusive with `scope`. */
131
+ scopes?: string[];
132
+ /** The single scope to toggle. Applied against the currently stored scopes. Requires `selected`. */
133
+ scope?: string;
134
+ /** Whether the toggled `scope` should be selected (added) or deselected (removed). */
135
+ selected?: boolean;
123
136
  /** Meta information for the auth update */
124
137
  meta: AuthMeta;
125
138
  };
@@ -1 +1 @@
1
- {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../src/events/definitions/auth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AACnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAE5C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACzD,OAAO,KAAK,EACV,gBAAgB,EAChB,yBAAyB,EACzB,oBAAoB,EACrB,MAAM,wCAAwC,CAAA;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAA;AAExH;;;;;;GAMG;AACH,MAAM,MAAM,QAAQ,GAChB;IACE,IAAI,EAAE,UAAU,CAAA;CACjB,GACD;IACE,IAAI,EAAE,WAAW,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,UAAU,CAAA;CACnB,CAAA;AAEL;;;;;;;;GAQG;AACH,KAAK,2BAA2B,GAC5B,CAAC;IACC,IAAI,EAAE,MAAM,CAAA;CACb,GAAG,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC,GACtC,CAAC;IACC,IAAI,EAAE,QAAQ,CAAA;CACf,GAAG,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,CAAC,GACxC,CAAC;IACC,IAAI,E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,EAAE,MAAM,CAAA;QACnB,2FAA2F;QAC3F,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB;;;WAGG;QACH,MAAM,CAAC,EAAE,OAAO,CAAA;KACjB,CAAA;IAED;;;;;OAKG;IACH,oBAAoB,EAAE;QACpB,yDAAyD;QACzD,IAAI,EAAE,MAAM,CAAA;QACZ,8DAA8D;QAC9D,QAAQ,EAAE,MAAM,gBAAgB,CAAA;QAChC,8BAA8B;QAC9B,KAAK,EAAE,MAAM,CAAA;KACd,CAAA;IAED;;;;;;;;;OASG;IACH,6BAA6B,EAAE;QAC7B,8CAA8C;QAC9C,KAAK,EAAE,MAAM,EAAE,CAAA;KAChB,CAAA;CACF,CAAA"}
@@ -111,7 +111,7 @@ export declare const updateSelectedAuthTab: (store: WorkspaceStore | null, docum
111
111
  * // After, the first scheme becomes: { "OAuth": ["write:pets"] }
112
112
  * ```
113
113
  */
114
- export declare const updateSelectedScopes: (store: WorkspaceStore | null, document: WorkspaceDocument | null, { id, name, scopes, meta }: AuthEvents["auth:update:selected-scopes"]) => void;
114
+ export declare const updateSelectedScopes: (store: WorkspaceStore | null, document: WorkspaceDocument | null, { id, name, scopes, scope, selected, meta }: AuthEvents["auth:update:selected-scopes"]) => void;
115
115
  /**
116
116
  * Adds a new scope to an OAuth flow, or renames / updates the description of an existing one.
117
117
  *
@@ -1 +1 @@
1
- {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/mutators/auth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAQ3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;AAGlD,OAAO,KAAK,EAAgB,oBAAoB,EAAE,MAAM,uCAAuC,CAAA;AAuC/F;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,6BAA6B,GACxC,OAAO,c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=> {
306
306
  * // After, the first scheme becomes: { "OAuth": ["write:pets"] }
307
307
  * ```
308
308
  */
309
- export const updateSelectedScopes = (store, document, { id, name, scopes, meta }) => {
309
+ export const updateSelectedScopes = (store, document, { id, name, scopes, scope, selected, meta }) => {
310
310
  const documentName = getAuthDocumentName(document);
311
311
  if (!documentName) {
312
312
  return;
@@ -332,7 +332,24 @@ export const updateSelectedScopes = (store, document, { id, name, scopes, meta }
332
332
  if (!isNonOptionalSecurityRequirement(nextScheme)) {
333
333
  return;
334
334
  }
335
- nextScheme[name] = scopes;
335
+ // Resolve the next scope list. A single-scope toggle (`scope` + `selected`) is applied against the
336
+ // value currently in the store, which is what keeps rapid successive clicks from overwriting each
337
+ // other with a list the component computed from a possibly-stale prop. Bulk actions pass an absolute
338
+ // `scopes` list instead. A payload carrying neither is ignored rather than silently clearing.
339
+ const resolveNextScopes = () => {
340
+ if (scope !== undefined && selected !== undefined) {
341
+ const currentScopes = Array.isArray(nextScheme[name]) ? nextScheme[name] : [];
342
+ return selected
343
+ ? Array.from(new Set([...currentScopes, scope]))
344
+ : currentScopes.filter((current) => current !== scope);
345
+ }
346
+ return scopes;
347
+ };
348
+ const nextScopes = resolveNextScopes();
349
+ if (nextScopes === undefined) {
350
+ return;
351
+ }
352
+ nextScheme[name] = nextScopes;
336
353
  store?.auth.setAuthSelectedSchemas(meta.type === 'document'
337
354
  ? { type: 'document', documentName }
338
355
  : { type: 'operation', documentName, path: meta.path, method: meta.method }, { selectedIndex: target.selectedIndex, selectedSchemes: nextSelectedSchemes });
@@ -1 +1 @@
1
- {"version":3,"file":"build-request-body.d.ts","sourceRoot":"","sources":["../../../../src/request-example/builder/body/build-request-body.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0DAA0D,CAAA;AAOjG,KAAK,QAAQ,GAAG;IACd,IAAI,EAAE,UAAU,CAAA;IAChB,KAAK,EAAE,CACH;QACE,IAAI,EAAE,MAAM,CAAA;QACZ,GAAG,EAAE,MAAM,CAAA;QACX,KAAK,EAAE,MAAM,CAAA;KACd,GACD;QACE,IAAI,EAAE,MAAM,CAAA;QACZ,GAAG,EAAE,MAAM,CAAA;QACX,KAAK,EAAE,IAAI,CAAA;QACX,WAAW,CAAC,EAAE,MAAM,CAAA;KACrB,GACD;QACE,IAAI,EAAE,MAAM,CAAA;QACZ,GAAG,EAAE,MAAM,CAAA;QACX,KAAK,EAAE,IAAI,CAAA;QACX,WAAW,CAAC,EAAE,MAAM,CAAA;KACrB,CACJ,EAAE,CAAA;CACJ,CAAA;AAED,KAAK,UAAU,GAAG;IAChB,IAAI,EAAE,YAAY,CAAA;IAClB,KAAK,EAAE;QACL,GAAG,EAAE,MAAM,CAAA;QACX,KAAK,EAAE,MAAM,CAAA;KACd,EAAE,CAAA;CACJ,CAAA;AAED,KAAK,GAAG,GAAG;IACT,IAAI,EAAE,KAAK,CAAA;IACX,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAA;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAED,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,UAAU,GAAG,GAAG,CAAA;AA2GrD;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAC3B,aAAa,iBAAiB,GAAG,SAAS;AAC1C,qCAAqC;AACrC,oBAAuB;AACvB,sEAAsE;AACtE,kCAAkC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KACvD,WAAW,GAAG,IA2RhB,CAAA"}
1
+ {"version":3,"file":"build-request-body.d.ts","sourceRoot":"","sources":["../../../../src/request-example/builder/body/build-request-body.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0DAA0D,CAAA;AAOjG,KAAK,QAAQ,GAAG;IACd,IAAI,EAAE,UAAU,CAAA;IAChB,KAAK,EAAE,CACH;QACE,IAAI,EAAE,MAAM,CAAA;QACZ,GAAG,EAAE,MAAM,CAAA;QACX,KAAK,EAAE,MAAM,CAAA;KACd,GACD;QACE,IAAI,EAAE,MAAM,CAAA;QACZ,GAAG,EAAE,MAAM,CAAA;QACX,KAAK,EAAE,IAAI,CAAA;QACX,WAAW,CAAC,EAAE,MAAM,CAAA;KACrB,GACD;QACE,IAAI,EAAE,MAAM,CAAA;QACZ,GAAG,EAAE,MAAM,CAAA;QACX,KAAK,EAAE,IAAI,CAAA;QACX,WAAW,CAAC,EAAE,MAAM,CAAA;KACrB,CACJ,EAAE,CAAA;CACJ,CAAA;AAED,KAAK,UAAU,GAAG;IAChB,IAAI,EAAE,YAAY,CAAA;IAClB,KAAK,EAAE;QACL,GAAG,EAAE,MAAM,CAAA;QACX,KAAK,EAAE,MAAM,CAAA;KACd,EAAE,CAAA;CACJ,CAAA;AAED,KAAK,GAAG,GAAG;IACT,IAAI,EAAE,KAAK,CAAA;IACX,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAA;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAED,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,UAAU,GAAG,GAAG,CAAA;AAKrD;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAC3B,aAAa,iBAAiB,GAAG,SAAS;AAC1C,qCAAqC;AACrC,oBAAuB;AACvB,sEAAsE;AACtE,kCAAkC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KACvD,WAAW,GAAG,IA2RhB,CAAA"}
@@ -3,109 +3,11 @@ import { isObject } from '@scalar/helpers/object/is-object';
3
3
  import { setValueAtPath } from '@scalar/helpers/object/set-value-at-path';
4
4
  import { getResolvedRef, mergeSiblingReferences } from '@scalar/workspace-store/helpers/get-resolved-ref';
5
5
  import { unpackProxyObject } from '@scalar/workspace-store/helpers/unpack-proxy';
6
- import { isObjectSchema } from '@scalar/workspace-store/schemas/v3.1/strict/type-guards';
7
6
  import { getExampleFromBody } from './get-request-body-example.js';
8
7
  import { getSelectedBodyContentType } from './get-selected-body-content-type.js';
8
+ import { buildDottedNestedRowPredicate, coerceLeafValueToSchemaType, resolveLeafSchema } from './schema-value-coercion.js';
9
9
  import { serializeFormPropertyWithEncoding } from './serialize-form-property.js';
10
10
  const getMultipartEncodingContentType = (requestBody, bodyContentType, fieldName) => requestBody.content[bodyContentType]?.encoding?.[fieldName]?.contentType;
11
- /**
12
- * Build a predicate that recognizes multipart rows whose dotted name encodes a path
13
- * into a nested object property of the multipart schema. Without a schema (or when
14
- * the dotted prefix is not declared as a nested object), a row like `user.email`
15
- * is treated as a literal name and stays flat — only schema-derived leaves emitted
16
- * by `get-form-body-rows.ts` are folded back via `foldDottedRowsToObject`.
17
- */
18
- const buildDottedNestedRowPredicate = (schema) => {
19
- const resolved = schema ? getResolvedRef(schema, mergeSiblingReferences) : undefined;
20
- if (!resolved || !isObjectSchema(resolved) || !resolved.properties) {
21
- return (_name, _value) => false;
22
- }
23
- const nestedTopKeys = new Set();
24
- for (const [key, child] of Object.entries(resolved.properties)) {
25
- const childResolved = child
26
- ? getResolvedRef(child, mergeSiblingReferences)
27
- : undefined;
28
- if (childResolved && isObjectSchema(childResolved) && childResolved.properties) {
29
- nestedTopKeys.add(key);
30
- }
31
- }
32
- return (name, value) => {
33
- if (value instanceof File || !name.includes('.')) {
34
- return false;
35
- }
36
- const head = name.split('.', 1)[0];
37
- return !!head && nestedTopKeys.has(head);
38
- };
39
- };
40
- /** Normalize a schema's `type` (string | string[] | absent) into a plain string array. */
41
- const normalizeSchemaTypes = (schema) => {
42
- const type = 'type' in schema ? schema.type : undefined;
43
- return Array.isArray(type) ? [...type] : type == null ? [] : [type];
44
- };
45
- /**
46
- * Walk an object schema along a dotted-row path and return the resolved leaf schema,
47
- * or undefined when any segment is not a declared object property.
48
- */
49
- const resolveLeafSchema = (schema, segments) => {
50
- let current = schema;
51
- for (const segment of segments) {
52
- if (!current || !isObjectSchema(current) || !current.properties) {
53
- return undefined;
54
- }
55
- current = getResolvedRef(current.properties[segment], mergeSiblingReferences);
56
- }
57
- return current;
58
- };
59
- /** True when a JSON-parsed value's runtime type is allowed by the schema's declared types. */
60
- const parsedValueMatchesSchemaType = (value, types) => {
61
- if (value === null) {
62
- return types.includes('null');
63
- }
64
- if (Array.isArray(value)) {
65
- return types.includes('array');
66
- }
67
- if (typeof value === 'object') {
68
- return types.includes('object');
69
- }
70
- if (typeof value === 'boolean') {
71
- return types.includes('boolean');
72
- }
73
- if (typeof value === 'number') {
74
- // A fractional value only satisfies `number`; `integer` requires a whole number so a
75
- // string like "3.14" against an integer-only leaf stays untouched instead of being coerced.
76
- return types.includes('number') || (types.includes('integer') && Number.isInteger(value));
77
- }
78
- if (typeof value === 'string') {
79
- return types.includes('string');
80
- }
81
- return false;
82
- };
83
- /**
84
- * The form table stringifies every value for display, so an edited nested field comes back
85
- * as a string (`false` -> "false", `[]` -> "[]"). When the leaf schema declares a non-string
86
- * type, parse the string back to that type so the regrouped JSON part keeps its original
87
- * shape instead of becoming string-typed (issue #9416).
88
- *
89
- * Coercion is deliberately conservative: schemas that allow `string` keep the raw text, and a
90
- * value that does not parse as its declared type is left untouched so user input is never lost.
91
- */
92
- const coerceLeafValueToSchemaType = (value, schema) => {
93
- if (typeof value !== 'string' || !schema) {
94
- return value;
95
- }
96
- const types = normalizeSchemaTypes(schema);
97
- // No declared type, or a string is allowed: keep the user's text as-is.
98
- if (types.length === 0 || types.includes('string')) {
99
- return value;
100
- }
101
- try {
102
- const parsed = JSON.parse(value);
103
- return parsedValueMatchesSchemaType(parsed, types) ? parsed : value;
104
- }
105
- catch {
106
- return value;
107
- }
108
- };
109
11
  /**
110
12
  * Create the fetch request body
111
13
  */
@@ -0,0 +1,34 @@
1
+ import type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
2
+ /**
3
+ * Walk an object schema along a dotted-row path and return the resolved leaf schema,
4
+ * or undefined when any segment is not a declared object property.
5
+ */
6
+ export declare const resolveLeafSchema: (schema: SchemaObject | undefined, segments: string[]) => SchemaObject | undefined;
7
+ /**
8
+ * The form table stringifies every value for display, so an edited nested field comes back
9
+ * as a string (`false` -> "false", `[]` -> "[]"). When the leaf schema declares a non-string
10
+ * type, parse the string back to that type so the regrouped JSON part keeps its original
11
+ * shape instead of becoming string-typed (issue #9416).
12
+ *
13
+ * Coercion is deliberately conservative: schemas that allow `string` keep the raw text, and a
14
+ * value that does not parse as its declared type is left untouched so user input is never lost.
15
+ */
16
+ export declare const coerceLeafValueToSchemaType: (value: unknown, schema: SchemaObject | undefined) => unknown;
17
+ /**
18
+ * Best-effort coercion for row values whose property is not declared in the schema.
19
+ *
20
+ * Without a declared type we have no authority to keep `"5"` a string, and leaving it
21
+ * untouched would string-type every undeclared number/boolean on the first form edit.
22
+ * So values that parse as non-string JSON (`5`, `true`, `null`, `[1]`, `{"a":1}`) become
23
+ * that value, and anything else stays the raw text the user typed.
24
+ */
25
+ export declare const coerceUntypedValue: (value: unknown) => unknown;
26
+ /**
27
+ * Build a predicate that recognizes rows whose dotted name encodes a path into a nested
28
+ * object property of the body schema. Without a schema (or when the dotted prefix is not
29
+ * declared as a nested object), a row like `user.email` is treated as a literal name and
30
+ * stays flat — only schema-derived leaves emitted by the form-row builders are folded
31
+ * back into nested objects.
32
+ */
33
+ export declare const buildDottedNestedRowPredicate: (schema: unknown) => (_name: string, _value: unknown) => boolean;
34
+ //# sourceMappingURL=schema-value-coercion.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema-value-coercion.d.ts","sourceRoot":"","sources":["../../../../src/request-example/builder/body/schema-value-coercion.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAShG;;;GAGG;AACH,eAAO,MAAM,iBAAiB,GAAI,QAAQ,YAAY,GAAG,SAAS,EAAE,UAAU,MAAM,EAAE,KAAG,YAAY,GAAG,SASvG,CAAA;AA2BD;;;;;;;;GAQG;AACH,eAAO,MAAM,2BAA2B,GAAI,OAAO,OAAO,EAAE,QAAQ,YAAY,GAAG,SAAS,KAAG,OAe9F,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,GAAI,OAAO,OAAO,KAAG,OAUnD,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,6BAA6B,GAAI,QAAQ,OAAO,aAG1C,MAAM,UAAU,OAAO,YAkBzC,CAAA"}