@opexa/portal-sdk 0.0.196 → 0.0.197

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
@@ -5222,21 +5222,20 @@ var Sdk = class {
5222
5222
  });
5223
5223
  return res2.ok ? { ok: true, data: { id } } : res2;
5224
5224
  }
5225
- const res = await this.accountService.registerMemberAccount__next({
5226
- input: {
5227
- id,
5228
- name: input.name,
5229
- btag: input.btag,
5230
- domain: input.domain,
5231
- password: await sha256(input.password),
5232
- mobileNumber: input.mobileNumber ? addAreaCode(input.mobileNumber, await this.locale) : undefined
5233
- },
5234
- reCAPTCHAResponse: input.reCAPTCHAResponse
5235
- });
5236
- return res.ok ? { ok: true, data: { id } } : res;
5237
- }
5238
- async registerMemberAccountByName(input) {
5239
- const id = input.id ?? objectId.ObjectId.generate(ObjectType.Account).toString();
5225
+ if (input.type === "NAME_AND_PASSWORD") {
5226
+ const res2 = await this.accountService.registerMemberAccount__next({
5227
+ input: {
5228
+ id,
5229
+ name: input.name,
5230
+ btag: input.btag,
5231
+ domain: input.domain,
5232
+ password: await sha256(input.password),
5233
+ mobileNumber: input.mobileNumber ? addAreaCode(input.mobileNumber, await this.locale) : undefined
5234
+ },
5235
+ reCAPTCHAResponse: input.reCAPTCHAResponse
5236
+ });
5237
+ return res2.ok ? { ok: true, data: { id } } : res2;
5238
+ }
5240
5239
  const res = await this.accountService.registerMemberAccountByName({
5241
5240
  input: {
5242
5241
  id,