@wayq/beekon-rn 0.0.5 → 0.0.6
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 +4 -2
- package/CHANGELOG.md +103 -0
- package/README.md +303 -81
- package/android/build.gradle +1 -1
- package/android/src/main/java/in/wayq/beekonrn/BeekonRnModule.kt +113 -7
- package/ios/BeekonRn.mm +13 -0
- package/ios/BeekonRn.swift +113 -9
- package/ios/Frameworks/BeekonKit.xcframework/Info.plist +5 -5
- 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 +5399 -1463
- 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 +77 -2
- 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 +5399 -1463
- 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 +77 -2
- package/ios/Frameworks/BeekonKit.xcframework/ios-arm64_x86_64-simulator/BeekonKit.framework/Modules/BeekonKit.swiftmodule/x86_64-apple-ios-simulator.abi.json +5399 -1463
- 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 +77 -2
- package/ios/Frameworks/BeekonKit.xcframework/ios-arm64_x86_64-simulator/BeekonKit.framework/_CodeSignature/CodeResources +1 -1
- package/lib/module/NativeBeekonRn.js +13 -0
- package/lib/module/NativeBeekonRn.js.map +1 -1
- package/lib/module/beekon.js +56 -7
- package/lib/module/beekon.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/internal/mappers.js +50 -3
- package/lib/module/internal/mappers.js.map +1 -1
- package/lib/module/types/auth.js +4 -0
- package/lib/module/types/auth.js.map +1 -0
- package/lib/module/types/error.js +13 -3
- package/lib/module/types/error.js.map +1 -1
- package/lib/typescript/src/NativeBeekonRn.d.ts +48 -0
- package/lib/typescript/src/NativeBeekonRn.d.ts.map +1 -1
- package/lib/typescript/src/beekon.d.ts +30 -1
- 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 +5 -1
- package/lib/typescript/src/internal/mappers.d.ts.map +1 -1
- package/lib/typescript/src/types/auth.d.ts +99 -0
- package/lib/typescript/src/types/auth.d.ts.map +1 -0
- package/lib/typescript/src/types/config.d.ts +16 -0
- package/lib/typescript/src/types/config.d.ts.map +1 -1
- package/lib/typescript/src/types/enums.d.ts +14 -0
- package/lib/typescript/src/types/enums.d.ts.map +1 -1
- package/lib/typescript/src/types/error.d.ts +14 -4
- package/lib/typescript/src/types/error.d.ts.map +1 -1
- package/package.json +5 -1
- package/scripts/fetch-beekonkit.sh +4 -4
- package/src/NativeBeekonRn.ts +55 -0
- package/src/beekon.ts +66 -6
- package/src/index.tsx +3 -0
- package/src/internal/mappers.ts +59 -1
- package/src/types/auth.ts +101 -0
- package/src/types/config.ts +16 -0
- package/src/types/enums.ts +16 -0
- package/src/types/error.ts +19 -4
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// swift-interface-format-version: 1.0
|
|
2
2
|
// swift-compiler-version: Apple Swift version 6.3.1 (swiftlang-6.3.1.1.2 clang-2100.0.123.102)
|
|
3
|
-
// swift-module-flags: -target x86_64-apple-
|
|
3
|
+
// swift-module-flags: -target x86_64-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
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.1
|
|
5
5
|
@preconcurrency import BackgroundTasks
|
|
6
6
|
import Compression
|
|
@@ -12,6 +12,7 @@ import Foundation/*.Bundle*/
|
|
|
12
12
|
import Foundation/*.ProcessInfo*/
|
|
13
13
|
import Foundation/*.URL*/
|
|
14
14
|
import Network
|
|
15
|
+
import Security
|
|
15
16
|
import Swift
|
|
16
17
|
@preconcurrency import UIKit
|
|
17
18
|
import _Concurrency
|
|
@@ -41,6 +42,59 @@ public enum ActivityType : Swift.String, Swift.Sendable, Swift.Equatable, Swift.
|
|
|
41
42
|
get
|
|
42
43
|
}
|
|
43
44
|
}
|
|
45
|
+
public enum AuthStrategy : Swift.String, Swift.Sendable, Swift.Equatable, Swift.Codable {
|
|
46
|
+
case bearer
|
|
47
|
+
case raw
|
|
48
|
+
public init?(rawValue: Swift.String)
|
|
49
|
+
public typealias RawValue = Swift.String
|
|
50
|
+
public var rawValue: Swift.String {
|
|
51
|
+
get
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
public enum AuthBodyFormat : Swift.String, Swift.Sendable, Swift.Equatable, Swift.Codable {
|
|
55
|
+
case form
|
|
56
|
+
case json
|
|
57
|
+
public init?(rawValue: Swift.String)
|
|
58
|
+
public typealias RawValue = Swift.String
|
|
59
|
+
public var rawValue: Swift.String {
|
|
60
|
+
get
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
public struct AuthResponseMapping : Swift.Sendable, Swift.Equatable, Swift.Codable {
|
|
64
|
+
public var accessToken: Swift.String?
|
|
65
|
+
public var refreshToken: Swift.String?
|
|
66
|
+
public var expiresIn: Swift.String?
|
|
67
|
+
public var expiresAt: Swift.String?
|
|
68
|
+
public init(accessToken: Swift.String? = nil, refreshToken: Swift.String? = nil, expiresIn: Swift.String? = nil, expiresAt: Swift.String? = nil)
|
|
69
|
+
public static func == (a: BeekonKit.AuthResponseMapping, b: BeekonKit.AuthResponseMapping) -> Swift.Bool
|
|
70
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
71
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
72
|
+
}
|
|
73
|
+
public struct AuthConfig : Swift.Sendable, Swift.Equatable, Swift.Codable {
|
|
74
|
+
public var accessToken: Swift.String?
|
|
75
|
+
public var refreshToken: Swift.String?
|
|
76
|
+
public var expiresAt: Foundation.TimeInterval?
|
|
77
|
+
public var strategy: BeekonKit.AuthStrategy
|
|
78
|
+
public var refreshUrl: Foundation.URL?
|
|
79
|
+
public var refreshPayload: [Swift.String : Swift.String]
|
|
80
|
+
public var refreshHeaders: [Swift.String : Swift.String]
|
|
81
|
+
public var refreshBodyFormat: BeekonKit.AuthBodyFormat
|
|
82
|
+
public var responseMapping: BeekonKit.AuthResponseMapping
|
|
83
|
+
public var skewMarginSeconds: Foundation.TimeInterval
|
|
84
|
+
public var seedEpoch: Swift.Int?
|
|
85
|
+
public init(accessToken: Swift.String? = nil, refreshToken: Swift.String? = nil, expiresAt: Foundation.TimeInterval? = nil, strategy: BeekonKit.AuthStrategy = .bearer, refreshUrl: Foundation.URL? = nil, refreshPayload: [Swift.String : Swift.String] = [:], refreshHeaders: [Swift.String : Swift.String] = ["Authorization": "Bearer {accessToken}"], refreshBodyFormat: BeekonKit.AuthBodyFormat = .form, responseMapping: BeekonKit.AuthResponseMapping = AuthResponseMapping(), skewMarginSeconds: Foundation.TimeInterval = 60, seedEpoch: Swift.Int? = nil)
|
|
86
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
87
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
88
|
+
public static func == (a: BeekonKit.AuthConfig, b: BeekonKit.AuthConfig) -> Swift.Bool
|
|
89
|
+
}
|
|
90
|
+
public struct AuthTokens : Swift.Sendable, Swift.Equatable {
|
|
91
|
+
public let accessToken: Swift.String
|
|
92
|
+
public let refreshToken: Swift.String?
|
|
93
|
+
public let expiresAt: Foundation.TimeInterval?
|
|
94
|
+
public let epoch: Swift.Int
|
|
95
|
+
public init(accessToken: Swift.String, refreshToken: Swift.String?, expiresAt: Foundation.TimeInterval?, epoch: Swift.Int)
|
|
96
|
+
public static func == (a: BeekonKit.AuthTokens, b: BeekonKit.AuthTokens) -> Swift.Bool
|
|
97
|
+
}
|
|
44
98
|
@_hasMissingDesignatedInitializers public actor Beekon {
|
|
45
99
|
public static let shared: BeekonKit.Beekon
|
|
46
100
|
nonisolated public static func registerBackgroundTasks()
|
|
@@ -49,6 +103,7 @@ public enum ActivityType : Swift.String, Swift.Sendable, Swift.Equatable, Swift.
|
|
|
49
103
|
public func stop() async
|
|
50
104
|
public func resumeIfNeeded() async
|
|
51
105
|
public func getLocations(from: Foundation.Date, to: Foundation.Date) async throws -> [BeekonKit.Location]
|
|
106
|
+
public func getCurrentLocation(timeout: Foundation.TimeInterval = 15, accuracy: BeekonKit.AccuracyMode? = nil) async throws -> BeekonKit.Location?
|
|
52
107
|
public func deleteLocations(before: Foundation.Date?) async throws -> Swift.Int
|
|
53
108
|
public func pendingUploadCount() async throws -> Swift.Int
|
|
54
109
|
public func sync()
|
|
@@ -68,6 +123,9 @@ public enum ActivityType : Swift.String, Swift.Sendable, Swift.Equatable, Swift.
|
|
|
68
123
|
public var syncStatus: _Concurrency.AsyncStream<BeekonKit.SyncStatus> {
|
|
69
124
|
get
|
|
70
125
|
}
|
|
126
|
+
public var authChanges: _Concurrency.AsyncStream<BeekonKit.AuthTokens> {
|
|
127
|
+
get
|
|
128
|
+
}
|
|
71
129
|
@objc deinit
|
|
72
130
|
@available(iOS 13.0, tvOS 13.0, watchOS 6.0, macOS 10.15, *)
|
|
73
131
|
@_semantics("defaultActor") nonisolated final public var unownedExecutor: _Concurrency.UnownedSerialExecutor {
|
|
@@ -94,7 +152,8 @@ public struct SyncConfig : Swift.Sendable, Swift.Equatable, Swift.Codable {
|
|
|
94
152
|
public var headers: [Swift.String : Swift.String]
|
|
95
153
|
public var intervalSeconds: Foundation.TimeInterval
|
|
96
154
|
public var batchSize: Swift.Int
|
|
97
|
-
public
|
|
155
|
+
public var auth: BeekonKit.AuthConfig?
|
|
156
|
+
public init(url: Foundation.URL, headers: [Swift.String : Swift.String] = [:], intervalSeconds: Foundation.TimeInterval = 300, batchSize: Swift.Int = 100, auth: BeekonKit.AuthConfig? = nil)
|
|
98
157
|
public static func == (a: BeekonKit.SyncConfig, b: BeekonKit.SyncConfig) -> Swift.Bool
|
|
99
158
|
public func encode(to encoder: any Swift.Encoder) throws
|
|
100
159
|
public init(from decoder: any Swift.Decoder) throws
|
|
@@ -102,8 +161,19 @@ public struct SyncConfig : Swift.Sendable, Swift.Equatable, Swift.Codable {
|
|
|
102
161
|
public enum BeekonError : Swift.Error, Swift.Sendable, Swift.Equatable {
|
|
103
162
|
case invalidGeofence(reason: Swift.String)
|
|
104
163
|
case storage(reason: Swift.String)
|
|
164
|
+
case locationUnavailable(reason: BeekonKit.LocationUnavailableReason)
|
|
105
165
|
public static func == (a: BeekonKit.BeekonError, b: BeekonKit.BeekonError) -> Swift.Bool
|
|
106
166
|
}
|
|
167
|
+
public enum LocationUnavailableReason : Swift.Sendable, Swift.Equatable {
|
|
168
|
+
case permissionDenied
|
|
169
|
+
case locationServicesDisabled
|
|
170
|
+
case unavailable
|
|
171
|
+
public static func == (a: BeekonKit.LocationUnavailableReason, b: BeekonKit.LocationUnavailableReason) -> Swift.Bool
|
|
172
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
173
|
+
public var hashValue: Swift.Int {
|
|
174
|
+
get
|
|
175
|
+
}
|
|
176
|
+
}
|
|
107
177
|
public struct BeekonGeofence : Swift.Sendable, Swift.Equatable, Swift.Codable {
|
|
108
178
|
public var id: Swift.String
|
|
109
179
|
public var latitude: Swift.Double
|
|
@@ -227,6 +297,11 @@ public enum Transition : Swift.String, Swift.Sendable, Swift.Equatable, Swift.Ha
|
|
|
227
297
|
}
|
|
228
298
|
extension BeekonKit.AccuracyMode : Swift.RawRepresentable {}
|
|
229
299
|
extension BeekonKit.ActivityType : Swift.RawRepresentable {}
|
|
300
|
+
extension BeekonKit.AuthStrategy : Swift.Hashable {}
|
|
301
|
+
extension BeekonKit.AuthStrategy : Swift.RawRepresentable {}
|
|
302
|
+
extension BeekonKit.AuthBodyFormat : Swift.Hashable {}
|
|
303
|
+
extension BeekonKit.AuthBodyFormat : Swift.RawRepresentable {}
|
|
304
|
+
extension BeekonKit.LocationUnavailableReason : Swift.Hashable {}
|
|
230
305
|
extension BeekonKit.StopReason : Swift.RawRepresentable {}
|
|
231
306
|
extension BeekonKit.LocationQuality : Swift.RawRepresentable {}
|
|
232
307
|
extension BeekonKit.LocationTrigger : Swift.RawRepresentable {}
|
|
@@ -25,7 +25,20 @@ import { TurboModuleRegistry } from 'react-native';
|
|
|
25
25
|
|
|
26
26
|
/** A single string map entry — see `headers` / `setExtras`. */
|
|
27
27
|
|
|
28
|
+
/** Flat wire form of `AuthResponseMapping`. Omitted keys use common-name detection. */
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Flat wire form of `AuthConfig` on {@link WireSyncConfig.auth}. Enums travel as
|
|
32
|
+
* strings (`strategy`: 'bearer'|'raw'; `refreshBodyFormat`: 'form'|'json'),
|
|
33
|
+
* string maps as `WireKeyValue[]`, and `expiresAtMs` is epoch milliseconds.
|
|
34
|
+
*/
|
|
35
|
+
|
|
28
36
|
/** Android-only foreground-service notification overrides. iOS ignores it. */
|
|
29
37
|
|
|
38
|
+
/**
|
|
39
|
+
* A token set the SDK rotated, delivered on `onAuthTokens`. `expiresAtMs` is
|
|
40
|
+
* epoch milliseconds; both it and `refreshToken` are `null` when absent.
|
|
41
|
+
*/
|
|
42
|
+
|
|
30
43
|
export default TurboModuleRegistry.getEnforcing('BeekonRn');
|
|
31
44
|
//# sourceMappingURL=NativeBeekonRn.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../src","sources":["NativeBeekonRn.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,mBAAmB,QAAQ,cAAc;;AAElD;;
|
|
1
|
+
{"version":3,"names":["TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../src","sources":["NativeBeekonRn.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,mBAAmB,QAAQ,cAAc;;AAElD;;AAMA;;AAQA;AACA;AACA;AACA;AACA;;AAwBA;;AA+EA;AACA;AACA;AACA;;AAyDA,eAAeA,mBAAmB,CAACC,YAAY,CAAO,UAAU,CAAC","ignoreList":[]}
|
package/lib/module/beekon.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import NativeBeekon from "./NativeBeekonRn.js";
|
|
4
|
-
import { configToWire, geofenceToWire, recordToEntries, rethrowAsBeekonError, wireToGeofence, wireToGeofenceEvent, wireToLocation, wireToState, wireToSyncStatus } from "./internal/mappers.js";
|
|
4
|
+
import { configToWire, geofenceToWire, recordToEntries, rethrowAsBeekonError, wireToAuthTokens, wireToGeofence, wireToGeofenceEvent, wireToLocation, wireToState, wireToSyncStatus } from "./internal/mappers.js";
|
|
5
5
|
/**
|
|
6
|
-
* Fans the
|
|
7
|
-
* replay-1 semantics for `state` / `syncStatus` (RN EventEmitters
|
|
8
|
-
* so we cache the latest value and hand it to new subscribers
|
|
9
|
-
* matching the native StateFlow / AsyncStream contract).
|
|
10
|
-
* `geofenceEvent` are plain fan-out with no replay.
|
|
6
|
+
* Fans the five native EventEmitters out to multiple JS subscribers and adds
|
|
7
|
+
* replay-1 semantics for `state` / `syncStatus` / `authTokens` (RN EventEmitters
|
|
8
|
+
* don't replay, so we cache the latest value and hand it to new subscribers
|
|
9
|
+
* immediately — matching the native StateFlow / AsyncStream contract).
|
|
10
|
+
* `location` / `geofenceEvent` are plain fan-out with no replay.
|
|
11
11
|
*
|
|
12
12
|
* Native subscriptions are opened once, on first use, and kept for the app
|
|
13
13
|
* lifetime — the native module collects its flows continuously regardless, so
|
|
@@ -19,6 +19,7 @@ class EventHub {
|
|
|
19
19
|
locationListeners = new Set();
|
|
20
20
|
geofenceListeners = new Set();
|
|
21
21
|
syncListeners = new Set();
|
|
22
|
+
authTokenListeners = new Set();
|
|
22
23
|
/** Idempotent: opens the native subscriptions the first time it is called. */
|
|
23
24
|
ensureSubscribed() {
|
|
24
25
|
if (this.subscribed) return;
|
|
@@ -41,6 +42,11 @@ class EventHub {
|
|
|
41
42
|
this.lastSyncStatus = s;
|
|
42
43
|
this.syncListeners.forEach(cb => cb(s));
|
|
43
44
|
});
|
|
45
|
+
NativeBeekon.onAuthTokens(w => {
|
|
46
|
+
const t = wireToAuthTokens(w);
|
|
47
|
+
this.lastAuthTokens = t;
|
|
48
|
+
this.authTokenListeners.forEach(cb => cb(t));
|
|
49
|
+
});
|
|
44
50
|
}
|
|
45
51
|
onState(cb) {
|
|
46
52
|
this.ensureSubscribed();
|
|
@@ -72,6 +78,14 @@ class EventHub {
|
|
|
72
78
|
this.syncListeners.delete(cb);
|
|
73
79
|
};
|
|
74
80
|
}
|
|
81
|
+
onAuthTokens(cb) {
|
|
82
|
+
this.ensureSubscribed();
|
|
83
|
+
this.authTokenListeners.add(cb);
|
|
84
|
+
if (this.lastAuthTokens !== undefined) cb(this.lastAuthTokens);
|
|
85
|
+
return () => {
|
|
86
|
+
this.authTokenListeners.delete(cb);
|
|
87
|
+
};
|
|
88
|
+
}
|
|
75
89
|
}
|
|
76
90
|
|
|
77
91
|
/**
|
|
@@ -137,6 +151,31 @@ class BeekonImpl {
|
|
|
137
151
|
await NativeBeekon.resumeIfNeeded();
|
|
138
152
|
}
|
|
139
153
|
|
|
154
|
+
/**
|
|
155
|
+
* Return a single fresh fix on demand — for the moment a host needs an
|
|
156
|
+
* immediate position (e.g. the instant a trip starts).
|
|
157
|
+
*
|
|
158
|
+
* Independent of tracking: works whether or not a session is running and never
|
|
159
|
+
* starts, stops, or disturbs one. The fix is not persisted and does not appear
|
|
160
|
+
* on `onLocation` — it is returned here only, tagged `'manual'`.
|
|
161
|
+
*
|
|
162
|
+
* Resolves `null` if no usable fix arrives within `timeoutMs` (default
|
|
163
|
+
* 15000). `accuracy` overrides the configured mode for this call only;
|
|
164
|
+
* omitted uses the configured mode.
|
|
165
|
+
*
|
|
166
|
+
* Throws `BeekonError` with kind `'permissionDenied'`,
|
|
167
|
+
* `'locationServicesDisabled'`, or `'locationUnavailable'` on a precondition
|
|
168
|
+
* failure.
|
|
169
|
+
*/
|
|
170
|
+
async getCurrentLocation(options) {
|
|
171
|
+
try {
|
|
172
|
+
const wires = await NativeBeekon.getCurrentLocation(options?.timeoutMs ?? 15000, options?.accuracy ?? '');
|
|
173
|
+
return wires.length === 0 ? null : wireToLocation(wires[0]);
|
|
174
|
+
} catch (e) {
|
|
175
|
+
rethrowAsBeekonError(e);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
140
179
|
/**
|
|
141
180
|
* Read persisted fixes in the inclusive range `[from, to]`, oldest first.
|
|
142
181
|
* Reads come from the SDK's local storage (Room on Android, GRDB on iOS) — the
|
|
@@ -155,7 +194,7 @@ class BeekonImpl {
|
|
|
155
194
|
}
|
|
156
195
|
|
|
157
196
|
/**
|
|
158
|
-
* Delete stored locations captured
|
|
197
|
+
* Delete stored locations captured before `before` (all of them when
|
|
159
198
|
* `before` is omitted). Returns the number of rows removed. Throws
|
|
160
199
|
* `BeekonError` with kind `'storage'` on a failure.
|
|
161
200
|
*/
|
|
@@ -251,6 +290,16 @@ class BeekonImpl {
|
|
|
251
290
|
onSyncStatus(cb) {
|
|
252
291
|
return this.hub.onSyncStatus(cb);
|
|
253
292
|
}
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* Subscribe to token rotations the SDK performed during a native refresh (see
|
|
296
|
+
* `SyncConfig.auth`). Mirror them into your own session store. The latest
|
|
297
|
+
* rotation is delivered to new subscribers immediately (replay-1). Sensitive —
|
|
298
|
+
* delivered in-process only, never logged. Returns an unsubscribe function.
|
|
299
|
+
*/
|
|
300
|
+
onAuthTokens(cb) {
|
|
301
|
+
return this.hub.onAuthTokens(cb);
|
|
302
|
+
}
|
|
254
303
|
}
|
|
255
304
|
export const Beekon = new BeekonImpl();
|
|
256
305
|
//# sourceMappingURL=beekon.js.map
|
package/lib/module/beekon.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["NativeBeekon","configToWire","geofenceToWire","recordToEntries","rethrowAsBeekonError","wireToGeofence","wireToGeofenceEvent","wireToLocation","wireToState","wireToSyncStatus","EventHub","subscribed","stateListeners","Set","locationListeners","geofenceListeners","syncListeners","ensureSubscribed","onState","w","s","lastState","forEach","cb","onLocation","l","onGeofenceEvent","g","onSyncStatus","lastSyncStatus","add","undefined","delete","BeekonImpl","hub","configure","config","start","stop","resumeIfNeeded","
|
|
1
|
+
{"version":3,"names":["NativeBeekon","configToWire","geofenceToWire","recordToEntries","rethrowAsBeekonError","wireToAuthTokens","wireToGeofence","wireToGeofenceEvent","wireToLocation","wireToState","wireToSyncStatus","EventHub","subscribed","stateListeners","Set","locationListeners","geofenceListeners","syncListeners","authTokenListeners","ensureSubscribed","onState","w","s","lastState","forEach","cb","onLocation","l","onGeofenceEvent","g","onSyncStatus","lastSyncStatus","onAuthTokens","t","lastAuthTokens","add","undefined","delete","BeekonImpl","hub","configure","config","start","stop","resumeIfNeeded","getCurrentLocation","options","wires","timeoutMs","accuracy","length","e","getLocations","from","to","getTime","map","deleteLocations","before","pendingUploadCount","sync","setExtras","extras","addGeofences","geofences","removeGeofences","ids","listGeofences","Beekon"],"sourceRoot":"../../src","sources":["beekon.ts"],"mappings":";;AAAA,OAAOA,YAAY,MAAM,qBAAkB;AAQ3C,SACEC,YAAY,EACZC,cAAc,EACdC,eAAe,EACfC,oBAAoB,EACpBC,gBAAgB,EAChBC,cAAc,EACdC,mBAAmB,EACnBC,cAAc,EACdC,WAAW,EACXC,gBAAgB,QACX,uBAAoB;AAI3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,QAAQ,CAAC;EACLC,UAAU,GAAG,KAAK;EACTC,cAAc,GAAG,IAAIC,GAAG,CAAwB,CAAC;EACjDC,iBAAiB,GAAG,IAAID,GAAG,CAAqB,CAAC;EACjDE,iBAAiB,GAAG,IAAIF,GAAG,CAA0B,CAAC;EACtDG,aAAa,GAAG,IAAIH,GAAG,CAAuB,CAAC;EAC/CI,kBAAkB,GAAG,IAAIJ,GAAG,CAAuB,CAAC;EAKrE;EACAK,gBAAgBA,CAAA,EAAS;IACvB,IAAI,IAAI,CAACP,UAAU,EAAE;IACrB,IAAI,CAACA,UAAU,GAAG,IAAI;IACtBZ,YAAY,CAACoB,OAAO,CAAEC,CAAC,IAAK;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ib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Beekon","BeekonError"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,SAASA,MAAM,QAAQ,aAAU;
|
|
1
|
+
{"version":3,"names":["Beekon","BeekonError"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,SAASA,MAAM,QAAQ,aAAU;AA0BjC,SAASC,WAAW,QAA8B,kBAAe","ignoreList":[]}
|
|
@@ -11,7 +11,13 @@ const DEFAULTS = {
|
|
|
11
11
|
stationaryRadiusMeters: 5,
|
|
12
12
|
detectActivity: false,
|
|
13
13
|
syncIntervalSeconds: 300,
|
|
14
|
-
syncBatchSize: 100
|
|
14
|
+
syncBatchSize: 100,
|
|
15
|
+
authStrategy: 'bearer',
|
|
16
|
+
authBodyFormat: 'form',
|
|
17
|
+
authSkewMarginSeconds: 60,
|
|
18
|
+
authRefreshHeaders: {
|
|
19
|
+
Authorization: 'Bearer {accessToken}'
|
|
20
|
+
}
|
|
15
21
|
};
|
|
16
22
|
|
|
17
23
|
// --- Public → wire ---------------------------------------------------------
|
|
@@ -36,11 +42,13 @@ export function configToWire(config) {
|
|
|
36
42
|
url: sync.url,
|
|
37
43
|
headers: recordToEntries(sync.headers),
|
|
38
44
|
intervalSeconds: sync.intervalSeconds ?? DEFAULTS.syncIntervalSeconds,
|
|
39
|
-
batchSize: sync.batchSize ?? DEFAULTS.syncBatchSize
|
|
45
|
+
batchSize: sync.batchSize ?? DEFAULTS.syncBatchSize,
|
|
46
|
+
auth: sync.auth ? authToWire(sync.auth) : undefined
|
|
40
47
|
} : undefined,
|
|
41
48
|
notification: config.notification ? {
|
|
42
49
|
title: config.notification.title,
|
|
43
|
-
text: config.notification.text
|
|
50
|
+
text: config.notification.text,
|
|
51
|
+
smallIcon: config.notification.smallIcon
|
|
44
52
|
} : undefined
|
|
45
53
|
};
|
|
46
54
|
}
|
|
@@ -55,6 +63,29 @@ export function geofenceToWire(g) {
|
|
|
55
63
|
};
|
|
56
64
|
}
|
|
57
65
|
|
|
66
|
+
// `expiresAt` (a `Date`) becomes epoch millis on the wire; the native side
|
|
67
|
+
// converts to epoch seconds. String maps travel as `WireKeyValue[]`.
|
|
68
|
+
export function authToWire(a) {
|
|
69
|
+
return {
|
|
70
|
+
accessToken: a.accessToken,
|
|
71
|
+
refreshToken: a.refreshToken,
|
|
72
|
+
expiresAtMs: a.expiresAt?.getTime(),
|
|
73
|
+
strategy: a.strategy ?? DEFAULTS.authStrategy,
|
|
74
|
+
refreshUrl: a.refreshUrl,
|
|
75
|
+
refreshPayload: recordToEntries(a.refreshPayload),
|
|
76
|
+
refreshHeaders: recordToEntries(a.refreshHeaders ?? DEFAULTS.authRefreshHeaders),
|
|
77
|
+
refreshBodyFormat: a.refreshBodyFormat ?? DEFAULTS.authBodyFormat,
|
|
78
|
+
responseMapping: {
|
|
79
|
+
accessToken: a.responseMapping?.accessToken,
|
|
80
|
+
refreshToken: a.responseMapping?.refreshToken,
|
|
81
|
+
expiresIn: a.responseMapping?.expiresIn,
|
|
82
|
+
expiresAt: a.responseMapping?.expiresAt
|
|
83
|
+
},
|
|
84
|
+
skewMarginSeconds: a.skewMarginSeconds ?? DEFAULTS.authSkewMarginSeconds,
|
|
85
|
+
seedEpoch: a.seedEpoch
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
|
|
58
89
|
// --- Wire → public ---------------------------------------------------------
|
|
59
90
|
|
|
60
91
|
export function wireToLocation(w) {
|
|
@@ -135,6 +166,16 @@ export function wireToSyncStatus(w) {
|
|
|
135
166
|
};
|
|
136
167
|
}
|
|
137
168
|
}
|
|
169
|
+
|
|
170
|
+
/** `expiresAtMs` (epoch millis) becomes a `Date`; `null` propagates faithfully. */
|
|
171
|
+
export function wireToAuthTokens(w) {
|
|
172
|
+
return {
|
|
173
|
+
accessToken: w.accessToken,
|
|
174
|
+
refreshToken: w.refreshToken,
|
|
175
|
+
expiresAt: w.expiresAtMs == null ? null : new Date(w.expiresAtMs),
|
|
176
|
+
epoch: w.epoch
|
|
177
|
+
};
|
|
178
|
+
}
|
|
138
179
|
function toStopReason(s) {
|
|
139
180
|
return oneOf(s, ['user', 'permissionDenied', 'locationServicesDisabled', 'locationUnavailable', 'system'],
|
|
140
181
|
// The native side always populates the reason for a `stopped` state; an
|
|
@@ -173,6 +214,12 @@ function codeToKind(code) {
|
|
|
173
214
|
return 'storage';
|
|
174
215
|
case 'INVALID_GEOFENCE':
|
|
175
216
|
return 'invalidGeofence';
|
|
217
|
+
case 'PERMISSION_DENIED':
|
|
218
|
+
return 'permissionDenied';
|
|
219
|
+
case 'LOCATION_SERVICES_DISABLED':
|
|
220
|
+
return 'locationServicesDisabled';
|
|
221
|
+
case 'LOCATION_UNAVAILABLE':
|
|
222
|
+
return 'locationUnavailable';
|
|
176
223
|
default:
|
|
177
224
|
return undefined;
|
|
178
225
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BeekonError","DEFAULTS","minTimeBetweenLocationsSeconds","minDistanceBetweenLocationsMeters","accuracyMode","whenStationary","stationaryRadiusMeters","detectActivity","syncIntervalSeconds","syncBatchSize","recordToEntries","record","Object","keys","map","key","value","configToWire","config","sync","url","headers","intervalSeconds","batchSize","undefined","notification","title","text","geofenceToWire","g","id","lat","latitude","lng","longitude","radiusMeters","notifyOnEntry","notifyOnExit","wireToLocation","w","timestamp","Date","timestampMs","accuracy","speed","bearing","altitude","quality","oneOf","trigger","motion","activity","isMock","wireToGeofence","wireToGeofenceEvent","geofenceId","type","wireToState","kind","reason","toStopReason","stopReason","wireToSyncStatus","toSyncFailure","failure","s","allowed","fallback","includes","rethrowAsBeekonError","e","code","message","String","codeToKind"],"sourceRoot":"../../../src","sources":["internal/mappers.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"names":["BeekonError","DEFAULTS","minTimeBetweenLocationsSeconds","minDistanceBetweenLocationsMeters","accuracyMode","whenStationary","stationaryRadiusMeters","detectActivity","syncIntervalSeconds","syncBatchSize","authStrategy","authBodyFormat","authSkewMarginSeconds","authRefreshHeaders","Authorization","recordToEntries","record","Object","keys","map","key","value","configToWire","config","sync","url","headers","intervalSeconds","batchSize","auth","authToWire","undefined","notification","title","text","smallIcon","geofenceToWire","g","id","lat","latitude","lng","longitude","radiusMeters","notifyOnEntry","notifyOnExit","a","accessToken","refreshToken","expiresAtMs","expiresAt","getTime","strategy","refreshUrl","refreshPayload","refreshHeaders","refreshBodyFormat","responseMapping","expiresIn","skewMarginSeconds","seedEpoch","wireToLocation","w","timestamp","Date","timestampMs","accuracy","speed","bearing","altitude","quality","oneOf","trigger","motion","activity","isMock","wireToGeofence","wireToGeofenceEvent","geofenceId","type","wireToState","kind","reason","toStopReason","stopReason","wireToSyncStatus","toSyncFailure","failure","wireToAuthTokens","epoch","s","allowed","fallback","includes","rethrowAsBeekonError","e","code","message","String","codeToKind"],"sourceRoot":"../../../src","sources":["internal/mappers.ts"],"mappings":";;AAoBA,SAASA,WAAW,QAA8B,mBAAgB;AAalE;AACA;AACA,MAAMC,QAAQ,GAAG;EACfC,8BAA8B,EAAE,EAAE;EAClCC,iCAAiC,EAAE,GAAG;EACtCC,YAAY,EAAE,UAA0B;EACxCC,cAAc,EAAE,OAAyB;EACzCC,sBAAsB,EAAE,CAAC;EACzBC,cAAc,EAAE,KAAK;EACrBC,mBAAmB,EAAE,GAAG;EACxBC,aAAa,EAAE,GAAG;EAClBC,YAAY,EAAE,QAAwB;EACtCC,cAAc,EAAE,MAAwB;EACxCC,qBAAqB,EAAE,EAAE;EACzBC,kBAAkB,EAAE;IAAEC,aAAa,EAAE;EAAuB;AAI9D,CAAC;;AAED;;AAEA,OAAO,SAASC,eAAeA,CAC7BC,MAA0C,EAC1B;EAChB,IAAI,CAACA,MAAM,EAAE,OAAO,EAAE;EACtB,OAAOC,MAAM,CAACC,IAAI,CAACF,MAAM,CAAC,CAACG,GAAG,CAAEC,GAAG,KAAM;IAAEA,GAAG;IAAEC,KAAK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AAK,mBAAmB;MACtB,OAAO,kBAAkB;IAC3B,KAAK,4BAA4B;MAC/B,OAAO,0BAA0B;IACnC,KAAK,sBAAsB;MACzB,OAAO,qBAAqB;IAC9B;MACE,OAAOjE,SAAS;EACpB;AACF","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/auth.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -1,14 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* Error kinds thrown across the bridge.
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* Error kinds thrown across the bridge.
|
|
5
|
+
*
|
|
6
|
+
* Lifecycle problems on the tracking path never throw — they surface on the
|
|
7
|
+
* `onState` stream as `stopped(reason)`. The exceptions are the storage/geofence
|
|
8
|
+
* kinds below and the precondition kinds thrown by the explicit one-shot
|
|
9
|
+
* `getCurrentLocation()` (which has no `onState` arc of its own to report on; a
|
|
10
|
+
* plain timeout returns `null` instead of throwing).
|
|
7
11
|
*
|
|
8
12
|
* - `'storage'` — a local-store (SQLite) read/write failed. Thrown by
|
|
9
13
|
* `getLocations()`, `deleteLocations()`, and `pendingUploadCount()`.
|
|
10
14
|
* - `'invalidGeofence'` — a geofence passed to `addGeofences()` failed
|
|
11
15
|
* validation (empty/oversized id, or non-positive radius).
|
|
16
|
+
* - `'permissionDenied'` — location permission is missing. Thrown by
|
|
17
|
+
* `getCurrentLocation()`.
|
|
18
|
+
* - `'locationServicesDisabled'` — system location services are off. Thrown by
|
|
19
|
+
* `getCurrentLocation()`.
|
|
20
|
+
* - `'locationUnavailable'` — location is otherwise unavailable (e.g. Play
|
|
21
|
+
* Services absent/old). Thrown by `getCurrentLocation()`.
|
|
12
22
|
*/
|
|
13
23
|
|
|
14
24
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BeekonError","Error","constructor","kind","message","name"],"sourceRoot":"../../../src","sources":["types/error.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;
|
|
1
|
+
{"version":3,"names":["BeekonError","Error","constructor","kind","message","name"],"sourceRoot":"../../../src","sources":["types/error.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAQA;AACA;AACA;AACA;AACA,OAAO,MAAMA,WAAW,SAASC,KAAK,CAAC;EAGrCC,WAAWA,CAACC,IAAqB,EAAEC,OAAe,EAAE;IAClD,KAAK,CAACA,OAAO,CAAC;IACd,IAAI,CAACC,IAAI,GAAG,aAAa;IACzB,IAAI,CAACF,IAAI,GAAGA,IAAI;EAClB;AACF","ignoreList":[]}
|
|
@@ -24,16 +24,44 @@ export type WireKeyValue = {
|
|
|
24
24
|
key: string;
|
|
25
25
|
value: string;
|
|
26
26
|
};
|
|
27
|
+
/** Flat wire form of `AuthResponseMapping`. Omitted keys use common-name detection. */
|
|
28
|
+
export type WireAuthResponseMapping = {
|
|
29
|
+
accessToken?: string;
|
|
30
|
+
refreshToken?: string;
|
|
31
|
+
expiresIn?: string;
|
|
32
|
+
expiresAt?: string;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Flat wire form of `AuthConfig` on {@link WireSyncConfig.auth}. Enums travel as
|
|
36
|
+
* strings (`strategy`: 'bearer'|'raw'; `refreshBodyFormat`: 'form'|'json'),
|
|
37
|
+
* string maps as `WireKeyValue[]`, and `expiresAtMs` is epoch milliseconds.
|
|
38
|
+
*/
|
|
39
|
+
export type WireAuthConfig = {
|
|
40
|
+
accessToken?: string;
|
|
41
|
+
refreshToken?: string;
|
|
42
|
+
expiresAtMs?: number;
|
|
43
|
+
strategy: string;
|
|
44
|
+
refreshUrl?: string;
|
|
45
|
+
refreshPayload: WireKeyValue[];
|
|
46
|
+
refreshHeaders: WireKeyValue[];
|
|
47
|
+
refreshBodyFormat: string;
|
|
48
|
+
responseMapping: WireAuthResponseMapping;
|
|
49
|
+
skewMarginSeconds: number;
|
|
50
|
+
seedEpoch?: number;
|
|
51
|
+
};
|
|
27
52
|
export type WireSyncConfig = {
|
|
28
53
|
url: string;
|
|
29
54
|
headers: WireKeyValue[];
|
|
30
55
|
intervalSeconds: number;
|
|
31
56
|
batchSize: number;
|
|
57
|
+
/** Token-refresh recipe; omitted keeps static-header auth. */
|
|
58
|
+
auth?: WireAuthConfig;
|
|
32
59
|
};
|
|
33
60
|
/** Android-only foreground-service notification overrides. iOS ignores it. */
|
|
34
61
|
export type WireNotificationConfig = {
|
|
35
62
|
title?: string;
|
|
36
63
|
text?: string;
|
|
64
|
+
smallIcon?: string;
|
|
37
65
|
};
|
|
38
66
|
export type WireConfig = {
|
|
39
67
|
/** All fields required at the wire level — the TS facade applies defaults. */
|
|
@@ -101,6 +129,16 @@ export type WireSyncStatus = {
|
|
|
101
129
|
/** Only populated when `type === 'failed'`. One of: 'auth' | 'rejected'. */
|
|
102
130
|
failure?: string;
|
|
103
131
|
};
|
|
132
|
+
/**
|
|
133
|
+
* A token set the SDK rotated, delivered on `onAuthTokens`. `expiresAtMs` is
|
|
134
|
+
* epoch milliseconds; both it and `refreshToken` are `null` when absent.
|
|
135
|
+
*/
|
|
136
|
+
export type WireAuthTokens = {
|
|
137
|
+
accessToken: string;
|
|
138
|
+
refreshToken: string | null;
|
|
139
|
+
expiresAtMs: number | null;
|
|
140
|
+
epoch: number;
|
|
141
|
+
};
|
|
104
142
|
export interface Spec extends TurboModule {
|
|
105
143
|
/**
|
|
106
144
|
* The config crosses as an untyped object (`ReadableMap` on Android,
|
|
@@ -113,6 +151,15 @@ export interface Spec extends TurboModule {
|
|
|
113
151
|
start(): Promise<void>;
|
|
114
152
|
stop(): Promise<void>;
|
|
115
153
|
resumeIfNeeded(): Promise<void>;
|
|
154
|
+
/**
|
|
155
|
+
* One immediate fix. `accuracy` `''` uses the configured mode (a plain
|
|
156
|
+
* `string` rather than `string | null` for portable Codegen, matching
|
|
157
|
+
* `deleteLocations`). Resolves a 0- or 1-element array — empty means timeout /
|
|
158
|
+
* no fix — rather than a nullable struct, which Codegen does not portably
|
|
159
|
+
* support. Rejects with `PERMISSION_DENIED` / `LOCATION_SERVICES_DISABLED` /
|
|
160
|
+
* `LOCATION_UNAVAILABLE` on a precondition failure.
|
|
161
|
+
*/
|
|
162
|
+
getCurrentLocation(timeoutMs: number, accuracy: string): Promise<WireLocation[]>;
|
|
116
163
|
getLocations(fromMs: number, toMs: number): Promise<WireLocation[]>;
|
|
117
164
|
/**
|
|
118
165
|
* A negative `beforeMs` deletes all stored locations (the wire encoding of
|
|
@@ -130,6 +177,7 @@ export interface Spec extends TurboModule {
|
|
|
130
177
|
readonly onLocation: CodegenTypes.EventEmitter<WireLocation>;
|
|
131
178
|
readonly onGeofenceEvent: CodegenTypes.EventEmitter<WireGeofenceEvent>;
|
|
132
179
|
readonly onSyncStatus: CodegenTypes.EventEmitter<WireSyncStatus>;
|
|
180
|
+
readonly onAuthTokens: CodegenTypes.EventEmitter<WireAuthTokens>;
|
|
133
181
|
}
|
|
134
182
|
declare const _default: Spec;
|
|
135
183
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NativeBeekonRn.d.ts","sourceRoot":"","sources":["../../../src/NativeBeekonRn.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAG9D,+DAA+D;AAC/D,MAAM,MAAM,YAAY,GAAG;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAA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