@longvansoftware/service-js-client 1.13.8 → 1.14.0
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_camping/queries.d.ts +3 -0
- package/dist/src/graphql/crm_camping/queries.js +28 -1
- package/dist/src/lib/cloud/index.d.ts +3 -0
- package/dist/src/lib/cloud/index.js +46 -0
- package/dist/src/lib/crm_camping/index.d.ts +3 -0
- package/dist/src/lib/crm_camping/index.js +55 -0
- package/package.json +1 -1
@@ -2,3 +2,6 @@ export declare const SEARCH_PRODUCT_QUANTITY_PROMOTION_ACTION: import("graphql")
|
|
2
2
|
export declare const GET_CAMPAIGN_ACTION_BY_ID: import("graphql").DocumentNode;
|
3
3
|
export declare const SUGGEST_VOUCHER: import("graphql").DocumentNode;
|
4
4
|
export declare const GET_VOUCHERS: import("graphql").DocumentNode;
|
5
|
+
export declare const GET_AVERAGE_RATING: import("graphql").DocumentNode;
|
6
|
+
export declare const GET_URL_EVALUATION: import("graphql").DocumentNode;
|
7
|
+
export declare const GET_NUMBER_OF_TICKET_EVALUATION: import("graphql").DocumentNode;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.GET_VOUCHERS = exports.SUGGEST_VOUCHER = exports.GET_CAMPAIGN_ACTION_BY_ID = exports.SEARCH_PRODUCT_QUANTITY_PROMOTION_ACTION = void 0;
|
3
|
+
exports.GET_NUMBER_OF_TICKET_EVALUATION = exports.GET_URL_EVALUATION = exports.GET_AVERAGE_RATING = exports.GET_VOUCHERS = exports.SUGGEST_VOUCHER = exports.GET_CAMPAIGN_ACTION_BY_ID = exports.SEARCH_PRODUCT_QUANTITY_PROMOTION_ACTION = void 0;
|
4
4
|
const graphql_tag_1 = require("graphql-tag");
|
5
5
|
exports.SEARCH_PRODUCT_QUANTITY_PROMOTION_ACTION = (0, graphql_tag_1.gql) `
|
6
6
|
query SearchProductQuantityPromotionAction(
|
@@ -182,3 +182,30 @@ exports.GET_VOUCHERS = (0, graphql_tag_1.gql) `
|
|
182
182
|
}
|
183
183
|
}
|
184
184
|
`;
|
185
|
+
exports.GET_AVERAGE_RATING = (0, graphql_tag_1.gql) `
|
186
|
+
query GetAverageRating($targetIds: [String]!, $customerId: String!, $evaluationType: String!, $orgId: String!) {
|
187
|
+
getAverageRating(targetIds: $targetIds, customerId: $customerId, evaluationType: $evaluationType, orgId: $orgId) {
|
188
|
+
url
|
189
|
+
targetId
|
190
|
+
evaluationType
|
191
|
+
averageRating
|
192
|
+
haveEvaluation
|
193
|
+
}
|
194
|
+
}
|
195
|
+
`;
|
196
|
+
exports.GET_URL_EVALUATION = (0, graphql_tag_1.gql) `
|
197
|
+
query GetUrlEvaluation($targetIds: [String]!, $customerId: String!, $evaluationType: String!, $orgId: String!) {
|
198
|
+
getUrlEvaluation(targetIds: $targetIds, customerId: $customerId, evaluationType: $evaluationType, orgId: $orgId,) {
|
199
|
+
url
|
200
|
+
targetId
|
201
|
+
evaluationType
|
202
|
+
averageRating
|
203
|
+
haveEvaluation
|
204
|
+
}
|
205
|
+
}
|
206
|
+
`;
|
207
|
+
exports.GET_NUMBER_OF_TICKET_EVALUATION = (0, graphql_tag_1.gql) `
|
208
|
+
query GetNumberOfTicketEvaluation($customerId: String!, $orgId: String!) {
|
209
|
+
getNumberOfTicketEvaluation(customerId: $customerId, orgId: $orgId,)
|
210
|
+
}
|
211
|
+
`;
|
@@ -28,12 +28,15 @@ export declare class CloudService extends Service {
|
|
28
28
|
getServicesByOrderId(orderId: string): Promise<any>;
|
29
29
|
checkDomainNameAvailable(domainName: string): Promise<any>;
|
30
30
|
checkDomainNameAvailableVnnic(domainNames: [string]): Promise<any>;
|
31
|
+
checkDomainName(domainName: string): Promise<any>;
|
32
|
+
checkListDomainName(domainNames: [string]): Promise<any>;
|
31
33
|
getServiceTypeList(): Promise<any>;
|
32
34
|
createDomainContact(serviceId: string, domainContacts: any): Promise<any>;
|
33
35
|
getDomainContacts(serviceId: string): Promise<any>;
|
34
36
|
getOwnersByCustomerId(userId: string): Promise<any>;
|
35
37
|
getContactsByOwnerId(ownerId: string): Promise<any>;
|
36
38
|
getWhoisDomainInfo(domainName: string): Promise<any>;
|
39
|
+
getDomainInfo(domainName: string): Promise<any>;
|
37
40
|
getDomainSupplier(serviceId: string): Promise<any>;
|
38
41
|
checkDomainExist(domainName: string): Promise<any>;
|
39
42
|
getOrderChangeResourceTerm(serviceId: string, createdBy: string): Promise<any>;
|
@@ -327,6 +327,38 @@ class CloudService extends serviceSDK_1.Service {
|
|
327
327
|
}
|
328
328
|
});
|
329
329
|
}
|
330
|
+
checkDomainName(domainName) {
|
331
|
+
return __awaiter(this, void 0, void 0, function* () {
|
332
|
+
const mutation = mutations_1.CHECK_DOMAIN_NAME;
|
333
|
+
const variables = {
|
334
|
+
domainName,
|
335
|
+
};
|
336
|
+
try {
|
337
|
+
const response = yield this.graphqlMutationV2(mutation, variables);
|
338
|
+
return response.checkDomainName;
|
339
|
+
}
|
340
|
+
catch (error) {
|
341
|
+
console.log(`Error in checkDomainName: ${error}`);
|
342
|
+
throw error;
|
343
|
+
}
|
344
|
+
});
|
345
|
+
}
|
346
|
+
checkListDomainName(domainNames) {
|
347
|
+
return __awaiter(this, void 0, void 0, function* () {
|
348
|
+
const mutation = mutations_1.CHECK_LIST_DOMAIN_NAME;
|
349
|
+
const variables = {
|
350
|
+
domainNames,
|
351
|
+
};
|
352
|
+
try {
|
353
|
+
const response = yield this.graphqlMutationV2(mutation, variables);
|
354
|
+
return response.checkListDomainName;
|
355
|
+
}
|
356
|
+
catch (error) {
|
357
|
+
console.log(`Error in checkListDomainName: ${error}`);
|
358
|
+
throw error;
|
359
|
+
}
|
360
|
+
});
|
361
|
+
}
|
330
362
|
// async checkDomainNameAvailable(domainName: string) {
|
331
363
|
// const query = CHECK_DOMAIN_NAME_AVAILABLE;
|
332
364
|
// const variables = {
|
@@ -437,6 +469,20 @@ class CloudService extends serviceSDK_1.Service {
|
|
437
469
|
}
|
438
470
|
});
|
439
471
|
}
|
472
|
+
getDomainInfo(domainName) {
|
473
|
+
return __awaiter(this, void 0, void 0, function* () {
|
474
|
+
const mutation = mutations_1.GET_DOMAIN_INFO;
|
475
|
+
const variables = { domainName };
|
476
|
+
try {
|
477
|
+
const response = yield this.graphqlMutationV2(mutation, variables);
|
478
|
+
return response.getDomainInfo;
|
479
|
+
}
|
480
|
+
catch (error) {
|
481
|
+
console.log(`Error in getDomainInfo: ${error}`);
|
482
|
+
throw error;
|
483
|
+
}
|
484
|
+
});
|
485
|
+
}
|
440
486
|
// async getWhoisDomainInfo(domainName: string) {
|
441
487
|
// const query = GET_WHOIS_DOMAIN_INFO;
|
442
488
|
// const variables = { domainName };
|
@@ -8,4 +8,7 @@ export declare class CrmCampingService extends Service {
|
|
8
8
|
getCampaignActionById(campaignActionId: string): Promise<any>;
|
9
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
|
+
getAverageRating(targetIds: [string], customerId: string, evaluationType: string): Promise<any>;
|
12
|
+
getUrlEvaluation(targetIds: [string], customerId: string, evaluationType: string): Promise<any>;
|
13
|
+
getNumberOfTicketEvaluation(customerId: string): Promise<any>;
|
11
14
|
}
|
@@ -130,5 +130,60 @@ class CrmCampingService extends serviceSDK_1.Service {
|
|
130
130
|
}
|
131
131
|
});
|
132
132
|
}
|
133
|
+
getAverageRating(targetIds, customerId, evaluationType) {
|
134
|
+
return __awaiter(this, void 0, void 0, function* () {
|
135
|
+
const query = queries_1.GET_AVERAGE_RATING;
|
136
|
+
const variables = {
|
137
|
+
targetIds,
|
138
|
+
customerId,
|
139
|
+
evaluationType,
|
140
|
+
orgId: this.orgId
|
141
|
+
};
|
142
|
+
try {
|
143
|
+
const response = yield this.graphqlQueryV2(query, variables);
|
144
|
+
return response.getAverageRating;
|
145
|
+
}
|
146
|
+
catch (error) {
|
147
|
+
console.log(`Error in getAverageRating: ${error}`);
|
148
|
+
throw error;
|
149
|
+
}
|
150
|
+
});
|
151
|
+
}
|
152
|
+
getUrlEvaluation(targetIds, customerId, evaluationType) {
|
153
|
+
return __awaiter(this, void 0, void 0, function* () {
|
154
|
+
const query = queries_1.GET_URL_EVALUATION;
|
155
|
+
const variables = {
|
156
|
+
targetIds,
|
157
|
+
customerId,
|
158
|
+
evaluationType,
|
159
|
+
orgId: this.orgId
|
160
|
+
};
|
161
|
+
try {
|
162
|
+
const response = yield this.graphqlQueryV2(query, variables);
|
163
|
+
return response.getUrlEvaluation;
|
164
|
+
}
|
165
|
+
catch (error) {
|
166
|
+
console.log(`Error in getUrlEvaluation: ${error}`);
|
167
|
+
throw error;
|
168
|
+
}
|
169
|
+
});
|
170
|
+
}
|
171
|
+
getNumberOfTicketEvaluation(customerId) {
|
172
|
+
return __awaiter(this, void 0, void 0, function* () {
|
173
|
+
const query = queries_1.GET_NUMBER_OF_TICKET_EVALUATION;
|
174
|
+
const variables = {
|
175
|
+
customerId,
|
176
|
+
orgId: this.orgId
|
177
|
+
};
|
178
|
+
try {
|
179
|
+
const response = yield this.graphqlQueryV2(query, variables);
|
180
|
+
return response.getNumberOfTicketEvaluation;
|
181
|
+
}
|
182
|
+
catch (error) {
|
183
|
+
console.log(`Error in getNumberOfTicketEvaluation: ${error}`);
|
184
|
+
throw error;
|
185
|
+
}
|
186
|
+
});
|
187
|
+
}
|
133
188
|
}
|
134
189
|
exports.CrmCampingService = CrmCampingService;
|