@react-native-kakao/user 1.0.3 → 1.0.4
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.
|
@@ -18,6 +18,7 @@ import net.mjstudio.rnkakao.core.util.RNCKakaoUtil
|
|
|
18
18
|
import net.mjstudio.rnkakao.core.util.argArr
|
|
19
19
|
import net.mjstudio.rnkakao.core.util.argMap
|
|
20
20
|
import net.mjstudio.rnkakao.core.util.filterIsInstance
|
|
21
|
+
import net.mjstudio.rnkakao.core.util.onMain
|
|
21
22
|
import net.mjstudio.rnkakao.core.util.pushMapList
|
|
22
23
|
import net.mjstudio.rnkakao.core.util.pushStringList
|
|
23
24
|
import net.mjstudio.rnkakao.core.util.putBooleanIfNotNull
|
|
@@ -40,11 +41,11 @@ class RNCKakaoUserModule internal constructor(context: ReactApplicationContext)
|
|
|
40
41
|
useKakaoAccountLogin: Boolean,
|
|
41
42
|
scopes: ReadableArray?,
|
|
42
43
|
promise: Promise
|
|
43
|
-
) {
|
|
44
|
+
) = onMain {
|
|
44
45
|
val context = currentActivity
|
|
45
46
|
if (context == null) {
|
|
46
47
|
promise.rejectWith(ActivityNotFoundException())
|
|
47
|
-
return
|
|
48
|
+
return@onMain
|
|
48
49
|
}
|
|
49
50
|
val callback: (OAuthToken?, Throwable?) -> Unit = { token, error ->
|
|
50
51
|
if (error != null) {
|
|
@@ -110,12 +111,12 @@ class RNCKakaoUserModule internal constructor(context: ReactApplicationContext)
|
|
|
110
111
|
}
|
|
111
112
|
|
|
112
113
|
@ReactMethod
|
|
113
|
-
override fun isKakaoTalkLoginAvailable(promise: Promise) {
|
|
114
|
+
override fun isKakaoTalkLoginAvailable(promise: Promise) = onMain {
|
|
114
115
|
promise.resolve(UserApiClient.instance.isKakaoTalkLoginAvailable(reactApplicationContext))
|
|
115
116
|
}
|
|
116
117
|
|
|
117
118
|
@ReactMethod
|
|
118
|
-
override fun logout(promise: Promise) {
|
|
119
|
+
override fun logout(promise: Promise) = onMain {
|
|
119
120
|
UserApiClient.instance.logout {
|
|
120
121
|
if (it != null) {
|
|
121
122
|
promise.rejectWith(it)
|
|
@@ -126,7 +127,7 @@ class RNCKakaoUserModule internal constructor(context: ReactApplicationContext)
|
|
|
126
127
|
}
|
|
127
128
|
|
|
128
129
|
@ReactMethod
|
|
129
|
-
override fun unlink(promise: Promise) {
|
|
130
|
+
override fun unlink(promise: Promise) = onMain {
|
|
130
131
|
UserApiClient.instance.unlink {
|
|
131
132
|
if (it != null) {
|
|
132
133
|
promise.rejectWith(it)
|
|
@@ -137,7 +138,7 @@ class RNCKakaoUserModule internal constructor(context: ReactApplicationContext)
|
|
|
137
138
|
}
|
|
138
139
|
|
|
139
140
|
@ReactMethod
|
|
140
|
-
override fun isLogined(promise: Promise) {
|
|
141
|
+
override fun isLogined(promise: Promise) = onMain {
|
|
141
142
|
if (AuthApiClient.instance.hasToken()) {
|
|
142
143
|
UserApiClient.instance.accessTokenInfo { _, error ->
|
|
143
144
|
if (error != null) {
|
|
@@ -156,7 +157,7 @@ class RNCKakaoUserModule internal constructor(context: ReactApplicationContext)
|
|
|
156
157
|
}
|
|
157
158
|
|
|
158
159
|
@ReactMethod
|
|
159
|
-
override fun scopes(scopes: ReadableArray?, promise: Promise) {
|
|
160
|
+
override fun scopes(scopes: ReadableArray?, promise: Promise) = onMain {
|
|
160
161
|
UserApiClient.instance.scopes { scopeInfo, error ->
|
|
161
162
|
if (error != null) {
|
|
162
163
|
promise.rejectWith(error)
|
|
@@ -181,7 +182,7 @@ class RNCKakaoUserModule internal constructor(context: ReactApplicationContext)
|
|
|
181
182
|
}
|
|
182
183
|
|
|
183
184
|
@ReactMethod
|
|
184
|
-
override fun revokeScopes(scopes: ReadableArray, promise: Promise) {
|
|
185
|
+
override fun revokeScopes(scopes: ReadableArray, promise: Promise) = onMain {
|
|
185
186
|
UserApiClient.instance.revokeScopes(
|
|
186
187
|
scopes = scopes.filterIsInstance<String>()
|
|
187
188
|
) { scopeInfo, error ->
|
|
@@ -196,7 +197,7 @@ class RNCKakaoUserModule internal constructor(context: ReactApplicationContext)
|
|
|
196
197
|
}
|
|
197
198
|
|
|
198
199
|
@ReactMethod
|
|
199
|
-
override fun serviceTerms(promise: Promise) {
|
|
200
|
+
override fun serviceTerms(promise: Promise) = onMain {
|
|
200
201
|
UserApiClient.instance.serviceTerms { serviceTerms, error ->
|
|
201
202
|
if (error != null) {
|
|
202
203
|
promise.rejectWith(error)
|
|
@@ -218,7 +219,7 @@ class RNCKakaoUserModule internal constructor(context: ReactApplicationContext)
|
|
|
218
219
|
}
|
|
219
220
|
|
|
220
221
|
@ReactMethod
|
|
221
|
-
override fun shippingAddresses(promise: Promise) {
|
|
222
|
+
override fun shippingAddresses(promise: Promise) = onMain {
|
|
222
223
|
UserApiClient.instance.shippingAddresses { addrs, error ->
|
|
223
224
|
if (error != null) {
|
|
224
225
|
promise.rejectWith(error)
|
|
@@ -252,7 +253,7 @@ class RNCKakaoUserModule internal constructor(context: ReactApplicationContext)
|
|
|
252
253
|
}
|
|
253
254
|
|
|
254
255
|
@ReactMethod
|
|
255
|
-
override fun me(promise: Promise) {
|
|
256
|
+
override fun me(promise: Promise) = onMain {
|
|
256
257
|
UserApiClient.instance.me { user, error ->
|
|
257
258
|
if (error != null) {
|
|
258
259
|
promise.rejectWith(error)
|
|
@@ -22,7 +22,9 @@ import RNCKakaoCore
|
|
|
22
22
|
_ resolve: @escaping RCTPromiseResolveBlock,
|
|
23
23
|
reject: @escaping RCTPromiseRejectBlock
|
|
24
24
|
) {
|
|
25
|
-
|
|
25
|
+
onMain {
|
|
26
|
+
resolve(UserApi.isKakaoTalkLoginAvailable())
|
|
27
|
+
}
|
|
26
28
|
}
|
|
27
29
|
|
|
28
30
|
@objc public func login(
|
|
@@ -33,49 +35,51 @@ import RNCKakaoCore
|
|
|
33
35
|
resolve: @escaping RCTPromiseResolveBlock,
|
|
34
36
|
reject: @escaping RCTPromiseRejectBlock
|
|
35
37
|
) {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
38
|
+
onMain { [self] in
|
|
39
|
+
guard let _ = try? KakaoSDK.shared.appKey() else {
|
|
40
|
+
RNCKakaoUtil.reject(reject, "KakaoSdk is not initialized")
|
|
41
|
+
return
|
|
42
|
+
}
|
|
43
|
+
let callback = { (token: OAuthToken?, error: Error?) in
|
|
44
|
+
if let error {
|
|
45
|
+
RNCKakaoUtil.reject(reject, error)
|
|
46
|
+
} else if let token {
|
|
47
|
+
resolve([
|
|
48
|
+
"accessToken": token.accessToken,
|
|
49
|
+
"refreshToken": token.refreshToken,
|
|
50
|
+
"tokenType": token.tokenType,
|
|
51
|
+
"idToken": token.idToken as Any,
|
|
52
|
+
"accessTokenExpiresAt": token.expiredAt.timeIntervalSince1970,
|
|
53
|
+
"refreshTokenExpiresAt": token.refreshTokenExpiredAt.timeIntervalSince1970,
|
|
54
|
+
"accessTokenExpiresIn": token.expiresIn,
|
|
55
|
+
"refreshTokenExpiresIn": token.refreshTokenExpiresIn,
|
|
56
|
+
"scopes": token.scopes ?? []
|
|
57
|
+
])
|
|
58
|
+
} else {
|
|
59
|
+
RNCKakaoUtil.reject(reject, "token not found")
|
|
60
|
+
}
|
|
57
61
|
}
|
|
58
|
-
}
|
|
59
62
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
63
|
+
if !scopes.isEmpty {
|
|
64
|
+
UserApi.shared.loginWithKakaoAccount(scopes: scopes, completion: callback)
|
|
65
|
+
} else if UserApi.isKakaoTalkLoginAvailable(), !useKakaoAccountLogin {
|
|
66
|
+
UserApi.shared
|
|
67
|
+
.loginWithKakaoTalk(serviceTerms: emptyArrayToNil(serviceTerms), completion: callback)
|
|
68
|
+
} else {
|
|
69
|
+
var _prompts: [Prompt] = []
|
|
70
|
+
prompts.forEach { p in
|
|
71
|
+
if p == "Login" { _prompts.append(.Login) }
|
|
72
|
+
if p == "Cert" { _prompts.append(.Cert) }
|
|
73
|
+
if p == "Create" { _prompts.append(.Create) }
|
|
74
|
+
if p == "UnifyDaum" { _prompts.append(.UnifyDaum) }
|
|
75
|
+
}
|
|
76
|
+
UserApi.shared
|
|
77
|
+
.loginWithKakaoAccount(
|
|
78
|
+
prompts: emptyArrayToNil(_prompts),
|
|
79
|
+
serviceTerms: emptyArrayToNil(serviceTerms),
|
|
80
|
+
completion: callback
|
|
81
|
+
)
|
|
72
82
|
}
|
|
73
|
-
UserApi.shared
|
|
74
|
-
.loginWithKakaoAccount(
|
|
75
|
-
prompts: emptyArrayToNil(_prompts),
|
|
76
|
-
serviceTerms: emptyArrayToNil(serviceTerms),
|
|
77
|
-
completion: callback
|
|
78
|
-
)
|
|
79
83
|
}
|
|
80
84
|
}
|
|
81
85
|
|
|
@@ -83,11 +87,13 @@ import RNCKakaoCore
|
|
|
83
87
|
_ resolve: @escaping RCTPromiseResolveBlock,
|
|
84
88
|
reject: @escaping RCTPromiseRejectBlock
|
|
85
89
|
) {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
90
|
+
onMain {
|
|
91
|
+
UserApi.shared.logout { error in
|
|
92
|
+
if let error {
|
|
93
|
+
RNCKakaoUtil.reject(reject, error)
|
|
94
|
+
} else {
|
|
95
|
+
resolve(42)
|
|
96
|
+
}
|
|
91
97
|
}
|
|
92
98
|
}
|
|
93
99
|
}
|
|
@@ -96,11 +102,13 @@ import RNCKakaoCore
|
|
|
96
102
|
_ resolve: @escaping RCTPromiseResolveBlock,
|
|
97
103
|
reject: @escaping RCTPromiseRejectBlock
|
|
98
104
|
) {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
105
|
+
onMain {
|
|
106
|
+
UserApi.shared.unlink { error in
|
|
107
|
+
if let error {
|
|
108
|
+
RNCKakaoUtil.reject(reject, error)
|
|
109
|
+
} else {
|
|
110
|
+
resolve(nil)
|
|
111
|
+
}
|
|
104
112
|
}
|
|
105
113
|
}
|
|
106
114
|
}
|
|
@@ -109,20 +117,22 @@ import RNCKakaoCore
|
|
|
109
117
|
_ resolve: @escaping RCTPromiseResolveBlock,
|
|
110
118
|
reject: @escaping RCTPromiseRejectBlock
|
|
111
119
|
) {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
if let
|
|
116
|
-
|
|
120
|
+
onMain {
|
|
121
|
+
if AuthApi.hasToken() {
|
|
122
|
+
UserApi.shared.accessTokenInfo { _, error in
|
|
123
|
+
if let error {
|
|
124
|
+
if let sdkError = error as? SdkError, sdkError.isInvalidTokenError() == true {
|
|
125
|
+
resolve(false)
|
|
126
|
+
} else {
|
|
127
|
+
RNCKakaoUtil.reject(reject, error)
|
|
128
|
+
}
|
|
117
129
|
} else {
|
|
118
|
-
|
|
130
|
+
resolve(true)
|
|
119
131
|
}
|
|
120
|
-
} else {
|
|
121
|
-
resolve(true)
|
|
122
132
|
}
|
|
133
|
+
} else {
|
|
134
|
+
resolve(false)
|
|
123
135
|
}
|
|
124
|
-
} else {
|
|
125
|
-
resolve(false)
|
|
126
136
|
}
|
|
127
137
|
}
|
|
128
138
|
|
|
@@ -131,23 +141,25 @@ import RNCKakaoCore
|
|
|
131
141
|
resolve: @escaping RCTPromiseResolveBlock,
|
|
132
142
|
reject: @escaping RCTPromiseRejectBlock
|
|
133
143
|
) {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
144
|
+
onMain { [self] in
|
|
145
|
+
UserApi.shared.scopes(scopes: emptyArrayToNil(scopes)) { scopeInfo, error in
|
|
146
|
+
if let error {
|
|
147
|
+
RNCKakaoUtil.reject(reject, error)
|
|
148
|
+
} else if let scopes = scopeInfo?.scopes {
|
|
149
|
+
resolve(scopes.map { s in
|
|
150
|
+
[
|
|
151
|
+
"id": s.id,
|
|
152
|
+
"displayName": s.displayName,
|
|
153
|
+
"type": s.type.rawValue,
|
|
154
|
+
"using": s.using,
|
|
155
|
+
"delegated": s.delegated as Any,
|
|
156
|
+
"agreed": s.agreed,
|
|
157
|
+
"revocable": s.revocable as Any
|
|
158
|
+
]
|
|
159
|
+
})
|
|
160
|
+
} else {
|
|
161
|
+
RNCKakaoUtil.reject(reject, "scopes not found")
|
|
162
|
+
}
|
|
151
163
|
}
|
|
152
164
|
}
|
|
153
165
|
}
|
|
@@ -157,13 +169,15 @@ import RNCKakaoCore
|
|
|
157
169
|
resolve: @escaping RCTPromiseResolveBlock,
|
|
158
170
|
reject: @escaping RCTPromiseRejectBlock
|
|
159
171
|
) {
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
172
|
+
onMain {
|
|
173
|
+
UserApi.shared.revokeScopes(scopes: scopes) { info, error in
|
|
174
|
+
if let error {
|
|
175
|
+
RNCKakaoUtil.reject(reject, error)
|
|
176
|
+
} else if info != nil {
|
|
177
|
+
resolve(42)
|
|
178
|
+
} else {
|
|
179
|
+
RNCKakaoUtil.reject(reject, "scopeInfo not found")
|
|
180
|
+
}
|
|
167
181
|
}
|
|
168
182
|
}
|
|
169
183
|
}
|
|
@@ -172,29 +186,31 @@ import RNCKakaoCore
|
|
|
172
186
|
_ resolve: @escaping RCTPromiseResolveBlock,
|
|
173
187
|
reject: @escaping RCTPromiseRejectBlock
|
|
174
188
|
) {
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
189
|
+
onMain {
|
|
190
|
+
UserApi.shared.serviceTerms { serviceTerms, error in
|
|
191
|
+
if let error {
|
|
192
|
+
RNCKakaoUtil.reject(reject, error)
|
|
193
|
+
} else if let serviceTerms {
|
|
194
|
+
resolve(
|
|
195
|
+
[
|
|
196
|
+
"allowedServiceTerms": serviceTerms.allowedServiceTerms?.map {
|
|
197
|
+
[
|
|
198
|
+
"tag": $0.tag,
|
|
199
|
+
"agreedAt": $0.agreedAt.timeIntervalSince1970
|
|
200
|
+
]
|
|
201
|
+
},
|
|
202
|
+
"appServiceTerms": serviceTerms.appServiceTerms?.map {
|
|
203
|
+
[
|
|
204
|
+
"tag": $0.tag,
|
|
205
|
+
"createdAt": $0.createdAt.timeIntervalSince1970,
|
|
206
|
+
"updatedAt": $0.updatedAt.timeIntervalSince1970
|
|
207
|
+
]
|
|
208
|
+
}
|
|
209
|
+
]
|
|
210
|
+
)
|
|
211
|
+
} else {
|
|
212
|
+
RNCKakaoUtil.reject(reject, "serviceTerms not found")
|
|
213
|
+
}
|
|
198
214
|
}
|
|
199
215
|
}
|
|
200
216
|
}
|
|
@@ -203,32 +219,34 @@ import RNCKakaoCore
|
|
|
203
219
|
_ resolve: @escaping RCTPromiseResolveBlock,
|
|
204
220
|
reject: @escaping RCTPromiseRejectBlock
|
|
205
221
|
) {
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
222
|
+
onMain {
|
|
223
|
+
UserApi.shared.shippingAddresses { s, error in
|
|
224
|
+
if let error {
|
|
225
|
+
RNCKakaoUtil.reject(reject, error)
|
|
226
|
+
} else if let s {
|
|
227
|
+
resolve([
|
|
228
|
+
"userId": s.userId as Any,
|
|
229
|
+
"needsAgreement": s.needsAgreement as Any,
|
|
230
|
+
"shippingAddresses": s.shippingAddresses?.map {
|
|
231
|
+
[
|
|
232
|
+
"id": $0.id,
|
|
233
|
+
"name": $0.name as Any,
|
|
234
|
+
"isDefault": $0.isDefault,
|
|
235
|
+
"updatedAt": $0.updatedAt?.timeIntervalSince1970 as Any,
|
|
236
|
+
"type": $0.type?.rawValue as Any,
|
|
237
|
+
"baseAddress": $0.baseAddress as Any,
|
|
238
|
+
"detailAddress": $0.detailAddress as Any,
|
|
239
|
+
"receiverName": $0.receiverName as Any,
|
|
240
|
+
"receiverPhoneNumber1": $0.receiverPhoneNumber1 as Any,
|
|
241
|
+
"receiverPhoneNumber2": $0.receiverPhoneNumber2 as Any,
|
|
242
|
+
"zoneNumber": $0.zoneNumber as Any,
|
|
243
|
+
"zipCode": $0.zipCode as Any
|
|
244
|
+
]
|
|
245
|
+
} ?? []
|
|
246
|
+
])
|
|
247
|
+
} else {
|
|
248
|
+
RNCKakaoUtil.reject(reject, "shipping addresses not found")
|
|
249
|
+
}
|
|
232
250
|
}
|
|
233
251
|
}
|
|
234
252
|
}
|
|
@@ -237,42 +255,46 @@ import RNCKakaoCore
|
|
|
237
255
|
_ resolve: @escaping RCTPromiseResolveBlock,
|
|
238
256
|
reject: @escaping RCTPromiseRejectBlock
|
|
239
257
|
) {
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
258
|
+
onMain {
|
|
259
|
+
UserApi.shared.me { user, error in
|
|
260
|
+
if let error {
|
|
261
|
+
RNCKakaoUtil.reject(reject, error)
|
|
262
|
+
} else if let user {
|
|
263
|
+
resolve([
|
|
264
|
+
"id": user.id as Any,
|
|
265
|
+
"name": user.kakaoAccount?.name as Any,
|
|
266
|
+
"email": user.kakaoAccount?.email as Any,
|
|
267
|
+
"nickname": user.kakaoAccount?.profile?.nickname as Any,
|
|
268
|
+
"profileImageUrl": user.kakaoAccount?.profile?.profileImageUrl?.absoluteString as Any,
|
|
269
|
+
"thumbnailImageUrl": user.kakaoAccount?.profile?.thumbnailImageUrl?
|
|
270
|
+
.absoluteString as Any,
|
|
271
|
+
"phoneNumber": user.kakaoAccount?.phoneNumber as Any,
|
|
272
|
+
"ageRange": user.kakaoAccount?.ageRange?.rawValue as Any,
|
|
273
|
+
"birthday": user.kakaoAccount?.birthday as Any,
|
|
274
|
+
"birthdayType": user.kakaoAccount?.birthdayType as Any,
|
|
275
|
+
"birthyear": user.kakaoAccount?.birthyear as Any,
|
|
276
|
+
"gender": user.kakaoAccount?.gender?.rawValue as Any,
|
|
277
|
+
"isEmailValid": user.kakaoAccount?.isEmailValid as Any,
|
|
278
|
+
"isEmailVerified": user.kakaoAccount?.isEmailVerified as Any,
|
|
279
|
+
"isKorean": user.kakaoAccount?.isKorean as Any,
|
|
280
|
+
"ageRangeNeedsAgreement": user.kakaoAccount?.ageRangeNeedsAgreement as Any,
|
|
281
|
+
"birthdayNeedsAgreement": user.kakaoAccount?.birthdayNeedsAgreement as Any,
|
|
282
|
+
"birthyearNeedsAgreement": user.kakaoAccount?.birthyearNeedsAgreement as Any,
|
|
283
|
+
"emailNeedsAgreement": user.kakaoAccount?.emailNeedsAgreement as Any,
|
|
284
|
+
"genderNeedsAgreement": user.kakaoAccount?.genderNeedsAgreement as Any,
|
|
285
|
+
"isKoreanNeedsAgreement": user.kakaoAccount?.isKoreanNeedsAgreement as Any,
|
|
286
|
+
"phoneNumberNeedsAgreement": user.kakaoAccount?.phoneNumberNeedsAgreement as Any,
|
|
287
|
+
"profileNeedsAgreement": user.kakaoAccount?.profileNeedsAgreement as Any,
|
|
288
|
+
"ciNeedsAgreement": user.kakaoAccount?.ciNeedsAgreement as Any,
|
|
289
|
+
"nameNeedsAgreement": user.kakaoAccount?.nameNeedsAgreement as Any,
|
|
290
|
+
"profileImageNeedsAgreement": user.kakaoAccount?.profileImageNeedsAgreement as Any,
|
|
291
|
+
"profileNicknameNeedsAgreement": user.kakaoAccount?
|
|
292
|
+
.profileNicknameNeedsAgreement as Any,
|
|
293
|
+
"legalBirthDateNeedsAgreement": user.kakaoAccount?.legalBirthDateNeedsAgreement as Any
|
|
294
|
+
])
|
|
295
|
+
} else {
|
|
296
|
+
RNCKakaoUtil.reject(reject, "user not found")
|
|
297
|
+
}
|
|
276
298
|
}
|
|
277
299
|
}
|
|
278
300
|
}
|
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.0.
|
|
4
|
+
"version": "1.0.4",
|
|
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.0.
|
|
65
|
+
"@react-native-kakao/core": "^1.0.4",
|
|
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.0.
|
|
77
|
+
"@react-native-kakao/core": "^1.0.4",
|
|
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": "
|
|
113
|
+
"gitHead": "e50a806a701e689981bde39e4429a17a923490da",
|
|
114
114
|
"dependencies": {
|
|
115
115
|
"@mj-studio/js-util": "^1.0.34"
|
|
116
116
|
}
|