@wayq/beekon-rn 0.0.8 → 0.1.0
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 +3 -3
- package/CHANGELOG.md +58 -6
- package/LICENSE.txt +3 -3
- package/README.md +85 -264
- package/android/build.gradle +2 -2
- package/android/src/main/java/in/wayq/beekonrn/BeekonRnModule.kt +133 -8
- package/ios/BeekonRn.mm +40 -0
- package/ios/BeekonRn.swift +176 -8
- package/ios/Frameworks/BeekonKit.xcframework/Info.plist +5 -5
- 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/Modules/BeekonKit.swiftmodule/arm64-apple-ios.abi.json +5839 -3482
- 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 +93 -16
- 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/Modules/BeekonKit.swiftmodule/arm64-apple-ios-simulator.abi.json +5839 -3482
- 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 +93 -16
- package/ios/Frameworks/BeekonKit.xcframework/ios-arm64_x86_64-simulator/BeekonKit.framework/Modules/BeekonKit.swiftmodule/x86_64-apple-ios-simulator.abi.json +5839 -3482
- 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 +93 -16
- package/lib/module/NativeBeekonRn.js +6 -0
- package/lib/module/NativeBeekonRn.js.map +1 -1
- package/lib/module/beekon.js +109 -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 +68 -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/module/types/permission.js +2 -0
- package/lib/module/types/permission.js.map +1 -0
- package/lib/typescript/src/NativeBeekonRn.d.ts +66 -2
- package/lib/typescript/src/NativeBeekonRn.d.ts.map +1 -1
- package/lib/typescript/src/beekon.d.ts +56 -1
- package/lib/typescript/src/beekon.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +5 -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 +5 -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/permission.d.ts +42 -0
- package/lib/typescript/src/types/permission.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 +5 -5
- package/scripts/fetch-beekonkit.sh +6 -6
- package/src/NativeBeekonRn.ts +70 -2
- package/src/beekon.ts +114 -1
- package/src/index.tsx +12 -1
- package/src/internal/licenseNudge.ts +80 -0
- package/src/internal/mappers.ts +93 -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/permission.ts +48 -0
- package/src/types/state.ts +4 -0
|
@@ -1 +1 @@
|
|
|
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","licenseKey","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","wireToLicenseStatus","status","tier","entitlements","s","allowed","fallback","includes","rethrowAsBeekonError","e","code","message","String","codeToKind"],"sourceRoot":"../../../src","sources":["internal/mappers.ts"],"mappings":";;AAqBA,SAASA,WAAW,QAA8B,mBAAgB;A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IAAIlF,WAAW,CAACkF,IAAI,EAAEoB,OAAO,CAAC;EACtC;EACA,MAAMF,CAAC;AACT;AAEA,SAASI,UAAUA,CAACH,IAAwB,EAA+B;EACzE,QAAQA,IAAI;IACV,KAAK,iBAAiB;MACpB,OAAO,SAAS;IAClB,KAAK,kBAAkB;MACrB,OAAO,iBAAiB;IAC1B,KAAK,mBAAmB;MACtB,OAAO,kBAAkB;IAC3B,KAAK,4BAA4B;MAC/B,OAAO,0BAA0B;IACnC,KAAK,sBAAsB;MACzB,OAAO,qBAAqB;IAC9B;MACE,OAAOtE,SAAS;EACpB;AACF","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["BeekonError","DEFAULTS","minTimeBetweenLocationsSeconds","minDistanceBetweenLocationsMeters","accuracyMode","whenStationary","stationaryRadiusMeters","detectActivity","syncIntervalSeconds","syncBatchSize","syncThreshold","authStrategy","authBodyFormat","authSkewMarginSeconds","authRefreshHeaders","Authorization","logLevel","recordToEntries","record","Object","keys","map","key","value","notificationToWire","config","notification","title","text","smallIcon","undefined","configToWire","tracking","mode","projectKey","endpoint","sync","licenseKey","url","headers","intervalSeconds","batchSize","auth","authToWire","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","wireToLogEntry","level","category","message","wireToState","kind","reason","toStopReason","stopReason","wireToPermissionStatus","isAuthorized","canTrackInBackground","wireToSyncStatus","toSyncFailure","failure","wireToAuthTokens","epoch","wireToLicenseStatus","status","tier","entitlements","s","allowed","fallback","includes","rethrowAsBeekonError","e","code","String","codeToKind"],"sourceRoot":"../../../src","sources":["internal/mappers.ts"],"mapp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|
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Foreground-service notification overrides. **Android-only** — the platform
|
|
5
|
+
* requires every location foreground service to show a persistent notification.
|
|
6
|
+
* Both fields are optional; missing values fall back to native defaults.
|
|
7
|
+
* Ignored on iOS.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Server-upload configuration. Presence of {@link SelfManagedConfig.sync} turns
|
|
12
|
+
* on batched uploads of stored locations and geofence events; omitting it keeps
|
|
13
|
+
* tracking local-only.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* **Cloud-mode** configuration (cloud-mode-v1 §2). Point the SDK at Beekon
|
|
18
|
+
* Cloud (or a self-hosted Beekon backend) with a project key; the **server**
|
|
19
|
+
* owns the tracking parameters, sync cadence, geofences, and the license. This
|
|
20
|
+
* arm therefore exposes **only** the project credential, an optional endpoint
|
|
21
|
+
* override, the platform-universal Android `notification`, and `logLevel` — it
|
|
22
|
+
* deliberately does NOT expose tracking params, `sync`, or `licenseKey` (those
|
|
23
|
+
* are server-owned or derived).
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* **Self-managed** configuration (cloud-mode-v1 §2 / self-managed-mode-v1).
|
|
28
|
+
* The app owns all configuration locally — tracking parameters, an optional
|
|
29
|
+
* `sync` (omit ⇒ local-only; set ⇒ custom-backend ingest), an optional
|
|
30
|
+
* `licenseKey`, plus `notification` and `logLevel`. This is the pre-cloud
|
|
31
|
+
* behaviour.
|
|
32
|
+
*
|
|
33
|
+
* Every field other than `mode` is optional — `Beekon.start()` falls back to
|
|
34
|
+
* the previously persisted config, or to the documented defaults below if never
|
|
35
|
+
* configured.
|
|
36
|
+
*
|
|
37
|
+
* The two gate knobs (`minTimeBetweenLocationsSeconds`,
|
|
38
|
+
* `minDistanceBetweenLocationsMeters`) admit a fix only when **both** are
|
|
39
|
+
* satisfied; pass `0` to disable a gate.
|
|
40
|
+
*/
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Tracking configuration. A **sealed two-arm** discriminated union (cloud-mode-v1
|
|
44
|
+
* §2): the `mode` tag selects {@link CloudConfig} (server-owned config) or
|
|
45
|
+
* {@link SelfManagedConfig} (app-owned config). Each arm exposes only that arm's
|
|
46
|
+
* fields — the cloud arm cannot carry tracking params / sync / a license key.
|
|
47
|
+
*
|
|
48
|
+
* Build a value with the {@link BeekonConfig.cloud} / {@link BeekonConfig.selfManaged}
|
|
49
|
+
* factories, or with a plain object literal that includes the `mode` tag.
|
|
50
|
+
*/
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Factory helpers mirroring the native sealed-type constructors
|
|
54
|
+
* (`BeekonConfig.cloud(...)` / `BeekonConfig.selfManaged(...)`). They stamp the
|
|
55
|
+
* `mode` discriminator so each call site can express only its arm's fields.
|
|
56
|
+
*
|
|
57
|
+
* Merged with the {@link BeekonConfig} type so `BeekonConfig` is usable as both
|
|
58
|
+
* a type and a value.
|
|
59
|
+
*/
|
|
60
|
+
export const BeekonConfig = {
|
|
61
|
+
/** Build a {@link CloudConfig}. `projectKey` is required. */
|
|
62
|
+
cloud(options) {
|
|
63
|
+
return {
|
|
64
|
+
mode: 'cloud',
|
|
65
|
+
...options
|
|
66
|
+
};
|
|
67
|
+
},
|
|
68
|
+
/** Build a {@link SelfManagedConfig}. Every field is optional. */
|
|
69
|
+
selfManaged(options = {}) {
|
|
70
|
+
return {
|
|
71
|
+
mode: 'selfManaged',
|
|
72
|
+
...options
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
};
|
|
4
76
|
//# sourceMappingURL=config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/config.ts"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["BeekonConfig","cloud","options","mode","selfManaged"],"sourceRoot":"../../../src","sources":["types/config.ts"],"mappings":";;AAGA;AACA;AACA;AACA;AACA;AACA;;AAgBA;AACA;AACA;AACA;AACA;;AA+BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AA2BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AA+CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,YAAY,GAAG;EAC1B;EACAC,KAAKA,CAACC,OAAkC,EAAe;IACrD,OAAO;MAAEC,IAAI,EAAE,OAAO;MAAE,GAAGD;IAAQ,CAAC;EACtC,CAAC;EACD;EACAE,WAAWA,CACTF,OAAwC,GAAG,CAAC,CAAC,EAC1B;IACnB,OAAO;MAAEC,IAAI,EAAE,aAAa;MAAE,GAAGD;IAAQ,CAAC;EAC5C;AACF,CAAU","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/log.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/permission.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -54,6 +54,7 @@ export type WireSyncConfig = {
|
|
|
54
54
|
headers: WireKeyValue[];
|
|
55
55
|
intervalSeconds: number;
|
|
56
56
|
batchSize: number;
|
|
57
|
+
syncThreshold: number;
|
|
57
58
|
/** Token-refresh recipe; omitted keeps static-header auth. */
|
|
58
59
|
auth?: WireAuthConfig;
|
|
59
60
|
};
|
|
@@ -64,7 +65,27 @@ export type WireNotificationConfig = {
|
|
|
64
65
|
smallIcon?: string;
|
|
65
66
|
};
|
|
66
67
|
export type WireConfig = {
|
|
67
|
-
/**
|
|
68
|
+
/**
|
|
69
|
+
* Configuration-ownership discriminator (cloud-mode-v1 §2). One of: 'cloud' |
|
|
70
|
+
* 'selfManaged'. The native side switches on this to build the matching arm of
|
|
71
|
+
* the sealed `BeekonConfig`.
|
|
72
|
+
*/
|
|
73
|
+
mode: string;
|
|
74
|
+
/**
|
|
75
|
+
* Cloud arm only: the opaque project credential (`bkproj_…`). Omitted/empty for
|
|
76
|
+
* the self-managed arm; the native cloud arm trims it and rejects an empty key.
|
|
77
|
+
*/
|
|
78
|
+
projectKey?: string;
|
|
79
|
+
/**
|
|
80
|
+
* Cloud arm only: base-URL override. Omitted means the native baked-in default
|
|
81
|
+
* (`https://api.getbeekon.com`). Ignored by the self-managed arm.
|
|
82
|
+
*/
|
|
83
|
+
endpoint?: string;
|
|
84
|
+
/**
|
|
85
|
+
* Self-managed arm only (ignored by the cloud arm, which derives tracking
|
|
86
|
+
* config from the server). All fields required at the wire level — the TS
|
|
87
|
+
* facade applies defaults.
|
|
88
|
+
*/
|
|
68
89
|
minTimeBetweenLocationsSeconds: number;
|
|
69
90
|
minDistanceBetweenLocationsMeters: number;
|
|
70
91
|
/** One of: 'high' | 'balanced' | 'low'. */
|
|
@@ -84,6 +105,19 @@ export type WireConfig = {
|
|
|
84
105
|
* object, so this field documents the shape rather than altering codegen.
|
|
85
106
|
*/
|
|
86
107
|
licenseKey?: string;
|
|
108
|
+
/**
|
|
109
|
+
* Diagnostic log verbosity threshold (spec `diagnostics/log-format-v1` §1).
|
|
110
|
+
* One of: 'off' | 'error' | 'warn' | 'info' | 'debug' | 'verbose'.
|
|
111
|
+
*/
|
|
112
|
+
logLevel: string;
|
|
113
|
+
};
|
|
114
|
+
export type WireLogEntry = {
|
|
115
|
+
id: string;
|
|
116
|
+
timestampMs: number;
|
|
117
|
+
/** One of: 'error' | 'warn' | 'info' | 'debug' | 'verbose'. */
|
|
118
|
+
level: string;
|
|
119
|
+
category: string;
|
|
120
|
+
message: string;
|
|
87
121
|
};
|
|
88
122
|
export type WireLocation = {
|
|
89
123
|
id: string;
|
|
@@ -126,7 +160,7 @@ export type WireState = {
|
|
|
126
160
|
/**
|
|
127
161
|
* Only populated when `type === 'stopped'`. One of: 'user' |
|
|
128
162
|
* 'permissionDenied' | 'locationServicesDisabled' | 'locationUnavailable' |
|
|
129
|
-
* 'system'.
|
|
163
|
+
* 'cloudModeUnavailable' | 'system'.
|
|
130
164
|
*/
|
|
131
165
|
stopReason?: string;
|
|
132
166
|
};
|
|
@@ -168,6 +202,20 @@ export type WireLicenseStatus = {
|
|
|
168
202
|
*/
|
|
169
203
|
reason: string | null;
|
|
170
204
|
};
|
|
205
|
+
/**
|
|
206
|
+
* Flat wire form of the current location-permission grant (read-only). `level`
|
|
207
|
+
* is the wire-stable identifier; `accuracy` is `''` (not null — Codegen has no
|
|
208
|
+
* portable nullable-enum) when location is not granted, else 'full' | 'reduced'.
|
|
209
|
+
*/
|
|
210
|
+
export type WirePermissionStatus = {
|
|
211
|
+
/**
|
|
212
|
+
* One of: 'notDetermined' | 'denied' | 'restricted' | 'foreground' |
|
|
213
|
+
* 'background'.
|
|
214
|
+
*/
|
|
215
|
+
level: string;
|
|
216
|
+
/** 'full' | 'reduced', or '' when not granted. */
|
|
217
|
+
accuracy: string;
|
|
218
|
+
};
|
|
171
219
|
export interface Spec extends TurboModule {
|
|
172
220
|
/**
|
|
173
221
|
* The config crosses as an untyped object (`ReadableMap` on Android,
|
|
@@ -208,12 +256,28 @@ export interface Spec extends TurboModule {
|
|
|
208
256
|
* running on — no cross-platform merging.
|
|
209
257
|
*/
|
|
210
258
|
licenseStatus(): Promise<WireLicenseStatus>;
|
|
259
|
+
/**
|
|
260
|
+
* The current location-permission grant (read-only; never prompts). For
|
|
261
|
+
* pre-start checks — during tracking, permission loss surfaces on `onState`.
|
|
262
|
+
*/
|
|
263
|
+
getPermissionStatus(): Promise<WirePermissionStatus>;
|
|
264
|
+
/** Persisted diagnostic log entries in `[fromMs, toMs]`, oldest first. */
|
|
265
|
+
getLog(fromMs: number, toMs: number): Promise<WireLogEntry[]>;
|
|
266
|
+
/** Serialize the whole log buffer to an NDJSON file; resolves its path. */
|
|
267
|
+
exportLog(): Promise<string>;
|
|
268
|
+
/** Delete all persisted diagnostic log entries. */
|
|
269
|
+
clearLog(): Promise<void>;
|
|
270
|
+
/** Set the diagnostic log threshold at runtime. */
|
|
271
|
+
setLogLevel(level: string): Promise<void>;
|
|
272
|
+
/** Write a host-app breadcrumb (category `app`) into the log pipeline. */
|
|
273
|
+
log(level: string, message: string): Promise<void>;
|
|
211
274
|
readonly onState: CodegenTypes.EventEmitter<WireState>;
|
|
212
275
|
readonly onLocation: CodegenTypes.EventEmitter<WireLocation>;
|
|
213
276
|
readonly onGeofenceEvent: CodegenTypes.EventEmitter<WireGeofenceEvent>;
|
|
214
277
|
readonly onSyncStatus: CodegenTypes.EventEmitter<WireSyncStatus>;
|
|
215
278
|
readonly onAuthTokens: CodegenTypes.EventEmitter<WireAuthTokens>;
|
|
216
279
|
readonly onLicenseStatus: CodegenTypes.EventEmitter<WireLicenseStatus>;
|
|
280
|
+
readonly onLog: CodegenTypes.EventEmitter<WireLogEntry>;
|
|
217
281
|
}
|
|
218
282
|
declare const _default: Spec;
|
|
219
283
|
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,uFAAuF;AACvF,MAAM,MAAM,uBAAuB,GAAG;IACpC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B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O,CAAC,MAAM,CAAC,CAAC;IAC7B,mDAAmD;IACnD,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1B,mDAAmD;IACnD,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1C,0EAA0E;IAC1E,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEnD,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;IACvD,QAAQ,CAAC,UAAU,EAAE,YAAY,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;IAC7D,QAAQ,CAAC,eAAe,EAAE,YAAY,CAAC,YAAY,CAAC,iBAAiB,CAAC,CAAC;IACvE,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC;IACjE,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC;IACjE,QAAQ,CAAC,eAAe,EAAE,YAAY,CAAC,YAAY,CAAC,iBAAiB,CAAC,CAAC;IACvE,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;CACzD;;AAED,wBAAkE"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import type { AuthTokens } from './types/auth';
|
|
2
2
|
import type { BeekonConfig } from './types/config';
|
|
3
|
-
import type { AccuracyMode } from './types/enums';
|
|
3
|
+
import type { AccuracyMode, LogLevel } from './types/enums';
|
|
4
4
|
import type { BeekonGeofence, GeofenceEvent } from './types/geofence';
|
|
5
5
|
import type { LicenseStatus } from './types/license';
|
|
6
6
|
import type { Location } from './types/location';
|
|
7
|
+
import type { LogEntry } from './types/log';
|
|
8
|
+
import type { PermissionStatus } from './types/permission';
|
|
7
9
|
import type { BeekonState } from './types/state';
|
|
8
10
|
import type { SyncStatus } from './types/sync';
|
|
9
11
|
/**
|
|
@@ -26,6 +28,15 @@ import type { SyncStatus } from './types/sync';
|
|
|
26
28
|
*/
|
|
27
29
|
declare class BeekonImpl {
|
|
28
30
|
private readonly hub;
|
|
31
|
+
private readonly licenseNudge;
|
|
32
|
+
private licenseNudgeAttached;
|
|
33
|
+
/**
|
|
34
|
+
* Echo the evaluation-mode nudge to the JS console once, on first lifecycle
|
|
35
|
+
* use — so it only activates for apps actually using the SDK. Metro shows JS
|
|
36
|
+
* console only, so this is how the native nudge reaches an RN dev. See
|
|
37
|
+
* {@link LicenseNudge}.
|
|
38
|
+
*/
|
|
39
|
+
private activateLicenseNudge;
|
|
29
40
|
/**
|
|
30
41
|
* Set tracking parameters. Optional — `start()` falls back to the previously
|
|
31
42
|
* persisted config, or the SDK defaults if never configured. While tracking,
|
|
@@ -116,6 +127,44 @@ declare class BeekonImpl {
|
|
|
116
127
|
* degrades, or delays the SDK. For live transitions use {@link onLicenseStatus}.
|
|
117
128
|
*/
|
|
118
129
|
licenseStatus(): Promise<LicenseStatus>;
|
|
130
|
+
/**
|
|
131
|
+
* The current location-permission grant — a point-in-time read for
|
|
132
|
+
* **pre-start** checks, returned without ever prompting. Beekon never requests
|
|
133
|
+
* permission; the app owns that. A snapshot, not an observer: once tracking is
|
|
134
|
+
* running, permission loss surfaces on `onState` as
|
|
135
|
+
* `{ kind: 'stopped', reason: 'permissionDenied' }`. On Android, "not yet
|
|
136
|
+
* asked" and "denied" both report `'notDetermined'`; `'restricted'` is iOS-only.
|
|
137
|
+
*/
|
|
138
|
+
getPermissionStatus(): Promise<PermissionStatus>;
|
|
139
|
+
/**
|
|
140
|
+
* Read persisted diagnostic log entries in the inclusive range `[from, to]`,
|
|
141
|
+
* oldest first. Entries survive process death, so this recovers what the SDK
|
|
142
|
+
* did during a background session — the key to diagnosing field issues. Throws
|
|
143
|
+
* `BeekonError` with kind `'storage'` on a read failure. Requires native ≥ 0.0.9.
|
|
144
|
+
*/
|
|
145
|
+
getLog(from: Date, to: Date): Promise<LogEntry[]>;
|
|
146
|
+
/**
|
|
147
|
+
* Serialize the whole diagnostic log buffer to an NDJSON file and resolve its
|
|
148
|
+
* path. The app owns the file — attach it to a support email, share it, or
|
|
149
|
+
* upload it. Throws `BeekonError` with kind `'storage'` on a failure. Requires
|
|
150
|
+
* native ≥ 0.0.9.
|
|
151
|
+
*/
|
|
152
|
+
exportLog(): Promise<string>;
|
|
153
|
+
/** Delete all persisted diagnostic log entries. Requires native ≥ 0.0.9. */
|
|
154
|
+
clearLog(): Promise<void>;
|
|
155
|
+
/**
|
|
156
|
+
* Set the diagnostic log verbosity threshold at runtime — no restart needed.
|
|
157
|
+
* Raise to `'debug'`/`'verbose'` for field diagnosis, then lower again. A later
|
|
158
|
+
* `configure` re-applies `BeekonConfig.logLevel` and supersedes this. Requires
|
|
159
|
+
* native ≥ 0.0.9.
|
|
160
|
+
*/
|
|
161
|
+
setLogLevel(level: LogLevel): Promise<void>;
|
|
162
|
+
/**
|
|
163
|
+
* Write a host-app breadcrumb into the same pipeline as the SDK's own logs
|
|
164
|
+
* (category `app`), so app and SDK events interleave in one timeline. Requires
|
|
165
|
+
* native ≥ 0.0.9.
|
|
166
|
+
*/
|
|
167
|
+
log(level: LogLevel, message: string): Promise<void>;
|
|
119
168
|
/**
|
|
120
169
|
* Subscribe to tracking-state transitions (`idle` / `tracking` /
|
|
121
170
|
* `stopped(reason)`). The current state is delivered to new subscribers
|
|
@@ -153,6 +202,12 @@ declare class BeekonImpl {
|
|
|
153
202
|
* is lazy). Purely observational. Returns an unsubscribe function.
|
|
154
203
|
*/
|
|
155
204
|
onLicenseStatus(cb: (s: LicenseStatus) => void): () => void;
|
|
205
|
+
/**
|
|
206
|
+
* Subscribe to diagnostic log entries as they are recorded — SDK subsystems
|
|
207
|
+
* plus host breadcrumbs from {@link log}. Broadcast (no replay); read history
|
|
208
|
+
* with {@link getLog}. Returns an unsubscribe function. Requires native ≥ 0.0.9.
|
|
209
|
+
*/
|
|
210
|
+
onLog(cb: (e: LogEntry) => void): () => void;
|
|
156
211
|
}
|
|
157
212
|
export declare const Beekon: BeekonImpl;
|
|
158
213
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"beekon.d.ts","sourceRoot":"","sources":["../../../src/beekon.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"beekon.d.ts","sourceRoot":"","sources":["../../../src/beekon.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AA+I/C;;;;;;;;;;;;;;;;;GAiBG;AACH,cAAM,UAAU;IACd,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAkB;IACtC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAsB;IACnD,OAAO,CAAC,oBAAoB,CAAS;IAErC;;;;;OAKG;IACH,OAAO,CAAC,oBAAoB;IAM5B;;;;;OAKG;IACG,SAAS,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAMpD;;;;;OAKG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,C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;;;;OAKG;IACG,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC;IAQlC,4EAA4E;IACtE,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAQ/B;;;;;OAKG;IACG,WAAW,CAAC,KAAK,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IAIjD;;;;OAIG;IACG,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI1D;;;;OAIG;IACH,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,WAAW,KAAK,IAAI,GAAG,MAAM,IAAI;IAIjD;;;;OAIG;IACH,UAAU,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,QAAQ,KAAK,IAAI,GAAG,MAAM,IAAI;IAIjD;;;OAGG;IACH,eAAe,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,aAAa,KAAK,IAAI,GAAG,MAAM,IAAI;IAI3D;;;;OAIG;IACH,YAAY,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,GAAG,MAAM,IAAI;IAIrD;;;;;OAKG;IACH,YAAY,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,GAAG,MAAM,IAAI;IAIrD;;;;;OAKG;IACH,eAAe,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,aAAa,KAAK,IAAI,GAAG,MAAM,IAAI;IAI3D;;;;OAIG;IACH,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,QAAQ,KAAK,IAAI,GAAG,MAAM,IAAI;CAG7C;AAED,eAAO,MAAM,MAAM,YAAmB,CAAC"}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
export { Beekon } from './beekon';
|
|
2
|
-
export
|
|
3
|
-
export type {
|
|
2
|
+
export { BeekonConfig } from './types/config';
|
|
3
|
+
export type { CloudConfig, SelfManagedConfig, SyncConfig, NotificationConfig, } from './types/config';
|
|
4
|
+
export type { AccuracyMode, StationaryMode, LocationTrigger, LocationQuality, MotionState, ActivityType, AuthStrategy, AuthBodyFormat, LogLevel, } from './types/enums';
|
|
5
|
+
export type { LogEntry } from './types/log';
|
|
4
6
|
export type { AuthConfig, AuthResponseMapping, AuthTokens } from './types/auth';
|
|
5
7
|
export type { Location } from './types/location';
|
|
6
8
|
export type { BeekonGeofence, GeofenceEvent, Transition, } from './types/geofence';
|
|
7
9
|
export type { BeekonState, StopReason } from './types/state';
|
|
10
|
+
export type { PermissionStatus, PermissionLevel, PermissionAccuracy, } from './types/permission';
|
|
8
11
|
export type { SyncStatus, SyncFailure } from './types/sync';
|
|
9
12
|
export type { LicenseStatus, LicenseInvalidReason } from './types/license';
|
|
10
13
|
export { BeekonError, type BeekonErrorKind } from './types/error';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAIlC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EACV,WAAW,EACX,iBAAiB,EACjB,UAAU,EACV,kBAAkB,GACnB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACV,YAAY,EACZ,cAAc,EACd,eAAe,EACf,eAAe,EACf,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,QAAQ,GACT,MAAM,eAAe,CAAC;AACvB,YAAY,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,YAAY,EAAE,UAAU,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAChF,YAAY,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACjD,YAAY,EACV,cAAc,EACd,aAAa,EACb,UAAU,GACX,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC7D,YAAY,EACV,gBAAgB,EAChB,eAAe,EACf,kBAAkB,GACnB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC5D,YAAY,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { LicenseStatus } from '../types/license';
|
|
2
|
+
/**
|
|
3
|
+
* Echoes the evaluation-mode license nudge into the JS console.
|
|
4
|
+
*
|
|
5
|
+
* The native SDKs log the license notice to the platform stream (iOS unified
|
|
6
|
+
* logging, Android Logcat), but Metro shows only JS `console.*` — neither native
|
|
7
|
+
* stream reaches it, so a React Native developer never sees the "you're
|
|
8
|
+
* unlicensed" nudge in the terminal they actually watch. This mirrors the
|
|
9
|
+
* **evaluation** notice (no key supplied) onto `console.warn` so it surfaces in
|
|
10
|
+
* Metro, on **both** platforms.
|
|
11
|
+
*
|
|
12
|
+
* Debug-only (`__DEV__`): a release bundle never console-warns. Fires **at most
|
|
13
|
+
* once per JS context** on the first `evaluation` status, mirroring the native
|
|
14
|
+
* once-per-transition guarantee. Purely a log line — it never blocks, degrades,
|
|
15
|
+
* or delays the SDK (license-format-v1 policy anchor).
|
|
16
|
+
*
|
|
17
|
+
* Silence it without a key by setting `globalThis.BEEKON_EVALUATION_MODE = true`
|
|
18
|
+
* before the SDK initializes — the JS analog of the native `BeekonEvaluationMode`
|
|
19
|
+
* plist / `in.wayq.beekon.evaluationMode` manifest acknowledgment.
|
|
20
|
+
*/
|
|
21
|
+
export declare class LicenseNudge {
|
|
22
|
+
private emitted;
|
|
23
|
+
private unsubscribe;
|
|
24
|
+
private readonly log;
|
|
25
|
+
private readonly enabled;
|
|
26
|
+
constructor(options?: {
|
|
27
|
+
log?: (message: string) => void;
|
|
28
|
+
enabled?: boolean;
|
|
29
|
+
});
|
|
30
|
+
/**
|
|
31
|
+
* Subscribe via [subscribe] — a replay-1 license-status subscription that
|
|
32
|
+
* returns an unsubscribe function — and emit the banner the first time the
|
|
33
|
+
* status is `evaluation`. A no-op when disabled; idempotent.
|
|
34
|
+
*/
|
|
35
|
+
attach(subscribe: (cb: (status: LicenseStatus) => void) => () => void): void;
|
|
36
|
+
private onStatus;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=licenseNudge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"licenseNudge.d.ts","sourceRoot":"","sources":["../../../../src/internal/licenseNudge.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AA4BtD;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,WAAW,CAA2B;IAC9C,OAAO,CAAC,QAAQ,CAAC,GAAG,CAA4B;IAChD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAU;gBAEtB,OAAO,CAAC,EAAE;QACpB,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;QAChC,OAAO,CAAC,EAAE,OAAO,CAAC;KACnB;IAKD;;;;OAIG;IACH,MAAM,CAAC,SAAS,EAAE,CAAC,EAAE,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,KAAK,MAAM,IAAI,GAAG,IAAI;IAK5E,OAAO,CAAC,QAAQ;CAQjB"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import type { AuthConfig, AuthTokens } from '../types/auth';
|
|
2
2
|
import type { BeekonConfig } from '../types/config';
|
|
3
|
+
import type { LogEntry } from '../types/log';
|
|
3
4
|
import type { BeekonGeofence, GeofenceEvent } from '../types/geofence';
|
|
4
5
|
import type { LicenseStatus } from '../types/license';
|
|
5
6
|
import type { Location } from '../types/location';
|
|
7
|
+
import type { PermissionStatus } from '../types/permission';
|
|
6
8
|
import type { BeekonState } from '../types/state';
|
|
7
9
|
import type { SyncStatus } from '../types/sync';
|
|
8
|
-
import type { WireAuthConfig, WireAuthTokens, WireConfig, WireGeofence, WireGeofenceEvent, WireKeyValue, WireLicenseStatus, WireLocation, WireState, WireSyncStatus } from '../NativeBeekonRn';
|
|
10
|
+
import type { WireAuthConfig, WireAuthTokens, WireConfig, WireGeofence, WireGeofenceEvent, WireKeyValue, WireLicenseStatus, WireLocation, WireLogEntry, WirePermissionStatus, WireState, WireSyncStatus } from '../NativeBeekonRn';
|
|
9
11
|
export declare function recordToEntries(record: Record<string, string> | undefined): WireKeyValue[];
|
|
10
12
|
export declare function configToWire(config: BeekonConfig): WireConfig;
|
|
11
13
|
export declare function geofenceToWire(g: BeekonGeofence): WireGeofence;
|
|
@@ -13,7 +15,9 @@ export declare function authToWire(a: AuthConfig): WireAuthConfig;
|
|
|
13
15
|
export declare function wireToLocation(w: WireLocation): Location;
|
|
14
16
|
export declare function wireToGeofence(w: WireGeofence): BeekonGeofence;
|
|
15
17
|
export declare function wireToGeofenceEvent(w: WireGeofenceEvent): GeofenceEvent;
|
|
18
|
+
export declare function wireToLogEntry(w: WireLogEntry): LogEntry;
|
|
16
19
|
export declare function wireToState(w: WireState): BeekonState;
|
|
20
|
+
export declare function wireToPermissionStatus(w: WirePermissionStatus): PermissionStatus;
|
|
17
21
|
export declare function wireToSyncStatus(w: WireSyncStatus): SyncStatus;
|
|
18
22
|
/** `expiresAtMs` (epoch millis) becomes a `Date`; `null` propagates faithfully. */
|
|
19
23
|
export declare function wireToAuthTokens(w: WireAuthTokens): AuthTokens;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mappers.d.ts","sourceRoot":"","sources":["../../../../src/internal/mappers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"mappers.d.ts","sourceRoot":"","sources":["../../../../src/internal/mappers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAYpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,KAAK,EACV,cAAc,EACd,aAAa,EAEd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAwB,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC5E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,EAGV,gBAAgB,EACjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,WAAW,EAAc,MAAM,gBAAgB,CAAC;AAC9D,OAAO,KAAK,EAAe,UAAU,EAAE,MAAM,eAAe,CAAC;AAE7D,OAAO,KAAK,EACV,cAAc,EACd,cAAc,EACd,UAAU,EACV,YAAY,EACZ,iBAAiB,EACjB,YAAY,EACZ,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,oBAAoB,EACpB,SAAS,EACT,cAAc,EACf,MAAM,mBAAmB,CAAC;AA0B3B,wBAAgB,eAAe,CAC7B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,GACzC,YAAY,EAAE,CAGhB;AAiBD,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,GAAG,UAAU,CA4D7D;AAED,wBAAgB,cAAc,CAAC,CAAC,EAAE,cAAc,GAAG,YAAY,CAS9D;AAID,wBAAgB,UAAU,CAAC,CAAC,EAAE,UAAU,GAAG,cAAc,CAqBxD;AAID,wBAAgB,cAAc,CAAC,CAAC,EAAE,YAAY,GAAG,QAAQ,CA0CxD;AAED,wBAAgB,cAAc,CAAC,CAAC,EAAE,YAAY,GAAG,cAAc,CAS9D;AAED,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,iBAAiB,GAAG,aAAa,CAOvE;AAED,wBAAgB,cAAc,CAAC,CAAC,EAAE,YAAY,GAAG,QAAQ,CAYxD;AAED,wBAAgB,WAAW,CAAC,CAAC,EAAE,SAAS,GAAG,WAAW,CAYrD;AAED,wBAAgB,sBAAsB,CACpC,CAAC,EAAE,oBAAoB,GACtB,gBAAgB,CAgBlB;AAED,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,cAAc,GAAG,UAAU,CAW9D;AAED,mFAAmF;AACnF,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,cAAc,GAAG,UAAU,CAO9D;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,iBAAiB,GAAG,aAAa,CAqCvE;AAqCD;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,OAAO,GAAG,KAAK,CAQtD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AuthConfig } from './auth';
|
|
2
|
-
import type { AccuracyMode, StationaryMode } from './enums';
|
|
2
|
+
import type { AccuracyMode, LogLevel, StationaryMode } from './enums';
|
|
3
3
|
/**
|
|
4
4
|
* Foreground-service notification overrides. **Android-only** — the platform
|
|
5
5
|
* requires every location foreground service to show a persistent notification.
|
|
@@ -21,8 +21,8 @@ export type NotificationConfig = {
|
|
|
21
21
|
smallIcon?: string;
|
|
22
22
|
};
|
|
23
23
|
/**
|
|
24
|
-
* Server-upload configuration. Presence of {@link
|
|
25
|
-
* batched uploads of stored locations and geofence events; omitting it keeps
|
|
24
|
+
* Server-upload configuration. Presence of {@link SelfManagedConfig.sync} turns
|
|
25
|
+
* on batched uploads of stored locations and geofence events; omitting it keeps
|
|
26
26
|
* tracking local-only.
|
|
27
27
|
*/
|
|
28
28
|
export type SyncConfig = {
|
|
@@ -37,6 +37,15 @@ export type SyncConfig = {
|
|
|
37
37
|
intervalSeconds?: number;
|
|
38
38
|
/** Maximum locations per upload. Clamped to `[1, 1000]`. Default: `100`. */
|
|
39
39
|
batchSize?: number;
|
|
40
|
+
/**
|
|
41
|
+
* Pending-fix count that triggers an early upload of regular fixes, ahead of
|
|
42
|
+
* the {@link SyncConfig.intervalSeconds} schedule (not subject to the Android
|
|
43
|
+
* ~15 min floor). `0` (the default) leaves regular fixes to the schedule.
|
|
44
|
+
* Negative values are treated as `0`. Independent of this setting, a geofence
|
|
45
|
+
* event and a session stop with pending fixes always flush immediately while
|
|
46
|
+
* sync is configured. Requires the native SDK ≥ 0.0.9. Default: `0`.
|
|
47
|
+
*/
|
|
48
|
+
syncThreshold?: number;
|
|
40
49
|
/**
|
|
41
50
|
* Declarative token-refresh recipe. When set, the SDK attaches and natively
|
|
42
51
|
* refreshes the access token (proactively before expiry, reactively on
|
|
@@ -46,15 +55,57 @@ export type SyncConfig = {
|
|
|
46
55
|
auth?: AuthConfig;
|
|
47
56
|
};
|
|
48
57
|
/**
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
58
|
+
* **Cloud-mode** configuration (cloud-mode-v1 §2). Point the SDK at Beekon
|
|
59
|
+
* Cloud (or a self-hosted Beekon backend) with a project key; the **server**
|
|
60
|
+
* owns the tracking parameters, sync cadence, geofences, and the license. This
|
|
61
|
+
* arm therefore exposes **only** the project credential, an optional endpoint
|
|
62
|
+
* override, the platform-universal Android `notification`, and `logLevel` — it
|
|
63
|
+
* deliberately does NOT expose tracking params, `sync`, or `licenseKey` (those
|
|
64
|
+
* are server-owned or derived).
|
|
65
|
+
*/
|
|
66
|
+
export type CloudConfig = {
|
|
67
|
+
/** Arm discriminator — selects cloud mode. */
|
|
68
|
+
mode: 'cloud';
|
|
69
|
+
/**
|
|
70
|
+
* Opaque project credential (prefix `bkproj_`). A **bearer secret** on a
|
|
71
|
+
* separate credential plane from the license token — do **not** commit it to
|
|
72
|
+
* source control. Surrounding whitespace is trimmed and an empty key is
|
|
73
|
+
* rejected natively.
|
|
74
|
+
*/
|
|
75
|
+
projectKey: string;
|
|
76
|
+
/**
|
|
77
|
+
* Base URL of the Beekon backend. Omit for Beekon Cloud (the SDK uses the
|
|
78
|
+
* baked-in `https://api.getbeekon.com`); set it to a self-hosted Beekon
|
|
79
|
+
* backend's base URL (the `/v1/token`, `/v1/config`, `/v1/ingest` suffixes
|
|
80
|
+
* are derived). Default: unset (`https://api.getbeekon.com`).
|
|
81
|
+
*/
|
|
82
|
+
endpoint?: string;
|
|
83
|
+
/** Android-only notification overrides. Ignored on iOS. */
|
|
84
|
+
notification?: NotificationConfig;
|
|
85
|
+
/**
|
|
86
|
+
* Diagnostic log verbosity threshold. See {@link SelfManagedConfig.logLevel}.
|
|
87
|
+
* Default: `'info'`.
|
|
88
|
+
*/
|
|
89
|
+
logLevel?: LogLevel;
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* **Self-managed** configuration (cloud-mode-v1 §2 / self-managed-mode-v1).
|
|
93
|
+
* The app owns all configuration locally — tracking parameters, an optional
|
|
94
|
+
* `sync` (omit ⇒ local-only; set ⇒ custom-backend ingest), an optional
|
|
95
|
+
* `licenseKey`, plus `notification` and `logLevel`. This is the pre-cloud
|
|
96
|
+
* behaviour.
|
|
97
|
+
*
|
|
98
|
+
* Every field other than `mode` is optional — `Beekon.start()` falls back to
|
|
99
|
+
* the previously persisted config, or to the documented defaults below if never
|
|
100
|
+
* configured.
|
|
52
101
|
*
|
|
53
102
|
* The two gate knobs (`minTimeBetweenLocationsSeconds`,
|
|
54
103
|
* `minDistanceBetweenLocationsMeters`) admit a fix only when **both** are
|
|
55
104
|
* satisfied; pass `0` to disable a gate.
|
|
56
105
|
*/
|
|
57
|
-
export type
|
|
106
|
+
export type SelfManagedConfig = {
|
|
107
|
+
/** Arm discriminator — selects self-managed mode. */
|
|
108
|
+
mode: 'selfManaged';
|
|
58
109
|
/** Minimum seconds between admitted fixes (10s floor). Default: `30`. */
|
|
59
110
|
minTimeBetweenLocationsSeconds?: number;
|
|
60
111
|
/** Minimum metres between admitted fixes. `0` disables it. Default: `100`. */
|
|
@@ -88,5 +139,37 @@ export type BeekonConfig = {
|
|
|
88
139
|
* useless to anyone else. Default: unset.
|
|
89
140
|
*/
|
|
90
141
|
licenseKey?: string;
|
|
142
|
+
/**
|
|
143
|
+
* Diagnostic log verbosity threshold. Entries at or below this level are
|
|
144
|
+
* recorded to the persisted ring buffer and {@link Beekon.onLog}. `'info'`
|
|
145
|
+
* (the default) keeps coordinates out of the buffer — they appear only at
|
|
146
|
+
* `'debug'`/`'verbose'`. Change at runtime with {@link Beekon.setLogLevel}.
|
|
147
|
+
* Requires the native SDK ≥ 0.0.9. Default: `'info'`.
|
|
148
|
+
*/
|
|
149
|
+
logLevel?: LogLevel;
|
|
150
|
+
};
|
|
151
|
+
/**
|
|
152
|
+
* Tracking configuration. A **sealed two-arm** discriminated union (cloud-mode-v1
|
|
153
|
+
* §2): the `mode` tag selects {@link CloudConfig} (server-owned config) or
|
|
154
|
+
* {@link SelfManagedConfig} (app-owned config). Each arm exposes only that arm's
|
|
155
|
+
* fields — the cloud arm cannot carry tracking params / sync / a license key.
|
|
156
|
+
*
|
|
157
|
+
* Build a value with the {@link BeekonConfig.cloud} / {@link BeekonConfig.selfManaged}
|
|
158
|
+
* factories, or with a plain object literal that includes the `mode` tag.
|
|
159
|
+
*/
|
|
160
|
+
export type BeekonConfig = CloudConfig | SelfManagedConfig;
|
|
161
|
+
/**
|
|
162
|
+
* Factory helpers mirroring the native sealed-type constructors
|
|
163
|
+
* (`BeekonConfig.cloud(...)` / `BeekonConfig.selfManaged(...)`). They stamp the
|
|
164
|
+
* `mode` discriminator so each call site can express only its arm's fields.
|
|
165
|
+
*
|
|
166
|
+
* Merged with the {@link BeekonConfig} type so `BeekonConfig` is usable as both
|
|
167
|
+
* a type and a value.
|
|
168
|
+
*/
|
|
169
|
+
export declare const BeekonConfig: {
|
|
170
|
+
/** Build a {@link CloudConfig}. `projectKey` is required. */
|
|
171
|
+
readonly cloud: (options: Omit<CloudConfig, "mode">) => CloudConfig;
|
|
172
|
+
/** Build a {@link SelfManagedConfig}. Every field is optional. */
|
|
173
|
+
readonly selfManaged: (options?: Omit<SelfManagedConfig, "mode">) => SelfManagedConfig;
|
|
91
174
|
};
|
|
92
175
|
//# sourceMappingURL=config.d.ts.map
|