bridgefy-react-native 1.1.8 → 1.2.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.
Files changed (105) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +582 -112
  3. package/android/build.gradle +36 -56
  4. package/android/gradle.properties +4 -4
  5. package/android/src/main/AndroidManifest.xml +1 -11
  6. package/android/src/main/java/me/bridgefy/plugin/react_native/BridgefyReactNativeModule.kt +609 -332
  7. package/android/src/main/java/me/bridgefy/plugin/react_native/BridgefyReactNativePackage.kt +25 -8
  8. package/android/src/main/java/me/bridgefy/plugin/react_native/service/BridgefyService.kt +625 -0
  9. package/android/src/main/java/me/bridgefy/plugin/react_native/util/BridgefyOperationModeManager.kt +193 -0
  10. package/android/src/main/java/me/bridgefy/plugin/react_native/util/BridgefyServiceManager.kt +123 -0
  11. package/android/src/main/java/me/bridgefy/plugin/react_native/util/Utils.kt +172 -0
  12. package/bridgefy-react-native.podspec +5 -25
  13. package/ios/BridgefyReactNativeModule.m +88 -0
  14. package/ios/BridgefyReactNativeModule.swift +524 -0
  15. package/lib/module/NativeBridgefy.js +114 -0
  16. package/lib/module/NativeBridgefy.js.map +1 -0
  17. package/lib/module/index.js +167 -208
  18. package/lib/module/index.js.map +1 -1
  19. package/lib/module/package.json +1 -0
  20. package/lib/typescript/package.json +1 -0
  21. package/lib/typescript/src/NativeBridgefy.d.ts +248 -0
  22. package/lib/typescript/src/NativeBridgefy.d.ts.map +1 -0
  23. package/lib/typescript/src/index.d.ts +140 -0
  24. package/lib/typescript/src/index.d.ts.map +1 -0
  25. package/package.json +77 -74
  26. package/src/NativeBridgefy.ts +317 -0
  27. package/src/index.tsx +270 -226
  28. package/ios/BridgefyReactNative.m +0 -56
  29. package/ios/BridgefyReactNative.swift +0 -368
  30. package/ios/BridgefyReactNative.xcodeproj/project.pbxproj +0 -293
  31. package/ios/BridgefyReactNative.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
  32. package/ios/BridgefyReactNative.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  33. package/ios/BridgefyReactNative.xcodeproj/project.xcworkspace/xcuserdata/bridgefy.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  34. package/ios/BridgefyReactNative.xcodeproj/xcuserdata/bridgefy.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
  35. package/ios/Frameworks/BridgefySDK.xcframework/Info.plist +0 -48
  36. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64/BridgefySDK.framework/BridgefySDK +0 -0
  37. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64/BridgefySDK.framework/Headers/BridgefySDK-Swift.h +0 -317
  38. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64/BridgefySDK.framework/Headers/BridgefySDK.h +0 -15
  39. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64/BridgefySDK.framework/Info.plist +0 -0
  40. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64/BridgefySDK.framework/Modules/BridgefySDK.swiftmodule/arm64-apple-ios.abi.json +0 -5523
  41. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64/BridgefySDK.framework/Modules/BridgefySDK.swiftmodule/arm64-apple-ios.private.swiftinterface +0 -116
  42. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64/BridgefySDK.framework/Modules/BridgefySDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  43. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64/BridgefySDK.framework/Modules/BridgefySDK.swiftmodule/arm64-apple-ios.swiftinterface +0 -116
  44. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64/BridgefySDK.framework/Modules/module.modulemap +0 -11
  45. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64/BridgefySDK.framework/_CodeSignature/CodeResources +0 -190
  46. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64/dSYMs/BridgefySDK.framework.dSYM/Contents/Info.plist +0 -20
  47. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64/dSYMs/BridgefySDK.framework.dSYM/Contents/Resources/DWARF/BridgefySDK +0 -0
  48. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64/dSYMs/BridgefySDK.framework.dSYM/Contents/Resources/Relocations/aarch64/BridgefySDK.yml +0 -12529
  49. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/BridgefySDK.framework/BridgefySDK +0 -0
  50. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/BridgefySDK.framework/Headers/BridgefySDK-Swift.h +0 -630
  51. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/BridgefySDK.framework/Headers/BridgefySDK.h +0 -15
  52. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/BridgefySDK.framework/Info.plist +0 -0
  53. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/BridgefySDK.framework/Modules/BridgefySDK.swiftmodule/arm64-apple-ios-simulator.abi.json +0 -5523
  54. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/BridgefySDK.framework/Modules/BridgefySDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +0 -116
  55. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/BridgefySDK.framework/Modules/BridgefySDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  56. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/BridgefySDK.framework/Modules/BridgefySDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +0 -116
  57. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/BridgefySDK.framework/Modules/BridgefySDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +0 -5523
  58. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/BridgefySDK.framework/Modules/BridgefySDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +0 -116
  59. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/BridgefySDK.framework/Modules/BridgefySDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  60. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/BridgefySDK.framework/Modules/BridgefySDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +0 -116
  61. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/BridgefySDK.framework/Modules/module.modulemap +0 -11
  62. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/BridgefySDK.framework/_CodeSignature/CodeResources +0 -245
  63. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/BridgefySDK.framework.dSYM/Contents/Info.plist +0 -20
  64. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/BridgefySDK.framework.dSYM/Contents/Resources/DWARF/BridgefySDK +0 -0
  65. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/BridgefySDK.framework.dSYM/Contents/Resources/Relocations/aarch64/BridgefySDK.yml +0 -12276
  66. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/BridgefySDK.framework.dSYM/Contents/Resources/Relocations/x86_64/BridgefySDK.yml +0 -11932
  67. package/lib/commonjs/index.js +0 -278
  68. package/lib/commonjs/index.js.map +0 -1
  69. package/lib/commonjs/infraestructure/index.js +0 -28
  70. package/lib/commonjs/infraestructure/index.js.map +0 -1
  71. package/lib/commonjs/infraestructure/interfaces/ibridgefy.js +0 -6
  72. package/lib/commonjs/infraestructure/interfaces/ibridgefy.js.map +0 -1
  73. package/lib/commonjs/infraestructure/interfaces/index.js +0 -17
  74. package/lib/commonjs/infraestructure/interfaces/index.js.map +0 -1
  75. package/lib/commonjs/infraestructure/services/bridgefy_service.js +0 -6
  76. package/lib/commonjs/infraestructure/services/bridgefy_service.js.map +0 -1
  77. package/lib/commonjs/infraestructure/services/index.js +0 -17
  78. package/lib/commonjs/infraestructure/services/index.js.map +0 -1
  79. package/lib/module/infraestructure/index.js +0 -3
  80. package/lib/module/infraestructure/index.js.map +0 -1
  81. package/lib/module/infraestructure/interfaces/ibridgefy.js +0 -2
  82. package/lib/module/infraestructure/interfaces/ibridgefy.js.map +0 -1
  83. package/lib/module/infraestructure/interfaces/index.js +0 -2
  84. package/lib/module/infraestructure/interfaces/index.js.map +0 -1
  85. package/lib/module/infraestructure/services/bridgefy_service.js +0 -2
  86. package/lib/module/infraestructure/services/bridgefy_service.js.map +0 -1
  87. package/lib/module/infraestructure/services/index.js +0 -2
  88. package/lib/module/infraestructure/services/index.js.map +0 -1
  89. package/lib/typescript/index.d.ts +0 -219
  90. package/lib/typescript/index.d.ts.map +0 -1
  91. package/lib/typescript/infraestructure/index.d.ts +0 -3
  92. package/lib/typescript/infraestructure/index.d.ts.map +0 -1
  93. package/lib/typescript/infraestructure/interfaces/ibridgefy.d.ts +0 -10
  94. package/lib/typescript/infraestructure/interfaces/ibridgefy.d.ts.map +0 -1
  95. package/lib/typescript/infraestructure/interfaces/index.d.ts +0 -2
  96. package/lib/typescript/infraestructure/interfaces/index.d.ts.map +0 -1
  97. package/lib/typescript/infraestructure/services/bridgefy_service.d.ts +0 -17
  98. package/lib/typescript/infraestructure/services/bridgefy_service.d.ts.map +0 -1
  99. package/lib/typescript/infraestructure/services/index.d.ts +0 -2
  100. package/lib/typescript/infraestructure/services/index.d.ts.map +0 -1
  101. package/src/infraestructure/index.tsx +0 -2
  102. package/src/infraestructure/interfaces/ibridgefy.tsx +0 -10
  103. package/src/infraestructure/interfaces/index.tsx +0 -1
  104. package/src/infraestructure/services/bridgefy_service.tsx +0 -20
  105. package/src/infraestructure/services/index.tsx +0 -1
@@ -1,278 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.BridgefyTransmissionModeType = exports.BridgefyPropagationProfile = exports.BridgefyEvents = exports.BridgefyErrorType = exports.Bridgefy = void 0;
7
- var _reactNative = require("react-native");
8
- const LINKING_ERROR = "The package 'bridgefy-react-native' doesn't seem to be linked. Make sure: \n\n" + _reactNative.Platform.select({
9
- ios: "- You have run 'pod install'\n",
10
- default: ''
11
- }) + '- You rebuilt the app after installing the package\n' + '- You are not using Expo Go\n';
12
- const BridgefyReactNative = _reactNative.NativeModules.BridgefyReactNative ? _reactNative.NativeModules.BridgefyReactNative : new Proxy({}, {
13
- get() {
14
- throw new Error(LINKING_ERROR);
15
- }
16
- });
17
-
18
- /** Profile that defines a series of properties and rules for the propagation of messages. */
19
- let BridgefyPropagationProfile = exports.BridgefyPropagationProfile = /*#__PURE__*/function (BridgefyPropagationProfile) {
20
- BridgefyPropagationProfile["standard"] = "standard";
21
- BridgefyPropagationProfile["highDensityNetwork"] = "highDensityNetwork";
22
- BridgefyPropagationProfile["sparseNetwork"] = "sparseNetwork";
23
- BridgefyPropagationProfile["longReach"] = "longReach";
24
- BridgefyPropagationProfile["shortReach"] = "shortReach";
25
- return BridgefyPropagationProfile;
26
- }({});
27
- /** The mode used to propagate a message through nearby devices. */
28
- let BridgefyTransmissionModeType = exports.BridgefyTransmissionModeType = /*#__PURE__*/function (BridgefyTransmissionModeType) {
29
- /** Deliver a message to a specific recipient only if there's an active connection with it. */
30
- BridgefyTransmissionModeType["p2p"] = "p2p";
31
- /** Deliver a message to a specific recipient using nearby devices to propagate it. */
32
- BridgefyTransmissionModeType["mesh"] = "mesh";
33
- /** Propagate a message readable by every device that receives it. */
34
- BridgefyTransmissionModeType["broadcast"] = "broadcast";
35
- return BridgefyTransmissionModeType;
36
- }({});
37
- /** Describes errors in the Bridgefy error domain. */
38
- let BridgefyErrorType = exports.BridgefyErrorType = /*#__PURE__*/function (BridgefyErrorType) {
39
- /** The Bridgefy SDK cannot run in the simulator */
40
- BridgefyErrorType["simulatorIsNotSupported"] = "simulatorIsNotSupported";
41
- /** The Bridgefy SDK is already running */
42
- BridgefyErrorType["alreadyStarted"] = "alreadyStarted";
43
- /** The provided API key is not valid */
44
- BridgefyErrorType["invalidAPIKey"] = "invalidAPIKey";
45
- /** The license is expired */
46
- BridgefyErrorType["expiredLicense"] = "expiredLicense";
47
- /** An error occurred while creating the session */
48
- BridgefyErrorType["sessionError"] = "sessionError";
49
- /** (iOS) The Bridgefy SDK hasn't been started */
50
- BridgefyErrorType["notStarted"] = "notStarted";
51
- /** (iOS) A Bridgefy SDK instance already exists */
52
- BridgefyErrorType["alreadyInstantiated"] = "alreadyInstantiated";
53
- /** (iOS) The Bridgefy SDK is performing the start process */
54
- BridgefyErrorType["startInProgress"] = "startInProgress";
55
- /** (iOS) The Bridgefy SDK service is not started */
56
- BridgefyErrorType["serviceNotStarted"] = "serviceNotStarted";
57
- /** (iOS) Cannot get app's bundle id */
58
- BridgefyErrorType["missingBundleID"] = "missingBundleID";
59
- /** (iOS) An internet connection is required to validate the license */
60
- BridgefyErrorType["internetConnectionRequired"] = "internetConnectionRequired";
61
- /** (iOS) The device's time has been modified */
62
- BridgefyErrorType["inconsistentDeviceTime"] = "inconsistentDeviceTime";
63
- /** (iOS) The user does not allow the use of BLE */
64
- BridgefyErrorType["BLEUsageNotGranted"] = "BLEUsageNotGranted";
65
- /** (iOS) The use of BLE in this device is restricted */
66
- BridgefyErrorType["BLEUsageRestricted"] = "BLEUsageRestricted";
67
- /** (iOS) The BLE antenna has been turned off */
68
- BridgefyErrorType["BLEPoweredOff"] = "BLEPoweredOff";
69
- /** (iOS) The usage of BLE is not supported in the device */
70
- BridgefyErrorType["BLEUnsupported"] = "BLEUnsupported";
71
- /** (iOS) BLE usage failed with an unknown error */
72
- BridgefyErrorType["BLEUnknownError"] = "BLEUnknownError";
73
- /** (iOS) Inconsistent connection */
74
- BridgefyErrorType["inconsistentConnection"] = "inconsistentConnection";
75
- /** (iOS) Connection is already secure */
76
- BridgefyErrorType["connectionIsAlreadySecure"] = "connectionIsAlreadySecure";
77
- /** (iOS) Cannot create secure connection */
78
- BridgefyErrorType["cannotCreateSecureConnection"] = "cannotCreateSecureConnection";
79
- /** (iOS) The length of the data exceed the maximum limit */
80
- BridgefyErrorType["dataLengthExceeded"] = "dataLengthExceeded";
81
- /** (iOS) The data to send is empty */
82
- BridgefyErrorType["dataValueIsEmpty"] = "dataValueIsEmpty";
83
- /** (iOS) The requested peer is not connected */
84
- BridgefyErrorType["peerIsNotConnected"] = "peerIsNotConnected";
85
- /** (iOS) An internal error occurred */
86
- BridgefyErrorType["internalError"] = "internalError";
87
- /** (iOS) An error occurred while validating the license */
88
- BridgefyErrorType["licenseError"] = "licenseError";
89
- /** (iOS) An error occurred while storing data */
90
- BridgefyErrorType["storageError"] = "storageError";
91
- /** (iOS) An error occurred while encoding the message */
92
- BridgefyErrorType["encodingError"] = "encodingError";
93
- /** (iOS) An error occurred while encrypting the message */
94
- BridgefyErrorType["encryptionError"] = "encryptionError";
95
- /** (Android) Missing application ID */
96
- BridgefyErrorType["missingApplicationId"] = "missingApplicationId";
97
- /** (Android) Permission exception */
98
- BridgefyErrorType["permissionException"] = "permissionException";
99
- /** (Android) Registration exception */
100
- BridgefyErrorType["registrationException"] = "registrationException";
101
- /** (Android) Size limit exceeded */
102
- BridgefyErrorType["sizeLimitExceeded"] = "sizeLimitExceeded";
103
- /** (Android) Device capabilities error */
104
- BridgefyErrorType["deviceCapabilities"] = "deviceCapabilities";
105
- /** (Android) Generic exception */
106
- BridgefyErrorType["genericException"] = "genericException";
107
- /** (Android) Inconsistent device time */
108
- BridgefyErrorType["inconsistentDeviceTimeException"] = "inconsistentDeviceTimeException";
109
- /** (Android) Internet connection required */
110
- BridgefyErrorType["internetConnectionRequiredException"] = "internetConnectionRequiredException";
111
- /** (Android) Unknown exception */
112
- BridgefyErrorType["unknownException"] = "unknownException";
113
- return BridgefyErrorType;
114
- }({});
115
- /**
116
- * These events are available via subscriptions to the `NativeEventEmitter` using the
117
- * `NativeModules.BridgefyReactNative` component. See README for further instructions.
118
- */
119
- let BridgefyEvents = exports.BridgefyEvents = /*#__PURE__*/function (BridgefyEvents) {
120
- /**
121
- * This function is called when the BridgefySDK has been started.
122
- */
123
- BridgefyEvents["bridgefyDidStart"] = "bridgefyDidStart";
124
- /**
125
- * This function is called when an error occurred while starting the BridgefySDK.
126
- */
127
- BridgefyEvents["bridgefyDidFailToStart"] = "bridgefyDidFailToStart";
128
- /**
129
- * This function is called when the BridgefySDK has been stopped.
130
- */
131
- BridgefyEvents["bridgefyDidStop"] = "bridgefyDidStop";
132
- /**
133
- * This function is called when an error occurred while stopping the BridgefySDK.
134
- */
135
- BridgefyEvents["bridgefyDidFailToStop"] = "bridgefyDidFailToStop";
136
- /**
137
- * The current session was destroyed
138
- */
139
- BridgefyEvents["bridgefyDidDestroySession"] = "bridgefyDidDestroySession";
140
- /**
141
- * An error occurred while destroying the current session
142
- */
143
- BridgefyEvents["bridgefyDidFailToDestroySession"] = "bridgefyDidFailToDestroySession";
144
- /**
145
- * This function is called to notify a new connection.
146
- */
147
- BridgefyEvents["bridgefyDidConnect"] = "bridgefyDidConnect";
148
- /**
149
- * This function is called to notify a disconnection.
150
- */
151
- BridgefyEvents["bridgefyDidDisconnect"] = "bridgefyDidDisconnect";
152
- /**
153
- * This function is called to notify when an on-demand secure connection was established.
154
- */
155
- BridgefyEvents["bridgefyDidEstablishSecureConnection"] = "bridgefyDidEstablishSecureConnection";
156
- /**
157
- * This function is called to notify when an on-demand secure connection could not be established.
158
- */
159
- BridgefyEvents["bridgefyDidFailToEstablishSecureConnection"] = "bridgefyDidFailToEstablishSecureConnection";
160
- /**
161
- * This function is called when you confirm the sending of the message
162
- */
163
- BridgefyEvents["bridgefyDidSendMessage"] = "bridgefyDidSendMessage";
164
- /**
165
- * This function is called when the message could not be sent
166
- */
167
- BridgefyEvents["bridgefyDidFailSendingMessage"] = "bridgefyDidFailSendingMessage";
168
- /**
169
- * This function is called when a new message is received
170
- */
171
- BridgefyEvents["bridgefyDidReceiveData"] = "bridgefyDidReceiveData";
172
- /**
173
- * (Android) Called when there is progress while transmitting data.
174
- */
175
- BridgefyEvents["bridgefyDidSendDataProgress"] = "bridgefyDidSendDataProgress";
176
- return BridgefyEvents;
177
- }({});
178
- /**
179
- * Bridgefy
180
- */
181
- class Bridgefy {
182
- /**
183
- * Initialize the SDK
184
- * @param apiKey API key
185
- * @param verboseLogging The log level.
186
- */
187
- async initialize({
188
- apiKey,
189
- verboseLogging = false
190
- }) {
191
- await BridgefyReactNative.initialize(apiKey, verboseLogging);
192
- }
193
-
194
- /**
195
- * Start Bridgefy SDK operations
196
- */
197
- async start(params) {
198
- const userId = (params === null || params === void 0 ? void 0 : params.userId) ?? null;
199
- const propagationProfile = (params === null || params === void 0 ? void 0 : params.propagationProfile) ?? BridgefyPropagationProfile.standard;
200
- return await BridgefyReactNative.start(userId, propagationProfile);
201
- }
202
-
203
- /**
204
- * Stop Bridgefy SDK operations
205
- */
206
- async stop() {
207
- return await BridgefyReactNative.stop();
208
- }
209
-
210
- /**
211
- * Destroy current session
212
- */
213
- async destroySession() {
214
- return BridgefyReactNative.destroySession();
215
- }
216
-
217
- /**
218
- * Update license
219
- */
220
- async updateLicense() {
221
- return BridgefyReactNative.updateLicense();
222
- }
223
-
224
- /**
225
- * Function used to send data using a ``TransmissionMode``. This method returns a UUID to identify
226
- * the message sent.
227
- * @param data The message data
228
- * @param transmissionMode The mode used to propagate a message through nearby devices.
229
- * @returns The id of the message that was sent.
230
- */
231
- async send(data, transmissionMode) {
232
- const result = await BridgefyReactNative.send(data, transmissionMode);
233
- return result.messageId;
234
- }
235
-
236
- /**
237
- * Establishes a secure connection with the specified user
238
- * @param userId The UUID of the user with whom a secure connection should be established.
239
- */
240
- async establishSecureConnection(userId) {
241
- return BridgefyReactNative.establishSecureConnection(userId);
242
- }
243
-
244
- /**
245
- * Get current user Id
246
- * @returns User Id
247
- */
248
- async currentUserId() {
249
- const result = await BridgefyReactNative.currentUserId();
250
- return result.userId;
251
- }
252
-
253
- /**
254
- * Returns connected peers
255
- * @returns List of connected peers
256
- */
257
- async connectedPeers() {
258
- const result = await BridgefyReactNative.connectedPeers();
259
- return result.connectedPeers;
260
- }
261
-
262
- /**
263
- * Returns license expiration date
264
- * @returns Expiration date
265
- */
266
- async licenseExpirationDate() {
267
- const result = await BridgefyReactNative.licenseExpirationDate();
268
- return new Date(result.licenseExpirationDate);
269
- }
270
- async isInitialized() {
271
- return await BridgefyReactNative.isInitialized();
272
- }
273
- async isStarted() {
274
- return BridgefyReactNative.isStarted();
275
- }
276
- }
277
- exports.Bridgefy = Bridgefy;
278
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_reactNative","require","LINKING_ERROR","Platform","select","ios","default","BridgefyReactNative","NativeModules","Proxy","get","Error","BridgefyPropagationProfile","exports","BridgefyTransmissionModeType","BridgefyErrorType","BridgefyEvents","Bridgefy","initialize","apiKey","verboseLogging","start","params","userId","propagationProfile","standard","stop","destroySession","updateLicense","send","data","transmissionMode","result","messageId","establishSecureConnection","currentUserId","connectedPeers","licenseExpirationDate","Date","isInitialized","isStarted"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAOA,MAAMC,aAAa,GACjB,gFAAgF,GAChFC,qBAAQ,CAACC,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,+BAA+B;AAEjC,MAAMC,mBAAmB,GAAGC,0BAAa,CAACD,mBAAmB,GACzDC,0BAAa,CAACD,mBAAmB,GACjC,IAAIE,KAAK,CACP,CAAC,CAAC,EACF;EACEC,GAAGA,CAAA,EAAG;IACJ,MAAM,IAAIC,KAAK,CAACT,aAAa,CAAC;EAChC;AACF,CACF,CAAC;;AAEL;AAAA,IACYU,0BAA0B,GAAAC,OAAA,CAAAD,0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A,MAAMC,SAASA,CAAA,EAAqB;IAClC,OAAOjC,mBAAmB,CAACiC,SAAS,CAAC,CAAC;EACxC;AACF;AAAC3B,OAAA,CAAAI,QAAA,GAAAA,QAAA","ignoreList":[]}
@@ -1,28 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- var _interfaces = require("./interfaces");
7
- Object.keys(_interfaces).forEach(function (key) {
8
- if (key === "default" || key === "__esModule") return;
9
- if (key in exports && exports[key] === _interfaces[key]) return;
10
- Object.defineProperty(exports, key, {
11
- enumerable: true,
12
- get: function () {
13
- return _interfaces[key];
14
- }
15
- });
16
- });
17
- var _services = require("./services");
18
- Object.keys(_services).forEach(function (key) {
19
- if (key === "default" || key === "__esModule") return;
20
- if (key in exports && exports[key] === _services[key]) return;
21
- Object.defineProperty(exports, key, {
22
- enumerable: true,
23
- get: function () {
24
- return _services[key];
25
- }
26
- });
27
- });
28
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_interfaces","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_services"],"sourceRoot":"../../../src","sources":["infraestructure/index.tsx"],"mappings":";;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,WAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,WAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,WAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,SAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,SAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,SAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,SAAA,CAAAL,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
@@ -1,6 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- //# sourceMappingURL=ibridgefy.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["infraestructure/interfaces/ibridgefy.tsx"],"mappings":"","ignoreList":[]}
@@ -1,17 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- var _ibridgefy = require("./ibridgefy");
7
- Object.keys(_ibridgefy).forEach(function (key) {
8
- if (key === "default" || key === "__esModule") return;
9
- if (key in exports && exports[key] === _ibridgefy[key]) return;
10
- Object.defineProperty(exports, key, {
11
- enumerable: true,
12
- get: function () {
13
- return _ibridgefy[key];
14
- }
15
- });
16
- });
17
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_ibridgefy","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sourceRoot":"../../../../src","sources":["infraestructure/interfaces/index.tsx"],"mappings":";;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,UAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,UAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,UAAA,CAAAK,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
@@ -1,6 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- //# sourceMappingURL=bridgefy_service.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["infraestructure/services/bridgefy_service.tsx"],"mappings":"","ignoreList":[]}
@@ -1,17 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- var _bridgefy_service = require("./bridgefy_service");
7
- Object.keys(_bridgefy_service).forEach(function (key) {
8
- if (key === "default" || key === "__esModule") return;
9
- if (key in exports && exports[key] === _bridgefy_service[key]) return;
10
- Object.defineProperty(exports, key, {
11
- enumerable: true,
12
- get: function () {
13
- return _bridgefy_service[key];
14
- }
15
- });
16
- });
17
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_bridgefy_service","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sourceRoot":"../../../../src","sources":["infraestructure/services/index.tsx"],"mappings":";;;;;AAAA,IAAAA,iBAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,iBAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,iBAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,iBAAA,CAAAK,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
@@ -1,3 +0,0 @@
1
- export * from './interfaces';
2
- export * from './services';
3
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sourceRoot":"../../../src","sources":["infraestructure/index.tsx"],"mappings":"AAAA,cAAc,cAAc;AAC5B,cAAc,YAAY","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=ibridgefy.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["infraestructure/interfaces/ibridgefy.tsx"],"mappings":"","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- export * from './ibridgefy';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["infraestructure/interfaces/index.tsx"],"mappings":"AAAA,cAAc,aAAa","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=bridgefy_service.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["infraestructure/services/bridgefy_service.tsx"],"mappings":"","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- export * from './bridgefy_service';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["infraestructure/services/index.tsx"],"mappings":"AAAA,cAAc,oBAAoB","ignoreList":[]}
@@ -1,219 +0,0 @@
1
- import type { BridgefyService, IInitializeIn, IStartIn } from './infraestructure';
2
- /** Profile that defines a series of properties and rules for the propagation of messages. */
3
- export declare enum BridgefyPropagationProfile {
4
- standard = "standard",
5
- highDensityNetwork = "highDensityNetwork",
6
- sparseNetwork = "sparseNetwork",
7
- longReach = "longReach",
8
- shortReach = "shortReach"
9
- }
10
- /** The mode used to propagate a message through nearby devices. */
11
- export declare enum BridgefyTransmissionModeType {
12
- /** Deliver a message to a specific recipient only if there's an active connection with it. */
13
- p2p = "p2p",
14
- /** Deliver a message to a specific recipient using nearby devices to propagate it. */
15
- mesh = "mesh",
16
- /** Propagate a message readable by every device that receives it. */
17
- broadcast = "broadcast"
18
- }
19
- export interface BridgefyTransmissionMode {
20
- type: BridgefyTransmissionModeType;
21
- uuid: string;
22
- }
23
- /** Describes errors in the Bridgefy error domain. */
24
- export declare enum BridgefyErrorType {
25
- /** The Bridgefy SDK cannot run in the simulator */
26
- simulatorIsNotSupported = "simulatorIsNotSupported",
27
- /** The Bridgefy SDK is already running */
28
- alreadyStarted = "alreadyStarted",
29
- /** The provided API key is not valid */
30
- invalidAPIKey = "invalidAPIKey",
31
- /** The license is expired */
32
- expiredLicense = "expiredLicense",
33
- /** An error occurred while creating the session */
34
- sessionError = "sessionError",
35
- /** (iOS) The Bridgefy SDK hasn't been started */
36
- notStarted = "notStarted",
37
- /** (iOS) A Bridgefy SDK instance already exists */
38
- alreadyInstantiated = "alreadyInstantiated",
39
- /** (iOS) The Bridgefy SDK is performing the start process */
40
- startInProgress = "startInProgress",
41
- /** (iOS) The Bridgefy SDK service is not started */
42
- serviceNotStarted = "serviceNotStarted",
43
- /** (iOS) Cannot get app's bundle id */
44
- missingBundleID = "missingBundleID",
45
- /** (iOS) An internet connection is required to validate the license */
46
- internetConnectionRequired = "internetConnectionRequired",
47
- /** (iOS) The device's time has been modified */
48
- inconsistentDeviceTime = "inconsistentDeviceTime",
49
- /** (iOS) The user does not allow the use of BLE */
50
- BLEUsageNotGranted = "BLEUsageNotGranted",
51
- /** (iOS) The use of BLE in this device is restricted */
52
- BLEUsageRestricted = "BLEUsageRestricted",
53
- /** (iOS) The BLE antenna has been turned off */
54
- BLEPoweredOff = "BLEPoweredOff",
55
- /** (iOS) The usage of BLE is not supported in the device */
56
- BLEUnsupported = "BLEUnsupported",
57
- /** (iOS) BLE usage failed with an unknown error */
58
- BLEUnknownError = "BLEUnknownError",
59
- /** (iOS) Inconsistent connection */
60
- inconsistentConnection = "inconsistentConnection",
61
- /** (iOS) Connection is already secure */
62
- connectionIsAlreadySecure = "connectionIsAlreadySecure",
63
- /** (iOS) Cannot create secure connection */
64
- cannotCreateSecureConnection = "cannotCreateSecureConnection",
65
- /** (iOS) The length of the data exceed the maximum limit */
66
- dataLengthExceeded = "dataLengthExceeded",
67
- /** (iOS) The data to send is empty */
68
- dataValueIsEmpty = "dataValueIsEmpty",
69
- /** (iOS) The requested peer is not connected */
70
- peerIsNotConnected = "peerIsNotConnected",
71
- /** (iOS) An internal error occurred */
72
- internalError = "internalError",
73
- /** (iOS) An error occurred while validating the license */
74
- licenseError = "licenseError",
75
- /** (iOS) An error occurred while storing data */
76
- storageError = "storageError",
77
- /** (iOS) An error occurred while encoding the message */
78
- encodingError = "encodingError",
79
- /** (iOS) An error occurred while encrypting the message */
80
- encryptionError = "encryptionError",
81
- /** (Android) Missing application ID */
82
- missingApplicationId = "missingApplicationId",
83
- /** (Android) Permission exception */
84
- permissionException = "permissionException",
85
- /** (Android) Registration exception */
86
- registrationException = "registrationException",
87
- /** (Android) Size limit exceeded */
88
- sizeLimitExceeded = "sizeLimitExceeded",
89
- /** (Android) Device capabilities error */
90
- deviceCapabilities = "deviceCapabilities",
91
- /** (Android) Generic exception */
92
- genericException = "genericException",
93
- /** (Android) Inconsistent device time */
94
- inconsistentDeviceTimeException = "inconsistentDeviceTimeException",
95
- /** (Android) Internet connection required */
96
- internetConnectionRequiredException = "internetConnectionRequiredException",
97
- /** (Android) Unknown exception */
98
- unknownException = "unknownException"
99
- }
100
- /**
101
- * These events are available via subscriptions to the `NativeEventEmitter` using the
102
- * `NativeModules.BridgefyReactNative` component. See README for further instructions.
103
- */
104
- export declare enum BridgefyEvents {
105
- /**
106
- * This function is called when the BridgefySDK has been started.
107
- */
108
- bridgefyDidStart = "bridgefyDidStart",
109
- /**
110
- * This function is called when an error occurred while starting the BridgefySDK.
111
- */
112
- bridgefyDidFailToStart = "bridgefyDidFailToStart",
113
- /**
114
- * This function is called when the BridgefySDK has been stopped.
115
- */
116
- bridgefyDidStop = "bridgefyDidStop",
117
- /**
118
- * This function is called when an error occurred while stopping the BridgefySDK.
119
- */
120
- bridgefyDidFailToStop = "bridgefyDidFailToStop",
121
- /**
122
- * The current session was destroyed
123
- */
124
- bridgefyDidDestroySession = "bridgefyDidDestroySession",
125
- /**
126
- * An error occurred while destroying the current session
127
- */
128
- bridgefyDidFailToDestroySession = "bridgefyDidFailToDestroySession",
129
- /**
130
- * This function is called to notify a new connection.
131
- */
132
- bridgefyDidConnect = "bridgefyDidConnect",
133
- /**
134
- * This function is called to notify a disconnection.
135
- */
136
- bridgefyDidDisconnect = "bridgefyDidDisconnect",
137
- /**
138
- * This function is called to notify when an on-demand secure connection was established.
139
- */
140
- bridgefyDidEstablishSecureConnection = "bridgefyDidEstablishSecureConnection",
141
- /**
142
- * This function is called to notify when an on-demand secure connection could not be established.
143
- */
144
- bridgefyDidFailToEstablishSecureConnection = "bridgefyDidFailToEstablishSecureConnection",
145
- /**
146
- * This function is called when you confirm the sending of the message
147
- */
148
- bridgefyDidSendMessage = "bridgefyDidSendMessage",
149
- /**
150
- * This function is called when the message could not be sent
151
- */
152
- bridgefyDidFailSendingMessage = "bridgefyDidFailSendingMessage",
153
- /**
154
- * This function is called when a new message is received
155
- */
156
- bridgefyDidReceiveData = "bridgefyDidReceiveData",
157
- /**
158
- * (Android) Called when there is progress while transmitting data.
159
- */
160
- bridgefyDidSendDataProgress = "bridgefyDidSendDataProgress"
161
- }
162
- /**
163
- * Bridgefy
164
- */
165
- export declare class Bridgefy implements BridgefyService {
166
- /**
167
- * Initialize the SDK
168
- * @param apiKey API key
169
- * @param verboseLogging The log level.
170
- */
171
- initialize({ apiKey, verboseLogging, }: IInitializeIn): Promise<void>;
172
- /**
173
- * Start Bridgefy SDK operations
174
- */
175
- start(params?: IStartIn): Promise<void>;
176
- /**
177
- * Stop Bridgefy SDK operations
178
- */
179
- stop(): Promise<void>;
180
- /**
181
- * Destroy current session
182
- */
183
- destroySession(): Promise<void>;
184
- /**
185
- * Update license
186
- */
187
- updateLicense(): Promise<void>;
188
- /**
189
- * Function used to send data using a ``TransmissionMode``. This method returns a UUID to identify
190
- * the message sent.
191
- * @param data The message data
192
- * @param transmissionMode The mode used to propagate a message through nearby devices.
193
- * @returns The id of the message that was sent.
194
- */
195
- send(data: string, transmissionMode: BridgefyTransmissionMode): Promise<string>;
196
- /**
197
- * Establishes a secure connection with the specified user
198
- * @param userId The UUID of the user with whom a secure connection should be established.
199
- */
200
- establishSecureConnection(userId: string): Promise<void>;
201
- /**
202
- * Get current user Id
203
- * @returns User Id
204
- */
205
- currentUserId(): Promise<string>;
206
- /**
207
- * Returns connected peers
208
- * @returns List of connected peers
209
- */
210
- connectedPeers(): Promise<string[]>;
211
- /**
212
- * Returns license expiration date
213
- * @returns Expiration date
214
- */
215
- licenseExpirationDate(): Promise<Date>;
216
- isInitialized(): Promise<boolean>;
217
- isStarted(): Promise<boolean>;
218
- }
219
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,eAAe,EACf,aAAa,EACb,QAAQ,EACT,MAAM,mBAAmB,CAAC;AAmB3B,6FAA6F;AAC7F,oBAAY,0BAA0B;IACpC,QAAQ,aAAa;IACrB,kBAAkB,uBAAuB;IACzC,aAAa,kBAAkB;IAC/B,SAAS,cAAc;IACvB,UAAU,eAAe;CAC1B;AAED,mEAAmE;AACnE,oBAAY,4BAA4B;IACtC,8FAA8F;IAC9F,GAAG,QAAQ;IACX,sFAAsF;IACtF,IAAI,SAAS;IACb,qEAAqE;IACrE,SAAS,cAAc;CACxB;AAED,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,4BAA4B,CAAC;IACnC,IAAI,EAAE,MAAM,CAAC;CACd;AAED,qDAAqD;AACrD,oBAAY,iBAAiB;IAC3B,mDAAmD;IACnD,uBAAuB,4BAA4B;IACnD,0CAA0C;IAC1C,cAAc,mBAAmB;IACjC,wCAAwC;IACxC,aAAa,kBAAkB;IAC/B,6BAA6B;IAC7B,cAAc,mBAAmB;IACjC,mDAAmD;IACnD,YAAY,iBAAiB;IAC7B,iDAAiD;IACjD,UAAU,eAAe;IACzB,mDAAmD;IACnD,mBA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