@longvansoftware/storefront-js-client 3.8.5 → 3.8.7
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/queries.d.ts +1 -0
- package/dist/src/graphql/paymentV2/queries.js +21 -1
- package/dist/src/lib/auth/index.js +9 -2
- package/dist/src/lib/paymentV2/index.d.ts +1 -0
- package/dist/src/lib/paymentV2/index.js +17 -0
- package/dist/src/types/auth.d.ts +0 -2
- package/package.json +1 -1
|
@@ -7,3 +7,4 @@ export declare const GW_CONFIG_DETAIL: import("graphql").DocumentNode;
|
|
|
7
7
|
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
|
+
export declare const GET_TRANSFER_INFO: import("graphql").DocumentNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
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.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!]!) {
|
|
@@ -255,3 +255,23 @@ exports.GET_PAYMENT_METHOD_TYPES_V2 = (0, graphql_tag_1.gql) `
|
|
|
255
255
|
}
|
|
256
256
|
}
|
|
257
257
|
`;
|
|
258
|
+
exports.GET_TRANSFER_INFO = (0, graphql_tag_1.gql) `
|
|
259
|
+
query GetTransferInfo(
|
|
260
|
+
$partnerId: String!
|
|
261
|
+
$storeId: String
|
|
262
|
+
$paymentId: String
|
|
263
|
+
) {
|
|
264
|
+
getTransferInfo(
|
|
265
|
+
partnerId: $partnerId
|
|
266
|
+
storeId: $storeId
|
|
267
|
+
paymentId: $paymentId
|
|
268
|
+
) {
|
|
269
|
+
bankCode
|
|
270
|
+
bankName
|
|
271
|
+
accountNumber
|
|
272
|
+
accountName
|
|
273
|
+
description
|
|
274
|
+
transferInfo
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
`;
|
|
@@ -48,8 +48,15 @@ class AuthService extends serviceSDK_1.Service {
|
|
|
48
48
|
*/
|
|
49
49
|
register(registerRequest) {
|
|
50
50
|
return __awaiter(this, void 0, void 0, function* () {
|
|
51
|
-
const
|
|
52
|
-
|
|
51
|
+
const mutation = mutations_1.REGISTER_MUTATION;
|
|
52
|
+
const variables = { orgId: this.orgId, registerRequest };
|
|
53
|
+
try {
|
|
54
|
+
const response = yield this.graphqlMutation(mutation, variables);
|
|
55
|
+
return response;
|
|
56
|
+
}
|
|
57
|
+
catch (error) {
|
|
58
|
+
throw error;
|
|
59
|
+
}
|
|
53
60
|
});
|
|
54
61
|
}
|
|
55
62
|
getUserDetail(accessToken) {
|
|
@@ -15,4 +15,5 @@ export declare class PaymentServiceV2 extends Service {
|
|
|
15
15
|
handleUpdateGatewayConfig(input: any, cassoApiKey: string): Promise<any>;
|
|
16
16
|
getPaymentGatewaysByMethodCode(methodCode: string): Promise<any>;
|
|
17
17
|
getPaymentMethodTypesV2(storeActive: any, allMethodTypes: boolean): Promise<any>;
|
|
18
|
+
getTransferInfo(storeId: string, paymentId: string): Promise<any>;
|
|
18
19
|
}
|
|
@@ -243,5 +243,22 @@ class PaymentServiceV2 extends serviceSDK_1.Service {
|
|
|
243
243
|
}
|
|
244
244
|
});
|
|
245
245
|
}
|
|
246
|
+
getTransferInfo(storeId, paymentId) {
|
|
247
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
248
|
+
const queries = queries_1.GET_TRANSFER_INFO;
|
|
249
|
+
const variables = {
|
|
250
|
+
partnerId: this.orgId,
|
|
251
|
+
storeId,
|
|
252
|
+
paymentId,
|
|
253
|
+
};
|
|
254
|
+
try {
|
|
255
|
+
const response = yield this.graphqlMutationV3(queries, variables);
|
|
256
|
+
return response.getTransferInfo;
|
|
257
|
+
}
|
|
258
|
+
catch (error) {
|
|
259
|
+
throw error;
|
|
260
|
+
}
|
|
261
|
+
});
|
|
262
|
+
}
|
|
246
263
|
}
|
|
247
264
|
exports.PaymentServiceV2 = PaymentServiceV2;
|
package/dist/src/types/auth.d.ts
CHANGED