@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.
@@ -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 variables = { registerRequest };
52
- yield this.graphqlMutation(mutations_1.REGISTER_MUTATION, variables);
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;
@@ -22,8 +22,6 @@ export interface LoginResponse {
22
22
  export interface RegisterRequest {
23
23
  username: string;
24
24
  fullName: string;
25
- password: string;
26
- userIP: string;
27
25
  }
28
26
  export interface RegisterResponse {
29
27
  id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longvansoftware/storefront-js-client",
3
- "version": "3.8.5",
3
+ "version": "3.8.7",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [