@sendoracloud/sdk-react-native 0.10.0 → 0.10.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
@@ -200,11 +200,14 @@ function isAuthApiResponse(v) {
200
200
  const user = r.user;
201
201
  const tokens = r.tokens;
202
202
  if (!user || typeof user.id !== "string" || user.id.length === 0) return false;
203
- if (typeof user.isAnonymous !== "boolean") return false;
204
203
  if (!tokens) return false;
205
204
  if (typeof tokens.accessToken !== "string" || tokens.accessToken.length === 0) return false;
206
205
  if (typeof tokens.refreshToken !== "string" || tokens.refreshToken.length === 0) return false;
207
206
  if (typeof tokens.expiresIn !== "number" || tokens.expiresIn <= 0) return false;
207
+ if (user.isAnonymous !== void 0 && typeof user.isAnonymous !== "boolean") return false;
208
+ if (user.email !== void 0 && user.email !== null && typeof user.email !== "string") return false;
209
+ if (user.emailVerified !== void 0 && typeof user.emailVerified !== "boolean") return false;
210
+ if (user.name !== void 0 && user.name !== null && typeof user.name !== "string") return false;
208
211
  return true;
209
212
  }
210
213
  var EmailAlreadyTakenError = class extends Error {
@@ -767,7 +770,7 @@ function decodeJwtPayload(token) {
767
770
  }
768
771
 
769
772
  // src/index.ts
770
- var SDK_VERSION = "0.10.0";
773
+ var SDK_VERSION = "0.10.1";
771
774
  var DEFAULT_API_URL = "https://api.sendoracloud.com";
772
775
  var ANON_KEY = "anon_id";
773
776
  var USER_ID_KEY = "user_id";
package/dist/index.js CHANGED
@@ -160,11 +160,14 @@ function isAuthApiResponse(v) {
160
160
  const user = r.user;
161
161
  const tokens = r.tokens;
162
162
  if (!user || typeof user.id !== "string" || user.id.length === 0) return false;
163
- if (typeof user.isAnonymous !== "boolean") return false;
164
163
  if (!tokens) return false;
165
164
  if (typeof tokens.accessToken !== "string" || tokens.accessToken.length === 0) return false;
166
165
  if (typeof tokens.refreshToken !== "string" || tokens.refreshToken.length === 0) return false;
167
166
  if (typeof tokens.expiresIn !== "number" || tokens.expiresIn <= 0) return false;
167
+ if (user.isAnonymous !== void 0 && typeof user.isAnonymous !== "boolean") return false;
168
+ if (user.email !== void 0 && user.email !== null && typeof user.email !== "string") return false;
169
+ if (user.emailVerified !== void 0 && typeof user.emailVerified !== "boolean") return false;
170
+ if (user.name !== void 0 && user.name !== null && typeof user.name !== "string") return false;
168
171
  return true;
169
172
  }
170
173
  var EmailAlreadyTakenError = class extends Error {
@@ -727,7 +730,7 @@ function decodeJwtPayload(token) {
727
730
  }
728
731
 
729
732
  // src/index.ts
730
- var SDK_VERSION = "0.10.0";
733
+ var SDK_VERSION = "0.10.1";
731
734
  var DEFAULT_API_URL = "https://api.sendoracloud.com";
732
735
  var ANON_KEY = "anon_id";
733
736
  var USER_ID_KEY = "user_id";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sendoracloud/sdk-react-native",
3
- "version": "0.10.0",
3
+ "version": "0.10.1",
4
4
  "description": "Sendora Cloud React Native + Expo SDK — analytics, identity, push-token registration, auth. Expo Go compatible, no native modules beyond AsyncStorage.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",