@longvansoftware/service-js-client 1.16.5 → 1.16.6

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 (36) hide show
  1. package/dist/src/graphql/cloud/mutations.d.ts +16 -23
  2. package/dist/src/graphql/cloud/mutations.js +1 -101
  3. package/dist/src/graphql/cloud/queries.d.ts +0 -1
  4. package/dist/src/graphql/cloud/queries.js +1 -26
  5. package/dist/src/graphql/computing/mutations.d.ts +0 -1
  6. package/dist/src/graphql/computing/mutations.js +1 -15
  7. package/dist/src/graphql/crm/mutations.d.ts +0 -3
  8. package/dist/src/graphql/crm/mutations.js +1 -54
  9. package/dist/src/graphql/crm/queries.d.ts +11 -17
  10. package/dist/src/graphql/crm/queries.js +1 -107
  11. package/dist/src/graphql/crm_camping/queries.js +19 -49
  12. package/dist/src/graphql/orderGraphQL/queries.d.ts +5 -7
  13. package/dist/src/graphql/orderGraphQL/queries.js +1 -11
  14. package/dist/src/graphql/product/queries.d.ts +0 -2
  15. package/dist/src/graphql/product/queries.js +1 -32
  16. package/dist/src/lib/auth/index.d.ts +1 -1
  17. package/dist/src/lib/auth/index.js +4 -3
  18. package/dist/src/lib/cloud/index.d.ts +0 -7
  19. package/dist/src/lib/cloud/index.js +0 -123
  20. package/dist/src/lib/computing/index.d.ts +0 -1
  21. package/dist/src/lib/computing/index.js +0 -17
  22. package/dist/src/lib/crm/index.d.ts +0 -8
  23. package/dist/src/lib/crm/index.js +0 -141
  24. package/dist/src/lib/crm_camping/index.d.ts +2 -2
  25. package/dist/src/lib/crm_camping/index.js +8 -13
  26. package/dist/src/lib/orderGraphQL/index.d.ts +0 -1
  27. package/dist/src/lib/orderGraphQL/index.js +0 -16
  28. package/dist/src/lib/product/index.d.ts +0 -2
  29. package/dist/src/lib/product/index.js +0 -34
  30. package/dist/src/lib/resource_permission/index.d.ts +2 -2
  31. package/dist/src/lib/resource_permission/index.js +4 -4
  32. package/dist/src/lib/service.d.ts +14 -0
  33. package/dist/src/lib/service.js +101 -0
  34. package/dist/src/utils/build-field-string.d.ts +1 -0
  35. package/dist/src/utils/build-field-string.js +16 -0
  36. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GET_CATEGORIES = exports.GET_LIST_PRODUCTS_CONFIG_DYNAMIC = exports.GET_TAGS_BY_CATEGORY = exports.GET_TAGS = exports.GET_LIST_PRICE = exports.GET_DETAIL_STORES = exports.GET_RELATED_INFOR = exports.GET_PRODUCT_VARIANT_BY_ID_QUERY_DYNAMIC = exports.GET_PRODUCT_VARIANT_BY_ID = exports.GET_RESOURCE_BY_PRODUCT = exports.GET_HANDLE_BY_SERVICETYPE = exports.GET_PRODUCTS_DYNAMIC = exports.GET_PRODUCTS = exports.GET_POLICY = exports.GET_PRODUCT_OPTION = exports.GET_BRAND_DETAIL_QUERY = exports.GET_BRANDS_BY_CATEGORY_QUERY = exports.GET_BRANDS_QUERY = exports.GET_CATEGORY_BY_ID_QUERY = exports.GET_CATEGORY_BY_HANDLE_QUERY = exports.GET_CATEGORIES_QUERY = exports.GET_SIMPLE_PRODUCTS_QUERY = exports.GET_PRODUCT_BY_SLUG_QUERY = exports.GET_PRODUCT_BY_ID_QUERY_DYNAMIC = exports.GET_PRODUCT_BY_ID_QUERY = void 0;
3
+ exports.GET_LIST_PRODUCTS_CONFIG_DYNAMIC = exports.GET_TAGS_BY_CATEGORY = exports.GET_TAGS = exports.GET_LIST_PRICE = exports.GET_DETAIL_STORES = exports.GET_RELATED_INFOR = exports.GET_PRODUCT_VARIANT_BY_ID = exports.GET_RESOURCE_BY_PRODUCT = exports.GET_HANDLE_BY_SERVICETYPE = exports.GET_PRODUCTS_DYNAMIC = exports.GET_PRODUCTS = exports.GET_POLICY = exports.GET_PRODUCT_OPTION = exports.GET_BRAND_DETAIL_QUERY = exports.GET_BRANDS_BY_CATEGORY_QUERY = exports.GET_BRANDS_QUERY = exports.GET_CATEGORY_BY_ID_QUERY = exports.GET_CATEGORY_BY_HANDLE_QUERY = exports.GET_CATEGORIES_QUERY = exports.GET_SIMPLE_PRODUCTS_QUERY = exports.GET_PRODUCT_BY_SLUG_QUERY = exports.GET_PRODUCT_BY_ID_QUERY_DYNAMIC = exports.GET_PRODUCT_BY_ID_QUERY = void 0;
4
4
  const graphql_tag_1 = require("graphql-tag");
5
5
  // export const GET_PRODUCT_BY_ID_QUERY = gql`
6
6
  // query GetProductById(
@@ -907,24 +907,6 @@ exports.GET_PRODUCT_VARIANT_BY_ID = (0, graphql_tag_1.gql) `
907
907
  }
908
908
  }
909
909
  `;
910
- const GET_PRODUCT_VARIANT_BY_ID_QUERY_DYNAMIC = (fields = []) => {
911
- const fieldStr = fields.join("\n ");
912
- const hasFields = fields.length > 0;
913
- return (0, graphql_tag_1.gql) `
914
- query GetProductVariantById(
915
- $partnerId: String!
916
- $storeChannel: String!
917
- $variantId: String!
918
- ) {
919
- getProductVariantById(
920
- partnerId: $partnerId
921
- storeChannel: $storeChannel
922
- variantId: $variantId
923
- ) ${hasFields ? `{ ${fieldStr} }` : ""}
924
- }
925
- `;
926
- };
927
- exports.GET_PRODUCT_VARIANT_BY_ID_QUERY_DYNAMIC = GET_PRODUCT_VARIANT_BY_ID_QUERY_DYNAMIC;
928
910
  exports.GET_RELATED_INFOR = (0, graphql_tag_1.gql) `
929
911
  query GetProductVariantById($id: String!) {
930
912
  getRelatedInfor(id: $id) {
@@ -1036,16 +1018,3 @@ const GET_LIST_PRODUCTS_CONFIG_DYNAMIC = (fields = []) => {
1036
1018
  `;
1037
1019
  };
1038
1020
  exports.GET_LIST_PRODUCTS_CONFIG_DYNAMIC = GET_LIST_PRODUCTS_CONFIG_DYNAMIC;
1039
- exports.GET_CATEGORIES = (0, graphql_tag_1.gql) `
1040
- query GetCategories($partnerId: String!, $storeChannel: String!) {
1041
- getCategories(partnerId: $partnerId, storeChannel: $storeChannel) {
1042
- id
1043
- title
1044
- image
1045
- icon
1046
- parentId
1047
- level
1048
- handle
1049
- }
1050
- }
1051
- `;
@@ -32,7 +32,7 @@ export declare class AuthService extends Service {
32
32
  getUserLoginByToken(accessToken: string): Promise<any>;
33
33
  updateProfile(userLoginId: string, name: string, phone: string, email: string): Promise<any>;
34
34
  createUserDetail(userLoginId: string): Promise<any>;
35
- updateInfo(accessToken: string, updateUserRequest: UpdateInfoRequest['updateUserRequest'], type: string, password: string | null): Promise<any>;
35
+ updateInfo(orgId: string, accessToken: string, updateUserRequest: UpdateInfoRequest['updateUserRequest'], type: string, password: string | null): Promise<any>;
36
36
  linkingUserLoginAndUserDetail(userLoginId: string, partyId: string): Promise<any>;
37
37
  getUserLoginByUserLoginId(userLoginId: string): Promise<any>;
38
38
  checkUsernameExisted(username: string): Promise<any>;
@@ -174,11 +174,11 @@ class AuthService extends serviceSDK_1.Service {
174
174
  }
175
175
  });
176
176
  }
177
- updateInfo(accessToken, updateUserRequest, type, password) {
177
+ updateInfo(orgId, accessToken, updateUserRequest, type, password) {
178
178
  return __awaiter(this, void 0, void 0, function* () {
179
179
  const mutation = mutations_1.UPDATE_INFO_MUTATION;
180
180
  const variables = {
181
- orgId: this.orgId,
181
+ orgId,
182
182
  accessToken,
183
183
  updateUserRequest: {
184
184
  fullName: updateUserRequest.fullName,
@@ -189,13 +189,14 @@ class AuthService extends serviceSDK_1.Service {
189
189
  gender: updateUserRequest.gender || null,
190
190
  imageUrl: updateUserRequest.imageUrl || null,
191
191
  personalTitle: updateUserRequest.personalTitle || null,
192
- birthDate: updateUserRequest.birthDate || null,
193
192
  },
194
193
  type,
195
194
  password,
196
195
  };
196
+ console.log("variables", variables);
197
197
  try {
198
198
  const response = yield this.graphqlMutation(mutation, variables);
199
+ console.log("res update", response);
199
200
  return response.updateInfo;
200
201
  }
201
202
  catch (error) {
@@ -11,10 +11,6 @@ export declare class CloudService extends Service {
11
11
  setToken(token: string): void;
12
12
  setStoreId(storeId: string): void;
13
13
  serviceDetail(serviceId: string): Promise<any>;
14
- updateServiceCompleted(serviceId: string, handleBy: string): Promise<any>;
15
- updateServiceNew(serviceId: string, handleBy: string): Promise<any>;
16
- updateServiceReadyDeploy(serviceId: string, handleBy: string): Promise<any>;
17
- updateUrlPublic(serviceId: string, handleBy: string, urlPublic: string): Promise<any>;
18
14
  getMailResource(serviceId: string): Promise<any>;
19
15
  changeServiceName(serviceId: string, updateBy: string, updateData: string): Promise<any>;
20
16
  getUserMailHosting(serviceId: string): Promise<any>;
@@ -43,12 +39,9 @@ export declare class CloudService extends Service {
43
39
  getDomainInfo(domainName: string): Promise<any>;
44
40
  getDomainSupplier(serviceId: string): Promise<any>;
45
41
  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>;
48
42
  getOrderChangeResourceTerm(serviceId: string, createdBy: string): Promise<any>;
49
43
  searchActions(parameter: any): Promise<any>;
50
44
  createActionChangeIpOfService(action: any, byUser: string): Promise<any>;
51
45
  updateActionStatus(actionId: string, status: string, byUser: string): Promise<any>;
52
46
  updateActionCustomAttribute(actionId: string, attrName: string, attrValue: string, byUser: string): Promise<any>;
53
- getElasticCloudResource(serviceId: string): Promise<any>;
54
47
  }
@@ -45,75 +45,6 @@ class CloudService extends serviceSDK_1.Service {
45
45
  }
46
46
  });
47
47
  }
48
- updateServiceCompleted(serviceId, handleBy) {
49
- return __awaiter(this, void 0, void 0, function* () {
50
- const mutation = mutations_1.UPDATE_SERVICE_COMPLETED;
51
- const variables = {
52
- serviceId,
53
- handleBy,
54
- };
55
- try {
56
- const response = yield this.graphqlMutationV2(mutation, variables);
57
- return response.updateServiceCompleted;
58
- }
59
- catch (error) {
60
- console.log(`Error in updateServiceCompleted: ${error}`);
61
- throw error;
62
- }
63
- });
64
- }
65
- updateServiceNew(serviceId, handleBy) {
66
- return __awaiter(this, void 0, void 0, function* () {
67
- const mutation = mutations_1.UPDATE_SERVICE_NEW;
68
- const variables = {
69
- serviceId,
70
- handleBy,
71
- };
72
- try {
73
- const response = yield this.graphqlMutationV2(mutation, variables);
74
- return response.updateServiceNew;
75
- }
76
- catch (error) {
77
- console.log(`Error in updateServiceNew: ${error}`);
78
- throw error;
79
- }
80
- });
81
- }
82
- updateServiceReadyDeploy(serviceId, handleBy) {
83
- return __awaiter(this, void 0, void 0, function* () {
84
- const mutation = mutations_1.UPDATE_SERVICE_READY_DEPLOY;
85
- const variables = {
86
- serviceId,
87
- handleBy,
88
- };
89
- try {
90
- const response = yield this.graphqlMutationV2(mutation, variables);
91
- return response.updateServiceReadyDeploy;
92
- }
93
- catch (error) {
94
- console.log(`Error in updateServiceReadyDeploy: ${error}`);
95
- throw error;
96
- }
97
- });
98
- }
99
- updateUrlPublic(serviceId, handleBy, urlPublic) {
100
- return __awaiter(this, void 0, void 0, function* () {
101
- const mutation = mutations_1.UPDATE_URL_PUBLIC;
102
- const variables = {
103
- serviceId,
104
- handleBy,
105
- urlPublic
106
- };
107
- try {
108
- const response = yield this.graphqlMutationV2(mutation, variables);
109
- return response.updateUrlPublic;
110
- }
111
- catch (error) {
112
- console.log(`Error in updateUrlPublic: ${error}`);
113
- throw error;
114
- }
115
- });
116
- }
117
48
  getMailResource(serviceId) {
118
49
  return __awaiter(this, void 0, void 0, function* () {
119
50
  const query = queries_1.GET_MAIL_RESOURCE;
@@ -591,44 +522,6 @@ class CloudService extends serviceSDK_1.Service {
591
522
  }
592
523
  });
593
524
  }
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
- }
632
525
  getOrderChangeResourceTerm(serviceId, createdBy) {
633
526
  return __awaiter(this, void 0, void 0, function* () {
634
527
  const mutation = mutations_1.GET_ORDER_CHANGE_RESOURCE_TERM;
@@ -718,21 +611,5 @@ class CloudService extends serviceSDK_1.Service {
718
611
  }
719
612
  });
720
613
  }
721
- getElasticCloudResource(serviceId) {
722
- return __awaiter(this, void 0, void 0, function* () {
723
- const query = queries_1.GET_ELASTIC_CLOUD_RESOURCE;
724
- const variables = {
725
- serviceId,
726
- };
727
- try {
728
- const response = yield this.graphqlQueryV2(query, variables);
729
- return response.getElasticCloudResource;
730
- }
731
- catch (error) {
732
- console.log(`Error in getElasticCloudResource: ${error}`);
733
- throw error;
734
- }
735
- });
736
- }
737
614
  }
738
615
  exports.CloudService = CloudService;
@@ -61,5 +61,4 @@ export declare class ComputingService extends Service {
61
61
  updateCPU(computingId: string, socket: number, corePerSocket: number, updateBy: string): Promise<any>;
62
62
  updateRAM(computingId: string, size: number, unit: string, updateBy: string): Promise<any>;
63
63
  getComputingsDynamic(userId: string, fields: string[]): Promise<any>;
64
- createComputingForEC(createComputingInputForEC: any, createBy: string): Promise<any>;
65
64
  }
@@ -906,22 +906,5 @@ class ComputingService extends serviceSDK_1.Service {
906
906
  }
907
907
  });
908
908
  }
909
- createComputingForEC(createComputingInputForEC, createBy) {
910
- return __awaiter(this, void 0, void 0, function* () {
911
- const mutation = mutations_1.CREATE_COMPUTING_FOR_EC;
912
- const variables = {
913
- createComputingInputForEC,
914
- createBy,
915
- };
916
- try {
917
- const response = yield this.graphqlMutationV2(mutation, variables);
918
- return response.createComputingForEC;
919
- }
920
- catch (error) {
921
- console.log(`Error fetching get createComputingForEC method: ${error}`);
922
- throw error;
923
- }
924
- });
925
- }
926
909
  }
927
910
  exports.ComputingService = ComputingService;
@@ -14,10 +14,8 @@ 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>;
18
17
  addTicket(performerId: string, addTicketRequest: AddTicketRequest, addAttachmentRequest: [AddAttachmentRequest]): Promise<any>;
19
18
  getTicketById(ticketId: string): Promise<any>;
20
- getTicketByIdDynamic(ticketId: string, fields: string[]): Promise<any>;
21
19
  getAttachmentByWorkEffortId(workEffortIds: [string]): Promise<any>;
22
20
  getListComment(getCommentRequest: GetCommentRequest): Promise<any>;
23
21
  addComment(params: any): Promise<any>;
@@ -30,10 +28,4 @@ export declare class CrmService extends Service {
30
28
  cloneResume(resumeOriginalId: string, domain: string, createdBy: string): Promise<any>;
31
29
  linkingResumeDomainAndContact(resumeDomainId: string, resumeContactId: string, contactType: string, linkedBy: string): Promise<any>;
32
30
  getResumeDomainByServiceId(serviceId: string): Promise<any>;
33
- getCollegesByProvinceId(provinceId: string | null): Promise<any>;
34
- getRelatedResourceByResourceType(fromId: string, fromResourceType: string, toResourceType: string): Promise<any>;
35
- addResourceRelated(fromId: string, fromResourceType: string, toIds: string[], toResourceType: string, createdBy: string): Promise<any>;
36
- getResumeInfoByCustomerId(customerId: string): Promise<any>;
37
- createResumeInfo(data: any): Promise<any>;
38
- updateFieldResume(resumeId: string, fieldName: string, value: string, resourceType: string, updatedBy: string): Promise<any>;
39
31
  }
@@ -205,24 +205,6 @@ 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
- }
226
208
  addTicket(performerId, addTicketRequest, addAttachmentRequest) {
227
209
  return __awaiter(this, void 0, void 0, function* () {
228
210
  const mutation = mutations_1.ADD_TICKED;
@@ -258,22 +240,6 @@ class CrmService extends serviceSDK_1.Service {
258
240
  }
259
241
  });
260
242
  }
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
- }
277
243
  getAttachmentByWorkEffortId(workEffortIds) {
278
244
  return __awaiter(this, void 0, void 0, function* () {
279
245
  const query = queries_1.GET_ATTACHMENT_BY_WORK_EFFORT_ID;
@@ -491,112 +457,5 @@ class CrmService extends serviceSDK_1.Service {
491
457
  }
492
458
  });
493
459
  }
494
- getCollegesByProvinceId(provinceId) {
495
- return __awaiter(this, void 0, void 0, function* () {
496
- const query = queries_1.GET_COLLEGES_BY_PROVINCE_ID;
497
- const variables = {
498
- provinceId,
499
- };
500
- try {
501
- const response = yield this.graphqlQueryV2(query, variables);
502
- return response.getCollegesByProvinceId;
503
- }
504
- catch (error) {
505
- console.log(`Error in getCollegesByProvinceId: ${error}`);
506
- throw error;
507
- }
508
- });
509
- }
510
- getRelatedResourceByResourceType(fromId, fromResourceType, toResourceType) {
511
- return __awaiter(this, void 0, void 0, function* () {
512
- const query = queries_1.GET_RELATED_RESOURCE_BY_RESOURCE_TYPE;
513
- const variables = {
514
- fromId,
515
- fromResourceType,
516
- toResourceType,
517
- accessToken: this.token,
518
- partnerId: this.orgId,
519
- };
520
- try {
521
- const response = yield this.graphqlQueryV2(query, variables);
522
- return response.getRelatedResourceByResourceType;
523
- }
524
- catch (error) {
525
- console.log(`Error in getRelatedResourceByResourceType: ${error}`);
526
- throw error;
527
- }
528
- });
529
- }
530
- addResourceRelated(fromId, fromResourceType, toIds, toResourceType, createdBy) {
531
- return __awaiter(this, void 0, void 0, function* () {
532
- const mutation = mutations_1.ADD_RESOURCE_RELATED;
533
- const variables = {
534
- fromId,
535
- fromResourceType,
536
- toIds,
537
- toResourceType,
538
- createdBy,
539
- };
540
- try {
541
- const response = yield this.graphqlMutationV2(mutation, variables);
542
- return response.addResourceRelated;
543
- }
544
- catch (error) {
545
- console.log(`Error in addResourceRelated: ${error}`);
546
- throw error;
547
- }
548
- });
549
- }
550
- getResumeInfoByCustomerId(customerId) {
551
- return __awaiter(this, void 0, void 0, function* () {
552
- const query = queries_1.GET_RESUME_INFO_BY_CUSTOMER_ID;
553
- const variables = {
554
- customerId,
555
- orgId: this.orgId,
556
- };
557
- try {
558
- const response = yield this.graphqlQueryV2(query, variables);
559
- return response.getResumeInfoByCustomerId;
560
- }
561
- catch (error) {
562
- console.log(`Error in getResumeInfoByCustomerId: ${error}`);
563
- throw error;
564
- }
565
- });
566
- }
567
- createResumeInfo(data) {
568
- return __awaiter(this, void 0, void 0, function* () {
569
- const mutation = mutations_1.CREATE_RUSUME_INFO;
570
- const variables = Object.assign(Object.assign({}, data), { orgId: this.orgId });
571
- try {
572
- const response = yield this.graphqlMutationV2(mutation, variables);
573
- return response.createResumeInfo;
574
- }
575
- catch (error) {
576
- console.log(`Error in createResumeInfo: ${error}`);
577
- throw error;
578
- }
579
- });
580
- }
581
- updateFieldResume(resumeId, fieldName, value, resourceType, updatedBy) {
582
- return __awaiter(this, void 0, void 0, function* () {
583
- const mutation = mutations_1.UPDATE_FIELD_RESUME;
584
- const variables = {
585
- resumeId,
586
- fieldName,
587
- value,
588
- resourceType,
589
- updatedBy,
590
- };
591
- try {
592
- const response = yield this.graphqlMutationV2(mutation, variables);
593
- return response.updateFieldResume;
594
- }
595
- catch (error) {
596
- console.log(`Error in updateFieldResume: ${error}`);
597
- throw error;
598
- }
599
- });
600
- }
601
460
  }
602
461
  exports.CrmService = CrmService;
@@ -6,11 +6,11 @@ export declare class CrmCampingService extends Service {
6
6
  searchProductQuantityPromotionAction(productId: string): Promise<any>;
7
7
  addCustomerToVoucher(userId: string, voucherCode: string): Promise<any>;
8
8
  getCampaignActionById(campaignActionId: string): Promise<any>;
9
- suggestVoucher(customerId: string, scopeIgnore: string | null, scope: string | null, isNewCustomer: boolean): Promise<any>;
9
+ suggestVoucher(customerId: string, scope: string | null, isNewCustomer: boolean): Promise<any>;
10
10
  searchVouchers(campaignId: String, campaignActionId: String, campaignActionType: String, customerId: String, pageNumber: number, pageSize: number): Promise<any>;
11
11
  getAverageRating(targetIds: [string], customerId: string, evaluationType: string): Promise<any>;
12
12
  getUrlEvaluation(targetIds: [string], customerId: string, evaluationType: string): Promise<any>;
13
13
  getNumberOfTicketEvaluation(customerId: string): Promise<any>;
14
- searchProductGiftPromotionResponse(parameterSearchProductGift: any): Promise<any>;
14
+ searchProductGiftPromotionResponse(productId: string): Promise<any>;
15
15
  addProductGiftPromotion(orderId: string, updatedBy: string, addData: any): Promise<any>;
16
16
  }
@@ -89,7 +89,7 @@ class CrmCampingService extends serviceSDK_1.Service {
89
89
  // throw error;
90
90
  // }
91
91
  // }
92
- suggestVoucher(customerId, scopeIgnore, scope, isNewCustomer) {
92
+ suggestVoucher(customerId, scope, isNewCustomer) {
93
93
  return __awaiter(this, void 0, void 0, function* () {
94
94
  const query = queries_1.SUGGEST_VOUCHER;
95
95
  const variables = {
@@ -97,8 +97,7 @@ class CrmCampingService extends serviceSDK_1.Service {
97
97
  excludeExpired: true,
98
98
  customerId,
99
99
  scope,
100
- isNewCustomer,
101
- scopeIgnore,
100
+ isNewCustomer
102
101
  };
103
102
  try {
104
103
  const response = yield this.graphqlQueryV2(query, variables);
@@ -138,7 +137,7 @@ class CrmCampingService extends serviceSDK_1.Service {
138
137
  targetIds,
139
138
  customerId,
140
139
  evaluationType,
141
- orgId: this.orgId,
140
+ orgId: this.orgId
142
141
  };
143
142
  try {
144
143
  const response = yield this.graphqlQueryV2(query, variables);
@@ -157,7 +156,7 @@ class CrmCampingService extends serviceSDK_1.Service {
157
156
  targetIds,
158
157
  customerId,
159
158
  evaluationType,
160
- orgId: this.orgId,
159
+ orgId: this.orgId
161
160
  };
162
161
  try {
163
162
  const response = yield this.graphqlQueryV2(query, variables);
@@ -174,7 +173,7 @@ class CrmCampingService extends serviceSDK_1.Service {
174
173
  const query = queries_1.GET_NUMBER_OF_TICKET_EVALUATION;
175
174
  const variables = {
176
175
  customerId,
177
- orgId: this.orgId,
176
+ orgId: this.orgId
178
177
  };
179
178
  try {
180
179
  const response = yield this.graphqlQueryV2(query, variables);
@@ -186,17 +185,13 @@ class CrmCampingService extends serviceSDK_1.Service {
186
185
  }
187
186
  });
188
187
  }
189
- searchProductGiftPromotionResponse(parameterSearchProductGift) {
188
+ searchProductGiftPromotionResponse(productId) {
190
189
  return __awaiter(this, void 0, void 0, function* () {
191
- // console.log("🚀 ~ CrmCampingService ~ searchProductGiftPromotionResponse ~ parameterSearchProductGift:", parameterSearchProductGift)
192
190
  const query = queries_1.SEARCH_PRODUCT_GIFT_PROMOTION_RESPONSE;
193
191
  const variables = {
194
- parameterSearchProductGift: Object.assign({ partyId: this.orgId }, parameterSearchProductGift),
192
+ partyId: this.orgId,
193
+ productId
195
194
  };
196
- // console.log(
197
- // "🚀 ~ CrmCampingService ~ searchProductGiftPromotionResponse ~ variables:",
198
- // variables
199
- // );
200
195
  try {
201
196
  const response = yield this.graphqlQueryV2(query, variables);
202
197
  return response.searchProductGiftPromotionResponse;
@@ -5,7 +5,6 @@ export declare class OrderGraphQLService extends Service {
5
5
  setStoreId(storeId: string): void;
6
6
  createOrder(input: any): Promise<any>;
7
7
  getOrderDetail(orderId: string): Promise<any>;
8
- getOrderDetailDynamic(orderId: string, fields: string[]): Promise<any>;
9
8
  getQuantityOrderLineItems(orderId: string): Promise<any>;
10
9
  updateQuantityV2(payload: any): Promise<any>;
11
10
  getOrderLineItemByServiceId(serviceId: string): Promise<any>;
@@ -55,22 +55,6 @@ class OrderGraphQLService extends serviceSDK_1.Service {
55
55
  }
56
56
  });
57
57
  }
58
- getOrderDetailDynamic(orderId, fields) {
59
- return __awaiter(this, void 0, void 0, function* () {
60
- const query = (0, queries_1.GET_ORDER_DETAIL_DYNAMIC)(fields);
61
- const variables = {
62
- orderId,
63
- };
64
- try {
65
- const response = yield this.graphqlQueryV2(query, variables);
66
- return response.orderDetail;
67
- }
68
- catch (error) {
69
- console.log(`Error in orderDetailDynamic: ${error}`);
70
- throw error;
71
- }
72
- });
73
- }
74
58
  getQuantityOrderLineItems(orderId) {
75
59
  return __awaiter(this, void 0, void 0, function* () {
76
60
  const query = queries_1.GET_QUANTITY_ORDER_LINEITEMS;
@@ -43,12 +43,10 @@ export declare class ProductService extends Service {
43
43
  getHandleByServiceTypes(serviceTypes: [string]): Promise<any>;
44
44
  getResourceByProduct(productId: string): Promise<any>;
45
45
  getProductVariantById(variantId: string): Promise<any>;
46
- getProductVariantByIdDynamic(variantId: string, store: string, fields: string[]): Promise<any>;
47
46
  getRelatedInfor(id: string): Promise<any>;
48
47
  getDetailStores(storeId: string): Promise<any>;
49
48
  getListPrice(productIds: string[], storeId: string): Promise<any>;
50
49
  getTags(storeId: string): Promise<any>;
51
50
  getTagsByCategory(categoryId: string, storeId: string): Promise<any>;
52
51
  getListProductConfigDynamic(productId: string, store: string, fields: string[]): Promise<any>;
53
- getCategories(): Promise<any>;
54
52
  }
@@ -231,24 +231,6 @@ class ProductService extends serviceSDK_1.Service {
231
231
  }
232
232
  });
233
233
  }
234
- getProductVariantByIdDynamic(variantId, store, fields) {
235
- return __awaiter(this, void 0, void 0, function* () {
236
- const query = (0, queries_1.GET_PRODUCT_VARIANT_BY_ID_QUERY_DYNAMIC)(fields);
237
- const variables = {
238
- partnerId: this.orgId,
239
- storeChannel: store ? store : this.storeId,
240
- variantId,
241
- };
242
- try {
243
- const response = yield this.graphqlQuery(query, variables);
244
- return response.getProductById;
245
- }
246
- catch (error) {
247
- console.log(`Error fetching product by ID: ${error}`);
248
- throw error;
249
- }
250
- });
251
- }
252
234
  getRelatedInfor(id) {
253
235
  return __awaiter(this, void 0, void 0, function* () {
254
236
  const query = queries_1.GET_RELATED_INFOR;
@@ -353,21 +335,5 @@ class ProductService extends serviceSDK_1.Service {
353
335
  }
354
336
  });
355
337
  }
356
- getCategories() {
357
- return __awaiter(this, void 0, void 0, function* () {
358
- const query = queries_1.GET_CATEGORIES;
359
- const variables = {
360
- partnerId: this.orgId,
361
- storeChannel: this.storeId,
362
- };
363
- try {
364
- const response = yield this.graphqlQuery(query, variables);
365
- return response.getCategories;
366
- }
367
- catch (error) {
368
- throw error;
369
- }
370
- });
371
- }
372
338
  }
373
339
  exports.ProductService = ProductService;
@@ -3,7 +3,7 @@ export declare class ResourcePermissionService extends Service {
3
3
  constructor(endpoint: string, orgId: string, storeId: string);
4
4
  setToken(token: string): void;
5
5
  setStoreId(storeId: string): void;
6
- shareResource(createModel: any, partnerId: string): Promise<any>;
7
- removeShareParty(resourceId: string, sharePartyId: string, resourceType: string, partnerId: string): Promise<any>;
6
+ shareResource(createModel: any): Promise<any>;
7
+ removeShareParty(resourceId: string, sharePartyId: string, resourceType: string): Promise<any>;
8
8
  getSharedUserByService(resourceType: string, resourceId: string): Promise<any>;
9
9
  }