@longvansoftware/service-js-client 2.8.3 → 2.8.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.
- package/dist/config/config.d.ts +4 -0
- package/dist/config/config.js +6 -2
- package/dist/src/graphql/campaign/queries.d.ts +13 -11
- package/dist/src/graphql/campaign/queries.js +39 -111
- package/dist/src/graphql/cloudCloud/mutations.d.ts +2 -0
- package/dist/src/graphql/cloudCloud/mutations.js +101 -27
- package/dist/src/graphql/cloudCloud/queries.js +4 -0
- package/dist/src/graphql/crm/queries.d.ts +1 -0
- package/dist/src/graphql/crm/queries.js +18 -1
- package/dist/src/graphql/marketplace/mutations.d.ts +0 -0
- package/dist/src/graphql/marketplace/mutations.js +1 -0
- package/dist/src/graphql/marketplace/queries.d.ts +2 -0
- package/dist/src/graphql/marketplace/queries.js +24 -0
- package/dist/src/graphql/orderCloud/mutations.d.ts +3 -1
- package/dist/src/graphql/orderCloud/mutations.js +21 -5
- package/dist/src/graphql/orderGraphQL/mutations.d.ts +1 -0
- package/dist/src/graphql/orderGraphQL/mutations.js +18 -1
- package/dist/src/graphql/paymentV2/mutations.d.ts +1 -0
- package/dist/src/graphql/paymentV2/mutations.js +23 -37
- package/dist/src/graphql/paymentV2/queries.d.ts +2 -0
- package/dist/src/graphql/paymentV2/queries.js +58 -1
- package/dist/src/graphql/storefont/mutation.d.ts +2 -0
- package/dist/src/graphql/storefont/mutation.js +28 -0
- package/dist/src/graphql/storefont/queries.d.ts +5 -0
- package/dist/src/graphql/storefont/queries.js +99 -0
- package/dist/src/graphql/storefront/mutation.d.ts +2 -0
- package/dist/src/graphql/storefront/mutation.js +28 -0
- package/dist/src/graphql/tag/mutations.d.ts +2 -0
- package/dist/src/graphql/tag/mutations.js +44 -0
- package/dist/src/graphql/tag/queries.d.ts +1 -0
- package/dist/src/graphql/tag/queries.js +20 -0
- package/dist/src/lib/SDK.d.ts +6 -0
- package/dist/src/lib/SDK.js +9 -4
- package/dist/src/lib/campaign/index.d.ts +1 -0
- package/dist/src/lib/campaign/index.js +69 -12
- package/dist/src/lib/cloudCloud/index.d.ts +1 -0
- package/dist/src/lib/cloudCloud/index.js +16 -0
- package/dist/src/lib/crm/index.d.ts +1 -0
- package/dist/src/lib/crm/index.js +16 -0
- package/dist/src/lib/imageGateway/index.d.ts +6 -0
- package/dist/src/lib/imageGateway/index.js +18 -0
- package/dist/src/lib/marketplace/index.d.ts +13 -0
- package/dist/src/lib/marketplace/index.js +50 -0
- package/dist/src/lib/orderCloud/index.d.ts +2 -0
- package/dist/src/lib/orderCloud/index.js +47 -1
- package/dist/src/lib/orderGraphQL/index.d.ts +1 -0
- package/dist/src/lib/orderGraphQL/index.js +16 -0
- package/dist/src/lib/paymentV2/index.d.ts +11 -1
- package/dist/src/lib/paymentV2/index.js +55 -14
- package/dist/src/lib/portal/index.d.ts +10 -2
- package/dist/src/lib/portal/index.js +171 -11
- package/dist/src/lib/storefont/index.d.ts +6 -0
- package/dist/src/lib/storefont/index.js +41 -0
- package/dist/src/lib/storefront/index.d.ts +7 -0
- package/dist/src/lib/storefront/index.js +44 -0
- package/dist/src/lib/tag/index.d.ts +7 -0
- package/dist/src/lib/tag/index.js +61 -0
- package/dist/src/utils/helpers.d.ts +2 -0
- package/dist/src/utils/helpers.js +11 -5
- package/package.json +1 -1
- package/dist/src/lib/service.d.ts +0 -14
- package/dist/src/lib/service.js +0 -101
- package/dist/src/utils/build-field-string.d.ts +0 -1
- package/dist/src/utils/build-field-string.js +0 -16
|
@@ -138,5 +138,21 @@ class CloudCloudService extends serviceSDK_1.Service {
|
|
|
138
138
|
}
|
|
139
139
|
});
|
|
140
140
|
}
|
|
141
|
+
linkUserAccount(ownerId, serviceId) {
|
|
142
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
143
|
+
const mutation = mutations_1.LINK_USER_ACCOUNT;
|
|
144
|
+
const variables = {
|
|
145
|
+
ownerId,
|
|
146
|
+
serviceId
|
|
147
|
+
};
|
|
148
|
+
try {
|
|
149
|
+
const response = yield this.graphqlMutationV2(mutation, variables);
|
|
150
|
+
return response.linkUserAccount;
|
|
151
|
+
}
|
|
152
|
+
catch (error) {
|
|
153
|
+
throw error;
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
}
|
|
141
157
|
}
|
|
142
158
|
exports.CloudCloudService = CloudCloudService;
|
|
@@ -38,4 +38,5 @@ export declare class CrmService extends Service {
|
|
|
38
38
|
createResumeInfo(data: any): Promise<any>;
|
|
39
39
|
updateFieldResume(resumeId: string, fieldName: string, value: string, resourceType: string, updatedBy: string): Promise<any>;
|
|
40
40
|
getListTicketByOwnerDynamic(ownerId: string, getTicketRequest: getTicketRequest, fields: string[]): Promise<any>;
|
|
41
|
+
getResumeById(resumeId: string, fields: string[]): Promise<any>;
|
|
41
42
|
}
|
|
@@ -634,5 +634,21 @@ class CrmService extends serviceSDK_1.Service {
|
|
|
634
634
|
}
|
|
635
635
|
});
|
|
636
636
|
}
|
|
637
|
+
getResumeById(resumeId, fields) {
|
|
638
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
639
|
+
const query = (0, queries_1.GET_RESUME_ID)(fields);
|
|
640
|
+
const variables = {
|
|
641
|
+
resumeId,
|
|
642
|
+
};
|
|
643
|
+
try {
|
|
644
|
+
const response = yield this.graphqlQueryV2(query, variables);
|
|
645
|
+
return response.getResumeById;
|
|
646
|
+
}
|
|
647
|
+
catch (error) {
|
|
648
|
+
console.log(`Error fetching get getResumeById method: ${error}`);
|
|
649
|
+
throw error;
|
|
650
|
+
}
|
|
651
|
+
});
|
|
652
|
+
}
|
|
637
653
|
}
|
|
638
654
|
exports.CrmService = CrmService;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Service } from "../serviceSDK";
|
|
2
|
+
export declare class ImageGateService extends Service {
|
|
3
|
+
constructor(endpoint: string, orgId: string, storeId: string);
|
|
4
|
+
imageProduct(parentId: string, parentType: string, width?: number, height?: number): string;
|
|
5
|
+
imagesProduct(parentId: string, parentType: string, width?: number, height?: number): string;
|
|
6
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ImageGateService = void 0;
|
|
4
|
+
const serviceSDK_1 = require("../serviceSDK");
|
|
5
|
+
class ImageGateService extends serviceSDK_1.Service {
|
|
6
|
+
constructor(endpoint, orgId, storeId) {
|
|
7
|
+
super(endpoint, orgId, storeId);
|
|
8
|
+
}
|
|
9
|
+
imageProduct(parentId, parentType, width, height) {
|
|
10
|
+
const url = `${this.endpoint}/image-gateway/public/image/${parentType}/${parentId}${width ? `?w=${width}` : ``}${`${height ? `&h=${height}` : ``}`} `;
|
|
11
|
+
return url;
|
|
12
|
+
}
|
|
13
|
+
imagesProduct(parentId, parentType, width, height) {
|
|
14
|
+
const url = `${this.endpoint}/image-gateway/public/images/${parentType}/${parentId}?w=${width}&h=${height}`;
|
|
15
|
+
return url;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.ImageGateService = ImageGateService;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Service } from "../serviceSDK";
|
|
2
|
+
export declare class MarketPlaceService extends Service {
|
|
3
|
+
/**
|
|
4
|
+
* Constructs a new ProductService instance.
|
|
5
|
+
* @param endpoint - The endpoint URL for the service.
|
|
6
|
+
* @param orgId - The organization ID.
|
|
7
|
+
* @param storeId - The store ID.
|
|
8
|
+
*/
|
|
9
|
+
constructor(endpoint: string, orgId: string, storeId: string);
|
|
10
|
+
setToken(token: string): void;
|
|
11
|
+
setStoreId(storeId: string): void;
|
|
12
|
+
getPublicProductDynamic(categoryId: string, supplierId: string, fields: string[]): Promise<any>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.MarketPlaceService = void 0;
|
|
13
|
+
const queries_1 = require("../../graphql/marketplace/queries");
|
|
14
|
+
const serviceSDK_1 = require("../serviceSDK");
|
|
15
|
+
class MarketPlaceService extends serviceSDK_1.Service {
|
|
16
|
+
/**
|
|
17
|
+
* Constructs a new ProductService instance.
|
|
18
|
+
* @param endpoint - The endpoint URL for the service.
|
|
19
|
+
* @param orgId - The organization ID.
|
|
20
|
+
* @param storeId - The store ID.
|
|
21
|
+
*/
|
|
22
|
+
constructor(endpoint, orgId, storeId) {
|
|
23
|
+
super(endpoint, orgId, storeId);
|
|
24
|
+
}
|
|
25
|
+
setToken(token) {
|
|
26
|
+
this.token = token;
|
|
27
|
+
}
|
|
28
|
+
setStoreId(storeId) {
|
|
29
|
+
this.storeId = storeId;
|
|
30
|
+
}
|
|
31
|
+
getPublicProductDynamic(categoryId, supplierId, fields) {
|
|
32
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
33
|
+
const query = (0, queries_1.GET_PUBLIC_PRODUCT_DYNAMIC)(fields);
|
|
34
|
+
const variablesHandle = {
|
|
35
|
+
storeChannel: this.storeId,
|
|
36
|
+
supplierId,
|
|
37
|
+
categoryId,
|
|
38
|
+
};
|
|
39
|
+
try {
|
|
40
|
+
const response = yield this.graphqlQueryV2(query, variablesHandle);
|
|
41
|
+
return response.getPublicProduct;
|
|
42
|
+
}
|
|
43
|
+
catch (error) {
|
|
44
|
+
console.log(`Error fetching getPublicProductDynamic : ${error}`);
|
|
45
|
+
throw error;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
exports.MarketPlaceService = MarketPlaceService;
|
|
@@ -2,4 +2,6 @@ import { Service } from "../serviceSDK";
|
|
|
2
2
|
export declare class OrderCloudService extends Service {
|
|
3
3
|
constructor(endpoint: string, orgId: string, storeId: string);
|
|
4
4
|
findOrderByOwnerPartyId(ownerPartyId: string): Promise<any>;
|
|
5
|
+
mergeOrderCart(oldCartId: string, newCartId: string, actorId: string, fields?: string[]): Promise<any>;
|
|
6
|
+
updateQuantityV2(orderId: string, updateItem: any, updateBy: string): Promise<any>;
|
|
5
7
|
}
|
|
@@ -12,6 +12,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.OrderCloudService = void 0;
|
|
13
13
|
const serviceSDK_1 = require("../serviceSDK");
|
|
14
14
|
const queries_1 = require("../../graphql/orderCloud/queries");
|
|
15
|
+
const mutations_1 = require("../../graphql/orderCloud/mutations");
|
|
16
|
+
const mutations_2 = require("../../graphql/cloudCloud/mutations");
|
|
15
17
|
class OrderCloudService extends serviceSDK_1.Service {
|
|
16
18
|
constructor(endpoint, orgId, storeId) {
|
|
17
19
|
super(endpoint, orgId, storeId);
|
|
@@ -22,7 +24,7 @@ class OrderCloudService extends serviceSDK_1.Service {
|
|
|
22
24
|
const query = queries_1.FIND_ORDER_BY_OWNER_PARTYID;
|
|
23
25
|
const variables = {
|
|
24
26
|
partnerId: this.orgId,
|
|
25
|
-
ownerPartyId
|
|
27
|
+
ownerPartyId
|
|
26
28
|
};
|
|
27
29
|
try {
|
|
28
30
|
const response = yield this.graphqlQuery(query, variables);
|
|
@@ -33,5 +35,49 @@ class OrderCloudService extends serviceSDK_1.Service {
|
|
|
33
35
|
}
|
|
34
36
|
});
|
|
35
37
|
}
|
|
38
|
+
mergeOrderCart(oldCartId_1, newCartId_1, actorId_1) {
|
|
39
|
+
return __awaiter(this, arguments, void 0, function* (oldCartId, newCartId, actorId, fields = ["success", "movedItemCount", "skippedItemCount", "oldCartCanceled", "message"]) {
|
|
40
|
+
const mutation = (0, mutations_1.MERGE_ORDER_CART)(fields);
|
|
41
|
+
const variables = {
|
|
42
|
+
oldCartId,
|
|
43
|
+
newCartId,
|
|
44
|
+
actorId
|
|
45
|
+
};
|
|
46
|
+
try {
|
|
47
|
+
const response = yield this.graphqlMutation(mutation, variables);
|
|
48
|
+
return response.mergeOrderCart;
|
|
49
|
+
}
|
|
50
|
+
catch (error) {
|
|
51
|
+
throw error;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
updateQuantityV2(orderId, updateItem, updateBy) {
|
|
56
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
57
|
+
var _a, _b;
|
|
58
|
+
const mutation = mutations_2.UPDATE_QUANTITY_V2;
|
|
59
|
+
const variables = {
|
|
60
|
+
orderId,
|
|
61
|
+
partnerId: this.orgId,
|
|
62
|
+
updateItemInputs: {
|
|
63
|
+
orderItemId: updateItem.orderItemId,
|
|
64
|
+
price: updateItem.price,
|
|
65
|
+
quantity: updateItem.quantity,
|
|
66
|
+
unitPrice: updateItem.unitPrice,
|
|
67
|
+
unitType: updateItem.unitType,
|
|
68
|
+
campaignId: (_a = updateItem.campaignId) !== null && _a !== void 0 ? _a : null,
|
|
69
|
+
campaignActionId: (_b = updateItem.campaignActionId) !== null && _b !== void 0 ? _b : null
|
|
70
|
+
},
|
|
71
|
+
updateBy
|
|
72
|
+
};
|
|
73
|
+
try {
|
|
74
|
+
const response = yield this.graphqlQuery(mutation, variables);
|
|
75
|
+
return response;
|
|
76
|
+
}
|
|
77
|
+
catch (error) {
|
|
78
|
+
throw error;
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
}
|
|
36
82
|
}
|
|
37
83
|
exports.OrderCloudService = OrderCloudService;
|
|
@@ -21,4 +21,5 @@ export declare class OrderGraphQLService extends Service {
|
|
|
21
21
|
calculateResourceChangePrice(productIds: string[], quantity: string, unit: string, storeId: string, fields: string[], serviceId: string): Promise<any>;
|
|
22
22
|
applyReferralCode(input: any): Promise<any>;
|
|
23
23
|
removeReferralCode(input: any): Promise<any>;
|
|
24
|
+
updateLineItemResource(orderId: string, lineItem_id: string, productConfiguration: any, updateBy: string, fields: string[]): Promise<any>;
|
|
24
25
|
}
|
|
@@ -338,5 +338,21 @@ class OrderGraphQLService extends serviceSDK_1.Service {
|
|
|
338
338
|
}
|
|
339
339
|
});
|
|
340
340
|
}
|
|
341
|
+
updateLineItemResource(orderId, lineItem_id, productConfiguration, updateBy, fields) {
|
|
342
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
343
|
+
const mutation = (0, mutations_1.UPDATE_LINE_ITEM_RESOURCE)(fields);
|
|
344
|
+
const variables = {
|
|
345
|
+
partnerId: this.orgId, orderId, lineItem_id, productConfiguration, updateBy
|
|
346
|
+
};
|
|
347
|
+
try {
|
|
348
|
+
const response = yield this.graphqlMutationV2(mutation, variables);
|
|
349
|
+
return response.updateLineItemResource;
|
|
350
|
+
}
|
|
351
|
+
catch (error) {
|
|
352
|
+
console.log(`Error in updateLineItemResource: ${error}`);
|
|
353
|
+
throw error;
|
|
354
|
+
}
|
|
355
|
+
});
|
|
356
|
+
}
|
|
341
357
|
}
|
|
342
358
|
exports.OrderGraphQLService = OrderGraphQLService;
|
|
@@ -2,7 +2,7 @@ import { Service } from "../serviceSDK";
|
|
|
2
2
|
export declare class PaymentServiceV2 extends Service {
|
|
3
3
|
constructor(endpoint: string, orgId: string, storeId: string);
|
|
4
4
|
paymentsByOrders(orderIds: [string]): Promise<any>;
|
|
5
|
-
cancelPayment(paymentId: string, reason: string): Promise<any>;
|
|
5
|
+
cancelPayment(paymentId: string, reason: string, safeMode?: boolean, createBy?: string): Promise<any>;
|
|
6
6
|
paymentMethods(): Promise<any>;
|
|
7
7
|
getPaymentMethodTypes(): Promise<any>;
|
|
8
8
|
paymentInfo(paymentId: string): Promise<any>;
|
|
@@ -16,4 +16,14 @@ export declare class PaymentServiceV2 extends Service {
|
|
|
16
16
|
getPaymentGatewaysByMethodCode(methodCode: string): Promise<any>;
|
|
17
17
|
getPaymentMethodTypesV2(storeActive: any, allMethodTypes: boolean): Promise<any>;
|
|
18
18
|
getTransferInfo(storeId: string, paymentId: string): Promise<any>;
|
|
19
|
+
createPayment(paymentData: {
|
|
20
|
+
totalAmount: number;
|
|
21
|
+
storeID: string;
|
|
22
|
+
partnerCode: string;
|
|
23
|
+
methodCode: string;
|
|
24
|
+
phone?: string;
|
|
25
|
+
email?: string;
|
|
26
|
+
}): Promise<any>;
|
|
27
|
+
paymentMethodsByPartner(partnerCode?: string): Promise<any>;
|
|
28
|
+
getPaymentMethodTypesWithGatewayConfig(partnerId?: string, storeId?: string): Promise<any>;
|
|
19
29
|
}
|
|
@@ -21,7 +21,7 @@ class PaymentServiceV2 extends serviceSDK_1.Service {
|
|
|
21
21
|
return __awaiter(this, void 0, void 0, function* () {
|
|
22
22
|
const query = queries_1.PAYMENTS_BY_ORDERS;
|
|
23
23
|
const variables = {
|
|
24
|
-
orderIds: orderIds
|
|
24
|
+
orderIds: orderIds
|
|
25
25
|
};
|
|
26
26
|
try {
|
|
27
27
|
const response = yield this.graphqlQueryV3(query, variables);
|
|
@@ -32,12 +32,14 @@ class PaymentServiceV2 extends serviceSDK_1.Service {
|
|
|
32
32
|
}
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
|
-
cancelPayment(paymentId, reason) {
|
|
35
|
+
cancelPayment(paymentId, reason, safeMode, createBy) {
|
|
36
36
|
return __awaiter(this, void 0, void 0, function* () {
|
|
37
37
|
const mutation = mutations_1.CANCEL_PAYMENT;
|
|
38
38
|
const variables = {
|
|
39
39
|
paymentId: paymentId,
|
|
40
40
|
reason: reason,
|
|
41
|
+
safeMode: safeMode,
|
|
42
|
+
createBy: createBy
|
|
41
43
|
};
|
|
42
44
|
try {
|
|
43
45
|
const respone = yield this.graphqlMutationV3(mutation, variables);
|
|
@@ -66,7 +68,7 @@ class PaymentServiceV2 extends serviceSDK_1.Service {
|
|
|
66
68
|
const query = queries_1.GET_PAYMENT_METHOD_TYPES;
|
|
67
69
|
const variables = {
|
|
68
70
|
partnerId: this.orgId,
|
|
69
|
-
storeId: this.storeId
|
|
71
|
+
storeId: this.storeId
|
|
70
72
|
};
|
|
71
73
|
try {
|
|
72
74
|
const response = yield this.graphqlQueryV3(query, variables);
|
|
@@ -81,7 +83,7 @@ class PaymentServiceV2 extends serviceSDK_1.Service {
|
|
|
81
83
|
return __awaiter(this, void 0, void 0, function* () {
|
|
82
84
|
const query = queries_1.PAYMENT_INFO;
|
|
83
85
|
const variables = {
|
|
84
|
-
paymentId
|
|
86
|
+
paymentId
|
|
85
87
|
};
|
|
86
88
|
try {
|
|
87
89
|
const response = yield this.graphqlQueryV3(query, variables);
|
|
@@ -100,7 +102,7 @@ class PaymentServiceV2 extends serviceSDK_1.Service {
|
|
|
100
102
|
storeId: this.storeId,
|
|
101
103
|
methodTypeCode,
|
|
102
104
|
methodCode,
|
|
103
|
-
returnUrl
|
|
105
|
+
returnUrl
|
|
104
106
|
};
|
|
105
107
|
try {
|
|
106
108
|
const response = yield this.graphqlMutationV3(mutation, variables);
|
|
@@ -115,7 +117,7 @@ class PaymentServiceV2 extends serviceSDK_1.Service {
|
|
|
115
117
|
return __awaiter(this, void 0, void 0, function* () {
|
|
116
118
|
const query = queries_1.PAYMENT_STATUS;
|
|
117
119
|
const variables = {
|
|
118
|
-
paymentId
|
|
120
|
+
paymentId
|
|
119
121
|
};
|
|
120
122
|
try {
|
|
121
123
|
const response = yield this.graphqlQueryV3(query, variables);
|
|
@@ -130,7 +132,7 @@ class PaymentServiceV2 extends serviceSDK_1.Service {
|
|
|
130
132
|
return __awaiter(this, void 0, void 0, function* () {
|
|
131
133
|
const query = queries_1.GW_CONFIG_DETAIL;
|
|
132
134
|
const variables = {
|
|
133
|
-
configId
|
|
135
|
+
configId
|
|
134
136
|
};
|
|
135
137
|
try {
|
|
136
138
|
const response = yield this.graphqlQueryV3(query, variables);
|
|
@@ -148,7 +150,7 @@ class PaymentServiceV2 extends serviceSDK_1.Service {
|
|
|
148
150
|
paymentId: paymentId,
|
|
149
151
|
transactionNo: transactionNo,
|
|
150
152
|
note: note,
|
|
151
|
-
confirmBy: confirmBy
|
|
153
|
+
confirmBy: confirmBy
|
|
152
154
|
};
|
|
153
155
|
try {
|
|
154
156
|
const response = yield this.graphqlMutationV3(mutation, variables);
|
|
@@ -163,7 +165,7 @@ class PaymentServiceV2 extends serviceSDK_1.Service {
|
|
|
163
165
|
return __awaiter(this, void 0, void 0, function* () {
|
|
164
166
|
const query = queries_1.GET_PAYMENT_METHOD_TITLES;
|
|
165
167
|
const variables = {
|
|
166
|
-
methodCode
|
|
168
|
+
methodCode
|
|
167
169
|
};
|
|
168
170
|
try {
|
|
169
171
|
const response = yield this.graphqlQueryV3(query, variables);
|
|
@@ -180,7 +182,7 @@ class PaymentServiceV2 extends serviceSDK_1.Service {
|
|
|
180
182
|
const data = Object.assign(Object.assign({}, input), { partnerCode: this.orgId });
|
|
181
183
|
const variable = {
|
|
182
184
|
input: data,
|
|
183
|
-
cassoApiKey
|
|
185
|
+
cassoApiKey
|
|
184
186
|
};
|
|
185
187
|
try {
|
|
186
188
|
const response = yield this.graphqlMutationV3(mutation, variable);
|
|
@@ -197,7 +199,7 @@ class PaymentServiceV2 extends serviceSDK_1.Service {
|
|
|
197
199
|
const data = Object.assign(Object.assign({}, input), { partnerCode: this.orgId });
|
|
198
200
|
const variable = {
|
|
199
201
|
input: data,
|
|
200
|
-
cassoApiKey
|
|
202
|
+
cassoApiKey
|
|
201
203
|
};
|
|
202
204
|
try {
|
|
203
205
|
const response = yield this.graphqlMutationV3(mutation, variable);
|
|
@@ -214,7 +216,7 @@ class PaymentServiceV2 extends serviceSDK_1.Service {
|
|
|
214
216
|
const variables = {
|
|
215
217
|
partnerId: this.orgId,
|
|
216
218
|
methodCode,
|
|
217
|
-
storeId: this.storeId
|
|
219
|
+
storeId: this.storeId
|
|
218
220
|
};
|
|
219
221
|
try {
|
|
220
222
|
const response = yield this.graphqlQueryV3(query, variables);
|
|
@@ -232,7 +234,7 @@ class PaymentServiceV2 extends serviceSDK_1.Service {
|
|
|
232
234
|
partnerId: this.orgId,
|
|
233
235
|
storeId: this.storeId,
|
|
234
236
|
storeActive: storeActive,
|
|
235
|
-
allMethodTypes: allMethodTypes
|
|
237
|
+
allMethodTypes: allMethodTypes
|
|
236
238
|
};
|
|
237
239
|
try {
|
|
238
240
|
const response = yield this.graphqlQueryV3(queries, variables);
|
|
@@ -249,7 +251,7 @@ class PaymentServiceV2 extends serviceSDK_1.Service {
|
|
|
249
251
|
const variables = {
|
|
250
252
|
partnerId: this.orgId,
|
|
251
253
|
storeId,
|
|
252
|
-
paymentId
|
|
254
|
+
paymentId
|
|
253
255
|
};
|
|
254
256
|
try {
|
|
255
257
|
const response = yield this.graphqlMutationV3(queries, variables);
|
|
@@ -260,5 +262,44 @@ class PaymentServiceV2 extends serviceSDK_1.Service {
|
|
|
260
262
|
}
|
|
261
263
|
});
|
|
262
264
|
}
|
|
265
|
+
createPayment(paymentData) {
|
|
266
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
267
|
+
const mutation = mutations_1.CREATE_PAYMENT;
|
|
268
|
+
const variables = { paymentData };
|
|
269
|
+
try {
|
|
270
|
+
const response = yield this.graphqlMutationV3(mutation, variables);
|
|
271
|
+
return response.createPayment;
|
|
272
|
+
}
|
|
273
|
+
catch (error) {
|
|
274
|
+
throw error;
|
|
275
|
+
}
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
paymentMethodsByPartner(partnerCode) {
|
|
279
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
280
|
+
const query = queries_1.PAYMENT_METHODS_BY_PARTNER;
|
|
281
|
+
const variables = { partnerCode };
|
|
282
|
+
try {
|
|
283
|
+
const response = yield this.graphqlQueryV3(query, variables);
|
|
284
|
+
return response.paymentMethods;
|
|
285
|
+
}
|
|
286
|
+
catch (error) {
|
|
287
|
+
throw error;
|
|
288
|
+
}
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
getPaymentMethodTypesWithGatewayConfig(partnerId, storeId) {
|
|
292
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
293
|
+
const query = queries_1.GET_PAYMENT_METHOD_TYPES_WITH_GATEWAY_CONFIG;
|
|
294
|
+
const variables = { partnerId, storeId };
|
|
295
|
+
try {
|
|
296
|
+
const response = yield this.graphqlQueryV3(query, variables);
|
|
297
|
+
return response.getPaymentMethodTypes;
|
|
298
|
+
}
|
|
299
|
+
catch (error) {
|
|
300
|
+
throw error;
|
|
301
|
+
}
|
|
302
|
+
});
|
|
303
|
+
}
|
|
263
304
|
}
|
|
264
305
|
exports.PaymentServiceV2 = PaymentServiceV2;
|
|
@@ -6,8 +6,6 @@ export declare class PortalService extends Service {
|
|
|
6
6
|
createTag(title: string, createBy: string, partnerId?: string): Promise<any>;
|
|
7
7
|
searchTag(partnerId?: string, title?: string, id?: string, search?: string): Promise<any>;
|
|
8
8
|
redirectLink(sku?: string, id?: string): string;
|
|
9
|
-
imageProduct(parentId: string, parentType: string, width?: number, height?: number): string;
|
|
10
|
-
imagesProduct(parentId: string, parentType: string, width?: number, height?: number): string;
|
|
11
9
|
completeOrder(orderId: string, byUser: string): Promise<any>;
|
|
12
10
|
pushMessage(message: any): Promise<any>;
|
|
13
11
|
confirmExport(orderId: string, updateBy: string): Promise<any>;
|
|
@@ -30,4 +28,14 @@ export declare class PortalService extends Service {
|
|
|
30
28
|
getPosition(query?: Record<string, any>): Promise<any>;
|
|
31
29
|
getPositionForTime(query?: Record<string, any>): Promise<any>;
|
|
32
30
|
getBookingCount(query?: Record<string, any>): Promise<any>;
|
|
31
|
+
getSlugPathFromDynamicFrom(query?: Record<string, any>): Promise<any>;
|
|
32
|
+
putSlugPathFromDynamicFrom(data: any): Promise<any>;
|
|
33
|
+
postSlugPathFromDynamicFrom(data: any): Promise<any>;
|
|
34
|
+
getExamGroupTimeSlots(query?: Record<string, any>): Promise<any>;
|
|
35
|
+
getExamGroupExecutionDates(query?: Record<string, any>): Promise<any>;
|
|
36
|
+
getExamGroupExecutionLocations(query?: Record<string, any>): Promise<any>;
|
|
37
|
+
getEventsActivity(query?: Record<string, any>): Promise<any>;
|
|
38
|
+
imageProduct(parentId: string, parentType: string, width?: number, height?: number): string;
|
|
39
|
+
imagesProduct(parentId: string, parentType: string, width?: number, height?: number): string;
|
|
40
|
+
confirmOrderWithoutPaid(partnerId: string, orderId: string, createBy: string): Promise<any>;
|
|
33
41
|
}
|