@temporary-name/json-schema 1.9.3-alpha.62445d8d52a6787e7750865cd468fca8cccd3e28 → 1.9.3-alpha.6a70825f6d8c3dc99b87e4e5b778aea0fa007417

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/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) {
@@ -1,6 +1,6 @@
1
1
  import { JSONSchema, SchemaConvertOptions, ConditionalSchemaConverter } from '@temporary-name/server/openapi';
2
2
  import { Interceptor } from '@temporary-name/shared';
3
- import { AnySchema } from '@temporary-name/zod';
3
+ import { core } from '@temporary-name/zod';
4
4
  import * as zod_v4_core from 'zod/v4/core';
5
5
  import { $ZodType, $input, $output } from 'zod/v4/core';
6
6
 
@@ -58,8 +58,8 @@ declare class ZodToJsonSchemaConverter implements ConditionalSchemaConverter {
58
58
  private readonly undefinedJsonSchema;
59
59
  private readonly interceptors;
60
60
  constructor(options?: ZodToJsonSchemaConverterOptions);
61
- condition(schema: AnySchema | undefined): boolean;
62
- convert(schema: AnySchema | undefined, options: SchemaConvertOptions): [required: boolean, jsonSchema: Exclude<JSONSchema, boolean>];
61
+ condition(schema: core.$ZodType | undefined): boolean;
62
+ convert(schema: core.$ZodType | undefined, options: SchemaConvertOptions): [required: boolean, jsonSchema: Exclude<JSONSchema, boolean>];
63
63
  }
64
64
 
65
65
  /**
@@ -1,6 +1,6 @@
1
1
  import { JSONSchema, SchemaConvertOptions, ConditionalSchemaConverter } from '@temporary-name/server/openapi';
2
2
  import { Interceptor } from '@temporary-name/shared';
3
- import { AnySchema } from '@temporary-name/zod';
3
+ import { core } from '@temporary-name/zod';
4
4
  import * as zod_v4_core from 'zod/v4/core';
5
5
  import { $ZodType, $input, $output } from 'zod/v4/core';
6
6
 
@@ -58,8 +58,8 @@ declare class ZodToJsonSchemaConverter implements ConditionalSchemaConverter {
58
58
  private readonly undefinedJsonSchema;
59
59
  private readonly interceptors;
60
60
  constructor(options?: ZodToJsonSchemaConverterOptions);
61
- condition(schema: AnySchema | undefined): boolean;
62
- convert(schema: AnySchema | undefined, options: SchemaConvertOptions): [required: boolean, jsonSchema: Exclude<JSONSchema, boolean>];
61
+ condition(schema: core.$ZodType | undefined): boolean;
62
+ convert(schema: core.$ZodType | undefined, options: SchemaConvertOptions): [required: boolean, jsonSchema: Exclude<JSONSchema, boolean>];
63
63
  }
64
64
 
65
65
  /**
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.62445d8d52a6787e7750865cd468fca8cccd3e28",
4
+ "version": "1.9.3-alpha.6a70825f6d8c3dc99b87e4e5b778aea0fa007417",
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/server": "1.9.3-alpha.62445d8d52a6787e7750865cd468fca8cccd3e28",
33
- "@temporary-name/shared": "1.9.3-alpha.62445d8d52a6787e7750865cd468fca8cccd3e28",
34
- "@temporary-name/zod": "1.9.3-alpha.62445d8d52a6787e7750865cd468fca8cccd3e28",
35
- "@temporary-name/interop": "1.9.3-alpha.62445d8d52a6787e7750865cd468fca8cccd3e28"
32
+ "@temporary-name/interop": "1.9.3-alpha.6a70825f6d8c3dc99b87e4e5b778aea0fa007417",
33
+ "@temporary-name/server": "1.9.3-alpha.6a70825f6d8c3dc99b87e4e5b778aea0fa007417",
34
+ "@temporary-name/shared": "1.9.3-alpha.6a70825f6d8c3dc99b87e4e5b778aea0fa007417",
35
+ "@temporary-name/zod": "1.9.3-alpha.6a70825f6d8c3dc99b87e4e5b778aea0fa007417"
36
36
  },
37
37
  "devDependencies": {},
38
38
  "scripts": {