Skip to content

Commit f885090

Browse files
committed
6.2.0
1 parent cc4f0db commit f885090

File tree

3 files changed

+72
-3
lines changed

3 files changed

+72
-3
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog of `@reason-react-native/keychain`
22

3+
## 6.2.0 - 2020-11-06
4+
5+
6.2.0 compat (but imcomplete)
6+
rescript 8.2 compat
7+
38
## 3.1.0 - 2020-01-29
49

510
Initial release

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"name": "@reason-react-native/keychain",
3-
"version": "3.1.0",
3+
"version": "6.2.0",
44
"description": "ReScript / Reason bindings for react-native-keychain",
55
"publishConfig": {
66
"access": "public"
77
},
88
"peerDependencies": {
9-
"react-native-keychain": ">=3.1.3"
9+
"react-native-keychain": "^6.2.0"
1010
},
1111
"author": "Christoph Knittel <ck@cca.io>",
1212
"repository": "https://github.com/reason-react-native/keychain.git",

src/ReactNativeKeychain.re

Lines changed: 65 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,28 @@ let decodeGetGenericPasswordResult = (result: getGenericPasswordResult) => {
103103
);
104104
};
105105

106+
type authenticationPrompt = {
107+
title: string,
108+
subtitle: option(string),
109+
description: option(string),
110+
cancel: option(string),
111+
};
112+
113+
[@bs.obj]
114+
external authenticationPrompt:
115+
(
116+
~title: string,
117+
~subtitle: option(string)=?,
118+
~description: option(string)=?,
119+
~cancel: option(string)=?,
120+
unit
121+
) =>
122+
authenticationPrompt;
123+
106124
type getGenericPasswordOptions;
107125
[@bs.obj]
108126
external getGenericPasswordOptions:
109-
(~authenticationPrompt: string=?, ~service: string=?, unit) =>
127+
(~authenticationPrompt: authenticationPrompt, ~service: string=?, unit) =>
110128
getGenericPasswordOptions;
111129

112130
[@bs.module "react-native-keychain"]
@@ -178,3 +196,49 @@ external resetGenericPasswordWithOptions:
178196
[@bs.module "react-native-keychain"]
179197
external resetGenericPasswordWithService: string => Js.Promise.t(bool) =
180198
"resetGenericPassword";
199+
/*
200+
@todo handle false | Result for promise
201+
202+
[@bs.module "react-native-keychain"]
203+
external hasInternetCredentials: string => Js.Promise.t(bool) =
204+
"hasInternetCredentials";
205+
206+
type setInternetCredentialsOptions;
207+
[@bs.obj]
208+
external setInternetCredentialsOptions:
209+
(
210+
~accessControl: AccessControl.t=?,
211+
~accessGroup: string=?,
212+
~accessible: Accessible.t=?,
213+
~securityLevel: SecurityLevel.t=?,
214+
unit
215+
) =>
216+
setInternetCredentialsOptions;
217+
218+
type internetCredentials = {
219+
username: string,
220+
password: string,
221+
service: string,
222+
storage: string,
223+
};
224+
[@bs.module "react-native-keychain"]
225+
external setInternetCredentials:
226+
(string, string, string, option(setInternetCredentialsOptions)) =>
227+
Js.Promise.t(internetCredentials) =
228+
"setInternetCredentials";
229+
230+
type getInternetCredentialsOptions = {authenticationPrompt};
231+
[@bs.obj]
232+
external getInternetCredentialsOptions:
233+
(~authenticationPrompt: authenticationPrompt=?, unit) =>
234+
getInternetCredentialsOptions;
235+
236+
[@bs.module "react-native-keychain"]
237+
external getInternetCredentials:
238+
(string, option(getInternetCredentialsOptions)) => Js.Promise.t(unit) =
239+
"getInternetCredentials";
240+
241+
[@bs.module "react-native-keychain"]
242+
external resetInternetCredentials: string => Js.Promise.t(unit) =
243+
"resetInternetCredentials";
244+
*/

0 commit comments

Comments
 (0)