@react-native-kakao/user 1.6.3 → 1.7.0

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
@@ -2,7 +2,7 @@
2
2
  <a href="https://rnkakao.dev">
3
3
  <img width="160px" src="https://raw.githubusercontent.com/mym0404/image-archive/master/202404201234177.webp"><br/>
4
4
  </a>
5
- <h1 align="center">React Native Kakao Core</h1>
5
+ <h1 align="center">React Native Kakao User</h1>
6
6
  <p align="center">
7
7
  <a href="https://www.npmjs.com/package/@react-native-kakao/core"><img src="https://img.shields.io/npm/dm/@react-native-kakao/core.svg?style=flat-square" alt="NPM downloads"></a>
8
8
  <a href="https://www.npmjs.com/package/@react-native-kakao/core"><img src="https://img.shields.io/npm/v/@react-native-kakao/core.svg?style=flat-square" alt="NPM version"></a>
@@ -22,8 +22,8 @@ import net.mjstudio.rnkakao.core.util.filterIsInstance
22
22
  import net.mjstudio.rnkakao.core.util.onMain
23
23
  import net.mjstudio.rnkakao.core.util.pushMapList
24
24
  import net.mjstudio.rnkakao.core.util.pushStringList
25
- import net.mjstudio.rnkakao.core.util.putBooleanIfNotNull
26
- import net.mjstudio.rnkakao.core.util.putDoubleIfNotNull
25
+ import net.mjstudio.rnkakao.core.util.putB
26
+ import net.mjstudio.rnkakao.core.util.putD
27
27
  import net.mjstudio.rnkakao.core.util.rejectWith
28
28
  import net.mjstudio.rnkakao.core.util.unix
29
29
  import java.util.Date
@@ -190,9 +190,9 @@ class RNCKakaoUserModule internal constructor(context: ReactApplicationContext)
190
190
  map.putString("displayName", scope.displayName)
191
191
  map.putString("type", scope.type.name)
192
192
  map.putBoolean("using", scope.using)
193
- map.putBooleanIfNotNull("delegated", scope.delegated)
193
+ map.putB("delegated", scope.delegated)
194
194
  map.putBoolean("agreed", scope.agreed)
195
- map.putBooleanIfNotNull("revocable", scope.revocable)
195
+ map.putB("revocable", scope.revocable)
196
196
  },
197
197
  )
198
198
  }
@@ -234,7 +234,7 @@ class RNCKakaoUserModule internal constructor(context: ReactApplicationContext)
234
234
  serviceTerms.serviceTerms?.map { term ->
235
235
  argMap().apply {
236
236
  putString("tag", term.tag)
237
- putDoubleIfNotNull("agreedAt", term.agreedAt?.unix?.toDouble())
237
+ putD("agreedAt", term.agreedAt?.unix?.toDouble())
238
238
  putBoolean("agreed", term.agreed)
239
239
  putBoolean("required", term.required)
240
240
  putBoolean("revocable", term.revocable)
@@ -257,8 +257,8 @@ class RNCKakaoUserModule internal constructor(context: ReactApplicationContext)
257
257
  } else {
258
258
  promise.resolve(
259
259
  argMap().apply {
260
- putDoubleIfNotNull("userId", addrs.userId?.toDouble())
261
- putBooleanIfNotNull("needsAgreement", addrs.needsAgreement)
260
+ putD("userId", addrs.userId?.toDouble())
261
+ putB("needsAgreement", addrs.needsAgreement)
262
262
  putArray(
263
263
  "shippingAddresses",
264
264
  argArr().apply {
@@ -268,7 +268,7 @@ class RNCKakaoUserModule internal constructor(context: ReactApplicationContext)
268
268
  putDouble("id", addr.id.toDouble())
269
269
  putString("name", addr.name)
270
270
  putBoolean("isDefault", addr.isDefault)
271
- putDoubleIfNotNull("updatedAt", addr.updatedAt?.unix?.toDouble())
271
+ putD("updatedAt", addr.updatedAt?.unix?.toDouble())
272
272
  putString("type", addr.type?.name)
273
273
  putString("baseAddress", addr.baseAddress)
274
274
  putString("detailAddress", addr.detailAddress)
@@ -299,7 +299,7 @@ class RNCKakaoUserModule internal constructor(context: ReactApplicationContext)
299
299
  } else {
300
300
  promise.resolve(
301
301
  argMap().apply {
302
- putDoubleIfNotNull("id", user.id?.toDouble())
302
+ putD("id", user.id?.toDouble())
303
303
  putString("name", user.kakaoAccount?.name)
304
304
 
305
305
  putString("email", user.kakaoAccount?.email)
@@ -312,58 +312,58 @@ class RNCKakaoUserModule internal constructor(context: ReactApplicationContext)
312
312
  putString("birthdayType", user.kakaoAccount?.birthdayType?.name)
313
313
  putString("birthyear", user.kakaoAccount?.birthyear)
314
314
  putString("gender", user.kakaoAccount?.gender?.name)
315
- putBooleanIfNotNull("isEmailValid", user.kakaoAccount?.isEmailValid)
316
- putBooleanIfNotNull("isEmailVerified", user.kakaoAccount?.isEmailVerified)
317
- putBooleanIfNotNull("isKorean", user.kakaoAccount?.isKorean)
318
- putBooleanIfNotNull(
315
+ putB("isEmailValid", user.kakaoAccount?.isEmailValid)
316
+ putB("isEmailVerified", user.kakaoAccount?.isEmailVerified)
317
+ putB("isKorean", user.kakaoAccount?.isKorean)
318
+ putB(
319
319
  "ageRangeNeedsAgreement",
320
320
  user.kakaoAccount?.ageRangeNeedsAgreement,
321
321
  )
322
- putBooleanIfNotNull(
322
+ putB(
323
323
  "birthdayNeedsAgreement",
324
324
  user.kakaoAccount?.birthdayNeedsAgreement,
325
325
  )
326
- putBooleanIfNotNull(
326
+ putB(
327
327
  "birthyearNeedsAgreement",
328
328
  user.kakaoAccount?.birthyearNeedsAgreement,
329
329
  )
330
- putBooleanIfNotNull(
330
+ putB(
331
331
  "emailNeedsAgreement",
332
332
  user.kakaoAccount?.emailNeedsAgreement,
333
333
  )
334
- putBooleanIfNotNull(
334
+ putB(
335
335
  "genderNeedsAgreement",
336
336
  user.kakaoAccount?.genderNeedsAgreement,
337
337
  )
338
- putBooleanIfNotNull(
338
+ putB(
339
339
  "isKoreanNeedsAgreement",
340
340
  user.kakaoAccount?.isKoreanNeedsAgreement,
341
341
  )
342
- putBooleanIfNotNull(
342
+ putB(
343
343
  "phoneNumberNeedsAgreement",
344
344
  user.kakaoAccount?.phoneNumberNeedsAgreement,
345
345
  )
346
- putBooleanIfNotNull(
346
+ putB(
347
347
  "profileNeedsAgreement",
348
348
  user.kakaoAccount?.profileNeedsAgreement,
349
349
  )
350
- putBooleanIfNotNull(
350
+ putB(
351
351
  "ciNeedsAgreement",
352
352
  user.kakaoAccount?.ciNeedsAgreement,
353
353
  )
354
- putBooleanIfNotNull(
354
+ putB(
355
355
  "nameNeedsAgreement",
356
356
  user.kakaoAccount?.nameNeedsAgreement,
357
357
  )
358
- putBooleanIfNotNull(
358
+ putB(
359
359
  "profileImageNeedsAgreement",
360
360
  user.kakaoAccount?.profileImageNeedsAgreement,
361
361
  )
362
- putBooleanIfNotNull(
362
+ putB(
363
363
  "profileNicknameNeedsAgreement",
364
364
  user.kakaoAccount?.profileNicknameNeedsAgreement,
365
365
  )
366
- putBooleanIfNotNull(
366
+ putB(
367
367
  "legalBirthDateNeedsAgreement",
368
368
  user.kakaoAccount?.legalBirthDateNeedsAgreement,
369
369
  )
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@react-native-kakao/user",
3
3
  "description": "React Native Kakao User SDK",
4
- "version": "1.6.3",
4
+ "version": "1.7.0",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
7
7
  "types": "lib/typescript/src/index.d.ts",
@@ -62,7 +62,7 @@
62
62
  "access": "public"
63
63
  },
64
64
  "devDependencies": {
65
- "@react-native-kakao/core": "1.6.3",
65
+ "@react-native-kakao/core": "1.7.0",
66
66
  "@types/invariant": "^2",
67
67
  "@types/jest": "^29.5.5",
68
68
  "@types/react": "^18.2.44",
@@ -74,7 +74,7 @@
74
74
  "typescript": "5.1.6"
75
75
  },
76
76
  "peerDependencies": {
77
- "@react-native-kakao/core": "1.6.3",
77
+ "@react-native-kakao/core": "1.7.0",
78
78
  "react": "*",
79
79
  "react-native": "*"
80
80
  },
@@ -110,7 +110,7 @@
110
110
  "javaPackageName": "net.mjstudio.rnkakao.user"
111
111
  }
112
112
  },
113
- "gitHead": "029e997fe687bb4fde323d468075464d8e7e63d5",
113
+ "gitHead": "33e4f3376565424bbf342612c8dde134386d9e4a",
114
114
  "dependencies": {
115
115
  "@mj-studio/js-util": "^1.0.34"
116
116
  }