@wayq/beekon-rn 0.0.8 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BeekonRn.podspec +1 -1
- package/CHANGELOG.md +30 -0
- package/README.md +67 -5
- package/android/build.gradle +1 -1
- package/android/src/main/java/in/wayq/beekonrn/BeekonRnModule.kt +106 -8
- package/ios/BeekonRn.mm +35 -0
- package/ios/BeekonRn.swift +140 -8
- package/ios/Frameworks/BeekonKit.xcframework/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 +6036 -3700
- package/ios/Frameworks/BeekonKit.xcframework/ios-arm64/BeekonKit.framework/Modules/BeekonKit.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/ios/Frameworks/BeekonKit.xcframework/ios-arm64/BeekonKit.framework/Modules/BeekonKit.swiftmodule/arm64-apple-ios.swiftinterface +95 -18
- package/ios/Frameworks/BeekonKit.xcframework/ios-arm64_x86_64-simulator/BeekonKit.framework/BeekonKit +0 -0
- package/ios/Frameworks/BeekonKit.xcframework/ios-arm64_x86_64-simulator/BeekonKit.framework/Info.plist +0 -0
- package/ios/Frameworks/BeekonKit.xcframework/ios-arm64_x86_64-simulator/BeekonKit.framework/Modules/BeekonKit.swiftmodule/arm64-apple-ios-simulator.abi.json +6036 -3700
- package/ios/Frameworks/BeekonKit.xcframework/ios-arm64_x86_64-simulator/BeekonKit.framework/Modules/BeekonKit.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/Frameworks/BeekonKit.xcframework/ios-arm64_x86_64-simulator/BeekonKit.framework/Modules/BeekonKit.swiftmodule/arm64-apple-ios-simulator.swiftinterface +95 -18
- package/ios/Frameworks/BeekonKit.xcframework/ios-arm64_x86_64-simulator/BeekonKit.framework/Modules/BeekonKit.swiftmodule/x86_64-apple-ios-simulator.abi.json +6036 -3700
- package/ios/Frameworks/BeekonKit.xcframework/ios-arm64_x86_64-simulator/BeekonKit.framework/Modules/BeekonKit.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/Frameworks/BeekonKit.xcframework/ios-arm64_x86_64-simulator/BeekonKit.framework/Modules/BeekonKit.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +95 -18
- package/ios/Frameworks/BeekonKit.xcframework/ios-arm64_x86_64-simulator/BeekonKit.framework/_CodeSignature/CodeResources +1 -1
- package/lib/module/NativeBeekonRn.js.map +1 -1
- package/lib/module/beekon.js +97 -1
- package/lib/module/beekon.js.map +1 -1
- package/lib/module/index.js +4 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/internal/licenseNudge.js +64 -0
- package/lib/module/internal/licenseNudge.js.map +1 -0
- package/lib/module/internal/mappers.js +56 -8
- package/lib/module/internal/mappers.js.map +1 -1
- package/lib/module/types/config.js +73 -1
- package/lib/module/types/config.js.map +1 -1
- package/lib/module/types/log.js +4 -0
- package/lib/module/types/log.js.map +1 -0
- package/lib/typescript/src/NativeBeekonRn.d.ts +47 -2
- package/lib/typescript/src/NativeBeekonRn.d.ts.map +1 -1
- package/lib/typescript/src/beekon.d.ts +46 -1
- package/lib/typescript/src/beekon.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +4 -2
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/internal/licenseNudge.d.ts +38 -0
- package/lib/typescript/src/internal/licenseNudge.d.ts.map +1 -0
- package/lib/typescript/src/internal/mappers.d.ts +3 -1
- package/lib/typescript/src/internal/mappers.d.ts.map +1 -1
- package/lib/typescript/src/types/config.d.ts +90 -7
- package/lib/typescript/src/types/config.d.ts.map +1 -1
- package/lib/typescript/src/types/enums.d.ts +8 -0
- package/lib/typescript/src/types/enums.d.ts.map +1 -1
- package/lib/typescript/src/types/log.d.ts +22 -0
- package/lib/typescript/src/types/log.d.ts.map +1 -0
- package/lib/typescript/src/types/state.d.ts +4 -1
- package/lib/typescript/src/types/state.d.ts.map +1 -1
- package/package.json +1 -1
- package/scripts/fetch-beekonkit.sh +4 -4
- package/src/NativeBeekonRn.ts +49 -2
- package/src/beekon.ts +100 -1
- package/src/index.tsx +7 -1
- package/src/internal/licenseNudge.ts +80 -0
- package/src/internal/mappers.ts +67 -7
- package/src/types/config.ts +99 -7
- package/src/types/enums.ts +9 -0
- package/src/types/log.ts +22 -0
- package/src/types/state.ts +4 -0
|
@@ -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","
|
|
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","wireToSyncStatus","toSyncFailure","failure","wireToAuthTokens","epoch","wireToLicenseStatus","status","tier","entitlements","s","allowed","fallback","includes","rethrowAsBeekonError","e","code","String","codeToKind"],"sourceRoot":"../../../src","sources":["internal/mappers.ts"],"mappings":";;AAuBA,SAASA,WAAW,QAA8B,mBAAgB;AAelE;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,aAAa,EAAE,CAAC;EAChBC,YAAY,EAAE,QAAwB;EACtCC,cAAc,EAAE,MAAwB;EACxCC,qBAAqB,EAAE,EAAE;EACzBC,kBAAkB,EAAE;IAAEC,aAAa,EAAE;EAAuB,CAG3D;EACDC,QAAQ,EAAE;AACZ,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,EAAEL,MAAM,CAACI,GAAG;EAAG,CAAC,CAAC,CAAC;AACzE;AAEA,SAASE,kBAAkBA,CAACC,MAAoB,EAA8B;EAC5E,OAAOA,MAAM,CAACC,YAAY,GACtB;IACEC,KAAK,EAAEF,MAAM,CAACC,YAAY,CAACC,KAAK;IAChCC,IAAI,EAAEH,MAAM,CAACC,YAAY,CAACE,IAAI;IAC9BC,SAAS,EAAEJ,MAAM,CAACC,YAAY,CAACG;EACjC,CAAC,GACDC,SAAS;AACf;;AAEA;AACA;AACA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UAAU,CAAC,EAAE,UAAU,CAAC;AAChE;;AAEA;AACA,SAAS3B,KAAKA,CACZxD,KAAgC,EAChCoF,OAAqB,EACrBC,QAAW,EACR;EACH,OAAQD,OAAO,CAAuBE,QAAQ,CAACtF,KAAK,IAAI,EAAE,CAAC,GACtDA,KAAK,GACNqF,QAAQ;AACd;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASE,oBAAoBA,CAACC,CAAU,EAAS;EACtD,MAAMC,IAAI,GAAID,CAAC,EAAoCC,IAAI;EACvD,MAAMrB,OAAO,GAAIoB,CAAC,EAAuCpB,OAAO,IAAIsB,MAAM,CAACF,CAAC,CAAC;EAC7E,MAAMlB,IAAI,GAAGqB,UAAU,CAACF,IAAI,CAAC;EAC7B,IAAInB,IAAI,EAAE;IACR,MAAM,IAAI7F,WAAW,CAAC6F,IAAI,EAAEF,OAAO,CAAC;EACtC;EACA,MAAMoB,CAAC;AACT;AAEA,SAASG,UAAUA,CAACF,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,OAAOlF,SAAS;EACpB;AACF","ignoreList":[]}
|
|
@@ -1,4 +1,76 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
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":[]}
|
|
@@ -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
|
};
|
|
@@ -208,12 +242,23 @@ export interface Spec extends TurboModule {
|
|
|
208
242
|
* running on — no cross-platform merging.
|
|
209
243
|
*/
|
|
210
244
|
licenseStatus(): Promise<WireLicenseStatus>;
|
|
245
|
+
/** Persisted diagnostic log entries in `[fromMs, toMs]`, oldest first. */
|
|
246
|
+
getLog(fromMs: number, toMs: number): Promise<WireLogEntry[]>;
|
|
247
|
+
/** Serialize the whole log buffer to an NDJSON file; resolves its path. */
|
|
248
|
+
exportLog(): Promise<string>;
|
|
249
|
+
/** Delete all persisted diagnostic log entries. */
|
|
250
|
+
clearLog(): Promise<void>;
|
|
251
|
+
/** Set the diagnostic log threshold at runtime. */
|
|
252
|
+
setLogLevel(level: string): Promise<void>;
|
|
253
|
+
/** Write a host-app breadcrumb (category `app`) into the log pipeline. */
|
|
254
|
+
log(level: string, message: string): Promise<void>;
|
|
211
255
|
readonly onState: CodegenTypes.EventEmitter<WireState>;
|
|
212
256
|
readonly onLocation: CodegenTypes.EventEmitter<WireLocation>;
|
|
213
257
|
readonly onGeofenceEvent: CodegenTypes.EventEmitter<WireGeofenceEvent>;
|
|
214
258
|
readonly onSyncStatus: CodegenTypes.EventEmitter<WireSyncStatus>;
|
|
215
259
|
readonly onAuthTokens: CodegenTypes.EventEmitter<WireAuthTokens>;
|
|
216
260
|
readonly onLicenseStatus: CodegenTypes.EventEmitter<WireLicenseStatus>;
|
|
261
|
+
readonly onLog: CodegenTypes.EventEmitter<WireLogEntry>;
|
|
217
262
|
}
|
|
218
263
|
declare const _default: Spec;
|
|
219
264
|
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,MA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D;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,10 @@
|
|
|
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';
|
|
7
8
|
import type { BeekonState } from './types/state';
|
|
8
9
|
import type { SyncStatus } from './types/sync';
|
|
9
10
|
/**
|
|
@@ -26,6 +27,15 @@ import type { SyncStatus } from './types/sync';
|
|
|
26
27
|
*/
|
|
27
28
|
declare class BeekonImpl {
|
|
28
29
|
private readonly hub;
|
|
30
|
+
private readonly licenseNudge;
|
|
31
|
+
private licenseNudgeAttached;
|
|
32
|
+
/**
|
|
33
|
+
* Echo the evaluation-mode nudge to the JS console once, on first lifecycle
|
|
34
|
+
* use — so it only activates for apps actually using the SDK. Metro shows JS
|
|
35
|
+
* console only, so this is how the native nudge reaches an RN dev. See
|
|
36
|
+
* {@link LicenseNudge}.
|
|
37
|
+
*/
|
|
38
|
+
private activateLicenseNudge;
|
|
29
39
|
/**
|
|
30
40
|
* Set tracking parameters. Optional — `start()` falls back to the previously
|
|
31
41
|
* persisted config, or the SDK defaults if never configured. While tracking,
|
|
@@ -116,6 +126,35 @@ declare class BeekonImpl {
|
|
|
116
126
|
* degrades, or delays the SDK. For live transitions use {@link onLicenseStatus}.
|
|
117
127
|
*/
|
|
118
128
|
licenseStatus(): Promise<LicenseStatus>;
|
|
129
|
+
/**
|
|
130
|
+
* Read persisted diagnostic log entries in the inclusive range `[from, to]`,
|
|
131
|
+
* oldest first. Entries survive process death, so this recovers what the SDK
|
|
132
|
+
* did during a background session — the key to diagnosing field issues. Throws
|
|
133
|
+
* `BeekonError` with kind `'storage'` on a read failure. Requires native ≥ 0.0.9.
|
|
134
|
+
*/
|
|
135
|
+
getLog(from: Date, to: Date): Promise<LogEntry[]>;
|
|
136
|
+
/**
|
|
137
|
+
* Serialize the whole diagnostic log buffer to an NDJSON file and resolve its
|
|
138
|
+
* path. The app owns the file — attach it to a support email, share it, or
|
|
139
|
+
* upload it. Throws `BeekonError` with kind `'storage'` on a failure. Requires
|
|
140
|
+
* native ≥ 0.0.9.
|
|
141
|
+
*/
|
|
142
|
+
exportLog(): Promise<string>;
|
|
143
|
+
/** Delete all persisted diagnostic log entries. Requires native ≥ 0.0.9. */
|
|
144
|
+
clearLog(): Promise<void>;
|
|
145
|
+
/**
|
|
146
|
+
* Set the diagnostic log verbosity threshold at runtime — no restart needed.
|
|
147
|
+
* Raise to `'debug'`/`'verbose'` for field diagnosis, then lower again. A later
|
|
148
|
+
* `configure` re-applies `BeekonConfig.logLevel` and supersedes this. Requires
|
|
149
|
+
* native ≥ 0.0.9.
|
|
150
|
+
*/
|
|
151
|
+
setLogLevel(level: LogLevel): Promise<void>;
|
|
152
|
+
/**
|
|
153
|
+
* Write a host-app breadcrumb into the same pipeline as the SDK's own logs
|
|
154
|
+
* (category `app`), so app and SDK events interleave in one timeline. Requires
|
|
155
|
+
* native ≥ 0.0.9.
|
|
156
|
+
*/
|
|
157
|
+
log(level: LogLevel, message: string): Promise<void>;
|
|
119
158
|
/**
|
|
120
159
|
* Subscribe to tracking-state transitions (`idle` / `tracking` /
|
|
121
160
|
* `stopped(reason)`). The current state is delivered to new subscribers
|
|
@@ -153,6 +192,12 @@ declare class BeekonImpl {
|
|
|
153
192
|
* is lazy). Purely observational. Returns an unsubscribe function.
|
|
154
193
|
*/
|
|
155
194
|
onLicenseStatus(cb: (s: LicenseStatus) => void): () => void;
|
|
195
|
+
/**
|
|
196
|
+
* Subscribe to diagnostic log entries as they are recorded — SDK subsystems
|
|
197
|
+
* plus host breadcrumbs from {@link log}. Broadcast (no replay); read history
|
|
198
|
+
* with {@link getLog}. Returns an unsubscribe function. Requires native ≥ 0.0.9.
|
|
199
|
+
*/
|
|
200
|
+
onLog(cb: (e: LogEntry) => void): () => void;
|
|
156
201
|
}
|
|
157
202
|
export declare const Beekon: BeekonImpl;
|
|
158
203
|
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,OA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3D;;;;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,6 +1,8 @@
|
|
|
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';
|
|
@@ -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,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,12 @@
|
|
|
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';
|
|
6
7
|
import type { BeekonState } from '../types/state';
|
|
7
8
|
import type { SyncStatus } from '../types/sync';
|
|
8
|
-
import type { WireAuthConfig, WireAuthTokens, WireConfig, WireGeofence, WireGeofenceEvent, WireKeyValue, WireLicenseStatus, WireLocation, WireState, WireSyncStatus } from '../NativeBeekonRn';
|
|
9
|
+
import type { WireAuthConfig, WireAuthTokens, WireConfig, WireGeofence, WireGeofenceEvent, WireKeyValue, WireLicenseStatus, WireLocation, WireLogEntry, WireState, WireSyncStatus } from '../NativeBeekonRn';
|
|
9
10
|
export declare function recordToEntries(record: Record<string, string> | undefined): WireKeyValue[];
|
|
10
11
|
export declare function configToWire(config: BeekonConfig): WireConfig;
|
|
11
12
|
export declare function geofenceToWire(g: BeekonGeofence): WireGeofence;
|
|
@@ -13,6 +14,7 @@ export declare function authToWire(a: AuthConfig): WireAuthConfig;
|
|
|
13
14
|
export declare function wireToLocation(w: WireLocation): Location;
|
|
14
15
|
export declare function wireToGeofence(w: WireGeofence): BeekonGeofence;
|
|
15
16
|
export declare function wireToGeofenceEvent(w: WireGeofenceEvent): GeofenceEvent;
|
|
17
|
+
export declare function wireToLogEntry(w: WireLogEntry): LogEntry;
|
|
16
18
|
export declare function wireToState(w: WireState): BeekonState;
|
|
17
19
|
export declare function wireToSyncStatus(w: WireSyncStatus): SyncStatus;
|
|
18
20
|
/** `expiresAtMs` (epoch millis) becomes a `Date`; `null` propagates faithfully. */
|
|
@@ -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,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,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,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
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../src/types/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../src/types/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEtE;;;;;GAKG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,2DAA2D;IAC3D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mDAAmD;IACnD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,kDAAkD;IAClD,GAAG,EAAE,MAAM,CAAC;IACZ,wEAAwE;IACxE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC;;;OAGG;IACH,eAAe,C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E3D;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY;IACvB,6DAA6D;8BAC9C,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,KAAG,WAAW;IAGtD,kEAAkE;qCAEvD,IAAI,CAAC,iBAAiB,EAAE,MAAM,CAAC,KACvC,iBAAiB;CAGZ,CAAC"}
|
|
@@ -59,4 +59,12 @@ export type AuthStrategy = 'bearer' | 'raw';
|
|
|
59
59
|
* - `'json'` — `application/json`.
|
|
60
60
|
*/
|
|
61
61
|
export type AuthBodyFormat = 'form' | 'json';
|
|
62
|
+
/**
|
|
63
|
+
* Diagnostic log verbosity threshold. Ordered by increasing verbosity; an entry
|
|
64
|
+
* is recorded only when its level is at or below the active threshold
|
|
65
|
+
* ({@link BeekonConfig.logLevel} or {@link Beekon.setLogLevel}). The default is
|
|
66
|
+
* `'info'`, so coordinates (logged only at `'debug'`/`'verbose'`) stay out of the
|
|
67
|
+
* buffer. Mirrors the native `LogLevel`; see `spec/diagnostics/log-format-v1`.
|
|
68
|
+
*/
|
|
69
|
+
export type LogLevel = 'off' | 'error' | 'warn' | 'info' | 'debug' | 'verbose';
|
|
62
70
|
//# sourceMappingURL=enums.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../../../src/types/enums.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,UAAU,GAAG,KAAK,CAAC;AAEvD;;;;;;;GAOG;AACH,MAAM,MAAM,cAAc,GAAG,cAAc,GAAG,OAAO,GAAG,mBAAmB,CAAC;AAE5E;;;;;;;;GAQG;AACH,MAAM,MAAM,eAAe,GACvB,UAAU,GACV,QAAQ,GACR,SAAS,GACT,UAAU,GACV,QAAQ,CAAC;AAEb;;;;;;GAMG;AACH,MAAM,MAAM,eAAe,GAAG,IAAI,GAAG,aAAa,GAAG,kBAAkB,CAAC;AAExE,0DAA0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