@longvansoftware/storefront-js-client 4.1.2 → 4.1.4

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.
@@ -25,4 +25,5 @@ export declare class PortalService extends Service {
25
25
  getMenus(menuId: string): Promise<any>;
26
26
  getBooking(query?: Record<string, any>): Promise<any>;
27
27
  bookingSchedule(data: Record<string, any>): Promise<any>;
28
+ getWorkSchedule(orgId: string, query?: Record<string, any>): Promise<any>;
28
29
  }
@@ -343,5 +343,29 @@ class PortalService extends serviceSDK_1.Service {
343
343
  }
344
344
  });
345
345
  }
346
+ getWorkSchedule(orgId, query) {
347
+ return __awaiter(this, void 0, void 0, function* () {
348
+ const method = "GET";
349
+ const baseUrl = `/dynamic-collection/public/v2/schedule/work/visit/${orgId}`;
350
+ const params = new URLSearchParams();
351
+ if (query) {
352
+ Object.entries(query).forEach(([key, value]) => {
353
+ if (value !== undefined && value !== null) {
354
+ params.append(key, String(value));
355
+ }
356
+ });
357
+ }
358
+ const endpoint = params.toString()
359
+ ? `${baseUrl}?${params.toString()}`
360
+ : baseUrl;
361
+ try {
362
+ const response = yield this.restApiCallWithNoHeader(endpoint, method);
363
+ return response;
364
+ }
365
+ catch (error) {
366
+ throw error;
367
+ }
368
+ });
369
+ }
346
370
  }
347
371
  exports.PortalService = PortalService;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longvansoftware/storefront-js-client",
3
- "version": "4.1.2",
3
+ "version": "4.1.4",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [