@longvansoftware/service-js-client 1.8.1 → 1.8.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/cloud/queries.d.ts +1 -0
- package/dist/src/graphql/cloud/queries.js +6 -1
- package/dist/src/graphql/crm/mutations.d.ts +3 -0
- package/dist/src/graphql/crm/mutations.js +48 -1
- package/dist/src/graphql/crm/queries.d.ts +3 -0
- package/dist/src/graphql/crm/queries.js +49 -3
- package/dist/src/graphql/orderGraphQL/queries.js +1 -0
- package/dist/src/lib/cloud/index.d.ts +1 -0
- package/dist/src/lib/cloud/index.js +14 -0
- package/dist/src/lib/crm/index.d.ts +6 -0
- package/dist/src/lib/crm/index.js +109 -0
- package/package.json +1 -1
@@ -12,3 +12,4 @@ export declare const GET_DOMAIN_CONTACTS: import("graphql").DocumentNode;
|
|
12
12
|
export declare const GET_OWNERS_BY_CUSTOMER_ID: import("graphql").DocumentNode;
|
13
13
|
export declare const GET_CONTACTS_BY_OWNER_ID: import("graphql").DocumentNode;
|
14
14
|
export declare const GET_WHOIS_DOMAIN_INFO: import("graphql").DocumentNode;
|
15
|
+
export declare const GET_DOMAIN_SUPPLIER: import("graphql").DocumentNode;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.GET_WHOIS_DOMAIN_INFO = exports.GET_CONTACTS_BY_OWNER_ID = exports.GET_OWNERS_BY_CUSTOMER_ID = exports.GET_DOMAIN_CONTACTS = exports.GET_SERVICE_TYPE_LIST = exports.CHECK_DOMAIN_NAME_AVAILABLE = exports.GET_SERVICES_BY_ORDER_ID = exports.GET_IPS_OF_SERVICE = exports.GET_PRODUCTS_OF_SERVICE = exports.SEARCH_SERVICE = exports.SERVICE_TYPE = exports.GET_USER_MAIL_HOSTING = exports.GET_MAIL_RESOURCE = exports.SERVICE_DETAIL = void 0;
|
3
|
+
exports.GET_DOMAIN_SUPPLIER = exports.GET_WHOIS_DOMAIN_INFO = exports.GET_CONTACTS_BY_OWNER_ID = exports.GET_OWNERS_BY_CUSTOMER_ID = exports.GET_DOMAIN_CONTACTS = exports.GET_SERVICE_TYPE_LIST = exports.CHECK_DOMAIN_NAME_AVAILABLE = exports.GET_SERVICES_BY_ORDER_ID = exports.GET_IPS_OF_SERVICE = exports.GET_PRODUCTS_OF_SERVICE = exports.SEARCH_SERVICE = exports.SERVICE_TYPE = exports.GET_USER_MAIL_HOSTING = exports.GET_MAIL_RESOURCE = exports.SERVICE_DETAIL = void 0;
|
4
4
|
const graphql_tag_1 = require("graphql-tag");
|
5
5
|
exports.SERVICE_DETAIL = (0, graphql_tag_1.gql) `
|
6
6
|
query ServiceDetail($serviceId: String) {
|
@@ -271,3 +271,8 @@ exports.GET_WHOIS_DOMAIN_INFO = (0, graphql_tag_1.gql) `
|
|
271
271
|
}
|
272
272
|
}
|
273
273
|
`;
|
274
|
+
exports.GET_DOMAIN_SUPPLIER = (0, graphql_tag_1.gql) `
|
275
|
+
query GetDomainSupplier($serviceId: String!) {
|
276
|
+
getDomainSupplier(serviceId: $serviceId)
|
277
|
+
}
|
278
|
+
`;
|
@@ -6,3 +6,6 @@ export declare const UPDATE_WORK_EFFORT_STATUS: import("graphql").DocumentNode;
|
|
6
6
|
export declare const ADD_ATTACHMENT_FOR_WORK_EFFORT: import("graphql").DocumentNode;
|
7
7
|
export declare const ADD_TICKED: import("graphql").DocumentNode;
|
8
8
|
export declare const ADD_COMMENT: import("graphql").DocumentNode;
|
9
|
+
export declare const CREATE_RESUME: import("graphql").DocumentNode;
|
10
|
+
export declare const UPDATE_RESUME_CONTACT: import("graphql").DocumentNode;
|
11
|
+
export declare const LINKING_RESUME_SERVICE: import("graphql").DocumentNode;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
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.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(
|
@@ -314,3 +314,50 @@ exports.ADD_COMMENT = (0, graphql_tag_1.gql) `
|
|
314
314
|
}
|
315
315
|
}
|
316
316
|
`;
|
317
|
+
exports.CREATE_RESUME = (0, graphql_tag_1.gql) `
|
318
|
+
mutation CreateResume(
|
319
|
+
$name: String
|
320
|
+
$customerId: String!
|
321
|
+
$domain: String
|
322
|
+
$resumeTemplateId: String!
|
323
|
+
$partyId: String!
|
324
|
+
$createdBy: String!
|
325
|
+
) {
|
326
|
+
createResume(
|
327
|
+
name: $name
|
328
|
+
customerId: $customerId
|
329
|
+
domain: $domain
|
330
|
+
resumeTemplateId: $resumeTemplateId
|
331
|
+
partyId: $partyId
|
332
|
+
createdBy: $createdBy
|
333
|
+
)
|
334
|
+
}
|
335
|
+
`;
|
336
|
+
exports.UPDATE_RESUME_CONTACT = (0, graphql_tag_1.gql) `
|
337
|
+
mutation UpdateResumeContact(
|
338
|
+
$resumeId: String
|
339
|
+
$contactType: String
|
340
|
+
$updateResumeContact: UpdateResumeContact
|
341
|
+
$updatedBy: String
|
342
|
+
) {
|
343
|
+
updateResumeContact(
|
344
|
+
resumeId: $resumeId
|
345
|
+
contactType: $contactType
|
346
|
+
updateResumeContact: $updateResumeContact
|
347
|
+
updatedBy: $updatedBy
|
348
|
+
)
|
349
|
+
}
|
350
|
+
`;
|
351
|
+
exports.LINKING_RESUME_SERVICE = (0, graphql_tag_1.gql) `
|
352
|
+
mutation LinkingResumeService(
|
353
|
+
$resumeId: String
|
354
|
+
$serviceId: String
|
355
|
+
$linkedBy: String
|
356
|
+
) {
|
357
|
+
linkingResumeService(
|
358
|
+
resumeId: $resumeId
|
359
|
+
serviceId: $serviceId
|
360
|
+
linkedBy: $linkedBy
|
361
|
+
)
|
362
|
+
}
|
363
|
+
`;
|
@@ -5,3 +5,6 @@ export declare const GET_LIST_TICKET: import("graphql").DocumentNode;
|
|
5
5
|
export declare const GET_TICKET_BY_ID: import("graphql").DocumentNode;
|
6
6
|
export declare const GET_ATTACHMENT_BY_WORK_EFFORT_ID: import("graphql").DocumentNode;
|
7
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;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
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_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(
|
@@ -247,7 +247,10 @@ exports.GET_ATTACHMENT_BY_WORK_EFFORT_ID = (0, graphql_tag_1.gql) `
|
|
247
247
|
}
|
248
248
|
`;
|
249
249
|
exports.GET_LIST_COMMENT = (0, graphql_tag_1.gql) `
|
250
|
-
query GetListComment(
|
250
|
+
query GetListComment(
|
251
|
+
$partyId: String!
|
252
|
+
$getCommentRequest: GetCommentRequest!
|
253
|
+
) {
|
251
254
|
getListComment(partyId: $partyId, getCommentRequest: $getCommentRequest) {
|
252
255
|
total
|
253
256
|
data {
|
@@ -255,7 +258,7 @@ exports.GET_LIST_COMMENT = (0, graphql_tag_1.gql) `
|
|
255
258
|
createdStamp
|
256
259
|
updatedStamp
|
257
260
|
updatedBy
|
258
|
-
createdBy{
|
261
|
+
createdBy {
|
259
262
|
id
|
260
263
|
fullName
|
261
264
|
}
|
@@ -269,3 +272,46 @@ exports.GET_LIST_COMMENT = (0, graphql_tag_1.gql) `
|
|
269
272
|
}
|
270
273
|
}
|
271
274
|
`;
|
275
|
+
exports.GET_RESUME_ID_BY_RESOURCE = (0, graphql_tag_1.gql) `
|
276
|
+
query GetResumeIdByResource($resourceId: String, $resourceType: String) {
|
277
|
+
getResumeIdByResource(resourceId: $resourceId, resourceType: $resourceType)
|
278
|
+
}
|
279
|
+
`;
|
280
|
+
exports.GET_RESUME_CONTACT = (0, graphql_tag_1.gql) `
|
281
|
+
query GetResumeContact($resumeId: String, $contactType: String) {
|
282
|
+
getResumeContact(resumeId: $resumeId, contactType: $contactType) {
|
283
|
+
resumeId
|
284
|
+
partyId
|
285
|
+
name
|
286
|
+
otherName
|
287
|
+
customerType
|
288
|
+
email
|
289
|
+
country
|
290
|
+
province
|
291
|
+
district
|
292
|
+
ward
|
293
|
+
countryId
|
294
|
+
provinceId
|
295
|
+
districtId
|
296
|
+
wardId
|
297
|
+
address
|
298
|
+
phone
|
299
|
+
contactType
|
300
|
+
taxCode
|
301
|
+
businessCode
|
302
|
+
identityNumber
|
303
|
+
gender
|
304
|
+
birthday
|
305
|
+
cpFrom
|
306
|
+
level
|
307
|
+
}
|
308
|
+
}
|
309
|
+
`;
|
310
|
+
exports.GET_REUSME_BY_CUSTOMER_ID = (0, graphql_tag_1.gql) `
|
311
|
+
query GetResumesByCustomerId($customerId: String, $partyId: String) {
|
312
|
+
getResumesByCustomerId(customerId: $customerId, partyId: $partyId) {
|
313
|
+
resumeId
|
314
|
+
resumeName
|
315
|
+
}
|
316
|
+
}
|
317
|
+
`;
|
@@ -33,4 +33,5 @@ export declare class CloudService extends Service {
|
|
33
33
|
getOwnersByCustomerId(userId: string): Promise<any>;
|
34
34
|
getContactsByOwnerId(ownerId: string): Promise<any>;
|
35
35
|
getWhoisDomainInfo(domainName: string): Promise<any>;
|
36
|
+
getDomainSupplier(serviceId: string): Promise<any>;
|
36
37
|
}
|
@@ -395,5 +395,19 @@ class CloudService extends serviceSDK_1.Service {
|
|
395
395
|
}
|
396
396
|
});
|
397
397
|
}
|
398
|
+
getDomainSupplier(serviceId) {
|
399
|
+
return __awaiter(this, void 0, void 0, function* () {
|
400
|
+
const query = queries_1.GET_DOMAIN_SUPPLIER;
|
401
|
+
const variables = { serviceId };
|
402
|
+
try {
|
403
|
+
const response = yield this.graphqlQueryV2(query, variables);
|
404
|
+
return response.getDomainSupplier;
|
405
|
+
}
|
406
|
+
catch (error) {
|
407
|
+
console.log(`Error in getDomainSupplier: ${error}`);
|
408
|
+
throw error;
|
409
|
+
}
|
410
|
+
});
|
411
|
+
}
|
398
412
|
}
|
399
413
|
exports.CloudService = CloudService;
|
@@ -19,4 +19,10 @@ export declare class CrmService extends Service {
|
|
19
19
|
getAttachmentByWorkEffortId(workEffortIds: [string]): Promise<any>;
|
20
20
|
getListComment(getCommentRequest: GetCommentRequest): Promise<any>;
|
21
21
|
addComment(params: any): Promise<any>;
|
22
|
+
createResume(name: string, customerId: string, domain: string, resumeTemplateId: string, createdBy: string): Promise<any>;
|
23
|
+
updateResumeContact(resumeId: string, contactType: string, updateResumeContact: any, updatedBy: string): Promise<any>;
|
24
|
+
linkingResumeService(resumeId: string, serviceId: string, linkedBy: string): Promise<any>;
|
25
|
+
getResumeIdByResource(resourceId: string, resourceType: string): Promise<any>;
|
26
|
+
getResumeContact(resumeId: string, contactType: string): Promise<any>;
|
27
|
+
getResumesByCustomerId(customerId: string): Promise<any>;
|
22
28
|
}
|
@@ -295,5 +295,114 @@ class CrmService extends serviceSDK_1.Service {
|
|
295
295
|
}
|
296
296
|
});
|
297
297
|
}
|
298
|
+
createResume(name, customerId, domain, resumeTemplateId, createdBy) {
|
299
|
+
return __awaiter(this, void 0, void 0, function* () {
|
300
|
+
const mutation = mutations_1.CREATE_RESUME;
|
301
|
+
const variables = {
|
302
|
+
name,
|
303
|
+
customerId,
|
304
|
+
domain,
|
305
|
+
resumeTemplateId,
|
306
|
+
partyId: this.orgId,
|
307
|
+
createdBy,
|
308
|
+
};
|
309
|
+
try {
|
310
|
+
const response = yield this.graphqlMutationV2(mutation, variables);
|
311
|
+
return response.createResume;
|
312
|
+
}
|
313
|
+
catch (error) {
|
314
|
+
console.log(`Error in createResume: ${error}`);
|
315
|
+
throw error;
|
316
|
+
}
|
317
|
+
});
|
318
|
+
}
|
319
|
+
updateResumeContact(resumeId, contactType, updateResumeContact, updatedBy) {
|
320
|
+
return __awaiter(this, void 0, void 0, function* () {
|
321
|
+
const mutation = mutations_1.UPDATE_RESUME_CONTACT;
|
322
|
+
const variables = {
|
323
|
+
resumeId,
|
324
|
+
contactType,
|
325
|
+
updateResumeContact,
|
326
|
+
updatedBy,
|
327
|
+
};
|
328
|
+
try {
|
329
|
+
const response = yield this.graphqlMutationV2(mutation, variables);
|
330
|
+
return response.updateResumeContact;
|
331
|
+
}
|
332
|
+
catch (error) {
|
333
|
+
console.log(`Error in updateResumeContact: ${error}`);
|
334
|
+
throw error;
|
335
|
+
}
|
336
|
+
});
|
337
|
+
}
|
338
|
+
linkingResumeService(resumeId, serviceId, linkedBy) {
|
339
|
+
return __awaiter(this, void 0, void 0, function* () {
|
340
|
+
const mutation = mutations_1.LINKING_RESUME_SERVICE;
|
341
|
+
const variables = {
|
342
|
+
resumeId,
|
343
|
+
serviceId,
|
344
|
+
linkedBy,
|
345
|
+
};
|
346
|
+
try {
|
347
|
+
const response = yield this.graphqlMutationV2(mutation, variables);
|
348
|
+
return response.linkingResumeService;
|
349
|
+
}
|
350
|
+
catch (error) {
|
351
|
+
console.log(`Error in linkingResumeService: ${error}`);
|
352
|
+
throw error;
|
353
|
+
}
|
354
|
+
});
|
355
|
+
}
|
356
|
+
getResumeIdByResource(resourceId, resourceType) {
|
357
|
+
return __awaiter(this, void 0, void 0, function* () {
|
358
|
+
const query = queries_1.GET_RESUME_ID_BY_RESOURCE;
|
359
|
+
const variables = {
|
360
|
+
resourceId,
|
361
|
+
resourceType,
|
362
|
+
};
|
363
|
+
try {
|
364
|
+
const response = yield this.graphqlQueryV2(query, variables);
|
365
|
+
return response.getResumeIdByResource;
|
366
|
+
}
|
367
|
+
catch (error) {
|
368
|
+
console.log(`Error in getResumeIdByResource: ${error}`);
|
369
|
+
throw error;
|
370
|
+
}
|
371
|
+
});
|
372
|
+
}
|
373
|
+
getResumeContact(resumeId, contactType) {
|
374
|
+
return __awaiter(this, void 0, void 0, function* () {
|
375
|
+
const query = queries_1.GET_RESUME_CONTACT;
|
376
|
+
const variables = {
|
377
|
+
resumeId,
|
378
|
+
contactType,
|
379
|
+
};
|
380
|
+
try {
|
381
|
+
const response = yield this.graphqlQueryV2(query, variables);
|
382
|
+
return response.getResumeContact;
|
383
|
+
}
|
384
|
+
catch (error) {
|
385
|
+
console.log(`Error in getResumeContact: ${error}`);
|
386
|
+
throw error;
|
387
|
+
}
|
388
|
+
});
|
389
|
+
}
|
390
|
+
getResumesByCustomerId(customerId) {
|
391
|
+
return __awaiter(this, void 0, void 0, function* () {
|
392
|
+
const query = queries_1.GET_REUSME_BY_CUSTOMER_ID;
|
393
|
+
const variables = {
|
394
|
+
customerId,
|
395
|
+
partyId: this.orgId
|
396
|
+
};
|
397
|
+
try {
|
398
|
+
const response = yield this.graphqlQueryV2(query, variables);
|
399
|
+
return response.getResumesByCustomerId;
|
400
|
+
}
|
401
|
+
catch (error) {
|
402
|
+
console.log(`Error in getResumesByCustomerId: ${error}`);
|
403
|
+
throw error;
|
404
|
+
}
|
405
|
+
});
|
406
|
+
}
|
298
407
|
}
|
299
408
|
exports.CrmService = CrmService;
|