orval 6.29.1 → 6.30.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.js CHANGED
@@ -3273,6 +3273,7 @@ var import_query = __toESM(require("@orval/query"));
3273
3273
  var import_swr = __toESM(require("@orval/swr"));
3274
3274
  var import_zod = __toESM(require("@orval/zod"));
3275
3275
  var import_hono = __toESM(require("@orval/hono"));
3276
+ var import_fetch = __toESM(require("@orval/fetch"));
3276
3277
  var DEFAULT_CLIENT = import_core.OutputClient.AXIOS;
3277
3278
  var getGeneratorClient = (outputClient, output) => {
3278
3279
  const GENERATOR_CLIENT = {
@@ -3284,7 +3285,8 @@ var getGeneratorClient = (outputClient, output) => {
3284
3285
  "vue-query": (0, import_query.default)({ output, type: "vue-query" })(),
3285
3286
  swr: (0, import_swr.default)()(),
3286
3287
  zod: (0, import_zod.default)()(),
3287
- hono: (0, import_hono.default)()()
3288
+ hono: (0, import_hono.default)()(),
3289
+ fetch: (0, import_fetch.default)()()
3288
3290
  };
3289
3291
  const generator = (0, import_core.isFunction)(outputClient) ? outputClient(GENERATOR_CLIENT) : GENERATOR_CLIENT[outputClient];
3290
3292
  if (!generator) {
@@ -3605,7 +3607,7 @@ var importOpenApi = async ({
3605
3607
  }) => {
3606
3608
  var _a;
3607
3609
  const specs = await generateInputSpecs({ specs: data, input, workspace });
3608
- const schemas = getApiSchemas({ output, target, workspace, specs });
3610
+ const schemas = getApiSchemas({ input, output, target, workspace, specs });
3609
3611
  const api = await getApiBuilder({
3610
3612
  // @ts-expect-error // FIXME
3611
3613
  input,
@@ -3654,6 +3656,7 @@ var generateInputSpecs = async ({
3654
3656
  );
3655
3657
  };
3656
3658
  var getApiSchemas = ({
3659
+ input,
3657
3660
  output,
3658
3661
  target,
3659
3662
  workspace,
@@ -3661,7 +3664,7 @@ var getApiSchemas = ({
3661
3664
  }) => {
3662
3665
  return Object.entries(specs).reduce(
3663
3666
  (acc, [specKey, spec]) => {
3664
- var _a, _b, _c, _d;
3667
+ var _a, _b, _c, _d, _e;
3665
3668
  const context = {
3666
3669
  specKey,
3667
3670
  target,
@@ -3669,23 +3672,25 @@ var getApiSchemas = ({
3669
3672
  specs,
3670
3673
  output
3671
3674
  };
3675
+ const parsedSchemas = spec.openapi ? (_a = spec.components) == null ? void 0 : _a.schemas : getAllSchemas(spec, specKey);
3672
3676
  const schemaDefinition = (0, import_core3.generateSchemasDefinition)(
3673
- !spec.openapi ? getAllSchemas(spec, specKey) : (_a = spec.components) == null ? void 0 : _a.schemas,
3677
+ parsedSchemas,
3674
3678
  context,
3675
- output.override.components.schemas.suffix
3679
+ output.override.components.schemas.suffix,
3680
+ (_b = input.filters) == null ? void 0 : _b.schemas
3676
3681
  );
3677
3682
  const responseDefinition = (0, import_core3.generateComponentDefinition)(
3678
- (_b = spec.components) == null ? void 0 : _b.responses,
3683
+ (_c = spec.components) == null ? void 0 : _c.responses,
3679
3684
  context,
3680
3685
  output.override.components.responses.suffix
3681
3686
  );
3682
3687
  const bodyDefinition = (0, import_core3.generateComponentDefinition)(
3683
- (_c = spec.components) == null ? void 0 : _c.requestBodies,
3688
+ (_d = spec.components) == null ? void 0 : _d.requestBodies,
3684
3689
  context,
3685
3690
  output.override.components.requestBodies.suffix
3686
3691
  );
3687
3692
  const parameters = (0, import_core3.generateParameterDefinition)(
3688
- (_d = spec.components) == null ? void 0 : _d.parameters,
3693
+ (_e = spec.components) == null ? void 0 : _e.parameters,
3689
3694
  context,
3690
3695
  output.override.components.parameters.suffix
3691
3696
  );
@@ -3818,7 +3823,7 @@ var import_chalk2 = __toESM(require("chalk"));
3818
3823
  var package_default = {
3819
3824
  name: "orval",
3820
3825
  description: "A swagger client generator for typescript",
3821
- version: "6.29.1",
3826
+ version: "6.30.1",
3822
3827
  license: "MIT",
3823
3828
  files: [
3824
3829
  "dist"
@@ -3872,18 +3877,19 @@ var package_default = {
3872
3877
  },
3873
3878
  dependencies: {
3874
3879
  "@apidevtools/swagger-parser": "^10.1.0",
3875
- "@orval/angular": "6.29.1",
3876
- "@orval/axios": "6.29.1",
3877
- "@orval/core": "6.29.1",
3878
- "@orval/hono": "6.29.1",
3879
- "@orval/mock": "6.29.1",
3880
- "@orval/query": "6.29.1",
3881
- "@orval/swr": "6.29.1",
3882
- "@orval/zod": "6.29.1",
3880
+ "@orval/angular": "6.30.1",
3881
+ "@orval/axios": "6.30.1",
3882
+ "@orval/core": "6.30.1",
3883
+ "@orval/fetch": "6.30.1",
3884
+ "@orval/hono": "6.30.1",
3885
+ "@orval/mock": "6.30.1",
3886
+ "@orval/query": "6.30.1",
3887
+ "@orval/swr": "6.30.1",
3888
+ "@orval/zod": "6.30.1",
3883
3889
  ajv: "^8.12.0",
3884
3890
  cac: "^6.7.14",
3885
3891
  chalk: "^4.1.2",
3886
- chokidar: "^3.5.3",
3892
+ chokidar: "^3.6.0",
3887
3893
  enquirer: "^2.4.1",
3888
3894
  execa: "^5.1.1",
3889
3895
  "find-up": "5.0.0",
@@ -4107,7 +4113,7 @@ function defineConfig(options) {
4107
4113
  return options;
4108
4114
  }
4109
4115
  var normalizeOptions = async (optionsExport, workspace = process.cwd(), globalOptions = {}) => {
4110
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa, _ba, _ca, _da, _ea, _fa, _ga, _ha, _ia, _ja, _ka, _la, _ma, _na, _oa, _pa, _qa, _ra, _sa, _ta, _ua, _va, _wa, _xa, _ya, _za, _Aa, _Ba, _Ca, _Da, _Ea, _Fa, _Ga, _Ha, _Ia, _Ja, _Ka, _La, _Ma, _Na, _Oa, _Pa, _Qa, _Ra, _Sa, _Ta, _Ua, _Va, _Wa, _Xa, _Ya, _Za, __a, _$a, _ab, _bb, _cb, _db, _eb, _fb, _gb, _hb, _ib, _jb, _kb, _lb, _mb, _nb, _ob, _pb, _qb, _rb, _sb, _tb, _ub, _vb, _wb, _xb, _yb, _zb, _Ab, _Bb, _Cb, _Db, _Eb, _Fb, _Gb, _Hb, _Ib, _Jb, _Kb, _Lb, _Mb, _Nb, _Ob, _Pb;
4116
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa, _ba, _ca, _da, _ea, _fa, _ga, _ha, _ia, _ja, _ka, _la, _ma, _na, _oa, _pa, _qa, _ra, _sa, _ta, _ua, _va, _wa, _xa, _ya, _za, _Aa, _Ba, _Ca, _Da, _Ea, _Fa, _Ga, _Ha, _Ia, _Ja, _Ka, _La, _Ma, _Na, _Oa, _Pa, _Qa, _Ra, _Sa, _Ta, _Ua, _Va, _Wa, _Xa, _Ya, _Za, __a, _$a, _ab, _bb, _cb, _db, _eb, _fb, _gb, _hb, _ib, _jb, _kb, _lb, _mb, _nb, _ob, _pb, _qb, _rb, _sb, _tb, _ub, _vb, _wb, _xb, _yb, _zb, _Ab, _Bb, _Cb, _Db, _Eb, _Fb, _Gb, _Hb, _Ib, _Jb, _Kb, _Lb, _Mb, _Nb, _Ob, _Pb, _Qb, _Rb, _Sb, _Tb, _Ub, _Vb, _Wb, _Xb, _Yb, _Zb, __b, _$b, _ac, _bc, _cc, _dc, _ec, _fc, _gc;
4111
4117
  const options = await ((0, import_core7.isFunction)(optionsExport) ? optionsExport() : optionsExport);
4112
4118
  if (!options.input) {
4113
4119
  (0, import_core7.createLogger)().error(import_chalk2.default.red(`Config require an input`));
@@ -4145,20 +4151,29 @@ var normalizeOptions = async (optionsExport, workspace = process.cwd(), globalOp
4145
4151
  };
4146
4152
  }
4147
4153
  const defaultFileExtension = ".ts";
4154
+ const globalQueryOptions = {
4155
+ useQuery: (_d = (_c = (_b = outputOptions.override) == null ? void 0 : _b.query) == null ? void 0 : _c.useQuery) != null ? _d : true,
4156
+ useMutation: (_g = (_f = (_e = outputOptions.override) == null ? void 0 : _e.query) == null ? void 0 : _f.useMutation) != null ? _g : true,
4157
+ signal: (_j = (_i = (_h = outputOptions.override) == null ? void 0 : _h.query) == null ? void 0 : _i.signal) != null ? _j : true,
4158
+ shouldExportMutatorHooks: (_m = (_l = (_k = outputOptions.override) == null ? void 0 : _k.query) == null ? void 0 : _l.shouldExportMutatorHooks) != null ? _m : true,
4159
+ shouldExportHttpClient: (_p = (_o = (_n = outputOptions.override) == null ? void 0 : _n.query) == null ? void 0 : _o.shouldExportHttpClient) != null ? _p : true,
4160
+ shouldExportQueryKey: (_s = (_r = (_q = outputOptions.override) == null ? void 0 : _q.query) == null ? void 0 : _r.shouldExportQueryKey) != null ? _s : true,
4161
+ ...normalizeQueryOptions((_t = outputOptions.override) == null ? void 0 : _t.query, workspace)
4162
+ };
4148
4163
  const normalizedOptions = {
4149
4164
  input: {
4150
4165
  target: globalOptions.input ? normalizePathOrUrl(globalOptions.input, process.cwd()) : normalizePathOrUrl(inputOptions.target, workspace),
4151
4166
  validation: inputOptions.validation || false,
4152
4167
  override: {
4153
4168
  transformer: normalizePath(
4154
- (_b = inputOptions.override) == null ? void 0 : _b.transformer,
4169
+ (_u = inputOptions.override) == null ? void 0 : _u.transformer,
4155
4170
  workspace
4156
4171
  )
4157
4172
  },
4158
- converterOptions: (_c = inputOptions.converterOptions) != null ? _c : {},
4173
+ converterOptions: (_v = inputOptions.converterOptions) != null ? _v : {},
4159
4174
  parserOptions: (0, import_core7.mergeDeep)(
4160
4175
  parserDefaultOptions,
4161
- (_d = inputOptions.parserOptions) != null ? _d : {}
4176
+ (_w = inputOptions.parserOptions) != null ? _w : {}
4162
4177
  ),
4163
4178
  filters: inputOptions.filters
4164
4179
  },
@@ -4167,122 +4182,128 @@ var normalizeOptions = async (optionsExport, workspace = process.cwd(), globalOp
4167
4182
  schemas: normalizePath(outputOptions.schemas, outputWorkspace),
4168
4183
  fileExtension: outputOptions.fileExtension || defaultFileExtension,
4169
4184
  workspace: outputOptions.workspace ? outputWorkspace : void 0,
4170
- client: (_f = (_e = outputOptions.client) != null ? _e : client) != null ? _f : import_core7.OutputClient.AXIOS_FUNCTIONS,
4171
- mode: normalizeOutputMode((_g = outputOptions.mode) != null ? _g : mode),
4185
+ client: (_y = (_x = outputOptions.client) != null ? _x : client) != null ? _y : import_core7.OutputClient.AXIOS_FUNCTIONS,
4186
+ mode: normalizeOutputMode((_z = outputOptions.mode) != null ? _z : mode),
4172
4187
  mock: mock2,
4173
- clean: (_i = (_h = outputOptions.clean) != null ? _h : clean) != null ? _i : false,
4174
- prettier: (_k = (_j = outputOptions.prettier) != null ? _j : prettier) != null ? _k : false,
4175
- tslint: (_m = (_l = outputOptions.tslint) != null ? _l : tslint) != null ? _m : false,
4176
- biome: (_o = (_n = outputOptions.biome) != null ? _n : biome) != null ? _o : false,
4188
+ clean: (_B = (_A = outputOptions.clean) != null ? _A : clean) != null ? _B : false,
4189
+ prettier: (_D = (_C = outputOptions.prettier) != null ? _C : prettier) != null ? _D : false,
4190
+ tslint: (_F = (_E = outputOptions.tslint) != null ? _E : tslint) != null ? _F : false,
4191
+ biome: (_H = (_G = outputOptions.biome) != null ? _G : biome) != null ? _H : false,
4177
4192
  tsconfig,
4178
4193
  packageJson,
4179
- headers: (_p = outputOptions.headers) != null ? _p : false,
4180
- indexFiles: (_q = outputOptions.indexFiles) != null ? _q : true,
4194
+ headers: (_I = outputOptions.headers) != null ? _I : false,
4195
+ indexFiles: (_J = outputOptions.indexFiles) != null ? _J : true,
4181
4196
  baseUrl: outputOptions.baseUrl,
4182
- unionAddMissingProperties: (_r = outputOptions.unionAddMissingProperties) != null ? _r : false,
4197
+ unionAddMissingProperties: (_K = outputOptions.unionAddMissingProperties) != null ? _K : false,
4183
4198
  override: {
4184
4199
  ...outputOptions.override,
4185
4200
  mock: {
4186
- arrayMin: (_u = (_t = (_s = outputOptions.override) == null ? void 0 : _s.mock) == null ? void 0 : _t.arrayMin) != null ? _u : 1,
4187
- arrayMax: (_x = (_w = (_v = outputOptions.override) == null ? void 0 : _v.mock) == null ? void 0 : _w.arrayMax) != null ? _x : 10,
4188
- ...(_z = (_y = outputOptions.override) == null ? void 0 : _y.mock) != null ? _z : {}
4201
+ arrayMin: (_N = (_M = (_L = outputOptions.override) == null ? void 0 : _L.mock) == null ? void 0 : _M.arrayMin) != null ? _N : 1,
4202
+ arrayMax: (_Q = (_P = (_O = outputOptions.override) == null ? void 0 : _O.mock) == null ? void 0 : _P.arrayMax) != null ? _Q : 10,
4203
+ ...(_S = (_R = outputOptions.override) == null ? void 0 : _R.mock) != null ? _S : {}
4189
4204
  },
4190
4205
  operations: normalizeOperationsAndTags(
4191
- (_B = (_A = outputOptions.override) == null ? void 0 : _A.operations) != null ? _B : {},
4192
- outputWorkspace
4206
+ (_U = (_T = outputOptions.override) == null ? void 0 : _T.operations) != null ? _U : {},
4207
+ outputWorkspace,
4208
+ {
4209
+ query: globalQueryOptions
4210
+ }
4193
4211
  ),
4194
4212
  tags: normalizeOperationsAndTags(
4195
- (_D = (_C = outputOptions.override) == null ? void 0 : _C.tags) != null ? _D : {},
4196
- outputWorkspace
4213
+ (_W = (_V = outputOptions.override) == null ? void 0 : _V.tags) != null ? _W : {},
4214
+ outputWorkspace,
4215
+ {
4216
+ query: globalQueryOptions
4217
+ }
4197
4218
  ),
4198
4219
  mutator: normalizeMutator(
4199
4220
  outputWorkspace,
4200
- (_E = outputOptions.override) == null ? void 0 : _E.mutator
4221
+ (_X = outputOptions.override) == null ? void 0 : _X.mutator
4201
4222
  ),
4202
- formData: (_I = !(0, import_core7.isBoolean)((_F = outputOptions.override) == null ? void 0 : _F.formData) ? normalizeMutator(
4223
+ formData: (_$ = !(0, import_core7.isBoolean)((_Y = outputOptions.override) == null ? void 0 : _Y.formData) ? normalizeMutator(
4203
4224
  outputWorkspace,
4204
- (_G = outputOptions.override) == null ? void 0 : _G.formData
4205
- ) : (_H = outputOptions.override) == null ? void 0 : _H.formData) != null ? _I : true,
4206
- formUrlEncoded: (_M = !(0, import_core7.isBoolean)((_J = outputOptions.override) == null ? void 0 : _J.formUrlEncoded) ? normalizeMutator(
4225
+ (_Z = outputOptions.override) == null ? void 0 : _Z.formData
4226
+ ) : (__ = outputOptions.override) == null ? void 0 : __.formData) != null ? _$ : true,
4227
+ formUrlEncoded: (_da = !(0, import_core7.isBoolean)((_aa = outputOptions.override) == null ? void 0 : _aa.formUrlEncoded) ? normalizeMutator(
4207
4228
  outputWorkspace,
4208
- (_K = outputOptions.override) == null ? void 0 : _K.formUrlEncoded
4209
- ) : (_L = outputOptions.override) == null ? void 0 : _L.formUrlEncoded) != null ? _M : true,
4229
+ (_ba = outputOptions.override) == null ? void 0 : _ba.formUrlEncoded
4230
+ ) : (_ca = outputOptions.override) == null ? void 0 : _ca.formUrlEncoded) != null ? _da : true,
4210
4231
  paramsSerializer: normalizeMutator(
4211
4232
  outputWorkspace,
4212
- (_N = outputOptions.override) == null ? void 0 : _N.paramsSerializer
4233
+ (_ea = outputOptions.override) == null ? void 0 : _ea.paramsSerializer
4213
4234
  ),
4214
- header: ((_O = outputOptions.override) == null ? void 0 : _O.header) === false ? false : (0, import_core7.isFunction)((_P = outputOptions.override) == null ? void 0 : _P.header) ? (_Q = outputOptions.override) == null ? void 0 : _Q.header : getDefaultFilesHeader,
4215
- requestOptions: (_S = (_R = outputOptions.override) == null ? void 0 : _R.requestOptions) != null ? _S : true,
4235
+ header: ((_fa = outputOptions.override) == null ? void 0 : _fa.header) === false ? false : (0, import_core7.isFunction)((_ga = outputOptions.override) == null ? void 0 : _ga.header) ? (_ha = outputOptions.override) == null ? void 0 : _ha.header : getDefaultFilesHeader,
4236
+ requestOptions: (_ja = (_ia = outputOptions.override) == null ? void 0 : _ia.requestOptions) != null ? _ja : true,
4216
4237
  components: {
4217
4238
  schemas: {
4218
4239
  suffix: import_core7.RefComponentSuffix.schemas,
4219
- itemSuffix: (_W = (_V = (_U = (_T = outputOptions.override) == null ? void 0 : _T.components) == null ? void 0 : _U.schemas) == null ? void 0 : _V.itemSuffix) != null ? _W : "Item",
4220
- ...(_Z = (_Y = (_X = outputOptions.override) == null ? void 0 : _X.components) == null ? void 0 : _Y.schemas) != null ? _Z : {}
4240
+ itemSuffix: (_na = (_ma = (_la = (_ka = outputOptions.override) == null ? void 0 : _ka.components) == null ? void 0 : _la.schemas) == null ? void 0 : _ma.itemSuffix) != null ? _na : "Item",
4241
+ ...(_qa = (_pa = (_oa = outputOptions.override) == null ? void 0 : _oa.components) == null ? void 0 : _pa.schemas) != null ? _qa : {}
4221
4242
  },
4222
4243
  responses: {
4223
4244
  suffix: import_core7.RefComponentSuffix.responses,
4224
- ...(_aa = (_$ = (__ = outputOptions.override) == null ? void 0 : __.components) == null ? void 0 : _$.responses) != null ? _aa : {}
4245
+ ...(_ta = (_sa = (_ra = outputOptions.override) == null ? void 0 : _ra.components) == null ? void 0 : _sa.responses) != null ? _ta : {}
4225
4246
  },
4226
4247
  parameters: {
4227
4248
  suffix: import_core7.RefComponentSuffix.parameters,
4228
- ...(_da = (_ca = (_ba = outputOptions.override) == null ? void 0 : _ba.components) == null ? void 0 : _ca.parameters) != null ? _da : {}
4249
+ ...(_wa = (_va = (_ua = outputOptions.override) == null ? void 0 : _ua.components) == null ? void 0 : _va.parameters) != null ? _wa : {}
4229
4250
  },
4230
4251
  requestBodies: {
4231
4252
  suffix: import_core7.RefComponentSuffix.requestBodies,
4232
- ...(_ga = (_fa = (_ea = outputOptions.override) == null ? void 0 : _ea.components) == null ? void 0 : _fa.requestBodies) != null ? _ga : {}
4253
+ ...(_za = (_ya = (_xa = outputOptions.override) == null ? void 0 : _xa.components) == null ? void 0 : _ya.requestBodies) != null ? _za : {}
4233
4254
  }
4234
4255
  },
4235
- hono: normalizeHonoOptions((_ha = outputOptions.override) == null ? void 0 : _ha.hono, workspace),
4256
+ hono: normalizeHonoOptions((_Aa = outputOptions.override) == null ? void 0 : _Aa.hono, workspace),
4236
4257
  query: {
4237
- useQuery: (_ka = (_ja = (_ia = outputOptions.override) == null ? void 0 : _ia.query) == null ? void 0 : _ja.useQuery) != null ? _ka : true,
4238
- useMutation: (_na = (_ma = (_la = outputOptions.override) == null ? void 0 : _la.query) == null ? void 0 : _ma.useMutation) != null ? _na : true,
4239
- signal: (_qa = (_pa = (_oa = outputOptions.override) == null ? void 0 : _oa.query) == null ? void 0 : _pa.signal) != null ? _qa : true,
4240
- shouldExportMutatorHooks: (_ta = (_sa = (_ra = outputOptions.override) == null ? void 0 : _ra.query) == null ? void 0 : _sa.shouldExportMutatorHooks) != null ? _ta : true,
4241
- shouldExportHttpClient: (_wa = (_va = (_ua = outputOptions.override) == null ? void 0 : _ua.query) == null ? void 0 : _va.shouldExportHttpClient) != null ? _wa : true,
4242
- shouldExportQueryKey: (_za = (_ya = (_xa = outputOptions.override) == null ? void 0 : _xa.query) == null ? void 0 : _ya.shouldExportQueryKey) != null ? _za : true,
4243
- ...normalizeQueryOptions((_Aa = outputOptions.override) == null ? void 0 : _Aa.query, workspace)
4258
+ useQuery: (_Da = (_Ca = (_Ba = outputOptions.override) == null ? void 0 : _Ba.query) == null ? void 0 : _Ca.useQuery) != null ? _Da : true,
4259
+ useMutation: (_Ga = (_Fa = (_Ea = outputOptions.override) == null ? void 0 : _Ea.query) == null ? void 0 : _Fa.useMutation) != null ? _Ga : true,
4260
+ signal: (_Ja = (_Ia = (_Ha = outputOptions.override) == null ? void 0 : _Ha.query) == null ? void 0 : _Ia.signal) != null ? _Ja : true,
4261
+ shouldExportMutatorHooks: (_Ma = (_La = (_Ka = outputOptions.override) == null ? void 0 : _Ka.query) == null ? void 0 : _La.shouldExportMutatorHooks) != null ? _Ma : true,
4262
+ shouldExportHttpClient: (_Pa = (_Oa = (_Na = outputOptions.override) == null ? void 0 : _Na.query) == null ? void 0 : _Oa.shouldExportHttpClient) != null ? _Pa : true,
4263
+ shouldExportQueryKey: (_Sa = (_Ra = (_Qa = outputOptions.override) == null ? void 0 : _Qa.query) == null ? void 0 : _Ra.shouldExportQueryKey) != null ? _Sa : true,
4264
+ ...normalizeQueryOptions((_Ta = outputOptions.override) == null ? void 0 : _Ta.query, workspace)
4244
4265
  },
4245
4266
  zod: {
4246
4267
  strict: {
4247
- param: (_Ea = (_Da = (_Ca = (_Ba = outputOptions.override) == null ? void 0 : _Ba.zod) == null ? void 0 : _Ca.strict) == null ? void 0 : _Da.param) != null ? _Ea : false,
4248
- query: (_Ia = (_Ha = (_Ga = (_Fa = outputOptions.override) == null ? void 0 : _Fa.zod) == null ? void 0 : _Ga.strict) == null ? void 0 : _Ha.query) != null ? _Ia : false,
4249
- header: (_Ma = (_La = (_Ka = (_Ja = outputOptions.override) == null ? void 0 : _Ja.zod) == null ? void 0 : _Ka.strict) == null ? void 0 : _La.header) != null ? _Ma : false,
4250
- body: (_Qa = (_Pa = (_Oa = (_Na = outputOptions.override) == null ? void 0 : _Na.zod) == null ? void 0 : _Oa.strict) == null ? void 0 : _Pa.body) != null ? _Qa : false,
4251
- response: (_Ua = (_Ta = (_Sa = (_Ra = outputOptions.override) == null ? void 0 : _Ra.zod) == null ? void 0 : _Sa.strict) == null ? void 0 : _Ta.response) != null ? _Ua : false
4268
+ param: (_Xa = (_Wa = (_Va = (_Ua = outputOptions.override) == null ? void 0 : _Ua.zod) == null ? void 0 : _Va.strict) == null ? void 0 : _Wa.param) != null ? _Xa : false,
4269
+ query: (_$a = (__a = (_Za = (_Ya = outputOptions.override) == null ? void 0 : _Ya.zod) == null ? void 0 : _Za.strict) == null ? void 0 : __a.query) != null ? _$a : false,
4270
+ header: (_db = (_cb = (_bb = (_ab = outputOptions.override) == null ? void 0 : _ab.zod) == null ? void 0 : _bb.strict) == null ? void 0 : _cb.header) != null ? _db : false,
4271
+ body: (_hb = (_gb = (_fb = (_eb = outputOptions.override) == null ? void 0 : _eb.zod) == null ? void 0 : _fb.strict) == null ? void 0 : _gb.body) != null ? _hb : false,
4272
+ response: (_lb = (_kb = (_jb = (_ib = outputOptions.override) == null ? void 0 : _ib.zod) == null ? void 0 : _jb.strict) == null ? void 0 : _kb.response) != null ? _lb : false
4252
4273
  },
4253
4274
  coerce: {
4254
- param: (_Ya = (_Xa = (_Wa = (_Va = outputOptions.override) == null ? void 0 : _Va.zod) == null ? void 0 : _Wa.coerce) == null ? void 0 : _Xa.param) != null ? _Ya : false,
4255
- query: (_ab = (_$a = (__a = (_Za = outputOptions.override) == null ? void 0 : _Za.zod) == null ? void 0 : __a.coerce) == null ? void 0 : _$a.query) != null ? _ab : false,
4256
- header: (_eb = (_db = (_cb = (_bb = outputOptions.override) == null ? void 0 : _bb.zod) == null ? void 0 : _cb.coerce) == null ? void 0 : _db.header) != null ? _eb : false,
4257
- body: (_ib = (_hb = (_gb = (_fb = outputOptions.override) == null ? void 0 : _fb.zod) == null ? void 0 : _gb.coerce) == null ? void 0 : _hb.body) != null ? _ib : false,
4258
- response: (_mb = (_lb = (_kb = (_jb = outputOptions.override) == null ? void 0 : _jb.zod) == null ? void 0 : _kb.coerce) == null ? void 0 : _lb.response) != null ? _mb : false
4275
+ param: (_pb = (_ob = (_nb = (_mb = outputOptions.override) == null ? void 0 : _mb.zod) == null ? void 0 : _nb.coerce) == null ? void 0 : _ob.param) != null ? _pb : false,
4276
+ query: (_tb = (_sb = (_rb = (_qb = outputOptions.override) == null ? void 0 : _qb.zod) == null ? void 0 : _rb.coerce) == null ? void 0 : _sb.query) != null ? _tb : false,
4277
+ header: (_xb = (_wb = (_vb = (_ub = outputOptions.override) == null ? void 0 : _ub.zod) == null ? void 0 : _vb.coerce) == null ? void 0 : _wb.header) != null ? _xb : false,
4278
+ body: (_Bb = (_Ab = (_zb = (_yb = outputOptions.override) == null ? void 0 : _yb.zod) == null ? void 0 : _zb.coerce) == null ? void 0 : _Ab.body) != null ? _Bb : false,
4279
+ response: (_Fb = (_Eb = (_Db = (_Cb = outputOptions.override) == null ? void 0 : _Cb.zod) == null ? void 0 : _Db.coerce) == null ? void 0 : _Eb.response) != null ? _Fb : false
4259
4280
  },
4260
4281
  preprocess: {
4261
- ...((_pb = (_ob = (_nb = outputOptions.override) == null ? void 0 : _nb.zod) == null ? void 0 : _ob.preprocess) == null ? void 0 : _pb.param) ? {
4282
+ ...((_Ib = (_Hb = (_Gb = outputOptions.override) == null ? void 0 : _Gb.zod) == null ? void 0 : _Hb.preprocess) == null ? void 0 : _Ib.param) ? {
4262
4283
  param: normalizeMutator(
4263
4284
  workspace,
4264
4285
  outputOptions.override.zod.preprocess.param
4265
4286
  )
4266
4287
  } : {},
4267
- ...((_sb = (_rb = (_qb = outputOptions.override) == null ? void 0 : _qb.zod) == null ? void 0 : _rb.preprocess) == null ? void 0 : _sb.query) ? {
4288
+ ...((_Lb = (_Kb = (_Jb = outputOptions.override) == null ? void 0 : _Jb.zod) == null ? void 0 : _Kb.preprocess) == null ? void 0 : _Lb.query) ? {
4268
4289
  query: normalizeMutator(
4269
4290
  workspace,
4270
4291
  outputOptions.override.zod.preprocess.query
4271
4292
  )
4272
4293
  } : {},
4273
- ...((_vb = (_ub = (_tb = outputOptions.override) == null ? void 0 : _tb.zod) == null ? void 0 : _ub.preprocess) == null ? void 0 : _vb.header) ? {
4294
+ ...((_Ob = (_Nb = (_Mb = outputOptions.override) == null ? void 0 : _Mb.zod) == null ? void 0 : _Nb.preprocess) == null ? void 0 : _Ob.header) ? {
4274
4295
  header: normalizeMutator(
4275
4296
  workspace,
4276
4297
  outputOptions.override.zod.preprocess.header
4277
4298
  )
4278
4299
  } : {},
4279
- ...((_yb = (_xb = (_wb = outputOptions.override) == null ? void 0 : _wb.zod) == null ? void 0 : _xb.preprocess) == null ? void 0 : _yb.body) ? {
4300
+ ...((_Rb = (_Qb = (_Pb = outputOptions.override) == null ? void 0 : _Pb.zod) == null ? void 0 : _Qb.preprocess) == null ? void 0 : _Rb.body) ? {
4280
4301
  body: normalizeMutator(
4281
4302
  workspace,
4282
4303
  outputOptions.override.zod.preprocess.body
4283
4304
  )
4284
4305
  } : {},
4285
- ...((_Bb = (_Ab = (_zb = outputOptions.override) == null ? void 0 : _zb.zod) == null ? void 0 : _Ab.preprocess) == null ? void 0 : _Bb.response) ? {
4306
+ ...((_Ub = (_Tb = (_Sb = outputOptions.override) == null ? void 0 : _Sb.zod) == null ? void 0 : _Tb.preprocess) == null ? void 0 : _Ub.response) ? {
4286
4307
  response: normalizeMutator(
4287
4308
  workspace,
4288
4309
  outputOptions.override.zod.preprocess.response
@@ -4291,19 +4312,19 @@ var normalizeOptions = async (optionsExport, workspace = process.cwd(), globalOp
4291
4312
  }
4292
4313
  },
4293
4314
  swr: {
4294
- ...(_Db = (_Cb = outputOptions.override) == null ? void 0 : _Cb.swr) != null ? _Db : {}
4315
+ ...(_Wb = (_Vb = outputOptions.override) == null ? void 0 : _Vb.swr) != null ? _Wb : {}
4295
4316
  },
4296
4317
  angular: {
4297
- provideIn: (_Gb = (_Fb = (_Eb = outputOptions.override) == null ? void 0 : _Eb.angular) == null ? void 0 : _Fb.provideIn) != null ? _Gb : "root"
4318
+ provideIn: (_Zb = (_Yb = (_Xb = outputOptions.override) == null ? void 0 : _Xb.angular) == null ? void 0 : _Yb.provideIn) != null ? _Zb : "root"
4298
4319
  },
4299
- useDates: ((_Hb = outputOptions.override) == null ? void 0 : _Hb.useDates) || false,
4300
- useDeprecatedOperations: (_Jb = (_Ib = outputOptions.override) == null ? void 0 : _Ib.useDeprecatedOperations) != null ? _Jb : true,
4301
- useNativeEnums: (_Lb = (_Kb = outputOptions.override) == null ? void 0 : _Kb.useNativeEnums) != null ? _Lb : false,
4302
- suppressReadonlyModifier: ((_Mb = outputOptions.override) == null ? void 0 : _Mb.suppressReadonlyModifier) || false
4320
+ useDates: ((__b = outputOptions.override) == null ? void 0 : __b.useDates) || false,
4321
+ useDeprecatedOperations: (_ac = (_$b = outputOptions.override) == null ? void 0 : _$b.useDeprecatedOperations) != null ? _ac : true,
4322
+ useNativeEnums: (_cc = (_bc = outputOptions.override) == null ? void 0 : _bc.useNativeEnums) != null ? _cc : false,
4323
+ suppressReadonlyModifier: ((_dc = outputOptions.override) == null ? void 0 : _dc.suppressReadonlyModifier) || false
4303
4324
  },
4304
- allParamsOptional: (_Nb = outputOptions.allParamsOptional) != null ? _Nb : false,
4305
- urlEncodeParameters: (_Ob = outputOptions.urlEncodeParameters) != null ? _Ob : false,
4306
- optionsParamRequired: (_Pb = outputOptions.optionsParamRequired) != null ? _Pb : false
4325
+ allParamsOptional: (_ec = outputOptions.allParamsOptional) != null ? _ec : false,
4326
+ urlEncodeParameters: (_fc = outputOptions.urlEncodeParameters) != null ? _fc : false,
4327
+ optionsParamRequired: (_gc = outputOptions.optionsParamRequired) != null ? _gc : false
4307
4328
  },
4308
4329
  hooks: options.hooks ? normalizeHooks(options.hooks) : {}
4309
4330
  };
@@ -4356,7 +4377,7 @@ var normalizePath = (path, workspace) => {
4356
4377
  }
4357
4378
  return import_core7.upath.resolve(workspace, path);
4358
4379
  };
4359
- var normalizeOperationsAndTags = (operationsOrTags, workspace) => {
4380
+ var normalizeOperationsAndTags = (operationsOrTags, workspace, global2) => {
4360
4381
  return Object.fromEntries(
4361
4382
  Object.entries(operationsOrTags).map(
4362
4383
  ([
@@ -4378,7 +4399,7 @@ var normalizeOperationsAndTags = (operationsOrTags, workspace) => {
4378
4399
  {
4379
4400
  ...rest,
4380
4401
  ...query2 ? {
4381
- query: normalizeQueryOptions(query2, workspace)
4402
+ query: normalizeQueryOptions(query2, workspace, global2.query)
4382
4403
  } : {},
4383
4404
  ...zod2 ? {
4384
4405
  zod: {
@@ -4494,7 +4515,8 @@ var normalizeHonoOptions = (hono2 = {}, workspace) => {
4494
4515
  validator: (_a = hono2.validator) != null ? _a : true
4495
4516
  };
4496
4517
  };
4497
- var normalizeQueryOptions = (queryOptions = {}, outputWorkspace) => {
4518
+ var normalizeQueryOptions = (queryOptions = {}, outputWorkspace, globalOptions = {}) => {
4519
+ var _a, _b, _c, _d;
4498
4520
  if (queryOptions.options) {
4499
4521
  console.warn(
4500
4522
  "[WARN] Using query options is deprecated and will be removed in a future major release. Please use queryOptions or mutationOptions instead."
@@ -4509,25 +4531,37 @@ var normalizeQueryOptions = (queryOptions = {}, outputWorkspace) => {
4509
4531
  ...!(0, import_core7.isUndefined)(queryOptions.useSuspenseInfiniteQuery) ? { useSuspenseInfiniteQuery: queryOptions.useSuspenseInfiniteQuery } : {},
4510
4532
  ...queryOptions.useInfiniteQueryParam ? { useInfiniteQueryParam: queryOptions.useInfiniteQueryParam } : {},
4511
4533
  ...queryOptions.options ? { options: queryOptions.options } : {},
4534
+ ...globalOptions.queryKey ? {
4535
+ queryKey: globalOptions.queryKey
4536
+ } : {},
4512
4537
  ...(queryOptions == null ? void 0 : queryOptions.queryKey) ? {
4513
4538
  queryKey: normalizeMutator(outputWorkspace, queryOptions == null ? void 0 : queryOptions.queryKey)
4514
4539
  } : {},
4540
+ ...globalOptions.queryOptions ? {
4541
+ queryOptions: globalOptions.queryOptions
4542
+ } : {},
4515
4543
  ...(queryOptions == null ? void 0 : queryOptions.queryOptions) ? {
4516
4544
  queryOptions: normalizeMutator(
4517
4545
  outputWorkspace,
4518
4546
  queryOptions == null ? void 0 : queryOptions.queryOptions
4519
4547
  )
4520
4548
  } : {},
4549
+ ...globalOptions.mutationOptions ? {
4550
+ mutationOptions: globalOptions.mutationOptions
4551
+ } : {},
4521
4552
  ...(queryOptions == null ? void 0 : queryOptions.mutationOptions) ? {
4522
4553
  mutationOptions: normalizeMutator(
4523
4554
  outputWorkspace,
4524
4555
  queryOptions == null ? void 0 : queryOptions.mutationOptions
4525
4556
  )
4526
4557
  } : {},
4527
- ...!(0, import_core7.isUndefined)(queryOptions.shouldExportMutatorHooks) ? { shouldExportMutatorHooks: queryOptions.shouldExportMutatorHooks } : {},
4528
- ...!(0, import_core7.isUndefined)(queryOptions.shouldExportQueryKey) ? { shouldExportQueryKey: queryOptions.shouldExportQueryKey } : {},
4529
- ...!(0, import_core7.isUndefined)(queryOptions.shouldExportHttpClient) ? { shouldExportHttpClient: queryOptions.shouldExportHttpClient } : {},
4530
- ...!(0, import_core7.isUndefined)(queryOptions.signal) ? { signal: queryOptions.signal } : {},
4558
+ shouldExportQueryKey: (_a = queryOptions.shouldExportQueryKey) != null ? _a : globalOptions.shouldExportQueryKey,
4559
+ shouldExportHttpClient: (_b = queryOptions.shouldExportHttpClient) != null ? _b : globalOptions.shouldExportHttpClient,
4560
+ shouldExportMutatorHooks: (_c = queryOptions.shouldExportMutatorHooks) != null ? _c : globalOptions.shouldExportMutatorHooks,
4561
+ signal: (_d = queryOptions.signal) != null ? _d : globalOptions.signal,
4562
+ ...!(0, import_core7.isUndefined)(globalOptions.version) ? {
4563
+ version: globalOptions.version
4564
+ } : {},
4531
4565
  ...!(0, import_core7.isUndefined)(queryOptions.version) ? { version: queryOptions.version } : {}
4532
4566
  };
4533
4567
  };