@@ -286,6 +286,37 @@ jsi::Value storeSetDefaultProfile(jsi::Runtime &rt, jsi::Object options) {
286286 return createReturnValue (rt, code, nullptr );
287287}
288288
289+ jsi::Value storeRenameProfile (jsi::Runtime &rt, jsi::Object options) {
290+ auto storeHandle = jsiToValue<int64_t >(rt, options, " storeHandle" );
291+ auto fromProfile = jsiToValue<std::string>(rt, options, " fromProfile" );
292+ auto toProfile = jsiToValue<std::string>(rt, options, " toProfile" );
293+
294+ jsi::Function cb = options.getPropertyAsFunction (rt, " cb" );
295+ State *state = new State (&cb);
296+ state->rt = &rt;
297+
298+ ErrorCode code = askar_store_rename_profile (
299+ storeHandle, fromProfile.c_str (), toProfile.c_str (), callbackWithResponse, CallbackId (state));
300+
301+ return createReturnValue (rt, code, nullptr );
302+ }
303+
304+ jsi::Value storeCopyProfile (jsi::Runtime &rt, jsi::Object options) {
305+ auto fromHandle = jsiToValue<int64_t >(rt, options, " fromHandle" );
306+ auto toHandle = jsiToValue<int64_t >(rt, options, " toHandle" );
307+ auto fromProfile = jsiToValue<std::string>(rt, options, " fromProfile" );
308+ auto toProfile = jsiToValue<std::string>(rt, options, " toProfile" );
309+
310+ jsi::Function cb = options.getPropertyAsFunction (rt, " cb" );
311+ State *state = new State (&cb);
312+ state->rt = &rt;
313+
314+ ErrorCode code = askar_store_copy_profile (
315+ fromHandle, toHandle, fromProfile.c_str (), toProfile.c_str (), callbackWithResponse, CallbackId (state));
316+
317+ return createReturnValue (rt, code, nullptr );
318+ }
319+
289320jsi::Value sessionClose (jsi::Runtime &rt, jsi::Object options) {
290321 auto sessionHandle = jsiToValue<int64_t >(rt, options, " sessionHandle" );
291322 auto commit = jsiToValue<int8_t >(rt, options, " commit" );
0 commit comments