@longvansoftware/service-js-client 1.16.2 → 1.16.3
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.
- package/dist/src/graphql/crm/mutations.d.ts +2 -0
- package/dist/src/graphql/crm/mutations.js +37 -1
- package/dist/src/graphql/crm/queries.d.ts +1 -0
- package/dist/src/graphql/crm/queries.js +35 -1
- package/dist/src/lib/crm/index.d.ts +3 -0
- package/dist/src/lib/crm/index.js +51 -0
- package/package.json +1 -1
@@ -12,3 +12,5 @@ export declare const LINKING_RESUME_SERVICE: import("graphql").DocumentNode;
|
|
12
12
|
export declare const CLONE_RESUME: import("graphql").DocumentNode;
|
13
13
|
export declare const LINKING_RESUME_DOMAIN_AND_CONTACT: import("graphql").DocumentNode;
|
14
14
|
export declare const ADD_RESOURCE_RELATED: import("graphql").DocumentNode;
|
15
|
+
export declare const CREATE_RUSUME_INFO: import("graphql").DocumentNode;
|
16
|
+
export declare const UPDATE_FIELD_RESUME: import("graphql").DocumentNode;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.ADD_RESOURCE_RELATED = exports.LINKING_RESUME_DOMAIN_AND_CONTACT = exports.CLONE_RESUME = exports.LINKING_RESUME_SERVICE = exports.UPDATE_RESUME_CONTACT = exports.CREATE_RESUME = 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.UPDATE_FIELD_RESUME = exports.CREATE_RUSUME_INFO = exports.ADD_RESOURCE_RELATED = exports.LINKING_RESUME_DOMAIN_AND_CONTACT = exports.CLONE_RESUME = exports.LINKING_RESUME_SERVICE = exports.UPDATE_RESUME_CONTACT = exports.CREATE_RESUME = 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(
|
@@ -406,3 +406,39 @@ exports.ADD_RESOURCE_RELATED = (0, graphql_tag_1.gql) `
|
|
406
406
|
)
|
407
407
|
}
|
408
408
|
`;
|
409
|
+
exports.CREATE_RUSUME_INFO = (0, graphql_tag_1.gql) `
|
410
|
+
mutation CreateResumeInfo(
|
411
|
+
$customerId: String
|
412
|
+
$name: String
|
413
|
+
$phone: String
|
414
|
+
$email: String
|
415
|
+
$orgId: String!
|
416
|
+
$createdBy: String!
|
417
|
+
) {
|
418
|
+
createResumeInfo(
|
419
|
+
customerId: $customerId
|
420
|
+
name: $name
|
421
|
+
phone: $phone
|
422
|
+
email: $email
|
423
|
+
orgId: $orgId
|
424
|
+
createdBy: $createdBy
|
425
|
+
)
|
426
|
+
}
|
427
|
+
`;
|
428
|
+
exports.UPDATE_FIELD_RESUME = (0, graphql_tag_1.gql) `
|
429
|
+
mutation UpdateFieldResume(
|
430
|
+
$resumeId: String!
|
431
|
+
$fieldName: String!
|
432
|
+
$value: String!
|
433
|
+
$resourceType: String
|
434
|
+
$updatedBy: String!
|
435
|
+
) {
|
436
|
+
updateFieldResume(
|
437
|
+
resumeId: $resumeId
|
438
|
+
fieldName: $fieldName
|
439
|
+
value: $value
|
440
|
+
resourceType: $resourceType
|
441
|
+
updatedBy: $updatedBy
|
442
|
+
)
|
443
|
+
}
|
444
|
+
`;
|
@@ -11,3 +11,4 @@ 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
12
|
export declare const GET_COLLEGES_BY_PROVINCE_ID: import("graphql").DocumentNode;
|
13
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,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
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_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(
|
@@ -372,3 +372,37 @@ exports.GET_RELATED_RESOURCE_BY_RESOURCE_TYPE = (0, graphql_tag_1.gql) `
|
|
372
372
|
}
|
373
373
|
}
|
374
374
|
`;
|
375
|
+
exports.GET_RESUME_INFO_BY_CUSTOMER_ID = (0, graphql_tag_1.gql) `
|
376
|
+
query GetResumeInfoByCustomerId($customerId: String!, $orgId: String!) {
|
377
|
+
getResumeInfoByCustomerId(customerId: $customerId, orgId: $orgId) {
|
378
|
+
resumeId
|
379
|
+
partyId
|
380
|
+
name
|
381
|
+
otherName
|
382
|
+
customerType
|
383
|
+
email
|
384
|
+
country
|
385
|
+
province
|
386
|
+
district
|
387
|
+
ward
|
388
|
+
countryId
|
389
|
+
provinceId
|
390
|
+
districtId
|
391
|
+
wardId
|
392
|
+
address
|
393
|
+
phone
|
394
|
+
contactType
|
395
|
+
taxCode
|
396
|
+
businessCode
|
397
|
+
identityNumber
|
398
|
+
gender
|
399
|
+
birthday
|
400
|
+
cpFrom
|
401
|
+
level
|
402
|
+
ID_BACK
|
403
|
+
ID_FRONT
|
404
|
+
BUSINESS_LICENSE
|
405
|
+
statusCode
|
406
|
+
}
|
407
|
+
}
|
408
|
+
`;
|
@@ -31,4 +31,7 @@ export declare class CrmService extends Service {
|
|
31
31
|
getCollegesByProvinceId(provinceId: string | null): Promise<any>;
|
32
32
|
getRelatedResourceByResourceType(fromId: string, fromResourceType: string, toResourceType: string): Promise<any>;
|
33
33
|
addResourceRelated(fromId: string, fromResourceType: string, toIds: string[], toResourceType: string, createdBy: string): Promise<any>;
|
34
|
+
getResumeInfoByCustomerId(customerId: string): Promise<any>;
|
35
|
+
createResumeInfo(data: any): Promise<any>;
|
36
|
+
updateFieldResume(resumeId: string, fieldName: string, value: string, resourceType: string, updatedBy: string): Promise<any>;
|
34
37
|
}
|
@@ -513,5 +513,56 @@ class CrmService extends serviceSDK_1.Service {
|
|
513
513
|
}
|
514
514
|
});
|
515
515
|
}
|
516
|
+
getResumeInfoByCustomerId(customerId) {
|
517
|
+
return __awaiter(this, void 0, void 0, function* () {
|
518
|
+
const query = queries_1.GET_RESUME_INFO_BY_CUSTOMER_ID;
|
519
|
+
const variables = {
|
520
|
+
customerId,
|
521
|
+
orgId: this.orgId,
|
522
|
+
};
|
523
|
+
try {
|
524
|
+
const response = yield this.graphqlQueryV2(query, variables);
|
525
|
+
return response.getResumeInfoByCustomerId;
|
526
|
+
}
|
527
|
+
catch (error) {
|
528
|
+
console.log(`Error in getResumeInfoByCustomerId: ${error}`);
|
529
|
+
throw error;
|
530
|
+
}
|
531
|
+
});
|
532
|
+
}
|
533
|
+
createResumeInfo(data) {
|
534
|
+
return __awaiter(this, void 0, void 0, function* () {
|
535
|
+
const mutation = mutations_1.CREATE_RUSUME_INFO;
|
536
|
+
const variables = Object.assign(Object.assign({}, data), { orgId: this.orgId });
|
537
|
+
try {
|
538
|
+
const response = yield this.graphqlMutationV2(mutation, variables);
|
539
|
+
return response.createResumeInfo;
|
540
|
+
}
|
541
|
+
catch (error) {
|
542
|
+
console.log(`Error in createResumeInfo: ${error}`);
|
543
|
+
throw error;
|
544
|
+
}
|
545
|
+
});
|
546
|
+
}
|
547
|
+
updateFieldResume(resumeId, fieldName, value, resourceType, updatedBy) {
|
548
|
+
return __awaiter(this, void 0, void 0, function* () {
|
549
|
+
const mutation = mutations_1.UPDATE_FIELD_RESUME;
|
550
|
+
const variables = {
|
551
|
+
resumeId,
|
552
|
+
fieldName,
|
553
|
+
value,
|
554
|
+
resourceType,
|
555
|
+
updatedBy,
|
556
|
+
};
|
557
|
+
try {
|
558
|
+
const response = yield this.graphqlMutationV2(mutation, variables);
|
559
|
+
return response.updateFieldResume;
|
560
|
+
}
|
561
|
+
catch (error) {
|
562
|
+
console.log(`Error in updateFieldResume: ${error}`);
|
563
|
+
throw error;
|
564
|
+
}
|
565
|
+
});
|
566
|
+
}
|
516
567
|
}
|
517
568
|
exports.CrmService = CrmService;
|