@longvansoftware/service-js-client 1.15.4 → 1.15.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.
@@ -9,3 +9,4 @@ export declare const GET_RESUME_ID_BY_RESOURCE: import("graphql").DocumentNode;
9
9
  export declare const GET_RESUME_CONTACT: import("graphql").DocumentNode;
10
10
  export declare const GET_REUSME_BY_CUSTOMER_ID: import("graphql").DocumentNode;
11
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;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- 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_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;
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(
@@ -336,3 +336,12 @@ exports.GET_RESUME_DOMAIN_BY_SERVICE_ID = (0, graphql_tag_1.gql) `
336
336
  }
337
337
  }
338
338
  `;
339
+ exports.GET_COLLEGES_BY_PROVINCE_ID = (0, graphql_tag_1.gql) `
340
+ query GetCollegesByProvinceId($provinceId: String) {
341
+ getCollegesByProvinceId(provinceId: $provinceId) {
342
+ id
343
+ name
344
+ provinceId
345
+ }
346
+ }
347
+ `;
@@ -82,7 +82,7 @@ exports.GET_CAMPAIGN_ACTION_BY_ID = (0, graphql_tag_1.gql) `
82
82
  // }
83
83
  // `;
84
84
  exports.SUGGEST_VOUCHER = (0, graphql_tag_1.gql) `
85
- query SuggestVoucher($partyId: String, $excludeExpired: Boolean, $customerId: String, $scope: String, $isNewCustomer: Boolean) {
85
+ query SuggestVoucher($partyId: String, $excludeExpired: Boolean, $customerId: String, $scope: String, $isNewCustomer: Boolean, $scopeIgnore: String) {
86
86
  suggestVoucher(
87
87
  searchVoucherRequest: {
88
88
  partyId: $partyId
@@ -90,6 +90,7 @@ exports.SUGGEST_VOUCHER = (0, graphql_tag_1.gql) `
90
90
  customerId: $customerId
91
91
  scope: $scope
92
92
  isNewCustomer: $isNewCustomer
93
+ scopeIgnore: $scopeIgnore
93
94
  }
94
95
  ) {
95
96
  total
@@ -28,4 +28,5 @@ export declare class CrmService extends Service {
28
28
  cloneResume(resumeOriginalId: string, domain: string, createdBy: string): Promise<any>;
29
29
  linkingResumeDomainAndContact(resumeDomainId: string, resumeContactId: string, contactType: string, linkedBy: string): Promise<any>;
30
30
  getResumeDomainByServiceId(serviceId: string): Promise<any>;
31
+ getCollegesByProvinceId(provinceId: string | null): Promise<any>;
31
32
  }
@@ -457,5 +457,21 @@ class CrmService extends serviceSDK_1.Service {
457
457
  }
458
458
  });
459
459
  }
460
+ getCollegesByProvinceId(provinceId) {
461
+ return __awaiter(this, void 0, void 0, function* () {
462
+ const query = queries_1.GET_COLLEGES_BY_PROVINCE_ID;
463
+ const variables = {
464
+ provinceId,
465
+ };
466
+ try {
467
+ const response = yield this.graphqlQueryV2(query, variables);
468
+ return response.getCollegesByProvinceId;
469
+ }
470
+ catch (error) {
471
+ console.log(`Error in getCollegesByProvinceId: ${error}`);
472
+ throw error;
473
+ }
474
+ });
475
+ }
460
476
  }
461
477
  exports.CrmService = CrmService;
@@ -6,7 +6,7 @@ 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, scope: string | null, isNewCustomer: boolean): Promise<any>;
9
+ suggestVoucher(customerId: string, scopeIgnore: string | null, 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>;
@@ -89,7 +89,7 @@ class CrmCampingService extends serviceSDK_1.Service {
89
89
  // throw error;
90
90
  // }
91
91
  // }
92
- suggestVoucher(customerId, scope, isNewCustomer) {
92
+ suggestVoucher(customerId, scopeIgnore, 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,7 +97,8 @@ class CrmCampingService extends serviceSDK_1.Service {
97
97
  excludeExpired: true,
98
98
  customerId,
99
99
  scope,
100
- isNewCustomer
100
+ isNewCustomer,
101
+ scopeIgnore,
101
102
  };
102
103
  try {
103
104
  const response = yield this.graphqlQueryV2(query, variables);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longvansoftware/service-js-client",
3
- "version": "1.15.4",
3
+ "version": "1.15.6",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [