@longvansoftware/storefront-js-client 2.5.1 → 2.5.2

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.
@@ -460,5 +460,50 @@ export declare class OrderService extends Service {
460
460
  removeMemberDiscount(orderId: string): Promise<any>;
461
461
  getInfoChatApp(attributesName: string): Promise<any>;
462
462
  validatePhoneNumber(phoneNumer: string): boolean;
463
- updateExchangeOrder(exchangeOrder: string, returnOrder: string, sellOrder: string): Promise<any>;
463
+ /**
464
+ *report by date month year
465
+ * @param employee_assign
466
+ * @param type_view
467
+ * @param date_from
468
+ * @param date_to
469
+ * @returns A promise that resolves with the created order.
470
+ * @throws If an error occurs while creating the order.
471
+ */
472
+ reportDateMonthYear(employee_assign: string, type_view: string, date_from: number, date_to: number): Promise<any>;
473
+ /**
474
+ * report by sale employee
475
+ * @param employee_assign
476
+ * @param date_from
477
+ * @param date_to
478
+ * @returns A promise that resolves with the created order.
479
+ * @throws If an error occurs while creating the order.
480
+ */
481
+ reportBySaleEmployee(employee_assign: string, date_from: number, date_to: number): Promise<any>;
482
+ /**
483
+ * report by sale employee
484
+ * @param employee_assign
485
+ * @param date_from
486
+ * @param date_to
487
+ * @returns A promise that resolves with the created order.
488
+ * @throws If an error occurs while creating the order.
489
+ */
490
+ reportByPaymentMethod(employee_assign: string, date_from: number, date_to: number): Promise<any>;
491
+ /**
492
+ * report by detail
493
+ * @param employee_assign
494
+ * @param type_view
495
+ * @param date_from
496
+ * @param date_to
497
+ * @returns A promise that resolves with the created order.
498
+ * @throws If an error occurs while creating the order.
499
+ */
500
+ reportByDetail(employee_assign: string, type_view: string, date_from: number, date_to: number): Promise<any>;
501
+ /**
502
+ * report by store
503
+ * @param date_from
504
+ * @param date_to
505
+ * @returns A promise that resolves with the created order.
506
+ * @throws If an error occurs while creating the order.
507
+ */
508
+ reporByStores(date_from: number, date_to: number): Promise<any>;
464
509
  }
@@ -1348,10 +1348,104 @@ class OrderService extends serviceSDK_1.Service {
1348
1348
  const res = (0, validatePhoneNumber_1.validatePhoneNumber)(phoneNumer);
1349
1349
  return res;
1350
1350
  }
1351
- updateExchangeOrder(exchangeOrder, returnOrder, sellOrder) {
1351
+ // statistic
1352
+ /**
1353
+ *report by date month year
1354
+ * @param employee_assign
1355
+ * @param type_view
1356
+ * @param date_from
1357
+ * @param date_to
1358
+ * @returns A promise that resolves with the created order.
1359
+ * @throws If an error occurs while creating the order.
1360
+ */
1361
+ reportDateMonthYear(employee_assign, type_view, date_from, date_to) {
1352
1362
  return __awaiter(this, void 0, void 0, function* () {
1353
- const endpoint = `/orders/${this.orgId}/${exchangeOrder}/${returnOrder}/${sellOrder}/updateExchangeOrder`;
1354
- const method = "PUT";
1363
+ const endpoint = `/orders/${this.orgId}/${this.storeId}/${employee_assign}/reportDateMonthYear?type_view=${type_view}&date_from=${date_from}&date_to=${date_to}`;
1364
+ const method = "GET";
1365
+ try {
1366
+ const response = yield this.restApiCallWithToken(endpoint, method);
1367
+ return response;
1368
+ }
1369
+ catch (error) {
1370
+ throw error;
1371
+ }
1372
+ });
1373
+ }
1374
+ /**
1375
+ * report by sale employee
1376
+ * @param employee_assign
1377
+ * @param date_from
1378
+ * @param date_to
1379
+ * @returns A promise that resolves with the created order.
1380
+ * @throws If an error occurs while creating the order.
1381
+ */
1382
+ reportBySaleEmployee(employee_assign, date_from, date_to) {
1383
+ return __awaiter(this, void 0, void 0, function* () {
1384
+ const endpoint = `/orders/${this.orgId}/${this.storeId}/${employee_assign}/reportBySaleEmployee?date_from=${date_from}&date_to=${date_to}`;
1385
+ const method = "GET";
1386
+ try {
1387
+ const response = yield this.restApiCallWithToken(endpoint, method);
1388
+ return response;
1389
+ }
1390
+ catch (error) {
1391
+ throw error;
1392
+ }
1393
+ });
1394
+ }
1395
+ /**
1396
+ * report by sale employee
1397
+ * @param employee_assign
1398
+ * @param date_from
1399
+ * @param date_to
1400
+ * @returns A promise that resolves with the created order.
1401
+ * @throws If an error occurs while creating the order.
1402
+ */
1403
+ reportByPaymentMethod(employee_assign, date_from, date_to) {
1404
+ return __awaiter(this, void 0, void 0, function* () {
1405
+ const endpoint = `/orders/${this.orgId}/${this.storeId}/${employee_assign}/reportByPaymentMethod?date_from=${date_from}&date_to=${date_to}`;
1406
+ const method = "GET";
1407
+ try {
1408
+ const response = yield this.restApiCallWithToken(endpoint, method);
1409
+ return response;
1410
+ }
1411
+ catch (error) {
1412
+ throw error;
1413
+ }
1414
+ });
1415
+ }
1416
+ /**
1417
+ * report by detail
1418
+ * @param employee_assign
1419
+ * @param type_view
1420
+ * @param date_from
1421
+ * @param date_to
1422
+ * @returns A promise that resolves with the created order.
1423
+ * @throws If an error occurs while creating the order.
1424
+ */
1425
+ reportByDetail(employee_assign, type_view, date_from, date_to) {
1426
+ return __awaiter(this, void 0, void 0, function* () {
1427
+ const endpoint = `/orders/${this.orgId}/${this.storeId}/${employee_assign}/reportByDetail?type_view=${type_view}&date_from=${date_from}&date_to=${date_to}`;
1428
+ const method = "GET";
1429
+ try {
1430
+ const response = yield this.restApiCallWithToken(endpoint, method);
1431
+ return response;
1432
+ }
1433
+ catch (error) {
1434
+ throw error;
1435
+ }
1436
+ });
1437
+ }
1438
+ /**
1439
+ * report by store
1440
+ * @param date_from
1441
+ * @param date_to
1442
+ * @returns A promise that resolves with the created order.
1443
+ * @throws If an error occurs while creating the order.
1444
+ */
1445
+ reporByStores(date_from, date_to) {
1446
+ return __awaiter(this, void 0, void 0, function* () {
1447
+ const endpoint = `/orders/${this.orgId}/${this.storeId}/reportByStores?date_from=${date_from}&date_to=${date_to}`;
1448
+ const method = "GET";
1355
1449
  try {
1356
1450
  const response = yield this.restApiCallWithToken(endpoint, method);
1357
1451
  return response;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longvansoftware/storefront-js-client",
3
- "version": "2.5.1",
3
+ "version": "2.5.2",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [