@longvansoftware/storefront-js-client 3.6.8 → 3.7.0

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.
@@ -21,5 +21,5 @@ export declare class PortalService extends Service {
21
21
  saveTextEditor(saveTextEditor: any): Promise<any>;
22
22
  getContent(type: string, relativeId: string): Promise<any>;
23
23
  getCalendarStudent(studentId?: string, classId?: string, startDate?: number, endDate?: number): Promise<any>;
24
- getClass(): Promise<any>;
24
+ getClass(studentId?: string): Promise<any>;
25
25
  }
@@ -276,10 +276,14 @@ class PortalService extends serviceSDK_1.Service {
276
276
  }
277
277
  });
278
278
  }
279
- getClass() {
279
+ getClass(studentId) {
280
280
  return __awaiter(this, void 0, void 0, function* () {
281
281
  const method = "GET";
282
- const endpoint = `/dynamic-collection/public/v2/schedule/classSection/${this.orgId}`;
282
+ const baseUrl = `/dynamic-collection/public/v2/schedule/classSection/${this.orgId}`;
283
+ const params = new URLSearchParams();
284
+ if (studentId)
285
+ params.append("studentId", studentId);
286
+ const endpoint = params.toString() ? `${baseUrl}?${params}` : baseUrl;
283
287
  try {
284
288
  const response = yield this.restApiCallWithNoToken(endpoint, method);
285
289
  return response;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longvansoftware/storefront-js-client",
3
- "version": "3.6.8",
3
+ "version": "3.7.0",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [