@horpynka/api-sdk 1.0.11 → 1.0.13

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.cjs CHANGED
@@ -273,6 +273,107 @@ var AuthApi = class extends BaseAPI {
273
273
  return AuthApiFp(this.configuration).signUp(signUpUserDTO, options).then((request) => request(this.axios, this.basePath));
274
274
  }
275
275
  };
276
+ var CashShiftsApiAxiosParamCreator = function(configuration) {
277
+ return {
278
+ /**
279
+ *
280
+ * @param {*} [options] Override http request option.
281
+ * @throws {RequiredError}
282
+ */
283
+ findAll: async (options = {}) => {
284
+ const localVarPath = `/cash-shifts`;
285
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
286
+ let baseOptions;
287
+ if (configuration) {
288
+ baseOptions = configuration.baseOptions;
289
+ }
290
+ const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
291
+ const localVarHeaderParameter = {};
292
+ const localVarQueryParameter = {};
293
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
294
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
295
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
296
+ return {
297
+ url: toPathString(localVarUrlObj),
298
+ options: localVarRequestOptions
299
+ };
300
+ },
301
+ /**
302
+ *
303
+ * @param {number} id
304
+ * @param {*} [options] Override http request option.
305
+ * @throws {RequiredError}
306
+ */
307
+ findOne: async (id, options = {}) => {
308
+ assertParamExists("findOne", "id", id);
309
+ const localVarPath = `/cash-shifts/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
310
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
311
+ let baseOptions;
312
+ if (configuration) {
313
+ baseOptions = configuration.baseOptions;
314
+ }
315
+ const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
316
+ const localVarHeaderParameter = {};
317
+ const localVarQueryParameter = {};
318
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
319
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
320
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
321
+ return {
322
+ url: toPathString(localVarUrlObj),
323
+ options: localVarRequestOptions
324
+ };
325
+ }
326
+ };
327
+ };
328
+ var CashShiftsApiFp = function(configuration) {
329
+ const localVarAxiosParamCreator = CashShiftsApiAxiosParamCreator(configuration);
330
+ return {
331
+ /**
332
+ *
333
+ * @param {*} [options] Override http request option.
334
+ * @throws {RequiredError}
335
+ */
336
+ async findAll(options) {
337
+ const localVarAxiosArgs = await localVarAxiosParamCreator.findAll(options);
338
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
339
+ const localVarOperationServerBasePath = operationServerMap["CashShiftsApi.findAll"]?.[localVarOperationServerIndex]?.url;
340
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
341
+ },
342
+ /**
343
+ *
344
+ * @param {number} id
345
+ * @param {*} [options] Override http request option.
346
+ * @throws {RequiredError}
347
+ */
348
+ async findOne(id, options) {
349
+ const localVarAxiosArgs = await localVarAxiosParamCreator.findOne(id, options);
350
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
351
+ const localVarOperationServerBasePath = operationServerMap["CashShiftsApi.findOne"]?.[localVarOperationServerIndex]?.url;
352
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
353
+ }
354
+ };
355
+ };
356
+ var CashShiftsApi = class extends BaseAPI {
357
+ /**
358
+ *
359
+ * @param {*} [options] Override http request option.
360
+ * @throws {RequiredError}
361
+ * @memberof CashShiftsApi
362
+ */
363
+ findAll(options) {
364
+ return CashShiftsApiFp(this.configuration).findAll(options).then((request) => request(this.axios, this.basePath));
365
+ }
366
+ /**
367
+ *
368
+ * @param {number} id
369
+ * @param {*} [options] Override http request option.
370
+ * @throws {RequiredError}
371
+ * @memberof CashShiftsApi
372
+ */
373
+ findOne(id, options) {
374
+ return CashShiftsApiFp(this.configuration).findOne(id, options).then((request) => request(this.axios, this.basePath));
375
+ }
376
+ };
276
377
  var CategoriesApiAxiosParamCreator = function(configuration) {
277
378
  return {
278
379
  /**
@@ -281,7 +382,288 @@ var CategoriesApiAxiosParamCreator = function(configuration) {
281
382
  * @throws {RequiredError}
282
383
  */
283
384
  findAll: async (options = {}) => {
284
- const localVarPath = `/categories`;
385
+ const localVarPath = `/categories`;
386
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
387
+ let baseOptions;
388
+ if (configuration) {
389
+ baseOptions = configuration.baseOptions;
390
+ }
391
+ const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
392
+ const localVarHeaderParameter = {};
393
+ const localVarQueryParameter = {};
394
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
395
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
396
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
397
+ return {
398
+ url: toPathString(localVarUrlObj),
399
+ options: localVarRequestOptions
400
+ };
401
+ },
402
+ /**
403
+ *
404
+ * @param {number} id
405
+ * @param {*} [options] Override http request option.
406
+ * @throws {RequiredError}
407
+ */
408
+ findOne: async (id, options = {}) => {
409
+ assertParamExists("findOne", "id", id);
410
+ const localVarPath = `/categories/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
411
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
412
+ let baseOptions;
413
+ if (configuration) {
414
+ baseOptions = configuration.baseOptions;
415
+ }
416
+ const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
417
+ const localVarHeaderParameter = {};
418
+ const localVarQueryParameter = {};
419
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
420
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
421
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
422
+ return {
423
+ url: toPathString(localVarUrlObj),
424
+ options: localVarRequestOptions
425
+ };
426
+ }
427
+ };
428
+ };
429
+ var CategoriesApiFp = function(configuration) {
430
+ const localVarAxiosParamCreator = CategoriesApiAxiosParamCreator(configuration);
431
+ return {
432
+ /**
433
+ *
434
+ * @param {*} [options] Override http request option.
435
+ * @throws {RequiredError}
436
+ */
437
+ async findAll(options) {
438
+ const localVarAxiosArgs = await localVarAxiosParamCreator.findAll(options);
439
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
440
+ const localVarOperationServerBasePath = operationServerMap["CategoriesApi.findAll"]?.[localVarOperationServerIndex]?.url;
441
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
442
+ },
443
+ /**
444
+ *
445
+ * @param {number} id
446
+ * @param {*} [options] Override http request option.
447
+ * @throws {RequiredError}
448
+ */
449
+ async findOne(id, options) {
450
+ const localVarAxiosArgs = await localVarAxiosParamCreator.findOne(id, options);
451
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
452
+ const localVarOperationServerBasePath = operationServerMap["CategoriesApi.findOne"]?.[localVarOperationServerIndex]?.url;
453
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
454
+ }
455
+ };
456
+ };
457
+ var CategoriesApi = class extends BaseAPI {
458
+ /**
459
+ *
460
+ * @param {*} [options] Override http request option.
461
+ * @throws {RequiredError}
462
+ * @memberof CategoriesApi
463
+ */
464
+ findAll(options) {
465
+ return CategoriesApiFp(this.configuration).findAll(options).then((request) => request(this.axios, this.basePath));
466
+ }
467
+ /**
468
+ *
469
+ * @param {number} id
470
+ * @param {*} [options] Override http request option.
471
+ * @throws {RequiredError}
472
+ * @memberof CategoriesApi
473
+ */
474
+ findOne(id, options) {
475
+ return CategoriesApiFp(this.configuration).findOne(id, options).then((request) => request(this.axios, this.basePath));
476
+ }
477
+ };
478
+ var DashboardApiAxiosParamCreator = function(configuration) {
479
+ return {
480
+ /**
481
+ *
482
+ * @param {*} [options] Override http request option.
483
+ * @throws {RequiredError}
484
+ */
485
+ getStats: async (options = {}) => {
486
+ const localVarPath = `/dashboard/stats`;
487
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
488
+ let baseOptions;
489
+ if (configuration) {
490
+ baseOptions = configuration.baseOptions;
491
+ }
492
+ const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
493
+ const localVarHeaderParameter = {};
494
+ const localVarQueryParameter = {};
495
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
496
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
497
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
498
+ return {
499
+ url: toPathString(localVarUrlObj),
500
+ options: localVarRequestOptions
501
+ };
502
+ }
503
+ };
504
+ };
505
+ var DashboardApiFp = function(configuration) {
506
+ const localVarAxiosParamCreator = DashboardApiAxiosParamCreator(configuration);
507
+ return {
508
+ /**
509
+ *
510
+ * @param {*} [options] Override http request option.
511
+ * @throws {RequiredError}
512
+ */
513
+ async getStats(options) {
514
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getStats(options);
515
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
516
+ const localVarOperationServerBasePath = operationServerMap["DashboardApi.getStats"]?.[localVarOperationServerIndex]?.url;
517
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
518
+ }
519
+ };
520
+ };
521
+ var DashboardApi = class extends BaseAPI {
522
+ /**
523
+ *
524
+ * @param {*} [options] Override http request option.
525
+ * @throws {RequiredError}
526
+ * @memberof DashboardApi
527
+ */
528
+ getStats(options) {
529
+ return DashboardApiFp(this.configuration).getStats(options).then((request) => request(this.axios, this.basePath));
530
+ }
531
+ };
532
+ var DishesApiAxiosParamCreator = function(configuration) {
533
+ return {
534
+ /**
535
+ *
536
+ * @param {*} [options] Override http request option.
537
+ * @throws {RequiredError}
538
+ */
539
+ findAll: async (options = {}) => {
540
+ const localVarPath = `/dishes`;
541
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
542
+ let baseOptions;
543
+ if (configuration) {
544
+ baseOptions = configuration.baseOptions;
545
+ }
546
+ const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
547
+ const localVarHeaderParameter = {};
548
+ const localVarQueryParameter = {};
549
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
550
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
551
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
552
+ return {
553
+ url: toPathString(localVarUrlObj),
554
+ options: localVarRequestOptions
555
+ };
556
+ },
557
+ /**
558
+ *
559
+ * @param {number} id
560
+ * @param {*} [options] Override http request option.
561
+ * @throws {RequiredError}
562
+ */
563
+ findOne: async (id, options = {}) => {
564
+ assertParamExists("findOne", "id", id);
565
+ const localVarPath = `/dishes/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
566
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
567
+ let baseOptions;
568
+ if (configuration) {
569
+ baseOptions = configuration.baseOptions;
570
+ }
571
+ const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
572
+ const localVarHeaderParameter = {};
573
+ const localVarQueryParameter = {};
574
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
575
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
576
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
577
+ return {
578
+ url: toPathString(localVarUrlObj),
579
+ options: localVarRequestOptions
580
+ };
581
+ }
582
+ };
583
+ };
584
+ var DishesApiFp = function(configuration) {
585
+ const localVarAxiosParamCreator = DishesApiAxiosParamCreator(configuration);
586
+ return {
587
+ /**
588
+ *
589
+ * @param {*} [options] Override http request option.
590
+ * @throws {RequiredError}
591
+ */
592
+ async findAll(options) {
593
+ const localVarAxiosArgs = await localVarAxiosParamCreator.findAll(options);
594
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
595
+ const localVarOperationServerBasePath = operationServerMap["DishesApi.findAll"]?.[localVarOperationServerIndex]?.url;
596
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
597
+ },
598
+ /**
599
+ *
600
+ * @param {number} id
601
+ * @param {*} [options] Override http request option.
602
+ * @throws {RequiredError}
603
+ */
604
+ async findOne(id, options) {
605
+ const localVarAxiosArgs = await localVarAxiosParamCreator.findOne(id, options);
606
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
607
+ const localVarOperationServerBasePath = operationServerMap["DishesApi.findOne"]?.[localVarOperationServerIndex]?.url;
608
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
609
+ }
610
+ };
611
+ };
612
+ var DishesApi = class extends BaseAPI {
613
+ /**
614
+ *
615
+ * @param {*} [options] Override http request option.
616
+ * @throws {RequiredError}
617
+ * @memberof DishesApi
618
+ */
619
+ findAll(options) {
620
+ return DishesApiFp(this.configuration).findAll(options).then((request) => request(this.axios, this.basePath));
621
+ }
622
+ /**
623
+ *
624
+ * @param {number} id
625
+ * @param {*} [options] Override http request option.
626
+ * @throws {RequiredError}
627
+ * @memberof DishesApi
628
+ */
629
+ findOne(id, options) {
630
+ return DishesApiFp(this.configuration).findOne(id, options).then((request) => request(this.axios, this.basePath));
631
+ }
632
+ };
633
+ var IngredientsApiAxiosParamCreator = function(configuration) {
634
+ return {
635
+ /**
636
+ *
637
+ * @param {*} [options] Override http request option.
638
+ * @throws {RequiredError}
639
+ */
640
+ findAll: async (options = {}) => {
641
+ const localVarPath = `/ingredients`;
642
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
643
+ let baseOptions;
644
+ if (configuration) {
645
+ baseOptions = configuration.baseOptions;
646
+ }
647
+ const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
648
+ const localVarHeaderParameter = {};
649
+ const localVarQueryParameter = {};
650
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
651
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
652
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
653
+ return {
654
+ url: toPathString(localVarUrlObj),
655
+ options: localVarRequestOptions
656
+ };
657
+ },
658
+ /**
659
+ *
660
+ * @param {number} id
661
+ * @param {*} [options] Override http request option.
662
+ * @throws {RequiredError}
663
+ */
664
+ findOne: async (id, options = {}) => {
665
+ assertParamExists("findOne", "id", id);
666
+ const localVarPath = `/ingredients/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
285
667
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
286
668
  let baseOptions;
287
669
  if (configuration) {
@@ -300,8 +682,8 @@ var CategoriesApiAxiosParamCreator = function(configuration) {
300
682
  }
301
683
  };
302
684
  };
303
- var CategoriesApiFp = function(configuration) {
304
- const localVarAxiosParamCreator = CategoriesApiAxiosParamCreator(configuration);
685
+ var IngredientsApiFp = function(configuration) {
686
+ const localVarAxiosParamCreator = IngredientsApiAxiosParamCreator(configuration);
305
687
  return {
306
688
  /**
307
689
  *
@@ -311,23 +693,45 @@ var CategoriesApiFp = function(configuration) {
311
693
  async findAll(options) {
312
694
  const localVarAxiosArgs = await localVarAxiosParamCreator.findAll(options);
313
695
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
314
- const localVarOperationServerBasePath = operationServerMap["CategoriesApi.findAll"]?.[localVarOperationServerIndex]?.url;
696
+ const localVarOperationServerBasePath = operationServerMap["IngredientsApi.findAll"]?.[localVarOperationServerIndex]?.url;
697
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
698
+ },
699
+ /**
700
+ *
701
+ * @param {number} id
702
+ * @param {*} [options] Override http request option.
703
+ * @throws {RequiredError}
704
+ */
705
+ async findOne(id, options) {
706
+ const localVarAxiosArgs = await localVarAxiosParamCreator.findOne(id, options);
707
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
708
+ const localVarOperationServerBasePath = operationServerMap["IngredientsApi.findOne"]?.[localVarOperationServerIndex]?.url;
315
709
  return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
316
710
  }
317
711
  };
318
712
  };
319
- var CategoriesApi = class extends BaseAPI {
713
+ var IngredientsApi = class extends BaseAPI {
320
714
  /**
321
715
  *
322
716
  * @param {*} [options] Override http request option.
323
717
  * @throws {RequiredError}
324
- * @memberof CategoriesApi
718
+ * @memberof IngredientsApi
325
719
  */
326
720
  findAll(options) {
327
- return CategoriesApiFp(this.configuration).findAll(options).then((request) => request(this.axios, this.basePath));
721
+ return IngredientsApiFp(this.configuration).findAll(options).then((request) => request(this.axios, this.basePath));
722
+ }
723
+ /**
724
+ *
725
+ * @param {number} id
726
+ * @param {*} [options] Override http request option.
727
+ * @throws {RequiredError}
728
+ * @memberof IngredientsApi
729
+ */
730
+ findOne(id, options) {
731
+ return IngredientsApiFp(this.configuration).findOne(id, options).then((request) => request(this.axios, this.basePath));
328
732
  }
329
733
  };
330
- var DishesApiAxiosParamCreator = function(configuration) {
734
+ var InventoryApiAxiosParamCreator = function(configuration) {
331
735
  return {
332
736
  /**
333
737
  *
@@ -335,7 +739,7 @@ var DishesApiAxiosParamCreator = function(configuration) {
335
739
  * @throws {RequiredError}
336
740
  */
337
741
  findAll: async (options = {}) => {
338
- const localVarPath = `/dishes`;
742
+ const localVarPath = `/inventory`;
339
743
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
340
744
  let baseOptions;
341
745
  if (configuration) {
@@ -360,7 +764,7 @@ var DishesApiAxiosParamCreator = function(configuration) {
360
764
  */
361
765
  findOne: async (id, options = {}) => {
362
766
  assertParamExists("findOne", "id", id);
363
- const localVarPath = `/dishes/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
767
+ const localVarPath = `/inventory/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
364
768
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
365
769
  let baseOptions;
366
770
  if (configuration) {
@@ -379,8 +783,8 @@ var DishesApiAxiosParamCreator = function(configuration) {
379
783
  }
380
784
  };
381
785
  };
382
- var DishesApiFp = function(configuration) {
383
- const localVarAxiosParamCreator = DishesApiAxiosParamCreator(configuration);
786
+ var InventoryApiFp = function(configuration) {
787
+ const localVarAxiosParamCreator = InventoryApiAxiosParamCreator(configuration);
384
788
  return {
385
789
  /**
386
790
  *
@@ -390,7 +794,7 @@ var DishesApiFp = function(configuration) {
390
794
  async findAll(options) {
391
795
  const localVarAxiosArgs = await localVarAxiosParamCreator.findAll(options);
392
796
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
393
- const localVarOperationServerBasePath = operationServerMap["DishesApi.findAll"]?.[localVarOperationServerIndex]?.url;
797
+ const localVarOperationServerBasePath = operationServerMap["InventoryApi.findAll"]?.[localVarOperationServerIndex]?.url;
394
798
  return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
395
799
  },
396
800
  /**
@@ -402,30 +806,84 @@ var DishesApiFp = function(configuration) {
402
806
  async findOne(id, options) {
403
807
  const localVarAxiosArgs = await localVarAxiosParamCreator.findOne(id, options);
404
808
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
405
- const localVarOperationServerBasePath = operationServerMap["DishesApi.findOne"]?.[localVarOperationServerIndex]?.url;
809
+ const localVarOperationServerBasePath = operationServerMap["InventoryApi.findOne"]?.[localVarOperationServerIndex]?.url;
406
810
  return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
407
811
  }
408
812
  };
409
813
  };
410
- var DishesApi = class extends BaseAPI {
814
+ var InventoryApi = class extends BaseAPI {
411
815
  /**
412
816
  *
413
817
  * @param {*} [options] Override http request option.
414
818
  * @throws {RequiredError}
415
- * @memberof DishesApi
819
+ * @memberof InventoryApi
416
820
  */
417
821
  findAll(options) {
418
- return DishesApiFp(this.configuration).findAll(options).then((request) => request(this.axios, this.basePath));
822
+ return InventoryApiFp(this.configuration).findAll(options).then((request) => request(this.axios, this.basePath));
419
823
  }
420
824
  /**
421
825
  *
422
826
  * @param {number} id
423
827
  * @param {*} [options] Override http request option.
424
828
  * @throws {RequiredError}
425
- * @memberof DishesApi
829
+ * @memberof InventoryApi
426
830
  */
427
831
  findOne(id, options) {
428
- return DishesApiFp(this.configuration).findOne(id, options).then((request) => request(this.axios, this.basePath));
832
+ return InventoryApiFp(this.configuration).findOne(id, options).then((request) => request(this.axios, this.basePath));
833
+ }
834
+ };
835
+ var MenuApiAxiosParamCreator = function(configuration) {
836
+ return {
837
+ /**
838
+ *
839
+ * @param {*} [options] Override http request option.
840
+ * @throws {RequiredError}
841
+ */
842
+ findAll: async (options = {}) => {
843
+ const localVarPath = `/menu`;
844
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
845
+ let baseOptions;
846
+ if (configuration) {
847
+ baseOptions = configuration.baseOptions;
848
+ }
849
+ const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
850
+ const localVarHeaderParameter = {};
851
+ const localVarQueryParameter = {};
852
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
853
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
854
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
855
+ return {
856
+ url: toPathString(localVarUrlObj),
857
+ options: localVarRequestOptions
858
+ };
859
+ }
860
+ };
861
+ };
862
+ var MenuApiFp = function(configuration) {
863
+ const localVarAxiosParamCreator = MenuApiAxiosParamCreator(configuration);
864
+ return {
865
+ /**
866
+ *
867
+ * @param {*} [options] Override http request option.
868
+ * @throws {RequiredError}
869
+ */
870
+ async findAll(options) {
871
+ const localVarAxiosArgs = await localVarAxiosParamCreator.findAll(options);
872
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
873
+ const localVarOperationServerBasePath = operationServerMap["MenuApi.findAll"]?.[localVarOperationServerIndex]?.url;
874
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
875
+ }
876
+ };
877
+ };
878
+ var MenuApi = class extends BaseAPI {
879
+ /**
880
+ *
881
+ * @param {*} [options] Override http request option.
882
+ * @throws {RequiredError}
883
+ * @memberof MenuApi
884
+ */
885
+ findAll(options) {
886
+ return MenuApiFp(this.configuration).findAll(options).then((request) => request(this.axios, this.basePath));
429
887
  }
430
888
  };
431
889
  var OrdersApiAxiosParamCreator = function(configuration) {
@@ -720,6 +1178,31 @@ var ProductsApiAxiosParamCreator = function(configuration) {
720
1178
  url: toPathString(localVarUrlObj),
721
1179
  options: localVarRequestOptions
722
1180
  };
1181
+ },
1182
+ /**
1183
+ *
1184
+ * @param {number} id
1185
+ * @param {*} [options] Override http request option.
1186
+ * @throws {RequiredError}
1187
+ */
1188
+ findOne: async (id, options = {}) => {
1189
+ assertParamExists("findOne", "id", id);
1190
+ const localVarPath = `/products/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
1191
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1192
+ let baseOptions;
1193
+ if (configuration) {
1194
+ baseOptions = configuration.baseOptions;
1195
+ }
1196
+ const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
1197
+ const localVarHeaderParameter = {};
1198
+ const localVarQueryParameter = {};
1199
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1200
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1201
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1202
+ return {
1203
+ url: toPathString(localVarUrlObj),
1204
+ options: localVarRequestOptions
1205
+ };
723
1206
  }
724
1207
  };
725
1208
  };
@@ -736,6 +1219,18 @@ var ProductsApiFp = function(configuration) {
736
1219
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
737
1220
  const localVarOperationServerBasePath = operationServerMap["ProductsApi.findAll"]?.[localVarOperationServerIndex]?.url;
738
1221
  return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1222
+ },
1223
+ /**
1224
+ *
1225
+ * @param {number} id
1226
+ * @param {*} [options] Override http request option.
1227
+ * @throws {RequiredError}
1228
+ */
1229
+ async findOne(id, options) {
1230
+ const localVarAxiosArgs = await localVarAxiosParamCreator.findOne(id, options);
1231
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1232
+ const localVarOperationServerBasePath = operationServerMap["ProductsApi.findOne"]?.[localVarOperationServerIndex]?.url;
1233
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
739
1234
  }
740
1235
  };
741
1236
  };
@@ -749,6 +1244,70 @@ var ProductsApi = class extends BaseAPI {
749
1244
  findAll(options) {
750
1245
  return ProductsApiFp(this.configuration).findAll(options).then((request) => request(this.axios, this.basePath));
751
1246
  }
1247
+ /**
1248
+ *
1249
+ * @param {number} id
1250
+ * @param {*} [options] Override http request option.
1251
+ * @throws {RequiredError}
1252
+ * @memberof ProductsApi
1253
+ */
1254
+ findOne(id, options) {
1255
+ return ProductsApiFp(this.configuration).findOne(id, options).then((request) => request(this.axios, this.basePath));
1256
+ }
1257
+ };
1258
+ var TransactionsApiAxiosParamCreator = function(configuration) {
1259
+ return {
1260
+ /**
1261
+ *
1262
+ * @param {*} [options] Override http request option.
1263
+ * @throws {RequiredError}
1264
+ */
1265
+ findAll: async (options = {}) => {
1266
+ const localVarPath = `/transactions`;
1267
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1268
+ let baseOptions;
1269
+ if (configuration) {
1270
+ baseOptions = configuration.baseOptions;
1271
+ }
1272
+ const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
1273
+ const localVarHeaderParameter = {};
1274
+ const localVarQueryParameter = {};
1275
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1276
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1277
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1278
+ return {
1279
+ url: toPathString(localVarUrlObj),
1280
+ options: localVarRequestOptions
1281
+ };
1282
+ }
1283
+ };
1284
+ };
1285
+ var TransactionsApiFp = function(configuration) {
1286
+ const localVarAxiosParamCreator = TransactionsApiAxiosParamCreator(configuration);
1287
+ return {
1288
+ /**
1289
+ *
1290
+ * @param {*} [options] Override http request option.
1291
+ * @throws {RequiredError}
1292
+ */
1293
+ async findAll(options) {
1294
+ const localVarAxiosArgs = await localVarAxiosParamCreator.findAll(options);
1295
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1296
+ const localVarOperationServerBasePath = operationServerMap["TransactionsApi.findAll"]?.[localVarOperationServerIndex]?.url;
1297
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1298
+ }
1299
+ };
1300
+ };
1301
+ var TransactionsApi = class extends BaseAPI {
1302
+ /**
1303
+ *
1304
+ * @param {*} [options] Override http request option.
1305
+ * @throws {RequiredError}
1306
+ * @memberof TransactionsApi
1307
+ */
1308
+ findAll(options) {
1309
+ return TransactionsApiFp(this.configuration).findAll(options).then((request) => request(this.axios, this.basePath));
1310
+ }
752
1311
  };
753
1312
 
754
1313
  // src/api/generated/configuration.ts
@@ -841,10 +1400,16 @@ var Configuration = class {
841
1400
  };
842
1401
  exports.tanstackClient = void 0;
843
1402
  exports.authApi = void 0;
1403
+ exports.cashShiftsApi = void 0;
844
1404
  exports.categoriesApi = void 0;
1405
+ exports.dashboardApi = void 0;
845
1406
  exports.dishesApi = void 0;
1407
+ exports.ingredientsApi = void 0;
1408
+ exports.inventoryApi = void 0;
1409
+ exports.menuApi = void 0;
846
1410
  exports.ordersApi = void 0;
847
1411
  exports.productsApi = void 0;
1412
+ exports.transactionsApi = void 0;
848
1413
  function initApiClient(config) {
849
1414
  const apiClient = globalAxios2__default.default.create({
850
1415
  baseURL: config.baseURL,
@@ -855,10 +1420,16 @@ function initApiClient(config) {
855
1420
  });
856
1421
  exports.tanstackClient = new reactQuery.QueryClient();
857
1422
  exports.authApi = new AuthApi(configuration, void 0, apiClient);
1423
+ exports.cashShiftsApi = new CashShiftsApi(configuration, void 0, apiClient);
858
1424
  exports.categoriesApi = new CategoriesApi(configuration, void 0, apiClient);
1425
+ exports.dashboardApi = new DashboardApi(configuration, void 0, apiClient);
859
1426
  exports.dishesApi = new DishesApi(configuration, void 0, apiClient);
1427
+ exports.ingredientsApi = new IngredientsApi(configuration, void 0, apiClient);
1428
+ exports.inventoryApi = new InventoryApi(configuration, void 0, apiClient);
1429
+ exports.menuApi = new MenuApi(configuration, void 0, apiClient);
860
1430
  exports.ordersApi = new OrdersApi(configuration, void 0, apiClient);
861
1431
  exports.productsApi = new ProductsApi(configuration, void 0, apiClient);
1432
+ exports.transactionsApi = new TransactionsApi(configuration, void 0, apiClient);
862
1433
  return apiClient;
863
1434
  }
864
1435
  var useAuthApi = () => {
@@ -890,6 +1461,20 @@ var useAuthApi = () => {
890
1461
  mutateSignUp
891
1462
  };
892
1463
  };
1464
+ var getCashShiftsQuery = () => reactQuery.queryOptions({
1465
+ queryKey: ["cash-shifts"],
1466
+ queryFn: () => exports.cashShiftsApi.findAll().then((res) => res.data)
1467
+ });
1468
+ var getCashShiftQuery = (id) => reactQuery.queryOptions({
1469
+ queryKey: ["cash-shifts", id],
1470
+ queryFn: () => exports.cashShiftsApi.findOne(id).then((res) => res.data)
1471
+ });
1472
+ var useCashShiftsApi = () => {
1473
+ return {
1474
+ getCashShiftsQuery,
1475
+ getCashShiftQuery
1476
+ };
1477
+ };
893
1478
  var getCategoriesQuery = () => reactQuery.queryOptions({
894
1479
  queryKey: ["categories"],
895
1480
  queryFn: () => exports.categoriesApi.findAll().then((res) => res.data)
@@ -899,6 +1484,15 @@ var useCategoriesApi = () => {
899
1484
  getCategoriesQuery
900
1485
  };
901
1486
  };
1487
+ var getStatsQuery = () => reactQuery.queryOptions({
1488
+ queryKey: ["dashboard"],
1489
+ queryFn: () => exports.dashboardApi.getStats().then((res) => res.data)
1490
+ });
1491
+ var useDashboardApi = () => {
1492
+ return {
1493
+ getStatsQuery
1494
+ };
1495
+ };
902
1496
  var getDishesQuery = () => reactQuery.queryOptions({
903
1497
  queryKey: ["dishes"],
904
1498
  queryFn: () => exports.dishesApi.findAll().then((res) => res.data)
@@ -913,6 +1507,43 @@ var useDishesApi = () => {
913
1507
  getDishQuery
914
1508
  };
915
1509
  };
1510
+ var getIngredientsQuery = () => reactQuery.queryOptions({
1511
+ queryKey: ["ingredients"],
1512
+ queryFn: () => exports.ingredientsApi.findAll().then((res) => res.data)
1513
+ });
1514
+ var getIngredientQuery = (id) => reactQuery.queryOptions({
1515
+ queryKey: ["ingredients", id],
1516
+ queryFn: () => exports.ingredientsApi.findOne(id).then((res) => res.data)
1517
+ });
1518
+ var useIngredientsApi = () => {
1519
+ return {
1520
+ getIngredientsQuery,
1521
+ getIngredientQuery
1522
+ };
1523
+ };
1524
+ var getInventoriesQuery = () => reactQuery.queryOptions({
1525
+ queryKey: ["inventory"],
1526
+ queryFn: () => exports.inventoryApi.findAll().then((res) => res.data)
1527
+ });
1528
+ var getInventoryQuery = (id) => reactQuery.queryOptions({
1529
+ queryKey: ["inventory", id],
1530
+ queryFn: () => exports.inventoryApi.findOne(id).then((res) => res.data)
1531
+ });
1532
+ var useInventoryApi = () => {
1533
+ return {
1534
+ getInventoriesQuery,
1535
+ getInventoryQuery
1536
+ };
1537
+ };
1538
+ var getMenuQuery = () => reactQuery.queryOptions({
1539
+ queryKey: ["menu"],
1540
+ queryFn: () => exports.menuApi.findAll().then((res) => res.data)
1541
+ });
1542
+ var useMenuApi = () => {
1543
+ return {
1544
+ getMenuQuery
1545
+ };
1546
+ };
916
1547
  var getOrdersQuery = (params) => reactQuery.queryOptions({
917
1548
  queryKey: ["orders", params],
918
1549
  queryFn: () => exports.ordersApi.findAll(params?.page, params?.limit, params?.status).then((res) => res.data)
@@ -961,12 +1592,27 @@ var useProductsApi = () => {
961
1592
  getProductsQuery
962
1593
  };
963
1594
  };
1595
+ var getTransactionsQuery = () => reactQuery.queryOptions({
1596
+ queryKey: ["transactions"],
1597
+ queryFn: () => exports.transactionsApi.findAll().then((res) => res.data)
1598
+ });
1599
+ var useTransactionsApi = () => {
1600
+ return {
1601
+ getTransactionsQuery
1602
+ };
1603
+ };
964
1604
 
965
1605
  exports.initApiClient = initApiClient;
966
1606
  exports.useAuthApi = useAuthApi;
1607
+ exports.useCashShiftsApi = useCashShiftsApi;
967
1608
  exports.useCategoriesApi = useCategoriesApi;
1609
+ exports.useDashboardApi = useDashboardApi;
968
1610
  exports.useDishesApi = useDishesApi;
1611
+ exports.useIngredientsApi = useIngredientsApi;
1612
+ exports.useInventoryApi = useInventoryApi;
1613
+ exports.useMenuApi = useMenuApi;
969
1614
  exports.useOrdersApi = useOrdersApi;
970
1615
  exports.useProductsApi = useProductsApi;
1616
+ exports.useTransactionsApi = useTransactionsApi;
971
1617
  //# sourceMappingURL=index.cjs.map
972
1618
  //# sourceMappingURL=index.cjs.map