bridgefy-react-native 1.1.5 → 1.1.7
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/android/build.gradle +2 -2
- package/android/gradle.properties +4 -4
- package/android/src/main/AndroidManifest.xml +2 -0
- package/android/src/main/java/me/bridgefy/plugin/react_native/BridgefyReactNativeModule.kt +1 -1
- package/ios/Frameworks/BridgefySDK.xcframework/Info.plist +5 -5
- package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64/BridgefySDK.framework/BridgefySDK +0 -0
- package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64/BridgefySDK.framework/Headers/BridgefySDK-Swift.h +1 -1
- package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64/BridgefySDK.framework/Info.plist +0 -0
- package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64/BridgefySDK.framework/Modules/BridgefySDK.swiftmodule/arm64-apple-ios.abi.json +1668 -4363
- package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64/BridgefySDK.framework/Modules/BridgefySDK.swiftmodule/arm64-apple-ios.private.swiftinterface +2 -3
- package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64/BridgefySDK.framework/Modules/BridgefySDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64/BridgefySDK.framework/Modules/BridgefySDK.swiftmodule/arm64-apple-ios.swiftinterface +2 -3
- package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64/BridgefySDK.framework/_CodeSignature/CodeResources +13 -13
- package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64/dSYMs/BridgefySDK.framework.dSYM/Contents/Resources/DWARF/BridgefySDK +0 -0
- package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64/dSYMs/BridgefySDK.framework.dSYM/Contents/Resources/Relocations/aarch64/BridgefySDK.yml +13545 -11802
- package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/BridgefySDK.framework/BridgefySDK +0 -0
- package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/BridgefySDK.framework/Headers/BridgefySDK-Swift.h +2 -2
- package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/BridgefySDK.framework/Info.plist +0 -0
- package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/BridgefySDK.framework/Modules/BridgefySDK.swiftmodule/arm64-apple-ios-simulator.abi.json +1668 -4363
- package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/BridgefySDK.framework/Modules/BridgefySDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +2 -3
- package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/BridgefySDK.framework/Modules/BridgefySDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/BridgefySDK.framework/Modules/BridgefySDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +2 -3
- package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/BridgefySDK.framework/Modules/BridgefySDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +1668 -4363
- package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/BridgefySDK.framework/Modules/BridgefySDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +2 -3
- package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/BridgefySDK.framework/Modules/BridgefySDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/BridgefySDK.framework/Modules/BridgefySDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +2 -3
- package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/BridgefySDK.framework/_CodeSignature/CodeResources +23 -23
- package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/BridgefySDK.framework.dSYM/Contents/Resources/DWARF/BridgefySDK +0 -0
- package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/BridgefySDK.framework.dSYM/Contents/Resources/Relocations/aarch64/BridgefySDK.yml +13233 -11406
- package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/BridgefySDK.framework.dSYM/Contents/Resources/Relocations/x86_64/BridgefySDK.yml +12854 -8157
- package/lib/commonjs/index.js +95 -18
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/infraestructure/index.js.map +1 -1
- package/lib/commonjs/infraestructure/interfaces/ibridgefy.js.map +1 -1
- package/lib/commonjs/infraestructure/interfaces/index.js.map +1 -1
- package/lib/commonjs/infraestructure/services/bridgefy_service.js.map +1 -1
- package/lib/commonjs/infraestructure/services/index.js.map +1 -1
- package/lib/module/index.js +91 -10
- package/lib/module/index.js.map +1 -1
- package/lib/module/infraestructure/index.js.map +1 -1
- package/lib/module/infraestructure/interfaces/ibridgefy.js.map +1 -1
- package/lib/module/infraestructure/interfaces/index.js.map +1 -1
- package/lib/module/infraestructure/services/bridgefy_service.js.map +1 -1
- package/lib/module/infraestructure/services/index.js.map +1 -1
- package/lib/typescript/index.d.ts +4 -4
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/infraestructure/interfaces/ibridgefy.d.ts +1 -1
- package/lib/typescript/infraestructure/interfaces/ibridgefy.d.ts.map +1 -1
- package/lib/typescript/infraestructure/services/bridgefy_service.d.ts +2 -2
- package/package.json +10 -9
- package/src/index.tsx +9 -4
- package/src/infraestructure/index.tsx +2 -2
- package/src/infraestructure/interfaces/ibridgefy.tsx +3 -3
- package/src/infraestructure/interfaces/index.tsx +1 -1
- package/src/infraestructure/services/bridgefy_service.tsx +4 -4
- package/src/infraestructure/services/index.tsx +1 -1
- package/android/gradlew +0 -234
- package/android/gradlew.bat +0 -89
- package/android/local.properties +0 -8
package/lib/commonjs/index.js
CHANGED
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.BridgefyTransmissionModeType = exports.BridgefyPropagationProfile = exports.BridgefyEvents = exports.BridgefyErrorType = exports.Bridgefy = void 0;
|
|
7
7
|
var _reactNative = require("react-native");
|
|
8
|
-
const LINKING_ERROR =
|
|
8
|
+
const LINKING_ERROR = "The package 'bridgefy-react-native' doesn't seem to be linked. Make sure: \n\n" + _reactNative.Platform.select({
|
|
9
9
|
ios: "- You have run 'pod install'\n",
|
|
10
10
|
default: ''
|
|
11
11
|
}) + '- You rebuilt the app after installing the package\n' + '- You are not using Expo Go\n';
|
|
@@ -16,7 +16,7 @@ const BridgefyReactNative = _reactNative.NativeModules.BridgefyReactNative ? _re
|
|
|
16
16
|
});
|
|
17
17
|
|
|
18
18
|
/** Profile that defines a series of properties and rules for the propagation of messages. */
|
|
19
|
-
let BridgefyPropagationProfile = /*#__PURE__*/function (BridgefyPropagationProfile) {
|
|
19
|
+
let BridgefyPropagationProfile = exports.BridgefyPropagationProfile = /*#__PURE__*/function (BridgefyPropagationProfile) {
|
|
20
20
|
BridgefyPropagationProfile["standard"] = "standard";
|
|
21
21
|
BridgefyPropagationProfile["highDensityNetwork"] = "highDensityNetwork";
|
|
22
22
|
BridgefyPropagationProfile["sparseNetwork"] = "sparseNetwork";
|
|
@@ -25,52 +25,90 @@ let BridgefyPropagationProfile = /*#__PURE__*/function (BridgefyPropagationProfi
|
|
|
25
25
|
return BridgefyPropagationProfile;
|
|
26
26
|
}({});
|
|
27
27
|
/** The mode used to propagate a message through nearby devices. */
|
|
28
|
-
exports.
|
|
29
|
-
|
|
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
30
|
BridgefyTransmissionModeType["p2p"] = "p2p";
|
|
31
|
+
/** Deliver a message to a specific recipient using nearby devices to propagate it. */
|
|
31
32
|
BridgefyTransmissionModeType["mesh"] = "mesh";
|
|
33
|
+
/** Propagate a message readable by every device that receives it. */
|
|
32
34
|
BridgefyTransmissionModeType["broadcast"] = "broadcast";
|
|
33
35
|
return BridgefyTransmissionModeType;
|
|
34
36
|
}({});
|
|
35
|
-
exports.BridgefyTransmissionModeType = BridgefyTransmissionModeType;
|
|
36
37
|
/** Describes errors in the Bridgefy error domain. */
|
|
37
|
-
let BridgefyErrorType = /*#__PURE__*/function (BridgefyErrorType) {
|
|
38
|
+
let BridgefyErrorType = exports.BridgefyErrorType = /*#__PURE__*/function (BridgefyErrorType) {
|
|
39
|
+
/** The Bridgefy SDK cannot run in the simulator */
|
|
38
40
|
BridgefyErrorType["simulatorIsNotSupported"] = "simulatorIsNotSupported";
|
|
41
|
+
/** The Bridgefy SDK is already running */
|
|
39
42
|
BridgefyErrorType["alreadyStarted"] = "alreadyStarted";
|
|
43
|
+
/** The provided API key is not valid */
|
|
40
44
|
BridgefyErrorType["invalidAPIKey"] = "invalidAPIKey";
|
|
45
|
+
/** The license is expired */
|
|
41
46
|
BridgefyErrorType["expiredLicense"] = "expiredLicense";
|
|
47
|
+
/** An error occurred while creating the session */
|
|
42
48
|
BridgefyErrorType["sessionError"] = "sessionError";
|
|
49
|
+
/** (iOS) The Bridgefy SDK hasn't been started */
|
|
43
50
|
BridgefyErrorType["notStarted"] = "notStarted";
|
|
51
|
+
/** (iOS) A Bridgefy SDK instance already exists */
|
|
44
52
|
BridgefyErrorType["alreadyInstantiated"] = "alreadyInstantiated";
|
|
53
|
+
/** (iOS) The Bridgefy SDK is performing the start process */
|
|
45
54
|
BridgefyErrorType["startInProgress"] = "startInProgress";
|
|
55
|
+
/** (iOS) The Bridgefy SDK service is not started */
|
|
46
56
|
BridgefyErrorType["serviceNotStarted"] = "serviceNotStarted";
|
|
57
|
+
/** (iOS) Cannot get app's bundle id */
|
|
47
58
|
BridgefyErrorType["missingBundleID"] = "missingBundleID";
|
|
59
|
+
/** (iOS) An internet connection is required to validate the license */
|
|
48
60
|
BridgefyErrorType["internetConnectionRequired"] = "internetConnectionRequired";
|
|
61
|
+
/** (iOS) The device's time has been modified */
|
|
49
62
|
BridgefyErrorType["inconsistentDeviceTime"] = "inconsistentDeviceTime";
|
|
63
|
+
/** (iOS) The user does not allow the use of BLE */
|
|
50
64
|
BridgefyErrorType["BLEUsageNotGranted"] = "BLEUsageNotGranted";
|
|
65
|
+
/** (iOS) The use of BLE in this device is restricted */
|
|
51
66
|
BridgefyErrorType["BLEUsageRestricted"] = "BLEUsageRestricted";
|
|
67
|
+
/** (iOS) The BLE antenna has been turned off */
|
|
52
68
|
BridgefyErrorType["BLEPoweredOff"] = "BLEPoweredOff";
|
|
69
|
+
/** (iOS) The usage of BLE is not supported in the device */
|
|
53
70
|
BridgefyErrorType["BLEUnsupported"] = "BLEUnsupported";
|
|
71
|
+
/** (iOS) BLE usage failed with an unknown error */
|
|
54
72
|
BridgefyErrorType["BLEUnknownError"] = "BLEUnknownError";
|
|
73
|
+
/** (iOS) Inconsistent connection */
|
|
55
74
|
BridgefyErrorType["inconsistentConnection"] = "inconsistentConnection";
|
|
75
|
+
/** (iOS) Connection is already secure */
|
|
56
76
|
BridgefyErrorType["connectionIsAlreadySecure"] = "connectionIsAlreadySecure";
|
|
77
|
+
/** (iOS) Cannot create secure connection */
|
|
57
78
|
BridgefyErrorType["cannotCreateSecureConnection"] = "cannotCreateSecureConnection";
|
|
79
|
+
/** (iOS) The length of the data exceed the maximum limit */
|
|
58
80
|
BridgefyErrorType["dataLengthExceeded"] = "dataLengthExceeded";
|
|
81
|
+
/** (iOS) The data to send is empty */
|
|
59
82
|
BridgefyErrorType["dataValueIsEmpty"] = "dataValueIsEmpty";
|
|
83
|
+
/** (iOS) The requested peer is not connected */
|
|
60
84
|
BridgefyErrorType["peerIsNotConnected"] = "peerIsNotConnected";
|
|
85
|
+
/** (iOS) An internal error occurred */
|
|
61
86
|
BridgefyErrorType["internalError"] = "internalError";
|
|
87
|
+
/** (iOS) An error occurred while validating the license */
|
|
62
88
|
BridgefyErrorType["licenseError"] = "licenseError";
|
|
89
|
+
/** (iOS) An error occurred while storing data */
|
|
63
90
|
BridgefyErrorType["storageError"] = "storageError";
|
|
91
|
+
/** (iOS) An error occurred while encoding the message */
|
|
64
92
|
BridgefyErrorType["encodingError"] = "encodingError";
|
|
93
|
+
/** (iOS) An error occurred while encrypting the message */
|
|
65
94
|
BridgefyErrorType["encryptionError"] = "encryptionError";
|
|
95
|
+
/** (Android) Missing application ID */
|
|
66
96
|
BridgefyErrorType["missingApplicationId"] = "missingApplicationId";
|
|
97
|
+
/** (Android) Permission exception */
|
|
67
98
|
BridgefyErrorType["permissionException"] = "permissionException";
|
|
99
|
+
/** (Android) Registration exception */
|
|
68
100
|
BridgefyErrorType["registrationException"] = "registrationException";
|
|
101
|
+
/** (Android) Size limit exceeded */
|
|
69
102
|
BridgefyErrorType["sizeLimitExceeded"] = "sizeLimitExceeded";
|
|
103
|
+
/** (Android) Device capabilities error */
|
|
70
104
|
BridgefyErrorType["deviceCapabilities"] = "deviceCapabilities";
|
|
105
|
+
/** (Android) Generic exception */
|
|
71
106
|
BridgefyErrorType["genericException"] = "genericException";
|
|
107
|
+
/** (Android) Inconsistent device time */
|
|
72
108
|
BridgefyErrorType["inconsistentDeviceTimeException"] = "inconsistentDeviceTimeException";
|
|
109
|
+
/** (Android) Internet connection required */
|
|
73
110
|
BridgefyErrorType["internetConnectionRequiredException"] = "internetConnectionRequiredException";
|
|
111
|
+
/** (Android) Unknown exception */
|
|
74
112
|
BridgefyErrorType["unknownException"] = "unknownException";
|
|
75
113
|
return BridgefyErrorType;
|
|
76
114
|
}({});
|
|
@@ -78,39 +116,78 @@ let BridgefyErrorType = /*#__PURE__*/function (BridgefyErrorType) {
|
|
|
78
116
|
* These events are available via subscriptions to the `NativeEventEmitter` using the
|
|
79
117
|
* `NativeModules.BridgefyReactNative` component. See README for further instructions.
|
|
80
118
|
*/
|
|
81
|
-
exports.
|
|
82
|
-
|
|
119
|
+
let BridgefyEvents = exports.BridgefyEvents = /*#__PURE__*/function (BridgefyEvents) {
|
|
120
|
+
/**
|
|
121
|
+
* This function is called when the BridgefySDK has been started.
|
|
122
|
+
*/
|
|
83
123
|
BridgefyEvents["bridgefyDidStart"] = "bridgefyDidStart";
|
|
124
|
+
/**
|
|
125
|
+
* This function is called when an error occurred while starting the BridgefySDK.
|
|
126
|
+
*/
|
|
84
127
|
BridgefyEvents["bridgefyDidFailToStart"] = "bridgefyDidFailToStart";
|
|
128
|
+
/**
|
|
129
|
+
* This function is called when the BridgefySDK has been stopped.
|
|
130
|
+
*/
|
|
85
131
|
BridgefyEvents["bridgefyDidStop"] = "bridgefyDidStop";
|
|
132
|
+
/**
|
|
133
|
+
* This function is called when an error occurred while stopping the BridgefySDK.
|
|
134
|
+
*/
|
|
86
135
|
BridgefyEvents["bridgefyDidFailToStop"] = "bridgefyDidFailToStop";
|
|
136
|
+
/**
|
|
137
|
+
* The current session was destroyed
|
|
138
|
+
*/
|
|
87
139
|
BridgefyEvents["bridgefyDidDestroySession"] = "bridgefyDidDestroySession";
|
|
140
|
+
/**
|
|
141
|
+
* An error occurred while destroying the current session
|
|
142
|
+
*/
|
|
88
143
|
BridgefyEvents["bridgefyDidFailToDestroySession"] = "bridgefyDidFailToDestroySession";
|
|
144
|
+
/**
|
|
145
|
+
* This function is called to notify a new connection.
|
|
146
|
+
*/
|
|
89
147
|
BridgefyEvents["bridgefyDidConnect"] = "bridgefyDidConnect";
|
|
148
|
+
/**
|
|
149
|
+
* This function is called to notify a disconnection.
|
|
150
|
+
*/
|
|
90
151
|
BridgefyEvents["bridgefyDidDisconnect"] = "bridgefyDidDisconnect";
|
|
152
|
+
/**
|
|
153
|
+
* This function is called to notify when an on-demand secure connection was established.
|
|
154
|
+
*/
|
|
91
155
|
BridgefyEvents["bridgefyDidEstablishSecureConnection"] = "bridgefyDidEstablishSecureConnection";
|
|
156
|
+
/**
|
|
157
|
+
* This function is called to notify when an on-demand secure connection could not be established.
|
|
158
|
+
*/
|
|
92
159
|
BridgefyEvents["bridgefyDidFailToEstablishSecureConnection"] = "bridgefyDidFailToEstablishSecureConnection";
|
|
160
|
+
/**
|
|
161
|
+
* This function is called when you confirm the sending of the message
|
|
162
|
+
*/
|
|
93
163
|
BridgefyEvents["bridgefyDidSendMessage"] = "bridgefyDidSendMessage";
|
|
164
|
+
/**
|
|
165
|
+
* This function is called when the message could not be sent
|
|
166
|
+
*/
|
|
94
167
|
BridgefyEvents["bridgefyDidFailSendingMessage"] = "bridgefyDidFailSendingMessage";
|
|
168
|
+
/**
|
|
169
|
+
* This function is called when a new message is received
|
|
170
|
+
*/
|
|
95
171
|
BridgefyEvents["bridgefyDidReceiveData"] = "bridgefyDidReceiveData";
|
|
172
|
+
/**
|
|
173
|
+
* (Android) Called when there is progress while transmitting data.
|
|
174
|
+
*/
|
|
96
175
|
BridgefyEvents["bridgefyDidSendDataProgress"] = "bridgefyDidSendDataProgress";
|
|
97
176
|
return BridgefyEvents;
|
|
98
177
|
}({});
|
|
99
178
|
/**
|
|
100
179
|
* Bridgefy
|
|
101
180
|
*/
|
|
102
|
-
exports.BridgefyEvents = BridgefyEvents;
|
|
103
181
|
class Bridgefy {
|
|
104
182
|
/**
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
async initialize(
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
} = _ref;
|
|
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
|
+
}) {
|
|
114
191
|
await BridgefyReactNative.initialize(apiKey, verboseLogging);
|
|
115
192
|
}
|
|
116
193
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","LINKING_ERROR","Platform","select","ios","default","BridgefyReactNative","NativeModules","Proxy","get","Error","BridgefyPropagationProfile","exports","BridgefyTransmissionModeType","BridgefyErrorType","BridgefyEvents","Bridgefy","initialize","
|
|
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,0BAAA,0BAA1BA,0BAA0B;EAA1BA,0BAA0B;EAA1BA,0BAA0B;EAA1BA,0BAA0B;EAA1BA,0BAA0B;EAA1BA,0BAA0B;EAAA,OAA1BA,0BAA0B;AAAA;AAQtC;AAAA,IACYE,4BAA4B,GAAAD,OAAA,CAAAC,4BAAA,0BAA5BA,4BAA4B;EACtC;EADUA,4BAA4B;EAGtC;EAHUA,4BAA4B;EAKtC;EALUA,4BAA4B;EAA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EAEA;AACF;AACA;AACA;AACA;AACA;AACA;EACE,MAAMC,IAAIA,CACRC,IAAY,EACZC,gBAA0C,EACzB;IACjB,MAAMC,MAAM,GAAG,MAAMzB,mBAAmB,CAACsB,IAAI,CAACC,IAAI,EAAEC,gBAAgB,CAAC;IACrE,OAAOC,MAAM,CAACC,SAAS;EACzB;;EAEA;AACF;AACA;AACA;EACE,MAAMC,yBAAyBA,CAACX,MAAc,EAAiB;IAC7D,OAAOhB,mBAAmB,CAAC2B,yBAAyB,CAACX,MAAM,CAAC;EAC9D;;EAEA;AACF;AACA;AACA;EACE,MAAMY,aAAaA,CAAA,EAAoB;IACrC,MAAMH,MAAM,GAAG,MAAMzB,mBAAmB,CAAC4B,aAAa,CAAC,CAAC;IACxD,OAAOH,MAAM,CAACT,MAAM;EACtB;;EAEA;AACF;AACA;AACA;EACE,MAAMa,cAAcA,CAAA,EAAsB;IACxC,MAAMJ,MAAM,GAAG,MAAMzB,mBAAmB,CAAC6B,cAAc,CAAC,CAAC;IACzD,OAAOJ,MAAM,CAACI,cAAc;EAC9B;;EAEA;AACF;AACA;AACA;EACE,MAAMC,qBAAqBA,CAAA,EAAkB;IAC3C,MAAML,MAAM,GAAG,MAAMzB,mBAAmB,CAAC8B,qBAAqB,CAAC,CAAC;IAChE,OAAO,IAAIC,IAAI,CAACN,MAAM,CAACK,qBAA+B,CAAC;EACzD;EAEA,MAAME,aAAaA,CAAA,EAAqB;IACtC,OAAO,MAAMhC,mBAAmB,CAACgC,aAAa,CAAC,CAAC;EAClD;EAEA,MAAMC,SAASA,CAAA,EAAqB;IAClC,OAAOjC,mBAAmB,CAACiC,SAAS,CAAC,CAAC;EACxC;AACF;AAAC3B,OAAA,CAAAI,QAAA,GAAAA,QAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
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"}
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["infraestructure/interfaces/ibridgefy.tsx"],"mappings":""}
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["infraestructure/interfaces/ibridgefy.tsx"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
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"}
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["infraestructure/services/bridgefy_service.tsx"],"mappings":""}
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["infraestructure/services/bridgefy_service.tsx"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
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"}
|
|
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":[]}
|
package/lib/module/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { NativeModules, Platform } from 'react-native';
|
|
2
|
-
const LINKING_ERROR =
|
|
2
|
+
const LINKING_ERROR = "The package 'bridgefy-react-native' doesn't seem to be linked. Make sure: \n\n" + Platform.select({
|
|
3
3
|
ios: "- You have run 'pod install'\n",
|
|
4
4
|
default: ''
|
|
5
5
|
}) + '- You rebuilt the app after installing the package\n' + '- You are not using Expo Go\n';
|
|
@@ -21,49 +21,89 @@ export let BridgefyPropagationProfile = /*#__PURE__*/function (BridgefyPropagati
|
|
|
21
21
|
|
|
22
22
|
/** The mode used to propagate a message through nearby devices. */
|
|
23
23
|
export let BridgefyTransmissionModeType = /*#__PURE__*/function (BridgefyTransmissionModeType) {
|
|
24
|
+
/** Deliver a message to a specific recipient only if there's an active connection with it. */
|
|
24
25
|
BridgefyTransmissionModeType["p2p"] = "p2p";
|
|
26
|
+
/** Deliver a message to a specific recipient using nearby devices to propagate it. */
|
|
25
27
|
BridgefyTransmissionModeType["mesh"] = "mesh";
|
|
28
|
+
/** Propagate a message readable by every device that receives it. */
|
|
26
29
|
BridgefyTransmissionModeType["broadcast"] = "broadcast";
|
|
27
30
|
return BridgefyTransmissionModeType;
|
|
28
31
|
}({});
|
|
29
32
|
/** Describes errors in the Bridgefy error domain. */
|
|
30
33
|
export let BridgefyErrorType = /*#__PURE__*/function (BridgefyErrorType) {
|
|
34
|
+
/** The Bridgefy SDK cannot run in the simulator */
|
|
31
35
|
BridgefyErrorType["simulatorIsNotSupported"] = "simulatorIsNotSupported";
|
|
36
|
+
/** The Bridgefy SDK is already running */
|
|
32
37
|
BridgefyErrorType["alreadyStarted"] = "alreadyStarted";
|
|
38
|
+
/** The provided API key is not valid */
|
|
33
39
|
BridgefyErrorType["invalidAPIKey"] = "invalidAPIKey";
|
|
40
|
+
/** The license is expired */
|
|
34
41
|
BridgefyErrorType["expiredLicense"] = "expiredLicense";
|
|
42
|
+
/** An error occurred while creating the session */
|
|
35
43
|
BridgefyErrorType["sessionError"] = "sessionError";
|
|
44
|
+
/** (iOS) The Bridgefy SDK hasn't been started */
|
|
36
45
|
BridgefyErrorType["notStarted"] = "notStarted";
|
|
46
|
+
/** (iOS) A Bridgefy SDK instance already exists */
|
|
37
47
|
BridgefyErrorType["alreadyInstantiated"] = "alreadyInstantiated";
|
|
48
|
+
/** (iOS) The Bridgefy SDK is performing the start process */
|
|
38
49
|
BridgefyErrorType["startInProgress"] = "startInProgress";
|
|
50
|
+
/** (iOS) The Bridgefy SDK service is not started */
|
|
39
51
|
BridgefyErrorType["serviceNotStarted"] = "serviceNotStarted";
|
|
52
|
+
/** (iOS) Cannot get app's bundle id */
|
|
40
53
|
BridgefyErrorType["missingBundleID"] = "missingBundleID";
|
|
54
|
+
/** (iOS) An internet connection is required to validate the license */
|
|
41
55
|
BridgefyErrorType["internetConnectionRequired"] = "internetConnectionRequired";
|
|
56
|
+
/** (iOS) The device's time has been modified */
|
|
42
57
|
BridgefyErrorType["inconsistentDeviceTime"] = "inconsistentDeviceTime";
|
|
58
|
+
/** (iOS) The user does not allow the use of BLE */
|
|
43
59
|
BridgefyErrorType["BLEUsageNotGranted"] = "BLEUsageNotGranted";
|
|
60
|
+
/** (iOS) The use of BLE in this device is restricted */
|
|
44
61
|
BridgefyErrorType["BLEUsageRestricted"] = "BLEUsageRestricted";
|
|
62
|
+
/** (iOS) The BLE antenna has been turned off */
|
|
45
63
|
BridgefyErrorType["BLEPoweredOff"] = "BLEPoweredOff";
|
|
64
|
+
/** (iOS) The usage of BLE is not supported in the device */
|
|
46
65
|
BridgefyErrorType["BLEUnsupported"] = "BLEUnsupported";
|
|
66
|
+
/** (iOS) BLE usage failed with an unknown error */
|
|
47
67
|
BridgefyErrorType["BLEUnknownError"] = "BLEUnknownError";
|
|
68
|
+
/** (iOS) Inconsistent connection */
|
|
48
69
|
BridgefyErrorType["inconsistentConnection"] = "inconsistentConnection";
|
|
70
|
+
/** (iOS) Connection is already secure */
|
|
49
71
|
BridgefyErrorType["connectionIsAlreadySecure"] = "connectionIsAlreadySecure";
|
|
72
|
+
/** (iOS) Cannot create secure connection */
|
|
50
73
|
BridgefyErrorType["cannotCreateSecureConnection"] = "cannotCreateSecureConnection";
|
|
74
|
+
/** (iOS) The length of the data exceed the maximum limit */
|
|
51
75
|
BridgefyErrorType["dataLengthExceeded"] = "dataLengthExceeded";
|
|
76
|
+
/** (iOS) The data to send is empty */
|
|
52
77
|
BridgefyErrorType["dataValueIsEmpty"] = "dataValueIsEmpty";
|
|
78
|
+
/** (iOS) The requested peer is not connected */
|
|
53
79
|
BridgefyErrorType["peerIsNotConnected"] = "peerIsNotConnected";
|
|
80
|
+
/** (iOS) An internal error occurred */
|
|
54
81
|
BridgefyErrorType["internalError"] = "internalError";
|
|
82
|
+
/** (iOS) An error occurred while validating the license */
|
|
55
83
|
BridgefyErrorType["licenseError"] = "licenseError";
|
|
84
|
+
/** (iOS) An error occurred while storing data */
|
|
56
85
|
BridgefyErrorType["storageError"] = "storageError";
|
|
86
|
+
/** (iOS) An error occurred while encoding the message */
|
|
57
87
|
BridgefyErrorType["encodingError"] = "encodingError";
|
|
88
|
+
/** (iOS) An error occurred while encrypting the message */
|
|
58
89
|
BridgefyErrorType["encryptionError"] = "encryptionError";
|
|
90
|
+
/** (Android) Missing application ID */
|
|
59
91
|
BridgefyErrorType["missingApplicationId"] = "missingApplicationId";
|
|
92
|
+
/** (Android) Permission exception */
|
|
60
93
|
BridgefyErrorType["permissionException"] = "permissionException";
|
|
94
|
+
/** (Android) Registration exception */
|
|
61
95
|
BridgefyErrorType["registrationException"] = "registrationException";
|
|
96
|
+
/** (Android) Size limit exceeded */
|
|
62
97
|
BridgefyErrorType["sizeLimitExceeded"] = "sizeLimitExceeded";
|
|
98
|
+
/** (Android) Device capabilities error */
|
|
63
99
|
BridgefyErrorType["deviceCapabilities"] = "deviceCapabilities";
|
|
100
|
+
/** (Android) Generic exception */
|
|
64
101
|
BridgefyErrorType["genericException"] = "genericException";
|
|
102
|
+
/** (Android) Inconsistent device time */
|
|
65
103
|
BridgefyErrorType["inconsistentDeviceTimeException"] = "inconsistentDeviceTimeException";
|
|
104
|
+
/** (Android) Internet connection required */
|
|
66
105
|
BridgefyErrorType["internetConnectionRequiredException"] = "internetConnectionRequiredException";
|
|
106
|
+
/** (Android) Unknown exception */
|
|
67
107
|
BridgefyErrorType["unknownException"] = "unknownException";
|
|
68
108
|
return BridgefyErrorType;
|
|
69
109
|
}({});
|
|
@@ -73,19 +113,61 @@ export let BridgefyErrorType = /*#__PURE__*/function (BridgefyErrorType) {
|
|
|
73
113
|
* `NativeModules.BridgefyReactNative` component. See README for further instructions.
|
|
74
114
|
*/
|
|
75
115
|
export let BridgefyEvents = /*#__PURE__*/function (BridgefyEvents) {
|
|
116
|
+
/**
|
|
117
|
+
* This function is called when the BridgefySDK has been started.
|
|
118
|
+
*/
|
|
76
119
|
BridgefyEvents["bridgefyDidStart"] = "bridgefyDidStart";
|
|
120
|
+
/**
|
|
121
|
+
* This function is called when an error occurred while starting the BridgefySDK.
|
|
122
|
+
*/
|
|
77
123
|
BridgefyEvents["bridgefyDidFailToStart"] = "bridgefyDidFailToStart";
|
|
124
|
+
/**
|
|
125
|
+
* This function is called when the BridgefySDK has been stopped.
|
|
126
|
+
*/
|
|
78
127
|
BridgefyEvents["bridgefyDidStop"] = "bridgefyDidStop";
|
|
128
|
+
/**
|
|
129
|
+
* This function is called when an error occurred while stopping the BridgefySDK.
|
|
130
|
+
*/
|
|
79
131
|
BridgefyEvents["bridgefyDidFailToStop"] = "bridgefyDidFailToStop";
|
|
132
|
+
/**
|
|
133
|
+
* The current session was destroyed
|
|
134
|
+
*/
|
|
80
135
|
BridgefyEvents["bridgefyDidDestroySession"] = "bridgefyDidDestroySession";
|
|
136
|
+
/**
|
|
137
|
+
* An error occurred while destroying the current session
|
|
138
|
+
*/
|
|
81
139
|
BridgefyEvents["bridgefyDidFailToDestroySession"] = "bridgefyDidFailToDestroySession";
|
|
140
|
+
/**
|
|
141
|
+
* This function is called to notify a new connection.
|
|
142
|
+
*/
|
|
82
143
|
BridgefyEvents["bridgefyDidConnect"] = "bridgefyDidConnect";
|
|
144
|
+
/**
|
|
145
|
+
* This function is called to notify a disconnection.
|
|
146
|
+
*/
|
|
83
147
|
BridgefyEvents["bridgefyDidDisconnect"] = "bridgefyDidDisconnect";
|
|
148
|
+
/**
|
|
149
|
+
* This function is called to notify when an on-demand secure connection was established.
|
|
150
|
+
*/
|
|
84
151
|
BridgefyEvents["bridgefyDidEstablishSecureConnection"] = "bridgefyDidEstablishSecureConnection";
|
|
152
|
+
/**
|
|
153
|
+
* This function is called to notify when an on-demand secure connection could not be established.
|
|
154
|
+
*/
|
|
85
155
|
BridgefyEvents["bridgefyDidFailToEstablishSecureConnection"] = "bridgefyDidFailToEstablishSecureConnection";
|
|
156
|
+
/**
|
|
157
|
+
* This function is called when you confirm the sending of the message
|
|
158
|
+
*/
|
|
86
159
|
BridgefyEvents["bridgefyDidSendMessage"] = "bridgefyDidSendMessage";
|
|
160
|
+
/**
|
|
161
|
+
* This function is called when the message could not be sent
|
|
162
|
+
*/
|
|
87
163
|
BridgefyEvents["bridgefyDidFailSendingMessage"] = "bridgefyDidFailSendingMessage";
|
|
164
|
+
/**
|
|
165
|
+
* This function is called when a new message is received
|
|
166
|
+
*/
|
|
88
167
|
BridgefyEvents["bridgefyDidReceiveData"] = "bridgefyDidReceiveData";
|
|
168
|
+
/**
|
|
169
|
+
* (Android) Called when there is progress while transmitting data.
|
|
170
|
+
*/
|
|
89
171
|
BridgefyEvents["bridgefyDidSendDataProgress"] = "bridgefyDidSendDataProgress";
|
|
90
172
|
return BridgefyEvents;
|
|
91
173
|
}({});
|
|
@@ -95,15 +177,14 @@ export let BridgefyEvents = /*#__PURE__*/function (BridgefyEvents) {
|
|
|
95
177
|
*/
|
|
96
178
|
export class Bridgefy {
|
|
97
179
|
/**
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
async initialize(
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
} = _ref;
|
|
180
|
+
* Initialize the SDK
|
|
181
|
+
* @param apiKey API key
|
|
182
|
+
* @param verboseLogging The log level.
|
|
183
|
+
*/
|
|
184
|
+
async initialize({
|
|
185
|
+
apiKey,
|
|
186
|
+
verboseLogging = false
|
|
187
|
+
}) {
|
|
107
188
|
await BridgefyReactNative.initialize(apiKey, verboseLogging);
|
|
108
189
|
}
|
|
109
190
|
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["NativeModules","Platform","LINKING_ERROR","select","ios","default","BridgefyReactNative","Proxy","get","Error","BridgefyPropagationProfile","BridgefyTransmissionModeType","BridgefyErrorType","BridgefyEvents","Bridgefy","initialize","
|
|
1
|
+
{"version":3,"names":["NativeModules","Platform","LINKING_ERROR","select","ios","default","BridgefyReactNative","Proxy","get","Error","BridgefyPropagationProfile","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,SAASA,aAAa,EAAEC,QAAQ,QAAQ,cAAc;AAOtD,MAAMC,aAAa,GACjB,gFAAgF,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;AACF;AACA;AACA;EACE,MAAMC,qBAAqBA,CAAA,EAAkB;IAC3C,MAAML,MAAM,GAAG,MAAMvB,mBAAmB,CAAC4B,qBAAqB,CAAC,CAAC;IAChE,OAAO,IAAIC,IAAI,CAACN,MAAM,CAACK,qBAA+B,CAAC;EACzD;EAEA,MAAME,aAAaA,CAAA,EAAqB;IACtC,OAAO,MAAM9B,mBAAmB,CAAC8B,aAAa,CAAC,CAAC;EAClD;EAEA,MAAMC,SAASA,CAAA,EAAqB;IAClC,OAAO/B,mBAAmB,CAAC+B,SAAS,CAAC,CAAC;EACxC;AACF","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["infraestructure/index.tsx"],"mappings":"AAAA,cAAc,cAAc;AAC5B,cAAc,YAAY"}
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["infraestructure/index.tsx"],"mappings":"AAAA,cAAc,cAAc;AAC5B,cAAc,YAAY","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["infraestructure/interfaces/ibridgefy.tsx"],"mappings":""}
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["infraestructure/interfaces/ibridgefy.tsx"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["infraestructure/interfaces/index.tsx"],"mappings":"AAAA,cAAc,aAAa"}
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["infraestructure/interfaces/index.tsx"],"mappings":"AAAA,cAAc,aAAa","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["infraestructure/services/bridgefy_service.tsx"],"mappings":""}
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["infraestructure/services/bridgefy_service.tsx"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["infraestructure/services/index.tsx"],"mappings":"AAAA,cAAc,oBAAoB"}
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["infraestructure/services/index.tsx"],"mappings":"AAAA,cAAc,oBAAoB","ignoreList":[]}
|
|
@@ -164,10 +164,10 @@ export declare enum BridgefyEvents {
|
|
|
164
164
|
*/
|
|
165
165
|
export declare class Bridgefy implements BridgefyService {
|
|
166
166
|
/**
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
167
|
+
* Initialize the SDK
|
|
168
|
+
* @param apiKey API key
|
|
169
|
+
* @param verboseLogging The log level.
|
|
170
|
+
*/
|
|
171
171
|
initialize({ apiKey, verboseLogging, }: IInitializeIn): Promise<void>;
|
|
172
172
|
/**
|
|
173
173
|
* Start Bridgefy SDK operations
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,
|
|
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,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AAC;IAKlB;;;OAGG;IACG,yBAAyB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI9D;;;OAGG;IACG,aAAa,IAAI,OAAO,CAAC,MAAM,CAAC;IAKtC;;;OAGG;IACG,cAAc,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAKzC;;;OAGG;IACG,qBAAqB,IAAI,OAAO,CAAC,IAAI,CAAC;IAKtC,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC;IAIjC,SAAS,IAAI,OAAO,CAAC,OAAO,CAAC;CAGpC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ibridgefy.d.ts","sourceRoot":"","sources":["../../../../src/infraestructure/interfaces/ibridgefy.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAE9D,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AACD,MAAM,WAAW,QAAQ;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kBAAkB,CAAC,EAAE,0BAA0B,
|
|
1
|
+
{"version":3,"file":"ibridgefy.d.ts","sourceRoot":"","sources":["../../../../src/infraestructure/interfaces/ibridgefy.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAE9D,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AACD,MAAM,WAAW,QAAQ;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kBAAkB,CAAC,EAAE,0BAA0B,CAAC;CACjD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { BridgefyTransmissionMode } from
|
|
2
|
-
import type { IInitializeIn, IStartIn } from
|
|
1
|
+
import type { BridgefyTransmissionMode } from 'bridgefy-react-native';
|
|
2
|
+
import type { IInitializeIn, IStartIn } from '../interfaces';
|
|
3
3
|
export interface BridgefyService {
|
|
4
4
|
initialize(params: IInitializeIn): Promise<void>;
|
|
5
5
|
start(params?: IStartIn): Promise<void>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bridgefy-react-native",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.7",
|
|
4
4
|
"description": "Bridgefy React Native SDK",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -55,23 +55,24 @@
|
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@commitlint/config-conventional": "^17.0.2",
|
|
58
|
-
"@evilmartians/lefthook": "^1.
|
|
59
|
-
"@react-native-community/eslint-config": "^3.0
|
|
58
|
+
"@evilmartians/lefthook": "^1.7.14",
|
|
59
|
+
"@react-native-community/eslint-config": "^3.2.0",
|
|
60
60
|
"@release-it/conventional-changelog": "^5.0.0",
|
|
61
61
|
"@types/jest": "^28.1.2",
|
|
62
62
|
"@types/react": "~17.0.21",
|
|
63
63
|
"@types/react-native": "0.70.0",
|
|
64
64
|
"commitlint": "^17.0.2",
|
|
65
65
|
"del-cli": "^5.0.0",
|
|
66
|
-
"eslint": "^8.
|
|
67
|
-
"eslint-config-prettier": "^8.
|
|
68
|
-
"eslint-plugin-prettier": "^4.
|
|
66
|
+
"eslint": "^8.57.0",
|
|
67
|
+
"eslint-config-prettier": "^8.10.0",
|
|
68
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
69
69
|
"jest": "^28.1.1",
|
|
70
70
|
"pod-install": "^0.1.0",
|
|
71
|
-
"prettier": "^2.
|
|
72
|
-
"react": "18.
|
|
73
|
-
"react-native": "0.
|
|
71
|
+
"prettier": "^2.8.8",
|
|
72
|
+
"react": "18.3.1",
|
|
73
|
+
"react-native": "0.76.6",
|
|
74
74
|
"react-native-builder-bob": "^0.21.0",
|
|
75
|
+
"metro-react-native-babel-preset": "^0.76.9",
|
|
75
76
|
"release-it": "^15.0.0",
|
|
76
77
|
"typescript": "^5.0.2"
|
|
77
78
|
},
|
package/src/index.tsx
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { NativeModules, Platform } from 'react-native';
|
|
2
|
-
import type {
|
|
2
|
+
import type {
|
|
3
|
+
BridgefyService,
|
|
4
|
+
IInitializeIn,
|
|
5
|
+
IStartIn,
|
|
6
|
+
} from './infraestructure';
|
|
3
7
|
|
|
4
8
|
const LINKING_ERROR =
|
|
5
|
-
|
|
9
|
+
"The package 'bridgefy-react-native' doesn't seem to be linked. Make sure: \n\n" +
|
|
6
10
|
Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) +
|
|
7
11
|
'- You rebuilt the app after installing the package\n' +
|
|
8
12
|
'- You are not using Expo Go\n';
|
|
@@ -187,7 +191,7 @@ export enum BridgefyEvents {
|
|
|
187
191
|
* Bridgefy
|
|
188
192
|
*/
|
|
189
193
|
export class Bridgefy implements BridgefyService {
|
|
190
|
-
|
|
194
|
+
/**
|
|
191
195
|
* Initialize the SDK
|
|
192
196
|
* @param apiKey API key
|
|
193
197
|
* @param verboseLogging The log level.
|
|
@@ -204,7 +208,8 @@ export class Bridgefy implements BridgefyService {
|
|
|
204
208
|
*/
|
|
205
209
|
async start(params?: IStartIn): Promise<void> {
|
|
206
210
|
const userId = params?.userId ?? null;
|
|
207
|
-
const propagationProfile =
|
|
211
|
+
const propagationProfile =
|
|
212
|
+
params?.propagationProfile ?? BridgefyPropagationProfile.standard;
|
|
208
213
|
return await BridgefyReactNative.start(userId, propagationProfile);
|
|
209
214
|
}
|
|
210
215
|
|