mobx-tanstack-query-api 0.21.1 → 0.22.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/codegen/index.cjs CHANGED
@@ -103,21 +103,24 @@ const generateApi = async (params) => {
103
103
  ...params.otherCodegenParams,
104
104
  };
105
105
  let codegenProcess;
106
- const inputData = {};
107
106
  if (!params.input) {
108
107
  console.warn('[mobx-tanstack-query-api/codegen]', 'input is not specified', '\nprocess will be skipped');
109
108
  return;
110
109
  }
111
- if (typeof params.input === 'string') {
112
- inputData.input = params.input;
113
- inputData.url = params.input;
114
- }
115
- else {
116
- inputData.spec = params.input;
117
- }
110
+ const inputToCodegenInput = (input) => {
111
+ const inputData = {};
112
+ if (typeof input === 'string') {
113
+ inputData.input = input;
114
+ inputData.url = input;
115
+ }
116
+ else {
117
+ inputData.spec = input;
118
+ }
119
+ return inputData;
120
+ };
118
121
  const generated = await (0, swagger_typescript_api_1.generateApi)({
119
122
  ...swaggerTypescriptApiCodegenBaseParams,
120
- ...inputData,
123
+ ...inputToCodegenInput(params.input),
121
124
  hooks: {
122
125
  onInit: (configuration, codeGenProcessFromInit) => {
123
126
  codegenProcess = codeGenProcessFromInit;
@@ -156,6 +159,36 @@ const generateApi = async (params) => {
156
159
  },
157
160
  },
158
161
  });
162
+ const generatedExtra = params.mixinInput
163
+ ? await (0, swagger_typescript_api_1.generateApi)({
164
+ ...swaggerTypescriptApiCodegenBaseParams,
165
+ ...inputToCodegenInput(params.mixinInput),
166
+ hooks: {
167
+ onPrepareConfig: (config) => {
168
+ config.routes.combined?.forEach((routeInfo) => {
169
+ routeInfo.routes.sort((routeA, routeB) => routeA.routeName.usage.localeCompare(routeB.routeName.usage));
170
+ });
171
+ },
172
+ onFormatRouteName: (routeInfo, usageRouteName) => {
173
+ let formattedRouteName = usageRouteName;
174
+ if (params.addPathSegmentToRouteName === true ||
175
+ typeof params.addPathSegmentToRouteName === 'number') {
176
+ const pathSegmentForSuffix = typeof params.addPathSegmentToRouteName === 'number'
177
+ ? params.addPathSegmentToRouteName
178
+ : 0;
179
+ const pathSegments = routeInfo.route.split('/').filter(Boolean);
180
+ const { _ } = codegenProcess.getRenderTemplateData()
181
+ .utils;
182
+ formattedRouteName = _.camelCase(`${pathSegments[pathSegmentForSuffix] || ''}_${formattedRouteName}`);
183
+ }
184
+ const endpointName = formattedRouteName;
185
+ return (params?.formatEndpointName?.(endpointName, routeInfo) ??
186
+ swaggerTypescriptApiCodegenBaseParams?.hooks?.onFormatRouteName?.(routeInfo, endpointName) ??
187
+ endpointName);
188
+ },
189
+ },
190
+ })
191
+ : null;
159
192
  //#endregion
160
193
  const utils = codegenProcess.getRenderTemplateData()
161
194
  .utils;
@@ -181,6 +214,35 @@ const generateApi = async (params) => {
181
214
  const codegenFs = codegenProcess.fileSystem;
182
215
  codegenFs.cleanDir(params.output);
183
216
  codegenFs.createDir(params.output);
217
+ if (generatedExtra) {
218
+ const allExtraOperationIdsSet = new Set([
219
+ ...(generatedExtra.configuration.routes.outOfModule?.map((r) => r.raw.operationId) ?? []),
220
+ ...(generatedExtra.configuration.routes.combined?.flatMap((r) => r.routes.map((r) => r.raw.operationId)) ?? []),
221
+ ]);
222
+ const allExtraModelTypesSet = new Set([
223
+ ...generatedExtra.configuration.modelTypes.map((m) => m.name),
224
+ ]);
225
+ generated.configuration.routes.outOfModule =
226
+ generated.configuration.routes.outOfModule ?? [];
227
+ generated.configuration.routes.outOfModule = [
228
+ ...generated.configuration.routes.outOfModule.filter((route) => !allExtraOperationIdsSet.has(route.raw.operationId)),
229
+ ...generatedExtra.configuration.routes.outOfModule,
230
+ ];
231
+ generated.configuration.routes.combined =
232
+ generated.configuration.routes.combined ?? [];
233
+ generated.configuration.routes.combined.forEach((group) => {
234
+ group.routes = [
235
+ ...group.routes.filter((route) => !allExtraOperationIdsSet.has(route.raw.operationId)),
236
+ ...(generatedExtra.configuration.routes.combined?.find((g) => g.moduleName === group.moduleName)?.routes ?? []),
237
+ ];
238
+ });
239
+ const notExistedCombinedExtra = generatedExtra.configuration.routes.combined?.filter((group) => !generated.configuration.routes.combined?.some((g) => g.moduleName === group.moduleName));
240
+ generated.configuration.routes.combined.push(...(notExistedCombinedExtra ?? []));
241
+ generated.configuration.modelTypes = [
242
+ ...generated.configuration.modelTypes.filter((it) => !allExtraModelTypesSet.has(it.name)),
243
+ ...generatedExtra.configuration.modelTypes,
244
+ ];
245
+ }
184
246
  const allRoutes = Object.values(generated.configuration.routes)
185
247
  .flat()
186
248
  .flatMap((routeGroup) => 'routes' in routeGroup ? routeGroup.routes : routeGroup);
@@ -202,10 +264,12 @@ const generateApi = async (params) => {
202
264
  route,
203
265
  relativePathDataContracts: '../data-contracts',
204
266
  groupName: null,
205
- metaInfo: {
206
- groupNames: [],
207
- namespace,
208
- },
267
+ metaInfo: params.noMetaInfo
268
+ ? null
269
+ : {
270
+ groupNames: [],
271
+ namespace,
272
+ },
209
273
  });
210
274
  if (Array.isArray(route.raw.tags)) {
211
275
  route.raw.tags.forEach((tag) => {
@@ -245,10 +309,12 @@ const generateApi = async (params) => {
245
309
  routes: allRoutes,
246
310
  relativePathDataContracts: './data-contracts',
247
311
  groupName: null,
248
- metaInfo: {
249
- namespace,
250
- groupNames: [],
251
- },
312
+ metaInfo: params.noMetaInfo
313
+ ? null
314
+ : {
315
+ namespace,
316
+ groupNames: [],
317
+ },
252
318
  });
253
319
  reservedDataContractNames.forEach((name) => {
254
320
  reservedDataContractNamesMap.set(name, (reservedDataContractNamesMap.get(name) ?? 0) + 1);
@@ -319,10 +385,12 @@ const generateApi = async (params) => {
319
385
  route,
320
386
  relativePathDataContracts: '../../data-contracts',
321
387
  groupName,
322
- metaInfo: {
323
- namespace,
324
- groupNames: [],
325
- },
388
+ metaInfo: params.noMetaInfo
389
+ ? null
390
+ : {
391
+ namespace,
392
+ groupNames: [],
393
+ },
326
394
  });
327
395
  reservedDataContractNames.forEach((name) => {
328
396
  reservedDataContractNamesMap.set(name, (reservedDataContractNamesMap.get(name) ?? 0) + 1);
@@ -354,10 +422,12 @@ const generateApi = async (params) => {
354
422
  routes,
355
423
  relativePathDataContracts: '../data-contracts',
356
424
  groupName,
357
- metaInfo: {
358
- namespace,
359
- groupNames: [],
360
- },
425
+ metaInfo: params.noMetaInfo
426
+ ? null
427
+ : {
428
+ namespace,
429
+ groupNames: [],
430
+ },
361
431
  });
362
432
  reservedDataContractNames.forEach((name) => {
363
433
  reservedDataContractNamesMap.set(name, (reservedDataContractNamesMap.get(name) ?? 0) + 1);
@@ -415,7 +485,8 @@ export * as ${exportGroupName} from './endpoints';
415
485
  }
416
486
  // #endregion
417
487
  }
418
- const metaInfo = (namespace ?? (nonEmptyGroups.size > 0 || tagsSet.size > 0))
488
+ const metaInfo = !params.noMetaInfo &&
489
+ (namespace ?? (nonEmptyGroups.size > 0 || tagsSet.size > 0))
419
490
  ? {
420
491
  namespace,
421
492
  groupNames: [...nonEmptyGroups.values()],
@@ -435,15 +506,17 @@ export * as ${exportGroupName} from './endpoints';
435
506
  withPrefix: false,
436
507
  content: dataContractsContent,
437
508
  });
438
- codegenFs.createFile({
439
- path: paths.outputDir,
440
- fileName: 'meta-info.ts',
441
- withPrefix: false,
442
- content: await (0, meta_info_tmpl_js_1.metaInfoTmpl)({
443
- ...baseTmplParams,
444
- metaInfo,
445
- }),
446
- });
509
+ if (metaInfo) {
510
+ codegenFs.createFile({
511
+ path: paths.outputDir,
512
+ fileName: 'meta-info.ts',
513
+ withPrefix: false,
514
+ content: await (0, meta_info_tmpl_js_1.metaInfoTmpl)({
515
+ ...baseTmplParams,
516
+ metaInfo,
517
+ }),
518
+ });
519
+ }
447
520
  if (namespace) {
448
521
  codegenFs.createFile({
449
522
  path: paths.outputDir,
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/codegen/index.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAIV,sBAAsB,EAEvB,0BAAyB;AAI1B,kCAAiC;AAOjC,eAAO,MAAM,WAAW,GACtB,QAAQ,sBAAsB,GAAG,sBAAsB,EAAE,KAExD,OAAO,CAAC,IAAI,CA8lBd,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/codegen/index.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAIV,sBAAsB,EAEvB,0BAAyB;AAI1B,kCAAiC;AAOjC,eAAO,MAAM,WAAW,GACtB,QAAQ,sBAAsB,GAAG,sBAAsB,EAAE,KAExD,OAAO,CAAC,IAAI,CAstBd,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/codegen/index.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAIV,sBAAsB,EAEvB,yBAAyB;AAI1B,iCAAiC;AAOjC,eAAO,MAAM,WAAW,GACtB,QAAQ,sBAAsB,GAAG,sBAAsB,EAAE,KAExD,OAAO,CAAC,IAAI,CA8lBd,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/codegen/index.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAIV,sBAAsB,EAEvB,yBAAyB;AAI1B,iCAAiC;AAOjC,eAAO,MAAM,WAAW,GACtB,QAAQ,sBAAsB,GAAG,sBAAsB,EAAE,KAExD,OAAO,CAAC,IAAI,CAstBd,CAAC"}
package/codegen/index.js CHANGED
@@ -83,21 +83,24 @@ export const generateApi = async (params) => {
83
83
  ...params.otherCodegenParams,
84
84
  };
85
85
  let codegenProcess;
86
- const inputData = {};
87
86
  if (!params.input) {
88
87
  console.warn('[mobx-tanstack-query-api/codegen]', 'input is not specified', '\nprocess will be skipped');
89
88
  return;
90
89
  }
91
- if (typeof params.input === 'string') {
92
- inputData.input = params.input;
93
- inputData.url = params.input;
94
- }
95
- else {
96
- inputData.spec = params.input;
97
- }
90
+ const inputToCodegenInput = (input) => {
91
+ const inputData = {};
92
+ if (typeof input === 'string') {
93
+ inputData.input = input;
94
+ inputData.url = input;
95
+ }
96
+ else {
97
+ inputData.spec = input;
98
+ }
99
+ return inputData;
100
+ };
98
101
  const generated = await generateApiFromSwagger({
99
102
  ...swaggerTypescriptApiCodegenBaseParams,
100
- ...inputData,
103
+ ...inputToCodegenInput(params.input),
101
104
  hooks: {
102
105
  onInit: (configuration, codeGenProcessFromInit) => {
103
106
  codegenProcess = codeGenProcessFromInit;
@@ -136,6 +139,36 @@ export const generateApi = async (params) => {
136
139
  },
137
140
  },
138
141
  });
142
+ const generatedExtra = params.mixinInput
143
+ ? await generateApiFromSwagger({
144
+ ...swaggerTypescriptApiCodegenBaseParams,
145
+ ...inputToCodegenInput(params.mixinInput),
146
+ hooks: {
147
+ onPrepareConfig: (config) => {
148
+ config.routes.combined?.forEach((routeInfo) => {
149
+ routeInfo.routes.sort((routeA, routeB) => routeA.routeName.usage.localeCompare(routeB.routeName.usage));
150
+ });
151
+ },
152
+ onFormatRouteName: (routeInfo, usageRouteName) => {
153
+ let formattedRouteName = usageRouteName;
154
+ if (params.addPathSegmentToRouteName === true ||
155
+ typeof params.addPathSegmentToRouteName === 'number') {
156
+ const pathSegmentForSuffix = typeof params.addPathSegmentToRouteName === 'number'
157
+ ? params.addPathSegmentToRouteName
158
+ : 0;
159
+ const pathSegments = routeInfo.route.split('/').filter(Boolean);
160
+ const { _ } = codegenProcess.getRenderTemplateData()
161
+ .utils;
162
+ formattedRouteName = _.camelCase(`${pathSegments[pathSegmentForSuffix] || ''}_${formattedRouteName}`);
163
+ }
164
+ const endpointName = formattedRouteName;
165
+ return (params?.formatEndpointName?.(endpointName, routeInfo) ??
166
+ swaggerTypescriptApiCodegenBaseParams?.hooks?.onFormatRouteName?.(routeInfo, endpointName) ??
167
+ endpointName);
168
+ },
169
+ },
170
+ })
171
+ : null;
139
172
  //#endregion
140
173
  const utils = codegenProcess.getRenderTemplateData()
141
174
  .utils;
@@ -161,6 +194,35 @@ export const generateApi = async (params) => {
161
194
  const codegenFs = codegenProcess.fileSystem;
162
195
  codegenFs.cleanDir(params.output);
163
196
  codegenFs.createDir(params.output);
197
+ if (generatedExtra) {
198
+ const allExtraOperationIdsSet = new Set([
199
+ ...(generatedExtra.configuration.routes.outOfModule?.map((r) => r.raw.operationId) ?? []),
200
+ ...(generatedExtra.configuration.routes.combined?.flatMap((r) => r.routes.map((r) => r.raw.operationId)) ?? []),
201
+ ]);
202
+ const allExtraModelTypesSet = new Set([
203
+ ...generatedExtra.configuration.modelTypes.map((m) => m.name),
204
+ ]);
205
+ generated.configuration.routes.outOfModule =
206
+ generated.configuration.routes.outOfModule ?? [];
207
+ generated.configuration.routes.outOfModule = [
208
+ ...generated.configuration.routes.outOfModule.filter((route) => !allExtraOperationIdsSet.has(route.raw.operationId)),
209
+ ...generatedExtra.configuration.routes.outOfModule,
210
+ ];
211
+ generated.configuration.routes.combined =
212
+ generated.configuration.routes.combined ?? [];
213
+ generated.configuration.routes.combined.forEach((group) => {
214
+ group.routes = [
215
+ ...group.routes.filter((route) => !allExtraOperationIdsSet.has(route.raw.operationId)),
216
+ ...(generatedExtra.configuration.routes.combined?.find((g) => g.moduleName === group.moduleName)?.routes ?? []),
217
+ ];
218
+ });
219
+ const notExistedCombinedExtra = generatedExtra.configuration.routes.combined?.filter((group) => !generated.configuration.routes.combined?.some((g) => g.moduleName === group.moduleName));
220
+ generated.configuration.routes.combined.push(...(notExistedCombinedExtra ?? []));
221
+ generated.configuration.modelTypes = [
222
+ ...generated.configuration.modelTypes.filter((it) => !allExtraModelTypesSet.has(it.name)),
223
+ ...generatedExtra.configuration.modelTypes,
224
+ ];
225
+ }
164
226
  const allRoutes = Object.values(generated.configuration.routes)
165
227
  .flat()
166
228
  .flatMap((routeGroup) => 'routes' in routeGroup ? routeGroup.routes : routeGroup);
@@ -182,10 +244,12 @@ export const generateApi = async (params) => {
182
244
  route,
183
245
  relativePathDataContracts: '../data-contracts',
184
246
  groupName: null,
185
- metaInfo: {
186
- groupNames: [],
187
- namespace,
188
- },
247
+ metaInfo: params.noMetaInfo
248
+ ? null
249
+ : {
250
+ groupNames: [],
251
+ namespace,
252
+ },
189
253
  });
190
254
  if (Array.isArray(route.raw.tags)) {
191
255
  route.raw.tags.forEach((tag) => {
@@ -225,10 +289,12 @@ export const generateApi = async (params) => {
225
289
  routes: allRoutes,
226
290
  relativePathDataContracts: './data-contracts',
227
291
  groupName: null,
228
- metaInfo: {
229
- namespace,
230
- groupNames: [],
231
- },
292
+ metaInfo: params.noMetaInfo
293
+ ? null
294
+ : {
295
+ namespace,
296
+ groupNames: [],
297
+ },
232
298
  });
233
299
  reservedDataContractNames.forEach((name) => {
234
300
  reservedDataContractNamesMap.set(name, (reservedDataContractNamesMap.get(name) ?? 0) + 1);
@@ -299,10 +365,12 @@ export const generateApi = async (params) => {
299
365
  route,
300
366
  relativePathDataContracts: '../../data-contracts',
301
367
  groupName,
302
- metaInfo: {
303
- namespace,
304
- groupNames: [],
305
- },
368
+ metaInfo: params.noMetaInfo
369
+ ? null
370
+ : {
371
+ namespace,
372
+ groupNames: [],
373
+ },
306
374
  });
307
375
  reservedDataContractNames.forEach((name) => {
308
376
  reservedDataContractNamesMap.set(name, (reservedDataContractNamesMap.get(name) ?? 0) + 1);
@@ -334,10 +402,12 @@ export const generateApi = async (params) => {
334
402
  routes,
335
403
  relativePathDataContracts: '../data-contracts',
336
404
  groupName,
337
- metaInfo: {
338
- namespace,
339
- groupNames: [],
340
- },
405
+ metaInfo: params.noMetaInfo
406
+ ? null
407
+ : {
408
+ namespace,
409
+ groupNames: [],
410
+ },
341
411
  });
342
412
  reservedDataContractNames.forEach((name) => {
343
413
  reservedDataContractNamesMap.set(name, (reservedDataContractNamesMap.get(name) ?? 0) + 1);
@@ -395,7 +465,8 @@ export * as ${exportGroupName} from './endpoints';
395
465
  }
396
466
  // #endregion
397
467
  }
398
- const metaInfo = (namespace ?? (nonEmptyGroups.size > 0 || tagsSet.size > 0))
468
+ const metaInfo = !params.noMetaInfo &&
469
+ (namespace ?? (nonEmptyGroups.size > 0 || tagsSet.size > 0))
399
470
  ? {
400
471
  namespace,
401
472
  groupNames: [...nonEmptyGroups.values()],
@@ -415,15 +486,17 @@ export * as ${exportGroupName} from './endpoints';
415
486
  withPrefix: false,
416
487
  content: dataContractsContent,
417
488
  });
418
- codegenFs.createFile({
419
- path: paths.outputDir,
420
- fileName: 'meta-info.ts',
421
- withPrefix: false,
422
- content: await metaInfoTmpl({
423
- ...baseTmplParams,
424
- metaInfo,
425
- }),
426
- });
489
+ if (metaInfo) {
490
+ codegenFs.createFile({
491
+ path: paths.outputDir,
492
+ fileName: 'meta-info.ts',
493
+ withPrefix: false,
494
+ content: await metaInfoTmpl({
495
+ ...baseTmplParams,
496
+ metaInfo,
497
+ }),
498
+ });
499
+ }
427
500
  if (namespace) {
428
501
  codegenFs.createFile({
429
502
  path: paths.outputDir,
@@ -16,6 +16,10 @@ export interface GenerateQueryApiParams {
16
16
  * [**Documentation**](https://js2me.github.io/mobx-tanstack-query-api/codegen/config/#input)
17
17
  */
18
18
  input: string | AnyObject;
19
+ /**
20
+ * [**Documentation**](https://js2me.github.io/mobx-tanstack-query-api/codegen/config/#mixininput)
21
+ */
22
+ mixinInput?: string | AnyObject;
19
23
  /**
20
24
  * [**Documentation**](https://js2me.github.io/mobx-tanstack-query-api/codegen/config/#requestpathprefix)
21
25
  */
@@ -143,7 +147,14 @@ export interface GenerateQueryApiParams {
143
147
  groupEnumValue?: (group: string, namespace?: Maybe<string>) => string;
144
148
  tagEnumValue?: (tag: string, namespace?: Maybe<string>) => string;
145
149
  };
150
+ /**
151
+ * [**Documentation**](https://js2me.github.io/mobx-tanstack-query-api/codegen/config/#cleanoutput)
152
+ */
146
153
  cleanOutput?: boolean;
154
+ /**
155
+ * [**Documentation**](https://js2me.github.io/mobx-tanstack-query-api/codegen/config/#nometainfo)
156
+ */
157
+ noMetaInfo?: boolean;
147
158
  }
148
159
  export {};
149
160
  //# sourceMappingURL=generate-query-api-params.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"generate-query-api-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AAU,CAAC,EAAE;QACX,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,MAAM,CAAC;QACtE,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,MAAM,CAAC;KACnE,CAAC;IAEF,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB"}
1
+ {"version":3,"file":"generate-query-api-params.d.ts","sourceRoot":"","sources":["../../../src/codegen/types/generate-query-api-params.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,KAAK,EAAE,uBAAuB,EAAE,yCAAwC;AAC/E,OAAO,KAAK,EAAE,YAAY,EAAE,0CAAyC;AACrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,iCAAgC;AAChE,OAAO,KAAK,EAAE,YAAY,EAAE,4BAA2B;AACvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,iCAAgC;AAEhE,KAAK,qBAAqB,GAAG,YAAY,CAAC,CAAC,QAAQ,EAAE,YAAY,KAAK,OAAO,CAAC,CAAC;AAE/E,KAAK,kBAAkB,GAAG,YAAY,CAAC,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC;AAEvE,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEhC;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;OAEG;IAC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AAS,EAChB,KAAK,EAAE,SAAS,KACb;QACH,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;IAEF;;;;OAIG;IACH,yBAAyB,CAAC,EAAE,WAAW,CAAC;IAExC,kBAAkB,CAAC,EAAE,SAAS,CAAC;IAE/B;;OAEG;IACH,eAAe,CAAC,EAAE,qBAAqB,CAAC;IAExC;;OAEG;IACH,YAAY,CAAC,EAAE,kBAAkB,CAAC;IAElC,UAAU,CAAC,EAAE;QACX,yBAAyB,CAAC,EAAE,MAAM,CAAC;KACpC,CAAC;IAEF,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,UAAU,CAAC,EAAE;QACX,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,MAAM,CAAC;QACtE,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,MAAM,CAAC;KACnE,CAAC;IAEF;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB"}
@@ -16,6 +16,10 @@ export interface GenerateQueryApiParams {
16
16
  * [**Documentation**](https://js2me.github.io/mobx-tanstack-query-api/codegen/config/#input)
17
17
  */
18
18
  input: string | AnyObject;
19
+ /**
20
+ * [**Documentation**](https://js2me.github.io/mobx-tanstack-query-api/codegen/config/#mixininput)
21
+ */
22
+ mixinInput?: string | AnyObject;
19
23
  /**
20
24
  * [**Documentation**](https://js2me.github.io/mobx-tanstack-query-api/codegen/config/#requestpathprefix)
21
25
  */
@@ -143,7 +147,14 @@ export interface GenerateQueryApiParams {
143
147
  groupEnumValue?: (group: string, namespace?: Maybe<string>) => string;
144
148
  tagEnumValue?: (tag: string, namespace?: Maybe<string>) => string;
145
149
  };
150
+ /**
151
+ * [**Documentation**](https://js2me.github.io/mobx-tanstack-query-api/codegen/config/#cleanoutput)
152
+ */
146
153
  cleanOutput?: boolean;
154
+ /**
155
+ * [**Documentation**](https://js2me.github.io/mobx-tanstack-query-api/codegen/config/#nometainfo)
156
+ */
157
+ noMetaInfo?: boolean;
147
158
  }
148
159
  export {};
149
160
  //# sourceMappingURL=generate-query-api-params.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"generate-query-api-params.d.ts","sourceRoot":"","sources":["../../../src/codegen/types/generate-query-api-params.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,KAAK,EAAE,uBAAuB,EAAE,wCAAwC;AAC/E,OAAO,KAAK,EAAE,YAAY,EAAE,yCAAyC;AACrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,gCAAgC;AAChE,OAAO,KAAK,EAAE,YAAY,EAAE,2BAA2B;AACvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,gCAAgC;AAEhE,KAAK,qBAAqB,GAAG,YAAY,CAAC,CAAC,QAAQ,EAAE,YAAY,KAAK,OAAO,CAAC,CAAC;AAE/E,KAAK,kBAAkB,GAAG,YAAY,CAAC,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC;AAEvE,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAE1B;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,iBAAiB,CAAC,EACd,IAAI,GACJ,OAAO,CAAC,IAAI,CAAC,uBAAuB,EAAE,WAAW,CAAC,CAAC,CAAC;IAExD;;OAEG;IACH,kBAAkB,CAAC,EAAE,CACnB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kB,CAAC,EAAE,SAAS,CAAC;IAE/B;;OAEG;IACH,eAAe,CAAC,EAAE,qBAAqB,CAAC;IAExC;;OAEG;IACH,YAAY,CAAC,EAAE,kBAAkB,CAAC;IAElC,UAAU,CAAC,EAAE;QACX,yBAAyB,CAAC,EAAE,MAAM,CAAC;KACpC,CAAC;IAEF,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,UAAU,CAAC,EAAE;QACX,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,MAAM,CAAC;QACtE,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,MAAM,CAAC;KACnE,CAAC;IAEF,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB"}
1
+ {"version":3,"file":"generate-query-api-params.d.ts","sourceRoot":"","sources":["../../../src/codegen/types/generate-query-api-params.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,KAAK,EAAE,uBAAuB,EAAE,wCAAwC;AAC/E,OAAO,KAAK,EAAE,YAAY,EAAE,yCAAyC;AACrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,gCAAgC;AAChE,OAAO,KAAK,EAAE,YAAY,EAAE,2BAA2B;AACvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,gCAAgC;AAEhE,KAAK,qBAAqB,GAAG,YAAY,CAAC,CAAC,QAAQ,EAAE,YAAY,KAAK,OAAO,CAAC,CAAC;AAE/E,KAAK,kBAAkB,GAAG,YAAY,CAAC,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC;AAEvE,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,MAAM,EAAE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ACH,eAAe,CAAC,EAAE,CAChB,KAAK,EAAE,SAAS,EAChB,KAAK,EAAE,SAAS,KACb;QACH,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,kBAAkB,CAAC,EAAE,MAAM,CAAC;QAC5B,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;IAEF;;OAEG;IACH,cAAc,CAAC,EAAE,CACf,KAAK,EAAE,SAAS,EAChB,KAAK,EAAE,SAAS,KACb;QACH,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;IAEF;;;;OAIG;IACH,yBAAyB,CAAC,EAAE,WAAW,CAAC;IAExC,kBAAkB,CAAC,EAAE,SAAS,CAAC;IAE/B;;OAEG;IACH,eAAe,CAAC,EAAE,qBAAqB,CAAC;IAExC;;OAEG;IACH,YAAY,CAAC,EAAE,kBAAkB,CAAC;IAElC,UAAU,CAAC,EAAE;QACX,yBAAyB,CAAC,EAAE,MAAM,CAAC;KACpC,CAAC;IAEF,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,UAAU,CAAC,EAAE;QACX,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,MAAM,CAAC;QACtE,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,MAAM,CAAC;KACnE,CAAC;IAEF;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB"}
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.21.1",
2
+ "version": "0.22.1",
3
3
  "name": "mobx-tanstack-query-api",
4
4
  "description": "OpenAPI/Swagger client codegen + endpoints integration with mobx-tanstack-query",
5
5
  "keywords": [