@sendoracloud/sdk-react-native 0.20.1 → 1.0.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/README.md CHANGED
@@ -40,6 +40,15 @@ That's it. Since 0.17.0 the SDK bundles `react-native-get-random-values` as a ha
40
40
 
41
41
  > **Upgrading from 0.16.x?** You can delete the `import "react-native-get-random-values";` line from your `index.js` / `index.tsx` entry file — it's now a no-op (the SDK side-effect-loads the polyfill itself). Leaving it in does no harm.
42
42
 
43
+ > **Upgrading from 0.x to 1.0?** Delete the `orgId` (and any legacy `publicKey`) fields from your `SendoraCloud.init({...})` call — the backend now resolves the org from the API key server-side. All public method signatures are unchanged.
44
+ >
45
+ > ```diff
46
+ > await SendoraCloud.init({
47
+ > apiKey: "pk_prod_...",
48
+ > - orgId: "<ORG_ID>",
49
+ > });
50
+ > ```
51
+
43
52
  ### Optional peers (deep links)
44
53
 
45
54
  | Peer | When to install |
@@ -236,7 +245,7 @@ Full reference + edge-case writeup: [/docs/quickstart-react-native#anon-existing
236
245
 
237
246
  ## Stability
238
247
 
239
- This SDK is on the **0.16.x line**. Patch bumps (0.16.x0.16.y) are backwards-compatible; minor bumps may include breaking changes — always read the [CHANGELOG](https://github.com/sendoracloud/sdk-react-native/blob/main/CHANGELOG.md) before upgrading. 1.0 ships once the SDK has soaked 2 consecutive months in production without a schema change.
248
+ This SDK is on the **1.x line**. Patch bumps (1.x.y1.x.z) are backwards-compatible; minor bumps may include opt-in feature additions. Breaking changes only on major bumps — always read the [CHANGELOG](./CHANGELOG.md) before upgrading.
240
249
 
241
250
  ## JWT verification (custom backend)
242
251
 
package/dist/index.cjs CHANGED
@@ -1644,7 +1644,7 @@ function installAutoTrack(args) {
1644
1644
  }
1645
1645
 
1646
1646
  // src/index.ts
1647
- var SDK_VERSION = "0.16.1";
1647
+ var SDK_VERSION = "1.0.0";
1648
1648
  var DEFAULT_API_URL = "https://api.sendoracloud.com";
1649
1649
  var ANON_KEY = "anon_id";
1650
1650
  var USER_ID_KEY = "user_id";
@@ -1898,7 +1898,6 @@ var SendoraSDK = class {
1898
1898
  { apiUrl: this.config.apiUrl, publicKey: this.config.publicKey, debug: this.debug },
1899
1899
  "/api/v1/push/tokens",
1900
1900
  {
1901
- orgId: this.config.orgId,
1902
1901
  userId: this.userId,
1903
1902
  anonymousId: this.anonId,
1904
1903
  token: reg.token,
@@ -2430,7 +2429,6 @@ var SendoraSDK = class {
2430
2429
  { apiUrl: this.config.apiUrl, publicKey: this.config.publicKey, debug: this.debug },
2431
2430
  "/api/v1/events",
2432
2431
  {
2433
- orgId: this.config.orgId,
2434
2432
  ...this.config.projectId ? { projectId: this.config.projectId } : {},
2435
2433
  module: kind === "identify" ? "profiles" : "analytics",
2436
2434
  eventType: payload.eventType ?? (kind === "identify" ? "identify" : "track"),
package/dist/index.d.cts CHANGED
@@ -608,12 +608,6 @@ interface SendoraConfig {
608
608
  * both are set, `apiKey` wins.
609
609
  */
610
610
  publicKey?: string;
611
- /**
612
- * @deprecated 0.10.0 — backend now derives org from the API key
613
- * row server-side. Kept for test harnesses that need to override
614
- * the bound org explicitly.
615
- */
616
- orgId?: string;
617
611
  /** Backend base URL. Defaults to Sendora's production API. */
618
612
  apiUrl?: string;
619
613
  /** `"prod"` | `"staging"` | `"dev"` routing hint. For API-key auth this
@@ -716,8 +710,7 @@ interface PushTokenReceipt {
716
710
  * import SendoraCloud from "@sendoracloud/sdk-react-native";
717
711
  *
718
712
  * await SendoraCloud.init({
719
- * publicKey: "pk_prod_...",
720
- * orgId: "<ORG_ID>",
713
+ * apiKey: "pk_prod_...",
721
714
  * projectId: "<PROJECT_ID>",
722
715
  * });
723
716
  *
package/dist/index.d.ts CHANGED
@@ -608,12 +608,6 @@ interface SendoraConfig {
608
608
  * both are set, `apiKey` wins.
609
609
  */
610
610
  publicKey?: string;
611
- /**
612
- * @deprecated 0.10.0 — backend now derives org from the API key
613
- * row server-side. Kept for test harnesses that need to override
614
- * the bound org explicitly.
615
- */
616
- orgId?: string;
617
611
  /** Backend base URL. Defaults to Sendora's production API. */
618
612
  apiUrl?: string;
619
613
  /** `"prod"` | `"staging"` | `"dev"` routing hint. For API-key auth this
@@ -716,8 +710,7 @@ interface PushTokenReceipt {
716
710
  * import SendoraCloud from "@sendoracloud/sdk-react-native";
717
711
  *
718
712
  * await SendoraCloud.init({
719
- * publicKey: "pk_prod_...",
720
- * orgId: "<ORG_ID>",
713
+ * apiKey: "pk_prod_...",
721
714
  * projectId: "<PROJECT_ID>",
722
715
  * });
723
716
  *
package/dist/index.js CHANGED
@@ -1606,7 +1606,7 @@ function installAutoTrack(args) {
1606
1606
  }
1607
1607
 
1608
1608
  // src/index.ts
1609
- var SDK_VERSION = "0.16.1";
1609
+ var SDK_VERSION = "1.0.0";
1610
1610
  var DEFAULT_API_URL = "https://api.sendoracloud.com";
1611
1611
  var ANON_KEY = "anon_id";
1612
1612
  var USER_ID_KEY = "user_id";
@@ -1860,7 +1860,6 @@ var SendoraSDK = class {
1860
1860
  { apiUrl: this.config.apiUrl, publicKey: this.config.publicKey, debug: this.debug },
1861
1861
  "/api/v1/push/tokens",
1862
1862
  {
1863
- orgId: this.config.orgId,
1864
1863
  userId: this.userId,
1865
1864
  anonymousId: this.anonId,
1866
1865
  token: reg.token,
@@ -2392,7 +2391,6 @@ var SendoraSDK = class {
2392
2391
  { apiUrl: this.config.apiUrl, publicKey: this.config.publicKey, debug: this.debug },
2393
2392
  "/api/v1/events",
2394
2393
  {
2395
- orgId: this.config.orgId,
2396
2394
  ...this.config.projectId ? { projectId: this.config.projectId } : {},
2397
2395
  module: kind === "identify" ? "profiles" : "analytics",
2398
2396
  eventType: payload.eventType ?? (kind === "identify" ? "identify" : "track"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sendoracloud/sdk-react-native",
3
- "version": "0.20.1",
3
+ "version": "1.0.0",
4
4
  "description": "Sendora Cloud React Native + Expo SDK — analytics, identity, push-token registration, auth, deep links (Branch / Firebase Dynamic Links parity). Auth + analytics + deep links work in Expo Go; push token registration requires a Dev Client (EAS Build or `npx expo prebuild`).",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",