@geekmidas/client 10.0.0-alpha.98 → 10.0.0

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 (116) hide show
  1. package/CHANGELOG.md +154 -0
  2. package/README.md +57 -40
  3. package/dist/auth-fetcher.cjs +5 -7
  4. package/dist/auth-fetcher.cjs.map +1 -1
  5. package/dist/auth-fetcher.d.cts +17 -15
  6. package/dist/auth-fetcher.d.cts.map +1 -1
  7. package/dist/auth-fetcher.d.mts +17 -15
  8. package/dist/auth-fetcher.d.mts.map +1 -1
  9. package/dist/auth-fetcher.mjs +5 -6
  10. package/dist/auth-fetcher.mjs.map +1 -1
  11. package/dist/chunk-CUT6urMc.cjs +30 -0
  12. package/dist/endpoint-hooks.cjs +15 -11
  13. package/dist/endpoint-hooks.cjs.map +1 -1
  14. package/dist/endpoint-hooks.d.cts +7 -4
  15. package/dist/endpoint-hooks.d.cts.map +1 -1
  16. package/dist/endpoint-hooks.d.mts +7 -4
  17. package/dist/endpoint-hooks.d.mts.map +1 -1
  18. package/dist/endpoint-hooks.mjs +9 -5
  19. package/dist/endpoint-hooks.mjs.map +1 -1
  20. package/dist/fetcher-CakjC9C7.mjs +88 -0
  21. package/dist/fetcher-CakjC9C7.mjs.map +1 -0
  22. package/dist/fetcher-CwnSqc4D.cjs +100 -0
  23. package/dist/fetcher-CwnSqc4D.cjs.map +1 -0
  24. package/dist/fetcher.cjs +3 -115
  25. package/dist/fetcher.d.cts +8 -7
  26. package/dist/fetcher.d.cts.map +1 -1
  27. package/dist/fetcher.d.mts +8 -7
  28. package/dist/fetcher.d.mts.map +1 -1
  29. package/dist/fetcher.mjs +2 -90
  30. package/dist/infer.d.cts +13 -10
  31. package/dist/infer.d.cts.map +1 -1
  32. package/dist/infer.d.mts +13 -10
  33. package/dist/infer.d.mts.map +1 -1
  34. package/dist/infer.mjs +0 -1
  35. package/dist/openapi-hooks.cjs +16 -13
  36. package/dist/openapi-hooks.cjs.map +1 -1
  37. package/dist/openapi-hooks.d.cts +11 -8
  38. package/dist/openapi-hooks.d.cts.map +1 -1
  39. package/dist/openapi-hooks.d.mts +11 -8
  40. package/dist/openapi-hooks.d.mts.map +1 -1
  41. package/dist/openapi-hooks.mjs +12 -9
  42. package/dist/openapi-hooks.mjs.map +1 -1
  43. package/dist/openapi-types.d.cts +6 -5
  44. package/dist/openapi-types.d.cts.map +1 -1
  45. package/dist/openapi-types.d.mts +6 -5
  46. package/dist/openapi-types.d.mts.map +1 -1
  47. package/dist/openapi.cjs +526 -0
  48. package/dist/openapi.cjs.map +1 -0
  49. package/dist/openapi.mjs +501 -0
  50. package/dist/openapi.mjs.map +1 -0
  51. package/dist/react-query.cjs +16 -17
  52. package/dist/react-query.cjs.map +1 -1
  53. package/dist/react-query.d.cts +17 -12
  54. package/dist/react-query.d.cts.map +1 -1
  55. package/dist/react-query.d.mts +17 -12
  56. package/dist/react-query.d.mts.map +1 -1
  57. package/dist/react-query.mjs +9 -10
  58. package/dist/react-query.mjs.map +1 -1
  59. package/dist/types-D8Jrl4o3.d.mts +110 -0
  60. package/dist/types-D8Jrl4o3.d.mts.map +1 -0
  61. package/dist/types-DMQMHePI.d.cts +110 -0
  62. package/dist/types-DMQMHePI.d.cts.map +1 -0
  63. package/dist/types.d.cts +2 -122
  64. package/dist/types.d.mts +2 -122
  65. package/dist/types.mjs +0 -1
  66. package/package.json +15 -31
  67. package/src/__tests__/auth-fetcher.spec.ts +505 -0
  68. package/src/__tests__/endpoint-hooks.spec.tsx +374 -0
  69. package/src/__tests__/fetcher.spec.ts +580 -0
  70. package/src/__tests__/infer.integration.spec.ts +188 -0
  71. package/src/__tests__/infer.spec.ts +189 -0
  72. package/src/__tests__/method-restrictions.spec.tsx +227 -0
  73. package/src/__tests__/mutation-inference.spec.tsx +343 -0
  74. package/src/__tests__/openapi-hooks.spec.tsx +557 -0
  75. package/src/__tests__/react-query-infinite.spec.tsx +1003 -0
  76. package/src/__tests__/react-query-invalidation.spec.tsx +239 -0
  77. package/src/__tests__/react-query.spec.tsx +582 -0
  78. package/src/__tests__/setup.ts +281 -0
  79. package/src/__tests__/types.spec.ts +134 -0
  80. package/src/__tests__/url-parsing.spec.ts +196 -0
  81. package/src/auth-fetcher.ts +288 -0
  82. package/src/endpoint-hooks.ts +346 -0
  83. package/src/fetcher.ts +171 -0
  84. package/src/infer.ts +162 -0
  85. package/src/openapi-hooks.ts +193 -0
  86. package/src/openapi-types.d.ts +440 -0
  87. package/src/openapi.json +595 -0
  88. package/src/react-query.ts +341 -0
  89. package/src/types.ts +226 -0
  90. package/tsconfig.json +12 -0
  91. package/dist/fetcher.cjs.map +0 -1
  92. package/dist/fetcher.mjs.map +0 -1
  93. package/dist/index.cjs +0 -15
  94. package/dist/index.d.cts +0 -7
  95. package/dist/index.d.mts +0 -7
  96. package/dist/index.mjs +0 -7
  97. package/dist/methods.cjs +0 -21
  98. package/dist/methods.cjs.map +0 -1
  99. package/dist/methods.d.cts +0 -23
  100. package/dist/methods.d.cts.map +0 -1
  101. package/dist/methods.d.mts +0 -23
  102. package/dist/methods.d.mts.map +0 -1
  103. package/dist/methods.mjs +0 -19
  104. package/dist/methods.mjs.map +0 -1
  105. package/dist/telemetry-g3BE86Wd.d.cts +0 -68
  106. package/dist/telemetry-g3BE86Wd.d.cts.map +0 -1
  107. package/dist/telemetry-g3BE86Wd.d.mts +0 -68
  108. package/dist/telemetry-g3BE86Wd.d.mts.map +0 -1
  109. package/dist/telemetry.cjs +0 -128
  110. package/dist/telemetry.cjs.map +0 -1
  111. package/dist/telemetry.d.cts +0 -2
  112. package/dist/telemetry.d.mts +0 -2
  113. package/dist/telemetry.mjs +0 -125
  114. package/dist/telemetry.mjs.map +0 -1
  115. package/dist/types.d.cts.map +0 -1
  116. package/dist/types.d.mts.map +0 -1
@@ -1,9 +1,10 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_fetcher = require("./fetcher.cjs");
3
- let _tanstack_react_query = require("@tanstack/react-query");
1
+ const require_chunk = require('./chunk-CUT6urMc.cjs');
2
+ const require_fetcher = require('./fetcher-CwnSqc4D.cjs');
3
+ const __tanstack_react_query = require_chunk.__toESM(require("@tanstack/react-query"));
4
+
4
5
  //#region src/openapi-hooks.ts
