@kubb/plugin-zod 5.9.0-canary.20261111T122006 → 5.9.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.
package/dist/index.d.cts CHANGED
@@ -287,9 +287,17 @@ type ResolverZod = Resolver & {
287
287
  * Resolves the name for an operation response by status code.
288
288
  *
289
289
  * @example Response status names
290
- * `resolver.response.status(node, 200) // → 'listPetsStatus200Schema'`
290
+ * `resolver.response.status(node, '200') // → 'listPetsStatus200Schema'`
291
291
  */
292
292
  status(node: ast.OperationNode, statusCode: ast.StatusCode): string;
293
+ /**
294
+ * Resolves the name for the headers a response declares. The schema holds the spec's header names and types,
295
+ * so it does not parse a fetch `Headers` object, whose names are lower case and whose values are strings.
296
+ *
297
+ * @example Response headers names
298
+ * `resolver.response.headers(node, '200') // → 'listPetsStatus200HeadersSchema'`
299
+ */
300
+ headers(node: ast.OperationNode, statusCode: ast.StatusCode): string;
293
301
  /**
294
302
  * Resolves the request body schema name.
295
303
  *
@@ -335,7 +343,8 @@ type ResolverZod = Resolver & {
335
343
  type CompileOptions = {
336
344
  /**
337
345
  * Throw an error if any part of the schema cannot be compiled into flat JavaScript,
338
- * preventing silent fallback to the standard interpreter.
346
+ * preventing silent fallback to the standard interpreter. A schema Zod refuses to
347
+ * compile, such as a coerced scalar or a `z.xor`, is left uncompiled.
339
348
  *
340
349
  * @default false
341
350
  */
@@ -505,6 +514,7 @@ declare global {
505
514
  typeName: string;
506
515
  type: string;
507
516
  zodPrinter: ReturnType<typeof printerZod> | ReturnType<typeof printerZodMini>;
517
+ zodDirectionalNodes: WeakMap<ast.SchemaNode, ast.SchemaNode | null>;
508
518
  }
509
519
  }
510
520
  }
@@ -563,5 +573,4 @@ export declare const pluginZod: import("@kubb/kit").PluginFactory<PluginZod>;
563
573
  * ```
564
574
  */
565
575
  export declare const resolverZod: ResolverZod;
566
- export { type CompileOptions, type PluginZod, type PrinterZodFactory, type PrinterZodMiniFactory, type PrinterZodMiniNodes, type PrinterZodMiniOptions, type PrinterZodNodes, type PrinterZodOptions, type ResolverZod, pluginZod as default };
567
- //# sourceMappingURL=index.d.cts.map
576
+ export { type CompileOptions, type PluginZod, type PrinterZodFactory, type PrinterZodMiniFactory, type PrinterZodMiniNodes, type PrinterZodMiniOptions, type PrinterZodNodes, type PrinterZodOptions, type ResolverZod, pluginZod as default };
package/dist/index.d.ts CHANGED
@@ -287,9 +287,17 @@ type ResolverZod = Resolver & {
287
287
  * Resolves the name for an operation response by status code.
288
288
  *
289
289
  * @example Response status names
290
- * `resolver.response.status(node, 200) // → 'listPetsStatus200Schema'`
290
+ * `resolver.response.status(node, '200') // → 'listPetsStatus200Schema'`
291
291
  */
292
292
  status(node: ast.OperationNode, statusCode: ast.StatusCode): string;
293
+ /**
294
+ * Resolves the name for the headers a response declares. The schema holds the spec's header names and types,
295
+ * so it does not parse a fetch `Headers` object, whose names are lower case and whose values are strings.
296
+ *
297
+ * @example Response headers names
298
+ * `resolver.response.headers(node, '200') // → 'listPetsStatus200HeadersSchema'`
299
+ */
300
+ headers(node: ast.OperationNode, statusCode: ast.StatusCode): string;
293
301
  /**
294
302
  * Resolves the request body schema name.
295
303
  *
@@ -335,7 +343,8 @@ type ResolverZod = Resolver & {
335
343
  type CompileOptions = {
336
344
  /**
337
345
  * Throw an error if any part of the schema cannot be compiled into flat JavaScript,
338
- * preventing silent fallback to the standard interpreter.
346
+ * preventing silent fallback to the standard interpreter. A schema Zod refuses to
347
+ * compile, such as a coerced scalar or a `z.xor`, is left uncompiled.
339
348
  *
340
349
  * @default false
341
350
  */
@@ -505,6 +514,7 @@ declare global {
505
514
  typeName: string;
506
515
  type: string;
507
516
  zodPrinter: ReturnType<typeof printerZod> | ReturnType<typeof printerZodMini>;
517
+ zodDirectionalNodes: WeakMap<ast.SchemaNode, ast.SchemaNode | null>;
508
518
  }
509
519
  }
510
520
  }
@@ -563,5 +573,4 @@ export declare const pluginZod: import("@kubb/kit").PluginFactory<PluginZod>;
563
573
  * ```
564
574
  */
565
575
  export declare const resolverZod: ResolverZod;
566
- export { type CompileOptions, type PluginZod, type PrinterZodFactory, type PrinterZodMiniFactory, type PrinterZodMiniNodes, type PrinterZodMiniOptions, type PrinterZodNodes, type PrinterZodOptions, type ResolverZod, pluginZod as default };
567
- //# sourceMappingURL=index.d.ts.map
576
+ export { type CompileOptions, type PluginZod, type PrinterZodFactory, type PrinterZodMiniFactory, type PrinterZodMiniNodes, type PrinterZodMiniOptions, type PrinterZodNodes, type PrinterZodOptions, type ResolverZod, pluginZod as default };