@stamprally/core 0.15.0 → 0.16.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 +2 -2
- package/dist/index.cjs +237 -27
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +33 -5
- package/dist/index.d.ts +33 -5
- package/dist/index.js +237 -28
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -372,15 +372,17 @@ interface ProcessStampValue {
|
|
|
372
372
|
}
|
|
373
373
|
declare function processStamp(state: StampRallyState, config: AdminRallyConfig, spotId: string, context: VerificationContext, now: string): Result<ProcessStampValue, StampError>;
|
|
374
374
|
|
|
375
|
+
type QueueOperationStatus = "PENDING" | "IN_FLIGHT" | "ACCEPTED" | "REJECTED_PERMANENT" | "FAILED_RETRYABLE";
|
|
376
|
+
type OfflineQueueCapability = "indexeddb" | "localstorage" | "memory" | "custom";
|
|
375
377
|
type OfflineOperation = {
|
|
376
378
|
readonly kind: "checkIn";
|
|
377
379
|
readonly request: CheckInRequest;
|
|
378
|
-
readonly status?:
|
|
380
|
+
readonly status?: QueueOperationStatus;
|
|
379
381
|
readonly attempts?: number;
|
|
380
382
|
} | {
|
|
381
383
|
readonly kind: "claimReward";
|
|
382
384
|
readonly request: ClaimRequest;
|
|
383
|
-
readonly status?:
|
|
385
|
+
readonly status?: QueueOperationStatus;
|
|
384
386
|
readonly attempts?: number;
|
|
385
387
|
};
|
|
386
388
|
type OfflineResult = CheckInResult | ClaimResult | UserRallyState;
|
|
@@ -394,6 +396,8 @@ interface OfflineConflictResult {
|
|
|
394
396
|
interface OfflineQueueStorage {
|
|
395
397
|
load(key: string): Promise<ReadonlyArray<OfflineOperation>>;
|
|
396
398
|
save(key: string, operations: ReadonlyArray<OfflineOperation>): Promise<void>;
|
|
399
|
+
loadRejectedHistory?(key: string): Promise<ReadonlyArray<RejectedOperationHistoryEntry>>;
|
|
400
|
+
saveRejectedHistory?(key: string, history: ReadonlyArray<RejectedOperationHistoryEntry>): Promise<void>;
|
|
397
401
|
}
|
|
398
402
|
interface OfflineQueueOptions {
|
|
399
403
|
readonly storage?: OfflineQueueStorage;
|
|
@@ -428,13 +432,21 @@ interface OfflineConflict {
|
|
|
428
432
|
readonly serverState: UserRallyState;
|
|
429
433
|
}
|
|
430
434
|
type OfflineSender = (operation: OfflineOperation) => Promise<OfflineResult | OfflineConflictResult | OfflineOperationResponse>;
|
|
431
|
-
type OfflineOperationStatus =
|
|
432
|
-
type OfflineOperationLifecycleStatus =
|
|
435
|
+
type OfflineOperationStatus = QueueOperationStatus | "REJECTED" | "RETRYABLE_ERROR";
|
|
436
|
+
type OfflineOperationLifecycleStatus = QueueOperationStatus;
|
|
433
437
|
interface OfflineOperationError {
|
|
434
438
|
readonly code: string;
|
|
435
439
|
readonly message: string;
|
|
436
440
|
readonly [key: string]: unknown;
|
|
437
441
|
}
|
|
442
|
+
interface RejectedOperationHistoryEntry {
|
|
443
|
+
readonly operation: OfflineOperation;
|
|
444
|
+
readonly reason: OfflineOperationError;
|
|
445
|
+
readonly errorCode: string;
|
|
446
|
+
readonly rejectedAt: string;
|
|
447
|
+
readonly attempts: number;
|
|
448
|
+
}
|
|
449
|
+
type RejectedOperation = RejectedOperationHistoryEntry;
|
|
438
450
|
type OfflineOperationResponse = {
|
|
439
451
|
readonly status: "ACCEPTED";
|
|
440
452
|
readonly result?: OfflineResult | OfflineConflictResult;
|
|
@@ -461,6 +473,8 @@ declare class MemoryQueueStorage implements OfflineQueueStorage {
|
|
|
461
473
|
#private;
|
|
462
474
|
load(key: string): Promise<ReadonlyArray<OfflineOperation>>;
|
|
463
475
|
save(key: string, operations: ReadonlyArray<OfflineOperation>): Promise<void>;
|
|
476
|
+
loadRejectedHistory(key: string): Promise<ReadonlyArray<RejectedOperationHistoryEntry>>;
|
|
477
|
+
saveRejectedHistory(key: string, history: ReadonlyArray<RejectedOperationHistoryEntry>): Promise<void>;
|
|
464
478
|
}
|
|
465
479
|
interface IndexedDBOfflineQueueOptions {
|
|
466
480
|
readonly indexedDB?: IDBFactory | null;
|
|
@@ -471,13 +485,18 @@ declare class IndexedDBOfflineQueueStorage implements OfflineQueueStorage {
|
|
|
471
485
|
constructor(options?: IndexedDBOfflineQueueOptions);
|
|
472
486
|
load(key: string): Promise<ReadonlyArray<OfflineOperation>>;
|
|
473
487
|
save(key: string, operations: ReadonlyArray<OfflineOperation>): Promise<void>;
|
|
488
|
+
loadRejectedHistory(key: string): Promise<ReadonlyArray<RejectedOperationHistoryEntry>>;
|
|
489
|
+
saveRejectedHistory(key: string, history: ReadonlyArray<RejectedOperationHistoryEntry>): Promise<void>;
|
|
474
490
|
}
|
|
491
|
+
declare function offlineOperationId(operation: OfflineOperation): string;
|
|
475
492
|
/** Durable, sequential retry queue for operations created while disconnected. */
|
|
476
493
|
declare class OfflineQueue {
|
|
477
494
|
#private;
|
|
478
495
|
constructor(options?: OfflineQueueOptions);
|
|
479
496
|
get syncState(): SyncState;
|
|
480
497
|
get pendingCount(): number;
|
|
498
|
+
get queueCapability(): OfflineQueueCapability;
|
|
499
|
+
get rejectedHistory(): ReadonlyArray<RejectedOperationHistoryEntry>;
|
|
481
500
|
get error(): Error | null;
|
|
482
501
|
get operations(): ReadonlyArray<OfflineOperation>;
|
|
483
502
|
get conflictPolicy(): SyncConflictPolicy;
|
|
@@ -496,6 +515,11 @@ declare class OfflineQueue {
|
|
|
496
515
|
enqueueCheckIn(request: CheckInRequest): Promise<void>;
|
|
497
516
|
enqueueClaimReward(request: ClaimRequest): Promise<void>;
|
|
498
517
|
clear(): Promise<void>;
|
|
518
|
+
discardRejected(operationId: string): Promise<boolean>;
|
|
519
|
+
retryRejected(operationId: string): Promise<boolean>;
|
|
520
|
+
discardRejectedOperation(operationId: string): Promise<boolean>;
|
|
521
|
+
retryRejectedOperation(operationId: string): Promise<boolean>;
|
|
522
|
+
clearRejectedHistory(): Promise<void>;
|
|
499
523
|
sync(sender?: OfflineSender | undefined): Promise<void>;
|
|
500
524
|
retrySync(sender?: OfflineSender | undefined): Promise<void>;
|
|
501
525
|
resolveConflict(operation: OfflineOperation, localState: UserRallyState, serverState: UserRallyState): Promise<UserRallyState>;
|
|
@@ -672,6 +696,10 @@ declare class StampRallyClient {
|
|
|
672
696
|
getAnonymousSessionId(): string;
|
|
673
697
|
get syncState(): SyncState;
|
|
674
698
|
get pendingCount(): number;
|
|
699
|
+
get rejectedHistory(): ReadonlyArray<RejectedOperationHistoryEntry>;
|
|
700
|
+
get queueCapability(): OfflineQueueCapability;
|
|
701
|
+
discardRejected(operationId: string): Promise<boolean>;
|
|
702
|
+
retryRejected(operationId: string): Promise<boolean>;
|
|
675
703
|
subscribe(listener: ClientListener): () => void;
|
|
676
704
|
subscribeEvents(listener: ClientEventListener): () => void;
|
|
677
705
|
init(): Promise<UserRallyState>;
|
|
@@ -792,4 +820,4 @@ type SnapshotTokenVerification<T extends SnapshotTokenPayload = SnapshotTokenPay
|
|
|
792
820
|
declare function createSignedSnapshotToken<T extends SnapshotTokenPayload>(payload: T, secretKey: SnapshotSecretKey): Promise<string>;
|
|
793
821
|
declare function verifySnapshotToken<T extends SnapshotTokenPayload = SnapshotTokenPayload>(token: string, secretKey: SnapshotSecretKey, now?: number): Promise<SnapshotTokenVerification<T>>;
|
|
794
822
|
|
|
795
|
-
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, type InventoryAggregationMode, LocalStorageAdapter, type LocalStorageAdapterOptions, type LocalStorageFailureMode, type LocaleDictionary, type LocalizedString, type LocalizedText, type MergeConflictOptions, type NfcDetectorOptions, type NfcVerificationContext, type OfflineConflict, type OfflineConflictResult, type OfflineOperation, type OfflineOperationError, type OfflineOperationLifecycleStatus, type OfflineOperationResponse, type OfflineOperationStatus, 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 RallyInventory, type RallyInventoryState, 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 SpotStatus, 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 SyncRetryOptions, type SyncState, THEME_PRESETS, type ThemePreset, type ThemePresetId, type UserRallyState, type ValidationError, type Validator, type VerificationContext, assertPublicConfig, calculateDistanceMeters, calculateProgress, consumeReward, createAnonymousSessionId, createClaimTicketNumber, createSecureToken, createSignedSnapshotToken, createUniqueClaimTicketNumber, evaluateCondition, evaluateConditionDetailed, evaluateSpotStatus, exportProgressToken, getCurrentGeoContext, getOrderedSpots, getSpotStatus, 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, validateRallyConfigRelations, verifyPasscode, verifySecureToken, verifySnapshotToken };
|
|
823
|
+
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, type InventoryAggregationMode, LocalStorageAdapter, type LocalStorageAdapterOptions, type LocalStorageFailureMode, type LocaleDictionary, type LocalizedString, type LocalizedText, type MergeConflictOptions, type NfcDetectorOptions, type NfcVerificationContext, type OfflineConflict, type OfflineConflictResult, type OfflineOperation, type OfflineOperationError, type OfflineOperationLifecycleStatus, type OfflineOperationResponse, type OfflineOperationStatus, OfflineQueue, type OfflineQueueCapability, 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 QueueOperationStatus, type RallyConfig, type RallyInventory, type RallyInventoryState, type RallySnapshot, type RedemptionMethod, type RejectedOperation, type RejectedOperationHistoryEntry, 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 SpotStatus, 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 SyncRetryOptions, type SyncState, THEME_PRESETS, type ThemePreset, type ThemePresetId, type UserRallyState, type ValidationError, type Validator, type VerificationContext, assertPublicConfig, calculateDistanceMeters, calculateProgress, consumeReward, createAnonymousSessionId, createClaimTicketNumber, createSecureToken, createSignedSnapshotToken, createUniqueClaimTicketNumber, evaluateCondition, evaluateConditionDetailed, evaluateSpotStatus, exportProgressToken, getCurrentGeoContext, getOrderedSpots, getSpotStatus, importProgressToken, isGeolocationSupported, isNfcSupported, isPublicConfig, isQrSupported, isRewardState, isStampRallyState, issueClaimTicketNumber, normalizePasscode, offlineOperationId, parseAdminConfig, parsePublicConfig, processStamp, readNfcContext, readQrContext, reconcileRewardStates, resolveLocalizedText, resolveRallyStateConflict, safeParseAdminConfig, safeParsePublicConfig, sanitizeAdminConfig, storageKey, toLocalizedString, toPublicConfig, updateLocalizedField, validatePublicConfigSafety, validateRallyConfigRelations, verifyPasscode, verifySecureToken, verifySnapshotToken };
|
package/dist/index.d.ts
CHANGED
|
@@ -372,15 +372,17 @@ interface ProcessStampValue {
|
|
|
372
372
|
}
|
|
373
373
|
declare function processStamp(state: StampRallyState, config: AdminRallyConfig, spotId: string, context: VerificationContext, now: string): Result<ProcessStampValue, StampError>;
|
|
374
374
|
|
|
375
|
+
type QueueOperationStatus = "PENDING" | "IN_FLIGHT" | "ACCEPTED" | "REJECTED_PERMANENT" | "FAILED_RETRYABLE";
|
|
376
|
+
type OfflineQueueCapability = "indexeddb" | "localstorage" | "memory" | "custom";
|
|
375
377
|
type OfflineOperation = {
|
|
376
378
|
readonly kind: "checkIn";
|
|
377
379
|
readonly request: CheckInRequest;
|
|
378
|
-
readonly status?:
|
|
380
|
+
readonly status?: QueueOperationStatus;
|
|
379
381
|
readonly attempts?: number;
|
|
380
382
|
} | {
|
|
381
383
|
readonly kind: "claimReward";
|
|
382
384
|
readonly request: ClaimRequest;
|
|
383
|
-
readonly status?:
|
|
385
|
+
readonly status?: QueueOperationStatus;
|
|
384
386
|
readonly attempts?: number;
|
|
385
387
|
};
|
|
386
388
|
type OfflineResult = CheckInResult | ClaimResult | UserRallyState;
|
|
@@ -394,6 +396,8 @@ interface OfflineConflictResult {
|
|
|
394
396
|
interface OfflineQueueStorage {
|
|
395
397
|
load(key: string): Promise<ReadonlyArray<OfflineOperation>>;
|
|
396
398
|
save(key: string, operations: ReadonlyArray<OfflineOperation>): Promise<void>;
|
|
399
|
+
loadRejectedHistory?(key: string): Promise<ReadonlyArray<RejectedOperationHistoryEntry>>;
|
|
400
|
+
saveRejectedHistory?(key: string, history: ReadonlyArray<RejectedOperationHistoryEntry>): Promise<void>;
|
|
397
401
|
}
|
|
398
402
|
interface OfflineQueueOptions {
|
|
399
403
|
readonly storage?: OfflineQueueStorage;
|
|
@@ -428,13 +432,21 @@ interface OfflineConflict {
|
|
|
428
432
|
readonly serverState: UserRallyState;
|
|
429
433
|
}
|
|
430
434
|
type OfflineSender = (operation: OfflineOperation) => Promise<OfflineResult | OfflineConflictResult | OfflineOperationResponse>;
|
|
431
|
-
type OfflineOperationStatus =
|
|
432
|
-
type OfflineOperationLifecycleStatus =
|
|
435
|
+
type OfflineOperationStatus = QueueOperationStatus | "REJECTED" | "RETRYABLE_ERROR";
|
|
436
|
+
type OfflineOperationLifecycleStatus = QueueOperationStatus;
|
|
433
437
|
interface OfflineOperationError {
|
|
434
438
|
readonly code: string;
|
|
435
439
|
readonly message: string;
|
|
436
440
|
readonly [key: string]: unknown;
|
|
437
441
|
}
|
|
442
|
+
interface RejectedOperationHistoryEntry {
|
|
443
|
+
readonly operation: OfflineOperation;
|
|
444
|
+
readonly reason: OfflineOperationError;
|
|
445
|
+
readonly errorCode: string;
|
|
446
|
+
readonly rejectedAt: string;
|
|
447
|
+
readonly attempts: number;
|
|
448
|
+
}
|
|
449
|
+
type RejectedOperation = RejectedOperationHistoryEntry;
|
|
438
450
|
type OfflineOperationResponse = {
|
|
439
451
|
readonly status: "ACCEPTED";
|
|
440
452
|
readonly result?: OfflineResult | OfflineConflictResult;
|
|
@@ -461,6 +473,8 @@ declare class MemoryQueueStorage implements OfflineQueueStorage {
|
|
|
461
473
|
#private;
|
|
462
474
|
load(key: string): Promise<ReadonlyArray<OfflineOperation>>;
|
|
463
475
|
save(key: string, operations: ReadonlyArray<OfflineOperation>): Promise<void>;
|
|
476
|
+
loadRejectedHistory(key: string): Promise<ReadonlyArray<RejectedOperationHistoryEntry>>;
|
|
477
|
+
saveRejectedHistory(key: string, history: ReadonlyArray<RejectedOperationHistoryEntry>): Promise<void>;
|
|
464
478
|
}
|
|
465
479
|
interface IndexedDBOfflineQueueOptions {
|
|
466
480
|
readonly indexedDB?: IDBFactory | null;
|
|
@@ -471,13 +485,18 @@ declare class IndexedDBOfflineQueueStorage implements OfflineQueueStorage {
|
|
|
471
485
|
constructor(options?: IndexedDBOfflineQueueOptions);
|
|
472
486
|
load(key: string): Promise<ReadonlyArray<OfflineOperation>>;
|
|
473
487
|
save(key: string, operations: ReadonlyArray<OfflineOperation>): Promise<void>;
|
|
488
|
+
loadRejectedHistory(key: string): Promise<ReadonlyArray<RejectedOperationHistoryEntry>>;
|
|
489
|
+
saveRejectedHistory(key: string, history: ReadonlyArray<RejectedOperationHistoryEntry>): Promise<void>;
|
|
474
490
|
}
|
|
491
|
+
declare function offlineOperationId(operation: OfflineOperation): string;
|
|
475
492
|
/** Durable, sequential retry queue for operations created while disconnected. */
|
|
476
493
|
declare class OfflineQueue {
|
|
477
494
|
#private;
|
|
478
495
|
constructor(options?: OfflineQueueOptions);
|
|
479
496
|
get syncState(): SyncState;
|
|
480
497
|
get pendingCount(): number;
|
|
498
|
+
get queueCapability(): OfflineQueueCapability;
|
|
499
|
+
get rejectedHistory(): ReadonlyArray<RejectedOperationHistoryEntry>;
|
|
481
500
|
get error(): Error | null;
|
|
482
501
|
get operations(): ReadonlyArray<OfflineOperation>;
|
|
483
502
|
get conflictPolicy(): SyncConflictPolicy;
|
|
@@ -496,6 +515,11 @@ declare class OfflineQueue {
|
|
|
496
515
|
enqueueCheckIn(request: CheckInRequest): Promise<void>;
|
|
497
516
|
enqueueClaimReward(request: ClaimRequest): Promise<void>;
|
|
498
517
|
clear(): Promise<void>;
|
|
518
|
+
discardRejected(operationId: string): Promise<boolean>;
|
|
519
|
+
retryRejected(operationId: string): Promise<boolean>;
|
|
520
|
+
discardRejectedOperation(operationId: string): Promise<boolean>;
|
|
521
|
+
retryRejectedOperation(operationId: string): Promise<boolean>;
|
|
522
|
+
clearRejectedHistory(): Promise<void>;
|
|
499
523
|
sync(sender?: OfflineSender | undefined): Promise<void>;
|
|
500
524
|
retrySync(sender?: OfflineSender | undefined): Promise<void>;
|
|
501
525
|
resolveConflict(operation: OfflineOperation, localState: UserRallyState, serverState: UserRallyState): Promise<UserRallyState>;
|
|
@@ -672,6 +696,10 @@ declare class StampRallyClient {
|
|
|
672
696
|
getAnonymousSessionId(): string;
|
|
673
697
|
get syncState(): SyncState;
|
|
674
698
|
get pendingCount(): number;
|
|
699
|
+
get rejectedHistory(): ReadonlyArray<RejectedOperationHistoryEntry>;
|
|
700
|
+
get queueCapability(): OfflineQueueCapability;
|
|
701
|
+
discardRejected(operationId: string): Promise<boolean>;
|
|
702
|
+
retryRejected(operationId: string): Promise<boolean>;
|
|
675
703
|
subscribe(listener: ClientListener): () => void;
|
|
676
704
|
subscribeEvents(listener: ClientEventListener): () => void;
|
|
677
705
|
init(): Promise<UserRallyState>;
|
|
@@ -792,4 +820,4 @@ type SnapshotTokenVerification<T extends SnapshotTokenPayload = SnapshotTokenPay
|
|
|
792
820
|
declare function createSignedSnapshotToken<T extends SnapshotTokenPayload>(payload: T, secretKey: SnapshotSecretKey): Promise<string>;
|
|
793
821
|
declare function verifySnapshotToken<T extends SnapshotTokenPayload = SnapshotTokenPayload>(token: string, secretKey: SnapshotSecretKey, now?: number): Promise<SnapshotTokenVerification<T>>;
|
|
794
822
|
|
|
795
|
-
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, type InventoryAggregationMode, LocalStorageAdapter, type LocalStorageAdapterOptions, type LocalStorageFailureMode, type LocaleDictionary, type LocalizedString, type LocalizedText, type MergeConflictOptions, type NfcDetectorOptions, type NfcVerificationContext, type OfflineConflict, type OfflineConflictResult, type OfflineOperation, type OfflineOperationError, type OfflineOperationLifecycleStatus, type OfflineOperationResponse, type OfflineOperationStatus, 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 RallyInventory, type RallyInventoryState, 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 SpotStatus, 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 SyncRetryOptions, type SyncState, THEME_PRESETS, type ThemePreset, type ThemePresetId, type UserRallyState, type ValidationError, type Validator, type VerificationContext, assertPublicConfig, calculateDistanceMeters, calculateProgress, consumeReward, createAnonymousSessionId, createClaimTicketNumber, createSecureToken, createSignedSnapshotToken, createUniqueClaimTicketNumber, evaluateCondition, evaluateConditionDetailed, evaluateSpotStatus, exportProgressToken, getCurrentGeoContext, getOrderedSpots, getSpotStatus, 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, validateRallyConfigRelations, verifyPasscode, verifySecureToken, verifySnapshotToken };
|
|
823
|
+
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, type InventoryAggregationMode, LocalStorageAdapter, type LocalStorageAdapterOptions, type LocalStorageFailureMode, type LocaleDictionary, type LocalizedString, type LocalizedText, type MergeConflictOptions, type NfcDetectorOptions, type NfcVerificationContext, type OfflineConflict, type OfflineConflictResult, type OfflineOperation, type OfflineOperationError, type OfflineOperationLifecycleStatus, type OfflineOperationResponse, type OfflineOperationStatus, OfflineQueue, type OfflineQueueCapability, 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 QueueOperationStatus, type RallyConfig, type RallyInventory, type RallyInventoryState, type RallySnapshot, type RedemptionMethod, type RejectedOperation, type RejectedOperationHistoryEntry, 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 SpotStatus, 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 SyncRetryOptions, type SyncState, THEME_PRESETS, type ThemePreset, type ThemePresetId, type UserRallyState, type ValidationError, type Validator, type VerificationContext, assertPublicConfig, calculateDistanceMeters, calculateProgress, consumeReward, createAnonymousSessionId, createClaimTicketNumber, createSecureToken, createSignedSnapshotToken, createUniqueClaimTicketNumber, evaluateCondition, evaluateConditionDetailed, evaluateSpotStatus, exportProgressToken, getCurrentGeoContext, getOrderedSpots, getSpotStatus, importProgressToken, isGeolocationSupported, isNfcSupported, isPublicConfig, isQrSupported, isRewardState, isStampRallyState, issueClaimTicketNumber, normalizePasscode, offlineOperationId, parseAdminConfig, parsePublicConfig, processStamp, readNfcContext, readQrContext, reconcileRewardStates, resolveLocalizedText, resolveRallyStateConflict, safeParseAdminConfig, safeParsePublicConfig, sanitizeAdminConfig, storageKey, toLocalizedString, toPublicConfig, updateLocalizedField, validatePublicConfigSafety, validateRallyConfigRelations, verifyPasscode, verifySecureToken, verifySnapshotToken };
|