@longvansoftware/storefront-js-client 4.2.4 → 4.2.5

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.
@@ -40,7 +40,7 @@ exports.UPDATE_PRICE_PROMOTION = (0, graphql_tag_1.gql) `
40
40
  mutation UpdatePricePromotion(
41
41
  $productId: String!
42
42
  $storeId: String!
43
- $price: BigDecimal!
43
+ $price: BigDecimal
44
44
  $updatedBy: String!
45
45
  ) {
46
46
  updatePricePromotion(
@@ -28,4 +28,5 @@ export declare class PortalService extends Service {
28
28
  getWorkSchedule(orgId: string, query?: Record<string, any>): Promise<any>;
29
29
  updateSchedule(orgId: string, data: Record<string, any>): Promise<any>;
30
30
  getPosition(query?: Record<string, any>): Promise<any>;
31
+ getPositionForTime(query?: Record<string, any>): Promise<any>;
31
32
  }
@@ -404,5 +404,29 @@ class PortalService extends serviceSDK_1.Service {
404
404
  }
405
405
  });
406
406
  }
407
+ getPositionForTime(query) {
408
+ return __awaiter(this, void 0, void 0, function* () {
409
+ const method = "GET";
410
+ const baseUrl = `/dynamic-collection/public/v2/visit/slot`;
411
+ const params = new URLSearchParams();
412
+ if (query) {
413
+ Object.entries(query).forEach(([key, value]) => {
414
+ if (value !== undefined && value !== null) {
415
+ params.append(key, String(value));
416
+ }
417
+ });
418
+ }
419
+ const endpoint = params.toString()
420
+ ? `${baseUrl}?${params.toString()}`
421
+ : baseUrl;
422
+ try {
423
+ const response = yield this.restApiCallWithNoToken(endpoint, method);
424
+ return response;
425
+ }
426
+ catch (error) {
427
+ throw error;
428
+ }
429
+ });
430
+ }
407
431
  }
408
432
  exports.PortalService = PortalService;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longvansoftware/storefront-js-client",
3
- "version": "4.2.4",
3
+ "version": "4.2.5",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [