@startbahn/startrail-sdk-js 1.23.0-beta.5 → 1.23.3

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/README.md CHANGED
@@ -81,6 +81,7 @@ sdk = new Startrail({
81
81
  words: {
82
82
  en: {
83
83
  modal: {
84
+ continueLogin: 'Login with previous {verifier} account', // {verifier} is optional but to be replaced programmatically with the login provider name if it exists in the sentence
84
85
  termsConditions: 'your termsConditions',
85
86
  termsConditionsLinkUrl: 'your termsConditionsLinkUrl'
86
87
  },
@@ -98,6 +99,7 @@ sdk = new Startrail({
98
99
  },
99
100
  ja: {
100
101
  modal: {
102
+ continueLogin: '前回の{verifier}アカウントを使う', // {verifier}は任意ですが、文言の中に存在していれば選択したログイン方法の名前へと自動的に置き換わります。
101
103
  termsConditions: 'あなたの termsConditions',
102
104
  termsConditionsLinkUrl: 'あなたの termsConditionsLinkUrl'
103
105
  },
@@ -164597,7 +164597,7 @@ const torusConfig = (config) => {
164597
164597
  showOnModal: false
164598
164598
  },
164599
164599
  [config.auth0TorusConfigKey]: {
164600
- name: ' ',
164600
+ name: 'email',
164601
164601
  typeOfLogin: 'email_password',
164602
164602
  description: 'login.buttonText',
164603
164603
  clientId: config.auth0ClientId,
@@ -164640,7 +164640,7 @@ const isSignup = (config) => {
164640
164640
  * Format data passed from end-users for torus-embed configuration
164641
164641
  */
164642
164642
  const formatConfigForTorusUI = (config) => {
164643
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
164643
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3;
164644
164644
  let customUi = {};
164645
164645
  let lang;
164646
164646
  const tkeyDesc = {
@@ -164655,19 +164655,20 @@ const formatConfigForTorusUI = (config) => {
164655
164655
  yourDigital: config.conditionalWords.subtitle[lang],
164656
164656
  signIn: config.conditionalWords.authLabel[lang],
164657
164657
  termsConditions: ((_d = (_c = (_b = (_a = config === null || config === void 0 ? void 0 : config.customUi) === null || _a === void 0 ? void 0 : _a.words) === null || _b === void 0 ? void 0 : _b[lang]) === null || _c === void 0 ? void 0 : _c.modal) === null || _d === void 0 ? void 0 : _d.termsConditions) || constant_1.DEFAULT_WORD.dappLogin.termsConditions[lang],
164658
- termsLearnMore: '' // Remove additional link from modal
164658
+ termsLearnMore: '',
164659
+ continueWith: ((_h = (_g = (_f = (_e = config === null || config === void 0 ? void 0 : config.customUi) === null || _e === void 0 ? void 0 : _e.words) === null || _f === void 0 ? void 0 : _f[lang]) === null || _g === void 0 ? void 0 : _g.modal) === null || _h === void 0 ? void 0 : _h.continueLogin) || constant_1.DEFAULT_WORD.dappLogin.continueWith[lang]
164659
164660
  },
164660
164661
  login: {
164661
164662
  buttonText: config.conditionalWords.emailButton[lang]
164662
164663
  },
164663
164664
  dappTransfer: {
164664
- permission: ((_h = (_g = (_f = (_e = config === null || config === void 0 ? void 0 : config.customUi) === null || _e === void 0 ? void 0 : _e.words) === null || _f === void 0 ? void 0 : _f[lang]) === null || _g === void 0 ? void 0 : _g.signPopup) === null || _h === void 0 ? void 0 : _h.title) || constant_1.DEFAULT_WORD.dappTransfer.permission[lang],
164665
- data: ((_m = (_l = (_k = (_j = config === null || config === void 0 ? void 0 : config.customUi) === null || _j === void 0 ? void 0 : _j.words) === null || _k === void 0 ? void 0 : _k[lang]) === null || _l === void 0 ? void 0 : _l.signPopup) === null || _m === void 0 ? void 0 : _m.dataToSign) || constant_1.DEFAULT_WORD.dappTransfer.data[lang]
164665
+ permission: ((_m = (_l = (_k = (_j = config === null || config === void 0 ? void 0 : config.customUi) === null || _j === void 0 ? void 0 : _j.words) === null || _k === void 0 ? void 0 : _k[lang]) === null || _l === void 0 ? void 0 : _l.signPopup) === null || _m === void 0 ? void 0 : _m.title) || constant_1.DEFAULT_WORD.dappTransfer.permission[lang],
164666
+ data: ((_r = (_q = (_p = (_o = config === null || config === void 0 ? void 0 : config.customUi) === null || _o === void 0 ? void 0 : _o.words) === null || _p === void 0 ? void 0 : _p[lang]) === null || _q === void 0 ? void 0 : _q.signPopup) === null || _r === void 0 ? void 0 : _r.dataToSign) || constant_1.DEFAULT_WORD.dappTransfer.data[lang]
164666
164667
  },
164667
164668
  dappProvider: {
164668
- requestFrom: ((_r = (_q = (_p = (_o = config === null || config === void 0 ? void 0 : config.customUi) === null || _o === void 0 ? void 0 : _o.words) === null || _p === void 0 ? void 0 : _p[lang]) === null || _q === void 0 ? void 0 : _q.signPopup) === null || _r === void 0 ? void 0 : _r.requestFrom) || constant_1.DEFAULT_WORD.dappProvider.requestFrom[lang],
164669
- confirm: ((_v = (_u = (_t = (_s = config === null || config === void 0 ? void 0 : config.customUi) === null || _s === void 0 ? void 0 : _s.words) === null || _t === void 0 ? void 0 : _t[lang]) === null || _u === void 0 ? void 0 : _u.signPopup) === null || _v === void 0 ? void 0 : _v.confirm) || constant_1.DEFAULT_WORD.dappProvider.confirm[lang],
164670
- cancel: ((_z = (_y = (_x = (_w = config === null || config === void 0 ? void 0 : config.customUi) === null || _w === void 0 ? void 0 : _w.words) === null || _x === void 0 ? void 0 : _x[lang]) === null || _y === void 0 ? void 0 : _y.signPopup) === null || _z === void 0 ? void 0 : _z.cancel) || constant_1.DEFAULT_WORD.dappProvider.cancel[lang]
164669
+ requestFrom: ((_v = (_u = (_t = (_s = config === null || config === void 0 ? void 0 : config.customUi) === null || _s === void 0 ? void 0 : _s.words) === null || _t === void 0 ? void 0 : _t[lang]) === null || _u === void 0 ? void 0 : _u.signPopup) === null || _v === void 0 ? void 0 : _v.requestFrom) || constant_1.DEFAULT_WORD.dappProvider.requestFrom[lang],
164670
+ confirm: ((_z = (_y = (_x = (_w = config === null || config === void 0 ? void 0 : config.customUi) === null || _w === void 0 ? void 0 : _w.words) === null || _x === void 0 ? void 0 : _x[lang]) === null || _y === void 0 ? void 0 : _y.signPopup) === null || _z === void 0 ? void 0 : _z.confirm) || constant_1.DEFAULT_WORD.dappProvider.confirm[lang],
164671
+ cancel: ((_3 = (_2 = (_1 = (_0 = config === null || config === void 0 ? void 0 : config.customUi) === null || _0 === void 0 ? void 0 : _0.words) === null || _1 === void 0 ? void 0 : _1[lang]) === null || _2 === void 0 ? void 0 : _2.signPopup) === null || _3 === void 0 ? void 0 : _3.cancel) || constant_1.DEFAULT_WORD.dappProvider.cancel[lang]
164671
164672
  },
164672
164673
  dappCreateTkey: {
164673
164674
  linkDesc1: tkeyDesc[lang],
@@ -164869,6 +164870,10 @@ exports.AUTH0_TORUS_CONFIG_KEY = 'startrail-auth0-email-password';
164869
164870
  exports.COMPRESSION_ALGORITHM = 'gzip';
164870
164871
  exports.DEFAULT_WORD = {
164871
164872
  dappLogin: {
164873
+ continueWith: {
164874
+ ja: '前回の{verifier}アカウントを使う',
164875
+ en: 'Continue with existing {verifier}'
164876
+ },
164872
164877
  subtitle: {
164873
164878
  ja: 'でデジタルウォレット',
164874
164879
  en: 'Your digital wallet with'
@@ -164915,7 +164920,8 @@ exports.EMAIL_BUTTON = {
164915
164920
  };
164916
164921
  exports.ERROR_FROM = 'StartrailSdk';
164917
164922
  exports.ERROR_MESSAGE = {
164918
- AUTH0_VERIFY_EMAIL: 'Please verify your email before logging in',
164923
+ AUTH0_AFTER_SIGNUP: 'error: startrail custom: Please verify your email before logging in',
164924
+ AUTH0_VERIFY_EMAIL: 'startrail custom',
164919
164925
  TORUS_ALREADY_INITIALIZED: 'Already initialized',
164920
164926
  TORUS_CACHE_CONTROL_HEADERS_UNMATCH: 'Unexpected Cache-Control headers, got',
164921
164927
  TORUS_INTEGRITY_UNMATCH: 'Integrity check failed',
@@ -165034,7 +165040,9 @@ class CustomError {
165034
165040
  throw new ErrorClass.TORUS_USER_REJECT_WALLET_REQUEST(this.err);
165035
165041
  case argument === util_1.trimStringWord(constant_1.ERROR_MESSAGE.TORUS_ALREADY_INITIALIZED):
165036
165042
  throw new ErrorClass.TORUS_ALREADY_INITIALIZED(this.err);
165037
- case argument === util_1.trimStringWord(constant_1.ERROR_MESSAGE.AUTH0_VERIFY_EMAIL):
165043
+ case argument.startsWith(`error:${util_1.trimStringWord(constant_1.ERROR_MESSAGE.AUTH0_VERIFY_EMAIL)}`):
165044
+ throw new ErrorClass.Auth0VerifyEmail(this.err);
165045
+ case argument.startsWith(util_1.trimStringWord('No Accounts available')):
165038
165046
  throw new ErrorClass.Auth0VerifyEmail(this.err);
165039
165047
  case argument === util_1.trimStringWord(constant_1.ERROR_MESSAGE.TORUS_INTEGRITY_UNMATCH):
165040
165048
  throw new ErrorClass.TORUS_INTEGRITY_UNMATCH(this.err);
@@ -165078,6 +165086,7 @@ class StartrailSdkErrorBase extends Error {
165078
165086
  }
165079
165087
  class Auth0VerifyEmail extends StartrailSdkErrorBase {
165080
165088
  constructor(err) {
165089
+ err.message = 'Please verify your email before logging in.';
165081
165090
  super(err.message);
165082
165091
  this.errorCode = constant_1.StartrailSdkErrorCodeEnum.AUTH0_VERIFY_EMAIL;
165083
165092
  this.property = { message: err.message };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@startbahn/startrail-sdk-js",
3
- "version": "1.23.0-beta.5",
3
+ "version": "1.23.3",
4
4
  "description": "Startrail Api for JS SDK",
5
5
  "main": "dist/startrail-sdk.js",
6
6
  "unpkg": "dist/startrail-sdk.js",
@@ -286,6 +286,7 @@ declare module '@startbahn/startrail-sdk-js/types' {
286
286
  titleSignup: string;
287
287
  };
288
288
  modal?: {
289
+ continueLogin: string;
289
290
  termsConditions?: string;
290
291
  termsConditionsLinkUrl?: string;
291
292
  };
@@ -814,6 +815,10 @@ declare module '@startbahn/startrail-sdk-js/constant' {
814
815
  export const COMPRESSION_ALGORITHM = "gzip";
815
816
  export const DEFAULT_WORD: {
816
817
  dappLogin: {
818
+ continueWith: {
819
+ ja: string;
820
+ en: string;
821
+ };
817
822
  subtitle: {
818
823
  ja: string;
819
824
  en: string;
@@ -860,6 +865,7 @@ declare module '@startbahn/startrail-sdk-js/constant' {
860
865
  };
861
866
  export const ERROR_FROM = "StartrailSdk";
862
867
  export const ERROR_MESSAGE: {
868
+ AUTH0_AFTER_SIGNUP: string;
863
869
  AUTH0_VERIFY_EMAIL: string;
864
870
  TORUS_ALREADY_INITIALIZED: string;
865
871
  TORUS_CACHE_CONTROL_HEADERS_UNMATCH: string;