@longvansoftware/storefront-js-client 4.7.5 → 4.7.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.
@@ -1,4 +1,5 @@
1
1
  export declare const GET_USER_DETAIL: import("graphql").DocumentNode;
2
+ export declare const GET_USER_DETAIL_V2: import("graphql").DocumentNode;
2
3
  export declare const GET_USER_LOGIN_BY_TOKEN: import("graphql").DocumentNode;
3
4
  export declare const GET_USER_LOGIN_BY_USER_LOGIN_ID: import("graphql").DocumentNode;
4
5
  export declare const CHECK_USERNAME_EXISTED: import("graphql").DocumentNode;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GET_PARTY_DETAILS_BY_PHONE = exports.SHOW_LOGIN_SOCIAL = exports.GET_ORGANIZATION_BY_ID = exports.GET_WORK_SPACES = exports.GET_MENUS = exports.GET_ORGANIZATIONS_BY_PARTY_ID = exports.GET_ACCESS_TOKEN_BY_OTP_QUERY = exports.CHECK_USER_LOGIN = exports.LOGIN_ZALO = exports.LOGIN_FACEBOOK = exports.LOGIN_GOOGLE = exports.CHECK_USERNAME_EXISTED = exports.GET_USER_LOGIN_BY_USER_LOGIN_ID = exports.GET_USER_LOGIN_BY_TOKEN = exports.GET_USER_DETAIL = void 0;
3
+ exports.GET_PARTY_DETAILS_BY_PHONE = exports.SHOW_LOGIN_SOCIAL = exports.GET_ORGANIZATION_BY_ID = exports.GET_WORK_SPACES = exports.GET_MENUS = exports.GET_ORGANIZATIONS_BY_PARTY_ID = exports.GET_ACCESS_TOKEN_BY_OTP_QUERY = exports.CHECK_USER_LOGIN = exports.LOGIN_ZALO = exports.LOGIN_FACEBOOK = exports.LOGIN_GOOGLE = exports.CHECK_USERNAME_EXISTED = exports.GET_USER_LOGIN_BY_USER_LOGIN_ID = exports.GET_USER_LOGIN_BY_TOKEN = exports.GET_USER_DETAIL_V2 = exports.GET_USER_DETAIL = void 0;
4
4
  const graphql_tag_1 = require("graphql-tag");
5
5
  exports.GET_USER_DETAIL = (0, graphql_tag_1.gql) `
6
6
  query GetUserDetail($orgId: String!, $accessToken: String!) {
@@ -23,6 +23,30 @@ exports.GET_USER_DETAIL = (0, graphql_tag_1.gql) `
23
23
  }
24
24
  }
25
25
  `;
26
+ exports.GET_USER_DETAIL_V2 = (0, graphql_tag_1.gql) `
27
+ query GetUserDetailV2($orgId: String!, $accessToken: String!) {
28
+ getUserDetail(orgId: $orgId, accessToken: $accessToken) {
29
+ partyId
30
+ orgId
31
+ fullName
32
+ email
33
+ phone
34
+ address
35
+ identityNumber
36
+ gender
37
+ birthDate
38
+ avatarUrl
39
+ accessToken
40
+ username
41
+ orgPermissionsMap
42
+ orgPositionsMap
43
+ orgRolesMap
44
+ readyV2
45
+ lastVerified
46
+ level
47
+ }
48
+ }
49
+ `;
26
50
  exports.GET_USER_LOGIN_BY_TOKEN = (0, graphql_tag_1.gql) `
27
51
  query GetUserLoginByToken($accessToken: String!) {
28
52
  getUserLoginByToken(accessToken: $accessToken) {
@@ -7,5 +7,6 @@ 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_PAYMENT_METHOD_TYPES_WITH_GATEWAY_CONFIG: import("graphql").DocumentNode;
10
11
  export declare const GET_TRANSFER_INFO: import("graphql").DocumentNode;
11
12
  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.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;
3
+ exports.PAYMENT_METHODS_BY_PARTNER = exports.GET_TRANSFER_INFO = exports.GET_PAYMENT_METHOD_TYPES_WITH_GATEWAY_CONFIG = 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,6 +255,44 @@ exports.GET_PAYMENT_METHOD_TYPES_V2 = (0, graphql_tag_1.gql) `
255
255
  }
256
256
  }
257
257
  `;
258
+ exports.GET_PAYMENT_METHOD_TYPES_WITH_GATEWAY_CONFIG = (0, graphql_tag_1.gql) `
259
+ query GetPaymentMethodTypesWithGatewayConfig(
260
+ $partnerId: String!
261
+ $storeId: String!
262
+ ) {
263
+ getPaymentMethodTypes(partnerId: $partnerId, storeId: $storeId) {
264
+ code
265
+ name
266
+ description
267
+ image
268
+ storeActive
269
+ paymentGatewayConfig {
270
+ id
271
+ methodCode
272
+ partnerCode
273
+ subMethodCode
274
+ gwPartnerCode
275
+ gwPartnerName
276
+ gwPaymentMethod
277
+ gwSubChannel
278
+ gwMethodVersion
279
+ hashAlgorithm
280
+ accessKey
281
+ secretKey
282
+ responseUrl
283
+ requestUrl
284
+ methodType
285
+ publicKey
286
+ redirectUrl
287
+ activated
288
+ paymentRecordingMethod
289
+ userId
290
+ name
291
+ description
292
+ }
293
+ }
294
+ }
295
+ `;
258
296
  exports.GET_TRANSFER_INFO = (0, graphql_tag_1.gql) `
259
297
  query GetTransferInfo(
260
298
  $partnerId: String!
@@ -24,6 +24,7 @@ export declare class AuthService extends Service {
24
24
  */
25
25
  register(registerRequest: RegisterRequest): Promise<void>;
26
26
  getUserDetail(accessToken: string): Promise<any>;
27
+ getUserDetailV2(accessToken: string): Promise<any>;
27
28
  /**
28
29
  * Retrieves user login information using the provided access token.
29
30
  *
@@ -76,6 +76,22 @@ class AuthService extends serviceSDK_1.Service {
76
76
  }
77
77
  });
78
78
  }
79
+ getUserDetailV2(accessToken) {
80
+ return __awaiter(this, void 0, void 0, function* () {
81
+ const variables = {
82
+ orgId: this.orgId,
83
+ accessToken,
84
+ };
85
+ try {
86
+ const response = yield this.graphqlQuery(queries_1.GET_USER_DETAIL_V2, variables);
87
+ return response.getUserDetail;
88
+ }
89
+ catch (error) {
90
+ console.log(`Error in getUserDetailV2: ${error}`);
91
+ throw error;
92
+ }
93
+ });
94
+ }
79
95
  /**
80
96
  * Retrieves user login information using the provided access token.
81
97
  *
@@ -25,4 +25,5 @@ export declare class PaymentServiceV2 extends Service {
25
25
  email?: string;
26
26
  }): Promise<any>;
27
27
  paymentMethodsByPartner(partnerCode?: string): Promise<any>;
28
+ getPaymentMethodTypesWithGatewayConfig(partnerId?: string, storeId?: string): Promise<any>;
28
29
  }
@@ -286,5 +286,18 @@ class PaymentServiceV2 extends serviceSDK_1.Service {
286
286
  }
287
287
  });
288
288
  }
289
+ getPaymentMethodTypesWithGatewayConfig(partnerId, storeId) {
290
+ return __awaiter(this, void 0, void 0, function* () {
291
+ const query = queries_1.GET_PAYMENT_METHOD_TYPES_WITH_GATEWAY_CONFIG;
292
+ const variables = { partnerId, storeId };
293
+ try {
294
+ const response = yield this.graphqlQueryV3(query, variables);
295
+ return response.getPaymentMethodTypes;
296
+ }
297
+ catch (error) {
298
+ throw error;
299
+ }
300
+ });
301
+ }
289
302
  }
290
303
  exports.PaymentServiceV2 = PaymentServiceV2;
File without changes
@@ -0,0 +1 @@
1
+ "use strict";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longvansoftware/storefront-js-client",
3
- "version": "4.7.5",
3
+ "version": "4.7.7",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [