@longvansoftware/service-js-client 2.5.9 → 2.6.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.
@@ -472,8 +472,8 @@ const CALCULATE_RESOURCE_CHANGE_PRICE = (fields = []) => {
472
472
  const fieldStr = fields.join("\n ");
473
473
  const hasFields = fields.length > 0;
474
474
  return (0, graphql_tag_1.gql) `
475
- query calculateResourceChangePrice($partnerId: String! $storeId: String! $productIds: [String] $quantity: BigDecimal! $unit: String!) {
476
- calculateResourceChangePrice(partnerId: $partnerId storeId: $storeId productIds: $productIds quantity: $quantity unit: $unit) ${hasFields ? `{ ${fieldStr} }` : ""}
475
+ query calculateResourceChangePrice($partnerId: String! $storeId: String! $productIds: [String] $quantity: BigDecimal! $unit: String! $serviceId: String) {
476
+ calculateResourceChangePrice(partnerId: $partnerId storeId: $storeId productIds: $productIds quantity: $quantity unit: $unit serviceId: $serviceId) ${hasFields ? `{ ${fieldStr} }` : ""}
477
477
  }
478
478
  `;
479
479
  };
@@ -18,5 +18,5 @@ export declare class OrderGraphQLService extends Service {
18
18
  addItemIntoOrderByProductJsonResource(serviceId: string, orderId: string, itemInput: any, durationQuantity: number, durationUnit: string, actorId: string, fields: string[]): Promise<any>;
19
19
  updateOrderLineItemParentId(orderLineItemChildIds: string[], orderLineItemParentId: string, updateBy: string): Promise<any>;
20
20
  updateProductOptionOrderLineItem(orderLineItemId: string, productOptionUpdate: any, updateBy: string): Promise<any>;
21
- calculateResourceChangePrice(productIds: string[], quantity: string, unit: string, storeId: string, fields: string[]): Promise<any>;
21
+ calculateResourceChangePrice(productIds: string[], quantity: string, unit: string, storeId: string, fields: string[], serviceId: string): Promise<any>;
22
22
  }
@@ -285,7 +285,7 @@ class OrderGraphQLService extends serviceSDK_1.Service {
285
285
  }
286
286
  });
287
287
  }
288
- calculateResourceChangePrice(productIds, quantity, unit, storeId, fields) {
288
+ calculateResourceChangePrice(productIds, quantity, unit, storeId, fields, serviceId) {
289
289
  return __awaiter(this, void 0, void 0, function* () {
290
290
  const query = (0, queries_1.CALCULATE_RESOURCE_CHANGE_PRICE)(fields);
291
291
  const variables = {
@@ -293,7 +293,8 @@ class OrderGraphQLService extends serviceSDK_1.Service {
293
293
  storeId: storeId ? storeId : this.storeId,
294
294
  productIds,
295
295
  quantity,
296
- unit
296
+ unit,
297
+ serviceId
297
298
  };
298
299
  try {
299
300
  const response = yield this.graphqlQueryV2(query, variables);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longvansoftware/service-js-client",
3
- "version": "2.5.9",
3
+ "version": "2.6.0",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [