calcomblock/schemas/calcom-booking.schema.json
Alex Dunmow 18b7825592 Extract calcomblock into a standalone wasm plugin repo
Convert the bundled backend/internal/plugins/calcomblock package into a
standalone reactor-mode wasm plugin, dropping every git.dev.alexdunmow.com/block/cms
import (forbidden in standalone plugins):

- package calcomblock -> package main; add wasip1 main.go with
  wasmguest.Serve(Registration). go.mod module
  git.dev.alexdunmow.com/block/calcomblock, block/core v0.18.2, no replace
  directives.
- Settings persistence: replace the pool-backed poolQuerier (direct SQL against
  the public-schema `settings` table, which a sandboxed plugin role cannot read)
  with capabilityQuerier over the SDK settings.Settings / settings.Updater
  capabilities. GetSiteTimezone now resolves via GetSiteSettings host-side.
- Vendor the small CMS-internal helpers the plugin used into internal/helpers
  (GetRealIP, StartCleanupLoop, MaskSecret, GetStringOr, the PluginSettingsQuerier
  settings helpers, PluginCrypto for tests) and internal/db (minimal Setting /
  UpsertSettingParams), each with a provenance header.
- Inline the captcha widget: vendor blocks.CaptchaWidget as a local
  CaptchaWidget templ (captcha_widget.templ) and regenerate templ; drop the
  block/cms/blocks import from booking.templ.
- blockConfig (server-authoritative captcha requirement via a
  page_block_snapshots scan) has no wasm-ABI capability, so it is left nil:
  honeypot + per-IP rate limit still apply. Documented as a follow-up.
- web: @block-ninja/ui workspace:* -> ^0.1.0 registry version; eslint.config.js
  repointed at ../../../cms/web/eslint.config.js; rebuild web/dist.
- Rewrite CLAUDE.md for the standalone wasm reality; add .gitignore.

Full test suite preserved and passing; builds to calcomblock-2.0.0.bnp;
check-safety passes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-05 03:04:18 +08:00

57 lines
1.6 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"title": "Cal.com Booking",
"description": "Embeddable booking calendar powered by Cal.com",
"properties": {
"username": {
"type": "string",
"title": "Cal.com Username",
"description": "Your Cal.com username (e.g., 'johndoe')",
"x-editor": "text"
},
"eventTypeSlug": {
"type": "string",
"title": "Event Type",
"description": "The event type slug (e.g., '30min', 'consultation')",
"x-editor": "text"
},
"title": {
"type": "string",
"title": "Widget Title",
"description": "Title shown above the booking widget",
"x-editor": "text"
},
"description": {
"type": "string",
"title": "Description",
"description": "Optional description text",
"x-editor": "textarea"
},
"weeksToShow": {
"type": "integer",
"title": "Weeks to Display",
"description": "Number of weeks to show in the calendar",
"default": 2,
"minimum": 1,
"maximum": 8,
"x-editor": "number"
},
"showTimezone": {
"type": "boolean",
"title": "Show Timezone",
"description": "Allow visitors to select their timezone",
"default": true,
"x-editor": "checkbox"
},
"captchaEnabled": {
"type": "boolean",
"title": "Enable captcha",
"description": "Require visitors to solve a privacy-friendly proof-of-work captcha before booking (spam protection)",
"default": false,
"x-editor": "checkbox"
}
},
"required": ["eventTypeSlug"]
}