@horpynka/api-sdk 1.0.12 → 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 +552 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +591 -1
- package/dist/index.d.ts +591 -1
- package/dist/index.js +547 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -267,6 +267,107 @@ var AuthApi = class extends BaseAPI {
|
|
|
267
267
|
return AuthApiFp(this.configuration).signUp(signUpUserDTO, options).then((request) => request(this.axios, this.basePath));
|
|
268
268
|
}
|
|
269
269
|
};
|
|
270
|
+
var CashShiftsApiAxiosParamCreator = function(configuration) {
|
|
271
|
+
return {
|
|
272
|
+
/**
|
|
273
|
+
*
|
|
274
|
+
* @param {*} [options] Override http request option.
|
|
275
|
+
* @throws {RequiredError}
|
|
276
|
+
*/
|
|
277
|
+
findAll: async (options = {}) => {
|
|
278
|
+
const localVarPath = `/cash-shifts`;
|
|
279
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
280
|
+
let baseOptions;
|
|
281
|
+
if (configuration) {
|
|
282
|
+
baseOptions = configuration.baseOptions;
|
|
283
|
+
}
|
|
284
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
285
|
+
const localVarHeaderParameter = {};
|
|
286
|
+
const localVarQueryParameter = {};
|
|
287
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
288
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
289
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
290
|
+
return {
|
|
291
|
+
url: toPathString(localVarUrlObj),
|
|
292
|
+
options: localVarRequestOptions
|
|
293
|
+
};
|
|
294
|
+
},
|
|
295
|
+
/**
|
|
296
|
+
*
|
|
297
|
+
* @param {number} id
|
|
298
|
+
* @param {*} [options] Override http request option.
|
|
299
|
+
* @throws {RequiredError}
|
|
300
|
+
*/
|
|
301
|
+
findOne: async (id, options = {}) => {
|
|
302
|
+
assertParamExists("findOne", "id", id);
|
|
303
|
+
const localVarPath = `/cash-shifts/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
304
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
305
|
+
let baseOptions;
|
|
306
|
+
if (configuration) {
|
|
307
|
+
baseOptions = configuration.baseOptions;
|
|
308
|
+
}
|
|
309
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
310
|
+
const localVarHeaderParameter = {};
|
|
311
|
+
const localVarQueryParameter = {};
|
|
312
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
313
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
314
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
315
|
+
return {
|
|
316
|
+
url: toPathString(localVarUrlObj),
|
|
317
|
+
options: localVarRequestOptions
|
|
318
|
+
};
|
|
319
|
+
}
|
|
320
|
+
};
|
|
321
|
+
};
|
|
322
|
+
var CashShiftsApiFp = function(configuration) {
|
|
323
|
+
const localVarAxiosParamCreator = CashShiftsApiAxiosParamCreator(configuration);
|
|
324
|
+
return {
|
|
325
|
+
/**
|
|
326
|
+
*
|
|
327
|
+
* @param {*} [options] Override http request option.
|
|
328
|
+
* @throws {RequiredError}
|
|
329
|
+
*/
|
|
330
|
+
async findAll(options) {
|
|
331
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.findAll(options);
|
|
332
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
333
|
+
const localVarOperationServerBasePath = operationServerMap["CashShiftsApi.findAll"]?.[localVarOperationServerIndex]?.url;
|
|
334
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
335
|
+
},
|
|
336
|
+
/**
|
|
337
|
+
*
|
|
338
|
+
* @param {number} id
|
|
339
|
+
* @param {*} [options] Override http request option.
|
|
340
|
+
* @throws {RequiredError}
|
|
341
|
+
*/
|
|
342
|
+
async findOne(id, options) {
|
|
343
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.findOne(id, options);
|
|
344
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
345
|
+
const localVarOperationServerBasePath = operationServerMap["CashShiftsApi.findOne"]?.[localVarOperationServerIndex]?.url;
|
|
346
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
347
|
+
}
|
|
348
|
+
};
|
|
349
|
+
};
|
|
350
|
+
var CashShiftsApi = class extends BaseAPI {
|
|
351
|
+
/**
|
|
352
|
+
*
|
|
353
|
+
* @param {*} [options] Override http request option.
|
|
354
|
+
* @throws {RequiredError}
|
|
355
|
+
* @memberof CashShiftsApi
|
|
356
|
+
*/
|
|
357
|
+
findAll(options) {
|
|
358
|
+
return CashShiftsApiFp(this.configuration).findAll(options).then((request) => request(this.axios, this.basePath));
|
|
359
|
+
}
|
|
360
|
+
/**
|
|
361
|
+
*
|
|
362
|
+
* @param {number} id
|
|
363
|
+
* @param {*} [options] Override http request option.
|
|
364
|
+
* @throws {RequiredError}
|
|
365
|
+
* @memberof CashShiftsApi
|
|
366
|
+
*/
|
|
367
|
+
findOne(id, options) {
|
|
368
|
+
return CashShiftsApiFp(this.configuration).findOne(id, options).then((request) => request(this.axios, this.basePath));
|
|
369
|
+
}
|
|
370
|
+
};
|
|
270
371
|
var CategoriesApiAxiosParamCreator = function(configuration) {
|
|
271
372
|
return {
|
|
272
373
|
/**
|
|
@@ -368,6 +469,60 @@ var CategoriesApi = class extends BaseAPI {
|
|
|
368
469
|
return CategoriesApiFp(this.configuration).findOne(id, options).then((request) => request(this.axios, this.basePath));
|
|
369
470
|
}
|
|
370
471
|
};
|
|
472
|
+
var DashboardApiAxiosParamCreator = function(configuration) {
|
|
473
|
+
return {
|
|
474
|
+
/**
|
|
475
|
+
*
|
|
476
|
+
* @param {*} [options] Override http request option.
|
|
477
|
+
* @throws {RequiredError}
|
|
478
|
+
*/
|
|
479
|
+
getStats: async (options = {}) => {
|
|
480
|
+
const localVarPath = `/dashboard/stats`;
|
|
481
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
482
|
+
let baseOptions;
|
|
483
|
+
if (configuration) {
|
|
484
|
+
baseOptions = configuration.baseOptions;
|
|
485
|
+
}
|
|
486
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
487
|
+
const localVarHeaderParameter = {};
|
|
488
|
+
const localVarQueryParameter = {};
|
|
489
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
490
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
491
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
492
|
+
return {
|
|
493
|
+
url: toPathString(localVarUrlObj),
|
|
494
|
+
options: localVarRequestOptions
|
|
495
|
+
};
|
|
496
|
+
}
|
|
497
|
+
};
|
|
498
|
+
};
|
|
499
|
+
var DashboardApiFp = function(configuration) {
|
|
500
|
+
const localVarAxiosParamCreator = DashboardApiAxiosParamCreator(configuration);
|
|
501
|
+
return {
|
|
502
|
+
/**
|
|
503
|
+
*
|
|
504
|
+
* @param {*} [options] Override http request option.
|
|
505
|
+
* @throws {RequiredError}
|
|
506
|
+
*/
|
|
507
|
+
async getStats(options) {
|
|
508
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getStats(options);
|
|
509
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
510
|
+
const localVarOperationServerBasePath = operationServerMap["DashboardApi.getStats"]?.[localVarOperationServerIndex]?.url;
|
|
511
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
512
|
+
}
|
|
513
|
+
};
|
|
514
|
+
};
|
|
515
|
+
var DashboardApi = class extends BaseAPI {
|
|
516
|
+
/**
|
|
517
|
+
*
|
|
518
|
+
* @param {*} [options] Override http request option.
|
|
519
|
+
* @throws {RequiredError}
|
|
520
|
+
* @memberof DashboardApi
|
|
521
|
+
*/
|
|
522
|
+
getStats(options) {
|
|
523
|
+
return DashboardApiFp(this.configuration).getStats(options).then((request) => request(this.axios, this.basePath));
|
|
524
|
+
}
|
|
525
|
+
};
|
|
371
526
|
var DishesApiAxiosParamCreator = function(configuration) {
|
|
372
527
|
return {
|
|
373
528
|
/**
|
|
@@ -469,6 +624,262 @@ var DishesApi = class extends BaseAPI {
|
|
|
469
624
|
return DishesApiFp(this.configuration).findOne(id, options).then((request) => request(this.axios, this.basePath));
|
|
470
625
|
}
|
|
471
626
|
};
|
|
627
|
+
var IngredientsApiAxiosParamCreator = function(configuration) {
|
|
628
|
+
return {
|
|
629
|
+
/**
|
|
630
|
+
*
|
|
631
|
+
* @param {*} [options] Override http request option.
|
|
632
|
+
* @throws {RequiredError}
|
|
633
|
+
*/
|
|
634
|
+
findAll: async (options = {}) => {
|
|
635
|
+
const localVarPath = `/ingredients`;
|
|
636
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
637
|
+
let baseOptions;
|
|
638
|
+
if (configuration) {
|
|
639
|
+
baseOptions = configuration.baseOptions;
|
|
640
|
+
}
|
|
641
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
642
|
+
const localVarHeaderParameter = {};
|
|
643
|
+
const localVarQueryParameter = {};
|
|
644
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
645
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
646
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
647
|
+
return {
|
|
648
|
+
url: toPathString(localVarUrlObj),
|
|
649
|
+
options: localVarRequestOptions
|
|
650
|
+
};
|
|
651
|
+
},
|
|
652
|
+
/**
|
|
653
|
+
*
|
|
654
|
+
* @param {number} id
|
|
655
|
+
* @param {*} [options] Override http request option.
|
|
656
|
+
* @throws {RequiredError}
|
|
657
|
+
*/
|
|
658
|
+
findOne: async (id, options = {}) => {
|
|
659
|
+
assertParamExists("findOne", "id", id);
|
|
660
|
+
const localVarPath = `/ingredients/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
661
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
662
|
+
let baseOptions;
|
|
663
|
+
if (configuration) {
|
|
664
|
+
baseOptions = configuration.baseOptions;
|
|
665
|
+
}
|
|
666
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
667
|
+
const localVarHeaderParameter = {};
|
|
668
|
+
const localVarQueryParameter = {};
|
|
669
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
670
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
671
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
672
|
+
return {
|
|
673
|
+
url: toPathString(localVarUrlObj),
|
|
674
|
+
options: localVarRequestOptions
|
|
675
|
+
};
|
|
676
|
+
}
|
|
677
|
+
};
|
|
678
|
+
};
|
|
679
|
+
var IngredientsApiFp = function(configuration) {
|
|
680
|
+
const localVarAxiosParamCreator = IngredientsApiAxiosParamCreator(configuration);
|
|
681
|
+
return {
|
|
682
|
+
/**
|
|
683
|
+
*
|
|
684
|
+
* @param {*} [options] Override http request option.
|
|
685
|
+
* @throws {RequiredError}
|
|
686
|
+
*/
|
|
687
|
+
async findAll(options) {
|
|
688
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.findAll(options);
|
|
689
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
690
|
+
const localVarOperationServerBasePath = operationServerMap["IngredientsApi.findAll"]?.[localVarOperationServerIndex]?.url;
|
|
691
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
692
|
+
},
|
|
693
|
+
/**
|
|
694
|
+
*
|
|
695
|
+
* @param {number} id
|
|
696
|
+
* @param {*} [options] Override http request option.
|
|
697
|
+
* @throws {RequiredError}
|
|
698
|
+
*/
|
|
699
|
+
async findOne(id, options) {
|
|
700
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.findOne(id, options);
|
|
701
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
702
|
+
const localVarOperationServerBasePath = operationServerMap["IngredientsApi.findOne"]?.[localVarOperationServerIndex]?.url;
|
|
703
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
704
|
+
}
|
|
705
|
+
};
|
|
706
|
+
};
|
|
707
|
+
var IngredientsApi = class extends BaseAPI {
|
|
708
|
+
/**
|
|
709
|
+
*
|
|
710
|
+
* @param {*} [options] Override http request option.
|
|
711
|
+
* @throws {RequiredError}
|
|
712
|
+
* @memberof IngredientsApi
|
|
713
|
+
*/
|
|
714
|
+
findAll(options) {
|
|
715
|
+
return IngredientsApiFp(this.configuration).findAll(options).then((request) => request(this.axios, this.basePath));
|
|
716
|
+
}
|
|
717
|
+
/**
|
|
718
|
+
*
|
|
719
|
+
* @param {number} id
|
|
720
|
+
* @param {*} [options] Override http request option.
|
|
721
|
+
* @throws {RequiredError}
|
|
722
|
+
* @memberof IngredientsApi
|
|
723
|
+
*/
|
|
724
|
+
findOne(id, options) {
|
|
725
|
+
return IngredientsApiFp(this.configuration).findOne(id, options).then((request) => request(this.axios, this.basePath));
|
|
726
|
+
}
|
|
727
|
+
};
|
|
728
|
+
var InventoryApiAxiosParamCreator = function(configuration) {
|
|
729
|
+
return {
|
|
730
|
+
/**
|
|
731
|
+
*
|
|
732
|
+
* @param {*} [options] Override http request option.
|
|
733
|
+
* @throws {RequiredError}
|
|
734
|
+
*/
|
|
735
|
+
findAll: async (options = {}) => {
|
|
736
|
+
const localVarPath = `/inventory`;
|
|
737
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
738
|
+
let baseOptions;
|
|
739
|
+
if (configuration) {
|
|
740
|
+
baseOptions = configuration.baseOptions;
|
|
741
|
+
}
|
|
742
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
743
|
+
const localVarHeaderParameter = {};
|
|
744
|
+
const localVarQueryParameter = {};
|
|
745
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
746
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
747
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
748
|
+
return {
|
|
749
|
+
url: toPathString(localVarUrlObj),
|
|
750
|
+
options: localVarRequestOptions
|
|
751
|
+
};
|
|
752
|
+
},
|
|
753
|
+
/**
|
|
754
|
+
*
|
|
755
|
+
* @param {number} id
|
|
756
|
+
* @param {*} [options] Override http request option.
|
|
757
|
+
* @throws {RequiredError}
|
|
758
|
+
*/
|
|
759
|
+
findOne: async (id, options = {}) => {
|
|
760
|
+
assertParamExists("findOne", "id", id);
|
|
761
|
+
const localVarPath = `/inventory/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
762
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
763
|
+
let baseOptions;
|
|
764
|
+
if (configuration) {
|
|
765
|
+
baseOptions = configuration.baseOptions;
|
|
766
|
+
}
|
|
767
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
768
|
+
const localVarHeaderParameter = {};
|
|
769
|
+
const localVarQueryParameter = {};
|
|
770
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
771
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
772
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
773
|
+
return {
|
|
774
|
+
url: toPathString(localVarUrlObj),
|
|
775
|
+
options: localVarRequestOptions
|
|
776
|
+
};
|
|
777
|
+
}
|
|
778
|
+
};
|
|
779
|
+
};
|
|
780
|
+
var InventoryApiFp = function(configuration) {
|
|
781
|
+
const localVarAxiosParamCreator = InventoryApiAxiosParamCreator(configuration);
|
|
782
|
+
return {
|
|
783
|
+
/**
|
|
784
|
+
*
|
|
785
|
+
* @param {*} [options] Override http request option.
|
|
786
|
+
* @throws {RequiredError}
|
|
787
|
+
*/
|
|
788
|
+
async findAll(options) {
|
|
789
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.findAll(options);
|
|
790
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
791
|
+
const localVarOperationServerBasePath = operationServerMap["InventoryApi.findAll"]?.[localVarOperationServerIndex]?.url;
|
|
792
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
793
|
+
},
|
|
794
|
+
/**
|
|
795
|
+
*
|
|
796
|
+
* @param {number} id
|
|
797
|
+
* @param {*} [options] Override http request option.
|
|
798
|
+
* @throws {RequiredError}
|
|
799
|
+
*/
|
|
800
|
+
async findOne(id, options) {
|
|
801
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.findOne(id, options);
|
|
802
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
803
|
+
const localVarOperationServerBasePath = operationServerMap["InventoryApi.findOne"]?.[localVarOperationServerIndex]?.url;
|
|
804
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
805
|
+
}
|
|
806
|
+
};
|
|
807
|
+
};
|
|
808
|
+
var InventoryApi = class extends BaseAPI {
|
|
809
|
+
/**
|
|
810
|
+
*
|
|
811
|
+
* @param {*} [options] Override http request option.
|
|
812
|
+
* @throws {RequiredError}
|
|
813
|
+
* @memberof InventoryApi
|
|
814
|
+
*/
|
|
815
|
+
findAll(options) {
|
|
816
|
+
return InventoryApiFp(this.configuration).findAll(options).then((request) => request(this.axios, this.basePath));
|
|
817
|
+
}
|
|
818
|
+
/**
|
|
819
|
+
*
|
|
820
|
+
* @param {number} id
|
|
821
|
+
* @param {*} [options] Override http request option.
|
|
822
|
+
* @throws {RequiredError}
|
|
823
|
+
* @memberof InventoryApi
|
|
824
|
+
*/
|
|
825
|
+
findOne(id, options) {
|
|
826
|
+
return InventoryApiFp(this.configuration).findOne(id, options).then((request) => request(this.axios, this.basePath));
|
|
827
|
+
}
|
|
828
|
+
};
|
|
829
|
+
var MenuApiAxiosParamCreator = function(configuration) {
|
|
830
|
+
return {
|
|
831
|
+
/**
|
|
832
|
+
*
|
|
833
|
+
* @param {*} [options] Override http request option.
|
|
834
|
+
* @throws {RequiredError}
|
|
835
|
+
*/
|
|
836
|
+
findAll: async (options = {}) => {
|
|
837
|
+
const localVarPath = `/menu`;
|
|
838
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
839
|
+
let baseOptions;
|
|
840
|
+
if (configuration) {
|
|
841
|
+
baseOptions = configuration.baseOptions;
|
|
842
|
+
}
|
|
843
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
844
|
+
const localVarHeaderParameter = {};
|
|
845
|
+
const localVarQueryParameter = {};
|
|
846
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
847
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
848
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
849
|
+
return {
|
|
850
|
+
url: toPathString(localVarUrlObj),
|
|
851
|
+
options: localVarRequestOptions
|
|
852
|
+
};
|
|
853
|
+
}
|
|
854
|
+
};
|
|
855
|
+
};
|
|
856
|
+
var MenuApiFp = function(configuration) {
|
|
857
|
+
const localVarAxiosParamCreator = MenuApiAxiosParamCreator(configuration);
|
|
858
|
+
return {
|
|
859
|
+
/**
|
|
860
|
+
*
|
|
861
|
+
* @param {*} [options] Override http request option.
|
|
862
|
+
* @throws {RequiredError}
|
|
863
|
+
*/
|
|
864
|
+
async findAll(options) {
|
|
865
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.findAll(options);
|
|
866
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
867
|
+
const localVarOperationServerBasePath = operationServerMap["MenuApi.findAll"]?.[localVarOperationServerIndex]?.url;
|
|
868
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
869
|
+
}
|
|
870
|
+
};
|
|
871
|
+
};
|
|
872
|
+
var MenuApi = class extends BaseAPI {
|
|
873
|
+
/**
|
|
874
|
+
*
|
|
875
|
+
* @param {*} [options] Override http request option.
|
|
876
|
+
* @throws {RequiredError}
|
|
877
|
+
* @memberof MenuApi
|
|
878
|
+
*/
|
|
879
|
+
findAll(options) {
|
|
880
|
+
return MenuApiFp(this.configuration).findAll(options).then((request) => request(this.axios, this.basePath));
|
|
881
|
+
}
|
|
882
|
+
};
|
|
472
883
|
var OrdersApiAxiosParamCreator = function(configuration) {
|
|
473
884
|
return {
|
|
474
885
|
/**
|
|
@@ -838,6 +1249,60 @@ var ProductsApi = class extends BaseAPI {
|
|
|
838
1249
|
return ProductsApiFp(this.configuration).findOne(id, options).then((request) => request(this.axios, this.basePath));
|
|
839
1250
|
}
|
|
840
1251
|
};
|
|
1252
|
+
var TransactionsApiAxiosParamCreator = function(configuration) {
|
|
1253
|
+
return {
|
|
1254
|
+
/**
|
|
1255
|
+
*
|
|
1256
|
+
* @param {*} [options] Override http request option.
|
|
1257
|
+
* @throws {RequiredError}
|
|
1258
|
+
*/
|
|
1259
|
+
findAll: async (options = {}) => {
|
|
1260
|
+
const localVarPath = `/transactions`;
|
|
1261
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1262
|
+
let baseOptions;
|
|
1263
|
+
if (configuration) {
|
|
1264
|
+
baseOptions = configuration.baseOptions;
|
|
1265
|
+
}
|
|
1266
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
1267
|
+
const localVarHeaderParameter = {};
|
|
1268
|
+
const localVarQueryParameter = {};
|
|
1269
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1270
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1271
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
1272
|
+
return {
|
|
1273
|
+
url: toPathString(localVarUrlObj),
|
|
1274
|
+
options: localVarRequestOptions
|
|
1275
|
+
};
|
|
1276
|
+
}
|
|
1277
|
+
};
|
|
1278
|
+
};
|
|
1279
|
+
var TransactionsApiFp = function(configuration) {
|
|
1280
|
+
const localVarAxiosParamCreator = TransactionsApiAxiosParamCreator(configuration);
|
|
1281
|
+
return {
|
|
1282
|
+
/**
|
|
1283
|
+
*
|
|
1284
|
+
* @param {*} [options] Override http request option.
|
|
1285
|
+
* @throws {RequiredError}
|
|
1286
|
+
*/
|
|
1287
|
+
async findAll(options) {
|
|
1288
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.findAll(options);
|
|
1289
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1290
|
+
const localVarOperationServerBasePath = operationServerMap["TransactionsApi.findAll"]?.[localVarOperationServerIndex]?.url;
|
|
1291
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1292
|
+
}
|
|
1293
|
+
};
|
|
1294
|
+
};
|
|
1295
|
+
var TransactionsApi = class extends BaseAPI {
|
|
1296
|
+
/**
|
|
1297
|
+
*
|
|
1298
|
+
* @param {*} [options] Override http request option.
|
|
1299
|
+
* @throws {RequiredError}
|
|
1300
|
+
* @memberof TransactionsApi
|
|
1301
|
+
*/
|
|
1302
|
+
findAll(options) {
|
|
1303
|
+
return TransactionsApiFp(this.configuration).findAll(options).then((request) => request(this.axios, this.basePath));
|
|
1304
|
+
}
|
|
1305
|
+
};
|
|
841
1306
|
|
|
842
1307
|
// src/api/generated/configuration.ts
|
|
843
1308
|
var Configuration = class {
|
|
@@ -929,10 +1394,16 @@ var Configuration = class {
|
|
|
929
1394
|
};
|
|
930
1395
|
var tanstackClient;
|
|
931
1396
|
var authApi;
|
|
1397
|
+
var cashShiftsApi;
|
|
932
1398
|
var categoriesApi;
|
|
1399
|
+
var dashboardApi;
|
|
933
1400
|
var dishesApi;
|
|
1401
|
+
var ingredientsApi;
|
|
1402
|
+
var inventoryApi;
|
|
1403
|
+
var menuApi;
|
|
934
1404
|
var ordersApi;
|
|
935
1405
|
var productsApi;
|
|
1406
|
+
var transactionsApi;
|
|
936
1407
|
function initApiClient(config) {
|
|
937
1408
|
const apiClient = globalAxios2.create({
|
|
938
1409
|
baseURL: config.baseURL,
|
|
@@ -943,10 +1414,16 @@ function initApiClient(config) {
|
|
|
943
1414
|
});
|
|
944
1415
|
tanstackClient = new QueryClient();
|
|
945
1416
|
authApi = new AuthApi(configuration, void 0, apiClient);
|
|
1417
|
+
cashShiftsApi = new CashShiftsApi(configuration, void 0, apiClient);
|
|
946
1418
|
categoriesApi = new CategoriesApi(configuration, void 0, apiClient);
|
|
1419
|
+
dashboardApi = new DashboardApi(configuration, void 0, apiClient);
|
|
947
1420
|
dishesApi = new DishesApi(configuration, void 0, apiClient);
|
|
1421
|
+
ingredientsApi = new IngredientsApi(configuration, void 0, apiClient);
|
|
1422
|
+
inventoryApi = new InventoryApi(configuration, void 0, apiClient);
|
|
1423
|
+
menuApi = new MenuApi(configuration, void 0, apiClient);
|
|
948
1424
|
ordersApi = new OrdersApi(configuration, void 0, apiClient);
|
|
949
1425
|
productsApi = new ProductsApi(configuration, void 0, apiClient);
|
|
1426
|
+
transactionsApi = new TransactionsApi(configuration, void 0, apiClient);
|
|
950
1427
|
return apiClient;
|
|
951
1428
|
}
|
|
952
1429
|
var useAuthApi = () => {
|
|
@@ -978,6 +1455,20 @@ var useAuthApi = () => {
|
|
|
978
1455
|
mutateSignUp
|
|
979
1456
|
};
|
|
980
1457
|
};
|
|
1458
|
+
var getCashShiftsQuery = () => queryOptions({
|
|
1459
|
+
queryKey: ["cash-shifts"],
|
|
1460
|
+
queryFn: () => cashShiftsApi.findAll().then((res) => res.data)
|
|
1461
|
+
});
|
|
1462
|
+
var getCashShiftQuery = (id) => queryOptions({
|
|
1463
|
+
queryKey: ["cash-shifts", id],
|
|
1464
|
+
queryFn: () => cashShiftsApi.findOne(id).then((res) => res.data)
|
|
1465
|
+
});
|
|
1466
|
+
var useCashShiftsApi = () => {
|
|
1467
|
+
return {
|
|
1468
|
+
getCashShiftsQuery,
|
|
1469
|
+
getCashShiftQuery
|
|
1470
|
+
};
|
|
1471
|
+
};
|
|
981
1472
|
var getCategoriesQuery = () => queryOptions({
|
|
982
1473
|
queryKey: ["categories"],
|
|
983
1474
|
queryFn: () => categoriesApi.findAll().then((res) => res.data)
|
|
@@ -987,6 +1478,15 @@ var useCategoriesApi = () => {
|
|
|
987
1478
|
getCategoriesQuery
|
|
988
1479
|
};
|
|
989
1480
|
};
|
|
1481
|
+
var getStatsQuery = () => queryOptions({
|
|
1482
|
+
queryKey: ["dashboard"],
|
|
1483
|
+
queryFn: () => dashboardApi.getStats().then((res) => res.data)
|
|
1484
|
+
});
|
|
1485
|
+
var useDashboardApi = () => {
|
|
1486
|
+
return {
|
|
1487
|
+
getStatsQuery
|
|
1488
|
+
};
|
|
1489
|
+
};
|
|
990
1490
|
var getDishesQuery = () => queryOptions({
|
|
991
1491
|
queryKey: ["dishes"],
|
|
992
1492
|
queryFn: () => dishesApi.findAll().then((res) => res.data)
|
|
@@ -1001,6 +1501,43 @@ var useDishesApi = () => {
|
|
|
1001
1501
|
getDishQuery
|
|
1002
1502
|
};
|
|
1003
1503
|
};
|
|
1504
|
+
var getIngredientsQuery = () => queryOptions({
|
|
1505
|
+
queryKey: ["ingredients"],
|
|
1506
|
+
queryFn: () => ingredientsApi.findAll().then((res) => res.data)
|
|
1507
|
+
});
|
|
1508
|
+
var getIngredientQuery = (id) => queryOptions({
|
|
1509
|
+
queryKey: ["ingredients", id],
|
|
1510
|
+
queryFn: () => ingredientsApi.findOne(id).then((res) => res.data)
|
|
1511
|
+
});
|
|
1512
|
+
var useIngredientsApi = () => {
|
|
1513
|
+
return {
|
|
1514
|
+
getIngredientsQuery,
|
|
1515
|
+
getIngredientQuery
|
|
1516
|
+
};
|
|
1517
|
+
};
|
|
1518
|
+
var getInventoriesQuery = () => queryOptions({
|
|
1519
|
+
queryKey: ["inventory"],
|
|
1520
|
+
queryFn: () => inventoryApi.findAll().then((res) => res.data)
|
|
1521
|
+
});
|
|
1522
|
+
var getInventoryQuery = (id) => queryOptions({
|
|
1523
|
+
queryKey: ["inventory", id],
|
|
1524
|
+
queryFn: () => inventoryApi.findOne(id).then((res) => res.data)
|
|
1525
|
+
});
|
|
1526
|
+
var useInventoryApi = () => {
|
|
1527
|
+
return {
|
|
1528
|
+
getInventoriesQuery,
|
|
1529
|
+
getInventoryQuery
|
|
1530
|
+
};
|
|
1531
|
+
};
|
|
1532
|
+
var getMenuQuery = () => queryOptions({
|
|
1533
|
+
queryKey: ["menu"],
|
|
1534
|
+
queryFn: () => menuApi.findAll().then((res) => res.data)
|
|
1535
|
+
});
|
|
1536
|
+
var useMenuApi = () => {
|
|
1537
|
+
return {
|
|
1538
|
+
getMenuQuery
|
|
1539
|
+
};
|
|
1540
|
+
};
|
|
1004
1541
|
var getOrdersQuery = (params) => queryOptions({
|
|
1005
1542
|
queryKey: ["orders", params],
|
|
1006
1543
|
queryFn: () => ordersApi.findAll(params?.page, params?.limit, params?.status).then((res) => res.data)
|
|
@@ -1049,7 +1586,16 @@ var useProductsApi = () => {
|
|
|
1049
1586
|
getProductsQuery
|
|
1050
1587
|
};
|
|
1051
1588
|
};
|
|
1589
|
+
var getTransactionsQuery = () => queryOptions({
|
|
1590
|
+
queryKey: ["transactions"],
|
|
1591
|
+
queryFn: () => transactionsApi.findAll().then((res) => res.data)
|
|
1592
|
+
});
|
|
1593
|
+
var useTransactionsApi = () => {
|
|
1594
|
+
return {
|
|
1595
|
+
getTransactionsQuery
|
|
1596
|
+
};
|
|
1597
|
+
};
|
|
1052
1598
|
|
|
1053
|
-
export { authApi, categoriesApi, dishesApi, initApiClient, ordersApi, productsApi, tanstackClient, useAuthApi, useCategoriesApi, useDishesApi, useOrdersApi, useProductsApi };
|
|
1599
|
+
export { authApi, cashShiftsApi, categoriesApi, dashboardApi, dishesApi, ingredientsApi, initApiClient, inventoryApi, menuApi, ordersApi, productsApi, tanstackClient, transactionsApi, useAuthApi, useCashShiftsApi, useCategoriesApi, useDashboardApi, useDishesApi, useIngredientsApi, useInventoryApi, useMenuApi, useOrdersApi, useProductsApi, useTransactionsApi };
|
|
1054
1600
|
//# sourceMappingURL=index.js.map
|
|
1055
1601
|
//# sourceMappingURL=index.js.map
|