@wayq/beekon-rn 0.0.9 → 0.1.2
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 +2 -2
- package/CHANGELOG.md +70 -7
- package/LICENSE.txt +3 -3
- package/README.md +111 -326
- package/android/build.gradle +2 -2
- package/android/src/main/AndroidManifest.xml +10 -0
- package/android/src/main/java/in/wayq/beekonrn/BeekonRnModule.kt +132 -1
- package/ios/BeekonRn.mm +5 -0
- package/ios/BeekonRn.swift +96 -10
- package/ios/Frameworks/BeekonKit.xcframework/LICENSE.txt +3 -3
- 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 +6218 -3034
- 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 +89 -5
- 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 +6218 -3034
- 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 +89 -5
- package/ios/Frameworks/BeekonKit.xcframework/ios-arm64_x86_64-simulator/BeekonKit.framework/Modules/BeekonKit.swiftmodule/x86_64-apple-ios-simulator.abi.json +6218 -3034
- 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 +89 -5
- package/ios/Frameworks/BeekonKit.xcframework/ios-arm64_x86_64-simulator/BeekonKit.framework/_CodeSignature/CodeResources +1 -1
- package/lib/module/NativeBeekonRn.js +14 -0
- package/lib/module/NativeBeekonRn.js.map +1 -1
- package/lib/module/beekon.js +26 -1
- package/lib/module/beekon.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/internal/mappers.js +95 -2
- package/lib/module/internal/mappers.js.map +1 -1
- package/lib/module/types/permission.js +2 -0
- package/lib/module/types/permission.js.map +1 -0
- package/lib/typescript/src/NativeBeekonRn.d.ts +39 -0
- package/lib/typescript/src/NativeBeekonRn.d.ts.map +1 -1
- package/lib/typescript/src/beekon.d.ts +20 -0
- package/lib/typescript/src/beekon.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +2 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/internal/mappers.d.ts +4 -1
- package/lib/typescript/src/internal/mappers.d.ts.map +1 -1
- package/lib/typescript/src/types/geofence.d.ts +37 -0
- package/lib/typescript/src/types/geofence.d.ts.map +1 -1
- package/lib/typescript/src/types/permission.d.ts +78 -0
- package/lib/typescript/src/types/permission.d.ts.map +1 -0
- package/package.json +5 -5
- package/scripts/fetch-beekonkit.sh +6 -6
- package/src/NativeBeekonRn.ts +45 -0
- package/src/beekon.ts +33 -0
- package/src/index.tsx +12 -0
- package/src/internal/mappers.ts +140 -0
- package/src/types/geofence.ts +41 -0
- package/src/types/permission.ts +91 -0
|
Binary file
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
// swift-interface-format-version: 1.0
|
|
2
|
-
// swift-compiler-version: Apple Swift version 6.3 (swiftlang-6.3.
|
|
2
|
+
// swift-compiler-version: Apple Swift version 6.3.2 (swiftlang-6.3.2.1.108 clang-2100.1.1.101)
|
|
3
3
|
// swift-module-flags: -target arm64-apple-ios13.0 -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.2
|
|
5
5
|
@preconcurrency import BackgroundTasks
|
|
6
6
|
import Compression
|
|
7
7
|
@preconcurrency import CoreLocation
|
|
8
8
|
import CoreMotion
|
|
9
|
-
import CryptoKit
|
|
10
9
|
import Darwin
|
|
11
10
|
import Foundation
|
|
12
11
|
import Foundation/*.Bundle*/
|
|
@@ -16,6 +15,7 @@ import Network
|
|
|
16
15
|
import Security
|
|
17
16
|
import Swift
|
|
18
17
|
@preconcurrency import UIKit
|
|
18
|
+
@preconcurrency import UserNotifications
|
|
19
19
|
import _Concurrency
|
|
20
20
|
import _StringProcessing
|
|
21
21
|
import _SwiftConcurrencyShims
|
|
@@ -96,9 +96,17 @@ public struct AuthTokens : Swift.Sendable, Swift.Equatable {
|
|
|
96
96
|
public init(accessToken: Swift.String, refreshToken: Swift.String?, expiresAt: Foundation.TimeInterval?, epoch: Swift.Int)
|
|
97
97
|
public static func == (a: BeekonKit.AuthTokens, b: BeekonKit.AuthTokens) -> Swift.Bool
|
|
98
98
|
}
|
|
99
|
+
@_inheritsConvenienceInitializers @objc(BeekonLaunchBridge) final public class BeekonLaunchBridge : ObjectiveC.NSObject {
|
|
100
|
+
@objc public static func launch()
|
|
101
|
+
@objc override dynamic public init()
|
|
102
|
+
@objc deinit
|
|
103
|
+
}
|
|
99
104
|
@_hasMissingDesignatedInitializers public actor Beekon {
|
|
100
105
|
public static let shared: BeekonKit.Beekon
|
|
101
106
|
nonisolated public static func registerBackgroundTasks()
|
|
107
|
+
nonisolated public static func bootstrap()
|
|
108
|
+
@discardableResult
|
|
109
|
+
nonisolated public static func requestNotificationAuthorization() async -> Swift.Bool
|
|
102
110
|
nonisolated public static func setWrapperInfo(product: Swift.String, version: Swift.String)
|
|
103
111
|
public var licenseStatus: BeekonKit.LicenseStatus {
|
|
104
112
|
get
|
|
@@ -113,6 +121,7 @@ public struct AuthTokens : Swift.Sendable, Swift.Equatable {
|
|
|
113
121
|
public func getLocations(from: Foundation.Date, to: Foundation.Date) async throws -> [BeekonKit.Location]
|
|
114
122
|
public func getCurrentLocation(timeout: Foundation.TimeInterval = 15, accuracy: BeekonKit.AccuracyMode? = nil) async throws -> BeekonKit.Location?
|
|
115
123
|
nonisolated public func getPermissionStatus() -> BeekonKit.PermissionStatus
|
|
124
|
+
public func getRequiredPermissions() -> [BeekonKit.PermissionRequirement]
|
|
116
125
|
public func deleteLocations(before: Foundation.Date?) async throws -> Swift.Int
|
|
117
126
|
public func pendingUploadCount() async throws -> Swift.Int
|
|
118
127
|
nonisolated public func setLogLevel(_ level: BeekonKit.LogLevel)
|
|
@@ -196,10 +205,11 @@ public struct BeekonGeofence : Swift.Sendable, Swift.Equatable, Swift.Codable {
|
|
|
196
205
|
public var radiusMeters: Swift.Double
|
|
197
206
|
public var notifyOnEntry: Swift.Bool
|
|
198
207
|
public var notifyOnExit: Swift.Bool
|
|
199
|
-
public
|
|
208
|
+
public var notification: BeekonKit.GeofenceNotification?
|
|
209
|
+
public init(id: Swift.String, latitude: Swift.Double, longitude: Swift.Double, radiusMeters: Swift.Double, notifyOnEntry: Swift.Bool = true, notifyOnExit: Swift.Bool = true, notification: BeekonKit.GeofenceNotification? = nil)
|
|
210
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
200
211
|
public static func == (a: BeekonKit.BeekonGeofence, b: BeekonKit.BeekonGeofence) -> Swift.Bool
|
|
201
212
|
public func encode(to encoder: any Swift.Encoder) throws
|
|
202
|
-
public init(from decoder: any Swift.Decoder) throws
|
|
203
213
|
}
|
|
204
214
|
public enum BeekonState : Swift.Sendable, Swift.Equatable {
|
|
205
215
|
case idle
|
|
@@ -228,6 +238,44 @@ public struct GeofenceEvent : Swift.Sendable, Swift.Equatable {
|
|
|
228
238
|
public init(id: Swift.String, geofenceId: Swift.String, type: BeekonKit.Transition, timestamp: Foundation.Date)
|
|
229
239
|
public static func == (a: BeekonKit.GeofenceEvent, b: BeekonKit.GeofenceEvent) -> Swift.Bool
|
|
230
240
|
}
|
|
241
|
+
public enum NotificationDelivery : Swift.String, Swift.Sendable, Swift.Equatable, Swift.Codable {
|
|
242
|
+
case local
|
|
243
|
+
case cloud
|
|
244
|
+
public init?(rawValue: Swift.String)
|
|
245
|
+
public typealias RawValue = Swift.String
|
|
246
|
+
public var rawValue: Swift.String {
|
|
247
|
+
get
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
public enum NotificationImportance : Swift.String, Swift.Sendable, Swift.Equatable, Swift.Codable {
|
|
251
|
+
case `default`
|
|
252
|
+
case high
|
|
253
|
+
public init?(rawValue: Swift.String)
|
|
254
|
+
public typealias RawValue = Swift.String
|
|
255
|
+
public var rawValue: Swift.String {
|
|
256
|
+
get
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
public struct NotificationContent : Swift.Sendable, Swift.Equatable, Swift.Codable {
|
|
260
|
+
public var title: Swift.String
|
|
261
|
+
public var body: Swift.String
|
|
262
|
+
public var importance: BeekonKit.NotificationImportance
|
|
263
|
+
public var deepLink: Swift.String?
|
|
264
|
+
public var data: [Swift.String : Swift.String]
|
|
265
|
+
public init(title: Swift.String, body: Swift.String, importance: BeekonKit.NotificationImportance = .high, deepLink: Swift.String? = nil, data: [Swift.String : Swift.String] = [:])
|
|
266
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
267
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
268
|
+
public static func == (a: BeekonKit.NotificationContent, b: BeekonKit.NotificationContent) -> Swift.Bool
|
|
269
|
+
}
|
|
270
|
+
public struct GeofenceNotification : Swift.Sendable, Swift.Equatable, Swift.Codable {
|
|
271
|
+
public var onEnter: BeekonKit.NotificationContent?
|
|
272
|
+
public var onExit: BeekonKit.NotificationContent?
|
|
273
|
+
public var delivery: BeekonKit.NotificationDelivery
|
|
274
|
+
public init(onEnter: BeekonKit.NotificationContent? = nil, onExit: BeekonKit.NotificationContent? = nil, delivery: BeekonKit.NotificationDelivery = .local)
|
|
275
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
276
|
+
public static func == (a: BeekonKit.GeofenceNotification, b: BeekonKit.GeofenceNotification) -> Swift.Bool
|
|
277
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
278
|
+
}
|
|
231
279
|
public enum LicenseStatus : Swift.Sendable, Swift.Equatable {
|
|
232
280
|
case notDetermined
|
|
233
281
|
case licensed(tier: Swift.String, entitlements: [Swift.String])
|
|
@@ -330,6 +378,36 @@ public enum MotionState : Swift.String, Swift.Sendable, Swift.Equatable, Swift.H
|
|
|
330
378
|
get
|
|
331
379
|
}
|
|
332
380
|
}
|
|
381
|
+
public struct PermissionRequirement : Swift.Sendable, Swift.Equatable, Swift.Codable {
|
|
382
|
+
public enum Permission : Swift.String, Swift.Sendable, Swift.Equatable, Swift.Hashable, Swift.Codable {
|
|
383
|
+
case location
|
|
384
|
+
case backgroundLocation
|
|
385
|
+
case activityRecognition
|
|
386
|
+
case notifications
|
|
387
|
+
public init?(rawValue: Swift.String)
|
|
388
|
+
public typealias RawValue = Swift.String
|
|
389
|
+
public var rawValue: Swift.String {
|
|
390
|
+
get
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
public enum Importance : Swift.String, Swift.Sendable, Swift.Equatable, Swift.Hashable, Swift.Codable {
|
|
394
|
+
case required
|
|
395
|
+
case recommended
|
|
396
|
+
public init?(rawValue: Swift.String)
|
|
397
|
+
public typealias RawValue = Swift.String
|
|
398
|
+
public var rawValue: Swift.String {
|
|
399
|
+
get
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
public let permission: BeekonKit.PermissionRequirement.Permission
|
|
403
|
+
public let importance: BeekonKit.PermissionRequirement.Importance
|
|
404
|
+
public let satisfied: Swift.Bool
|
|
405
|
+
public let rationale: Swift.String
|
|
406
|
+
public init(permission: BeekonKit.PermissionRequirement.Permission, importance: BeekonKit.PermissionRequirement.Importance, satisfied: Swift.Bool, rationale: Swift.String)
|
|
407
|
+
public static func == (a: BeekonKit.PermissionRequirement, b: BeekonKit.PermissionRequirement) -> Swift.Bool
|
|
408
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
409
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
410
|
+
}
|
|
333
411
|
public struct PermissionStatus : Swift.Sendable, Swift.Equatable, Swift.Codable {
|
|
334
412
|
public enum Level : Swift.String, Swift.Sendable, Swift.Equatable, Swift.Hashable, Swift.Codable {
|
|
335
413
|
case notDetermined
|
|
@@ -407,6 +485,10 @@ extension BeekonKit.AuthBodyFormat : Swift.Hashable {}
|
|
|
407
485
|
extension BeekonKit.AuthBodyFormat : Swift.RawRepresentable {}
|
|
408
486
|
extension BeekonKit.LocationUnavailableReason : Swift.Hashable {}
|
|
409
487
|
extension BeekonKit.StopReason : Swift.RawRepresentable {}
|
|
488
|
+
extension BeekonKit.NotificationDelivery : Swift.Hashable {}
|
|
489
|
+
extension BeekonKit.NotificationDelivery : Swift.RawRepresentable {}
|
|
490
|
+
extension BeekonKit.NotificationImportance : Swift.Hashable {}
|
|
491
|
+
extension BeekonKit.NotificationImportance : Swift.RawRepresentable {}
|
|
410
492
|
extension BeekonKit.LicenseInvalidReason : Swift.Hashable {}
|
|
411
493
|
extension BeekonKit.LicenseInvalidReason : Swift.RawRepresentable {}
|
|
412
494
|
extension BeekonKit.LocationQuality : Swift.RawRepresentable {}
|
|
@@ -414,6 +496,8 @@ extension BeekonKit.LocationTrigger : Swift.RawRepresentable {}
|
|
|
414
496
|
extension BeekonKit.LogLevel : Swift.Hashable {}
|
|
415
497
|
extension BeekonKit.LogLevel : Swift.RawRepresentable {}
|
|
416
498
|
extension BeekonKit.MotionState : Swift.RawRepresentable {}
|
|
499
|
+
extension BeekonKit.PermissionRequirement.Permission : Swift.RawRepresentable {}
|
|
500
|
+
extension BeekonKit.PermissionRequirement.Importance : Swift.RawRepresentable {}
|
|
417
501
|
extension BeekonKit.PermissionStatus.Level : Swift.RawRepresentable {}
|
|
418
502
|
extension BeekonKit.PermissionStatus.Accuracy : Swift.RawRepresentable {}
|
|
419
503
|
extension BeekonKit.StationaryMode : Swift.RawRepresentable {}
|
|
Binary file
|