@cross-deck/web 1.6.4 → 1.8.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.mts CHANGED
@@ -247,9 +247,9 @@ declare const CrossdeckContracts: {
247
247
  /** Filter by lifecycle status. */
248
248
  readonly withStatus: (status: ContractStatus) => readonly Contract[];
249
249
  /** Semver of the SDK release these contracts were bundled with. */
250
- readonly sdkVersion: "1.6.4";
250
+ readonly sdkVersion: "1.8.0";
251
251
  /** Fully-qualified bundle identifier — e.g. `@cross-deck/web@1.4.2`. */
252
- readonly bundledIn: "@cross-deck/web@1.6.4";
252
+ readonly bundledIn: "@cross-deck/web@1.8.0";
253
253
  /**
254
254
  * Resolve a failing test back to the contract it exercises.
255
255
  * Used by test-framework hooks (Vitest `afterEach`, XCTest
@@ -462,7 +462,6 @@ declare class CrossdeckClient {
462
462
  private verifiers;
463
463
  private verifierReporter;
464
464
  private verifierCtx;
465
- private flushIntervalMs;
466
465
  /**
467
466
  * Boot the SDK. Idempotent — calling init twice with the same options
468
467
  * is a no-op; calling with different options replaces the previous
@@ -844,7 +843,7 @@ declare const Crossdeck: CrossdeckClient;
844
843
  * }
845
844
  * }
846
845
  */
847
- type CrossdeckErrorType = "authentication_error" | "permission_error" | "invalid_request_error" | "rate_limit_error" | "internal_error" | "network_error" | "configuration_error";
846
+ type CrossdeckErrorType = "authentication_error" | "permission_error" | "invalid_request_error" | "rate_limit_error" | "version_error" | "internal_error" | "network_error" | "configuration_error";
848
847
  interface CrossdeckErrorPayload {
849
848
  type: CrossdeckErrorType;
850
849
  code: string;
@@ -861,6 +860,14 @@ interface CrossdeckErrorPayload {
861
860
  * server is telling you the safe rate.
862
861
  */
863
862
  retryAfterMs?: number;
863
+ /**
864
+ * Required SDK version floor — populated only on a `426 Upgrade Required`
865
+ * / `sdk_version_unsupported` response. The queue surfaces it in the
866
+ * "update to >= X" PARK message so the cure is exact.
867
+ */
868
+ minVersion?: string;
869
+ /** SDK surface the rejection applies to (web/node/swift/…), on a 426. */
870
+ surface?: string;
864
871
  }
865
872
  declare class CrossdeckError extends Error {
866
873
  readonly type: CrossdeckErrorType;
@@ -868,6 +875,8 @@ declare class CrossdeckError extends Error {
868
875
  readonly requestId?: string;
869
876
  readonly status?: number;
870
877
  readonly retryAfterMs?: number;
878
+ readonly minVersion?: string;
879
+ readonly surface?: string;
871
880
  constructor(payload: CrossdeckErrorPayload);
872
881
  }
873
882
 
@@ -937,7 +946,7 @@ declare class MemoryStorage implements KeyValueStorage {
937
946
  *
938
947
  * Do NOT edit by hand — `node scripts/sync-sdk-versions.mjs`.
939
948
  */
940
- declare const SDK_VERSION = "1.6.4";
949
+ declare const SDK_VERSION = "1.8.0";
941
950
  declare const SDK_NAME = "@cross-deck/web";
942
951
 
943
952
  /**
@@ -975,7 +984,7 @@ interface ErrorCodeEntry {
975
984
  /** The string thrown as CrossdeckError.code. */
976
985
  code: string;
977
986
  /** CrossdeckError.type — broad category. */
978
- type: "authentication_error" | "permission_error" | "invalid_request_error" | "rate_limit_error" | "internal_error" | "network_error" | "configuration_error";
987
+ type: "authentication_error" | "permission_error" | "invalid_request_error" | "rate_limit_error" | "version_error" | "internal_error" | "network_error" | "configuration_error";
979
988
  /** One-sentence description. Surfaced verbatim in dashboards. */
980
989
  description: string;
981
990
  /** What the developer should do. Imperative phrasing. */
package/dist/index.d.ts CHANGED
@@ -247,9 +247,9 @@ declare const CrossdeckContracts: {
247
247
  /** Filter by lifecycle status. */
248
248
  readonly withStatus: (status: ContractStatus) => readonly Contract[];
249
249
  /** Semver of the SDK release these contracts were bundled with. */
250
- readonly sdkVersion: "1.6.4";
250
+ readonly sdkVersion: "1.8.0";
251
251
  /** Fully-qualified bundle identifier — e.g. `@cross-deck/web@1.4.2`. */
252
- readonly bundledIn: "@cross-deck/web@1.6.4";
252
+ readonly bundledIn: "@cross-deck/web@1.8.0";
253
253
  /**
254
254
  * Resolve a failing test back to the contract it exercises.
255
255
  * Used by test-framework hooks (Vitest `afterEach`, XCTest
@@ -462,7 +462,6 @@ declare class CrossdeckClient {
462
462
  private verifiers;
463
463
  private verifierReporter;
464
464
  private verifierCtx;
465
- private flushIntervalMs;
466
465
  /**
467
466
  * Boot the SDK. Idempotent — calling init twice with the same options
468
467
  * is a no-op; calling with different options replaces the previous
@@ -844,7 +843,7 @@ declare const Crossdeck: CrossdeckClient;
844
843
  * }
845
844
  * }
846
845
  */
847
- type CrossdeckErrorType = "authentication_error" | "permission_error" | "invalid_request_error" | "rate_limit_error" | "internal_error" | "network_error" | "configuration_error";
846
+ type CrossdeckErrorType = "authentication_error" | "permission_error" | "invalid_request_error" | "rate_limit_error" | "version_error" | "internal_error" | "network_error" | "configuration_error";
848
847
  interface CrossdeckErrorPayload {
849
848
  type: CrossdeckErrorType;
850
849
  code: string;
@@ -861,6 +860,14 @@ interface CrossdeckErrorPayload {
861
860
  * server is telling you the safe rate.
862
861
  */
863
862
  retryAfterMs?: number;
863
+ /**
864
+ * Required SDK version floor — populated only on a `426 Upgrade Required`
865
+ * / `sdk_version_unsupported` response. The queue surfaces it in the
866
+ * "update to >= X" PARK message so the cure is exact.
867
+ */
868
+ minVersion?: string;
869
+ /** SDK surface the rejection applies to (web/node/swift/…), on a 426. */
870
+ surface?: string;
864
871
  }
865
872
  declare class CrossdeckError extends Error {
866
873
  readonly type: CrossdeckErrorType;
@@ -868,6 +875,8 @@ declare class CrossdeckError extends Error {
868
875
  readonly requestId?: string;
869
876
  readonly status?: number;
870
877
  readonly retryAfterMs?: number;
878
+ readonly minVersion?: string;
879
+ readonly surface?: string;
871
880
  constructor(payload: CrossdeckErrorPayload);
872
881
  }
873
882
 
@@ -937,7 +946,7 @@ declare class MemoryStorage implements KeyValueStorage {
937
946
  *
938
947
  * Do NOT edit by hand — `node scripts/sync-sdk-versions.mjs`.
939
948
  */
940
- declare const SDK_VERSION = "1.6.4";
949
+ declare const SDK_VERSION = "1.8.0";
941
950
  declare const SDK_NAME = "@cross-deck/web";
942
951
 
943
952
  /**
@@ -975,7 +984,7 @@ interface ErrorCodeEntry {
975
984
  /** The string thrown as CrossdeckError.code. */
976
985
  code: string;
977
986
  /** CrossdeckError.type — broad category. */
978
- type: "authentication_error" | "permission_error" | "invalid_request_error" | "rate_limit_error" | "internal_error" | "network_error" | "configuration_error";
987
+ type: "authentication_error" | "permission_error" | "invalid_request_error" | "rate_limit_error" | "version_error" | "internal_error" | "network_error" | "configuration_error";
979
988
  /** One-sentence description. Surfaced verbatim in dashboards. */
980
989
  description: string;
981
990
  /** What the developer should do. Imperative phrasing. */