@longvansoftware/service-js-client 2.8.0 → 2.8.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.
@@ -6,7 +6,7 @@ exports.environmentEndpoints = {
6
6
  product: "https://api-gateway.longvan.dev/product-service/graphql",
7
7
  crm: "https://api-gateway.longvan.dev/crm-graph-gateway/graphql",
8
8
  auth: "https://api-gateway.longvan.dev/authorization-gateway/graphql",
9
- order: "https://api-gateway.longvan.dev/v2",
9
+ order: "https://api-gateway.longvan.dev/storefront-service/v2",
10
10
  user: "https://api-gateway.longvan.dev/user-gateway/graphql",
11
11
  payment: "https://api-gateway.longvan.dev/invoice-gateway/graphql",
12
12
  service: "https://api-gateway.longvan.dev/service-api/graphql",
@@ -10,3 +10,4 @@ export declare const CREATE_COMPUTING_LAB_BY_TEMPLATE_ID: (fields?: string[]) =>
10
10
  export declare const REMOVE_COMPUTING_LAB: DocumentNode;
11
11
  export declare const OFF_COMPUTING_LAB: DocumentNode;
12
12
  export declare const ON_COMPUTING_LAB: DocumentNode;
13
+ export declare const RENEWAL_COMPUTING_LAB: DocumentNode;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ON_COMPUTING_LAB = exports.OFF_COMPUTING_LAB = exports.REMOVE_COMPUTING_LAB = exports.CREATE_COMPUTING_LAB_BY_TEMPLATE_ID = exports.STOP_LAB_SESSION_FOR_CUSTOMER = exports.UPDATE_TYPE_LAB_SESSION = exports.STOP_LAB_SESSION = exports.UPDATE_END_TIME_LAB_SESSION = exports.CREATE_LAB_SESSION_BY_COMPUTING_ID = exports.CREATE_LAB_SESSION_BY_LAB_SESSION_ID = exports.CREATE_LAB_SESSION_BY_TEMPLATE_ID = void 0;
3
+ exports.RENEWAL_COMPUTING_LAB = exports.ON_COMPUTING_LAB = exports.OFF_COMPUTING_LAB = exports.REMOVE_COMPUTING_LAB = exports.CREATE_COMPUTING_LAB_BY_TEMPLATE_ID = exports.STOP_LAB_SESSION_FOR_CUSTOMER = exports.UPDATE_TYPE_LAB_SESSION = exports.STOP_LAB_SESSION = exports.UPDATE_END_TIME_LAB_SESSION = exports.CREATE_LAB_SESSION_BY_COMPUTING_ID = exports.CREATE_LAB_SESSION_BY_LAB_SESSION_ID = exports.CREATE_LAB_SESSION_BY_TEMPLATE_ID = void 0;
4
4
  const graphql_tag_1 = require("graphql-tag");
5
5
  // Tạo phiên thực hành từ template
6
6
  exports.CREATE_LAB_SESSION_BY_TEMPLATE_ID = (0, graphql_tag_1.gql) `
@@ -179,3 +179,11 @@ exports.ON_COMPUTING_LAB = (0, graphql_tag_1.gql) `
179
179
  }
180
180
  }
181
181
  `;
182
+ exports.RENEWAL_COMPUTING_LAB = (0, graphql_tag_1.gql) `
183
+ mutation RenewalComputingLab($partnerId: String!, $userId: String!, $computingId: String!, $timeUse: BigDecimal!, $updateBy: String!) {
184
+ renewalComputingLab(partnerId: $partnerId, userId: $userId, computingId: $computingId, timeUse: $timeUse, updateBy: $updateBy) {
185
+ status
186
+ message
187
+ }
188
+ }
189
+ `;
@@ -26,4 +26,5 @@ export declare class QuicklabService extends Service {
26
26
  getLabSessions(): Promise<any>;
27
27
  updateComputingLabTypeLabSessionCode(userId: string, computingId: string, typeLabSessionCode: string, updateBy: string): Promise<any>;
28
28
  stopComputingLabByTypeLabSessionCode(userId: string, computingId: string, updateBy: string): Promise<any>;
29
+ renewalComputingLab(userId: string, computingId: string, timeUse: string | number, updateBy: string): Promise<any>;
29
30
  }
@@ -390,5 +390,24 @@ class QuicklabService extends serviceSDK_1.Service {
390
390
  }
391
391
  });
392
392
  }
393
+ renewalComputingLab(userId, computingId, timeUse, updateBy) {
394
+ return __awaiter(this, void 0, void 0, function* () {
395
+ const variables = {
396
+ partnerId: this.orgId,
397
+ userId,
398
+ computingId,
399
+ timeUse: Number(timeUse),
400
+ updateBy
401
+ };
402
+ try {
403
+ const response = yield this.graphqlMutation(mutations_1.RENEWAL_COMPUTING_LAB, variables);
404
+ return response.renewalComputingLab;
405
+ }
406
+ catch (error) {
407
+ console.log(`Error in renewalComputingLab: ${error}`);
408
+ throw error;
409
+ }
410
+ });
411
+ }
393
412
  }
394
413
  exports.QuicklabService = QuicklabService;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longvansoftware/service-js-client",
3
- "version": "2.8.0",
3
+ "version": "2.8.2",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [