@longvansoftware/storefront-js-client 1.4.2 → 1.4.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.
@@ -7,3 +7,4 @@ export declare const UPDATE_FAIL_ACTION_PROCESS_STATUS: import("graphql").Docume
7
7
  export declare const CREATE_SERVICE_TICKET: import("graphql").DocumentNode;
8
8
  export declare const CREATE_SERVICE_ACTION: import("graphql").DocumentNode;
9
9
  export declare const UPDATE_ATTR_VALUE: import("graphql").DocumentNode;
10
+ export declare const ADD_ACTION_ATTRIBUTE: import("graphql").DocumentNode;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UPDATE_ATTR_VALUE = exports.CREATE_SERVICE_ACTION = exports.CREATE_SERVICE_TICKET = exports.UPDATE_FAIL_ACTION_PROCESS_STATUS = exports.UPDATE_SUCCESS_ACTION_PROCESS_STATUS = exports.DELETE_ATTR_VALUE = exports.DELETE_SERVICE = exports.UPDATE_SERVICE = exports.CREATE_SERVICE = void 0;
3
+ exports.ADD_ACTION_ATTRIBUTE = exports.UPDATE_ATTR_VALUE = exports.CREATE_SERVICE_ACTION = exports.CREATE_SERVICE_TICKET = exports.UPDATE_FAIL_ACTION_PROCESS_STATUS = exports.UPDATE_SUCCESS_ACTION_PROCESS_STATUS = exports.DELETE_ATTR_VALUE = exports.DELETE_SERVICE = exports.UPDATE_SERVICE = exports.CREATE_SERVICE = void 0;
4
4
  const graphql_tag_1 = require("graphql-tag");
5
5
  exports.CREATE_SERVICE = (0, graphql_tag_1.gql) `
6
6
  mutation CreateService($partnerId: String!, $createModel: ServiceRequest!) {
@@ -267,3 +267,18 @@ exports.UPDATE_ATTR_VALUE = (0, graphql_tag_1.gql) `
267
267
  )
268
268
  }
269
269
  `;
270
+ exports.ADD_ACTION_ATTRIBUTE = (0, graphql_tag_1.gql) `
271
+ mutation AddActionAttribute(
272
+ $actionId: String!
273
+ $attributeName: String!
274
+ $attributeValue: String!
275
+ $createdBy: String!
276
+ ) {
277
+ addActionAttribute(
278
+ actionId: $actionId
279
+ attributeName: $attributeName
280
+ attributeValue: $attributeValue
281
+ createdBy: $createdBy
282
+ )
283
+ }
284
+ `;
@@ -3,3 +3,4 @@ export declare const GET_SERVICE_BY_TYPE: import("graphql").DocumentNode;
3
3
  export declare const GET_SERVICE_BY_OWNER_ID: import("graphql").DocumentNode;
4
4
  export declare const GET_SERVICE_ACTION: import("graphql").DocumentNode;
5
5
  export declare const GET_SERVICE_TICKETS: import("graphql").DocumentNode;
6
+ export declare const GET_ACTION_ATTRIBUTE: import("graphql").DocumentNode;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GET_SERVICE_TICKETS = exports.GET_SERVICE_ACTION = exports.GET_SERVICE_BY_OWNER_ID = exports.GET_SERVICE_BY_TYPE = exports.GET_SERVICE_BY_ID = void 0;
3
+ exports.GET_ACTION_ATTRIBUTE = exports.GET_SERVICE_TICKETS = exports.GET_SERVICE_ACTION = exports.GET_SERVICE_BY_OWNER_ID = exports.GET_SERVICE_BY_TYPE = exports.GET_SERVICE_BY_ID = void 0;
4
4
  const graphql_tag_1 = require("graphql-tag");
5
5
  exports.GET_SERVICE_BY_ID = (0, graphql_tag_1.gql) `
6
6
  query GetServiceById($partnerId: String!, $serviceId: String!) {
@@ -167,3 +167,8 @@ exports.GET_SERVICE_TICKETS = (0, graphql_tag_1.gql) `
167
167
  }
168
168
  }
169
169
  `;
170
+ exports.GET_ACTION_ATTRIBUTE = (0, graphql_tag_1.gql) `
171
+ query GetActionAttribute($actionId: String!, $attributeName: String!) {
172
+ getActionAttribute(actionId: $actionId, attributeName: $attributeName)
173
+ }
174
+ `;
@@ -89,4 +89,6 @@ export declare class ServiceManagementService extends Service {
89
89
  createServiceTicket(serviceId: string, name: string, createdBy: string, description: string): Promise<any>;
90
90
  getServiceTicket(serviceId: string): Promise<any>;
91
91
  createServiceAction(serviceId: string, actionType: string, createdBy: string): Promise<any>;
92
+ addActionAttribute(actionId: string, attributeName: string, attributeValue: string, createdBy: string): Promise<any>;
93
+ getActionAttribute(actionId: string, attributeName: string): Promise<any>;
92
94
  }
@@ -310,5 +310,42 @@ class ServiceManagementService extends serviceSDK_1.Service {
310
310
  }
311
311
  });
312
312
  }
313
+ addActionAttribute(actionId, attributeName, attributeValue, createdBy) {
314
+ return __awaiter(this, void 0, void 0, function* () {
315
+ const mutation = mutations_1.ADD_ACTION_ATTRIBUTE;
316
+ const variables = {
317
+ actionId,
318
+ attributeName,
319
+ attributeValue,
320
+ createdBy,
321
+ };
322
+ try {
323
+ const response = yield this.graphqlMutation(mutation, variables);
324
+ return response.addActionAttribute;
325
+ }
326
+ catch (error) {
327
+ throw error;
328
+ }
329
+ });
330
+ }
331
+ // query GetActionAttribute {
332
+ // getActionAttribute(actionId: "20.27592", attributeName: "ztbee")
333
+ // }
334
+ getActionAttribute(actionId, attributeName) {
335
+ return __awaiter(this, void 0, void 0, function* () {
336
+ const query = queries_1.GET_ACTION_ATTRIBUTE;
337
+ const variables = {
338
+ actionId,
339
+ attributeName,
340
+ };
341
+ try {
342
+ const response = yield this.graphqlQuery(query, variables);
343
+ return response.getActionAttribute;
344
+ }
345
+ catch (error) {
346
+ throw error;
347
+ }
348
+ });
349
+ }
313
350
  }
314
351
  exports.ServiceManagementService = ServiceManagementService;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longvansoftware/storefront-js-client",
3
- "version": "1.4.2",
3
+ "version": "1.4.3",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [