@longvansoftware/service-js-client 1.16.4 → 1.16.5

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.
Files changed (73) hide show
  1. package/dist/src/graphql/cloud/mutations.d.ts +23 -20
  2. package/dist/src/graphql/cloud/mutations.js +55 -1
  3. package/dist/src/graphql/crm/queries.d.ts +17 -14
  4. package/dist/src/graphql/crm/queries.js +37 -1
  5. package/dist/src/lib/cloud/index.d.ts +2 -0
  6. package/dist/src/lib/cloud/index.js +38 -0
  7. package/dist/src/lib/crm/index.d.ts +2 -0
  8. package/dist/src/lib/crm/index.js +34 -0
  9. package/package.json +1 -1
  10. package/dist/src/graphql/campaign/mutations.d.ts +0 -1
  11. package/dist/src/graphql/campaign/mutations.js +0 -34
  12. package/dist/src/graphql/campaign/queries.d.ts +0 -9
  13. package/dist/src/graphql/campaign/queries.js +0 -427
  14. package/dist/src/graphql/cashbook/queries.d.ts +0 -2
  15. package/dist/src/graphql/cashbook/queries.js +0 -99
  16. package/dist/src/graphql/fragments/product.d.ts +0 -38
  17. package/dist/src/graphql/fragments/product.js +0 -196
  18. package/dist/src/graphql/paymentV2/mutations.d.ts +0 -5
  19. package/dist/src/graphql/paymentV2/mutations.js +0 -120
  20. package/dist/src/graphql/paymentV2/queries.d.ts +0 -9
  21. package/dist/src/graphql/paymentV2/queries.js +0 -257
  22. package/dist/src/graphql/store/mutations.d.ts +0 -1
  23. package/dist/src/graphql/store/mutations.js +0 -29
  24. package/dist/src/graphql/store/queries.d.ts +0 -1
  25. package/dist/src/graphql/store/queries.js +0 -29
  26. package/dist/src/lib/accounting/index.d.ts +0 -5
  27. package/dist/src/lib/accounting/index.js +0 -32
  28. package/dist/src/lib/campaign/index.d.ts +0 -20
  29. package/dist/src/lib/campaign/index.js +0 -218
  30. package/dist/src/lib/cashbook/index.d.ts +0 -6
  31. package/dist/src/lib/cashbook/index.js +0 -56
  32. package/dist/src/lib/comhub/index.d.ts +0 -6
  33. package/dist/src/lib/comhub/index.js +0 -50
  34. package/dist/src/lib/deepLinkVietQr/index.d.ts +0 -7
  35. package/dist/src/lib/deepLinkVietQr/index.js +0 -58
  36. package/dist/src/lib/fileService/index.d.ts +0 -34
  37. package/dist/src/lib/fileService/index.js +0 -80
  38. package/dist/src/lib/getImage/index.d.ts +0 -4
  39. package/dist/src/lib/getImage/index.js +0 -10
  40. package/dist/src/lib/image/index.d.ts +0 -7
  41. package/dist/src/lib/image/index.js +0 -49
  42. package/dist/src/lib/omnigateway/index.d.ts +0 -7
  43. package/dist/src/lib/omnigateway/index.js +0 -58
  44. package/dist/src/lib/paymentV2/index.d.ts +0 -18
  45. package/dist/src/lib/paymentV2/index.js +0 -245
  46. package/dist/src/lib/portal/index.d.ts +0 -23
  47. package/dist/src/lib/portal/index.js +0 -255
  48. package/dist/src/lib/shareZalo/index.d.ts +0 -5
  49. package/dist/src/lib/shareZalo/index.js +0 -32
  50. package/dist/src/lib/store/index.d.ts +0 -30
  51. package/dist/src/lib/store/index.js +0 -74
  52. package/dist/src/lib/token/index.d.ts +0 -5
  53. package/dist/src/lib/token/index.js +0 -32
  54. package/dist/src/lib/upload/index.d.ts +0 -5
  55. package/dist/src/lib/upload/index.js +0 -35
  56. package/dist/src/lib/warehouseV2/index.d.ts +0 -13
  57. package/dist/src/lib/warehouseV2/index.js +0 -54
  58. package/dist/src/lib/zca/index.d.ts +0 -12
  59. package/dist/src/lib/zca/index.js +0 -41
  60. package/dist/src/types/campaign.d.ts +0 -14
  61. package/dist/src/types/campaign.js +0 -2
  62. package/dist/src/types/common.d.ts +0 -264
  63. package/dist/src/types/common.js +0 -35
  64. package/dist/src/types/invoice.d.ts +0 -13
  65. package/dist/src/types/invoice.js +0 -2
  66. package/dist/src/types/portal.d.ts +0 -7
  67. package/dist/src/types/portal.js +0 -2
  68. package/dist/src/types/store.d.ts +0 -158
  69. package/dist/src/types/store.js +0 -3
  70. package/dist/src/utils/errorHandler.d.ts +0 -64
  71. package/dist/src/utils/errorHandler.js +0 -197
  72. package/dist/src/utils/validatePhoneNumber.d.ts +0 -1
  73. package/dist/src/utils/validatePhoneNumber.js +0 -20
@@ -1,20 +1,23 @@
1
- export declare const GET_DOMAIN_INFO: import("graphql").DocumentNode;
2
- export declare const CHECK_LIST_DOMAIN_NAME: import("graphql").DocumentNode;
3
- export declare const CHECK_DOMAIN_NAME: import("graphql").DocumentNode;
4
- export declare const CHANGE_SERVICE_NAME: import("graphql").DocumentNode;
5
- export declare const CREATE_USER_MAIL_HOSTING: import("graphql").DocumentNode;
6
- export declare const DELETE_USER_MAIL_HOSTING: import("graphql").DocumentNode;
7
- export declare const UPDATE_DOMAIN_NAME: import("graphql").DocumentNode;
8
- export declare const UPDATE_USER_NAME: import("graphql").DocumentNode;
9
- export declare const UPDATE_PASSWORD: import("graphql").DocumentNode;
10
- export declare const UPDATE_USER_PASSWORD: import("graphql").DocumentNode;
11
- export declare const UPDATE_DNS: import("graphql").DocumentNode;
12
- export declare const CREATE_DOMAIN_CONTACT: import("graphql").DocumentNode;
13
- export declare const GET_ORDER_CHANGE_RESOURCE_TERM: import("graphql").DocumentNode;
14
- export declare const CREATE_ACTION_CHANGE_IP_OF_SERVICE: import("graphql").DocumentNode;
15
- export declare const UPDATE_ACTION_STATUS: import("graphql").DocumentNode;
16
- export declare const UPDATE_ACTION_CUSTOM_ATTRIBUTE: import("graphql").DocumentNode;
17
- export declare const UPDATE_SERVICE_COMPLETED: import("graphql").DocumentNode;
18
- export declare const UPDATE_SERVICE_NEW: import("graphql").DocumentNode;
19
- export declare const UPDATE_SERVICE_READY_DEPLOY: import("graphql").DocumentNode;
20
- export declare const UPDATE_URL_PUBLIC: import("graphql").DocumentNode;
1
+ import { DocumentNode } from "graphql";
2
+ export declare const GET_DOMAIN_INFO: DocumentNode;
3
+ export declare const CHECK_LIST_DOMAIN_NAME: DocumentNode;
4
+ export declare const CHECK_DOMAIN_NAME: DocumentNode;
5
+ export declare const CHANGE_SERVICE_NAME: DocumentNode;
6
+ export declare const CREATE_USER_MAIL_HOSTING: DocumentNode;
7
+ export declare const DELETE_USER_MAIL_HOSTING: DocumentNode;
8
+ export declare const UPDATE_DOMAIN_NAME: DocumentNode;
9
+ export declare const UPDATE_USER_NAME: DocumentNode;
10
+ export declare const UPDATE_PASSWORD: DocumentNode;
11
+ export declare const UPDATE_USER_PASSWORD: DocumentNode;
12
+ export declare const UPDATE_DNS: DocumentNode;
13
+ export declare const CREATE_DOMAIN_CONTACT: DocumentNode;
14
+ export declare const GET_ORDER_CHANGE_RESOURCE_TERM: DocumentNode;
15
+ export declare const CREATE_ACTION_CHANGE_IP_OF_SERVICE: DocumentNode;
16
+ export declare const UPDATE_ACTION_STATUS: DocumentNode;
17
+ export declare const UPDATE_ACTION_CUSTOM_ATTRIBUTE: DocumentNode;
18
+ export declare const UPDATE_SERVICE_COMPLETED: DocumentNode;
19
+ export declare const UPDATE_SERVICE_NEW: DocumentNode;
20
+ export declare const UPDATE_SERVICE_READY_DEPLOY: DocumentNode;
21
+ export declare const UPDATE_URL_PUBLIC: DocumentNode;
22
+ export declare const CHECK_ENTERPRISE_BY_TAX_CODE_DYNAMIC: (fields?: string[]) => DocumentNode;
23
+ export declare const CHECK_BUSINESS_BY_TAX_CODE_DYNAMIC: (fields?: string[]) => DocumentNode;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UPDATE_URL_PUBLIC = exports.UPDATE_SERVICE_READY_DEPLOY = exports.UPDATE_SERVICE_NEW = exports.UPDATE_SERVICE_COMPLETED = exports.UPDATE_ACTION_CUSTOM_ATTRIBUTE = exports.UPDATE_ACTION_STATUS = exports.CREATE_ACTION_CHANGE_IP_OF_SERVICE = exports.GET_ORDER_CHANGE_RESOURCE_TERM = exports.CREATE_DOMAIN_CONTACT = exports.UPDATE_DNS = exports.UPDATE_USER_PASSWORD = exports.UPDATE_PASSWORD = exports.UPDATE_USER_NAME = exports.UPDATE_DOMAIN_NAME = exports.DELETE_USER_MAIL_HOSTING = exports.CREATE_USER_MAIL_HOSTING = exports.CHANGE_SERVICE_NAME = exports.CHECK_DOMAIN_NAME = exports.CHECK_LIST_DOMAIN_NAME = exports.GET_DOMAIN_INFO = void 0;
3
+ exports.CHECK_BUSINESS_BY_TAX_CODE_DYNAMIC = exports.CHECK_ENTERPRISE_BY_TAX_CODE_DYNAMIC = exports.UPDATE_URL_PUBLIC = exports.UPDATE_SERVICE_READY_DEPLOY = exports.UPDATE_SERVICE_NEW = exports.UPDATE_SERVICE_COMPLETED = exports.UPDATE_ACTION_CUSTOM_ATTRIBUTE = exports.UPDATE_ACTION_STATUS = exports.CREATE_ACTION_CHANGE_IP_OF_SERVICE = exports.GET_ORDER_CHANGE_RESOURCE_TERM = exports.CREATE_DOMAIN_CONTACT = exports.UPDATE_DNS = exports.UPDATE_USER_PASSWORD = exports.UPDATE_PASSWORD = exports.UPDATE_USER_NAME = exports.UPDATE_DOMAIN_NAME = exports.DELETE_USER_MAIL_HOSTING = exports.CREATE_USER_MAIL_HOSTING = exports.CHANGE_SERVICE_NAME = exports.CHECK_DOMAIN_NAME = exports.CHECK_LIST_DOMAIN_NAME = exports.GET_DOMAIN_INFO = void 0;
4
4
  const graphql_tag_1 = require("graphql-tag");
5
5
  exports.GET_DOMAIN_INFO = (0, graphql_tag_1.gql) `
6
6
  mutation GetDomainInfo($domainName: String!) {
@@ -304,3 +304,57 @@ exports.UPDATE_URL_PUBLIC = (0, graphql_tag_1.gql) `
304
304
  )
305
305
  }
306
306
  `;
307
+ const CHECK_ENTERPRISE_BY_TAX_CODE_DYNAMIC = (fields = []) => {
308
+ const fieldStr = fields.join("\n ");
309
+ const hasFields = fields.length > 0;
310
+ return (0, graphql_tag_1.gql) `
311
+ mutation CheckEnterpriseByTaxCode(
312
+ $domainName: String!
313
+ $taxCode: String!
314
+ $checkPromotion: Boolean!
315
+ $domainResumeId: String
316
+ ) {
317
+ checkEnterpriseByTaxCode(
318
+ domainName: $domainName
319
+ taxCode: $taxCode
320
+ checkPromotion: $checkPromotion
321
+ domainResumeId: $domainResumeId
322
+ ) {
323
+ success
324
+ message
325
+ promotionCode
326
+ data {
327
+ ${hasFields ? `${fieldStr}` : ""}
328
+ }
329
+ }
330
+ }
331
+ `;
332
+ };
333
+ exports.CHECK_ENTERPRISE_BY_TAX_CODE_DYNAMIC = CHECK_ENTERPRISE_BY_TAX_CODE_DYNAMIC;
334
+ const CHECK_BUSINESS_BY_TAX_CODE_DYNAMIC = (fields = []) => {
335
+ const fieldStr = fields.join("\n ");
336
+ const hasFields = fields.length > 0;
337
+ return (0, graphql_tag_1.gql) `
338
+ mutation CheckBusinessByTaxCode(
339
+ $domainName: String!
340
+ $taxCode: String!
341
+ $checkPromotion: Boolean!
342
+ $domainResumeId: String
343
+ ) {
344
+ checkBusinessByTaxCode(
345
+ domainName: $domainName
346
+ taxCode: $taxCode
347
+ checkPromotion: $checkPromotion
348
+ domainResumeId: $domainResumeId
349
+ ) {
350
+ success
351
+ message
352
+ promotionCode
353
+ data {
354
+ ${hasFields ? `${fieldStr}` : ""}
355
+ }
356
+ }
357
+ }
358
+ `;
359
+ };
360
+ exports.CHECK_BUSINESS_BY_TAX_CODE_DYNAMIC = CHECK_BUSINESS_BY_TAX_CODE_DYNAMIC;
@@ -1,14 +1,17 @@
1
- export declare const GET_LIST_OPPORTUNITY_QUERY: import("graphql").DocumentNode;
2
- export declare const GET_LIST_TODO: import("graphql").DocumentNode;
3
- export declare const GET_LIST_WORK_EFFORT_TYPE: import("graphql").DocumentNode;
4
- export declare const GET_LIST_TICKET: import("graphql").DocumentNode;
5
- export declare const GET_TICKET_BY_ID: import("graphql").DocumentNode;
6
- export declare const GET_ATTACHMENT_BY_WORK_EFFORT_ID: import("graphql").DocumentNode;
7
- export declare const GET_LIST_COMMENT: import("graphql").DocumentNode;
8
- export declare const GET_RESUME_ID_BY_RESOURCE: import("graphql").DocumentNode;
9
- export declare const GET_RESUME_CONTACT: import("graphql").DocumentNode;
10
- export declare const GET_REUSME_BY_CUSTOMER_ID: import("graphql").DocumentNode;
11
- export declare const GET_RESUME_DOMAIN_BY_SERVICE_ID: import("graphql").DocumentNode;
12
- export declare const GET_COLLEGES_BY_PROVINCE_ID: import("graphql").DocumentNode;
13
- export declare const GET_RELATED_RESOURCE_BY_RESOURCE_TYPE: import("graphql").DocumentNode;
14
- export declare const GET_RESUME_INFO_BY_CUSTOMER_ID: import("graphql").DocumentNode;
1
+ import { DocumentNode } from "graphql";
2
+ export declare const GET_LIST_OPPORTUNITY_QUERY: DocumentNode;
3
+ export declare const GET_LIST_TODO: DocumentNode;
4
+ export declare const GET_LIST_WORK_EFFORT_TYPE: DocumentNode;
5
+ export declare const GET_LIST_TICKET: DocumentNode;
6
+ export declare const GET_LIST_TICKET_DYNAMIC: (fields?: string[]) => DocumentNode;
7
+ export declare const GET_TICKET_BY_ID: DocumentNode;
8
+ export declare const GET_LIST_TICKET_BY_ID_DYNAMIC: (fields?: string[]) => DocumentNode;
9
+ export declare const GET_ATTACHMENT_BY_WORK_EFFORT_ID: DocumentNode;
10
+ export declare const GET_LIST_COMMENT: DocumentNode;
11
+ export declare const GET_RESUME_ID_BY_RESOURCE: DocumentNode;
12
+ export declare const GET_RESUME_CONTACT: DocumentNode;
13
+ export declare const GET_REUSME_BY_CUSTOMER_ID: DocumentNode;
14
+ export declare const GET_RESUME_DOMAIN_BY_SERVICE_ID: DocumentNode;
15
+ export declare const GET_COLLEGES_BY_PROVINCE_ID: DocumentNode;
16
+ export declare const GET_RELATED_RESOURCE_BY_RESOURCE_TYPE: DocumentNode;
17
+ export declare const GET_RESUME_INFO_BY_CUSTOMER_ID: DocumentNode;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GET_RESUME_INFO_BY_CUSTOMER_ID = exports.GET_RELATED_RESOURCE_BY_RESOURCE_TYPE = exports.GET_COLLEGES_BY_PROVINCE_ID = exports.GET_RESUME_DOMAIN_BY_SERVICE_ID = exports.GET_REUSME_BY_CUSTOMER_ID = exports.GET_RESUME_CONTACT = exports.GET_RESUME_ID_BY_RESOURCE = exports.GET_LIST_COMMENT = exports.GET_ATTACHMENT_BY_WORK_EFFORT_ID = exports.GET_TICKET_BY_ID = exports.GET_LIST_TICKET = exports.GET_LIST_WORK_EFFORT_TYPE = exports.GET_LIST_TODO = exports.GET_LIST_OPPORTUNITY_QUERY = void 0;
3
+ exports.GET_RESUME_INFO_BY_CUSTOMER_ID = exports.GET_RELATED_RESOURCE_BY_RESOURCE_TYPE = exports.GET_COLLEGES_BY_PROVINCE_ID = exports.GET_RESUME_DOMAIN_BY_SERVICE_ID = exports.GET_REUSME_BY_CUSTOMER_ID = exports.GET_RESUME_CONTACT = exports.GET_RESUME_ID_BY_RESOURCE = exports.GET_LIST_COMMENT = exports.GET_ATTACHMENT_BY_WORK_EFFORT_ID = exports.GET_LIST_TICKET_BY_ID_DYNAMIC = exports.GET_TICKET_BY_ID = exports.GET_LIST_TICKET_DYNAMIC = exports.GET_LIST_TICKET = exports.GET_LIST_WORK_EFFORT_TYPE = exports.GET_LIST_TODO = exports.GET_LIST_OPPORTUNITY_QUERY = void 0;
4
4
  const graphql_tag_1 = require("graphql-tag");
5
5
  exports.GET_LIST_OPPORTUNITY_QUERY = (0, graphql_tag_1.gql) `
6
6
  query GetListOpportunity(
@@ -198,6 +198,30 @@ exports.GET_LIST_TICKET = (0, graphql_tag_1.gql) `
198
198
  }
199
199
  }
200
200
  `;
201
+ const GET_LIST_TICKET_DYNAMIC = (fields = []) => {
202
+ const fieldStr = fields.join("\n ");
203
+ const hasFields = fields.length > 0;
204
+ return (0, graphql_tag_1.gql) `
205
+ query GetListTicket(
206
+ $partyId: String!
207
+ $performerId: String!
208
+ $getTicketRequest: GetTicketRequest!
209
+ ) {
210
+ getListTicket(
211
+ partyId: $partyId
212
+ performerId: $performerId
213
+ getTicketRequest: $getTicketRequest
214
+ )
215
+ {
216
+ total
217
+ data {
218
+ ${hasFields ? `${fieldStr}` : ""}
219
+ }
220
+ }
221
+ }
222
+ `;
223
+ };
224
+ exports.GET_LIST_TICKET_DYNAMIC = GET_LIST_TICKET_DYNAMIC;
201
225
  exports.GET_TICKET_BY_ID = (0, graphql_tag_1.gql) `
202
226
  query GetTicketById($ticketId: String!) {
203
227
  getTicketById(ticketId: $ticketId) {
@@ -226,6 +250,18 @@ exports.GET_TICKET_BY_ID = (0, graphql_tag_1.gql) `
226
250
  }
227
251
  }
228
252
  `;
253
+ const GET_LIST_TICKET_BY_ID_DYNAMIC = (fields = []) => {
254
+ const fieldStr = fields.join("\n ");
255
+ const hasFields = fields.length > 0;
256
+ return (0, graphql_tag_1.gql) `
257
+ query GetTicketById($ticketId: String!) {
258
+ getTicketById(ticketId: $ticketId) {
259
+ ${hasFields ? `${fieldStr}` : ""}
260
+ }
261
+ }
262
+ `;
263
+ };
264
+ exports.GET_LIST_TICKET_BY_ID_DYNAMIC = GET_LIST_TICKET_BY_ID_DYNAMIC;
229
265
  exports.GET_ATTACHMENT_BY_WORK_EFFORT_ID = (0, graphql_tag_1.gql) `
230
266
  query GetAttachmentByWorkEffortId(
231
267
  $partyId: String!
@@ -43,6 +43,8 @@ export declare class CloudService extends Service {
43
43
  getDomainInfo(domainName: string): Promise<any>;
44
44
  getDomainSupplier(serviceId: string): Promise<any>;
45
45
  checkDomainExist(domainName: string): Promise<any>;
46
+ checkEnterpriseByTaxCodeDynamic(domainName: string, taxCode: string, checkPromotion: boolean, domainResumeId: string | null, fields: string[]): Promise<any>;
47
+ checkBusinessByTaxCodeDynamic(domainName: string, taxCode: string, checkPromotion: boolean, domainResumeId: string | null, fields: string[]): Promise<any>;
46
48
  getOrderChangeResourceTerm(serviceId: string, createdBy: string): Promise<any>;
47
49
  searchActions(parameter: any): Promise<any>;
48
50
  createActionChangeIpOfService(action: any, byUser: string): Promise<any>;
@@ -591,6 +591,44 @@ class CloudService extends serviceSDK_1.Service {
591
591
  }
592
592
  });
