@stamprally/core 0.10.0 → 0.12.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
@@ -123,6 +123,8 @@ interface AdminRallyConfig<TLocale extends string = string, TMeta extends Record
123
123
  readonly inventory?: Readonly<Record<string, number>>;
124
124
  readonly serverMetadata?: Readonly<Record<string, unknown>>;
125
125
  readonly metadata?: TMeta;
126
+ /** Explicit public metadata name. `metadata` remains supported for compatibility. */
127
+ readonly publicMetadata?: TMeta;
126
128
  readonly serverEndpoint?: string;
127
129
  }
128
130
  interface PublicRallyConfig<TLocale extends string = string, TMeta extends Record<string, unknown> = Record<string, unknown>> {
@@ -165,6 +167,19 @@ interface StampRallyState {
165
167
  }
166
168
  type UserRallyState = StampRallyState;
167
169
 
170
+ /**
171
+ * Creates the client-facing configuration and removes private values at every
172
+ * nesting level. `customFilter` is an allow-list predicate: returning false
173
+ * removes that key.
174
+ */
175
+ declare function sanitizeAdminConfig<TLocale extends string = string, TMeta extends Record<string, unknown> = Record<string, unknown>>(admin: AdminRallyConfig<TLocale, TMeta>, customFilter?: (key: string, value: unknown) => boolean): PublicRallyConfig<TLocale, TMeta>;
176
+ interface PublicConfigSafety {
177
+ readonly safe: boolean;
178
+ readonly leakedKeys: string[];
179
+ }
180
+ /** Finds private keys, including keys nested in metadata or custom values. */
181
+ declare function validatePublicConfigSafety(publicConfig: PublicRallyConfig): PublicConfigSafety;
182
+
168
183
  type VerificationContext = {
169
184
  readonly type: "qr";
170
185
  readonly token: string;
@@ -298,6 +313,12 @@ declare function createClaimTicketNumber(rewardId: string, options?: ClaimTicket
298
313
  declare function createUniqueClaimTicketNumber(rewardId: string, issuedAt: string): string;
299
314
  declare function issueClaimTicketNumber(reward: Reward, currentState: RewardState, options?: ClaimTicketOptions): RewardState;
300
315
 
316
+ interface MergeConflictOptions {
317
+ readonly policy: "server_wins" | "merge";
318
+ }
319
+ /** Resolves a server/local state conflict without mutating either input state. */
320
+ declare function resolveRallyStateConflict(serverState: UserRallyState, localState: UserRallyState, options?: MergeConflictOptions): UserRallyState;
321
+
301
322
  type RewardConsumeError = {
302
323
  readonly code: "NOT_AVAILABLE" | "ALREADY_CONSUMED" | "OUT_OF_STOCK" | "REWARD_NOT_FOUND";
303
324
  readonly rewardId: string;
@@ -332,6 +353,85 @@ interface ProcessStampValue {
332
353
  }
333
354
  declare function processStamp(state: StampRallyState, config: AdminRallyConfig, spotId: string, context: VerificationContext, now: string): Result<ProcessStampValue, StampError>;
334
355
 
356
+ type OfflineOperation = {
357
+ readonly kind: "checkIn";
358
+ readonly request: CheckInRequest;
359
+ } | {
360
+ readonly kind: "claimReward";
361
+ readonly request: ClaimRequest;
362
+ };
363
+ type OfflineResult = CheckInResult | ClaimResult | UserRallyState;
364
+ type SyncState = "idle" | "syncing" | "error";
365
+ type SyncConflictPolicy = "server_wins" | "merge";
366
+ interface OfflineConflictResult {
367
+ readonly conflict: true;
368
+ readonly localState: UserRallyState;
369
+ readonly serverState: UserRallyState;
370
+ }
371
+ interface OfflineQueueStorage {
372
+ load(key: string): Promise<ReadonlyArray<OfflineOperation>>;
373
+ save(key: string, operations: ReadonlyArray<OfflineOperation>): Promise<void>;
374
+ }
375
+ interface OfflineQueueOptions {
376
+ readonly storage?: OfflineQueueStorage;
377
+ readonly storageLike?: {
378
+ getItem(key: string): string | null;
379
+ setItem(key: string, value: string): void;
380
+ removeItem?(key: string): void;
381
+ } | null;
382
+ readonly key?: string;
383
+ readonly databaseName?: string;
384
+ readonly conflictPolicy?: SyncConflictPolicy;
385
+ readonly onSyncConflict?: SyncConflictPolicy | ((context: OfflineConflict) => SyncConflictPolicy | Promise<SyncConflictPolicy>);
386
+ }
387
+ interface OfflineConflict {
388
+ readonly operation: OfflineOperation;
389
+ readonly localState: UserRallyState;
390
+ readonly serverState: UserRallyState;
391
+ }
392
+ type OfflineSender = (operation: OfflineOperation) => Promise<OfflineResult | OfflineConflictResult>;
393
+ interface OfflineSyncResultEvent {
394
+ readonly operation: OfflineOperation;
395
+ readonly result: OfflineResult | OfflineConflictResult;
396
+ readonly state?: UserRallyState;
397
+ }
398
+ type OfflineSyncResultListener = (event: OfflineSyncResultEvent) => void | Promise<void>;
399
+ declare class MemoryQueueStorage implements OfflineQueueStorage {
400
+ #private;
401
+ load(key: string): Promise<ReadonlyArray<OfflineOperation>>;
402
+ save(key: string, operations: ReadonlyArray<OfflineOperation>): Promise<void>;
403
+ }
404
+ interface IndexedDBOfflineQueueOptions {
405
+ readonly indexedDB?: IDBFactory | null;
406
+ readonly databaseName?: string;
407
+ }
408
+ declare class IndexedDBOfflineQueueStorage implements OfflineQueueStorage {
409
+ #private;
410
+ constructor(options?: IndexedDBOfflineQueueOptions);
411
+ load(key: string): Promise<ReadonlyArray<OfflineOperation>>;
412
+ save(key: string, operations: ReadonlyArray<OfflineOperation>): Promise<void>;
413
+ }
414
+ /** Durable, sequential retry queue for operations created while disconnected. */
415
+ declare class OfflineQueue {
416
+ #private;
417
+ constructor(options?: OfflineQueueOptions);
418
+ get syncState(): SyncState;
419
+ get pendingCount(): number;
420
+ get error(): Error | null;
421
+ get operations(): ReadonlyArray<OfflineOperation>;
422
+ get conflictPolicy(): SyncConflictPolicy;
423
+ setSyncResultListener(listener: OfflineSyncResultListener | undefined): void;
424
+ initialize(): Promise<void>;
425
+ setSender(sender: OfflineSender): void;
426
+ enqueue(operation: OfflineOperation): Promise<void>;
427
+ enqueueCheckIn(request: CheckInRequest): Promise<void>;
428
+ enqueueClaimReward(request: ClaimRequest): Promise<void>;
429
+ clear(): Promise<void>;
430
+ sync(sender?: OfflineSender | undefined): Promise<void>;
431
+ retrySync(sender?: OfflineSender | undefined): Promise<void>;
432
+ resolveConflict(operation: OfflineOperation, localState: UserRallyState, serverState: UserRallyState): Promise<UserRallyState>;
433
+ }
434
+
335
435
  interface StampStorage {
336
436
  load(rallyId: string, userId: string | null): Promise<StampRallyState | null>;
337
437
  save(state: StampRallyState): Promise<void>;
@@ -486,6 +586,7 @@ interface ClientOptions {
486
586
  readonly customValidators?: Readonly<Record<string, Validator>>;
487
587
  readonly clock?: () => string;
488
588
  readonly userId?: string | null;
589
+ readonly offlineQueue?: OfflineQueue;
489
590
  }
490
591
  type StorageOrOptions = StampStorage | ClientOptions;
491
592
  declare class StampRallyClient {
@@ -494,6 +595,8 @@ declare class StampRallyClient {
494
595
  getConfig(): RallyConfig;
495
596
  getState(): UserRallyState | null;
496
597
  getUserId(): string | null;
598
+ get syncState(): SyncState;
599
+ get pendingCount(): number;
497
600
  subscribe(listener: ClientListener): () => void;
498
601
  subscribeEvents(listener: ClientEventListener): () => void;
499
602
  init(): Promise<UserRallyState>;
@@ -504,6 +607,7 @@ declare class StampRallyClient {
504
607
  checkIn(spotId: string, proofData: unknown, options?: CheckInOptions): Promise<CheckInResult>;
505
608
  claimReward(rewardId: string, options?: ClaimOptions): Promise<ClaimResult>;
506
609
  sync(adapter?: SyncAdapter | undefined): Promise<void>;
610
+ retrySync(): Promise<void>;
507
611
  reset(): Promise<UserRallyState>;
508
612
  restore(state: UserRallyState): Promise<UserRallyState>;
509
613
  }
@@ -613,4 +717,4 @@ type SnapshotTokenVerification<T extends SnapshotTokenPayload = SnapshotTokenPay
613
717
  declare function createSignedSnapshotToken<T extends SnapshotTokenPayload>(payload: T, secretKey: SnapshotSecretKey): Promise<string>;
614
718
  declare function verifySnapshotToken<T extends SnapshotTokenPayload = SnapshotTokenPayload>(token: string, secretKey: SnapshotSecretKey, now?: number): Promise<SnapshotTokenVerification<T>>;
615
719
 
616
- export { type AdminRallyConfig, type CheckInCondition, type CheckInOptions, type CheckInRequest, type CheckInResult, type CheckInSuccess, type ClaimOptions, type ClaimRequest, type ClaimResult, type ClaimSuccess, type ClaimTicketOptions, type ClientError, type ClientEvent, type ClientEventListener, type ClientListener, type ClientOptions, type CompositeConditionFailure, type ConditionMatch, type ConditionMismatch, ConfigValidationError, type ConsumeResult, type ConsumeRewardParams, type CustomValidationContext, type CustomValidator, DEFAULT_SHEET_THEME, type DetectorError, type DetectorErrorCode, type DetectorKind, type DetectorResult, type ExternalReference, type FontFamily, type GeoDetectorOptions, type GeoVerificationContext, InMemoryStorage, IndexedDBAdapter, type IndexedDBAdapterOptions, LocalStorageAdapter, type LocalStorageAdapterOptions, type LocalStorageFailureMode, type LocaleDictionary, type LocalizedString, type LocalizedText, type NfcDetectorOptions, type NfcVerificationContext, type ParseResult, type PasscodeCondition$1 as PasscodeCondition, type ProcessStampValue, type PublicCheckInCondition, type PublicRallyConfig, type PublicReward, type PublicSpotItem, type QrDetectorOptions, type QrVerificationContext, type RallyConfig, type RallySnapshot, type RedemptionMethod, type Result, type Reward, type RewardConsumeError, type RewardState, type RewardStatus, type RewardType, type RewardUnlockCondition, type SecureTokenError, type SecureTokenErrorCode, type SecureTokenOptions, type SecureTokenPayload, type SecureTokenSecretKey, type SecureTokenVerification, type SheetTheme, type SlotShape, type SnapshotSecretKey, type SnapshotTokenError, type SnapshotTokenErrorCode, type SnapshotTokenPayload, type SnapshotTokenVerification, type SpotItem, type StampError, StampRallyClient, type StampRallyProgress, type StampRallyState, type StampRecord, type StampStorage, StorageAdapterError, type StorageAdapterErrorCode, type StorageLike, type StorageOperation, type StorageWarningHandler, type SupportedLocale, type SyncAdapter, THEME_PRESETS, type ThemePreset, type ThemePresetId, type UserRallyState, type ValidationError, type Validator, type VerificationContext, assertPublicConfig, calculateDistanceMeters, calculateProgress, consumeReward, createClaimTicketNumber, createSecureToken, createSignedSnapshotToken, createUniqueClaimTicketNumber, evaluateCondition, evaluateConditionDetailed, exportProgressToken, getCurrentGeoContext, getOrderedSpots, importProgressToken, isGeolocationSupported, isNfcSupported, isPublicConfig, isQrSupported, isRewardState, isStampRallyState, issueClaimTicketNumber, normalizePasscode, parseAdminConfig, parsePublicConfig, processStamp, readNfcContext, readQrContext, reconcileRewardStates, resolveLocalizedText, safeParseAdminConfig, safeParsePublicConfig, storageKey, toLocalizedString, toPublicConfig, updateLocalizedField, verifyPasscode, verifySecureToken, verifySnapshotToken };
720
+ export { type AdminRallyConfig, type CheckInCondition, type CheckInOptions, type CheckInRequest, type CheckInResult, type CheckInSuccess, type ClaimOptions, type ClaimRequest, type ClaimResult, type ClaimSuccess, type ClaimTicketOptions, type ClientError, type ClientEvent, type ClientEventListener, type ClientListener, type ClientOptions, type CompositeConditionFailure, type ConditionMatch, type ConditionMismatch, ConfigValidationError, type ConsumeResult, type ConsumeRewardParams, type CustomValidationContext, type CustomValidator, DEFAULT_SHEET_THEME, type DetectorError, type DetectorErrorCode, type DetectorKind, type DetectorResult, type ExternalReference, type FontFamily, type GeoDetectorOptions, type GeoVerificationContext, MemoryQueueStorage as InMemoryOfflineQueueStorage, InMemoryStorage, IndexedDBAdapter, type IndexedDBAdapterOptions, type IndexedDBOfflineQueueOptions, IndexedDBOfflineQueueStorage, LocalStorageAdapter, type LocalStorageAdapterOptions, type LocalStorageFailureMode, type LocaleDictionary, type LocalizedString, type LocalizedText, type MergeConflictOptions, type NfcDetectorOptions, type NfcVerificationContext, type OfflineConflict, type OfflineConflictResult, type OfflineOperation, OfflineQueue, type OfflineQueueOptions, type OfflineQueueStorage, type OfflineResult, type OfflineSender, type OfflineSyncResultEvent, type OfflineSyncResultListener, type ParseResult, type PasscodeCondition$1 as PasscodeCondition, type ProcessStampValue, type PublicCheckInCondition, type PublicConfigSafety, type PublicRallyConfig, type PublicReward, type PublicSpotItem, type QrDetectorOptions, type QrVerificationContext, type RallyConfig, type RallySnapshot, type RedemptionMethod, type Result, type Reward, type RewardConsumeError, type RewardState, type RewardStatus, type RewardType, type RewardUnlockCondition, type SecureTokenError, type SecureTokenErrorCode, type SecureTokenOptions, type SecureTokenPayload, type SecureTokenSecretKey, type SecureTokenVerification, type SheetTheme, type SlotShape, type SnapshotSecretKey, type SnapshotTokenError, type SnapshotTokenErrorCode, type SnapshotTokenPayload, type SnapshotTokenVerification, type SpotItem, type StampError, StampRallyClient, type StampRallyProgress, type StampRallyState, type StampRecord, type StampStorage, StorageAdapterError, type StorageAdapterErrorCode, type StorageLike, type StorageOperation, type StorageWarningHandler, type SupportedLocale, type SyncAdapter, type SyncConflictPolicy, type SyncState, THEME_PRESETS, type ThemePreset, type ThemePresetId, type UserRallyState, type ValidationError, type Validator, type VerificationContext, assertPublicConfig, calculateDistanceMeters, calculateProgress, consumeReward, createClaimTicketNumber, createSecureToken, createSignedSnapshotToken, createUniqueClaimTicketNumber, evaluateCondition, evaluateConditionDetailed, exportProgressToken, getCurrentGeoContext, getOrderedSpots, importProgressToken, isGeolocationSupported, isNfcSupported, isPublicConfig, isQrSupported, isRewardState, isStampRallyState, issueClaimTicketNumber, normalizePasscode, parseAdminConfig, parsePublicConfig, processStamp, readNfcContext, readQrContext, reconcileRewardStates, resolveLocalizedText, resolveRallyStateConflict, safeParseAdminConfig, safeParsePublicConfig, sanitizeAdminConfig, storageKey, toLocalizedString, toPublicConfig, updateLocalizedField, validatePublicConfigSafety, verifyPasscode, verifySecureToken, verifySnapshotToken };
package/dist/index.d.ts CHANGED
@@ -123,6 +123,8 @@ interface AdminRallyConfig<TLocale extends string = string, TMeta extends Record
123
123
  readonly inventory?: Readonly<Record<string, number>>;
124
124
  readonly serverMetadata?: Readonly<Record<string, unknown>>;
125
125
  readonly metadata?: TMeta;
126
+ /** Explicit public metadata name. `metadata` remains supported for compatibility. */
127
+ readonly publicMetadata?: TMeta;
126
128
  readonly serverEndpoint?: string;
127
129
  }
128
130
  interface PublicRallyConfig<TLocale extends string = string, TMeta extends Record<string, unknown> = Record<string, unknown>> {
@@ -165,6 +167,19 @@ interface StampRallyState {
165
167
  }
166
168
  type UserRallyState = StampRallyState;
167
169
 
170
+ /**
171
+ * Creates the client-facing configuration and removes private values at every
172
+ * nesting level. `customFilter` is an allow-list predicate: returning false
173
+ * removes that key.
174
+ */
175
+ declare function sanitizeAdminConfig<TLocale extends string = string, TMeta extends Record<string, unknown> = Record<string, unknown>>(admin: AdminRallyConfig<TLocale, TMeta>, customFilter?: (key: string, value: unknown) => boolean): PublicRallyConfig<TLocale, TMeta>;
176
+ interface PublicConfigSafety {
177
+ readonly safe: boolean;
178
+ readonly leakedKeys: string[];
179
+ }
180
+ /** Finds private keys, including keys nested in metadata or custom values. */
181
+ declare function validatePublicConfigSafety(publicConfig: PublicRallyConfig): PublicConfigSafety;
182
+
168
183
  type VerificationContext = {
169
184
  readonly type: "qr";
170
185
  readonly token: string;
@@ -298,6 +313,12 @@ declare function createClaimTicketNumber(rewardId: string, options?: ClaimTicket
298
313
  declare function createUniqueClaimTicketNumber(rewardId: string, issuedAt: string): string;
299
314
  declare function issueClaimTicketNumber(reward: Reward, currentState: RewardState, options?: ClaimTicketOptions): RewardState;
300
315
 
316
+ interface MergeConflictOptions {
317
+ readonly policy: "server_wins" | "merge";
318
+ }
319
+ /** Resolves a server/local state conflict without mutating either input state. */
320
+ declare function resolveRallyStateConflict(serverState: UserRallyState, localState: UserRallyState, options?: MergeConflictOptions): UserRallyState;
321
+
301
322
  type RewardConsumeError = {
302
323
  readonly code: "NOT_AVAILABLE" | "ALREADY_CONSUMED" | "OUT_OF_STOCK" | "REWARD_NOT_FOUND";
303
324
  readonly rewardId: string;
@@ -332,6 +353,85 @@ interface ProcessStampValue {
332
353
  }
333
354
  declare function processStamp(state: StampRallyState, config: AdminRallyConfig, spotId: string, context: VerificationContext, now: string): Result<ProcessStampValue, StampError>;
334
355
 
356
+ type OfflineOperation = {
357
+ readonly kind: "checkIn";
358
+ readonly request: CheckInRequest;
359
+ } | {
360
+ readonly kind: "claimReward";
361
+ readonly request: ClaimRequest;
362
+ };
363
+ type OfflineResult = CheckInResult | ClaimResult | UserRallyState;
364
+ type SyncState = "idle" | "syncing" | "error";
365
+ type SyncConflictPolicy = "server_wins" | "merge";
366
+ interface OfflineConflictResult {
367
+ readonly conflict: true;
368
+ readonly localState: UserRallyState;
369
+ readonly serverState: UserRallyState;
370
+ }
371
+ interface OfflineQueueStorage {
372
+ load(key: string): Promise<ReadonlyArray<OfflineOperation>>;
373
+ save(key: string, operations: ReadonlyArray<OfflineOperation>): Promise<void>;
374
+ }
375
+ interface OfflineQueueOptions {
376
+ readonly storage?: OfflineQueueStorage;
377
+ readonly storageLike?: {
378
+ getItem(key: string): string | null;
379
+ setItem(key: string, value: string): void;
380
+ removeItem?(key: string): void;
381
+ } | null;
382
+ readonly key?: string;
383
+ readonly databaseName?: string;
384
+ readonly conflictPolicy?: SyncConflictPolicy;
385
+ readonly onSyncConflict?: SyncConflictPolicy | ((context: OfflineConflict) => SyncConflictPolicy | Promise<SyncConflictPolicy>);
386
+ }
387
+ interface OfflineConflict {
388
+ readonly operation: OfflineOperation;
389
+ readonly localState: UserRallyState;
390
+ readonly serverState: UserRallyState;
391
+ }
392
+ type OfflineSender = (operation: OfflineOperation) => Promise<OfflineResult | OfflineConflictResult>;
393
+ interface OfflineSyncResultEvent {
394
+ readonly operation: OfflineOperation;
395
+ readonly result: OfflineResult | OfflineConflictResult;
396
+ readonly state?: UserRallyState;
397
+ }
398
+ type OfflineSyncResultListener = (event: OfflineSyncResultEvent) => void | Promise<void>;
399
+ declare class MemoryQueueStorage implements OfflineQueueStorage {
400
+ #private;
401
+ load(key: string): Promise<ReadonlyArray<OfflineOperation>>;
402
+ save(key: string, operations: ReadonlyArray<OfflineOperation>): Promise<void>;
403
+ }
404
+ interface IndexedDBOfflineQueueOptions {
405
+ readonly indexedDB?: IDBFactory | null;
406
+ readonly databaseName?: string;
407
+ }
408
+ declare class IndexedDBOfflineQueueStorage implements OfflineQueueStorage {
409
+ #private;
410
+ constructor(options?: IndexedDBOfflineQueueOptions);
411
+ load(key: string): Promise<ReadonlyArray<OfflineOperation>>;
412
+ save(key: string, operations: ReadonlyArray<OfflineOperation>): Promise<void>;
413
+ }
414
+ /** Durable, sequential retry queue for operations created while disconnected. */
415
+ declare class OfflineQueue {
416
+ #private;
417
+ constructor(options?: OfflineQueueOptions);
418
+ get syncState(): SyncState;
419
+ get pendingCount(): number;
420
+ get error(): Error | null;
421
+ get operations(): ReadonlyArray<OfflineOperation>;
422
+ get conflictPolicy(): SyncConflictPolicy;
423
+ setSyncResultListener(listener: OfflineSyncResultListener | undefined): void;
424
+ initialize(): Promise<void>;
425
+ setSender(sender: OfflineSender): void;
426
+ enqueue(operation: OfflineOperation): Promise<void>;
427
+ enqueueCheckIn(request: CheckInRequest): Promise<void>;
428
+ enqueueClaimReward(request: ClaimRequest): Promise<void>;
429
+ clear(): Promise<void>;
430
+ sync(sender?: OfflineSender | undefined): Promise<void>;
431
+ retrySync(sender?: OfflineSender | undefined): Promise<void>;
432
+ resolveConflict(operation: OfflineOperation, localState: UserRallyState, serverState: UserRallyState): Promise<UserRallyState>;
433
+ }
434
+
335
435
  interface StampStorage {
336
436
  load(rallyId: string, userId: string | null): Promise<StampRallyState | null>;
337
437
  save(state: StampRallyState): Promise<void>;
@@ -486,6 +586,7 @@ interface ClientOptions {
486
586
  readonly customValidators?: Readonly<Record<string, Validator>>;
487
587
  readonly clock?: () => string;
488
588
  readonly userId?: string | null;
589
+ readonly offlineQueue?: OfflineQueue;
489
590
  }
490
591
  type StorageOrOptions = StampStorage | ClientOptions;
491
592
  declare class StampRallyClient {
@@ -494,6 +595,8 @@ declare class StampRallyClient {
494
595
  getConfig(): RallyConfig;
495
596
  getState(): UserRallyState | null;
496
597
  getUserId(): string | null;
598
+ get syncState(): SyncState;
599
+ get pendingCount(): number;
497
600
  subscribe(listener: ClientListener): () => void;
498
601
  subscribeEvents(listener: ClientEventListener): () => void;
499
602
  init(): Promise<UserRallyState>;
@@ -504,6 +607,7 @@ declare class StampRallyClient {
504
607
  checkIn(spotId: string, proofData: unknown, options?: CheckInOptions): Promise<CheckInResult>;
505
608
  claimReward(rewardId: string, options?: ClaimOptions): Promise<ClaimResult>;
506
609
  sync(adapter?: SyncAdapter | undefined): Promise<void>;
610
+ retrySync(): Promise<void>;
507
611
  reset(): Promise<UserRallyState>;
508
612
  restore(state: UserRallyState): Promise<UserRallyState>;
509
613
  }
@@ -613,4 +717,4 @@ type SnapshotTokenVerification<T extends SnapshotTokenPayload = SnapshotTokenPay
613
717
  declare function createSignedSnapshotToken<T extends SnapshotTokenPayload>(payload: T, secretKey: SnapshotSecretKey): Promise<string>;
614
718
  declare function verifySnapshotToken<T extends SnapshotTokenPayload = SnapshotTokenPayload>(token: string, secretKey: SnapshotSecretKey, now?: number): Promise<SnapshotTokenVerification<T>>;
615
719
 
616
- export { type AdminRallyConfig, type CheckInCondition, type CheckInOptions, type CheckInRequest, type CheckInResult, type CheckInSuccess, type ClaimOptions, type ClaimRequest, type ClaimResult, type ClaimSuccess, type ClaimTicketOptions, type ClientError, type ClientEvent, type ClientEventListener, type ClientListener, type ClientOptions, type CompositeConditionFailure, type ConditionMatch, type ConditionMismatch, ConfigValidationError, type ConsumeResult, type ConsumeRewardParams, type CustomValidationContext, type CustomValidator, DEFAULT_SHEET_THEME, type DetectorError, type DetectorErrorCode, type DetectorKind, type DetectorResult, type ExternalReference, type FontFamily, type GeoDetectorOptions, type GeoVerificationContext, InMemoryStorage, IndexedDBAdapter, type IndexedDBAdapterOptions, LocalStorageAdapter, type LocalStorageAdapterOptions, type LocalStorageFailureMode, type LocaleDictionary, type LocalizedString, type LocalizedText, type NfcDetectorOptions, type NfcVerificationContext, type ParseResult, type PasscodeCondition$1 as PasscodeCondition, type ProcessStampValue, type PublicCheckInCondition, type PublicRallyConfig, type PublicReward, type PublicSpotItem, type QrDetectorOptions, type QrVerificationContext, type RallyConfig, type RallySnapshot, type RedemptionMethod, type Result, type Reward, type RewardConsumeError, type RewardState, type RewardStatus, type RewardType, type RewardUnlockCondition, type SecureTokenError, type SecureTokenErrorCode, type SecureTokenOptions, type SecureTokenPayload, type SecureTokenSecretKey, type SecureTokenVerification, type SheetTheme, type SlotShape, type SnapshotSecretKey, type SnapshotTokenError, type SnapshotTokenErrorCode, type SnapshotTokenPayload, type SnapshotTokenVerification, type SpotItem, type StampError, StampRallyClient, type StampRallyProgress, type StampRallyState, type StampRecord, type StampStorage, StorageAdapterError, type StorageAdapterErrorCode, type StorageLike, type StorageOperation, type StorageWarningHandler, type SupportedLocale, type SyncAdapter, THEME_PRESETS, type ThemePreset, type ThemePresetId, type UserRallyState, type ValidationError, type Validator, type VerificationContext, assertPublicConfig, calculateDistanceMeters, calculateProgress, consumeReward, createClaimTicketNumber, createSecureToken, createSignedSnapshotToken, createUniqueClaimTicketNumber, evaluateCondition, evaluateConditionDetailed, exportProgressToken, getCurrentGeoContext, getOrderedSpots, importProgressToken, isGeolocationSupported, isNfcSupported, isPublicConfig, isQrSupported, isRewardState, isStampRallyState, issueClaimTicketNumber, normalizePasscode, parseAdminConfig, parsePublicConfig, processStamp, readNfcContext, readQrContext, reconcileRewardStates, resolveLocalizedText, safeParseAdminConfig, safeParsePublicConfig, storageKey, toLocalizedString, toPublicConfig, updateLocalizedField, verifyPasscode, verifySecureToken, verifySnapshotToken };
720
+ export { type AdminRallyConfig, type CheckInCondition, type CheckInOptions, type CheckInRequest, type CheckInResult, type CheckInSuccess, type ClaimOptions, type ClaimRequest, type ClaimResult, type ClaimSuccess, type ClaimTicketOptions, type ClientError, type ClientEvent, type ClientEventListener, type ClientListener, type ClientOptions, type CompositeConditionFailure, type ConditionMatch, type ConditionMismatch, ConfigValidationError, type ConsumeResult, type ConsumeRewardParams, type CustomValidationContext, type CustomValidator, DEFAULT_SHEET_THEME, type DetectorError, type DetectorErrorCode, type DetectorKind, type DetectorResult, type ExternalReference, type FontFamily, type GeoDetectorOptions, type GeoVerificationContext, MemoryQueueStorage as InMemoryOfflineQueueStorage, InMemoryStorage, IndexedDBAdapter, type IndexedDBAdapterOptions, type IndexedDBOfflineQueueOptions, IndexedDBOfflineQueueStorage, LocalStorageAdapter, type LocalStorageAdapterOptions, type LocalStorageFailureMode, type LocaleDictionary, type LocalizedString, type LocalizedText, type MergeConflictOptions, type NfcDetectorOptions, type NfcVerificationContext, type OfflineConflict, type OfflineConflictResult, type OfflineOperation, OfflineQueue, type OfflineQueueOptions, type OfflineQueueStorage, type OfflineResult, type OfflineSender, type OfflineSyncResultEvent, type OfflineSyncResultListener, type ParseResult, type PasscodeCondition$1 as PasscodeCondition, type ProcessStampValue, type PublicCheckInCondition, type PublicConfigSafety, type PublicRallyConfig, type PublicReward, type PublicSpotItem, type QrDetectorOptions, type QrVerificationContext, type RallyConfig, type RallySnapshot, type RedemptionMethod, type Result, type Reward, type RewardConsumeError, type RewardState, type RewardStatus, type RewardType, type RewardUnlockCondition, type SecureTokenError, type SecureTokenErrorCode, type SecureTokenOptions, type SecureTokenPayload, type SecureTokenSecretKey, type SecureTokenVerification, type SheetTheme, type SlotShape, type SnapshotSecretKey, type SnapshotTokenError, type SnapshotTokenErrorCode, type SnapshotTokenPayload, type SnapshotTokenVerification, type SpotItem, type StampError, StampRallyClient, type StampRallyProgress, type StampRallyState, type StampRecord, type StampStorage, StorageAdapterError, type StorageAdapterErrorCode, type StorageLike, type StorageOperation, type StorageWarningHandler, type SupportedLocale, type SyncAdapter, type SyncConflictPolicy, type SyncState, THEME_PRESETS, type ThemePreset, type ThemePresetId, type UserRallyState, type ValidationError, type Validator, type VerificationContext, assertPublicConfig, calculateDistanceMeters, calculateProgress, consumeReward, createClaimTicketNumber, createSecureToken, createSignedSnapshotToken, createUniqueClaimTicketNumber, evaluateCondition, evaluateConditionDetailed, exportProgressToken, getCurrentGeoContext, getOrderedSpots, importProgressToken, isGeolocationSupported, isNfcSupported, isPublicConfig, isQrSupported, isRewardState, isStampRallyState, issueClaimTicketNumber, normalizePasscode, parseAdminConfig, parsePublicConfig, processStamp, readNfcContext, readQrContext, reconcileRewardStates, resolveLocalizedText, resolveRallyStateConflict, safeParseAdminConfig, safeParsePublicConfig, sanitizeAdminConfig, storageKey, toLocalizedString, toPublicConfig, updateLocalizedField, validatePublicConfigSafety, verifyPasscode, verifySecureToken, verifySnapshotToken };