@checkcourt/sdk 0.8.0 → 0.9.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 CHANGED
@@ -292,6 +292,19 @@ frame.navigate("/booking?date=2026-10-07");
292
292
 
293
293
  Import the browser entry point `@checkcourt/sdk/iframe` only; it needs no secrets.
294
294
 
295
+ The frame starts at 240 pixels, a `nav.page` frame fills the page. Set `height` on the
296
+ manifest entry (whole pixels, `IFRAME_EXTENSION_HEIGHT_MIN` to `IFRAME_EXTENSION_HEIGHT_MAX`,
297
+ 120 to 2000) to start at another height; `height` is for iframe extensions only.
298
+ Resize messages from `connectExtensionFrame` replace either value:
299
+
300
+ ```ts
301
+ { point: "nav.page", kind: "iframe", url: "https://app.example.de/page", label: "Homepage", icon: "calendar", height: 900 }
302
+ ```
303
+
304
+ Every app has a signing secret (`whsec_…`) from the moment it is created, with or without a
305
+ webhook URL. Verify the context token with it in your backend; you can show it once and
306
+ rotate it in the developer portal (your app → *Webhooks* → *Signatur-Secret*).
307
+
295
308
  ## Entry points
296
309
 
297
310
  | Import | Runs in | Contents |
@@ -83,18 +83,31 @@ export declare const STATIC_ACTION_POINTS: readonly ["booking_plan.action", "sid
83
83
  export type StaticActionPoint = (typeof STATIC_ACTION_POINTS)[number];
84
84
  /** Longest `label` of a static action. */
85
85
  export declare const STATIC_ACTION_LABEL_MAX = 24;
86
+ /** Bounds of an iframe extension's initial `height` in pixels. */
87
+ export declare const IFRAME_EXTENSION_HEIGHT_MIN = 120;
88
+ export declare const IFRAME_EXTENSION_HEIGHT_MAX = 2000;
86
89
  /** lucide icon names a static action or `nav.page` may use as `icon`. */
87
90
  export declare const APP_ACTION_ICONS: readonly ["bell", "calendar", "calendar-check", "camera", "chart-column", "circle-help", "clipboard-list", "clock", "cloud-rain", "door-open", "file-text", "flag", "heart-pulse", "info", "key-round", "lightbulb", "link", "list-checks", "lock-open", "map-pin", "megaphone", "message-square", "receipt", "send", "sparkles", "star", "sun", "thermometer", "ticket", "triangle-alert", "trophy", "user-round", "users", "wallet", "wrench"];
88
91
  export type AppActionIcon = (typeof APP_ACTION_ICONS)[number];
89
92
  /** Every scope an app may request. Role, app, webhook, key, billing and AVV management are reserved for people. */
90
93
  export declare const GRANTABLE_SCOPES: readonly ["courts:read", "courts:read_confidential", "courts:write", "bookings:read", "bookings:read_confidential", "bookings:write", "bookings:cancel", "bookings:edit", "bookings:export", "members:read", "members:read_confidential", "members:invite", "members:write", "members:delete", "teams:read", "teams:write", "policies:read", "policies:read_confidential", "policies:write", "categories:read", "categories:write", "invites:read", "invites:write", "settings:read", "settings:read_confidential", "settings:write", "guest_fees:read", "guest_fees:write", "audit:read", "announcements:read", "announcements:write", "events:read", "events:write", "posts:read", "posts:write", "posts:moderate", "court_layout:read", "court_layout:write", "work_hours:read", "work_hours:write", "work_hours:manage", "compliance:read", "kiosk:manage", "trainer_blocks:write", "analytics:read", "embeds:manage", "webhooks:read", "notifications:send"];
91
94
  export type GrantableScope = (typeof GRANTABLE_SCOPES)[number];
95
+ type KindOf<K extends ExtensionKind> = K extends "iframe" ? {
96
+ kind: K;
97
+ /**
98
+ * Initial frame height in whole pixels, `IFRAME_EXTENSION_HEIGHT_MIN` to `IFRAME_EXTENSION_HEIGHT_MAX`.
99
+ * Without it the frame starts at 240 pixels, a `nav.page` fills the page. Resize messages override it.
100
+ */
101
+ height?: number;
102
+ } : {
103
+ kind: K;
104
+ height?: never;
105
+ };
92
106
  type ExtensionOf<P extends ExtensionPoint> = {
93
107
  point: P;
94
- kind: (typeof EXTENSION_POINTS)[P]["kinds"][number];
95
108
  /** https; http://localhost is accepted outside production. */
96
109
  url: string;
97
- } & (P extends StaticActionPoint ? {
110
+ } & KindOf<(typeof EXTENSION_POINTS)[P]["kinds"][number]> & (P extends StaticActionPoint ? {
98
111
  /** Button text, 1 to 24 characters (`STATIC_ACTION_LABEL_MAX`). */
99
112
  label: string;
100
113
  icon?: AppActionIcon;
@@ -113,7 +126,7 @@ type ExtensionOf<P extends ExtensionPoint> = {
113
126
  icon?: never;
114
127
  });
115
128
  /**
116
- * One entry of `extensions`; `kind`, `label` and `icon` are checked per point at compile time.
129
+ * One entry of `extensions`; `kind`, `label`, `icon` and `height` are checked per point at compile time.
117
130
  * Every point may appear once, except `booking.action`; an app has at most one `nav.page`.
118
131
  */
119
132
  export type ManifestExtension = {
package/dist/manifest.js CHANGED
@@ -38,6 +38,9 @@ export const EXTENSION_POINT_SCOPE = {
38
38
  export const STATIC_ACTION_POINTS = ["booking_plan.action", "sidebar.action"];
39
39
  /** Longest `label` of a static action. */
40
40
  export const STATIC_ACTION_LABEL_MAX = 24;
41
+ /** Bounds of an iframe extension's initial `height` in pixels. */
42
+ export const IFRAME_EXTENSION_HEIGHT_MIN = 120;
43
+ export const IFRAME_EXTENSION_HEIGHT_MAX = 2000;
41
44
  /** lucide icon names a static action or `nav.page` may use as `icon`. */
42
45
  export const APP_ACTION_ICONS = [
43
46
  "bell",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checkcourt/sdk",
3
- "version": "0.8.0",
3
+ "version": "0.9.0",
4
4
  "description": "Official TypeScript SDK for the CheckCourt app platform",
5
5
  "private": false,
6
6
  "license": "MIT",