spotny-sdk 0.3.7 → 0.3.8

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.

Potentially problematic release.


This version of spotny-sdk might be problematic. Click here for more details.

package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # spotny-sdk
2
2
 
3
- A React Native SDK for iBeacon scanning powered by KontaktSDK (iOS) and AltBeacon (Android). Detects proximity beacons, fires region enter/exit events, and integrates with the Spotny campaign backend.
3
+ A React Native SDK for iBeacon proximity detection. Detects nearby beacons, fires region enter/exit events, and powers real-time proximity experiences on iOS and Android.
4
4
 
5
5
  > Requires **React Native 0.73+** with the New Architecture (Turbo Modules) enabled.
6
6
 
@@ -106,7 +106,7 @@ Starts BLE beacon scanning and begins ranging / monitoring regions.
106
106
  | Parameter | Type | Required | Description |
107
107
  | ---------- | ---------------- | -------- | ----------------------------------------------- |
108
108
  | `userUUID` | `string` | Yes | Unique identifier for this installation/session |
109
- | `userId` | `number \| null` | No | Authenticated user ID (sent to the backend) |
109
+ | `userId` | `number \| null` | No | Authenticated user ID |
110
110
 
111
111
  Returns `Promise<string>` — resolves with a status message.
112
112
 
@@ -144,12 +144,10 @@ const scanning = await isScanning();
144
144
 
145
145
  Overrides SDK defaults. **Must be called before `startScanner`.**
146
146
 
147
- | Option | Type | Default | Description |
148
- | ---------------------- | -------- | ------- | ---------------------------------------- |
149
- | `maxDetectionDistance` | `number` | `8.0` | Maximum beacon detection radius (metres) |
150
- | `source` | `string` | – | Company / brand using the SDK (e.g. `'nike'`). Sent with every backend request. |
151
-
152
- > The backend URL and Kontakt.io API key are fixed internally and cannot be overridden by consumers.
147
+ | Option | Type | Default | Description |
148
+ | ---------------------- | -------- | ------- | ------------------------------------------------------------------------------- |
149
+ | `maxDetectionDistance` | `number` | `8.0` | Maximum beacon detection radius (metres) |
150
+ | `source` | `string` | – | Identifier for your brand or app (e.g. `'nike'`). |
153
151
 
154
152
  Returns `Promise<string>`.
155
153
 
@@ -25,7 +25,7 @@ export type BeaconRegionEvent = {
25
25
  export type SpotnySdkConfig = {
26
26
  /** Maximum BLE detection distance in metres (default: 8.0) */
27
27
  maxDetectionDistance?: number;
28
- /** Company / brand name identifying the SDK consumer (e.g. 'nike'). Sent to the backend with every API request. */
28
+ /** Identifier for your brand or app (e.g. 'nike'). */
29
29
  source?: string;
30
30
  };
31
31
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,YAAY;;;CAGf,CAAC;AAIX,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,mCAAmC;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,+CAA+C;IAC/C,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,EAAE,UAAU,EAAE,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,sCAAsC;IACtC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,YAAY,CAAC;IACvC,KAAK,CAAC,EAAE,QAAQ,GAAG,SAAS,GAAG,SAAS,CAAC;CAC1C,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,8DAA8D;IAC9D,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,mHAAmH;IACnH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAOF;;;;GAIG;AACH,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,MAAM,EAChB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GACrB,OAAO,CAAC,MAAM,CAAC,CAEjB;AAED,mDAAmD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AAC,CAEpD;AAED,kEAAkE;AAClE,wBAAgB,iBAAiB,IAAI,OAAO,CAAC,MAAM,CAAC,CAEnD;AAID;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,4CAM7C;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,4CAM7C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spotny-sdk",
3
- "version": "0.3.7",
3
+ "version": "0.3.8",
4
4
  "description": "Beacon Scanner",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",
package/src/index.tsx CHANGED
@@ -35,7 +35,7 @@ export type BeaconRegionEvent = {
35
35
  export type SpotnySdkConfig = {
36
36
  /** Maximum BLE detection distance in metres (default: 8.0) */
37
37
  maxDetectionDistance?: number;
38
- /** Company / brand name identifying the SDK consumer (e.g. 'nike'). Sent to the backend with every API request. */
38
+ /** Identifier for your brand or app (e.g. 'nike'). */
39
39
  source?: string;
40
40
  };
41
41