@orpc/zod 2.0.0-beta.33 → 2.0.0-beta.35

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/README.md CHANGED
@@ -55,20 +55,20 @@ You can read the documentation [here](https://orpc.dev).
55
55
 
56
56
  **Framework & ecosystem integrations**
57
57
 
58
- | Package | Purpose | Docs |
59
- | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
60
- | [@orpc/next](https://www.npmjs.com/package/@orpc/next) | Integrate with [Next.js Server Functions](https://nextjs.org/docs/app/getting-started/mutating-data). | [Next.js](https://orpc.dev/docs/integrations/next) |
61
- | [@orpc/ai-sdk](https://www.npmjs.com/package/@orpc/ai-sdk) | Turn contracts and procedures into [AI SDK](https://ai-sdk.dev/) tools. | [AI SDK](https://orpc.dev/docs/integrations/ai-sdk) |
62
- | [@orpc/tanstack-query](https://www.npmjs.com/package/@orpc/tanstack-query) | Integrate with [TanStack Query](https://tanstack.com/query/latest). | [TanStack Query](https://orpc.dev/docs/integrations/tanstack-query) |
63
- | [@orpc/pinia-colada](https://www.npmjs.com/package/@orpc/pinia-colada) | Integrate with [Pinia Colada](https://pinia-colada.esm.dev/). | [Pinia Colada](https://orpc.dev/docs/integrations/pinia-colada) |
64
- | [@orpc/swr](https://www.npmjs.com/package/@orpc/swr) | Integrate with [SWR](https://swr.vercel.app/). | [SWR](https://orpc.dev/docs/integrations/swr) |
65
- | [@orpc/experimental-msw](https://www.npmjs.com/package/@orpc/experimental-msw) | Mock procedures with [Mock Service Worker](https://mswjs.io/). | [MSW](https://orpc.dev/docs/integrations/msw) |
66
- | [@orpc/experimental-effect](https://www.npmjs.com/package/@orpc/experimental-effect) | Integrate with [Effect](https://effect.website/). | [Effect](https://orpc.dev/docs/integrations/effect) |
67
- | [@orpc/nest](https://www.npmjs.com/package/@orpc/nest) | Implement your contract with [NestJS](https://nestjs.com/). | [NestJS](https://orpc.dev/docs/integrations/nest) |
68
- | [@orpc/node](https://www.npmjs.com/package/@orpc/node) | [Node.js](https://nodejs.org/) plugins for static file serving and large uploads. | [Static File](https://orpc.dev/docs/plugins/static-file), [Tmp File Upload](https://orpc.dev/docs/plugins/tmp-file-upload), [Batch Response Compression](https://orpc.dev/docs/plugins/batch-response-compression) |
69
- | [@orpc/bun](https://www.npmjs.com/package/@orpc/bun) | Adapters for [Bun's Redis](https://bun.sh/). | [Publisher](https://orpc.dev/docs/helpers/publisher), [Rate Limit](https://orpc.dev/docs/helpers/ratelimit) |
70
- | [@orpc/cloudflare](https://www.npmjs.com/package/@orpc/cloudflare) | Adapters for [Cloudflare's RateLimit and Durable Objects](https://developers.cloudflare.com/workers/). | [Publisher](https://orpc.dev/docs/helpers/publisher), [Rate Limit](https://orpc.dev/docs/helpers/ratelimit) |
71
- | [@orpc/trpc](https://www.npmjs.com/package/@orpc/trpc) | Reuse existing [tRPC](https://trpc.io/) routers within oRPC. | [tRPC](https://orpc.dev/docs/integrations/trpc) |
58
+ | Package | Purpose | Docs |
59
+ | ------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
60
+ | [@orpc/next](https://www.npmjs.com/package/@orpc/next) | Integrate with [Next.js Server Functions](https://nextjs.org/docs/app/getting-started/mutating-data). | [Next.js](https://orpc.dev/docs/integrations/next) |
61
+ | [@orpc/ai-sdk](https://www.npmjs.com/package/@orpc/ai-sdk) | Turn contracts and procedures into [AI SDK](https://ai-sdk.dev/) tools. | [AI SDK](https://orpc.dev/docs/integrations/ai-sdk) |
62
+ | [@orpc/tanstack-query](https://www.npmjs.com/package/@orpc/tanstack-query) | Integrate with [TanStack Query](https://tanstack.com/query/latest). | [TanStack Query](https://orpc.dev/docs/integrations/tanstack-query) |
63
+ | [@orpc/pinia-colada](https://www.npmjs.com/package/@orpc/pinia-colada) | Integrate with [Pinia Colada](https://pinia-colada.esm.dev/). | [Pinia Colada](https://orpc.dev/docs/integrations/pinia-colada) |
64
+ | [@orpc/swr](https://www.npmjs.com/package/@orpc/swr) | Integrate with [SWR](https://swr.vercel.app/). | [SWR](https://orpc.dev/docs/integrations/swr) |
65
+ | [@orpc/experimental-msw](https://www.npmjs.com/package/@orpc/experimental-msw) | Mock procedures with [Mock Service Worker](https://mswjs.io/). | [MSW](https://orpc.dev/docs/integrations/msw) |
66
+ | [@orpc/experimental-effect](https://www.npmjs.com/package/@orpc/experimental-effect) | Integrate with [Effect](https://effect.website/). | [Effect](https://orpc.dev/docs/integrations/effect) |
67
+ | [@orpc/nest](https://www.npmjs.com/package/@orpc/nest) | Implement your contract with [NestJS](https://nestjs.com/). | [NestJS](https://orpc.dev/docs/integrations/nest) |
68
+ | [@orpc/node](https://www.npmjs.com/package/@orpc/node) | [Node.js](https://nodejs.org/) plugins for static file serving and large uploads. | [Static File](https://orpc.dev/docs/plugins/static-file), [Tmp File Upload](https://orpc.dev/docs/plugins/tmp-file-upload), [Batch Response Compression](https://orpc.dev/docs/plugins/batch-response-compression) |
69
+ | [@orpc/bun](https://www.npmjs.com/package/@orpc/bun) | Adapters for [Bun's Redis](https://bun.sh/). | [Publisher](https://orpc.dev/docs/helpers/publisher), [Rate Limit](https://orpc.dev/docs/helpers/ratelimit) |
70
+ | [@orpc/cloudflare](https://www.npmjs.com/package/@orpc/cloudflare) | Adapters for [Cloudflare Workers](https://developers.cloudflare.com/workers/). | [Publisher](https://orpc.dev/docs/helpers/publisher), [Rate Limit](https://orpc.dev/docs/helpers/ratelimit), [Traces](https://orpc.dev/docs/integrations/cloudflare-traces) |
71
+ | [@orpc/trpc](https://www.npmjs.com/package/@orpc/trpc) | Reuse existing [tRPC](https://trpc.io/) routers within oRPC. | [tRPC](https://orpc.dev/docs/integrations/trpc) |
72
72
 
73
73
  **Observability**
74
74
 
@@ -127,6 +127,7 @@ Like what we build over at [middleapi](https://github.com/middleapi)? You can he
127
127
  <td align="center"><a href="https://github.com/ellis-driscoll?ref=middleapi&amp;utm_source=middleapi&amp;utm_medium=sponsor" target="_blank" rel="noopener sponsored" title="Ellis Driscoll"><img src="https://avatars.githubusercontent.com/u/70685966?u=c5f95bc33b5991d9744abe00052542e4a2ed3cb9&amp;v=4" width="139" alt="Ellis Driscoll"/><br />Ellis Driscoll</a></td>
128
128
  <td align="center"><a href="https://github.com/hoangbn?ref=middleapi&amp;utm_source=middleapi&amp;utm_medium=sponsor" target="_blank" rel="noopener sponsored" title="Hoang Nguyen"><img src="https://avatars.githubusercontent.com/u/38968280?u=c90084c6de65c56facabab7ba13a72a49ddbc3e4&amp;v=4" width="139" alt="Hoang Nguyen"/><br />Hoang Nguyen</a></td>
129
129
  <td align="center"><a href="https://opencollective.com/guest-ac41de3b?ref=middleapi&amp;utm_source=middleapi&amp;utm_medium=sponsor" target="_blank" rel="noopener sponsored" title="Orestis Ioannou"><img src="https://images.opencollective.com/guest-ac41de3b/avatar/460.png" width="139" alt="Orestis Ioannou"/><br />Orestis Ioannou</a></td>
130
+ <td align="center"><a href="https://automatio.ai/?ref=middleapi&amp;utm_source=middleapi&amp;utm_medium=sponsor" target="_blank" rel="noopener sponsored" title="Stefan Smiljkovic"><img src="https://avatars.githubusercontent.com/u/1984909?u=b7bf5bc40ed49df3c22f69d2da7b8d78709c49ed&amp;v=4" width="139" alt="Stefan Smiljkovic"/><br />Stefan Smiljkovic</a></td>
130
131
  </tr>
131
132
  </table>
132
133
 
package/dist/index.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { JsonSchemaConverter, AnySchema, JsonSchemaConverterDirection, JsonSchema } from '@orpc/json-schema';
2
2
  import * as zod_v4_core from 'zod/v4/core';
3
3
  import { ToJSONSchemaParams, $input, $output } from 'zod/v4/core';
4
- import * as json_schema_typed from 'json-schema-typed';
4
+ import * as _openapi_spec_types_v3_2 from '@openapi-spec/types/v3.2';
5
5
 
6
6
  interface ZodToJsonSchemaConverterOptions extends Omit<ToJSONSchemaParams, 'target' | 'io'> {
7
7
  /**
@@ -51,68 +51,7 @@ declare class ZodToJsonSchemaConverter implements JsonSchemaConverter {
51
51
  *
52
52
  * @see {@link https://orpc.dev/docs/integrations/zod | Zod Integration}
53
53
  */
54
- declare const JSON_SCHEMA_REGISTRY: zod_v4_core.$ZodRegistry<{
55
- $anchor?: string;
56
- $comment?: string;
57
- $defs?: Record<string, json_schema_typed.JSONSchema>;
58
- $dynamicAnchor?: string;
59
- $dynamicRef?: string;
60
- $id?: string;
61
- $ref?: string;
62
- $schema?: string;
63
- $vocabulary?: Record<string, string>;
64
- additionalItems?: json_schema_typed.JSONSchema;
65
- additionalProperties?: json_schema_typed.JSONSchema;
66
- allOf?: (json_schema_typed.JSONSchema<typeof $input | typeof $output, json_schema_typed.JSONSchema.TypeValue>[] | readonly json_schema_typed.JSONSchema<typeof $input | typeof $output, json_schema_typed.JSONSchema.TypeValue>[]) | undefined;
67
- anyOf?: (json_schema_typed.JSONSchema<typeof $input | typeof $output, json_schema_typed.JSONSchema.TypeValue>[] | readonly json_schema_typed.JSONSchema<typeof $input | typeof $output, json_schema_typed.JSONSchema.TypeValue>[]) | undefined;
68
- const?: typeof $input | typeof $output | undefined;
69
- contains?: json_schema_typed.JSONSchema<typeof $input | typeof $output, json_schema_typed.JSONSchema.TypeValue> | undefined;
70
- contentEncoding?: "7bit" | "8bit" | "base64" | "binary" | "ietf-token" | "quoted-printable" | "x-token";
71
- contentMediaType?: string;
72
- contentSchema?: json_schema_typed.JSONSchema<typeof $input | typeof $output, json_schema_typed.JSONSchema.TypeValue> | undefined;
73
- default?: typeof $input | typeof $output | undefined;
74
- definitions?: Record<string, json_schema_typed.JSONSchema>;
75
- dependencies?: Record<string, (string[] | readonly string[]) | json_schema_typed.JSONSchema>;
76
- dependentRequired?: Record<string, string[] | readonly string[]>;
77
- dependentSchemas?: Record<string, json_schema_typed.JSONSchema>;
78
- deprecated?: boolean;
79
- description?: string;
80
- else?: json_schema_typed.JSONSchema<typeof $input | typeof $output, json_schema_typed.JSONSchema.TypeValue> | undefined;
81
- enum?: ((typeof $input | typeof $output)[] | readonly (typeof $input | typeof $output)[]) | undefined;
82
- examples?: ((typeof $input | typeof $output)[] | readonly (typeof $input | typeof $output)[]) | undefined;
83
- exclusiveMaximum?: number;
84
- exclusiveMinimum?: number;
85
- format?: string;
86
- if?: json_schema_typed.JSONSchema<typeof $input | typeof $output, json_schema_typed.JSONSchema.TypeValue> | undefined;
87
- items?: json_schema_typed.JSONSchema;
88
- maxContains?: number;
89
- maximum?: number;
90
- maxItems?: number;
91
- maxLength?: number;
92
- maxProperties?: number;
93
- minContains?: number;
94
- minimum?: number;
95
- minItems?: number;
96
- minLength?: number;
97
- minProperties?: number;
98
- multipleOf?: number;
99
- not?: json_schema_typed.JSONSchema<typeof $input | typeof $output, json_schema_typed.JSONSchema.TypeValue> | undefined;
100
- oneOf?: (json_schema_typed.JSONSchema<typeof $input | typeof $output, json_schema_typed.JSONSchema.TypeValue>[] | readonly json_schema_typed.JSONSchema<typeof $input | typeof $output, json_schema_typed.JSONSchema.TypeValue>[]) | undefined;
101
- pattern?: string;
102
- patternProperties?: Record<string, json_schema_typed.JSONSchema>;
103
- prefixItems?: (json_schema_typed.JSONSchema<any, json_schema_typed.JSONSchema.TypeValue>[] | readonly json_schema_typed.JSONSchema<any, json_schema_typed.JSONSchema.TypeValue>[]) | json_schema_typed.JSONSchema;
104
- properties?: Record<string, json_schema_typed.JSONSchema>;
105
- propertyNames?: json_schema_typed.JSONSchema;
106
- readOnly?: boolean;
107
- required?: string[] | readonly string[];
108
- then?: json_schema_typed.JSONSchema<typeof $input | typeof $output, json_schema_typed.JSONSchema.TypeValue> | undefined;
109
- title?: string;
110
- type?: json_schema_typed.JSONSchema.TypeValue | undefined;
111
- unevaluatedItems?: json_schema_typed.JSONSchema;
112
- unevaluatedProperties?: json_schema_typed.JSONSchema;
113
- uniqueItems?: boolean;
114
- writeOnly?: boolean;
115
- }, zod_v4_core.$ZodType<unknown, unknown, zod_v4_core.$ZodTypeInternals<unknown, unknown>>>;
54
+ declare const JSON_SCHEMA_REGISTRY: zod_v4_core.$ZodRegistry<_openapi_spec_types_v3_2.SchemaObjectFields<typeof $input | typeof $output>, zod_v4_core.$ZodType<unknown, unknown, zod_v4_core.$ZodTypeInternals<unknown, unknown>>>;
116
55
  /**
117
56
  * Zod registry for customizing generated JSON schema, only useful for .input
118
57
  *
@@ -132,68 +71,7 @@ declare const JSON_SCHEMA_REGISTRY: zod_v4_core.$ZodRegistry<{
132
71
  *
133
72
  * @see {@link https://orpc.dev/docs/integrations/zod | Zod Integration}
134
73
  */
135
- declare const JSON_SCHEMA_INPUT_REGISTRY: zod_v4_core.$ZodRegistry<{
136
- $anchor?: string;
137
- $comment?: string;
138
- $defs?: Record<string, json_schema_typed.JSONSchema>;
139
- $dynamicAnchor?: string;
140
- $dynamicRef?: string;
141
- $id?: string;
142
- $ref?: string;
143
- $schema?: string;
144
- $vocabulary?: Record<string, string>;
145
- additionalItems?: json_schema_typed.JSONSchema;
146
- additionalProperties?: json_schema_typed.JSONSchema;
147
- allOf?: (json_schema_typed.JSONSchema<typeof $input, json_schema_typed.JSONSchema.TypeValue>[] | readonly json_schema_typed.JSONSchema<typeof $input, json_schema_typed.JSONSchema.TypeValue>[]) | undefined;
148
- anyOf?: (json_schema_typed.JSONSchema<typeof $input, json_schema_typed.JSONSchema.TypeValue>[] | readonly json_schema_typed.JSONSchema<typeof $input, json_schema_typed.JSONSchema.TypeValue>[]) | undefined;
149
- const?: typeof $input | undefined;
150
- contains?: json_schema_typed.JSONSchema<typeof $input, json_schema_typed.JSONSchema.TypeValue> | undefined;
151
- contentEncoding?: "7bit" | "8bit" | "base64" | "binary" | "ietf-token" | "quoted-printable" | "x-token";
152
- contentMediaType?: string;
153
- contentSchema?: json_schema_typed.JSONSchema<typeof $input, json_schema_typed.JSONSchema.TypeValue> | undefined;
154
- default?: typeof $input | undefined;
155
- definitions?: Record<string, json_schema_typed.JSONSchema>;
156
- dependencies?: Record<string, (string[] | readonly string[]) | json_schema_typed.JSONSchema>;
157
- dependentRequired?: Record<string, string[] | readonly string[]>;
158
- dependentSchemas?: Record<string, json_schema_typed.JSONSchema>;
159
- deprecated?: boolean;
160
- description?: string;
161
- else?: json_schema_typed.JSONSchema<typeof $input, json_schema_typed.JSONSchema.TypeValue> | undefined;
162
- enum?: ((typeof $input)[] | readonly (typeof $input)[]) | undefined;
163
- examples?: ((typeof $input)[] | readonly (typeof $input)[]) | undefined;
164
- exclusiveMaximum?: number;
165
- exclusiveMinimum?: number;
166
- format?: string;
167
- if?: json_schema_typed.JSONSchema<typeof $input, json_schema_typed.JSONSchema.TypeValue> | undefined;
168
- items?: json_schema_typed.JSONSchema;
169
- maxContains?: number;
170
- maximum?: number;
171
- maxItems?: number;
172
- maxLength?: number;
173
- maxProperties?: number;
174
- minContains?: number;
175
- minimum?: number;
176
- minItems?: number;
177
- minLength?: number;
178
- minProperties?: number;
179
- multipleOf?: number;
180
- not?: json_schema_typed.JSONSchema<typeof $input, json_schema_typed.JSONSchema.TypeValue> | undefined;
181
- oneOf?: (json_schema_typed.JSONSchema<typeof $input, json_schema_typed.JSONSchema.TypeValue>[] | readonly json_schema_typed.JSONSchema<typeof $input, json_schema_typed.JSONSchema.TypeValue>[]) | undefined;
182
- pattern?: string;
183
- patternProperties?: Record<string, json_schema_typed.JSONSchema>;
184
- prefixItems?: (json_schema_typed.JSONSchema<any, json_schema_typed.JSONSchema.TypeValue>[] | readonly json_schema_typed.JSONSchema<any, json_schema_typed.JSONSchema.TypeValue>[]) | json_schema_typed.JSONSchema;
185
- properties?: Record<string, json_schema_typed.JSONSchema>;
186
- propertyNames?: json_schema_typed.JSONSchema;
187
- readOnly?: boolean;
188
- required?: string[] | readonly string[];
189
- then?: json_schema_typed.JSONSchema<typeof $input, json_schema_typed.JSONSchema.TypeValue> | undefined;
190
- title?: string;
191
- type?: json_schema_typed.JSONSchema.TypeValue | undefined;
192
- unevaluatedItems?: json_schema_typed.JSONSchema;
193
- unevaluatedProperties?: json_schema_typed.JSONSchema;
194
- uniqueItems?: boolean;
195
- writeOnly?: boolean;
196
- }, zod_v4_core.$ZodType<unknown, unknown, zod_v4_core.$ZodTypeInternals<unknown, unknown>>>;
74
+ declare const JSON_SCHEMA_INPUT_REGISTRY: zod_v4_core.$ZodRegistry<_openapi_spec_types_v3_2.SchemaObjectFields<typeof $input>, zod_v4_core.$ZodType<unknown, unknown, zod_v4_core.$ZodTypeInternals<unknown, unknown>>>;
197
75
  /**
198
76
  * Zod registry for customizing generated JSON schema, only useful for .output
199
77
  *
@@ -213,68 +91,7 @@ declare const JSON_SCHEMA_INPUT_REGISTRY: zod_v4_core.$ZodRegistry<{
213
91
  *
214
92
  * @see {@link https://orpc.dev/docs/integrations/zod | Zod Integration}
215
93
  */
216
- declare const JSON_SCHEMA_OUTPUT_REGISTRY: zod_v4_core.$ZodRegistry<{
217
- $anchor?: string;
218
- $comment?: string;
219
- $defs?: Record<string, json_schema_typed.JSONSchema>;
220
- $dynamicAnchor?: string;
221
- $dynamicRef?: string;
222
- $id?: string;
223
- $ref?: string;
224
- $schema?: string;
225
- $vocabulary?: Record<string, string>;
226
- additionalItems?: json_schema_typed.JSONSchema;
227
- additionalProperties?: json_schema_typed.JSONSchema;
228
- allOf?: (json_schema_typed.JSONSchema<typeof $output, json_schema_typed.JSONSchema.TypeValue>[] | readonly json_schema_typed.JSONSchema<typeof $output, json_schema_typed.JSONSchema.TypeValue>[]) | undefined;
229
- anyOf?: (json_schema_typed.JSONSchema<typeof $output, json_schema_typed.JSONSchema.TypeValue>[] | readonly json_schema_typed.JSONSchema<typeof $output, json_schema_typed.JSONSchema.TypeValue>[]) | undefined;
230
- const?: typeof $output | undefined;
231
- contains?: json_schema_typed.JSONSchema<typeof $output, json_schema_typed.JSONSchema.TypeValue> | undefined;
232
- contentEncoding?: "7bit" | "8bit" | "base64" | "binary" | "ietf-token" | "quoted-printable" | "x-token";
233
- contentMediaType?: string;
234
- contentSchema?: json_schema_typed.JSONSchema<typeof $output, json_schema_typed.JSONSchema.TypeValue> | undefined;
235
- default?: typeof $output | undefined;
236
- definitions?: Record<string, json_schema_typed.JSONSchema>;
237
- dependencies?: Record<string, (string[] | readonly string[]) | json_schema_typed.JSONSchema>;
238
- dependentRequired?: Record<string, string[] | readonly string[]>;
239
- dependentSchemas?: Record<string, json_schema_typed.JSONSchema>;
240
- deprecated?: boolean;
241
- description?: string;
242
- else?: json_schema_typed.JSONSchema<typeof $output, json_schema_typed.JSONSchema.TypeValue> | undefined;
243
- enum?: ((typeof $output)[] | readonly (typeof $output)[]) | undefined;
244
- examples?: ((typeof $output)[] | readonly (typeof $output)[]) | undefined;
245
- exclusiveMaximum?: number;
246
- exclusiveMinimum?: number;
247
- format?: string;
248
- if?: json_schema_typed.JSONSchema<typeof $output, json_schema_typed.JSONSchema.TypeValue> | undefined;
249
- items?: json_schema_typed.JSONSchema;
250
- maxContains?: number;
251
- maximum?: number;
252
- maxItems?: number;
253
- maxLength?: number;
254
- maxProperties?: number;
255
- minContains?: number;
256
- minimum?: number;
257
- minItems?: number;
258
- minLength?: number;
259
- minProperties?: number;
260
- multipleOf?: number;
261
- not?: json_schema_typed.JSONSchema<typeof $output, json_schema_typed.JSONSchema.TypeValue> | undefined;
262
- oneOf?: (json_schema_typed.JSONSchema<typeof $output, json_schema_typed.JSONSchema.TypeValue>[] | readonly json_schema_typed.JSONSchema<typeof $output, json_schema_typed.JSONSchema.TypeValue>[]) | undefined;
263
- pattern?: string;
264
- patternProperties?: Record<string, json_schema_typed.JSONSchema>;
265
- prefixItems?: (json_schema_typed.JSONSchema<any, json_schema_typed.JSONSchema.TypeValue>[] | readonly json_schema_typed.JSONSchema<any, json_schema_typed.JSONSchema.TypeValue>[]) | json_schema_typed.JSONSchema;
266
- properties?: Record<string, json_schema_typed.JSONSchema>;
267
- propertyNames?: json_schema_typed.JSONSchema;
268
- readOnly?: boolean;
269
- required?: string[] | readonly string[];
270
- then?: json_schema_typed.JSONSchema<typeof $output, json_schema_typed.JSONSchema.TypeValue> | undefined;
271
- title?: string;
272
- type?: json_schema_typed.JSONSchema.TypeValue | undefined;
273
- unevaluatedItems?: json_schema_typed.JSONSchema;
274
- unevaluatedProperties?: json_schema_typed.JSONSchema;
275
- uniqueItems?: boolean;
276
- writeOnly?: boolean;
277
- }, zod_v4_core.$ZodType<unknown, unknown, zod_v4_core.$ZodTypeInternals<unknown, unknown>>>;
94
+ declare const JSON_SCHEMA_OUTPUT_REGISTRY: zod_v4_core.$ZodRegistry<_openapi_spec_types_v3_2.SchemaObjectFields<typeof $output>, zod_v4_core.$ZodType<unknown, unknown, zod_v4_core.$ZodTypeInternals<unknown, unknown>>>;
278
95
 
279
96
  export { JSON_SCHEMA_INPUT_REGISTRY, JSON_SCHEMA_OUTPUT_REGISTRY, JSON_SCHEMA_REGISTRY, ZodToJsonSchemaConverter };
280
97
  export type { ZodToJsonSchemaConverterOptions };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { JsonSchemaConverter, AnySchema, JsonSchemaConverterDirection, JsonSchema } from '@orpc/json-schema';
2
2
  import * as zod_v4_core from 'zod/v4/core';
3
3
  import { ToJSONSchemaParams, $input, $output } from 'zod/v4/core';
4
- import * as json_schema_typed from 'json-schema-typed';
4
+ import * as _openapi_spec_types_v3_2 from '@openapi-spec/types/v3.2';
5
5
 
6
6
  interface ZodToJsonSchemaConverterOptions extends Omit<ToJSONSchemaParams, 'target' | 'io'> {
7
7
  /**
@@ -51,68 +51,7 @@ declare class ZodToJsonSchemaConverter implements JsonSchemaConverter {
51
51
  *
52
52
  * @see {@link https://orpc.dev/docs/integrations/zod | Zod Integration}
53
53
  */
54
- declare const JSON_SCHEMA_REGISTRY: zod_v4_core.$ZodRegistry<{
55
- $anchor?: string;
56
- $comment?: string;
57
- $defs?: Record<string, json_schema_typed.JSONSchema>;
58
- $dynamicAnchor?: string;
59
- $dynamicRef?: string;
60
- $id?: string;
61
- $ref?: string;
62
- $schema?: string;
63
- $vocabulary?: Record<string, string>;
64
- additionalItems?: json_schema_typed.JSONSchema;
65
- additionalProperties?: json_schema_typed.JSONSchema;
66
- allOf?: (json_schema_typed.JSONSchema<typeof $input | typeof $output, json_schema_typed.JSONSchema.TypeValue>[] | readonly json_schema_typed.JSONSchema<typeof $input | typeof $output, json_schema_typed.JSONSchema.TypeValue>[]) | undefined;
67
- anyOf?: (json_schema_typed.JSONSchema<typeof $input | typeof $output, json_schema_typed.JSONSchema.TypeValue>[] | readonly json_schema_typed.JSONSchema<typeof $input | typeof $output, json_schema_typed.JSONSchema.TypeValue>[]) | undefined;
68
- const?: typeof $input | typeof $output | undefined;
69
- contains?: json_schema_typed.JSONSchema<typeof $input | typeof $output, json_schema_typed.JSONSchema.TypeValue> | undefined;
70
- contentEncoding?: "7bit" | "8bit" | "base64" | "binary" | "ietf-token" | "quoted-printable" | "x-token";
71
- contentMediaType?: string;
72
- contentSchema?: json_schema_typed.JSONSchema<typeof $input | typeof $output, json_schema_typed.JSONSchema.TypeValue> | undefined;
73
- default?: typeof $input | typeof $output | undefined;
74
- definitions?: Record<string, json_schema_typed.JSONSchema>;
75
- dependencies?: Record<string, (string[] | readonly string[]) | json_schema_typed.JSONSchema>;
76
- dependentRequired?: Record<string, string[] | readonly string[]>;
77
- dependentSchemas?: Record<string, json_schema_typed.JSONSchema>;
78
- deprecated?: boolean;
79
- description?: string;
80
- else?: json_schema_typed.JSONSchema<typeof $input | typeof $output, json_schema_typed.JSONSchema.TypeValue> | undefined;
81
- enum?: ((typeof $input | typeof $output)[] | readonly (typeof $input | typeof $output)[]) | undefined;
82
- examples?: ((typeof $input | typeof $output)[] | readonly (typeof $input | typeof $output)[]) | undefined;
83
- exclusiveMaximum?: number;
84
- exclusiveMinimum?: number;
85
- format?: string;
86
- if?: json_schema_typed.JSONSchema<typeof $input | typeof $output, json_schema_typed.JSONSchema.TypeValue> | undefined;
87
- items?: json_schema_typed.JSONSchema;
88
- maxContains?: number;
89
- maximum?: number;
90
- maxItems?: number;
91
- maxLength?: number;
92
- maxProperties?: number;
93
- minContains?: number;
94
- minimum?: number;
95
- minItems?: number;
96
- minLength?: number;
97
- minProperties?: number;
98
- multipleOf?: number;
99
- not?: json_schema_typed.JSONSchema<typeof $input | typeof $output, json_schema_typed.JSONSchema.TypeValue> | undefined;
100
- oneOf?: (json_schema_typed.JSONSchema<typeof $input | typeof $output, json_schema_typed.JSONSchema.TypeValue>[] | readonly json_schema_typed.JSONSchema<typeof $input | typeof $output, json_schema_typed.JSONSchema.TypeValue>[]) | undefined;
101
- pattern?: string;
102
- patternProperties?: Record<string, json_schema_typed.JSONSchema>;
103
- prefixItems?: (json_schema_typed.JSONSchema<any, json_schema_typed.JSONSchema.TypeValue>[] | readonly json_schema_typed.JSONSchema<any, json_schema_typed.JSONSchema.TypeValue>[]) | json_schema_typed.JSONSchema;
104
- properties?: Record<string, json_schema_typed.JSONSchema>;
105
- propertyNames?: json_schema_typed.JSONSchema;
106
- readOnly?: boolean;
107
- required?: string[] | readonly string[];
108
- then?: json_schema_typed.JSONSchema<typeof $input | typeof $output, json_schema_typed.JSONSchema.TypeValue> | undefined;
109
- title?: string;
110
- type?: json_schema_typed.JSONSchema.TypeValue | undefined;
111
- unevaluatedItems?: json_schema_typed.JSONSchema;
112
- unevaluatedProperties?: json_schema_typed.JSONSchema;
113
- uniqueItems?: boolean;
114
- writeOnly?: boolean;
115
- }, zod_v4_core.$ZodType<unknown, unknown, zod_v4_core.$ZodTypeInternals<unknown, unknown>>>;
54
+ declare const JSON_SCHEMA_REGISTRY: zod_v4_core.$ZodRegistry<_openapi_spec_types_v3_2.SchemaObjectFields<typeof $input | typeof $output>, zod_v4_core.$ZodType<unknown, unknown, zod_v4_core.$ZodTypeInternals<unknown, unknown>>>;
116
55
  /**
117
56
  * Zod registry for customizing generated JSON schema, only useful for .input
118
57
  *
@@ -132,68 +71,7 @@ declare const JSON_SCHEMA_REGISTRY: zod_v4_core.$ZodRegistry<{
132
71
  *
133
72
  * @see {@link https://orpc.dev/docs/integrations/zod | Zod Integration}
134
73
  */
135
- declare const JSON_SCHEMA_INPUT_REGISTRY: zod_v4_core.$ZodRegistry<{
136
- $anchor?: string;
137
- $comment?: string;
138
- $defs?: Record<string, json_schema_typed.JSONSchema>;
139
- $dynamicAnchor?: string;
140
- $dynamicRef?: string;
141
- $id?: string;
142
- $ref?: string;
143
- $schema?: string;
144
- $vocabulary?: Record<string, string>;
145
- additionalItems?: json_schema_typed.JSONSchema;
146
- additionalProperties?: json_schema_typed.JSONSchema;
147
- allOf?: (json_schema_typed.JSONSchema<typeof $input, json_schema_typed.JSONSchema.TypeValue>[] | readonly json_schema_typed.JSONSchema<typeof $input, json_schema_typed.JSONSchema.TypeValue>[]) | undefined;
148
- anyOf?: (json_schema_typed.JSONSchema<typeof $input, json_schema_typed.JSONSchema.TypeValue>[] | readonly json_schema_typed.JSONSchema<typeof $input, json_schema_typed.JSONSchema.TypeValue>[]) | undefined;
149
- const?: typeof $input | undefined;
150
- contains?: json_schema_typed.JSONSchema<typeof $input, json_schema_typed.JSONSchema.TypeValue> | undefined;
151
- contentEncoding?: "7bit" | "8bit" | "base64" | "binary" | "ietf-token" | "quoted-printable" | "x-token";
152
- contentMediaType?: string;
153
- contentSchema?: json_schema_typed.JSONSchema<typeof $input, json_schema_typed.JSONSchema.TypeValue> | undefined;
154
- default?: typeof $input | undefined;
155
- definitions?: Record<string, json_schema_typed.JSONSchema>;
156
- dependencies?: Record<string, (string[] | readonly string[]) | json_schema_typed.JSONSchema>;
157
- dependentRequired?: Record<string, string[] | readonly string[]>;
158
- dependentSchemas?: Record<string, json_schema_typed.JSONSchema>;
159
- deprecated?: boolean;
160
- description?: string;
161
- else?: json_schema_typed.JSONSchema<typeof $input, json_schema_typed.JSONSchema.TypeValue> | undefined;
162
- enum?: ((typeof $input)[] | readonly (typeof $input)[]) | undefined;
163
- examples?: ((typeof $input)[] | readonly (typeof $input)[]) | undefined;
164
- exclusiveMaximum?: number;
165
- exclusiveMinimum?: number;
166
- format?: string;
167
- if?: json_schema_typed.JSONSchema<typeof $input, json_schema_typed.JSONSchema.TypeValue> | undefined;
168
- items?: json_schema_typed.JSONSchema;
169
- maxContains?: number;
170
- maximum?: number;
171
- maxItems?: number;
172
- maxLength?: number;
173
- maxProperties?: number;
174
- minContains?: number;
175
- minimum?: number;
176
- minItems?: number;
177
- minLength?: number;
178
- minProperties?: number;
179
- multipleOf?: number;
180
- not?: json_schema_typed.JSONSchema<typeof $input, json_schema_typed.JSONSchema.TypeValue> | undefined;
181
- oneOf?: (json_schema_typed.JSONSchema<typeof $input, json_schema_typed.JSONSchema.TypeValue>[] | readonly json_schema_typed.JSONSchema<typeof $input, json_schema_typed.JSONSchema.TypeValue>[]) | undefined;
182
- pattern?: string;
183
- patternProperties?: Record<string, json_schema_typed.JSONSchema>;
184
- prefixItems?: (json_schema_typed.JSONSchema<any, json_schema_typed.JSONSchema.TypeValue>[] | readonly json_schema_typed.JSONSchema<any, json_schema_typed.JSONSchema.TypeValue>[]) | json_schema_typed.JSONSchema;
185
- properties?: Record<string, json_schema_typed.JSONSchema>;
186
- propertyNames?: json_schema_typed.JSONSchema;
187
- readOnly?: boolean;
188
- required?: string[] | readonly string[];
189
- then?: json_schema_typed.JSONSchema<typeof $input, json_schema_typed.JSONSchema.TypeValue> | undefined;
190
- title?: string;
191
- type?: json_schema_typed.JSONSchema.TypeValue | undefined;
192
- unevaluatedItems?: json_schema_typed.JSONSchema;
193
- unevaluatedProperties?: json_schema_typed.JSONSchema;
194
- uniqueItems?: boolean;
195
- writeOnly?: boolean;
196
- }, zod_v4_core.$ZodType<unknown, unknown, zod_v4_core.$ZodTypeInternals<unknown, unknown>>>;
74
+ declare const JSON_SCHEMA_INPUT_REGISTRY: zod_v4_core.$ZodRegistry<_openapi_spec_types_v3_2.SchemaObjectFields<typeof $input>, zod_v4_core.$ZodType<unknown, unknown, zod_v4_core.$ZodTypeInternals<unknown, unknown>>>;
197
75
  /**
198
76
  * Zod registry for customizing generated JSON schema, only useful for .output
199
77
  *
@@ -213,68 +91,7 @@ declare const JSON_SCHEMA_INPUT_REGISTRY: zod_v4_core.$ZodRegistry<{
213
91
  *
214
92
  * @see {@link https://orpc.dev/docs/integrations/zod | Zod Integration}
215
93
  */
216
- declare const JSON_SCHEMA_OUTPUT_REGISTRY: zod_v4_core.$ZodRegistry<{
217
- $anchor?: string;
218
- $comment?: string;
219
- $defs?: Record<string, json_schema_typed.JSONSchema>;
220
- $dynamicAnchor?: string;
221
- $dynamicRef?: string;
222
- $id?: string;
223
- $ref?: string;
224
- $schema?: string;
225
- $vocabulary?: Record<string, string>;
226
- additionalItems?: json_schema_typed.JSONSchema;
227
- additionalProperties?: json_schema_typed.JSONSchema;
228
- allOf?: (json_schema_typed.JSONSchema<typeof $output, json_schema_typed.JSONSchema.TypeValue>[] | readonly json_schema_typed.JSONSchema<typeof $output, json_schema_typed.JSONSchema.TypeValue>[]) | undefined;
229
- anyOf?: (json_schema_typed.JSONSchema<typeof $output, json_schema_typed.JSONSchema.TypeValue>[] | readonly json_schema_typed.JSONSchema<typeof $output, json_schema_typed.JSONSchema.TypeValue>[]) | undefined;
230
- const?: typeof $output | undefined;
231
- contains?: json_schema_typed.JSONSchema<typeof $output, json_schema_typed.JSONSchema.TypeValue> | undefined;
232
- contentEncoding?: "7bit" | "8bit" | "base64" | "binary" | "ietf-token" | "quoted-printable" | "x-token";
233
- contentMediaType?: string;
234
- contentSchema?: json_schema_typed.JSONSchema<typeof $output, json_schema_typed.JSONSchema.TypeValue> | undefined;
235
- default?: typeof $output | undefined;
236
- definitions?: Record<string, json_schema_typed.JSONSchema>;
237
- dependencies?: Record<string, (string[] | readonly string[]) | json_schema_typed.JSONSchema>;
238
- dependentRequired?: Record<string, string[] | readonly string[]>;
239
- dependentSchemas?: Record<string, json_schema_typed.JSONSchema>;
240
- deprecated?: boolean;
241
- description?: string;
242
- else?: json_schema_typed.JSONSchema<typeof $output, json_schema_typed.JSONSchema.TypeValue> | undefined;
243
- enum?: ((typeof $output)[] | readonly (typeof $output)[]) | undefined;
244
- examples?: ((typeof $output)[] | readonly (typeof $output)[]) | undefined;
245
- exclusiveMaximum?: number;
246
- exclusiveMinimum?: number;
247
- format?: string;
248
- if?: json_schema_typed.JSONSchema<typeof $output, json_schema_typed.JSONSchema.TypeValue> | undefined;
249
- items?: json_schema_typed.JSONSchema;
250
- maxContains?: number;
251
- maximum?: number;
252
- maxItems?: number;
253
- maxLength?: number;
254
- maxProperties?: number;
255
- minContains?: number;
256
- minimum?: number;
257
- minItems?: number;
258
- minLength?: number;
259
- minProperties?: number;
260
- multipleOf?: number;
261
- not?: json_schema_typed.JSONSchema<typeof $output, json_schema_typed.JSONSchema.TypeValue> | undefined;
262
- oneOf?: (json_schema_typed.JSONSchema<typeof $output, json_schema_typed.JSONSchema.TypeValue>[] | readonly json_schema_typed.JSONSchema<typeof $output, json_schema_typed.JSONSchema.TypeValue>[]) | undefined;
263
- pattern?: string;
264
- patternProperties?: Record<string, json_schema_typed.JSONSchema>;
265
- prefixItems?: (json_schema_typed.JSONSchema<any, json_schema_typed.JSONSchema.TypeValue>[] | readonly json_schema_typed.JSONSchema<any, json_schema_typed.JSONSchema.TypeValue>[]) | json_schema_typed.JSONSchema;
266
- properties?: Record<string, json_schema_typed.JSONSchema>;
267
- propertyNames?: json_schema_typed.JSONSchema;
268
- readOnly?: boolean;
269
- required?: string[] | readonly string[];
270
- then?: json_schema_typed.JSONSchema<typeof $output, json_schema_typed.JSONSchema.TypeValue> | undefined;
271
- title?: string;
272
- type?: json_schema_typed.JSONSchema.TypeValue | undefined;
273
- unevaluatedItems?: json_schema_typed.JSONSchema;
274
- unevaluatedProperties?: json_schema_typed.JSONSchema;
275
- uniqueItems?: boolean;
276
- writeOnly?: boolean;
277
- }, zod_v4_core.$ZodType<unknown, unknown, zod_v4_core.$ZodTypeInternals<unknown, unknown>>>;
94
+ declare const JSON_SCHEMA_OUTPUT_REGISTRY: zod_v4_core.$ZodRegistry<_openapi_spec_types_v3_2.SchemaObjectFields<typeof $output>, zod_v4_core.$ZodType<unknown, unknown, zod_v4_core.$ZodTypeInternals<unknown, unknown>>>;
278
95
 
279
96
  export { JSON_SCHEMA_INPUT_REGISTRY, JSON_SCHEMA_OUTPUT_REGISTRY, JSON_SCHEMA_REGISTRY, ZodToJsonSchemaConverter };
280
97
  export type { ZodToJsonSchemaConverterOptions };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orpc/zod",
3
3
  "type": "module",
4
- "version": "2.0.0-beta.33",
4
+ "version": "2.0.0-beta.35",
5
5
  "description": "Zod integration for oRPC: convert Zod schemas into JSON Schema for OpenAPI generation",
6
6
  "license": "MIT",
7
7
  "funding": [
@@ -39,8 +39,8 @@
39
39
  "zod": ">=4.5.0"
40
40
  },
41
41
  "dependencies": {
42
- "@orpc/json-schema": "2.0.0-beta.33",
43
- "json-schema-typed": "^8.0.2"
42
+ "@openapi-spec/types": "~0.1.0",
43
+ "@orpc/json-schema": "2.0.0-beta.35"
44
44
  },
45
45
  "devDependencies": {
46
46
  "zod": "^4.5.4"