@opexa/portal-sdk 0.7.0 → 0.8.1

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/index.cjs CHANGED
@@ -2362,7 +2362,14 @@ var AccountService = class {
2362
2362
  return res.ok ? { ok: true, data: res.data.pointsClubSettings } : res;
2363
2363
  }
2364
2364
  async registerMemberAccountByMobileNumber(variables) {
2365
- const res = await this.client.request(REGISTER_MEMBER_ACCOUNT_BY_MOBILE_NUMBER_MUTATION, variables);
2365
+ const { reCAPTCHAResponse, ...others } = variables;
2366
+ const res = await this.client.request(REGISTER_MEMBER_ACCOUNT_BY_MOBILE_NUMBER_MUTATION, others, {
2367
+ headers: {
2368
+ ...variables.reCAPTCHAResponse && {
2369
+ "google-recaptcha-response": reCAPTCHAResponse
2370
+ }
2371
+ }
2372
+ });
2366
2373
  if (!res.ok) return res;
2367
2374
  if (res.data.registerMemberAccountByMobileNumber) {
2368
2375
  return {
@@ -5630,6 +5637,19 @@ var Sdk = class {
5630
5637
  });
5631
5638
  return res2.ok ? { ok: true, data: { id } } : res2;
5632
5639
  }
5640
+ if (input.type === "MOBILE_NUMBER_INR") {
5641
+ const res2 = await this.accountService.registerMemberAccountByMobileNumber({
5642
+ input: {
5643
+ id,
5644
+ password: await sha256(input.password),
5645
+ realName: input.realName,
5646
+ mobileNumber: addAreaCode(input.mobileNumber, await this.locale)
5647
+ },
5648
+ mobileNumberVerificationCode: input.mobileVerificationCode,
5649
+ reCAPTCHAResponse: input.reCAPTCHAResponse
5650
+ });
5651
+ return res2.ok ? { ok: true, data: { id } } : res2;
5652
+ }
5633
5653
  if (input.type === "NAME_AND_PASSWORD") {
5634
5654
  const res2 = await this.accountService.registerMemberAccount__next({
5635
5655
  input: {
@@ -5780,17 +5800,6 @@ var Sdk = class {
5780
5800
  data: res.data ? this.transformer.transform.wallet(res.data) : null
5781
5801
  };
5782
5802
  }
5783
- async registerMemberAccountByMobileNumber(input) {
5784
- return await this.accountService.registerMemberAccountByMobileNumber({
5785
- input: {
5786
- id: input.id,
5787
- mobileNumber: addAreaCode(input.mobileNumber, await this.locale),
5788
- password: await sha256(input.password),
5789
- realName: input.realName
5790
- },
5791
- mobileNumberVerificationCode: input.mobileNumberVerificationCode
5792
- });
5793
- }
5794
5803
  /**/
5795
5804
  /*+----------------------------------------+*/
5796
5805
  /*+ ANNOUNCEMENT +*/