bridgefy-react-native 1.1.4 → 1.1.5
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/lib/commonjs/index.js +201 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/infraestructure/index.js +28 -0
- package/lib/commonjs/infraestructure/index.js.map +1 -0
- package/lib/commonjs/infraestructure/interfaces/ibridgefy.js +6 -0
- package/lib/commonjs/infraestructure/interfaces/ibridgefy.js.map +1 -0
- package/lib/commonjs/infraestructure/interfaces/index.js +17 -0
- package/lib/commonjs/infraestructure/interfaces/index.js.map +1 -0
- package/lib/commonjs/infraestructure/services/bridgefy_service.js +6 -0
- package/lib/commonjs/infraestructure/services/bridgefy_service.js.map +1 -0
- package/lib/commonjs/infraestructure/services/index.js +17 -0
- package/lib/commonjs/infraestructure/services/index.js.map +1 -0
- package/lib/module/index.js +193 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/infraestructure/index.js +3 -0
- package/lib/module/infraestructure/index.js.map +1 -0
- package/lib/module/infraestructure/interfaces/ibridgefy.js +2 -0
- package/lib/module/infraestructure/interfaces/ibridgefy.js.map +1 -0
- package/lib/module/infraestructure/interfaces/index.js +2 -0
- package/lib/module/infraestructure/interfaces/index.js.map +1 -0
- package/lib/module/infraestructure/services/bridgefy_service.js +2 -0
- package/lib/module/infraestructure/services/bridgefy_service.js.map +1 -0
- package/lib/module/infraestructure/services/index.js +2 -0
- package/lib/module/infraestructure/services/index.js.map +1 -0
- package/lib/typescript/index.d.ts +219 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/infraestructure/index.d.ts +3 -0
- package/lib/typescript/infraestructure/index.d.ts.map +1 -0
- package/lib/typescript/infraestructure/interfaces/ibridgefy.d.ts +10 -0
- package/lib/typescript/infraestructure/interfaces/ibridgefy.d.ts.map +1 -0
- package/lib/typescript/infraestructure/interfaces/index.d.ts +2 -0
- package/lib/typescript/infraestructure/interfaces/index.d.ts.map +1 -0
- package/lib/typescript/infraestructure/services/bridgefy_service.d.ts +17 -0
- package/lib/typescript/infraestructure/services/bridgefy_service.d.ts.map +1 -0
- package/lib/typescript/infraestructure/services/index.d.ts +2 -0
- package/lib/typescript/infraestructure/services/index.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,201 @@
|
|
|
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 = /*#__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
|
+
exports.BridgefyPropagationProfile = BridgefyPropagationProfile;
|
|
29
|
+
let BridgefyTransmissionModeType = /*#__PURE__*/function (BridgefyTransmissionModeType) {
|
|
30
|
+
BridgefyTransmissionModeType["p2p"] = "p2p";
|
|
31
|
+
BridgefyTransmissionModeType["mesh"] = "mesh";
|
|
32
|
+
BridgefyTransmissionModeType["broadcast"] = "broadcast";
|
|
33
|
+
return BridgefyTransmissionModeType;
|
|
34
|
+
}({});
|
|
35
|
+
exports.BridgefyTransmissionModeType = BridgefyTransmissionModeType;
|
|
36
|
+
/** Describes errors in the Bridgefy error domain. */
|
|
37
|
+
let BridgefyErrorType = /*#__PURE__*/function (BridgefyErrorType) {
|
|
38
|
+
BridgefyErrorType["simulatorIsNotSupported"] = "simulatorIsNotSupported";
|
|
39
|
+
BridgefyErrorType["alreadyStarted"] = "alreadyStarted";
|
|
40
|
+
BridgefyErrorType["invalidAPIKey"] = "invalidAPIKey";
|
|
41
|
+
BridgefyErrorType["expiredLicense"] = "expiredLicense";
|
|
42
|
+
BridgefyErrorType["sessionError"] = "sessionError";
|
|
43
|
+
BridgefyErrorType["notStarted"] = "notStarted";
|
|
44
|
+
BridgefyErrorType["alreadyInstantiated"] = "alreadyInstantiated";
|
|
45
|
+
BridgefyErrorType["startInProgress"] = "startInProgress";
|
|
46
|
+
BridgefyErrorType["serviceNotStarted"] = "serviceNotStarted";
|
|
47
|
+
BridgefyErrorType["missingBundleID"] = "missingBundleID";
|
|
48
|
+
BridgefyErrorType["internetConnectionRequired"] = "internetConnectionRequired";
|
|
49
|
+
BridgefyErrorType["inconsistentDeviceTime"] = "inconsistentDeviceTime";
|
|
50
|
+
BridgefyErrorType["BLEUsageNotGranted"] = "BLEUsageNotGranted";
|
|
51
|
+
BridgefyErrorType["BLEUsageRestricted"] = "BLEUsageRestricted";
|
|
52
|
+
BridgefyErrorType["BLEPoweredOff"] = "BLEPoweredOff";
|
|
53
|
+
BridgefyErrorType["BLEUnsupported"] = "BLEUnsupported";
|
|
54
|
+
BridgefyErrorType["BLEUnknownError"] = "BLEUnknownError";
|
|
55
|
+
BridgefyErrorType["inconsistentConnection"] = "inconsistentConnection";
|
|
56
|
+
BridgefyErrorType["connectionIsAlreadySecure"] = "connectionIsAlreadySecure";
|
|
57
|
+
BridgefyErrorType["cannotCreateSecureConnection"] = "cannotCreateSecureConnection";
|
|
58
|
+
BridgefyErrorType["dataLengthExceeded"] = "dataLengthExceeded";
|
|
59
|
+
BridgefyErrorType["dataValueIsEmpty"] = "dataValueIsEmpty";
|
|
60
|
+
BridgefyErrorType["peerIsNotConnected"] = "peerIsNotConnected";
|
|
61
|
+
BridgefyErrorType["internalError"] = "internalError";
|
|
62
|
+
BridgefyErrorType["licenseError"] = "licenseError";
|
|
63
|
+
BridgefyErrorType["storageError"] = "storageError";
|
|
64
|
+
BridgefyErrorType["encodingError"] = "encodingError";
|
|
65
|
+
BridgefyErrorType["encryptionError"] = "encryptionError";
|
|
66
|
+
BridgefyErrorType["missingApplicationId"] = "missingApplicationId";
|
|
67
|
+
BridgefyErrorType["permissionException"] = "permissionException";
|
|
68
|
+
BridgefyErrorType["registrationException"] = "registrationException";
|
|
69
|
+
BridgefyErrorType["sizeLimitExceeded"] = "sizeLimitExceeded";
|
|
70
|
+
BridgefyErrorType["deviceCapabilities"] = "deviceCapabilities";
|
|
71
|
+
BridgefyErrorType["genericException"] = "genericException";
|
|
72
|
+
BridgefyErrorType["inconsistentDeviceTimeException"] = "inconsistentDeviceTimeException";
|
|
73
|
+
BridgefyErrorType["internetConnectionRequiredException"] = "internetConnectionRequiredException";
|
|
74
|
+
BridgefyErrorType["unknownException"] = "unknownException";
|
|
75
|
+
return BridgefyErrorType;
|
|
76
|
+
}({});
|
|
77
|
+
/**
|
|
78
|
+
* These events are available via subscriptions to the `NativeEventEmitter` using the
|
|
79
|
+
* `NativeModules.BridgefyReactNative` component. See README for further instructions.
|
|
80
|
+
*/
|
|
81
|
+
exports.BridgefyErrorType = BridgefyErrorType;
|
|
82
|
+
let BridgefyEvents = /*#__PURE__*/function (BridgefyEvents) {
|
|
83
|
+
BridgefyEvents["bridgefyDidStart"] = "bridgefyDidStart";
|
|
84
|
+
BridgefyEvents["bridgefyDidFailToStart"] = "bridgefyDidFailToStart";
|
|
85
|
+
BridgefyEvents["bridgefyDidStop"] = "bridgefyDidStop";
|
|
86
|
+
BridgefyEvents["bridgefyDidFailToStop"] = "bridgefyDidFailToStop";
|
|
87
|
+
BridgefyEvents["bridgefyDidDestroySession"] = "bridgefyDidDestroySession";
|
|
88
|
+
BridgefyEvents["bridgefyDidFailToDestroySession"] = "bridgefyDidFailToDestroySession";
|
|
89
|
+
BridgefyEvents["bridgefyDidConnect"] = "bridgefyDidConnect";
|
|
90
|
+
BridgefyEvents["bridgefyDidDisconnect"] = "bridgefyDidDisconnect";
|
|
91
|
+
BridgefyEvents["bridgefyDidEstablishSecureConnection"] = "bridgefyDidEstablishSecureConnection";
|
|
92
|
+
BridgefyEvents["bridgefyDidFailToEstablishSecureConnection"] = "bridgefyDidFailToEstablishSecureConnection";
|
|
93
|
+
BridgefyEvents["bridgefyDidSendMessage"] = "bridgefyDidSendMessage";
|
|
94
|
+
BridgefyEvents["bridgefyDidFailSendingMessage"] = "bridgefyDidFailSendingMessage";
|
|
95
|
+
BridgefyEvents["bridgefyDidReceiveData"] = "bridgefyDidReceiveData";
|
|
96
|
+
BridgefyEvents["bridgefyDidSendDataProgress"] = "bridgefyDidSendDataProgress";
|
|
97
|
+
return BridgefyEvents;
|
|
98
|
+
}({});
|
|
99
|
+
/**
|
|
100
|
+
* Bridgefy
|
|
101
|
+
*/
|
|
102
|
+
exports.BridgefyEvents = BridgefyEvents;
|
|
103
|
+
class Bridgefy {
|
|
104
|
+
/**
|
|
105
|
+
* Initialize the SDK
|
|
106
|
+
* @param apiKey API key
|
|
107
|
+
* @param verboseLogging The log level.
|
|
108
|
+
*/
|
|
109
|
+
async initialize(_ref) {
|
|
110
|
+
let {
|
|
111
|
+
apiKey,
|
|
112
|
+
verboseLogging = false
|
|
113
|
+
} = _ref;
|
|
114
|
+
await BridgefyReactNative.initialize(apiKey, verboseLogging);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Start Bridgefy SDK operations
|
|
119
|
+
*/
|
|
120
|
+
async start(params) {
|
|
121
|
+
const userId = (params === null || params === void 0 ? void 0 : params.userId) ?? null;
|
|
122
|
+
const propagationProfile = (params === null || params === void 0 ? void 0 : params.propagationProfile) ?? BridgefyPropagationProfile.standard;
|
|
123
|
+
return await BridgefyReactNative.start(userId, propagationProfile);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Stop Bridgefy SDK operations
|
|
128
|
+
*/
|
|
129
|
+
async stop() {
|
|
130
|
+
return await BridgefyReactNative.stop();
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Destroy current session
|
|
135
|
+
*/
|
|
136
|
+
async destroySession() {
|
|
137
|
+
return BridgefyReactNative.destroySession();
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Update license
|
|
142
|
+
*/
|
|
143
|
+
async updateLicense() {
|
|
144
|
+
return BridgefyReactNative.updateLicense();
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Function used to send data using a ``TransmissionMode``. This method returns a UUID to identify
|
|
149
|
+
* the message sent.
|
|
150
|
+
* @param data The message data
|
|
151
|
+
* @param transmissionMode The mode used to propagate a message through nearby devices.
|
|
152
|
+
* @returns The id of the message that was sent.
|
|
153
|
+
*/
|
|
154
|
+
async send(data, transmissionMode) {
|
|
155
|
+
const result = await BridgefyReactNative.send(data, transmissionMode);
|
|
156
|
+
return result.messageId;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Establishes a secure connection with the specified user
|
|
161
|
+
* @param userId The UUID of the user with whom a secure connection should be established.
|
|
162
|
+
*/
|
|
163
|
+
async establishSecureConnection(userId) {
|
|
164
|
+
return BridgefyReactNative.establishSecureConnection(userId);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Get current user Id
|
|
169
|
+
* @returns User Id
|
|
170
|
+
*/
|
|
171
|
+
async currentUserId() {
|
|
172
|
+
const result = await BridgefyReactNative.currentUserId();
|
|
173
|
+
return result.userId;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Returns connected peers
|
|
178
|
+
* @returns List of connected peers
|
|
179
|
+
*/
|
|
180
|
+
async connectedPeers() {
|
|
181
|
+
const result = await BridgefyReactNative.connectedPeers();
|
|
182
|
+
return result.connectedPeers;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Returns license expiration date
|
|
187
|
+
* @returns Expiration date
|
|
188
|
+
*/
|
|
189
|
+
async licenseExpirationDate() {
|
|
190
|
+
const result = await BridgefyReactNative.licenseExpirationDate();
|
|
191
|
+
return new Date(result.licenseExpirationDate);
|
|
192
|
+
}
|
|
193
|
+
async isInitialized() {
|
|
194
|
+
return await BridgefyReactNative.isInitialized();
|
|
195
|
+
}
|
|
196
|
+
async isStarted() {
|
|
197
|
+
return BridgefyReactNative.isStarted();
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
exports.Bridgefy = Bridgefy;
|
|
201
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +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","_ref","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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;EAClD;EAEA,MAAMC,SAASA,CAAA,EAAqB;IAClC,OAAOlC,mBAAmB,CAACkC,SAAS,CAAC,CAAC;EACxC;AACF;AAAC5B,OAAA,CAAAI,QAAA,GAAAA,QAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["infraestructure/interfaces/ibridgefy.tsx"],"mappings":""}
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["infraestructure/services/bridgefy_service.tsx"],"mappings":""}
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import { NativeModules, Platform } from 'react-native';
|
|
2
|
+
const LINKING_ERROR = `The package 'bridgefy-react-native' doesn't seem to be linked. Make sure: \n\n` + Platform.select({
|
|
3
|
+
ios: "- You have run 'pod install'\n",
|
|
4
|
+
default: ''
|
|
5
|
+
}) + '- You rebuilt the app after installing the package\n' + '- You are not using Expo Go\n';
|
|
6
|
+
const BridgefyReactNative = NativeModules.BridgefyReactNative ? NativeModules.BridgefyReactNative : new Proxy({}, {
|
|
7
|
+
get() {
|
|
8
|
+
throw new Error(LINKING_ERROR);
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
/** Profile that defines a series of properties and rules for the propagation of messages. */
|
|
13
|
+
export let BridgefyPropagationProfile = /*#__PURE__*/function (BridgefyPropagationProfile) {
|
|
14
|
+
BridgefyPropagationProfile["standard"] = "standard";
|
|
15
|
+
BridgefyPropagationProfile["highDensityNetwork"] = "highDensityNetwork";
|
|
16
|
+
BridgefyPropagationProfile["sparseNetwork"] = "sparseNetwork";
|
|
17
|
+
BridgefyPropagationProfile["longReach"] = "longReach";
|
|
18
|
+
BridgefyPropagationProfile["shortReach"] = "shortReach";
|
|
19
|
+
return BridgefyPropagationProfile;
|
|
20
|
+
}({});
|
|
21
|
+
|
|
22
|
+
/** The mode used to propagate a message through nearby devices. */
|
|
23
|
+
export let BridgefyTransmissionModeType = /*#__PURE__*/function (BridgefyTransmissionModeType) {
|
|
24
|
+
BridgefyTransmissionModeType["p2p"] = "p2p";
|
|
25
|
+
BridgefyTransmissionModeType["mesh"] = "mesh";
|
|
26
|
+
BridgefyTransmissionModeType["broadcast"] = "broadcast";
|
|
27
|
+
return BridgefyTransmissionModeType;
|
|
28
|
+
}({});
|
|
29
|
+
/** Describes errors in the Bridgefy error domain. */
|
|
30
|
+
export let BridgefyErrorType = /*#__PURE__*/function (BridgefyErrorType) {
|
|
31
|
+
BridgefyErrorType["simulatorIsNotSupported"] = "simulatorIsNotSupported";
|
|
32
|
+
BridgefyErrorType["alreadyStarted"] = "alreadyStarted";
|
|
33
|
+
BridgefyErrorType["invalidAPIKey"] = "invalidAPIKey";
|
|
34
|
+
BridgefyErrorType["expiredLicense"] = "expiredLicense";
|
|
35
|
+
BridgefyErrorType["sessionError"] = "sessionError";
|
|
36
|
+
BridgefyErrorType["notStarted"] = "notStarted";
|
|
37
|
+
BridgefyErrorType["alreadyInstantiated"] = "alreadyInstantiated";
|
|
38
|
+
BridgefyErrorType["startInProgress"] = "startInProgress";
|
|
39
|
+
BridgefyErrorType["serviceNotStarted"] = "serviceNotStarted";
|
|
40
|
+
BridgefyErrorType["missingBundleID"] = "missingBundleID";
|
|
41
|
+
BridgefyErrorType["internetConnectionRequired"] = "internetConnectionRequired";
|
|
42
|
+
BridgefyErrorType["inconsistentDeviceTime"] = "inconsistentDeviceTime";
|
|
43
|
+
BridgefyErrorType["BLEUsageNotGranted"] = "BLEUsageNotGranted";
|
|
44
|
+
BridgefyErrorType["BLEUsageRestricted"] = "BLEUsageRestricted";
|
|
45
|
+
BridgefyErrorType["BLEPoweredOff"] = "BLEPoweredOff";
|
|
46
|
+
BridgefyErrorType["BLEUnsupported"] = "BLEUnsupported";
|
|
47
|
+
BridgefyErrorType["BLEUnknownError"] = "BLEUnknownError";
|
|
48
|
+
BridgefyErrorType["inconsistentConnection"] = "inconsistentConnection";
|
|
49
|
+
BridgefyErrorType["connectionIsAlreadySecure"] = "connectionIsAlreadySecure";
|
|
50
|
+
BridgefyErrorType["cannotCreateSecureConnection"] = "cannotCreateSecureConnection";
|
|
51
|
+
BridgefyErrorType["dataLengthExceeded"] = "dataLengthExceeded";
|
|
52
|
+
BridgefyErrorType["dataValueIsEmpty"] = "dataValueIsEmpty";
|
|
53
|
+
BridgefyErrorType["peerIsNotConnected"] = "peerIsNotConnected";
|
|
54
|
+
BridgefyErrorType["internalError"] = "internalError";
|
|
55
|
+
BridgefyErrorType["licenseError"] = "licenseError";
|
|
56
|
+
BridgefyErrorType["storageError"] = "storageError";
|
|
57
|
+
BridgefyErrorType["encodingError"] = "encodingError";
|
|
58
|
+
BridgefyErrorType["encryptionError"] = "encryptionError";
|
|
59
|
+
BridgefyErrorType["missingApplicationId"] = "missingApplicationId";
|
|
60
|
+
BridgefyErrorType["permissionException"] = "permissionException";
|
|
61
|
+
BridgefyErrorType["registrationException"] = "registrationException";
|
|
62
|
+
BridgefyErrorType["sizeLimitExceeded"] = "sizeLimitExceeded";
|
|
63
|
+
BridgefyErrorType["deviceCapabilities"] = "deviceCapabilities";
|
|
64
|
+
BridgefyErrorType["genericException"] = "genericException";
|
|
65
|
+
BridgefyErrorType["inconsistentDeviceTimeException"] = "inconsistentDeviceTimeException";
|
|
66
|
+
BridgefyErrorType["internetConnectionRequiredException"] = "internetConnectionRequiredException";
|
|
67
|
+
BridgefyErrorType["unknownException"] = "unknownException";
|
|
68
|
+
return BridgefyErrorType;
|
|
69
|
+
}({});
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* These events are available via subscriptions to the `NativeEventEmitter` using the
|
|
73
|
+
* `NativeModules.BridgefyReactNative` component. See README for further instructions.
|
|
74
|
+
*/
|
|
75
|
+
export let BridgefyEvents = /*#__PURE__*/function (BridgefyEvents) {
|
|
76
|
+
BridgefyEvents["bridgefyDidStart"] = "bridgefyDidStart";
|
|
77
|
+
BridgefyEvents["bridgefyDidFailToStart"] = "bridgefyDidFailToStart";
|
|
78
|
+
BridgefyEvents["bridgefyDidStop"] = "bridgefyDidStop";
|
|
79
|
+
BridgefyEvents["bridgefyDidFailToStop"] = "bridgefyDidFailToStop";
|
|
80
|
+
BridgefyEvents["bridgefyDidDestroySession"] = "bridgefyDidDestroySession";
|
|
81
|
+
BridgefyEvents["bridgefyDidFailToDestroySession"] = "bridgefyDidFailToDestroySession";
|
|
82
|
+
BridgefyEvents["bridgefyDidConnect"] = "bridgefyDidConnect";
|
|
83
|
+
BridgefyEvents["bridgefyDidDisconnect"] = "bridgefyDidDisconnect";
|
|
84
|
+
BridgefyEvents["bridgefyDidEstablishSecureConnection"] = "bridgefyDidEstablishSecureConnection";
|
|
85
|
+
BridgefyEvents["bridgefyDidFailToEstablishSecureConnection"] = "bridgefyDidFailToEstablishSecureConnection";
|
|
86
|
+
BridgefyEvents["bridgefyDidSendMessage"] = "bridgefyDidSendMessage";
|
|
87
|
+
BridgefyEvents["bridgefyDidFailSendingMessage"] = "bridgefyDidFailSendingMessage";
|
|
88
|
+
BridgefyEvents["bridgefyDidReceiveData"] = "bridgefyDidReceiveData";
|
|
89
|
+
BridgefyEvents["bridgefyDidSendDataProgress"] = "bridgefyDidSendDataProgress";
|
|
90
|
+
return BridgefyEvents;
|
|
91
|
+
}({});
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Bridgefy
|
|
95
|
+
*/
|
|
96
|
+
export class Bridgefy {
|
|
97
|
+
/**
|
|
98
|
+
* Initialize the SDK
|
|
99
|
+
* @param apiKey API key
|
|
100
|
+
* @param verboseLogging The log level.
|
|
101
|
+
*/
|
|
102
|
+
async initialize(_ref) {
|
|
103
|
+
let {
|
|
104
|
+
apiKey,
|
|
105
|
+
verboseLogging = false
|
|
106
|
+
} = _ref;
|
|
107
|
+
await BridgefyReactNative.initialize(apiKey, verboseLogging);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Start Bridgefy SDK operations
|
|
112
|
+
*/
|
|
113
|
+
async start(params) {
|
|
114
|
+
const userId = (params === null || params === void 0 ? void 0 : params.userId) ?? null;
|
|
115
|
+
const propagationProfile = (params === null || params === void 0 ? void 0 : params.propagationProfile) ?? BridgefyPropagationProfile.standard;
|
|
116
|
+
return await BridgefyReactNative.start(userId, propagationProfile);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Stop Bridgefy SDK operations
|
|
121
|
+
*/
|
|
122
|
+
async stop() {
|
|
123
|
+
return await BridgefyReactNative.stop();
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Destroy current session
|
|
128
|
+
*/
|
|
129
|
+
async destroySession() {
|
|
130
|
+
return BridgefyReactNative.destroySession();
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Update license
|
|
135
|
+
*/
|
|
136
|
+
async updateLicense() {
|
|
137
|
+
return BridgefyReactNative.updateLicense();
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Function used to send data using a ``TransmissionMode``. This method returns a UUID to identify
|
|
142
|
+
* the message sent.
|
|
143
|
+
* @param data The message data
|
|
144
|
+
* @param transmissionMode The mode used to propagate a message through nearby devices.
|
|
145
|
+
* @returns The id of the message that was sent.
|
|
146
|
+
*/
|
|
147
|
+
async send(data, transmissionMode) {
|
|
148
|
+
const result = await BridgefyReactNative.send(data, transmissionMode);
|
|
149
|
+
return result.messageId;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Establishes a secure connection with the specified user
|
|
154
|
+
* @param userId The UUID of the user with whom a secure connection should be established.
|
|
155
|
+
*/
|
|
156
|
+
async establishSecureConnection(userId) {
|
|
157
|
+
return BridgefyReactNative.establishSecureConnection(userId);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Get current user Id
|
|
162
|
+
* @returns User Id
|
|
163
|
+
*/
|
|
164
|
+
async currentUserId() {
|
|
165
|
+
const result = await BridgefyReactNative.currentUserId();
|
|
166
|
+
return result.userId;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Returns connected peers
|
|
171
|
+
* @returns List of connected peers
|
|
172
|
+
*/
|
|
173
|
+
async connectedPeers() {
|
|
174
|
+
const result = await BridgefyReactNative.connectedPeers();
|
|
175
|
+
return result.connectedPeers;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Returns license expiration date
|
|
180
|
+
* @returns Expiration date
|
|
181
|
+
*/
|
|
182
|
+
async licenseExpirationDate() {
|
|
183
|
+
const result = await BridgefyReactNative.licenseExpirationDate();
|
|
184
|
+
return new Date(result.licenseExpirationDate);
|
|
185
|
+
}
|
|
186
|
+
async isInitialized() {
|
|
187
|
+
return await BridgefyReactNative.isInitialized();
|
|
188
|
+
}
|
|
189
|
+
async isStarted() {
|
|
190
|
+
return BridgefyReactNative.isStarted();
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["NativeModules","Platform","LINKING_ERROR","select","ios","default","BridgefyReactNative","Proxy","get","Error","BridgefyPropagationProfile","BridgefyTransmissionModeType","BridgefyErrorType","BridgefyEvents","Bridgefy","initialize","_ref","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;AAGtD,MAAMC,aAAa,GAChB,gFAA+E,GAChFD,QAAQ,CAACE,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,+BAA+B;AAEjC,MAAMC,mBAAmB,GAAGN,aAAa,CAACM,mBAAmB,GACzDN,aAAa,CAACM,mBAAmB,GACjC,IAAIC,KAAK,CACP,CAAC,CAAC,EACF;EACEC,GAAGA,CAAA,EAAG;IACJ,MAAM,IAAIC,K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AAyBA,CAACX,MAAc,EAAiB;IAC7D,OAAOf,mBAAmB,CAAC0B,yBAAyB,CAACX,MAAM,CAAC;EAC9D;;EAEA;AACF;AACA;AACA;EACE,MAAMY,aAAaA,CAAA,EAAoB;IACrC,MAAMH,MAAM,GAAG,MAAMxB,mBAAmB,CAAC2B,aAAa,CAAC,CAAC;IACxD,OAAOH,MAAM,CAACT,MAAM;EACtB;;EAEA;AACF;AACA;AACA;EACE,MAAMa,cAAcA,CAAA,EAAsB;IACxC,MAAMJ,MAAM,GAAG,MAAMxB,mBAAmB,CAAC4B,cAAc,CAAC,CAAC;IACzD,OAAOJ,MAAM,CAACI,cAAc;EAC9B;;EAEA;AACF;AACA;AACA;EACE,MAAMC,qBAAqBA,CAAA,EAAkB;IAC3C,MAAML,MAAM,GAAG,MAAMxB,mBAAmB,CAAC6B,qBAAqB,CAAC,CAAC;IAChE,OAAO,IAAIC,IAAI,CAACN,MAAM,CAACK,qBAA+B,CAAC;EACzD;EAEA,MAAME,aAAaA,CAAA,EAAqB;IACtC,OAAO,MAAM/B,mBAAmB,CAAC+B,aAAa,CAAC,CAAC;EAClD;EAEA,MAAMC,SAASA,CAAA,EAAqB;IAClC,OAAOhC,mBAAmB,CAACgC,SAAS,CAAC,CAAC;EACxC;AACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["infraestructure/index.tsx"],"mappings":"AAAA,cAAc,cAAc;AAC5B,cAAc,YAAY"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["infraestructure/interfaces/ibridgefy.tsx"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["infraestructure/interfaces/index.tsx"],"mappings":"AAAA,cAAc,aAAa"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["infraestructure/services/bridgefy_service.tsx"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["infraestructure/services/index.tsx"],"mappings":"AAAA,cAAc,oBAAoB"}
|
|
@@ -0,0 +1,219 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAmBlF,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;IAC7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,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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/infraestructure/index.tsx"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { BridgefyPropagationProfile } from "../../index";
|
|
2
|
+
export interface IInitializeIn {
|
|
3
|
+
apiKey: string;
|
|
4
|
+
verboseLogging?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface IStartIn {
|
|
7
|
+
userId?: string;
|
|
8
|
+
propagationProfile?: BridgefyPropagationProfile;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=ibridgefy.d.ts.map
|
|
@@ -0,0 +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,CAAA;CAChD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/infraestructure/interfaces/index.tsx"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { BridgefyTransmissionMode } from "bridgefy-react-native";
|
|
2
|
+
import type { IInitializeIn, IStartIn } from "../interfaces";
|
|
3
|
+
export interface BridgefyService {
|
|
4
|
+
initialize(params: IInitializeIn): Promise<void>;
|
|
5
|
+
start(params?: IStartIn): Promise<void>;
|
|
6
|
+
stop(): Promise<void>;
|
|
7
|
+
destroySession(): Promise<void>;
|
|
8
|
+
updateLicense(): Promise<void>;
|
|
9
|
+
send(data: string, transmissionMode: BridgefyTransmissionMode): Promise<string>;
|
|
10
|
+
establishSecureConnection(userId: string): Promise<void>;
|
|
11
|
+
currentUserId(): Promise<string>;
|
|
12
|
+
connectedPeers(): Promise<string[]>;
|
|
13
|
+
licenseExpirationDate(): Promise<Date>;
|
|
14
|
+
isInitialized(): Promise<boolean>;
|
|
15
|
+
isStarted(): Promise<boolean>;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=bridgefy_service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bridgefy_service.d.ts","sourceRoot":"","sources":["../../../../src/infraestructure/services/bridgefy_service.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AACtE,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE7D,MAAM,WAAW,eAAe;IAC9B,UAAU,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACjD,KAAK,CAAC,MAAM,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACtB,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAChC,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/B,IAAI,CACF,IAAI,EAAE,MAAM,EACZ,gBAAgB,EAAE,wBAAwB,GACzC,OAAO,CAAC,MAAM,CAAC,CAAC;IACnB,yBAAyB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACzD,aAAa,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IACjC,cAAc,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IACpC,qBAAqB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAClC,SAAS,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;CAC/B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/infraestructure/services/index.tsx"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
|