5
6
  function createOpenAPIHooks(options = {}) {
6
- const { operations, ...fetcherOptions } = options;
7
+ const { operations,...fetcherOptions } = options;
7
8
  const fetcher = require_fetcher.createTypedFetcher(fetcherOptions);
8
9
  function buildEndpoint(operationId) {
9
10
  const op = operations?.[operationId];
@@ -11,29 +12,31 @@ function createOpenAPIHooks(options = {}) {
11
12
  return operationId;
12
13
  }
13
14
  return {
14
- useQuery: (operationId, config, options) => {
15
+ useQuery: (operationId, config, options$1) => {
15
16
  const endpoint = buildEndpoint(operationId);
16
17
  const queryKey = [operationId, ...config ? [config] : []];
17
- return (0, _tanstack_react_query.useQuery)({
18
+ return (0, __tanstack_react_query.useQuery)({
18
19
  queryKey,
19
20
  queryFn: async () => {
20
- return await fetcher(endpoint, config);
21
+ const response = await fetcher(endpoint, config);
22
+ return response;
21
23
  },
22
- ...options
24
+ ...options$1
23
25
  });
24
26
  },
25
- useMutation: (operationId, options) => {
27
+ useMutation: (operationId, options$1) => {
26
28
  const endpoint = buildEndpoint(operationId);
27
- return (0, _tanstack_react_query.useMutation)({
29
+ return (0, __tanstack_react_query.useMutation)({
28
30
  mutationFn: async (variables) => {
29
- return await fetcher(endpoint, variables);
31
+ const response = await fetcher(endpoint, variables);
32
+ return response;
30
33
  },
31
- ...options
34
+ ...options$1
32
35
  });
33
36
  }
34
37
  };
35
38
  }
39
+
36
40
  //#endregion
37
41
  exports.createOpenAPIHooks = createOpenAPIHooks;
38
-
39
42
  //# sourceMappingURL=openapi-hooks.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"openapi-hooks.cjs","names":["createTypedFetcher","useQuery","useMutation"],"sources":["../src/openapi-hooks.ts"],"sourcesContent":["import type {\n\tUseMutationOptions,\n\tUseQueryOptions,\n} from '@tanstack/react-query';\nimport { useMutation, useQuery } from '@tanstack/react-query';\nimport { createTypedFetcher } from './fetcher';\nimport type { FetcherOptions } from './types';\n\n// Simplified type helpers for OpenAPI paths\ntype HttpMethods = 'get' | 'post' | 'put' | 'patch' | 'delete';\n\n// Extract all operations from paths\ntype AllOperations<Paths> = {\n\t[Path in keyof Paths]: {\n\t\t[Method in keyof Paths[Path] & HttpMethods]: Paths[Path][Method] extends {\n\t\t\toperationId: infer OpId;\n\t\t}\n\t\t\t? OpId extends string\n\t\t\t\t? {\n\t\t\t\t\t\toperationId: OpId;\n\t\t\t\t\t\tpath: Path;\n\t\t\t\t\t\tmethod: Method;\n\t\t\t\t\t\tspec: Paths[Path][Method] & {\n\t\t\t\t\t\t\t_pathParams?: Paths[Path] extends {\n\t\t\t\t\t\t\t\tparameters: { path: infer P };\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t? P\n\t\t\t\t\t\t\t\t: never;\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t: never\n\t\t\t: never;\n\t}[keyof Paths[Path] & HttpMethods];\n}[keyof Paths];\n\n// Create operation map\ntype OperationMap<Paths> = {\n\t[Op in AllOperations<Paths> as Op extends {\n\t\toperationId: infer Id extends string;\n\t}\n\t\t? Id\n\t\t: never]: Op;\n};\n\n// Get operation IDs\ntype OperationId<Paths> = keyof OperationMap<Paths>;\n\n// Get operations by method\ntype OperationsByMethod<Paths, Method extends HttpMethods> = {\n\t[K in OperationId<Paths>]: OperationMap<Paths>[K] extends { method: Method }\n\t\t? K\n\t\t: never;\n}[OperationId<Paths>];\n\n// Extract parameter types\ntype OperationParams<\n\tPaths,\n\tOpId extends OperationId<Paths>,\n> = OperationMap<Paths>[OpId] extends {\n\tpath: infer Path extends keyof Paths;\n\tspec: infer Spec;\n}\n\t? {\n\t\t\tparams?: Paths[Path] extends { parameters: { path: infer P } }\n\t\t\t\t? P\n\t\t\t\t: Spec extends { parameters: { path: infer P } }\n\t\t\t\t\t? P\n\t\t\t\t\t: never;\n\t\t\tquery?: Spec extends { parameters?: { query?: infer Q } } ? Q : never;\n\t\t\tbody?: Spec extends {\n\t\t\t\trequestBody: { content: { 'application/json': infer Body } };\n\t\t\t}\n\t\t\t\t? Body\n\t\t\t\t: Spec extends {\n\t\t\t\t\t\t\trequestBody: {\n\t\t\t\t\t\t\t\trequired: true;\n\t\t\t\t\t\t\t\tcontent: { 'application/json': infer Body };\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t? Body\n\t\t\t\t\t: never;\n\t\t}\n\t: never;\n\n// Extract response type\ntype OperationResponse<\n\tPaths,\n\tOpId extends OperationId<Paths>,\n> = OperationMap<Paths>[OpId] extends { spec: infer Spec }\n\t? Spec extends {\n\t\t\tresponses: { 200: { content: { 'application/json': infer R } } };\n\t\t}\n\t\t? R\n\t\t: Spec extends {\n\t\t\t\t\tresponses: { 201: { content: { 'application/json': infer R } } };\n\t\t\t\t}\n\t\t\t? R\n\t\t\t: Spec extends { responses: { 204: any } }\n\t\t\t\t? undefined\n\t\t\t\t: unknown\n\t: never;\n\n// Remove never properties\ntype RemoveNever<T> = Pick<\n\tT,\n\t{\n\t\t[K in keyof T]: T[K] extends never ? never : K;\n\t}[keyof T]\n>;\n\n// Runtime operation registry (would be generated)\ninterface OperationRegistry {\n\t[operationId: string]: {\n\t\tpath: string;\n\t\tmethod: string;\n\t};\n}\n\nexport function createOpenAPIHooks<Paths>(\n\toptions: FetcherOptions & { operations?: OperationRegistry } = {},\n) {\n\tconst { operations, ...fetcherOptions } = options;\n\tconst fetcher = createTypedFetcher<Paths>(fetcherOptions);\n\n\tfunction buildEndpoint<OpId extends OperationId<Paths>>(\n\t\toperationId: OpId,\n\t): string {\n\t\t// Runtime lookup from registry\n\t\tconst op = operations?.[operationId as string];\n\t\tif (op) {\n\t\t\treturn `${op.method.toUpperCase()} ${op.path}`;\n\t\t}\n\t\t// Fallback for compile-time only usage\n\t\treturn operationId as string;\n\t}\n\n\treturn {\n\t\tuseQuery: <OpId extends OperationsByMethod<Paths, 'get'>>(\n\t\t\toperationId: OpId,\n\t\t\tconfig?: RemoveNever<OperationParams<Paths, OpId>>,\n\t\t\toptions?: Omit<\n\t\t\t\tUseQueryOptions<OperationResponse<Paths, OpId>, Error>,\n\t\t\t\t'queryKey' | 'queryFn'\n\t\t\t>,\n\t\t) => {\n\t\t\tconst endpoint = buildEndpoint(operationId);\n\t\t\tconst queryKey = [operationId, ...(config ? [config] : [])];\n\n\t\t\treturn useQuery<OperationResponse<Paths, OpId>, Error>({\n\t\t\t\tqueryKey,\n\t\t\t\tqueryFn: async () => {\n\t\t\t\t\tconst response = await fetcher(endpoint as any, config as any);\n\t\t\t\t\treturn response as OperationResponse<Paths, OpId>;\n\t\t\t\t},\n\t\t\t\t...options,\n\t\t\t});\n\t\t},\n\n\t\tuseMutation: <\n\t\t\tOpId extends Exclude<\n\t\t\t\tOperationId<Paths>,\n\t\t\t\tOperationsByMethod<Paths, 'get'>\n\t\t\t>,\n\t\t>(\n\t\t\toperationId: OpId,\n\t\t\toptions?: Omit<\n\t\t\t\tUseMutationOptions<\n\t\t\t\t\tOperationResponse<Paths, OpId>,\n\t\t\t\t\tError,\n\t\t\t\t\tRemoveNever<OperationParams<Paths, OpId>>\n\t\t\t\t>,\n\t\t\t\t'mutationFn'\n\t\t\t>,\n\t\t) => {\n\t\t\tconst endpoint = buildEndpoint(operationId);\n\n\t\t\treturn useMutation<\n\t\t\t\tOperationResponse<Paths, OpId>,\n\t\t\t\tError,\n\t\t\t\tRemoveNever<OperationParams<Paths, OpId>>\n\t\t\t>({\n\t\t\t\tmutationFn: async (variables) => {\n\t\t\t\t\tconst response = await fetcher(endpoint as any, variables as any);\n\t\t\t\t\treturn response as OperationResponse<Paths, OpId>;\n\t\t\t\t},\n\t\t\t\t...options,\n\t\t\t});\n\t\t},\n\t};\n}\n"],"mappings":";;;;AAsHA,SAAgB,mBACf,UAA+D,CAAC,GAC/D;CACD,MAAM,EAAE,YAAY,GAAG,mBAAmB;CAC1C,MAAM,UAAUA,gBAAAA,mBAA0B,cAAc;CAExD,SAAS,cACR,aACS;EAET,MAAM,KAAK,aAAa;EACxB,IAAI,IACH,OAAO,GAAG,GAAG,OAAO,YAAY,EAAE,GAAG,GAAG;EAGzC,OAAO;CACR;CAEA,OAAO;EACN,WACC,aACA,QACA,YAII;GACJ,MAAM,WAAW,cAAc,WAAW;GAC1C,MAAM,WAAW,CAAC,aAAa,GAAI,SAAS,CAAC,MAAM,IAAI,CAAC,CAAE;GAE1D,QAAA,GAAOC,sBAAAA,SAAAA,CAAgD;IACtD;IACA,SAAS,YAAY;KAEpB,OAAO,MADgB,QAAQ,UAAiB,MAAa;IAE9D;IACA,GAAG;GACJ,CAAC;EACF;EAEA,cAMC,aACA,YAQI;GACJ,MAAM,WAAW,cAAc,WAAW;GAE1C,QAAA,GAAOC,sBAAAA,YAAAA,CAIL;IACD,YAAY,OAAO,cAAc;KAEhC,OAAO,MADgB,QAAQ,UAAiB,SAAgB;IAEjE;IACA,GAAG;GACJ,CAAC;EACF;CACD;AACD"}
1
+ {"version":3,"file":"openapi-hooks.cjs","names":["options: FetcherOptions & { operations?: OperationRegistry }","operationId: OpId","config?: RemoveNever<OperationParams<Paths, OpId>>","options?: Omit<\n\t\t\t\tUseQueryOptions<OperationResponse<Paths, OpId>, Error>,\n\t\t\t\t'queryKey' | 'queryFn'\n\t\t\t>","options","options?: Omit<\n\t\t\t\tUseMutationOptions<\n\t\t\t\t\tOperationResponse<Paths, OpId>,\n\t\t\t\t\tError,\n\t\t\t\t\tRemoveNever<OperationParams<Paths, OpId>>\n\t\t\t\t>,\n\t\t\t\t'mutationFn'\n\t\t\t>"],"sources":["../src/openapi-hooks.ts"],"sourcesContent":["import type {\n\tUseMutationOptions,\n\tUseQueryOptions,\n} from '@tanstack/react-query';\nimport { useMutation, useQuery } from '@tanstack/react-query';\nimport { createTypedFetcher } from './fetcher';\nimport type { FetcherOptions } from './types';\n\n// Simplified type helpers for OpenAPI paths\ntype HttpMethods = 'get' | 'post' | 'put' | 'patch' | 'delete';\n\n// Extract all operations from paths\ntype AllOperations<Paths> = {\n\t[Path in keyof Paths]: {\n\t\t[Method in keyof Paths[Path] & HttpMethods]: Paths[Path][Method] extends {\n\t\t\toperationId: infer OpId;\n\t\t}\n\t\t\t? OpId extends string\n\t\t\t\t? {\n\t\t\t\t\t\toperationId: OpId;\n\t\t\t\t\t\tpath: Path;\n\t\t\t\t\t\tmethod: Method;\n\t\t\t\t\t\tspec: Paths[Path][Method] & {\n\t\t\t\t\t\t\t_pathParams?: Paths[Path] extends {\n\t\t\t\t\t\t\t\tparameters: { path: infer P };\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t? P\n\t\t\t\t\t\t\t\t: never;\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t: never\n\t\t\t: never;\n\t}[keyof Paths[Path] & HttpMethods];\n}[keyof Paths];\n\n// Create operation map\ntype OperationMap<Paths> = {\n\t[Op in AllOperations<Paths> as Op extends {\n\t\toperationId: infer Id extends string;\n\t}\n\t\t? Id\n\t\t: never]: Op;\n};\n\n// Get operation IDs\ntype OperationId<Paths> = keyof OperationMap<Paths>;\n\n// Get operations by method\ntype OperationsByMethod<Paths, Method extends HttpMethods> = {\n\t[K in OperationId<Paths>]: OperationMap<Paths>[K] extends { method: Method }\n\t\t? K\n\t\t: never;\n}[OperationId<Paths>];\n\n// Extract parameter types\ntype OperationParams<\n\tPaths,\n\tOpId extends OperationId<Paths>,\n> = OperationMap<Paths>[OpId] extends {\n\tpath: infer Path extends keyof Paths;\n\tspec: infer Spec;\n}\n\t? {\n\t\t\tparams?: Paths[Path] extends { parameters: { path: infer P } }\n\t\t\t\t? P\n\t\t\t\t: Spec extends { parameters: { path: infer P } }\n\t\t\t\t\t? P\n\t\t\t\t\t: never;\n\t\t\tquery?: Spec extends { parameters?: { query?: infer Q } } ? Q : never;\n\t\t\tbody?: Spec extends {\n\t\t\t\trequestBody: { content: { 'application/json': infer Body } };\n\t\t\t}\n\t\t\t\t? Body\n\t\t\t\t: Spec extends {\n\t\t\t\t\t\t\trequestBody: {\n\t\t\t\t\t\t\t\trequired: true;\n\t\t\t\t\t\t\t\tcontent: { 'application/json': infer Body };\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t? Body\n\t\t\t\t\t: never;\n\t\t}\n\t: never;\n\n// Extract response type\ntype OperationResponse<\n\tPaths,\n\tOpId extends OperationId<Paths>,\n> = OperationMap<Paths>[OpId] extends { spec: infer Spec }\n\t? Spec extends {\n\t\t\tresponses: { 200: { content: { 'application/json': infer R } } };\n\t\t}\n\t\t? R\n\t\t: Spec extends {\n\t\t\t\t\tresponses: { 201: { content: { 'application/json': infer R } } };\n\t\t\t\t}\n\t\t\t? R\n\t\t\t: Spec extends { responses: { 204: any } }\n\t\t\t\t? undefined\n\t\t\t\t: unknown\n\t: never;\n\n// Remove never properties\ntype RemoveNever<T> = Pick<\n\tT,\n\t{\n\t\t[K in keyof T]: T[K] extends never ? never : K;\n\t}[keyof T]\n>;\n\n// Check if type is empty\ntype IsEmpty<T> = keyof T extends never ? true : false;\n\n// Runtime operation registry (would be generated)\ninterface OperationRegistry {\n\t[operationId: string]: {\n\t\tpath: string;\n\t\tmethod: string;\n\t};\n}\n\nexport function createOpenAPIHooks<Paths>(\n\toptions: FetcherOptions & { operations?: OperationRegistry } = {},\n) {\n\tconst { operations, ...fetcherOptions } = options;\n\tconst fetcher = createTypedFetcher<Paths>(fetcherOptions);\n\n\tfunction buildEndpoint<OpId extends OperationId<Paths>>(\n\t\toperationId: OpId,\n\t): string {\n\t\t// Runtime lookup from registry\n\t\tconst op = operations?.[operationId as string];\n\t\tif (op) {\n\t\t\treturn `${op.method.toUpperCase()} ${op.path}`;\n\t\t}\n\t\t// Fallback for compile-time only usage\n\t\treturn operationId as string;\n\t}\n\n\treturn {\n\t\tuseQuery: <OpId extends OperationsByMethod<Paths, 'get'>>(\n\t\t\toperationId: OpId,\n\t\t\tconfig?: RemoveNever<OperationParams<Paths, OpId>>,\n\t\t\toptions?: Omit<\n\t\t\t\tUseQueryOptions<OperationResponse<Paths, OpId>, Error>,\n\t\t\t\t'queryKey' | 'queryFn'\n\t\t\t>,\n\t\t) => {\n\t\t\tconst endpoint = buildEndpoint(operationId);\n\t\t\tconst queryKey = [operationId, ...(config ? [config] : [])];\n\n\t\t\treturn useQuery<OperationResponse<Paths, OpId>, Error>({\n\t\t\t\tqueryKey,\n\t\t\t\tqueryFn: async () => {\n\t\t\t\t\tconst response = await fetcher(endpoint as any, config as any);\n\t\t\t\t\treturn response as OperationResponse<Paths, OpId>;\n\t\t\t\t},\n\t\t\t\t...options,\n\t\t\t});\n\t\t},\n\n\t\tuseMutation: <\n\t\t\tOpId extends Exclude<\n\t\t\t\tOperationId<Paths>,\n\t\t\t\tOperationsByMethod<Paths, 'get'>\n\t\t\t>,\n\t\t>(\n\t\t\toperationId: OpId,\n\t\t\toptions?: Omit<\n\t\t\t\tUseMutationOptions<\n\t\t\t\t\tOperationResponse<Paths, OpId>,\n\t\t\t\t\tError,\n\t\t\t\t\tRemoveNever<OperationParams<Paths, OpId>>\n\t\t\t\t>,\n\t\t\t\t'mutationFn'\n\t\t\t>,\n\t\t) => {\n\t\t\tconst endpoint = buildEndpoint(operationId);\n\n\t\t\treturn useMutation<\n\t\t\t\tOperationResponse<Paths, OpId>,\n\t\t\t\tError,\n\t\t\t\tRemoveNever<OperationParams<Paths, OpId>>\n\t\t\t>({\n\t\t\t\tmutationFn: async (variables) => {\n\t\t\t\t\tconst response = await fetcher(endpoint as any, variables as any);\n\t\t\t\t\treturn response as OperationResponse<Paths, OpId>;\n\t\t\t\t},\n\t\t\t\t...options,\n\t\t\t});\n\t\t},\n\t};\n}\n"],"mappings":";;;;;AAyHA,SAAgB,mBACfA,UAA+D,CAAE,GAChE;CACD,MAAM,EAAE,WAAY,GAAG,gBAAgB,GAAG;CAC1C,MAAM,UAAU,mCAA0B,eAAe;CAEzD,SAAS,cACRC,aACS;EAET,MAAM,KAAK,aAAa;AACxB,MAAI,GACH,SAAQ,EAAE,GAAG,OAAO,aAAa,CAAC,GAAG,GAAG,KAAK;AAG9C,SAAO;CACP;AAED,QAAO;EACN,UAAU,CACTA,aACAC,QACAC,cAII;GACJ,MAAM,WAAW,cAAc,YAAY;GAC3C,MAAM,WAAW,CAAC,aAAa,GAAI,SAAS,CAAC,MAAO,IAAG,CAAE,CAAE;AAE3D,UAAO,qCAAgD;IACtD;IACA,SAAS,YAAY;KACpB,MAAM,WAAW,MAAM,QAAQ,UAAiB,OAAc;AAC9D,YAAO;IACP;IACD,GAAGC;GACH,EAAC;EACF;EAED,aAAa,CAMZH,aACAI,cAQI;GACJ,MAAM,WAAW,cAAc,YAAY;AAE3C,UAAO,wCAIL;IACD,YAAY,OAAO,cAAc;KAChC,MAAM,WAAW,MAAM,QAAQ,UAAiB,UAAiB;AACjE,YAAO;IACP;IACD,GAAGD;GACH,EAAC;EACF;CACD;AACD"}
@@ -1,5 +1,7 @@
1
- import { FetcherOptions } from "./types.cjs";
1
+ import { FetcherOptions } from "./types-DMQMHePI.cjs";
2
+ import * as _tanstack_react_query0 from "@tanstack/react-query";
2
3
  import { UseMutationOptions, UseQueryOptions } from "@tanstack/react-query";
4
+
3
5
  //#region src/openapi-hooks.d.ts
4
6
  type HttpMethods = 'get' | 'post' | 'put' | 'patch' | 'delete';
5
7
  type AllOperations<Paths> = { [Path in keyof Paths]: { [Method in keyof Paths[Path] & HttpMethods]: Paths[Path][Method] extends {
@@ -15,14 +17,14 @@ type AllOperations<Paths> = { [Path in keyof Paths]: { [Method in keyof Paths[Pa
15
17
  };
16
18
  } ? P : never;
17
19
  };
18
- } : never : never; }[keyof Paths[Path] & HttpMethods]; }[keyof Paths];
20
+ } : never : never }[keyof Paths[Path] & HttpMethods] }[keyof Paths];
19
21
  type OperationMap<Paths> = { [Op in AllOperations<Paths> as Op extends {
20
22
  operationId: infer Id extends string;
21
- } ? Id : never]: Op; };
23
+ } ? Id : never]: Op };
22
24
  type OperationId<Paths> = keyof OperationMap<Paths>;
23
25
  type OperationsByMethod<Paths, Method extends HttpMethods> = { [K in OperationId<Paths>]: OperationMap<Paths>[K] extends {
24
26
  method: Method;
25
- } ? K : never; }[OperationId<Paths>];
27
+ } ? K : never }[OperationId<Paths>];
26
28
  type OperationParams<Paths, OpId extends OperationId<Paths>> = OperationMap<Paths>[OpId] extends {
27
29
  path: infer Path extends keyof Paths;
28
30
  spec: infer Spec;
@@ -79,18 +81,19 @@ type OperationResponse<Paths, OpId extends OperationId<Paths>> = OperationMap<Pa
79
81
  204: any;
80
82
  };
81
83
  } ? undefined : unknown : never;
82
- type RemoveNever<T> = Pick<T, { [K in keyof T]: T[K] extends never ? never : K; }[keyof T]>;
84
+ type RemoveNever<T> = Pick<T, { [K in keyof T]: T[K] extends never ? never : K }[keyof T]>;
83
85
  interface OperationRegistry {
84
86
  [operationId: string]: {
85
87
  path: string;
86
88
  method: string;
87
89
  };
88
90
  }
89
- export declare function createOpenAPIHooks<Paths>(options?: FetcherOptions & {
91
+ declare function createOpenAPIHooks<Paths>(options?: FetcherOptions & {
90
92
  operations?: OperationRegistry;
91
93
  }): {
92
- useQuery: <OpId extends OperationsByMethod<Paths, 'get'>>(operationId: OpId, config?: RemoveNever<OperationParams<Paths, OpId>>, options?: Omit<UseQueryOptions<OperationResponse<Paths, OpId>, Error>, 'queryKey' | 'queryFn'>) => import("@tanstack/react-query").UseQueryResult<OperationResponse<Paths, OpId>, Error>;
93
- useMutation: <OpId extends Exclude<OperationId<Paths>, OperationsByMethod<Paths, 'get'>>>(operationId: OpId, options?: Omit<UseMutationOptions<OperationResponse<Paths, OpId>, Error, RemoveNever<OperationParams<Paths, OpId>>>, 'mutationFn'>) => import("@tanstack/react-query").UseMutationResult<OperationResponse<Paths, OpId>, Error, RemoveNever<OperationParams<Paths, OpId>>, unknown>;
94
+ useQuery: <OpId extends OperationsByMethod<Paths, "get">>(operationId: OpId, config?: RemoveNever<OperationParams<Paths, OpId>>, options?: Omit<UseQueryOptions<OperationResponse<Paths, OpId>, Error>, "queryKey" | "queryFn">) => _tanstack_react_query0.UseQueryResult<_tanstack_react_query0.NoInfer<OperationResponse<Paths, OpId>>, Error>;
95
+ useMutation: <OpId extends Exclude<OperationId<Paths>, OperationsByMethod<Paths, "get">>>(operationId: OpId, options?: Omit<UseMutationOptions<OperationResponse<Paths, OpId>, Error, RemoveNever<OperationParams<Paths, OpId>>>, "mutationFn">) => _tanstack_react_query0.UseMutationResult<OperationResponse<Paths, OpId>, Error, RemoveNever<OperationParams<Paths, OpId>>, unknown>;
94
96
  };
95
97
  //#endregion
98
+ export { createOpenAPIHooks };
96
99
  //# sourceMappingURL=openapi-hooks.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"openapi-hooks.d.cts","names":[],"sources":["../src/openapi-hooks.ts"],"mappings":";;;KASK;KAGA,cAAc,YACjB,cAAc,WACb,gBAAgB,MAAM,QAAQ,cAAc,MAAM,MAAM;EACxD,mBAAmB;IAEjB;EAEC,aAAa;EACb,MAAM;EACN,QAAQ;EACR,MAAM,MAAM,MAAM;IACjB,cAAc,MAAM;MACnB;QAAc,YAAY;;QAExB;;2BAMD,MAAM,QAAQ,sBACf;KAGH,aAAa,YAChB,MAAM,cAAc,UAAU;EAC9B,mBAAmB;IAEjB,aACQ;KAIP,YAAY,eAAe,aAAa;KAGxC,mBAAmB,OAAO,eAAe,kBAC5C,KAAK,YAAY,SAAS,aAAa,OAAO;EAAa,QAAQ;IACjE,aAEF,YAAY;KAGT,gBACJ,OACA,aAAa,YAAY,UACtB,aAAa,OAAO;EACvB,YAAY,mBAAmB;EAC/B,YAAY;;EAGV,SAAS,MAAM;IAAgB;MAAc,YAAY;;MACtD,IACA;IAAe;MAAc,YAAY;;MACxC;EAEJ,QAAQ;IAAe;MAAe,cAAc;;MAAQ;EAC5D,OAAO;IACN;MAAe;QAAW,0BAA0B;;;MAElD,OACA;IACC;MACC;MACA;QAAW,0BAA0B;;;MAGtC;;KAMF,kBACJ,OACA,aAAa,YAAY,UACtB,aAAa,OAAO;EAAgB,YAAY;IACjD;EACA;IAAa;MAAO;QAAW,0BAA0B;;;;IAExD,IACA;EACC;IAAa;MAAO;QAAW,0BAA0B;;;;IAEzD,IACA;EAAe;IAAa;;;KAM5B,YAAY,KAAK,KACrB,MAEE,WAAW,IAAI,EAAE,2BAA2B,WACtC;UAIC;GACR;IACA;IACA;;;wBAIc,mBAAmB,OAClC,UAAS;EAAmB,aAAa;;EAkBxC,WAAW,aAAa,mBAAmB,eAAa,aAC1C,MAAI,SACR,YAAY,gBAAgB,OAAO,QAAM,UACxC,KACT,gBAAgB,kBAAkB,OAAO,OAAO,oEAEhD,eAAA,kBAAA,OAAA,OAAA;EAeF,cACC,aAAa,QACZ,YAAY,QACZ,mBAAmB,gBACnB,aAEY,MAAI,UACP,KACT,mBACC,kBAAkB,OAAO,OACzB,OACA,YAAY,gBAAgB,OAAO,2DAGpC,kBAAA,kBAAA,OAAA,OAAA,OAAA,YAAA,gBAAA,OAAA"}
1
+ {"version":3,"file":"openapi-hooks.d.cts","names":[],"sources":["../src/openapi-hooks.ts"],"sourcesContent":[],"mappings":";;;;;KASK,WAAA;KAGA,wCACW,qBAJA,MAKG,KALH,CAKS,IALT,CAAA,GAKiB,WALjB,GAK+B,KAL/B,CAKqC,IALrC,CAAA,CAK2C,MAL3C,CAAA,SAAA;EAGX,WAAa,EAAA,KAAA,KAAA;AAAA,CAAA,GAKb,IALa,SAAA,MAAA,GAAA;EACF,WAAA,EAMG,IANH;EACG,IAAA,EAMP,IANO;EAAM,MAAA,EAOX,MAPW;EAAQ,IAAA,EAQrB,KARqB,CAQf,IARe,CAAA,CAQT,MARS,CAAA,GAAA;IAAc,WAAA,CAAA,EAS1B,KAT0B,CASpB,IAToB,CAAA,SAAA;MAAM,UAAA,EAAA;QAAM,IAAA,EAAA,KAAA,EAAA;MAGtD,CAAA;IAEc,CA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,iBAtD8B,CAsD9B,iBAtD8B,CAsD9B,KAtD8B,EAsD9B,IAtD8B,CAAA,EAsD9B,KAtD8B,EAsD9B,WAtD8B,CAsD9B,eAtD8B,CAsD9B,KAtD8B,EAsD9B,IAtD8B,CAAA,CAAA,EAAA,OAAA,CAAA;CAAA"}
@@ -1,5 +1,7 @@
1
- import { FetcherOptions } from "./types.mjs";
1
+ import { FetcherOptions } from "./types-D8Jrl4o3.mjs";
2
+ import * as _tanstack_react_query0 from "@tanstack/react-query";
2
3
  import { UseMutationOptions, UseQueryOptions } from "@tanstack/react-query";
4
+
3
5
  //#region src/openapi-hooks.d.ts
4
6
  type HttpMethods = 'get' | 'post' | 'put' | 'patch' | 'delete';
5
7
  type AllOperations<Paths> = { [Path in keyof Paths]: { [Method in keyof Paths[Path] & HttpMethods]: Paths[Path][Method] extends {
@@ -15,14 +17,14 @@ type AllOperations<Paths> = { [Path in keyof Paths]: { [Method in keyof Paths[Pa
15
17
  };
16
18
  } ? P : never;
17
19
  };
18
- } : never : never; }[keyof Paths[Path] & HttpMethods]; }[keyof Paths];
20
+ } : never : never }[keyof Paths[Path] & HttpMethods] }[keyof Paths];
19
21
  type OperationMap<Paths> = { [Op in AllOperations<Paths> as Op extends {
20
22
  operationId: infer Id extends string;
21
- } ? Id : never]: Op; };
23
+ } ? Id : never]: Op };
22
24
  type OperationId<Paths> = keyof OperationMap<Paths>;
23
25
  type OperationsByMethod<Paths, Method extends HttpMethods> = { [K in OperationId<Paths>]: OperationMap<Paths>[K] extends {
24
26
  method: Method;
25
- } ? K : never; }[OperationId<Paths>];
27
+ } ? K : never }[OperationId<Paths>];
26
28
  type OperationParams<Paths, OpId extends OperationId<Paths>> = OperationMap<Paths>[OpId] extends {
27
29
  path: infer Path extends keyof Paths;
28
30
  spec: infer Spec;
@@ -79,18 +81,19 @@ type OperationResponse<Paths, OpId extends OperationId<Paths>> = OperationMap<Pa
79
81
  204: any;
80
82
  };
81
83
  } ? undefined : unknown : never;
82
- type RemoveNever<T> = Pick<T, { [K in keyof T]: T[K] extends never ? never : K; }[keyof T]>;
84
+ type RemoveNever<T> = Pick<T, { [K in keyof T]: T[K] extends never ? never : K }[keyof T]>;
83
85
  interface OperationRegistry {
84
86
  [operationId: string]: {
85
87
  path: string;
86
88
  method: string;
87
89
  };
88
90
  }
