@wayq/beekon-rn 0.0.7 → 0.0.9
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/BeekonRn.podspec +1 -1
- package/CHANGELOG.md +43 -0
- package/README.md +67 -5
- package/android/build.gradle +3 -2
- package/android/src/main/java/in/wayq/beekonrn/BeekonRnModule.kt +106 -8
- package/ios/BeekonRn.mm +35 -0
- package/ios/BeekonRn.swift +140 -8
- package/ios/Frameworks/BeekonKit.xcframework/ios-arm64/BeekonKit.framework/BeekonKit +0 -0
- package/ios/Frameworks/BeekonKit.xcframework/ios-arm64/BeekonKit.framework/Info.plist +0 -0
- package/ios/Frameworks/BeekonKit.xcframework/ios-arm64/BeekonKit.framework/Modules/BeekonKit.swiftmodule/arm64-apple-ios.abi.json +6048 -3656
- package/ios/Frameworks/BeekonKit.xcframework/ios-arm64/BeekonKit.framework/Modules/BeekonKit.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/ios/Frameworks/BeekonKit.xcframework/ios-arm64/BeekonKit.framework/Modules/BeekonKit.swiftmodule/arm64-apple-ios.swiftinterface +95 -18
- package/ios/Frameworks/BeekonKit.xcframework/ios-arm64_x86_64-simulator/BeekonKit.framework/BeekonKit +0 -0
- package/ios/Frameworks/BeekonKit.xcframework/ios-arm64_x86_64-simulator/BeekonKit.framework/Info.plist +0 -0
- package/ios/Frameworks/BeekonKit.xcframework/ios-arm64_x86_64-simulator/BeekonKit.framework/Modules/BeekonKit.swiftmodule/arm64-apple-ios-simulator.abi.json +6048 -3656
- package/ios/Frameworks/BeekonKit.xcframework/ios-arm64_x86_64-simulator/BeekonKit.framework/Modules/BeekonKit.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/Frameworks/BeekonKit.xcframework/ios-arm64_x86_64-simulator/BeekonKit.framework/Modules/BeekonKit.swiftmodule/arm64-apple-ios-simulator.swiftinterface +95 -18
- package/ios/Frameworks/BeekonKit.xcframework/ios-arm64_x86_64-simulator/BeekonKit.framework/Modules/BeekonKit.swiftmodule/x86_64-apple-ios-simulator.abi.json +6048 -3656
- package/ios/Frameworks/BeekonKit.xcframework/ios-arm64_x86_64-simulator/BeekonKit.framework/Modules/BeekonKit.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/Frameworks/BeekonKit.xcframework/ios-arm64_x86_64-simulator/BeekonKit.framework/Modules/BeekonKit.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +95 -18
- package/ios/Frameworks/BeekonKit.xcframework/ios-arm64_x86_64-simulator/BeekonKit.framework/_CodeSignature/CodeResources +1 -1
- package/lib/module/NativeBeekonRn.js.map +1 -1
- package/lib/module/beekon.js +97 -1
- package/lib/module/beekon.js.map +1 -1
- package/lib/module/index.js +4 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/internal/licenseNudge.js +64 -0
- package/lib/module/internal/licenseNudge.js.map +1 -0
- package/lib/module/internal/mappers.js +56 -8
- package/lib/module/internal/mappers.js.map +1 -1
- package/lib/module/types/config.js +73 -1
- package/lib/module/types/config.js.map +1 -1
- package/lib/module/types/log.js +4 -0
- package/lib/module/types/log.js.map +1 -0
- package/lib/typescript/src/NativeBeekonRn.d.ts +47 -2
- package/lib/typescript/src/NativeBeekonRn.d.ts.map +1 -1
- package/lib/typescript/src/beekon.d.ts +46 -1
- package/lib/typescript/src/beekon.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +4 -2
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/internal/licenseNudge.d.ts +38 -0
- package/lib/typescript/src/internal/licenseNudge.d.ts.map +1 -0
- package/lib/typescript/src/internal/mappers.d.ts +3 -1
- package/lib/typescript/src/internal/mappers.d.ts.map +1 -1
- package/lib/typescript/src/types/config.d.ts +90 -7
- package/lib/typescript/src/types/config.d.ts.map +1 -1
- package/lib/typescript/src/types/enums.d.ts +8 -0
- package/lib/typescript/src/types/enums.d.ts.map +1 -1
- package/lib/typescript/src/types/log.d.ts +22 -0
- package/lib/typescript/src/types/log.d.ts.map +1 -0
- package/lib/typescript/src/types/state.d.ts +4 -1
- package/lib/typescript/src/types/state.d.ts.map +1 -1
- package/package.json +1 -1
- package/scripts/fetch-beekonkit.sh +4 -4
- package/src/NativeBeekonRn.ts +49 -2
- package/src/beekon.ts +100 -1
- package/src/index.tsx +7 -1
- package/src/internal/licenseNudge.ts +80 -0
- package/src/internal/mappers.ts +67 -7
- package/src/types/config.ts +99 -7
- package/src/types/enums.ts +9 -0
- package/src/types/log.ts +22 -0
- package/src/types/state.ts +4 -0
|
Binary file
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// swift-interface-format-version: 1.0
|
|
2
|
-
// swift-compiler-version: Apple Swift version 6.3
|
|
2
|
+
// swift-compiler-version: Apple Swift version 6.3 (swiftlang-6.3.0.123.5 clang-2100.0.123.102)
|
|
3
3
|
// swift-module-flags: -target arm64-apple-ios13.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 6 -O -enable-experimental-feature DebugDescriptionMacro -module-name BeekonKit -package-name beekon_ios
|
|
4
|
-
// swift-module-flags-ignorable: -no-verify-emitted-module-interface -no-verify-emitted-module-interface -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3
|
|
4
|
+
// swift-module-flags-ignorable: -no-verify-emitted-module-interface -no-verify-emitted-module-interface -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3
|
|
5
5
|
@preconcurrency import BackgroundTasks
|
|
6
6
|
import Compression
|
|
7
7
|
@preconcurrency import CoreLocation
|
|
@@ -106,14 +106,20 @@ public struct AuthTokens : Swift.Sendable, Swift.Equatable {
|
|
|
106
106
|
public var licenseStatusUpdates: _Concurrency.AsyncStream<BeekonKit.LicenseStatus> {
|
|
107
107
|
get
|
|
108
108
|
}
|
|
109
|
-
public func configure(_ config: BeekonKit.BeekonConfig) async
|
|
109
|
+
public func configure(_ config: BeekonKit.BeekonConfig) async throws
|
|
110
110
|
public func start() async
|
|
111
111
|
public func stop() async
|
|
112
112
|
public func resumeIfNeeded() async
|
|
113
113
|
public func getLocations(from: Foundation.Date, to: Foundation.Date) async throws -> [BeekonKit.Location]
|
|
114
114
|
public func getCurrentLocation(timeout: Foundation.TimeInterval = 15, accuracy: BeekonKit.AccuracyMode? = nil) async throws -> BeekonKit.Location?
|
|
115
|
+
nonisolated public func getPermissionStatus() -> BeekonKit.PermissionStatus
|
|
115
116
|
public func deleteLocations(before: Foundation.Date?) async throws -> Swift.Int
|
|
116
117
|
public func pendingUploadCount() async throws -> Swift.Int
|
|
118
|
+
nonisolated public func setLogLevel(_ level: BeekonKit.LogLevel)
|
|
119
|
+
public func getLog(from: Foundation.Date, to: Foundation.Date) async throws -> [BeekonKit.LogEntry]
|
|
120
|
+
public func exportLog() async throws -> Swift.String
|
|
121
|
+
public func clearLog() async throws
|
|
122
|
+
nonisolated public func log(_ level: BeekonKit.LogLevel, _ message: Swift.String)
|
|
117
123
|
public func sync()
|
|
118
124
|
public func setExtras(_ extras: [Swift.String : Swift.String])
|
|
119
125
|
public func addGeofences(_ geofences: [BeekonKit.BeekonGeofence]) async throws
|
|
@@ -134,26 +140,23 @@ public struct AuthTokens : Swift.Sendable, Swift.Equatable {
|
|
|
134
140
|
public var authChanges: _Concurrency.AsyncStream<BeekonKit.AuthTokens> {
|
|
135
141
|
get
|
|
136
142
|
}
|
|
143
|
+
public var logs: _Concurrency.AsyncStream<BeekonKit.LogEntry> {
|
|
144
|
+
get
|
|
145
|
+
}
|
|
137
146
|
@objc deinit
|
|
138
147
|
@available(iOS 13.0, tvOS 13.0, watchOS 6.0, macOS 10.15, *)
|
|
139
148
|
@_semantics("defaultActor") nonisolated final public var unownedExecutor: _Concurrency.UnownedSerialExecutor {
|
|
140
149
|
get
|
|
141
150
|
}
|
|
142
151
|
}
|
|
143
|
-
public struct BeekonConfig : Swift.Sendable, Swift.Equatable
|
|
144
|
-
public
|
|
145
|
-
public var minDistanceBetweenLocationsMeters: Swift.Double
|
|
146
|
-
public var accuracyMode: BeekonKit.AccuracyMode
|
|
147
|
-
public var whenStationary: BeekonKit.StationaryMode
|
|
148
|
-
public var stationaryRadiusMeters: Swift.Double
|
|
149
|
-
public var detectActivity: Swift.Bool
|
|
150
|
-
public var sync: BeekonKit.SyncConfig?
|
|
151
|
-
public var licenseKey: Swift.String?
|
|
152
|
-
public static let minimumLocationIntervalSeconds: Swift.Double
|
|
152
|
+
public struct BeekonConfig : Swift.Sendable, Swift.Equatable {
|
|
153
|
+
public static let minimumLocationIntervalSeconds: Foundation.TimeInterval
|
|
153
154
|
public static let minimumStationaryRadiusMeters: Swift.Double
|
|
154
|
-
public
|
|
155
|
-
public
|
|
156
|
-
public
|
|
155
|
+
public static func selfManaged(minTimeBetweenLocationsSeconds: Foundation.TimeInterval = 30, minDistanceBetweenLocationsMeters: Swift.Double = 100, accuracyMode: BeekonKit.AccuracyMode = .balanced, whenStationary: BeekonKit.StationaryMode = .pause, stationaryRadiusMeters: Swift.Double = 5, detectActivity: Swift.Bool = false, sync: BeekonKit.SyncConfig? = nil, licenseKey: Swift.String? = nil, logLevel: BeekonKit.LogLevel = .info) -> BeekonKit.BeekonConfig
|
|
156
|
+
public static func cloud(projectKey: Swift.String, endpoint: Swift.String? = nil, logLevel: BeekonKit.LogLevel = .info) throws -> BeekonKit.BeekonConfig
|
|
157
|
+
public var logLevel: BeekonKit.LogLevel {
|
|
158
|
+
get
|
|
159
|
+
}
|
|
157
160
|
public static func == (a: BeekonKit.BeekonConfig, b: BeekonKit.BeekonConfig) -> Swift.Bool
|
|
158
161
|
}
|
|
159
162
|
public struct SyncConfig : Swift.Sendable, Swift.Equatable, Swift.Codable {
|
|
@@ -161,14 +164,17 @@ public struct SyncConfig : Swift.Sendable, Swift.Equatable, Swift.Codable {
|
|
|
161
164
|
public var headers: [Swift.String : Swift.String]
|
|
162
165
|
public var intervalSeconds: Foundation.TimeInterval
|
|
163
166
|
public var batchSize: Swift.Int
|
|
167
|
+
public var syncThreshold: Swift.Int
|
|
164
168
|
public var auth: BeekonKit.AuthConfig?
|
|
165
|
-
public init(url: Foundation.URL, headers: [Swift.String : Swift.String] = [:], intervalSeconds: Foundation.TimeInterval = 300, batchSize: Swift.Int = 100, auth: BeekonKit.AuthConfig? = nil)
|
|
169
|
+
public init(url: Foundation.URL, headers: [Swift.String : Swift.String] = [:], intervalSeconds: Foundation.TimeInterval = 300, batchSize: Swift.Int = 100, syncThreshold: Swift.Int = 0, auth: BeekonKit.AuthConfig? = nil)
|
|
170
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
166
171
|
public static func == (a: BeekonKit.SyncConfig, b: BeekonKit.SyncConfig) -> Swift.Bool
|
|
167
172
|
public func encode(to encoder: any Swift.Encoder) throws
|
|
168
|
-
public init(from decoder: any Swift.Decoder) throws
|
|
169
173
|
}
|
|
170
174
|
public enum BeekonError : Swift.Error, Swift.Sendable, Swift.Equatable {
|
|
175
|
+
case invalidConfiguration(reason: Swift.String)
|
|
171
176
|
case invalidGeofence(reason: Swift.String)
|
|
177
|
+
case geofencesManagedByServer
|
|
172
178
|
case storage(reason: Swift.String)
|
|
173
179
|
case locationUnavailable(reason: BeekonKit.LocationUnavailableReason)
|
|
174
180
|
public static func == (a: BeekonKit.BeekonError, b: BeekonKit.BeekonError) -> Swift.Bool
|
|
@@ -207,6 +213,7 @@ public enum StopReason : Swift.String, Swift.Sendable, Swift.Equatable, Swift.Ha
|
|
|
207
213
|
case locationServicesDisabled
|
|
208
214
|
case locationUnavailable
|
|
209
215
|
case system
|
|
216
|
+
case cloudModeUnavailable
|
|
210
217
|
public init?(rawValue: Swift.String)
|
|
211
218
|
public typealias RawValue = Swift.String
|
|
212
219
|
public var rawValue: Swift.String {
|
|
@@ -282,6 +289,37 @@ public enum LocationTrigger : Swift.String, Swift.Sendable, Swift.Equatable, Swi
|
|
|
282
289
|
get
|
|
283
290
|
}
|
|
284
291
|
}
|
|
292
|
+
public struct LogEntry : Swift.Sendable, Swift.Equatable, Swift.Identifiable {
|
|
293
|
+
public let id: Swift.String
|
|
294
|
+
public let timestamp: Foundation.Date
|
|
295
|
+
public let level: BeekonKit.LogLevel
|
|
296
|
+
public let category: Swift.String
|
|
297
|
+
public let message: Swift.String
|
|
298
|
+
public init(id: Swift.String, timestamp: Foundation.Date, level: BeekonKit.LogLevel, category: Swift.String, message: Swift.String)
|
|
299
|
+
public static func == (a: BeekonKit.LogEntry, b: BeekonKit.LogEntry) -> Swift.Bool
|
|
300
|
+
public typealias ID = Swift.String
|
|
301
|
+
}
|
|
302
|
+
public enum LogLevel : Swift.String, Swift.Sendable, Swift.Codable, Swift.CaseIterable, Swift.Comparable {
|
|
303
|
+
case off
|
|
304
|
+
case error
|
|
305
|
+
case warn
|
|
306
|
+
case info
|
|
307
|
+
case debug
|
|
308
|
+
case verbose
|
|
309
|
+
public var ordinal: Swift.Int {
|
|
310
|
+
get
|
|
311
|
+
}
|
|
312
|
+
public static func < (lhs: BeekonKit.LogLevel, rhs: BeekonKit.LogLevel) -> Swift.Bool
|
|
313
|
+
public init?(rawValue: Swift.String)
|
|
314
|
+
public typealias AllCases = [BeekonKit.LogLevel]
|
|
315
|
+
public typealias RawValue = Swift.String
|
|
316
|
+
nonisolated public static var allCases: [BeekonKit.LogLevel] {
|
|
317
|
+
get
|
|
318
|
+
}
|
|
319
|
+
public var rawValue: Swift.String {
|
|
320
|
+
get
|
|
321
|
+
}
|
|
322
|
+
}
|
|
285
323
|
public enum MotionState : Swift.String, Swift.Sendable, Swift.Equatable, Swift.Hashable, Swift.Codable {
|
|
286
324
|
case moving
|
|
287
325
|
case stationary
|
|
@@ -292,6 +330,41 @@ public enum MotionState : Swift.String, Swift.Sendable, Swift.Equatable, Swift.H
|
|
|
292
330
|
get
|
|
293
331
|
}
|
|
294
332
|
}
|
|
333
|
+
public struct PermissionStatus : Swift.Sendable, Swift.Equatable, Swift.Codable {
|
|
334
|
+
public enum Level : Swift.String, Swift.Sendable, Swift.Equatable, Swift.Hashable, Swift.Codable {
|
|
335
|
+
case notDetermined
|
|
336
|
+
case denied
|
|
337
|
+
case restricted
|
|
338
|
+
case foreground
|
|
339
|
+
case background
|
|
340
|
+
public init?(rawValue: Swift.String)
|
|
341
|
+
public typealias RawValue = Swift.String
|
|
342
|
+
public var rawValue: Swift.String {
|
|
343
|
+
get
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
public enum Accuracy : Swift.String, Swift.Sendable, Swift.Equatable, Swift.Hashable, Swift.Codable {
|
|
347
|
+
case full
|
|
348
|
+
case reduced
|
|
349
|
+
public init?(rawValue: Swift.String)
|
|
350
|
+
public typealias RawValue = Swift.String
|
|
351
|
+
public var rawValue: Swift.String {
|
|
352
|
+
get
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
public let level: BeekonKit.PermissionStatus.Level
|
|
356
|
+
public let accuracy: BeekonKit.PermissionStatus.Accuracy?
|
|
357
|
+
public init(level: BeekonKit.PermissionStatus.Level, accuracy: BeekonKit.PermissionStatus.Accuracy?)
|
|
358
|
+
public var isAuthorized: Swift.Bool {
|
|
359
|
+
get
|
|
360
|
+
}
|
|
361
|
+
public var canTrackInBackground: Swift.Bool {
|
|
362
|
+
get
|
|
363
|
+
}
|
|
364
|
+
public static func == (a: BeekonKit.PermissionStatus, b: BeekonKit.PermissionStatus) -> Swift.Bool
|
|
365
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
366
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
367
|
+
}
|
|
295
368
|
public enum StationaryMode : Swift.String, Swift.Sendable, Swift.Equatable, Swift.Hashable, Swift.Codable {
|
|
296
369
|
case keepTracking
|
|
297
370
|
case pause
|
|
@@ -338,7 +411,11 @@ extension BeekonKit.LicenseInvalidReason : Swift.Hashable {}
|
|
|
338
411
|
extension BeekonKit.LicenseInvalidReason : Swift.RawRepresentable {}
|
|
339
412
|
extension BeekonKit.LocationQuality : Swift.RawRepresentable {}
|
|
340
413
|
extension BeekonKit.LocationTrigger : Swift.RawRepresentable {}
|
|
414
|
+
extension BeekonKit.LogLevel : Swift.Hashable {}
|
|
415
|
+
extension BeekonKit.LogLevel : Swift.RawRepresentable {}
|
|
341
416
|
extension BeekonKit.MotionState : Swift.RawRepresentable {}
|
|
417
|
+
extension BeekonKit.PermissionStatus.Level : Swift.RawRepresentable {}
|
|
418
|
+
extension BeekonKit.PermissionStatus.Accuracy : Swift.RawRepresentable {}
|
|
342
419
|
extension BeekonKit.StationaryMode : Swift.RawRepresentable {}
|
|
343
420
|
extension BeekonKit.SyncFailure : Swift.RawRepresentable {}
|
|
344
421
|
extension BeekonKit.Transition : Swift.RawRepresentable {}
|