@react-native-firebase/storage 25.0.1 → 26.0.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/CHANGELOG.md +25 -0
- package/RNFBStorage.podspec +17 -6
- package/android/build.gradle +23 -0
- package/android/src/main/java/io/invertase/firebase/storage/{ReactNativeFirebaseStorageModule.java → NativeRNFBTurboStorage.java} +72 -131
- package/android/src/main/java/io/invertase/firebase/storage/ReactNativeFirebaseStoragePackage.java +1 -1
- package/android/src/main/java/io/invertase/firebase/storage/generated/java/com/facebook/fbreact/specs/NativeRNFBTurboStorageSpec.java +125 -0
- package/android/src/main/java/io/invertase/firebase/storage/generated/jni/CMakeLists.txt +36 -0
- package/android/src/main/java/io/invertase/firebase/storage/generated/jni/RNFBStorageTurboModules-generated.cpp +116 -0
- package/android/src/main/java/io/invertase/firebase/storage/generated/jni/RNFBStorageTurboModules.h +31 -0
- package/android/src/main/java/io/invertase/firebase/storage/generated/jni/react/renderer/components/RNFBStorageTurboModules/RNFBStorageTurboModulesJSI-generated.cpp +153 -0
- package/android/src/main/java/io/invertase/firebase/storage/generated/jni/react/renderer/components/RNFBStorageTurboModules/RNFBStorageTurboModulesJSI.h +246 -0
- package/dist/module/StorageReference.js +4 -7
- package/dist/module/StorageReference.js.map +1 -1
- package/dist/module/StorageTask.js.map +1 -1
- package/dist/module/index.js +384 -6
- package/dist/module/index.js.map +1 -1
- package/dist/module/types/storage.js +6 -2
- package/dist/module/types/storage.js.map +1 -1
- package/dist/module/version.js +1 -1
- package/dist/module/web/RNFBStorageModule.js +9 -11
- package/dist/module/web/RNFBStorageModule.js.map +1 -1
- package/dist/typescript/lib/StorageReference.d.ts.map +1 -1
- package/dist/typescript/lib/StorageTask.d.ts +7 -8
- package/dist/typescript/lib/StorageTask.d.ts.map +1 -1
- package/dist/typescript/lib/index.d.ts +150 -4
- package/dist/typescript/lib/index.d.ts.map +1 -1
- package/dist/typescript/lib/types/internal.d.ts +5 -5
- package/dist/typescript/lib/types/internal.d.ts.map +1 -1
- package/dist/typescript/lib/types/storage.d.ts +15 -10
- package/dist/typescript/lib/types/storage.d.ts.map +1 -1
- package/dist/typescript/lib/version.d.ts +1 -1
- package/dist/typescript/lib/web/RNFBStorageModule.d.ts +3 -3
- package/dist/typescript/lib/web/RNFBStorageModule.d.ts.map +1 -1
- package/ios/RNFBStorage/RNFBStorageModule.h +2 -2
- package/ios/RNFBStorage/{RNFBStorageModule.m → RNFBStorageModule.mm} +193 -130
- package/ios/RNFBStorage.xcodeproj/project.pbxproj +8 -8
- package/ios/generated/RCTAppDependencyProvider.h +25 -0
- package/ios/generated/RCTAppDependencyProvider.mm +55 -0
- package/ios/generated/RCTModulesConformingToProtocolsProvider.h +18 -0
- package/ios/generated/RCTModulesConformingToProtocolsProvider.mm +33 -0
- package/ios/generated/RCTThirdPartyComponentsProvider.h +16 -0
- package/ios/generated/RCTThirdPartyComponentsProvider.mm +23 -0
- package/ios/generated/RNFBStorageTurboModules/RNFBStorageTurboModules-generated.mm +142 -0
- package/ios/generated/RNFBStorageTurboModules/RNFBStorageTurboModules.h +198 -0
- package/ios/generated/RNFBStorageTurboModulesJSI-generated.cpp +153 -0
- package/ios/generated/RNFBStorageTurboModulesJSI.h +246 -0
- package/ios/generated/ReactAppDependencyProvider.podspec +34 -0
- package/lib/StorageReference.ts +3 -8
- package/lib/StorageTask.ts +13 -15
- package/lib/index.ts +501 -7
- package/lib/types/internal.ts +5 -5
- package/lib/types/storage.ts +17 -10
- package/lib/version.ts +1 -1
- package/lib/web/RNFBStorageModule.ts +10 -12
- package/package.json +22 -4
- package/react-native.config.js +10 -0
- package/specs/NativeRNFBTurboStorage.ts +46 -0
- package/typedoc.json +2 -3
- package/dist/module/modular.js +0 -270
- package/dist/module/modular.js.map +0 -1
- package/dist/module/namespaced.js +0 -192
- package/dist/module/namespaced.js.map +0 -1
- package/dist/module/types/namespaced.js +0 -64
- package/dist/module/types/namespaced.js.map +0 -1
- package/dist/typescript/lib/modular.d.ts +0 -154
- package/dist/typescript/lib/modular.d.ts.map +0 -1
- package/dist/typescript/lib/namespaced.d.ts +0 -12
- package/dist/typescript/lib/namespaced.d.ts.map +0 -1
- package/dist/typescript/lib/types/namespaced.d.ts +0 -1122
- package/dist/typescript/lib/types/namespaced.d.ts.map +0 -1
- package/lib/modular.ts +0 -401
- package/lib/namespaced.ts +0 -264
- package/lib/types/namespaced.ts +0 -1248
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
#import <Foundation/Foundation.h>
|
|
10
|
+
|
|
11
|
+
#if __has_include(<React-RCTAppDelegate/RCTDependencyProvider.h>)
|
|
12
|
+
#import <React-RCTAppDelegate/RCTDependencyProvider.h>
|
|
13
|
+
#elif __has_include(<React_RCTAppDelegate/RCTDependencyProvider.h>)
|
|
14
|
+
#import <React_RCTAppDelegate/RCTDependencyProvider.h>
|
|
15
|
+
#else
|
|
16
|
+
#import "RCTDependencyProvider.h"
|
|
17
|
+
#endif
|
|
18
|
+
|
|
19
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
20
|
+
|
|
21
|
+
@interface RCTAppDependencyProvider : NSObject <RCTDependencyProvider>
|
|
22
|
+
|
|
23
|
+
@end
|
|
24
|
+
|
|
25
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#import "RCTAppDependencyProvider.h"
|
|
9
|
+
#import <ReactCodegen/RCTModulesConformingToProtocolsProvider.h>
|
|
10
|
+
#import <ReactCodegen/RCTThirdPartyComponentsProvider.h>
|
|
11
|
+
|
|
12
|
+
@implementation RCTAppDependencyProvider {
|
|
13
|
+
NSArray<NSString *> * _URLRequestHandlerClassNames;
|
|
14
|
+
NSArray<NSString *> * _imageDataDecoderClassNames;
|
|
15
|
+
NSArray<NSString *> * _imageURLLoaderClassNames;
|
|
16
|
+
NSDictionary<NSString *,Class<RCTComponentViewProtocol>> * _thirdPartyFabricComponents;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
- (nonnull NSArray<NSString *> *)URLRequestHandlerClassNames {
|
|
20
|
+
static dispatch_once_t requestUrlToken;
|
|
21
|
+
dispatch_once(&requestUrlToken, ^{
|
|
22
|
+
self->_URLRequestHandlerClassNames = RCTModulesConformingToProtocolsProvider.URLRequestHandlerClassNames;
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
return _URLRequestHandlerClassNames;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
- (nonnull NSArray<NSString *> *)imageDataDecoderClassNames {
|
|
29
|
+
static dispatch_once_t dataDecoderToken;
|
|
30
|
+
dispatch_once(&dataDecoderToken, ^{
|
|
31
|
+
_imageDataDecoderClassNames = RCTModulesConformingToProtocolsProvider.imageDataDecoderClassNames;
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
return _imageDataDecoderClassNames;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
- (nonnull NSArray<NSString *> *)imageURLLoaderClassNames {
|
|
38
|
+
static dispatch_once_t urlLoaderToken;
|
|
39
|
+
dispatch_once(&urlLoaderToken, ^{
|
|
40
|
+
_imageURLLoaderClassNames = RCTModulesConformingToProtocolsProvider.imageURLLoaderClassNames;
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
return _imageURLLoaderClassNames;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
- (nonnull NSDictionary<NSString *,Class<RCTComponentViewProtocol>> *)thirdPartyFabricComponents {
|
|
47
|
+
static dispatch_once_t nativeComponentsToken;
|
|
48
|
+
dispatch_once(&nativeComponentsToken, ^{
|
|
49
|
+
_thirdPartyFabricComponents = RCTThirdPartyComponentsProvider.thirdPartyFabricComponents;
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
return _thirdPartyFabricComponents;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#import <Foundation/Foundation.h>
|
|
9
|
+
|
|
10
|
+
@interface RCTModulesConformingToProtocolsProvider: NSObject
|
|
11
|
+
|
|
12
|
+
+(NSArray<NSString *> *)imageURLLoaderClassNames;
|
|
13
|
+
|
|
14
|
+
+(NSArray<NSString *> *)imageDataDecoderClassNames;
|
|
15
|
+
|
|
16
|
+
+(NSArray<NSString *> *)URLRequestHandlerClassNames;
|
|
17
|
+
|
|
18
|
+
@end
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#import "RCTModulesConformingToProtocolsProvider.h"
|
|
9
|
+
|
|
10
|
+
@implementation RCTModulesConformingToProtocolsProvider
|
|
11
|
+
|
|
12
|
+
+(NSArray<NSString *> *)imageURLLoaderClassNames
|
|
13
|
+
{
|
|
14
|
+
return @[
|
|
15
|
+
|
|
16
|
+
];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
+(NSArray<NSString *> *)imageDataDecoderClassNames
|
|
20
|
+
{
|
|
21
|
+
return @[
|
|
22
|
+
|
|
23
|
+
];
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
+(NSArray<NSString *> *)URLRequestHandlerClassNames
|
|
27
|
+
{
|
|
28
|
+
return @[
|
|
29
|
+
|
|
30
|
+
];
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#import <Foundation/Foundation.h>
|
|
9
|
+
|
|
10
|
+
@protocol RCTComponentViewProtocol;
|
|
11
|
+
|
|
12
|
+
@interface RCTThirdPartyComponentsProvider: NSObject
|
|
13
|
+
|
|
14
|
+
+ (NSDictionary<NSString *, Class<RCTComponentViewProtocol>> *)thirdPartyFabricComponents;
|
|
15
|
+
|
|
16
|
+
@end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
#import <Foundation/Foundation.h>
|
|
10
|
+
|
|
11
|
+
#import "RCTThirdPartyComponentsProvider.h"
|
|
12
|
+
#import <React/RCTComponentViewProtocol.h>
|
|
13
|
+
|
|
14
|
+
@implementation RCTThirdPartyComponentsProvider
|
|
15
|
+
|
|
16
|
+
+ (NSDictionary<NSString *, Class<RCTComponentViewProtocol>> *)thirdPartyFabricComponents
|
|
17
|
+
{
|
|
18
|
+
return @{
|
|
19
|
+
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@end
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
3
|
+
*
|
|
4
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
5
|
+
* once the code is regenerated.
|
|
6
|
+
*
|
|
7
|
+
* @generated by codegen project: GenerateModuleObjCpp
|
|
8
|
+
*
|
|
9
|
+
* We create an umbrella header (and corresponding implementation) here since
|
|
10
|
+
* Cxx compilation in BUCK has a limitation: source-code producing genrule()s
|
|
11
|
+
* must have a single output. More files => more genrule()s => slower builds.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
#import "RNFBStorageTurboModules.h"
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@implementation NativeRNFBTurboStorageSpecBase
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
- (void)setEventEmitterCallback:(EventEmitterCallbackWrapper *)eventEmitterCallbackWrapper
|
|
21
|
+
{
|
|
22
|
+
_eventEmitterCallback = std::move(eventEmitterCallbackWrapper->_eventEmitterCallback);
|
|
23
|
+
}
|
|
24
|
+
@end
|
|
25
|
+
|
|
26
|
+
@implementation RCTCxxConvert (NativeRNFBTurboStorage_StorageListOptions)
|
|
27
|
+
+ (RCTManagedPointer *)JS_NativeRNFBTurboStorage_StorageListOptions:(id)json
|
|
28
|
+
{
|
|
29
|
+
return facebook::react::managedPointer<JS::NativeRNFBTurboStorage::StorageListOptions>(json);
|
|
30
|
+
}
|
|
31
|
+
@end
|
|
32
|
+
namespace facebook::react {
|
|
33
|
+
|
|
34
|
+
static facebook::jsi::Value __hostFunction_NativeRNFBTurboStorageSpecJSI_deleteObject(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
35
|
+
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "deleteObject", @selector(deleteObject:url:resolve:reject:), args, count);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
static facebook::jsi::Value __hostFunction_NativeRNFBTurboStorageSpecJSI_getDownloadURL(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
39
|
+
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "getDownloadURL", @selector(getDownloadURL:url:resolve:reject:), args, count);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
static facebook::jsi::Value __hostFunction_NativeRNFBTurboStorageSpecJSI_getMetadata(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
43
|
+
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "getMetadata", @selector(getMetadata:url:resolve:reject:), args, count);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
static facebook::jsi::Value __hostFunction_NativeRNFBTurboStorageSpecJSI_updateMetadata(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
47
|
+
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "updateMetadata", @selector(updateMetadata:url:metadata:resolve:reject:), args, count);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
static facebook::jsi::Value __hostFunction_NativeRNFBTurboStorageSpecJSI_list(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
51
|
+
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "list", @selector(list:url:listOptions:resolve:reject:), args, count);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
static facebook::jsi::Value __hostFunction_NativeRNFBTurboStorageSpecJSI_listAll(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
55
|
+
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "listAll", @selector(listAll:url:resolve:reject:), args, count);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
static facebook::jsi::Value __hostFunction_NativeRNFBTurboStorageSpecJSI_setMaxDownloadRetryTime(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
59
|
+
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "setMaxDownloadRetryTime", @selector(setMaxDownloadRetryTime:milliseconds:resolve:reject:), args, count);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
static facebook::jsi::Value __hostFunction_NativeRNFBTurboStorageSpecJSI_setMaxOperationRetryTime(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
63
|
+
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "setMaxOperationRetryTime", @selector(setMaxOperationRetryTime:milliseconds:resolve:reject:), args, count);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
static facebook::jsi::Value __hostFunction_NativeRNFBTurboStorageSpecJSI_setMaxUploadRetryTime(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
67
|
+
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "setMaxUploadRetryTime", @selector(setMaxUploadRetryTime:milliseconds:resolve:reject:), args, count);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
static facebook::jsi::Value __hostFunction_NativeRNFBTurboStorageSpecJSI_useEmulator(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
71
|
+
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, VoidKind, "useEmulator", @selector(useEmulator:host:port:bucketUrl:), args, count);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
static facebook::jsi::Value __hostFunction_NativeRNFBTurboStorageSpecJSI_writeToFile(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
75
|
+
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "writeToFile", @selector(writeToFile:url:localFilePath:taskId:resolve:reject:), args, count);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
static facebook::jsi::Value __hostFunction_NativeRNFBTurboStorageSpecJSI_putFile(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
79
|
+
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "putFile", @selector(putFile:url:localFilePath:metadata:taskId:resolve:reject:), args, count);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
static facebook::jsi::Value __hostFunction_NativeRNFBTurboStorageSpecJSI_putString(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
83
|
+
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "putString", @selector(putString:url:string:format:metadata:taskId:resolve:reject:), args, count);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
static facebook::jsi::Value __hostFunction_NativeRNFBTurboStorageSpecJSI_setTaskStatus(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
87
|
+
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, BooleanKind, "setTaskStatus", @selector(setTaskStatus:taskId:status:), args, count);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
static facebook::jsi::Value __hostFunction_NativeRNFBTurboStorageSpecJSI_getConstants(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
91
|
+
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, ObjectKind, "getConstants", @selector(getConstants), args, count);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
NativeRNFBTurboStorageSpecJSI::NativeRNFBTurboStorageSpecJSI(const ObjCTurboModule::InitParams ¶ms)
|
|
95
|
+
: ObjCTurboModule(params) {
|
|
96
|
+
|
|
97
|
+
methodMap_["deleteObject"] = MethodMetadata {2, __hostFunction_NativeRNFBTurboStorageSpecJSI_deleteObject};
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
methodMap_["getDownloadURL"] = MethodMetadata {2, __hostFunction_NativeRNFBTurboStorageSpecJSI_getDownloadURL};
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
methodMap_["getMetadata"] = MethodMetadata {2, __hostFunction_NativeRNFBTurboStorageSpecJSI_getMetadata};
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
methodMap_["updateMetadata"] = MethodMetadata {3, __hostFunction_NativeRNFBTurboStorageSpecJSI_updateMetadata};
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
methodMap_["list"] = MethodMetadata {3, __hostFunction_NativeRNFBTurboStorageSpecJSI_list};
|
|
110
|
+
setMethodArgConversionSelector(@"list", 2, @"JS_NativeRNFBTurboStorage_StorageListOptions:");
|
|
111
|
+
|
|
112
|
+
methodMap_["listAll"] = MethodMetadata {2, __hostFunction_NativeRNFBTurboStorageSpecJSI_listAll};
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
methodMap_["setMaxDownloadRetryTime"] = MethodMetadata {2, __hostFunction_NativeRNFBTurboStorageSpecJSI_setMaxDownloadRetryTime};
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
methodMap_["setMaxOperationRetryTime"] = MethodMetadata {2, __hostFunction_NativeRNFBTurboStorageSpecJSI_setMaxOperationRetryTime};
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
methodMap_["setMaxUploadRetryTime"] = MethodMetadata {2, __hostFunction_NativeRNFBTurboStorageSpecJSI_setMaxUploadRetryTime};
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
methodMap_["useEmulator"] = MethodMetadata {4, __hostFunction_NativeRNFBTurboStorageSpecJSI_useEmulator};
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
methodMap_["writeToFile"] = MethodMetadata {4, __hostFunction_NativeRNFBTurboStorageSpecJSI_writeToFile};
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
methodMap_["putFile"] = MethodMetadata {5, __hostFunction_NativeRNFBTurboStorageSpecJSI_putFile};
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
methodMap_["putString"] = MethodMetadata {6, __hostFunction_NativeRNFBTurboStorageSpecJSI_putString};
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
methodMap_["setTaskStatus"] = MethodMetadata {3, __hostFunction_NativeRNFBTurboStorageSpecJSI_setTaskStatus};
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
methodMap_["getConstants"] = MethodMetadata {0, __hostFunction_NativeRNFBTurboStorageSpecJSI_getConstants};
|
|
140
|
+
|
|
141
|
+
}
|
|
142
|
+
} // namespace facebook::react
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
3
|
+
*
|
|
4
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
5
|
+
* once the code is regenerated.
|
|
6
|
+
*
|
|
7
|
+
* @generated by codegen project: GenerateModuleObjCpp
|
|
8
|
+
*
|
|
9
|
+
* We create an umbrella header (and corresponding implementation) here since
|
|
10
|
+
* Cxx compilation in BUCK has a limitation: source-code producing genrule()s
|
|
11
|
+
* must have a single output. More files => more genrule()s => slower builds.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
#ifndef __cplusplus
|
|
15
|
+
#error This file must be compiled as Obj-C++. If you are importing it, you must change your file extension to .mm.
|
|
16
|
+
#endif
|
|
17
|
+
|
|
18
|
+
// Avoid multiple includes of RNFBStorageTurboModules symbols
|
|
19
|
+
#ifndef RNFBStorageTurboModules_H
|
|
20
|
+
#define RNFBStorageTurboModules_H
|
|
21
|
+
|
|
22
|
+
#import <Foundation/Foundation.h>
|
|
23
|
+
#import <RCTRequired/RCTRequired.h>
|
|
24
|
+
#import <RCTTypeSafety/RCTConvertHelpers.h>
|
|
25
|
+
#import <RCTTypeSafety/RCTTypedModuleConstants.h>
|
|
26
|
+
#import <React/RCTBridgeModule.h>
|
|
27
|
+
#import <React/RCTCxxConvert.h>
|
|
28
|
+
#import <React/RCTManagedPointer.h>
|
|
29
|
+
#import <ReactCommon/RCTTurboModule.h>
|
|
30
|
+
#import <optional>
|
|
31
|
+
#import <vector>
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
35
|
+
namespace JS {
|
|
36
|
+
namespace NativeRNFBTurboStorage {
|
|
37
|
+
struct StorageListOptions {
|
|
38
|
+
double maxResults() const;
|
|
39
|
+
NSString *pageToken() const;
|
|
40
|
+
|
|
41
|
+
StorageListOptions(NSDictionary *const v) : _v(v) {}
|
|
42
|
+
private:
|
|
43
|
+
NSDictionary *_v;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@interface RCTCxxConvert (NativeRNFBTurboStorage_StorageListOptions)
|
|
49
|
+
+ (RCTManagedPointer *)JS_NativeRNFBTurboStorage_StorageListOptions:(id)json;
|
|
50
|
+
@end
|
|
51
|
+
namespace JS {
|
|
52
|
+
namespace NativeRNFBTurboStorage {
|
|
53
|
+
struct Constants {
|
|
54
|
+
|
|
55
|
+
struct Builder {
|
|
56
|
+
// Backwards compat for RCTTypedModuleConstants
|
|
57
|
+
using ResultT = Constants;
|
|
58
|
+
|
|
59
|
+
struct Input {
|
|
60
|
+
RCTRequired<double> maxDownloadRetryTime;
|
|
61
|
+
RCTRequired<double> maxOperationRetryTime;
|
|
62
|
+
RCTRequired<double> maxUploadRetryTime;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
/** Initialize with a set of values */
|
|
66
|
+
Builder(const Input i);
|
|
67
|
+
/** Initialize with an existing Constants */
|
|
68
|
+
Builder(Constants i);
|
|
69
|
+
/** Builds the object. Generally used only by the infrastructure. */
|
|
70
|
+
NSDictionary *buildUnsafeRawValue() const { return _factory(); };
|
|
71
|
+
private:
|
|
72
|
+
NSDictionary *(^_factory)(void);
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
static Constants fromUnsafeRawValue(NSDictionary *const v) { return {v}; }
|
|
76
|
+
NSDictionary *unsafeRawValue() const { return _v; }
|
|
77
|
+
private:
|
|
78
|
+
Constants(NSDictionary *const v) : _v(v) {}
|
|
79
|
+
NSDictionary *_v;
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
@protocol NativeRNFBTurboStorageSpec <RCTBridgeModule, RCTTurboModule>
|
|
84
|
+
|
|
85
|
+
- (void)deleteObject:(NSString *)appName
|
|
86
|
+
url:(NSString *)url
|
|
87
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
88
|
+
reject:(RCTPromiseRejectBlock)reject;
|
|
89
|
+
- (void)getDownloadURL:(NSString *)appName
|
|
90
|
+
url:(NSString *)url
|
|
91
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
92
|
+
reject:(RCTPromiseRejectBlock)reject;
|
|
93
|
+
- (void)getMetadata:(NSString *)appName
|
|
94
|
+
url:(NSString *)url
|
|
95
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
96
|
+
reject:(RCTPromiseRejectBlock)reject;
|
|
97
|
+
- (void)updateMetadata:(NSString *)appName
|
|
98
|
+
url:(NSString *)url
|
|
99
|
+
metadata:(NSDictionary * _Nullable)metadata
|
|
100
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
101
|
+
reject:(RCTPromiseRejectBlock)reject;
|
|
102
|
+
- (void)list:(NSString *)appName
|
|
103
|
+
url:(NSString *)url
|
|
104
|
+
listOptions:(JS::NativeRNFBTurboStorage::StorageListOptions &)listOptions
|
|
105
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
106
|
+
reject:(RCTPromiseRejectBlock)reject;
|
|
107
|
+
- (void)listAll:(NSString *)appName
|
|
108
|
+
url:(NSString *)url
|
|
109
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
110
|
+
reject:(RCTPromiseRejectBlock)reject;
|
|
111
|
+
- (void)setMaxDownloadRetryTime:(NSString *)appName
|
|
112
|
+
milliseconds:(double)milliseconds
|
|
113
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
114
|
+
reject:(RCTPromiseRejectBlock)reject;
|
|
115
|
+
- (void)setMaxOperationRetryTime:(NSString *)appName
|
|
116
|
+
milliseconds:(double)milliseconds
|
|
117
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
118
|
+
reject:(RCTPromiseRejectBlock)reject;
|
|
119
|
+
- (void)setMaxUploadRetryTime:(NSString *)appName
|
|
120
|
+
milliseconds:(double)milliseconds
|
|
121
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
122
|
+
reject:(RCTPromiseRejectBlock)reject;
|
|
123
|
+
- (void)useEmulator:(NSString *)appName
|
|
124
|
+
host:(NSString *)host
|
|
125
|
+
port:(double)port
|
|
126
|
+
bucketUrl:(NSString *)bucketUrl;
|
|
127
|
+
- (void)writeToFile:(NSString *)appName
|
|
128
|
+
url:(NSString *)url
|
|
129
|
+
localFilePath:(NSString *)localFilePath
|
|
130
|
+
taskId:(double)taskId
|
|
131
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
132
|
+
reject:(RCTPromiseRejectBlock)reject;
|
|
133
|
+
- (void)putFile:(NSString *)appName
|
|
134
|
+
url:(NSString *)url
|
|
135
|
+
localFilePath:(NSString *)localFilePath
|
|
136
|
+
metadata:(NSDictionary * _Nullable)metadata
|
|
137
|
+
taskId:(double)taskId
|
|
138
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
139
|
+
reject:(RCTPromiseRejectBlock)reject;
|
|
140
|
+
- (void)putString:(NSString *)appName
|
|
141
|
+
url:(NSString *)url
|
|
142
|
+
string:(NSString *)string
|
|
143
|
+
format:(NSString *)format
|
|
144
|
+
metadata:(NSDictionary * _Nullable)metadata
|
|
145
|
+
taskId:(double)taskId
|
|
146
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
147
|
+
reject:(RCTPromiseRejectBlock)reject;
|
|
148
|
+
- (NSNumber *)setTaskStatus:(NSString *)appName
|
|
149
|
+
taskId:(double)taskId
|
|
150
|
+
status:(double)status;
|
|
151
|
+
- (facebook::react::ModuleConstants<JS::NativeRNFBTurboStorage::Constants::Builder>)constantsToExport;
|
|
152
|
+
- (facebook::react::ModuleConstants<JS::NativeRNFBTurboStorage::Constants::Builder>)getConstants;
|
|
153
|
+
|
|
154
|
+
@end
|
|
155
|
+
|
|
156
|
+
@interface NativeRNFBTurboStorageSpecBase : NSObject {
|
|
157
|
+
@protected
|
|
158
|
+
facebook::react::EventEmitterCallback _eventEmitterCallback;
|
|
159
|
+
}
|
|
160
|
+
- (void)setEventEmitterCallback:(EventEmitterCallbackWrapper *)eventEmitterCallbackWrapper;
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
@end
|
|
164
|
+
|
|
165
|
+
namespace facebook::react {
|
|
166
|
+
/**
|
|
167
|
+
* ObjC++ class for module 'NativeRNFBTurboStorage'
|
|
168
|
+
*/
|
|
169
|
+
class JSI_EXPORT NativeRNFBTurboStorageSpecJSI : public ObjCTurboModule {
|
|
170
|
+
public:
|
|
171
|
+
NativeRNFBTurboStorageSpecJSI(const ObjCTurboModule::InitParams ¶ms);
|
|
172
|
+
};
|
|
173
|
+
} // namespace facebook::react
|
|
174
|
+
inline double JS::NativeRNFBTurboStorage::StorageListOptions::maxResults() const
|
|
175
|
+
{
|
|
176
|
+
id const p = _v[@"maxResults"];
|
|
177
|
+
return RCTBridgingToDouble(p);
|
|
178
|
+
}
|
|
179
|
+
inline NSString *JS::NativeRNFBTurboStorage::StorageListOptions::pageToken() const
|
|
180
|
+
{
|
|
181
|
+
id const p = _v[@"pageToken"];
|
|
182
|
+
return RCTBridgingToOptionalString(p);
|
|
183
|
+
}
|
|
184
|
+
inline JS::NativeRNFBTurboStorage::Constants::Builder::Builder(const Input i) : _factory(^{
|
|
185
|
+
NSMutableDictionary *d = [NSMutableDictionary new];
|
|
186
|
+
auto maxDownloadRetryTime = i.maxDownloadRetryTime.get();
|
|
187
|
+
d[@"maxDownloadRetryTime"] = @(maxDownloadRetryTime);
|
|
188
|
+
auto maxOperationRetryTime = i.maxOperationRetryTime.get();
|
|
189
|
+
d[@"maxOperationRetryTime"] = @(maxOperationRetryTime);
|
|
190
|
+
auto maxUploadRetryTime = i.maxUploadRetryTime.get();
|
|
191
|
+
d[@"maxUploadRetryTime"] = @(maxUploadRetryTime);
|
|
192
|
+
return d;
|
|
193
|
+
}) {}
|
|
194
|
+
inline JS::NativeRNFBTurboStorage::Constants::Builder::Builder(Constants i) : _factory(^{
|
|
195
|
+
return i.unsafeRawValue();
|
|
196
|
+
}) {}
|
|
197
|
+
NS_ASSUME_NONNULL_END
|
|
198
|
+
#endif // RNFBStorageTurboModules_H
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
3
|
+
*
|
|
4
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
5
|
+
* once the code is regenerated.
|
|
6
|
+
*
|
|
7
|
+
* @generated by codegen project: GenerateModuleCpp.js
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
#include "RNFBStorageTurboModulesJSI.h"
|
|
11
|
+
|
|
12
|
+
namespace facebook::react {
|
|
13
|
+
|
|
14
|
+
static jsi::Value __hostFunction_NativeRNFBTurboStorageCxxSpecJSI_getConstants(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
15
|
+
return static_cast<NativeRNFBTurboStorageCxxSpecJSI *>(&turboModule)->getConstants(
|
|
16
|
+
rt
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
static jsi::Value __hostFunction_NativeRNFBTurboStorageCxxSpecJSI_deleteObject(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
20
|
+
return static_cast<NativeRNFBTurboStorageCxxSpecJSI *>(&turboModule)->deleteObject(
|
|
21
|
+
rt,
|
|
22
|
+
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
|
|
23
|
+
count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt)
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
static jsi::Value __hostFunction_NativeRNFBTurboStorageCxxSpecJSI_getDownloadURL(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
27
|
+
return static_cast<NativeRNFBTurboStorageCxxSpecJSI *>(&turboModule)->getDownloadURL(
|
|
28
|
+
rt,
|
|
29
|
+
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
|
|
30
|
+
count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt)
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
static jsi::Value __hostFunction_NativeRNFBTurboStorageCxxSpecJSI_getMetadata(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
34
|
+
return static_cast<NativeRNFBTurboStorageCxxSpecJSI *>(&turboModule)->getMetadata(
|
|
35
|
+
rt,
|
|
36
|
+
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
|
|
37
|
+
count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt)
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
static jsi::Value __hostFunction_NativeRNFBTurboStorageCxxSpecJSI_updateMetadata(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
41
|
+
return static_cast<NativeRNFBTurboStorageCxxSpecJSI *>(&turboModule)->updateMetadata(
|
|
42
|
+
rt,
|
|
43
|
+
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
|
|
44
|
+
count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt),
|
|
45
|
+
count <= 2 || args[2].isNull() || args[2].isUndefined() ? std::nullopt : std::make_optional(args[2].asObject(rt))
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
static jsi::Value __hostFunction_NativeRNFBTurboStorageCxxSpecJSI_list(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
49
|
+
return static_cast<NativeRNFBTurboStorageCxxSpecJSI *>(&turboModule)->list(
|
|
50
|
+
rt,
|
|
51
|
+
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
|
|
52
|
+
count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt),
|
|
53
|
+
count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asObject(rt)
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
static jsi::Value __hostFunction_NativeRNFBTurboStorageCxxSpecJSI_listAll(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
57
|
+
return static_cast<NativeRNFBTurboStorageCxxSpecJSI *>(&turboModule)->listAll(
|
|
58
|
+
rt,
|
|
59
|
+
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
|
|
60
|
+
count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt)
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
static jsi::Value __hostFunction_NativeRNFBTurboStorageCxxSpecJSI_setMaxDownloadRetryTime(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
64
|
+
return static_cast<NativeRNFBTurboStorageCxxSpecJSI *>(&turboModule)->setMaxDownloadRetryTime(
|
|
65
|
+
rt,
|
|
66
|
+
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
|
|
67
|
+
count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asNumber()
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
static jsi::Value __hostFunction_NativeRNFBTurboStorageCxxSpecJSI_setMaxOperationRetryTime(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
71
|
+
return static_cast<NativeRNFBTurboStorageCxxSpecJSI *>(&turboModule)->setMaxOperationRetryTime(
|
|
72
|
+
rt,
|
|
73
|
+
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
|
|
74
|
+
count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asNumber()
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
static jsi::Value __hostFunction_NativeRNFBTurboStorageCxxSpecJSI_setMaxUploadRetryTime(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
78
|
+
return static_cast<NativeRNFBTurboStorageCxxSpecJSI *>(&turboModule)->setMaxUploadRetryTime(
|
|
79
|
+
rt,
|
|
80
|
+
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
|
|
81
|
+
count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asNumber()
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
static jsi::Value __hostFunction_NativeRNFBTurboStorageCxxSpecJSI_useEmulator(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
85
|
+
static_cast<NativeRNFBTurboStorageCxxSpecJSI *>(&turboModule)->useEmulator(
|
|
86
|
+
rt,
|
|
87
|
+
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
|
|
88
|
+
count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt),
|
|
89
|
+
count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asNumber(),
|
|
90
|
+
count <= 3 ? throw jsi::JSError(rt, "Expected argument in position 3 to be passed") : args[3].asString(rt)
|
|
91
|
+
);
|
|
92
|
+
return jsi::Value::undefined();
|
|
93
|
+
}
|
|
94
|
+
static jsi::Value __hostFunction_NativeRNFBTurboStorageCxxSpecJSI_writeToFile(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
95
|
+
return static_cast<NativeRNFBTurboStorageCxxSpecJSI *>(&turboModule)->writeToFile(
|
|
96
|
+
rt,
|
|
97
|
+
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
|
|
98
|
+
count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt),
|
|
99
|
+
count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asString(rt),
|
|
100
|
+
count <= 3 ? throw jsi::JSError(rt, "Expected argument in position 3 to be passed") : args[3].asNumber()
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
static jsi::Value __hostFunction_NativeRNFBTurboStorageCxxSpecJSI_putFile(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
104
|
+
return static_cast<NativeRNFBTurboStorageCxxSpecJSI *>(&turboModule)->putFile(
|
|
105
|
+
rt,
|
|
106
|
+
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
|
|
107
|
+
count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt),
|
|
108
|
+
count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asString(rt),
|
|
109
|
+
count <= 3 || args[3].isNull() || args[3].isUndefined() ? std::nullopt : std::make_optional(args[3].asObject(rt)),
|
|
110
|
+
count <= 4 ? throw jsi::JSError(rt, "Expected argument in position 4 to be passed") : args[4].asNumber()
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
static jsi::Value __hostFunction_NativeRNFBTurboStorageCxxSpecJSI_putString(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
114
|
+
return static_cast<NativeRNFBTurboStorageCxxSpecJSI *>(&turboModule)->putString(
|
|
115
|
+
rt,
|
|
116
|
+
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
|
|
117
|
+
count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt),
|
|
118
|
+
count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asString(rt),
|
|
119
|
+
count <= 3 ? throw jsi::JSError(rt, "Expected argument in position 3 to be passed") : args[3].asString(rt),
|
|
120
|
+
count <= 4 || args[4].isNull() || args[4].isUndefined() ? std::nullopt : std::make_optional(args[4].asObject(rt)),
|
|
121
|
+
count <= 5 ? throw jsi::JSError(rt, "Expected argument in position 5 to be passed") : args[5].asNumber()
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
static jsi::Value __hostFunction_NativeRNFBTurboStorageCxxSpecJSI_setTaskStatus(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
125
|
+
return static_cast<NativeRNFBTurboStorageCxxSpecJSI *>(&turboModule)->setTaskStatus(
|
|
126
|
+
rt,
|
|
127
|
+
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
|
|
128
|
+
count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asNumber(),
|
|
129
|
+
count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asNumber()
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
NativeRNFBTurboStorageCxxSpecJSI::NativeRNFBTurboStorageCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker)
|
|
134
|
+
: TurboModule("NativeRNFBTurboStorage", jsInvoker) {
|
|
135
|
+
methodMap_["getConstants"] = MethodMetadata {0, __hostFunction_NativeRNFBTurboStorageCxxSpecJSI_getConstants};
|
|
136
|
+
methodMap_["deleteObject"] = MethodMetadata {2, __hostFunction_NativeRNFBTurboStorageCxxSpecJSI_deleteObject};
|
|
137
|
+
methodMap_["getDownloadURL"] = MethodMetadata {2, __hostFunction_NativeRNFBTurboStorageCxxSpecJSI_getDownloadURL};
|
|
138
|
+
methodMap_["getMetadata"] = MethodMetadata {2, __hostFunction_NativeRNFBTurboStorageCxxSpecJSI_getMetadata};
|
|
139
|
+
methodMap_["updateMetadata"] = MethodMetadata {3, __hostFunction_NativeRNFBTurboStorageCxxSpecJSI_updateMetadata};
|
|
140
|
+
methodMap_["list"] = MethodMetadata {3, __hostFunction_NativeRNFBTurboStorageCxxSpecJSI_list};
|
|
141
|
+
methodMap_["listAll"] = MethodMetadata {2, __hostFunction_NativeRNFBTurboStorageCxxSpecJSI_listAll};
|
|
142
|
+
methodMap_["setMaxDownloadRetryTime"] = MethodMetadata {2, __hostFunction_NativeRNFBTurboStorageCxxSpecJSI_setMaxDownloadRetryTime};
|
|
143
|
+
methodMap_["setMaxOperationRetryTime"] = MethodMetadata {2, __hostFunction_NativeRNFBTurboStorageCxxSpecJSI_setMaxOperationRetryTime};
|
|
144
|
+
methodMap_["setMaxUploadRetryTime"] = MethodMetadata {2, __hostFunction_NativeRNFBTurboStorageCxxSpecJSI_setMaxUploadRetryTime};
|
|
145
|
+
methodMap_["useEmulator"] = MethodMetadata {4, __hostFunction_NativeRNFBTurboStorageCxxSpecJSI_useEmulator};
|
|
146
|
+
methodMap_["writeToFile"] = MethodMetadata {4, __hostFunction_NativeRNFBTurboStorageCxxSpecJSI_writeToFile};
|
|
147
|
+
methodMap_["putFile"] = MethodMetadata {5, __hostFunction_NativeRNFBTurboStorageCxxSpecJSI_putFile};
|
|
148
|
+
methodMap_["putString"] = MethodMetadata {6, __hostFunction_NativeRNFBTurboStorageCxxSpecJSI_putString};
|
|
149
|
+
methodMap_["setTaskStatus"] = MethodMetadata {3, __hostFunction_NativeRNFBTurboStorageCxxSpecJSI_setTaskStatus};
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
} // namespace facebook::react
|