@kubb/plugin-vue-query 5.14.0 → 5.14.2

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
@@ -33,6 +33,11 @@ type OperationTypeNames = {
33
33
  * Resolves the name of the type of the headers one response declares. Left out, results keep untyped headers.
34
34
  */
35
35
  headers?(node: OperationNode, statusCode: StatusCode): string;
36
+ /**
37
+ * Resolves the name a generated file declares the operation's per-status headers map under, such as
38
+ * `LoginUserResponseHeaders`. Left out, the map is written inline wherever it is used.
39
+ */
40
+ headersMap?(node: OperationNode): string;
36
41
  };
37
42
  };
38
43
  /**
package/dist/index.d.ts CHANGED
@@ -33,6 +33,11 @@ type OperationTypeNames = {
33
33
  * Resolves the name of the type of the headers one response declares. Left out, results keep untyped headers.
34
34
  */
35
35
  headers?(node: OperationNode, statusCode: StatusCode): string;
36
+ /**
37
+ * Resolves the name a generated file declares the operation's per-status headers map under, such as
38
+ * `LoginUserResponseHeaders`. Left out, the map is written inline wherever it is used.
39
+ */
40
+ headersMap?(node: OperationNode): string;
36
41
  };
37
42
  };
38
43
  /**
package/dist/index.js CHANGED
@@ -10,7 +10,7 @@ var compatibility = {
10
10
  "node": ">=22.22"
11
11
  };
12
12
  // package.json
13
- var version = "5.14.0";
13
+ var version = "5.14.2";
14
14
  // ../../internals/ast/src/http/requestBody.ts
15
15
  /** The schema of the first request body entry, else `undefined` when the operation takes no body. */
16
16
  function getSchema(node) {
@@ -408,8 +408,15 @@ function resolveOperationTypes() {
408
408
  plugin: pluginName
409
409
  });
410
410
  const resolver = ctx.getResolver("types");
411
+ const headersMap = (node) => resolver.resolveName({
412
+ key: operationKey(node, "response", "headersMap"),
413
+ name: resolver.name(`${node.operationId} Response Headers`)
414
+ });
411
415
  return {
412
- response: resolver.response,
416
+ response: {
417
+ ...resolver.response,
418
+ headersMap
419
+ },
413
420
  resolver
414
421
  };
415
422
  });