@horpynka/api-sdk 1.0.14 → 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.cjs +49 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +69 -0
- package/dist/index.d.ts +69 -0
- package/dist/index.js +49 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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
|
|
@@ -871,6 +920,12 @@ interface Product {
|
|
|
871
920
|
* @memberof Product
|
|
872
921
|
*/
|
|
873
922
|
'sellingPrice': number;
|
|
923
|
+
/**
|
|
924
|
+
*
|
|
925
|
+
* @type {string}
|
|
926
|
+
* @memberof Product
|
|
927
|
+
*/
|
|
928
|
+
'measurementUnit': ProductMeasurementUnitEnum;
|
|
874
929
|
/**
|
|
875
930
|
*
|
|
876
931
|
* @type {number}
|
|
@@ -902,6 +957,12 @@ interface Product {
|
|
|
902
957
|
*/
|
|
903
958
|
'updatedAt': string;
|
|
904
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];
|
|
905
966
|
/**
|
|
906
967
|
*
|
|
907
968
|
* @export
|
|
@@ -1343,6 +1404,14 @@ declare class OrdersApi extends BaseAPI {
|
|
|
1343
1404
|
* @extends {BaseAPI}
|
|
1344
1405
|
*/
|
|
1345
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>>;
|
|
1346
1415
|
/**
|
|
1347
1416
|
*
|
|
1348
1417
|
* @param {*} [options] Override http request option.
|
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
|
|
@@ -871,6 +920,12 @@ interface Product {
|
|
|
871
920
|
* @memberof Product
|
|
872
921
|
*/
|
|
873
922
|
'sellingPrice': number;
|
|
923
|
+
/**
|
|
924
|
+
*
|
|
925
|
+
* @type {string}
|
|
926
|
+
* @memberof Product
|
|
927
|
+
*/
|
|
928
|
+
'measurementUnit': ProductMeasurementUnitEnum;
|
|
874
929
|
/**
|
|
875
930
|
*
|
|
876
931
|
* @type {number}
|
|
@@ -902,6 +957,12 @@ interface Product {
|
|
|
902
957
|
*/
|
|
903
958
|
'updatedAt': string;
|
|
904
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];
|
|
905
966
|
/**
|
|
906
967
|
*
|
|
907
968
|
* @export
|
|
@@ -1343,6 +1404,14 @@ declare class OrdersApi extends BaseAPI {
|
|
|
1343
1404
|
* @extends {BaseAPI}
|
|
1344
1405
|
*/
|
|
1345
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>>;
|
|
1346
1415
|
/**
|
|
1347
1416
|
*
|
|
1348
1417
|
* @param {*} [options] Override http request option.
|
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.
|