@longvansoftware/storefront-js-client 3.6.3 → 3.6.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.
@@ -169,6 +169,14 @@ exports.CREATE_PRODUCT_FROM_TEMPLATE = (0, graphql_tag_1.gql) `
169
169
  price
170
170
  displayPrice
171
171
  hint
172
+ brand {
173
+ id
174
+ createStamp
175
+ createdBy
176
+ name
177
+ image
178
+ imageIcon
179
+ }
172
180
  attributeDTOS {
173
181
  id
174
182
  key
@@ -119,6 +119,15 @@ exports.GET_PRODUCT_BY_ID_QUERY = (0, graphql_tag_1.gql) `
119
119
  compareAtPrice
120
120
  featuredImage
121
121
  images
122
+ tags
123
+ brand {
124
+ id
125
+ createStamp
126
+ createdBy
127
+ name
128
+ image
129
+ imageIcon
130
+ }
122
131
  productAttributes {
123
132
  attributeName
124
133
  attributeValue
@@ -20,4 +20,6 @@ export declare class PortalService extends Service {
20
20
  completeCancelFFMOrder(orderId: string, note: string, reason: string): Promise<any>;
21
21
  saveTextEditor(saveTextEditor: any): Promise<any>;
22
22
  getContent(type: string, relativeId: string): Promise<any>;
23
+ getCalendarStudent(studentId?: string, classId?: string, startDate?: number, endDate?: number): Promise<any>;
24
+ getClass(): Promise<any>;
23
25
  }
@@ -251,5 +251,43 @@ class PortalService extends serviceSDK_1.Service {
251
251
  }
252
252
  });
253
253
  }
254
+ getCalendarStudent(studentId, classId, startDate, endDate) {
255
+ return __awaiter(this, void 0, void 0, function* () {
256
+ const method = "GET";
257
+ // Gom tất cả tham số vào object
258
+ const params = {
259
+ studentId,
260
+ classId,
261
+ startDate,
262
+ endDate,
263
+ };
264
+ // Lọc ra những tham số có giá trị
265
+ const query = Object.entries(params)
266
+ .filter(([_, value]) => value !== undefined && value !== null && value !== "")
267
+ .map(([key, value]) => `${key}=${encodeURIComponent(value)}`)
268
+ .join("&");
269
+ const endpoint = `/dynamic-collection/public/v2/schedule/lesson/${this.orgId}${query ? `?${query}` : ""}`;
270
+ try {
271
+ const response = yield this.restApiCallWithNoToken(endpoint, method);
272
+ return response;
273
+ }
274
+ catch (error) {
275
+ throw error;
276
+ }
277
+ });
278
+ }
279
+ getClass() {
280
+ return __awaiter(this, void 0, void 0, function* () {
281
+ const method = "GET";
282
+ const endpoint = `/dynamic-collection/public/v2/schedule/classSection/${this.orgId}`;
283
+ try {
284
+ const response = yield this.restApiCallWithNoToken(endpoint, method);
285
+ return response;
286
+ }
287
+ catch (error) {
288
+ throw error;
289
+ }
290
+ });
291
+ }
254
292
  }
255
293
  exports.PortalService = PortalService;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longvansoftware/storefront-js-client",
3
- "version": "3.6.3",
3
+ "version": "3.6.5",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [