@longvansoftware/service-js-client 1.15.3 → 1.15.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.
@@ -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
+ `;
@@ -1,5 +1,7 @@
1
- export declare const GET_ORDER_DETAIL: import("graphql").DocumentNode;
2
- export declare const GET_QUANTITY_ORDER_LINEITEMS: import("graphql").DocumentNode;
3
- export declare const GET_ORDER_LINE_ITEM_BY_SERVICE_ID: import("graphql").DocumentNode;
4
- export declare const GET_ORDER_BY_SERVICE_ID: import("graphql").DocumentNode;
5
- export declare const FIND_ORDER_BY_OWNER_PARTYID: import("graphql").DocumentNode;
1
+ import { DocumentNode } from "graphql";
2
+ export declare const GET_ORDER_DETAIL: DocumentNode;
3
+ export declare const GET_ORDER_DETAIL_DYNAMIC: (fields?: string[]) => DocumentNode;
4
+ export declare const GET_QUANTITY_ORDER_LINEITEMS: DocumentNode;
5
+ export declare const GET_ORDER_LINE_ITEM_BY_SERVICE_ID: DocumentNode;
6
+ export declare const GET_ORDER_BY_SERVICE_ID: DocumentNode;
7
+ export declare const FIND_ORDER_BY_OWNER_PARTYID: DocumentNode;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FIND_ORDER_BY_OWNER_PARTYID = exports.GET_ORDER_BY_SERVICE_ID = exports.GET_ORDER_LINE_ITEM_BY_SERVICE_ID = exports.GET_QUANTITY_ORDER_LINEITEMS = exports.GET_ORDER_DETAIL = void 0;
3
+ exports.FIND_ORDER_BY_OWNER_PARTYID = exports.GET_ORDER_BY_SERVICE_ID = exports.GET_ORDER_LINE_ITEM_BY_SERVICE_ID = exports.GET_QUANTITY_ORDER_LINEITEMS = exports.GET_ORDER_DETAIL_DYNAMIC = exports.GET_ORDER_DETAIL = void 0;
4
4
  const graphql_tag_1 = require("graphql-tag");
5
5
  exports.GET_ORDER_DETAIL = (0, graphql_tag_1.gql) `
6
6
  query getOrderDetail($orderId: String!) {
@@ -154,6 +154,16 @@ exports.GET_ORDER_DETAIL = (0, graphql_tag_1.gql) `
154
154
  }
155
155
  }
156
156
  `;
157
+ const GET_ORDER_DETAIL_DYNAMIC = (fields = []) => {
158
+ const fieldStr = fields.join("\n ");
159
+ const hasFields = fields.length > 0;
160
+ return (0, graphql_tag_1.gql) `
161
+ query getOrderDetail($orderId: String!) {
162
+ orderDetail(orderId: $orderId) ${hasFields ? `{ ${fieldStr} }` : ""}
163
+ }
164
+ `;
165
+ };
166
+ exports.GET_ORDER_DETAIL_DYNAMIC = GET_ORDER_DETAIL_DYNAMIC;
157
167
  exports.GET_QUANTITY_ORDER_LINEITEMS = (0, graphql_tag_1.gql) `
158
168
  query getOrderDetail($orderId: String!) {
159
169
  orderDetail(orderId: $orderId) {
@@ -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(orgId: string, accessToken: string, updateUserRequest: UpdateInfoRequest['updateUserRequest'], type: string, password: string | null): Promise<any>;
35
+ updateInfo(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(orgId, accessToken, updateUserRequest, type, password) {
177
+ updateInfo(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,
181
+ orgId: this.orgId,
182
182
  accessToken,
183
183
  updateUserRequest: {
184
184
  fullName: updateUserRequest.fullName,
@@ -189,14 +189,13 @@ 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,
192
193
  },
193
194
  type,
194
195
  password,
195
196
  };
196
- console.log("variables", variables);
197
197
  try {
198
198
  const response = yield this.graphqlMutation(mutation, variables);
199
- console.log("res update", response);
200
199
  return response.updateInfo;
201
200
  }
202
201
  catch (error) {
@@ -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;
@@ -5,6 +5,7 @@ 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>;
8
9
  getQuantityOrderLineItems(orderId: string): Promise<any>;
9
10
  updateQuantityV2(payload: any): Promise<any>;
10
11
  getOrderLineItemByServiceId(serviceId: string): Promise<any>;
@@ -55,6 +55,22 @@ 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
+ }
58
74
  getQuantityOrderLineItems(orderId) {
59
75
  return __awaiter(this, void 0, void 0, function* () {
60
76
  const query = queries_1.GET_QUANTITY_ORDER_LINEITEMS;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longvansoftware/service-js-client",
3
- "version": "1.15.3",
3
+ "version": "1.15.5",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [