@longvansoftware/storefront-js-client 2.1.3 → 2.1.4

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.
@@ -13,3 +13,4 @@ export declare const ADD_TAG: import("graphql").DocumentNode;
13
13
  export declare const UPDATE_CONNECTOR_DESCRIPTION: import("graphql").DocumentNode;
14
14
  export declare const REMOVE_TAG: import("graphql").DocumentNode;
15
15
  export declare const CLOSE_TOPIC: import("graphql").DocumentNode;
16
+ export declare const CREATE_TOPIC: import("graphql").DocumentNode;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CLOSE_TOPIC = exports.REMOVE_TAG = exports.UPDATE_CONNECTOR_DESCRIPTION = exports.ADD_TAG = exports.CREATE_CONNECTOR = exports.UPDATE_WORK_EFFORT_PROCESS_STATUS = exports.CREATE_WORK_EFFORT = exports.ADD_COMMENT = exports.ADD_TICKED = exports.ADD_ATTACHMENT_FOR_WORK_EFFORT = exports.UPDATE_WORK_EFFORT_STATUS = exports.UPDATE_WORK_EFFORT_NAME = exports.UPDATE_WORK_EFFORT_DESCRIPTION = exports.UPDATE_STATUS_ATTACHMENT_BY_ID = exports.ADD_OPPORTUNITY_MUTATION = void 0;
3
+ exports.CREATE_TOPIC = exports.CLOSE_TOPIC = exports.REMOVE_TAG = exports.UPDATE_CONNECTOR_DESCRIPTION = exports.ADD_TAG = exports.CREATE_CONNECTOR = exports.UPDATE_WORK_EFFORT_PROCESS_STATUS = exports.CREATE_WORK_EFFORT = exports.ADD_COMMENT = exports.ADD_TICKED = exports.ADD_ATTACHMENT_FOR_WORK_EFFORT = exports.UPDATE_WORK_EFFORT_STATUS = exports.UPDATE_WORK_EFFORT_NAME = exports.UPDATE_WORK_EFFORT_DESCRIPTION = exports.UPDATE_STATUS_ATTACHMENT_BY_ID = exports.ADD_OPPORTUNITY_MUTATION = void 0;
4
4
  const graphql_tag_1 = require("graphql-tag");
5
5
  exports.ADD_OPPORTUNITY_MUTATION = (0, graphql_tag_1.gql) `
6
6
  mutation AddOpportunity(
@@ -792,3 +792,28 @@ exports.CLOSE_TOPIC = (0, graphql_tag_1.gql) `
792
792
  }
793
793
  }
794
794
  `;
795
+ exports.CREATE_TOPIC = (0, graphql_tag_1.gql) `
796
+ mutation CreateTopic(
797
+ $socialAppId: String!
798
+ $customerId: String!
799
+ $message: String!
800
+ ) {
801
+ createTopic(
802
+ socialAppId: $socialAppId
803
+ customerId: $customerId
804
+ message: $message
805
+ ) {
806
+ id
807
+ status
808
+ name
809
+ communicationChannel
810
+ customerId
811
+ accountableId
812
+ accountableName
813
+ customerName
814
+ createdStamp
815
+ threadId
816
+ roomId
817
+ }
818
+ }
819
+ `;
@@ -30,6 +30,7 @@ export declare class CrmService extends Service {
30
30
  removeTag(connectorId: string, tagId: string, removedBy: string): Promise<any>;
31
31
  searchTopic(accountTableId: string, pageSize: number, currentPage: number): Promise<any>;
32
32
  closeTopic(id: string, updatedBy: string): Promise<any>;
33
+ createTopic(socialAppId: String, customerId: string, message: string): Promise<any>;
33
34
  getTopicByCustomerId(filterTopicRequest: any, pageSize: number, currentPage: number): Promise<any>;
34
35
  getMyWorkEffortToday(performerId: string, source: string): Promise<any>;
35
36
  }
@@ -507,6 +507,23 @@ class CrmService extends serviceSDK_1.Service {
507
507
  }
508
508
  });
509
509
  }
510
+ createTopic(socialAppId, customerId, message) {
511
+ return __awaiter(this, void 0, void 0, function* () {
512
+ const mutation = mutations_1.CREATE_TOPIC;
513
+ const variables = {
514
+ socialAppId,
515
+ customerId,
516
+ message,
517
+ };
518
+ try {
519
+ const response = yield this.graphqlMutationV2(mutation, variables);
520
+ return response.createTopic;
521
+ }
522
+ catch (error) {
523
+ throw error;
524
+ }
525
+ });
526
+ }
510
527
  getTopicByCustomerId(filterTopicRequest, pageSize, currentPage) {
511
528
  return __awaiter(this, void 0, void 0, function* () {
512
529
  const mutation = queries_1.SEARCH_TOPIC;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longvansoftware/storefront-js-client",
3
- "version": "2.1.3",
3
+ "version": "2.1.4",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [