@orval/query 7.11.2 → 7.12.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,2860 +1,1002 @@
1
- "use strict";
1
+ Object.defineProperty(exports, '__esModule', { value: true });
2
+ //#region rolldown:runtime
2
3
  var __create = Object.create;
3
4
  var __defProp = Object.defineProperty;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
7
  var __getProtoOf = Object.getPrototypeOf;
7
8
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __commonJS = (cb, mod) => function __require() {
9
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
10
- };
11
- var __export = (target, all) => {
12
- for (var name in all)
13
- __defProp(target, name, { get: all[name], enumerable: true });
14
- };
15
9
  var __copyProps = (to, from, except, desc) => {
16
- if (from && typeof from === "object" || typeof from === "function") {
17
- for (let key of __getOwnPropNames(from))
18
- if (!__hasOwnProp.call(to, key) && key !== except)
19
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
20
- }
21
- return to;
10
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
11
+ key = keys[i];
12
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
13
+ get: ((k) => from[k]).bind(null, key),
14
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
+ });
16
+ }
17
+ return to;
22
18
  };
23
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
24
- // If the importer is in node compatibility mode or this is not an ESM
25
- // file that has been converted to a CommonJS file using a Babel-
26
- // compatible transform (i.e. "__esModule" has not been set), then set
27
- // "default" to the CommonJS "module.exports" for node compatibility.
28
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
29
- mod
30
- ));
31
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
32
-
33
- // ../../node_modules/chalk/node_modules/color-name/index.js
34
- var require_color_name = __commonJS({
35
- "../../node_modules/chalk/node_modules/color-name/index.js"(exports2, module2) {
36
- "use strict";
37
- module2.exports = {
38
- "aliceblue": [240, 248, 255],
39
- "antiquewhite": [250, 235, 215],
40
- "aqua": [0, 255, 255],
41
- "aquamarine": [127, 255, 212],
42
- "azure": [240, 255, 255],
43
- "beige": [245, 245, 220],
44
- "bisque": [255, 228, 196],
45
- "black": [0, 0, 0],
46
- "blanchedalmond": [255, 235, 205],
47
- "blue": [0, 0, 255],
48
- "blueviolet": [138, 43, 226],
49
- "brown": [165, 42, 42],
50
- "burlywood": [222, 184, 135],
51
- "cadetblue": [95, 158, 160],
52
- "chartreuse": [127, 255, 0],
53
- "chocolate": [210, 105, 30],
54
- "coral": [255, 127, 80],
55
- "cornflowerblue": [100, 149, 237],
56
- "cornsilk": [255, 248, 220],
57
- "crimson": [220, 20, 60],
58
- "cyan": [0, 255, 255],
59
- "darkblue": [0, 0, 139],
60
- "darkcyan": [0, 139, 139],
61
- "darkgoldenrod": [184, 134, 11],
62
- "darkgray": [169, 169, 169],
63
- "darkgreen": [0, 100, 0],
64
- "darkgrey": [169, 169, 169],
65
- "darkkhaki": [189, 183, 107],
66
- "darkmagenta": [139, 0, 139],
67
- "darkolivegreen": [85, 107, 47],
68
- "darkorange": [255, 140, 0],
69
- "darkorchid": [153, 50, 204],
70
- "darkred": [139, 0, 0],
71
- "darksalmon": [233, 150, 122],
72
- "darkseagreen": [143, 188, 143],
73
- "darkslateblue": [72, 61, 139],
74
- "darkslategray": [47, 79, 79],
75
- "darkslategrey": [47, 79, 79],
76
- "darkturquoise": [0, 206, 209],
77
- "darkviolet": [148, 0, 211],
78
- "deeppink": [255, 20, 147],
79
- "deepskyblue": [0, 191, 255],
80
- "dimgray": [105, 105, 105],
81
- "dimgrey": [105, 105, 105],
82
- "dodgerblue": [30, 144, 255],
83
- "firebrick": [178, 34, 34],
84
- "floralwhite": [255, 250, 240],
85
- "forestgreen": [34, 139, 34],
86
- "fuchsia": [255, 0, 255],
87
- "gainsboro": [220, 220, 220],
88
- "ghostwhite": [248, 248, 255],
89
- "gold": [255, 215, 0],
90
- "goldenrod": [218, 165, 32],
91
- "gray": [128, 128, 128],
92
- "green": [0, 128, 0],
93
- "greenyellow": [173, 255, 47],
94
- "grey": [128, 128, 128],
95
- "honeydew": [240, 255, 240],
96
- "hotpink": [255, 105, 180],
97
- "indianred": [205, 92, 92],
98
- "indigo": [75, 0, 130],
99
- "ivory": [255, 255, 240],
100
- "khaki": [240, 230, 140],
101
- "lavender": [230, 230, 250],
102
- "lavenderblush": [255, 240, 245],
103
- "lawngreen": [124, 252, 0],
104
- "lemonchiffon": [255, 250, 205],
105
- "lightblue": [173, 216, 230],
106
- "lightcoral": [240, 128, 128],
107
- "lightcyan": [224, 255, 255],
108
- "lightgoldenrodyellow": [250, 250, 210],
109
- "lightgray": [211, 211, 211],
110
- "lightgreen": [144, 238, 144],
111
- "lightgrey": [211, 211, 211],
112
- "lightpink": [255, 182, 193],
113
- "lightsalmon": [255, 160, 122],
114
- "lightseagreen": [32, 178, 170],
115
- "lightskyblue": [135, 206, 250],
116
- "lightslategray": [119, 136, 153],
117
- "lightslategrey": [119, 136, 153],
118
- "lightsteelblue": [176, 196, 222],
119
- "lightyellow": [255, 255, 224],
120
- "lime": [0, 255, 0],
121
- "limegreen": [50, 205, 50],
122
- "linen": [250, 240, 230],
123
- "magenta": [255, 0, 255],
124
- "maroon": [128, 0, 0],
125
- "mediumaquamarine": [102, 205, 170],
126
- "mediumblue": [0, 0, 205],
127
- "mediumorchid": [186, 85, 211],
128
- "mediumpurple": [147, 112, 219],
129
- "mediumseagreen": [60, 179, 113],
130
- "mediumslateblue": [123, 104, 238],
131
- "mediumspringgreen": [0, 250, 154],
132
- "mediumturquoise": [72, 209, 204],
133
- "mediumvioletred": [199, 21, 133],
134
- "midnightblue": [25, 25, 112],
135
- "mintcream": [245, 255, 250],
136
- "mistyrose": [255, 228, 225],
137
- "moccasin": [255, 228, 181],
138
- "navajowhite": [255, 222, 173],
139
- "navy": [0, 0, 128],
140
- "oldlace": [253, 245, 230],
141
- "olive": [128, 128, 0],
142
- "olivedrab": [107, 142, 35],
143
- "orange": [255, 165, 0],
144
- "orangered": [255, 69, 0],
145
- "orchid": [218, 112, 214],
146
- "palegoldenrod": [238, 232, 170],
147
- "palegreen": [152, 251, 152],
148
- "paleturquoise": [175, 238, 238],
149
- "palevioletred": [219, 112, 147],
150
- "papayawhip": [255, 239, 213],
151
- "peachpuff": [255, 218, 185],
152
- "peru": [205, 133, 63],
153
- "pink": [255, 192, 203],
154
- "plum": [221, 160, 221],
155
- "powderblue": [176, 224, 230],
156
- "purple": [128, 0, 128],
157
- "rebeccapurple": [102, 51, 153],
158
- "red": [255, 0, 0],
159
- "rosybrown": [188, 143, 143],
160
- "royalblue": [65, 105, 225],
161
- "saddlebrown": [139, 69, 19],
162
- "salmon": [250, 128, 114],
163
- "sandybrown": [244, 164, 96],
164
- "seagreen": [46, 139, 87],
165
- "seashell": [255, 245, 238],
166
- "sienna": [160, 82, 45],
167
- "silver": [192, 192, 192],
168
- "skyblue": [135, 206, 235],
169
- "slateblue": [106, 90, 205],
170
- "slategray": [112, 128, 144],
171
- "slategrey": [112, 128, 144],
172
- "snow": [255, 250, 250],
173
- "springgreen": [0, 255, 127],
174
- "steelblue": [70, 130, 180],
175
- "tan": [210, 180, 140],
176
- "teal": [0, 128, 128],
177
- "thistle": [216, 191, 216],
178
- "tomato": [255, 99, 71],
179
- "turquoise": [64, 224, 208],
180
- "violet": [238, 130, 238],
181
- "wheat": [245, 222, 179],
182
- "white": [255, 255, 255],
183
- "whitesmoke": [245, 245, 245],
184
- "yellow": [255, 255, 0],
185
- "yellowgreen": [154, 205, 50]
186
- };
187
- }
188
- });
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
20
+ value: mod,
21
+ enumerable: true
22
+ }) : target, mod));
189
23
 
190
- // ../../node_modules/chalk/node_modules/color-convert/conversions.js
191
- var require_conversions = __commonJS({
192
- "../../node_modules/chalk/node_modules/color-convert/conversions.js"(exports2, module2) {
193
- "use strict";
194
- var cssKeywords = require_color_name();
195
- var reverseKeywords = {};
196
- for (const key of Object.keys(cssKeywords)) {
197
- reverseKeywords[cssKeywords[key]] = key;
198
- }
199
- var convert = {
200
- rgb: { channels: 3, labels: "rgb" },
201
- hsl: { channels: 3, labels: "hsl" },
202
- hsv: { channels: 3, labels: "hsv" },
203
- hwb: { channels: 3, labels: "hwb" },
204
- cmyk: { channels: 4, labels: "cmyk" },
205
- xyz: { channels: 3, labels: "xyz" },
206
- lab: { channels: 3, labels: "lab" },
207
- lch: { channels: 3, labels: "lch" },
208
- hex: { channels: 1, labels: ["hex"] },
209
- keyword: { channels: 1, labels: ["keyword"] },
210
- ansi16: { channels: 1, labels: ["ansi16"] },
211
- ansi256: { channels: 1, labels: ["ansi256"] },
212
- hcg: { channels: 3, labels: ["h", "c", "g"] },
213
- apple: { channels: 3, labels: ["r16", "g16", "b16"] },
214
- gray: { channels: 1, labels: ["gray"] }
215
- };
216
- module2.exports = convert;
217
- for (const model of Object.keys(convert)) {
218
- if (!("channels" in convert[model])) {
219
- throw new Error("missing channels property: " + model);
220
- }
221
- if (!("labels" in convert[model])) {
222
- throw new Error("missing channel labels property: " + model);
223
- }
224
- if (convert[model].labels.length !== convert[model].channels) {
225
- throw new Error("channel and label counts mismatch: " + model);
226
- }
227
- const { channels, labels } = convert[model];
228
- delete convert[model].channels;
229
- delete convert[model].labels;
230
- Object.defineProperty(convert[model], "channels", { value: channels });
231
- Object.defineProperty(convert[model], "labels", { value: labels });
232
- }
233
- convert.rgb.hsl = function(rgb) {
234
- const r = rgb[0] / 255;
235
- const g = rgb[1] / 255;
236
- const b = rgb[2] / 255;
237
- const min = Math.min(r, g, b);
238
- const max = Math.max(r, g, b);
239
- const delta = max - min;
240
- let h;
241
- let s;
242
- if (max === min) {
243
- h = 0;
244
- } else if (r === max) {
245
- h = (g - b) / delta;
246
- } else if (g === max) {
247
- h = 2 + (b - r) / delta;
248
- } else if (b === max) {
249
- h = 4 + (r - g) / delta;
250
- }
251
- h = Math.min(h * 60, 360);
252
- if (h < 0) {
253
- h += 360;
254
- }
255
- const l = (min + max) / 2;
256
- if (max === min) {
257
- s = 0;
258
- } else if (l <= 0.5) {
259
- s = delta / (max + min);
260
- } else {
261
- s = delta / (2 - max - min);
262
- }
263
- return [h, s * 100, l * 100];
264
- };
265
- convert.rgb.hsv = function(rgb) {
266
- let rdif;
267
- let gdif;
268
- let bdif;
269
- let h;
270
- let s;
271
- const r = rgb[0] / 255;
272
- const g = rgb[1] / 255;
273
- const b = rgb[2] / 255;
274
- const v = Math.max(r, g, b);
275
- const diff = v - Math.min(r, g, b);
276
- const diffc = function(c) {
277
- return (v - c) / 6 / diff + 1 / 2;
278
- };
279
- if (diff === 0) {
280
- h = 0;
281
- s = 0;
282
- } else {
283
- s = diff / v;
284
- rdif = diffc(r);
285
- gdif = diffc(g);
286
- bdif = diffc(b);
287
- if (r === v) {
288
- h = bdif - gdif;
289
- } else if (g === v) {
290
- h = 1 / 3 + rdif - bdif;
291
- } else if (b === v) {
292
- h = 2 / 3 + gdif - rdif;
293
- }
294
- if (h < 0) {
295
- h += 1;
296
- } else if (h > 1) {
297
- h -= 1;
298
- }
299
- }
300
- return [
301
- h * 360,
302
- s * 100,
303
- v * 100
304
- ];
305
- };
306
- convert.rgb.hwb = function(rgb) {
307
- const r = rgb[0];
308
- const g = rgb[1];
309
- let b = rgb[2];
310
- const h = convert.rgb.hsl(rgb)[0];
311
- const w = 1 / 255 * Math.min(r, Math.min(g, b));
312
- b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
313
- return [h, w * 100, b * 100];
314
- };
315
- convert.rgb.cmyk = function(rgb) {
316
- const r = rgb[0] / 255;
317
- const g = rgb[1] / 255;
318
- const b = rgb[2] / 255;
319
- const k = Math.min(1 - r, 1 - g, 1 - b);
320
- const c = (1 - r - k) / (1 - k) || 0;
321
- const m = (1 - g - k) / (1 - k) || 0;
322
- const y = (1 - b - k) / (1 - k) || 0;
323
- return [c * 100, m * 100, y * 100, k * 100];
324
- };
325
- function comparativeDistance(x, y) {
326
- return (x[0] - y[0]) ** 2 + (x[1] - y[1]) ** 2 + (x[2] - y[2]) ** 2;
327
- }
328
- convert.rgb.keyword = function(rgb) {
329
- const reversed = reverseKeywords[rgb];
330
- if (reversed) {
331
- return reversed;
332
- }
333
- let currentClosestDistance = Infinity;
334
- let currentClosestKeyword;
335
- for (const keyword of Object.keys(cssKeywords)) {
336
- const value = cssKeywords[keyword];
337
- const distance = comparativeDistance(rgb, value);
338
- if (distance < currentClosestDistance) {
339
- currentClosestDistance = distance;
340
- currentClosestKeyword = keyword;
341
- }
342
- }
343
- return currentClosestKeyword;
344
- };
345
- convert.keyword.rgb = function(keyword) {
346
- return cssKeywords[keyword];
347
- };
348
- convert.rgb.xyz = function(rgb) {
349
- let r = rgb[0] / 255;
350
- let g = rgb[1] / 255;
351
- let b = rgb[2] / 255;
352
- r = r > 0.04045 ? ((r + 0.055) / 1.055) ** 2.4 : r / 12.92;
353
- g = g > 0.04045 ? ((g + 0.055) / 1.055) ** 2.4 : g / 12.92;
354
- b = b > 0.04045 ? ((b + 0.055) / 1.055) ** 2.4 : b / 12.92;
355
- const x = r * 0.4124 + g * 0.3576 + b * 0.1805;
356
- const y = r * 0.2126 + g * 0.7152 + b * 0.0722;
357
- const z = r * 0.0193 + g * 0.1192 + b * 0.9505;
358
- return [x * 100, y * 100, z * 100];
359
- };
360
- convert.rgb.lab = function(rgb) {
361
- const xyz = convert.rgb.xyz(rgb);
362
- let x = xyz[0];
363
- let y = xyz[1];
364
- let z = xyz[2];
365
- x /= 95.047;
366
- y /= 100;
367
- z /= 108.883;
368
- x = x > 8856e-6 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
369
- y = y > 8856e-6 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
370
- z = z > 8856e-6 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
371
- const l = 116 * y - 16;
372
- const a = 500 * (x - y);
373
- const b = 200 * (y - z);
374
- return [l, a, b];
375
- };
376
- convert.hsl.rgb = function(hsl) {
377
- const h = hsl[0] / 360;
378
- const s = hsl[1] / 100;
379
- const l = hsl[2] / 100;
380
- let t2;
381
- let t3;
382
- let val;
383
- if (s === 0) {
384
- val = l * 255;
385
- return [val, val, val];
386
- }
387
- if (l < 0.5) {
388
- t2 = l * (1 + s);
389
- } else {
390
- t2 = l + s - l * s;
391
- }
392
- const t1 = 2 * l - t2;
393
- const rgb = [0, 0, 0];
394
- for (let i = 0; i < 3; i++) {
395
- t3 = h + 1 / 3 * -(i - 1);
396
- if (t3 < 0) {
397
- t3++;
398
- }
399
- if (t3 > 1) {
400
- t3--;
401
- }
402
- if (6 * t3 < 1) {
403
- val = t1 + (t2 - t1) * 6 * t3;
404
- } else if (2 * t3 < 1) {
405
- val = t2;
406
- } else if (3 * t3 < 2) {
407
- val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
408
- } else {
409
- val = t1;
410
- }
411
- rgb[i] = val * 255;
412
- }
413
- return rgb;
414
- };
415
- convert.hsl.hsv = function(hsl) {
416
- const h = hsl[0];
417
- let s = hsl[1] / 100;
418
- let l = hsl[2] / 100;
419
- let smin = s;
420
- const lmin = Math.max(l, 0.01);
421
- l *= 2;
422
- s *= l <= 1 ? l : 2 - l;
423
- smin *= lmin <= 1 ? lmin : 2 - lmin;
424
- const v = (l + s) / 2;
425
- const sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s);
426
- return [h, sv * 100, v * 100];
427
- };
428
- convert.hsv.rgb = function(hsv) {
429
- const h = hsv[0] / 60;
430
- const s = hsv[1] / 100;
431
- let v = hsv[2] / 100;
432
- const hi = Math.floor(h) % 6;
433
- const f = h - Math.floor(h);
434
- const p = 255 * v * (1 - s);
435
- const q = 255 * v * (1 - s * f);
436
- const t = 255 * v * (1 - s * (1 - f));
437
- v *= 255;
438
- switch (hi) {
439
- case 0:
440
- return [v, t, p];
441
- case 1:
442
- return [q, v, p];
443
- case 2:
444
- return [p, v, t];
445
- case 3:
446
- return [p, q, v];
447
- case 4:
448
- return [t, p, v];
449
- case 5:
450
- return [v, p, q];
451
- }
452
- };
453
- convert.hsv.hsl = function(hsv) {
454
- const h = hsv[0];
455
- const s = hsv[1] / 100;
456
- const v = hsv[2] / 100;
457
- const vmin = Math.max(v, 0.01);
458
- let sl;
459
- let l;
460
- l = (2 - s) * v;
461
- const lmin = (2 - s) * vmin;
462
- sl = s * vmin;
463
- sl /= lmin <= 1 ? lmin : 2 - lmin;
464
- sl = sl || 0;
465
- l /= 2;
466
- return [h, sl * 100, l * 100];
467
- };
468
- convert.hwb.rgb = function(hwb) {
469
- const h = hwb[0] / 360;
470
- let wh = hwb[1] / 100;
471
- let bl = hwb[2] / 100;
472
- const ratio = wh + bl;
473
- let f;
474
- if (ratio > 1) {
475
- wh /= ratio;
476
- bl /= ratio;
477
- }
478
- const i = Math.floor(6 * h);
479
- const v = 1 - bl;
480
- f = 6 * h - i;
481
- if ((i & 1) !== 0) {
482
- f = 1 - f;
483
- }
484
- const n = wh + f * (v - wh);
485
- let r;
486
- let g;
487
- let b;
488
- switch (i) {
489
- default:
490
- case 6:
491
- case 0:
492
- r = v;
493
- g = n;
494
- b = wh;
495
- break;
496
- case 1:
497
- r = n;
498
- g = v;
499
- b = wh;
500
- break;
501
- case 2:
502
- r = wh;
503
- g = v;
504
- b = n;
505
- break;
506
- case 3:
507
- r = wh;
508
- g = n;
509
- b = v;
510
- break;
511
- case 4:
512
- r = n;
513
- g = wh;
514
- b = v;
515
- break;
516
- case 5:
517
- r = v;
518
- g = wh;
519
- b = n;
520
- break;
521
- }
522
- return [r * 255, g * 255, b * 255];
523
- };
524
- convert.cmyk.rgb = function(cmyk) {
525
- const c = cmyk[0] / 100;
526
- const m = cmyk[1] / 100;
527
- const y = cmyk[2] / 100;
528
- const k = cmyk[3] / 100;
529
- const r = 1 - Math.min(1, c * (1 - k) + k);
530
- const g = 1 - Math.min(1, m * (1 - k) + k);
531
- const b = 1 - Math.min(1, y * (1 - k) + k);
532
- return [r * 255, g * 255, b * 255];
533
- };
534
- convert.xyz.rgb = function(xyz) {
535
- const x = xyz[0] / 100;
536
- const y = xyz[1] / 100;
537
- const z = xyz[2] / 100;
538
- let r;
539
- let g;
540
- let b;
541
- r = x * 3.2406 + y * -1.5372 + z * -0.4986;
542
- g = x * -0.9689 + y * 1.8758 + z * 0.0415;
543
- b = x * 0.0557 + y * -0.204 + z * 1.057;
544
- r = r > 31308e-7 ? 1.055 * r ** (1 / 2.4) - 0.055 : r * 12.92;
545
- g = g > 31308e-7 ? 1.055 * g ** (1 / 2.4) - 0.055 : g * 12.92;
546
- b = b > 31308e-7 ? 1.055 * b ** (1 / 2.4) - 0.055 : b * 12.92;
547
- r = Math.min(Math.max(0, r), 1);
548
- g = Math.min(Math.max(0, g), 1);
549
- b = Math.min(Math.max(0, b), 1);
550
- return [r * 255, g * 255, b * 255];
551
- };
552
- convert.xyz.lab = function(xyz) {
553
- let x = xyz[0];
554
- let y = xyz[1];
555
- let z = xyz[2];
556
- x /= 95.047;
557
- y /= 100;
558
- z /= 108.883;
559
- x = x > 8856e-6 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
560
- y = y > 8856e-6 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
561
- z = z > 8856e-6 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
562
- const l = 116 * y - 16;
563
- const a = 500 * (x - y);
564
- const b = 200 * (y - z);
565
- return [l, a, b];
566
- };
567
- convert.lab.xyz = function(lab) {
568
- const l = lab[0];
569
- const a = lab[1];
570
- const b = lab[2];
571
- let x;
572
- let y;
573
- let z;
574
- y = (l + 16) / 116;
575
- x = a / 500 + y;
576
- z = y - b / 200;
577
- const y2 = y ** 3;
578
- const x2 = x ** 3;
579
- const z2 = z ** 3;
580
- y = y2 > 8856e-6 ? y2 : (y - 16 / 116) / 7.787;
581
- x = x2 > 8856e-6 ? x2 : (x - 16 / 116) / 7.787;
582
- z = z2 > 8856e-6 ? z2 : (z - 16 / 116) / 7.787;
583
- x *= 95.047;
584
- y *= 100;
585
- z *= 108.883;
586
- return [x, y, z];
587
- };
588
- convert.lab.lch = function(lab) {
589
- const l = lab[0];
590
- const a = lab[1];
591
- const b = lab[2];
592
- let h;
593
- const hr = Math.atan2(b, a);
594
- h = hr * 360 / 2 / Math.PI;
595
- if (h < 0) {
596
- h += 360;
597
- }
598
- const c = Math.sqrt(a * a + b * b);
599
- return [l, c, h];
600
- };
601
- convert.lch.lab = function(lch) {
602
- const l = lch[0];
603
- const c = lch[1];
604
- const h = lch[2];
605
- const hr = h / 360 * 2 * Math.PI;
606
- const a = c * Math.cos(hr);
607
- const b = c * Math.sin(hr);
608
- return [l, a, b];
609
- };
610
- convert.rgb.ansi16 = function(args, saturation = null) {
611
- const [r, g, b] = args;
612
- let value = saturation === null ? convert.rgb.hsv(args)[2] : saturation;
613
- value = Math.round(value / 50);
614
- if (value === 0) {
615
- return 30;
616
- }
617
- let ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255));
618
- if (value === 2) {
619
- ansi += 60;
620
- }
621
- return ansi;
622
- };
623
- convert.hsv.ansi16 = function(args) {
624
- return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);
625
- };
626
- convert.rgb.ansi256 = function(args) {
627
- const r = args[0];
628
- const g = args[1];
629
- const b = args[2];
630
- if (r === g && g === b) {
631
- if (r < 8) {
632
- return 16;
633
- }
634
- if (r > 248) {
635
- return 231;
636
- }
637
- return Math.round((r - 8) / 247 * 24) + 232;
638
- }
639
- const ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5);
640
- return ansi;
641
- };
642
- convert.ansi16.rgb = function(args) {
643
- let color = args % 10;
644
- if (color === 0 || color === 7) {
645
- if (args > 50) {
646
- color += 3.5;
647
- }
648
- color = color / 10.5 * 255;
649
- return [color, color, color];
650
- }
651
- const mult = (~~(args > 50) + 1) * 0.5;
652
- const r = (color & 1) * mult * 255;
653
- const g = (color >> 1 & 1) * mult * 255;
654
- const b = (color >> 2 & 1) * mult * 255;
655
- return [r, g, b];
656
- };
657
- convert.ansi256.rgb = function(args) {
658
- if (args >= 232) {
659
- const c = (args - 232) * 10 + 8;
660
- return [c, c, c];
661
- }
662
- args -= 16;
663
- let rem;
664
- const r = Math.floor(args / 36) / 5 * 255;
665
- const g = Math.floor((rem = args % 36) / 6) / 5 * 255;
666
- const b = rem % 6 / 5 * 255;
667
- return [r, g, b];
668
- };
669
- convert.rgb.hex = function(args) {
670
- const integer = ((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255);
671
- const string = integer.toString(16).toUpperCase();
672
- return "000000".substring(string.length) + string;
673
- };
674
- convert.hex.rgb = function(args) {
675
- const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
676
- if (!match) {
677
- return [0, 0, 0];
678
- }
679
- let colorString = match[0];
680
- if (match[0].length === 3) {
681
- colorString = colorString.split("").map((char) => {
682
- return char + char;
683
- }).join("");
684
- }
685
- const integer = parseInt(colorString, 16);
686
- const r = integer >> 16 & 255;
687
- const g = integer >> 8 & 255;
688
- const b = integer & 255;
689
- return [r, g, b];
690
- };
691
- convert.rgb.hcg = function(rgb) {
692
- const r = rgb[0] / 255;
693
- const g = rgb[1] / 255;
694
- const b = rgb[2] / 255;
695
- const max = Math.max(Math.max(r, g), b);
696
- const min = Math.min(Math.min(r, g), b);
697
- const chroma = max - min;
698
- let grayscale;
699
- let hue;
700
- if (chroma < 1) {
701
- grayscale = min / (1 - chroma);
702
- } else {
703
- grayscale = 0;
704
- }
705
- if (chroma <= 0) {
706
- hue = 0;
707
- } else if (max === r) {
708
- hue = (g - b) / chroma % 6;
709
- } else if (max === g) {
710
- hue = 2 + (b - r) / chroma;
711
- } else {
712
- hue = 4 + (r - g) / chroma;
713
- }
714
- hue /= 6;
715
- hue %= 1;
716
- return [hue * 360, chroma * 100, grayscale * 100];
717
- };
718
- convert.hsl.hcg = function(hsl) {
719
- const s = hsl[1] / 100;
720
- const l = hsl[2] / 100;
721
- const c = l < 0.5 ? 2 * s * l : 2 * s * (1 - l);
722
- let f = 0;
723
- if (c < 1) {
724
- f = (l - 0.5 * c) / (1 - c);
725
- }
726
- return [hsl[0], c * 100, f * 100];
727
- };
728
- convert.hsv.hcg = function(hsv) {
729
- const s = hsv[1] / 100;
730
- const v = hsv[2] / 100;
731
- const c = s * v;
732
- let f = 0;
733
- if (c < 1) {
734
- f = (v - c) / (1 - c);
735
- }
736
- return [hsv[0], c * 100, f * 100];
737
- };
738
- convert.hcg.rgb = function(hcg) {
739
- const h = hcg[0] / 360;
740
- const c = hcg[1] / 100;
741
- const g = hcg[2] / 100;
742
- if (c === 0) {
743
- return [g * 255, g * 255, g * 255];
744
- }
745
- const pure = [0, 0, 0];
746
- const hi = h % 1 * 6;
747
- const v = hi % 1;
748
- const w = 1 - v;
749
- let mg = 0;
750
- switch (Math.floor(hi)) {
751
- case 0:
752
- pure[0] = 1;
753
- pure[1] = v;
754
- pure[2] = 0;
755
- break;
756
- case 1:
757
- pure[0] = w;
758
- pure[1] = 1;
759
- pure[2] = 0;
760
- break;
761
- case 2:
762
- pure[0] = 0;
763
- pure[1] = 1;
764
- pure[2] = v;
765
- break;
766
- case 3:
767
- pure[0] = 0;
768
- pure[1] = w;
769
- pure[2] = 1;
770
- break;
771
- case 4:
772
- pure[0] = v;
773
- pure[1] = 0;
774
- pure[2] = 1;
775
- break;
776
- default:
777
- pure[0] = 1;
778
- pure[1] = 0;
779
- pure[2] = w;
780
- }
781
- mg = (1 - c) * g;
782
- return [
783
- (c * pure[0] + mg) * 255,
784
- (c * pure[1] + mg) * 255,
785
- (c * pure[2] + mg) * 255
786
- ];
787
- };
788
- convert.hcg.hsv = function(hcg) {
789
- const c = hcg[1] / 100;
790
- const g = hcg[2] / 100;
791
- const v = c + g * (1 - c);
792
- let f = 0;
793
- if (v > 0) {
794
- f = c / v;
795
- }
796
- return [hcg[0], f * 100, v * 100];
797
- };
798
- convert.hcg.hsl = function(hcg) {
799
- const c = hcg[1] / 100;
800
- const g = hcg[2] / 100;
801
- const l = g * (1 - c) + 0.5 * c;
802
- let s = 0;
803
- if (l > 0 && l < 0.5) {
804
- s = c / (2 * l);
805
- } else if (l >= 0.5 && l < 1) {
806
- s = c / (2 * (1 - l));
807
- }
808
- return [hcg[0], s * 100, l * 100];
809
- };
810
- convert.hcg.hwb = function(hcg) {
811
- const c = hcg[1] / 100;
812
- const g = hcg[2] / 100;
813
- const v = c + g * (1 - c);
814
- return [hcg[0], (v - c) * 100, (1 - v) * 100];
815
- };
816
- convert.hwb.hcg = function(hwb) {
817
- const w = hwb[1] / 100;
818
- const b = hwb[2] / 100;
819
- const v = 1 - b;
820
- const c = v - w;
821
- let g = 0;
822
- if (c < 1) {
823
- g = (v - c) / (1 - c);
824
- }
825
- return [hwb[0], c * 100, g * 100];
826
- };
827
- convert.apple.rgb = function(apple) {
828
- return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255];
829
- };
830
- convert.rgb.apple = function(rgb) {
831
- return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535];
832
- };
833
- convert.gray.rgb = function(args) {
834
- return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
835
- };
836
- convert.gray.hsl = function(args) {
837
- return [0, 0, args[0]];
838
- };
839
- convert.gray.hsv = convert.gray.hsl;
840
- convert.gray.hwb = function(gray) {
841
- return [0, 100, gray[0]];
842
- };
843
- convert.gray.cmyk = function(gray) {
844
- return [0, 0, 0, gray[0]];
845
- };
846
- convert.gray.lab = function(gray) {
847
- return [gray[0], 0, 0];
848
- };
849
- convert.gray.hex = function(gray) {
850
- const val = Math.round(gray[0] / 100 * 255) & 255;
851
- const integer = (val << 16) + (val << 8) + val;
852
- const string = integer.toString(16).toUpperCase();
853
- return "000000".substring(string.length) + string;
854
- };
855
- convert.rgb.gray = function(rgb) {
856
- const val = (rgb[0] + rgb[1] + rgb[2]) / 3;
857
- return [val / 255 * 100];
858
- };
859
- }
860
- });
861
-
862
- // ../../node_modules/chalk/node_modules/color-convert/route.js
863
- var require_route = __commonJS({
864
- "../../node_modules/chalk/node_modules/color-convert/route.js"(exports2, module2) {
865
- "use strict";
866
- var conversions = require_conversions();
867
- function buildGraph() {
868
- const graph = {};
869
- const models = Object.keys(conversions);
870
- for (let len = models.length, i = 0; i < len; i++) {
871
- graph[models[i]] = {
872
- // http://jsperf.com/1-vs-infinity
873
- // micro-opt, but this is simple.
874
- distance: -1,
875
- parent: null
876
- };
877
- }
878
- return graph;
879
- }
880
- function deriveBFS(fromModel) {
881
- const graph = buildGraph();
882
- const queue = [fromModel];
883
- graph[fromModel].distance = 0;
884
- while (queue.length) {
885
- const current = queue.pop();
886
- const adjacents = Object.keys(conversions[current]);
887
- for (let len = adjacents.length, i = 0; i < len; i++) {
888
- const adjacent = adjacents[i];
889
- const node = graph[adjacent];
890
- if (node.distance === -1) {
891
- node.distance = graph[current].distance + 1;
892
- node.parent = current;
893
- queue.unshift(adjacent);
894
- }
895
- }
896
- }
897
- return graph;
898
- }
899
- function link(from, to) {
900
- return function(args) {
901
- return to(from(args));
902
- };
903
- }
904
- function wrapConversion(toModel, graph) {
905
- const path = [graph[toModel].parent, toModel];
906
- let fn = conversions[graph[toModel].parent][toModel];
907
- let cur = graph[toModel].parent;
908
- while (graph[cur].parent) {
909
- path.unshift(graph[cur].parent);
910
- fn = link(conversions[graph[cur].parent][cur], fn);
911
- cur = graph[cur].parent;
912
- }
913
- fn.conversion = path;
914
- return fn;
915
- }
916
- module2.exports = function(fromModel) {
917
- const graph = deriveBFS(fromModel);
918
- const conversion = {};
919
- const models = Object.keys(graph);
920
- for (let len = models.length, i = 0; i < len; i++) {
921
- const toModel = models[i];
922
- const node = graph[toModel];
923
- if (node.parent === null) {
924
- continue;
925
- }
926
- conversion[toModel] = wrapConversion(toModel, graph);
927
- }
928
- return conversion;
929
- };
930
- }
931
- });
24
+ //#endregion
25
+ let __orval_core = require("@orval/core");
26
+ __orval_core = __toESM(__orval_core);
27
+ let lodash_omitby = require("lodash.omitby");
28
+ lodash_omitby = __toESM(lodash_omitby);
29
+ let __orval_fetch = require("@orval/fetch");
30
+ __orval_fetch = __toESM(__orval_fetch);
31
+ let chalk = require("chalk");
32
+ chalk = __toESM(chalk);
932
33
 
933
- // ../../node_modules/chalk/node_modules/color-convert/index.js
934
- var require_color_convert = __commonJS({
935
- "../../node_modules/chalk/node_modules/color-convert/index.js"(exports2, module2) {
936
- "use strict";
937
- var conversions = require_conversions();
938
- var route = require_route();
939
- var convert = {};
940
- var models = Object.keys(conversions);
941
- function wrapRaw(fn) {
942
- const wrappedFn = function(...args) {
943
- const arg0 = args[0];
944
- if (arg0 === void 0 || arg0 === null) {
945
- return arg0;
946
- }
947
- if (arg0.length > 1) {
948
- args = arg0;
949
- }
950
- return fn(args);
951
- };
952
- if ("conversion" in fn) {
953
- wrappedFn.conversion = fn.conversion;
954
- }
955
- return wrappedFn;
956
- }
957
- function wrapRounded(fn) {
958
- const wrappedFn = function(...args) {
959
- const arg0 = args[0];
960
- if (arg0 === void 0 || arg0 === null) {
961
- return arg0;
962
- }
963
- if (arg0.length > 1) {
964
- args = arg0;
965
- }
966
- const result = fn(args);
967
- if (typeof result === "object") {
968
- for (let len = result.length, i = 0; i < len; i++) {
969
- result[i] = Math.round(result[i]);
970
- }
971
- }
972
- return result;
973
- };
974
- if ("conversion" in fn) {
975
- wrappedFn.conversion = fn.conversion;
976
- }
977
- return wrappedFn;
978
- }
979
- models.forEach((fromModel) => {
980
- convert[fromModel] = {};
981
- Object.defineProperty(convert[fromModel], "channels", { value: conversions[fromModel].channels });
982
- Object.defineProperty(convert[fromModel], "labels", { value: conversions[fromModel].labels });
983
- const routes = route(fromModel);
984
- const routeModels = Object.keys(routes);
985
- routeModels.forEach((toModel) => {
986
- const fn = routes[toModel];
987
- convert[fromModel][toModel] = wrapRounded(fn);
988
- convert[fromModel][toModel].raw = wrapRaw(fn);
989
- });
990
- });
991
- module2.exports = convert;
992
- }
993
- });
994
-
995
- // ../../node_modules/chalk/node_modules/ansi-styles/index.js
996
- var require_ansi_styles = __commonJS({
997
- "../../node_modules/chalk/node_modules/ansi-styles/index.js"(exports2, module2) {
998
- "use strict";
999
- var wrapAnsi16 = (fn, offset) => (...args) => {
1000
- const code = fn(...args);
1001
- return `\x1B[${code + offset}m`;
1002
- };
1003
- var wrapAnsi256 = (fn, offset) => (...args) => {
1004
- const code = fn(...args);
1005
- return `\x1B[${38 + offset};5;${code}m`;
1006
- };
1007
- var wrapAnsi16m = (fn, offset) => (...args) => {
1008
- const rgb = fn(...args);
1009
- return `\x1B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
1010
- };
1011
- var ansi2ansi = (n) => n;
1012
- var rgb2rgb = (r, g, b) => [r, g, b];
1013
- var setLazyProperty = (object, property, get) => {
1014
- Object.defineProperty(object, property, {
1015
- get: () => {
1016
- const value = get();
1017
- Object.defineProperty(object, property, {
1018
- value,
1019
- enumerable: true,
1020
- configurable: true
1021
- });
1022
- return value;
1023
- },
1024
- enumerable: true,
1025
- configurable: true
1026
- });
1027
- };
1028
- var colorConvert;
1029
- var makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => {
1030
- if (colorConvert === void 0) {
1031
- colorConvert = require_color_convert();
1032
- }
1033
- const offset = isBackground ? 10 : 0;
1034
- const styles = {};
1035
- for (const [sourceSpace, suite] of Object.entries(colorConvert)) {
1036
- const name = sourceSpace === "ansi16" ? "ansi" : sourceSpace;
1037
- if (sourceSpace === targetSpace) {
1038
- styles[name] = wrap(identity, offset);
1039
- } else if (typeof suite === "object") {
1040
- styles[name] = wrap(suite[targetSpace], offset);
1041
- }
1042
- }
1043
- return styles;
1044
- };
1045
- function assembleStyles() {
1046
- const codes = /* @__PURE__ */ new Map();
1047
- const styles = {
1048
- modifier: {
1049
- reset: [0, 0],
1050
- // 21 isn't widely supported and 22 does the same thing
1051
- bold: [1, 22],
1052
- dim: [2, 22],
1053
- italic: [3, 23],
1054
- underline: [4, 24],
1055
- inverse: [7, 27],
1056
- hidden: [8, 28],
1057
- strikethrough: [9, 29]
1058
- },
1059
- color: {
1060
- black: [30, 39],
1061
- red: [31, 39],
1062
- green: [32, 39],
1063
- yellow: [33, 39],
1064
- blue: [34, 39],
1065
- magenta: [35, 39],
1066
- cyan: [36, 39],
1067
- white: [37, 39],
1068
- // Bright color
1069
- blackBright: [90, 39],
1070
- redBright: [91, 39],
1071
- greenBright: [92, 39],
1072
- yellowBright: [93, 39],
1073
- blueBright: [94, 39],
1074
- magentaBright: [95, 39],
1075
- cyanBright: [96, 39],
1076
- whiteBright: [97, 39]
1077
- },
1078
- bgColor: {
1079
- bgBlack: [40, 49],
1080
- bgRed: [41, 49],
1081
- bgGreen: [42, 49],
1082
- bgYellow: [43, 49],
1083
- bgBlue: [44, 49],
1084
- bgMagenta: [45, 49],
1085
- bgCyan: [46, 49],
1086
- bgWhite: [47, 49],
1087
- // Bright color
1088
- bgBlackBright: [100, 49],
1089
- bgRedBright: [101, 49],
1090
- bgGreenBright: [102, 49],
1091
- bgYellowBright: [103, 49],
1092
- bgBlueBright: [104, 49],
1093
- bgMagentaBright: [105, 49],
1094
- bgCyanBright: [106, 49],
1095
- bgWhiteBright: [107, 49]
1096
- }
1097
- };
1098
- styles.color.gray = styles.color.blackBright;
1099
- styles.bgColor.bgGray = styles.bgColor.bgBlackBright;
1100
- styles.color.grey = styles.color.blackBright;
1101
- styles.bgColor.bgGrey = styles.bgColor.bgBlackBright;
1102
- for (const [groupName, group] of Object.entries(styles)) {
1103
- for (const [styleName, style] of Object.entries(group)) {
1104
- styles[styleName] = {
1105
- open: `\x1B[${style[0]}m`,
1106
- close: `\x1B[${style[1]}m`
1107
- };
1108
- group[styleName] = styles[styleName];
1109
- codes.set(style[0], style[1]);
1110
- }
1111
- Object.defineProperty(styles, groupName, {
1112
- value: group,
1113
- enumerable: false
1114
- });
1115
- }
1116
- Object.defineProperty(styles, "codes", {
1117
- value: codes,
1118
- enumerable: false
1119
- });
1120
- styles.color.close = "\x1B[39m";
1121
- styles.bgColor.close = "\x1B[49m";
1122
- setLazyProperty(styles.color, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, false));
1123
- setLazyProperty(styles.color, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, false));
1124
- setLazyProperty(styles.color, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, false));
1125
- setLazyProperty(styles.bgColor, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, true));
1126
- setLazyProperty(styles.bgColor, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, true));
1127
- setLazyProperty(styles.bgColor, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, true));
1128
- return styles;
1129
- }
1130
- Object.defineProperty(module2, "exports", {
1131
- enumerable: true,
1132
- get: assembleStyles
1133
- });
1134
- }
1135
- });
1136
-
1137
- // ../../node_modules/chalk/node_modules/has-flag/index.js
1138
- var require_has_flag = __commonJS({
1139
- "../../node_modules/chalk/node_modules/has-flag/index.js"(exports2, module2) {
1140
- "use strict";
1141
- module2.exports = (flag, argv = process.argv) => {
1142
- const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
1143
- const position = argv.indexOf(prefix + flag);
1144
- const terminatorPosition = argv.indexOf("--");
1145
- return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
1146
- };
1147
- }
1148
- });
1149
-
1150
- // ../../node_modules/chalk/node_modules/supports-color/index.js
1151
- var require_supports_color = __commonJS({
1152
- "../../node_modules/chalk/node_modules/supports-color/index.js"(exports2, module2) {
1153
- "use strict";
1154
- var os = require("os");
1155
- var tty = require("tty");
1156
- var hasFlag = require_has_flag();
1157
- var { env } = process;
1158
- var forceColor;
1159
- if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
1160
- forceColor = 0;
1161
- } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
1162
- forceColor = 1;
1163
- }
1164
- if ("FORCE_COLOR" in env) {
1165
- if (env.FORCE_COLOR === "true") {
1166
- forceColor = 1;
1167
- } else if (env.FORCE_COLOR === "false") {
1168
- forceColor = 0;
1169
- } else {
1170
- forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
1171
- }
1172
- }
1173
- function translateLevel(level) {
1174
- if (level === 0) {
1175
- return false;
1176
- }
1177
- return {
1178
- level,
1179
- hasBasic: true,
1180
- has256: level >= 2,
1181
- has16m: level >= 3
1182
- };
1183
- }
1184
- function supportsColor(haveStream, streamIsTTY) {
1185
- if (forceColor === 0) {
1186
- return 0;
1187
- }
1188
- if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
1189
- return 3;
1190
- }
1191
- if (hasFlag("color=256")) {
1192
- return 2;
1193
- }
1194
- if (haveStream && !streamIsTTY && forceColor === void 0) {
1195
- return 0;
1196
- }
1197
- const min = forceColor || 0;
1198
- if (env.TERM === "dumb") {
1199
- return min;
1200
- }
1201
- if (process.platform === "win32") {
1202
- const osRelease = os.release().split(".");
1203
- if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
1204
- return Number(osRelease[2]) >= 14931 ? 3 : 2;
1205
- }
1206
- return 1;
1207
- }
1208
- if ("CI" in env) {
1209
- if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
1210
- return 1;
1211
- }
1212
- return min;
1213
- }
1214
- if ("TEAMCITY_VERSION" in env) {
1215
- return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
1216
- }
1217
- if (env.COLORTERM === "truecolor") {
1218
- return 3;
1219
- }
1220
- if ("TERM_PROGRAM" in env) {
1221
- const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
1222
- switch (env.TERM_PROGRAM) {
1223
- case "iTerm.app":
1224
- return version >= 3 ? 3 : 2;
1225
- case "Apple_Terminal":
1226
- return 2;
1227
- }
1228
- }
1229
- if (/-256(color)?$/i.test(env.TERM)) {
1230
- return 2;
1231
- }
1232
- if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
1233
- return 1;
1234
- }
1235
- if ("COLORTERM" in env) {
1236
- return 1;
1237
- }
1238
- return min;
1239
- }
1240
- function getSupportLevel(stream) {
1241
- const level = supportsColor(stream, stream && stream.isTTY);
1242
- return translateLevel(level);
1243
- }
1244
- module2.exports = {
1245
- supportsColor: getSupportLevel,
1246
- stdout: translateLevel(supportsColor(true, tty.isatty(1))),
1247
- stderr: translateLevel(supportsColor(true, tty.isatty(2)))
1248
- };
1249
- }
1250
- });
1251
-
1252
- // ../../node_modules/chalk/source/util.js
1253
- var require_util = __commonJS({
1254
- "../../node_modules/chalk/source/util.js"(exports2, module2) {
1255
- "use strict";
1256
- var stringReplaceAll = (string, substring, replacer) => {
1257
- let index = string.indexOf(substring);
1258
- if (index === -1) {
1259
- return string;
1260
- }
1261
- const substringLength = substring.length;
1262
- let endIndex = 0;
1263
- let returnValue = "";
1264
- do {
1265
- returnValue += string.substr(endIndex, index - endIndex) + substring + replacer;
1266
- endIndex = index + substringLength;
1267
- index = string.indexOf(substring, endIndex);
1268
- } while (index !== -1);
1269
- returnValue += string.substr(endIndex);
1270
- return returnValue;
1271
- };
1272
- var stringEncaseCRLFWithFirstIndex = (string, prefix, postfix, index) => {
1273
- let endIndex = 0;
1274
- let returnValue = "";
1275
- do {
1276
- const gotCR = string[index - 1] === "\r";
1277
- returnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
1278
- endIndex = index + 1;
1279
- index = string.indexOf("\n", endIndex);
1280
- } while (index !== -1);
1281
- returnValue += string.substr(endIndex);
1282
- return returnValue;
1283
- };
1284
- module2.exports = {
1285
- stringReplaceAll,
1286
- stringEncaseCRLFWithFirstIndex
1287
- };
1288
- }
1289
- });
1290
-
1291
- // ../../node_modules/chalk/source/templates.js
1292
- var require_templates = __commonJS({
1293
- "../../node_modules/chalk/source/templates.js"(exports2, module2) {
1294
- "use strict";
1295
- var TEMPLATE_REGEX = /(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;
1296
- var STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
1297
- var STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
1298
- var ESCAPE_REGEX = /\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi;
1299
- var ESCAPES = /* @__PURE__ */ new Map([
1300
- ["n", "\n"],
1301
- ["r", "\r"],
1302
- ["t", " "],
1303
- ["b", "\b"],
1304
- ["f", "\f"],
1305
- ["v", "\v"],
1306
- ["0", "\0"],
1307
- ["\\", "\\"],
1308
- ["e", "\x1B"],
1309
- ["a", "\x07"]
1310
- ]);
1311
- function unescape(c) {
1312
- const u = c[0] === "u";
1313
- const bracket = c[1] === "{";
1314
- if (u && !bracket && c.length === 5 || c[0] === "x" && c.length === 3) {
1315
- return String.fromCharCode(parseInt(c.slice(1), 16));
1316
- }
1317
- if (u && bracket) {
1318
- return String.fromCodePoint(parseInt(c.slice(2, -1), 16));
1319
- }
1320
- return ESCAPES.get(c) || c;
1321
- }
1322
- function parseArguments(name, arguments_) {
1323
- const results = [];
1324
- const chunks = arguments_.trim().split(/\s*,\s*/g);
1325
- let matches;
1326
- for (const chunk of chunks) {
1327
- const number = Number(chunk);
1328
- if (!Number.isNaN(number)) {
1329
- results.push(number);
1330
- } else if (matches = chunk.match(STRING_REGEX)) {
1331
- results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, character) => escape ? unescape(escape) : character));
1332
- } else {
1333
- throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);
1334
- }
1335
- }
1336
- return results;
1337
- }
1338
- function parseStyle(style) {
1339
- STYLE_REGEX.lastIndex = 0;
1340
- const results = [];
1341
- let matches;
1342
- while ((matches = STYLE_REGEX.exec(style)) !== null) {
1343
- const name = matches[1];
1344
- if (matches[2]) {
1345
- const args = parseArguments(name, matches[2]);
1346
- results.push([name].concat(args));
1347
- } else {
1348
- results.push([name]);
1349
- }
1350
- }
1351
- return results;
1352
- }
1353
- function buildStyle(chalk2, styles) {
1354
- const enabled = {};
1355
- for (const layer of styles) {
1356
- for (const style of layer.styles) {
1357
- enabled[style[0]] = layer.inverse ? null : style.slice(1);
1358
- }
1359
- }
1360
- let current = chalk2;
1361
- for (const [styleName, styles2] of Object.entries(enabled)) {
1362
- if (!Array.isArray(styles2)) {
1363
- continue;
1364
- }
1365
- if (!(styleName in current)) {
1366
- throw new Error(`Unknown Chalk style: ${styleName}`);
1367
- }
1368
- current = styles2.length > 0 ? current[styleName](...styles2) : current[styleName];
1369
- }
1370
- return current;
1371
- }
1372
- module2.exports = (chalk2, temporary) => {
1373
- const styles = [];
1374
- const chunks = [];
1375
- let chunk = [];
1376
- temporary.replace(TEMPLATE_REGEX, (m, escapeCharacter, inverse, style, close, character) => {
1377
- if (escapeCharacter) {
1378
- chunk.push(unescape(escapeCharacter));
1379
- } else if (style) {
1380
- const string = chunk.join("");
1381
- chunk = [];
1382
- chunks.push(styles.length === 0 ? string : buildStyle(chalk2, styles)(string));
1383
- styles.push({ inverse, styles: parseStyle(style) });
1384
- } else if (close) {
1385
- if (styles.length === 0) {
1386
- throw new Error("Found extraneous } in Chalk template literal");
1387
- }
1388
- chunks.push(buildStyle(chalk2, styles)(chunk.join("")));
1389
- chunk = [];
1390
- styles.pop();
1391
- } else {
1392
- chunk.push(character);
1393
- }
1394
- });
1395
- chunks.push(chunk.join(""));
1396
- if (styles.length > 0) {
1397
- const errMessage = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? "" : "s"} (\`}\`)`;
1398
- throw new Error(errMessage);
1399
- }
1400
- return chunks.join("");
1401
- };
1402
- }
1403
- });
1404
-
1405
- // ../../node_modules/chalk/source/index.js
1406
- var require_source = __commonJS({
1407
- "../../node_modules/chalk/source/index.js"(exports2, module2) {
1408
- "use strict";
1409
- var ansiStyles = require_ansi_styles();
1410
- var { stdout: stdoutColor, stderr: stderrColor } = require_supports_color();
1411
- var {
1412
- stringReplaceAll,
1413
- stringEncaseCRLFWithFirstIndex
1414
- } = require_util();
1415
- var { isArray } = Array;
1416
- var levelMapping = [
1417
- "ansi",
1418
- "ansi",
1419
- "ansi256",
1420
- "ansi16m"
1421
- ];
1422
- var styles = /* @__PURE__ */ Object.create(null);
1423
- var applyOptions = (object, options = {}) => {
1424
- if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
1425
- throw new Error("The `level` option should be an integer from 0 to 3");
1426
- }
1427
- const colorLevel = stdoutColor ? stdoutColor.level : 0;
1428
- object.level = options.level === void 0 ? colorLevel : options.level;
1429
- };
1430
- var ChalkClass = class {
1431
- constructor(options) {
1432
- return chalkFactory(options);
1433
- }
1434
- };
1435
- var chalkFactory = (options) => {
1436
- const chalk3 = {};
1437
- applyOptions(chalk3, options);
1438
- chalk3.template = (...arguments_) => chalkTag(chalk3.template, ...arguments_);
1439
- Object.setPrototypeOf(chalk3, Chalk.prototype);
1440
- Object.setPrototypeOf(chalk3.template, chalk3);
1441
- chalk3.template.constructor = () => {
1442
- throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
1443
- };
1444
- chalk3.template.Instance = ChalkClass;
1445
- return chalk3.template;
1446
- };
1447
- function Chalk(options) {
1448
- return chalkFactory(options);
1449
- }
1450
- for (const [styleName, style] of Object.entries(ansiStyles)) {
1451
- styles[styleName] = {
1452
- get() {
1453
- const builder2 = createBuilder(this, createStyler(style.open, style.close, this._styler), this._isEmpty);
1454
- Object.defineProperty(this, styleName, { value: builder2 });
1455
- return builder2;
1456
- }
1457
- };
1458
- }
1459
- styles.visible = {
1460
- get() {
1461
- const builder2 = createBuilder(this, this._styler, true);
1462
- Object.defineProperty(this, "visible", { value: builder2 });
1463
- return builder2;
1464
- }
1465
- };
1466
- var usedModels = ["rgb", "hex", "keyword", "hsl", "hsv", "hwb", "ansi", "ansi256"];
1467
- for (const model of usedModels) {
1468
- styles[model] = {
1469
- get() {
1470
- const { level } = this;
1471
- return function(...arguments_) {
1472
- const styler = createStyler(ansiStyles.color[levelMapping[level]][model](...arguments_), ansiStyles.color.close, this._styler);
1473
- return createBuilder(this, styler, this._isEmpty);
1474
- };
1475
- }
1476
- };
1477
- }
1478
- for (const model of usedModels) {
1479
- const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
1480
- styles[bgModel] = {
1481
- get() {
1482
- const { level } = this;
1483
- return function(...arguments_) {
1484
- const styler = createStyler(ansiStyles.bgColor[levelMapping[level]][model](...arguments_), ansiStyles.bgColor.close, this._styler);
1485
- return createBuilder(this, styler, this._isEmpty);
1486
- };
1487
- }
1488
- };
1489
- }
1490
- var proto = Object.defineProperties(() => {
1491
- }, {
1492
- ...styles,
1493
- level: {
1494
- enumerable: true,
1495
- get() {
1496
- return this._generator.level;
1497
- },
1498
- set(level) {
1499
- this._generator.level = level;
1500
- }
1501
- }
1502
- });
1503
- var createStyler = (open, close, parent) => {
1504
- let openAll;
1505
- let closeAll;
1506
- if (parent === void 0) {
1507
- openAll = open;
1508
- closeAll = close;
1509
- } else {
1510
- openAll = parent.openAll + open;
1511
- closeAll = close + parent.closeAll;
1512
- }
1513
- return {
1514
- open,
1515
- close,
1516
- openAll,
1517
- closeAll,
1518
- parent
1519
- };
1520
- };
1521
- var createBuilder = (self, _styler, _isEmpty) => {
1522
- const builder2 = (...arguments_) => {
1523
- if (isArray(arguments_[0]) && isArray(arguments_[0].raw)) {
1524
- return applyStyle(builder2, chalkTag(builder2, ...arguments_));
1525
- }
1526
- return applyStyle(builder2, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
1527
- };
1528
- Object.setPrototypeOf(builder2, proto);
1529
- builder2._generator = self;
1530
- builder2._styler = _styler;
1531
- builder2._isEmpty = _isEmpty;
1532
- return builder2;
1533
- };
1534
- var applyStyle = (self, string) => {
1535
- if (self.level <= 0 || !string) {
1536
- return self._isEmpty ? "" : string;
1537
- }
1538
- let styler = self._styler;
1539
- if (styler === void 0) {
1540
- return string;
1541
- }
1542
- const { openAll, closeAll } = styler;
1543
- if (string.indexOf("\x1B") !== -1) {
1544
- while (styler !== void 0) {
1545
- string = stringReplaceAll(string, styler.close, styler.open);
1546
- styler = styler.parent;
1547
- }
1548
- }
1549
- const lfIndex = string.indexOf("\n");
1550
- if (lfIndex !== -1) {
1551
- string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
1552
- }
1553
- return openAll + string + closeAll;
1554
- };
1555
- var template;
1556
- var chalkTag = (chalk3, ...strings) => {
1557
- const [firstString] = strings;
1558
- if (!isArray(firstString) || !isArray(firstString.raw)) {
1559
- return strings.join(" ");
1560
- }
1561
- const arguments_ = strings.slice(1);
1562
- const parts = [firstString.raw[0]];
1563
- for (let i = 1; i < firstString.length; i++) {
1564
- parts.push(
1565
- String(arguments_[i - 1]).replace(/[{}\\]/g, "\\$&"),
1566
- String(firstString.raw[i])
1567
- );
1568
- }
1569
- if (template === void 0) {
1570
- template = require_templates();
1571
- }
1572
- return template(chalk3, parts.join(""));
1573
- };
1574
- Object.defineProperties(Chalk.prototype, styles);
1575
- var chalk2 = Chalk();
1576
- chalk2.supportsColor = stdoutColor;
1577
- chalk2.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
1578
- chalk2.stderr.supportsColor = stderrColor;
1579
- module2.exports = chalk2;
1580
- }
1581
- });
1582
-
1583
- // src/index.ts
1584
- var index_exports = {};
1585
- __export(index_exports, {
1586
- builder: () => builder,
1587
- default: () => index_default,
1588
- generateQuery: () => generateQuery,
1589
- generateQueryHeader: () => generateQueryHeader,
1590
- getReactQueryDependencies: () => getReactQueryDependencies,
1591
- getSvelteQueryDependencies: () => getSvelteQueryDependencies,
1592
- getVueQueryDependencies: () => getVueQueryDependencies
1593
- });
1594
- module.exports = __toCommonJS(index_exports);
1595
- var import_core3 = require("@orval/core");
1596
- var import_lodash = __toESM(require("lodash.omitby"));
1597
-
1598
- // src/client.ts
1599
- var import_core2 = require("@orval/core");
1600
- var import_fetch = require("@orval/fetch");
1601
-
1602
- // src/utils.ts
1603
- var import_core = require("@orval/core");
1604
- var import_chalk = __toESM(require_source());
1605
- var normalizeQueryOptions = (queryOptions = {}, outputWorkspace) => {
1606
- return {
1607
- ...queryOptions.usePrefetch ? { usePrefetch: true } : {},
1608
- ...queryOptions.useQuery ? { useQuery: true } : {},
1609
- ...queryOptions.useInfinite ? { useInfinite: true } : {},
1610
- ...queryOptions.useInfiniteQueryParam ? { useInfiniteQueryParam: queryOptions.useInfiniteQueryParam } : {},
1611
- ...queryOptions.options ? { options: queryOptions.options } : {},
1612
- ...(queryOptions == null ? void 0 : queryOptions.queryKey) ? {
1613
- queryKey: normalizeMutator(outputWorkspace, queryOptions == null ? void 0 : queryOptions.queryKey)
1614
- } : {},
1615
- ...(queryOptions == null ? void 0 : queryOptions.queryOptions) ? {
1616
- queryOptions: normalizeMutator(
1617
- outputWorkspace,
1618
- queryOptions == null ? void 0 : queryOptions.queryOptions
1619
- )
1620
- } : {},
1621
- ...(queryOptions == null ? void 0 : queryOptions.mutationOptions) ? {
1622
- mutationOptions: normalizeMutator(
1623
- outputWorkspace,
1624
- queryOptions == null ? void 0 : queryOptions.mutationOptions
1625
- )
1626
- } : {},
1627
- ...queryOptions.signal ? { signal: true } : {},
1628
- ...queryOptions.shouldExportMutatorHooks ? { shouldExportMutatorHooks: true } : {},
1629
- ...queryOptions.shouldExportQueryKey ? { shouldExportQueryKey: true } : {},
1630
- ...queryOptions.shouldExportHttpClient ? { shouldExportHttpClient: true } : {},
1631
- ...queryOptions.shouldSplitQueryKey ? { shouldSplitQueryKey: true } : {}
1632
- };
34
+ //#region src/utils.ts
35
+ const normalizeQueryOptions = (queryOptions = {}, outputWorkspace) => {
36
+ return {
37
+ ...queryOptions.usePrefetch ? { usePrefetch: true } : {},
38
+ ...queryOptions.useQuery ? { useQuery: true } : {},
39
+ ...queryOptions.useInfinite ? { useInfinite: true } : {},
40
+ ...queryOptions.useInfiniteQueryParam ? { useInfiniteQueryParam: queryOptions.useInfiniteQueryParam } : {},
41
+ ...queryOptions.options ? { options: queryOptions.options } : {},
42
+ ...queryOptions?.queryKey ? { queryKey: normalizeMutator(outputWorkspace, queryOptions?.queryKey) } : {},
43
+ ...queryOptions?.queryOptions ? { queryOptions: normalizeMutator(outputWorkspace, queryOptions?.queryOptions) } : {},
44
+ ...queryOptions?.mutationOptions ? { mutationOptions: normalizeMutator(outputWorkspace, queryOptions?.mutationOptions) } : {},
45
+ ...queryOptions.signal ? { signal: true } : {},
46
+ ...queryOptions.shouldExportMutatorHooks ? { shouldExportMutatorHooks: true } : {},
47
+ ...queryOptions.shouldExportQueryKey ? { shouldExportQueryKey: true } : {},
48
+ ...queryOptions.shouldExportHttpClient ? { shouldExportHttpClient: true } : {},
49
+ ...queryOptions.shouldSplitQueryKey ? { shouldSplitQueryKey: true } : {},
50
+ ...queryOptions.useOperationIdAsQueryKey ? { useOperationIdAsQueryKey: true } : {}
51
+ };
1633
52
  };
1634
- var normalizeMutator = (workspace, mutator) => {
1635
- var _a;
1636
- if ((0, import_core.isObject)(mutator)) {
1637
- if (!mutator.path) {
1638
- (0, import_core.createLogger)().error(import_chalk.default.red(`Mutator need a path`));
1639
- process.exit(1);
1640
- }
1641
- return {
1642
- ...mutator,
1643
- path: import_core.upath.resolve(workspace, mutator.path),
1644
- default: (_a = mutator.default || !mutator.name) != null ? _a : false
1645
- };
1646
- }
1647
- if ((0, import_core.isString)(mutator)) {
1648
- return {
1649
- path: import_core.upath.resolve(workspace, mutator),
1650
- default: true
1651
- };
1652
- }
1653
- return mutator;
53
+ const normalizeMutator = (workspace, mutator) => {
54
+ if ((0, __orval_core.isObject)(mutator)) {
55
+ if (!mutator.path) throw new Error(chalk.default.red(`Mutator need a path`));
56
+ return {
57
+ ...mutator,
58
+ path: __orval_core.upath.resolve(workspace, mutator.path),
59
+ default: (mutator.default || !mutator.name) ?? false
60
+ };
61
+ }
62
+ if ((0, __orval_core.isString)(mutator)) return {
63
+ path: __orval_core.upath.resolve(workspace, mutator),
64
+ default: true
65
+ };
66
+ return mutator;
1654
67
  };
1655
68
  function vueWrapTypeWithMaybeRef(props) {
1656
- return props.map((prop) => {
1657
- const [paramName, paramType] = prop.implementation.split(":");
1658
- if (!paramType) return prop;
1659
- const name = prop.type === import_core.GetterPropType.NAMED_PATH_PARAMS ? prop.name : `${paramName}`;
1660
- const [type, defaultValue] = paramType.split("=");
1661
- return {
1662
- ...prop,
1663
- implementation: `${name}: MaybeRef<${type.trim()}>${defaultValue ? ` = ${defaultValue}` : ""}`
1664
- };
1665
- });
69
+ return props.map((prop) => {
70
+ const [paramName, paramType] = prop.implementation.split(":");
71
+ if (!paramType) return prop;
72
+ const name = prop.type === __orval_core.GetterPropType.NAMED_PATH_PARAMS ? prop.name : paramName;
73
+ const [type, defaultValue] = paramType.split("=");
74
+ return {
75
+ ...prop,
76
+ implementation: `${name}: MaybeRef<${type.trim()}>${defaultValue ? ` = ${defaultValue}` : ""}`
77
+ };
78
+ });
1666
79
  }
1667
- var vueUnRefParams = (props) => {
1668
- return props.map((prop) => {
1669
- if (prop.type === import_core.GetterPropType.NAMED_PATH_PARAMS) {
1670
- return `const ${prop.destructured} = unref(${prop.name});`;
1671
- }
1672
- return `${prop.name} = unref(${prop.name});`;
1673
- }).join("\n");
80
+ const vueUnRefParams = (props) => {
81
+ return props.map((prop) => {
82
+ if (prop.type === __orval_core.GetterPropType.NAMED_PATH_PARAMS) return `const ${prop.destructured} = unref(${prop.name});`;
83
+ return `${prop.name} = unref(${prop.name});`;
84
+ }).join("\n");
1674
85
  };
1675
- var wrapRouteParameters = (route, prepend, append) => route.replaceAll(import_core.TEMPLATE_TAG_REGEX, `\${${prepend}$1${append}}`);
1676
- var makeRouteSafe = (route) => wrapRouteParameters(route, "encodeURIComponent(String(", "))");
1677
- var isVue = (client) => import_core.OutputClient.VUE_QUERY === client;
1678
- var getHasSignal = ({
1679
- overrideQuerySignal = false,
1680
- verb
1681
- }) => overrideQuerySignal && (!(0, import_core.getIsBodyVerb)(verb) || verb === import_core.Verbs.POST);
86
+ const wrapRouteParameters = (route, prepend, append) => route.replaceAll(__orval_core.TEMPLATE_TAG_REGEX, `\${${prepend}$1${append}}`);
87
+ const makeRouteSafe = (route) => wrapRouteParameters(route, "encodeURIComponent(String(", "))");
88
+ const isVue = (client) => __orval_core.OutputClient.VUE_QUERY === client;
89
+ const getHasSignal = ({ overrideQuerySignal = false, verb }) => overrideQuerySignal && (!(0, __orval_core.getIsBodyVerb)(verb) || verb === __orval_core.Verbs.POST);
1682
90
 
1683
- // src/client.ts
1684
- var AXIOS_DEPENDENCIES = [
1685
- {
1686
- exports: [
1687
- {
1688
- name: "axios",
1689
- default: true,
1690
- values: true,
1691
- syntheticDefaultImport: true
1692
- },
1693
- { name: "AxiosRequestConfig" },
1694
- { name: "AxiosResponse" },
1695
- { name: "AxiosError" }
1696
- ],
1697
- dependency: "axios"
1698
- }
1699
- ];
1700
- var generateQueryRequestFunction = (verbOptions, options, isVue2) => {
1701
- if (options.context.output.httpClient === import_core2.OutputHttpClient.AXIOS) {
1702
- return generateAxiosRequestFunction(verbOptions, options, isVue2);
1703
- } else {
1704
- return (0, import_fetch.generateRequestFunction)(verbOptions, options);
1705
- }
91
+ //#endregion
92
+ //#region src/client.ts
93
+ const AXIOS_DEPENDENCIES = [{
94
+ exports: [
95
+ {
96
+ name: "axios",
97
+ default: true,
98
+ values: true,
99
+ syntheticDefaultImport: true
100
+ },
101
+ { name: "AxiosRequestConfig" },
102
+ { name: "AxiosResponse" },
103
+ { name: "AxiosError" }
104
+ ],
105
+ dependency: "axios"
106
+ }];
107
+ const generateQueryRequestFunction = (verbOptions, options, isVue$1) => {
108
+ return options.context.output.httpClient === __orval_core.OutputHttpClient.AXIOS ? generateAxiosRequestFunction(verbOptions, options, isVue$1) : (0, __orval_fetch.generateRequestFunction)(verbOptions, options);
1706
109
  };
1707
- var generateAxiosRequestFunction = ({
1708
- headers,
1709
- queryParams,
1710
- operationName,
1711
- response,
1712
- mutator,
1713
- body,
1714
- props: _props,
1715
- verb,
1716
- formData,
1717
- formUrlEncoded,
1718
- override,
1719
- paramsSerializer
1720
- }, { route: _route, context }, isVue2) => {
1721
- var _a, _b, _c;
1722
- let props = _props;
1723
- let route = _route;
1724
- if (isVue2) {
1725
- props = vueWrapTypeWithMaybeRef(_props);
1726
- }
1727
- if ((_a = context.output) == null ? void 0 : _a.urlEncodeParameters) {
1728
- route = makeRouteSafe(route);
1729
- }
1730
- const isRequestOptions = override.requestOptions !== false;
1731
- const isFormData = override.formData.disabled === false;
1732
- const isFormUrlEncoded = override.formUrlEncoded !== false;
1733
- const hasSignal = getHasSignal({
1734
- overrideQuerySignal: override.query.signal,
1735
- verb
1736
- });
1737
- const isExactOptionalPropertyTypes = !!((_c = (_b = context.output.tsconfig) == null ? void 0 : _b.compilerOptions) == null ? void 0 : _c.exactOptionalPropertyTypes);
1738
- const bodyForm = (0, import_core2.generateFormDataAndUrlEncodedFunction)({
1739
- formData,
1740
- formUrlEncoded,
1741
- body,
1742
- isFormData,
1743
- isFormUrlEncoded
1744
- });
1745
- if (mutator) {
1746
- const mutatorConfig = (0, import_core2.generateMutatorConfig)({
1747
- route,
1748
- body,
1749
- headers,
1750
- queryParams,
1751
- response,
1752
- verb,
1753
- isFormData,
1754
- isFormUrlEncoded,
1755
- hasSignal,
1756
- isExactOptionalPropertyTypes,
1757
- isVue: isVue2
1758
- });
1759
- const bodyDefinition = body.definition.replace("[]", "\\[\\]");
1760
- const propsImplementation = (mutator == null ? void 0 : mutator.bodyTypeName) && body.definition ? (0, import_core2.toObjectString)(props, "implementation").replace(
1761
- new RegExp(`(\\w*):\\s?${bodyDefinition}`),
1762
- `$1: ${mutator.bodyTypeName}<${body.definition}>`
1763
- ) : (0, import_core2.toObjectString)(props, "implementation");
1764
- const requestOptions = isRequestOptions ? (0, import_core2.generateMutatorRequestOptions)(
1765
- override.requestOptions,
1766
- mutator.hasSecondArg
1767
- ) : "";
1768
- if (mutator.isHook) {
1769
- const ret = `${override.query.shouldExportMutatorHooks ? "export " : ""}const use${(0, import_core2.pascal)(operationName)}Hook = () => {
110
+ const generateAxiosRequestFunction = ({ headers, queryParams, operationName, response, mutator, body, props: _props, verb, formData, formUrlEncoded, override, paramsSerializer }, { route: _route, context }, isVue$1) => {
111
+ let props = _props;
112
+ let route = _route;
113
+ if (isVue$1) props = vueWrapTypeWithMaybeRef(_props);
114
+ if (context.output?.urlEncodeParameters) route = makeRouteSafe(route);
115
+ const isRequestOptions = override.requestOptions !== false;
116
+ const isFormData = !override.formData.disabled;
117
+ const isFormUrlEncoded = override.formUrlEncoded !== false;
118
+ const hasSignal = getHasSignal({
119
+ overrideQuerySignal: override.query.signal,
120
+ verb
121
+ });
122
+ const isExactOptionalPropertyTypes = !!context.output.tsconfig?.compilerOptions?.exactOptionalPropertyTypes;
123
+ const bodyForm = (0, __orval_core.generateFormDataAndUrlEncodedFunction)({
124
+ formData,
125
+ formUrlEncoded,
126
+ body,
127
+ isFormData,
128
+ isFormUrlEncoded
129
+ });
130
+ if (mutator) {
131
+ const mutatorConfig = (0, __orval_core.generateMutatorConfig)({
132
+ route,
133
+ body,
134
+ headers,
135
+ queryParams,
136
+ response,
137
+ verb,
138
+ isFormData,
139
+ isFormUrlEncoded,
140
+ hasSignal,
141
+ isExactOptionalPropertyTypes,
142
+ isVue: isVue$1
143
+ });
144
+ const bodyDefinition = body.definition.replace("[]", String.raw`\[\]`);
145
+ const propsImplementation = mutator?.bodyTypeName && body.definition ? (0, __orval_core.toObjectString)(props, "implementation").replace(/* @__PURE__ */ new RegExp(`(\\w*):\\s?${bodyDefinition}`), `$1: ${mutator.bodyTypeName}<${body.definition}>`) : (0, __orval_core.toObjectString)(props, "implementation");
146
+ const requestOptions = isRequestOptions ? (0, __orval_core.generateMutatorRequestOptions)(override.requestOptions, mutator.hasSecondArg) : "";
147
+ if (mutator.isHook) {
148
+ const ret = `${override.query.shouldExportMutatorHooks ? "export " : ""}const use${(0, __orval_core.pascal)(operationName)}Hook = () => {
1770
149
  const ${operationName} = ${mutator.name}<${response.definition.success || "unknown"}>();
1771
150
 
1772
- return useCallback((
1773
- ${propsImplementation}
1774
- ${isRequestOptions && mutator.hasSecondArg ? `options${context.output.optionsParamRequired ? "" : "?"}: SecondParameter<ReturnType<typeof ${mutator.name}>>,` : ""}${hasSignal ? "signal?: AbortSignal\n" : ""}) => {${bodyForm}
151
+ return useCallback((\n ${propsImplementation}\n ${isRequestOptions && mutator.hasSecondArg ? `options${context.output.optionsParamRequired ? "" : "?"}: SecondParameter<ReturnType<typeof ${mutator.name}>>,` : ""}${hasSignal ? "signal?: AbortSignal\n" : ""}) => {${bodyForm}
1775
152
  return ${operationName}(
1776
153
  ${mutatorConfig},
1777
154
  ${requestOptions});
1778
155
  }, [${operationName}])
1779
156
  }
1780
157
  `;
1781
- const vueRet = `${override.query.shouldExportMutatorHooks ? "export " : ""}const use${(0, import_core2.pascal)(operationName)}Hook = () => {
158
+ const vueRet = `${override.query.shouldExportMutatorHooks ? "export " : ""}const use${(0, __orval_core.pascal)(operationName)}Hook = () => {
1782
159
  const ${operationName} = ${mutator.name}<${response.definition.success || "unknown"}>();
1783
160
 
1784
- return (
1785
- ${propsImplementation}
1786
- ${isRequestOptions && mutator.hasSecondArg ? `options${context.output.optionsParamRequired ? "" : "?"}: SecondParameter<ReturnType<typeof ${mutator.name}>>,` : ""}${hasSignal ? "signal?: AbortSignal\n" : ""}) => {${bodyForm}
161
+ return (\n ${propsImplementation}\n ${isRequestOptions && mutator.hasSecondArg ? `options${context.output.optionsParamRequired ? "" : "?"}: SecondParameter<ReturnType<typeof ${mutator.name}>>,` : ""}${hasSignal ? "signal?: AbortSignal\n" : ""}) => {${bodyForm}
1787
162
  return ${operationName}(
1788
163
  ${mutatorConfig},
1789
164
  ${requestOptions});
1790
165
  }
1791
166
  }
1792
167
  `;
1793
- return isVue2 ? vueRet : ret;
1794
- }
1795
- return `${override.query.shouldExportHttpClient ? "export " : ""}const ${operationName} = (
1796
- ${propsImplementation}
1797
- ${isRequestOptions && mutator.hasSecondArg ? `options${context.output.optionsParamRequired ? "" : "?"}: SecondParameter<typeof ${mutator.name}>,` : ""}${hasSignal ? "signal?: AbortSignal\n" : ""}) => {
1798
- ${isVue2 ? vueUnRefParams(props) : ""}
168
+ return isVue$1 ? vueRet : ret;
169
+ }
170
+ return `${override.query.shouldExportHttpClient ? "export " : ""}const ${operationName} = (\n ${propsImplementation}\n ${isRequestOptions && mutator.hasSecondArg ? `options${context.output.optionsParamRequired ? "" : "?"}: SecondParameter<typeof ${mutator.name}>,` : ""}${hasSignal ? "signal?: AbortSignal\n" : ""}) => {
171
+ ${isVue$1 ? vueUnRefParams(props) : ""}
1799
172
  ${bodyForm}
1800
173
  return ${mutator.name}<${response.definition.success || "unknown"}>(
1801
174
  ${mutatorConfig},
1802
175
  ${requestOptions});
1803
176
  }
1804
177
  `;
1805
- }
1806
- const isSyntheticDefaultImportsAllowed = (0, import_core2.isSyntheticDefaultImportsAllow)(
1807
- context.output.tsconfig
1808
- );
1809
- const options = (0, import_core2.generateOptions)({
1810
- route,
1811
- body,
1812
- headers,
1813
- queryParams,
1814
- response,
1815
- verb,
1816
- requestOptions: override == null ? void 0 : override.requestOptions,
1817
- isFormData,
1818
- isFormUrlEncoded,
1819
- paramsSerializer,
1820
- paramsSerializerOptions: override == null ? void 0 : override.paramsSerializerOptions,
1821
- isExactOptionalPropertyTypes,
1822
- hasSignal,
1823
- isVue: isVue2
1824
- });
1825
- const optionsArgs = generateRequestOptionsArguments({
1826
- isRequestOptions,
1827
- hasSignal
1828
- });
1829
- const queryProps = (0, import_core2.toObjectString)(props, "implementation");
1830
- const httpRequestFunctionImplementation = `${override.query.shouldExportHttpClient ? "export " : ""}const ${operationName} = (
1831
- ${queryProps} ${optionsArgs} ): Promise<AxiosResponse<${response.definition.success || "unknown"}>> => {
1832
- ${isVue2 ? vueUnRefParams(props) : ""}
178
+ }
179
+ const isSyntheticDefaultImportsAllowed = (0, __orval_core.isSyntheticDefaultImportsAllow)(context.output.tsconfig);
180
+ const options = (0, __orval_core.generateOptions)({
181
+ route,
182
+ body,
183
+ headers,
184
+ queryParams,
185
+ response,
186
+ verb,
187
+ requestOptions: override?.requestOptions,
188
+ isFormData,
189
+ isFormUrlEncoded,
190
+ paramsSerializer,
191
+ paramsSerializerOptions: override?.paramsSerializerOptions,
192
+ isExactOptionalPropertyTypes,
193
+ hasSignal,
194
+ isVue: isVue$1
195
+ });
196
+ const optionsArgs = generateRequestOptionsArguments({
197
+ isRequestOptions,
198
+ hasSignal
199
+ });
200
+ const queryProps = (0, __orval_core.toObjectString)(props, "implementation");
201
+ return `${override.query.shouldExportHttpClient ? "export " : ""}const ${operationName} = (\n ${queryProps} ${optionsArgs} ): Promise<AxiosResponse<${response.definition.success || "unknown"}>> => {
202
+ ${isVue$1 ? vueUnRefParams(props) : ""}
1833
203
  ${bodyForm}
1834
- return axios${!isSyntheticDefaultImportsAllowed ? ".default" : ""}.${verb}(${options});
204
+ return axios${isSyntheticDefaultImportsAllowed ? "" : ".default"}.${verb}(${options});
1835
205
  }
1836
206
  `;
1837
- return httpRequestFunctionImplementation;
1838
207
  };
1839
- var generateRequestOptionsArguments = ({
1840
- isRequestOptions,
1841
- hasSignal
1842
- }) => {
1843
- if (isRequestOptions) {
1844
- return "options?: AxiosRequestConfig\n";
1845
- }
1846
- return hasSignal ? "signal?: AbortSignal\n" : "";
208
+ const generateRequestOptionsArguments = ({ isRequestOptions, hasSignal }) => {
209
+ if (isRequestOptions) return "options?: AxiosRequestConfig\n";
210
+ return hasSignal ? "signal?: AbortSignal\n" : "";
1847
211
  };
1848
- var getQueryArgumentsRequestType = (httpClient, mutator) => {
1849
- if (!mutator) {
1850
- return httpClient === import_core2.OutputHttpClient.AXIOS ? `axios?: AxiosRequestConfig` : "fetch?: RequestInit";
1851
- }
1852
- if (mutator.hasSecondArg && !mutator.isHook) {
1853
- return `request?: SecondParameter<typeof ${mutator.name}>`;
1854
- }
1855
- if (mutator.hasSecondArg && mutator.isHook) {
1856
- return `request?: SecondParameter<ReturnType<typeof ${mutator.name}>>`;
1857
- }
1858
- return "";
212
+ const getQueryArgumentsRequestType = (httpClient, mutator) => {
213
+ if (!mutator) return httpClient === __orval_core.OutputHttpClient.AXIOS ? `axios?: AxiosRequestConfig` : "fetch?: RequestInit";
214
+ if (mutator.hasSecondArg && !mutator.isHook) return `request?: SecondParameter<typeof ${mutator.name}>`;
215
+ if (mutator.hasSecondArg && mutator.isHook) return `request?: SecondParameter<ReturnType<typeof ${mutator.name}>>`;
216
+ return "";
1859
217
  };
1860
- var getQueryOptions = ({
1861
- isRequestOptions,
1862
- mutator,
1863
- isExactOptionalPropertyTypes,
1864
- hasSignal,
1865
- httpClient
1866
- }) => {
1867
- if (!mutator && isRequestOptions) {
1868
- const options = httpClient === import_core2.OutputHttpClient.AXIOS ? "axiosOptions" : "fetchOptions";
1869
- if (!hasSignal) {
1870
- return options;
1871
- }
1872
- return `{ ${isExactOptionalPropertyTypes ? "...(signal ? { signal } : {})" : "signal"}, ...${options} }`;
1873
- }
1874
- if ((mutator == null ? void 0 : mutator.hasSecondArg) && isRequestOptions) {
1875
- if (!hasSignal) {
1876
- return "requestOptions";
1877
- }
1878
- return httpClient === import_core2.OutputHttpClient.AXIOS ? "requestOptions, signal" : "{ signal, ...requestOptions }";
1879
- }
1880
- if (hasSignal) {
1881
- return "signal";
1882
- }
1883
- return "";
218
+ const getQueryOptions = ({ isRequestOptions, mutator, isExactOptionalPropertyTypes, hasSignal, httpClient }) => {
219
+ if (!mutator && isRequestOptions) {
220
+ const options = httpClient === __orval_core.OutputHttpClient.AXIOS ? "axiosOptions" : "fetchOptions";
221
+ if (!hasSignal) return options;
222
+ return `{ ${isExactOptionalPropertyTypes ? "...(signal ? { signal } : {})" : "signal"}, ...${options} }`;
223
+ }
224
+ if (mutator?.hasSecondArg && isRequestOptions) {
225
+ if (!hasSignal) return "requestOptions";
226
+ return httpClient === __orval_core.OutputHttpClient.AXIOS ? "requestOptions, signal" : "{ signal, ...requestOptions }";
227
+ }
228
+ if (hasSignal) return "signal";
229
+ return "";
1884
230
  };
1885
- var getHookOptions = ({
1886
- isRequestOptions,
1887
- httpClient,
1888
- mutator
1889
- }) => {
1890
- if (!isRequestOptions) {
1891
- return "";
1892
- }
1893
- let value = "const {query: queryOptions";
1894
- if (!mutator) {
1895
- const options = httpClient === import_core2.OutputHttpClient.AXIOS ? ", axios: axiosOptions" : ", fetch: fetchOptions";
1896
- value += options;
1897
- }
1898
- if (mutator == null ? void 0 : mutator.hasSecondArg) {
1899
- value += ", request: requestOptions";
1900
- }
1901
- value += "} = options ?? {};";
1902
- return value;
231
+ const getHookOptions = ({ isRequestOptions, httpClient, mutator }) => {
232
+ if (!isRequestOptions) return "";
233
+ let value = "const {query: queryOptions";
234
+ if (!mutator) {
235
+ const options = httpClient === __orval_core.OutputHttpClient.AXIOS ? ", axios: axiosOptions" : ", fetch: fetchOptions";
236
+ value += options;
237
+ }
238
+ if (mutator?.hasSecondArg) value += ", request: requestOptions";
239
+ value += "} = options ?? {};";
240
+ return value;
1903
241
  };
1904
- var getQueryErrorType = (operationName, response, httpClient, mutator) => {
1905
- if (mutator) {
1906
- return mutator.hasErrorType ? `${mutator.default ? (0, import_core2.pascal)(operationName) : ""}ErrorType<${response.definition.errors || "unknown"}>` : response.definition.errors || "unknown";
1907
- } else {
1908
- return httpClient === import_core2.OutputHttpClient.AXIOS ? `AxiosError<${response.definition.errors || "unknown"}>` : `${response.definition.errors || "unknown"}`;
1909
- }
242
+ const getQueryErrorType = (operationName, response, httpClient, mutator) => {
243
+ if (mutator) return mutator.hasErrorType ? `${mutator.default ? (0, __orval_core.pascal)(operationName) : ""}ErrorType<${response.definition.errors || "unknown"}>` : response.definition.errors || "unknown";
244
+ else return httpClient === __orval_core.OutputHttpClient.AXIOS ? `AxiosError<${response.definition.errors || "unknown"}>` : response.definition.errors || "unknown";
1910
245
  };
1911
- var getHooksOptionImplementation = (isRequestOptions, httpClient, operationName, mutator) => {
1912
- const options = httpClient === import_core2.OutputHttpClient.AXIOS ? ", axios: axiosOptions" : ", fetch: fetchOptions";
1913
- return isRequestOptions ? `const mutationKey = ['${operationName}'];
1914
- const {mutation: mutationOptions${!mutator ? options : (mutator == null ? void 0 : mutator.hasSecondArg) ? ", request: requestOptions" : ""}} = options ?
246
+ const getHooksOptionImplementation = (isRequestOptions, httpClient, operationName, mutator) => {
247
+ const options = httpClient === __orval_core.OutputHttpClient.AXIOS ? ", axios: axiosOptions" : ", fetch: fetchOptions";
248
+ return isRequestOptions ? `const mutationKey = ['${operationName}'];
249
+ const {mutation: mutationOptions${mutator ? mutator?.hasSecondArg ? ", request: requestOptions" : "" : options}} = options ?
1915
250
  options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
1916
251
  options
1917
252
  : {...options, mutation: {...options.mutation, mutationKey}}
1918
- : {mutation: { mutationKey, }${(mutator == null ? void 0 : mutator.hasSecondArg) ? ", request: undefined" : ""}${!mutator ? httpClient === import_core2.OutputHttpClient.AXIOS ? ", axios: undefined" : ", fetch: undefined" : ""}};` : "";
253
+ : {mutation: { mutationKey, }${mutator?.hasSecondArg ? ", request: undefined" : ""}${mutator ? "" : httpClient === __orval_core.OutputHttpClient.AXIOS ? ", axios: undefined" : ", fetch: undefined"}};` : "";
1919
254
  };
1920
- var getMutationRequestArgs = (isRequestOptions, httpClient, mutator) => {
1921
- const options = httpClient === import_core2.OutputHttpClient.AXIOS ? "axiosOptions" : "fetchOptions";
1922
- return isRequestOptions ? !mutator ? options : (mutator == null ? void 0 : mutator.hasSecondArg) ? "requestOptions" : "" : "";
255
+ const getMutationRequestArgs = (isRequestOptions, httpClient, mutator) => {
256
+ const options = httpClient === __orval_core.OutputHttpClient.AXIOS ? "axiosOptions" : "fetchOptions";
257
+ return isRequestOptions ? mutator ? mutator?.hasSecondArg ? "requestOptions" : "" : options : "";
1923
258
  };
1924
- var getHttpFunctionQueryProps = (isVue2, httpClient, queryProperties) => {
1925
- if (isVue2 && httpClient === import_core2.OutputHttpClient.FETCH && queryProperties) {
1926
- return queryProperties.split(",").map((prop) => `unref(${prop})`).join(",");
1927
- }
1928
- return queryProperties;
259
+ const getHttpFunctionQueryProps = (isVue$1, httpClient, queryProperties) => {
260
+ if (isVue$1 && httpClient === __orval_core.OutputHttpClient.FETCH && queryProperties) return queryProperties.split(",").map((prop) => `unref(${prop})`).join(",");
261
+ return queryProperties;
1929
262
  };
1930
- var getQueryHeader = (params) => {
1931
- return params.output.httpClient === import_core2.OutputHttpClient.FETCH ? (0, import_fetch.generateFetchHeader)(params) : "";
263
+ const getQueryHeader = (params) => {
264
+ return params.output.httpClient === __orval_core.OutputHttpClient.FETCH ? (0, __orval_fetch.generateFetchHeader)(params) : "";
1932
265
  };
1933
266
 
1934
- // src/index.ts
1935
- var REACT_DEPENDENCIES = [
1936
- {
1937
- exports: [
1938
- {
1939
- name: "useCallback",
1940
- values: true
1941
- }
1942
- ],
1943
- dependency: "react"
1944
- }
1945
- ];
1946
- var PARAMS_SERIALIZER_DEPENDENCIES = [
1947
- {
1948
- exports: [
1949
- {
1950
- name: "qs",
1951
- default: true,
1952
- values: true,
1953
- syntheticDefaultImport: true
1954
- }
1955
- ],
1956
- dependency: "qs"
1957
- }
1958
- ];
1959
- var SVELTE_QUERY_DEPENDENCIES_V3 = [
1960
- {
1961
- exports: [
1962
- { name: "useQuery", values: true },
1963
- { name: "useInfiniteQuery", values: true },
1964
- { name: "useMutation", values: true },
1965
- { name: "UseQueryOptions" },
1966
- {
1967
- name: "UseInfiniteQueryOptions"
1968
- },
1969
- { name: "UseMutationOptions" },
1970
- { name: "QueryFunction" },
1971
- { name: "MutationFunction" },
1972
- { name: "UseQueryStoreResult" },
1973
- { name: "UseInfiniteQueryStoreResult" },
1974
- { name: "QueryKey" },
1975
- { name: "CreateMutationResult" }
1976
- ],
1977
- dependency: "@sveltestack/svelte-query"
1978
- }
1979
- ];
1980
- var SVELTE_QUERY_DEPENDENCIES = [
1981
- {
1982
- exports: [
1983
- { name: "createQuery", values: true },
1984
- { name: "createInfiniteQuery", values: true },
1985
- { name: "createMutation", values: true },
1986
- { name: "CreateQueryOptions" },
1987
- {
1988
- name: "CreateInfiniteQueryOptions"
1989
- },
1990
- { name: "CreateMutationOptions" },
1991
- { name: "QueryFunction" },
1992
- { name: "MutationFunction" },
1993
- { name: "CreateQueryResult" },
1994
- { name: "CreateInfiniteQueryResult" },
1995
- { name: "QueryKey" },
1996
- { name: "InfiniteData" },
1997
- { name: "CreateMutationResult" },
1998
- { name: "DataTag" },
1999
- { name: "QueryClient" }
2000
- ],
2001
- dependency: "@tanstack/svelte-query"
2002
- }
2003
- ];
2004
- var isSvelteQueryV3 = (packageJson) => {
2005
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
2006
- const hasSvelteQuery = (_e = (_c = (_a = packageJson == null ? void 0 : packageJson.dependencies) == null ? void 0 : _a["@sveltestack/svelte-query"]) != null ? _c : (_b = packageJson == null ? void 0 : packageJson.devDependencies) == null ? void 0 : _b["@sveltestack/svelte-query"]) != null ? _e : (_d = packageJson == null ? void 0 : packageJson.peerDependencies) == null ? void 0 : _d["@sveltestack/svelte-query"];
2007
- const hasSvelteQueryV4 = (_j = (_h = (_f = packageJson == null ? void 0 : packageJson.dependencies) == null ? void 0 : _f["@tanstack/svelte-query"]) != null ? _h : (_g = packageJson == null ? void 0 : packageJson.devDependencies) == null ? void 0 : _g["@tanstack/svelte-query"]) != null ? _j : (_i = packageJson == null ? void 0 : packageJson.peerDependencies) == null ? void 0 : _i["@tanstack/svelte-query"];
2008
- return !!hasSvelteQuery && !hasSvelteQueryV4;
267
+ //#endregion
268
+ //#region src/index.ts
269
+ const REACT_DEPENDENCIES = [{
270
+ exports: [{
271
+ name: "useCallback",
272
+ values: true
273
+ }],
274
+ dependency: "react"
275
+ }];
276
+ const PARAMS_SERIALIZER_DEPENDENCIES = [{
277
+ exports: [{
278
+ name: "qs",
279
+ default: true,
280
+ values: true,
281
+ syntheticDefaultImport: true
282
+ }],
283
+ dependency: "qs"
284
+ }];
285
+ const SVELTE_QUERY_DEPENDENCIES_V3 = [{
286
+ exports: [
287
+ {
288
+ name: "useQuery",
289
+ values: true
290
+ },
291
+ {
292
+ name: "useInfiniteQuery",
293
+ values: true
294
+ },
295
+ {
296
+ name: "useMutation",
297
+ values: true
298
+ },
299
+ { name: "UseQueryOptions" },
300
+ { name: "UseInfiniteQueryOptions" },
301
+ { name: "UseMutationOptions" },
302
+ { name: "QueryFunction" },
303
+ { name: "MutationFunction" },
304
+ { name: "UseQueryStoreResult" },
305
+ { name: "UseInfiniteQueryStoreResult" },
306
+ { name: "QueryKey" },
307
+ { name: "CreateMutationResult" }
308
+ ],
309
+ dependency: "@sveltestack/svelte-query"
310
+ }];
311
+ const SVELTE_QUERY_DEPENDENCIES = [{
312
+ exports: [
313
+ {
314
+ name: "createQuery",
315
+ values: true
316
+ },
317
+ {
318
+ name: "createInfiniteQuery",
319
+ values: true
320
+ },
321
+ {
322
+ name: "createMutation",
323
+ values: true
324
+ },
325
+ { name: "CreateQueryOptions" },
326
+ { name: "CreateInfiniteQueryOptions" },
327
+ { name: "CreateMutationOptions" },
328
+ { name: "QueryFunction" },
329
+ { name: "MutationFunction" },
330
+ { name: "CreateQueryResult" },
331
+ { name: "CreateInfiniteQueryResult" },
332
+ { name: "QueryKey" },
333
+ { name: "InfiniteData" },
334
+ { name: "CreateMutationResult" },
335
+ { name: "DataTag" },
336
+ { name: "QueryClient" }
337
+ ],
338
+ dependency: "@tanstack/svelte-query"
339
+ }];
340
+ const isSvelteQueryV3 = (packageJson) => {
341
+ const hasSvelteQuery = packageJson?.dependencies?.["@sveltestack/svelte-query"] ?? packageJson?.devDependencies?.["@sveltestack/svelte-query"] ?? packageJson?.peerDependencies?.["@sveltestack/svelte-query"];
342
+ const hasSvelteQueryV4 = packageJson?.dependencies?.["@tanstack/svelte-query"] ?? packageJson?.devDependencies?.["@tanstack/svelte-query"] ?? packageJson?.peerDependencies?.["@tanstack/svelte-query"];
343
+ return !!hasSvelteQuery && !hasSvelteQueryV4;
2009
344
  };
2010
- var getSvelteQueryDependencies = (hasGlobalMutator, hasParamsSerializerOptions, packageJson, httpClient) => {
2011
- const hasSvelteQueryV3 = isSvelteQueryV3(packageJson);
2012
- return [
2013
- ...!hasGlobalMutator && httpClient === import_core3.OutputHttpClient.AXIOS ? AXIOS_DEPENDENCIES : [],
2014
- ...hasParamsSerializerOptions ? PARAMS_SERIALIZER_DEPENDENCIES : [],
2015
- ...hasSvelteQueryV3 ? SVELTE_QUERY_DEPENDENCIES_V3 : SVELTE_QUERY_DEPENDENCIES
2016
- ];
345
+ const getSvelteQueryDependencies = (hasGlobalMutator, hasParamsSerializerOptions, packageJson, httpClient) => {
346
+ const hasSvelteQueryV3 = isSvelteQueryV3(packageJson);
347
+ return [
348
+ ...!hasGlobalMutator && httpClient === __orval_core.OutputHttpClient.AXIOS ? AXIOS_DEPENDENCIES : [],
349
+ ...hasParamsSerializerOptions ? PARAMS_SERIALIZER_DEPENDENCIES : [],
350
+ ...hasSvelteQueryV3 ? SVELTE_QUERY_DEPENDENCIES_V3 : SVELTE_QUERY_DEPENDENCIES
351
+ ];
2017
352
  };
2018
- var REACT_QUERY_DEPENDENCIES_V3 = [
2019
- {
2020
- exports: [
2021
- { name: "useQuery", values: true },
2022
- { name: "useInfiniteQuery", values: true },
2023
- { name: "useMutation", values: true },
2024
- { name: "UseQueryOptions" },
2025
- { name: "UseInfiniteQueryOptions" },
2026
- { name: "UseMutationOptions" },
2027
- { name: "QueryFunction" },
2028
- { name: "MutationFunction" },
2029
- { name: "UseQueryResult" },
2030
- { name: "UseInfiniteQueryResult" },
2031
- { name: "QueryKey" },
2032
- { name: "QueryClient" },
2033
- { name: "UseMutationResult" }
2034
- ],
2035
- dependency: "react-query"
2036
- }
2037
- ];
2038
- var REACT_QUERY_DEPENDENCIES = [
2039
- {
2040
- exports: [
2041
- { name: "useQuery", values: true },
2042
- { name: "useSuspenseQuery", values: true },
2043
- { name: "useInfiniteQuery", values: true },
2044
- { name: "useSuspenseInfiniteQuery", values: true },
2045
- { name: "useMutation", values: true },
2046
- { name: "UseQueryOptions" },
2047
- { name: "DefinedInitialDataOptions" },
2048
- { name: "UndefinedInitialDataOptions" },
2049
- { name: "UseSuspenseQueryOptions" },
2050
- { name: "UseInfiniteQueryOptions" },
2051
- { name: "UseSuspenseInfiniteQueryOptions" },
2052
- { name: "UseMutationOptions" },
2053
- { name: "QueryFunction" },
2054
- { name: "MutationFunction" },
2055
- { name: "UseQueryResult" },
2056
- { name: "DefinedUseQueryResult" },
2057
- { name: "UseSuspenseQueryResult" },
2058
- { name: "UseInfiniteQueryResult" },
2059
- { name: "DefinedUseInfiniteQueryResult" },
2060
- { name: "UseSuspenseInfiniteQueryResult" },
2061
- { name: "QueryKey" },
2062
- { name: "QueryClient" },
2063
- { name: "InfiniteData" },
2064
- { name: "UseMutationResult" },
2065
- { name: "DataTag" }
2066
- ],
2067
- dependency: "@tanstack/react-query"
2068
- }
2069
- ];
2070
- var getReactQueryDependencies = (hasGlobalMutator, hasParamsSerializerOptions, packageJson, httpClient, hasTagsMutator, override) => {
2071
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
2072
- const hasReactQuery = (_e = (_c = (_a = packageJson == null ? void 0 : packageJson.dependencies) == null ? void 0 : _a["react-query"]) != null ? _c : (_b = packageJson == null ? void 0 : packageJson.devDependencies) == null ? void 0 : _b["react-query"]) != null ? _e : (_d = packageJson == null ? void 0 : packageJson.peerDependencies) == null ? void 0 : _d["react-query"];
2073
- const hasReactQueryV4 = (_j = (_h = (_f = packageJson == null ? void 0 : packageJson.dependencies) == null ? void 0 : _f["@tanstack/react-query"]) != null ? _h : (_g = packageJson == null ? void 0 : packageJson.devDependencies) == null ? void 0 : _g["@tanstack/react-query"]) != null ? _j : (_i = packageJson == null ? void 0 : packageJson.peerDependencies) == null ? void 0 : _i["@tanstack/react-query"];
2074
- const useReactQueryV3 = (override == null ? void 0 : override.query.version) !== void 0 ? (override == null ? void 0 : override.query.version) <= 3 : hasReactQuery && !hasReactQueryV4;
2075
- return [
2076
- ...hasGlobalMutator || hasTagsMutator ? REACT_DEPENDENCIES : [],
2077
- ...!hasGlobalMutator && httpClient === import_core3.OutputHttpClient.AXIOS ? AXIOS_DEPENDENCIES : [],
2078
- ...hasParamsSerializerOptions ? PARAMS_SERIALIZER_DEPENDENCIES : [],
2079
- ...useReactQueryV3 ? REACT_QUERY_DEPENDENCIES_V3 : REACT_QUERY_DEPENDENCIES
2080
- ];
353
+ const REACT_QUERY_DEPENDENCIES_V3 = [{
354
+ exports: [
355
+ {
356
+ name: "useQuery",
357
+ values: true
358
+ },
359
+ {
360
+ name: "useInfiniteQuery",
361
+ values: true
362
+ },
363
+ {
364
+ name: "useMutation",
365
+ values: true
366
+ },
367
+ { name: "UseQueryOptions" },
368
+ { name: "UseInfiniteQueryOptions" },
369
+ { name: "UseMutationOptions" },
370
+ { name: "QueryFunction" },
371
+ { name: "MutationFunction" },
372
+ { name: "UseQueryResult" },
373
+ { name: "UseInfiniteQueryResult" },
374
+ { name: "QueryKey" },
375
+ { name: "QueryClient" },
376
+ { name: "UseMutationResult" }
377
+ ],
378
+ dependency: "react-query"
379
+ }];
380
+ const REACT_QUERY_DEPENDENCIES = [{
381
+ exports: [
382
+ {
383
+ name: "useQuery",
384
+ values: true
385
+ },
386
+ {
387
+ name: "useSuspenseQuery",
388
+ values: true
389
+ },
390
+ {
391
+ name: "useInfiniteQuery",
392
+ values: true
393
+ },
394
+ {
395
+ name: "useSuspenseInfiniteQuery",
396
+ values: true
397
+ },
398
+ {
399
+ name: "useMutation",
400
+ values: true
401
+ },
402
+ { name: "UseQueryOptions" },
403
+ { name: "DefinedInitialDataOptions" },
404
+ { name: "UndefinedInitialDataOptions" },
405
+ { name: "UseSuspenseQueryOptions" },
406
+ { name: "UseInfiniteQueryOptions" },
407
+ { name: "UseSuspenseInfiniteQueryOptions" },
408
+ { name: "UseMutationOptions" },
409
+ { name: "QueryFunction" },
410
+ { name: "MutationFunction" },
411
+ { name: "UseQueryResult" },
412
+ { name: "DefinedUseQueryResult" },
413
+ { name: "UseSuspenseQueryResult" },
414
+ { name: "UseInfiniteQueryResult" },
415
+ { name: "DefinedUseInfiniteQueryResult" },
416
+ { name: "UseSuspenseInfiniteQueryResult" },
417
+ { name: "QueryKey" },
418
+ { name: "QueryClient" },
419
+ { name: "InfiniteData" },
420
+ { name: "UseMutationResult" },
421
+ { name: "DataTag" }
422
+ ],
423
+ dependency: "@tanstack/react-query"
424
+ }];
425
+ const getReactQueryDependencies = (hasGlobalMutator, hasParamsSerializerOptions, packageJson, httpClient, hasTagsMutator, override) => {
426
+ const hasReactQuery = packageJson?.dependencies?.["react-query"] ?? packageJson?.devDependencies?.["react-query"] ?? packageJson?.peerDependencies?.["react-query"];
427
+ const hasReactQueryV4 = packageJson?.dependencies?.["@tanstack/react-query"] ?? packageJson?.devDependencies?.["@tanstack/react-query"] ?? packageJson?.peerDependencies?.["@tanstack/react-query"];
428
+ const useReactQueryV3 = override?.query.version === void 0 ? hasReactQuery && !hasReactQueryV4 : override?.query.version <= 3;
429
+ return [
430
+ ...hasGlobalMutator || hasTagsMutator ? REACT_DEPENDENCIES : [],
431
+ ...!hasGlobalMutator && httpClient === __orval_core.OutputHttpClient.AXIOS ? AXIOS_DEPENDENCIES : [],
432
+ ...hasParamsSerializerOptions ? PARAMS_SERIALIZER_DEPENDENCIES : [],
433
+ ...useReactQueryV3 ? REACT_QUERY_DEPENDENCIES_V3 : REACT_QUERY_DEPENDENCIES
434
+ ];
2081
435
  };
2082
- var VUE_QUERY_DEPENDENCIES_V3 = [
2083
- {
2084
- exports: [
2085
- { name: "useQuery", values: true },
2086
- { name: "useInfiniteQuery", values: true },
2087
- { name: "useMutation", values: true }
2088
- ],
2089
- dependency: "vue-query"
2090
- },
2091
- {
2092
- exports: [
2093
- { name: "UseQueryOptions" },
2094
- { name: "UseInfiniteQueryOptions" },
2095
- { name: "UseMutationOptions" },
2096
- { name: "QueryFunction" },
2097
- { name: "MutationFunction" },
2098
- { name: "UseQueryResult" },
2099
- { name: "UseInfiniteQueryResult" },
2100
- { name: "QueryKey" },
2101
- { name: "UseMutationReturnType" }
2102
- ],
2103
- dependency: "vue-query/types"
2104
- },
2105
- {
2106
- exports: [
2107
- { name: "unref", values: true },
2108
- { name: "computed", values: true }
2109
- ],
2110
- dependency: "vue"
2111
- },
2112
- {
2113
- exports: [{ name: "UseQueryReturnType" }],
2114
- dependency: "vue-query/lib/vue/useBaseQuery"
2115
- }
2116
- ];
2117
- var VUE_QUERY_DEPENDENCIES = [
2118
- {
2119
- exports: [
2120
- { name: "useQuery", values: true },
2121
- { name: "useInfiniteQuery", values: true },
2122
- { name: "useMutation", values: true },
2123
- { name: "UseQueryOptions" },
2124
- { name: "UseInfiniteQueryOptions" },
2125
- { name: "UseMutationOptions" },
2126
- { name: "QueryFunction" },
2127
- { name: "MutationFunction" },
2128
- { name: "QueryKey" },
2129
- { name: "UseQueryReturnType" },
2130
- { name: "UseInfiniteQueryReturnType" },
2131
- { name: "InfiniteData" },
2132
- { name: "UseMutationReturnType" },
2133
- { name: "DataTag" },
2134
- { name: "QueryClient" }
2135
- ],
2136
- dependency: "@tanstack/vue-query"
2137
- },
2138
- {
2139
- exports: [
2140
- { name: "unref", values: true },
2141
- { name: "MaybeRef" },
2142
- { name: "computed", values: true }
2143
- ],
2144
- dependency: "vue"
2145
- }
436
+ const VUE_QUERY_DEPENDENCIES_V3 = [
437
+ {
438
+ exports: [
439
+ {
440
+ name: "useQuery",
441
+ values: true
442
+ },
443
+ {
444
+ name: "useInfiniteQuery",
445
+ values: true
446
+ },
447
+ {
448
+ name: "useMutation",
449
+ values: true
450
+ }
451
+ ],
452
+ dependency: "vue-query"
453
+ },
454
+ {
455
+ exports: [
456
+ { name: "UseQueryOptions" },
457
+ { name: "UseInfiniteQueryOptions" },
458
+ { name: "UseMutationOptions" },
459
+ { name: "QueryFunction" },
460
+ { name: "MutationFunction" },
461
+ { name: "UseQueryResult" },
462
+ { name: "UseInfiniteQueryResult" },
463
+ { name: "QueryKey" },
464
+ { name: "UseMutationReturnType" }
465
+ ],
466
+ dependency: "vue-query/types"
467
+ },
468
+ {
469
+ exports: [{
470
+ name: "unref",
471
+ values: true
472
+ }, {
473
+ name: "computed",
474
+ values: true
475
+ }],
476
+ dependency: "vue"
477
+ },
478
+ {
479
+ exports: [{ name: "UseQueryReturnType" }],
480
+ dependency: "vue-query/lib/vue/useBaseQuery"
481
+ }
2146
482
  ];
2147
- var isVueQueryV3 = (packageJson) => {
2148
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
2149
- const hasVueQuery = (_e = (_c = (_a = packageJson == null ? void 0 : packageJson.dependencies) == null ? void 0 : _a["vue-query"]) != null ? _c : (_b = packageJson == null ? void 0 : packageJson.devDependencies) == null ? void 0 : _b["vue-query"]) != null ? _e : (_d = packageJson == null ? void 0 : packageJson.peerDependencies) == null ? void 0 : _d["vue-query"];
2150
- const hasVueQueryV4 = (_j = (_h = (_f = packageJson == null ? void 0 : packageJson.dependencies) == null ? void 0 : _f["@tanstack/vue-query"]) != null ? _h : (_g = packageJson == null ? void 0 : packageJson.devDependencies) == null ? void 0 : _g["@tanstack/vue-query"]) != null ? _j : (_i = packageJson == null ? void 0 : packageJson.peerDependencies) == null ? void 0 : _i["@tanstack/vue-query"];
2151
- return !!hasVueQuery && !hasVueQueryV4;
483
+ const VUE_QUERY_DEPENDENCIES = [{
484
+ exports: [
485
+ {
486
+ name: "useQuery",
487
+ values: true
488
+ },
489
+ {
490
+ name: "useInfiniteQuery",
491
+ values: true
492
+ },
493
+ {
494
+ name: "useMutation",
495
+ values: true
496
+ },
497
+ { name: "UseQueryOptions" },
498
+ { name: "UseInfiniteQueryOptions" },
499
+ { name: "UseMutationOptions" },
500
+ { name: "QueryFunction" },
501
+ { name: "MutationFunction" },
502
+ { name: "QueryKey" },
503
+ { name: "UseQueryReturnType" },
504
+ { name: "UseInfiniteQueryReturnType" },
505
+ { name: "InfiniteData" },
506
+ { name: "UseMutationReturnType" },
507
+ { name: "DataTag" },
508
+ { name: "QueryClient" }
509
+ ],
510
+ dependency: "@tanstack/vue-query"
511
+ }, {
512
+ exports: [
513
+ {
514
+ name: "unref",
515
+ values: true
516
+ },
517
+ { name: "MaybeRef" },
518
+ {
519
+ name: "computed",
520
+ values: true
521
+ }
522
+ ],
523
+ dependency: "vue"
524
+ }];
525
+ const isVueQueryV3 = (packageJson) => {
526
+ const hasVueQuery = packageJson?.dependencies?.["vue-query"] ?? packageJson?.devDependencies?.["vue-query"] ?? packageJson?.peerDependencies?.["vue-query"];
527
+ const hasVueQueryV4 = packageJson?.dependencies?.["@tanstack/vue-query"] ?? packageJson?.devDependencies?.["@tanstack/vue-query"] ?? packageJson?.peerDependencies?.["@tanstack/vue-query"];
528
+ return !!hasVueQuery && !hasVueQueryV4;
2152
529
  };
2153
- var getVueQueryDependencies = (hasGlobalMutator, hasParamsSerializerOptions, packageJson, httpClient) => {
2154
- const hasVueQueryV3 = isVueQueryV3(packageJson);
2155
- return [
2156
- ...!hasGlobalMutator && httpClient === import_core3.OutputHttpClient.AXIOS ? AXIOS_DEPENDENCIES : [],
2157
- ...hasParamsSerializerOptions ? PARAMS_SERIALIZER_DEPENDENCIES : [],
2158
- ...hasVueQueryV3 ? VUE_QUERY_DEPENDENCIES_V3 : VUE_QUERY_DEPENDENCIES
2159
- ];
530
+ const getVueQueryDependencies = (hasGlobalMutator, hasParamsSerializerOptions, packageJson, httpClient) => {
531
+ const hasVueQueryV3 = isVueQueryV3(packageJson);
532
+ return [
533
+ ...!hasGlobalMutator && httpClient === __orval_core.OutputHttpClient.AXIOS ? AXIOS_DEPENDENCIES : [],
534
+ ...hasParamsSerializerOptions ? PARAMS_SERIALIZER_DEPENDENCIES : [],
535
+ ...hasVueQueryV3 ? VUE_QUERY_DEPENDENCIES_V3 : VUE_QUERY_DEPENDENCIES
536
+ ];
2160
537
  };
2161
- var isQueryV5 = (packageJson, queryClient) => {
2162
- const version = getPackageByQueryClient(packageJson, queryClient);
2163
- if (!version) {
2164
- return false;
2165
- }
2166
- const withoutRc = version.split("-")[0];
2167
- return (0, import_core3.compareVersions)(withoutRc, "5.0.0");
538
+ const isQueryV5 = (packageJson, queryClient) => {
539
+ const version = getPackageByQueryClient(packageJson, queryClient);
540
+ if (!version) return false;
541
+ const withoutRc = version.split("-")[0];
542
+ return (0, __orval_core.compareVersions)(withoutRc, "5.0.0");
2168
543
  };
2169
- var isQueryV5WithDataTagError = (packageJson, queryClient) => {
2170
- const version = getPackageByQueryClient(packageJson, queryClient);
2171
- if (!version) {
2172
- return false;
2173
- }
2174
- const withoutRc = version.split("-")[0];
2175
- return (0, import_core3.compareVersions)(withoutRc, "5.62.0");
544
+ const isQueryV5WithDataTagError = (packageJson, queryClient) => {
545
+ const version = getPackageByQueryClient(packageJson, queryClient);
546
+ if (!version) return false;
547
+ const withoutRc = version.split("-")[0];
548
+ return (0, __orval_core.compareVersions)(withoutRc, "5.62.0");
2176
549
  };
2177
- var isQueryV5WithInfiniteQueryOptionsError = (packageJson, queryClient) => {
2178
- const version = getPackageByQueryClient(packageJson, queryClient);
2179
- if (!version) {
2180
- return false;
2181
- }
2182
- const withoutRc = version.split("-")[0];
2183
- return (0, import_core3.compareVersions)(withoutRc, "5.80.0");
550
+ const isQueryV5WithInfiniteQueryOptionsError = (packageJson, queryClient) => {
551
+ const version = getPackageByQueryClient(packageJson, queryClient);
552
+ if (!version) return false;
553
+ const withoutRc = version.split("-")[0];
554
+ return (0, __orval_core.compareVersions)(withoutRc, "5.80.0");
2184
555
  };
2185
- var getPackageByQueryClient = (packageJson, queryClient) => {
2186
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
2187
- switch (queryClient) {
2188
- case "react-query": {
2189
- return (_e = (_c = (_a = packageJson == null ? void 0 : packageJson.dependencies) == null ? void 0 : _a["@tanstack/react-query"]) != null ? _c : (_b = packageJson == null ? void 0 : packageJson.devDependencies) == null ? void 0 : _b["@tanstack/react-query"]) != null ? _e : (_d = packageJson == null ? void 0 : packageJson.peerDependencies) == null ? void 0 : _d["@tanstack/react-query"];
2190
- }
2191
- case "svelte-query": {
2192
- return (_j = (_h = (_f = packageJson == null ? void 0 : packageJson.dependencies) == null ? void 0 : _f["@tanstack/svelte-query"]) != null ? _h : (_g = packageJson == null ? void 0 : packageJson.devDependencies) == null ? void 0 : _g["@tanstack/svelte-query"]) != null ? _j : (_i = packageJson == null ? void 0 : packageJson.peerDependencies) == null ? void 0 : _i["@tanstack/svelte-query"];
2193
- }
2194
- case "vue-query": {
2195
- return (_o = (_m = (_k = packageJson == null ? void 0 : packageJson.dependencies) == null ? void 0 : _k["@tanstack/vue-query"]) != null ? _m : (_l = packageJson == null ? void 0 : packageJson.devDependencies) == null ? void 0 : _l["@tanstack/vue-query"]) != null ? _o : (_n = packageJson == null ? void 0 : packageJson.peerDependencies) == null ? void 0 : _n["@tanstack/vue-query"];
2196
- }
2197
- }
556
+ const getPackageByQueryClient = (packageJson, queryClient) => {
557
+ switch (queryClient) {
558
+ case "react-query": return packageJson?.dependencies?.["@tanstack/react-query"] ?? packageJson?.devDependencies?.["@tanstack/react-query"] ?? packageJson?.peerDependencies?.["@tanstack/react-query"];
559
+ case "svelte-query": return packageJson?.dependencies?.["@tanstack/svelte-query"] ?? packageJson?.devDependencies?.["@tanstack/svelte-query"] ?? packageJson?.peerDependencies?.["@tanstack/svelte-query"];
560
+ case "vue-query": return packageJson?.dependencies?.["@tanstack/vue-query"] ?? packageJson?.devDependencies?.["@tanstack/vue-query"] ?? packageJson?.peerDependencies?.["@tanstack/vue-query"];
561
+ }
2198
562
  };
2199
- var QueryType = {
2200
- INFINITE: "infiniteQuery",
2201
- QUERY: "query",
2202
- SUSPENSE_QUERY: "suspenseQuery",
2203
- SUSPENSE_INFINITE: "suspenseInfiniteQuery"
563
+ const QueryType = {
564
+ INFINITE: "infiniteQuery",
565
+ QUERY: "query",
566
+ SUSPENSE_QUERY: "suspenseQuery",
567
+ SUSPENSE_INFINITE: "suspenseInfiniteQuery"
2204
568
  };
2205
- var INFINITE_QUERY_PROPERTIES = ["getNextPageParam", "getPreviousPageParam"];
2206
- var generateQueryOptions = ({
2207
- params,
2208
- options,
2209
- type,
2210
- outputClient
2211
- }) => {
2212
- var _a;
2213
- if (options === false) {
2214
- return "";
2215
- }
2216
- const queryConfig = (0, import_core3.isObject)(options) ? ` ${(_a = (0, import_core3.stringify)(
2217
- (0, import_lodash.default)(
2218
- options,
2219
- (_, key) => (type !== QueryType.INFINITE || type !== QueryType.SUSPENSE_INFINITE) && INFINITE_QUERY_PROPERTIES.includes(key)
2220
- )
2221
- )) == null ? void 0 : _a.slice(1, -1)}` : "";
2222
- if (!params.length || isSuspenseQuery(type)) {
2223
- if (options) {
2224
- return `${queryConfig} ...queryOptions`;
2225
- }
2226
- return "...queryOptions";
2227
- }
2228
- return `${!(0, import_core3.isObject)(options) || !options.hasOwnProperty("enabled") ? isVue(outputClient) ? `enabled: computed(() => !!(${params.map(({ name }) => `unref(${name})`).join(" && ")})),` : `enabled: !!(${params.map(({ name }) => name).join(" && ")}),` : ""}${queryConfig} ...queryOptions`;
569
+ const INFINITE_QUERY_PROPERTIES = new Set(["getNextPageParam", "getPreviousPageParam"]);
570
+ const generateQueryOptions = ({ params, options, type, outputClient }) => {
571
+ if (options === false) return "";
572
+ const queryConfig = (0, __orval_core.isObject)(options) ? ` ${(0, __orval_core.stringify)((0, lodash_omitby.default)(options, (_, key) => (type !== QueryType.INFINITE || type !== QueryType.SUSPENSE_INFINITE) && INFINITE_QUERY_PROPERTIES.has(key)))?.slice(1, -1)}` : "";
573
+ if (params.length === 0 || isSuspenseQuery(type)) {
574
+ if (options) return `${queryConfig} ...queryOptions`;
575
+ return "...queryOptions";
576
+ }
577
+ return `${!(0, __orval_core.isObject)(options) || !options.hasOwnProperty("enabled") ? isVue(outputClient) ? `enabled: computed(() => !!(${params.map(({ name }) => `unref(${name})`).join(" && ")})),` : `enabled: !!(${params.map(({ name }) => name).join(" && ")}),` : ""}${queryConfig} ...queryOptions`;
2229
578
  };
2230
- var isSuspenseQuery = (type) => {
2231
- return [QueryType.SUSPENSE_INFINITE, QueryType.SUSPENSE_QUERY].includes(type);
579
+ const isSuspenseQuery = (type) => {
580
+ return [QueryType.SUSPENSE_INFINITE, QueryType.SUSPENSE_QUERY].includes(type);
2232
581
  };
2233
- var getQueryOptionsDefinition = ({
2234
- operationName,
2235
- mutator,
2236
- definitions,
2237
- type,
2238
- hasSvelteQueryV4,
2239
- hasQueryV5,
2240
- hasQueryV5WithInfiniteQueryOptionsError,
2241
- queryParams,
2242
- queryParam,
2243
- isReturnType,
2244
- initialData
2245
- }) => {
2246
- const isMutatorHook = mutator == null ? void 0 : mutator.isHook;
2247
- const prefix = !hasSvelteQueryV4 ? "Use" : "Create";
2248
- const partialOptions = !isReturnType && hasQueryV5;
2249
- if (type) {
2250
- const funcReturnType = `Awaited<ReturnType<${isMutatorHook ? `ReturnType<typeof use${(0, import_core3.pascal)(operationName)}Hook>` : `typeof ${operationName}`}>>`;
2251
- const optionTypeInitialDataPostfix = initialData && !isSuspenseQuery(type) ? ` & Pick<
2252
- ${(0, import_core3.pascal)(initialData)}InitialDataOptions<
582
+ const getQueryOptionsDefinition = ({ operationName, mutator, definitions, type, hasSvelteQueryV4, hasQueryV5, hasQueryV5WithInfiniteQueryOptionsError, queryParams, queryParam, isReturnType, initialData }) => {
583
+ const isMutatorHook = mutator?.isHook;
584
+ const prefix = hasSvelteQueryV4 ? "Create" : "Use";
585
+ const partialOptions = !isReturnType && hasQueryV5;
586
+ if (type) {
587
+ const funcReturnType = `Awaited<ReturnType<${isMutatorHook ? `ReturnType<typeof use${(0, __orval_core.pascal)(operationName)}Hook>` : `typeof ${operationName}`}>>`;
588
+ const optionTypeInitialDataPostfix = initialData && !isSuspenseQuery(type) ? ` & Pick<
589
+ ${(0, __orval_core.pascal)(initialData)}InitialDataOptions<
2253
590
  ${funcReturnType},
2254
591
  TError,
2255
592
  ${funcReturnType}${hasQueryV5 && (type === QueryType.INFINITE || type === QueryType.SUSPENSE_INFINITE) && queryParam && queryParams ? `, QueryKey` : ""}
2256
593
  > , 'initialData'
2257
594
  >` : "";
2258
- const optionType = `${prefix}${(0, import_core3.pascal)(type)}Options<${funcReturnType}, TError, TData${hasQueryV5 && (type === QueryType.INFINITE || type === QueryType.SUSPENSE_INFINITE) && queryParam && queryParams ? hasQueryV5WithInfiniteQueryOptionsError ? `, QueryKey, ${queryParams == null ? void 0 : queryParams.schema.name}['${queryParam}']` : `, ${funcReturnType}, QueryKey, ${queryParams == null ? void 0 : queryParams.schema.name}['${queryParam}']` : ""}>`;
2259
- return `${partialOptions ? "Partial<" : ""}${optionType}${partialOptions ? ">" : ""}${optionTypeInitialDataPostfix}`;
2260
- }
2261
- return `${prefix}MutationOptions<Awaited<ReturnType<${isMutatorHook ? `ReturnType<typeof use${(0, import_core3.pascal)(operationName)}Hook>` : `typeof ${operationName}`}>>, TError,${definitions ? `{${definitions}}` : "void"}, TContext>`;
595
+ const optionType = `${prefix}${(0, __orval_core.pascal)(type)}Options<${funcReturnType}, TError, TData${hasQueryV5 && (type === QueryType.INFINITE || type === QueryType.SUSPENSE_INFINITE) && queryParam && queryParams ? hasQueryV5WithInfiniteQueryOptionsError ? `, QueryKey, ${queryParams?.schema.name}['${queryParam}']` : `, ${funcReturnType}, QueryKey, ${queryParams?.schema.name}['${queryParam}']` : ""}>`;
596
+ return `${partialOptions ? "Partial<" : ""}${optionType}${partialOptions ? ">" : ""}${optionTypeInitialDataPostfix}`;
597
+ }
598
+ return `${prefix}MutationOptions<Awaited<ReturnType<${isMutatorHook ? `ReturnType<typeof use${(0, __orval_core.pascal)(operationName)}Hook>` : `typeof ${operationName}`}>>, TError,${definitions ? `{${definitions}}` : "void"}, TContext>`;
2262
599
  };
2263
- var generateQueryArguments = ({
2264
- operationName,
2265
- definitions,
2266
- mutator,
2267
- isRequestOptions,
2268
- type,
2269
- hasSvelteQueryV4,
2270
- hasQueryV5,
2271
- hasQueryV5WithInfiniteQueryOptionsError,
2272
- queryParams,
2273
- queryParam,
2274
- initialData,
2275
- httpClient
2276
- }) => {
2277
- const definition = getQueryOptionsDefinition({
2278
- operationName,
2279
- mutator,
2280
- definitions,
2281
- type,
2282
- hasSvelteQueryV4,
2283
- hasQueryV5,
2284
- hasQueryV5WithInfiniteQueryOptionsError,
2285
- queryParams,
2286
- queryParam,
2287
- isReturnType: false,
2288
- initialData
2289
- });
2290
- if (!isRequestOptions) {
2291
- return `${type ? "queryOptions" : "mutationOptions"}${initialData !== "defined" ? "?" : ""}: ${definition}`;
2292
- }
2293
- const requestType = getQueryArgumentsRequestType(httpClient, mutator);
2294
- const isQueryRequired = initialData === "defined";
2295
- return `options${isQueryRequired ? "" : "?"}: { ${type ? "query" : "mutation"}${isQueryRequired ? "" : "?"}:${definition}, ${requestType}}
2296
- `;
600
+ const generateQueryArguments = ({ operationName, definitions, mutator, isRequestOptions, type, hasSvelteQueryV4, hasQueryV5, hasQueryV5WithInfiniteQueryOptionsError, queryParams, queryParam, initialData, httpClient }) => {
601
+ const definition = getQueryOptionsDefinition({
602
+ operationName,
603
+ mutator,
604
+ definitions,
605
+ type,
606
+ hasSvelteQueryV4,
607
+ hasQueryV5,
608
+ hasQueryV5WithInfiniteQueryOptionsError,
609
+ queryParams,
610
+ queryParam,
611
+ isReturnType: false,
612
+ initialData
613
+ });
614
+ if (!isRequestOptions) return `${type ? "queryOptions" : "mutationOptions"}${initialData === "defined" ? "" : "?"}: ${definition}`;
615
+ const requestType = getQueryArgumentsRequestType(httpClient, mutator);
616
+ const isQueryRequired = initialData === "defined";
617
+ return `options${isQueryRequired ? "" : "?"}: { ${type ? "query" : "mutation"}${isQueryRequired ? "" : "?"}:${definition}, ${requestType}}\n`;
2297
618
  };
2298
- var generateQueryReturnType = ({
2299
- outputClient,
2300
- type,
2301
- isMutatorHook,
2302
- operationName,
2303
- hasVueQueryV4,
2304
- hasSvelteQueryV4,
2305
- hasQueryV5,
2306
- hasQueryV5WithDataTagError,
2307
- isInitialDataDefined
2308
- }) => {
2309
- switch (outputClient) {
2310
- case import_core3.OutputClient.SVELTE_QUERY: {
2311
- if (!hasSvelteQueryV4) {
2312
- return `Use${(0, import_core3.pascal)(type)}StoreResult<Awaited<ReturnType<${isMutatorHook ? `ReturnType<typeof use${(0, import_core3.pascal)(operationName)}Hook>` : `typeof ${operationName}`}>>, TError, TData, QueryKey> & { queryKey: QueryKey} }`;
2313
- }
2314
- return `Create${(0, import_core3.pascal)(
2315
- type
2316
- )}Result<TData, TError> & { queryKey: ${hasQueryV5 ? `DataTag<QueryKey, TData${hasQueryV5WithDataTagError ? ", TError" : ""}>` : "QueryKey"} }`;
2317
- }
2318
- case import_core3.OutputClient.VUE_QUERY: {
2319
- if (!hasVueQueryV4) {
2320
- return ` UseQueryReturnType<TData, TError, Use${(0, import_core3.pascal)(
2321
- type
2322
- )}Result<TData, TError>> & { queryKey: QueryKey} }`;
2323
- }
2324
- if (type !== QueryType.INFINITE && type !== QueryType.SUSPENSE_INFINITE) {
2325
- return `UseQueryReturnType<TData, TError> & { queryKey: ${hasQueryV5 ? `DataTag<QueryKey, TData${hasQueryV5WithDataTagError ? ", TError" : ""}>` : "QueryKey"} }`;
2326
- }
2327
- return `UseInfiniteQueryReturnType<TData, TError> & { queryKey: ${hasQueryV5 ? `DataTag<QueryKey, TData${hasQueryV5WithDataTagError ? ", TError" : ""}>` : "QueryKey"} }`;
2328
- }
2329
- case import_core3.OutputClient.REACT_QUERY:
2330
- default: {
2331
- return ` ${isInitialDataDefined && !isSuspenseQuery(type) ? "Defined" : ""}Use${(0, import_core3.pascal)(type)}Result<TData, TError> & { queryKey: ${hasQueryV5 ? `DataTag<QueryKey, TData${hasQueryV5WithDataTagError ? ", TError" : ""}>` : "QueryKey"} }`;
2332
- }
2333
- }
619
+ const generateQueryReturnType = ({ outputClient, type, isMutatorHook, operationName, hasVueQueryV4, hasSvelteQueryV4, hasQueryV5, hasQueryV5WithDataTagError, isInitialDataDefined }) => {
620
+ switch (outputClient) {
621
+ case __orval_core.OutputClient.SVELTE_QUERY:
622
+ if (!hasSvelteQueryV4) return `Use${(0, __orval_core.pascal)(type)}StoreResult<Awaited<ReturnType<${isMutatorHook ? `ReturnType<typeof use${(0, __orval_core.pascal)(operationName)}Hook>` : `typeof ${operationName}`}>>, TError, TData, QueryKey> & { queryKey: QueryKey} }`;
623
+ return `Create${(0, __orval_core.pascal)(type)}Result<TData, TError> & { queryKey: ${hasQueryV5 ? `DataTag<QueryKey, TData${hasQueryV5WithDataTagError ? ", TError" : ""}>` : "QueryKey"} }`;
624
+ case __orval_core.OutputClient.VUE_QUERY:
625
+ if (!hasVueQueryV4) return ` UseQueryReturnType<TData, TError, Use${(0, __orval_core.pascal)(type)}Result<TData, TError>> & { queryKey: QueryKey} }`;
626
+ if (type !== QueryType.INFINITE && type !== QueryType.SUSPENSE_INFINITE) return `UseQueryReturnType<TData, TError> & { queryKey: ${hasQueryV5 ? `DataTag<QueryKey, TData${hasQueryV5WithDataTagError ? ", TError" : ""}>` : "QueryKey"} }`;
627
+ return `UseInfiniteQueryReturnType<TData, TError> & { queryKey: ${hasQueryV5 ? `DataTag<QueryKey, TData${hasQueryV5WithDataTagError ? ", TError" : ""}>` : "QueryKey"} }`;
628
+ case __orval_core.OutputClient.REACT_QUERY:
629
+ default: return ` ${isInitialDataDefined && !isSuspenseQuery(type) ? "Defined" : ""}Use${(0, __orval_core.pascal)(type)}Result<TData, TError> & { queryKey: ${hasQueryV5 ? `DataTag<QueryKey, TData${hasQueryV5WithDataTagError ? ", TError" : ""}>` : "QueryKey"} }`;
630
+ }
2334
631
  };
2335
- var generateMutatorReturnType = ({
2336
- outputClient,
2337
- dataType,
2338
- variableType
2339
- }) => {
2340
- if (outputClient === import_core3.OutputClient.REACT_QUERY) {
2341
- return `: UseMutationResult<
632
+ const generateMutatorReturnType = ({ outputClient, dataType, variableType }) => {
633
+ if (outputClient === __orval_core.OutputClient.REACT_QUERY) return `: UseMutationResult<
2342
634
  Awaited<ReturnType<${dataType}>>,
2343
635
  TError,
2344
636
  ${variableType},
2345
637
  TContext
2346
638
  >`;
2347
- }
2348
- if (outputClient === import_core3.OutputClient.SVELTE_QUERY) {
2349
- return `: CreateMutationResult<
639
+ if (outputClient === __orval_core.OutputClient.SVELTE_QUERY) return `: CreateMutationResult<
2350
640
  Awaited<ReturnType<${dataType}>>,
2351
641
  TError,
2352
642
  ${variableType},
2353
643
  TContext
2354
644
  >`;
2355
- }
2356
- if (outputClient === import_core3.OutputClient.VUE_QUERY) {
2357
- return `: UseMutationReturnType<
645
+ if (outputClient === __orval_core.OutputClient.VUE_QUERY) return `: UseMutationReturnType<
2358
646
  Awaited<ReturnType<${dataType}>>,
2359
647
  TError,
2360
648
  ${variableType},
2361
649
  TContext
2362
650
  >`;
2363
- }
2364
- return "";
651
+ return "";
2365
652
  };
2366
- var getQueryFnArguments = ({
2367
- hasQueryParam,
2368
- hasSignal
2369
- }) => {
2370
- if (!hasQueryParam && !hasSignal) {
2371
- return "";
2372
- }
2373
- if (hasQueryParam) {
2374
- if (hasSignal) {
2375
- return "{ signal, pageParam }";
2376
- }
2377
- return "{ pageParam }";
2378
- }
2379
- return "{ signal }";
653
+ const getQueryFnArguments = ({ hasQueryParam, hasSignal }) => {
654
+ if (!hasQueryParam && !hasSignal) return "";
655
+ if (hasQueryParam) {
656
+ if (hasSignal) return "{ signal, pageParam }";
657
+ return "{ pageParam }";
658
+ }
659
+ return "{ signal }";
2380
660
  };
2381
- var generateQueryImplementation = ({
2382
- queryOption: { name, queryParam, options, type },
2383
- operationName,
2384
- queryKeyFnName,
2385
- queryProperties,
2386
- queryKeyProperties,
2387
- queryParams,
2388
- params,
2389
- props,
2390
- mutator,
2391
- queryOptionsMutator,
2392
- queryKeyMutator,
2393
- isRequestOptions,
2394
- response,
2395
- outputClient,
2396
- httpClient,
2397
- isExactOptionalPropertyTypes,
2398
- hasSignal,
2399
- route,
2400
- hasVueQueryV4,
2401
- hasSvelteQueryV4,
2402
- hasQueryV5,
2403
- hasQueryV5WithDataTagError,
2404
- hasQueryV5WithInfiniteQueryOptionsError,
2405
- doc,
2406
- usePrefetch,
2407
- useQuery,
2408
- useInfinite
2409
- }) => {
2410
- const queryPropDefinitions = (0, import_core3.toObjectString)(props, "definition");
2411
- const definedInitialDataQueryPropsDefinitions = (0, import_core3.toObjectString)(
2412
- props.map((prop) => {
2413
- const regex = new RegExp(`^${prop.name}\\s*\\?:`);
2414
- if (!regex.test(prop.definition)) {
2415
- return prop;
2416
- }
2417
- const definitionWithUndefined = prop.definition.replace(
2418
- regex,
2419
- `${prop.name}: undefined | `
2420
- );
2421
- return {
2422
- ...prop,
2423
- definition: definitionWithUndefined
2424
- };
2425
- }),
2426
- "definition"
2427
- );
2428
- const queryProps = (0, import_core3.toObjectString)(props, "implementation");
2429
- const hasInfiniteQueryParam = queryParam && (queryParams == null ? void 0 : queryParams.schema.name);
2430
- const httpFunctionProps = queryParam ? props.map((param) => {
2431
- if (param.type === import_core3.GetterPropType.NAMED_PATH_PARAMS && !isVue(outputClient))
2432
- return param.destructured;
2433
- return param.name === "params" ? `{...${isVue(outputClient) ? `unref(params)` : "params"}, '${queryParam}': pageParam || ${isVue(outputClient) ? `unref(params)?.['${queryParam}']` : `params?.['${queryParam}']`}}` : param.name;
2434
- }).join(",") : getHttpFunctionQueryProps(
2435
- isVue(outputClient),
2436
- httpClient,
2437
- queryProperties
2438
- );
2439
- const definedInitialDataReturnType = generateQueryReturnType({
2440
- outputClient,
2441
- type,
2442
- isMutatorHook: mutator == null ? void 0 : mutator.isHook,
2443
- operationName,
2444
- hasVueQueryV4,
2445
- hasSvelteQueryV4,
2446
- hasQueryV5,
2447
- hasQueryV5WithDataTagError,
2448
- isInitialDataDefined: true
2449
- });
2450
- const returnType = generateQueryReturnType({
2451
- outputClient,
2452
- type,
2453
- isMutatorHook: mutator == null ? void 0 : mutator.isHook,
2454
- operationName,
2455
- hasVueQueryV4,
2456
- hasSvelteQueryV4,
2457
- hasQueryV5,
2458
- hasQueryV5WithDataTagError
2459
- });
2460
- const errorType = getQueryErrorType(
2461
- operationName,
2462
- response,
2463
- httpClient,
2464
- mutator
2465
- );
2466
- const dataType = (mutator == null ? void 0 : mutator.isHook) ? `ReturnType<typeof use${(0, import_core3.pascal)(operationName)}Hook>` : `typeof ${operationName}`;
2467
- const definedInitialDataQueryArguments = generateQueryArguments({
2468
- operationName,
2469
- mutator,
2470
- definitions: "",
2471
- isRequestOptions,
2472
- type,
2473
- hasSvelteQueryV4,
2474
- hasQueryV5,
2475
- hasQueryV5WithInfiniteQueryOptionsError,
2476
- queryParams,
2477
- queryParam,
2478
- initialData: "defined",
2479
- httpClient
2480
- });
2481
- const undefinedInitialDataQueryArguments = generateQueryArguments({
2482
- operationName,
2483
- definitions: "",
2484
- mutator,
2485
- isRequestOptions,
2486
- type,
2487
- hasSvelteQueryV4,
2488
- hasQueryV5,
2489
- hasQueryV5WithInfiniteQueryOptionsError,
2490
- queryParams,
2491
- queryParam,
2492
- initialData: "undefined",
2493
- httpClient
2494
- });
2495
- const queryArguments = generateQueryArguments({
2496
- operationName,
2497
- definitions: "",
2498
- mutator,
2499
- isRequestOptions,
2500
- type,
2501
- hasSvelteQueryV4,
2502
- hasQueryV5,
2503
- hasQueryV5WithInfiniteQueryOptionsError,
2504
- queryParams,
2505
- queryParam,
2506
- httpClient
2507
- });
2508
- const queryOptions = getQueryOptions({
2509
- isRequestOptions,
2510
- isExactOptionalPropertyTypes,
2511
- mutator,
2512
- hasSignal,
2513
- httpClient
2514
- });
2515
- const hookOptions = getHookOptions({
2516
- isRequestOptions,
2517
- httpClient,
2518
- mutator
2519
- });
2520
- const queryFnArguments = getQueryFnArguments({
2521
- hasQueryParam: !!queryParam && props.some(({ type: type2 }) => type2 === "queryParam"),
2522
- hasSignal
2523
- });
2524
- const queryOptionFnReturnType = getQueryOptionsDefinition({
2525
- operationName,
2526
- mutator,
2527
- definitions: "",
2528
- type,
2529
- hasSvelteQueryV4,
2530
- hasQueryV5,
2531
- hasQueryV5WithInfiniteQueryOptionsError,
2532
- queryParams,
2533
- queryParam,
2534
- isReturnType: true
2535
- });
2536
- const queryOptionsImp = generateQueryOptions({
2537
- params,
2538
- options,
2539
- type,
2540
- outputClient
2541
- });
2542
- const queryOptionsFnName = (0, import_core3.camel)(
2543
- queryKeyMutator || queryOptionsMutator || (mutator == null ? void 0 : mutator.isHook) ? `use-${name}-queryOptions` : `get-${name}-queryOptions`
2544
- );
2545
- const queryOptionsVarName = isRequestOptions ? "queryOptions" : "options";
2546
- const hasParamReservedWord = props.some(
2547
- (prop) => prop.name === "query"
2548
- );
2549
- const queryResultVarName = hasParamReservedWord ? "_query" : "query";
2550
- const infiniteParam = queryParams && queryParam ? `, ${queryParams == null ? void 0 : queryParams.schema.name}['${queryParam}']` : "";
2551
- const TData = hasQueryV5 && (type === QueryType.INFINITE || type === QueryType.SUSPENSE_INFINITE) ? `InfiniteData<Awaited<ReturnType<${dataType}>>${infiniteParam}>` : `Awaited<ReturnType<${dataType}>>`;
2552
- const queryOptionsFn = `export const ${queryOptionsFnName} = <TData = ${TData}, TError = ${errorType}>(${queryProps} ${queryArguments}) => {
661
+ const generateQueryImplementation = ({ queryOption: { name, queryParam, options, type }, operationName, queryKeyFnName, queryProperties, queryKeyProperties, queryParams, params, props, mutator, queryOptionsMutator, queryKeyMutator, isRequestOptions, response, outputClient, httpClient, isExactOptionalPropertyTypes, hasSignal, route, hasVueQueryV4, hasSvelteQueryV4, hasQueryV5, hasQueryV5WithDataTagError, hasQueryV5WithInfiniteQueryOptionsError, doc, usePrefetch, useQuery, useInfinite }) => {
662
+ const queryPropDefinitions = (0, __orval_core.toObjectString)(props, "definition");
663
+ const definedInitialDataQueryPropsDefinitions = (0, __orval_core.toObjectString)(props.map((prop) => {
664
+ const regex = /* @__PURE__ */ new RegExp(`^${prop.name}\\s*\\?:`);
665
+ if (!regex.test(prop.definition)) return prop;
666
+ const definitionWithUndefined = prop.definition.replace(regex, `${prop.name}: undefined | `);
667
+ return {
668
+ ...prop,
669
+ definition: definitionWithUndefined
670
+ };
671
+ }), "definition");
672
+ const queryProps = (0, __orval_core.toObjectString)(props, "implementation");
673
+ const hasInfiniteQueryParam = queryParam && queryParams?.schema.name;
674
+ const httpFunctionProps = queryParam ? props.map((param) => {
675
+ if (param.type === __orval_core.GetterPropType.NAMED_PATH_PARAMS && !isVue(outputClient)) return param.destructured;
676
+ return param.name === "params" ? `{...${isVue(outputClient) ? `unref(params)` : "params"}, '${queryParam}': pageParam || ${isVue(outputClient) ? `unref(params)?.['${queryParam}']` : `params?.['${queryParam}']`}}` : param.name;
677
+ }).join(",") : getHttpFunctionQueryProps(isVue(outputClient), httpClient, queryProperties);
678
+ const definedInitialDataReturnType = generateQueryReturnType({
679
+ outputClient,
680
+ type,
681
+ isMutatorHook: mutator?.isHook,
682
+ operationName,
683
+ hasVueQueryV4,
684
+ hasSvelteQueryV4,
685
+ hasQueryV5,
686
+ hasQueryV5WithDataTagError,
687
+ isInitialDataDefined: true
688
+ });
689
+ const returnType = generateQueryReturnType({
690
+ outputClient,
691
+ type,
692
+ isMutatorHook: mutator?.isHook,
693
+ operationName,
694
+ hasVueQueryV4,
695
+ hasSvelteQueryV4,
696
+ hasQueryV5,
697
+ hasQueryV5WithDataTagError
698
+ });
699
+ const errorType = getQueryErrorType(operationName, response, httpClient, mutator);
700
+ const dataType = mutator?.isHook ? `ReturnType<typeof use${(0, __orval_core.pascal)(operationName)}Hook>` : `typeof ${operationName}`;
701
+ const definedInitialDataQueryArguments = generateQueryArguments({
702
+ operationName,
703
+ mutator,
704
+ definitions: "",
705
+ isRequestOptions,
706
+ type,
707
+ hasSvelteQueryV4,
708
+ hasQueryV5,
709
+ hasQueryV5WithInfiniteQueryOptionsError,
710
+ queryParams,
711
+ queryParam,
712
+ initialData: "defined",
713
+ httpClient
714
+ });
715
+ const undefinedInitialDataQueryArguments = generateQueryArguments({
716
+ operationName,
717
+ definitions: "",
718
+ mutator,
719
+ isRequestOptions,
720
+ type,
721
+ hasSvelteQueryV4,
722
+ hasQueryV5,
723
+ hasQueryV5WithInfiniteQueryOptionsError,
724
+ queryParams,
725
+ queryParam,
726
+ initialData: "undefined",
727
+ httpClient
728
+ });
729
+ const queryArguments = generateQueryArguments({
730
+ operationName,
731
+ definitions: "",
732
+ mutator,
733
+ isRequestOptions,
734
+ type,
735
+ hasSvelteQueryV4,
736
+ hasQueryV5,
737
+ hasQueryV5WithInfiniteQueryOptionsError,
738
+ queryParams,
739
+ queryParam,
740
+ httpClient
741
+ });
742
+ const queryOptions = getQueryOptions({
743
+ isRequestOptions,
744
+ isExactOptionalPropertyTypes,
745
+ mutator,
746
+ hasSignal,
747
+ httpClient
748
+ });
749
+ const hookOptions = getHookOptions({
750
+ isRequestOptions,
751
+ httpClient,
752
+ mutator
753
+ });
754
+ const queryFnArguments = getQueryFnArguments({
755
+ hasQueryParam: !!queryParam && props.some(({ type: type$1 }) => type$1 === "queryParam"),
756
+ hasSignal
757
+ });
758
+ const queryOptionFnReturnType = getQueryOptionsDefinition({
759
+ operationName,
760
+ mutator,
761
+ definitions: "",
762
+ type,
763
+ hasSvelteQueryV4,
764
+ hasQueryV5,
765
+ hasQueryV5WithInfiniteQueryOptionsError,
766
+ queryParams,
767
+ queryParam,
768
+ isReturnType: true
769
+ });
770
+ const queryOptionsImp = generateQueryOptions({
771
+ params,
772
+ options,
773
+ type,
774
+ outputClient
775
+ });
776
+ const queryOptionsFnName = (0, __orval_core.camel)(queryKeyMutator || queryOptionsMutator || mutator?.isHook ? `use-${name}-queryOptions` : `get-${name}-queryOptions`);
777
+ const queryOptionsVarName = isRequestOptions ? "queryOptions" : "options";
778
+ const queryResultVarName = props.some((prop) => prop.name === "query") ? "_query" : "query";
779
+ const infiniteParam = queryParams && queryParam ? `, ${queryParams?.schema.name}['${queryParam}']` : "";
780
+ const TData = hasQueryV5 && (type === QueryType.INFINITE || type === QueryType.SUSPENSE_INFINITE) ? `InfiniteData<Awaited<ReturnType<${dataType}>>${infiniteParam}>` : `Awaited<ReturnType<${dataType}>>`;
781
+ const queryOptionsFn = `export const ${queryOptionsFnName} = <TData = ${TData}, TError = ${errorType}>(${queryProps} ${queryArguments}) => {
2553
782
 
2554
783
  ${hookOptions}
2555
784
 
2556
- const queryKey = ${!queryKeyMutator ? `${!hasVueQueryV4 ? "queryOptions?.queryKey ?? " : ""}${queryKeyFnName}(${queryKeyProperties});` : `${queryKeyMutator.name}({ ${queryProperties} }${queryKeyMutator.hasSecondArg ? `, { url: \`${route}\`, queryOptions }` : ""});`}
785
+ const queryKey = ${queryKeyMutator ? `${queryKeyMutator.name}({ ${queryProperties} }${queryKeyMutator.hasSecondArg ? `, { url: \`${route}\`, queryOptions }` : ""});` : `${hasVueQueryV4 ? "" : "queryOptions?.queryKey ?? "}${queryKeyFnName}(${queryKeyProperties});`}
2557
786
 
2558
- ${(mutator == null ? void 0 : mutator.isHook) ? `const ${operationName} = use${(0, import_core3.pascal)(operationName)}Hook();` : ""}
787
+ ${mutator?.isHook ? `const ${operationName} = use${(0, __orval_core.pascal)(operationName)}Hook();` : ""}
2559
788
 
2560
- const queryFn: QueryFunction<Awaited<ReturnType<${(mutator == null ? void 0 : mutator.isHook) ? `ReturnType<typeof use${(0, import_core3.pascal)(operationName)}Hook>` : `typeof ${operationName}`}>>${hasQueryV5 && hasInfiniteQueryParam ? `, QueryKey, ${queryParams == null ? void 0 : queryParams.schema.name}['${queryParam}']` : ""}> = (${queryFnArguments}) => ${operationName}(${httpFunctionProps}${httpFunctionProps ? ", " : ""}${queryOptions});
789
+ const queryFn: QueryFunction<Awaited<ReturnType<${mutator?.isHook ? `ReturnType<typeof use${(0, __orval_core.pascal)(operationName)}Hook>` : `typeof ${operationName}`}>>${hasQueryV5 && hasInfiniteQueryParam ? `, QueryKey, ${queryParams?.schema.name}['${queryParam}']` : ""}> = (${queryFnArguments}) => ${operationName}(${httpFunctionProps}${httpFunctionProps ? ", " : ""}${queryOptions});
2561
790
 
2562
- ${isVue(outputClient) ? vueUnRefParams(
2563
- props.filter(
2564
- (prop) => prop.type === import_core3.GetterPropType.NAMED_PATH_PARAMS
2565
- )
2566
- ) : ""}
791
+ ${isVue(outputClient) ? vueUnRefParams(props.filter((prop) => prop.type === __orval_core.GetterPropType.NAMED_PATH_PARAMS)) : ""}
2567
792
 
2568
793
  ${queryOptionsMutator ? `const customOptions = ${queryOptionsMutator.name}({...queryOptions, queryKey, queryFn}${queryOptionsMutator.hasSecondArg ? `, { ${queryProperties} }` : ""}${queryOptionsMutator.hasThirdArg ? `, { url: \`${route}\` }` : ""});` : ""}
2569
794
 
2570
- return ${!queryOptionsMutator ? `{ queryKey, queryFn, ${queryOptionsImp}}` : "customOptions"} as ${queryOptionFnReturnType} ${isVue(outputClient) ? "" : `& { queryKey: ${hasQueryV5 ? `DataTag<QueryKey, TData${hasQueryV5WithDataTagError ? ", TError" : ""}>` : "QueryKey"} }`}
795
+ return ${queryOptionsMutator ? "customOptions" : `{ queryKey, queryFn, ${queryOptionsImp}}`} as ${queryOptionFnReturnType} ${isVue(outputClient) ? "" : `& { queryKey: ${hasQueryV5 ? `DataTag<QueryKey, TData${hasQueryV5WithDataTagError ? ", TError" : ""}>` : "QueryKey"} }`}
2571
796
  }`;
2572
- const operationPrefix = hasSvelteQueryV4 ? "create" : "use";
2573
- const optionalQueryClientArgument = hasQueryV5 ? ", queryClient?: QueryClient" : "";
2574
- const queryHookName = (0, import_core3.camel)(`${operationPrefix}-${name}`);
2575
- const overrideTypes = `
2576
- export function ${queryHookName}<TData = ${TData}, TError = ${errorType}>(
2577
- ${definedInitialDataQueryPropsDefinitions} ${definedInitialDataQueryArguments} ${optionalQueryClientArgument}
2578
- ): ${definedInitialDataReturnType}
2579
- export function ${queryHookName}<TData = ${TData}, TError = ${errorType}>(
2580
- ${queryPropDefinitions} ${undefinedInitialDataQueryArguments} ${optionalQueryClientArgument}
2581
- ): ${returnType}
2582
- export function ${queryHookName}<TData = ${TData}, TError = ${errorType}>(
2583
- ${queryPropDefinitions} ${queryArguments} ${optionalQueryClientArgument}
2584
- ): ${returnType}`;
2585
- const shouldGeneratePrefetch = usePrefetch && (type === QueryType.QUERY || type === QueryType.INFINITE || type === QueryType.SUSPENSE_QUERY && !useQuery || type === QueryType.SUSPENSE_INFINITE && !useInfinite);
2586
- const prefetchType = type === QueryType.QUERY || type === QueryType.SUSPENSE_QUERY ? "query" : "infinite-query";
2587
- const prefetchVarName = (0, import_core3.camel)(`prefetch-${operationName}-${prefetchType}`);
2588
- const prefetchFnName = (0, import_core3.camel)(`prefetch-${prefetchType}`);
2589
- return `
797
+ const operationPrefix = hasSvelteQueryV4 ? "create" : "use";
798
+ const optionalQueryClientArgument = hasQueryV5 ? ", queryClient?: QueryClient" : "";
799
+ const queryHookName = (0, __orval_core.camel)(`${operationPrefix}-${name}`);
800
+ const overrideTypes = `
801
+ export function ${queryHookName}<TData = ${TData}, TError = ${errorType}>(\n ${definedInitialDataQueryPropsDefinitions} ${definedInitialDataQueryArguments} ${optionalQueryClientArgument}\n ): ${definedInitialDataReturnType}
802
+ export function ${queryHookName}<TData = ${TData}, TError = ${errorType}>(\n ${queryPropDefinitions} ${undefinedInitialDataQueryArguments} ${optionalQueryClientArgument}\n ): ${returnType}
803
+ export function ${queryHookName}<TData = ${TData}, TError = ${errorType}>(\n ${queryPropDefinitions} ${queryArguments} ${optionalQueryClientArgument}\n ): ${returnType}`;
804
+ const shouldGeneratePrefetch = usePrefetch && (type === QueryType.QUERY || type === QueryType.INFINITE || type === QueryType.SUSPENSE_QUERY && !useQuery || type === QueryType.SUSPENSE_INFINITE && !useInfinite);
805
+ const prefetchType = type === QueryType.QUERY || type === QueryType.SUSPENSE_QUERY ? "query" : "infinite-query";
806
+ const prefetchVarName = (0, __orval_core.camel)(`prefetch-${operationName}-${prefetchType}`);
807
+ const prefetchFnName = (0, __orval_core.camel)(`prefetch-${prefetchType}`);
808
+ return `
2590
809
  ${queryOptionsFn}
2591
810
 
2592
- export type ${(0, import_core3.pascal)(
2593
- name
2594
- )}QueryResult = NonNullable<Awaited<ReturnType<${dataType}>>>
2595
- export type ${(0, import_core3.pascal)(name)}QueryError = ${errorType}
811
+ export type ${(0, __orval_core.pascal)(name)}QueryResult = NonNullable<Awaited<ReturnType<${dataType}>>>
812
+ export type ${(0, __orval_core.pascal)(name)}QueryError = ${errorType}
2596
813
 
2597
- ${hasQueryV5 && import_core3.OutputClient.REACT_QUERY === outputClient ? overrideTypes : ""}
814
+ ${hasQueryV5 && __orval_core.OutputClient.REACT_QUERY === outputClient ? overrideTypes : ""}
2598
815
  ${doc}
2599
- export function ${queryHookName}<TData = ${TData}, TError = ${errorType}>(
2600
- ${queryProps} ${queryArguments} ${optionalQueryClientArgument}
2601
- ): ${returnType} {
816
+ export function ${queryHookName}<TData = ${TData}, TError = ${errorType}>(\n ${queryProps} ${queryArguments} ${optionalQueryClientArgument} \n ): ${returnType} {
2602
817
 
2603
818
  const ${queryOptionsVarName} = ${queryOptionsFnName}(${queryProperties}${queryProperties ? "," : ""}${isRequestOptions ? "options" : "queryOptions"})
2604
819
 
2605
- const ${queryResultVarName} = ${(0, import_core3.camel)(
2606
- `${operationPrefix}-${type}`
2607
- )}(${queryOptionsVarName} ${optionalQueryClientArgument ? ", queryClient" : ""}) as ${returnType};
820
+ const ${queryResultVarName} = ${(0, __orval_core.camel)(`${operationPrefix}-${type}`)}(${queryOptionsVarName} ${optionalQueryClientArgument ? ", queryClient" : ""}) as ${returnType};
2608
821
 
2609
822
  ${queryResultVarName}.queryKey = ${isVue(outputClient) ? `unref(${queryOptionsVarName})` : queryOptionsVarName}.queryKey ${isVue(outputClient) ? `as ${hasQueryV5 ? `DataTag<QueryKey, TData${hasQueryV5WithDataTagError ? ", TError" : ""}>` : "QueryKey"}` : ""};
2610
823
 
2611
824
  return ${queryResultVarName};
2612
- }
2613
-
2614
- ${shouldGeneratePrefetch ? `${doc}export const ${prefetchVarName} = async <TData = Awaited<ReturnType<${dataType}>>, TError = ${errorType}>(
2615
- queryClient: QueryClient, ${queryProps} ${queryArguments}
2616
- ): Promise<QueryClient> => {
825
+ }\n
826
+ ${shouldGeneratePrefetch ? `${doc}export const ${prefetchVarName} = async <TData = Awaited<ReturnType<${dataType}>>, TError = ${errorType}>(\n queryClient: QueryClient, ${queryProps} ${queryArguments}\n ): Promise<QueryClient> => {
2617
827
 
2618
828
  const ${queryOptionsVarName} = ${queryOptionsFnName}(${queryProperties}${queryProperties ? "," : ""}${isRequestOptions ? "options" : "queryOptions"})
2619
829
 
2620
830
  await queryClient.${prefetchFnName}(${queryOptionsVarName});
2621
831
 
2622
832
  return queryClient;
2623
- }
2624
- ` : ""}
833
+ }\n` : ""}
2625
834
  `;
2626
835
  };
2627
- var generateQueryHook = async ({
2628
- queryParams,
2629
- operationName,
2630
- body,
2631
- props: _props,
2632
- verb,
2633
- params,
2634
- override,
2635
- mutator,
2636
- response,
2637
- operationId,
2638
- summary,
2639
- deprecated
2640
- }, { route, override: { operations = {} }, context, output }, outputClient) => {
2641
- var _a, _b, _c, _d;
2642
- let props = _props;
2643
- if (isVue(outputClient)) {
2644
- props = vueWrapTypeWithMaybeRef(_props);
2645
- }
2646
- const query = override == null ? void 0 : override.query;
2647
- const isRequestOptions = (override == null ? void 0 : override.requestOptions) !== false;
2648
- const operationQueryOptions = (_a = operations[operationId]) == null ? void 0 : _a.query;
2649
- const isExactOptionalPropertyTypes = !!((_c = (_b = context.output.tsconfig) == null ? void 0 : _b.compilerOptions) == null ? void 0 : _c.exactOptionalPropertyTypes);
2650
- const queryVersion = (_d = override.query.version) != null ? _d : query == null ? void 0 : query.version;
2651
- const hasVueQueryV4 = import_core3.OutputClient.VUE_QUERY === outputClient && (!isVueQueryV3(context.output.packageJson) || queryVersion === 4);
2652
- const hasSvelteQueryV4 = import_core3.OutputClient.SVELTE_QUERY === outputClient && (!isSvelteQueryV3(context.output.packageJson) || queryVersion === 4);
2653
- const hasQueryV5 = queryVersion === 5 || isQueryV5(
2654
- context.output.packageJson,
2655
- outputClient
2656
- );
2657
- const hasQueryV5WithDataTagError = queryVersion === 5 || isQueryV5WithDataTagError(
2658
- context.output.packageJson,
2659
- outputClient
2660
- );
2661
- const hasQueryV5WithInfiniteQueryOptionsError = queryVersion === 5 || isQueryV5WithInfiniteQueryOptionsError(
2662
- context.output.packageJson,
2663
- outputClient
2664
- );
2665
- const httpClient = context.output.httpClient;
2666
- const doc = (0, import_core3.jsDoc)({ summary, deprecated });
2667
- let implementation = "";
2668
- let mutators = void 0;
2669
- const hasOperationQueryOption = !!(operationQueryOptions && (operationQueryOptions.useQuery || operationQueryOptions.useSuspenseQuery || operationQueryOptions.useInfinite || operationQueryOptions.useSuspenseInfiniteQuery));
2670
- let isQuery = import_core3.Verbs.GET === verb && (override.query.useQuery || override.query.useSuspenseQuery || override.query.useInfinite || override.query.useSuspenseInfiniteQuery) || hasOperationQueryOption;
2671
- let isMutation = override.query.useMutation && verb !== import_core3.Verbs.GET;
2672
- if ((operationQueryOptions == null ? void 0 : operationQueryOptions.useMutation) !== void 0) {
2673
- isMutation = operationQueryOptions.useMutation;
2674
- }
2675
- if (verb !== import_core3.Verbs.GET && isQuery) {
2676
- isMutation = false;
2677
- }
2678
- if (verb === import_core3.Verbs.GET && isMutation) {
2679
- isQuery = false;
2680
- }
2681
- if (isQuery) {
2682
- const queryKeyMutator = query.queryKey ? await (0, import_core3.generateMutator)({
2683
- output,
2684
- mutator: query.queryKey,
2685
- name: `${operationName}QueryKey`,
2686
- workspace: context.workspace,
2687
- tsconfig: context.output.tsconfig
2688
- }) : void 0;
2689
- const queryOptionsMutator = query.queryOptions ? await (0, import_core3.generateMutator)({
2690
- output,
2691
- mutator: query.queryOptions,
2692
- name: `${operationName}QueryOptions`,
2693
- workspace: context.workspace,
2694
- tsconfig: context.output.tsconfig
2695
- }) : void 0;
2696
- const queryProperties = props.map((param) => {
2697
- if (param.type === import_core3.GetterPropType.NAMED_PATH_PARAMS && !isVue(outputClient))
2698
- return param.destructured;
2699
- return param.type === import_core3.GetterPropType.BODY ? body.implementation : param.name;
2700
- }).join(",");
2701
- const queryKeyProperties = props.filter((prop) => prop.type !== import_core3.GetterPropType.HEADER).map((param) => {
2702
- if (param.type === import_core3.GetterPropType.NAMED_PATH_PARAMS && !isVue(outputClient))
2703
- return param.destructured;
2704
- return param.type === import_core3.GetterPropType.BODY ? body.implementation : param.name;
2705
- }).join(",");
2706
- const queries = [
2707
- ...(query == null ? void 0 : query.useInfinite) || (operationQueryOptions == null ? void 0 : operationQueryOptions.useInfinite) ? [
2708
- {
2709
- name: (0, import_core3.camel)(`${operationName}-infinite`),
2710
- options: query == null ? void 0 : query.options,
2711
- type: QueryType.INFINITE,
2712
- queryParam: query == null ? void 0 : query.useInfiniteQueryParam
2713
- }
2714
- ] : [],
2715
- ...(query == null ? void 0 : query.useQuery) || (operationQueryOptions == null ? void 0 : operationQueryOptions.useQuery) ? [
2716
- {
2717
- name: operationName,
2718
- options: query == null ? void 0 : query.options,
2719
- type: QueryType.QUERY
2720
- }
2721
- ] : [],
2722
- ...(query == null ? void 0 : query.useSuspenseQuery) || (operationQueryOptions == null ? void 0 : operationQueryOptions.useSuspenseQuery) ? [
2723
- {
2724
- name: (0, import_core3.camel)(`${operationName}-suspense`),
2725
- options: query == null ? void 0 : query.options,
2726
- type: QueryType.SUSPENSE_QUERY
2727
- }
2728
- ] : [],
2729
- ...(query == null ? void 0 : query.useSuspenseInfiniteQuery) || (operationQueryOptions == null ? void 0 : operationQueryOptions.useSuspenseInfiniteQuery) ? [
2730
- {
2731
- name: (0, import_core3.camel)(`${operationName}-suspense-infinite`),
2732
- options: query == null ? void 0 : query.options,
2733
- type: QueryType.SUSPENSE_INFINITE,
2734
- queryParam: query == null ? void 0 : query.useInfiniteQueryParam
2735
- }
2736
- ] : []
2737
- ];
2738
- const queryKeyFnName = (0, import_core3.camel)(`get-${operationName}-queryKey`);
2739
- const makeParamsOptional = (params2) => {
2740
- if (!params2) return "";
2741
- return params2.replace(
2742
- /(\w+)(\?)?:\s*([^=,}]*?)\s*(=\s*[^,}]*)?([,}]|$)/g,
2743
- (match, paramName, optionalMarker, type, defaultValue, suffix) => {
2744
- if (defaultValue) {
2745
- return `${paramName}: ${type.trim()}${defaultValue}${suffix}`;
2746
- }
2747
- return `${paramName}?: ${type.trim()}${suffix}`;
2748
- }
2749
- );
2750
- };
2751
- const queryKeyProps = makeParamsOptional(
2752
- (0, import_core3.toObjectString)(
2753
- props.filter((prop) => prop.type !== import_core3.GetterPropType.HEADER),
2754
- "implementation"
2755
- )
2756
- );
2757
- const routeString = isVue(outputClient) || override.query.shouldSplitQueryKey ? (0, import_core3.getRouteAsArray)(route) : `\`${route}\``;
2758
- const queryKeyFn = `${override.query.shouldExportQueryKey ? "export " : ""}const ${queryKeyFnName} = (${queryKeyProps}) => {
2759
- return [${routeString}${queryParams ? ", ...(params ? [params]: [])" : ""}${body.implementation ? `, ${body.implementation}` : ""}] as const;
836
+ const generateQueryHook = async ({ queryParams, operationName, body, props: _props, verb, params, override, mutator, response, operationId, summary, deprecated }, { route, override: { operations = {} }, context, output }, outputClient) => {
837
+ let props = _props;
838
+ if (isVue(outputClient)) props = vueWrapTypeWithMaybeRef(_props);
839
+ const query = override?.query;
840
+ const isRequestOptions = override?.requestOptions !== false;
841
+ const operationQueryOptions = operations[operationId]?.query;
842
+ const isExactOptionalPropertyTypes = !!context.output.tsconfig?.compilerOptions?.exactOptionalPropertyTypes;
843
+ const queryVersion = override.query.version ?? query?.version;
844
+ const hasVueQueryV4 = __orval_core.OutputClient.VUE_QUERY === outputClient && (!isVueQueryV3(context.output.packageJson) || queryVersion === 4);
845
+ const hasSvelteQueryV4 = __orval_core.OutputClient.SVELTE_QUERY === outputClient && (!isSvelteQueryV3(context.output.packageJson) || queryVersion === 4);
846
+ const hasQueryV5 = queryVersion === 5 || isQueryV5(context.output.packageJson, outputClient);
847
+ const hasQueryV5WithDataTagError = queryVersion === 5 || isQueryV5WithDataTagError(context.output.packageJson, outputClient);
848
+ const hasQueryV5WithInfiniteQueryOptionsError = queryVersion === 5 || isQueryV5WithInfiniteQueryOptionsError(context.output.packageJson, outputClient);
849
+ const httpClient = context.output.httpClient;
850
+ const doc = (0, __orval_core.jsDoc)({
851
+ summary,
852
+ deprecated
853
+ });
854
+ let implementation = "";
855
+ let mutators;
856
+ const hasOperationQueryOption = !!(operationQueryOptions && (operationQueryOptions.useQuery || operationQueryOptions.useSuspenseQuery || operationQueryOptions.useInfinite || operationQueryOptions.useSuspenseInfiniteQuery));
857
+ let isQuery = __orval_core.Verbs.GET === verb && (override.query.useQuery || override.query.useSuspenseQuery || override.query.useInfinite || override.query.useSuspenseInfiniteQuery) || hasOperationQueryOption;
858
+ let isMutation = override.query.useMutation && verb !== __orval_core.Verbs.GET;
859
+ if (operationQueryOptions?.useMutation !== void 0) isMutation = operationQueryOptions.useMutation;
860
+ if (verb !== __orval_core.Verbs.GET && isQuery) isMutation = false;
861
+ if (verb === __orval_core.Verbs.GET && isMutation) isQuery = false;
862
+ if (isQuery) {
863
+ const queryKeyMutator = query.queryKey ? await (0, __orval_core.generateMutator)({
864
+ output,
865
+ mutator: query.queryKey,
866
+ name: `${operationName}QueryKey`,
867
+ workspace: context.workspace,
868
+ tsconfig: context.output.tsconfig
869
+ }) : void 0;
870
+ const queryOptionsMutator = query.queryOptions ? await (0, __orval_core.generateMutator)({
871
+ output,
872
+ mutator: query.queryOptions,
873
+ name: `${operationName}QueryOptions`,
874
+ workspace: context.workspace,
875
+ tsconfig: context.output.tsconfig
876
+ }) : void 0;
877
+ const queryProperties = props.map((param) => {
878
+ if (param.type === __orval_core.GetterPropType.NAMED_PATH_PARAMS && !isVue(outputClient)) return param.destructured;
879
+ return param.type === __orval_core.GetterPropType.BODY ? body.implementation : param.name;
880
+ }).join(",");
881
+ const queryKeyProperties = props.filter((prop) => prop.type !== __orval_core.GetterPropType.HEADER).map((param) => {
882
+ if (param.type === __orval_core.GetterPropType.NAMED_PATH_PARAMS && !isVue(outputClient)) return param.destructured;
883
+ return param.type === __orval_core.GetterPropType.BODY ? body.implementation : param.name;
884
+ }).join(",");
885
+ const queries = [
886
+ ...query?.useInfinite || operationQueryOptions?.useInfinite ? [{
887
+ name: (0, __orval_core.camel)(`${operationName}-infinite`),
888
+ options: query?.options,
889
+ type: QueryType.INFINITE,
890
+ queryParam: query?.useInfiniteQueryParam
891
+ }] : [],
892
+ ...query?.useQuery || operationQueryOptions?.useQuery ? [{
893
+ name: operationName,
894
+ options: query?.options,
895
+ type: QueryType.QUERY
896
+ }] : [],
897
+ ...query?.useSuspenseQuery || operationQueryOptions?.useSuspenseQuery ? [{
898
+ name: (0, __orval_core.camel)(`${operationName}-suspense`),
899
+ options: query?.options,
900
+ type: QueryType.SUSPENSE_QUERY
901
+ }] : [],
902
+ ...query?.useSuspenseInfiniteQuery || operationQueryOptions?.useSuspenseInfiniteQuery ? [{
903
+ name: (0, __orval_core.camel)(`${operationName}-suspense-infinite`),
904
+ options: query?.options,
905
+ type: QueryType.SUSPENSE_INFINITE,
906
+ queryParam: query?.useInfiniteQueryParam
907
+ }] : []
908
+ ];
909
+ const queryKeyFnName = (0, __orval_core.camel)(`get-${operationName}-queryKey`);
910
+ const makeParamsOptional = (params$1) => {
911
+ if (!params$1) return "";
912
+ return params$1.replaceAll(/(\w+)(\?)?:\s*([^=,}]*?)\s*(=\s*[^,}]*)?([,}]|$)/g, (match, paramName, optionalMarker, type, defaultValue, suffix) => {
913
+ if (defaultValue) return `${paramName}: ${type.trim()}${defaultValue}${suffix}`;
914
+ return `${paramName}?: ${type.trim()}${suffix}`;
915
+ });
916
+ };
917
+ const queryKeyProps = makeParamsOptional((0, __orval_core.toObjectString)(props.filter((prop) => prop.type !== __orval_core.GetterPropType.HEADER), "implementation"));
918
+ const routeString = isVue(outputClient) || override.query.shouldSplitQueryKey ? (0, __orval_core.getRouteAsArray)(route) : `\`${route}\``;
919
+ const queryKeyIdentifier = override.query.useOperationIdAsQueryKey ? operationName : routeString;
920
+ const queryKeyFn = `${override.query.shouldExportQueryKey ? "export " : ""}const ${queryKeyFnName} = (${queryKeyProps}) => {
921
+ return [${queryKeyIdentifier}${queryParams ? ", ...(params ? [params]: [])" : ""}${body.implementation ? `, ${body.implementation}` : ""}] as const;
2760
922
  }`;
2761
- implementation += `${!queryKeyMutator ? queryKeyFn : ""}
923
+ implementation += `${queryKeyMutator ? "" : queryKeyFn}
2762
924
 
2763
- ${queries.reduce(
2764
- (acc, queryOption) => acc + generateQueryImplementation({
2765
- queryOption,
2766
- operationName,
2767
- queryKeyFnName,
2768
- queryProperties,
2769
- queryKeyProperties,
2770
- params,
2771
- props,
2772
- mutator,
2773
- isRequestOptions,
2774
- queryParams,
2775
- response,
2776
- outputClient,
2777
- httpClient,
2778
- isExactOptionalPropertyTypes,
2779
- hasSignal: getHasSignal({
2780
- overrideQuerySignal: override.query.signal,
2781
- verb
2782
- }),
2783
- queryOptionsMutator,
2784
- queryKeyMutator,
2785
- route,
2786
- hasVueQueryV4,
2787
- hasSvelteQueryV4,
2788
- hasQueryV5,
2789
- hasQueryV5WithDataTagError,
2790
- hasQueryV5WithInfiniteQueryOptionsError,
2791
- doc,
2792
- usePrefetch: query.usePrefetch,
2793
- useQuery: query.useQuery,
2794
- useInfinite: query.useInfinite
2795
- }),
2796
- ""
2797
- )}
925
+ ${queries.reduce((acc, queryOption) => acc + generateQueryImplementation({
926
+ queryOption,
927
+ operationName,
928
+ queryKeyFnName,
929
+ queryProperties,
930
+ queryKeyProperties,
931
+ params,
932
+ props,
933
+ mutator,
934
+ isRequestOptions,
935
+ queryParams,
936
+ response,
937
+ outputClient,
938
+ httpClient,
939
+ isExactOptionalPropertyTypes,
940
+ hasSignal: getHasSignal({
941
+ overrideQuerySignal: override.query.signal,
942
+ verb
943
+ }),
944
+ queryOptionsMutator,
945
+ queryKeyMutator,
946
+ route,
947
+ hasVueQueryV4,
948
+ hasSvelteQueryV4,
949
+ hasQueryV5,
950
+ hasQueryV5WithDataTagError,
951
+ hasQueryV5WithInfiniteQueryOptionsError,
952
+ doc,
953
+ usePrefetch: query.usePrefetch,
954
+ useQuery: query.useQuery,
955
+ useInfinite: query.useInfinite
956
+ }), "")}
2798
957
  `;
2799
- mutators = queryOptionsMutator || queryKeyMutator ? [
2800
- ...queryOptionsMutator ? [queryOptionsMutator] : [],
2801
- ...queryKeyMutator ? [queryKeyMutator] : []
2802
- ] : void 0;
2803
- }
2804
- if (isMutation) {
2805
- const mutationOptionsMutator = query.mutationOptions ? await (0, import_core3.generateMutator)({
2806
- output,
2807
- mutator: query.mutationOptions,
2808
- name: `${operationName}MutationOptions`,
2809
- workspace: context.workspace,
2810
- tsconfig: context.output.tsconfig
2811
- }) : void 0;
2812
- const definitions = props.map(
2813
- ({ definition, type }) => type === import_core3.GetterPropType.BODY ? (mutator == null ? void 0 : mutator.bodyTypeName) ? `data: ${mutator.bodyTypeName}<${body.definition}>` : `data: ${body.definition}` : definition
2814
- ).join(";");
2815
- const properties = props.map(({ name, type }) => type === import_core3.GetterPropType.BODY ? "data" : name).join(",");
2816
- const errorType = getQueryErrorType(
2817
- operationName,
2818
- response,
2819
- httpClient,
2820
- mutator
2821
- );
2822
- const dataType = (mutator == null ? void 0 : mutator.isHook) ? `ReturnType<typeof use${(0, import_core3.pascal)(operationName)}Hook>` : `typeof ${operationName}`;
2823
- const mutationOptionFnReturnType = getQueryOptionsDefinition({
2824
- operationName,
2825
- mutator,
2826
- definitions,
2827
- hasSvelteQueryV4,
2828
- hasQueryV5,
2829
- hasQueryV5WithInfiniteQueryOptionsError,
2830
- isReturnType: true
2831
- });
2832
- const mutationArguments = generateQueryArguments({
2833
- operationName,
2834
- definitions,
2835
- mutator,
2836
- isRequestOptions,
2837
- hasSvelteQueryV4,
2838
- hasQueryV5,
2839
- hasQueryV5WithInfiniteQueryOptionsError,
2840
- httpClient
2841
- });
2842
- const mutationOptionsFnName = (0, import_core3.camel)(
2843
- mutationOptionsMutator || (mutator == null ? void 0 : mutator.isHook) ? `use-${operationName}-mutationOptions` : `get-${operationName}-mutationOptions`
2844
- );
2845
- const mutationOptionsVarName = isRequestOptions ? "mutationOptions" : "options";
2846
- const hooksOptionImplementation = getHooksOptionImplementation(
2847
- isRequestOptions,
2848
- httpClient,
2849
- (0, import_core3.camel)(operationName),
2850
- mutator
2851
- );
2852
- const mutationOptionsFn = `export const ${mutationOptionsFnName} = <TError = ${errorType},
958
+ mutators = queryOptionsMutator || queryKeyMutator ? [...queryOptionsMutator ? [queryOptionsMutator] : [], ...queryKeyMutator ? [queryKeyMutator] : []] : void 0;
959
+ }
960
+ if (isMutation) {
961
+ const mutationOptionsMutator = query.mutationOptions ? await (0, __orval_core.generateMutator)({
962
+ output,
963
+ mutator: query.mutationOptions,
964
+ name: `${operationName}MutationOptions`,
965
+ workspace: context.workspace,
966
+ tsconfig: context.output.tsconfig
967
+ }) : void 0;
968
+ const definitions = props.map(({ definition, type }) => type === __orval_core.GetterPropType.BODY ? mutator?.bodyTypeName ? `data: ${mutator.bodyTypeName}<${body.definition}>` : `data: ${body.definition}` : definition).join(";");
969
+ const properties = props.map(({ name, type }) => type === __orval_core.GetterPropType.BODY ? "data" : name).join(",");
970
+ const errorType = getQueryErrorType(operationName, response, httpClient, mutator);
971
+ const dataType = mutator?.isHook ? `ReturnType<typeof use${(0, __orval_core.pascal)(operationName)}Hook>` : `typeof ${operationName}`;
972
+ const mutationOptionFnReturnType = getQueryOptionsDefinition({
973
+ operationName,
974
+ mutator,
975
+ definitions,
976
+ hasSvelteQueryV4,
977
+ hasQueryV5,
978
+ hasQueryV5WithInfiniteQueryOptionsError,
979
+ isReturnType: true
980
+ });
981
+ const mutationArguments = generateQueryArguments({
982
+ operationName,
983
+ definitions,
984
+ mutator,
985
+ isRequestOptions,
986
+ hasSvelteQueryV4,
987
+ hasQueryV5,
988
+ hasQueryV5WithInfiniteQueryOptionsError,
989
+ httpClient
990
+ });
991
+ const mutationOptionsFnName = (0, __orval_core.camel)(mutationOptionsMutator || mutator?.isHook ? `use-${operationName}-mutationOptions` : `get-${operationName}-mutationOptions`);
992
+ const mutationOptionsVarName = isRequestOptions ? "mutationOptions" : "options";
993
+ const hooksOptionImplementation = getHooksOptionImplementation(isRequestOptions, httpClient, (0, __orval_core.camel)(operationName), mutator);
994
+ const mutationOptionsFn = `export const ${mutationOptionsFnName} = <TError = ${errorType},
2853
995
  TContext = unknown>(${mutationArguments}): ${mutationOptionFnReturnType} => {
2854
996
 
2855
997
  ${hooksOptionImplementation}
2856
998
 
2857
- ${(mutator == null ? void 0 : mutator.isHook) ? `const ${operationName} = use${(0, import_core3.pascal)(operationName)}Hook()` : ""}
999
+ ${mutator?.isHook ? `const ${operationName} = use${(0, __orval_core.pascal)(operationName)}Hook()` : ""}
2858
1000
 
2859
1001
 
2860
1002
  const mutationFn: MutationFunction<Awaited<ReturnType<${dataType}>>, ${definitions ? `{${definitions}}` : "void"}> = (${properties ? "props" : ""}) => {
@@ -2866,115 +1008,81 @@ ${hooksOptionImplementation}
2866
1008
  ${mutationOptionsMutator ? `const customOptions = ${mutationOptionsMutator.name}({...mutationOptions, mutationFn}${mutationOptionsMutator.hasSecondArg ? `, { url: \`${route.replaceAll("/${", "/{")}\` }` : ""}${mutationOptionsMutator.hasThirdArg ? `, { operationId: '${operationId}', operationName: '${operationName}' }` : ""});` : ""}
2867
1009
 
2868
1010
 
2869
- return ${!mutationOptionsMutator ? "{ mutationFn, ...mutationOptions }" : "customOptions"}}`;
2870
- const operationPrefix = hasSvelteQueryV4 ? "create" : "use";
2871
- const optionalQueryClientArgument = hasQueryV5 ? ", queryClient?: QueryClient" : "";
2872
- implementation += `
1011
+ return ${mutationOptionsMutator ? "customOptions" : "{ mutationFn, ...mutationOptions }"}}`;
1012
+ const operationPrefix = hasSvelteQueryV4 ? "create" : "use";
1013
+ const optionalQueryClientArgument = hasQueryV5 ? ", queryClient?: QueryClient" : "";
1014
+ implementation += `
2873
1015
  ${mutationOptionsFn}
2874
1016
 
2875
- export type ${(0, import_core3.pascal)(
2876
- operationName
2877
- )}MutationResult = NonNullable<Awaited<ReturnType<${dataType}>>>
2878
- ${body.definition ? `export type ${(0, import_core3.pascal)(operationName)}MutationBody = ${(mutator == null ? void 0 : mutator.bodyTypeName) ? `${mutator.bodyTypeName}<${body.definition}>` : body.definition}` : ""}
2879
- export type ${(0, import_core3.pascal)(operationName)}MutationError = ${errorType}
1017
+ export type ${(0, __orval_core.pascal)(operationName)}MutationResult = NonNullable<Awaited<ReturnType<${dataType}>>>
1018
+ ${body.definition ? `export type ${(0, __orval_core.pascal)(operationName)}MutationBody = ${mutator?.bodyTypeName ? `${mutator.bodyTypeName}<${body.definition}>` : body.definition}` : ""}
1019
+ export type ${(0, __orval_core.pascal)(operationName)}MutationError = ${errorType}
2880
1020
 
2881
- ${doc}export const ${(0, import_core3.camel)(
2882
- `${operationPrefix}-${operationName}`
2883
- )} = <TError = ${errorType},
2884
- TContext = unknown>(${mutationArguments} ${optionalQueryClientArgument})${generateMutatorReturnType(
2885
- {
2886
- outputClient,
2887
- dataType,
2888
- variableType: definitions ? `{${definitions}}` : "void"
2889
- }
2890
- )} => {
1021
+ ${doc}export const ${(0, __orval_core.camel)(`${operationPrefix}-${operationName}`)} = <TError = ${errorType},
1022
+ TContext = unknown>(${mutationArguments} ${optionalQueryClientArgument})${generateMutatorReturnType({
1023
+ outputClient,
1024
+ dataType,
1025
+ variableType: definitions ? `{${definitions}}` : "void"
1026
+ })} => {
2891
1027
 
2892
1028
  const ${mutationOptionsVarName} = ${mutationOptionsFnName}(${isRequestOptions ? "options" : "mutationOptions"});
2893
1029
 
2894
1030
  return ${operationPrefix}Mutation(${mutationOptionsVarName} ${optionalQueryClientArgument ? ", queryClient" : ""});
2895
1031
  }
2896
1032
  `;
2897
- mutators = mutationOptionsMutator ? [...mutators != null ? mutators : [], mutationOptionsMutator] : mutators;
2898
- }
2899
- return {
2900
- implementation,
2901
- mutators
2902
- };
1033
+ mutators = mutationOptionsMutator ? [...mutators ?? [], mutationOptionsMutator] : mutators;
1034
+ }
1035
+ return {
1036
+ implementation,
1037
+ mutators
1038
+ };
2903
1039
  };
2904
- var generateQueryHeader = (params) => {
2905
- return `${!params.hasAwaitedType ? `type AwaitedInput<T> = PromiseLike<T> | T;
2906
-
2907
- type Awaited<O> = O extends AwaitedInput<infer T> ? T : never;
2908
-
2909
- ` : ""}
2910
- ${params.isRequestOptions && params.isMutator ? `type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
2911
-
2912
- ` : ""}
1040
+ const generateQueryHeader = (params) => {
1041
+ return `${params.hasAwaitedType ? "" : `type AwaitedInput<T> = PromiseLike<T> | T;\n
1042
+ type Awaited<O> = O extends AwaitedInput<infer T> ? T : never;\n\n`}
1043
+ ${params.isRequestOptions && params.isMutator ? `type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];\n\n` : ""}
2913
1044
  ${getQueryHeader(params)}
2914
1045
  `;
2915
1046
  };
2916
- var generateQuery = async (verbOptions, options, outputClient) => {
2917
- const imports = (0, import_core3.generateVerbImports)(verbOptions);
2918
- const functionImplementation = generateQueryRequestFunction(
2919
- verbOptions,
2920
- options,
2921
- isVue(outputClient)
2922
- );
2923
- const { implementation: hookImplementation, mutators } = await generateQueryHook(verbOptions, options, outputClient);
2924
- return {
2925
- implementation: `${functionImplementation}
2926
-
2927
- ${hookImplementation}`,
2928
- imports,
2929
- mutators
2930
- };
1047
+ const generateQuery = async (verbOptions, options, outputClient) => {
1048
+ const imports = (0, __orval_core.generateVerbImports)(verbOptions);
1049
+ const functionImplementation = generateQueryRequestFunction(verbOptions, options, isVue(outputClient));
1050
+ const { implementation: hookImplementation, mutators } = await generateQueryHook(verbOptions, options, outputClient);
1051
+ return {
1052
+ implementation: `${functionImplementation}\n\n${hookImplementation}`,
1053
+ imports,
1054
+ mutators
1055
+ };
2931
1056
  };
2932
- var dependenciesBuilder = {
2933
- "react-query": getReactQueryDependencies,
2934
- "vue-query": getVueQueryDependencies,
2935
- "svelte-query": getSvelteQueryDependencies
1057
+ const dependenciesBuilder = {
1058
+ "react-query": getReactQueryDependencies,
1059
+ "vue-query": getVueQueryDependencies,
1060
+ "svelte-query": getSvelteQueryDependencies
2936
1061
  };
2937
- var builder = ({
2938
- type = "react-query",
2939
- options: queryOptions,
2940
- output
2941
- } = {}) => () => {
2942
- const client = (verbOptions, options, outputClient) => {
2943
- if (options.override.useNamedParameters && (type === "vue-query" || outputClient === "vue-query")) {
2944
- throw new Error(
2945
- `vue-query client does not support named parameters, and had broken reactivity previously, please set useNamedParameters to false; See for context: https://github.com/orval-labs/orval/pull/931#issuecomment-1752355686`
2946
- );
2947
- }
2948
- if (queryOptions) {
2949
- const normalizedQueryOptions = normalizeQueryOptions(
2950
- queryOptions,
2951
- options.context.workspace
2952
- );
2953
- verbOptions.override.query = (0, import_core3.mergeDeep)(
2954
- normalizedQueryOptions,
2955
- verbOptions.override.query
2956
- );
2957
- options.override.query = (0, import_core3.mergeDeep)(
2958
- normalizedQueryOptions,
2959
- verbOptions.override.query
2960
- );
2961
- }
2962
- return generateQuery(verbOptions, options, outputClient, output);
2963
- };
2964
- return {
2965
- client,
2966
- header: generateQueryHeader,
2967
- dependencies: dependenciesBuilder[type]
2968
- };
1062
+ const builder = ({ type = "react-query", options: queryOptions, output } = {}) => () => {
1063
+ const client = (verbOptions, options, outputClient) => {
1064
+ if (options.override.useNamedParameters && (type === "vue-query" || outputClient === "vue-query")) throw new Error(`vue-query client does not support named parameters, and had broken reactivity previously, please set useNamedParameters to false; See for context: https://github.com/orval-labs/orval/pull/931#issuecomment-1752355686`);
1065
+ if (queryOptions) {
1066
+ const normalizedQueryOptions = normalizeQueryOptions(queryOptions, options.context.workspace);
1067
+ verbOptions.override.query = (0, __orval_core.mergeDeep)(normalizedQueryOptions, verbOptions.override.query);
1068
+ options.override.query = (0, __orval_core.mergeDeep)(normalizedQueryOptions, verbOptions.override.query);
1069
+ }
1070
+ return generateQuery(verbOptions, options, outputClient, output);
1071
+ };
1072
+ return {
1073
+ client,
1074
+ header: generateQueryHeader,
1075
+ dependencies: dependenciesBuilder[type]
1076
+ };
2969
1077
  };
2970
- var index_default = builder;
2971
- // Annotate the CommonJS export names for ESM import in node:
2972
- 0 && (module.exports = {
2973
- builder,
2974
- generateQuery,
2975
- generateQueryHeader,
2976
- getReactQueryDependencies,
2977
- getSvelteQueryDependencies,
2978
- getVueQueryDependencies
2979
- });
1078
+ var src_default = builder;
1079
+
1080
+ //#endregion
1081
+ exports.builder = builder;
1082
+ exports.default = src_default;
1083
+ exports.generateQuery = generateQuery;
1084
+ exports.generateQueryHeader = generateQueryHeader;
1085
+ exports.getReactQueryDependencies = getReactQueryDependencies;
1086
+ exports.getSvelteQueryDependencies = getSvelteQueryDependencies;
1087
+ exports.getVueQueryDependencies = getVueQueryDependencies;
2980
1088
  //# sourceMappingURL=index.js.map