Hằng số và phiên bản
| Export | Value / meaning |
|---|---|
PERMISSIONS | every permission name |
PERMISSION_GROUPS | permissions grouped for display |
EARN_POINTS_ACTIONS | the four accepted earnPoints actions |
EARN_POINTS_METADATA_LIMITS | { maxKeys: 20, maxStringLength: 512 } |
STORAGE_LIMITS | { maxKeys: 100, maxValueBytes: 4096, maxTotalBytes: 512000, maxKeyLength: 256 } |
ALLOWED_ROUTES | routes navigate accepts |
SDK_CALL_TIMEOUT | 30000 ms |
SCAN_QR_TIMEOUT | 600000 ms |
SCAN_QR_TITLE_MAX_LENGTH | 60 |
READY_TIMEOUT | 15000 ms before the host gives up on the loading overlay |
SDK_VERSION | '2.0.0', the bridge version (not this package's) |
ACTIONS | every bridge member this SDK types |
SDK_ERROR_CODES | every error code |
Every type is exported too: CatholicMiniAppSDK, MiniAppUserInfo, MiniAppPermission,
SDKErrorCode, SDKEventMap, ICatholicQr, and the rest.
Not included: the bridge also has getAuthToken and getLocation, which are reserved for
i-Catholic's own first-party apps and refused to every other mini app. It also has getQuests and
getQuestProgress, which no app version answers yet (UNKNOWN_ACTION).
Versioning and module format
- This package follows semver.
1.0.0is the first published contract. The package version is independent of the bridge'sSDK_VERSION('2.0.0'). - ESM only, with no CommonJS build. Works with bundlers (Vite, webpack, esbuild) and with TypeScript's
bundler,node16andnodenextmodule resolution, for both entries. - Ships its TypeScript sources and declaration files. No runtime dependencies.
sideEffects: false.