@seatlayer/js 0.102.0 → 0.103.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/dist/index.d.cts CHANGED
@@ -224,8 +224,13 @@ declare class BuyerAccessContext {
224
224
  /**
225
225
  * Handle a 401/403 from a scoped call. Returns true when the caller should
226
226
  * retry the same request once with the refreshed bearer.
227
+ *
228
+ * `sentAuthorization` is the `Authorization` header the failed request
229
+ * carried. When the caller has it, the "did the refresh change anything"
230
+ * check below compares against exactly that bearer; without it, the bearer
231
+ * this context last issued stands in.
227
232
  */
228
- handleFailure(status: number, code: string | undefined): Promise<boolean>;
233
+ handleFailure(status: number, code: string | undefined, sentAuthorization?: string | null): Promise<boolean>;
229
234
  /** Host-driven re-acquisition (after the buyer signs in again, say). */
230
235
  refresh(reason?: BuyerAccessRefreshReason): Promise<boolean>;
231
236
  /** Drop the bearer. Called on destroy so nothing outlives the widget. */
@@ -5257,7 +5262,8 @@ interface PerformanceGroupCheckoutHandoff {
5257
5262
  /** What the wrapper is showing the buyer right now, for host telemetry. */
5258
5263
  interface PerformanceGroupStatusEvent {
5259
5264
  /** `checkout`: the hosted checkout could not start; the seats stay held. */
5260
- kind: 'idle' | 'pending' | 'recovery_failed' | 'sales_closed' | 'revision_changed' | 'checkout';
5265
+ /** `session_ended`: the buyer's session ended; the map stopped updating. */
5266
+ kind: 'idle' | 'pending' | 'recovery_failed' | 'sales_closed' | 'revision_changed' | 'checkout' | 'session_ended';
5261
5267
  message: string;
5262
5268
  /** The short operation reference from §12, when one applies. */
5263
5269
  reference?: string;
@@ -5535,6 +5541,12 @@ declare class PerformanceGroupPicker {
5535
5541
  private setInteractionLocked;
5536
5542
  private announce;
5537
5543
  private showStatus;
5544
+ /**
5545
+ * The availability poll stopped because the buyer's session ended. The map
5546
+ * on screen is now stale, so the picker says that plainly, and the host is
5547
+ * told through `onError` so it can offer a fresh session.
5548
+ */
5549
+ private sessionEnded;
5538
5550
  private clearStatus;
5539
5551
  private operationChanged;
5540
5552
  /**
package/dist/index.d.ts CHANGED
@@ -224,8 +224,13 @@ declare class BuyerAccessContext {
224
224
  /**
225
225
  * Handle a 401/403 from a scoped call. Returns true when the caller should
226
226
  * retry the same request once with the refreshed bearer.
227
+ *
228
+ * `sentAuthorization` is the `Authorization` header the failed request
229
+ * carried. When the caller has it, the "did the refresh change anything"
230
+ * check below compares against exactly that bearer; without it, the bearer
231
+ * this context last issued stands in.
227
232
  */
228
- handleFailure(status: number, code: string | undefined): Promise<boolean>;
233
+ handleFailure(status: number, code: string | undefined, sentAuthorization?: string | null): Promise<boolean>;
229
234
  /** Host-driven re-acquisition (after the buyer signs in again, say). */
230
235
  refresh(reason?: BuyerAccessRefreshReason): Promise<boolean>;
231
236
  /** Drop the bearer. Called on destroy so nothing outlives the widget. */
@@ -5257,7 +5262,8 @@ interface PerformanceGroupCheckoutHandoff {
5257
5262
  /** What the wrapper is showing the buyer right now, for host telemetry. */
5258
5263
  interface PerformanceGroupStatusEvent {
5259
5264
  /** `checkout`: the hosted checkout could not start; the seats stay held. */
5260
- kind: 'idle' | 'pending' | 'recovery_failed' | 'sales_closed' | 'revision_changed' | 'checkout';
5265
+ /** `session_ended`: the buyer's session ended; the map stopped updating. */
5266
+ kind: 'idle' | 'pending' | 'recovery_failed' | 'sales_closed' | 'revision_changed' | 'checkout' | 'session_ended';
5261
5267
  message: string;
5262
5268
  /** The short operation reference from §12, when one applies. */
5263
5269
  reference?: string;
@@ -5535,6 +5541,12 @@ declare class PerformanceGroupPicker {
5535
5541
  private setInteractionLocked;
5536
5542
  private announce;
5537
5543
  private showStatus;
5544
+ /**
5545
+ * The availability poll stopped because the buyer's session ended. The map
5546
+ * on screen is now stale, so the picker says that plainly, and the host is
5547
+ * told through `onError` so it can offer a fresh session.
5548
+ */
5549
+ private sessionEnded;
5538
5550
  private clearStatus;
5539
5551
  private operationChanged;
5540
5552
  /**