89
- export declare function createOpenAPIHooks<Paths>(options?: FetcherOptions & {
91
+ declare function createOpenAPIHooks<Paths>(options?: FetcherOptions & {
90
92
  operations?: OperationRegistry;
91
93
  }): {
92
- useQuery: <OpId extends OperationsByMethod<Paths, 'get'>>(operationId: OpId, config?: RemoveNever<OperationParams<Paths, OpId>>, options?: Omit<UseQueryOptions<OperationResponse<Paths, OpId>, Error>, 'queryKey' | 'queryFn'>) => import("@tanstack/react-query").UseQueryResult<OperationResponse<Paths, OpId>, Error>;
93
- useMutation: <OpId extends Exclude<OperationId<Paths>, OperationsByMethod<Paths, 'get'>>>(operationId: OpId, options?: Omit<UseMutationOptions<OperationResponse<Paths, OpId>, Error, RemoveNever<OperationParams<Paths, OpId>>>, 'mutationFn'>) => import("@tanstack/react-query").UseMutationResult<OperationResponse<Paths, OpId>, Error, RemoveNever<OperationParams<Paths, OpId>>, unknown>;
94
+ useQuery: <OpId extends OperationsByMethod<Paths, "get">>(operationId: OpId, config?: RemoveNever<OperationParams<Paths, OpId>>, options?: Omit<UseQueryOptions<OperationResponse<Paths, OpId>, Error>, "queryKey" | "queryFn">) => _tanstack_react_query0.UseQueryResult<_tanstack_react_query0.NoInfer<OperationResponse<Paths, OpId>>, Error>;
95
+ useMutation: <OpId extends Exclude<OperationId<Paths>, OperationsByMethod<Paths, "get">>>(operationId: OpId, options?: Omit<UseMutationOptions<OperationResponse<Paths, OpId>, Error, RemoveNever<OperationParams<Paths, OpId>>>, "mutationFn">) => _tanstack_react_query0.UseMutationResult<OperationResponse<Paths, OpId>, Error, RemoveNever<OperationParams<Paths, OpId>>, unknown>;
94
96
  };
95
97
  //#endregion
98
+ export { createOpenAPIHooks };
96
99
  //# sourceMappingURL=openapi-hooks.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"openapi-hooks.d.mts","names":[],"sources":["../src/openapi-hooks.ts"],"mappings":";;;KASK;KAGA,cAAc,YACjB,cAAc,WACb,gBAAgB,MAAM,QAAQ,cAAc,MAAM,MAAM;EACxD,mBAAmB;IAEjB;EAEC,aAAa;EACb,MAAM;EACN,QAAQ;EACR,MAAM,MAAM,MAAM;IACjB,cAAc,MAAM;MACnB;QAAc,YAAY;;QAExB;;2BAMD,MAAM,QAAQ,sBACf;KAGH,aAAa,YAChB,MAAM,cAAc,UAAU;EAC9B,mBAAmB;IAEjB,aACQ;KAIP,YAAY,eAAe,aAAa;KAGxC,mBAAmB,OAAO,eAAe,kBAC5C,KAAK,YAAY,SAAS,aAAa,OAAO;EAAa,QAAQ;IACjE,aAEF,YAAY;KAGT,gBACJ,OACA,aAAa,YAAY,UACtB,aAAa,OAAO;EACvB,YAAY,mBAAmB;EAC/B,YAAY;;EAGV,SAAS,MAAM;IAAgB;MAAc,YAAY;;MACtD,IACA;IAAe;MAAc,YAAY;;MACxC;EAEJ,QAAQ;IAAe;MAAe,cAAc;;MAAQ;EAC5D,OAAO;IACN;MAAe;QAAW,0BAA0B;;;MAElD,OACA;IACC;MACC;MACA;QAAW,0BAA0B;;;MAGtC;;KAMF,kBACJ,OACA,aAAa,YAAY,UACtB,aAAa,OAAO;EAAgB,YAAY;IACjD;EACA;IAAa;MAAO;QAAW,0BAA0B;;;;IAExD,IACA;EACC;IAAa;MAAO;QAAW,0BAA0B;;;;IAEzD,IACA;EAAe;IAAa;;;KAM5B,YAAY,KAAK,KACrB,MAEE,WAAW,IAAI,EAAE,2BAA2B,WACtC;UAIC;GACR;IACA;IACA;;;wBAIc,mBAAmB,OAClC,UAAS;EAAmB,aAAa;;EAkBxC,WAAW,aAAa,mBAAmB,eAAa,aAC1C,MAAI,SACR,YAAY,gBAAgB,OAAO,QAAM,UACxC,KACT,gBAAgB,kBAA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B,CAqBV,eArBU,CAqBM,KArBN,EAqBa,IArBb,CAAA,CAAA,EAAA,OAAA,CAAA,EAsBrB,IAtBqB,CAuB9B,eAvB8B,CAuBd,iBAvBc,CAuBI,KAvBJ,EAuBW,IAvBX,CAAA,EAuBkB,KAvBlB,CAAA,EAAA,UAAA,GAAA,SAAA,CAAA,EAAA,GAyB9B,sBAAA,CAAA,cAzB8B,CAyB9B,sBAAA,CAAA,OAzB8B,CAyB9B,iBAzB8B,CAyB9B,KAzB8B,EAyB9B,IAzB8B,CAAA,CAAA,EAyB9B,KAzB8B,CAAA;EAAA,WAAA,EAAA,CAAA,aAyClB,OAzCkB,CA0C9B,WA1C8B,CA0ClB,KA1CkB,CAAA,EA2C9B,kBA3C8B,CA2CX,KA3CW,EAAA,KAAA,CAAA,CAAA,CAAA,CAAA,WAAA,EA8ClB,IA9CkB,EAAA,OAAA,CAAA,EA+CrB,IA/CqB,CAgD9B,kBAhD8B,CAiD7B,iBAjD6B,CAiDX,KAjDW,EAiDJ,IAjDI,CAAA,EAkD7B,KAlD6B,EAmD7B,WAnD6B,CAmDjB,eAnDiB,CAmDD,KAnDC,EAmDM,IAnDN,CAAA,CAAA,CAAA,EAAA,YAAA,CAAA,EAAA,GAsD9B,sBAAA,CAAA,iBAtD8B,CAsD9B,iBAtD8B,CAsD9B,KAtD8B,EAsD9B,IAtD8B,CAAA,EAsD9B,KAtD8B,EAsD9B,WAtD8B,CAsD9B,eAtD8B,CAsD9B,KAtD8B,EAsD9B,IAtD8B,CAAA,CAAA,EAAA,OAAA,CAAA;CAAA"}
@@ -1,8 +1,9 @@
1
- import { createTypedFetcher } from "./fetcher.mjs";
1
+ import { createTypedFetcher } from "./fetcher-CakjC9C7.mjs";
2
2
  import { useMutation, useQuery } from "@tanstack/react-query";
3
+
3
4
  //#region src/openapi-hooks.ts
4
5
  function createOpenAPIHooks(options = {}) {
5
- const { operations, ...fetcherOptions } = options;
6
+ const { operations,...fetcherOptions } = options;
6
7
  const fetcher = createTypedFetcher(fetcherOptions);
7
8
  function buildEndpoint(operationId) {
8
9
  const op = operations?.[operationId];
@@ -10,29 +11,31 @@ function createOpenAPIHooks(options = {}) {
10
11
  return operationId;
11
12
  }
12
13
  return {
13
- useQuery: (operationId, config, options) => {
14
+ useQuery: (operationId, config, options$1) => {
14
15
  const endpoint = buildEndpoint(operationId);
15
16
  const queryKey = [operationId, ...config ? [config] : []];
16
17
  return useQuery({
17
18
  queryKey,
18
19
  queryFn: async () => {
19
- return await fetcher(endpoint, config);
20
+ const response = await fetcher(endpoint, config);
21
+ return response;
20
22
  },
21
- ...options
23
+ ...options$1
22
24
  });
23
25
  },
24
- useMutation: (operationId, options) => {
26
+ useMutation: (operationId, options$1) => {
25
27
  const endpoint = buildEndpoint(operationId);
26
28
  return useMutation({
27
29
  mutationFn: async (variables) => {
28
- return await fetcher(endpoint, variables);
30
+ const response = await fetcher(endpoint, variables);
31
+ return response;
29
32
  },
30
- ...options
33
+ ...options$1
31
34
  });
32
35
  }
33
36
  };
34
37
  }
38
+
35
39
  //#endregion
36
40
  export { createOpenAPIHooks };
37
-
38
41
  //# sourceMappingURL=openapi-hooks.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"openapi-hooks.mjs","names":[],"sources":["../src/openapi-hooks.ts"],"sourcesContent":["import type {\n\tUseMutationOptions,\n\tUseQueryOptions,\n} from '@tanstack/react-query';\nimport { useMutation, useQuery } from '@tanstack/react-query';\nimport { createTypedFetcher } from './fetcher';\nimport type { FetcherOptions } from './types';\n\n// Simplified type helpers for OpenAPI paths\ntype HttpMethods = 'get' | 'post' | 'put' | 'patch' | 'delete';\n\n// Extract all operations from paths\ntype AllOperations<Paths> = {\n\t[Path in keyof Paths]: {\n\t\t[Method in keyof Paths[Path] & HttpMethods]: Paths[Path][Method] extends {\n\t\t\toperationId: infer OpId;\n\t\t}\n\t\t\t? OpId extends string\n\t\t\t\t? {\n\t\t\t\t\t\toperationId: OpId;\n\t\t\t\t\t\tpath: Path;\n\t\t\t\t\t\tmethod: Method;\n\t\t\t\t\t\tspec: Paths[Path][Method] & {\n\t\t\t\t\t\t\t_pathParams?: Paths[Path] extends {\n\t\t\t\t\t\t\t\tparameters: { path: infer P };\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t? P\n\t\t\t\t\t\t\t\t: never;\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t: never\n\t\t\t: never;\n\t}[keyof Paths[Path] & HttpMethods];\n}[keyof Paths];\n\n// Create operation map\ntype OperationMap<Paths> = {\n\t[Op in AllOperations<Paths> as Op extends {\n\t\toperationId: infer Id extends string;\n\t}\n\t\t? Id\n\t\t: never]: Op;\n};\n\n// Get operation IDs\ntype OperationId<Paths> = keyof OperationMap<Paths>;\n\n// Get operations by method\ntype OperationsByMethod<Paths, Method extends HttpMethods> = {\n\t[K in OperationId<Paths>]: OperationMap<Paths>[K] extends { method: Method }\n\t\t? K\n\t\t: never;\n}[OperationId<Paths>];\n\n// Extract parameter types\ntype OperationParams<\n\tPaths,\n\tOpId extends OperationId<Paths>,\n> = OperationMap<Paths>[OpId] extends {\n\tpath: infer Path extends keyof Paths;\n\tspec: infer Spec;\n}\n\t? {\n\t\t\tparams?: Paths[Path] extends { parameters: { path: infer P } }\n\t\t\t\t? P\n\t\t\t\t: Spec extends { parameters: { path: infer P } }\n\t\t\t\t\t? P\n\t\t\t\t\t: never;\n\t\t\tquery?: Spec extends { parameters?: { query?: infer Q } } ? Q : never;\n\t\t\tbody?: Spec extends {\n\t\t\t\trequestBody: { content: { 'application/json': infer Body } };\n\t\t\t}\n\t\t\t\t? Body\n\t\t\t\t: Spec extends {\n\t\t\t\t\t\t\trequestBody: {\n\t\t\t\t\t\t\t\trequired: true;\n\t\t\t\t\t\t\t\tcontent: { 'application/json': infer Body };\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t? Body\n\t\t\t\t\t: never;\n\t\t}\n\t: never;\n\n// Extract response type\ntype OperationResponse<\n\tPaths,\n\tOpId extends OperationId<Paths>,\n> = OperationMap<Paths>[OpId] extends { spec: infer Spec }\n\t? Spec extends {\n\t\t\tresponses: { 200: { content: { 'application/json': infer R } } };\n\t\t}\n\t\t? R\n\t\t: Spec extends {\n\t\t\t\t\tresponses: { 201: { content: { 'application/json': infer R } } };\n\t\t\t\t}\n\t\t\t? R\n\t\t\t: Spec extends { responses: { 204: any } }\n\t\t\t\t? undefined\n\t\t\t\t: unknown\n\t: never;\n\n// Remove never properties\ntype RemoveNever<T> = Pick<\n\tT,\n\t{\n\t\t[K in keyof T]: T[K] extends never ? never : K;\n\t}[keyof T]\n>;\n\n// Runtime operation registry (would be generated)\ninterface OperationRegistry {\n\t[operationId: string]: {\n\t\tpath: string;\n\t\tmethod: string;\n\t};\n}\n\nexport function createOpenAPIHooks<Paths>(\n\toptions: FetcherOptions & { operations?: OperationRegistry } = {},\n) {\n\tconst { operations, ...fetcherOptions } = options;\n\tconst fetcher = createTypedFetcher<Paths>(fetcherOptions);\n\n\tfunction buildEndpoint<OpId extends OperationId<Paths>>(\n\t\toperationId: OpId,\n\t): string {\n\t\t// Runtime lookup from registry\n\t\tconst op = operations?.[operationId as string];\n\t\tif (op) {\n\t\t\treturn `${op.method.toUpperCase()} ${op.path}`;\n\t\t}\n\t\t// Fallback for compile-time only usage\n\t\treturn operationId as string;\n\t}\n\n\treturn {\n\t\tuseQuery: <OpId extends OperationsByMethod<Paths, 'get'>>(\n\t\t\toperationId: OpId,\n\t\t\tconfig?: RemoveNever<OperationParams<Paths, OpId>>,\n\t\t\toptions?: Omit<\n\t\t\t\tUseQueryOptions<OperationResponse<Paths, OpId>, Error>,\n\t\t\t\t'queryKey' | 'queryFn'\n\t\t\t>,\n\t\t) => {\n\t\t\tconst endpoint = buildEndpoint(operationId);\n\t\t\tconst queryKey = [operationId, ...(config ? [config] : [])];\n\n\t\t\treturn useQuery<OperationResponse<Paths, OpId>, Error>({\n\t\t\t\tqueryKey,\n\t\t\t\tqueryFn: async () => {\n\t\t\t\t\tconst response = await fetcher(endpoint as any, config as any);\n\t\t\t\t\treturn response as OperationResponse<Paths, OpId>;\n\t\t\t\t},\n\t\t\t\t...options,\n\t\t\t});\n\t\t},\n\n\t\tuseMutation: <\n\t\t\tOpId extends Exclude<\n\t\t\t\tOperationId<Paths>,\n\t\t\t\tOperationsByMethod<Paths, 'get'>\n\t\t\t>,\n\t\t>(\n\t\t\toperationId: OpId,\n\t\t\toptions?: Omit<\n\t\t\t\tUseMutationOptions<\n\t\t\t\t\tOperationResponse<Paths, OpId>,\n\t\t\t\t\tError,\n\t\t\t\t\tRemoveNever<OperationParams<Paths, OpId>>\n\t\t\t\t>,\n\t\t\t\t'mutationFn'\n\t\t\t>,\n\t\t) => {\n\t\t\tconst endpoint = buildEndpoint(operationId);\n\n\t\t\treturn useMutation<\n\t\t\t\tOperationResponse<Paths, OpId>,\n\t\t\t\tError,\n\t\t\t\tRemoveNever<OperationParams<Paths, OpId>>\n\t\t\t>({\n\t\t\t\tmutationFn: async (variables) => {\n\t\t\t\t\tconst response = await fetcher(endpoint as any, variables as any);\n\t\t\t\t\treturn response as OperationResponse<Paths, OpId>;\n\t\t\t\t},\n\t\t\t\t...options,\n\t\t\t});\n\t\t},\n\t};\n}\n"],"mappings":";;;AAsHA,SAAgB,mBACf,UAA+D,CAAC,GAC/D;CACD,MAAM,EAAE,YAAY,GAAG,mBAAmB;CAC1C,MAAM,UAAU,mBAA0B,cAAc;CAExD,SAAS,cACR,aACS;EAET,MAAM,KAAK,aAAa;EACxB,IAAI,IACH,OAAO,GAAG,GAAG,OAAO,YAAY,EAAE,GAAG,GAAG;EAGzC,OAAO;CACR;CAEA,OAAO;EACN,WACC,aACA,QACA,YAII;GACJ,MAAM,WAAW,cAAc,WAAW;GAC1C,MAAM,WAAW,CAAC,aAAa,GAAI,SAAS,CAAC,MAAM,IAAI,CAAC,CAAE;GAE1D,OAAO,SAAgD;IACtD;IACA,SAAS,YAAY;KAEpB,OAAO,MADgB,QAAQ,UAAiB,MAAa;IAE9D;IACA,GAAG;GACJ,CAAC;EACF;EAEA,cAMC,aACA,YAQI;GACJ,MAAM,WAAW,cAAc,WAAW;GAE1C,OAAO,YAIL;IACD,YAAY,OAAO,cAAc;KAEhC,OAAO,MADgB,QAAQ,UAAiB,SAAgB;IAEjE;IACA,GAAG;GACJ,CAAC;EACF;CACD;AACD"}
1
+ {"version":3,"file":"openapi-hooks.mjs","names":["options: FetcherOptions & { operations?: OperationRegistry }","operationId: OpId","config?: RemoveNever<OperationParams<Paths, OpId>>","options?: Omit<\n\t\t\t\tUseQueryOptions<OperationResponse<Paths, OpId>, Error>,\n\t\t\t\t'queryKey' | 'queryFn'\n\t\t\t>","options","options?: Omit<\n\t\t\t\tUseMutationOptions<\n\t\t\t\t\tOperationResponse<Paths, OpId>,\n\t\t\t\t\tError,\n\t\t\t\t\tRemoveNever<OperationParams<Paths, OpId>>\n\t\t\t\t>,\n\t\t\t\t'mutationFn'\n\t\t\t>"],"sources":["../src/openapi-hooks.ts"],"sourcesContent":["import type {\n\tUseMutationOptions,\n\tUseQueryOptions,\n} from '@tanstack/react-query';\nimport { useMutation, useQuery } from '@tanstack/react-query';\nimport { createTypedFetcher } from './fetcher';\nimport type { FetcherOptions } from './types';\n\n// Simplified type helpers for OpenAPI paths\ntype HttpMethods = 'get' | 'post' | 'put' | 'patch' | 'delete';\n\n// Extract all operations from paths\ntype AllOperations<Paths> = {\n\t[Path in keyof Paths]: {\n\t\t[Method in keyof Paths[Path] & HttpMethods]: Paths[Path][Method] extends {\n\t\t\toperationId: infer OpId;\n\t\t}\n\t\t\t? OpId extends string\n\t\t\t\t? {\n\t\t\t\t\t\toperationId: OpId;\n\t\t\t\t\t\tpath: Path;\n\t\t\t\t\t\tmethod: Method;\n\t\t\t\t\t\tspec: Paths[Path][Method] & {\n\t\t\t\t\t\t\t_pathParams?: Paths[Path] extends {\n\t\t\t\t\t\t\t\tparameters: { path: infer P };\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t? P\n\t\t\t\t\t\t\t\t: never;\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t: never\n\t\t\t: never;\n\t}[keyof Paths[Path] & HttpMethods];\n}[keyof Paths];\n\n// Create operation map\ntype OperationMap<Paths> = {\n\t[Op in AllOperations<Paths> as Op extends {\n\t\toperationId: infer Id extends string;\n\t}\n\t\t? Id\n\t\t: never]: Op;\n};\n\n// Get operation IDs\ntype OperationId<Paths> = keyof OperationMap<Paths>;\n\n// Get operations by method\ntype OperationsByMethod<Paths, Method extends HttpMethods> = {\n\t[K in OperationId<Paths>]: OperationMap<Paths>[K] extends { method: Method }\n\t\t? K\n\t\t: never;\n}[OperationId<Paths>];\n\n// Extract parameter types\ntype OperationParams<\n\tPaths,\n\tOpId extends OperationId<Paths>,\n> = OperationMap<Paths>[OpId] extends {\n\tpath: infer Path extends keyof Paths;\n\tspec: infer Spec;\n}\n\t? {\n\t\t\tparams?: Paths[Path] extends { parameters: { path: infer P } }\n\t\t\t\t? P\n\t\t\t\t: Spec extends { parameters: { path: infer P } }\n\t\t\t\t\t? P\n\t\t\t\t\t: never;\n\t\t\tquery?: Spec extends { parameters?: { query?: infer Q } } ? Q : never;\n\t\t\tbody?: Spec extends {\n\t\t\t\trequestBody: { content: { 'application/json': infer Body } };\n\t\t\t}\n\t\t\t\t? Body\n\t\t\t\t: Spec extends {\n\t\t\t\t\t\t\trequestBody: {\n\t\t\t\t\t\t\t\trequired: true;\n\t\t\t\t\t\t\t\tcontent: { 'application/json': infer Body };\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t? Body\n\t\t\t\t\t: never;\n\t\t}\n\t: never;\n\n// Extract response type\ntype OperationResponse<\n\tPaths,\n\tOpId extends OperationId<Paths>,\n> = OperationMap<Paths>[OpId] extends { spec: infer Spec }\n\t? Spec extends {\n\t\t\tresponses: { 200: { content: { 'application/json': infer R } } };\n\t\t}\n\t\t? R\n\t\t: Spec extends {\n\t\t\t\t\tresponses: { 201: { content: { 'application/json': infer R } } };\n\t\t\t\t}\n\t\t\t? R\n\t\t\t: Spec extends { responses: { 204: any } }\n\t\t\t\t? undefined\n\t\t\t\t: unknown\n\t: never;\n\n// Remove never properties\ntype RemoveNever<T> = Pick<\n\tT,\n\t{\n\t\t[K in keyof T]: T[K] extends never ? never : K;\n\t}[keyof T]\n>;\n\n// Check if type is empty\ntype IsEmpty<T> = keyof T extends never ? true : false;\n\n// Runtime operation registry (would be generated)\ninterface OperationRegistry {\n\t[operationId: string]: {\n\t\tpath: string;\n\t\tmethod: string;\n\t};\n}\n\nexport function createOpenAPIHooks<Paths>(\n\toptions: FetcherOptions & { operations?: OperationRegistry } = {},\n) {\n\tconst { operations, ...fetcherOptions } = options;\n\tconst fetcher = createTypedFetcher<Paths>(fetcherOptions);\n\n\tfunction buildEndpoint<OpId extends OperationId<Paths>>(\n\t\toperationId: OpId,\n\t): string {\n\t\t// Runtime lookup from registry\n\t\tconst op = operations?.[operationId as string];\n\t\tif (op) {\n\t\t\treturn `${op.method.toUpperCase()} ${op.path}`;\n\t\t}\n\t\t// Fallback for compile-time only usage\n\t\treturn operationId as string;\n\t}\n\n\treturn {\n\t\tuseQuery: <OpId extends OperationsByMethod<Paths, 'get'>>(\n\t\t\toperationId: OpId,\n\t\t\tconfig?: RemoveNever<OperationParams<Paths, OpId>>,\n\t\t\toptions?: Omit<\n\t\t\t\tUseQueryOptions<OperationResponse<Paths, OpId>, Error>,\n\t\t\t\t'queryKey' | 'queryFn'\n\t\t\t>,\n\t\t) => {\n\t\t\tconst endpoint = buildEndpoint(operationId);\n\t\t\tconst queryKey = [operationId, ...(config ? [config] : [])];\n\n\t\t\treturn useQuery<OperationResponse<Paths, OpId>, Error>({\n\t\t\t\tqueryKey,\n\t\t\t\tqueryFn: async () => {\n\t\t\t\t\tconst response = await fetcher(endpoint as any, config as any);\n\t\t\t\t\treturn response as OperationResponse<Paths, OpId>;\n\t\t\t\t},\n\t\t\t\t...options,\n\t\t\t});\n\t\t},\n\n\t\tuseMutation: <\n\t\t\tOpId extends Exclude<\n\t\t\t\tOperationId<Paths>,\n\t\t\t\tOperationsByMethod<Paths, 'get'>\n\t\t\t>,\n\t\t>(\n\t\t\toperationId: OpId,\n\t\t\toptions?: Omit<\n\t\t\t\tUseMutationOptions<\n\t\t\t\t\tOperationResponse<Paths, OpId>,\n\t\t\t\t\tError,\n\t\t\t\t\tRemoveNever<OperationParams<Paths, OpId>>\n\t\t\t\t>,\n\t\t\t\t'mutationFn'\n\t\t\t>,\n\t\t) => {\n\t\t\tconst endpoint = buildEndpoint(operationId);\n\n\t\t\treturn useMutation<\n\t\t\t\tOperationResponse<Paths, OpId>,\n\t\t\t\tError,\n\t\t\t\tRemoveNever<OperationParams<Paths, OpId>>\n\t\t\t>({\n\t\t\t\tmutationFn: async (variables) => {\n\t\t\t\t\tconst response = await fetcher(endpoint as any, variables as any);\n\t\t\t\t\treturn response as OperationResponse<Paths, OpId>;\n\t\t\t\t},\n\t\t\t\t...options,\n\t\t\t});\n\t\t},\n\t};\n}\n"],"mappings":";;;;AAyHA,SAAgB,mBACfA,UAA+D,CAAE,GAChE;CACD,MAAM,EAAE,WAAY,GAAG,gBAAgB,GAAG;CAC1C,MAAM,UAAU,mBAA0B,eAAe;CAEzD,SAAS,cACRC,aACS;EAET,MAAM,KAAK,aAAa;AACxB,MAAI,GACH,SAAQ,EAAE,GAAG,OAAO,aAAa,CAAC,GAAG,GAAG,KAAK;AAG9C,SAAO;CACP;AAED,QAAO;EACN,UAAU,CACTA,aACAC,QACAC,cAII;GACJ,MAAM,WAAW,cAAc,YAAY;GAC3C,MAAM,WAAW,CAAC,aAAa,GAAI,SAAS,CAAC,MAAO,IAAG,CAAE,CAAE;AAE3D,UAAO,SAAgD;IACtD;IACA,SAAS,YAAY;KACpB,MAAM,WAAW,MAAM,QAAQ,UAAiB,OAAc;AAC9D,YAAO;IACP;IACD,GAAGC;GACH,EAAC;EACF;EAED,aAAa,CAMZH,aACAI,cAQI;GACJ,MAAM,WAAW,cAAc,YAAY;AAE3C,UAAO,YAIL;IACD,YAAY,OAAO,cAAc;KAChC,MAAM,WAAW,MAAM,QAAQ,UAAiB,UAAiB;AACjE,YAAO;IACP;IACD,GAAGD;GACH,EAAC;EACF;CACD;AACD"}
@@ -1,12 +1,12 @@
1
1
  //#region src/openapi-types.d.ts
2
2
  /**
3
- * A hand-written `paths` fixture in openapi-typescript's shape, for the
4
- * client's own tests. Applications get theirs from `gkm build`, which writes
5
- * a typed client per surface to the workspace root's `.gkm/client/<surface>.ts`.
3
+ * This file should be auto-generated by openapi-typescript.
4
+ * Run: npx openapi-typescript <your-openapi-spec> -o ./openapi-types.d.ts
6
5
  *
7
6
  * This is a placeholder file showing the expected structure.
8
7
  */
9
- export interface paths {
8
+
9
+ interface paths {
10
10
  '/job/{id}': {
11
11
  parameters: {
12
12
  query?: never;
@@ -422,7 +422,7 @@ export interface paths {
422
422
  };
423
423
  };
424
424
  }
425
- export interface components {
425
+ interface components {
426
426
  schemas: {
427
427
  User: {
428
428
  id: string;
@@ -439,4 +439,5 @@ export interface components {
439
439
  };
440
440
  }
441
441
  //#endregion
442
+ export { components, paths };
442
443
  //# sourceMappingURL=openapi-types.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"openapi-types.d.cts","names":[],"sources":["../src/openapi-types.d.ts"],"mappings":";;;;;;;;iBAQiB;EAChB;IACC;MACC;MACA;MACA;MACA;;IAED;MACC;MACA;QACC;QACA;QACA;UACC;;QAED;;MAED;MACA;;QAEC;UACC;aACE;;UAEF;YACC;cACC;cACA;cACA;cACA;gBACC;gBACA;;cAED;gBACC;gBACA;;cAED;gBACC;gBACA;;;cAGD;;cAEA;;cAEA;;cAEA;;cAEA;;cAEA;;;;;;IAML;MACC;MACA;QACC;QACA;QACA;UACC;;QAED;;MAED;QACC;UACC;YACC;YACA;YACA;YACA;cACC;cACA;;YAED;cACC;cACA;;YAED;cACC;cACA;;;YAGD;;;;MAIH;;QAEC;UACC;aACE;;UAEF;YACC;cACC;cACA;cACA;cACA;gBACC;gBACA;;cAED;gBACC;gBACA;;cAED;gBACC;gBACA;;;cAGD;;cAEA;;cAEA;;cAEA;;cAEA;;cAEA;;;;;;IAML;IACA;MACC;MACA;QACC;QACA;QACA;UACC;;QAED;;MAED;MACA;;QAEC;UACC;aACE;;UAEF;YACC;cACC;;cAEA;;;;;;IAML;IACA;IACA;IACA;;EAED;IACC;MACC;MACA;QACC;UACC;UACA;UACA;;;MAGF;QACC;UACC;YACC;cACC,OAAO;gBACN;gBACA;gBACA;;;;;;;IAON;MACC;MACA;QACC;UACC;YACC;YACA;;;;MAIH;QACC;UACC;YACC;cACC;cACA;cACA;;;;;;;EAON;IACC;MACC;QACC;;;IAGF;MACC;MACA;QACC;UACC;YACC;cACC;cACA;cACA;;;;;;IAML;MACC;MACA;QACC;UACC;YACC;YACA;;;;MAIH;QACC;UACC;YACC;cACC;cACA;cACA;;;;;;IAML;MACC;MACA;QACC;UACC;;;;;EAKJ;IACC;MACC;MACA;QACC;UACC;UACA;UACA;;;MAGF;QACC;UACC;YACC;cACC,OAAO;gBACN;gBACA;gBACA;gBACA;gBACA;;cAED;gBACC;gBACA;gBACA;;cAED;;;;;;;EAON;IACC;MACC;MACA;QACC;UACC;YACC;cACC;;;;QAIH;UACC;YACC;cACC;;;;;;;EAON;IACC;MACC;MACA;QACC;UACC;YACC;cACC;;;;;;;EAON;IACC;MACC;MACA;QACC;UACC;UACA;;;MAGF;QACC;UACC;YACC;cACC,OAAO;gBACN;gBACA;gBACA;;cAED;gBACC;gBACA;gBACA;gBACA;;;;;;;;EAQP;IACC;MACC;MACA;QACC;UACC;UACA;;;MAGF;QACC;UACC;YACC;cACC,UAAU;gBACT;gBACA;gBACA;;cAED;;;;;;;EAON;IACC;MACC;MACA;QACC;WACE;;;MAGH;QACC;UACC;YACC;cACC,aAAa;cACb,MAAM;gBACL;gBACA;;cAED;gBACC;gBACA;gBACA;gBACA;;;;;;;;;iBAUS;EAChB;IACC;MACC;MACA;MACA;;IAED;MACC;MACA;MACA;MACA;MACA"}
1
+ {"version":3,"file":"openapi-types.d.cts","names":["paths","Array","Record","components"],"sources":["../src/openapi-types.d.ts"],"sourcesContent":["/**\n * This file should be auto-generated by openapi-typescript.\n * Run: npx openapi-typescript <your-openapi-spec> -o ./openapi-types.d.ts\n *\n * This is a placeholder file showing the expected structure.\n */\n\nexport interface paths {\n\t'/job/{id}': {\n\t\tparameters: {\n\t\t\tquery?: never;\n\t\t\theader?: never;\n\t\t\tpath?: never;\n\t\t\tcookie?: never;\n\t\t};\n\t\tget: {\n\t\t\toperationId: 'getJob';\n\t\t\tparameters: {\n\t\t\t\tquery?: never;\n\t\t\t\theader?: never;\n\t\t\t\tpath: {\n\t\t\t\t\tid: string;\n\t\t\t\t};\n\t\t\t\tcookie?: never;\n\t\t\t};\n\t\t\trequestBody?: never;\n\t\t\tresponses: {\n\t\t\t\t/** @description Successful response */\n\t\t\t\t200: {\n\t\t\t\t\theaders: {\n\t\t\t\t\t\t[name: string]: unknown;\n\t\t\t\t\t};\n\t\t\t\t\tcontent: {\n\t\t\t\t\t\t'application/json': {\n\t\t\t\t\t\t\trole: string;\n\t\t\t\t\t\t\toverview: string;\n\t\t\t\t\t\t\tqualifications: string;\n\t\t\t\t\t\t\thourlyRate: {\n\t\t\t\t\t\t\t\tmax: number;\n\t\t\t\t\t\t\t\tmin: number;\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tdateNeeded: {\n\t\t\t\t\t\t\t\tfrom: string;\n\t\t\t\t\t\t\t\tto: string;\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tshiftHours: {\n\t\t\t\t\t\t\t\tfrom: string;\n\t\t\t\t\t\t\t\tto: string;\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t/** Format: uuid */\n\t\t\t\t\t\t\tid: string;\n\t\t\t\t\t\t\t/** Format: date-time */\n\t\t\t\t\t\t\tcreatedAt: string;\n\t\t\t\t\t\t\t/** Format: date-time */\n\t\t\t\t\t\t\tupdatedAt: string;\n\t\t\t\t\t\t\t/** Format: uuid */\n\t\t\t\t\t\t\tbusinessId: string;\n\t\t\t\t\t\t\t/** Format: uuid */\n\t\t\t\t\t\t\tcreatorId: string;\n\t\t\t\t\t\t\t/** @enum {string} */\n\t\t\t\t\t\t\tstatus: 'Draft' | 'Active' | 'Closed' | 'Filled';\n\t\t\t\t\t\t};\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t};\n\t\tput: {\n\t\t\toperationId: 'updateJob';\n\t\t\tparameters: {\n\t\t\t\tquery?: never;\n\t\t\t\theader?: never;\n\t\t\t\tpath: {\n\t\t\t\t\tid: string;\n\t\t\t\t};\n\t\t\t\tcookie?: never;\n\t\t\t};\n\t\t\trequestBody: {\n\t\t\t\tcontent: {\n\t\t\t\t\t'application/json': {\n\t\t\t\t\t\trole?: string;\n\t\t\t\t\t\toverview?: string;\n\t\t\t\t\t\tqualifications?: string;\n\t\t\t\t\t\thourlyRate?: {\n\t\t\t\t\t\t\tmax: number;\n\t\t\t\t\t\t\tmin: number;\n\t\t\t\t\t\t};\n\t\t\t\t\t\tdateNeeded?: {\n\t\t\t\t\t\t\tfrom: string;\n\t\t\t\t\t\t\tto: string;\n\t\t\t\t\t\t};\n\t\t\t\t\t\tshiftHours?: {\n\t\t\t\t\t\t\tfrom: string;\n\t\t\t\t\t\t\tto: string;\n\t\t\t\t\t\t};\n\t\t\t\t\t\t/** @enum {string} */\n\t\t\t\t\t\tstatus?: 'Draft' | 'Active' | 'Closed' | 'Filled';\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t\tresponses: {\n\t\t\t\t/** @description Successful response */\n\t\t\t\t200: {\n\t\t\t\t\theaders: {\n\t\t\t\t\t\t[name: string]: unknown;\n\t\t\t\t\t};\n\t\t\t\t\tcontent: {\n\t\t\t\t\t\t'application/json': {\n\t\t\t\t\t\t\trole: string;\n\t\t\t\t\t\t\toverview: string;\n\t\t\t\t\t\t\tqualifications: string;\n\t\t\t\t\t\t\thourlyRate: {\n\t\t\t\t\t\t\t\tmax: number;\n\t\t\t\t\t\t\t\tmin: number;\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tdateNeeded: {\n\t\t\t\t\t\t\t\tfrom: string;\n\t\t\t\t\t\t\t\tto: string;\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tshiftHours: {\n\t\t\t\t\t\t\t\tfrom: string;\n\t\t\t\t\t\t\t\tto: string;\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t/** Format: uuid */\n\t\t\t\t\t\t\tid: string;\n\t\t\t\t\t\t\t/** Format: date-time */\n\t\t\t\t\t\t\tcreatedAt: string;\n\t\t\t\t\t\t\t/** Format: date-time */\n\t\t\t\t\t\t\tupdatedAt: string;\n\t\t\t\t\t\t\t/** Format: uuid */\n\t\t\t\t\t\t\tbusinessId: string;\n\t\t\t\t\t\t\t/** Format: uuid */\n\t\t\t\t\t\t\tcreatorId: string;\n\t\t\t\t\t\t\t/** @enum {string} */\n\t\t\t\t\t\t\tstatus: 'Draft' | 'Active' | 'Closed' | 'Filled';\n\t\t\t\t\t\t};\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t};\n\t\tpost?: never;\n\t\tdelete: {\n\t\t\toperationId: 'deleteJob';\n\t\t\tparameters: {\n\t\t\t\tquery?: never;\n\t\t\t\theader?: never;\n\t\t\t\tpath: {\n\t\t\t\t\tid: string;\n\t\t\t\t};\n\t\t\t\tcookie?: never;\n\t\t\t};\n\t\t\trequestBody?: never;\n\t\t\tresponses: {\n\t\t\t\t/** @description Successful response */\n\t\t\t\t200: {\n\t\t\t\t\theaders: {\n\t\t\t\t\t\t[name: string]: unknown;\n\t\t\t\t\t};\n\t\t\t\t\tcontent: {\n\t\t\t\t\t\t'application/json': {\n\t\t\t\t\t\t\tmessage: string;\n\t\t\t\t\t\t\t/** Format: uuid */\n\t\t\t\t\t\t\tid: string;\n\t\t\t\t\t\t};\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t};\n\t\toptions?: never;\n\t\thead?: never;\n\t\tpatch?: never;\n\t\ttrace?: never;\n\t};\n\t'/users': {\n\t\tget: {\n\t\t\toperationId: 'listUsers';\n\t\t\tparameters: {\n\t\t\t\tquery: {\n\t\t\t\t\tpage?: number;\n\t\t\t\t\tlimit?: number;\n\t\t\t\t\tsort?: 'asc' | 'desc';\n\t\t\t\t};\n\t\t\t};\n\t\t\tresponses: {\n\t\t\t\t200: {\n\t\t\t\t\tcontent: {\n\t\t\t\t\t\t'application/json': {\n\t\t\t\t\t\t\tusers: Array<{\n\t\t\t\t\t\t\t\tid: string;\n\t\t\t\t\t\t\t\tname: string;\n\t\t\t\t\t\t\t\temail: string;\n\t\t\t\t\t\t\t}>;\n\t\t\t\t\t\t};\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t};\n\t\tpost: {\n\t\t\toperationId: 'createUser';\n\t\t\trequestBody: {\n\t\t\t\tcontent: {\n\t\t\t\t\t'application/json': {\n\t\t\t\t\t\tname: string;\n\t\t\t\t\t\temail: string;\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t\tresponses: {\n\t\t\t\t201: {\n\t\t\t\t\tcontent: {\n\t\t\t\t\t\t'application/json': {\n\t\t\t\t\t\t\tid: string;\n\t\t\t\t\t\t\tname: string;\n\t\t\t\t\t\t\temail: string;\n\t\t\t\t\t\t};\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t};\n\t};\n\t'/users/{id}': {\n\t\tparameters: {\n\t\t\tpath: {\n\t\t\t\tid: string;\n\t\t\t};\n\t\t};\n\t\tget: {\n\t\t\toperationId: 'getUser';\n\t\t\tresponses: {\n\t\t\t\t200: {\n\t\t\t\t\tcontent: {\n\t\t\t\t\t\t'application/json': {\n\t\t\t\t\t\t\tid: string;\n\t\t\t\t\t\t\tname: string;\n\t\t\t\t\t\t\temail: string;\n\t\t\t\t\t\t};\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t};\n\t\tput: {\n\t\t\toperationId: 'updateUser';\n\t\t\trequestBody: {\n\t\t\t\tcontent: {\n\t\t\t\t\t'application/json': {\n\t\t\t\t\t\tname?: string;\n\t\t\t\t\t\temail?: string;\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t\tresponses: {\n\t\t\t\t200: {\n\t\t\t\t\tcontent: {\n\t\t\t\t\t\t'application/json': {\n\t\t\t\t\t\t\tid: string;\n\t\t\t\t\t\t\tname: string;\n\t\t\t\t\t\t\temail: string;\n\t\t\t\t\t\t};\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t};\n\t\tdelete: {\n\t\t\toperationId: 'deleteUser';\n\t\t\tresponses: {\n\t\t\t\t204: {\n\t\t\t\t\tcontent: never;\n\t\t\t\t};\n\t\t\t};\n\t\t};\n\t};\n\t'/posts': {\n\t\tget: {\n\t\t\toperationId: 'listPosts';\n\t\t\tparameters: {\n\t\t\t\tquery: {\n\t\t\t\t\tpage?: number;\n\t\t\t\t\tlimit?: number;\n\t\t\t\t\tsort?: 'asc' | 'desc';\n\t\t\t\t};\n\t\t\t};\n\t\t\tresponses: {\n\t\t\t\t200: {\n\t\t\t\t\tcontent: {\n\t\t\t\t\t\t'application/json': {\n\t\t\t\t\t\t\tposts: Array<{\n\t\t\t\t\t\t\t\tid: string;\n\t\t\t\t\t\t\t\ttitle: string;\n\t\t\t\t\t\t\t\tcontent: string;\n\t\t\t\t\t\t\t\tauthorId: string;\n\t\t\t\t\t\t\t\tcreatedAt: string;\n\t\t\t\t\t\t\t}>;\n\t\t\t\t\t\t\tpagination: {\n\t\t\t\t\t\t\t\tpage: number;\n\t\t\t\t\t\t\t\tlimit: number;\n\t\t\t\t\t\t\t\ttotal: number;\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tsort: 'asc' | 'desc';\n\t\t\t\t\t\t};\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t};\n\t};\n\t'/protected': {\n\t\tget: {\n\t\t\toperationId: 'getProtected';\n\t\t\tresponses: {\n\t\t\t\t200: {\n\t\t\t\t\tcontent: {\n\t\t\t\t\t\t'application/json': {\n\t\t\t\t\t\t\tmessage: string;\n\t\t\t\t\t\t};\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t\t401: {\n\t\t\t\t\tcontent: {\n\t\t\t\t\t\t'application/json': {\n\t\t\t\t\t\t\tmessage: string;\n\t\t\t\t\t\t};\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t};\n\t};\n\t'/error': {\n\t\tget: {\n\t\t\toperationId: 'getError';\n\t\t\tresponses: {\n\t\t\t\t500: {\n\t\t\t\t\tcontent: {\n\t\t\t\t\t\t'application/json': {\n\t\t\t\t\t\t\tmessage: string;\n\t\t\t\t\t\t};\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t};\n\t};\n\t'/users/paginated': {\n\t\tget: {\n\t\t\toperationId: 'getUsersPaginated';\n\t\t\tparameters: {\n\t\t\t\tquery: {\n\t\t\t\t\tpage?: number;\n\t\t\t\t\tlimit?: number;\n\t\t\t\t};\n\t\t\t};\n\t\t\tresponses: {\n\t\t\t\t200: {\n\t\t\t\t\tcontent: {\n\t\t\t\t\t\t'application/json': {\n\t\t\t\t\t\t\tusers: Array<{\n\t\t\t\t\t\t\t\tid: string;\n\t\t\t\t\t\t\t\tname: string;\n\t\t\t\t\t\t\t\temail: string;\n\t\t\t\t\t\t\t}>;\n\t\t\t\t\t\t\tpagination: {\n\t\t\t\t\t\t\t\tpage: number;\n\t\t\t\t\t\t\t\tlimit: number;\n\t\t\t\t\t\t\t\ttotal: number;\n\t\t\t\t\t\t\t\thasMore: boolean;\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t};\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t};\n\t};\n\t'/messages': {\n\t\tget: {\n\t\t\toperationId: 'getMessages';\n\t\t\tparameters: {\n\t\t\t\tquery: {\n\t\t\t\t\tcursor?: string;\n\t\t\t\t\tlimit?: number;\n\t\t\t\t};\n\t\t\t};\n\t\t\tresponses: {\n\t\t\t\t200: {\n\t\t\t\t\tcontent: {\n\t\t\t\t\t\t'application/json': {\n\t\t\t\t\t\t\tmessages: Array<{\n\t\t\t\t\t\t\t\tid: string;\n\t\t\t\t\t\t\t\ttext: string;\n\t\t\t\t\t\t\t\ttimestamp: string;\n\t\t\t\t\t\t\t}>;\n\t\t\t\t\t\t\tnextCursor: string | null;\n\t\t\t\t\t\t};\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t};\n\t};\n\t'/echo': {\n\t\tget: {\n\t\t\toperationId: 'echo';\n\t\t\tparameters: {\n\t\t\t\tquery: {\n\t\t\t\t\t[key: string]: string | number | boolean;\n\t\t\t\t};\n\t\t\t};\n\t\t\tresponses: {\n\t\t\t\t200: {\n\t\t\t\t\tcontent: {\n\t\t\t\t\t\t'application/json': {\n\t\t\t\t\t\t\tqueryParams: Record<string, string>;\n\t\t\t\t\t\t\tdata: Array<{\n\t\t\t\t\t\t\t\tid: string;\n\t\t\t\t\t\t\t\tvalue: string;\n\t\t\t\t\t\t\t}>;\n\t\t\t\t\t\t\tpagination: {\n\t\t\t\t\t\t\t\tpage: number;\n\t\t\t\t\t\t\t\tlimit: number;\n\t\t\t\t\t\t\t\ttotal: number;\n\t\t\t\t\t\t\t\thasMore: boolean;\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t};\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t};\n\t};\n}\n\nexport interface components {\n\tschemas: {\n\t\tUser: {\n\t\t\tid: string;\n\t\t\tname: string;\n\t\t\temail: string;\n\t\t};\n\t\tPost: {\n\t\t\tid: string;\n\t\t\ttitle: string;\n\t\t\tcontent: string;\n\t\t\tauthorId: string;\n\t\t\tcreatedAt: string;\n\t\t};\n\t};\n}\n"],"mappings":";;AAOA;;;;;;AA8YoBE,UA9YHF,KAAAA,CA8YGE;EAAM,WACbD,EAAAA;IAAK,UAAA,EAAA;MAkBlB,KAAiBE,CAAAA,EAAAA,KAAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBA9OHF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAkGAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAmEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA8BGA;;;;;;;;;;;;;;;;;;;;;;;;2BAwBGC;oBACPD;;;;;;;;;;;;;;;;;UAkBIE,UAAAA"}
@@ -1,12 +1,12 @@
1
1
  //#region src/openapi-types.d.ts
2
2
  /**
3
- * A hand-written `paths` fixture in openapi-typescript's shape, for the
4
- * client's own tests. Applications get theirs from `gkm build`, which writes
5
- * a typed client per surface to the workspace root's `.gkm/client/<surface>.ts`.
3
+ * This file should be auto-generated by openapi-typescript.
4
+ * Run: npx openapi-typescript <your-openapi-spec> -o ./openapi-types.d.ts
6
5
  *
7
6
  * This is a placeholder file showing the expected structure.
8
7
  */
9
- export interface paths {
8
+
9
+ interface paths {
10
10
  '/job/{id}': {
11
11
  parameters: {
12
12
  query?: never;
@@ -422,7 +422,7 @@ export interface paths {
422
422
  };
423
423
  };
424
424
  }
425
- export interface components {
425
+ interface components {
426
426
  schemas: {
427
427
  User: {
428
428
  id: string;
@@ -439,4 +439,5 @@ export interface components {
439
439
  };
440
440
  }
441
441
  //#endregion
442
+ export { components, paths };
442
443
  //# sourceMappingURL=openapi-types.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"openapi-types.d.mts","names":[],"sources":["../src/openapi-types.d.ts"],"mappings":";;;;;;;;iBAQiB;EAChB;IACC;MACC;MACA;MACA;MACA;;IAED;MACC;MACA;QACC;QACA;QACA;UACC;;QAED;;MAED;MACA;;QAEC;UACC;aACE;;UAEF;YACC;cACC;cACA;cACA;cACA;gBACC;gBACA;;cAED;gBACC;gBACA;;cAED;gBACC;gBACA;;;cAGD;;cAEA;;cAEA;;cAEA;;cAEA;;cAEA;;;;;;IAML;MACC;MACA;QACC;QACA;QACA;UACC;;QAED;;MAED;QACC;UACC;YACC;YACA;YACA;YACA;cACC;cACA;;YAED;cACC;cACA;;YAED;cACC;cACA;;;YAGD;;;;MAIH;;QAEC;UACC;aACE;;UAEF;YACC;cACC;cACA;cACA;cACA;gBACC;gBACA;;cAED;gBACC;gBACA;;cAED;gBACC;gBACA;;;cAGD;;cAEA;;cAEA;;cAEA;;cAEA;;cAEA;;;;;;IAML;IACA;MACC;MACA;QACC;QACA;QACA;UACC;;QAED;;MAED;MACA;;QAEC;UACC;aACE;;UAEF;YACC;cACC;;cAEA;;;;;;IAML;IACA;IACA;IACA;;EAED;IACC;MACC;MACA;QACC;UACC;UACA;UACA;;;MAGF;QACC;UACC;YACC;cACC,OAAO;gBACN;gBACA;gBACA;;;;;;;IAON;MACC;MACA;QACC;UACC;YACC;YACA;;;;MAIH;QACC;UACC;YACC;cACC;cACA;cACA;;;;;;;EAON;IACC;MACC;QACC;;;IAGF;MACC;MACA;QACC;UACC;YACC;cACC;cACA;cACA;;;;;;IAML;MACC;MACA;QACC;UACC;YACC;YACA;;;;MAIH;QACC;UACC;YACC;cACC;cACA;cACA;;;;;;IAML;MACC;MACA;QACC;UACC;;;;;EAKJ;IACC;MACC;MACA;QACC;UACC;UACA;UACA;;;MAGF;QACC;UACC;YACC;cACC,OAAO;gBACN;gBACA;gBACA;gBACA;gBACA;;cAED;gBACC;gBACA;gBACA;;cAED;;;;;;;EAON;IACC;MACC;MACA;QACC;UACC;YACC;cACC;;;;QAIH;UACC;YACC;cACC;;;;;;;EAON;IACC;MACC;MACA;QACC;UACC;YACC;cACC;;;;;;;EAON;IACC;MACC;MACA;QACC;UACC;UACA;;;MAGF;QACC;UACC;YACC;cACC,OAAO;gBACN;gBACA;gBACA;;cAED;gBACC;gBACA;gBACA;gBACA;;;;;;;;EAQP;IACC;MACC;MACA;QACC;UACC;UACA;;;MAGF;QACC;UACC;YACC;cACC,UAAU;gBACT;gBACA;gBACA;;cAED;;;;;;;EAON;IACC;MACC;MACA;QACC;WACE;;;MAGH;QACC;UACC;YACC;cACC,aAAa;cACb,MAAM;gBACL;gBACA;;cAED;gBACC;gBACA;gBACA;gBACA;;;;;;;;;iBAUS;EAChB;IACC;MACC;MACA;MACA;;IAED;MACC;MACA;MACA;MACA;MACA"}
1
+ {"version":3,"file":"openapi-types.d.mts","names":["paths","Array","Record","components"],"sources":["../src/openapi-types.d.ts"],"sourcesContent":["/**\n * This file should be auto-generated by openapi-typescript.\n * Run: npx openapi-typescript <your-openapi-spec> -o ./openapi-types.d.ts\n *\n * This is a placeholder file showing the expected structure.\n */\n\nexport interface paths {\n\t'/job/{id}': {\n\t\tparameters: {\n\t\t\tquery?: never;\n\t\t\theader?: never;\n\t\t\tpath?: never;\n\t\t\tcookie?: never;\n\t\t};\n\t\tget: {\n\t\t\toperationId: 'getJob';\n\t\t\tparameters: {\n\t\t\t\tquery?: never;\n\t\t\t\theader?: never;\n\t\t\t\tpath: {\n\t\t\t\t\tid: string;\n\t\t\t\t};\n\t\t\t\tcookie?: never;\n\t\t\t};\n\t\t\trequestBody?: never;\n\t\t\tresponses: {\n\t\t\t\t/** @description Successful response */\n\t\t\t\t200: {\n\t\t\t\t\theaders: {\n\t\t\t\t\t\t[name: string]: unknown;\n\t\t\t\t\t};\n\t\t\t\t\tcontent: {\n\t\t\t\t\t\t'application/json': {\n\t\t\t\t\t\t\trole: string;\n\t\t\t\t\t\t\toverview: string;\n\t\t\t\t\t\t\tqualifications: string;\n\t\t\t\t\t\t\thourlyRate: {\n\t\t\t\t\t\t\t\tmax: number;\n\t\t\t\t\t\t\t\tmin: number;\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tdateNeeded: {\n\t\t\t\t\t\t\t\tfrom: string;\n\t\t\t\t\t\t\t\tto: string;\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tshiftHours: {\n\t\t\t\t\t\t\t\tfrom: string;\n\t\t\t\t\t\t\t\tto: string;\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t/** Format: uuid */\n\t\t\t\t\t\t\tid: string;\n\t\t\t\t\t\t\t/** Format: date-time */\n\t\t\t\t\t\t\tcreatedAt: string;\n\t\t\t\t\t\t\t/** Format: date-time */\n\t\t\t\t\t\t\tupdatedAt: string;\n\t\t\t\t\t\t\t/** Format: uuid */\n\t\t\t\t\t\t\tbusinessId: string;\n\t\t\t\t\t\t\t/** Format: uuid */\n\t\t\t\t\t\t\tcreatorId: string;\n\t\t\t\t\t\t\t/** @enum {string} */\n\t\t\t\t\t\t\tstatus: 'Draft' | 'Active' | 'Closed' | 'Filled';\n\t\t\t\t\t\t};\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t};\n\t\tput: {\n\t\t\toperationId: 'updateJob';\n\t\t\tparameters: {\n\t\t\t\tquery?: never;\n\t\t\t\theader?: never;\n\t\t\t\tpath: {\n\t\t\t\t\tid: string;\n\t\t\t\t};\n\t\t\t\tcookie?: never;\n\t\t\t};\n\t\t\trequestBody: {\n\t\t\t\tcontent: {\n\t\t\t\t\t'application/json': {\n\t\t\t\t\t\trole?: string;\n\t\t\t\t\t\toverview?: string;\n\t\t\t\t\t\tqualifications?: string;\n\t\t\t\t\t\thourlyRate?: {\n\t\t\t\t\t\t\tmax: number;\n\t\t\t\t\t\t\tmin: number;\n\t\t\t\t\t\t};\n\t\t\t\t\t\tdateNeeded?: {\n\t\t\t\t\t\t\tfrom: string;\n\t\t\t\t\t\t\tto: string;\n\t\t\t\t\t\t};\n\t\t\t\t\t\tshiftHours?: {\n\t\t\t\t\t\t\tfrom: string;\n\t\t\t\t\t\t\tto: string;\n\t\t\t\t\t\t};\n\t\t\t\t\t\t/** @enum {string} */\n\t\t\t\t\t\tstatus?: 'Draft' | 'Active' | 'Closed' | 'Filled';\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t\tresponses: {\n\t\t\t\t/** @description Successful response */\n\t\t\t\t200: {\n\t\t\t\t\theaders: {\n\t\t\t\t\t\t[name: string]: unknown;\n\t\t\t\t\t};\n\t\t\t\t\tcontent: {\n\t\t\t\t\t\t'application/json': {\n\t\t\t\t\t\t\trole: string;\n\t\t\t\t\t\t\toverview: string;\n\t\t\t\t\t\t\tqualifications: string;\n\t\t\t\t\t\t\thourlyRate: {\n\t\t\t\t\t\t\t\tmax: number;\n\t\t\t\t\t\t\t\tmin: number;\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tdateNeeded: {\n\t\t\t\t\t\t\t\tfrom: string;\n\t\t\t\t\t\t\t\tto: string;\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tshiftHours: {\n\t\t\t\t\t\t\t\tfrom: string;\n\t\t\t\t\t\t\t\tto: string;\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t/** Format: uuid */\n\t\t\t\t\t\t\tid: string;\n\t\t\t\t\t\t\t/** Format: date-time */\n\t\t\t\t\t\t\tcreatedAt: string;\n\t\t\t\t\t\t\t/** Format: date-time */\n\t\t\t\t\t\t\tupdatedAt: string;\n\t\t\t\t\t\t\t/** Format: uuid */\n\t\t\t\t\t\t\tbusinessId: string;\n\t\t\t\t\t\t\t/** Format: uuid */\n\t\t\t\t\t\t\tcreatorId: string;\n\t\t\t\t\t\t\t/** @enum {string} */\n\t\t\t\t\t\t\tstatus: 'Draft' | 'Active' | 'Closed' | 'Filled';\n\t\t\t\t\t\t};\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t};\n\t\tpost?: never;\n\t\tdelete: {\n\t\t\toperationId: 'deleteJob';\n\t\t\tparameters: {\n\t\t\t\tquery?: never;\n\t\t\t\theader?: never;\n\t\t\t\tpath: {\n\t\t\t\t\tid: string;\n\t\t\t\t};\n\t\t\t\tcookie?: never;\n\t\t\t};\n\t\t\trequestBody?: never;\n\t\t\tresponses: {\n\t\t\t\t/** @description Successful response */\n\t\t\t\t200: {\n\t\t\t\t\theaders: {\n\t\t\t\t\t\t[name: string]: unknown;\n\t\t\t\t\t};\n\t\t\t\t\tcontent: {\n\t\t\t\t\t\t'application/json': {\n\t\t\t\t\t\t\tmessage: string;\n\t\t\t\t\t\t\t/** Format: uuid */\n\t\t\t\t\t\t\tid: string;\n\t\t\t\t\t\t};\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t};\n\t\toptions?: never;\n\t\thead?: never;\n\t\tpatch?: never;\n\t\ttrace?: never;\n\t};\n\t'/users': {\n\t\tget: {\n\t\t\toperationId: 'listUsers';\n\t\t\tparameters: {\n\t\t\t\tquery: {\n\t\t\t\t\tpage?: number;\n\t\t\t\t\tlimit?: number;\n\t\t\t\t\tsort?: 'asc' | 'desc';\n\t\t\t\t};\n\t\t\t};\n\t\t\tresponses: {\n\t\t\t\t200: {\n\t\t\t\t\tcontent: {\n\t\t\t\t\t\t'application/json': {\n\t\t\t\t\t\t\tusers: Array<{\n\t\t\t\t\t\t\t\tid: string;\n\t\t\t\t\t\t\t\tname: string;\n\t\t\t\t\t\t\t\temail: string;\n\t\t\t\t\t\t\t}>;\n\t\t\t\t\t\t};\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t};\n\t\tpost: {\n\t\t\toperationId: 'createUser';\n\t\t\trequestBody: {\n\t\t\t\tcontent: {\n\t\t\t\t\t'application/json': {\n\t\t\t\t\t\tname: string;\n\t\t\t\t\t\temail: string;\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t\tresponses: {\n\t\t\t\t201: {\n\t\t\t\t\tcontent: {\n\t\t\t\t\t\t'application/json': {\n\t\t\t\t\t\t\tid: string;\n\t\t\t\t\t\t\tname: string;\n\t\t\t\t\t\t\temail: string;\n\t\t\t\t\t\t};\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t};\n\t};\n\t'/users/{id}': {\n\t\tparameters: {\n\t\t\tpath: {\n\t\t\t\tid: string;\n\t\t\t};\n\t\t};\n\t\tget: {\n\t\t\toperationId: 'getUser';\n\t\t\tresponses: {\n\t\t\t\t200: {\n\t\t\t\t\tcontent: {\n\t\t\t\t\t\t'application/json': {\n\t\t\t\t\t\t\tid: string;\n\t\t\t\t\t\t\tname: string;\n\t\t\t\t\t\t\temail: string;\n\t\t\t\t\t\t};\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t};\n\t\tput: {\n\t\t\toperationId: 'updateUser';\n\t\t\trequestBody: {\n\t\t\t\tcontent: {\n\t\t\t\t\t'application/json': {\n\t\t\t\t\t\tname?: string;\n\t\t\t\t\t\temail?: string;\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t\tresponses: {\n\t\t\t\t200: {\n\t\t\t\t\tcontent: {\n\t\t\t\t\t\t'application/json': {\n\t\t\t\t\t\t\tid: string;\n\t\t\t\t\t\t\tname: string;\n\t\t\t\t\t\t\temail: string;\n\t\t\t\t\t\t};\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t};\n\t\tdelete: {\n\t\t\toperationId: 'deleteUser';\n\t\t\tresponses: {\n\t\t\t\t204: {\n\t\t\t\t\tcontent: never;\n\t\t\t\t};\n\t\t\t};\n\t\t};\n\t};\n\t'/posts': {\n\t\tget: {\n\t\t\toperationId: 'listPosts';\n\t\t\tparameters: {\n\t\t\t\tquery: {\n\t\t\t\t\tpage?: number;\n\t\t\t\t\tlimit?: number;\n\t\t\t\t\tsort?: 'asc' | 'desc';\n\t\t\t\t};\n\t\t\t};\n\t\t\tresponses: {\n\t\t\t\t200: {\n\t\t\t\t\tcontent: {\n\t\t\t\t\t\t'application/json': {\n\t\t\t\t\t\t\tposts: Array<{\n\t\t\t\t\t\t\t\tid: string;\n\t\t\t\t\t\t\t\ttitle: string;\n\t\t\t\t\t\t\t\tcontent: string;\n\t\t\t\t\t\t\t\tauthorId: string;\n\t\t\t\t\t\t\t\tcreatedAt: string;\n\t\t\t\t\t\t\t}>;\n\t\t\t\t\t\t\tpagination: {\n\t\t\t\t\t\t\t\tpage: number;\n\t\t\t\t\t\t\t\tlimit: number;\n\t\t\t\t\t\t\t\ttotal: number;\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tsort: 'asc' | 'desc';\n\t\t\t\t\t\t};\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t};\n\t};\n\t'/protected': {\n\t\tget: {\n\t\t\toperationId: 'getProtected';\n\t\t\tresponses: {\n\t\t\t\t200: {\n\t\t\t\t\tcontent: {\n\t\t\t\t\t\t'application/json': {\n\t\t\t\t\t\t\tmessage: string;\n\t\t\t\t\t\t};\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t\t401: {\n\t\t\t\t\tcontent: {\n\t\t\t\t\t\t'application/json': {\n\t\t\t\t\t\t\tmessage: string;\n\t\t\t\t\t\t};\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t};\n\t};\n\t'/error': {\n\t\tget: {\n\t\t\toperationId: 'getError';\n\t\t\tresponses: {\n\t\t\t\t500: {\n\t\t\t\t\tcontent: {\n\t\t\t\t\t\t'application/json': {\n\t\t\t\t\t\t\tmessage: string;\n\t\t\t\t\t\t};\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t};\n\t};\n\t'/users/paginated': {\n\t\tget: {\n\t\t\toperationId: 'getUsersPaginated';\n\t\t\tparameters: {\n\t\t\t\tquery: {\n\t\t\t\t\tpage?: number;\n\t\t\t\t\tlimit?: number;\n\t\t\t\t};\n\t\t\t};\n\t\t\tresponses: {\n\t\t\t\t200: {\n\t\t\t\t\tcontent: {\n\t\t\t\t\t\t'application/json': {\n\t\t\t\t\t\t\tusers: Array<{\n\t\t\t\t\t\t\t\tid: string;\n\t\t\t\t\t\t\t\tname: string;\n\t\t\t\t\t\t\t\temail: string;\n\t\t\t\t\t\t\t}>;\n\t\t\t\t\t\t\tpagination: {\n\t\t\t\t\t\t\t\tpage: number;\n\t\t\t\t\t\t\t\tlimit: number;\n\t\t\t\t\t\t\t\ttotal: number;\n\t\t\t\t\t\t\t\thasMore: boolean;\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t};\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t};\n\t};\n\t'/messages': {\n\t\tget: {\n\t\t\toperationId: 'getMessages';\n\t\t\tparameters: {\n\t\t\t\tquery: {\n\t\t\t\t\tcursor?: string;\n\t\t\t\t\tlimit?: number;\n\t\t\t\t};\n\t\t\t};\n\t\t\tresponses: {\n\t\t\t\t200: {\n\t\t\t\t\tcontent: {\n\t\t\t\t\t\t'application/json': {\n\t\t\t\t\t\t\tmessages: Array<{\n\t\t\t\t\t\t\t\tid: string;\n\t\t\t\t\t\t\t\ttext: string;\n\t\t\t\t\t\t\t\ttimestamp: string;\n\t\t\t\t\t\t\t}>;\n\t\t\t\t\t\t\tnextCursor: string | null;\n\t\t\t\t\t\t};\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t};\n\t};\n\t'/echo': {\n\t\tget: {\n\t\t\toperationId: 'echo';\n\t\t\tparameters: {\n\t\t\t\tquery: {\n\t\t\t\t\t[key: string]: string | number | boolean;\n\t\t\t\t};\n\t\t\t};\n\t\t\tresponses: {\n\t\t\t\t200: {\n\t\t\t\t\tcontent: {\n\t\t\t\t\t\t'application/json': {\n\t\t\t\t\t\t\tqueryParams: Record<string, string>;\n\t\t\t\t\t\t\tdata: Array<{\n\t\t\t\t\t\t\t\tid: string;\n\t\t\t\t\t\t\t\tvalue: string;\n\t\t\t\t\t\t\t}>;\n\t\t\t\t\t\t\tpagination: {\n\t\t\t\t\t\t\t\tpage: number;\n\t\t\t\t\t\t\t\tlimit: number;\n\t\t\t\t\t\t\t\ttotal: number;\n\t\t\t\t\t\t\t\thasMore: boolean;\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t};\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t};\n\t};\n}\n\nexport interface components {\n\tschemas: {\n\t\tUser: {\n\t\t\tid: string;\n\t\t\tname: string;\n\t\t\temail: string;\n\t\t};\n\t\tPost: {\n\t\t\tid: string;\n\t\t\ttitle: string;\n\t\t\tcontent: string;\n\t\t\tauthorId: string;\n\t\t\tcreatedAt: string;\n\t\t};\n\t};\n}\n"],"mappings":";;AAOA;;;;;;AA8YoBE,UA9YHF,KAAAA,CA8YGE;EAAM,WACbD,EAAAA;IAAK,UAAA,EAAA;MAkBlB,KAAiBE,CAAAA,EAAAA,KAAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBA9OHF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAkGAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAmEAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA8BGA;;;;;;;;;;;;;;;;;;;;;;;;2BAwBGC;oBACPD;;;;;;;;;;;;;;;;;UAkBIE,UAAAA"}