@longvansoftware/service-js-client 1.13.2 → 1.13.4
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/auth/mutations.js +4 -4
- package/dist/src/graphql/crm/queries.d.ts +1 -0
- package/dist/src/graphql/crm/queries.js +12 -1
- package/dist/src/graphql/crm_camping/queries.js +3 -1
- package/dist/src/lib/auth/index.d.ts +2 -2
- package/dist/src/lib/auth/index.js +4 -2
- package/dist/src/lib/crm/index.d.ts +1 -0
- package/dist/src/lib/crm/index.js +16 -0
- package/dist/src/lib/crm_camping/index.d.ts +1 -1
- package/dist/src/lib/crm_camping/index.js +4 -3
- package/package.json +1 -1
@@ -190,8 +190,8 @@ exports.LINKING_USER_LOGIN_AND_USER_DETAIL = (0, graphql_tag_1.gql) `
|
|
190
190
|
}
|
191
191
|
`;
|
192
192
|
exports.SEND_OTP = (0, graphql_tag_1.gql) `
|
193
|
-
mutation SendOTP($orgId: String!, $phone: String
|
194
|
-
sendOTP(orgId: $orgId, phone: $phone) {
|
193
|
+
mutation SendOTP($orgId: String!, $phone: String!, $channelType: String) {
|
194
|
+
sendOTP(orgId: $orgId, phone: $phone, channelType: $channelType) {
|
195
195
|
id
|
196
196
|
code
|
197
197
|
username
|
@@ -200,8 +200,8 @@ exports.SEND_OTP = (0, graphql_tag_1.gql) `
|
|
200
200
|
}
|
201
201
|
`;
|
202
202
|
exports.VALIDATE_OTP = (0, graphql_tag_1.gql) `
|
203
|
-
mutation ValidateOTP($otpCode: String!, $phone: String
|
204
|
-
validateOTP(otpCode: $otpCode, phone: $phone)
|
203
|
+
mutation ValidateOTP($otpCode: String!, $phone: String!, $channelType: String) {
|
204
|
+
validateOTP(otpCode: $otpCode, phone: $phone, channelType: $channelType)
|
205
205
|
}
|
206
206
|
`;
|
207
207
|
exports.CREATE_USER_LOGIN = (0, graphql_tag_1.gql) `
|
@@ -8,3 +8,4 @@ export declare const GET_LIST_COMMENT: import("graphql").DocumentNode;
|
|
8
8
|
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
|
+
export declare const GET_RESUME_DOMAIN_BY_SERVICE_ID: import("graphql").DocumentNode;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
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;
|
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;
|
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(
|
@@ -317,3 +317,14 @@ exports.GET_REUSME_BY_CUSTOMER_ID = (0, graphql_tag_1.gql) `
|
|
317
317
|
}
|
318
318
|
}
|
319
319
|
`;
|
320
|
+
exports.GET_RESUME_DOMAIN_BY_SERVICE_ID = (0, graphql_tag_1.gql) `
|
321
|
+
query GetResumeDomainByServiceId($serviceId: String!) {
|
322
|
+
getResumeDomainByServiceId(serviceId: $serviceId) {
|
323
|
+
resumeId
|
324
|
+
resumeName
|
325
|
+
status
|
326
|
+
statusCode
|
327
|
+
level
|
328
|
+
}
|
329
|
+
}
|
330
|
+
`;
|
@@ -82,12 +82,14 @@ 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) {
|
85
|
+
query SuggestVoucher($partyId: String, $excludeExpired: Boolean, $customerId: String, $scope: String, $isNewCustomer: Boolean) {
|
86
86
|
suggestVoucher(
|
87
87
|
searchVoucherRequest: {
|
88
88
|
partyId: $partyId
|
89
89
|
excludeExpired: $excludeExpired
|
90
90
|
customerId: $customerId
|
91
|
+
scope: $scope
|
92
|
+
isNewCustomer: $isNewCustomer
|
91
93
|
}
|
92
94
|
) {
|
93
95
|
total
|
@@ -37,8 +37,8 @@ export declare class AuthService extends Service {
|
|
37
37
|
getUserLoginByUserLoginId(userLoginId: string): Promise<any>;
|
38
38
|
checkUsernameExisted(username: string): Promise<any>;
|
39
39
|
getUserLoginsByPartyId(partyId: string): Promise<any>;
|
40
|
-
sendOTP(phone: string): Promise<any>;
|
41
|
-
validateOTP(otpCode: string, phone: string): Promise<any>;
|
40
|
+
sendOTP(phone: string, channelType: string | null): Promise<any>;
|
41
|
+
validateOTP(otpCode: string, phone: string, channelType: string | null): Promise<any>;
|
42
42
|
createUserLogin(userLoginId: string): Promise<any>;
|
43
43
|
createUserDetailWithoutUserLogin(name: string, phone: string, email: string): Promise<any>;
|
44
44
|
getPhoneByPartyId(partyId: string): Promise<any>;
|
@@ -271,12 +271,13 @@ class AuthService extends serviceSDK_1.Service {
|
|
271
271
|
}
|
272
272
|
});
|
273
273
|
}
|
274
|
-
sendOTP(phone) {
|
274
|
+
sendOTP(phone, channelType) {
|
275
275
|
return __awaiter(this, void 0, void 0, function* () {
|
276
276
|
const mutation = mutations_1.SEND_OTP;
|
277
277
|
const variables = {
|
278
278
|
orgId: this.orgId,
|
279
279
|
phone,
|
280
|
+
channelType
|
280
281
|
};
|
281
282
|
try {
|
282
283
|
const response = yield this.graphqlMutation(mutation, variables);
|
@@ -288,12 +289,13 @@ class AuthService extends serviceSDK_1.Service {
|
|
288
289
|
}
|
289
290
|
});
|
290
291
|
}
|
291
|
-
validateOTP(otpCode, phone) {
|
292
|
+
validateOTP(otpCode, phone, channelType) {
|
292
293
|
return __awaiter(this, void 0, void 0, function* () {
|
293
294
|
const mutation = mutations_1.VALIDATE_OTP;
|
294
295
|
const variables = {
|
295
296
|
otpCode,
|
296
297
|
phone,
|
298
|
+
channelType
|
297
299
|
};
|
298
300
|
try {
|
299
301
|
const response = yield this.graphqlMutation(mutation, variables);
|
@@ -27,4 +27,5 @@ export declare class CrmService extends Service {
|
|
27
27
|
getResumesByCustomerId(customerId: string): Promise<any>;
|
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
|
+
getResumeDomainByServiceId(serviceId: string): Promise<any>;
|
30
31
|
}
|
@@ -441,5 +441,21 @@ class CrmService extends serviceSDK_1.Service {
|
|
441
441
|
}
|
442
442
|
});
|
443
443
|
}
|
444
|
+
getResumeDomainByServiceId(serviceId) {
|
445
|
+
return __awaiter(this, void 0, void 0, function* () {
|
446
|
+
const query = queries_1.GET_RESUME_DOMAIN_BY_SERVICE_ID;
|
447
|
+
const variables = {
|
448
|
+
serviceId,
|
449
|
+
};
|
450
|
+
try {
|
451
|
+
const response = yield this.graphqlQueryV2(query, variables);
|
452
|
+
return response.getResumeDomainByServiceId;
|
453
|
+
}
|
454
|
+
catch (error) {
|
455
|
+
console.log(`Error in getResumeDomainByServiceId: ${error}`);
|
456
|
+
throw error;
|
457
|
+
}
|
458
|
+
});
|
459
|
+
}
|
444
460
|
}
|
445
461
|
exports.CrmService = CrmService;
|
@@ -6,6 +6,6 @@ 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): 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
|
}
|
@@ -89,15 +89,16 @@ class CrmCampingService extends serviceSDK_1.Service {
|
|
89
89
|
// throw error;
|
90
90
|
// }
|
91
91
|
// }
|
92
|
-
suggestVoucher(customerId) {
|
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 = {
|
96
96
|
partyId: this.orgId,
|
97
97
|
excludeExpired: true,
|
98
|
-
customerId
|
98
|
+
customerId,
|
99
|
+
scope,
|
100
|
+
isNewCustomer
|
99
101
|
};
|
100
|
-
console.log("cusID sdk", customerId);
|
101
102
|
try {
|
102
103
|
const response = yield this.graphqlQueryV2(query, variables);
|
103
104
|
return response.suggestVoucher;
|