@stamprally/core 0.4.0 → 0.5.1

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
@@ -113,6 +113,7 @@ type Result<T, E> = {
113
113
  type SupportedLocale = "ja" | "en";
114
114
  type LocalizedString<TLocale extends string = SupportedLocale> = Record<TLocale, string>;
115
115
  type LocalizedText<TLocale extends string = string> = string | Partial<Record<TLocale, string>>;
116
+ type LocaleDictionary<TLocale extends string = string> = Readonly<Record<TLocale, Readonly<Record<string, string>>>>;
116
117
  type SlotShape = "circle" | "square" | "rounded";
117
118
  type FontFamily = "system-ui" | "serif" | "rounded-sans" | "monospace" | "handwritten";
118
119
  interface SheetTheme {
@@ -141,6 +142,7 @@ interface SpotItem<TLocale extends string = SupportedLocale, TMeta extends Recor
141
142
  readonly description?: LocalizedText<TLocale>;
142
143
  readonly hint?: LocalizedText<TLocale>;
143
144
  readonly condition: StampCondition;
145
+ readonly orderIndex?: number;
144
146
  readonly order?: number;
145
147
  readonly deckId?: string;
146
148
  readonly groupId?: string;
@@ -161,7 +163,20 @@ interface StampRecord {
161
163
  readonly metadata?: Readonly<Record<string, unknown>>;
162
164
  }
163
165
  type RewardType = "digital" | "in_person";
164
- type RedemptionMethod = "manual_slide" | "staff_passcode" | "view_only";
166
+ type RedemptionMethod = "manual_slide" | "staff_passcode" | "view_only" | "server_claim";
167
+ type RewardUnlockCondition = {
168
+ readonly type: "stamp_count";
169
+ readonly count: number;
170
+ } | {
171
+ readonly type: "stamps";
172
+ readonly stampIds: ReadonlyArray<string>;
173
+ } | {
174
+ readonly type: "group_complete";
175
+ readonly groupId: string;
176
+ } | {
177
+ readonly type: "all" | "any";
178
+ readonly conditions: ReadonlyArray<RewardUnlockCondition>;
179
+ };
165
180
  type RewardStatus = "LOCKED" | "AVAILABLE" | "CONSUMED" | "EXPIRED";
166
181
  interface RewardItem<TLocale extends string = SupportedLocale> {
167
182
  readonly id: string;
@@ -170,9 +185,12 @@ interface RewardItem<TLocale extends string = SupportedLocale> {
170
185
  readonly type: RewardType;
171
186
  readonly redemptionMethod: RedemptionMethod;
172
187
  readonly requiredStampCount: number;
188
+ readonly conditions?: ReadonlyArray<RewardUnlockCondition>;
173
189
  readonly digitalContentUrl?: string;
174
190
  readonly staffPasscode?: string;
175
191
  readonly validUntil?: string;
192
+ readonly stockLimit?: number;
193
+ readonly userClaimLimit?: number;
176
194
  readonly maxStock?: number;
177
195
  readonly limitPerUser?: number;
178
196
  readonly claimTicketNumber?: string;
@@ -210,7 +228,7 @@ declare function resolveLocalizedText<TLocale extends string = SupportedLocale>(
210
228
  declare function toLocalizedString(text: LocalizedText | undefined): LocalizedString;
211
229
  declare function toLocalizedString<TLocale extends string>(text: LocalizedText<TLocale> | undefined): LocalizedString<TLocale>;
212
230
 
213
- declare function migrateRallyConfig(raw: unknown): RallyConfig;
231
+ declare function migrateRallyConfig<TLocale extends string = SupportedLocale>(raw: unknown): RallyConfig<TLocale>;
214
232
 
215
233
  type PublicRewardItem<TLocale extends string = string> = Omit<RewardItem<TLocale>, "staffPasscode">;
216
234
  type PublicRallyConfig<TLocale extends string = string, TMeta extends Record<string, unknown> = Record<string, unknown>> = Omit<RallyConfig<TLocale, TMeta>, "rewards"> & {
@@ -404,6 +422,22 @@ declare class IndexedDBAdapter implements StampStorage {
404
422
  }
405
423
 
406
424
  type StampRallyListener = (state: StampRallyState) => void;
425
+ type StampRallyClientEvent = {
426
+ readonly type: "checkIn";
427
+ readonly stampId: string;
428
+ readonly state: StampRallyState;
429
+ } | {
430
+ readonly type: "rewardClaimed";
431
+ readonly rewardId: string;
432
+ readonly state: StampRallyState;
433
+ } | {
434
+ readonly type: "syncCompleted";
435
+ readonly state: StampRallyState;
436
+ } | {
437
+ readonly type: "error";
438
+ readonly error: unknown;
439
+ };
440
+ type StampRallyEventListener = (event: StampRallyClientEvent) => void;
407
441
  type Clock = () => string;
408
442
  declare class StampRallyClient {
409
443
  #private;
@@ -411,6 +445,13 @@ declare class StampRallyClient {
411
445
  getState(): StampRallyState | null;
412
446
  getConfig(): RallyConfig;
413
447
  subscribe(listener: StampRallyListener): () => void;
448
+ subscribe(listener: StampRallyEventListener, options: {
449
+ readonly events: true;
450
+ }): () => void;
451
+ subscribeEvents(listener: StampRallyEventListener): () => void;
452
+ updateConfig(newConfig: PublicRallyConfig): Promise<StampRallyState>;
453
+ notifyRewardClaimed(rewardId: string, state?: StampRallyState | null): void;
454
+ notifySyncCompleted(state?: StampRallyState | null): void;
414
455
  init(): Promise<StampRallyState>;
415
456
  initialize(): Promise<StampRallyState>;
416
457
  acquire(stampId: string, context: VerificationContext, now?: string): Promise<Result<ProcessStampValue, StampError>>;
@@ -418,6 +459,32 @@ declare class StampRallyClient {
418
459
  restore(state: StampRallyState): Promise<StampRallyState>;
419
460
  }
420
461
 
462
+ type SecureTokenSecretKey = string | Uint8Array;
463
+ interface SecureTokenOptions {
464
+ readonly encrypt?: boolean;
465
+ readonly expiresInSeconds?: number;
466
+ }
467
+ interface SecureTokenPayload {
468
+ readonly [key: string]: unknown;
469
+ readonly exp?: number;
470
+ }
471
+ type SecureTokenErrorCode = "MALFORMED" | "INVALID_SIGNATURE" | "DECRYPTION_FAILED" | "INVALID_PAYLOAD" | "EXPIRED";
472
+ interface SecureTokenError {
473
+ readonly code: SecureTokenErrorCode;
474
+ readonly message: string;
475
+ }
476
+ type SecureTokenVerification<T extends SecureTokenPayload = SecureTokenPayload> = {
477
+ readonly ok: true;
478
+ readonly valid: true;
479
+ readonly payload: T;
480
+ } | {
481
+ readonly ok: false;
482
+ readonly valid: false;
483
+ readonly error: SecureTokenError;
484
+ };
485
+ declare function createSecureToken<T extends SecureTokenPayload>(payload: T, secretKey: SecureTokenSecretKey, options?: SecureTokenOptions): Promise<string>;
486
+ declare function verifySecureToken<T extends SecureTokenPayload = SecureTokenPayload>(token: string, secretKey: SecureTokenSecretKey, now?: number): Promise<SecureTokenVerification<T>>;
487
+
421
488
  type DetectorKind = "geolocation" | "nfc" | "qr";
422
489
  type DetectorErrorCode = "UNSUPPORTED" | "PERMISSION_DENIED" | "POSITION_UNAVAILABLE" | "TIMEOUT" | "ABORTED" | "READ_FAILED" | "INVALID_DATA" | "NO_TOKEN";
423
490
  interface DetectorError {
@@ -493,4 +560,4 @@ type SnapshotTokenVerification<T extends SnapshotTokenPayload = SnapshotTokenPay
493
560
  declare function createSignedSnapshotToken<T extends SnapshotTokenPayload>(payload: T, secretKey: SnapshotSecretKey): Promise<string>;
494
561
  declare function verifySnapshotToken<T extends SnapshotTokenPayload = SnapshotTokenPayload>(token: string, secretKey: SnapshotSecretKey, now?: number): Promise<SnapshotTokenVerification<T>>;
495
562
 
496
- export { CURRENT_RALLY_CONFIG_VERSION, type CheckInContext, type CheckInErrorCode, type CheckInInput, type CheckInResult$1 as CheckInResult, type ClaimTicketOptions, type Clock, type CompositeConditionFailure, type ConditionMatch, type ConditionMismatch, type ConsumeResult, type ConsumeRewardParams, DEFAULT_SHEET_THEME, type DetectorError, type DetectorErrorCode, type DetectorKind, type DetectorResult, type FontFamily, type GeoDetectorOptions, type GeoVerificationContext, InMemoryStorage, IndexedDBAdapter, type IndexedDBAdapterOptions, LocalStorageAdapter, type LocalStorageAdapterOptions, type LocalStorageFailureMode, type LocalizedString, type LocalizedText, type NfcDetectorOptions, type PasscodeCondition, type ProcessStampValue, type PublicRallyConfig, type PublicRewardItem, type QrDetectorOptions, type RallyConfig, type RallyConfigValidationResult, type RallySnapshot, type RedemptionMethod, type Result, type RewardConsumeError, type RewardItem, type RewardState, type RewardStatus, type RewardType, type SheetTheme, type SlotShape, type SnapshotSecretKey, type SnapshotTokenError, type SnapshotTokenErrorCode, type SnapshotTokenPayload, type SnapshotTokenVerification, type SpotItem, type StampCondition, type StampDefinition, type StampError, StampRallyClient, type StampRallyEvent, type StampRallyListener, type StampRallyProgress, type StampRallyState, type StampRecord, type StampStorage, StorageAdapterError, type StorageAdapterErrorCode, type StorageLike, type StorageOperation, type StorageWarningHandler, type SupportedLocale, THEME_PRESETS, type ThemePreset, type ThemePresetId, type TokenVerificationContext, type ValidationError, type VerificationContext, calculateDistanceMeters, calculateProgress, consumeReward, createClaimTicketNumber, createSignedSnapshotToken, createUniqueClaimTicketNumber, evaluateCheckIn, evaluateCondition, evaluateConditionDetailed, exportProgressToken, getCurrentGeoContext, importProgressToken, isGeolocationSupported, isNfcSupported, isQrSupported, isRewardState, isStampRallyState, issueClaimTicketNumber, migrateRallyConfig, normalizePasscode, processStamp, readNfcContext, readQrContext, reconcileRewardStates, resolveLocalizedText, stripSensitiveConfig, toLocalizedString, validateRallyConfig, verifyPasscode, verifySnapshotToken };
563
+ export { CURRENT_RALLY_CONFIG_VERSION, type CheckInContext, type CheckInErrorCode, type CheckInInput, type CheckInResult$1 as CheckInResult, type ClaimTicketOptions, type Clock, type CompositeConditionFailure, type ConditionMatch, type ConditionMismatch, type ConsumeResult, type ConsumeRewardParams, DEFAULT_SHEET_THEME, type DetectorError, type DetectorErrorCode, type DetectorKind, type DetectorResult, type FontFamily, type GeoDetectorOptions, type GeoVerificationContext, InMemoryStorage, IndexedDBAdapter, type IndexedDBAdapterOptions, LocalStorageAdapter, type LocalStorageAdapterOptions, type LocalStorageFailureMode, type LocaleDictionary, type LocalizedString, type LocalizedText, type NfcDetectorOptions, type PasscodeCondition, type ProcessStampValue, type PublicRallyConfig, type PublicRewardItem, type QrDetectorOptions, type RallyConfig, type RallyConfigValidationResult, type RallySnapshot, type RedemptionMethod, type Result, type RewardConsumeError, type RewardItem, 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 StampCondition, type StampDefinition, type StampError, StampRallyClient, type StampRallyClientEvent, type StampRallyEvent, type StampRallyEventListener, type StampRallyListener, type StampRallyProgress, type StampRallyState, type StampRecord, type StampStorage, StorageAdapterError, type StorageAdapterErrorCode, type StorageLike, type StorageOperation, type StorageWarningHandler, type SupportedLocale, THEME_PRESETS, type ThemePreset, type ThemePresetId, type TokenVerificationContext, type ValidationError, type VerificationContext, calculateDistanceMeters, calculateProgress, consumeReward, createClaimTicketNumber, createSecureToken, createSignedSnapshotToken, createUniqueClaimTicketNumber, evaluateCheckIn, evaluateCondition, evaluateConditionDetailed, exportProgressToken, getCurrentGeoContext, importProgressToken, isGeolocationSupported, isNfcSupported, isQrSupported, isRewardState, isStampRallyState, issueClaimTicketNumber, migrateRallyConfig, normalizePasscode, processStamp, readNfcContext, readQrContext, reconcileRewardStates, resolveLocalizedText, stripSensitiveConfig, toLocalizedString, validateRallyConfig, verifyPasscode, verifySecureToken, verifySnapshotToken };
package/dist/index.d.ts CHANGED
@@ -113,6 +113,7 @@ type Result<T, E> = {
113
113
  type SupportedLocale = "ja" | "en";
114
114
  type LocalizedString<TLocale extends string = SupportedLocale> = Record<TLocale, string>;
115
115
  type LocalizedText<TLocale extends string = string> = string | Partial<Record<TLocale, string>>;
116
+ type LocaleDictionary<TLocale extends string = string> = Readonly<Record<TLocale, Readonly<Record<string, string>>>>;
116
117
  type SlotShape = "circle" | "square" | "rounded";
117
118
  type FontFamily = "system-ui" | "serif" | "rounded-sans" | "monospace" | "handwritten";
118
119
  interface SheetTheme {
@@ -141,6 +142,7 @@ interface SpotItem<TLocale extends string = SupportedLocale, TMeta extends Recor
141
142
  readonly description?: LocalizedText<TLocale>;
142
143
  readonly hint?: LocalizedText<TLocale>;
143
144
  readonly condition: StampCondition;
145
+ readonly orderIndex?: number;
144
146
  readonly order?: number;
145
147
  readonly deckId?: string;
146
148
  readonly groupId?: string;
@@ -161,7 +163,20 @@ interface StampRecord {
161
163
  readonly metadata?: Readonly<Record<string, unknown>>;
162
164
  }
163
165
  type RewardType = "digital" | "in_person";
164
- type RedemptionMethod = "manual_slide" | "staff_passcode" | "view_only";
166
+ type RedemptionMethod = "manual_slide" | "staff_passcode" | "view_only" | "server_claim";
167
+ type RewardUnlockCondition = {
168
+ readonly type: "stamp_count";
169
+ readonly count: number;
170
+ } | {
171
+ readonly type: "stamps";
172
+ readonly stampIds: ReadonlyArray<string>;
173
+ } | {
174
+ readonly type: "group_complete";
175
+ readonly groupId: string;
176
+ } | {
177
+ readonly type: "all" | "any";
178
+ readonly conditions: ReadonlyArray<RewardUnlockCondition>;
179
+ };
165
180
  type RewardStatus = "LOCKED" | "AVAILABLE" | "CONSUMED" | "EXPIRED";
166
181
  interface RewardItem<TLocale extends string = SupportedLocale> {
167
182
  readonly id: string;
@@ -170,9 +185,12 @@ interface RewardItem<TLocale extends string = SupportedLocale> {
170
185
  readonly type: RewardType;
171
186
  readonly redemptionMethod: RedemptionMethod;
172
187
  readonly requiredStampCount: number;
188
+ readonly conditions?: ReadonlyArray<RewardUnlockCondition>;
173
189
  readonly digitalContentUrl?: string;
174
190
  readonly staffPasscode?: string;
175
191
  readonly validUntil?: string;
192
+ readonly stockLimit?: number;
193
+ readonly userClaimLimit?: number;
176
194
  readonly maxStock?: number;
177
195
  readonly limitPerUser?: number;
178
196
  readonly claimTicketNumber?: string;
@@ -210,7 +228,7 @@ declare function resolveLocalizedText<TLocale extends string = SupportedLocale>(
210
228
  declare function toLocalizedString(text: LocalizedText | undefined): LocalizedString;
211
229
  declare function toLocalizedString<TLocale extends string>(text: LocalizedText<TLocale> | undefined): LocalizedString<TLocale>;
212
230
 
213
- declare function migrateRallyConfig(raw: unknown): RallyConfig;
231
+ declare function migrateRallyConfig<TLocale extends string = SupportedLocale>(raw: unknown): RallyConfig<TLocale>;
214
232
 
215
233
  type PublicRewardItem<TLocale extends string = string> = Omit<RewardItem<TLocale>, "staffPasscode">;
216
234
  type PublicRallyConfig<TLocale extends string = string, TMeta extends Record<string, unknown> = Record<string, unknown>> = Omit<RallyConfig<TLocale, TMeta>, "rewards"> & {
@@ -404,6 +422,22 @@ declare class IndexedDBAdapter implements StampStorage {
404
422
  }
405
423
 
406
424
  type StampRallyListener = (state: StampRallyState) => void;
425
+ type StampRallyClientEvent = {
426
+ readonly type: "checkIn";
427
+ readonly stampId: string;
428
+ readonly state: StampRallyState;
429
+ } | {
430
+ readonly type: "rewardClaimed";
431
+ readonly rewardId: string;
432
+ readonly state: StampRallyState;
433
+ } | {
434
+ readonly type: "syncCompleted";
435
+ readonly state: StampRallyState;
436
+ } | {
437
+ readonly type: "error";
438
+ readonly error: unknown;
439
+ };
440
+ type StampRallyEventListener = (event: StampRallyClientEvent) => void;
407
441
  type Clock = () => string;
408
442
  declare class StampRallyClient {
409
443
  #private;
@@ -411,6 +445,13 @@ declare class StampRallyClient {
411
445
  getState(): StampRallyState | null;
412
446
  getConfig(): RallyConfig;
413
447
  subscribe(listener: StampRallyListener): () => void;
448
+ subscribe(listener: StampRallyEventListener, options: {
449
+ readonly events: true;
450
+ }): () => void;
451
+ subscribeEvents(listener: StampRallyEventListener): () => void;
452
+ updateConfig(newConfig: PublicRallyConfig): Promise<StampRallyState>;
453
+ notifyRewardClaimed(rewardId: string, state?: StampRallyState | null): void;
454
+ notifySyncCompleted(state?: StampRallyState | null): void;
414
455
  init(): Promise<StampRallyState>;
415
456
  initialize(): Promise<StampRallyState>;
416
457
  acquire(stampId: string, context: VerificationContext, now?: string): Promise<Result<ProcessStampValue, StampError>>;
@@ -418,6 +459,32 @@ declare class StampRallyClient {
418
459
  restore(state: StampRallyState): Promise<StampRallyState>;
419
460
  }
420
461
 
462
+ type SecureTokenSecretKey = string | Uint8Array;
463
+ interface SecureTokenOptions {
464
+ readonly encrypt?: boolean;
465
+ readonly expiresInSeconds?: number;
466
+ }
467
+ interface SecureTokenPayload {
468
+ readonly [key: string]: unknown;
469
+ readonly exp?: number;
470
+ }
471
+ type SecureTokenErrorCode = "MALFORMED" | "INVALID_SIGNATURE" | "DECRYPTION_FAILED" | "INVALID_PAYLOAD" | "EXPIRED";
472
+ interface SecureTokenError {
473
+ readonly code: SecureTokenErrorCode;
474
+ readonly message: string;
475
+ }
476
+ type SecureTokenVerification<T extends SecureTokenPayload = SecureTokenPayload> = {
477
+ readonly ok: true;
478
+ readonly valid: true;
479
+ readonly payload: T;
480
+ } | {
481
+ readonly ok: false;
482
+ readonly valid: false;
483
+ readonly error: SecureTokenError;
484
+ };
485
+ declare function createSecureToken<T extends SecureTokenPayload>(payload: T, secretKey: SecureTokenSecretKey, options?: SecureTokenOptions): Promise<string>;
486
+ declare function verifySecureToken<T extends SecureTokenPayload = SecureTokenPayload>(token: string, secretKey: SecureTokenSecretKey, now?: number): Promise<SecureTokenVerification<T>>;
487
+
421
488
  type DetectorKind = "geolocation" | "nfc" | "qr";
422
489
  type DetectorErrorCode = "UNSUPPORTED" | "PERMISSION_DENIED" | "POSITION_UNAVAILABLE" | "TIMEOUT" | "ABORTED" | "READ_FAILED" | "INVALID_DATA" | "NO_TOKEN";
423
490
  interface DetectorError {
@@ -493,4 +560,4 @@ type SnapshotTokenVerification<T extends SnapshotTokenPayload = SnapshotTokenPay
493
560
  declare function createSignedSnapshotToken<T extends SnapshotTokenPayload>(payload: T, secretKey: SnapshotSecretKey): Promise<string>;
494
561
  declare function verifySnapshotToken<T extends SnapshotTokenPayload = SnapshotTokenPayload>(token: string, secretKey: SnapshotSecretKey, now?: number): Promise<SnapshotTokenVerification<T>>;
495
562
 
496
- export { CURRENT_RALLY_CONFIG_VERSION, type CheckInContext, type CheckInErrorCode, type CheckInInput, type CheckInResult$1 as CheckInResult, type ClaimTicketOptions, type Clock, type CompositeConditionFailure, type ConditionMatch, type ConditionMismatch, type ConsumeResult, type ConsumeRewardParams, DEFAULT_SHEET_THEME, type DetectorError, type DetectorErrorCode, type DetectorKind, type DetectorResult, type FontFamily, type GeoDetectorOptions, type GeoVerificationContext, InMemoryStorage, IndexedDBAdapter, type IndexedDBAdapterOptions, LocalStorageAdapter, type LocalStorageAdapterOptions, type LocalStorageFailureMode, type LocalizedString, type LocalizedText, type NfcDetectorOptions, type PasscodeCondition, type ProcessStampValue, type PublicRallyConfig, type PublicRewardItem, type QrDetectorOptions, type RallyConfig, type RallyConfigValidationResult, type RallySnapshot, type RedemptionMethod, type Result, type RewardConsumeError, type RewardItem, type RewardState, type RewardStatus, type RewardType, type SheetTheme, type SlotShape, type SnapshotSecretKey, type SnapshotTokenError, type SnapshotTokenErrorCode, type SnapshotTokenPayload, type SnapshotTokenVerification, type SpotItem, type StampCondition, type StampDefinition, type StampError, StampRallyClient, type StampRallyEvent, type StampRallyListener, type StampRallyProgress, type StampRallyState, type StampRecord, type StampStorage, StorageAdapterError, type StorageAdapterErrorCode, type StorageLike, type StorageOperation, type StorageWarningHandler, type SupportedLocale, THEME_PRESETS, type ThemePreset, type ThemePresetId, type TokenVerificationContext, type ValidationError, type VerificationContext, calculateDistanceMeters, calculateProgress, consumeReward, createClaimTicketNumber, createSignedSnapshotToken, createUniqueClaimTicketNumber, evaluateCheckIn, evaluateCondition, evaluateConditionDetailed, exportProgressToken, getCurrentGeoContext, importProgressToken, isGeolocationSupported, isNfcSupported, isQrSupported, isRewardState, isStampRallyState, issueClaimTicketNumber, migrateRallyConfig, normalizePasscode, processStamp, readNfcContext, readQrContext, reconcileRewardStates, resolveLocalizedText, stripSensitiveConfig, toLocalizedString, validateRallyConfig, verifyPasscode, verifySnapshotToken };
563
+ export { CURRENT_RALLY_CONFIG_VERSION, type CheckInContext, type CheckInErrorCode, type CheckInInput, type CheckInResult$1 as CheckInResult, type ClaimTicketOptions, type Clock, type CompositeConditionFailure, type ConditionMatch, type ConditionMismatch, type ConsumeResult, type ConsumeRewardParams, DEFAULT_SHEET_THEME, type DetectorError, type DetectorErrorCode, type DetectorKind, type DetectorResult, type FontFamily, type GeoDetectorOptions, type GeoVerificationContext, InMemoryStorage, IndexedDBAdapter, type IndexedDBAdapterOptions, LocalStorageAdapter, type LocalStorageAdapterOptions, type LocalStorageFailureMode, type LocaleDictionary, type LocalizedString, type LocalizedText, type NfcDetectorOptions, type PasscodeCondition, type ProcessStampValue, type PublicRallyConfig, type PublicRewardItem, type QrDetectorOptions, type RallyConfig, type RallyConfigValidationResult, type RallySnapshot, type RedemptionMethod, type Result, type RewardConsumeError, type RewardItem, 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 StampCondition, type StampDefinition, type StampError, StampRallyClient, type StampRallyClientEvent, type StampRallyEvent, type StampRallyEventListener, type StampRallyListener, type StampRallyProgress, type StampRallyState, type StampRecord, type StampStorage, StorageAdapterError, type StorageAdapterErrorCode, type StorageLike, type StorageOperation, type StorageWarningHandler, type SupportedLocale, THEME_PRESETS, type ThemePreset, type ThemePresetId, type TokenVerificationContext, type ValidationError, type VerificationContext, calculateDistanceMeters, calculateProgress, consumeReward, createClaimTicketNumber, createSecureToken, createSignedSnapshotToken, createUniqueClaimTicketNumber, evaluateCheckIn, evaluateCondition, evaluateConditionDetailed, exportProgressToken, getCurrentGeoContext, importProgressToken, isGeolocationSupported, isNfcSupported, isQrSupported, isRewardState, isStampRallyState, issueClaimTicketNumber, migrateRallyConfig, normalizePasscode, processStamp, readNfcContext, readQrContext, reconcileRewardStates, resolveLocalizedText, stripSensitiveConfig, toLocalizedString, validateRallyConfig, verifyPasscode, verifySecureToken, verifySnapshotToken };