The Coline App SDK: apps, tools, file types and surfaces that run inside Coline workspaces, and public websites with Coline Sites. TypeScript, with an in-memory test workspace. MIT.
| * envelope with `kind: "trigger.schedule"`. Dispatched by the platform's |
| 6 | * minute drain with an APP principal — no user is present; capability |
| 7 | * calls run app-scoped (install storage, indexing, notifications, net), |
| 8 | * and user-ACL-dependent operations fail closed. |
| 9 | */ |
| 10 |
| 11 | export const TRIGGER_SCHEDULE_KIND = "trigger.schedule" as const; |
| 12 |
| 13 | export const triggerSchedulePayloadSchema = z.strictObject({ |
| 14 | scheduleId: z.string().min(1).max(120), |
| 15 | /** The minute this run fired for, ISO, floored. */ |
| 16 | firedAt: z.iso.datetime(), |
| 17 | capabilities: z.strictObject({ |
| 18 | url: z.url().max(2000), |
| 19 | token: z.string().min(16).max(4096), |
| 20 | }), |
| 21 | }); |
| 22 | export type TriggerSchedulePayload = z.infer<typeof triggerSchedulePayloadSchema>; |
| 23 |
| 24 | export const triggerScheduleResponseSchema = z.union([ |
| 25 | z.strictObject({ result: z.strictObject({ ok: z.literal(true) }) }), |
| 26 | z.strictObject({ |
| 27 | error: z.strictObject({ |
| 28 | code: z.string().min(1).max(120), |
| 29 | message: z.string().min(1).max(2000), |
| 30 | }), |
| 31 | }), |
| 32 | ]); |
| 33 | export type TriggerScheduleResponse = z.infer<typeof triggerScheduleResponseSchema>; |
| 34 |