Chuyển tới nội dung chính

SDK 1.0.0

Hằng số và phiên bản

ExportValue / meaning
PERMISSIONSevery permission name
PERMISSION_GROUPSpermissions grouped for display
EARN_POINTS_ACTIONSthe four accepted earnPoints actions
EARN_POINTS_METADATA_LIMITS{ maxKeys: 20, maxStringLength: 512 }
STORAGE_LIMITS{ maxKeys: 100, maxValueBytes: 4096, maxTotalBytes: 512000, maxKeyLength: 256 }
ALLOWED_ROUTESroutes navigate accepts
SDK_CALL_TIMEOUT30000 ms
SCAN_QR_TIMEOUT600000 ms
SCAN_QR_TITLE_MAX_LENGTH60
READY_TIMEOUT15000 ms before the host gives up on the loading overlay
SDK_VERSION'2.0.0', the bridge version (not this package's)
ACTIONSevery bridge member this SDK types
SDK_ERROR_CODESevery 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.0 is the first published contract. The package version is independent of the bridge's SDK_VERSION ('2.0.0').
  • ESM only, with no CommonJS build. Works with bundlers (Vite, webpack, esbuild) and with TypeScript's bundler, node16 and nodenext module resolution, for both entries.
  • Ships its TypeScript sources and declaration files. No runtime dependencies. sideEffects: false.