@horpynka/api-sdk 1.0.13 → 1.0.15

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.d.cts CHANGED
@@ -294,6 +294,55 @@ declare const CreateOrderDtoStatusEnum: {
294
294
  readonly Completed: "COMPLETED";
295
295
  };
296
296
  type CreateOrderDtoStatusEnum = typeof CreateOrderDtoStatusEnum[keyof typeof CreateOrderDtoStatusEnum];
297
+ /**
298
+ *
299
+ * @export
300
+ * @interface CreateProductDto
301
+ */
302
+ interface CreateProductDto {
303
+ /**
304
+ *
305
+ * @type {string}
306
+ * @memberof CreateProductDto
307
+ */
308
+ 'name': string;
309
+ /**
310
+ *
311
+ * @type {number}
312
+ * @memberof CreateProductDto
313
+ */
314
+ 'categoryId': number;
315
+ /**
316
+ *
317
+ * @type {string}
318
+ * @memberof CreateProductDto
319
+ */
320
+ 'measurementUnit': CreateProductDtoMeasurementUnitEnum;
321
+ /**
322
+ *
323
+ * @type {number}
324
+ * @memberof CreateProductDto
325
+ */
326
+ 'ownPrice': number;
327
+ /**
328
+ *
329
+ * @type {number}
330
+ * @memberof CreateProductDto
331
+ */
332
+ 'sellingPrice': number;
333
+ /**
334
+ * @default true
335
+ * @type {boolean}
336
+ * @memberof CreateProductDto
337
+ */
338
+ 'selling'?: boolean;
339
+ }
340
+ declare const CreateProductDtoMeasurementUnitEnum: {
341
+ readonly G: "g";
342
+ readonly Ml: "ml";
343
+ readonly Pcs: "pcs";
344
+ };
345
+ type CreateProductDtoMeasurementUnitEnum = typeof CreateProductDtoMeasurementUnitEnum[keyof typeof CreateProductDtoMeasurementUnitEnum];
297
346
  /**
298
347
  *
299
348
  * @export
@@ -471,6 +520,25 @@ interface DishIngredient {
471
520
  */
472
521
  'ingredient': Ingredient;
473
522
  }
523
+ /**
524
+ *
525
+ * @export
526
+ * @interface FindAllCategoriesResponseDto
527
+ */
528
+ interface FindAllCategoriesResponseDto {
529
+ /**
530
+ *
531
+ * @type {Array<Category>}
532
+ * @memberof FindAllCategoriesResponseDto
533
+ */
534
+ 'dishesCategories': Array<Category>;
535
+ /**
536
+ *
537
+ * @type {Array<Category>}
538
+ * @memberof FindAllCategoriesResponseDto
539
+ */
540
+ 'productsCategories': Array<Category>;
541
+ }
474
542
  /**
475
543
  *
476
544
  * @export
@@ -852,6 +920,12 @@ interface Product {
852
920
  * @memberof Product
853
921
  */
854
922
  'sellingPrice': number;
923
+ /**
924
+ *
925
+ * @type {string}
926
+ * @memberof Product
927
+ */
928
+ 'measurementUnit': ProductMeasurementUnitEnum;
855
929
  /**
856
930
  *
857
931
  * @type {number}
@@ -883,6 +957,12 @@ interface Product {
883
957
  */
884
958
  'updatedAt': string;
885
959
  }
960
+ declare const ProductMeasurementUnitEnum: {
961
+ readonly G: "g";
962
+ readonly Ml: "ml";
963
+ readonly Pcs: "pcs";
964
+ };
965
+ type ProductMeasurementUnitEnum = typeof ProductMeasurementUnitEnum[keyof typeof ProductMeasurementUnitEnum];
886
966
  /**
887
967
  *
888
968
  * @export
@@ -1157,7 +1237,7 @@ declare class CategoriesApi extends BaseAPI {
1157
1237
  * @throws {RequiredError}
1158
1238
  * @memberof CategoriesApi
1159
1239
  */
1160
- findAll(options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<object, any, {}, any>>;
1240
+ findAll(options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<FindAllCategoriesResponseDto, any, {}, any>>;
1161
1241
  /**
1162
1242
  *
1163
1243
  * @param {number} id
@@ -1324,6 +1404,14 @@ declare class OrdersApi extends BaseAPI {
1324
1404
  * @extends {BaseAPI}
1325
1405
  */
1326
1406
  declare class ProductsApi extends BaseAPI {
1407
+ /**
1408
+ *
1409
+ * @param {CreateProductDto} createProductDto
1410
+ * @param {*} [options] Override http request option.
1411
+ * @throws {RequiredError}
1412
+ * @memberof ProductsApi
1413
+ */
1414
+ create(createProductDto: CreateProductDto, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<Product, any, {}, any>>;
1327
1415
  /**
1328
1416
  *
1329
1417
  * @param {*} [options] Override http request option.
@@ -1398,9 +1486,9 @@ declare const useCashShiftsApi: () => {
1398
1486
  };
1399
1487
 
1400
1488
  declare const useCategoriesApi: () => {
1401
- getCategoriesQuery: () => _tanstack_query_core.OmitKeyof<_tanstack_react_query.UseQueryOptions<object, Error, object, string[]>, "queryFn"> & {
1402
- queryFn?: _tanstack_query_core.QueryFunction<object, string[], never> | undefined;
1403
- } & _tanstack_query_core.QueryKeyWithDataTag<string[], object, Error>;
1489
+ getCategoriesQuery: () => _tanstack_query_core.OmitKeyof<_tanstack_react_query.UseQueryOptions<FindAllCategoriesResponseDto, Error, FindAllCategoriesResponseDto, string[]>, "queryFn"> & {
1490
+ queryFn?: _tanstack_query_core.QueryFunction<FindAllCategoriesResponseDto, string[], never> | undefined;
1491
+ } & _tanstack_query_core.QueryKeyWithDataTag<string[], FindAllCategoriesResponseDto, Error>;
1404
1492
  };
1405
1493
 
1406
1494
  declare const useDashboardApi: () => {
package/dist/index.d.ts CHANGED
@@ -294,6 +294,55 @@ declare const CreateOrderDtoStatusEnum: {
294
294
  readonly Completed: "COMPLETED";
295
295
  };
296
296
  type CreateOrderDtoStatusEnum = typeof CreateOrderDtoStatusEnum[keyof typeof CreateOrderDtoStatusEnum];
297
+ /**
298
+ *
299
+ * @export
300
+ * @interface CreateProductDto
301
+ */
302
+ interface CreateProductDto {
303
+ /**
304
+ *
305
+ * @type {string}
306
+ * @memberof CreateProductDto
307
+ */
308
+ 'name': string;
309
+ /**
310
+ *
311
+ * @type {number}
312
+ * @memberof CreateProductDto
313
+ */
314
+ 'categoryId': number;
315
+ /**
316
+ *
317
+ * @type {string}
318
+ * @memberof CreateProductDto
319
+ */
320
+ 'measurementUnit': CreateProductDtoMeasurementUnitEnum;
321
+ /**
322
+ *
323
+ * @type {number}
324
+ * @memberof CreateProductDto
325
+ */
326
+ 'ownPrice': number;
327
+ /**
328
+ *
329
+ * @type {number}
330
+ * @memberof CreateProductDto
331
+ */
332
+ 'sellingPrice': number;
333
+ /**
334
+ * @default true
335
+ * @type {boolean}
336
+ * @memberof CreateProductDto
337
+ */
338
+ 'selling'?: boolean;
339
+ }
340
+ declare const CreateProductDtoMeasurementUnitEnum: {
341
+ readonly G: "g";
342
+ readonly Ml: "ml";
343
+ readonly Pcs: "pcs";
344
+ };
345
+ type CreateProductDtoMeasurementUnitEnum = typeof CreateProductDtoMeasurementUnitEnum[keyof typeof CreateProductDtoMeasurementUnitEnum];
297
346
  /**
298
347
  *
299
348
  * @export
@@ -471,6 +520,25 @@ interface DishIngredient {
471
520
  */
472
521
  'ingredient': Ingredient;
473
522
  }
523
+ /**
524
+ *
525
+ * @export
526
+ * @interface FindAllCategoriesResponseDto
527
+ */
528
+ interface FindAllCategoriesResponseDto {
529
+ /**
530
+ *
531
+ * @type {Array<Category>}
532
+ * @memberof FindAllCategoriesResponseDto
533
+ */
534
+ 'dishesCategories': Array<Category>;
535
+ /**
536
+ *
537
+ * @type {Array<Category>}
538
+ * @memberof FindAllCategoriesResponseDto
539
+ */
540
+ 'productsCategories': Array<Category>;
541
+ }
474
542
  /**
475
543
  *
476
544
  * @export
@@ -852,6 +920,12 @@ interface Product {
852
920
  * @memberof Product
853
921
  */
854
922
  'sellingPrice': number;
923
+ /**
924
+ *
925
+ * @type {string}
926
+ * @memberof Product
927
+ */
928
+ 'measurementUnit': ProductMeasurementUnitEnum;
855
929
  /**
856
930
  *
857
931
  * @type {number}
@@ -883,6 +957,12 @@ interface Product {
883
957
  */
884
958
  'updatedAt': string;
885
959
  }
960
+ declare const ProductMeasurementUnitEnum: {
961
+ readonly G: "g";
962
+ readonly Ml: "ml";
963
+ readonly Pcs: "pcs";
964
+ };
965
+ type ProductMeasurementUnitEnum = typeof ProductMeasurementUnitEnum[keyof typeof ProductMeasurementUnitEnum];
886
966
  /**
887
967
  *
888
968
  * @export
@@ -1157,7 +1237,7 @@ declare class CategoriesApi extends BaseAPI {
1157
1237
  * @throws {RequiredError}
1158
1238
  * @memberof CategoriesApi
1159
1239
  */
1160
- findAll(options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<object, any, {}, any>>;
1240
+ findAll(options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<FindAllCategoriesResponseDto, any, {}, any>>;
1161
1241
  /**
1162
1242
  *
1163
1243
  * @param {number} id
@@ -1324,6 +1404,14 @@ declare class OrdersApi extends BaseAPI {
1324
1404
  * @extends {BaseAPI}
1325
1405
  */
1326
1406
  declare class ProductsApi extends BaseAPI {
1407
+ /**
1408
+ *
1409
+ * @param {CreateProductDto} createProductDto
1410
+ * @param {*} [options] Override http request option.
1411
+ * @throws {RequiredError}
1412
+ * @memberof ProductsApi
1413
+ */
1414
+ create(createProductDto: CreateProductDto, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<Product, any, {}, any>>;
1327
1415
  /**
1328
1416
  *
1329
1417
  * @param {*} [options] Override http request option.
@@ -1398,9 +1486,9 @@ declare const useCashShiftsApi: () => {
1398
1486
  };
1399
1487
 
1400
1488
  declare const useCategoriesApi: () => {
1401
- getCategoriesQuery: () => _tanstack_query_core.OmitKeyof<_tanstack_react_query.UseQueryOptions<object, Error, object, string[]>, "queryFn"> & {
1402
- queryFn?: _tanstack_query_core.QueryFunction<object, string[], never> | undefined;
1403
- } & _tanstack_query_core.QueryKeyWithDataTag<string[], object, Error>;
1489
+ getCategoriesQuery: () => _tanstack_query_core.OmitKeyof<_tanstack_react_query.UseQueryOptions<FindAllCategoriesResponseDto, Error, FindAllCategoriesResponseDto, string[]>, "queryFn"> & {
1490
+ queryFn?: _tanstack_query_core.QueryFunction<FindAllCategoriesResponseDto, string[], never> | undefined;
1491
+ } & _tanstack_query_core.QueryKeyWithDataTag<string[], FindAllCategoriesResponseDto, Error>;
1404
1492
  };
1405
1493
 
1406
1494
  declare const useDashboardApi: () => {
package/dist/index.js CHANGED
@@ -1150,6 +1150,33 @@ var OrdersApi = class extends BaseAPI {
1150
1150
  };
1151
1151
  var ProductsApiAxiosParamCreator = function(configuration) {
1152
1152
  return {
1153
+ /**
1154
+ *
1155
+ * @param {CreateProductDto} createProductDto
1156
+ * @param {*} [options] Override http request option.
1157
+ * @throws {RequiredError}
1158
+ */
1159
+ create: async (createProductDto, options = {}) => {
1160
+ assertParamExists("create", "createProductDto", createProductDto);
1161
+ const localVarPath = `/products`;
1162
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1163
+ let baseOptions;
1164
+ if (configuration) {
1165
+ baseOptions = configuration.baseOptions;
1166
+ }
1167
+ const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
1168
+ const localVarHeaderParameter = {};
1169
+ const localVarQueryParameter = {};
1170
+ localVarHeaderParameter["Content-Type"] = "application/json";
1171
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1172
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1173
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1174
+ localVarRequestOptions.data = serializeDataIfNeeded(createProductDto, localVarRequestOptions, configuration);
1175
+ return {
1176
+ url: toPathString(localVarUrlObj),
1177
+ options: localVarRequestOptions
1178
+ };
1179
+ },
1153
1180
  /**
1154
1181
  *
1155
1182
  * @param {*} [options] Override http request option.
@@ -1203,6 +1230,18 @@ var ProductsApiAxiosParamCreator = function(configuration) {
1203
1230
  var ProductsApiFp = function(configuration) {
1204
1231
  const localVarAxiosParamCreator = ProductsApiAxiosParamCreator(configuration);
1205
1232
  return {
1233
+ /**
1234
+ *
1235
+ * @param {CreateProductDto} createProductDto
1236
+ * @param {*} [options] Override http request option.
1237
+ * @throws {RequiredError}
1238
+ */
1239
+ async create(createProductDto, options) {
1240
+ const localVarAxiosArgs = await localVarAxiosParamCreator.create(createProductDto, options);
1241
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1242
+ const localVarOperationServerBasePath = operationServerMap["ProductsApi.create"]?.[localVarOperationServerIndex]?.url;
1243
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1244
+ },
1206
1245
  /**
1207
1246
  *
1208
1247
  * @param {*} [options] Override http request option.
@@ -1229,6 +1268,16 @@ var ProductsApiFp = function(configuration) {
1229
1268
  };
1230
1269
  };
1231
1270
  var ProductsApi = class extends BaseAPI {
1271
+ /**
1272
+ *
1273
+ * @param {CreateProductDto} createProductDto
1274
+ * @param {*} [options] Override http request option.
1275
+ * @throws {RequiredError}
1276
+ * @memberof ProductsApi
1277
+ */
1278
+ create(createProductDto, options) {
1279
+ return ProductsApiFp(this.configuration).create(createProductDto, options).then((request) => request(this.axios, this.basePath));
1280
+ }
1232
1281
  /**
1233
1282
  *
1234
1283
  * @param {*} [options] Override http request option.