@volvel/docs 0.6.0 → 0.7.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/THIRD_PARTY_NOTICES.md +21 -3
- package/assets/screenshots/administer/access-changes.dark.5bf247ce0f19.png +0 -0
- package/assets/screenshots/administer/access-changes.light.ed91948531ce.png +0 -0
- package/assets/screenshots/administer/access-end-users.dark.4d9a5acba896.png +0 -0
- package/assets/screenshots/administer/access-end-users.light.cef020771af1.png +0 -0
- package/assets/screenshots/administer/access-groups.dark.aaf84e089c11.png +0 -0
- package/assets/screenshots/administer/sso-audit-filters.dark.9aa82a2ac9c5.png +0 -0
- package/assets/screenshots/administer/sso-audit-filters.light.5ecfdb651ace.png +0 -0
- package/assets/screenshots/administer/{sso-branding-theme.dark.80bc3ce901a4.png → sso-branding-theme.dark.9a2c0482b3c2.png} +0 -0
- package/assets/screenshots/administer/{sso-branding-theme.light.f48bd968481c.png → sso-branding-theme.light.7be432359625.png} +0 -0
- package/assets/screenshots/administer/{sso-provider-setup.dark.8834ae797a50.png → sso-provider-setup.dark.bc7d126f135d.png} +0 -0
- package/assets/screenshots/administer/sso-provider-setup.light.0cbda9279747.png +0 -0
- package/assets/screenshots/administer/sso-workers-pools.dark.43f043620615.png +0 -0
- package/assets/screenshots/administer/sso-workers-pools.light.25b0e09b2ff0.png +0 -0
- package/assets/screenshots/console/account-sessions.dark.05dbf87d40a9.png +0 -0
- package/assets/screenshots/console/account-sessions.light.2ef44c907ee5.png +0 -0
- package/{dist/assets/screenshots/console/app-builder-list.dark.48340ac81e11.png → assets/screenshots/console/app-builder-list.dark.124cca05b904.png} +0 -0
- package/{dist/assets/screenshots/console/app-builder-list.light.85064d6742d4.png → assets/screenshots/console/app-builder-list.light.082ae0464cbe.png} +0 -0
- package/{dist/assets/screenshots/console/apps-list.dark.6580be4c6f17.png → assets/screenshots/console/apps-list.dark.b24bb8a4fe8f.png} +0 -0
- package/{dist/assets/screenshots/console/apps-list.light.35ac9711c9a0.png → assets/screenshots/console/apps-list.light.fa8996fe55ff.png} +0 -0
- package/assets/screenshots/console/{apps-share.dark.cf87c470cec4.png → apps-share.dark.0bb1a7899419.png} +0 -0
- package/{dist/assets/screenshots/console/apps-share.light.eddc9c058c37.png → assets/screenshots/console/apps-share.light.f26f075b3680.png} +0 -0
- package/assets/screenshots/console/{basics-workspace-overview.dark.75d4329d6bd9.png → basics-workspace-overview.dark.678c40fa9f2a.png} +0 -0
- package/assets/screenshots/console/{basics-workspace-overview.light.0a097241dfcb.png → basics-workspace-overview.light.86f7922860c9.png} +0 -0
- package/assets/screenshots/console/configure-alerts-default.dark.8a2c534aa415.png +0 -0
- package/{dist/assets/screenshots/console/configure-alerts.dark.3e4b58238bd2.png → assets/screenshots/console/configure-alerts.dark.314fe8d7e0c6.png} +0 -0
- package/{dist/assets/screenshots/console/configure-alerts.light.24608f63f849.png → assets/screenshots/console/configure-alerts.light.ff5022a76eca.png} +0 -0
- package/assets/screenshots/console/{configure-connection-sheet.dark.a8ae26d592fb.png → configure-connection-sheet.dark.41ba4383632c.png} +0 -0
- package/assets/screenshots/console/configure-connections.dark.52147265a170.png +0 -0
- package/assets/screenshots/console/{configure-connections.light.c3c1ec8eca52.png → configure-connections.light.8b15826634f1.png} +0 -0
- package/{dist/assets/screenshots/console/dashboard-resource.dark.532f219609cc.png → assets/screenshots/console/dashboard-resource.dark.4188f2810be1.png} +0 -0
- package/assets/screenshots/console/dashboard-resource.light.8211fe9f380e.png +0 -0
- package/{dist/assets/screenshots/console/dashboards-list.light.bb704dd75a30.png → assets/screenshots/console/dashboards-list.light.438e3d23c888.png} +0 -0
- package/assets/screenshots/console/extensions-editor.dark.4e5246f282e2.png +0 -0
- package/{dist/assets/screenshots/console/extensions-list.light.f65bb930d029.png → assets/screenshots/console/extensions-list.light.a1703d257ceb.png} +0 -0
- package/assets/screenshots/console/flow-editor.dark.00229a94001e.png +0 -0
- package/assets/screenshots/console/flow-editor.light.5eb68a339e84.png +0 -0
- package/assets/screenshots/console/operate-approvals.light.1501cede2f94.png +0 -0
- package/assets/screenshots/console/operate-cancel-by-age.dark.419042b822db.png +0 -0
- package/assets/screenshots/console/operate-cancel-by-age.light.7d48915e9922.png +0 -0
- package/assets/screenshots/console/operate-events.dark.2589975f7f46.png +0 -0
- package/assets/screenshots/console/operate-events.light.c4d8d8ae8748.png +0 -0
- package/assets/screenshots/console/operate-run-failed.dark.09addb030b58.png +0 -0
- package/assets/screenshots/console/{operate-run-failed.light.482db87101aa.png → operate-run-failed.light.6163d2f9d3b3.png} +0 -0
- package/assets/screenshots/console/operate-runs.dark.3bf1250f1f59.png +0 -0
- package/assets/screenshots/console/{operate-runs.light.bccafcd93196.png → operate-runs.light.235f6baf6f3d.png} +0 -0
- package/assets/screenshots/console/page-editor.light.3ec1f9d43475.png +0 -0
- package/assets/screenshots/console/queries-editor.dark.ee99f9050a23.png +0 -0
- package/assets/screenshots/console/queries-editor.light.67bd22086115.png +0 -0
- package/assets/screenshots/console/queries-parameters.light.c471d505bbd1.png +0 -0
- package/assets/screenshots/console/{releases-review.dark.34ec540432dc.png → releases-review.dark.091d815aa9c9.png} +0 -0
- package/{dist/assets/screenshots/console/releases-review.light.7f7eea72fc90.png → assets/screenshots/console/releases-review.light.a440c30d08b2.png} +0 -0
- package/{dist/assets/screenshots/console/script-settings-tab.dark.976df3a2aaf0.png → assets/screenshots/console/script-settings-tab.dark.5e96eedd9889.png} +0 -0
- package/assets/screenshots/console/{scripts-test-pane.dark.6112678956ed.png → scripts-test-pane.dark.63dcff509936.png} +0 -0
- package/assets/screenshots/console/{scripts-test-pane.light.2e1b637a8c7a.png → scripts-test-pane.light.bcef48f905b0.png} +0 -0
- package/assets/screenshots/console/table-definition.light.b97883e1b6e0.png +0 -0
- package/assets/screenshots/console/table-help.dark.da3a47215e6b.png +0 -0
- package/assets/screenshots/console/table-help.light.07c67e63ef2e.png +0 -0
- package/assets/screenshots/console/table-rows-filtered.dark.c61524c872a5.png +0 -0
- package/assets/screenshots/console/table-rows-filtered.light.787e71f743dd.png +0 -0
- package/assets/screenshots/console/table-rows.dark.19e2afeb688e.png +0 -0
- package/assets/screenshots/console/table-rows.light.a9249d7b9bd5.png +0 -0
- package/assets/screenshots/console/tut-visit-mix.dark.f1dd71da8937.png +0 -0
- package/{dist/assets/screenshots/console/widgets-chart-scatter.light.e57e41675d8d.png → assets/screenshots/console/widgets-chart-scatter.light.85ea38faaed8.png} +0 -0
- package/assets/screenshots/console/widgets-phone-page.dark.360a39e459c7.png +0 -0
- package/{dist/assets/screenshots/console/workspace-settings.light.3ac3bbfd9f4e.png → assets/screenshots/console/workspace-settings.light.c56e7f5d80f8.png} +0 -0
- package/assets/screenshots/docs/draft-conflict.dark.597b616abec7.png +0 -0
- package/assets/screenshots/docs/draft-conflict.light.6d326a37e8bc.png +0 -0
- package/assets/screenshots/docs/page-details-type.dark.2e382c8f131e.png +0 -0
- package/assets/screenshots/index.json +94 -94
- package/assets/screenshots/self-host/extensions-component-kit.dark.ba673f636a8f.png +0 -0
- package/assets/screenshots/self-host/extensions-component-kit.light.282da6a4c589.png +0 -0
- package/assets/screenshots/self-host/instance-audit.dark.21de79247590.png +0 -0
- package/assets/screenshots/self-host/instance-audit.light.dba4eaa712ed.png +0 -0
- package/assets/screenshots/self-host/instance-branding.dark.0ddd4c2df652.png +0 -0
- package/assets/screenshots/self-host/instance-branding.light.c3b7ffef6d4e.png +0 -0
- package/assets/screenshots/self-host/instance-databases.dark.dd2403f84456.png +0 -0
- package/assets/screenshots/self-host/instance-databases.light.3248546636cf.png +0 -0
- package/assets/screenshots/self-host/instance-health.dark.5791805f72b7.png +0 -0
- package/assets/screenshots/self-host/instance-health.light.cbfad910fc8e.png +0 -0
- package/assets/screenshots/self-host/instance-import-check.dark.11ccf001d9f8.png +0 -0
- package/assets/screenshots/self-host/instance-import-check.light.efbbef163d80.png +0 -0
- package/assets/screenshots/self-host/instance-members.dark.d9fa55d364fd.png +0 -0
- package/assets/screenshots/self-host/instance-members.light.7af6bfa48914.png +0 -0
- package/assets/screenshots/self-host/instance-operators.dark.1326e9460224.png +0 -0
- package/assets/screenshots/self-host/instance-operators.light.3f2cac001fb5.png +0 -0
- package/assets/screenshots/self-host/instance-tenants.dark.ba860dc98c90.png +0 -0
- package/assets/screenshots/self-host/instance-tenants.light.6a63877c41b3.png +0 -0
- package/assets/screenshots/self-host/instance-triggers.dark.f2bba07895f2.png +0 -0
- package/assets/screenshots/self-host/instance-triggers.light.dddb827e214a.png +0 -0
- package/assets/screenshots/start/basics-finding-your-way.dark.5cc80a2d591f.png +0 -0
- package/assets/screenshots/start/basics-finding-your-way.light.dddf72e4ad38.png +0 -0
- package/assets/screenshots/start/tut-approve-step.dark.5b773354ba35.png +0 -0
- package/assets/screenshots/start/tut-approve-step.light.b0224c9b1133.png +0 -0
- package/assets/screenshots/start/visit-notes-filtered.dark.f6fb7a707e2f.png +0 -0
- package/assets/screenshots/start/visit-notes-filtered.light.a4b4d64a7fc2.png +0 -0
- package/content/administer/explanation/sso/how-single-sign-on-works.md +2 -0
- package/content/administer/how-to/access/invite-end-users.md +8 -0
- package/content/administer/how-to/access/rule-rows-by-group-or-attribute.md +7 -0
- package/content/administer/how-to/apps/give-an-app-a-hostname.md +1 -1
- package/content/administer/how-to/sso/provision-people-with-scim.md +1 -1
- package/content/administer/reference/screens/branding.md +1 -1
- package/content/administer/reference/screens/end-users.md +3 -1
- package/content/administer/reference/screens/overview.md +21 -0
- package/content/administer/reference/screens/retention.md +3 -2
- package/content/administer/reference/screens/single-sign-on.md +1 -1
- package/content/console/how-to/app-builder/publish-an-app.md +0 -1
- package/content/console/how-to/data/row-rules.md +1 -0
- package/content/console/reference/screens/build/published-apps.md +1 -2
- package/content/console/reference/screens/data/tables.md +1 -1
- package/content/console/reference/screens/home/tenants.md +1 -1
- package/content/develop/explanation/api/how-the-api-knows-who-is-calling.md +10 -3
- package/content/develop/explanation/apps/app-access.md +29 -10
- package/content/develop/explanation/scripts/how-scripts-run.md +1 -1
- package/content/develop/how-to/apps/write-an-app.md +1 -1
- package/content/develop/how-to/cli/install-from-source.md +1 -1
- package/content/develop/how-to/cli/install-the-cli.md +1 -1
- package/content/develop/how-to/cli/test-a-script.md +1 -1
- package/content/develop/how-to/configure/set-up-from-a-script.md +1 -1
- package/content/develop/reference/access/mcp.md +11 -1
- package/content/develop/reference/apps/app-client.md +10 -8
- package/content/develop/reference/apps/content-policy.md +8 -3
- package/content/develop/reference/queries/data-as-code.md +12 -0
- package/content/develop/reference/tenant-widgets/what-a-view-is-given.md +1 -1
- package/content/develop/tutorials/cli/quickstart.md +1 -1
- package/content/self-host/explanation/access/index.md +1 -0
- package/content/self-host/explanation/access/instance-service-accounts.md +66 -0
- package/content/self-host/explanation/access/who-runs-what.md +2 -0
- package/content/self-host/explanation/running/architecture.md +1 -1
- package/content/self-host/explanation/running/egress-and-offline.md +1 -1
- package/content/self-host/explanation/running/managed-workers-and-isolation.md +35 -8
- package/content/self-host/explanation/running/security-hardening.md +9 -8
- package/content/self-host/explanation/running/sizing-and-scaling.md +29 -0
- package/content/self-host/how-to/instance/moving-a-tenant.md +12 -0
- package/content/self-host/how-to/running/back-up-an-instance.md +1 -1
- package/content/self-host/how-to/running/build-the-image.md +1 -1
- package/content/self-host/how-to/running/install-on-fly.md +27 -10
- package/content/self-host/how-to/running/install-with-compose.md +4 -4
- package/content/self-host/how-to/running/monitor-an-instance.md +2 -0
- package/content/self-host/how-to/running/put-a-proxy-in-front.md +7 -8
- package/content/self-host/how-to/running/restore-an-instance.md +34 -5
- package/content/self-host/how-to/running/run-a-standalone-worker.md +2 -2
- package/content/self-host/how-to/running/set-up-mail.md +13 -6
- package/content/self-host/reference/console/health.md +21 -1
- package/content/self-host/reference/running/configuration.md +1 -1
- package/content/self-host/reference/running/requirements.md +9 -2
- package/content/self-host/reference/running/retention.md +2 -1
- package/content/self-host/reference/running/troubleshooting.md +6 -1
- package/content/self-host/reference/running/versions-and-support.md +9 -1
- package/content/self-host/tutorials/install-on-one-machine.md +1 -1
- package/content/start/how-to/example/set-up-the-fernhill-example.md +26 -3
- package/content/start/index.md +11 -1
- package/content/start/reference/accessibility.md +35 -0
- package/content/start/reference/index.md +1 -0
- package/content/start/tutorials/index.md +6 -1
- package/content/start/tutorials/your-first-script.md +0 -1
- package/content/start/tutorials/your-first-table.md +2 -2
- package/dist/assets/screenshots/administer/access-changes.dark.5bf247ce0f19.png +0 -0
- package/dist/assets/screenshots/administer/access-changes.light.ed91948531ce.png +0 -0
- package/dist/assets/screenshots/administer/access-end-users.dark.4d9a5acba896.png +0 -0
- package/dist/assets/screenshots/administer/access-end-users.light.cef020771af1.png +0 -0
- package/dist/assets/screenshots/administer/access-groups.dark.aaf84e089c11.png +0 -0
- package/dist/assets/screenshots/administer/sso-audit-filters.dark.9aa82a2ac9c5.png +0 -0
- package/dist/assets/screenshots/administer/sso-audit-filters.light.5ecfdb651ace.png +0 -0
- package/dist/assets/screenshots/administer/{sso-branding-theme.dark.80bc3ce901a4.png → sso-branding-theme.dark.9a2c0482b3c2.png} +0 -0
- package/dist/assets/screenshots/administer/{sso-branding-theme.light.f48bd968481c.png → sso-branding-theme.light.7be432359625.png} +0 -0
- package/dist/assets/screenshots/administer/{sso-provider-setup.dark.8834ae797a50.png → sso-provider-setup.dark.bc7d126f135d.png} +0 -0
- package/dist/assets/screenshots/administer/sso-provider-setup.light.0cbda9279747.png +0 -0
- package/dist/assets/screenshots/administer/sso-workers-pools.dark.43f043620615.png +0 -0
- package/dist/assets/screenshots/administer/sso-workers-pools.light.25b0e09b2ff0.png +0 -0
- package/dist/assets/screenshots/console/account-sessions.dark.05dbf87d40a9.png +0 -0
- package/dist/assets/screenshots/console/account-sessions.light.2ef44c907ee5.png +0 -0
- package/{assets/screenshots/console/app-builder-list.dark.48340ac81e11.png → dist/assets/screenshots/console/app-builder-list.dark.124cca05b904.png} +0 -0
- package/{assets/screenshots/console/app-builder-list.light.85064d6742d4.png → dist/assets/screenshots/console/app-builder-list.light.082ae0464cbe.png} +0 -0
- package/{assets/screenshots/console/apps-list.dark.6580be4c6f17.png → dist/assets/screenshots/console/apps-list.dark.b24bb8a4fe8f.png} +0 -0
- package/{assets/screenshots/console/apps-list.light.35ac9711c9a0.png → dist/assets/screenshots/console/apps-list.light.fa8996fe55ff.png} +0 -0
- package/dist/assets/screenshots/console/{apps-share.dark.cf87c470cec4.png → apps-share.dark.0bb1a7899419.png} +0 -0
- package/{assets/screenshots/console/apps-share.light.eddc9c058c37.png → dist/assets/screenshots/console/apps-share.light.f26f075b3680.png} +0 -0
- package/dist/assets/screenshots/console/{basics-workspace-overview.dark.75d4329d6bd9.png → basics-workspace-overview.dark.678c40fa9f2a.png} +0 -0
- package/dist/assets/screenshots/console/{basics-workspace-overview.light.0a097241dfcb.png → basics-workspace-overview.light.86f7922860c9.png} +0 -0
- package/dist/assets/screenshots/console/configure-alerts-default.dark.8a2c534aa415.png +0 -0
- package/{assets/screenshots/console/configure-alerts.dark.3e4b58238bd2.png → dist/assets/screenshots/console/configure-alerts.dark.314fe8d7e0c6.png} +0 -0
- package/{assets/screenshots/console/configure-alerts.light.24608f63f849.png → dist/assets/screenshots/console/configure-alerts.light.ff5022a76eca.png} +0 -0
- package/dist/assets/screenshots/console/{configure-connection-sheet.dark.a8ae26d592fb.png → configure-connection-sheet.dark.41ba4383632c.png} +0 -0
- package/dist/assets/screenshots/console/configure-connections.dark.52147265a170.png +0 -0
- package/dist/assets/screenshots/console/{configure-connections.light.c3c1ec8eca52.png → configure-connections.light.8b15826634f1.png} +0 -0
- package/{assets/screenshots/console/dashboard-resource.dark.532f219609cc.png → dist/assets/screenshots/console/dashboard-resource.dark.4188f2810be1.png} +0 -0
- package/dist/assets/screenshots/console/dashboard-resource.light.8211fe9f380e.png +0 -0
- package/{assets/screenshots/console/dashboards-list.light.bb704dd75a30.png → dist/assets/screenshots/console/dashboards-list.light.438e3d23c888.png} +0 -0
- package/dist/assets/screenshots/console/extensions-editor.dark.4e5246f282e2.png +0 -0
- package/{assets/screenshots/console/extensions-list.light.f65bb930d029.png → dist/assets/screenshots/console/extensions-list.light.a1703d257ceb.png} +0 -0
- package/dist/assets/screenshots/console/flow-editor.dark.00229a94001e.png +0 -0
- package/dist/assets/screenshots/console/flow-editor.light.5eb68a339e84.png +0 -0
- package/dist/assets/screenshots/console/operate-approvals.light.1501cede2f94.png +0 -0
- package/dist/assets/screenshots/console/operate-cancel-by-age.dark.419042b822db.png +0 -0
- package/dist/assets/screenshots/console/operate-cancel-by-age.light.7d48915e9922.png +0 -0
- package/dist/assets/screenshots/console/operate-events.dark.2589975f7f46.png +0 -0
- package/dist/assets/screenshots/console/operate-events.light.c4d8d8ae8748.png +0 -0
- package/dist/assets/screenshots/console/operate-run-failed.dark.09addb030b58.png +0 -0
- package/dist/assets/screenshots/console/{operate-run-failed.light.482db87101aa.png → operate-run-failed.light.6163d2f9d3b3.png} +0 -0
- package/dist/assets/screenshots/console/operate-runs.dark.3bf1250f1f59.png +0 -0
- package/dist/assets/screenshots/console/{operate-runs.light.bccafcd93196.png → operate-runs.light.235f6baf6f3d.png} +0 -0
- package/dist/assets/screenshots/console/page-editor.light.3ec1f9d43475.png +0 -0
- package/dist/assets/screenshots/console/queries-editor.dark.ee99f9050a23.png +0 -0
- package/dist/assets/screenshots/console/queries-editor.light.67bd22086115.png +0 -0
- package/dist/assets/screenshots/console/queries-parameters.light.c471d505bbd1.png +0 -0
- package/dist/assets/screenshots/console/{releases-review.dark.34ec540432dc.png → releases-review.dark.091d815aa9c9.png} +0 -0
- package/{assets/screenshots/console/releases-review.light.7f7eea72fc90.png → dist/assets/screenshots/console/releases-review.light.a440c30d08b2.png} +0 -0
- package/{assets/screenshots/console/script-settings-tab.dark.976df3a2aaf0.png → dist/assets/screenshots/console/script-settings-tab.dark.5e96eedd9889.png} +0 -0
- package/dist/assets/screenshots/console/{scripts-test-pane.dark.6112678956ed.png → scripts-test-pane.dark.63dcff509936.png} +0 -0
- package/dist/assets/screenshots/console/{scripts-test-pane.light.2e1b637a8c7a.png → scripts-test-pane.light.bcef48f905b0.png} +0 -0
- package/dist/assets/screenshots/console/table-definition.light.b97883e1b6e0.png +0 -0
- package/dist/assets/screenshots/console/table-help.dark.da3a47215e6b.png +0 -0
- package/dist/assets/screenshots/console/table-help.light.07c67e63ef2e.png +0 -0
- package/dist/assets/screenshots/console/table-rows-filtered.dark.c61524c872a5.png +0 -0
- package/dist/assets/screenshots/console/table-rows-filtered.light.787e71f743dd.png +0 -0
- package/dist/assets/screenshots/console/table-rows.dark.19e2afeb688e.png +0 -0
- package/dist/assets/screenshots/console/table-rows.light.a9249d7b9bd5.png +0 -0
- package/dist/assets/screenshots/console/tut-visit-mix.dark.f1dd71da8937.png +0 -0
- package/{assets/screenshots/console/widgets-chart-scatter.light.e57e41675d8d.png → dist/assets/screenshots/console/widgets-chart-scatter.light.85ea38faaed8.png} +0 -0
- package/dist/assets/screenshots/console/widgets-phone-page.dark.360a39e459c7.png +0 -0
- package/{assets/screenshots/console/workspace-settings.light.3ac3bbfd9f4e.png → dist/assets/screenshots/console/workspace-settings.light.c56e7f5d80f8.png} +0 -0
- package/dist/assets/screenshots/docs/draft-conflict.dark.597b616abec7.png +0 -0
- package/dist/assets/screenshots/docs/draft-conflict.light.6d326a37e8bc.png +0 -0
- package/dist/assets/screenshots/docs/page-details-type.dark.2e382c8f131e.png +0 -0
- package/dist/assets/screenshots/self-host/extensions-component-kit.dark.ba673f636a8f.png +0 -0
- package/dist/assets/screenshots/self-host/extensions-component-kit.light.282da6a4c589.png +0 -0
- package/dist/assets/screenshots/self-host/instance-audit.dark.21de79247590.png +0 -0
- package/dist/assets/screenshots/self-host/instance-audit.light.dba4eaa712ed.png +0 -0
- package/dist/assets/screenshots/self-host/instance-branding.dark.0ddd4c2df652.png +0 -0
- package/dist/assets/screenshots/self-host/instance-branding.light.c3b7ffef6d4e.png +0 -0
- package/dist/assets/screenshots/self-host/instance-databases.dark.dd2403f84456.png +0 -0
- package/dist/assets/screenshots/self-host/instance-databases.light.3248546636cf.png +0 -0
- package/dist/assets/screenshots/self-host/instance-health.dark.5791805f72b7.png +0 -0
- package/dist/assets/screenshots/self-host/instance-health.light.cbfad910fc8e.png +0 -0
- package/dist/assets/screenshots/self-host/instance-import-check.dark.11ccf001d9f8.png +0 -0
- package/dist/assets/screenshots/self-host/instance-import-check.light.efbbef163d80.png +0 -0
- package/dist/assets/screenshots/self-host/instance-members.dark.d9fa55d364fd.png +0 -0
- package/dist/assets/screenshots/self-host/instance-members.light.7af6bfa48914.png +0 -0
- package/dist/assets/screenshots/self-host/instance-operators.dark.1326e9460224.png +0 -0
- package/dist/assets/screenshots/self-host/instance-operators.light.3f2cac001fb5.png +0 -0
- package/dist/assets/screenshots/self-host/instance-tenants.dark.ba860dc98c90.png +0 -0
- package/dist/assets/screenshots/self-host/instance-tenants.light.6a63877c41b3.png +0 -0
- package/dist/assets/screenshots/self-host/instance-triggers.dark.f2bba07895f2.png +0 -0
- package/dist/assets/screenshots/self-host/instance-triggers.light.dddb827e214a.png +0 -0
- package/dist/assets/screenshots/start/basics-finding-your-way.dark.5cc80a2d591f.png +0 -0
- package/dist/assets/screenshots/start/basics-finding-your-way.light.dddf72e4ad38.png +0 -0
- package/dist/assets/screenshots/start/tut-approve-step.dark.5b773354ba35.png +0 -0
- package/dist/assets/screenshots/start/tut-approve-step.light.b0224c9b1133.png +0 -0
- package/dist/assets/screenshots/start/visit-notes-filtered.dark.f6fb7a707e2f.png +0 -0
- package/dist/assets/screenshots/start/visit-notes-filtered.light.a4b4d64a7fc2.png +0 -0
- package/dist/fields.json +1 -1
- package/dist/manifest.json +1 -1
- package/dist/md/administer/explanation/sso/how-single-sign-on-works.md +2 -0
- package/dist/md/administer/how-to/access/invite-end-users.md +8 -0
- package/dist/md/administer/how-to/access/rule-rows-by-group-or-attribute.md +7 -0
- package/dist/md/administer/how-to/apps/give-an-app-a-hostname.md +1 -1
- package/dist/md/administer/how-to/sso/provision-people-with-scim.md +1 -1
- package/dist/md/administer/reference/audit-actions.md +1 -0
- package/dist/md/administer/reference/permissions.md +1 -0
- package/dist/md/administer/reference/screens/branding.md +1 -1
- package/dist/md/administer/reference/screens/end-users.md +3 -1
- package/dist/md/administer/reference/screens/overview.md +21 -0
- package/dist/md/administer/reference/screens/retention.md +3 -2
- package/dist/md/administer/reference/screens/single-sign-on.md +1 -1
- package/dist/md/console/how-to/app-builder/publish-an-app.md +0 -1
- package/dist/md/console/how-to/data/row-rules.md +1 -0
- package/dist/md/console/reference/screens/build/published-apps.md +1 -2
- package/dist/md/console/reference/screens/data/tables.md +1 -1
- package/dist/md/console/reference/screens/home/tenants.md +1 -1
- package/dist/md/develop/explanation/api/how-the-api-knows-who-is-calling.md +10 -3
- package/dist/md/develop/explanation/apps/app-access.md +29 -10
- package/dist/md/develop/explanation/scripts/how-scripts-run.md +1 -1
- package/dist/md/develop/how-to/apps/write-an-app.md +1 -1
- package/dist/md/develop/how-to/cli/install-from-source.md +1 -1
- package/dist/md/develop/how-to/cli/install-the-cli.md +1 -1
- package/dist/md/develop/how-to/cli/test-a-script.md +1 -1
- package/dist/md/develop/how-to/configure/set-up-from-a-script.md +1 -1
- package/dist/md/develop/reference/access/mcp.md +11 -1
- package/dist/md/develop/reference/api/agents.md +27 -1
- package/dist/md/develop/reference/api/apps.md +25 -1
- package/dist/md/develop/reference/api/end-users.md +71 -6
- package/dist/md/develop/reference/api/figures.md +160 -0
- package/dist/md/develop/reference/api/identity.md +318 -1
- package/dist/md/develop/reference/api/index.md +7 -6
- package/dist/md/develop/reference/api/instance.md +59 -1
- package/dist/md/develop/reference/api/permissions.md +13 -4
- package/dist/md/develop/reference/api/tenancy.md +13 -0
- package/dist/md/develop/reference/apps/app-client.md +10 -8
- package/dist/md/develop/reference/apps/content-policy.md +8 -3
- package/dist/md/develop/reference/errors.md +6 -0
- package/dist/md/develop/reference/kinds/dashboard.md +10 -0
- package/dist/md/develop/reference/kinds/interface.md +10 -0
- package/dist/md/develop/reference/kinds/widget.md +1 -1
- package/dist/md/develop/reference/queries/data-as-code.md +12 -0
- package/dist/md/develop/reference/sdk/sdk.md +1 -1
- package/dist/md/develop/reference/sdk/widgets-page.md +13 -0
- package/dist/md/develop/reference/sdk/widgets.md +2 -2
- package/dist/md/develop/reference/tenant-widgets/what-a-view-is-given.md +1 -1
- package/dist/md/develop/reference/widgets/chart.md +1 -1
- package/dist/md/develop/reference/widgets/goal.md +1 -1
- package/dist/md/develop/reference/widgets/pivot.md +1 -1
- package/dist/md/develop/reference/widgets/stat.md +1 -1
- package/dist/md/develop/tutorials/cli/quickstart.md +1 -1
- package/dist/md/self-host/explanation/access/index.md +1 -0
- package/dist/md/self-host/explanation/access/instance-service-accounts.md +66 -0
- package/dist/md/self-host/explanation/access/who-runs-what.md +2 -0
- package/dist/md/self-host/explanation/running/architecture.md +1 -1
- package/dist/md/self-host/explanation/running/egress-and-offline.md +1 -1
- package/dist/md/self-host/explanation/running/managed-workers-and-isolation.md +35 -8
- package/dist/md/self-host/explanation/running/security-hardening.md +9 -8
- package/dist/md/self-host/explanation/running/sizing-and-scaling.md +29 -0
- package/dist/md/self-host/how-to/instance/moving-a-tenant.md +12 -0
- package/dist/md/self-host/how-to/running/back-up-an-instance.md +1 -1
- package/dist/md/self-host/how-to/running/build-the-image.md +1 -1
- package/dist/md/self-host/how-to/running/install-on-fly.md +27 -10
- package/dist/md/self-host/how-to/running/install-with-compose.md +4 -4
- package/dist/md/self-host/how-to/running/monitor-an-instance.md +2 -0
- package/dist/md/self-host/how-to/running/put-a-proxy-in-front.md +7 -8
- package/dist/md/self-host/how-to/running/restore-an-instance.md +34 -5
- package/dist/md/self-host/how-to/running/run-a-standalone-worker.md +2 -2
- package/dist/md/self-host/how-to/running/set-up-mail.md +13 -6
- package/dist/md/self-host/reference/console/health.md +21 -1
- package/dist/md/self-host/reference/running/configuration.md +1 -1
- package/dist/md/self-host/reference/running/requirements.md +9 -2
- package/dist/md/self-host/reference/running/retention.md +2 -1
- package/dist/md/self-host/reference/running/troubleshooting.md +6 -1
- package/dist/md/self-host/reference/running/versions-and-support.md +9 -1
- package/dist/md/self-host/reference/settings.md +2 -2
- package/dist/md/self-host/tutorials/install-on-one-machine.md +1 -1
- package/dist/md/start/how-to/example/set-up-the-fernhill-example.md +26 -3
- package/dist/md/start/index.md +11 -1
- package/dist/md/start/reference/accessibility.md +35 -0
- package/dist/md/start/reference/changelog/0-7-0.md +208 -0
- package/dist/md/start/reference/index.md +1 -0
- package/dist/md/start/tutorials/index.md +6 -1
- package/dist/md/start/tutorials/your-first-script.md +0 -1
- package/dist/md/start/tutorials/your-first-table.md +2 -2
- package/dist/pages/administer/explanation/sso/how-single-sign-on-works.json +1 -1
- package/dist/pages/administer/how-to/access/invite-end-users.json +1 -1
- package/dist/pages/administer/how-to/access/rule-rows-by-group-or-attribute.json +1 -1
- package/dist/pages/administer/how-to/apps/give-an-app-a-hostname.json +1 -1
- package/dist/pages/administer/how-to/sso/provision-people-with-scim.json +1 -1
- package/dist/pages/administer/reference/audit-actions.json +1 -1
- package/dist/pages/administer/reference/permissions.json +1 -1
- package/dist/pages/administer/reference/screens/branding.json +1 -1
- package/dist/pages/administer/reference/screens/end-users.json +1 -1
- package/dist/pages/administer/reference/screens/overview.json +1 -1
- package/dist/pages/administer/reference/screens/retention.json +1 -1
- package/dist/pages/administer/reference/screens/single-sign-on.json +1 -1
- package/dist/pages/console/how-to/app-builder/publish-an-app.json +1 -1
- package/dist/pages/console/how-to/data/row-rules.json +1 -1
- package/dist/pages/console/reference/screens/build/published-apps.json +1 -1
- package/dist/pages/console/reference/screens/data/tables.json +1 -1
- package/dist/pages/console/reference/screens/home/tenants.json +1 -1
- package/dist/pages/develop/explanation/api/how-the-api-knows-who-is-calling.json +1 -1
- package/dist/pages/develop/explanation/apps/app-access.json +1 -1
- package/dist/pages/develop/explanation/scripts/how-scripts-run.json +1 -1
- package/dist/pages/develop/how-to/apps/write-an-app.json +1 -1
- package/dist/pages/develop/how-to/cli/install-from-source.json +1 -1
- package/dist/pages/develop/how-to/cli/install-the-cli.json +1 -1
- package/dist/pages/develop/how-to/cli/test-a-script.json +1 -1
- package/dist/pages/develop/how-to/configure/set-up-from-a-script.json +1 -1
- package/dist/pages/develop/reference/access/mcp.json +1 -1
- package/dist/pages/develop/reference/api/agents.json +1 -1
- package/dist/pages/develop/reference/api/apps.json +1 -1
- package/dist/pages/develop/reference/api/end-users.json +1 -1
- package/dist/pages/develop/reference/api/figures.json +1 -0
- package/dist/pages/develop/reference/api/identity.json +1 -1
- package/dist/pages/develop/reference/api/index.json +1 -1
- package/dist/pages/develop/reference/api/instance.json +1 -1
- package/dist/pages/develop/reference/api/permissions.json +1 -1
- package/dist/pages/develop/reference/api/tenancy.json +1 -1
- package/dist/pages/develop/reference/apps/app-client.json +1 -1
- package/dist/pages/develop/reference/apps/content-policy.json +1 -1
- package/dist/pages/develop/reference/errors.json +1 -1
- package/dist/pages/develop/reference/kinds/dashboard.json +1 -1
- package/dist/pages/develop/reference/kinds/interface.json +1 -1
- package/dist/pages/develop/reference/kinds/widget.json +1 -1
- package/dist/pages/develop/reference/queries/data-as-code.json +1 -1
- package/dist/pages/develop/reference/sdk/sdk.json +1 -1
- package/dist/pages/develop/reference/sdk/widgets-page.json +1 -1
- package/dist/pages/develop/reference/sdk/widgets.json +1 -1
- package/dist/pages/develop/reference/tenant-widgets/what-a-view-is-given.json +1 -1
- package/dist/pages/develop/reference/widgets/chart.json +1 -1
- package/dist/pages/develop/reference/widgets/goal.json +1 -1
- package/dist/pages/develop/reference/widgets/pivot.json +1 -1
- package/dist/pages/develop/reference/widgets/stat.json +1 -1
- package/dist/pages/develop/tutorials/cli/quickstart.json +1 -1
- package/dist/pages/self-host/explanation/access/index.json +1 -1
- package/dist/pages/self-host/explanation/access/instance-service-accounts.json +1 -0
- package/dist/pages/self-host/explanation/access/who-runs-what.json +1 -1
- package/dist/pages/self-host/explanation/running/architecture.json +1 -1
- package/dist/pages/self-host/explanation/running/egress-and-offline.json +1 -1
- package/dist/pages/self-host/explanation/running/managed-workers-and-isolation.json +1 -1
- package/dist/pages/self-host/explanation/running/security-hardening.json +1 -1
- package/dist/pages/self-host/explanation/running/sizing-and-scaling.json +1 -1
- package/dist/pages/self-host/how-to/instance/moving-a-tenant.json +1 -1
- package/dist/pages/self-host/how-to/running/back-up-an-instance.json +1 -1
- package/dist/pages/self-host/how-to/running/build-the-image.json +1 -1
- package/dist/pages/self-host/how-to/running/install-on-fly.json +1 -1
- package/dist/pages/self-host/how-to/running/install-with-compose.json +1 -1
- package/dist/pages/self-host/how-to/running/monitor-an-instance.json +1 -1
- package/dist/pages/self-host/how-to/running/put-a-proxy-in-front.json +1 -1
- package/dist/pages/self-host/how-to/running/restore-an-instance.json +1 -1
- package/dist/pages/self-host/how-to/running/run-a-standalone-worker.json +1 -1
- package/dist/pages/self-host/how-to/running/set-up-mail.json +1 -1
- package/dist/pages/self-host/reference/console/health.json +1 -1
- package/dist/pages/self-host/reference/running/configuration.json +1 -1
- package/dist/pages/self-host/reference/running/requirements.json +1 -1
- package/dist/pages/self-host/reference/running/retention.json +1 -1
- package/dist/pages/self-host/reference/running/troubleshooting.json +1 -1
- package/dist/pages/self-host/reference/running/versions-and-support.json +1 -1
- package/dist/pages/self-host/reference/settings.json +1 -1
- package/dist/pages/self-host/tutorials/install-on-one-machine.json +1 -1
- package/dist/pages/start/how-to/example/set-up-the-fernhill-example.json +1 -1
- package/dist/pages/start/index.json +1 -1
- package/dist/pages/start/reference/accessibility.json +1 -0
- package/dist/pages/start/reference/changelog/0-7-0.json +1 -0
- package/dist/pages/start/reference/index.json +1 -1
- package/dist/pages/start/tutorials/index.json +1 -1
- package/dist/pages/start/tutorials/your-first-script.json +1 -1
- package/dist/pages/start/tutorials/your-first-table.json +1 -1
- package/dist/redirects.json +1 -1
- package/dist/search.json +1 -1
- package/generated/administer/reference/audit-actions.md +1 -0
- package/generated/administer/reference/permissions.md +1 -0
- package/generated/develop/reference/api/agents.md +27 -1
- package/generated/develop/reference/api/apps.md +25 -1
- package/generated/develop/reference/api/end-users.md +71 -6
- package/generated/develop/reference/api/figures.md +160 -0
- package/generated/develop/reference/api/identity.md +318 -1
- package/generated/develop/reference/api/index.md +7 -6
- package/generated/develop/reference/api/instance.md +59 -1
- package/generated/develop/reference/api/permissions.md +13 -4
- package/generated/develop/reference/api/tenancy.md +13 -0
- package/generated/develop/reference/errors.md +6 -0
- package/generated/develop/reference/kinds/dashboard.md +10 -0
- package/generated/develop/reference/kinds/interface.md +10 -0
- package/generated/develop/reference/kinds/widget.md +1 -1
- package/generated/develop/reference/sdk/sdk.md +1 -1
- package/generated/develop/reference/sdk/widgets-page.md +13 -0
- package/generated/develop/reference/sdk/widgets.md +2 -2
- package/generated/develop/reference/widgets/chart.md +1 -1
- package/generated/develop/reference/widgets/goal.md +1 -1
- package/generated/develop/reference/widgets/pivot.md +1 -1
- package/generated/develop/reference/widgets/stat.md +1 -1
- package/generated/openapi.json +4899 -1734
- package/generated/self-host/reference/settings.md +2 -2
- package/generated/start/reference/changelog/0-7-0.md +208 -0
- package/package.json +11 -6
- package/assets/screenshots/administer/access-changes.dark.5b3255fafe5c.png +0 -0
- package/assets/screenshots/administer/access-changes.light.cff6913107a3.png +0 -0
- package/assets/screenshots/administer/access-end-users.dark.c0d4e526952b.png +0 -0
- package/assets/screenshots/administer/access-end-users.light.b3368747a4d3.png +0 -0
- package/assets/screenshots/administer/access-groups.dark.bff155b79a2c.png +0 -0
- package/assets/screenshots/administer/sso-audit-filters.dark.b6a4dc01aa2c.png +0 -0
- package/assets/screenshots/administer/sso-audit-filters.light.1a295f8a94ff.png +0 -0
- package/assets/screenshots/administer/sso-provider-setup.light.b7e337ee30fb.png +0 -0
- package/assets/screenshots/administer/sso-workers-pools.dark.2270cb13aaab.png +0 -0
- package/assets/screenshots/administer/sso-workers-pools.light.1efebb29f50c.png +0 -0
- package/assets/screenshots/console/account-sessions.dark.678e11711e06.png +0 -0
- package/assets/screenshots/console/account-sessions.light.d742e8f3d3d1.png +0 -0
- package/assets/screenshots/console/configure-alerts-default.dark.425955f71c50.png +0 -0
- package/assets/screenshots/console/configure-connections.dark.7b64ffab4c8c.png +0 -0
- package/assets/screenshots/console/dashboard-resource.light.55b36abe8e0e.png +0 -0
- package/assets/screenshots/console/extensions-editor.dark.ebb816369d53.png +0 -0
- package/assets/screenshots/console/flow-editor.dark.caab11f209cb.png +0 -0
- package/assets/screenshots/console/flow-editor.light.bfc7e6b366dc.png +0 -0
- package/assets/screenshots/console/operate-approvals.light.36987d0a4c62.png +0 -0
- package/assets/screenshots/console/operate-cancel-by-age.dark.2786b42ecfbe.png +0 -0
- package/assets/screenshots/console/operate-cancel-by-age.light.8ef6601ebbe7.png +0 -0
- package/assets/screenshots/console/operate-events.dark.7067e88d771e.png +0 -0
- package/assets/screenshots/console/operate-events.light.b58a8c7f0b04.png +0 -0
- package/assets/screenshots/console/operate-run-failed.dark.eb8c52a9fcf7.png +0 -0
- package/assets/screenshots/console/operate-runs.dark.ae45d93820b3.png +0 -0
- package/assets/screenshots/console/page-editor.light.2023b176d1a0.png +0 -0
- package/assets/screenshots/console/queries-editor.dark.b0ef383c3b90.png +0 -0
- package/assets/screenshots/console/queries-editor.light.8e413390ad34.png +0 -0
- package/assets/screenshots/console/queries-parameters.light.9bca851e025c.png +0 -0
- package/assets/screenshots/console/table-definition.light.ff11cce13c18.png +0 -0
- package/assets/screenshots/console/table-help.dark.bc35e748426c.png +0 -0
- package/assets/screenshots/console/table-help.light.fb1b109ee396.png +0 -0
- package/assets/screenshots/console/table-rows-filtered.dark.6fab42faa122.png +0 -0
- package/assets/screenshots/console/table-rows-filtered.light.aa9881d95f4d.png +0 -0
- package/assets/screenshots/console/table-rows.dark.4ce02d5478c9.png +0 -0
- package/assets/screenshots/console/table-rows.light.a1f7d91a9e77.png +0 -0
- package/assets/screenshots/console/tut-visit-mix.dark.724c62999f95.png +0 -0
- package/assets/screenshots/console/widgets-phone-page.dark.386738c3e5fb.png +0 -0
- package/assets/screenshots/docs/draft-conflict.dark.894a4f116020.png +0 -0
- package/assets/screenshots/docs/draft-conflict.light.c5187649da9a.png +0 -0
- package/assets/screenshots/docs/page-details-type.dark.26fda0943a41.png +0 -0
- package/assets/screenshots/self-host/extensions-component-kit.dark.95cf642b62b6.png +0 -0
- package/assets/screenshots/self-host/extensions-component-kit.light.d4d7ae43474d.png +0 -0
- package/assets/screenshots/self-host/instance-audit.dark.eabb7e1545a2.png +0 -0
- package/assets/screenshots/self-host/instance-audit.light.e0704c3e2f3c.png +0 -0
- package/assets/screenshots/self-host/instance-branding.dark.65706ba2f266.png +0 -0
- package/assets/screenshots/self-host/instance-branding.light.53ef9943efc1.png +0 -0
- package/assets/screenshots/self-host/instance-databases.dark.17e36475132c.png +0 -0
- package/assets/screenshots/self-host/instance-databases.light.6bd31df9f812.png +0 -0
- package/assets/screenshots/self-host/instance-health.dark.7ddc9725c6e5.png +0 -0
- package/assets/screenshots/self-host/instance-health.light.5d8697f0135a.png +0 -0
- package/assets/screenshots/self-host/instance-import-check.dark.b54f53b17e5e.png +0 -0
- package/assets/screenshots/self-host/instance-import-check.light.b33217f8efdf.png +0 -0
- package/assets/screenshots/self-host/instance-members.dark.3f319a2912d7.png +0 -0
- package/assets/screenshots/self-host/instance-members.light.3f90be8b0556.png +0 -0
- package/assets/screenshots/self-host/instance-operators.dark.fb0fcc88cc66.png +0 -0
- package/assets/screenshots/self-host/instance-operators.light.038f3f725bec.png +0 -0
- package/assets/screenshots/self-host/instance-tenants.dark.1f2501ef99c1.png +0 -0
- package/assets/screenshots/self-host/instance-tenants.light.9c1b997a9f5b.png +0 -0
- package/assets/screenshots/self-host/instance-triggers.dark.2c3cffed2649.png +0 -0
- package/assets/screenshots/self-host/instance-triggers.light.b0a06ee78d65.png +0 -0
- package/assets/screenshots/start/basics-finding-your-way.dark.05cc7d67b47c.png +0 -0
- package/assets/screenshots/start/basics-finding-your-way.light.45790efbcb57.png +0 -0
- package/assets/screenshots/start/tut-approve-step.dark.dc691e002e9e.png +0 -0
- package/assets/screenshots/start/tut-approve-step.light.9c219b4d2d1a.png +0 -0
- package/assets/screenshots/start/visit-notes-filtered.dark.f26ec0b4168c.png +0 -0
- package/assets/screenshots/start/visit-notes-filtered.light.841ac7004f1c.png +0 -0
- package/dist/assets/screenshots/administer/access-changes.dark.5b3255fafe5c.png +0 -0
- package/dist/assets/screenshots/administer/access-changes.light.cff6913107a3.png +0 -0
- package/dist/assets/screenshots/administer/access-end-users.dark.c0d4e526952b.png +0 -0
- package/dist/assets/screenshots/administer/access-end-users.light.b3368747a4d3.png +0 -0
- package/dist/assets/screenshots/administer/access-groups.dark.bff155b79a2c.png +0 -0
- package/dist/assets/screenshots/administer/sso-audit-filters.dark.b6a4dc01aa2c.png +0 -0
- package/dist/assets/screenshots/administer/sso-audit-filters.light.1a295f8a94ff.png +0 -0
- package/dist/assets/screenshots/administer/sso-provider-setup.light.b7e337ee30fb.png +0 -0
- package/dist/assets/screenshots/administer/sso-workers-pools.dark.2270cb13aaab.png +0 -0
- package/dist/assets/screenshots/administer/sso-workers-pools.light.1efebb29f50c.png +0 -0
- package/dist/assets/screenshots/console/account-sessions.dark.678e11711e06.png +0 -0
- package/dist/assets/screenshots/console/account-sessions.light.d742e8f3d3d1.png +0 -0
- package/dist/assets/screenshots/console/configure-alerts-default.dark.425955f71c50.png +0 -0
- package/dist/assets/screenshots/console/configure-connections.dark.7b64ffab4c8c.png +0 -0
- package/dist/assets/screenshots/console/dashboard-resource.light.55b36abe8e0e.png +0 -0
- package/dist/assets/screenshots/console/extensions-editor.dark.ebb816369d53.png +0 -0
- package/dist/assets/screenshots/console/flow-editor.dark.caab11f209cb.png +0 -0
- package/dist/assets/screenshots/console/flow-editor.light.bfc7e6b366dc.png +0 -0
- package/dist/assets/screenshots/console/operate-approvals.light.36987d0a4c62.png +0 -0
- package/dist/assets/screenshots/console/operate-cancel-by-age.dark.2786b42ecfbe.png +0 -0
- package/dist/assets/screenshots/console/operate-cancel-by-age.light.8ef6601ebbe7.png +0 -0
- package/dist/assets/screenshots/console/operate-events.dark.7067e88d771e.png +0 -0
- package/dist/assets/screenshots/console/operate-events.light.b58a8c7f0b04.png +0 -0
- package/dist/assets/screenshots/console/operate-run-failed.dark.eb8c52a9fcf7.png +0 -0
- package/dist/assets/screenshots/console/operate-runs.dark.ae45d93820b3.png +0 -0
- package/dist/assets/screenshots/console/page-editor.light.2023b176d1a0.png +0 -0
- package/dist/assets/screenshots/console/queries-editor.dark.b0ef383c3b90.png +0 -0
- package/dist/assets/screenshots/console/queries-editor.light.8e413390ad34.png +0 -0
- package/dist/assets/screenshots/console/queries-parameters.light.9bca851e025c.png +0 -0
- package/dist/assets/screenshots/console/table-definition.light.ff11cce13c18.png +0 -0
- package/dist/assets/screenshots/console/table-help.dark.bc35e748426c.png +0 -0
- package/dist/assets/screenshots/console/table-help.light.fb1b109ee396.png +0 -0
- package/dist/assets/screenshots/console/table-rows-filtered.dark.6fab42faa122.png +0 -0
- package/dist/assets/screenshots/console/table-rows-filtered.light.aa9881d95f4d.png +0 -0
- package/dist/assets/screenshots/console/table-rows.dark.4ce02d5478c9.png +0 -0
- package/dist/assets/screenshots/console/table-rows.light.a1f7d91a9e77.png +0 -0
- package/dist/assets/screenshots/console/tut-visit-mix.dark.724c62999f95.png +0 -0
- package/dist/assets/screenshots/console/widgets-phone-page.dark.386738c3e5fb.png +0 -0
- package/dist/assets/screenshots/docs/draft-conflict.dark.894a4f116020.png +0 -0
- package/dist/assets/screenshots/docs/draft-conflict.light.c5187649da9a.png +0 -0
- package/dist/assets/screenshots/docs/page-details-type.dark.26fda0943a41.png +0 -0
- package/dist/assets/screenshots/self-host/extensions-component-kit.dark.95cf642b62b6.png +0 -0
- package/dist/assets/screenshots/self-host/extensions-component-kit.light.d4d7ae43474d.png +0 -0
- package/dist/assets/screenshots/self-host/instance-audit.dark.eabb7e1545a2.png +0 -0
- package/dist/assets/screenshots/self-host/instance-audit.light.e0704c3e2f3c.png +0 -0
- package/dist/assets/screenshots/self-host/instance-branding.dark.65706ba2f266.png +0 -0
- package/dist/assets/screenshots/self-host/instance-branding.light.53ef9943efc1.png +0 -0
- package/dist/assets/screenshots/self-host/instance-databases.dark.17e36475132c.png +0 -0
- package/dist/assets/screenshots/self-host/instance-databases.light.6bd31df9f812.png +0 -0
- package/dist/assets/screenshots/self-host/instance-health.dark.7ddc9725c6e5.png +0 -0
- package/dist/assets/screenshots/self-host/instance-health.light.5d8697f0135a.png +0 -0
- package/dist/assets/screenshots/self-host/instance-import-check.dark.b54f53b17e5e.png +0 -0
- package/dist/assets/screenshots/self-host/instance-import-check.light.b33217f8efdf.png +0 -0
- package/dist/assets/screenshots/self-host/instance-members.dark.3f319a2912d7.png +0 -0
- package/dist/assets/screenshots/self-host/instance-members.light.3f90be8b0556.png +0 -0
- package/dist/assets/screenshots/self-host/instance-operators.dark.fb0fcc88cc66.png +0 -0
- package/dist/assets/screenshots/self-host/instance-operators.light.038f3f725bec.png +0 -0
- package/dist/assets/screenshots/self-host/instance-tenants.dark.1f2501ef99c1.png +0 -0
- package/dist/assets/screenshots/self-host/instance-tenants.light.9c1b997a9f5b.png +0 -0
- package/dist/assets/screenshots/self-host/instance-triggers.dark.2c3cffed2649.png +0 -0
- package/dist/assets/screenshots/self-host/instance-triggers.light.b0a06ee78d65.png +0 -0
- package/dist/assets/screenshots/start/basics-finding-your-way.dark.05cc7d67b47c.png +0 -0
- package/dist/assets/screenshots/start/basics-finding-your-way.light.45790efbcb57.png +0 -0
- package/dist/assets/screenshots/start/tut-approve-step.dark.dc691e002e9e.png +0 -0
- package/dist/assets/screenshots/start/tut-approve-step.light.9c219b4d2d1a.png +0 -0
- package/dist/assets/screenshots/start/visit-notes-filtered.dark.f26ec0b4168c.png +0 -0
- package/dist/assets/screenshots/start/visit-notes-filtered.light.841ac7004f1c.png +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"path":"develop/reference/sdk/sdk","title":"@volvel/sdk","tree":{"type":"root","v":1,"children":[{"type":"paragraph","children":[{"type":"inlineCode","value":"import { … } from \"@volvel/sdk\"","line":8}],"line":8},{"type":"paragraph","children":[{"type":"text","value":"Everything ","line":10},{"type":"inlineCode","value":"@volvel/widgets","line":10},{"type":"text","value":" exports is exported from here too. It is on the ","line":10},{"type":"link","href":"widgets","children":[{"type":"text","value":"page of @volvel/widgets","line":10}],"line":10},{"type":"text","value":".","line":10}],"line":10},{"type":"paragraph","children":[{"type":"text","value":"Passed on from other packages: ","line":12},{"type":"inlineCode","value":"DashboardBody","line":12},{"type":"text","value":" (from ","line":12},{"type":"inlineCode","value":"@volvel/widgets/page","line":12},{"type":"text","value":"), ","line":12},{"type":"inlineCode","value":"DataInput","line":12},{"type":"text","value":" (from ","line":12},{"type":"inlineCode","value":"@volvel/widgets/page","line":12},{"type":"text","value":"), ","line":12},{"type":"inlineCode","value":"InterfaceBody","line":12},{"type":"text","value":" (from ","line":12},{"type":"inlineCode","value":"@volvel/widgets/page","line":12},{"type":"text","value":"), ","line":12},{"type":"inlineCode","value":"Page","line":12},{"type":"text","value":" (from ","line":12},{"type":"inlineCode","value":"@volvel/widgets/page","line":12},{"type":"text","value":"), ","line":12},{"type":"inlineCode","value":"PageFilter","line":12},{"type":"text","value":" (from ","line":12},{"type":"inlineCode","value":"@volvel/widgets/page","line":12},{"type":"text","value":"), ","line":12},{"type":"inlineCode","value":"PageWidget","line":12},{"type":"text","value":" (from ","line":12},{"type":"inlineCode","value":"@volvel/widgets/page","line":12},{"type":"text","value":"), ","line":12},{"type":"inlineCode","value":"z","line":12},{"type":"text","value":" (from ","line":12},{"type":"inlineCode","value":"zod","line":12},{"type":"text","value":").","line":12}],"line":12},{"type":"heading","depth":2,"id":"functions","children":[{"type":"text","value":"Functions","line":14}],"line":14},{"type":"heading","depth":3,"id":"defineapp","children":[{"type":"text","value":"defineApp","line":16}],"line":16},{"type":"paragraph","children":[{"type":"text","value":"Declares an app: an interface the platform builds from ","line":18},{"type":"inlineCode","value":"source","line":18},{"type":"text","value":" and serves.","line":18},{"type":"break","hard":false,"line":18},{"type":"text","value":"Who may open it is decided by bindings, like any other resource: bind a role","line":19},{"type":"break","hard":false,"line":19},{"type":"text","value":"holding ","line":20},{"type":"inlineCode","value":"app:read","line":20},{"type":"text","value":" to members, to ","line":20},{"type":"inlineCode","value":"end_users","line":20},{"type":"text","value":", or to ","line":20},{"type":"inlineCode","value":"anonymous","line":20},{"type":"text","value":" for a public app.","line":20}],"line":18},{"type":"code","value":"function defineApp(options: AppOptions): AppDefinition","lang":"ts","line":22},{"type":"heading","depth":3,"id":"definebinding","children":[{"type":"text","value":"defineBinding","line":26}],"line":26},{"type":"paragraph","children":[{"type":"text","value":"Grants a role to a principal, at the workspace or at one resource. This is","line":28},{"type":"break","hard":false,"line":28},{"type":"text","value":"how a repository says who may open an app and whose rows it shows.","line":29}],"line":28},{"type":"code","value":"function defineBinding(options: BindingOptions): ResourceDefinition","lang":"ts","line":31},{"type":"heading","depth":3,"id":"defineconnection","children":[{"type":"text","value":"defineConnection","line":35}],"line":35},{"type":"paragraph","children":[{"type":"text","value":"Declares a connection. Its address and credentials are set per workspace, not here.","line":37}],"line":37},{"type":"code","value":"function defineConnection(options: ConnectionOptions): ResourceDefinition","lang":"ts","line":39},{"type":"heading","depth":3,"id":"defineconnectiongroup","children":[{"type":"text","value":"defineConnectionGroup","line":43}],"line":43},{"type":"paragraph","children":[{"type":"text","value":"Declares a group of connections of one kind, such as every customer's","line":45},{"type":"break","hard":false,"line":45},{"type":"text","value":"account with the same service. Members are added per workspace in the","line":46},{"type":"break","hard":false,"line":46},{"type":"text","value":"console, with no deploy. A script that lists the group picks a member when","line":47},{"type":"break","hard":false,"line":47},{"type":"text","value":"it runs: ","line":48},{"type":"inlineCode","value":"await ctx.connections(\"shops\").get(input.shop)","line":48},{"type":"text","value":".","line":48}],"line":45},{"type":"code","value":"function defineConnectionGroup(options: ConnectionGroupOptions): ResourceDefinition","lang":"ts","line":50},{"type":"heading","depth":3,"id":"defineconnector","children":[{"type":"text","value":"defineConnector","line":54}],"line":54},{"type":"paragraph","children":[{"type":"text","value":"Declares a connector: an adapter for one kind of outside system, which","line":56},{"type":"break","hard":false,"line":56},{"type":"text","value":"turns a connection's configuration and credential into the client a script","line":57},{"type":"break","hard":false,"line":57},{"type":"text","value":"uses. A connection uses it by naming it: ","line":58},{"type":"inlineCode","value":"defineConnection({ connector: shop })","line":58},{"type":"text","value":".","line":58}],"line":56},{"type":"code","value":"function defineConnector<Config, Client>(options: ConnectorOptions<Config, Client>): ConnectorDefinition<Config, Client>","lang":"ts","line":60},{"type":"heading","depth":3,"id":"definedashboard","children":[{"type":"text","value":"defineDashboard","line":64}],"line":64},{"type":"paragraph","children":[{"type":"text","value":"Declares a dashboard: one page of widgets that only read, kept as a resource so it is","line":66},{"type":"break","hard":false,"line":66},{"type":"text","value":"versioned, deployed and promoted with the rest of a workspace.","line":67}],"line":66},{"type":"code","value":"function defineDashboard(options: DashboardOptions): ResourceDefinition","lang":"ts","line":69},{"type":"heading","depth":3,"id":"definedatasource","children":[{"type":"text","value":"defineDataSource","line":73}],"line":73},{"type":"paragraph","children":[{"type":"text","value":"Declares an external Postgres database. Where it is, and its password, are set per workspace.","line":75}],"line":75},{"type":"code","value":"function defineDataSource(options: DataSourceOptions): ResourceDefinition","lang":"ts","line":77},{"type":"heading","depth":3,"id":"defineevent","children":[{"type":"text","value":"defineEvent","line":81}],"line":81},{"type":"paragraph","children":[{"type":"text","value":"Declares an event that scripts and flows can publish and listen for.","line":83}],"line":83},{"type":"code","value":"function defineEvent<Payload extends z.ZodType>(options: EventOptions<Payload>): ResourceDefinition","lang":"ts","line":85},{"type":"heading","depth":3,"id":"defineeventtrigger","children":[{"type":"text","value":"defineEventTrigger","line":89}],"line":89},{"type":"paragraph","children":[{"type":"text","value":"Starts a script each time an event is published.","line":91}],"line":91},{"type":"code","value":"function defineEventTrigger(options: EventTriggerOptions): ResourceDefinition","lang":"ts","line":93},{"type":"heading","depth":3,"id":"defineflow","children":[{"type":"text","value":"defineFlow","line":97}],"line":97},{"type":"paragraph","children":[{"type":"text","value":"Declares a flow: a graph of steps the platform runs durably. The nodes and","line":99},{"type":"break","hard":false,"line":99},{"type":"text","value":"edges written here are exactly what is deployed and shown.","line":100}],"line":99},{"type":"code","value":"function defineFlow<Nodes extends Record<string, FlowNode>>(options: FlowOptions<Nodes>): ResourceDefinition","lang":"ts","line":102},{"type":"heading","depth":3,"id":"defineform","children":[{"type":"text","value":"defineForm","line":106}],"line":106},{"type":"paragraph","children":[{"type":"text","value":"Declares a form that starts a script. The platform serves it at an address","line":108},{"type":"break","hard":false,"line":108},{"type":"text","value":"of its own under the tenant's portal, with no code of yours.","line":109}],"line":108},{"type":"code","value":"function defineForm(options: FormOptions & {\n path: string;\n /** The form's identity, said only when it is moved to another path. See `ResourceNames`. */\n key?: string;\n script: Ref;\n enabled?: boolean;\n}): ResourceDefinition","lang":"ts","line":111},{"type":"heading","depth":3,"id":"defineinterface","children":[{"type":"text","value":"defineInterface","line":121}],"line":121},{"type":"paragraph","children":[{"type":"text","value":"Declares an interface: pages of widgets (","line":123},{"type":"inlineCode","value":"core/table","line":123},{"type":"text","value":", ","line":123},{"type":"inlineCode","value":"core/chart","line":123},{"type":"text","value":", and the rest of","line":123},{"type":"break","hard":false,"line":123},{"type":"text","value":"the pack) over the workspace's tables, with no code. Each widget names its data","line":124},{"type":"break","hard":false,"line":124},{"type":"text","value":"inputs and its ","line":125},{"type":"inlineCode","value":"config","line":125},{"type":"text","value":"; see the ","line":125},{"type":"inlineCode","value":"interface","line":125},{"type":"text","value":" schema. Serve it with","line":125},{"type":"break","hard":false,"line":125},{"type":"inlineCode","value":"defineApp({ interface })","line":126},{"type":"text","value":".","line":126}],"line":123},{"type":"code","value":"function defineInterface(options: InterfaceOptions): ResourceDefinition","lang":"ts","line":128},{"type":"heading","depth":3,"id":"definequery","children":[{"type":"text","value":"defineQuery","line":132}],"line":132},{"type":"paragraph","children":[{"type":"text","value":"Declares a query the workspace keeps by name. It only reads. Whoever runs it","line":134},{"type":"break","hard":false,"line":134},{"type":"text","value":"needs to be allowed to read each table it names, and each table's row policy","line":135},{"type":"break","hard":false,"line":135},{"type":"text","value":"applies to them: a dashboard built on it shows each person their own rows.","line":136}],"line":134},{"type":"code","value":"function defineQuery(options: QueryOptions): ResourceDefinition","lang":"ts","line":138},{"type":"heading","depth":3,"id":"definerole","children":[{"type":"text","value":"defineRole","line":142}],"line":142},{"type":"paragraph","children":[{"type":"text","value":"Declares a custom role for this workspace.","line":144}],"line":144},{"type":"code","value":"function defineRole(options: RoleOptions): ResourceDefinition & {\n readonly name: string;\n}","lang":"ts","line":146},{"type":"heading","depth":3,"id":"defineschedule","children":[{"type":"text","value":"defineSchedule","line":152}],"line":152},{"type":"paragraph","children":[{"type":"text","value":"Defines a schedule: a script or a flow started at times given as a cron line.","line":154}],"line":154},{"type":"code","value":"function defineSchedule(options: ScheduleOptions): ResourceDefinition","lang":"ts","line":156},{"type":"heading","depth":3,"id":"definescript","children":[{"type":"text","value":"defineScript","line":160}],"line":160},{"type":"paragraph","children":[{"type":"text","value":"Defines a script: a function with a checked input and a checked output, that runs on a worker.","line":162}],"line":162},{"type":"code","value":"function defineScript<Input extends z.ZodType, Output extends z.ZodType>(options: ScriptOptions<Input, Output>): ScriptDefinition","lang":"ts","line":164},{"type":"heading","depth":3,"id":"definetable","children":[{"type":"text","value":"defineTable","line":168}],"line":168},{"type":"paragraph","children":[{"type":"text","value":"Declares a custom table. A deploy changes the workspace's table to match:","line":170},{"type":"break","hard":false,"line":170},{"type":"text","value":"new columns are added, and a column that is no longer declared is retired","line":171},{"type":"break","hard":false,"line":171},{"type":"text","value":"with its data kept, never dropped.","line":172}],"line":170},{"type":"code","value":"function defineTable<C extends Record<string, ColumnSpec<unknown, boolean, boolean>>>(options: TableOptions<C>): TableDefinition<RowOf<C>, InsertOf<C>>","lang":"ts","line":174},{"type":"heading","depth":3,"id":"definetheme","children":[{"type":"text","value":"defineTheme","line":178}],"line":178},{"type":"paragraph","children":[{"type":"text","value":"Declares how this workspace's apps look, where it differs from the tenant's","line":180},{"type":"break","hard":false,"line":180},{"type":"text","value":"branding. Tokens that are not set keep the tenant's value.","line":181}],"line":180},{"type":"code","value":"function defineTheme(options: ThemeOptions): ResourceDefinition","lang":"ts","line":183},{"type":"heading","depth":3,"id":"definetriggersource","children":[{"type":"text","value":"defineTriggerSource","line":187}],"line":187},{"type":"paragraph","children":[{"type":"text","value":"Declares a trigger source: code that stands between the outside and what a","line":189},{"type":"break","hard":false,"line":189},{"type":"text","value":"trigger starts. It runs on a worker, like a script, and reads only the","line":190},{"type":"break","hard":false,"line":190},{"type":"text","value":"connections, secrets and variables it lists.","line":191}],"line":189},{"type":"paragraph","children":[{"type":"text","value":"A ","line":193},{"type":"inlineCode","value":"webhook","line":193},{"type":"text","value":" source is handed each request to a webhook that names it, and","line":193},{"type":"break","hard":false,"line":193},{"type":"text","value":"says whether to start anything and with what: this is where a signature in","line":194},{"type":"break","hard":false,"line":194},{"type":"text","value":"a sender's own format is checked, or one request is split into several. A","line":195},{"type":"break","hard":false,"line":195},{"type":"inlineCode","value":"poll","line":196},{"type":"text","value":" source is run on a schedule that names it, with where it had got to,","line":196},{"type":"break","hard":false,"line":196},{"type":"text","value":"and gives back what is new.","line":197}],"line":193},{"type":"code","value":"function defineTriggerSource(options: TriggerSourceOptions): TriggerSourceDefinition","lang":"ts","line":199},{"type":"heading","depth":3,"id":"definevariable","children":[{"type":"text","value":"defineVariable","line":203}],"line":203},{"type":"paragraph","children":[{"type":"text","value":"Declares a variable. Each workspace can set its own value.","line":205}],"line":205},{"type":"code","value":"function defineVariable(options: VariableOptions): ResourceDefinition","lang":"ts","line":207},{"type":"heading","depth":3,"id":"definewebhook","children":[{"type":"text","value":"defineWebhook","line":211}],"line":211},{"type":"paragraph","children":[{"type":"text","value":"Defines a webhook: an address that starts a script when a request is made to it.","line":213}],"line":213},{"type":"code","value":"function defineWebhook(options: WebhookOptions): ResourceDefinition","lang":"ts","line":215},{"type":"heading","depth":3,"id":"definewidget","children":[{"type":"text","value":"defineWidget","line":219}],"line":219},{"type":"paragraph","children":[{"type":"text","value":"Declares a widget of your own, for pages and dashboards: its type (","line":221},{"type":"inlineCode","value":"x/<name>","line":221},{"type":"text","value":"), the data it","line":221},{"type":"break","hard":false,"line":221},{"type":"text","value":"reads, its settings (a JSON Schema with an ","line":222},{"type":"inlineCode","value":"x-volvel","line":222},{"type":"text","value":" hint on each, from which the inspector","line":222},{"type":"break","hard":false,"line":222},{"type":"text","value":"is drawn), the events it raises, and the file of its view. The view runs in a sandboxed frame","line":223},{"type":"break","hard":false,"line":223},{"type":"text","value":"with no network and is given only what the platform read for it under the viewer's permissions.","line":224},{"type":"break","hard":false,"line":224},{"type":"text","value":"Throws when the declaration is wrong, so ","line":225},{"type":"inlineCode","value":"volvel build","line":225},{"type":"text","value":" says so before anything is deployed.","line":225},{"type":"break","hard":false,"line":225},{"type":"text","value":"Scaffold one with ","line":226},{"type":"inlineCode","value":"volvel widget new <name>","line":226},{"type":"text","value":".","line":226}],"line":221},{"type":"code","value":"function defineWidget<const D extends WidgetOptions>(options: D): WidgetResource<D>","lang":"ts","line":228},{"type":"heading","depth":3,"id":"isresourcedefinition","children":[{"type":"text","value":"isResourceDefinition","line":232}],"line":232},{"type":"paragraph","children":[{"type":"text","value":"Whether a value is a resource made with one of the ","line":234},{"type":"inlineCode","value":"define","line":234},{"type":"text","value":" functions, as the build finds them in a repository's exports.","line":234}],"line":234},{"type":"code","value":"function isResourceDefinition(value: unknown): value is ResourceDefinition","lang":"ts","line":236},{"type":"heading","depth":2,"id":"classes","children":[{"type":"text","value":"Classes","line":240}],"line":240},{"type":"heading","depth":3,"id":"httperror","children":[{"type":"text","value":"HttpError","line":242}],"line":242},{"type":"paragraph","children":[{"type":"text","value":"A request that came back with a 4xx or 5xx status.","line":244}],"line":244},{"type":"code","value":"class HttpError extends Error","lang":"ts","line":246},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":250}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":250}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":250}]}],"line":250},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"status","line":252}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"number","line":252}]},{"type":"tableCell","children":[]}],"line":252},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"response","line":253}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"HttpResponse","line":253}]},{"type":"tableCell","children":[]}],"line":253},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"constructor","line":254}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(method: string, url: string, response: HttpResponse)","line":254}]},{"type":"tableCell","children":[]}],"line":254}],"line":250},{"type":"heading","depth":3,"id":"schemaerror","children":[{"type":"text","value":"SchemaError","line":256}],"line":256},{"type":"paragraph","children":[{"type":"text","value":"A failure caused by input or output that does not match the script's schema.","line":258}],"line":258},{"type":"code","value":"class SchemaError extends Error","lang":"ts","line":260},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":264}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":264}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":264}]}],"line":264},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"constructor","line":266}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(what: \"input\" | \"output\", error: z.ZodError)","line":266}]},{"type":"tableCell","children":[]}],"line":266}],"line":264},{"type":"heading","depth":2,"id":"constants","children":[{"type":"text","value":"Constants","line":268}],"line":268},{"type":"heading","depth":3,"id":"column","children":[{"type":"text","value":"column","line":270}],"line":270},{"type":"paragraph","children":[{"type":"text","value":"The kinds of column a table can have.","line":272}],"line":272},{"type":"code","value":"const column: {\n text: <const Options extends ColumnOptions = Record<never, never>>(options?: Options) => ColumnSpec<string, IsRequired<Options>, IsDefaulted<Options>>;\n /** A whole number. */\n integer: <const Options extends ColumnOptions = Record<never, never>>(options?: Options) => ColumnSpec<number, IsRequired<Options>, IsDefaulted<Options>>;\n /** Any number. Store money as an integer of its smallest unit. */\n number: <const Options extends ColumnOptions = Record<never, never>>(options?: Options) => ColumnSpec<number, IsRequired<Options>, IsDefaulted<Options>>;\n boolean: <const Options extends ColumnOptions = Record<never, never>>(options?: Options) => ColumnSpec<boolean, IsRequired<Options>, IsDefaulted<Options>>;\n /** A date and time, as an ISO 8601 string. */\n timestamp: <const Options extends ColumnOptions = Record<never, never>>(options?: Options) => ColumnSpec<string, IsRequired<Options>, IsDefaulted<Options>>;\n /** A calendar date, as `YYYY-MM-DD`. */\n date: <const Options extends ColumnOptions = Record<never, never>>(options?: Options) => ColumnSpec<string, IsRequired<Options>, IsDefaulted<Options>>;\n /** Any JSON value. */\n json: <const Options extends ColumnOptions = Record<never, never>>(options?: Options) => ColumnSpec<unknown, IsRequired<Options>, IsDefaulted<Options>>;\n uuid: <const Options extends ColumnOptions = Record<never, never>>(options?: Options) => ColumnSpec<string, IsRequired<Options>, IsDefaulted<Options>>;\n /**\n * One of a list of values, which a row's type is narrowed to:\n * `column.enum([\"new\", \"paid\"])`. The database refuses any other value.\n */\n enum: <const Values extends readonly (string | EnumValueSpec)[], const Options extends ColumnOptions = Record<never, never>>(values: Values, options?: Options) => ColumnSpec<ValueIn<Values[number]>, IsRequired<Options>, IsDefaulted<Options>>;\n /** Several of a list of values, each at most once. */\n enumList: <const Values extends readonly (string | EnumValueSpec)[], const Options extends ColumnOptions = Record<never, never>>(values: Values, options?: Options) => ColumnSpec<ValueIn<Values[number]>[], IsRequired<Options>, IsDefaulted<Options>>;\n /** The ID of a row in another table. */\n reference: <const Options extends ReferenceOptions = Record<never, never>>(table: string | {\n path: string;\n }, options?: Options) => ColumnSpec<string, IsRequired<Options>, IsDefaulted<Options>>;\n /** The ID of a stored file. */\n file: <const Options extends ColumnOptions = Record<never, never>>(options?: Options) => ColumnSpec<string, IsRequired<Options>, IsDefaulted<Options>>;\n}","lang":"ts","line":274},{"type":"heading","depth":3,"id":"core_range","children":[{"type":"text","value":"CORE_RANGE","line":305}],"line":305},{"type":"paragraph","children":[{"type":"text","value":"The core versions a bundle built with this SDK works on: from ","line":307},{"type":"inlineCode","value":"min","line":307},{"type":"text","value":" up to, not including, ","line":307},{"type":"inlineCode","value":"below","line":307},{"type":"text","value":".","line":307}],"line":307},{"type":"code","value":"const CORE_RANGE: {\n min: string;\n below: string;\n}","lang":"ts","line":309},{"type":"heading","depth":3,"id":"httpconnector","children":[{"type":"text","value":"httpConnector","line":316}],"line":316},{"type":"paragraph","children":[{"type":"text","value":"The built-in connector for any HTTP API.","line":318}],"line":318},{"type":"code","value":"const httpConnector: Connector<HttpConfig, HttpClient>","lang":"ts","line":320},{"type":"heading","depth":3,"id":"oauth2connector","children":[{"type":"text","value":"oauth2Connector","line":324}],"line":324},{"type":"paragraph","children":[{"type":"text","value":"The built-in OAuth 2.0 connector. Its client is an http client that sends","line":326},{"type":"break","hard":false,"line":326},{"type":"text","value":"the access token as a bearer token. The credential stored with the","line":327},{"type":"break","hard":false,"line":327},{"type":"text","value":"connection is the client's secret, which a worker never receives: what a","line":328},{"type":"break","hard":false,"line":328},{"type":"text","value":"worker is given in its place is the current access token.","line":329}],"line":326},{"type":"code","value":"const oauth2Connector: Connector<OAuth2Config, HttpClient>","lang":"ts","line":331},{"type":"heading","depth":3,"id":"sdk_version","children":[{"type":"text","value":"SDK_VERSION","line":335}],"line":335},{"type":"paragraph","children":[{"type":"text","value":"The version of the SDK, and the core versions a bundle built with it works on.","line":337}],"line":337},{"type":"code","value":"const SDK_VERSION = \"0.6.0\"","lang":"ts","line":339},{"type":"heading","depth":3,"id":"smtpconfigschema","children":[{"type":"text","value":"smtpConfigSchema","line":343}],"line":343},{"type":"paragraph","children":[{"type":"text","value":"The configuration of an ","line":345},{"type":"inlineCode","value":"smtp","line":345},{"type":"text","value":" connection, as a JSON Schema. The connector","line":345},{"type":"break","hard":false,"line":345},{"type":"text","value":"itself is part of the worker, which is what speaks to the mail server: a","line":346},{"type":"break","hard":false,"line":346},{"type":"text","value":"bundle carries none of it.","line":347}],"line":345},{"type":"code","value":"const smtpConfigSchema: {\n readonly type: \"object\";\n readonly properties: {\n readonly host: {\n readonly type: \"string\";\n readonly minLength: 1;\n readonly maxLength: 253;\n readonly title: \"Mail server\";\n readonly description: \"The mail server's address, such as `smtp.example.com`.\";\n };\n readonly port: {\n readonly type: \"integer\";\n readonly minimum: 1;\n readonly maximum: 65535;\n readonly default: 587;\n readonly title: \"Port\";\n readonly description: \"The port the server listens on. Port 465 expects `tls`.\";\n };\n readonly security: {\n readonly enum: readonly [\"starttls\", \"tls\", \"none\"];\n readonly default: \"starttls\";\n readonly title: \"Security\";\n readonly description: \"`tls` speaks TLS from the first byte. `starttls` upgrades a plain connection and refuses to go on without it. `none` is for a server inside the same network that offers neither.\";\n };\n readonly from: {\n readonly type: \"string\";\n readonly minLength: 3;\n readonly maxLength: 320;\n readonly title: \"Sent from\";\n readonly description: \"The address mail is sent from: `orders@example.com` or `Orders <orders@example.com>`.\";\n };\n readonly username: {\n readonly type: \"string\";\n readonly maxLength: 320;\n readonly title: \"User name\";\n readonly description: \"The user to sign in as. The password is the connection's secret.\";\n };\n };\n readonly required: readonly [\"host\", \"from\"];\n readonly additionalProperties: false;\n}","lang":"ts","line":349},{"type":"heading","depth":3,"id":"step","children":[{"type":"text","value":"step","line":393}],"line":393},{"type":"paragraph","children":[{"type":"text","value":"The steps of a flow. Where a step takes an expression, it is CEL, and can","line":395},{"type":"break","hard":false,"line":395},{"type":"text","value":"read ","line":396},{"type":"inlineCode","value":"trigger","line":396},{"type":"text","value":", ","line":396},{"type":"inlineCode","value":"steps.<node>.output","line":396},{"type":"text","value":", ","line":396},{"type":"inlineCode","value":"now","line":396},{"type":"text","value":" (the current time, as a","line":396},{"type":"break","hard":false,"line":396},{"type":"text","value":"timestamp), and inside a foreach, ","line":397},{"type":"inlineCode","value":"item","line":397},{"type":"text","value":" and ","line":397},{"type":"inlineCode","value":"index","line":397},{"type":"text","value":". A timestamp reads as","line":397},{"type":"break","hard":false,"line":397},{"type":"text","value":"ISO 8601 text: ","line":398},{"type":"inlineCode","value":"string(now - duration('336h')).substring(0, 10)","line":398},{"type":"text","value":" is the","line":398},{"type":"break","hard":false,"line":398},{"type":"text","value":"date two weeks ago.","line":399}],"line":395},{"type":"code","value":"const step: {\n /**\n * Runs a script. `input` is one expression giving the script's input, or\n * `inputs` gives an expression for each field. `with` hands the script\n * connections, tables or events for this step, when the script takes them.\n */\n script: (script: Target, options?: {\n input?: string;\n inputs?: Record<string, string>;\n with?: StepGrants;\n }) => FlowNode;\n /** Computes named values. Its output is an object of the results. */\n set: (values: Record<string, string>) => FlowNode;\n /** Follows the first case whose condition is true, or the edge marked `otherwise`. */\n branch: (cases: Record<string, string>) => FlowNode;\n /**\n * Runs a script or a flow once per item. Its output is the list of results, in\n * order. One failed item fails the step, unless `continueOnError` is set: then\n * a failed item is `{ error: { message } }` in the list and the others carry on.\n */\n foreach: (items: string, options: {\n input?: string;\n concurrency?: number;\n continueOnError?: boolean;\n with?: StepGrants;\n } & ({\n script: Target;\n flow?: undefined;\n flowFrom?: undefined;\n allow?: undefined;\n } | {\n flow: Target;\n script?: undefined;\n flowFrom?: undefined;\n allow?: undefined;\n } | {\n flowFrom: string;\n allow: Target[];\n script?: undefined;\n flow?: undefined;\n })) => FlowNode;\n /** Waits for every path that leads into it. */\n join: () => FlowNode;\n /** Waits this many seconds. */\n delay: (seconds: number) => FlowNode;\n /**\n * Pauses until a person approves. Rejecting, or the timeout passing, fails the\n * step. `approvers` names who may decide: members of these groups, or holders\n * of these roles. Without it, anyone who may decide approvals here may.\n * It is listed in its workspace; `surface: \"tenant\"` lists it on the tenant's\n * page too.\n */\n approval: (title: string, options?: {\n detail?: string;\n timeoutSeconds?: number;\n approvers?: {\n groups?: string[];\n roles?: string[];\n };\n surface?: \"workspace\" | \"tenant\";\n }) => FlowNode;\n /**\n * Runs another flow from its manual trigger and waits for it. Name it, or give\n * `flowFrom`, an expression that chooses one of the flows in `allow`.\n */\n subflow: (flow: Target | {\n flowFrom: string;\n allow: Target[];\n input?: string;\n }, options?: {\n input?: string;\n }) => FlowNode;\n /**\n * Answers the request that started the flow, for a webhook trigger with\n * `respond: \"flow\"`. `body` and each header are expressions. The first\n * respond step to run is the answer, and the flow carries on after it.\n */\n respond: (options?: {\n status?: number;\n headers?: Record<string, string>;\n body?: string;\n }) => FlowNode;\n /** Fails on purpose, with a message. */\n fail: (message: string) => FlowNode;\n}","lang":"ts","line":401},{"type":"heading","depth":3,"id":"theme_tokens","children":[{"type":"text","value":"THEME_TOKENS","line":489}],"line":489},{"type":"paragraph","children":[{"type":"text","value":"The theme tokens a workspace may set, each the CSS variable ","line":491},{"type":"inlineCode","value":"--vx-<name>","line":491},{"type":"text","value":" in the","line":491},{"type":"break","hard":false,"line":491},{"type":"text","value":"component kit. The manifest's own list (","line":492},{"type":"inlineCode","value":"THEME_TOKENS","line":492},{"type":"text","value":") is the same: a test holds them equal.","line":492}],"line":491},{"type":"code","value":"const THEME_TOKENS: readonly [\"canvas\", \"surface\", \"sunken\", \"line\", \"ink\", \"ink-muted\", \"action\", \"action-ink\", \"action-soft\", \"attention\", \"attention-soft\", \"danger\", \"danger-soft\", \"success\", \"success-soft\", \"structure\", \"raised\", \"selected\", \"line-strong\", \"line-control\", \"ink-subtle\", \"code-bg\", \"focus\", \"radius-control\", \"radius-panel\", \"font\", \"font-code\"]","lang":"ts","line":494},{"type":"heading","depth":3,"id":"trigger","children":[{"type":"text","value":"trigger","line":498}],"line":498},{"type":"paragraph","children":[{"type":"text","value":"The entry points of a flow. A flow may have several, each leading into its own part of the graph.","line":500}],"line":500},{"type":"code","value":"const trigger: {\n /**\n * Started by hand, from the API, by an agent, or as a sub-flow. With `input`,\n * what it is started with must match that schema; it is also the schema an\n * agent is shown for the flow's tool.\n */\n manual: (options?: {\n input?: z.ZodType;\n }) => FlowNode;\n /**\n * Started on a five-field cron schedule. With `source`, each tick runs that\n * trigger source, and the flow starts once for each thing it finds.\n */\n schedule: (cron: string, options?: {\n timezone?: string;\n source?: Target;\n /**\n * What names this start for as long as the flow lives. Its address, its pause and\n * when it last fired follow the key when the step is renamed. Left out, the step's\n * own name is the key.\n */\n key?: string;\n /**\n * `skip`, the default, passes over a time while the flow's last run from this\n * trigger is still going. `allow` starts another beside it.\n */\n overlap?: \"allow\" | \"skip\";\n /** CEL expressions over `trigger` that tag each run it starts. */\n tags?: string[];\n }) => FlowNode;\n /**\n * Started by a request to the flow's webhook address. With `source`, each\n * request is handed to that trigger source, which decides what starts.\n */\n webhook: (options?: {\n input?: \"body\" | \"request\";\n verify?: WebhookVerify;\n source?: Target;\n /** `flow` holds the request open, for up to 25 seconds, for a respond step to answer. */\n respond?: \"now\" | \"flow\";\n /** CEL expressions over `trigger` that tag each run it starts. */\n tags?: string[];\n /**\n * What names this start for as long as the flow lives. Its address, its pause and\n * when it last fired follow the key when the step is renamed. Left out, the step's\n * own name is the key.\n */\n key?: string;\n }) => FlowNode;\n /** Started when someone sends the form, which the platform serves as a page. The input is the fields. */\n form: ({ key, ...options }: FormOptions & {\n key?: string;\n }) => FlowNode;\n /** Started when an event is published. `filter` is CEL over `event.payload`. */\n event: (event: Target, options?: {\n filter?: string;\n key?: string;\n tags?: string[];\n }) => FlowNode;\n}","lang":"ts","line":502},{"type":"heading","depth":2,"id":"interfaces","children":[{"type":"text","value":"Interfaces","line":565}],"line":565},{"type":"heading","depth":3,"id":"aggregated","children":[{"type":"text","value":"Aggregated","line":567}],"line":567},{"type":"paragraph","children":[{"type":"text","value":"Totals, one item for each group. With no groups there is one item.","line":569}],"line":569},{"type":"code","value":"interface Aggregated","lang":"ts","line":571},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":575}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":575}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":575}]}],"line":575},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"items","line":577}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"{ /** The group's values, under the names in ","line":577},{"type":"text","value":"group","line":577},{"type":"inlineCode","value":". */ by: Record<string, unknown>; /** The totals, under the names in ","line":577},{"type":"text","value":"measures","line":577},{"type":"inlineCode","value":". */ values: Record<string, number | string | null>; }[]","line":577}]},{"type":"tableCell","children":[]}],"line":577},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"truncated","line":578}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"boolean","line":578}]},{"type":"tableCell","children":[{"type":"text","value":"True when there were more groups than ","line":578},{"type":"inlineCode","value":"limit","line":578},{"type":"text","value":".","line":578}]}],"line":578}],"line":575},{"type":"heading","depth":3,"id":"aggregateoptions","children":[{"type":"text","value":"AggregateOptions","line":580}],"line":580},{"type":"paragraph","children":[{"type":"text","value":"What ","line":582},{"type":"inlineCode","value":"aggregate","line":582},{"type":"text","value":" takes: the columns to group by, the values to work out and the filter to count rows by.","line":582}],"line":582},{"type":"code","value":"interface AggregateOptions","lang":"ts","line":584},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":588}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":588}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":588}]}],"line":588},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"group?","line":590}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string[]","line":590}]},{"type":"tableCell","children":[{"type":"text","value":"Columns to group by, up to three. A date or a time can be gathered into periods: ","line":590},{"type":"inlineCode","value":"\"created_at:month\"","line":590},{"type":"text","value":", with ","line":590},{"type":"inlineCode","value":"day","line":590},{"type":"text","value":", ","line":590},{"type":"inlineCode","value":"week","line":590},{"type":"text","value":", ","line":590},{"type":"inlineCode","value":"month","line":590},{"type":"text","value":" or ","line":590},{"type":"inlineCode","value":"year","line":590},{"type":"text","value":".","line":590}]}],"line":590},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"measures?","line":591}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string[]","line":591}]},{"type":"tableCell","children":[{"type":"text","value":"Totals to work out, up to five: ","line":591},{"type":"inlineCode","value":"\"count\"","line":591},{"type":"text","value":", ","line":591},{"type":"inlineCode","value":"\"count:column\"","line":591},{"type":"text","value":", ","line":591},{"type":"inlineCode","value":"\"sum:column\"","line":591},{"type":"text","value":", ","line":591},{"type":"inlineCode","value":"\"avg:column\"","line":591},{"type":"text","value":", ","line":591},{"type":"inlineCode","value":"\"min:column\"","line":591},{"type":"text","value":", ","line":591},{"type":"inlineCode","value":"\"max:column\"","line":591},{"type":"text","value":". Without any, rows are counted.","line":591}]}],"line":591},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"filter?","line":592}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"Filter","line":592}]},{"type":"tableCell","children":[]}],"line":592},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"sort?","line":593}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string[]","line":593}]},{"type":"tableCell","children":[{"type":"text","value":"Names as they come back, a group's or a total's. A leading minus sorts downwards.","line":593}]}],"line":593},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"limit?","line":594}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"number","line":594}]},{"type":"tableCell","children":[{"type":"text","value":"The most groups to return. At most 1,000. Default 200.","line":594}]}],"line":594}],"line":588},{"type":"heading","depth":3,"id":"appdefinition","children":[{"type":"text","value":"AppDefinition","line":596}],"line":596},{"type":"paragraph","children":[{"type":"text","value":"An app made with ","line":598},{"type":"inlineCode","value":"defineApp","line":598},{"type":"text","value":".","line":598}],"line":598},{"type":"code","value":"interface AppDefinition extends ResourceDefinition","lang":"ts","line":600},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":604}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":604}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":604}]}],"line":604},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"kind","line":606}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"\"app\"","line":606}]},{"type":"tableCell","children":[]}],"line":606},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"source?","line":607}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":607}]},{"type":"tableCell","children":[{"type":"text","value":"Read by the build. Not part of the manifest. Absent for an app that serves an interface.","line":607}]}],"line":607}],"line":604},{"type":"heading","depth":3,"id":"authoredmanifest","children":[{"type":"text","value":"AuthoredManifest","line":609}],"line":609},{"type":"paragraph","children":[{"type":"text","value":"An authored manifest, before the control plane assigns a workspace, ID and version.","line":611}],"line":611},{"type":"code","value":"interface AuthoredManifest","lang":"ts","line":613},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":617}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":617}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":617}]}],"line":617},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"kind","line":619}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":619}]},{"type":"tableCell","children":[]}],"line":619},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"schemaVersion","line":620}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"number","line":620}]},{"type":"tableCell","children":[]}],"line":620},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"path","line":621}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":621}]},{"type":"tableCell","children":[]}],"line":621},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"key?","line":622}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":622}]},{"type":"tableCell","children":[]}],"line":622},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"title?","line":623}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":623}]},{"type":"tableCell","children":[]}],"line":623},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"mcp?","line":624}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"ToolName","line":624}]},{"type":"tableCell","children":[]}],"line":624},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"ownership","line":625}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"\"code\"","line":625}]},{"type":"tableCell","children":[]}],"line":625},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"body","line":626}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"Record<string, unknown>","line":626}]},{"type":"tableCell","children":[]}],"line":626}],"line":617},{"type":"heading","depth":3,"id":"columnoptions","children":[{"type":"text","value":"ColumnOptions","line":628}],"line":628},{"type":"paragraph","children":[{"type":"text","value":"What a column may say beside its type: what it holds, whether it is required or unique, and its default.","line":630}],"line":630},{"type":"code","value":"interface ColumnOptions<Required extends boolean = boolean>","lang":"ts","line":632},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":636}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":636}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":636}]}],"line":636},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"description?","line":638}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":638}]},{"type":"tableCell","children":[{"type":"text","value":"What the column holds, in plain text. Shown on its heading and where documentation names it.","line":638}]}],"line":638},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"required?","line":639}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"Required","line":639}]},{"type":"tableCell","children":[{"type":"text","value":"A row must have a value.","line":639}]}],"line":639},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"unique?","line":640}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"boolean","line":640}]},{"type":"tableCell","children":[{"type":"text","value":"No two rows may share a value.","line":640}]}],"line":640},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"default?","line":641}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"unknown","line":641}]},{"type":"tableCell","children":[{"type":"text","value":"Used when a row gives no value, and for existing rows when the column is added.","line":641}]}],"line":641},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"renamedFrom?","line":642}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":642}]},{"type":"tableCell","children":[{"type":"text","value":"The column's previous name. Its data is kept. Without this, a new name is a new, empty column.","line":642}]}],"line":642}],"line":636},{"type":"heading","depth":3,"id":"columnspec","children":[{"type":"text","value":"ColumnSpec","line":644}],"line":644},{"type":"paragraph","children":[{"type":"text","value":"One column of a table definition. ","line":646},{"type":"inlineCode","value":"Value","line":646},{"type":"text","value":" is its type in a row.","line":646}],"line":646},{"type":"code","value":"interface ColumnSpec<Value, Required extends boolean, Defaulted extends boolean = false>","lang":"ts","line":648},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":652}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":652}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":652}]}],"line":652},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"manifest","line":654}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"Record<string, unknown>","line":654}]},{"type":"tableCell","children":[]}],"line":654},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"__value?","line":655}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"Value","line":655}]},{"type":"tableCell","children":[{"type":"text","value":"Only for type inference. Never set.","line":655}]}],"line":655},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"__required?","line":656}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"Required","line":656}]},{"type":"tableCell","children":[]}],"line":656},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"__defaulted?","line":657}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"Defaulted","line":657}]},{"type":"tableCell","children":[{"type":"text","value":"Whether the column has a default, so a row may be written without it.","line":657}]}],"line":657}],"line":652},{"type":"heading","depth":3,"id":"connectiontest","children":[{"type":"text","value":"ConnectionTest","line":659}],"line":659},{"type":"paragraph","children":[{"type":"text","value":"What trying a connection found.","line":661}],"line":661},{"type":"code","value":"interface ConnectionTest","lang":"ts","line":663},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":667}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":667}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":667}]}],"line":667},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"status?","line":669}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"number","line":669}]},{"type":"tableCell","children":[{"type":"text","value":"The status the system answered with, for one that has statuses.","line":669}]}],"line":669},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"message?","line":670}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":670}]},{"type":"tableCell","children":[{"type":"text","value":"Anything else worth showing a person.","line":670}]}],"line":670}],"line":667},{"type":"heading","depth":3,"id":"connector","children":[{"type":"text","value":"Connector","line":672}],"line":672},{"type":"paragraph","children":[{"type":"text","value":"An adapter for one kind of external system.","line":674}],"line":674},{"type":"code","value":"interface Connector<Config, Client>","lang":"ts","line":676},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":680}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":680}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":680}]}],"line":680},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"name","line":682}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":682}]},{"type":"tableCell","children":[{"type":"text","value":"The name a connection resource refers to in its ","line":682},{"type":"inlineCode","value":"connector","line":682},{"type":"text","value":" field.","line":682}]}],"line":682},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"configSchema","line":683}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"object","line":683}]},{"type":"tableCell","children":[{"type":"text","value":"JSON Schema for a connection's configuration.","line":683}]}],"line":683},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"create","line":684}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(config: Config, credential: string | undefined, signal: AbortSignal): Client","line":684}]},{"type":"tableCell","children":[{"type":"text","value":"Builds the client a script receives. ","line":684},{"type":"inlineCode","value":"credential","line":684},{"type":"text","value":" is the connection's secret, when it has one. ","line":684},{"type":"inlineCode","value":"signal","line":684},{"type":"text","value":" aborts when the run is canceled.","line":684}]}],"line":684},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"test?","line":685}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(config: Config, credential: string | undefined, signal: AbortSignal): Promise<ConnectionTest>","line":685}]},{"type":"tableCell","children":[{"type":"text","value":"Tries a connection without doing anything with it: what the console's Test button runs. Resolves with what it found, or throws why it could not reach it. A connector without it is tested by building its client.","line":685}]}],"line":685}],"line":680},{"type":"heading","depth":3,"id":"connectordefinition","children":[{"type":"text","value":"ConnectorDefinition","line":687}],"line":687},{"type":"paragraph","children":[{"type":"text","value":"A connector made with ","line":689},{"type":"inlineCode","value":"defineConnector","line":689},{"type":"text","value":", which connections of your own name.","line":689}],"line":689},{"type":"code","value":"interface ConnectorDefinition<Config, Client> extends ResourceDefinition","lang":"ts","line":691},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":695}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":695}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":695}]}],"line":695},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"kind","line":697}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"\"connector\"","line":697}]},{"type":"tableCell","children":[]}],"line":697},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"create","line":698}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(config: Config, credential: string | undefined, signal: AbortSignal): Client","line":698}]},{"type":"tableCell","children":[]}],"line":698},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"test?","line":699}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(config: Config, credential: string | undefined, signal: AbortSignal): Promise<ConnectionTest>","line":699}]},{"type":"tableCell","children":[]}],"line":699}],"line":695},{"type":"heading","depth":3,"id":"dashboardoptions","children":[{"type":"text","value":"DashboardOptions","line":701}],"line":701},{"type":"paragraph","children":[{"type":"text","value":"What ","line":703},{"type":"inlineCode","value":"defineDashboard","line":703},{"type":"text","value":" takes: its path and the widgets it is made of.","line":703}],"line":703},{"type":"code","value":"interface DashboardOptions extends Omit<ResourceNames, \"title\">, DashboardBody","lang":"ts","line":705},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":709}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":709}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":709}]}],"line":709},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"path","line":711}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":711}]},{"type":"tableCell","children":[{"type":"text","value":"Unique within the workspace, for example ","line":711},{"type":"inlineCode","value":"boards/clinic-visits","line":711},{"type":"text","value":".","line":711}]}],"line":711}],"line":709},{"type":"heading","depth":3,"id":"findoptions","children":[{"type":"text","value":"FindOptions","line":713}],"line":713},{"type":"paragraph","children":[{"type":"text","value":"What ","line":715},{"type":"inlineCode","value":"find","line":715},{"type":"text","value":" takes: a filter, the order, how many rows and where to start.","line":715}],"line":715},{"type":"code","value":"interface FindOptions","lang":"ts","line":717},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":721}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":721}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":721}]}],"line":721},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"filter?","line":723}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"Filter","line":723}]},{"type":"tableCell","children":[]}],"line":723},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"sort?","line":724}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string[]","line":724}]},{"type":"tableCell","children":[{"type":"text","value":"Column names. A leading minus sorts that column downwards.","line":724}]}],"line":724},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"limit?","line":725}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"number","line":725}]},{"type":"tableCell","children":[{"type":"text","value":"At most 1,000. Default 50.","line":725}]}],"line":725},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"offset?","line":726}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"number","line":726}]},{"type":"tableCell","children":[]}],"line":726}],"line":721},{"type":"heading","depth":3,"id":"httpclient","children":[{"type":"text","value":"HttpClient","line":728}],"line":728},{"type":"paragraph","children":[{"type":"text","value":"What a script is given for an ","line":730},{"type":"inlineCode","value":"http","line":730},{"type":"text","value":" or ","line":730},{"type":"inlineCode","value":"oauth2","line":730},{"type":"text","value":" connection: requests to the connection's own address.","line":730}],"line":730},{"type":"code","value":"interface HttpClient","lang":"ts","line":732},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":736}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":736}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":736}]}],"line":736},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"request","line":738}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(path: string, options?: HttpRequest): Promise<HttpResponse>","line":738}]},{"type":"tableCell","children":[]}],"line":738},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"get","line":739}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(path: string, options?: HttpRequest): Promise<HttpResponse>","line":739}]},{"type":"tableCell","children":[]}],"line":739},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"post","line":740}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(path: string, json?: unknown, options?: HttpRequest): Promise<HttpResponse>","line":740}]},{"type":"tableCell","children":[]}],"line":740}],"line":736},{"type":"heading","depth":3,"id":"httpconfig","children":[{"type":"text","value":"HttpConfig","line":742}],"line":742},{"type":"paragraph","children":[{"type":"text","value":"The configuration of an ","line":744},{"type":"inlineCode","value":"http","line":744},{"type":"text","value":" connection: its address, the headers sent with every request and how the credential is sent.","line":744}],"line":744},{"type":"code","value":"interface HttpConfig","lang":"ts","line":746},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":750}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":750}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":750}]}],"line":750},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"baseUrl","line":752}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":752}]},{"type":"tableCell","children":[]}],"line":752},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"headers?","line":753}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"Record<string, string>","line":753}]},{"type":"tableCell","children":[{"type":"text","value":"Sent with every request. Not for credentials.","line":753}]}],"line":753},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"testPath?","line":754}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":754}]},{"type":"tableCell","children":[{"type":"text","value":"A path under the base address that a Test asks for, such as ","line":754},{"type":"inlineCode","value":"/health","line":754},{"type":"text","value":". Left out, the Test asks for the base address itself.","line":754}]}],"line":754},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"auth?","line":755}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"{ type: \"bearer\"; } | { type: \"header\"; name: string; } | { type: \"basic\"; username: string; }","line":755}]},{"type":"tableCell","children":[{"type":"text","value":"How the connection's credential is sent.","line":755}]}],"line":755}],"line":750},{"type":"heading","depth":3,"id":"httprequest","children":[{"type":"text","value":"HttpRequest","line":757}],"line":757},{"type":"paragraph","children":[{"type":"text","value":"What a request of an ","line":759},{"type":"inlineCode","value":"HttpClient","line":759},{"type":"text","value":" may say beside its path: the method, headers, a query and a body.","line":759}],"line":759},{"type":"code","value":"interface HttpRequest","lang":"ts","line":761},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":765}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":765}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":765}]}],"line":765},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"method?","line":767}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":767}]},{"type":"tableCell","children":[]}],"line":767},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"headers?","line":768}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"Record<string, string>","line":768}]},{"type":"tableCell","children":[]}],"line":768},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"query?","line":769}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"Record<string, string | number | boolean | undefined>","line":769}]},{"type":"tableCell","children":[]}],"line":769},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"json?","line":770}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"unknown","line":770}]},{"type":"tableCell","children":[{"type":"text","value":"Sent as a JSON body.","line":770}]}],"line":770},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"body?","line":771}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":771}]},{"type":"tableCell","children":[]}],"line":771},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"allowFailure?","line":772}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"boolean","line":772}]},{"type":"tableCell","children":[{"type":"text","value":"Do not throw on a 4xx or 5xx status.","line":772}]}],"line":772}],"line":765},{"type":"heading","depth":3,"id":"httpresponse","children":[{"type":"text","value":"HttpResponse","line":774}],"line":774},{"type":"paragraph","children":[{"type":"text","value":"What an ","line":776},{"type":"inlineCode","value":"HttpClient","line":776},{"type":"text","value":" gets back: the status, the headers, the body as text and a way to read it as JSON.","line":776}],"line":776},{"type":"code","value":"interface HttpResponse","lang":"ts","line":778},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":782}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":782}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":782}]}],"line":782},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"status","line":784}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"number","line":784}]},{"type":"tableCell","children":[]}],"line":784},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"ok","line":785}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"boolean","line":785}]},{"type":"tableCell","children":[]}],"line":785},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"headers","line":786}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"Record<string, string>","line":786}]},{"type":"tableCell","children":[]}],"line":786},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"text","line":787}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":787}]},{"type":"tableCell","children":[]}],"line":787},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"json","line":788}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"<T = unknown>(): T","line":788}]},{"type":"tableCell","children":[{"type":"text","value":"The body parsed as JSON. Throws if it is not JSON.","line":788}]}],"line":788}],"line":782},{"type":"heading","depth":3,"id":"interfaceoptions","children":[{"type":"text","value":"InterfaceOptions","line":790}],"line":790},{"type":"paragraph","children":[{"type":"text","value":"What ","line":792},{"type":"inlineCode","value":"defineInterface","line":792},{"type":"text","value":" takes: its path and the pages it is made of.","line":792}],"line":792},{"type":"code","value":"interface InterfaceOptions extends Omit<ResourceNames, \"title\">, InterfaceBody","lang":"ts","line":794},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":798}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":798}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":798}]}],"line":798},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"path","line":800}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":800}]},{"type":"tableCell","children":[{"type":"text","value":"Unique within the workspace, for example ","line":800},{"type":"inlineCode","value":"screens/invoices","line":800},{"type":"text","value":".","line":800}]}],"line":800}],"line":798},{"type":"heading","depth":3,"id":"logger","children":[{"type":"text","value":"Logger","line":802}],"line":802},{"type":"paragraph","children":[{"type":"text","value":"What a script writes its log with. Each line is kept with the run, and the secrets the script uses are masked in it.","line":804}],"line":804},{"type":"code","value":"interface Logger","lang":"ts","line":806},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":810}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":810}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":810}]}],"line":810},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"debug","line":812}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(message: string, fields?: Record<string, unknown>): void","line":812}]},{"type":"tableCell","children":[]}],"line":812},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"info","line":813}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(message: string, fields?: Record<string, unknown>): void","line":813}]},{"type":"tableCell","children":[]}],"line":813},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"warn","line":814}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(message: string, fields?: Record<string, unknown>): void","line":814}]},{"type":"tableCell","children":[]}],"line":814},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"error","line":815}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(message: string, fields?: Record<string, unknown>): void","line":815}]},{"type":"tableCell","children":[]}],"line":815}],"line":810},{"type":"heading","depth":3,"id":"mailmessage","children":[{"type":"text","value":"MailMessage","line":817}],"line":817},{"type":"paragraph","children":[{"type":"text","value":"A message to send through an ","line":819},{"type":"inlineCode","value":"smtp","line":819},{"type":"text","value":" connection.","line":819}],"line":819},{"type":"code","value":"interface MailMessage","lang":"ts","line":821},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":825}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":825}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":825}]}],"line":825},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"to","line":827}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string | string[]","line":827}]},{"type":"tableCell","children":[{"type":"text","value":"One address or several.","line":827}]}],"line":827},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"cc?","line":828}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string | string[]","line":828}]},{"type":"tableCell","children":[]}],"line":828},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"bcc?","line":829}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string | string[]","line":829}]},{"type":"tableCell","children":[]}],"line":829},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"replyTo?","line":830}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":830}]},{"type":"tableCell","children":[]}],"line":830},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"subject","line":831}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":831}]},{"type":"tableCell","children":[]}],"line":831},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"text?","line":832}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":832}]},{"type":"tableCell","children":[{"type":"text","value":"The message as plain text. Give this, ","line":832},{"type":"inlineCode","value":"html","line":832},{"type":"text","value":", or both.","line":832}]}],"line":832},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"html?","line":833}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":833}]},{"type":"tableCell","children":[]}],"line":833}],"line":825},{"type":"heading","depth":3,"id":"oauth2config","children":[{"type":"text","value":"OAuth2Config","line":835}],"line":835},{"type":"paragraph","children":[{"type":"text","value":"An API reached with OAuth 2.0: a member authorizes it once in the console,","line":837},{"type":"break","hard":false,"line":837},{"type":"text","value":"and the platform keeps the tokens and refreshes them. A worker is handed the","line":838},{"type":"break","hard":false,"line":838},{"type":"text","value":"access token alone, never the refresh token or the client's secret.","line":839}],"line":837},{"type":"code","value":"interface OAuth2Config","lang":"ts","line":841},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":845}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":845}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":845}]}],"line":845},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"baseUrl","line":847}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":847}]},{"type":"tableCell","children":[{"type":"text","value":"Where the API is. Every request goes here, as with an http connection.","line":847}]}],"line":847},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"authorizeUrl","line":848}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":848}]},{"type":"tableCell","children":[{"type":"text","value":"The provider's authorization endpoint, where a member is sent to agree.","line":848}]}],"line":848},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"tokenUrl","line":849}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":849}]},{"type":"tableCell","children":[{"type":"text","value":"The provider's token endpoint. Only the control plane calls it.","line":849}]}],"line":849},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"clientId","line":850}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":850}]},{"type":"tableCell","children":[]}],"line":850},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"scopes?","line":851}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string[]","line":851}]},{"type":"tableCell","children":[]}],"line":851},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"authorizeParams?","line":852}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"Record<string, string>","line":852}]},{"type":"tableCell","children":[{"type":"text","value":"Added to the authorization request, such as ","line":852},{"type":"inlineCode","value":"{ access_type: \"offline\" }","line":852},{"type":"text","value":" for Google.","line":852}]}],"line":852},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"clientAuth?","line":853}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"\"body\" | \"basic\"","line":853}]},{"type":"tableCell","children":[{"type":"text","value":"How the client authenticates to the token endpoint: in the body, or with HTTP Basic.","line":853}]}],"line":853},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"headers?","line":854}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"Record<string, string>","line":854}]},{"type":"tableCell","children":[{"type":"text","value":"Sent with every request. Not for credentials.","line":854}]}],"line":854},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"testPath?","line":855}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":855}]},{"type":"tableCell","children":[{"type":"text","value":"What Test asks for, below the base URL. The base URL itself when left out.","line":855}]}],"line":855}],"line":845},{"type":"heading","depth":3,"id":"pollresult","children":[{"type":"text","value":"PollResult","line":857}],"line":857},{"type":"paragraph","children":[{"type":"text","value":"What a polling trigger source answers.","line":859}],"line":859},{"type":"code","value":"interface PollResult<Cursor = unknown>","lang":"ts","line":861},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":865}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":865}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":865}]}],"line":865},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"items","line":867}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"unknown[]","line":867}]},{"type":"tableCell","children":[{"type":"text","value":"Each starts the trigger's script or flow. At most 100 a tick: a tick that gives more fails, starts nothing and keeps the cursor it had, so give fewer, and the rest on the next tick.","line":867}]}],"line":867},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"cursor?","line":868}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"Cursor","line":868}]},{"type":"tableCell","children":[{"type":"text","value":"Where to pick up from next time. Left out, the place it had is kept.","line":868}]}],"line":868}],"line":865},{"type":"heading","depth":3,"id":"polltick","children":[{"type":"text","value":"PollTick","line":870}],"line":870},{"type":"paragraph","children":[{"type":"text","value":"What a polling trigger source is handed on each tick.","line":872}],"line":872},{"type":"code","value":"interface PollTick<Cursor = unknown>","lang":"ts","line":874},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":878}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":878}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":878}]}],"line":878},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"cursor","line":880}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"Cursor | null","line":880}]},{"type":"tableCell","children":[{"type":"text","value":"What the source gave back as ","line":880},{"type":"inlineCode","value":"cursor","line":880},{"type":"text","value":" last time. Null the first time.","line":880}]}],"line":880},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"scheduledFor","line":881}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":881}]},{"type":"tableCell","children":[{"type":"text","value":"When this tick was due.","line":881}]}],"line":881}],"line":878},{"type":"heading","depth":3,"id":"resourcedefinition","children":[{"type":"text","value":"ResourceDefinition","line":883}],"line":883},{"type":"paragraph","children":[{"type":"text","value":"Something a tenant repository exports for the build to pick up.","line":885}],"line":885},{"type":"code","value":"interface ResourceDefinition","lang":"ts","line":887},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":891}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":891}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":891}]}],"line":891},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"[RESOURCE]","line":893}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"true","line":893}]},{"type":"tableCell","children":[]}],"line":893},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"kind","line":894}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":894}]},{"type":"tableCell","children":[]}],"line":894},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"path","line":895}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":895}]},{"type":"tableCell","children":[]}],"line":895},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"toManifest","line":896}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(entry: string): AuthoredManifest","line":896}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"entry","line":896},{"type":"text","value":" is the name this definition is exported under.","line":896}]}],"line":896}],"line":891},{"type":"heading","depth":3,"id":"resourcenames","children":[{"type":"text","value":"ResourceNames","line":898}],"line":898},{"type":"paragraph","children":[{"type":"text","value":"The names every resource has beside its path. The path is its address and can","line":900},{"type":"break","hard":false,"line":900},{"type":"text","value":"change. The key is its identity and never does.","line":901}],"line":900},{"type":"code","value":"interface ResourceNames","lang":"ts","line":903},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":907}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":907}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":907}]}],"line":907},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"key?","line":909}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":909}]},{"type":"tableCell","children":[{"type":"text","value":"The resource's identity. Leave it out: it is the path the resource is made at. Say it only when you move a resource to another path, as the path it had, so that it stays the same resource with its history, its data and what was bound to it.","line":909}]}],"line":909},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"title?","line":910}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":910}]},{"type":"tableCell","children":[{"type":"text","value":"What people read, in the console and in lists.","line":910}]}],"line":910}],"line":907},{"type":"heading","depth":3,"id":"runinfo","children":[{"type":"text","value":"RunInfo","line":912}],"line":912},{"type":"paragraph","children":[{"type":"text","value":"What a script knows about the run it is in: its ID, which attempt it is, and a key that stays the same across attempts.","line":914}],"line":914},{"type":"code","value":"interface RunInfo","lang":"ts","line":916},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":920}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":920}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":920}]}],"line":920},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"id","line":922}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":922}]},{"type":"tableCell","children":[]}],"line":922},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"attempt","line":923}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"number","line":923}]},{"type":"tableCell","children":[{"type":"text","value":"1 on the first attempt. A retry is a new attempt of the same run.","line":923}]}],"line":923},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"idempotencyKey","line":924}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":924}]},{"type":"tableCell","children":[{"type":"text","value":"Stable across attempts of this run. Pass it to the systems you call, so a retried run does not repeat what the first attempt already did.","line":924}]}],"line":924},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"trigger","line":925}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"{ type: string; [detail: string]: unknown; }","line":925}]},{"type":"tableCell","children":[]}],"line":925},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"startedBy","line":926}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"{ type: string; id: string | null; }","line":926}]},{"type":"tableCell","children":[{"type":"text","value":"Who started the run: a ","line":926},{"type":"inlineCode","value":"member","line":926},{"type":"text","value":", an ","line":926},{"type":"inlineCode","value":"end_user","line":926},{"type":"text","value":" or a ","line":926},{"type":"inlineCode","value":"service_account","line":926},{"type":"text","value":", with their ID, or ","line":926},{"type":"inlineCode","value":"system","line":926},{"type":"text","value":" for a schedule, a webhook or an event. A script started from an app reads and writes for that person with ","line":926},{"type":"inlineCode","value":"ctx.table(orders).as(ctx.run.startedBy.id)","line":926},{"type":"text","value":".","line":926}]}],"line":926},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"tag","line":927}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(...tags: string[]): Promise<void>","line":927}]},{"type":"tableCell","children":[{"type":"text","value":"Labels the run, so it can be found by them: ","line":927},{"type":"inlineCode","value":"await ctx.run.tag(\"order:1234\")","line":927},{"type":"text","value":". At most 10 per run, each up to 64 characters of ","line":927},{"type":"inlineCode","value":"a-z","line":927},{"type":"text","value":", ","line":927},{"type":"inlineCode","value":"0-9","line":927},{"type":"text","value":" and ","line":927},{"type":"inlineCode","value":"_.:-","line":927},{"type":"text","value":". A step of a flow labels its flow run too.","line":927}]}],"line":927}],"line":920},{"type":"heading","depth":3,"id":"scriptcontext","children":[{"type":"text","value":"ScriptContext","line":929}],"line":929},{"type":"paragraph","children":[{"type":"text","value":"What a script receives when it runs.","line":931}],"line":931},{"type":"code","value":"interface ScriptContext","lang":"ts","line":933},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":937}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":937}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":937}]}],"line":937},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"connection","line":939}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"<Client = import(\"./http.js\").HttpClient>(path: KnownOr<keyof VolvelConnections>): Promise<Client>","line":939}]},{"type":"tableCell","children":[{"type":"text","value":"A client for a connection the script declared.","line":939}]}],"line":939},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"connections","line":940}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"<Client = import(\"./http.js\").HttpClient>(group: string | { path: string; }): { /** A client for the member with this key. Throws when the group has no such member. */ get(key: string): Promise<Client>; /** The members the group has in this workspace. */ keys(): Promise<{ key: string; label: string; }[]>; }","line":940}]},{"type":"tableCell","children":[{"type":"text","value":"A connection group the script declared. Its members are added per workspace in the console, so which one to use is decided by data: ","line":940},{"type":"inlineCode","value":"await ctx.connections(\"shops\").get(input.shop)","line":940},{"type":"text","value":".","line":940}]}],"line":940},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"secret","line":941}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(name: string): Promise<string>","line":941}]},{"type":"tableCell","children":[{"type":"text","value":"The value of a secret the script declared.","line":941}]}],"line":941},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"variable","line":942}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(path: KnownOr<keyof VolvelVariables>): Promise<string>","line":942}]},{"type":"tableCell","children":[{"type":"text","value":"The value of a variable the script declared.","line":942}]}],"line":942},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"table","line":943}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"<Name extends keyof VolvelTables>(table: Name): import(\"./tables.js\").TableClient<VolvelTables[Name] extends { row: infer Row; } ? Row : never, VolvelTables[Name] extends { insert: infer Insert; } ? Insert : never>","line":943}]},{"type":"tableCell","children":[{"type":"text","value":"The rows of a table the script declared. Typed by the table's path when the generated file knows it, and when given the table's definition.","line":943}]}],"line":943},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"table","line":944}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"<Row = Record<string, unknown>, Insert = Partial<Row>>(table: string | { path: string; __row?: Row; __insert?: Insert; }): import(\"./tables.js\").TableClient<Row, Insert>","line":944}]},{"type":"tableCell","children":[]}],"line":944},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"source","line":945}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(path: string | { path: string; }): { table(name: string): import(\"./tables.js\").TableClient<Record<string, unknown>>; }","line":945}]},{"type":"tableCell","children":[{"type":"text","value":"An external data source the script declared.","line":945}]}],"line":945},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"files","line":946}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"{ /** Stores a file in the workspace and gives its ID, for a ","line":946},{"type":"text","value":"file","line":946},{"type":"inlineCode","value":" column or for later. */ put(name: string, content: Uint8Array | string, contentType?: string): Promise<{ id: string; }>; get(id: string): Promise<{ name: string; contentType: string; content: Uint8Array; }>; }","line":946}]},{"type":"tableCell","children":[]}],"line":946},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"events","line":947}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"{ /** Publishes an event the script declared. Its subscribers are started before this returns. */ publish<Name extends keyof VolvelEvents>(event: Name, payload: VolvelEvents[Name]): Promise<void>; publish<Name extends string>(event: Name extends keyof VolvelEvents ? never : Name, payload: Record<string, unknown>): Promise<void>; }","line":947}]},{"type":"tableCell","children":[]}],"line":947},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"log","line":948}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"Logger","line":948}]},{"type":"tableCell","children":[]}],"line":948},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"run","line":949}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"RunInfo","line":949}]},{"type":"tableCell","children":[]}],"line":949},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"signal","line":950}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"AbortSignal","line":950}]},{"type":"tableCell","children":[{"type":"text","value":"Aborts when the run is canceled or runs out of time. Pass it to anything slow.","line":950}]}],"line":950}],"line":937},{"type":"heading","depth":3,"id":"scriptdefinition","children":[{"type":"text","value":"ScriptDefinition","line":952}],"line":952},{"type":"paragraph","children":[{"type":"text","value":"A script made with ","line":954},{"type":"inlineCode","value":"defineScript","line":954},{"type":"text","value":". The build finds it among a repository's exports.","line":954}],"line":954},{"type":"code","value":"interface ScriptDefinition extends ResourceDefinition","lang":"ts","line":956},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":960}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":960}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":960}]}],"line":960},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"kind","line":962}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"\"script\"","line":962}]},{"type":"tableCell","children":[]}],"line":962},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"execute","line":963}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(input: unknown, ctx: ScriptContext): Promise<unknown>","line":963}]},{"type":"tableCell","children":[{"type":"text","value":"Validates the input, runs the script and validates what it returns.","line":963}]}],"line":963}],"line":960},{"type":"heading","depth":3,"id":"smtpclient","children":[{"type":"text","value":"SmtpClient","line":965}],"line":965},{"type":"paragraph","children":[{"type":"text","value":"What a script is given for an ","line":967},{"type":"inlineCode","value":"smtp","line":967},{"type":"text","value":" connection.","line":967}],"line":967},{"type":"code","value":"interface SmtpClient","lang":"ts","line":969},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":973}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":973}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":973}]}],"line":973},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"send","line":975}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(message: MailMessage): Promise<{ messageId: string; }>","line":975}]},{"type":"tableCell","children":[{"type":"text","value":"Sends one message. Resolves once the server has taken it, with the ID the server gave it.","line":975}]}],"line":975}],"line":973},{"type":"heading","depth":3,"id":"smtpconfig","children":[{"type":"text","value":"SmtpConfig","line":977}],"line":977},{"type":"paragraph","children":[{"type":"text","value":"A connection to a mail server, for the built-in ","line":979},{"type":"inlineCode","value":"smtp","line":979},{"type":"text","value":" connector.","line":979}],"line":979},{"type":"code","value":"interface SmtpConfig","lang":"ts","line":981},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":985}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":985}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":985}]}],"line":985},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"host","line":987}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":987}]},{"type":"tableCell","children":[]}],"line":987},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"port?","line":988}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"number","line":988}]},{"type":"tableCell","children":[{"type":"text","value":"Default 587.","line":988}]}],"line":988},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"security?","line":989}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"\"tls\" | \"starttls\" | \"none\"","line":989}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"tls","line":989},{"type":"text","value":" speaks TLS from the first byte, as port 465 expects. ","line":989},{"type":"inlineCode","value":"starttls","line":989},{"type":"text","value":" upgrades a plain connection and refuses to go on without it. ","line":989},{"type":"inlineCode","value":"none","line":989},{"type":"text","value":" is for a server inside the same network that offers neither. Default ","line":989},{"type":"inlineCode","value":"starttls","line":989},{"type":"text","value":".","line":989}]}],"line":989},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"from","line":990}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":990}]},{"type":"tableCell","children":[{"type":"text","value":"The address mail is sent from: ","line":990},{"type":"inlineCode","value":"orders@example.com","line":990},{"type":"text","value":" or ","line":990},{"type":"inlineCode","value":"Orders <orders@example.com>","line":990},{"type":"text","value":".","line":990}]}],"line":990},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"username?","line":991}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":991}]},{"type":"tableCell","children":[{"type":"text","value":"The user to sign in as. The password is the connection's credential.","line":991}]}],"line":991}],"line":985},{"type":"heading","depth":3,"id":"stepgrants","children":[{"type":"text","value":"StepGrants","line":993}],"line":993},{"type":"paragraph","children":[{"type":"text","value":"What a step hands the script it runs, by path or by definition.","line":995}],"line":995},{"type":"code","value":"interface StepGrants","lang":"ts","line":997},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":1001}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":1001}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":1001}]}],"line":1001},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"connections?","line":1003}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"Target[]","line":1003}]},{"type":"tableCell","children":[]}],"line":1003},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"tables?","line":1004}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"Target[]","line":1004}]},{"type":"tableCell","children":[]}],"line":1004},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"events?","line":1005}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"Target[]","line":1005}]},{"type":"tableCell","children":[]}],"line":1005}],"line":1001},{"type":"heading","depth":3,"id":"systemcolumns","children":[{"type":"text","value":"SystemColumns","line":1007}],"line":1007},{"type":"paragraph","children":[{"type":"text","value":"What every row of a custom table has, whatever its definition.","line":1009}],"line":1009},{"type":"code","value":"interface SystemColumns","lang":"ts","line":1011},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":1015}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":1015}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":1015}]}],"line":1015},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"id","line":1017}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":1017}]},{"type":"tableCell","children":[]}],"line":1017},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"created_at","line":1018}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":1018}]},{"type":"tableCell","children":[]}],"line":1018},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"updated_at","line":1019}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":1019}]},{"type":"tableCell","children":[]}],"line":1019}],"line":1015},{"type":"heading","depth":3,"id":"tableclient","children":[{"type":"text","value":"TableClient","line":1021}],"line":1021},{"type":"paragraph","children":[{"type":"text","value":"Reads and writes the rows of one table.","line":1023}],"line":1023},{"type":"code","value":"interface TableClient<Row, Insert = Partial<Row>>","lang":"ts","line":1025},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":1029}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":1029}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":1029}]}],"line":1029},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"find","line":1031}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(options?: FindOptions): Promise<Row[]>","line":1031}]},{"type":"tableCell","children":[]}],"line":1031},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"get","line":1032}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(id: string): Promise<Row | null>","line":1032}]},{"type":"tableCell","children":[{"type":"text","value":"The row with this ID, or null.","line":1032}]}],"line":1032},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"insert","line":1033}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(row: Insert): Promise<Row>","line":1033}]},{"type":"tableCell","children":[]}],"line":1033},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"insertMany","line":1034}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(rows: Insert[]): Promise<Row[]>","line":1034}]},{"type":"tableCell","children":[{"type":"text","value":"Up to 1,000 rows. Either all are inserted or none.","line":1034}]}],"line":1034},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"update","line":1035}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(id: string, changes: Partial<Insert>): Promise<Row>","line":1035}]},{"type":"tableCell","children":[]}],"line":1035},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"delete","line":1036}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(id: string): Promise<void>","line":1036}]},{"type":"tableCell","children":[]}],"line":1036},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"aggregate","line":1037}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(options?: AggregateOptions): Promise<Aggregated>","line":1037}]},{"type":"tableCell","children":[{"type":"text","value":"Counts, sums, averages, the least and the most, over the rows or over groups of them.","line":1037}]}],"line":1037},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"as","line":1038}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(principalId: string): TableClient<Row, Insert>","line":1038}]},{"type":"tableCell","children":[{"type":"text","value":"The same table as one person sees it: its row policy applies as it would to them. Without this, a script acts as the workspace and reaches every row.","line":1038}]}],"line":1038}],"line":1029},{"type":"heading","depth":3,"id":"tabledefinition","children":[{"type":"text","value":"TableDefinition","line":1040}],"line":1040},{"type":"paragraph","children":[{"type":"text","value":"A table made with ","line":1042},{"type":"inlineCode","value":"defineTable","line":1042},{"type":"text","value":", which carries the type of its rows.","line":1042}],"line":1042},{"type":"code","value":"interface TableDefinition<Row, Insert> extends ResourceDefinition","lang":"ts","line":1044},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":1048}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":1048}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":1048}]}],"line":1048},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"kind","line":1050}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"\"table\"","line":1050}]},{"type":"tableCell","children":[]}],"line":1050},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"__row?","line":1051}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"Row","line":1051}]},{"type":"tableCell","children":[{"type":"text","value":"Only for type inference. Never set.","line":1051}]}],"line":1051},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"__insert?","line":1052}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"Insert","line":1052}]},{"type":"tableCell","children":[]}],"line":1052}],"line":1048},{"type":"heading","depth":3,"id":"tableof","children":[{"type":"text","value":"TableOf","line":1054}],"line":1054},{"type":"paragraph","children":[{"type":"text","value":"A table's types by its path, in the form an app's ","line":1056},{"type":"inlineCode","value":"table<...>(\"path\")","line":1056},{"type":"text","value":" takes where it","line":1056},{"type":"break","hard":false,"line":1056},{"type":"text","value":"took ","line":1057},{"type":"inlineCode","value":"typeof definition","line":1057},{"type":"text","value":": ","line":1057},{"type":"inlineCode","value":"table<TableOf<\"visits\">>(\"visits\")","line":1057},{"type":"text","value":".","line":1057}],"line":1056},{"type":"code","value":"interface TableOf<Name extends keyof VolvelTables>","lang":"ts","line":1059},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":1063}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":1063}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":1063}]}],"line":1063},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"__row?","line":1065}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"Row<Name>","line":1065}]},{"type":"tableCell","children":[]}],"line":1065},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"__insert?","line":1066}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"Insert<Name>","line":1066}]},{"type":"tableCell","children":[]}],"line":1066}],"line":1063},{"type":"heading","depth":3,"id":"toolname","children":[{"type":"text","value":"ToolName","line":1068}],"line":1068},{"type":"paragraph","children":[{"type":"text","value":"The name of the tool an agent is offered for a script or a flow. Without it","line":1070},{"type":"break","hard":false,"line":1070},{"type":"text","value":"the name is made from the path (","line":1071},{"type":"inlineCode","value":"run_orders__sync","line":1071},{"type":"text","value":"), and so changes when the","line":1071},{"type":"break","hard":false,"line":1071},{"type":"text","value":"path does. Choose one for anything an agent is configured to call: lowercase","line":1072},{"type":"break","hard":false,"line":1072},{"type":"text","value":"letters, digits and underscores, starting with a letter, at most 64.","line":1073}],"line":1070},{"type":"code","value":"interface ToolName","lang":"ts","line":1075},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":1079}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":1079}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":1079}]}],"line":1079},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"name","line":1081}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":1081}]},{"type":"tableCell","children":[]}],"line":1081}],"line":1079},{"type":"heading","depth":3,"id":"triggersource","children":[{"type":"text","value":"TriggerSource","line":1083}],"line":1083},{"type":"paragraph","children":[{"type":"text","value":"A way to start runs.","line":1085}],"line":1085},{"type":"code","value":"interface TriggerSource<Body>","lang":"ts","line":1087},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":1091}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":1091}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":1091}]}],"line":1091},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"type","line":1093}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":1093}]},{"type":"tableCell","children":[{"type":"text","value":"The trigger type recorded on each run it starts.","line":1093}]}],"line":1093},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"script","line":1094}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(body: Body): string","line":1094}]},{"type":"tableCell","children":[{"type":"text","value":"The script a trigger resource of this source starts.","line":1094}]}],"line":1094},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"nextFire?","line":1095}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(body: Body, after: Date): Date | null","line":1095}]},{"type":"tableCell","children":[{"type":"text","value":"For sources driven by time: when the trigger next fires after ","line":1095},{"type":"inlineCode","value":"after","line":1095},{"type":"text","value":".","line":1095}]}],"line":1095},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"toInput?","line":1096}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(body: Body, request: { headers: Record<string, string>; body: unknown; }): unknown","line":1096}]},{"type":"tableCell","children":[{"type":"text","value":"For sources driven by a request: the script input for an incoming request.","line":1096}]}],"line":1096}],"line":1091},{"type":"heading","depth":3,"id":"triggersourcedefinition","children":[{"type":"text","value":"TriggerSourceDefinition","line":1098}],"line":1098},{"type":"paragraph","children":[{"type":"text","value":"A trigger source made with ","line":1100},{"type":"inlineCode","value":"defineTriggerSource","line":1100},{"type":"text","value":".","line":1100}],"line":1100},{"type":"code","value":"interface TriggerSourceDefinition extends ResourceDefinition","lang":"ts","line":1102},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":1106}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":1106}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":1106}]}],"line":1106},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"kind","line":1108}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"\"trigger_source\"","line":1108}]},{"type":"tableCell","children":[]}],"line":1108},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"execute","line":1109}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(input: unknown, ctx: ScriptContext): Promise<unknown>","line":1109}]},{"type":"tableCell","children":[]}],"line":1109}],"line":1106},{"type":"heading","depth":3,"id":"volvelconnections","children":[{"type":"text","value":"VolvelConnections","line":1111}],"line":1111},{"type":"paragraph","children":[{"type":"text","value":"The connections of the workspace, by path. Filled by the generated file.","line":1113}],"line":1113},{"type":"code","value":"interface VolvelConnections {\n}","lang":"ts","line":1115},{"type":"heading","depth":3,"id":"volvelevents","children":[{"type":"text","value":"VolvelEvents","line":1120}],"line":1120},{"type":"paragraph","children":[{"type":"text","value":"The events of the workspace, by path, each with its payload. Filled by the generated file.","line":1122}],"line":1122},{"type":"code","value":"interface VolvelEvents {\n}","lang":"ts","line":1124},{"type":"heading","depth":3,"id":"volvelflows","children":[{"type":"text","value":"VolvelFlows","line":1129}],"line":1129},{"type":"paragraph","children":[{"type":"text","value":"The flows of the workspace, by path, each with what a manual start is given. Filled by the generated file.","line":1131}],"line":1131},{"type":"code","value":"interface VolvelFlows {\n}","lang":"ts","line":1133},{"type":"heading","depth":3,"id":"volvelscripts","children":[{"type":"text","value":"VolvelScripts","line":1138}],"line":1138},{"type":"paragraph","children":[{"type":"text","value":"The scripts of the workspace, by path, each with its input and output where it has them. Filled by the generated file.","line":1140}],"line":1140},{"type":"code","value":"interface VolvelScripts {\n}","lang":"ts","line":1142},{"type":"heading","depth":3,"id":"volveltables","children":[{"type":"text","value":"VolvelTables","line":1147}],"line":1147},{"type":"paragraph","children":[{"type":"text","value":"The tables of the workspace, by path, as ","line":1149},{"type":"inlineCode","value":"volvel build","line":1149},{"type":"text","value":" and ","line":1149},{"type":"inlineCode","value":"volvel types","line":1149},{"type":"text","value":" write them into","line":1149},{"type":"break","hard":false,"line":1149},{"type":"inlineCode","value":".platform/volvel-env.d.ts","line":1150},{"type":"text","value":", which adds to this interface. Empty until that file is in the project.","line":1150}],"line":1149},{"type":"code","value":"interface VolvelTables {\n}","lang":"ts","line":1152},{"type":"heading","depth":3,"id":"volvelvariables","children":[{"type":"text","value":"VolvelVariables","line":1157}],"line":1157},{"type":"paragraph","children":[{"type":"text","value":"The variables of the workspace, by path. Filled by the generated file.","line":1159}],"line":1159},{"type":"code","value":"interface VolvelVariables {\n}","lang":"ts","line":1161},{"type":"heading","depth":3,"id":"webhookrequest","children":[{"type":"text","value":"WebhookRequest","line":1166}],"line":1166},{"type":"paragraph","children":[{"type":"text","value":"What a webhook's script is given when ","line":1168},{"type":"inlineCode","value":"input","line":1168},{"type":"text","value":" is ","line":1168},{"type":"inlineCode","value":"request","line":1168},{"type":"text","value":".","line":1168}],"line":1168},{"type":"code","value":"interface WebhookRequest<Body = unknown>","lang":"ts","line":1170},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":1174}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":1174}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":1174}]}],"line":1174},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"method","line":1176}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":1176}]},{"type":"tableCell","children":[]}],"line":1176},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"headers","line":1177}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"Record<string, string>","line":1177}]},{"type":"tableCell","children":[{"type":"text","value":"Lower-case names. The sender's own ","line":1177},{"type":"inlineCode","value":"authorization","line":1177},{"type":"text","value":" and ","line":1177},{"type":"inlineCode","value":"cookie","line":1177},{"type":"text","value":" are left out.","line":1177}]}],"line":1177},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"query","line":1178}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"Record<string, string>","line":1178}]},{"type":"tableCell","children":[]}],"line":1178},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"body","line":1179}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"Body","line":1179}]},{"type":"tableCell","children":[{"type":"text","value":"JSON, a form's fields, or text, by the request's content type.","line":1179}]}],"line":1179},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"rawBody","line":1180}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":1180}]},{"type":"tableCell","children":[{"type":"text","value":"The body exactly as it was sent.","line":1180}]}],"line":1180}],"line":1174},{"type":"heading","depth":3,"id":"webhookverify","children":[{"type":"text","value":"WebhookVerify","line":1182}],"line":1182},{"type":"paragraph","children":[{"type":"text","value":"How a webhook checks that a request was signed with a secret shared with its sender.","line":1184}],"line":1184},{"type":"code","value":"interface WebhookVerify","lang":"ts","line":1186},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":1190}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":1190}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":1190}]}],"line":1190},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"scheme","line":1192}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"\"hmac-sha256\" | \"hmac-sha1\"","line":1192}]},{"type":"tableCell","children":[]}],"line":1192},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"header","line":1193}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":1193}]},{"type":"tableCell","children":[{"type":"text","value":"The header the signature is sent in: ","line":1193},{"type":"inlineCode","value":"X-Hub-Signature-256","line":1193},{"type":"text","value":".","line":1193}]}],"line":1193},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"secret","line":1194}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":1194}]},{"type":"tableCell","children":[{"type":"text","value":"The name of the workspace secret that holds the shared secret.","line":1194}]}],"line":1194},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"encoding?","line":1195}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"\"hex\" | \"base64\"","line":1195}]},{"type":"tableCell","children":[{"type":"text","value":"How the signature is written. Default ","line":1195},{"type":"inlineCode","value":"hex","line":1195},{"type":"text","value":".","line":1195}]}],"line":1195},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"prefix?","line":1196}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":1196}]},{"type":"tableCell","children":[{"type":"text","value":"Text before the signature in the header, such as ","line":1196},{"type":"inlineCode","value":"sha256=","line":1196},{"type":"text","value":".","line":1196}]}],"line":1196},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"signed?","line":1197}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":1197}]},{"type":"tableCell","children":[{"type":"text","value":"What was signed. ","line":1197},{"type":"inlineCode","value":"{body}","line":1197},{"type":"text","value":" is the raw body, ","line":1197},{"type":"inlineCode","value":"{timestamp}","line":1197},{"type":"text","value":" the timestamp header. Default ","line":1197},{"type":"inlineCode","value":"{body}","line":1197},{"type":"text","value":".","line":1197}]}],"line":1197},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"timestampHeader?","line":1198}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":1198}]},{"type":"tableCell","children":[{"type":"text","value":"A header holding when the request was sent, in seconds since 1970.","line":1198}]}],"line":1198},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"toleranceSeconds?","line":1199}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"number","line":1199}]},{"type":"tableCell","children":[{"type":"text","value":"How old a request may be, by its timestamp header. Default 300.","line":1199}]}],"line":1199}],"line":1190},{"type":"heading","depth":3,"id":"widgetresource","children":[{"type":"text","value":"WidgetResource","line":1201}],"line":1201},{"type":"paragraph","children":[{"type":"text","value":"A widget made with ","line":1203},{"type":"inlineCode","value":"defineWidget","line":1203},{"type":"text","value":".","line":1203}],"line":1203},{"type":"code","value":"interface WidgetResource<D extends WidgetOptions = WidgetOptions> extends ResourceDefinition","lang":"ts","line":1205},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":1209}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":1209}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":1209}]}],"line":1209},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"kind","line":1211}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"\"widget\"","line":1211}]},{"type":"tableCell","children":[]}],"line":1211},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"definition","line":1212}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"D","line":1212}]},{"type":"tableCell","children":[{"type":"text","value":"What was declared.","line":1212}]}],"line":1212}],"line":1209},{"type":"heading","depth":2,"id":"types","children":[{"type":"text","value":"Types","line":1214}],"line":1214},{"type":"heading","depth":3,"id":"appoptions","children":[{"type":"text","value":"AppOptions","line":1216}],"line":1216},{"type":"paragraph","children":[{"type":"text","value":"What ","line":1218},{"type":"inlineCode","value":"defineApp","line":1218},{"type":"text","value":" takes: the app's path and title, and the interface or the code it serves.","line":1218}],"line":1218},{"type":"code","value":"type AppOptions = ResourceNames & Take<Kinds.AppBody, {\n /** Unique within the workspace. It is part of the app's address, for example `orders`. */\n path: string;\n title: string;\n /**\n * The app's own directory in the repository, holding its `index.html`. The build\n * compiles it with Vite. Relative to the repository root, for example `apps/orders`.\n * Leave it out for an app that serves an interface.\n */\n source?: string;\n}>","lang":"ts","line":1220},{"type":"heading","depth":3,"id":"bindingoptions","children":[{"type":"text","value":"BindingOptions","line":1234}],"line":1234},{"type":"paragraph","children":[{"type":"text","value":"What ","line":1236},{"type":"inlineCode","value":"defineBinding","line":1236},{"type":"text","value":" takes: the role, who holds it and where.","line":1236}],"line":1236},{"type":"code","value":"type BindingOptions = ResourceNames & {\n /** Unique within the workspace, for example `bindings/portal-orders`. */\n path: string;\n} & Take<Kinds.BindingBody, {\n /** A role by name or by definition: built-in, the tenant's, or one this workspace defines. */\n role: string | {\n name: string;\n };\n principal: BindingPrincipal;\n /** Bind at one resource, by path or by definition. Omit to bind at the whole workspace. */\n resource?: Ref;\n}>","lang":"ts","line":1238},{"type":"heading","depth":3,"id":"bindingprincipal","children":[{"type":"text","value":"BindingPrincipal","line":1253}],"line":1253},{"type":"paragraph","children":[{"type":"text","value":"Who a binding gives a role to: a member, a group of members, an end-user group or a service account.","line":1255}],"line":1255},{"type":"code","value":"type BindingPrincipal = {\n type: \"member\";\n email: string;\n}\n/** A group of members, by its key: `tech-desk`. What it is called can change freely. */\n | {\n type: \"group\";\n key: string;\n} | {\n type: \"service_account\";\n key: string;\n} | {\n type: \"end_user_group\";\n key: string;\n}\n/** By its title, as before keys. It stops working when the title changes: name it by `key`. */\n | {\n type: \"group\";\n name: string;\n} | {\n type: \"service_account\";\n name: string;\n}\n/** One person in the tenant's end-user pool. */\n | {\n type: \"end_user\";\n email: string;\n}\n/** A group of end users, by its name. */\n | {\n type: \"end_user_group\";\n name: string;\n}\n/** Every signed-in end user of the tenant. */\n | {\n type: \"end_users\";\n}\n/** Anyone, signed in or not. This is what makes something public. */\n | {\n type: \"anonymous\";\n}","lang":"ts","line":1257},{"type":"heading","depth":3,"id":"connectiongroupoptions","children":[{"type":"text","value":"ConnectionGroupOptions","line":1301}],"line":1301},{"type":"paragraph","children":[{"type":"text","value":"What ","line":1303},{"type":"inlineCode","value":"defineConnectionGroup","line":1303},{"type":"text","value":" takes: the connector every member uses, and the connections that are members.","line":1303}],"line":1303},{"type":"code","value":"type ConnectionGroupOptions = ResourceNames & {\n path: string;\n} & Take<Kinds.ConnectionGroupBody, {\n /** The connector every member uses: `http` or `smtp`, which are built in, or one of your own. Default `http`. */\n connector?: Ref;\n}>","lang":"ts","line":1305},{"type":"heading","depth":3,"id":"connectionoptions","children":[{"type":"text","value":"ConnectionOptions","line":1314}],"line":1314},{"type":"paragraph","children":[{"type":"text","value":"What ","line":1316},{"type":"inlineCode","value":"defineConnection","line":1316},{"type":"text","value":" takes: the connector it uses, its configuration and the name of the secret that holds the credential.","line":1316}],"line":1316},{"type":"code","value":"type ConnectionOptions = ResourceNames & {\n path: string;\n} & Take<Kinds.ConnectionBody, {\n /** The connector to use: `http`, `smtp` or `oauth2`, which are built in, or one of your own. Default `http`. */\n connector?: Ref;\n}>","lang":"ts","line":1318},{"type":"heading","depth":3,"id":"connectoroptions","children":[{"type":"text","value":"ConnectorOptions","line":1327}],"line":1327},{"type":"paragraph","children":[{"type":"text","value":"What ","line":1329},{"type":"inlineCode","value":"defineConnector","line":1329},{"type":"text","value":" takes: the connector's name, the schema of a connection's configuration and how its client is made.","line":1329}],"line":1329},{"type":"code","value":"type ConnectorOptions<Config, Client> = ResourceNames & Take<Kinds.ConnectorBody, {\n /** Unique within the workspace, for example `connectors/shop`. Connections name it by this. */\n path: string;\n /** A JSON Schema for a connection's configuration. The console draws its form from it. */\n configSchema: object;\n /**\n * Builds the client a script is given for a connection. `credential` is the\n * connection's secret, when it has one. `signal` aborts when the run is canceled.\n */\n create(config: Config, credential: string | undefined, signal: AbortSignal): Client;\n /**\n * Tries a connection without doing anything with it: what the console's Test\n * button runs. Resolves with what it found, or throws why it could not reach it.\n * A connector without it is tested by building its client.\n */\n test?(config: Config, credential: string | undefined, signal: AbortSignal): Promise<ConnectionTest>;\n}>","lang":"ts","line":1331},{"type":"heading","depth":3,"id":"datasourceoptions","children":[{"type":"text","value":"DataSourceOptions","line":1351}],"line":1351},{"type":"paragraph","children":[{"type":"text","value":"What ","line":1353},{"type":"inlineCode","value":"defineDataSource","line":1353},{"type":"text","value":" takes: its path and what it is for.","line":1353}],"line":1353},{"type":"code","value":"type DataSourceOptions = ResourceNames & {\n path: string;\n} & Take<Kinds.DataSourceBody, unknown, \"connector\">","lang":"ts","line":1355},{"type":"heading","depth":3,"id":"eventoptions","children":[{"type":"text","value":"EventOptions","line":1361}],"line":1361},{"type":"paragraph","children":[{"type":"text","value":"What ","line":1363},{"type":"inlineCode","value":"defineEvent","line":1363},{"type":"text","value":" takes: the event's name and the schema of its payload.","line":1363}],"line":1363},{"type":"code","value":"type EventOptions<Payload extends z.ZodType> = ResourceNames & {\n /** The event's name, for example `orders/placed`. */\n path: string;\n} & Take<Kinds.EventBody, {\n /** Every published payload must match this. */\n payload: Payload;\n}>","lang":"ts","line":1365},{"type":"heading","depth":3,"id":"eventtriggeroptions","children":[{"type":"text","value":"EventTriggerOptions","line":1375}],"line":1375},{"type":"paragraph","children":[{"type":"text","value":"What ","line":1377},{"type":"inlineCode","value":"defineEventTrigger","line":1377},{"type":"text","value":" takes: the event to listen for, what it starts and an optional filter.","line":1377}],"line":1377},{"type":"code","value":"type EventTriggerOptions = ResourceNames & {\n path: string;\n} & Take<Extract<Kinds.TriggerBody, {\n type: \"event\";\n}>, {\n /** The event to listen for, by name or by definition. */\n event: Ref;\n /** The script that receives the event's payload as its input. */\n script: Ref;\n}, \"type\">","lang":"ts","line":1379},{"type":"heading","depth":3,"id":"filter","children":[{"type":"text","value":"Filter","line":1392}],"line":1392},{"type":"paragraph","children":[{"type":"text","value":"A condition on rows. Combine conditions with ","line":1394},{"type":"inlineCode","value":"and","line":1394},{"type":"text","value":" and ","line":1394},{"type":"inlineCode","value":"or","line":1394},{"type":"text","value":".","line":1394}],"line":1394},{"type":"code","value":"type Filter = {\n and: Filter[];\n} | {\n or: Filter[];\n} | {\n column: string;\n /** Default `eq`. */\n op?: \"eq\" | \"ne\" | \"gt\" | \"gte\" | \"lt\" | \"lte\" | \"in\" | \"has\" | \"contains\" | \"not_contains\" | \"is_null\";\n value?: unknown;\n}","lang":"ts","line":1396},{"type":"heading","depth":3,"id":"flowedge","children":[{"type":"text","value":"FlowEdge","line":1409}],"line":1409},{"type":"paragraph","children":[{"type":"text","value":"An edge: ","line":1411},{"type":"inlineCode","value":"[from, to]","line":1411},{"type":"text","value":", or with an option naming a branch case or marking the error path.","line":1411}],"line":1411},{"type":"code","value":"type FlowEdge<Node extends string> = [from: Node, to: Node] | [from: Node, to: Node, options: {\n when?: string;\n error?: boolean;\n}]","lang":"ts","line":1413},{"type":"heading","depth":3,"id":"flownode","children":[{"type":"text","value":"FlowNode","line":1420}],"line":1420},{"type":"paragraph","children":[{"type":"text","value":"A node of a flow, as the manifest stores it.","line":1422}],"line":1422},{"type":"code","value":"type FlowNode = Record<string, unknown> & {\n type: string;\n}","lang":"ts","line":1424},{"type":"heading","depth":3,"id":"flowoptions","children":[{"type":"text","value":"FlowOptions","line":1430}],"line":1430},{"type":"paragraph","children":[{"type":"text","value":"What ","line":1432},{"type":"inlineCode","value":"defineFlow","line":1432},{"type":"text","value":" takes: its steps and the edges between them.","line":1432}],"line":1432},{"type":"code","value":"type FlowOptions<Nodes extends Record<string, FlowNode>> = ResourceNames & {\n /** The name of the tool an agent sees for it, if it should not follow the path. */\n mcp?: ToolName;\n path: string;\n} & Take<Kinds.FlowBody, {\n nodes: Nodes;\n /** Each edge names two of the nodes above. */\n edges: FlowEdge<Extract<keyof Nodes, string>>[];\n /** Where each node sits in the editor, so positions survive a pull and a deploy. */\n layout?: Partial<Record<Extract<keyof Nodes, string>, {\n x: number;\n y: number;\n }>>;\n}>","lang":"ts","line":1434},{"type":"heading","depth":3,"id":"formfield","children":[{"type":"text","value":"FormField","line":1451}],"line":1451},{"type":"paragraph","children":[{"type":"text","value":"One field of a form. Its value is in the input under ","line":1453},{"type":"inlineCode","value":"name","line":1453},{"type":"text","value":".","line":1453}],"line":1453},{"type":"code","value":"type FormField = FormBody[\"fields\"][number]","lang":"ts","line":1455},{"type":"heading","depth":3,"id":"formoptions","children":[{"type":"text","value":"FormOptions","line":1459}],"line":1459},{"type":"paragraph","children":[{"type":"text","value":"A form the platform serves as a page. What is sent starts the script or the flow.","line":1461}],"line":1461},{"type":"code","value":"type FormOptions = Take<FormBody, unknown, \"type\" | \"script\" | \"enabled\">","lang":"ts","line":1463},{"type":"heading","depth":3,"id":"inputkey","children":[{"type":"text","value":"InputKey","line":1467}],"line":1467},{"type":"paragraph","children":[{"type":"text","value":"A path into a script's input, as a concurrency key names it: ","line":1469},{"type":"inlineCode","value":"input.customerId","line":1469},{"type":"text","value":", or deeper.","line":1469}],"line":1469},{"type":"code","value":"type InputKey<I> = I extends Record<string, unknown> ? `input.${Extract<keyof I, string>}` | `input.${Extract<keyof I, string>}.${string}` : `input.${string}`","lang":"ts","line":1471},{"type":"heading","depth":3,"id":"insert","children":[{"type":"text","value":"Insert","line":1475}],"line":1475},{"type":"paragraph","children":[{"type":"text","value":"What is given to insert a row of a table, by its path: ","line":1477},{"type":"inlineCode","value":"Insert<\"visits\">","line":1477},{"type":"text","value":".","line":1477}],"line":1477},{"type":"code","value":"type Insert<Name extends keyof VolvelTables> = VolvelTables[Name] extends {\n insert: infer I;\n} ? I : never","lang":"ts","line":1479},{"type":"heading","depth":3,"id":"insertof","children":[{"type":"text","value":"InsertOf","line":1485}],"line":1485},{"type":"paragraph","children":[{"type":"text","value":"A row as it is written: required columns without a default must be given.","line":1487},{"type":"break","hard":false,"line":1487},{"type":"text","value":"A required column with a default may be left out, and takes its default.","line":1488}],"line":1487},{"type":"code","value":"type InsertOf<C extends Columns> = {\n [K in MustGiveKeys<C>]: ValueOf<C[K]>;\n} & {\n [K in Exclude<keyof C, MustGiveKeys<C>>]?: K extends RequiredKeys<C> ? ValueOf<C[K]> : ValueOf<C[K]> | null;\n}","lang":"ts","line":1490},{"type":"heading","depth":3,"id":"queryoptions","children":[{"type":"text","value":"QueryOptions","line":1498}],"line":1498},{"type":"paragraph","children":[{"type":"text","value":"What ","line":1500},{"type":"inlineCode","value":"defineQuery","line":1500},{"type":"text","value":" takes: its path, one SELECT over the workspace's tables and the parameters it is given.","line":1500}],"line":1500},{"type":"code","value":"type QueryOptions = ResourceNames & {\n /** The query's name, for example `reports/fees`. */\n path: string;\n} & Take<Kinds.QueryBody>","lang":"ts","line":1502},{"type":"heading","depth":3,"id":"roleoptions","children":[{"type":"text","value":"RoleOptions","line":1509}],"line":1509},{"type":"paragraph","children":[{"type":"text","value":"What ","line":1511},{"type":"inlineCode","value":"defineRole","line":1511},{"type":"text","value":" takes: the role's path, the name bindings refer to and the permissions it holds.","line":1511}],"line":1511},{"type":"code","value":"type RoleOptions = ResourceNames & {\n /** Unique within the workspace, for example `roles/order-reader`. */\n path: string;\n} & Take<Kinds.RoleBody>","lang":"ts","line":1513},{"type":"heading","depth":3,"id":"row","children":[{"type":"text","value":"Row","line":1520}],"line":1520},{"type":"paragraph","children":[{"type":"text","value":"A row of a table, by its path, as the generated file knows it: ","line":1522},{"type":"inlineCode","value":"Row<\"visits\">","line":1522},{"type":"text","value":".","line":1522}],"line":1522},{"type":"code","value":"type Row<Name extends keyof VolvelTables> = VolvelTables[Name] extends {\n row: infer R;\n} ? R : never","lang":"ts","line":1524},{"type":"heading","depth":3,"id":"rowof","children":[{"type":"text","value":"RowOf","line":1530}],"line":1530},{"type":"paragraph","children":[{"type":"text","value":"A row as it is read: every declared column, null where it has no value.","line":1532}],"line":1532},{"type":"code","value":"type RowOf<C extends Columns> = SystemColumns & {\n [K in keyof C]: K extends RequiredKeys<C> ? ValueOf<C[K]> : ValueOf<C[K]> | null;\n}","lang":"ts","line":1534},{"type":"heading","depth":3,"id":"scheduleoptions","children":[{"type":"text","value":"ScheduleOptions","line":1540}],"line":1540},{"type":"paragraph","children":[{"type":"text","value":"What ","line":1542},{"type":"inlineCode","value":"defineSchedule","line":1542},{"type":"text","value":" takes: when it fires and what it starts.","line":1542}],"line":1542},{"type":"code","value":"type ScheduleOptions = ResourceNames & {\n path: string;\n} & Take<Kinds.ScheduleBody, {\n /**\n * A polling trigger source to run on each tick. The script then starts once\n * for each thing the source finds, with that thing as its input.\n */\n source?: Ref;\n /** The input each scheduled run receives. */\n input?: Record<string, unknown>;\n}, \"script\" | \"flow\"> & ({\n script: Ref;\n flow?: never;\n} | {\n flow: Ref;\n script?: never;\n})","lang":"ts","line":1544},{"type":"heading","depth":3,"id":"scriptoptions","children":[{"type":"text","value":"ScriptOptions","line":1564}],"line":1564},{"type":"paragraph","children":[{"type":"text","value":"What ","line":1566},{"type":"inlineCode","value":"defineScript","line":1566},{"type":"text","value":" takes: the script's path, the schemas of its input and its output, what it uses and the function that runs.","line":1566}],"line":1566},{"type":"code","value":"type ScriptOptions<Input extends z.ZodType, Output extends z.ZodType> = ResourceNames & Take<Kinds.ScriptBody, {\n /** The name of the tool an agent sees for it, if it should not follow the path. */\n mcp?: ToolName;\n /** Unique within the workspace, for example `orders/sync`. */\n path: string;\n input: Input;\n output: Output;\n /** How long one attempt may run. Default 300, maximum 3600. */\n timeoutSeconds?: number;\n /**\n * Retries after a failed attempt. Delivery is at-least-once even without\n * retries, so a script must be safe to run twice.\n */\n retries?: {\n limit: number;\n delaySeconds?: number;\n backoff?: boolean;\n };\n /**\n * How many runs of this script may be in progress at once: a number for the\n * script as a whole, or `{ key, limit }` for each value of a field of its\n * input, such as `{ key: \"input.customerId\", limit: 1 }` for one run at a\n * time per customer. Runs for other customers go ahead.\n */\n concurrency?: number | {\n key: InputKey<z.input<Input>>;\n limit: number;\n };\n /**\n * What happens when a run fails for the last time. It replaces the workspace's default alert for\n * this script, as a whole: a script that names only `notify` does not also start the default's\n * `script`.\n */\n onFailure?: {\n script?: Ref;\n notify?: Ref;\n };\n run(input: z.output<Input>, ctx: ScriptContext): Promise<z.input<Output>> | z.input<Output>;\n} & ScriptUses, \"uses\" | \"schemaSource\">","lang":"ts","line":1568},{"type":"heading","depth":3,"id":"tableoptions","children":[{"type":"text","value":"TableOptions","line":1610}],"line":1610},{"type":"paragraph","children":[{"type":"text","value":"What ","line":1612},{"type":"inlineCode","value":"defineTable","line":1612},{"type":"text","value":" takes: the table's path, its columns and who may read and change its rows.","line":1612}],"line":1612},{"type":"code","value":"type TableOptions<C extends Record<string, ColumnSpec<unknown, boolean, boolean>>> = ResourceNames & {\n /** The table's name, for example `crm/orders`. */\n path: string;\n} & Take<Kinds.TableBody, {\n columns: C;\n /**\n * The column that stands for a row where another table refers to it: a\n * device's name in place of its ID.\n */\n display?: Extract<keyof C, string>;\n /**\n * Who may see which rows. With `owner`, a person sees and changes only the\n * rows whose owner column holds their ID. Without a policy, permissions alone decide.\n */\n policy?: {\n owner: Extract<keyof C, string>;\n } | {\n /**\n * Rules that match a row's columns against the person asking. A person\n * sees a row when any rule lets them, and changes it when a `write` or\n * `all` rule does.\n */\n rules: {\n allow: \"read\" | \"write\" | \"all\";\n when: {\n everyone: true;\n }\n /** The column holds the person's own ID. */\n | {\n column: Extract<keyof C, string>;\n is: \"principal\";\n }\n /** The column names a group the person is in: its ID, or its key in a text column (its name too, in rows written before groups had keys). */\n | {\n column: Extract<keyof C, string>;\n in: \"groups\";\n }\n /** The column equals one of the person's attributes. */\n | {\n column: Extract<keyof C, string>;\n equals: {\n attribute: string;\n };\n };\n }[];\n };\n /** Columns to index, each entry one index. `id`, `created_at` and `updated_at` may be named. */\n indexes?: (Extract<keyof C, string> | \"id\" | \"created_at\" | \"updated_at\")[][];\n}>","lang":"ts","line":1614},{"type":"heading","depth":3,"id":"themeoptions","children":[{"type":"text","value":"ThemeOptions","line":1666}],"line":1666},{"type":"paragraph","children":[{"type":"text","value":"What ","line":1668},{"type":"inlineCode","value":"defineTheme","line":1668},{"type":"text","value":" takes: the values that replace the tenant's theme for this workspace.","line":1668}],"line":1668},{"type":"code","value":"type ThemeOptions = ResourceNames & Take<Kinds.ThemeBody, {\n /** Default `theme`. A workspace has one theme. */\n path?: string;\n}>","lang":"ts","line":1670},{"type":"heading","depth":3,"id":"themetoken","children":[{"type":"text","value":"ThemeToken","line":1677}],"line":1677},{"type":"paragraph","children":[{"type":"text","value":"One of the theme tokens a workspace may set.","line":1679}],"line":1679},{"type":"code","value":"type ThemeToken = (typeof THEME_TOKENS)[number]","lang":"ts","line":1681},{"type":"heading","depth":3,"id":"triggersourceoptions","children":[{"type":"text","value":"TriggerSourceOptions","line":1685}],"line":1685},{"type":"paragraph","children":[{"type":"text","value":"What ","line":1687},{"type":"inlineCode","value":"defineTriggerSource","line":1687},{"type":"text","value":" takes: code of your own that turns requests, or a poll, into starts of a script or a flow.","line":1687}],"line":1687},{"type":"code","value":"type TriggerSourceOptions = (TriggerSourceCommon & {\n mode: \"webhook\";\n run(request: WebhookRequest, ctx: ScriptContext): Promise<WebhookSourceResult> | WebhookSourceResult;\n}) | (TriggerSourceCommon & {\n mode: \"poll\";\n run(tick: PollTick, ctx: ScriptContext): Promise<PollResult> | PollResult;\n})","lang":"ts","line":1689},{"type":"heading","depth":3,"id":"variableoptions","children":[{"type":"text","value":"VariableOptions","line":1699}],"line":1699},{"type":"paragraph","children":[{"type":"text","value":"What ","line":1701},{"type":"inlineCode","value":"defineVariable","line":1701},{"type":"text","value":" takes: its path, what it is for and the value used in a workspace that has not set its own.","line":1701}],"line":1701},{"type":"code","value":"type VariableOptions = ResourceNames & {\n path: string;\n} & Take<Kinds.VariableBody>","lang":"ts","line":1703},{"type":"heading","depth":3,"id":"webhookoptions","children":[{"type":"text","value":"WebhookOptions","line":1709}],"line":1709},{"type":"paragraph","children":[{"type":"text","value":"What ","line":1711},{"type":"inlineCode","value":"defineWebhook","line":1711},{"type":"text","value":" takes: the script that receives a request, and how the request is checked.","line":1711}],"line":1711},{"type":"code","value":"type WebhookOptions = ResourceNames & {\n path: string;\n} & Take<Extract<Kinds.TriggerBody, {\n type: \"webhook\";\n}>, {\n /** The script that receives the request. */\n script: Ref;\n /** A trigger source to hand each request to first. What it returns is what the script is given. */\n source?: Ref;\n /** Checks each request's signature before anything starts. A request that fails is answered 401. */\n verify?: WebhookVerify;\n}, \"type\">","lang":"ts","line":1713},{"type":"heading","depth":3,"id":"webhooksourceresult","children":[{"type":"text","value":"WebhookSourceResult","line":1728}],"line":1728},{"type":"paragraph","children":[{"type":"text","value":"What a trigger source for webhooks answers.","line":1730}],"line":1730},{"type":"code","value":"type WebhookSourceResult = \n/** Start nothing. `reason` is kept on the source's run, for whoever looks into it. */\n{\n accept: false;\n reason?: string;\n}\n/** Start the trigger's script or flow once, with this input. */\n | {\n accept?: true;\n input: unknown;\n}\n/** Start it once for each of these, up to a hundred. */\n | {\n accept?: true;\n inputs: unknown[];\n}","lang":"ts","line":1732},{"type":"heading","depth":3,"id":"widgetoptions","children":[{"type":"text","value":"WidgetOptions","line":1751}],"line":1751},{"type":"paragraph","children":[{"type":"text","value":"What ","line":1753},{"type":"inlineCode","value":"defineWidget","line":1753},{"type":"text","value":" takes: the widget's declaration (what \"Add to page\" and the inspector are drawn from) and the file of its view.","line":1753}],"line":1753},{"type":"code","value":"type WidgetOptions = WidgetDefinition & {\n /** The file in the repository that is the view, for example `widgets/goal/view.tsx`: a module that draws with `@volvel/widget-frame`. Relative to the repository root. */\n entry: string;\n /** Keep the widget's identity when its type changes. Leave it out. */\n key?: string;\n}","lang":"ts","line":1755}]},"description":"Everything `@volvel/sdk` exports."}
|
|
1
|
+
{"path":"develop/reference/sdk/sdk","title":"@volvel/sdk","tree":{"type":"root","v":1,"children":[{"type":"paragraph","children":[{"type":"inlineCode","value":"import { … } from \"@volvel/sdk\"","line":8}],"line":8},{"type":"paragraph","children":[{"type":"text","value":"Everything ","line":10},{"type":"inlineCode","value":"@volvel/widgets","line":10},{"type":"text","value":" exports is exported from here too. It is on the ","line":10},{"type":"link","href":"widgets","children":[{"type":"text","value":"page of @volvel/widgets","line":10}],"line":10},{"type":"text","value":".","line":10}],"line":10},{"type":"paragraph","children":[{"type":"text","value":"Passed on from other packages: ","line":12},{"type":"inlineCode","value":"DashboardBody","line":12},{"type":"text","value":" (from ","line":12},{"type":"inlineCode","value":"@volvel/widgets/page","line":12},{"type":"text","value":"), ","line":12},{"type":"inlineCode","value":"DataInput","line":12},{"type":"text","value":" (from ","line":12},{"type":"inlineCode","value":"@volvel/widgets/page","line":12},{"type":"text","value":"), ","line":12},{"type":"inlineCode","value":"InterfaceBody","line":12},{"type":"text","value":" (from ","line":12},{"type":"inlineCode","value":"@volvel/widgets/page","line":12},{"type":"text","value":"), ","line":12},{"type":"inlineCode","value":"Page","line":12},{"type":"text","value":" (from ","line":12},{"type":"inlineCode","value":"@volvel/widgets/page","line":12},{"type":"text","value":"), ","line":12},{"type":"inlineCode","value":"PageFilter","line":12},{"type":"text","value":" (from ","line":12},{"type":"inlineCode","value":"@volvel/widgets/page","line":12},{"type":"text","value":"), ","line":12},{"type":"inlineCode","value":"PageWidget","line":12},{"type":"text","value":" (from ","line":12},{"type":"inlineCode","value":"@volvel/widgets/page","line":12},{"type":"text","value":"), ","line":12},{"type":"inlineCode","value":"z","line":12},{"type":"text","value":" (from ","line":12},{"type":"inlineCode","value":"zod","line":12},{"type":"text","value":").","line":12}],"line":12},{"type":"heading","depth":2,"id":"functions","children":[{"type":"text","value":"Functions","line":14}],"line":14},{"type":"heading","depth":3,"id":"defineapp","children":[{"type":"text","value":"defineApp","line":16}],"line":16},{"type":"paragraph","children":[{"type":"text","value":"Declares an app: an interface the platform builds from ","line":18},{"type":"inlineCode","value":"source","line":18},{"type":"text","value":" and serves.","line":18},{"type":"break","hard":false,"line":18},{"type":"text","value":"Who may open it is decided by bindings, like any other resource: bind a role","line":19},{"type":"break","hard":false,"line":19},{"type":"text","value":"holding ","line":20},{"type":"inlineCode","value":"app:read","line":20},{"type":"text","value":" to members, to ","line":20},{"type":"inlineCode","value":"end_users","line":20},{"type":"text","value":", or to ","line":20},{"type":"inlineCode","value":"anonymous","line":20},{"type":"text","value":" for a public app.","line":20}],"line":18},{"type":"code","value":"function defineApp(options: AppOptions): AppDefinition","lang":"ts","line":22},{"type":"heading","depth":3,"id":"definebinding","children":[{"type":"text","value":"defineBinding","line":26}],"line":26},{"type":"paragraph","children":[{"type":"text","value":"Grants a role to a principal, at the workspace or at one resource. This is","line":28},{"type":"break","hard":false,"line":28},{"type":"text","value":"how a repository says who may open an app and whose rows it shows.","line":29}],"line":28},{"type":"code","value":"function defineBinding(options: BindingOptions): ResourceDefinition","lang":"ts","line":31},{"type":"heading","depth":3,"id":"defineconnection","children":[{"type":"text","value":"defineConnection","line":35}],"line":35},{"type":"paragraph","children":[{"type":"text","value":"Declares a connection. Its address and credentials are set per workspace, not here.","line":37}],"line":37},{"type":"code","value":"function defineConnection(options: ConnectionOptions): ResourceDefinition","lang":"ts","line":39},{"type":"heading","depth":3,"id":"defineconnectiongroup","children":[{"type":"text","value":"defineConnectionGroup","line":43}],"line":43},{"type":"paragraph","children":[{"type":"text","value":"Declares a group of connections of one kind, such as every customer's","line":45},{"type":"break","hard":false,"line":45},{"type":"text","value":"account with the same service. Members are added per workspace in the","line":46},{"type":"break","hard":false,"line":46},{"type":"text","value":"console, with no deploy. A script that lists the group picks a member when","line":47},{"type":"break","hard":false,"line":47},{"type":"text","value":"it runs: ","line":48},{"type":"inlineCode","value":"await ctx.connections(\"shops\").get(input.shop)","line":48},{"type":"text","value":".","line":48}],"line":45},{"type":"code","value":"function defineConnectionGroup(options: ConnectionGroupOptions): ResourceDefinition","lang":"ts","line":50},{"type":"heading","depth":3,"id":"defineconnector","children":[{"type":"text","value":"defineConnector","line":54}],"line":54},{"type":"paragraph","children":[{"type":"text","value":"Declares a connector: an adapter for one kind of outside system, which","line":56},{"type":"break","hard":false,"line":56},{"type":"text","value":"turns a connection's configuration and credential into the client a script","line":57},{"type":"break","hard":false,"line":57},{"type":"text","value":"uses. A connection uses it by naming it: ","line":58},{"type":"inlineCode","value":"defineConnection({ connector: shop })","line":58},{"type":"text","value":".","line":58}],"line":56},{"type":"code","value":"function defineConnector<Config, Client>(options: ConnectorOptions<Config, Client>): ConnectorDefinition<Config, Client>","lang":"ts","line":60},{"type":"heading","depth":3,"id":"definedashboard","children":[{"type":"text","value":"defineDashboard","line":64}],"line":64},{"type":"paragraph","children":[{"type":"text","value":"Declares a dashboard: one page of widgets that only read, kept as a resource so it is","line":66},{"type":"break","hard":false,"line":66},{"type":"text","value":"versioned, deployed and promoted with the rest of a workspace.","line":67}],"line":66},{"type":"code","value":"function defineDashboard(options: DashboardOptions): ResourceDefinition","lang":"ts","line":69},{"type":"heading","depth":3,"id":"definedatasource","children":[{"type":"text","value":"defineDataSource","line":73}],"line":73},{"type":"paragraph","children":[{"type":"text","value":"Declares an external Postgres database. Where it is, and its password, are set per workspace.","line":75}],"line":75},{"type":"code","value":"function defineDataSource(options: DataSourceOptions): ResourceDefinition","lang":"ts","line":77},{"type":"heading","depth":3,"id":"defineevent","children":[{"type":"text","value":"defineEvent","line":81}],"line":81},{"type":"paragraph","children":[{"type":"text","value":"Declares an event that scripts and flows can publish and listen for.","line":83}],"line":83},{"type":"code","value":"function defineEvent<Payload extends z.ZodType>(options: EventOptions<Payload>): ResourceDefinition","lang":"ts","line":85},{"type":"heading","depth":3,"id":"defineeventtrigger","children":[{"type":"text","value":"defineEventTrigger","line":89}],"line":89},{"type":"paragraph","children":[{"type":"text","value":"Starts a script each time an event is published.","line":91}],"line":91},{"type":"code","value":"function defineEventTrigger(options: EventTriggerOptions): ResourceDefinition","lang":"ts","line":93},{"type":"heading","depth":3,"id":"defineflow","children":[{"type":"text","value":"defineFlow","line":97}],"line":97},{"type":"paragraph","children":[{"type":"text","value":"Declares a flow: a graph of steps the platform runs durably. The nodes and","line":99},{"type":"break","hard":false,"line":99},{"type":"text","value":"edges written here are exactly what is deployed and shown.","line":100}],"line":99},{"type":"code","value":"function defineFlow<Nodes extends Record<string, FlowNode>>(options: FlowOptions<Nodes>): ResourceDefinition","lang":"ts","line":102},{"type":"heading","depth":3,"id":"defineform","children":[{"type":"text","value":"defineForm","line":106}],"line":106},{"type":"paragraph","children":[{"type":"text","value":"Declares a form that starts a script. The platform serves it at an address","line":108},{"type":"break","hard":false,"line":108},{"type":"text","value":"of its own under the tenant's portal, with no code of yours.","line":109}],"line":108},{"type":"code","value":"function defineForm(options: FormOptions & {\n path: string;\n /** The form's identity, said only when it is moved to another path. See `ResourceNames`. */\n key?: string;\n script: Ref;\n enabled?: boolean;\n}): ResourceDefinition","lang":"ts","line":111},{"type":"heading","depth":3,"id":"defineinterface","children":[{"type":"text","value":"defineInterface","line":121}],"line":121},{"type":"paragraph","children":[{"type":"text","value":"Declares an interface: pages of widgets (","line":123},{"type":"inlineCode","value":"core/table","line":123},{"type":"text","value":", ","line":123},{"type":"inlineCode","value":"core/chart","line":123},{"type":"text","value":", and the rest of","line":123},{"type":"break","hard":false,"line":123},{"type":"text","value":"the pack) over the workspace's tables, with no code. Each widget names its data","line":124},{"type":"break","hard":false,"line":124},{"type":"text","value":"inputs and its ","line":125},{"type":"inlineCode","value":"config","line":125},{"type":"text","value":"; see the ","line":125},{"type":"inlineCode","value":"interface","line":125},{"type":"text","value":" schema. Serve it with","line":125},{"type":"break","hard":false,"line":125},{"type":"inlineCode","value":"defineApp({ interface })","line":126},{"type":"text","value":".","line":126}],"line":123},{"type":"code","value":"function defineInterface(options: InterfaceOptions): ResourceDefinition","lang":"ts","line":128},{"type":"heading","depth":3,"id":"definequery","children":[{"type":"text","value":"defineQuery","line":132}],"line":132},{"type":"paragraph","children":[{"type":"text","value":"Declares a query the workspace keeps by name. It only reads. Whoever runs it","line":134},{"type":"break","hard":false,"line":134},{"type":"text","value":"needs to be allowed to read each table it names, and each table's row policy","line":135},{"type":"break","hard":false,"line":135},{"type":"text","value":"applies to them: a dashboard built on it shows each person their own rows.","line":136}],"line":134},{"type":"code","value":"function defineQuery(options: QueryOptions): ResourceDefinition","lang":"ts","line":138},{"type":"heading","depth":3,"id":"definerole","children":[{"type":"text","value":"defineRole","line":142}],"line":142},{"type":"paragraph","children":[{"type":"text","value":"Declares a custom role for this workspace.","line":144}],"line":144},{"type":"code","value":"function defineRole(options: RoleOptions): ResourceDefinition & {\n readonly name: string;\n}","lang":"ts","line":146},{"type":"heading","depth":3,"id":"defineschedule","children":[{"type":"text","value":"defineSchedule","line":152}],"line":152},{"type":"paragraph","children":[{"type":"text","value":"Defines a schedule: a script or a flow started at times given as a cron line.","line":154}],"line":154},{"type":"code","value":"function defineSchedule(options: ScheduleOptions): ResourceDefinition","lang":"ts","line":156},{"type":"heading","depth":3,"id":"definescript","children":[{"type":"text","value":"defineScript","line":160}],"line":160},{"type":"paragraph","children":[{"type":"text","value":"Defines a script: a function with a checked input and a checked output, that runs on a worker.","line":162}],"line":162},{"type":"code","value":"function defineScript<Input extends z.ZodType, Output extends z.ZodType>(options: ScriptOptions<Input, Output>): ScriptDefinition","lang":"ts","line":164},{"type":"heading","depth":3,"id":"definetable","children":[{"type":"text","value":"defineTable","line":168}],"line":168},{"type":"paragraph","children":[{"type":"text","value":"Declares a custom table. A deploy changes the workspace's table to match:","line":170},{"type":"break","hard":false,"line":170},{"type":"text","value":"new columns are added, and a column that is no longer declared is retired","line":171},{"type":"break","hard":false,"line":171},{"type":"text","value":"with its data kept, never dropped.","line":172}],"line":170},{"type":"code","value":"function defineTable<C extends Record<string, ColumnSpec<unknown, boolean, boolean>>>(options: TableOptions<C>): TableDefinition<RowOf<C>, InsertOf<C>>","lang":"ts","line":174},{"type":"heading","depth":3,"id":"definetheme","children":[{"type":"text","value":"defineTheme","line":178}],"line":178},{"type":"paragraph","children":[{"type":"text","value":"Declares how this workspace's apps look, where it differs from the tenant's","line":180},{"type":"break","hard":false,"line":180},{"type":"text","value":"branding. Tokens that are not set keep the tenant's value.","line":181}],"line":180},{"type":"code","value":"function defineTheme(options: ThemeOptions): ResourceDefinition","lang":"ts","line":183},{"type":"heading","depth":3,"id":"definetriggersource","children":[{"type":"text","value":"defineTriggerSource","line":187}],"line":187},{"type":"paragraph","children":[{"type":"text","value":"Declares a trigger source: code that stands between the outside and what a","line":189},{"type":"break","hard":false,"line":189},{"type":"text","value":"trigger starts. It runs on a worker, like a script, and reads only the","line":190},{"type":"break","hard":false,"line":190},{"type":"text","value":"connections, secrets and variables it lists.","line":191}],"line":189},{"type":"paragraph","children":[{"type":"text","value":"A ","line":193},{"type":"inlineCode","value":"webhook","line":193},{"type":"text","value":" source is handed each request to a webhook that names it, and","line":193},{"type":"break","hard":false,"line":193},{"type":"text","value":"says whether to start anything and with what: this is where a signature in","line":194},{"type":"break","hard":false,"line":194},{"type":"text","value":"a sender's own format is checked, or one request is split into several. A","line":195},{"type":"break","hard":false,"line":195},{"type":"inlineCode","value":"poll","line":196},{"type":"text","value":" source is run on a schedule that names it, with where it had got to,","line":196},{"type":"break","hard":false,"line":196},{"type":"text","value":"and gives back what is new.","line":197}],"line":193},{"type":"code","value":"function defineTriggerSource(options: TriggerSourceOptions): TriggerSourceDefinition","lang":"ts","line":199},{"type":"heading","depth":3,"id":"definevariable","children":[{"type":"text","value":"defineVariable","line":203}],"line":203},{"type":"paragraph","children":[{"type":"text","value":"Declares a variable. Each workspace can set its own value.","line":205}],"line":205},{"type":"code","value":"function defineVariable(options: VariableOptions): ResourceDefinition","lang":"ts","line":207},{"type":"heading","depth":3,"id":"definewebhook","children":[{"type":"text","value":"defineWebhook","line":211}],"line":211},{"type":"paragraph","children":[{"type":"text","value":"Defines a webhook: an address that starts a script when a request is made to it.","line":213}],"line":213},{"type":"code","value":"function defineWebhook(options: WebhookOptions): ResourceDefinition","lang":"ts","line":215},{"type":"heading","depth":3,"id":"definewidget","children":[{"type":"text","value":"defineWidget","line":219}],"line":219},{"type":"paragraph","children":[{"type":"text","value":"Declares a widget of your own, for pages and dashboards: its type (","line":221},{"type":"inlineCode","value":"x/<name>","line":221},{"type":"text","value":"), the data it","line":221},{"type":"break","hard":false,"line":221},{"type":"text","value":"reads, its settings (a JSON Schema with an ","line":222},{"type":"inlineCode","value":"x-volvel","line":222},{"type":"text","value":" hint on each, from which the inspector","line":222},{"type":"break","hard":false,"line":222},{"type":"text","value":"is drawn), the events it raises, and the file of its view. The view runs in a sandboxed frame","line":223},{"type":"break","hard":false,"line":223},{"type":"text","value":"with no network and is given only what the platform read for it under the viewer's permissions.","line":224},{"type":"break","hard":false,"line":224},{"type":"text","value":"Throws when the declaration is wrong, so ","line":225},{"type":"inlineCode","value":"volvel build","line":225},{"type":"text","value":" says so before anything is deployed.","line":225},{"type":"break","hard":false,"line":225},{"type":"text","value":"Scaffold one with ","line":226},{"type":"inlineCode","value":"volvel widget new <name>","line":226},{"type":"text","value":".","line":226}],"line":221},{"type":"code","value":"function defineWidget<const D extends WidgetOptions>(options: D): WidgetResource<D>","lang":"ts","line":228},{"type":"heading","depth":3,"id":"isresourcedefinition","children":[{"type":"text","value":"isResourceDefinition","line":232}],"line":232},{"type":"paragraph","children":[{"type":"text","value":"Whether a value is a resource made with one of the ","line":234},{"type":"inlineCode","value":"define","line":234},{"type":"text","value":" functions, as the build finds them in a repository's exports.","line":234}],"line":234},{"type":"code","value":"function isResourceDefinition(value: unknown): value is ResourceDefinition","lang":"ts","line":236},{"type":"heading","depth":2,"id":"classes","children":[{"type":"text","value":"Classes","line":240}],"line":240},{"type":"heading","depth":3,"id":"httperror","children":[{"type":"text","value":"HttpError","line":242}],"line":242},{"type":"paragraph","children":[{"type":"text","value":"A request that came back with a 4xx or 5xx status.","line":244}],"line":244},{"type":"code","value":"class HttpError extends Error","lang":"ts","line":246},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":250}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":250}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":250}]}],"line":250},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"status","line":252}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"number","line":252}]},{"type":"tableCell","children":[]}],"line":252},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"response","line":253}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"HttpResponse","line":253}]},{"type":"tableCell","children":[]}],"line":253},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"constructor","line":254}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(method: string, url: string, response: HttpResponse)","line":254}]},{"type":"tableCell","children":[]}],"line":254}],"line":250},{"type":"heading","depth":3,"id":"schemaerror","children":[{"type":"text","value":"SchemaError","line":256}],"line":256},{"type":"paragraph","children":[{"type":"text","value":"A failure caused by input or output that does not match the script's schema.","line":258}],"line":258},{"type":"code","value":"class SchemaError extends Error","lang":"ts","line":260},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":264}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":264}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":264}]}],"line":264},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"constructor","line":266}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(what: \"input\" | \"output\", error: z.ZodError)","line":266}]},{"type":"tableCell","children":[]}],"line":266}],"line":264},{"type":"heading","depth":2,"id":"constants","children":[{"type":"text","value":"Constants","line":268}],"line":268},{"type":"heading","depth":3,"id":"column","children":[{"type":"text","value":"column","line":270}],"line":270},{"type":"paragraph","children":[{"type":"text","value":"The kinds of column a table can have.","line":272}],"line":272},{"type":"code","value":"const column: {\n text: <const Options extends ColumnOptions = Record<never, never>>(options?: Options) => ColumnSpec<string, IsRequired<Options>, IsDefaulted<Options>>;\n /** A whole number. */\n integer: <const Options extends ColumnOptions = Record<never, never>>(options?: Options) => ColumnSpec<number, IsRequired<Options>, IsDefaulted<Options>>;\n /** Any number. Store money as an integer of its smallest unit. */\n number: <const Options extends ColumnOptions = Record<never, never>>(options?: Options) => ColumnSpec<number, IsRequired<Options>, IsDefaulted<Options>>;\n boolean: <const Options extends ColumnOptions = Record<never, never>>(options?: Options) => ColumnSpec<boolean, IsRequired<Options>, IsDefaulted<Options>>;\n /** A date and time, as an ISO 8601 string. */\n timestamp: <const Options extends ColumnOptions = Record<never, never>>(options?: Options) => ColumnSpec<string, IsRequired<Options>, IsDefaulted<Options>>;\n /** A calendar date, as `YYYY-MM-DD`. */\n date: <const Options extends ColumnOptions = Record<never, never>>(options?: Options) => ColumnSpec<string, IsRequired<Options>, IsDefaulted<Options>>;\n /** Any JSON value. */\n json: <const Options extends ColumnOptions = Record<never, never>>(options?: Options) => ColumnSpec<unknown, IsRequired<Options>, IsDefaulted<Options>>;\n uuid: <const Options extends ColumnOptions = Record<never, never>>(options?: Options) => ColumnSpec<string, IsRequired<Options>, IsDefaulted<Options>>;\n /**\n * One of a list of values, which a row's type is narrowed to:\n * `column.enum([\"new\", \"paid\"])`. The database refuses any other value.\n */\n enum: <const Values extends readonly (string | EnumValueSpec)[], const Options extends ColumnOptions = Record<never, never>>(values: Values, options?: Options) => ColumnSpec<ValueIn<Values[number]>, IsRequired<Options>, IsDefaulted<Options>>;\n /** Several of a list of values, each at most once. */\n enumList: <const Values extends readonly (string | EnumValueSpec)[], const Options extends ColumnOptions = Record<never, never>>(values: Values, options?: Options) => ColumnSpec<ValueIn<Values[number]>[], IsRequired<Options>, IsDefaulted<Options>>;\n /** The ID of a row in another table. */\n reference: <const Options extends ReferenceOptions = Record<never, never>>(table: string | {\n path: string;\n }, options?: Options) => ColumnSpec<string, IsRequired<Options>, IsDefaulted<Options>>;\n /** The ID of a stored file. */\n file: <const Options extends ColumnOptions = Record<never, never>>(options?: Options) => ColumnSpec<string, IsRequired<Options>, IsDefaulted<Options>>;\n}","lang":"ts","line":274},{"type":"heading","depth":3,"id":"core_range","children":[{"type":"text","value":"CORE_RANGE","line":305}],"line":305},{"type":"paragraph","children":[{"type":"text","value":"The core versions a bundle built with this SDK works on: from ","line":307},{"type":"inlineCode","value":"min","line":307},{"type":"text","value":" up to, not including, ","line":307},{"type":"inlineCode","value":"below","line":307},{"type":"text","value":".","line":307}],"line":307},{"type":"code","value":"const CORE_RANGE: {\n min: string;\n below: string;\n}","lang":"ts","line":309},{"type":"heading","depth":3,"id":"httpconnector","children":[{"type":"text","value":"httpConnector","line":316}],"line":316},{"type":"paragraph","children":[{"type":"text","value":"The built-in connector for any HTTP API.","line":318}],"line":318},{"type":"code","value":"const httpConnector: Connector<HttpConfig, HttpClient>","lang":"ts","line":320},{"type":"heading","depth":3,"id":"oauth2connector","children":[{"type":"text","value":"oauth2Connector","line":324}],"line":324},{"type":"paragraph","children":[{"type":"text","value":"The built-in OAuth 2.0 connector. Its client is an http client that sends","line":326},{"type":"break","hard":false,"line":326},{"type":"text","value":"the access token as a bearer token. The credential stored with the","line":327},{"type":"break","hard":false,"line":327},{"type":"text","value":"connection is the client's secret, which a worker never receives: what a","line":328},{"type":"break","hard":false,"line":328},{"type":"text","value":"worker is given in its place is the current access token.","line":329}],"line":326},{"type":"code","value":"const oauth2Connector: Connector<OAuth2Config, HttpClient>","lang":"ts","line":331},{"type":"heading","depth":3,"id":"sdk_version","children":[{"type":"text","value":"SDK_VERSION","line":335}],"line":335},{"type":"paragraph","children":[{"type":"text","value":"The version of the SDK, and the core versions a bundle built with it works on.","line":337}],"line":337},{"type":"code","value":"const SDK_VERSION = \"0.7.0\"","lang":"ts","line":339},{"type":"heading","depth":3,"id":"smtpconfigschema","children":[{"type":"text","value":"smtpConfigSchema","line":343}],"line":343},{"type":"paragraph","children":[{"type":"text","value":"The configuration of an ","line":345},{"type":"inlineCode","value":"smtp","line":345},{"type":"text","value":" connection, as a JSON Schema. The connector","line":345},{"type":"break","hard":false,"line":345},{"type":"text","value":"itself is part of the worker, which is what speaks to the mail server: a","line":346},{"type":"break","hard":false,"line":346},{"type":"text","value":"bundle carries none of it.","line":347}],"line":345},{"type":"code","value":"const smtpConfigSchema: {\n readonly type: \"object\";\n readonly properties: {\n readonly host: {\n readonly type: \"string\";\n readonly minLength: 1;\n readonly maxLength: 253;\n readonly title: \"Mail server\";\n readonly description: \"The mail server's address, such as `smtp.example.com`.\";\n };\n readonly port: {\n readonly type: \"integer\";\n readonly minimum: 1;\n readonly maximum: 65535;\n readonly default: 587;\n readonly title: \"Port\";\n readonly description: \"The port the server listens on. Port 465 expects `tls`.\";\n };\n readonly security: {\n readonly enum: readonly [\"starttls\", \"tls\", \"none\"];\n readonly default: \"starttls\";\n readonly title: \"Security\";\n readonly description: \"`tls` speaks TLS from the first byte. `starttls` upgrades a plain connection and refuses to go on without it. `none` is for a server inside the same network that offers neither.\";\n };\n readonly from: {\n readonly type: \"string\";\n readonly minLength: 3;\n readonly maxLength: 320;\n readonly title: \"Sent from\";\n readonly description: \"The address mail is sent from: `orders@example.com` or `Orders <orders@example.com>`.\";\n };\n readonly username: {\n readonly type: \"string\";\n readonly maxLength: 320;\n readonly title: \"User name\";\n readonly description: \"The user to sign in as. The password is the connection's secret.\";\n };\n };\n readonly required: readonly [\"host\", \"from\"];\n readonly additionalProperties: false;\n}","lang":"ts","line":349},{"type":"heading","depth":3,"id":"step","children":[{"type":"text","value":"step","line":393}],"line":393},{"type":"paragraph","children":[{"type":"text","value":"The steps of a flow. Where a step takes an expression, it is CEL, and can","line":395},{"type":"break","hard":false,"line":395},{"type":"text","value":"read ","line":396},{"type":"inlineCode","value":"trigger","line":396},{"type":"text","value":", ","line":396},{"type":"inlineCode","value":"steps.<node>.output","line":396},{"type":"text","value":", ","line":396},{"type":"inlineCode","value":"now","line":396},{"type":"text","value":" (the current time, as a","line":396},{"type":"break","hard":false,"line":396},{"type":"text","value":"timestamp), and inside a foreach, ","line":397},{"type":"inlineCode","value":"item","line":397},{"type":"text","value":" and ","line":397},{"type":"inlineCode","value":"index","line":397},{"type":"text","value":". A timestamp reads as","line":397},{"type":"break","hard":false,"line":397},{"type":"text","value":"ISO 8601 text: ","line":398},{"type":"inlineCode","value":"string(now - duration('336h')).substring(0, 10)","line":398},{"type":"text","value":" is the","line":398},{"type":"break","hard":false,"line":398},{"type":"text","value":"date two weeks ago.","line":399}],"line":395},{"type":"code","value":"const step: {\n /**\n * Runs a script. `input` is one expression giving the script's input, or\n * `inputs` gives an expression for each field. `with` hands the script\n * connections, tables or events for this step, when the script takes them.\n */\n script: (script: Target, options?: {\n input?: string;\n inputs?: Record<string, string>;\n with?: StepGrants;\n }) => FlowNode;\n /** Computes named values. Its output is an object of the results. */\n set: (values: Record<string, string>) => FlowNode;\n /** Follows the first case whose condition is true, or the edge marked `otherwise`. */\n branch: (cases: Record<string, string>) => FlowNode;\n /**\n * Runs a script or a flow once per item. Its output is the list of results, in\n * order. One failed item fails the step, unless `continueOnError` is set: then\n * a failed item is `{ error: { message } }` in the list and the others carry on.\n */\n foreach: (items: string, options: {\n input?: string;\n concurrency?: number;\n continueOnError?: boolean;\n with?: StepGrants;\n } & ({\n script: Target;\n flow?: undefined;\n flowFrom?: undefined;\n allow?: undefined;\n } | {\n flow: Target;\n script?: undefined;\n flowFrom?: undefined;\n allow?: undefined;\n } | {\n flowFrom: string;\n allow: Target[];\n script?: undefined;\n flow?: undefined;\n })) => FlowNode;\n /** Waits for every path that leads into it. */\n join: () => FlowNode;\n /** Waits this many seconds. */\n delay: (seconds: number) => FlowNode;\n /**\n * Pauses until a person approves. Rejecting, or the timeout passing, fails the\n * step. `approvers` names who may decide: members of these groups, or holders\n * of these roles. Without it, anyone who may decide approvals here may.\n * It is listed in its workspace; `surface: \"tenant\"` lists it on the tenant's\n * page too.\n */\n approval: (title: string, options?: {\n detail?: string;\n timeoutSeconds?: number;\n approvers?: {\n groups?: string[];\n roles?: string[];\n };\n surface?: \"workspace\" | \"tenant\";\n }) => FlowNode;\n /**\n * Runs another flow from its manual trigger and waits for it. Name it, or give\n * `flowFrom`, an expression that chooses one of the flows in `allow`.\n */\n subflow: (flow: Target | {\n flowFrom: string;\n allow: Target[];\n input?: string;\n }, options?: {\n input?: string;\n }) => FlowNode;\n /**\n * Answers the request that started the flow, for a webhook trigger with\n * `respond: \"flow\"`. `body` and each header are expressions. The first\n * respond step to run is the answer, and the flow carries on after it.\n */\n respond: (options?: {\n status?: number;\n headers?: Record<string, string>;\n body?: string;\n }) => FlowNode;\n /** Fails on purpose, with a message. */\n fail: (message: string) => FlowNode;\n}","lang":"ts","line":401},{"type":"heading","depth":3,"id":"theme_tokens","children":[{"type":"text","value":"THEME_TOKENS","line":489}],"line":489},{"type":"paragraph","children":[{"type":"text","value":"The theme tokens a workspace may set, each the CSS variable ","line":491},{"type":"inlineCode","value":"--vx-<name>","line":491},{"type":"text","value":" in the","line":491},{"type":"break","hard":false,"line":491},{"type":"text","value":"component kit. The manifest's own list (","line":492},{"type":"inlineCode","value":"THEME_TOKENS","line":492},{"type":"text","value":") is the same: a test holds them equal.","line":492}],"line":491},{"type":"code","value":"const THEME_TOKENS: readonly [\"canvas\", \"surface\", \"sunken\", \"line\", \"ink\", \"ink-muted\", \"action\", \"action-ink\", \"action-soft\", \"attention\", \"attention-soft\", \"danger\", \"danger-soft\", \"success\", \"success-soft\", \"structure\", \"raised\", \"selected\", \"line-strong\", \"line-control\", \"ink-subtle\", \"code-bg\", \"focus\", \"radius-control\", \"radius-panel\", \"font\", \"font-code\"]","lang":"ts","line":494},{"type":"heading","depth":3,"id":"trigger","children":[{"type":"text","value":"trigger","line":498}],"line":498},{"type":"paragraph","children":[{"type":"text","value":"The entry points of a flow. A flow may have several, each leading into its own part of the graph.","line":500}],"line":500},{"type":"code","value":"const trigger: {\n /**\n * Started by hand, from the API, by an agent, or as a sub-flow. With `input`,\n * what it is started with must match that schema; it is also the schema an\n * agent is shown for the flow's tool.\n */\n manual: (options?: {\n input?: z.ZodType;\n }) => FlowNode;\n /**\n * Started on a five-field cron schedule. With `source`, each tick runs that\n * trigger source, and the flow starts once for each thing it finds.\n */\n schedule: (cron: string, options?: {\n timezone?: string;\n source?: Target;\n /**\n * What names this start for as long as the flow lives. Its address, its pause and\n * when it last fired follow the key when the step is renamed. Left out, the step's\n * own name is the key.\n */\n key?: string;\n /**\n * `skip`, the default, passes over a time while the flow's last run from this\n * trigger is still going. `allow` starts another beside it.\n */\n overlap?: \"allow\" | \"skip\";\n /** CEL expressions over `trigger` that tag each run it starts. */\n tags?: string[];\n }) => FlowNode;\n /**\n * Started by a request to the flow's webhook address. With `source`, each\n * request is handed to that trigger source, which decides what starts.\n */\n webhook: (options?: {\n input?: \"body\" | \"request\";\n verify?: WebhookVerify;\n source?: Target;\n /** `flow` holds the request open, for up to 25 seconds, for a respond step to answer. */\n respond?: \"now\" | \"flow\";\n /** CEL expressions over `trigger` that tag each run it starts. */\n tags?: string[];\n /**\n * What names this start for as long as the flow lives. Its address, its pause and\n * when it last fired follow the key when the step is renamed. Left out, the step's\n * own name is the key.\n */\n key?: string;\n }) => FlowNode;\n /** Started when someone sends the form, which the platform serves as a page. The input is the fields. */\n form: ({ key, ...options }: FormOptions & {\n key?: string;\n }) => FlowNode;\n /** Started when an event is published. `filter` is CEL over `event.payload`. */\n event: (event: Target, options?: {\n filter?: string;\n key?: string;\n tags?: string[];\n }) => FlowNode;\n}","lang":"ts","line":502},{"type":"heading","depth":2,"id":"interfaces","children":[{"type":"text","value":"Interfaces","line":565}],"line":565},{"type":"heading","depth":3,"id":"aggregated","children":[{"type":"text","value":"Aggregated","line":567}],"line":567},{"type":"paragraph","children":[{"type":"text","value":"Totals, one item for each group. With no groups there is one item.","line":569}],"line":569},{"type":"code","value":"interface Aggregated","lang":"ts","line":571},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":575}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":575}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":575}]}],"line":575},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"items","line":577}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"{ /** The group's values, under the names in ","line":577},{"type":"text","value":"group","line":577},{"type":"inlineCode","value":". */ by: Record<string, unknown>; /** The totals, under the names in ","line":577},{"type":"text","value":"measures","line":577},{"type":"inlineCode","value":". */ values: Record<string, number | string | null>; }[]","line":577}]},{"type":"tableCell","children":[]}],"line":577},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"truncated","line":578}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"boolean","line":578}]},{"type":"tableCell","children":[{"type":"text","value":"True when there were more groups than ","line":578},{"type":"inlineCode","value":"limit","line":578},{"type":"text","value":".","line":578}]}],"line":578}],"line":575},{"type":"heading","depth":3,"id":"aggregateoptions","children":[{"type":"text","value":"AggregateOptions","line":580}],"line":580},{"type":"paragraph","children":[{"type":"text","value":"What ","line":582},{"type":"inlineCode","value":"aggregate","line":582},{"type":"text","value":" takes: the columns to group by, the values to work out and the filter to count rows by.","line":582}],"line":582},{"type":"code","value":"interface AggregateOptions","lang":"ts","line":584},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":588}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":588}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":588}]}],"line":588},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"group?","line":590}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string[]","line":590}]},{"type":"tableCell","children":[{"type":"text","value":"Columns to group by, up to three. A date or a time can be gathered into periods: ","line":590},{"type":"inlineCode","value":"\"created_at:month\"","line":590},{"type":"text","value":", with ","line":590},{"type":"inlineCode","value":"day","line":590},{"type":"text","value":", ","line":590},{"type":"inlineCode","value":"week","line":590},{"type":"text","value":", ","line":590},{"type":"inlineCode","value":"month","line":590},{"type":"text","value":" or ","line":590},{"type":"inlineCode","value":"year","line":590},{"type":"text","value":".","line":590}]}],"line":590},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"measures?","line":591}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string[]","line":591}]},{"type":"tableCell","children":[{"type":"text","value":"Totals to work out, up to five: ","line":591},{"type":"inlineCode","value":"\"count\"","line":591},{"type":"text","value":", ","line":591},{"type":"inlineCode","value":"\"count:column\"","line":591},{"type":"text","value":", ","line":591},{"type":"inlineCode","value":"\"sum:column\"","line":591},{"type":"text","value":", ","line":591},{"type":"inlineCode","value":"\"avg:column\"","line":591},{"type":"text","value":", ","line":591},{"type":"inlineCode","value":"\"min:column\"","line":591},{"type":"text","value":", ","line":591},{"type":"inlineCode","value":"\"max:column\"","line":591},{"type":"text","value":". Without any, rows are counted.","line":591}]}],"line":591},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"filter?","line":592}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"Filter","line":592}]},{"type":"tableCell","children":[]}],"line":592},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"sort?","line":593}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string[]","line":593}]},{"type":"tableCell","children":[{"type":"text","value":"Names as they come back, a group's or a total's. A leading minus sorts downwards.","line":593}]}],"line":593},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"limit?","line":594}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"number","line":594}]},{"type":"tableCell","children":[{"type":"text","value":"The most groups to return. At most 1,000. Default 200.","line":594}]}],"line":594}],"line":588},{"type":"heading","depth":3,"id":"appdefinition","children":[{"type":"text","value":"AppDefinition","line":596}],"line":596},{"type":"paragraph","children":[{"type":"text","value":"An app made with ","line":598},{"type":"inlineCode","value":"defineApp","line":598},{"type":"text","value":".","line":598}],"line":598},{"type":"code","value":"interface AppDefinition extends ResourceDefinition","lang":"ts","line":600},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":604}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":604}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":604}]}],"line":604},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"kind","line":606}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"\"app\"","line":606}]},{"type":"tableCell","children":[]}],"line":606},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"source?","line":607}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":607}]},{"type":"tableCell","children":[{"type":"text","value":"Read by the build. Not part of the manifest. Absent for an app that serves an interface.","line":607}]}],"line":607}],"line":604},{"type":"heading","depth":3,"id":"authoredmanifest","children":[{"type":"text","value":"AuthoredManifest","line":609}],"line":609},{"type":"paragraph","children":[{"type":"text","value":"An authored manifest, before the control plane assigns a workspace, ID and version.","line":611}],"line":611},{"type":"code","value":"interface AuthoredManifest","lang":"ts","line":613},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":617}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":617}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":617}]}],"line":617},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"kind","line":619}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":619}]},{"type":"tableCell","children":[]}],"line":619},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"schemaVersion","line":620}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"number","line":620}]},{"type":"tableCell","children":[]}],"line":620},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"path","line":621}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":621}]},{"type":"tableCell","children":[]}],"line":621},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"key?","line":622}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":622}]},{"type":"tableCell","children":[]}],"line":622},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"title?","line":623}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":623}]},{"type":"tableCell","children":[]}],"line":623},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"mcp?","line":624}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"ToolName","line":624}]},{"type":"tableCell","children":[]}],"line":624},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"ownership","line":625}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"\"code\"","line":625}]},{"type":"tableCell","children":[]}],"line":625},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"body","line":626}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"Record<string, unknown>","line":626}]},{"type":"tableCell","children":[]}],"line":626}],"line":617},{"type":"heading","depth":3,"id":"columnoptions","children":[{"type":"text","value":"ColumnOptions","line":628}],"line":628},{"type":"paragraph","children":[{"type":"text","value":"What a column may say beside its type: what it holds, whether it is required or unique, and its default.","line":630}],"line":630},{"type":"code","value":"interface ColumnOptions<Required extends boolean = boolean>","lang":"ts","line":632},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":636}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":636}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":636}]}],"line":636},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"description?","line":638}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":638}]},{"type":"tableCell","children":[{"type":"text","value":"What the column holds, in plain text. Shown on its heading and where documentation names it.","line":638}]}],"line":638},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"required?","line":639}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"Required","line":639}]},{"type":"tableCell","children":[{"type":"text","value":"A row must have a value.","line":639}]}],"line":639},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"unique?","line":640}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"boolean","line":640}]},{"type":"tableCell","children":[{"type":"text","value":"No two rows may share a value.","line":640}]}],"line":640},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"default?","line":641}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"unknown","line":641}]},{"type":"tableCell","children":[{"type":"text","value":"Used when a row gives no value, and for existing rows when the column is added.","line":641}]}],"line":641},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"renamedFrom?","line":642}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":642}]},{"type":"tableCell","children":[{"type":"text","value":"The column's previous name. Its data is kept. Without this, a new name is a new, empty column.","line":642}]}],"line":642}],"line":636},{"type":"heading","depth":3,"id":"columnspec","children":[{"type":"text","value":"ColumnSpec","line":644}],"line":644},{"type":"paragraph","children":[{"type":"text","value":"One column of a table definition. ","line":646},{"type":"inlineCode","value":"Value","line":646},{"type":"text","value":" is its type in a row.","line":646}],"line":646},{"type":"code","value":"interface ColumnSpec<Value, Required extends boolean, Defaulted extends boolean = false>","lang":"ts","line":648},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":652}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":652}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":652}]}],"line":652},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"manifest","line":654}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"Record<string, unknown>","line":654}]},{"type":"tableCell","children":[]}],"line":654},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"__value?","line":655}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"Value","line":655}]},{"type":"tableCell","children":[{"type":"text","value":"Only for type inference. Never set.","line":655}]}],"line":655},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"__required?","line":656}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"Required","line":656}]},{"type":"tableCell","children":[]}],"line":656},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"__defaulted?","line":657}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"Defaulted","line":657}]},{"type":"tableCell","children":[{"type":"text","value":"Whether the column has a default, so a row may be written without it.","line":657}]}],"line":657}],"line":652},{"type":"heading","depth":3,"id":"connectiontest","children":[{"type":"text","value":"ConnectionTest","line":659}],"line":659},{"type":"paragraph","children":[{"type":"text","value":"What trying a connection found.","line":661}],"line":661},{"type":"code","value":"interface ConnectionTest","lang":"ts","line":663},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":667}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":667}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":667}]}],"line":667},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"status?","line":669}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"number","line":669}]},{"type":"tableCell","children":[{"type":"text","value":"The status the system answered with, for one that has statuses.","line":669}]}],"line":669},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"message?","line":670}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":670}]},{"type":"tableCell","children":[{"type":"text","value":"Anything else worth showing a person.","line":670}]}],"line":670}],"line":667},{"type":"heading","depth":3,"id":"connector","children":[{"type":"text","value":"Connector","line":672}],"line":672},{"type":"paragraph","children":[{"type":"text","value":"An adapter for one kind of external system.","line":674}],"line":674},{"type":"code","value":"interface Connector<Config, Client>","lang":"ts","line":676},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":680}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":680}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":680}]}],"line":680},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"name","line":682}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":682}]},{"type":"tableCell","children":[{"type":"text","value":"The name a connection resource refers to in its ","line":682},{"type":"inlineCode","value":"connector","line":682},{"type":"text","value":" field.","line":682}]}],"line":682},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"configSchema","line":683}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"object","line":683}]},{"type":"tableCell","children":[{"type":"text","value":"JSON Schema for a connection's configuration.","line":683}]}],"line":683},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"create","line":684}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(config: Config, credential: string | undefined, signal: AbortSignal): Client","line":684}]},{"type":"tableCell","children":[{"type":"text","value":"Builds the client a script receives. ","line":684},{"type":"inlineCode","value":"credential","line":684},{"type":"text","value":" is the connection's secret, when it has one. ","line":684},{"type":"inlineCode","value":"signal","line":684},{"type":"text","value":" aborts when the run is canceled.","line":684}]}],"line":684},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"test?","line":685}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(config: Config, credential: string | undefined, signal: AbortSignal): Promise<ConnectionTest>","line":685}]},{"type":"tableCell","children":[{"type":"text","value":"Tries a connection without doing anything with it: what the console's Test button runs. Resolves with what it found, or throws why it could not reach it. A connector without it is tested by building its client.","line":685}]}],"line":685}],"line":680},{"type":"heading","depth":3,"id":"connectordefinition","children":[{"type":"text","value":"ConnectorDefinition","line":687}],"line":687},{"type":"paragraph","children":[{"type":"text","value":"A connector made with ","line":689},{"type":"inlineCode","value":"defineConnector","line":689},{"type":"text","value":", which connections of your own name.","line":689}],"line":689},{"type":"code","value":"interface ConnectorDefinition<Config, Client> extends ResourceDefinition","lang":"ts","line":691},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":695}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":695}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":695}]}],"line":695},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"kind","line":697}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"\"connector\"","line":697}]},{"type":"tableCell","children":[]}],"line":697},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"create","line":698}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(config: Config, credential: string | undefined, signal: AbortSignal): Client","line":698}]},{"type":"tableCell","children":[]}],"line":698},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"test?","line":699}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(config: Config, credential: string | undefined, signal: AbortSignal): Promise<ConnectionTest>","line":699}]},{"type":"tableCell","children":[]}],"line":699}],"line":695},{"type":"heading","depth":3,"id":"dashboardoptions","children":[{"type":"text","value":"DashboardOptions","line":701}],"line":701},{"type":"paragraph","children":[{"type":"text","value":"What ","line":703},{"type":"inlineCode","value":"defineDashboard","line":703},{"type":"text","value":" takes: its path and the widgets it is made of.","line":703}],"line":703},{"type":"code","value":"interface DashboardOptions extends Omit<ResourceNames, \"title\">, DashboardBody","lang":"ts","line":705},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":709}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":709}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":709}]}],"line":709},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"path","line":711}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":711}]},{"type":"tableCell","children":[{"type":"text","value":"Unique within the workspace, for example ","line":711},{"type":"inlineCode","value":"boards/clinic-visits","line":711},{"type":"text","value":".","line":711}]}],"line":711}],"line":709},{"type":"heading","depth":3,"id":"findoptions","children":[{"type":"text","value":"FindOptions","line":713}],"line":713},{"type":"paragraph","children":[{"type":"text","value":"What ","line":715},{"type":"inlineCode","value":"find","line":715},{"type":"text","value":" takes: a filter, the order, how many rows and where to start.","line":715}],"line":715},{"type":"code","value":"interface FindOptions","lang":"ts","line":717},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":721}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":721}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":721}]}],"line":721},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"filter?","line":723}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"Filter","line":723}]},{"type":"tableCell","children":[]}],"line":723},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"sort?","line":724}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string[]","line":724}]},{"type":"tableCell","children":[{"type":"text","value":"Column names. A leading minus sorts that column downwards.","line":724}]}],"line":724},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"limit?","line":725}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"number","line":725}]},{"type":"tableCell","children":[{"type":"text","value":"At most 1,000. Default 50.","line":725}]}],"line":725},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"offset?","line":726}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"number","line":726}]},{"type":"tableCell","children":[]}],"line":726}],"line":721},{"type":"heading","depth":3,"id":"httpclient","children":[{"type":"text","value":"HttpClient","line":728}],"line":728},{"type":"paragraph","children":[{"type":"text","value":"What a script is given for an ","line":730},{"type":"inlineCode","value":"http","line":730},{"type":"text","value":" or ","line":730},{"type":"inlineCode","value":"oauth2","line":730},{"type":"text","value":" connection: requests to the connection's own address.","line":730}],"line":730},{"type":"code","value":"interface HttpClient","lang":"ts","line":732},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":736}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":736}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":736}]}],"line":736},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"request","line":738}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(path: string, options?: HttpRequest): Promise<HttpResponse>","line":738}]},{"type":"tableCell","children":[]}],"line":738},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"get","line":739}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(path: string, options?: HttpRequest): Promise<HttpResponse>","line":739}]},{"type":"tableCell","children":[]}],"line":739},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"post","line":740}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(path: string, json?: unknown, options?: HttpRequest): Promise<HttpResponse>","line":740}]},{"type":"tableCell","children":[]}],"line":740}],"line":736},{"type":"heading","depth":3,"id":"httpconfig","children":[{"type":"text","value":"HttpConfig","line":742}],"line":742},{"type":"paragraph","children":[{"type":"text","value":"The configuration of an ","line":744},{"type":"inlineCode","value":"http","line":744},{"type":"text","value":" connection: its address, the headers sent with every request and how the credential is sent.","line":744}],"line":744},{"type":"code","value":"interface HttpConfig","lang":"ts","line":746},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":750}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":750}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":750}]}],"line":750},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"baseUrl","line":752}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":752}]},{"type":"tableCell","children":[]}],"line":752},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"headers?","line":753}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"Record<string, string>","line":753}]},{"type":"tableCell","children":[{"type":"text","value":"Sent with every request. Not for credentials.","line":753}]}],"line":753},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"testPath?","line":754}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":754}]},{"type":"tableCell","children":[{"type":"text","value":"A path under the base address that a Test asks for, such as ","line":754},{"type":"inlineCode","value":"/health","line":754},{"type":"text","value":". Left out, the Test asks for the base address itself.","line":754}]}],"line":754},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"auth?","line":755}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"{ type: \"bearer\"; } | { type: \"header\"; name: string; } | { type: \"basic\"; username: string; }","line":755}]},{"type":"tableCell","children":[{"type":"text","value":"How the connection's credential is sent.","line":755}]}],"line":755}],"line":750},{"type":"heading","depth":3,"id":"httprequest","children":[{"type":"text","value":"HttpRequest","line":757}],"line":757},{"type":"paragraph","children":[{"type":"text","value":"What a request of an ","line":759},{"type":"inlineCode","value":"HttpClient","line":759},{"type":"text","value":" may say beside its path: the method, headers, a query and a body.","line":759}],"line":759},{"type":"code","value":"interface HttpRequest","lang":"ts","line":761},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":765}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":765}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":765}]}],"line":765},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"method?","line":767}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":767}]},{"type":"tableCell","children":[]}],"line":767},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"headers?","line":768}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"Record<string, string>","line":768}]},{"type":"tableCell","children":[]}],"line":768},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"query?","line":769}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"Record<string, string | number | boolean | undefined>","line":769}]},{"type":"tableCell","children":[]}],"line":769},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"json?","line":770}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"unknown","line":770}]},{"type":"tableCell","children":[{"type":"text","value":"Sent as a JSON body.","line":770}]}],"line":770},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"body?","line":771}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":771}]},{"type":"tableCell","children":[]}],"line":771},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"allowFailure?","line":772}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"boolean","line":772}]},{"type":"tableCell","children":[{"type":"text","value":"Do not throw on a 4xx or 5xx status.","line":772}]}],"line":772}],"line":765},{"type":"heading","depth":3,"id":"httpresponse","children":[{"type":"text","value":"HttpResponse","line":774}],"line":774},{"type":"paragraph","children":[{"type":"text","value":"What an ","line":776},{"type":"inlineCode","value":"HttpClient","line":776},{"type":"text","value":" gets back: the status, the headers, the body as text and a way to read it as JSON.","line":776}],"line":776},{"type":"code","value":"interface HttpResponse","lang":"ts","line":778},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":782}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":782}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":782}]}],"line":782},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"status","line":784}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"number","line":784}]},{"type":"tableCell","children":[]}],"line":784},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"ok","line":785}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"boolean","line":785}]},{"type":"tableCell","children":[]}],"line":785},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"headers","line":786}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"Record<string, string>","line":786}]},{"type":"tableCell","children":[]}],"line":786},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"text","line":787}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":787}]},{"type":"tableCell","children":[]}],"line":787},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"json","line":788}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"<T = unknown>(): T","line":788}]},{"type":"tableCell","children":[{"type":"text","value":"The body parsed as JSON. Throws if it is not JSON.","line":788}]}],"line":788}],"line":782},{"type":"heading","depth":3,"id":"interfaceoptions","children":[{"type":"text","value":"InterfaceOptions","line":790}],"line":790},{"type":"paragraph","children":[{"type":"text","value":"What ","line":792},{"type":"inlineCode","value":"defineInterface","line":792},{"type":"text","value":" takes: its path and the pages it is made of.","line":792}],"line":792},{"type":"code","value":"interface InterfaceOptions extends Omit<ResourceNames, \"title\">, InterfaceBody","lang":"ts","line":794},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":798}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":798}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":798}]}],"line":798},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"path","line":800}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":800}]},{"type":"tableCell","children":[{"type":"text","value":"Unique within the workspace, for example ","line":800},{"type":"inlineCode","value":"screens/invoices","line":800},{"type":"text","value":".","line":800}]}],"line":800}],"line":798},{"type":"heading","depth":3,"id":"logger","children":[{"type":"text","value":"Logger","line":802}],"line":802},{"type":"paragraph","children":[{"type":"text","value":"What a script writes its log with. Each line is kept with the run, and the secrets the script uses are masked in it.","line":804}],"line":804},{"type":"code","value":"interface Logger","lang":"ts","line":806},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":810}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":810}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":810}]}],"line":810},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"debug","line":812}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(message: string, fields?: Record<string, unknown>): void","line":812}]},{"type":"tableCell","children":[]}],"line":812},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"info","line":813}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(message: string, fields?: Record<string, unknown>): void","line":813}]},{"type":"tableCell","children":[]}],"line":813},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"warn","line":814}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(message: string, fields?: Record<string, unknown>): void","line":814}]},{"type":"tableCell","children":[]}],"line":814},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"error","line":815}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(message: string, fields?: Record<string, unknown>): void","line":815}]},{"type":"tableCell","children":[]}],"line":815}],"line":810},{"type":"heading","depth":3,"id":"mailmessage","children":[{"type":"text","value":"MailMessage","line":817}],"line":817},{"type":"paragraph","children":[{"type":"text","value":"A message to send through an ","line":819},{"type":"inlineCode","value":"smtp","line":819},{"type":"text","value":" connection.","line":819}],"line":819},{"type":"code","value":"interface MailMessage","lang":"ts","line":821},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":825}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":825}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":825}]}],"line":825},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"to","line":827}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string | string[]","line":827}]},{"type":"tableCell","children":[{"type":"text","value":"One address or several.","line":827}]}],"line":827},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"cc?","line":828}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string | string[]","line":828}]},{"type":"tableCell","children":[]}],"line":828},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"bcc?","line":829}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string | string[]","line":829}]},{"type":"tableCell","children":[]}],"line":829},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"replyTo?","line":830}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":830}]},{"type":"tableCell","children":[]}],"line":830},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"subject","line":831}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":831}]},{"type":"tableCell","children":[]}],"line":831},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"text?","line":832}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":832}]},{"type":"tableCell","children":[{"type":"text","value":"The message as plain text. Give this, ","line":832},{"type":"inlineCode","value":"html","line":832},{"type":"text","value":", or both.","line":832}]}],"line":832},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"html?","line":833}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":833}]},{"type":"tableCell","children":[]}],"line":833}],"line":825},{"type":"heading","depth":3,"id":"oauth2config","children":[{"type":"text","value":"OAuth2Config","line":835}],"line":835},{"type":"paragraph","children":[{"type":"text","value":"An API reached with OAuth 2.0: a member authorizes it once in the console,","line":837},{"type":"break","hard":false,"line":837},{"type":"text","value":"and the platform keeps the tokens and refreshes them. A worker is handed the","line":838},{"type":"break","hard":false,"line":838},{"type":"text","value":"access token alone, never the refresh token or the client's secret.","line":839}],"line":837},{"type":"code","value":"interface OAuth2Config","lang":"ts","line":841},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":845}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":845}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":845}]}],"line":845},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"baseUrl","line":847}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":847}]},{"type":"tableCell","children":[{"type":"text","value":"Where the API is. Every request goes here, as with an http connection.","line":847}]}],"line":847},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"authorizeUrl","line":848}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":848}]},{"type":"tableCell","children":[{"type":"text","value":"The provider's authorization endpoint, where a member is sent to agree.","line":848}]}],"line":848},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"tokenUrl","line":849}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":849}]},{"type":"tableCell","children":[{"type":"text","value":"The provider's token endpoint. Only the control plane calls it.","line":849}]}],"line":849},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"clientId","line":850}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":850}]},{"type":"tableCell","children":[]}],"line":850},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"scopes?","line":851}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string[]","line":851}]},{"type":"tableCell","children":[]}],"line":851},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"authorizeParams?","line":852}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"Record<string, string>","line":852}]},{"type":"tableCell","children":[{"type":"text","value":"Added to the authorization request, such as ","line":852},{"type":"inlineCode","value":"{ access_type: \"offline\" }","line":852},{"type":"text","value":" for Google.","line":852}]}],"line":852},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"clientAuth?","line":853}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"\"body\" | \"basic\"","line":853}]},{"type":"tableCell","children":[{"type":"text","value":"How the client authenticates to the token endpoint: in the body, or with HTTP Basic.","line":853}]}],"line":853},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"headers?","line":854}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"Record<string, string>","line":854}]},{"type":"tableCell","children":[{"type":"text","value":"Sent with every request. Not for credentials.","line":854}]}],"line":854},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"testPath?","line":855}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":855}]},{"type":"tableCell","children":[{"type":"text","value":"What Test asks for, below the base URL. The base URL itself when left out.","line":855}]}],"line":855}],"line":845},{"type":"heading","depth":3,"id":"pollresult","children":[{"type":"text","value":"PollResult","line":857}],"line":857},{"type":"paragraph","children":[{"type":"text","value":"What a polling trigger source answers.","line":859}],"line":859},{"type":"code","value":"interface PollResult<Cursor = unknown>","lang":"ts","line":861},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":865}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":865}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":865}]}],"line":865},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"items","line":867}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"unknown[]","line":867}]},{"type":"tableCell","children":[{"type":"text","value":"Each starts the trigger's script or flow. At most 100 a tick: a tick that gives more fails, starts nothing and keeps the cursor it had, so give fewer, and the rest on the next tick.","line":867}]}],"line":867},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"cursor?","line":868}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"Cursor","line":868}]},{"type":"tableCell","children":[{"type":"text","value":"Where to pick up from next time. Left out, the place it had is kept.","line":868}]}],"line":868}],"line":865},{"type":"heading","depth":3,"id":"polltick","children":[{"type":"text","value":"PollTick","line":870}],"line":870},{"type":"paragraph","children":[{"type":"text","value":"What a polling trigger source is handed on each tick.","line":872}],"line":872},{"type":"code","value":"interface PollTick<Cursor = unknown>","lang":"ts","line":874},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":878}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":878}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":878}]}],"line":878},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"cursor","line":880}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"Cursor | null","line":880}]},{"type":"tableCell","children":[{"type":"text","value":"What the source gave back as ","line":880},{"type":"inlineCode","value":"cursor","line":880},{"type":"text","value":" last time. Null the first time.","line":880}]}],"line":880},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"scheduledFor","line":881}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":881}]},{"type":"tableCell","children":[{"type":"text","value":"When this tick was due.","line":881}]}],"line":881}],"line":878},{"type":"heading","depth":3,"id":"resourcedefinition","children":[{"type":"text","value":"ResourceDefinition","line":883}],"line":883},{"type":"paragraph","children":[{"type":"text","value":"Something a tenant repository exports for the build to pick up.","line":885}],"line":885},{"type":"code","value":"interface ResourceDefinition","lang":"ts","line":887},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":891}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":891}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":891}]}],"line":891},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"[RESOURCE]","line":893}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"true","line":893}]},{"type":"tableCell","children":[]}],"line":893},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"kind","line":894}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":894}]},{"type":"tableCell","children":[]}],"line":894},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"path","line":895}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":895}]},{"type":"tableCell","children":[]}],"line":895},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"toManifest","line":896}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(entry: string): AuthoredManifest","line":896}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"entry","line":896},{"type":"text","value":" is the name this definition is exported under.","line":896}]}],"line":896}],"line":891},{"type":"heading","depth":3,"id":"resourcenames","children":[{"type":"text","value":"ResourceNames","line":898}],"line":898},{"type":"paragraph","children":[{"type":"text","value":"The names every resource has beside its path. The path is its address and can","line":900},{"type":"break","hard":false,"line":900},{"type":"text","value":"change. The key is its identity and never does.","line":901}],"line":900},{"type":"code","value":"interface ResourceNames","lang":"ts","line":903},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":907}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":907}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":907}]}],"line":907},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"key?","line":909}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":909}]},{"type":"tableCell","children":[{"type":"text","value":"The resource's identity. Leave it out: it is the path the resource is made at. Say it only when you move a resource to another path, as the path it had, so that it stays the same resource with its history, its data and what was bound to it.","line":909}]}],"line":909},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"title?","line":910}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":910}]},{"type":"tableCell","children":[{"type":"text","value":"What people read, in the console and in lists.","line":910}]}],"line":910}],"line":907},{"type":"heading","depth":3,"id":"runinfo","children":[{"type":"text","value":"RunInfo","line":912}],"line":912},{"type":"paragraph","children":[{"type":"text","value":"What a script knows about the run it is in: its ID, which attempt it is, and a key that stays the same across attempts.","line":914}],"line":914},{"type":"code","value":"interface RunInfo","lang":"ts","line":916},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":920}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":920}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":920}]}],"line":920},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"id","line":922}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":922}]},{"type":"tableCell","children":[]}],"line":922},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"attempt","line":923}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"number","line":923}]},{"type":"tableCell","children":[{"type":"text","value":"1 on the first attempt. A retry is a new attempt of the same run.","line":923}]}],"line":923},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"idempotencyKey","line":924}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":924}]},{"type":"tableCell","children":[{"type":"text","value":"Stable across attempts of this run. Pass it to the systems you call, so a retried run does not repeat what the first attempt already did.","line":924}]}],"line":924},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"trigger","line":925}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"{ type: string; [detail: string]: unknown; }","line":925}]},{"type":"tableCell","children":[]}],"line":925},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"startedBy","line":926}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"{ type: string; id: string | null; }","line":926}]},{"type":"tableCell","children":[{"type":"text","value":"Who started the run: a ","line":926},{"type":"inlineCode","value":"member","line":926},{"type":"text","value":", an ","line":926},{"type":"inlineCode","value":"end_user","line":926},{"type":"text","value":" or a ","line":926},{"type":"inlineCode","value":"service_account","line":926},{"type":"text","value":", with their ID, or ","line":926},{"type":"inlineCode","value":"system","line":926},{"type":"text","value":" for a schedule, a webhook or an event. A script started from an app reads and writes for that person with ","line":926},{"type":"inlineCode","value":"ctx.table(orders).as(ctx.run.startedBy.id)","line":926},{"type":"text","value":".","line":926}]}],"line":926},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"tag","line":927}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(...tags: string[]): Promise<void>","line":927}]},{"type":"tableCell","children":[{"type":"text","value":"Labels the run, so it can be found by them: ","line":927},{"type":"inlineCode","value":"await ctx.run.tag(\"order:1234\")","line":927},{"type":"text","value":". At most 10 per run, each up to 64 characters of ","line":927},{"type":"inlineCode","value":"a-z","line":927},{"type":"text","value":", ","line":927},{"type":"inlineCode","value":"0-9","line":927},{"type":"text","value":" and ","line":927},{"type":"inlineCode","value":"_.:-","line":927},{"type":"text","value":". A step of a flow labels its flow run too.","line":927}]}],"line":927}],"line":920},{"type":"heading","depth":3,"id":"scriptcontext","children":[{"type":"text","value":"ScriptContext","line":929}],"line":929},{"type":"paragraph","children":[{"type":"text","value":"What a script receives when it runs.","line":931}],"line":931},{"type":"code","value":"interface ScriptContext","lang":"ts","line":933},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":937}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":937}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":937}]}],"line":937},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"connection","line":939}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"<Client = import(\"./http.js\").HttpClient>(path: KnownOr<keyof VolvelConnections>): Promise<Client>","line":939}]},{"type":"tableCell","children":[{"type":"text","value":"A client for a connection the script declared.","line":939}]}],"line":939},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"connections","line":940}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"<Client = import(\"./http.js\").HttpClient>(group: string | { path: string; }): { /** A client for the member with this key. Throws when the group has no such member. */ get(key: string): Promise<Client>; /** The members the group has in this workspace. */ keys(): Promise<{ key: string; label: string; }[]>; }","line":940}]},{"type":"tableCell","children":[{"type":"text","value":"A connection group the script declared. Its members are added per workspace in the console, so which one to use is decided by data: ","line":940},{"type":"inlineCode","value":"await ctx.connections(\"shops\").get(input.shop)","line":940},{"type":"text","value":".","line":940}]}],"line":940},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"secret","line":941}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(name: string): Promise<string>","line":941}]},{"type":"tableCell","children":[{"type":"text","value":"The value of a secret the script declared.","line":941}]}],"line":941},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"variable","line":942}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(path: KnownOr<keyof VolvelVariables>): Promise<string>","line":942}]},{"type":"tableCell","children":[{"type":"text","value":"The value of a variable the script declared.","line":942}]}],"line":942},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"table","line":943}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"<Name extends keyof VolvelTables>(table: Name): import(\"./tables.js\").TableClient<VolvelTables[Name] extends { row: infer Row; } ? Row : never, VolvelTables[Name] extends { insert: infer Insert; } ? Insert : never>","line":943}]},{"type":"tableCell","children":[{"type":"text","value":"The rows of a table the script declared. Typed by the table's path when the generated file knows it, and when given the table's definition.","line":943}]}],"line":943},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"table","line":944}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"<Row = Record<string, unknown>, Insert = Partial<Row>>(table: string | { path: string; __row?: Row; __insert?: Insert; }): import(\"./tables.js\").TableClient<Row, Insert>","line":944}]},{"type":"tableCell","children":[]}],"line":944},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"source","line":945}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(path: string | { path: string; }): { table(name: string): import(\"./tables.js\").TableClient<Record<string, unknown>>; }","line":945}]},{"type":"tableCell","children":[{"type":"text","value":"An external data source the script declared.","line":945}]}],"line":945},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"files","line":946}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"{ /** Stores a file in the workspace and gives its ID, for a ","line":946},{"type":"text","value":"file","line":946},{"type":"inlineCode","value":" column or for later. */ put(name: string, content: Uint8Array | string, contentType?: string): Promise<{ id: string; }>; get(id: string): Promise<{ name: string; contentType: string; content: Uint8Array; }>; }","line":946}]},{"type":"tableCell","children":[]}],"line":946},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"events","line":947}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"{ /** Publishes an event the script declared. Its subscribers are started before this returns. */ publish<Name extends keyof VolvelEvents>(event: Name, payload: VolvelEvents[Name]): Promise<void>; publish<Name extends string>(event: Name extends keyof VolvelEvents ? never : Name, payload: Record<string, unknown>): Promise<void>; }","line":947}]},{"type":"tableCell","children":[]}],"line":947},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"log","line":948}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"Logger","line":948}]},{"type":"tableCell","children":[]}],"line":948},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"run","line":949}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"RunInfo","line":949}]},{"type":"tableCell","children":[]}],"line":949},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"signal","line":950}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"AbortSignal","line":950}]},{"type":"tableCell","children":[{"type":"text","value":"Aborts when the run is canceled or runs out of time. Pass it to anything slow.","line":950}]}],"line":950}],"line":937},{"type":"heading","depth":3,"id":"scriptdefinition","children":[{"type":"text","value":"ScriptDefinition","line":952}],"line":952},{"type":"paragraph","children":[{"type":"text","value":"A script made with ","line":954},{"type":"inlineCode","value":"defineScript","line":954},{"type":"text","value":". The build finds it among a repository's exports.","line":954}],"line":954},{"type":"code","value":"interface ScriptDefinition extends ResourceDefinition","lang":"ts","line":956},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":960}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":960}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":960}]}],"line":960},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"kind","line":962}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"\"script\"","line":962}]},{"type":"tableCell","children":[]}],"line":962},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"execute","line":963}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(input: unknown, ctx: ScriptContext): Promise<unknown>","line":963}]},{"type":"tableCell","children":[{"type":"text","value":"Validates the input, runs the script and validates what it returns.","line":963}]}],"line":963}],"line":960},{"type":"heading","depth":3,"id":"smtpclient","children":[{"type":"text","value":"SmtpClient","line":965}],"line":965},{"type":"paragraph","children":[{"type":"text","value":"What a script is given for an ","line":967},{"type":"inlineCode","value":"smtp","line":967},{"type":"text","value":" connection.","line":967}],"line":967},{"type":"code","value":"interface SmtpClient","lang":"ts","line":969},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":973}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":973}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":973}]}],"line":973},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"send","line":975}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(message: MailMessage): Promise<{ messageId: string; }>","line":975}]},{"type":"tableCell","children":[{"type":"text","value":"Sends one message. Resolves once the server has taken it, with the ID the server gave it.","line":975}]}],"line":975}],"line":973},{"type":"heading","depth":3,"id":"smtpconfig","children":[{"type":"text","value":"SmtpConfig","line":977}],"line":977},{"type":"paragraph","children":[{"type":"text","value":"A connection to a mail server, for the built-in ","line":979},{"type":"inlineCode","value":"smtp","line":979},{"type":"text","value":" connector.","line":979}],"line":979},{"type":"code","value":"interface SmtpConfig","lang":"ts","line":981},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":985}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":985}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":985}]}],"line":985},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"host","line":987}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":987}]},{"type":"tableCell","children":[]}],"line":987},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"port?","line":988}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"number","line":988}]},{"type":"tableCell","children":[{"type":"text","value":"Default 587.","line":988}]}],"line":988},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"security?","line":989}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"\"tls\" | \"starttls\" | \"none\"","line":989}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"tls","line":989},{"type":"text","value":" speaks TLS from the first byte, as port 465 expects. ","line":989},{"type":"inlineCode","value":"starttls","line":989},{"type":"text","value":" upgrades a plain connection and refuses to go on without it. ","line":989},{"type":"inlineCode","value":"none","line":989},{"type":"text","value":" is for a server inside the same network that offers neither. Default ","line":989},{"type":"inlineCode","value":"starttls","line":989},{"type":"text","value":".","line":989}]}],"line":989},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"from","line":990}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":990}]},{"type":"tableCell","children":[{"type":"text","value":"The address mail is sent from: ","line":990},{"type":"inlineCode","value":"orders@example.com","line":990},{"type":"text","value":" or ","line":990},{"type":"inlineCode","value":"Orders <orders@example.com>","line":990},{"type":"text","value":".","line":990}]}],"line":990},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"username?","line":991}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":991}]},{"type":"tableCell","children":[{"type":"text","value":"The user to sign in as. The password is the connection's credential.","line":991}]}],"line":991}],"line":985},{"type":"heading","depth":3,"id":"stepgrants","children":[{"type":"text","value":"StepGrants","line":993}],"line":993},{"type":"paragraph","children":[{"type":"text","value":"What a step hands the script it runs, by path or by definition.","line":995}],"line":995},{"type":"code","value":"interface StepGrants","lang":"ts","line":997},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":1001}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":1001}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":1001}]}],"line":1001},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"connections?","line":1003}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"Target[]","line":1003}]},{"type":"tableCell","children":[]}],"line":1003},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"tables?","line":1004}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"Target[]","line":1004}]},{"type":"tableCell","children":[]}],"line":1004},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"events?","line":1005}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"Target[]","line":1005}]},{"type":"tableCell","children":[]}],"line":1005}],"line":1001},{"type":"heading","depth":3,"id":"systemcolumns","children":[{"type":"text","value":"SystemColumns","line":1007}],"line":1007},{"type":"paragraph","children":[{"type":"text","value":"What every row of a custom table has, whatever its definition.","line":1009}],"line":1009},{"type":"code","value":"interface SystemColumns","lang":"ts","line":1011},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":1015}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":1015}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":1015}]}],"line":1015},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"id","line":1017}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":1017}]},{"type":"tableCell","children":[]}],"line":1017},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"created_at","line":1018}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":1018}]},{"type":"tableCell","children":[]}],"line":1018},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"updated_at","line":1019}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":1019}]},{"type":"tableCell","children":[]}],"line":1019}],"line":1015},{"type":"heading","depth":3,"id":"tableclient","children":[{"type":"text","value":"TableClient","line":1021}],"line":1021},{"type":"paragraph","children":[{"type":"text","value":"Reads and writes the rows of one table.","line":1023}],"line":1023},{"type":"code","value":"interface TableClient<Row, Insert = Partial<Row>>","lang":"ts","line":1025},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":1029}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":1029}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":1029}]}],"line":1029},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"find","line":1031}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(options?: FindOptions): Promise<Row[]>","line":1031}]},{"type":"tableCell","children":[]}],"line":1031},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"get","line":1032}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(id: string): Promise<Row | null>","line":1032}]},{"type":"tableCell","children":[{"type":"text","value":"The row with this ID, or null.","line":1032}]}],"line":1032},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"insert","line":1033}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(row: Insert): Promise<Row>","line":1033}]},{"type":"tableCell","children":[]}],"line":1033},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"insertMany","line":1034}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(rows: Insert[]): Promise<Row[]>","line":1034}]},{"type":"tableCell","children":[{"type":"text","value":"Up to 1,000 rows. Either all are inserted or none.","line":1034}]}],"line":1034},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"update","line":1035}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(id: string, changes: Partial<Insert>): Promise<Row>","line":1035}]},{"type":"tableCell","children":[]}],"line":1035},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"delete","line":1036}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(id: string): Promise<void>","line":1036}]},{"type":"tableCell","children":[]}],"line":1036},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"aggregate","line":1037}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(options?: AggregateOptions): Promise<Aggregated>","line":1037}]},{"type":"tableCell","children":[{"type":"text","value":"Counts, sums, averages, the least and the most, over the rows or over groups of them.","line":1037}]}],"line":1037},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"as","line":1038}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(principalId: string): TableClient<Row, Insert>","line":1038}]},{"type":"tableCell","children":[{"type":"text","value":"The same table as one person sees it: its row policy applies as it would to them. Without this, a script acts as the workspace and reaches every row.","line":1038}]}],"line":1038}],"line":1029},{"type":"heading","depth":3,"id":"tabledefinition","children":[{"type":"text","value":"TableDefinition","line":1040}],"line":1040},{"type":"paragraph","children":[{"type":"text","value":"A table made with ","line":1042},{"type":"inlineCode","value":"defineTable","line":1042},{"type":"text","value":", which carries the type of its rows.","line":1042}],"line":1042},{"type":"code","value":"interface TableDefinition<Row, Insert> extends ResourceDefinition","lang":"ts","line":1044},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":1048}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":1048}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":1048}]}],"line":1048},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"kind","line":1050}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"\"table\"","line":1050}]},{"type":"tableCell","children":[]}],"line":1050},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"__row?","line":1051}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"Row","line":1051}]},{"type":"tableCell","children":[{"type":"text","value":"Only for type inference. Never set.","line":1051}]}],"line":1051},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"__insert?","line":1052}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"Insert","line":1052}]},{"type":"tableCell","children":[]}],"line":1052}],"line":1048},{"type":"heading","depth":3,"id":"tableof","children":[{"type":"text","value":"TableOf","line":1054}],"line":1054},{"type":"paragraph","children":[{"type":"text","value":"A table's types by its path, in the form an app's ","line":1056},{"type":"inlineCode","value":"table<...>(\"path\")","line":1056},{"type":"text","value":" takes where it","line":1056},{"type":"break","hard":false,"line":1056},{"type":"text","value":"took ","line":1057},{"type":"inlineCode","value":"typeof definition","line":1057},{"type":"text","value":": ","line":1057},{"type":"inlineCode","value":"table<TableOf<\"visits\">>(\"visits\")","line":1057},{"type":"text","value":".","line":1057}],"line":1056},{"type":"code","value":"interface TableOf<Name extends keyof VolvelTables>","lang":"ts","line":1059},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":1063}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":1063}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":1063}]}],"line":1063},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"__row?","line":1065}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"Row<Name>","line":1065}]},{"type":"tableCell","children":[]}],"line":1065},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"__insert?","line":1066}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"Insert<Name>","line":1066}]},{"type":"tableCell","children":[]}],"line":1066}],"line":1063},{"type":"heading","depth":3,"id":"toolname","children":[{"type":"text","value":"ToolName","line":1068}],"line":1068},{"type":"paragraph","children":[{"type":"text","value":"The name of the tool an agent is offered for a script or a flow. Without it","line":1070},{"type":"break","hard":false,"line":1070},{"type":"text","value":"the name is made from the path (","line":1071},{"type":"inlineCode","value":"run_orders__sync","line":1071},{"type":"text","value":"), and so changes when the","line":1071},{"type":"break","hard":false,"line":1071},{"type":"text","value":"path does. Choose one for anything an agent is configured to call: lowercase","line":1072},{"type":"break","hard":false,"line":1072},{"type":"text","value":"letters, digits and underscores, starting with a letter, at most 64.","line":1073}],"line":1070},{"type":"code","value":"interface ToolName","lang":"ts","line":1075},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":1079}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":1079}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":1079}]}],"line":1079},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"name","line":1081}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":1081}]},{"type":"tableCell","children":[]}],"line":1081}],"line":1079},{"type":"heading","depth":3,"id":"triggersource","children":[{"type":"text","value":"TriggerSource","line":1083}],"line":1083},{"type":"paragraph","children":[{"type":"text","value":"A way to start runs.","line":1085}],"line":1085},{"type":"code","value":"interface TriggerSource<Body>","lang":"ts","line":1087},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":1091}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":1091}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":1091}]}],"line":1091},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"type","line":1093}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":1093}]},{"type":"tableCell","children":[{"type":"text","value":"The trigger type recorded on each run it starts.","line":1093}]}],"line":1093},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"script","line":1094}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(body: Body): string","line":1094}]},{"type":"tableCell","children":[{"type":"text","value":"The script a trigger resource of this source starts.","line":1094}]}],"line":1094},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"nextFire?","line":1095}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(body: Body, after: Date): Date | null","line":1095}]},{"type":"tableCell","children":[{"type":"text","value":"For sources driven by time: when the trigger next fires after ","line":1095},{"type":"inlineCode","value":"after","line":1095},{"type":"text","value":".","line":1095}]}],"line":1095},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"toInput?","line":1096}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(body: Body, request: { headers: Record<string, string>; body: unknown; }): unknown","line":1096}]},{"type":"tableCell","children":[{"type":"text","value":"For sources driven by a request: the script input for an incoming request.","line":1096}]}],"line":1096}],"line":1091},{"type":"heading","depth":3,"id":"triggersourcedefinition","children":[{"type":"text","value":"TriggerSourceDefinition","line":1098}],"line":1098},{"type":"paragraph","children":[{"type":"text","value":"A trigger source made with ","line":1100},{"type":"inlineCode","value":"defineTriggerSource","line":1100},{"type":"text","value":".","line":1100}],"line":1100},{"type":"code","value":"interface TriggerSourceDefinition extends ResourceDefinition","lang":"ts","line":1102},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":1106}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":1106}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":1106}]}],"line":1106},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"kind","line":1108}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"\"trigger_source\"","line":1108}]},{"type":"tableCell","children":[]}],"line":1108},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"execute","line":1109}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"(input: unknown, ctx: ScriptContext): Promise<unknown>","line":1109}]},{"type":"tableCell","children":[]}],"line":1109}],"line":1106},{"type":"heading","depth":3,"id":"volvelconnections","children":[{"type":"text","value":"VolvelConnections","line":1111}],"line":1111},{"type":"paragraph","children":[{"type":"text","value":"The connections of the workspace, by path. Filled by the generated file.","line":1113}],"line":1113},{"type":"code","value":"interface VolvelConnections {\n}","lang":"ts","line":1115},{"type":"heading","depth":3,"id":"volvelevents","children":[{"type":"text","value":"VolvelEvents","line":1120}],"line":1120},{"type":"paragraph","children":[{"type":"text","value":"The events of the workspace, by path, each with its payload. Filled by the generated file.","line":1122}],"line":1122},{"type":"code","value":"interface VolvelEvents {\n}","lang":"ts","line":1124},{"type":"heading","depth":3,"id":"volvelflows","children":[{"type":"text","value":"VolvelFlows","line":1129}],"line":1129},{"type":"paragraph","children":[{"type":"text","value":"The flows of the workspace, by path, each with what a manual start is given. Filled by the generated file.","line":1131}],"line":1131},{"type":"code","value":"interface VolvelFlows {\n}","lang":"ts","line":1133},{"type":"heading","depth":3,"id":"volvelscripts","children":[{"type":"text","value":"VolvelScripts","line":1138}],"line":1138},{"type":"paragraph","children":[{"type":"text","value":"The scripts of the workspace, by path, each with its input and output where it has them. Filled by the generated file.","line":1140}],"line":1140},{"type":"code","value":"interface VolvelScripts {\n}","lang":"ts","line":1142},{"type":"heading","depth":3,"id":"volveltables","children":[{"type":"text","value":"VolvelTables","line":1147}],"line":1147},{"type":"paragraph","children":[{"type":"text","value":"The tables of the workspace, by path, as ","line":1149},{"type":"inlineCode","value":"volvel build","line":1149},{"type":"text","value":" and ","line":1149},{"type":"inlineCode","value":"volvel types","line":1149},{"type":"text","value":" write them into","line":1149},{"type":"break","hard":false,"line":1149},{"type":"inlineCode","value":".platform/volvel-env.d.ts","line":1150},{"type":"text","value":", which adds to this interface. Empty until that file is in the project.","line":1150}],"line":1149},{"type":"code","value":"interface VolvelTables {\n}","lang":"ts","line":1152},{"type":"heading","depth":3,"id":"volvelvariables","children":[{"type":"text","value":"VolvelVariables","line":1157}],"line":1157},{"type":"paragraph","children":[{"type":"text","value":"The variables of the workspace, by path. Filled by the generated file.","line":1159}],"line":1159},{"type":"code","value":"interface VolvelVariables {\n}","lang":"ts","line":1161},{"type":"heading","depth":3,"id":"webhookrequest","children":[{"type":"text","value":"WebhookRequest","line":1166}],"line":1166},{"type":"paragraph","children":[{"type":"text","value":"What a webhook's script is given when ","line":1168},{"type":"inlineCode","value":"input","line":1168},{"type":"text","value":" is ","line":1168},{"type":"inlineCode","value":"request","line":1168},{"type":"text","value":".","line":1168}],"line":1168},{"type":"code","value":"interface WebhookRequest<Body = unknown>","lang":"ts","line":1170},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":1174}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":1174}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":1174}]}],"line":1174},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"method","line":1176}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":1176}]},{"type":"tableCell","children":[]}],"line":1176},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"headers","line":1177}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"Record<string, string>","line":1177}]},{"type":"tableCell","children":[{"type":"text","value":"Lower-case names. The sender's own ","line":1177},{"type":"inlineCode","value":"authorization","line":1177},{"type":"text","value":" and ","line":1177},{"type":"inlineCode","value":"cookie","line":1177},{"type":"text","value":" are left out.","line":1177}]}],"line":1177},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"query","line":1178}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"Record<string, string>","line":1178}]},{"type":"tableCell","children":[]}],"line":1178},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"body","line":1179}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"Body","line":1179}]},{"type":"tableCell","children":[{"type":"text","value":"JSON, a form's fields, or text, by the request's content type.","line":1179}]}],"line":1179},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"rawBody","line":1180}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":1180}]},{"type":"tableCell","children":[{"type":"text","value":"The body exactly as it was sent.","line":1180}]}],"line":1180}],"line":1174},{"type":"heading","depth":3,"id":"webhookverify","children":[{"type":"text","value":"WebhookVerify","line":1182}],"line":1182},{"type":"paragraph","children":[{"type":"text","value":"How a webhook checks that a request was signed with a secret shared with its sender.","line":1184}],"line":1184},{"type":"code","value":"interface WebhookVerify","lang":"ts","line":1186},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":1190}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":1190}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":1190}]}],"line":1190},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"scheme","line":1192}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"\"hmac-sha256\" | \"hmac-sha1\"","line":1192}]},{"type":"tableCell","children":[]}],"line":1192},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"header","line":1193}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":1193}]},{"type":"tableCell","children":[{"type":"text","value":"The header the signature is sent in: ","line":1193},{"type":"inlineCode","value":"X-Hub-Signature-256","line":1193},{"type":"text","value":".","line":1193}]}],"line":1193},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"secret","line":1194}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":1194}]},{"type":"tableCell","children":[{"type":"text","value":"The name of the workspace secret that holds the shared secret.","line":1194}]}],"line":1194},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"encoding?","line":1195}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"\"hex\" | \"base64\"","line":1195}]},{"type":"tableCell","children":[{"type":"text","value":"How the signature is written. Default ","line":1195},{"type":"inlineCode","value":"hex","line":1195},{"type":"text","value":".","line":1195}]}],"line":1195},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"prefix?","line":1196}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":1196}]},{"type":"tableCell","children":[{"type":"text","value":"Text before the signature in the header, such as ","line":1196},{"type":"inlineCode","value":"sha256=","line":1196},{"type":"text","value":".","line":1196}]}],"line":1196},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"signed?","line":1197}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":1197}]},{"type":"tableCell","children":[{"type":"text","value":"What was signed. ","line":1197},{"type":"inlineCode","value":"{body}","line":1197},{"type":"text","value":" is the raw body, ","line":1197},{"type":"inlineCode","value":"{timestamp}","line":1197},{"type":"text","value":" the timestamp header. Default ","line":1197},{"type":"inlineCode","value":"{body}","line":1197},{"type":"text","value":".","line":1197}]}],"line":1197},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"timestampHeader?","line":1198}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"string","line":1198}]},{"type":"tableCell","children":[{"type":"text","value":"A header holding when the request was sent, in seconds since 1970.","line":1198}]}],"line":1198},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"toleranceSeconds?","line":1199}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"number","line":1199}]},{"type":"tableCell","children":[{"type":"text","value":"How old a request may be, by its timestamp header. Default 300.","line":1199}]}],"line":1199}],"line":1190},{"type":"heading","depth":3,"id":"widgetresource","children":[{"type":"text","value":"WidgetResource","line":1201}],"line":1201},{"type":"paragraph","children":[{"type":"text","value":"A widget made with ","line":1203},{"type":"inlineCode","value":"defineWidget","line":1203},{"type":"text","value":".","line":1203}],"line":1203},{"type":"code","value":"interface WidgetResource<D extends WidgetOptions = WidgetOptions> extends ResourceDefinition","lang":"ts","line":1205},{"type":"table","align":[null,null,null],"children":[{"type":"tableRow","header":true,"children":[{"type":"tableCell","children":[{"type":"text","value":"Member","line":1209}]},{"type":"tableCell","children":[{"type":"text","value":"Type","line":1209}]},{"type":"tableCell","children":[{"type":"text","value":"What it is","line":1209}]}],"line":1209},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"kind","line":1211}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"\"widget\"","line":1211}]},{"type":"tableCell","children":[]}],"line":1211},{"type":"tableRow","header":false,"children":[{"type":"tableCell","children":[{"type":"inlineCode","value":"definition","line":1212}]},{"type":"tableCell","children":[{"type":"inlineCode","value":"D","line":1212}]},{"type":"tableCell","children":[{"type":"text","value":"What was declared.","line":1212}]}],"line":1212}],"line":1209},{"type":"heading","depth":2,"id":"types","children":[{"type":"text","value":"Types","line":1214}],"line":1214},{"type":"heading","depth":3,"id":"appoptions","children":[{"type":"text","value":"AppOptions","line":1216}],"line":1216},{"type":"paragraph","children":[{"type":"text","value":"What ","line":1218},{"type":"inlineCode","value":"defineApp","line":1218},{"type":"text","value":" takes: the app's path and title, and the interface or the code it serves.","line":1218}],"line":1218},{"type":"code","value":"type AppOptions = ResourceNames & Take<Kinds.AppBody, {\n /** Unique within the workspace. It is part of the app's address, for example `orders`. */\n path: string;\n title: string;\n /**\n * The app's own directory in the repository, holding its `index.html`. The build\n * compiles it with Vite. Relative to the repository root, for example `apps/orders`.\n * Leave it out for an app that serves an interface.\n */\n source?: string;\n}>","lang":"ts","line":1220},{"type":"heading","depth":3,"id":"bindingoptions","children":[{"type":"text","value":"BindingOptions","line":1234}],"line":1234},{"type":"paragraph","children":[{"type":"text","value":"What ","line":1236},{"type":"inlineCode","value":"defineBinding","line":1236},{"type":"text","value":" takes: the role, who holds it and where.","line":1236}],"line":1236},{"type":"code","value":"type BindingOptions = ResourceNames & {\n /** Unique within the workspace, for example `bindings/portal-orders`. */\n path: string;\n} & Take<Kinds.BindingBody, {\n /** A role by name or by definition: built-in, the tenant's, or one this workspace defines. */\n role: string | {\n name: string;\n };\n principal: BindingPrincipal;\n /** Bind at one resource, by path or by definition. Omit to bind at the whole workspace. */\n resource?: Ref;\n}>","lang":"ts","line":1238},{"type":"heading","depth":3,"id":"bindingprincipal","children":[{"type":"text","value":"BindingPrincipal","line":1253}],"line":1253},{"type":"paragraph","children":[{"type":"text","value":"Who a binding gives a role to: a member, a group of members, an end-user group or a service account.","line":1255}],"line":1255},{"type":"code","value":"type BindingPrincipal = {\n type: \"member\";\n email: string;\n}\n/** A group of members, by its key: `tech-desk`. What it is called can change freely. */\n | {\n type: \"group\";\n key: string;\n} | {\n type: \"service_account\";\n key: string;\n} | {\n type: \"end_user_group\";\n key: string;\n}\n/** By its title, as before keys. It stops working when the title changes: name it by `key`. */\n | {\n type: \"group\";\n name: string;\n} | {\n type: \"service_account\";\n name: string;\n}\n/** One person in the tenant's end-user pool. */\n | {\n type: \"end_user\";\n email: string;\n}\n/** A group of end users, by its name. */\n | {\n type: \"end_user_group\";\n name: string;\n}\n/** Every signed-in end user of the tenant. */\n | {\n type: \"end_users\";\n}\n/** Anyone, signed in or not. This is what makes something public. */\n | {\n type: \"anonymous\";\n}","lang":"ts","line":1257},{"type":"heading","depth":3,"id":"connectiongroupoptions","children":[{"type":"text","value":"ConnectionGroupOptions","line":1301}],"line":1301},{"type":"paragraph","children":[{"type":"text","value":"What ","line":1303},{"type":"inlineCode","value":"defineConnectionGroup","line":1303},{"type":"text","value":" takes: the connector every member uses, and the connections that are members.","line":1303}],"line":1303},{"type":"code","value":"type ConnectionGroupOptions = ResourceNames & {\n path: string;\n} & Take<Kinds.ConnectionGroupBody, {\n /** The connector every member uses: `http` or `smtp`, which are built in, or one of your own. Default `http`. */\n connector?: Ref;\n}>","lang":"ts","line":1305},{"type":"heading","depth":3,"id":"connectionoptions","children":[{"type":"text","value":"ConnectionOptions","line":1314}],"line":1314},{"type":"paragraph","children":[{"type":"text","value":"What ","line":1316},{"type":"inlineCode","value":"defineConnection","line":1316},{"type":"text","value":" takes: the connector it uses, its configuration and the name of the secret that holds the credential.","line":1316}],"line":1316},{"type":"code","value":"type ConnectionOptions = ResourceNames & {\n path: string;\n} & Take<Kinds.ConnectionBody, {\n /** The connector to use: `http`, `smtp` or `oauth2`, which are built in, or one of your own. Default `http`. */\n connector?: Ref;\n}>","lang":"ts","line":1318},{"type":"heading","depth":3,"id":"connectoroptions","children":[{"type":"text","value":"ConnectorOptions","line":1327}],"line":1327},{"type":"paragraph","children":[{"type":"text","value":"What ","line":1329},{"type":"inlineCode","value":"defineConnector","line":1329},{"type":"text","value":" takes: the connector's name, the schema of a connection's configuration and how its client is made.","line":1329}],"line":1329},{"type":"code","value":"type ConnectorOptions<Config, Client> = ResourceNames & Take<Kinds.ConnectorBody, {\n /** Unique within the workspace, for example `connectors/shop`. Connections name it by this. */\n path: string;\n /** A JSON Schema for a connection's configuration. The console draws its form from it. */\n configSchema: object;\n /**\n * Builds the client a script is given for a connection. `credential` is the\n * connection's secret, when it has one. `signal` aborts when the run is canceled.\n */\n create(config: Config, credential: string | undefined, signal: AbortSignal): Client;\n /**\n * Tries a connection without doing anything with it: what the console's Test\n * button runs. Resolves with what it found, or throws why it could not reach it.\n * A connector without it is tested by building its client.\n */\n test?(config: Config, credential: string | undefined, signal: AbortSignal): Promise<ConnectionTest>;\n}>","lang":"ts","line":1331},{"type":"heading","depth":3,"id":"datasourceoptions","children":[{"type":"text","value":"DataSourceOptions","line":1351}],"line":1351},{"type":"paragraph","children":[{"type":"text","value":"What ","line":1353},{"type":"inlineCode","value":"defineDataSource","line":1353},{"type":"text","value":" takes: its path and what it is for.","line":1353}],"line":1353},{"type":"code","value":"type DataSourceOptions = ResourceNames & {\n path: string;\n} & Take<Kinds.DataSourceBody, unknown, \"connector\">","lang":"ts","line":1355},{"type":"heading","depth":3,"id":"eventoptions","children":[{"type":"text","value":"EventOptions","line":1361}],"line":1361},{"type":"paragraph","children":[{"type":"text","value":"What ","line":1363},{"type":"inlineCode","value":"defineEvent","line":1363},{"type":"text","value":" takes: the event's name and the schema of its payload.","line":1363}],"line":1363},{"type":"code","value":"type EventOptions<Payload extends z.ZodType> = ResourceNames & {\n /** The event's name, for example `orders/placed`. */\n path: string;\n} & Take<Kinds.EventBody, {\n /** Every published payload must match this. */\n payload: Payload;\n}>","lang":"ts","line":1365},{"type":"heading","depth":3,"id":"eventtriggeroptions","children":[{"type":"text","value":"EventTriggerOptions","line":1375}],"line":1375},{"type":"paragraph","children":[{"type":"text","value":"What ","line":1377},{"type":"inlineCode","value":"defineEventTrigger","line":1377},{"type":"text","value":" takes: the event to listen for, what it starts and an optional filter.","line":1377}],"line":1377},{"type":"code","value":"type EventTriggerOptions = ResourceNames & {\n path: string;\n} & Take<Extract<Kinds.TriggerBody, {\n type: \"event\";\n}>, {\n /** The event to listen for, by name or by definition. */\n event: Ref;\n /** The script that receives the event's payload as its input. */\n script: Ref;\n}, \"type\">","lang":"ts","line":1379},{"type":"heading","depth":3,"id":"filter","children":[{"type":"text","value":"Filter","line":1392}],"line":1392},{"type":"paragraph","children":[{"type":"text","value":"A condition on rows. Combine conditions with ","line":1394},{"type":"inlineCode","value":"and","line":1394},{"type":"text","value":" and ","line":1394},{"type":"inlineCode","value":"or","line":1394},{"type":"text","value":".","line":1394}],"line":1394},{"type":"code","value":"type Filter = {\n and: Filter[];\n} | {\n or: Filter[];\n} | {\n column: string;\n /** Default `eq`. */\n op?: \"eq\" | \"ne\" | \"gt\" | \"gte\" | \"lt\" | \"lte\" | \"in\" | \"has\" | \"contains\" | \"not_contains\" | \"is_null\";\n value?: unknown;\n}","lang":"ts","line":1396},{"type":"heading","depth":3,"id":"flowedge","children":[{"type":"text","value":"FlowEdge","line":1409}],"line":1409},{"type":"paragraph","children":[{"type":"text","value":"An edge: ","line":1411},{"type":"inlineCode","value":"[from, to]","line":1411},{"type":"text","value":", or with an option naming a branch case or marking the error path.","line":1411}],"line":1411},{"type":"code","value":"type FlowEdge<Node extends string> = [from: Node, to: Node] | [from: Node, to: Node, options: {\n when?: string;\n error?: boolean;\n}]","lang":"ts","line":1413},{"type":"heading","depth":3,"id":"flownode","children":[{"type":"text","value":"FlowNode","line":1420}],"line":1420},{"type":"paragraph","children":[{"type":"text","value":"A node of a flow, as the manifest stores it.","line":1422}],"line":1422},{"type":"code","value":"type FlowNode = Record<string, unknown> & {\n type: string;\n}","lang":"ts","line":1424},{"type":"heading","depth":3,"id":"flowoptions","children":[{"type":"text","value":"FlowOptions","line":1430}],"line":1430},{"type":"paragraph","children":[{"type":"text","value":"What ","line":1432},{"type":"inlineCode","value":"defineFlow","line":1432},{"type":"text","value":" takes: its steps and the edges between them.","line":1432}],"line":1432},{"type":"code","value":"type FlowOptions<Nodes extends Record<string, FlowNode>> = ResourceNames & {\n /** The name of the tool an agent sees for it, if it should not follow the path. */\n mcp?: ToolName;\n path: string;\n} & Take<Kinds.FlowBody, {\n nodes: Nodes;\n /** Each edge names two of the nodes above. */\n edges: FlowEdge<Extract<keyof Nodes, string>>[];\n /** Where each node sits in the editor, so positions survive a pull and a deploy. */\n layout?: Partial<Record<Extract<keyof Nodes, string>, {\n x: number;\n y: number;\n }>>;\n}>","lang":"ts","line":1434},{"type":"heading","depth":3,"id":"formfield","children":[{"type":"text","value":"FormField","line":1451}],"line":1451},{"type":"paragraph","children":[{"type":"text","value":"One field of a form. Its value is in the input under ","line":1453},{"type":"inlineCode","value":"name","line":1453},{"type":"text","value":".","line":1453}],"line":1453},{"type":"code","value":"type FormField = FormBody[\"fields\"][number]","lang":"ts","line":1455},{"type":"heading","depth":3,"id":"formoptions","children":[{"type":"text","value":"FormOptions","line":1459}],"line":1459},{"type":"paragraph","children":[{"type":"text","value":"A form the platform serves as a page. What is sent starts the script or the flow.","line":1461}],"line":1461},{"type":"code","value":"type FormOptions = Take<FormBody, unknown, \"type\" | \"script\" | \"enabled\">","lang":"ts","line":1463},{"type":"heading","depth":3,"id":"inputkey","children":[{"type":"text","value":"InputKey","line":1467}],"line":1467},{"type":"paragraph","children":[{"type":"text","value":"A path into a script's input, as a concurrency key names it: ","line":1469},{"type":"inlineCode","value":"input.customerId","line":1469},{"type":"text","value":", or deeper.","line":1469}],"line":1469},{"type":"code","value":"type InputKey<I> = I extends Record<string, unknown> ? `input.${Extract<keyof I, string>}` | `input.${Extract<keyof I, string>}.${string}` : `input.${string}`","lang":"ts","line":1471},{"type":"heading","depth":3,"id":"insert","children":[{"type":"text","value":"Insert","line":1475}],"line":1475},{"type":"paragraph","children":[{"type":"text","value":"What is given to insert a row of a table, by its path: ","line":1477},{"type":"inlineCode","value":"Insert<\"visits\">","line":1477},{"type":"text","value":".","line":1477}],"line":1477},{"type":"code","value":"type Insert<Name extends keyof VolvelTables> = VolvelTables[Name] extends {\n insert: infer I;\n} ? I : never","lang":"ts","line":1479},{"type":"heading","depth":3,"id":"insertof","children":[{"type":"text","value":"InsertOf","line":1485}],"line":1485},{"type":"paragraph","children":[{"type":"text","value":"A row as it is written: required columns without a default must be given.","line":1487},{"type":"break","hard":false,"line":1487},{"type":"text","value":"A required column with a default may be left out, and takes its default.","line":1488}],"line":1487},{"type":"code","value":"type InsertOf<C extends Columns> = {\n [K in MustGiveKeys<C>]: ValueOf<C[K]>;\n} & {\n [K in Exclude<keyof C, MustGiveKeys<C>>]?: K extends RequiredKeys<C> ? ValueOf<C[K]> : ValueOf<C[K]> | null;\n}","lang":"ts","line":1490},{"type":"heading","depth":3,"id":"queryoptions","children":[{"type":"text","value":"QueryOptions","line":1498}],"line":1498},{"type":"paragraph","children":[{"type":"text","value":"What ","line":1500},{"type":"inlineCode","value":"defineQuery","line":1500},{"type":"text","value":" takes: its path, one SELECT over the workspace's tables and the parameters it is given.","line":1500}],"line":1500},{"type":"code","value":"type QueryOptions = ResourceNames & {\n /** The query's name, for example `reports/fees`. */\n path: string;\n} & Take<Kinds.QueryBody>","lang":"ts","line":1502},{"type":"heading","depth":3,"id":"roleoptions","children":[{"type":"text","value":"RoleOptions","line":1509}],"line":1509},{"type":"paragraph","children":[{"type":"text","value":"What ","line":1511},{"type":"inlineCode","value":"defineRole","line":1511},{"type":"text","value":" takes: the role's path, the name bindings refer to and the permissions it holds.","line":1511}],"line":1511},{"type":"code","value":"type RoleOptions = ResourceNames & {\n /** Unique within the workspace, for example `roles/order-reader`. */\n path: string;\n} & Take<Kinds.RoleBody>","lang":"ts","line":1513},{"type":"heading","depth":3,"id":"row","children":[{"type":"text","value":"Row","line":1520}],"line":1520},{"type":"paragraph","children":[{"type":"text","value":"A row of a table, by its path, as the generated file knows it: ","line":1522},{"type":"inlineCode","value":"Row<\"visits\">","line":1522},{"type":"text","value":".","line":1522}],"line":1522},{"type":"code","value":"type Row<Name extends keyof VolvelTables> = VolvelTables[Name] extends {\n row: infer R;\n} ? R : never","lang":"ts","line":1524},{"type":"heading","depth":3,"id":"rowof","children":[{"type":"text","value":"RowOf","line":1530}],"line":1530},{"type":"paragraph","children":[{"type":"text","value":"A row as it is read: every declared column, null where it has no value.","line":1532}],"line":1532},{"type":"code","value":"type RowOf<C extends Columns> = SystemColumns & {\n [K in keyof C]: K extends RequiredKeys<C> ? ValueOf<C[K]> : ValueOf<C[K]> | null;\n}","lang":"ts","line":1534},{"type":"heading","depth":3,"id":"scheduleoptions","children":[{"type":"text","value":"ScheduleOptions","line":1540}],"line":1540},{"type":"paragraph","children":[{"type":"text","value":"What ","line":1542},{"type":"inlineCode","value":"defineSchedule","line":1542},{"type":"text","value":" takes: when it fires and what it starts.","line":1542}],"line":1542},{"type":"code","value":"type ScheduleOptions = ResourceNames & {\n path: string;\n} & Take<Kinds.ScheduleBody, {\n /**\n * A polling trigger source to run on each tick. The script then starts once\n * for each thing the source finds, with that thing as its input.\n */\n source?: Ref;\n /** The input each scheduled run receives. */\n input?: Record<string, unknown>;\n}, \"script\" | \"flow\"> & ({\n script: Ref;\n flow?: never;\n} | {\n flow: Ref;\n script?: never;\n})","lang":"ts","line":1544},{"type":"heading","depth":3,"id":"scriptoptions","children":[{"type":"text","value":"ScriptOptions","line":1564}],"line":1564},{"type":"paragraph","children":[{"type":"text","value":"What ","line":1566},{"type":"inlineCode","value":"defineScript","line":1566},{"type":"text","value":" takes: the script's path, the schemas of its input and its output, what it uses and the function that runs.","line":1566}],"line":1566},{"type":"code","value":"type ScriptOptions<Input extends z.ZodType, Output extends z.ZodType> = ResourceNames & Take<Kinds.ScriptBody, {\n /** The name of the tool an agent sees for it, if it should not follow the path. */\n mcp?: ToolName;\n /** Unique within the workspace, for example `orders/sync`. */\n path: string;\n input: Input;\n output: Output;\n /** How long one attempt may run. Default 300, maximum 3600. */\n timeoutSeconds?: number;\n /**\n * Retries after a failed attempt. Delivery is at-least-once even without\n * retries, so a script must be safe to run twice.\n */\n retries?: {\n limit: number;\n delaySeconds?: number;\n backoff?: boolean;\n };\n /**\n * How many runs of this script may be in progress at once: a number for the\n * script as a whole, or `{ key, limit }` for each value of a field of its\n * input, such as `{ key: \"input.customerId\", limit: 1 }` for one run at a\n * time per customer. Runs for other customers go ahead.\n */\n concurrency?: number | {\n key: InputKey<z.input<Input>>;\n limit: number;\n };\n /**\n * What happens when a run fails for the last time. It replaces the workspace's default alert for\n * this script, as a whole: a script that names only `notify` does not also start the default's\n * `script`.\n */\n onFailure?: {\n script?: Ref;\n notify?: Ref;\n };\n run(input: z.output<Input>, ctx: ScriptContext): Promise<z.input<Output>> | z.input<Output>;\n} & ScriptUses, \"uses\" | \"schemaSource\">","lang":"ts","line":1568},{"type":"heading","depth":3,"id":"tableoptions","children":[{"type":"text","value":"TableOptions","line":1610}],"line":1610},{"type":"paragraph","children":[{"type":"text","value":"What ","line":1612},{"type":"inlineCode","value":"defineTable","line":1612},{"type":"text","value":" takes: the table's path, its columns and who may read and change its rows.","line":1612}],"line":1612},{"type":"code","value":"type TableOptions<C extends Record<string, ColumnSpec<unknown, boolean, boolean>>> = ResourceNames & {\n /** The table's name, for example `crm/orders`. */\n path: string;\n} & Take<Kinds.TableBody, {\n columns: C;\n /**\n * The column that stands for a row where another table refers to it: a\n * device's name in place of its ID.\n */\n display?: Extract<keyof C, string>;\n /**\n * Who may see which rows. With `owner`, a person sees and changes only the\n * rows whose owner column holds their ID. Without a policy, permissions alone decide.\n */\n policy?: {\n owner: Extract<keyof C, string>;\n } | {\n /**\n * Rules that match a row's columns against the person asking. A person\n * sees a row when any rule lets them, and changes it when a `write` or\n * `all` rule does.\n */\n rules: {\n allow: \"read\" | \"write\" | \"all\";\n when: {\n everyone: true;\n }\n /** The column holds the person's own ID. */\n | {\n column: Extract<keyof C, string>;\n is: \"principal\";\n }\n /** The column names a group the person is in: its ID, or its key in a text column (its name too, in rows written before groups had keys). */\n | {\n column: Extract<keyof C, string>;\n in: \"groups\";\n }\n /** The column equals one of the person's attributes. */\n | {\n column: Extract<keyof C, string>;\n equals: {\n attribute: string;\n };\n };\n }[];\n };\n /** Columns to index, each entry one index. `id`, `created_at` and `updated_at` may be named. */\n indexes?: (Extract<keyof C, string> | \"id\" | \"created_at\" | \"updated_at\")[][];\n}>","lang":"ts","line":1614},{"type":"heading","depth":3,"id":"themeoptions","children":[{"type":"text","value":"ThemeOptions","line":1666}],"line":1666},{"type":"paragraph","children":[{"type":"text","value":"What ","line":1668},{"type":"inlineCode","value":"defineTheme","line":1668},{"type":"text","value":" takes: the values that replace the tenant's theme for this workspace.","line":1668}],"line":1668},{"type":"code","value":"type ThemeOptions = ResourceNames & Take<Kinds.ThemeBody, {\n /** Default `theme`. A workspace has one theme. */\n path?: string;\n}>","lang":"ts","line":1670},{"type":"heading","depth":3,"id":"themetoken","children":[{"type":"text","value":"ThemeToken","line":1677}],"line":1677},{"type":"paragraph","children":[{"type":"text","value":"One of the theme tokens a workspace may set.","line":1679}],"line":1679},{"type":"code","value":"type ThemeToken = (typeof THEME_TOKENS)[number]","lang":"ts","line":1681},{"type":"heading","depth":3,"id":"triggersourceoptions","children":[{"type":"text","value":"TriggerSourceOptions","line":1685}],"line":1685},{"type":"paragraph","children":[{"type":"text","value":"What ","line":1687},{"type":"inlineCode","value":"defineTriggerSource","line":1687},{"type":"text","value":" takes: code of your own that turns requests, or a poll, into starts of a script or a flow.","line":1687}],"line":1687},{"type":"code","value":"type TriggerSourceOptions = (TriggerSourceCommon & {\n mode: \"webhook\";\n run(request: WebhookRequest, ctx: ScriptContext): Promise<WebhookSourceResult> | WebhookSourceResult;\n}) | (TriggerSourceCommon & {\n mode: \"poll\";\n run(tick: PollTick, ctx: ScriptContext): Promise<PollResult> | PollResult;\n})","lang":"ts","line":1689},{"type":"heading","depth":3,"id":"variableoptions","children":[{"type":"text","value":"VariableOptions","line":1699}],"line":1699},{"type":"paragraph","children":[{"type":"text","value":"What ","line":1701},{"type":"inlineCode","value":"defineVariable","line":1701},{"type":"text","value":" takes: its path, what it is for and the value used in a workspace that has not set its own.","line":1701}],"line":1701},{"type":"code","value":"type VariableOptions = ResourceNames & {\n path: string;\n} & Take<Kinds.VariableBody>","lang":"ts","line":1703},{"type":"heading","depth":3,"id":"webhookoptions","children":[{"type":"text","value":"WebhookOptions","line":1709}],"line":1709},{"type":"paragraph","children":[{"type":"text","value":"What ","line":1711},{"type":"inlineCode","value":"defineWebhook","line":1711},{"type":"text","value":" takes: the script that receives a request, and how the request is checked.","line":1711}],"line":1711},{"type":"code","value":"type WebhookOptions = ResourceNames & {\n path: string;\n} & Take<Extract<Kinds.TriggerBody, {\n type: \"webhook\";\n}>, {\n /** The script that receives the request. */\n script: Ref;\n /** A trigger source to hand each request to first. What it returns is what the script is given. */\n source?: Ref;\n /** Checks each request's signature before anything starts. A request that fails is answered 401. */\n verify?: WebhookVerify;\n}, \"type\">","lang":"ts","line":1713},{"type":"heading","depth":3,"id":"webhooksourceresult","children":[{"type":"text","value":"WebhookSourceResult","line":1728}],"line":1728},{"type":"paragraph","children":[{"type":"text","value":"What a trigger source for webhooks answers.","line":1730}],"line":1730},{"type":"code","value":"type WebhookSourceResult = \n/** Start nothing. `reason` is kept on the source's run, for whoever looks into it. */\n{\n accept: false;\n reason?: string;\n}\n/** Start the trigger's script or flow once, with this input. */\n | {\n accept?: true;\n input: unknown;\n}\n/** Start it once for each of these, up to a hundred. */\n | {\n accept?: true;\n inputs: unknown[];\n}","lang":"ts","line":1732},{"type":"heading","depth":3,"id":"widgetoptions","children":[{"type":"text","value":"WidgetOptions","line":1751}],"line":1751},{"type":"paragraph","children":[{"type":"text","value":"What ","line":1753},{"type":"inlineCode","value":"defineWidget","line":1753},{"type":"text","value":" takes: the widget's declaration (what \"Add to page\" and the inspector are drawn from) and the file of its view.","line":1753}],"line":1753},{"type":"code","value":"type WidgetOptions = WidgetDefinition & {\n /** The file in the repository that is the view, for example `widgets/goal/view.tsx`: a module that draws with `@volvel/widget-frame`. Relative to the repository root. */\n entry: string;\n /** Keep the widget's identity when its type changes. Leave it out. */\n key?: string;\n}","lang":"ts","line":1755}]},"description":"Everything `@volvel/sdk` exports."}
|