@longvansoftware/storefront-js-client 4.7.3 → 4.7.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/paymentV2/mutations.d.ts +1 -0
- package/dist/src/graphql/paymentV2/mutations.js +15 -1
- package/dist/src/graphql/paymentV2/queries.d.ts +1 -0
- package/dist/src/graphql/paymentV2/queries.js +20 -1
- package/dist/src/lib/paymentV2/index.d.ts +9 -0
- package/dist/src/lib/paymentV2/index.js +26 -0
- package/dist/src/types/marketplace.d.ts +0 -0
- package/dist/src/types/marketplace.js +1 -0
- package/package.json +1 -1
- package/dist/src/graphql/cloudService/queries.d.ts +0 -1
- package/dist/src/graphql/cloudService/queries.js +0 -71
- package/dist/src/lib/cloudService/index.d.ts +0 -5
- package/dist/src/lib/cloudService/index.js +0 -35
|
@@ -2,4 +2,5 @@ export declare const CANCEL_PAYMENT: import("graphql").DocumentNode;
|
|
|
2
2
|
export declare const CONFIRM_TO_GATEWAY: import("graphql").DocumentNode;
|
|
3
3
|
export declare const CONFIRM_PAYMENT_SUCCESS_MANUAL: import("graphql").DocumentNode;
|
|
4
4
|
export declare const HANDLE_UPDATE_GATEWAY_CONFIG: import("graphql").DocumentNode;
|
|
5
|
+
export declare const CREATE_PAYMENT: import("graphql").DocumentNode;
|
|
5
6
|
export declare const HANDLE_CREATE_GATEWAY_CONFIG: import("graphql").DocumentNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.HANDLE_CREATE_GATEWAY_CONFIG = exports.HANDLE_UPDATE_GATEWAY_CONFIG = exports.CONFIRM_PAYMENT_SUCCESS_MANUAL = exports.CONFIRM_TO_GATEWAY = exports.CANCEL_PAYMENT = void 0;
|
|
3
|
+
exports.HANDLE_CREATE_GATEWAY_CONFIG = exports.CREATE_PAYMENT = exports.HANDLE_UPDATE_GATEWAY_CONFIG = exports.CONFIRM_PAYMENT_SUCCESS_MANUAL = exports.CONFIRM_TO_GATEWAY = exports.CANCEL_PAYMENT = void 0;
|
|
4
4
|
const graphql_tag_1 = require("graphql-tag");
|
|
5
5
|
exports.CANCEL_PAYMENT = (0, graphql_tag_1.gql) `
|
|
6
6
|
mutation CancelPayment($paymentId: String!, $reason: String!) {
|
|
@@ -89,6 +89,20 @@ exports.HANDLE_UPDATE_GATEWAY_CONFIG = (0, graphql_tag_1.gql) `
|
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
`;
|
|
92
|
+
exports.CREATE_PAYMENT = (0, graphql_tag_1.gql) `
|
|
93
|
+
mutation CreatePayment($paymentData: Payment) {
|
|
94
|
+
createPayment(paymentData: $paymentData) {
|
|
95
|
+
code
|
|
96
|
+
message
|
|
97
|
+
data
|
|
98
|
+
qrCodeUrl
|
|
99
|
+
deeplink
|
|
100
|
+
deeplinkMiniApp
|
|
101
|
+
paymentId
|
|
102
|
+
gwConfigId
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
`;
|
|
92
106
|
exports.HANDLE_CREATE_GATEWAY_CONFIG = (0, graphql_tag_1.gql) `
|
|
93
107
|
mutation HandleCreateGatewayConfig(
|
|
94
108
|
$input: PaymentGatewayConfigInput!
|
|
@@ -8,3 +8,4 @@ export declare const GET_PAYMENT_METHOD_TITLES: import("graphql").DocumentNode;
|
|
|
8
8
|
export declare const GET_PAYEMNT_GATEWAYS_BY_METHOD_CODE: import("graphql").DocumentNode;
|
|
9
9
|
export declare const GET_PAYMENT_METHOD_TYPES_V2: import("graphql").DocumentNode;
|
|
10
10
|
export declare const GET_TRANSFER_INFO: import("graphql").DocumentNode;
|
|
11
|
+
export declare const PAYMENT_METHODS_BY_PARTNER: import("graphql").DocumentNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GET_TRANSFER_INFO = exports.GET_PAYMENT_METHOD_TYPES_V2 = exports.GET_PAYEMNT_GATEWAYS_BY_METHOD_CODE = exports.GET_PAYMENT_METHOD_TITLES = exports.GW_CONFIG_DETAIL = exports.PAYMENT_STATUS = exports.PAYMENT_INFO = exports.GET_PAYMENT_METHOD_TYPES = exports.PAYMENT_METHODS = exports.PAYMENTS_BY_ORDERS = void 0;
|
|
3
|
+
exports.PAYMENT_METHODS_BY_PARTNER = exports.GET_TRANSFER_INFO = exports.GET_PAYMENT_METHOD_TYPES_V2 = exports.GET_PAYEMNT_GATEWAYS_BY_METHOD_CODE = exports.GET_PAYMENT_METHOD_TITLES = exports.GW_CONFIG_DETAIL = exports.PAYMENT_STATUS = exports.PAYMENT_INFO = exports.GET_PAYMENT_METHOD_TYPES = exports.PAYMENT_METHODS = exports.PAYMENTS_BY_ORDERS = void 0;
|
|
4
4
|
const graphql_tag_1 = require("graphql-tag");
|
|
5
5
|
exports.PAYMENTS_BY_ORDERS = (0, graphql_tag_1.gql) `
|
|
6
6
|
query PaymentsByOrders($orderIds: [String!]!) {
|
|
@@ -275,3 +275,22 @@ exports.GET_TRANSFER_INFO = (0, graphql_tag_1.gql) `
|
|
|
275
275
|
}
|
|
276
276
|
}
|
|
277
277
|
`;
|
|
278
|
+
exports.PAYMENT_METHODS_BY_PARTNER = (0, graphql_tag_1.gql) `
|
|
279
|
+
query PaymentMethodsByPartner($partnerCode: String) {
|
|
280
|
+
paymentMethods(partnerCode: $partnerCode ) {
|
|
281
|
+
id
|
|
282
|
+
code
|
|
283
|
+
description
|
|
284
|
+
image
|
|
285
|
+
name
|
|
286
|
+
titles {
|
|
287
|
+
id
|
|
288
|
+
code
|
|
289
|
+
name
|
|
290
|
+
lang
|
|
291
|
+
showField
|
|
292
|
+
required
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
`;
|
|
@@ -16,4 +16,13 @@ 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>;
|
|
19
28
|
}
|
|
@@ -260,5 +260,31 @@ class PaymentServiceV2 extends serviceSDK_1.Service {
|
|
|
260
260
|
}
|
|
261
261
|
});
|
|
262
262
|
}
|
|
263
|
+
createPayment(paymentData) {
|
|
264
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
265
|
+
const mutation = mutations_1.CREATE_PAYMENT;
|
|
266
|
+
const variables = { paymentData };
|
|
267
|
+
try {
|
|
268
|
+
const response = yield this.graphqlMutationV3(mutation, variables);
|
|
269
|
+
return response.createPayment;
|
|
270
|
+
}
|
|
271
|
+
catch (error) {
|
|
272
|
+
throw error;
|
|
273
|
+
}
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
paymentMethodsByPartner(partnerCode) {
|
|
277
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
278
|
+
const query = queries_1.PAYMENT_METHODS_BY_PARTNER;
|
|
279
|
+
const variables = { partnerCode };
|
|
280
|
+
try {
|
|
281
|
+
const response = yield this.graphqlQueryV3(query, variables);
|
|
282
|
+
return response.paymentMethods;
|
|
283
|
+
}
|
|
284
|
+
catch (error) {
|
|
285
|
+
throw error;
|
|
286
|
+
}
|
|
287
|
+
});
|
|
288
|
+
}
|
|
263
289
|
}
|
|
264
290
|
exports.PaymentServiceV2 = PaymentServiceV2;
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const SEARCH_SERVICE: import("graphql").DocumentNode;
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SEARCH_SERVICE = void 0;
|
|
4
|
-
const graphql_tag_1 = require("graphql-tag");
|
|
5
|
-
exports.SEARCH_SERVICE = (0, graphql_tag_1.gql) `
|
|
6
|
-
query SearchService($filter: CloudServiceFilterInput) {
|
|
7
|
-
searchService(filter: $filter) {
|
|
8
|
-
total
|
|
9
|
-
offset
|
|
10
|
-
maxResult
|
|
11
|
-
resultList {
|
|
12
|
-
supplierId
|
|
13
|
-
serviceId
|
|
14
|
-
partnerId
|
|
15
|
-
serviceName
|
|
16
|
-
type
|
|
17
|
-
typeName
|
|
18
|
-
status
|
|
19
|
-
statusFulfillment
|
|
20
|
-
ownerId
|
|
21
|
-
startDate
|
|
22
|
-
endDate
|
|
23
|
-
serviceType
|
|
24
|
-
urlPrivate
|
|
25
|
-
urlPublic
|
|
26
|
-
username
|
|
27
|
-
password
|
|
28
|
-
attrs
|
|
29
|
-
description
|
|
30
|
-
productGroupId
|
|
31
|
-
orderId
|
|
32
|
-
actionRequest {
|
|
33
|
-
id
|
|
34
|
-
name
|
|
35
|
-
uri
|
|
36
|
-
type
|
|
37
|
-
}
|
|
38
|
-
billingCycle {
|
|
39
|
-
quantity
|
|
40
|
-
unit
|
|
41
|
-
}
|
|
42
|
-
productConfiguration {
|
|
43
|
-
productId
|
|
44
|
-
productTitle
|
|
45
|
-
productResources {
|
|
46
|
-
name
|
|
47
|
-
quantity
|
|
48
|
-
unit
|
|
49
|
-
productId
|
|
50
|
-
giftProductId
|
|
51
|
-
gift
|
|
52
|
-
giftQuantity
|
|
53
|
-
campaignId
|
|
54
|
-
campaignActionId
|
|
55
|
-
qualify
|
|
56
|
-
idParent
|
|
57
|
-
addQuantity
|
|
58
|
-
defaultQuantity
|
|
59
|
-
title
|
|
60
|
-
price
|
|
61
|
-
unitPrice
|
|
62
|
-
totalResource
|
|
63
|
-
unitGift
|
|
64
|
-
giftDuration
|
|
65
|
-
giftDurationUnit
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
`;
|
|
@@ -1,35 +0,0 @@
|
|
|
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.CloudServiceService = void 0;
|
|
13
|
-
const serviceSDK_1 = require("../serviceSDK");
|
|
14
|
-
const queries_1 = require("../../graphql/cloudService/queries");
|
|
15
|
-
class CloudServiceService extends serviceSDK_1.Service {
|
|
16
|
-
constructor(endpoint, orgId, storeId) {
|
|
17
|
-
super(endpoint, orgId, storeId);
|
|
18
|
-
}
|
|
19
|
-
searchService(data) {
|
|
20
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
-
const query = queries_1.SEARCH_SERVICE;
|
|
22
|
-
const variables = {
|
|
23
|
-
filter: data,
|
|
24
|
-
};
|
|
25
|
-
try {
|
|
26
|
-
const response = yield this.graphqlQueryV4(query, variables);
|
|
27
|
-
return response.searchService;
|
|
28
|
-
}
|
|
29
|
-
catch (error) {
|
|
30
|
-
throw error;
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
exports.CloudServiceService = CloudServiceService;
|