@temporary-name/json-schema 1.9.3-alpha.26612c2cf6a7177d2b500d984d282309d8320ca3 → 1.9.3-alpha.32780b2c7ad58cf8dcbc93a40f13494185223e6e

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 (2) hide show
  1. package/dist/index.mjs +8 -6
  2. package/package.json +5 -5
package/dist/index.mjs CHANGED
@@ -348,12 +348,14 @@ class experimental_SmartCoercionPlugin {
348
348
  init(options) {
349
349
  options.clientInterceptors ??= [];
350
350
  options.clientInterceptors.unshift(async (options2) => {
351
- const inputSchema = options2.procedure["~orpc"].inputSchema;
352
- if (!inputSchema) {
353
- return options2.next();
354
- }
355
- const coercedInput = await this.#coerce(inputSchema, options2.input);
356
- return options2.next({ ...options2, input: coercedInput });
351
+ const { bodySchema, pathSchema, querySchema } = options2.procedure["~orpc"].schemas;
352
+ const coercedBody = await this.#coerce(bodySchema, options2.input.body);
353
+ const coercedPath = await this.#coerce(pathSchema, options2.input.path);
354
+ const coercedQuery = await this.#coerce(querySchema, options2.input.query);
355
+ return options2.next({
356
+ ...options2,
357
+ input: { body: coercedBody, path: coercedPath, query: coercedQuery }
358
+ });
357
359
  });
358
360
  }
359
361
  async #coerce(schema, value) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@temporary-name/json-schema",
3
3
  "type": "module",
4
- "version": "1.9.3-alpha.26612c2cf6a7177d2b500d984d282309d8320ca3",
4
+ "version": "1.9.3-alpha.32780b2c7ad58cf8dcbc93a40f13494185223e6e",
5
5
  "license": "MIT",
6
6
  "homepage": "https://www.stainless.com/",
7
7
  "repository": {
@@ -29,10 +29,10 @@
29
29
  ],
30
30
  "dependencies": {
31
31
  "zod": "^4.1.11",
32
- "@temporary-name/interop": "1.9.3-alpha.26612c2cf6a7177d2b500d984d282309d8320ca3",
33
- "@temporary-name/server": "1.9.3-alpha.26612c2cf6a7177d2b500d984d282309d8320ca3",
34
- "@temporary-name/shared": "1.9.3-alpha.26612c2cf6a7177d2b500d984d282309d8320ca3",
35
- "@temporary-name/zod": "1.9.3-alpha.26612c2cf6a7177d2b500d984d282309d8320ca3"
32
+ "@temporary-name/server": "1.9.3-alpha.32780b2c7ad58cf8dcbc93a40f13494185223e6e",
33
+ "@temporary-name/shared": "1.9.3-alpha.32780b2c7ad58cf8dcbc93a40f13494185223e6e",
34
+ "@temporary-name/zod": "1.9.3-alpha.32780b2c7ad58cf8dcbc93a40f13494185223e6e",
35
+ "@temporary-name/interop": "1.9.3-alpha.32780b2c7ad58cf8dcbc93a40f13494185223e6e"
36
36
  },
37
37
  "devDependencies": {},
38
38
  "scripts": {