593
593
  }
594
+ checkEnterpriseByTaxCodeDynamic(domainName, taxCode, checkPromotion, domainResumeId, fields) {
595
+ return __awaiter(this, void 0, void 0, function* () {
596
+ const mutation = (0, mutations_1.CHECK_ENTERPRISE_BY_TAX_CODE_DYNAMIC)(fields);
597
+ const variables = {
598
+ domainName,
599
+ taxCode,
600
+ checkPromotion,
601
+ domainResumeId
602
+ };
603
+ try {
604
+ const response = yield this.graphqlMutationV2(mutation, variables);
605
+ return response.checkEnterpriseByTaxCode;
606
+ }
607
+ catch (error) {
608
+ console.log(`Error in checkEnterpriseByTaxCodeDynamic: ${error}`);
609
+ throw error;
610
+ }
611
+ });
612
+ }
613
+ checkBusinessByTaxCodeDynamic(domainName, taxCode, checkPromotion, domainResumeId, fields) {
614
+ return __awaiter(this, void 0, void 0, function* () {
615
+ const mutation = (0, mutations_1.CHECK_BUSINESS_BY_TAX_CODE_DYNAMIC)(fields);
616
+ const variables = {
617
+ domainName,
618
+ taxCode,
619
+ checkPromotion,
620
+ domainResumeId
621
+ };
622
+ try {
623
+ const response = yield this.graphqlMutationV2(mutation, variables);
624
+ return response.checkBusinessByTaxCode;
625
+ }
626
+ catch (error) {
627
+ console.log(`Error in checkBusinessByTaxCodeDynamic: ${error}`);
628
+ throw error;
629
+ }
630
+ });
631
+ }
594
632
  getOrderChangeResourceTerm(serviceId, createdBy) {
595
633
  return __awaiter(this, void 0, void 0, function* () {
596
634
  const mutation = mutations_1.GET_ORDER_CHANGE_RESOURCE_TERM;
@@ -14,8 +14,10 @@ export declare class CrmService extends Service {
14
14
  updateWorkEffortStatus(performerId: string, workEffortId: string, source: string, status: string): Promise<any>;
15
15
  addAttachmentForWorkEffort(performerId: string, workEffortId: string, attachments: [{}]): Promise<any>;
16
16
  getListTicket(performerId: string, getTicketRequest: getTicketRequest): Promise<any>;
17
+ getListTicketDynamic(performerId: string, getTicketRequest: getTicketRequest, fields: string[]): Promise<any>;
17
18
  addTicket(performerId: string, addTicketRequest: AddTicketRequest, addAttachmentRequest: [AddAttachmentRequest]): Promise<any>;
18
19
  getTicketById(ticketId: string): Promise<any>;
20
+ getTicketByIdDynamic(ticketId: string, fields: string[]): Promise<any>;
19
21
  getAttachmentByWorkEffortId(workEffortIds: [string]): Promise<any>;
20
22
  getListComment(getCommentRequest: GetCommentRequest): Promise<any>;
21
23
  addComment(params: any): Promise<any>;
@@ -205,6 +205,24 @@ class CrmService extends serviceSDK_1.Service {
205
205
  }
206
206
  });
207
207
  }
208
+ getListTicketDynamic(performerId, getTicketRequest, fields) {
209
+ return __awaiter(this, void 0, void 0, function* () {
210
+ const query = (0, queries_1.GET_LIST_TICKET_DYNAMIC)(fields);
211
+ const variables = {
212
+ partyId: this.orgId,
213
+ performerId,
214
+ getTicketRequest,
215
+ };
216
+ try {
217
+ const response = yield this.graphqlQueryV2(query, variables);
218
+ return response.getListTicket;
219
+ }
220
+ catch (error) {
221
+ console.log(`Error fetching get getListTicketDynamic method: ${error}`);
222
+ throw error;
223
+ }
224
+ });
225
+ }
208
226
  addTicket(performerId, addTicketRequest, addAttachmentRequest) {
209
227
  return __awaiter(this, void 0, void 0, function* () {
210
228
  const mutation = mutations_1.ADD_TICKED;
@@ -240,6 +258,22 @@ class CrmService extends serviceSDK_1.Service {
240
258
  }
241
259
  });
242
260
  }
261
+ getTicketByIdDynamic(ticketId, fields) {
262
+ return __awaiter(this, void 0, void 0, function* () {
263
+ const query = (0, queries_1.GET_LIST_TICKET_BY_ID_DYNAMIC)(fields);
264
+ const variables = {
265
+ ticketId,
266
+ };
267
+ try {
268
+ const response = yield this.graphqlQueryV2(query, variables);
269
+ return response.getTicketById;
270
+ }
271
+ catch (error) {
272
+ console.log(`Error in getTicketByIdDynamic: ${error}`);
273
+ throw error;
274
+ }
275
+ });
276
+ }
243
277
  getAttachmentByWorkEffortId(workEffortIds) {
244
278
  return __awaiter(this, void 0, void 0, function* () {
245
279
  const query = queries_1.GET_ATTACHMENT_BY_WORK_EFFORT_ID;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longvansoftware/service-js-client",
3
- "version": "1.16.4",
3
+ "version": "1.16.5",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [
@@ -1 +0,0 @@
1
- export declare const ADD_CUSTOMER_ID_INTO_VOUCHER: import("graphql").DocumentNode;
@@ -1,34 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.ADD_CUSTOMER_ID_INTO_VOUCHER = void 0;
7
- const graphql_tag_1 = __importDefault(require("graphql-tag"));
8
- exports.ADD_CUSTOMER_ID_INTO_VOUCHER = (0, graphql_tag_1.default) `
9
- mutation AddCustomerToVoucher(
10
- $partyId: String!
11
- $voucherCode: String!
12
- $userId: String!
13
- $affiliateId: String
14
- ) {
15
- addCustomerToVoucher(
16
- partyId: $partyId
17
- voucherCode: $voucherCode
18
- userId: $userId
19
- affiliateId: $affiliateId
20
- ) {
21
- id
22
- customerId
23
- campaignActionId
24
- campaignId
25
- partyId
26
- voucherCode
27
- voucherType
28
- status
29
- discountAmount
30
- discountPercent
31
- usageLimitPerVoucher
32
- }
33
- }
34
- `;
@@ -1,9 +0,0 @@
1
- export declare const GET_CAMPAIGN_ACTION_ACTIVE_NOW: import("graphql").DocumentNode;
2
- export declare const GET_VOUCHERS: import("graphql").DocumentNode;
3
- export declare const CHECK_VALID_VOUCHER: import("graphql").DocumentNode;
4
- export declare const GET_CAMPAIGN_ACTIVE_NOW: import("graphql").DocumentNode;
5
- export declare const GET_PROMOTION_PRODUCT_PRICE: import("graphql").DocumentNode;
6
- export declare const GET_VOUCHER_AVAILABLE_FOR_CUSTOMER: import("graphql").DocumentNode;
7
- export declare const SUGGEST_VOUCHER: import("graphql").DocumentNode;
8
- export declare const GET_CAMPAIGN_ACTION_BY_ID: import("graphql").DocumentNode;
9
- export declare const SEARCH_PRODUCT_GIFT_PROMOTION_RESPONSE: import("graphql").DocumentNode;