@longvansoftware/storefront-js-client 4.2.2 → 4.2.3

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.
@@ -0,0 +1 @@
1
+ export declare const UPDATE_DESCRIPTION: import("graphql").DocumentNode;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UPDATE_DESCRIPTION = void 0;
4
+ const graphql_tag_1 = require("graphql-tag");
5
+ exports.UPDATE_DESCRIPTION = (0, graphql_tag_1.gql) `
6
+ mutation UpdateDescription(
7
+ $serviceId: String!
8
+ $description: String!
9
+ $updatedBy: String!
10
+ ) {
11
+ updateDescription(
12
+ serviceId: $serviceId
13
+ description: $description
14
+ updatedBy: $updatedBy
15
+ )
16
+ }
17
+ `;
@@ -3,4 +3,5 @@ export declare class CloudCloudService extends Service {
3
3
  constructor(endpoint: string, orgId: string, storeId: string);
4
4
  searchService(data: any): Promise<any>;
5
5
  serviceDetail(serviceId: string): Promise<any>;
6
+ updateDescription(serviceId: string, description: string, updatedBy: string): Promise<any>;
6
7
  }
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.CloudCloudService = void 0;
13
13
  const serviceSDK_1 = require("../serviceSDK");
14
14
  const queries_1 = require("../../graphql/cloudCloud/queries");
15
+ const mutations_1 = require("../../graphql/cloudCloud/mutations");
15
16
  class CloudCloudService extends serviceSDK_1.Service {
16
17
  constructor(endpoint, orgId, storeId) {
17
18
  super(endpoint, orgId, storeId);
@@ -46,5 +47,22 @@ class CloudCloudService extends serviceSDK_1.Service {
46
47
  }
47
48
  });
48
49
  }
50
+ updateDescription(serviceId, description, updatedBy) {
51
+ return __awaiter(this, void 0, void 0, function* () {
52
+ const mutation = mutations_1.UPDATE_DESCRIPTION;
53
+ const variables = {
54
+ serviceId,
55
+ description,
56
+ updatedBy
57
+ };
58
+ try {
59
+ const response = yield this.graphqlMutationV3(mutation, variables);
60
+ return response.updateDescription;
61
+ }
62
+ catch (error) {
63
+ throw error;
64
+ }
65
+ });
66
+ }
49
67
  }
50
68
  exports.CloudCloudService = CloudCloudService;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longvansoftware/storefront-js-client",
3
- "version": "4.2.2",
3
+ "version": "4.2.3",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [