@rivium/push-web 0.1.2 → 0.1.4

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/dist/index.d.ts CHANGED
@@ -190,6 +190,14 @@ export interface RiviumPushConfig {
190
190
  maxReconnectAttempts?: number;
191
191
  /** Initial log level (default: DEBUG in dev, ERROR in prod) */
192
192
  logLevel?: RiviumPushLogLevel;
193
+ /**
194
+ * Your web app version (e.g. "2.0.0"). Sent to the backend on every
195
+ * register() and surfaced as a first-class segment filter in the
196
+ * dashboard so you can target specific releases. Web has no equivalent
197
+ * of iOS CFBundleShortVersionString / Android versionName — you set
198
+ * this at init time from your build config.
199
+ */
200
+ appVersion?: string;
193
201
  }
194
202
  /**
195
203
  * Notification action button
@@ -535,7 +543,23 @@ declare class RiviumPush {
535
543
  private checkInitialMessage;
536
544
  private registerServiceWorker;
537
545
  private requestNotificationPermission;
546
+ /**
547
+ * Whether an existing subscription was created with the given VAPID key.
548
+ *
549
+ * `applicationServerKey` comes back as an ArrayBuffer, so compare it against
550
+ * the decoded form of the current key. If the browser doesn't expose the
551
+ * option (older implementations), assume a match rather than churn a working
552
+ * subscription.
553
+ */
554
+ private subscriptionMatchesVapidKey;
538
555
  private subscribeToPush;
556
+ /**
557
+ * Read platform-native device attributes. Sent on every register() so
558
+ * the dashboard can segment by app version, OS, locale, timezone, etc.
559
+ * without customers having to populate metadata manually. All fields
560
+ * best-effort — SSR / older browser combos may leave some undefined.
561
+ */
562
+ private captureDeviceAttributes;
539
563
  private registerDevice;
540
564
  private connectToGateway;
541
565
  /**