Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

feat(forms): keep channel polls out of Drive (#8312)

Wolf Mermelsteineeaa05d5403a
diff --git a/.sqlx/query-7ac226f56b53689bafe22dd32591a7dde7a608698af08b07a7881377cc7168d5.json b/.sqlx/query-0324782b3a73b0449ea096091d52edf33cf128bb77eee4bf09032e7b4785fe9b.json
similarity index 89%
rename from .sqlx/query-7ac226f56b53689bafe22dd32591a7dde7a608698af08b07a7881377cc7168d5.json
rename to .sqlx/query-0324782b3a73b0449ea096091d52edf33cf128bb77eee4bf09032e7b4785fe9b.json
index a88951dca2..880dcdc0cd 100644
--- a/.sqlx/query-7ac226f56b53689bafe22dd32591a7dde7a608698af08b07a7881377cc7168d5.json
+++ b/.sqlx/query-0324782b3a73b0449ea096091d52edf33cf128bb77eee4bf09032e7b4785fe9b.json
@@ -1,6 +1,6 @@
{
"db_name": "PostgreSQL",
- "query": "\n UPDATE forms SET name = $2, updated_at = $3\n WHERE id = $1 AND trashed_at IS NULL\n RETURNING id, name, description, owner_id, database_id, table_id,\n submitted_column_id, respondent_column_id, audience, tally_visible,\n status, closes_at, confirmation_message, created_at, updated_at, trashed_at,\n name_follows_database\n ",
+ "query": "\n UPDATE forms SET name = $2, updated_at = $3\n WHERE id = $1 AND trashed_at IS NULL\n RETURNING id, name, description, owner_id, database_id, table_id,\n submitted_column_id, respondent_column_id, audience, tally_visible,\n status, closes_at, confirmation_message, created_at, updated_at, trashed_at,\n name_follows_database, is_hidden_in_drive\n ",
"describe": {
"columns": [
{
@@ -87,6 +87,11 @@
"ordinal": 16,
"name": "name_follows_database",
"type_info": "Bool"
+ },
+ {
+ "ordinal": 17,
+ "name": "is_hidden_in_drive",
+ "type_info": "Bool"
}
],
"parameters": {
@@ -113,8 +118,9 @@
false,
false,
true,
+ false,
false
]
},
- "hash": "7ac226f56b53689bafe22dd32591a7dde7a608698af08b07a7881377cc7168d5"
+ "hash": "0324782b3a73b0449ea096091d52edf33cf128bb77eee4bf09032e7b4785fe9b"
}
diff --git a/.sqlx/query-55b05253dffc10b76ec318a0e1d66a925c5e7965d5d5e6e3e7d6df934aff0e35.json b/.sqlx/query-1021df133a51edb89e15fb3c8933a8514598fd449882f44c0a8ad386fa7676aa.json
similarity index 87%
rename from .sqlx/query-55b05253dffc10b76ec318a0e1d66a925c5e7965d5d5e6e3e7d6df934aff0e35.json
rename to .sqlx/query-1021df133a51edb89e15fb3c8933a8514598fd449882f44c0a8ad386fa7676aa.json
index a06a953c0e..02e402e305 100644
--- a/.sqlx/query-55b05253dffc10b76ec318a0e1d66a925c5e7965d5d5e6e3e7d6df934aff0e35.json
+++ b/.sqlx/query-1021df133a51edb89e15fb3c8933a8514598fd449882f44c0a8ad386fa7676aa.json
@@ -1,6 +1,6 @@
{
"db_name": "PostgreSQL",
- "query": "\n SELECT id, name, description, owner_id, database_id, table_id,\n submitted_column_id, respondent_column_id, audience, tally_visible,\n status, closes_at, confirmation_message, created_at, updated_at, trashed_at,\n name_follows_database\n FROM forms WHERE id = $1\n ",
+ "query": "\n SELECT id, name, description, owner_id, database_id, table_id,\n submitted_column_id, respondent_column_id, audience, tally_visible,\n status, closes_at, confirmation_message, created_at, updated_at, trashed_at,\n name_follows_database, is_hidden_in_drive\n FROM forms WHERE id = $1\n ",
"describe": {
"columns": [
{
@@ -87,6 +87,11 @@
"ordinal": 16,
"name": "name_follows_database",
"type_info": "Bool"
+ },
+ {
+ "ordinal": 17,
+ "name": "is_hidden_in_drive",
+ "type_info": "Bool"
}
],
"parameters": {
@@ -111,8 +116,9 @@
false,
false,
true,
+ false,
false
]
},
- "hash": "55b05253dffc10b76ec318a0e1d66a925c5e7965d5d5e6e3e7d6df934aff0e35"
+ "hash": "1021df133a51edb89e15fb3c8933a8514598fd449882f44c0a8ad386fa7676aa"
}
diff --git a/.sqlx/query-860acc99bc10afe64dd03729ec1f2add9b2662a90f64315f95d53165ef43344c.json b/.sqlx/query-13166bb9d8d4ec58f119df4b2fd3a88ba49358fbb0f8e6a41257616eabc756ce.json
similarity index 90%
rename from .sqlx/query-860acc99bc10afe64dd03729ec1f2add9b2662a90f64315f95d53165ef43344c.json
rename to .sqlx/query-13166bb9d8d4ec58f119df4b2fd3a88ba49358fbb0f8e6a41257616eabc756ce.json
index c20e7e90b4..1da4e3612e 100644
--- a/.sqlx/query-860acc99bc10afe64dd03729ec1f2add9b2662a90f64315f95d53165ef43344c.json
+++ b/.sqlx/query-13166bb9d8d4ec58f119df4b2fd3a88ba49358fbb0f8e6a41257616eabc756ce.json
@@ -1,6 +1,6 @@
{
"db_name": "PostgreSQL",
- "query": "\n UPDATE forms SET updated_at = $2\n WHERE id = $1 AND trashed_at IS NULL\n RETURNING id, name, description, owner_id, database_id, table_id,\n submitted_column_id, respondent_column_id, audience, tally_visible,\n status, closes_at, confirmation_message, created_at, updated_at, trashed_at,\n name_follows_database\n ",
+ "query": "\n UPDATE forms SET updated_at = $2\n WHERE id = $1 AND trashed_at IS NULL\n RETURNING id, name, description, owner_id, database_id, table_id,\n submitted_column_id, respondent_column_id, audience, tally_visible,\n status, closes_at, confirmation_message, created_at, updated_at, trashed_at,\n name_follows_database, is_hidden_in_drive\n ",
"describe": {
"columns": [
{
@@ -87,6 +87,11 @@
"ordinal": 16,
"name": "name_follows_database",
"type_info": "Bool"
+ },
+ {
+ "ordinal": 17,
+ "name": "is_hidden_in_drive",
+ "type_info": "Bool"
}
],
"parameters": {
@@ -112,8 +117,9 @@
false,
false,
true,
+ false,
false
]
},
- "hash": "860acc99bc10afe64dd03729ec1f2add9b2662a90f64315f95d53165ef43344c"
+ "hash": "13166bb9d8d4ec58f119df4b2fd3a88ba49358fbb0f8e6a41257616eabc756ce"
}
diff --git a/.sqlx/query-6e51119c880191da372512fa09bd842c73e046b36528eee807dcfdd1468bf2b8.json b/.sqlx/query-18ddf9a81f359955646ee0737a87c9d3d730934d2fa917cbd72c930e64fe9a5f.json
similarity index 92%
rename from .sqlx/query-6e51119c880191da372512fa09bd842c73e046b36528eee807dcfdd1468bf2b8.json
rename to .sqlx/query-18ddf9a81f359955646ee0737a87c9d3d730934d2fa917cbd72c930e64fe9a5f.json
index f02a0fae17..201408617a 100644
--- a/.sqlx/query-6e51119c880191da372512fa09bd842c73e046b36528eee807dcfdd1468bf2b8.json
+++ b/.sqlx/query-18ddf9a81f359955646ee0737a87c9d3d730934d2fa917cbd72c930e64fe9a5f.json
@@ -1,6 +1,6 @@
{
"db_name": "PostgreSQL",
- "query": "\n UPDATE forms SET\n description = COALESCE($2, description),\n confirmation_message = COALESCE($3, confirmation_message),\n audience = COALESCE($4, audience),\n status = COALESCE($5, status),\n closes_at = CASE WHEN $6 THEN $7 ELSE closes_at END,\n tally_visible = COALESCE($8, tally_visible),\n updated_at = $9\n WHERE id = $1\n RETURNING id, name, description, owner_id, database_id, table_id,\n submitted_column_id, respondent_column_id, audience, tally_visible,\n status, closes_at, confirmation_message, created_at, updated_at, trashed_at,\n name_follows_database\n ",
+ "query": "\n UPDATE forms SET\n description = COALESCE($2, description),\n confirmation_message = COALESCE($3, confirmation_message),\n audience = COALESCE($4, audience),\n status = COALESCE($5, status),\n closes_at = CASE WHEN $6 THEN $7 ELSE closes_at END,\n tally_visible = COALESCE($8, tally_visible),\n updated_at = $9\n WHERE id = $1\n RETURNING id, name, description, owner_id, database_id, table_id,\n submitted_column_id, respondent_column_id, audience, tally_visible,\n status, closes_at, confirmation_message, created_at, updated_at, trashed_at,\n name_follows_database, is_hidden_in_drive\n ",
"describe": {
"columns": [
{
@@ -87,6 +87,11 @@
"ordinal": 16,
"name": "name_follows_database",
"type_info": "Bool"
+ },
+ {
+ "ordinal": 17,
+ "name": "is_hidden_in_drive",
+ "type_info": "Bool"
}
],
"parameters": {
@@ -119,8 +124,9 @@
false,
false,
true,
+ false,
false
]
},
- "hash": "6e51119c880191da372512fa09bd842c73e046b36528eee807dcfdd1468bf2b8"
+ "hash": "18ddf9a81f359955646ee0737a87c9d3d730934d2fa917cbd72c930e64fe9a5f"
}
diff --git a/.sqlx/query-21ca569a3c9491f645543f763bc4c115086e39886ba662e0cd604af28f40272d.json b/.sqlx/query-424f081fb325d1e019cc021925c1e85b7765ada0d0c962e08f5062eb29e5845a.json
similarity index 87%
rename from .sqlx/query-21ca569a3c9491f645543f763bc4c115086e39886ba662e0cd604af28f40272d.json
rename to .sqlx/query-424f081fb325d1e019cc021925c1e85b7765ada0d0c962e08f5062eb29e5845a.json
index 035416eade..47ad845fa9 100644
--- a/.sqlx/query-21ca569a3c9491f645543f763bc4c115086e39886ba662e0cd604af28f40272d.json
+++ b/.sqlx/query-424f081fb325d1e019cc021925c1e85b7765ada0d0c962e08f5062eb29e5845a.json
@@ -1,6 +1,6 @@
{
"db_name": "PostgreSQL",
- "query": "\n SELECT id, name, description, owner_id, database_id, table_id,\n submitted_column_id, respondent_column_id, audience, tally_visible,\n status, closes_at, confirmation_message, created_at, updated_at, trashed_at,\n name_follows_database\n FROM forms WHERE database_id = $1 AND trashed_at IS NULL\n ORDER BY created_at, id\n ",
+ "query": "\n SELECT id, name, description, owner_id, database_id, table_id,\n submitted_column_id, respondent_column_id, audience, tally_visible,\n status, closes_at, confirmation_message, created_at, updated_at, trashed_at,\n name_follows_database, is_hidden_in_drive\n FROM forms WHERE database_id = $1 AND trashed_at IS NULL\n ORDER BY created_at, id\n ",
"describe": {
"columns": [
{
@@ -87,6 +87,11 @@
"ordinal": 16,
"name": "name_follows_database",
"type_info": "Bool"
+ },
+ {
+ "ordinal": 17,
+ "name": "is_hidden_in_drive",
+ "type_info": "Bool"
}
],
"parameters": {
@@ -111,8 +116,9 @@
false,
false,
true,
+ false,
false
]
},
- "hash": "21ca569a3c9491f645543f763bc4c115086e39886ba662e0cd604af28f40272d"
+ "hash": "424f081fb325d1e019cc021925c1e85b7765ada0d0c962e08f5062eb29e5845a"
}
diff --git a/.sqlx/query-9bf6d49b3d0825d25a6136b07d77291ceb41ed4ab1d62423aa2bc759b5240ee1.json b/.sqlx/query-81dfafeeefe28e247f0b06921d536bf20d646365bb6dbd68a80a21c5d6e1cdf5.json
similarity index 87%
rename from .sqlx/query-9bf6d49b3d0825d25a6136b07d77291ceb41ed4ab1d62423aa2bc759b5240ee1.json
rename to .sqlx/query-81dfafeeefe28e247f0b06921d536bf20d646365bb6dbd68a80a21c5d6e1cdf5.json
index 5fefe27915..e854e0eff8 100644
--- a/.sqlx/query-9bf6d49b3d0825d25a6136b07d77291ceb41ed4ab1d62423aa2bc759b5240ee1.json
+++ b/.sqlx/query-81dfafeeefe28e247f0b06921d536bf20d646365bb6dbd68a80a21c5d6e1cdf5.json
@@ -1,6 +1,6 @@
{
"db_name": "PostgreSQL",
- "query": "\n SELECT id, name, description, owner_id, database_id, table_id,\n submitted_column_id, respondent_column_id, audience, tally_visible,\n status, closes_at, confirmation_message, created_at, updated_at, trashed_at,\n name_follows_database\n FROM forms WHERE id = ANY($1) AND trashed_at IS NULL\n ORDER BY id\n ",
+ "query": "\n SELECT id, name, description, owner_id, database_id, table_id,\n submitted_column_id, respondent_column_id, audience, tally_visible,\n status, closes_at, confirmation_message, created_at, updated_at, trashed_at,\n name_follows_database, is_hidden_in_drive\n FROM forms WHERE id = ANY($1) AND trashed_at IS NULL\n ORDER BY id\n ",
"describe": {
"columns": [
{
@@ -87,6 +87,11 @@
"ordinal": 16,
"name": "name_follows_database",
"type_info": "Bool"
+ },
+ {
+ "ordinal": 17,
+ "name": "is_hidden_in_drive",
+ "type_info": "Bool"
}
],
"parameters": {
@@ -111,8 +116,9 @@
false,
false,
true,
+ false,
false
]
},
- "hash": "9bf6d49b3d0825d25a6136b07d77291ceb41ed4ab1d62423aa2bc759b5240ee1"
+ "hash": "81dfafeeefe28e247f0b06921d536bf20d646365bb6dbd68a80a21c5d6e1cdf5"
}
diff --git a/.sqlx/query-e6b4b6e9b17e9bf210c997c7bf9d9a5ff7a76a4252506f60435d0030354d3093.json b/.sqlx/query-f18615e2804605069e9d39fa0b75d112cb029bb915138e3fdbc997b8c57d7544.json
similarity index 71%
rename from .sqlx/query-e6b4b6e9b17e9bf210c997c7bf9d9a5ff7a76a4252506f60435d0030354d3093.json
rename to .sqlx/query-f18615e2804605069e9d39fa0b75d112cb029bb915138e3fdbc997b8c57d7544.json
index cf396df6a8..55d996240d 100644
--- a/.sqlx/query-e6b4b6e9b17e9bf210c997c7bf9d9a5ff7a76a4252506f60435d0030354d3093.json
+++ b/.sqlx/query-f18615e2804605069e9d39fa0b75d112cb029bb915138e3fdbc997b8c57d7544.json
@@ -1,6 +1,6 @@
{
"db_name": "PostgreSQL",
- "query": "\n INSERT INTO forms (\n id, name, description, owner_id, database_id, table_id,\n submitted_column_id, respondent_column_id, audience, tally_visible,\n status, closes_at, confirmation_message, created_at, updated_at,\n name_follows_database\n )\n VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16)\n ON CONFLICT (table_id) DO NOTHING\n ",
+ "query": "\n INSERT INTO forms (\n id, name, description, owner_id, database_id, table_id,\n submitted_column_id, respondent_column_id, audience, tally_visible,\n status, closes_at, confirmation_message, created_at, updated_at,\n name_follows_database, is_hidden_in_drive\n )\n VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17)\n ON CONFLICT (table_id) DO NOTHING\n ",
"describe": {
"columns": [],
"parameters": {
@@ -20,10 +20,11 @@
"Text",
"Timestamptz",
"Timestamptz",
+ "Bool",
"Bool"
]
},
"nullable": []
},
- "hash": "e6b4b6e9b17e9bf210c997c7bf9d9a5ff7a76a4252506f60435d0030354d3093"
+ "hash": "f18615e2804605069e9d39fa0b75d112cb029bb915138e3fdbc997b8c57d7544"
}
diff --git a/apps/web/src/features/block-form/form-global-sharing.test.tsx b/apps/web/src/features/block-form/form-global-sharing.test.tsx
index c62f24c38b..2b42fd4ec1 100644
--- a/apps/web/src/features/block-form/form-global-sharing.test.tsx
+++ b/apps/web/src/features/block-form/form-global-sharing.test.tsx
@@ -205,6 +205,7 @@ describe('openFormShareModal', () => {
respondentColumnId: null,
createdAt: '2026-10-05T12:00:00Z',
updatedAt: '2026-10-05T12:00:00Z',
+ isHiddenInDrive: false,
},
sections: [],
access: 'owner',
diff --git a/apps/web/src/features/block-form/queries/form-detail.test.ts b/apps/web/src/features/block-form/queries/form-detail.test.ts
index 73e76c3ebf..e0a33ba569 100644
--- a/apps/web/src/features/block-form/queries/form-detail.test.ts
+++ b/apps/web/src/features/block-form/queries/form-detail.test.ts
@@ -118,6 +118,7 @@ describe('the booking step', () => {
respondentColumnId: null,
createdAt: '2026-10-01T12:00:00Z',
updatedAt: '2026-10-01T12:00:00Z',
+ isHiddenInDrive: false,
} as const;
it('reads an editor’s booking step with its target and writes it back', () => {
diff --git a/apps/web/src/features/block-form/queries/form-publication.test.ts b/apps/web/src/features/block-form/queries/form-publication.test.ts
index 46dc8f71b8..64c55fc6fe 100644
--- a/apps/web/src/features/block-form/queries/form-publication.test.ts
+++ b/apps/web/src/features/block-form/queries/form-publication.test.ts
@@ -19,6 +19,7 @@ const detail: FormCollaboration['detail'] = {
confirmationMessage: 'Thank you',
createdAt: '2026-10-05T09:00:00Z',
updatedAt: '2026-10-05T09:00:00Z',
+ isHiddenInDrive: false,
},
access: 'edit',
tableGone: false,
diff --git a/apps/web/src/features/block-form/queries/publish-poll.ts b/apps/web/src/features/block-form/queries/publish-poll.ts
index b6310f0529..d845064a54 100644
--- a/apps/web/src/features/block-form/queries/publish-poll.ts
+++ b/apps/web/src/features/block-form/queries/publish-poll.ts
@@ -38,11 +38,14 @@ export function publishPoll(
if (!question) return errAsync({ message: 'Ask a question.' });
if (labels.length < 2)
return errAsync({ message: 'Give at least two options.' });
- return createForm({ name: question, source: { kind: 'new' } }, 'poll')
+ return createForm(
+ { name: question, source: { kind: 'new', isHiddenInDrive: true } },
+ 'poll'
+ )
.mapErr(writeFailureOf)
.andThen((detail) => {
const { databaseId, tableId, id: formId } = detail.form;
- // A step refused after the form exists leaves nothing behind in Drive.
+ // A step refused after the form exists leaves nothing behind.
const abandon = (failure: FormWriteFailure) =>
new ResultAsync<never, FormWriteFailure>(
discard({ formId, databaseId }).match(
@@ -50,7 +53,7 @@ export function publishPoll(
() =>
err({
...failure,
- message: `${failure.message} The unfinished poll is still in Drive.`,
+ message: `${failure.message} The unfinished poll could not be removed.`,
})
)
);
diff --git a/apps/web/src/features/drive-view/queries/drive-data-source.ts b/apps/web/src/features/drive-view/queries/drive-data-source.ts
index 08ab861554..d69e4f8143 100644
--- a/apps/web/src/features/drive-view/queries/drive-data-source.ts
+++ b/apps/web/src/features/drive-view/queries/drive-data-source.ts
@@ -28,7 +28,7 @@ import { type Accessor, createMemo } from 'solid-js';
import type { DriveListSource, DriveSelection } from '../context/drive-source';
import { DRIVE_FACETS } from '../filters/drive-facets';
import { selectDriveDatabases } from './drive-databases';
-import { selectDriveForms } from './drive-forms';
+import { hiddenFormDatabases, selectDriveForms } from './drive-forms';
import { buildDriveQuery } from './drive-query';
import {
driveEntityMatchesLocation,
@@ -84,10 +84,6 @@ export function createDriveDataSource(options: {
current.scope !== 'attachments'
);
};
- const databaseEntities = () =>
- includesDatabases() && !databasesQuery.isPending
- ? selectDriveDatabases(databasesQuery.data ?? [], selection(), userId())
- : [];
const formsQuery = useFormsQuery();
const includesForms = () => {
const current = selection();
@@ -98,6 +94,18 @@ export function createDriveDataSource(options: {
current.scope !== 'attachments'
);
};
+ // Wait for the forms list, which names the databases made for polls.
+ const databaseEntities = () =>
+ includesDatabases() &&
+ !databasesQuery.isPending &&
+ !(includesForms() && formsQuery.isPending)
+ ? selectDriveDatabases(
+ databasesQuery.data ?? [],
+ selection(),
+ userId(),
+ hiddenFormDatabases(formsQuery.data ?? [])
+ )
+ : [];
const formEntities = () =>
includesForms() && formsQuery.isSuccess
? selectDriveForms(formsQuery.data, selection(), userId())
diff --git a/apps/web/src/features/drive-view/queries/drive-databases.test.ts b/apps/web/src/features/drive-view/queries/drive-databases.test.ts
index c6ca59a162..c2ab09a4a2 100644
--- a/apps/web/src/features/drive-view/queries/drive-databases.test.ts
+++ b/apps/web/src/features/drive-view/queries/drive-databases.test.ts
@@ -51,34 +51,58 @@ const listed: ListedDatabase[] = [
},
];
+const none: ReadonlySet<string> = new Set();
+
describe('Drive database listing', () => {
it('separates owned and shared databases and excludes trash', () => {
expect(
- selectDriveDatabases(listed, selection, 'me').map((entity) => entity.id)
+ selectDriveDatabases(listed, selection, 'me', none).map(
+ (entity) => entity.id
+ )
).toEqual(['mine']);
expect(
selectDriveDatabases(
listed,
{ ...selection, location: { kind: 'tab', tab: 'shared' } },
- 'me'
+ 'me',
+ none
).map((entity) => entity.id)
).toEqual(['shared']);
expect(
- selectDriveDatabases(listed, { ...selection, scope: 'all' }, 'me').map(
- (entity) => entity.id
- )
+ selectDriveDatabases(
+ listed,
+ { ...selection, scope: 'all' },
+ 'me',
+ none
+ ).map((entity) => entity.id)
).toEqual(['mine', 'shared']);
});
+ it('leaves out the databases made for forms kept out of Drive', () => {
+ expect(
+ selectDriveDatabases(
+ listed,
+ { ...selection, scope: 'all' },
+ 'me',
+ new Set(['shared'])
+ ).map((entity) => entity.id)
+ ).toEqual(['mine']);
+ });
it('searches names without depending on the document search service', () => {
expect(
selectDriveDatabases(
listed,
{ ...selection, search: ' PRODUCT ' },
- 'me'
+ 'me',
+ none
).map((entity) => entity.id)
).toEqual(['mine']);
expect(
- selectDriveDatabases(listed, { ...selection, search: 'customer' }, 'me')
+ selectDriveDatabases(
+ listed,
+ { ...selection, search: 'customer' },
+ 'me',
+ none
+ )
).toEqual([]);
});
it('does not claim folder membership, attachment status or view history', () => {
@@ -93,13 +117,15 @@ describe('Drive database listing', () => {
} satisfies DriveSelection,
{ ...selection, scope: 'attachments' } satisfies DriveSelection,
]) {
- expect(selectDriveDatabases(listed, selected, 'me')).toEqual([]);
+ expect(selectDriveDatabases(listed, selected, 'me', none)).toEqual([]);
}
- expect(selectDriveDatabases(listed, selection, undefined)).toEqual([]);
+ expect(selectDriveDatabases(listed, selection, undefined, none)).toEqual(
+ []
+ );
});
it('preserves scope through the normalized list filter and sorts the available timestamp', () => {
const selected = { ...selection, scope: 'all' } satisfies DriveSelection;
- const entities = selectDriveDatabases(listed, selected, 'me');
+ const entities = selectDriveDatabases(listed, selected, 'me', none);
expect(
entities.every((entity) =>
driveEntityMatchesLocation(entity, selected, 'me')
diff --git a/apps/web/src/features/drive-view/queries/drive-databases.ts b/apps/web/src/features/drive-view/queries/drive-databases.ts
index b931ed1f82..9aeb0392ec 100644
--- a/apps/web/src/features/drive-view/queries/drive-databases.ts
+++ b/apps/web/src/features/drive-view/queries/drive-databases.ts
@@ -2,11 +2,15 @@ import type { DatabaseEntity } from '@entity';
import type { ListedDatabase } from '@service-storage/generated/schemas/listedDatabase';
import type { DriveSelection } from '../context/drive-source';
-/** Databases have no folder membership or view history; list them in file tabs. */
+/**
+ * Databases have no folder membership or view history; list them in file tabs.
+ * `hidden` names databases made for a form kept out of Drive, like a poll's.
+ */
export function selectDriveDatabases(
listed: readonly ListedDatabase[],
selection: DriveSelection,
- userId: string | undefined
+ userId: string | undefined,
+ hidden: ReadonlySet<string>
): DatabaseEntity[] {
const { location, scope } = selection;
if (!userId || location.kind !== 'tab' || location.tab === 'recent')
@@ -15,7 +19,7 @@ export function selectDriveDatabases(
const search = selection.search.trim().toLocaleLowerCase();
return listed.flatMap(({ database, grant }) => {
- if (database.trashed_at) return [];
+ if (database.trashed_at || hidden.has(database.id)) return [];
if (location.tab === 'shared' && database.owner_id === userId) return [];
if (
location.tab === 'owned' &&
diff --git a/apps/web/src/features/drive-view/queries/drive-forms.test.ts b/apps/web/src/features/drive-view/queries/drive-forms.test.ts
new file mode 100644
index 0000000000..48e3ead386
--- /dev/null
+++ b/apps/web/src/features/drive-view/queries/drive-forms.test.ts
@@ -0,0 +1,65 @@
+import type { ListedForm } from '@service-storage/generated/schemas/listedForm';
+import { describe, expect, it } from 'vitest';
+import type { DriveSelection } from '../context/drive-source';
+import { hiddenFormDatabases, selectDriveForms } from './drive-forms';
+
+const selection: DriveSelection = {
+ location: { kind: 'tab', tab: 'owned' },
+ scope: 'default',
+ sort: 'updated_at',
+ search: '',
+ facets: {},
+};
+const listed: ListedForm[] = [
+ {
+ form: {
+ id: 'rsvp',
+ name: 'Offsite RSVP',
+ description: '',
+ ownerId: 'me',
+ databaseId: 'rsvp-database',
+ tableId: 'rsvp-table',
+ submittedColumnId: null,
+ respondentColumnId: null,
+ audience: 'members',
+ tallyVisible: false,
+ status: 'open',
+ closesAt: null,
+ confirmationMessage: '',
+ createdAt: '2026-10-01T00:00:00Z',
+ updatedAt: '2026-10-01T00:00:00Z',
+ isHiddenInDrive: false,
+ },
+ access: 'owner',
+ },
+ {
+ form: {
+ id: 'poll',
+ name: 'Lunch?',
+ description: '',
+ ownerId: 'me',
+ databaseId: 'poll-database',
+ tableId: 'poll-table',
+ submittedColumnId: null,
+ respondentColumnId: null,
+ audience: 'members',
+ tallyVisible: true,
+ status: 'open',
+ closesAt: null,
+ confirmationMessage: '',
+ createdAt: '2026-10-02T00:00:00Z',
+ updatedAt: '2026-10-02T00:00:00Z',
+ isHiddenInDrive: true,
+ },
+ access: 'owner',
+ },
+];
+
+describe('Drive form listing', () => {
+ it('leaves out a form kept out of Drive, and the database made for it', () => {
+ expect(
+ selectDriveForms(listed, selection, 'me').map((entity) => entity.id)
+ ).toEqual(['rsvp']);
+ expect(hiddenFormDatabases(listed)).toEqual(new Set(['poll-database']));
+ });
+});
diff --git a/apps/web/src/features/drive-view/queries/drive-forms.ts b/apps/web/src/features/drive-view/queries/drive-forms.ts
index 0b17fbab25..bd0519dfe9 100644
--- a/apps/web/src/features/drive-view/queries/drive-forms.ts
+++ b/apps/web/src/features/drive-view/queries/drive-forms.ts
@@ -14,6 +14,7 @@ export function selectDriveForms(
if (scope === 'attachments') return [];
const search = selection.search.trim().toLocaleLowerCase();
return listed.flatMap(({ form, access }) => {
+ if (form.isHiddenInDrive) return [];
if (location.tab === 'shared' && form.ownerId === userId) return [];
if (
location.tab === 'owned' &&
@@ -34,3 +35,14 @@ export function selectDriveForms(
];
});
}
+
+/** The databases made for forms kept out of Drive, which stay out with them. */
+export function hiddenFormDatabases(
+ listed: readonly ListedForm[]
+): ReadonlySet<string> {
+ return new Set(
+ listed.flatMap(({ form }) =>
+ form.isHiddenInDrive ? [form.databaseId] : []
+ )
+ );
+}
diff --git a/apps/web/src/lib/core/component/AI/component/tool/forms/ResultDetails.test.tsx b/apps/web/src/lib/core/component/AI/component/tool/forms/ResultDetails.test.tsx
index a2abe296ea..e56509901f 100644
--- a/apps/web/src/lib/core/component/AI/component/tool/forms/ResultDetails.test.tsx
+++ b/apps/web/src/lib/core/component/AI/component/tool/forms/ResultDetails.test.tsx
@@ -36,6 +36,7 @@ const result: FormMutation = {
respondentColumnId: null,
createdAt: '2026-10-06T12:00:00Z',
updatedAt: '2026-10-06T12:00:00Z',
+ isHiddenInDrive: false,
},
columns: [
{
diff --git a/apps/web/src/lib/queries/storage/forms-preview.test.ts b/apps/web/src/lib/queries/storage/forms-preview.test.ts
index fcc010e752..ebd557b7a4 100644
--- a/apps/web/src/lib/queries/storage/forms-preview.test.ts
+++ b/apps/web/src/lib/queries/storage/forms-preview.test.ts
@@ -69,6 +69,7 @@ it('updates an already cached card title after renaming a form', async () => {
confirmationMessage: '',
createdAt: '2026-10-05T00:00:00Z',
updatedAt: '2026-10-05T00:00:00Z',
+ isHiddenInDrive: false,
},
});
const key = previewKeys.item('workshop').queryKey;
@@ -159,6 +160,7 @@ it('refreshes the linked database’s card after renaming a form, without guessi
confirmationMessage: '',
createdAt: '2026-10-05T00:00:00Z',
updatedAt: '2026-10-05T00:00:00Z',
+ isHiddenInDrive: false,
},
});
const linked = previewKeys.item('workshop-database').queryKey;
@@ -227,6 +229,7 @@ it('refreshes the cards of the forms over a renamed database, and only theirs',
confirmationMessage: '',
createdAt: '2026-10-05T00:00:00Z',
updatedAt: '2026-10-05T00:00:00Z',
+ isHiddenInDrive: false,
},
]
);
@@ -249,6 +252,7 @@ it('refreshes the cards of the forms over a renamed database, and only theirs',
confirmationMessage: '',
createdAt: '2026-10-05T00:00:00Z',
updatedAt: '2026-10-05T00:00:00Z',
+ isHiddenInDrive: false,
},
},
{
@@ -269,6 +273,7 @@ it('refreshes the cards of the forms over a renamed database, and only theirs',
confirmationMessage: '',
createdAt: '2026-10-05T00:00:00Z',
updatedAt: '2026-10-05T00:00:00Z',
+ isHiddenInDrive: false,
},
},
]);
diff --git a/apps/web/src/lib/service-clients/service-cognition/generated/tools/schemas.ts b/apps/web/src/lib/service-clients/service-cognition/generated/tools/schemas.ts
index f03e5c4077..69f62ad25a 100644
--- a/apps/web/src/lib/service-clients/service-cognition/generated/tools/schemas.ts
+++ b/apps/web/src/lib/service-clients/service-cognition/generated/tools/schemas.ts
@@ -2491,7 +2491,10 @@ export const CreateForm = z.object({
name: z.string(),
source: z.any().superRefine((x, ctx) => {
const schemas = [
- z.object({ kind: z.literal('new') }),
+ z.object({
+ isHiddenInDrive: z.boolean().optional(),
+ kind: z.literal('new'),
+ }),
z.object({
databaseId: z.string().uuid(),
tableId: z.string().uuid(),
@@ -3291,6 +3294,7 @@ export const MutationResult = z.object({
confirmationMessage: z.string(),
createdAt: z.string().datetime({ offset: true }),
updatedAt: z.string().datetime({ offset: true }),
+ isHiddenInDrive: z.boolean(),
}),
layout: z.object({
sections: z.array(
@@ -10078,6 +10082,7 @@ export const ListResult = z.object({
confirmationMessage: z.string(),
createdAt: z.string().datetime({ offset: true }),
updatedAt: z.string().datetime({ offset: true }),
+ isHiddenInDrive: z.boolean(),
}),
access: z.any().superRefine((x, ctx) => {
const schemas = [
@@ -12466,6 +12471,7 @@ export const ReadResult = z.any().superRefine((x, ctx) => {
confirmationMessage: z.string(),
createdAt: z.string().datetime({ offset: true }),
updatedAt: z.string().datetime({ offset: true }),
+ isHiddenInDrive: z.boolean(),
}),
layout: z.object({
sections: z.array(
@@ -13039,6 +13045,7 @@ export const ReadResult = z.any().superRefine((x, ctx) => {
confirmationMessage: z.string(),
createdAt: z.string().datetime({ offset: true }),
updatedAt: z.string().datetime({ offset: true }),
+ isHiddenInDrive: z.boolean(),
}),
access: z.any().superRefine((x, ctx) => {
const schemas = [
diff --git a/apps/web/src/lib/service-clients/service-cognition/generated/tools/types.ts b/apps/web/src/lib/service-clients/service-cognition/generated/tools/types.ts
index 7fc1f335bc..19d14ca54d 100644
--- a/apps/web/src/lib/service-clients/service-cognition/generated/tools/types.ts
+++ b/apps/web/src/lib/service-clients/service-cognition/generated/tools/types.ts
@@ -431,6 +431,11 @@ export type NewChannelType = 'private' | 'team';
*/
export type FormSource =
| {
+ /**
+ * Keep the form, and the database made for it, out of Drive, as
+ * for a channel poll.
+ */
+ isHiddenInDrive?: boolean;
kind: 'new';
}
| {
@@ -7259,6 +7264,11 @@ export interface Form {
* When its facts or layout last changed.
*/
updatedAt: string;
+ /**
+ * Whether Drive leaves it, and the database behind it, out of its
+ * listings, as for a channel poll.
+ */
+ isHiddenInDrive: boolean;
}
/**
* Every section of a form, in order.
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/form.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/form.ts
index 59df765aee..eeed0af07f 100644
--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/form.ts
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/form.ts
@@ -29,6 +29,9 @@ default. */
description: string;
/** The form. */
id: string;
+ /** Whether Drive leaves it, and the database behind it, out of its
+listings, as for a channel poll. */
+ isHiddenInDrive: boolean;
/** Its display name. A standalone form follows the database it created;
a form attached to an existing table has its own name. */
name: string;
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/formSourceOneOf.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/formSourceOneOf.ts
index dfd000ac91..0bfddf6d0f 100644
--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/formSourceOneOf.ts
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/formSourceOneOf.ts
@@ -11,5 +11,8 @@ import type { FormSourceOneOfKind } from './formSourceOneOfKind';
starts with only the form's own columns.
*/
export type FormSourceOneOf = {
+ /** Keep the form, and the database made for it, out of Drive, as
+for a channel poll. */
+ isHiddenInDrive?: boolean;
kind: FormSourceOneOfKind;
};
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/zod.ts b/apps/web/src/lib/service-clients/service-storage/generated/zod.ts
index b9b0eee699..0f7a52c4e0 100644
--- a/apps/web/src/lib/service-clients/service-storage/generated/zod.ts
+++ b/apps/web/src/lib/service-clients/service-storage/generated/zod.ts
@@ -19135,6 +19135,11 @@ export const listFormsResponseItem = zod
databaseId: zod.uuid().describe('The database holding its responses.'),
description: zod.string().describe('What respondents read under the name.'),
id: zod.uuid().describe('The form.'),
+ isHiddenInDrive: zod
+ .boolean()
+ .describe(
+ 'Whether Drive leaves it, and the database behind it, out of its\nlistings, as for a channel poll.'
+ ),
name: zod
.string()
.describe(
@@ -19182,6 +19187,12 @@ export const createFormBody = zod
.union([
zod
.object({
+ isHiddenInDrive: zod
+ .boolean()
+ .optional()
+ .describe(
+ 'Keep the form, and the database made for it, out of Drive, as\nfor a channel poll.'
+ ),
kind: zod.enum(['new']),
})
.describe(
@@ -19233,6 +19244,11 @@ export const listAccessibleFormsResponseItem = zod
.string()
.describe('What respondents read under the name.'),
id: zod.uuid().describe('The form.'),
+ isHiddenInDrive: zod
+ .boolean()
+ .describe(
+ 'Whether Drive leaves it, and the database behind it, out of its\nlistings, as for a channel poll.'
+ ),
name: zod
.string()
.describe(
@@ -19310,6 +19326,11 @@ export const getFormResponse = zod
.string()
.describe('What respondents read under the name.'),
id: zod.uuid().describe('The form.'),
+ isHiddenInDrive: zod
+ .boolean()
+ .describe(
+ 'Whether Drive leaves it, and the database behind it, out of its\nlistings, as for a channel poll.'
+ ),
name: zod
.string()
.describe(
@@ -19785,6 +19806,11 @@ export const updateFormResponse = zod
databaseId: zod.uuid().describe('The database holding its responses.'),
description: zod.string().describe('What respondents read under the name.'),
id: zod.uuid().describe('The form.'),
+ isHiddenInDrive: zod
+ .boolean()
+ .describe(
+ 'Whether Drive leaves it, and the database behind it, out of its\nlistings, as for a channel poll.'
+ ),
name: zod
.string()
.describe(
@@ -19859,6 +19885,11 @@ export const collaborateFormResponse = zod
.string()
.describe('What respondents read under the name.'),
id: zod.uuid().describe('The form.'),
+ isHiddenInDrive: zod
+ .boolean()
+ .describe(
+ 'Whether Drive leaves it, and the database behind it, out of its\nlistings, as for a channel poll.'
+ ),
name: zod
.string()
.describe(
@@ -20720,6 +20751,11 @@ export const putFormLayoutResponse = zod
.string()
.describe('What respondents read under the name.'),
id: zod.uuid().describe('The form.'),
+ isHiddenInDrive: zod
+ .boolean()
+ .describe(
+ 'Whether Drive leaves it, and the database behind it, out of its\nlistings, as for a channel poll.'
+ ),
name: zod
.string()
.describe(
diff --git a/apps/web/src/lib/service-clients/service-storage/openapi.json b/apps/web/src/lib/service-clients/service-storage/openapi.json
index 788707c4f6..321a0bb121 100644
--- a/apps/web/src/lib/service-clients/service-storage/openapi.json
+++ b/apps/web/src/lib/service-clients/service-storage/openapi.json
@@ -28870,7 +28870,8 @@
"closesAt",
"confirmationMessage",
"createdAt",
- "updatedAt"
+ "updatedAt",
+ "isHiddenInDrive"
],
"properties": {
"audience": {
@@ -28905,6 +28906,10 @@
"format": "uuid",
"description": "The form."
},
+ "isHiddenInDrive": {
+ "type": "boolean",
+ "description": "Whether Drive leaves it, and the database behind it, out of its\nlistings, as for a channel poll."
+ },
"name": {
"type": "string",
"description": "Its display name. A standalone form follows the database it created;\na form attached to an existing table has its own name."
@@ -29452,6 +29457,10 @@
"description": "A new database named like the form, whose one table, \"Responses\",\nstarts with only the form's own columns.",
"required": ["kind"],
"properties": {
+ "isHiddenInDrive": {
+ "type": "boolean",
+ "description": "Keep the form, and the database made for it, out of Drive, as\nfor a channel poll."
+ },
"kind": {
"type": "string",
"enum": ["new"]
diff --git a/crates/agent_code_mode/src/domain/documentation.json b/crates/agent_code_mode/src/domain/documentation.json
index c1eb27541f..ebaf470c17 100644
--- a/crates/agent_code_mode/src/domain/documentation.json
+++ b/crates/agent_code_mode/src/domain/documentation.json
@@ -81,7 +81,7 @@
"name": "forms",
"description": "Build forms and read responses.",
"overview": "<!-- src/entities/forms/namespace/classes/FormNamespace.md -->\n# Class: FormNamespace\n\nForms collect answers into a database table without granting respondents table access.\n\n## Constructors\n\n### Constructor\n\n> **new FormNamespace**(`client`): `FormNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`FormNamespace`\n\n## Methods\n\n### byId()\n\n> **byId**(`id`): [`Form`](../../form/classes/Form.md)\n\nA form handle. Details load on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`Form`](../../form/classes/Form.md)\n\n***\n\n### create()\n\n> **create**(`options`): `Promise`\\<[`Form`](../../form/classes/Form.md)\\>\n\nCreate a form over an existing table, or create its own Responses database.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | \\{ `name`: `string`; `table?`: [`DatabaseTable`](../../../databases/table/classes/DatabaseTable.md); \\} |\n| `options.name` | `string` |\n| `options.table?` | [`DatabaseTable`](../../../databases/table/classes/DatabaseTable.md) |\n\n#### Returns\n\n`Promise`\\<[`Form`](../../form/classes/Form.md)\\>\n\n***\n\n### list()\n\n> **list**(`database?`): `Promise`\\<[`Form`](../../form/classes/Form.md)[]\\>\n\nList forms shared with the caller, or forms over a database the caller can read.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `database?` | [`Database`](../../../databases/database/classes/Database.md) |\n\n#### Returns\n\n`Promise`\\<[`Form`](../../form/classes/Form.md)[]\\>\n",
- "documentation": "# Macro SDK: forms\n\nGenerated by TypeDoc. Paths below refer to the canonical Markdown hierarchy. Other entity handles are documented in their named section; request core for shared SDK helpers.\n\n<!-- generated/storage/types.gen/type-aliases/AccessLevel.md -->\n# Type Alias: AccessLevel\n\n> **AccessLevel** = `\"view\"` \\| `\"comment\"` \\| `\"edit\"` \\| `\"owner\"`\n\nOrdered from least to most access top -> bottom\n\n\n<!-- generated/storage/types.gen/type-aliases/Audience.md -->\n# Type Alias: Audience\n\n> **Audience** = `\"members\"` \\| `\"public\"`\n\nWho may respond to a form.\n\n\n<!-- generated/storage/types.gen/type-aliases/BookingTarget.md -->\n# Type Alias: BookingTarget\n\n> **BookingTarget** = \\{ `eventTypeId`: `string`; `profileId`: `string`; \\}\n\nAn existing native Macro scheduling event offered after an accepted response.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-eventtypeid\"></a> `eventTypeId` | `string` | The event type to book. |\n| <a id=\"property-profileid\"></a> `profileId` | `string` | The scheduling profile that owns the event. |\n\n\n<!-- generated/storage/types.gen/type-aliases/CellValue.md -->\n# Type Alias: CellValue\n\n> **CellValue** = \\{ `type`: `\"text\"`; `value`: `string`; \\} \\| \\{ `type`: `\"number\"`; `value`: `number`; \\} \\| \\{ `type`: `\"boolean\"`; `value`: `boolean`; \\} \\| \\{ `type`: `\"date\"`; `value`: `string`; \\} \\| \\{ `type`: `\"link\"`; `value`: `string`[]; \\} \\| \\{ `type`: `\"options\"`; `value`: [`OptionRef`](OptionRef.md)[]; \\} \\| \\{ `type`: `\"entities\"`; `value`: [`EntityRef`](EntityRef.md)[]; \\} \\| \\{ `type`: `\"rows\"`; `value`: `string`[]; \\} \\| \\{ `type`: `\"clear\"`; \\}\n\nA cell's value. It must fit the column's type: text for a text column,\noptions of the column for a select, and so on.\n\n## Union Members\n\n### Type Literal\n\n\\{ `type`: `\"text\"`; `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"text\"` | - |\n| `value` | `string` | Free text. |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"number\"`; `value`: `number`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"number\"` | - |\n| `value` | `number` | A finite number. |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"boolean\"`; `value`: `boolean`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"boolean\"` | - |\n| `value` | `boolean` | A checkbox. |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"date\"`; `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"date\"` | - |\n| `value` | `string` | A date-time. |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"link\"`; `value`: `string`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"link\"` | - |\n| `value` | `string`[] | Complete http or https URLs; at most one for a single-valued column. |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"options\"`; `value`: [`OptionRef`](OptionRef.md)[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"options\"` | - |\n| `value` | [`OptionRef`](OptionRef.md)[] | Options of a select or tag column; at most one for a single-valued column. |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"entities\"`; `value`: [`EntityRef`](EntityRef.md)[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"entities\"` | - |\n| `value` | [`EntityRef`](EntityRef.md)[] | References to Macro entities of the kind the column points at; at most one for a single-valued column. |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"rows\"`; `value`: `string`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"rows\"` | - |\n| `value` | `string`[] | Rows of the table a relation column points at. |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"clear\"`; \\}\n\n\n<!-- generated/storage/types.gen/type-aliases/ChannelSharePermission.md -->\n# Type Alias: ChannelSharePermission\n\n> **ChannelSharePermission** = \\{ `access_level`: [`AccessLevel`](AccessLevel.md); `channel_id`: `string`; \\}\n\nThe channel share permission\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-access_level\"></a> `access_level` | [`AccessLevel`](AccessLevel.md) | The access level for the channel |\n| <a id=\"property-channel_id\"></a> `channel_id` | `string` | The channel id |\n\n\n<!-- generated/storage/types.gen/type-aliases/ColumnKind.md -->\n# Type Alias: ColumnKind\n\n> **ColumnKind** = \\{ `type`: `\"text\"`; \\} \\| \\{ `type`: `\"number\"`; \\} \\| \\{ `type`: `\"boolean\"`; \\} \\| \\{ `type`: `\"date\"`; \\} \\| \\{ `type`: `\"link\"`; \\} \\| \\{ `multi`: `boolean`; `type`: `\"select\"`; \\} \\| \\{ `multi`: `boolean`; `type`: `\"select_number\"`; \\} \\| \\{ `type`: `\"tag\"`; \\} \\| \\{ `multi`: `boolean`; `target`: [`EntityKind`](EntityKind.md); `type`: `\"entity\"`; \\} \\| \\{ `database`: `string`; `table`: `string`; `type`: `\"relation\"`; \\}\n\nA type a column can have.\n\n## Union Members\n\n### Type Literal\n\n\\{ `type`: `\"text\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"number\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"boolean\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"date\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"link\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `multi`: `boolean`; `type`: `\"select\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `multi` | `boolean` | Whether a cell holds several options. |\n| `type` | `\"select\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `multi`: `boolean`; `type`: `\"select_number\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `multi` | `boolean` | Whether a cell holds several options. |\n| `type` | `\"select_number\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"tag\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `multi`: `boolean`; `target`: [`EntityKind`](EntityKind.md); `type`: `\"entity\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `multi` | `boolean` | Whether a cell holds several references. |\n| `target` | [`EntityKind`](EntityKind.md) | What the references point at. |\n| `type` | `\"entity\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `database`: `string`; `table`: `string`; `type`: `\"relation\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `database` | `string` | The database of the related table. |\n| `table` | `string` | The related table. |\n| `type` | `\"relation\"` | - |\n\n\n<!-- generated/storage/types.gen/type-aliases/Conjunction.md -->\n# Type Alias: Conjunction\n\n> **Conjunction** = `\"and\"` \\| `\"or\"`\n\nHow a group's conditions combine.\n\n\n<!-- generated/storage/types.gen/type-aliases/DateOperator.md -->\n# Type Alias: DateOperator\n\n> **DateOperator** = `\"before\"` \\| `\"after\"` \\| `\"onOrBefore\"` \\| `\"onOrAfter\"`\n\nHow a date cell compares to a date-time.\n\n\n<!-- generated/storage/types.gen/type-aliases/EntityKind.md -->\n# Type Alias: EntityKind\n\n> **EntityKind** = `\"USER\"` \\| `\"DOCUMENT\"` \\| `\"TASK\"` \\| `\"COMPANY\"` \\| `\"CONTACT\"` \\| `\"CALL_RECORD\"` \\| `\"CHANNEL\"` \\| `\"CHAT\"` \\| `\"PROJECT\"` \\| `\"THREAD\"` \\| `\"CALENDAR_EVENT\"` \\| `\"INITIATIVE\"`\n\nA kind of Macro entity a reference column can point at.\n\n\n<!-- generated/storage/types.gen/type-aliases/EntityRef.md -->\n# Type Alias: EntityRef\n\n> **EntityRef** = \\{ `entityId`: `string`; `entityType`: [`EntityKind`](EntityKind.md); \\}\n\nA reference to one Macro entity.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-entityid\"></a> `entityId` | `string` | The entity's id. |\n| <a id=\"property-entitytype\"></a> `entityType` | [`EntityKind`](EntityKind.md) | What kind of entity it is; it must be the kind the column points at. |\n\n\n<!-- generated/storage/types.gen/type-aliases/FilterCondition.md -->\n# Type Alias: FilterCondition\n\n> **FilterCondition** = \\{ `column`: `string`; `test`: [`FilterTest`](FilterTest.md); \\}\n\nA test of one column's cells.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-column\"></a> `column` | `string` | The column tested. |\n| <a id=\"property-test\"></a> `test` | [`FilterTest`](FilterTest.md) | What its cell must be. The test's kind must fit the column's type. |\n\n\n<!-- generated/storage/types.gen/type-aliases/FilterGroup.md -->\n# Type Alias: FilterGroup\n\n> **FilterGroup** = \\{ `conditions`: [`FilterNode`](FilterNode.md)[]; `conjunction`: [`Conjunction`](Conjunction.md); \\}\n\nConditions joined by one conjunction.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-conditions\"></a> `conditions` | [`FilterNode`](FilterNode.md)[] | The conditions and nested groups. A group without any keeps every row. |\n| <a id=\"property-conjunction\"></a> `conjunction` | [`Conjunction`](Conjunction.md) | Whether every condition must hold, or any one. |\n\n\n<!-- generated/storage/types.gen/type-aliases/FilterNode.md -->\n# Type Alias: FilterNode\n\n> **FilterNode** = [`FilterCondition`](FilterCondition.md) & \\{ `kind`: `\"condition\"`; \\} \\| [`FilterGroup`](FilterGroup.md) & \\{ `kind`: `\"group\"`; \\}\n\nOne entry of a group: a condition, or a group of its own.\n\n\n<!-- generated/storage/types.gen/type-aliases/FilterTest.md -->\n# Type Alias: FilterTest\n\n> **FilterTest** = \\{ `kind`: `\"presence\"`; `operator`: [`PresenceOperator`](PresenceOperator.md); \\} \\| \\{ `kind`: `\"text\"`; `operator`: [`TextOperator`](TextOperator.md); `value`: `string`; \\} \\| \\{ `kind`: `\"number\"`; `operator`: [`NumberOperator`](NumberOperator.md); `value`: `number`; \\} \\| \\{ `kind`: `\"date\"`; `operator`: [`DateOperator`](DateOperator.md); `value`: `string`; \\} \\| \\{ `checked`: `boolean`; `kind`: `\"checkbox\"`; \\} \\| \\{ `kind`: `\"options\"`; `operator`: [`SetOperator`](SetOperator.md); `options`: `string`[]; \\} \\| \\{ `entities`: `string`[]; `kind`: `\"entities\"`; `operator`: [`SetOperator`](SetOperator.md); \\}\n\nWhat a column's cell must be, by the kind of value the column holds.\n\n## Union Members\n\n### Type Literal\n\n\\{ `kind`: `\"presence\"`; `operator`: [`PresenceOperator`](PresenceOperator.md); \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"presence\"` | - |\n| `operator` | [`PresenceOperator`](PresenceOperator.md) | Empty, or not. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"text\"`; `operator`: [`TextOperator`](TextOperator.md); `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"text\"` | - |\n| `operator` | [`TextOperator`](TextOperator.md) | How the cell compares. |\n| `value` | `string` | The text compared against, ignoring case for the containment tests. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"number\"`; `operator`: [`NumberOperator`](NumberOperator.md); `value`: `number`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"number\"` | - |\n| `operator` | [`NumberOperator`](NumberOperator.md) | How the cell compares. |\n| `value` | `number` | The number compared against; finite. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"date\"`; `operator`: [`DateOperator`](DateOperator.md); `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"date\"` | - |\n| `operator` | [`DateOperator`](DateOperator.md) | How the cell compares. |\n| `value` | `string` | The date-time compared against. |\n\n***\n\n### Type Literal\n\n\\{ `checked`: `boolean`; `kind`: `\"checkbox\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `checked` | `boolean` | Whether the box is checked. |\n| `kind` | `\"checkbox\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"options\"`; `operator`: [`SetOperator`](SetOperator.md); `options`: `string`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"options\"` | - |\n| `operator` | [`SetOperator`](SetOperator.md) | How the cell's options relate to these. |\n| `options` | `string`[] | Options of the column; at least one. |\n\n***\n\n### Type Literal\n\n\\{ `entities`: `string`[]; `kind`: `\"entities\"`; `operator`: [`SetOperator`](SetOperator.md); \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `entities` | `string`[] | Entity ids, or for a relation the related rows' ids; at least one. |\n| `kind` | `\"entities\"` | - |\n| `operator` | [`SetOperator`](SetOperator.md) | How the cell's references relate to these. |\n\n\n<!-- generated/storage/types.gen/type-aliases/Form.md -->\n# Type Alias: Form\n\n> **Form** = \\{ `audience`: [`Audience`](Audience.md); `closesAt`: `string` \\| `null`; `confirmationMessage`: `string`; `createdAt`: `string`; `databaseId`: `string`; `description`: `string`; `id`: `string`; `name`: `string`; `ownerId`: `string`; `respondentColumnId`: `string` \\| `null`; `status`: [`FormStatus`](FormStatus.md); `submittedColumnId`: `string` \\| `null`; `tableId`: `string`; `tallyVisible`: `boolean`; `updatedAt`: `string`; \\}\n\nA form: a view of one database table whose rows are its responses.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-audience\"></a> `audience` | [`Audience`](Audience.md) | Who may respond. |\n| <a id=\"property-closesat\"></a> `closesAt` | `string` \\| `null` | When it stops taking responses, if it does. |\n| <a id=\"property-confirmationmessage\"></a> `confirmationMessage` | `string` | What a respondent reads once their response is saved; empty for the default. |\n| <a id=\"property-createdat\"></a> `createdAt` | `string` | When it was created. |\n| <a id=\"property-databaseid\"></a> `databaseId` | `string` | The database holding its responses. |\n| <a id=\"property-description\"></a> `description` | `string` | What respondents read under the name. |\n| <a id=\"property-id\"></a> `id` | `string` | The form. |\n| <a id=\"property-name\"></a> `name` | `string` | Its display name. A standalone form follows the database it created; a form attached to an existing table has its own name. |\n| <a id=\"property-ownerid\"></a> `ownerId` | `string` | Its owner. |\n| <a id=\"property-respondentcolumnid\"></a> `respondentColumnId` | `string` \\| `null` | The person column each signed-in submission names its respondent in; `null` once deleted. |\n| <a id=\"property-status\"></a> `status` | [`FormStatus`](FormStatus.md) | Whether its owner closed it. |\n| <a id=\"property-submittedcolumnid\"></a> `submittedColumnId` | `string` \\| `null` | The date column each submission stamps; `null` once deleted. |\n| <a id=\"property-tableid\"></a> `tableId` | `string` | The table whose rows are its responses. |\n| <a id=\"property-tallyvisible\"></a> `tallyVisible` | `boolean` | Whether respondents may read option tallies. |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `string` | When its facts or layout last changed. |\n\n\n<!-- generated/storage/types.gen/type-aliases/FormAccess.md -->\n# Type Alias: FormAccess\n\n> **FormAccess** = `\"view\"` \\| `\"edit\"` \\| `\"owner\"`\n\nThe caller's level on a form: view responds, edit changes questions and\nreads responses, owner also sets the audience, closes and trashes it.\n\n\n<!-- generated/storage/types.gen/type-aliases/FormDetail.md -->\n# Type Alias: FormDetail\n\n> **FormDetail** = \\{ `access`: [`FormAccess`](FormAccess.md); `form`: [`Form`](Form.md); `sections`: [`FormSectionDetail`](FormSectionDetail.md)[]; `tableGone`: `boolean`; \\}\n\nA form with its layout, as the caller may see it.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-access\"></a> `access` | [`FormAccess`](FormAccess.md) | The caller's level on it. |\n| <a id=\"property-form\"></a> `form` | [`Form`](Form.md) | The form's facts. |\n| <a id=\"property-sections\"></a> `sections` | [`FormSectionDetail`](FormSectionDetail.md)[] | Its sections, in order. |\n| <a id=\"property-tablegone\"></a> `tableGone` | `boolean` | Whether its database is in the trash, so it has no table to show or write: its sections keep no questions and it takes no responses. |\n\n\n<!-- generated/storage/types.gen/type-aliases/FormPublicationProblem.md -->\n# Type Alias: FormPublicationProblem\n\n> **FormPublicationProblem** = \\{ `kind`: `\"invalidDraft\"`; \\} \\| \\{ `kind`: `\"layout\"`; `problem`: [`LayoutProblem`](LayoutProblem.md); \\} \\| \\{ `kind`: `\"widgetMismatch\"`; `question`: `string`; \\} \\| \\{ `kind`: `\"fileUploadNeedsSignIn\"`; \\} \\| \\{ `kind`: `\"pending\"`; \\}\n\nAn editor's saved draft is not yet the version respondents can use.\n\n## Union Members\n\n### Type Literal\n\n\\{ `kind`: `\"invalidDraft\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"layout\"`; `problem`: [`LayoutProblem`](LayoutProblem.md); \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"layout\"` | - |\n| `problem` | [`LayoutProblem`](LayoutProblem.md) | The invariant the editor needs to repair. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"widgetMismatch\"`; `question`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"widgetMismatch\"` | - |\n| `question` | `string` | The question to repair. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"fileUploadNeedsSignIn\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"pending\"`; \\}\n\n\n<!-- generated/storage/types.gen/type-aliases/FormQuestionDetail.md -->\n# Type Alias: FormQuestionDetail\n\n> **FormQuestionDetail** = \\{ `column`: `string`; `helpText`: `string`; `id`: `string`; `kind`: [`ColumnKind`](ColumnKind.md); `options`: [`QuestionOption`](QuestionOption.md)[]; `required`: `boolean`; `title`: `string`; `widget`: `null` \\| [`Widget`](Widget.md); \\}\n\nA question with its column's facts.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-column\"></a> `column` | `string` | The column it writes. |\n| <a id=\"property-helptext\"></a> `helpText` | `string` | What respondents read under the title. |\n| <a id=\"property-id\"></a> `id` | `string` | The question. |\n| <a id=\"property-kind\"></a> `kind` | [`ColumnKind`](ColumnKind.md) | The column's type. |\n| <a id=\"property-options\"></a> `options` | [`QuestionOption`](QuestionOption.md)[] | The column's options, in order, for a select or tag column. |\n| <a id=\"property-required\"></a> `required` | `boolean` | Whether a response must answer it. |\n| <a id=\"property-title\"></a> `title` | `string` | The column's name. |\n| <a id=\"property-widget\"></a> `widget` | `null` \\| [`Widget`](Widget.md) | - |\n\n\n<!-- generated/storage/types.gen/type-aliases/FormSectionDetail.md -->\n# Type Alias: FormSectionDetail\n\n> **FormSectionDetail** = \\{ `description`: `string`; `id`: `string`; `kind`: `\"questions\"`; `questions`: [`FormQuestionDetail`](FormQuestionDetail.md)[]; `title`: `string`; \\} \\| \\{ `description`: `string`; `id`: `string`; `kind`: `\"gate\"`; `message`: `string`; `rules`: [`FilterGroup`](FilterGroup.md); `title`: `string`; \\} \\| \\{ `description`: `string`; `id`: `string`; `kind`: `\"booking\"`; `target?`: [`BookingTarget`](BookingTarget.md); `title`: `string`; \\}\n\nOne section of a form as it reads.\n\n## Union Members\n\n### Type Literal\n\n\\{ `description`: `string`; `id`: `string`; `kind`: `\"questions\"`; `questions`: [`FormQuestionDetail`](FormQuestionDetail.md)[]; `title`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `description` | `string` | Its description. |\n| `id` | `string` | The section. |\n| `kind` | `\"questions\"` | - |\n| `questions` | [`FormQuestionDetail`](FormQuestionDetail.md)[] | Its questions, in order. |\n| `title` | `string` | Its title. |\n\n***\n\n### Type Literal\n\n\\{ `description`: `string`; `id`: `string`; `kind`: `\"gate\"`; `message`: `string`; `rules`: [`FilterGroup`](FilterGroup.md); `title`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `description` | `string` | Its description. |\n| `id` | `string` | The section. |\n| `kind` | `\"gate\"` | - |\n| `message` | `string` | What a stopped respondent reads. |\n| `rules` | [`FilterGroup`](FilterGroup.md) | The rules. |\n| `title` | `string` | Its title. |\n\n***\n\n### Type Literal\n\n\\{ `description`: `string`; `id`: `string`; `kind`: `\"booking\"`; `target?`: [`BookingTarget`](BookingTarget.md); `title`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `description` | `string` | Its description. |\n| `id` | `string` | The section. |\n| `kind` | `\"booking\"` | - |\n| `target?` | [`BookingTarget`](BookingTarget.md) | Editors can configure the destination; respondent layouts omit it. |\n| `title` | `string` | Its title. |\n\n\n<!-- generated/storage/types.gen/type-aliases/FormStatus.md -->\n# Type Alias: FormStatus\n\n> **FormStatus** = `\"open\"` \\| `\"closed\"`\n\nWhether a form takes responses, as its owner set it. A form also stops\ntaking them once its closing time passes.\n\n\n<!-- generated/storage/types.gen/type-aliases/LayoutProblem.md -->\n# Type Alias: LayoutProblem\n\n> **LayoutProblem** = \\{ `kind`: `\"bookingMustBeLast\"`; \\} \\| \\{ `column`: `string`; `kind`: `\"unknownColumn\"`; \\} \\| \\{ `column`: `string`; `kind`: `\"managedColumn\"`; \\} \\| \\{ `column`: `string`; `kind`: `\"repeatedColumn\"`; \\} \\| \\{ `id`: `string`; `kind`: `\"repeatedId\"`; \\} \\| \\{ `column`: `string`; `kind`: `\"gateNamesLaterColumn\"`; \\} \\| \\{ `kind`: `\"gateRule\"`; `reason`: `string`; \\} \\| \\{ `kind`: `\"textTooLong\"`; `max`: `number`; \\}\n\nWhy a layout does not fit the form's table.\n\n## Union Members\n\n### Type Literal\n\n\\{ `kind`: `\"bookingMustBeLast\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `column`: `string`; `kind`: `\"unknownColumn\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `column` | `string` | The column. |\n| `kind` | `\"unknownColumn\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `column`: `string`; `kind`: `\"managedColumn\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `column` | `string` | The column. |\n| `kind` | `\"managedColumn\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `column`: `string`; `kind`: `\"repeatedColumn\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `column` | `string` | The column. |\n| `kind` | `\"repeatedColumn\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `id`: `string`; `kind`: `\"repeatedId\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | The id. |\n| `kind` | `\"repeatedId\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `column`: `string`; `kind`: `\"gateNamesLaterColumn\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `column` | `string` | The column. |\n| `kind` | `\"gateNamesLaterColumn\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"gateRule\"`; `reason`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"gateRule\"` | - |\n| `reason` | `string` | Why. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"textTooLong\"`; `max`: `number`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"textTooLong\"` | - |\n| `max` | `number` | The longest allowed. |\n\n\n<!-- generated/storage/types.gen/type-aliases/LinkShare.md -->\n# Type Alias: LinkShare\n\n> **LinkShare** = `\"PUBLIC\"` \\| `\"TEAM\"`\n\nDefines who can access an item through its share link.\n\n\n<!-- generated/storage/types.gen/type-aliases/NumberOperator.md -->\n# Type Alias: NumberOperator\n\n> **NumberOperator** = `\"is\"` \\| `\"isNot\"` \\| `\"greaterThan\"` \\| `\"greaterThanOrEqual\"` \\| `\"lessThan\"` \\| `\"lessThanOrEqual\"`\n\nHow a number cell compares to a number.\n\n\n<!-- generated/storage/types.gen/type-aliases/OptionRef.md -->\n# Type Alias: OptionRef\n\n> **OptionRef** = \\{ `id`: `string`; \\} \\| \\{ `label`: `string`; \\}\n\nA select option, by its id or by its label.\n\n## Union Members\n\n### Type Literal\n\n\\{ `id`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | An option the column has. |\n\n***\n\n### Type Literal\n\n\\{ `label`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `label` | `string` | An option's label, matched without regard to case. An unknown label is refused. |\n\n\n<!-- generated/storage/types.gen/type-aliases/PresenceOperator.md -->\n# Type Alias: PresenceOperator\n\n> **PresenceOperator** = `\"isEmpty\"` \\| `\"isNotEmpty\"`\n\nWhether a cell is empty.\n\n\n<!-- generated/storage/types.gen/type-aliases/QuestionOption.md -->\n# Type Alias: QuestionOption\n\n> **QuestionOption** = \\{ `color`: `string` \\| `null`; `id`: `string`; `label`: `string`; \\}\n\nOne option of a question's column.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-color\"></a> `color` | `string` \\| `null` | Its colour, a hex string, if it has one. |\n| <a id=\"property-id\"></a> `id` | `string` | The option. |\n| <a id=\"property-label\"></a> `label` | `string` | Its label. |\n\n\n<!-- generated/storage/types.gen/type-aliases/ResponseStatus.md -->\n# Type Alias: ResponseStatus\n\n> **ResponseStatus** = `\"submitted\"` \\| `\"stopped\"`\n\nWhether a ledger entry is a saved response or a stop at a gate.\n\n\n<!-- generated/storage/types.gen/type-aliases/SetOperator.md -->\n# Type Alias: SetOperator\n\n> **SetOperator** = `\"isAnyOf\"` \\| `\"isNoneOf\"` \\| `\"hasAny\"` \\| `\"hasAll\"` \\| `\"hasNone\"`\n\nHow a cell's options or references relate to a set of them. The first\ntwo fit a column holding one value, the last three one holding several.\n\n\n<!-- generated/storage/types.gen/type-aliases/SharePermissionV2.md -->\n# Type Alias: SharePermissionV2\n\n> **SharePermissionV2** = \\{ `channelSharePermissions?`: [`ChannelSharePermission`](ChannelSharePermission.md)[] \\| `null`; `id`: `string`; `linkShare?`: `null` \\| [`LinkShare`](LinkShare.md); `linkShareAccessLevel?`: `null` \\| [`AccessLevel`](AccessLevel.md); `owner`: `string`; `teamShareAccessLevel?`: `null` \\| [`AccessLevel`](AccessLevel.md); \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-channelsharepermissions\"></a> `channelSharePermissions?` | [`ChannelSharePermission`](ChannelSharePermission.md)[] \\| `null` | The channel share permissions for the item |\n| <a id=\"property-id\"></a> `id` | `string` | The share permission id |\n| <a id=\"property-linkshare\"></a> `linkShare?` | `null` \\| [`LinkShare`](LinkShare.md) | - |\n| <a id=\"property-linkshareaccesslevel\"></a> `linkShareAccessLevel?` | `null` \\| [`AccessLevel`](AccessLevel.md) | - |\n| <a id=\"property-owner\"></a> `owner` | `string` | The owner of the item |\n| <a id=\"property-teamshareaccesslevel\"></a> `teamShareAccessLevel?` | `null` \\| [`AccessLevel`](AccessLevel.md) | - |\n\n\n<!-- generated/storage/types.gen/type-aliases/TextOperator.md -->\n# Type Alias: TextOperator\n\n> **TextOperator** = `\"is\"` \\| `\"isNot\"` \\| `\"contains\"` \\| `\"doesNotContain\"` \\| `\"startsWith\"` \\| `\"endsWith\"`\n\nHow a text cell compares to a text.\n\n\n<!-- generated/storage/types.gen/type-aliases/UnlockedBooking.md -->\n# Type Alias: UnlockedBooking\n\n> **UnlockedBooking** = \\{ `description`: `string`; `section`: `string`; `target`: [`BookingTarget`](BookingTarget.md); `title`: `string`; \\}\n\nA booking step a passing response has unlocked, with its destination.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-description\"></a> `description` | `string` | What respondents read before choosing a time. |\n| <a id=\"property-section\"></a> `section` | `string` | The booking section. |\n| <a id=\"property-target\"></a> `target` | [`BookingTarget`](BookingTarget.md) | The native booking event to open. |\n| <a id=\"property-title\"></a> `title` | `string` | Its title. |\n\n\n<!-- generated/storage/types.gen/type-aliases/UpdateChannelSharePermission.md -->\n# Type Alias: UpdateChannelSharePermission\n\n> **UpdateChannelSharePermission** = \\{ `accessLevel?`: `null` \\| [`AccessLevel`](AccessLevel.md); `channelId`: `string`; `operation`: [`UpdateOperation`](UpdateOperation.md); \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-accesslevel\"></a> `accessLevel?` | `null` \\| [`AccessLevel`](AccessLevel.md) | - |\n| <a id=\"property-channelid\"></a> `channelId` | `string` | The channel id |\n| <a id=\"property-operation\"></a> `operation` | [`UpdateOperation`](UpdateOperation.md) | The type of operation to be performed on the chanel share permission You can add, remove or replace and existing permission |\n\n\n<!-- generated/storage/types.gen/type-aliases/UpdateForm.md -->\n# Type Alias: UpdateForm\n\n> **UpdateForm** = \\{ `audience?`: [`Audience`](Audience.md); `closesAt?`: `string` \\| `null`; `confirmationMessage?`: `string`; `description?`: `string`; `status?`: [`FormStatus`](FormStatus.md); `tallyVisible?`: `boolean`; \\}\n\nA change to a form's facts; what is left out stays. The description and\nconfirmation message take edit, the rest owner. A form is renamed\nthrough the entity mutation router.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-audience\"></a> `audience?` | [`Audience`](Audience.md) | Who may respond from now on. |\n| <a id=\"property-closesat\"></a> `closesAt?` | `string` \\| `null` | When it stops taking responses, or `null` for never. |\n| <a id=\"property-confirmationmessage\"></a> `confirmationMessage?` | `string` | Its new confirmation message. |\n| <a id=\"property-description\"></a> `description?` | `string` | Its new description. |\n| <a id=\"property-status\"></a> `status?` | [`FormStatus`](FormStatus.md) | Open or close it. |\n| <a id=\"property-tallyvisible\"></a> `tallyVisible?` | `boolean` | Whether respondents may read option tallies. |\n\n\n<!-- generated/storage/types.gen/type-aliases/UpdateOperation.md -->\n# Type Alias: UpdateOperation\n\n> **UpdateOperation** = `\"add\"` \\| `\"remove\"` \\| `\"replace\"`\n\n\n<!-- generated/storage/types.gen/type-aliases/UpdateSharePermissionRequestV2.md -->\n# Type Alias: UpdateSharePermissionRequestV2\n\n> **UpdateSharePermissionRequestV2** = \\{ `channelSharePermissions?`: [`UpdateChannelSharePermission`](UpdateChannelSharePermission.md)[] \\| `null`; `linkShare?`: `null` \\| [`LinkShare`](LinkShare.md); `linkShareAccessLevel?`: `null` \\| [`AccessLevel`](AccessLevel.md); `teamShareAccessLevel?`: `null` \\| [`AccessLevel`](AccessLevel.md); \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-channelsharepermissions\"></a> `channelSharePermissions?` | [`UpdateChannelSharePermission`](UpdateChannelSharePermission.md)[] \\| `null` | Any channel share permissions to be created/updated/removed |\n| <a id=\"property-linkshare\"></a> `linkShare?` | `null` \\| [`LinkShare`](LinkShare.md) | - |\n| <a id=\"property-linkshareaccesslevel\"></a> `linkShareAccessLevel?` | `null` \\| [`AccessLevel`](AccessLevel.md) | - |\n| <a id=\"property-teamshareaccesslevel\"></a> `teamShareAccessLevel?` | `null` \\| [`AccessLevel`](AccessLevel.md) | - |\n\n\n<!-- generated/storage/types.gen/type-aliases/Widget.md -->\n# Type Alias: Widget\n\n> **Widget** = `\"short\"` \\| `\"paragraph\"` \\| `\"datetime\"` \\| `\"date\"` \\| `\"url\"` \\| `\"file\"` \\| `\"choice\"` \\| `\"dropdown\"` \\| `\"checkboxes\"`\n\nHow a question is asked. Each column kind takes a few, the first its\ndefault; kinds asked one way only (numbers, checkboxes, entity and row\npickers) take none.\n\n\n<!-- src/entities/forms/form/classes/Form.md -->\n# Class: Form\n\nA form over a database table. Viewers can read its questions and submit;\neditors can build it and read responses; owners control its audience.\n\n## Extends\n\n- [`MacroEntity`](../../../entity/classes/MacroEntity.md)\\<[`FormDetail`](../../../../../generated/storage/types.gen/type-aliases/FormDetail.md)\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-access\"></a> `access` | `readonly` | () => `Promise`\\<[`FormAccess`](../../../../../generated/storage/types.gen/type-aliases/FormAccess.md)\\> | The caller's access level. | - |\n| <a id=\"property-audience\"></a> `audience` | `readonly` | () => `Promise`\\<[`Audience`](../../../../../generated/storage/types.gen/type-aliases/Audience.md)\\> | Who may respond. | - |\n| <a id=\"property-closesat\"></a> `closesAt` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | Scheduled closing time, when set. | - |\n| <a id=\"property-database\"></a> `database` | `readonly` | () => `Promise`\\<[`Database`](../../../databases/database/classes/Database.md)\\> | The response database. Reading its contents requires separate access. | - |\n| <a id=\"property-description\"></a> `description` | `readonly` | () => `Promise`\\<`string`\\> | Introductory text shown to respondents. | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | [`MacroEntity`](../../../entity/classes/MacroEntity.md).[`id`](../../../entity/classes/MacroEntity.md#property-id) |\n| <a id=\"property-name\"></a> `name` | `readonly` | () => `Promise`\\<`string`\\> | The form's display name. | - |\n| <a id=\"property-owner\"></a> `owner` | `readonly` | () => `Promise`\\<[`User`](../../../users/user/classes/User.md)\\> | The owning user. | - |\n| <a id=\"property-status\"></a> `status` | `readonly` | () => `Promise`\\<[`FormStatus`](../../../../../generated/storage/types.gen/type-aliases/FormStatus.md)\\> | Whether submissions are currently enabled. A closing time can also close the form. | - |\n| <a id=\"property-table\"></a> `table` | `readonly` | () => `Promise`\\<[`DatabaseTable`](../../../databases/table/classes/DatabaseTable.md)\\> | The linked table, without fetching its contents. | - |\n\n## Methods\n\n### editResponse()\n\n> **editResponse**(`answers`): `Promise`\\<[`FormSubmissionOutcome`](../type-aliases/FormSubmissionOutcome.md)\\>\n\nReplace the caller's answers while the form is open; gates are evaluated again.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `answers` | [`FormAnswer`](../type-aliases/FormAnswer.md)[] |\n\n#### Returns\n\n`Promise`\\<[`FormSubmissionOutcome`](../type-aliases/FormSubmissionOutcome.md)\\>\n\n***\n\n### myResponse()\n\n> **myResponse**(): `Promise`\\<[`MyFormResponse`](../type-aliases/MyFormResponse.md)\\>\n\nRead the caller's receipt and answers without reading anyone else's responses.\n\n#### Returns\n\n`Promise`\\<[`MyFormResponse`](../type-aliases/MyFormResponse.md)\\>\n\n***\n\n### questions()\n\n> **questions**(): `Promise`\\<[`FormQuestion`](../../question/classes/FormQuestion.md)[]\\>\n\nAll questions in display order, skipping gates.\n\n#### Returns\n\n`Promise`\\<[`FormQuestion`](../../question/classes/FormQuestion.md)[]\\>\n\n***\n\n### replaceLayout()\n\n> **replaceLayout**(`sections`): `Promise`\\<[`FormLayoutResult`](../type-aliases/FormLayoutResult.md)\\>\n\nSave a replacement in the shared draft. Existing handles retain identity;\nomitted handles mint sections or questions. Column facts use the database API.\nA publicationError means the draft was saved but respondents still see the last\nvalid version. Repair the reported problem or reload to retry publication.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `sections` | [`FormSectionPlacement`](../type-aliases/FormSectionPlacement.md)[] |\n\n#### Returns\n\n`Promise`\\<[`FormLayoutResult`](../type-aliases/FormLayoutResult.md)\\>\n\n***\n\n### respondUrl()\n\n> **respondUrl**(): `string`\n\nThe respondent page, which public forms also expose without signing in.\n\n#### Returns\n\n`string`\n\n***\n\n### responseSummary()\n\n> **responseSummary**(): `Promise`\\<[`FormResponseSummary`](../type-aliases/FormResponseSummary.md)\\>\n\nLedger counts and total table rows; requires edit access.\n\n#### Returns\n\n`Promise`\\<[`FormResponseSummary`](../type-aliases/FormResponseSummary.md)\\>\n\n***\n\n### schema()\n\n> **schema**(): `Promise`\\<[`FormDetail`](../../../../../generated/storage/types.gen/type-aliases/FormDetail.md)\\>\n\nThe form's presentation and column facts; this never contains response rows.\n\n#### Returns\n\n`Promise`\\<[`FormDetail`](../../../../../generated/storage/types.gen/type-aliases/FormDetail.md)\\>\n\n***\n\n### sections()\n\n> **sections**(): `Promise`\\<[`FormSection`](../../section/classes/FormSection.md)[]\\>\n\nSections in display order.\n\n#### Returns\n\n`Promise`\\<[`FormSection`](../../section/classes/FormSection.md)[]\\>\n\n***\n\n### sharePermissions()\n\n> **sharePermissions**(): `Promise`\\<[`SharePermissionV2`](../../../../../generated/storage/types.gen/type-aliases/SharePermissionV2.md)\\>\n\nRead the form's sharing grants. Requires ownership.\n\n#### Returns\n\n`Promise`\\<[`SharePermissionV2`](../../../../../generated/storage/types.gen/type-aliases/SharePermissionV2.md)\\>\n\n***\n\n### submit()\n\n> **submit**(`answers`): `Promise`\\<[`FormSubmissionOutcome`](../type-aliases/FormSubmissionOutcome.md)\\>\n\nSubmit answers. Signed-in respondents get at most one response; use editResponse afterwards.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `answers` | [`FormAnswer`](../type-aliases/FormAnswer.md)[] |\n\n#### Returns\n\n`Promise`\\<[`FormSubmissionOutcome`](../type-aliases/FormSubmissionOutcome.md)\\>\n\n***\n\n### tally()\n\n> **tally**(): `Promise`\\<[`FormQuestionTally`](../type-aliases/FormQuestionTally.md)[]\\>\n\nChoice and checkbox counts, available to viewers when tally visibility is enabled.\n\n#### Returns\n\n`Promise`\\<[`FormQuestionTally`](../type-aliases/FormQuestionTally.md)[]\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`FormDetail`](../../../../../generated/storage/types.gen/type-aliases/FormDetail.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`FormDetail`](../../../../../generated/storage/types.gen/type-aliases/FormDetail.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`FormDetail`](../../../../../generated/storage/types.gen/type-aliases/FormDetail.md) |\n| `id` | `string` |\n\n#### Inherited from\n\n[`MacroEntity`](../../../entity/classes/MacroEntity.md).[`toJSON`](../../../entity/classes/MacroEntity.md#tojson)\n\n***\n\n### update()\n\n> **update**(`updates`): `Promise`\\<`Form`\\>\n\nUpdate presentation or owner-controlled settings; null explicitly clears the closing time.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `updates` | [`UpdateForm`](../../../../../generated/storage/types.gen/type-aliases/UpdateForm.md) |\n\n#### Returns\n\n`Promise`\\<`Form`\\>\n\n***\n\n### updateSharePermissions()\n\n> **updateSharePermissions**(`request`): `Promise`\\<[`SharePermissionV2`](../../../../../generated/storage/types.gen/type-aliases/SharePermissionV2.md)\\>\n\nUpdate grants. Public responding is controlled by audience, not link sharing.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `request` | [`UpdateSharePermissionRequestV2`](../../../../../generated/storage/types.gen/type-aliases/UpdateSharePermissionRequestV2.md) |\n\n#### Returns\n\n`Promise`\\<[`SharePermissionV2`](../../../../../generated/storage/types.gen/type-aliases/SharePermissionV2.md)\\>\n\n***\n\n### webUrl()\n\n> **webUrl**(): `string`\n\nOpen the form's builder in Macro.\n\n#### Returns\n\n`string`\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `id`): `Form`\n\nA form handle with details loaded on demand.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`Form`\n\n***\n\n### create()\n\n> `static` **create**(`client`, `options`): `Promise`\\<`Form`\\>\n\nCreate a form, optionally over a table of a database the caller owns.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `options` | \\{ `name`: `string`; `table?`: [`DatabaseTable`](../../../databases/table/classes/DatabaseTable.md); \\} |\n| `options.name` | `string` |\n| `options.table?` | [`DatabaseTable`](../../../databases/table/classes/DatabaseTable.md) |\n\n#### Returns\n\n`Promise`\\<`Form`\\>\n\n***\n\n### list()\n\n> `static` **list**(`client`, `database?`): `Promise`\\<`Form`[]\\>\n\nForms shared with the caller, or live forms over a specified database.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `database?` | [`Database`](../../../databases/database/classes/Database.md) |\n\n#### Returns\n\n`Promise`\\<`Form`[]\\>\n\n\n<!-- src/entities/forms/form/classes/FormReference.md -->\n# Class: FormReference\n\nA typed reference read from a form answer, without fetching the referenced entity.\n\n## Implements\n\n- [`FormEntityHandle`](../interfaces/FormEntityHandle.md)\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-entitytype\"></a> `entityType` | `readonly` | [`EntityKind`](../../../../../generated/storage/types.gen/type-aliases/EntityKind.md) | The referenced entity's kind. |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` | The referenced entity's identifier. |\n\n## Methods\n\n### byId()\n\n> `static` **byId**(`entityType`, `id`): `FormReference`\n\nConstruct a reference when its kind and identifier are known.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `entityType` | [`EntityKind`](../../../../../generated/storage/types.gen/type-aliases/EntityKind.md) |\n| `id` | `string` |\n\n#### Returns\n\n`FormReference`\n\n\n<!-- src/entities/forms/form/interfaces/FormEntityHandle.md -->\n# Interface: FormEntityHandle\n\nAn entity handle used in a reference answer or rule.\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` | The entity's identifier. |\n\n\n<!-- src/entities/forms/form/type-aliases/FormAnswer.md -->\n# Type Alias: FormAnswer\n\n> **FormAnswer** = \\{ `question`: [`FormQuestion`](../../question/classes/FormQuestion.md); `value`: [`FormAnswerValue`](FormAnswerValue.md); \\}\n\nOne question and its answer.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-question\"></a> `question` | [`FormQuestion`](../../question/classes/FormQuestion.md) |\n| <a id=\"property-value\"></a> `value` | [`FormAnswerValue`](FormAnswerValue.md) |\n\n\n<!-- src/entities/forms/form/type-aliases/FormAnswerValue.md -->\n# Type Alias: FormAnswerValue\n\n> **FormAnswerValue** = `Exclude`\\<[`CellValue`](../../../../../generated/storage/types.gen/type-aliases/CellValue.md), \\{ `type`: `\"rows\"` \\| `\"options\"` \\| `\"entities\"`; \\}\\> \\| \\{ `type`: `\"rows\"`; `value`: [`DatabaseRow`](../../../databases/row/classes/DatabaseRow.md)[]; \\} \\| \\{ `type`: `\"options\"`; `value`: [`FormOption`](../../question/classes/FormOption.md)[]; \\} \\| \\{ `type`: `\"entities\"`; `value`: \\{ `entity`: [`FormEntityHandle`](../interfaces/FormEntityHandle.md); `entityType`: [`EntityKind`](../../../../../generated/storage/types.gen/type-aliases/EntityKind.md); \\}[]; \\}\n\nAn answer value; references use handles, and scalar values keep their cell representation.\n\n\n<!-- src/entities/forms/form/type-aliases/FormBookingStep.md -->\n# Type Alias: FormBookingStep\n\n> **FormBookingStep** = `Omit`\\<[`UnlockedBooking`](../../../../../generated/storage/types.gen/type-aliases/UnlockedBooking.md), `\"section\"`\\> & \\{ `section`: [`FormSection`](../../section/classes/FormSection.md); \\}\n\nA booking step released after the form accepts the caller's answers.\n\n## Type Declaration\n\n| Name | Type |\n| ------ | ------ |\n| `section` | [`FormSection`](../../section/classes/FormSection.md) |\n\n\n<!-- src/entities/forms/form/type-aliases/FormBookingTarget.md -->\n# Type Alias: FormBookingTarget\n\n> **FormBookingTarget** = [`BookingTarget`](../../../../../generated/storage/types.gen/type-aliases/BookingTarget.md)\n\nThe public Macro booking destination selected by a form editor.\n\n\n<!-- src/entities/forms/form/type-aliases/FormLayoutResult.md -->\n# Type Alias: FormLayoutResult\n\n> **FormLayoutResult** = \\{ `form`: [`Form`](../classes/Form.md); `publicationError?`: [`FormPublicationProblem`](../../../../../generated/storage/types.gen/type-aliases/FormPublicationProblem.md); \\}\n\nA saved layout and any reason it is not yet visible to respondents.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-form\"></a> `form` | [`Form`](../classes/Form.md) |\n| <a id=\"property-publicationerror\"></a> `publicationError?` | [`FormPublicationProblem`](../../../../../generated/storage/types.gen/type-aliases/FormPublicationProblem.md) |\n\n\n<!-- src/entities/forms/form/type-aliases/FormQuestionPlacement.md -->\n# Type Alias: FormQuestionPlacement\n\n> **FormQuestionPlacement** = \\{ `column`: [`DatabaseColumn`](../../../databases/column/classes/DatabaseColumn.md); `helpText?`: `string`; `question?`: [`FormQuestion`](../../question/classes/FormQuestion.md); `required?`: `boolean`; `widget?`: [`Widget`](../../../../../generated/storage/types.gen/type-aliases/Widget.md); \\}\n\nA question placement in a layout replacement. Omit question to mint a new stable question.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-column\"></a> `column` | [`DatabaseColumn`](../../../databases/column/classes/DatabaseColumn.md) |\n| <a id=\"property-helptext\"></a> `helpText?` | `string` |\n| <a id=\"property-question\"></a> `question?` | [`FormQuestion`](../../question/classes/FormQuestion.md) |\n| <a id=\"property-required\"></a> `required?` | `boolean` |\n| <a id=\"property-widget\"></a> `widget?` | [`Widget`](../../../../../generated/storage/types.gen/type-aliases/Widget.md) |\n\n\n<!-- src/entities/forms/form/type-aliases/FormQuestionTally.md -->\n# Type Alias: FormQuestionTally\n\n> **FormQuestionTally** = \\{ `buckets`: \\{ `count`: `number`; `value`: \\{ `kind`: `\"option\"`; `option`: [`FormOption`](../../question/classes/FormOption.md); \\} \\| \\{ `checked`: `boolean`; `kind`: `\"checkbox\"`; \\}; \\}[]; `question`: [`FormQuestion`](../../question/classes/FormQuestion.md); `responses`: `number`; \\}\n\nA question's public tally. Options with no votes are retained.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-buckets\"></a> `buckets` | \\{ `count`: `number`; `value`: \\{ `kind`: `\"option\"`; `option`: [`FormOption`](../../question/classes/FormOption.md); \\} \\| \\{ `checked`: `boolean`; `kind`: `\"checkbox\"`; \\}; \\}[] |\n| <a id=\"property-question\"></a> `question` | [`FormQuestion`](../../question/classes/FormQuestion.md) |\n| <a id=\"property-responses\"></a> `responses` | `number` |\n\n\n<!-- src/entities/forms/form/type-aliases/FormResponseSummary.md -->\n# Type Alias: FormResponseSummary\n\n> **FormResponseSummary** = \\{ `rows`: `number`; `stopped`: `number`; `stoppedBySection`: \\{ `count`: `number`; `section`: [`FormSection`](../../section/classes/FormSection.md); \\}[]; `submitted`: `number`; \\}\n\nCounts from the response ledger and its linked table.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-rows\"></a> `rows` | `number` |\n| <a id=\"property-stopped\"></a> `stopped` | `number` |\n| <a id=\"property-stoppedbysection\"></a> `stoppedBySection` | \\{ `count`: `number`; `section`: [`FormSection`](../../section/classes/FormSection.md); \\}[] |\n| <a id=\"property-submitted\"></a> `submitted` | `number` |\n\n\n<!-- src/entities/forms/form/type-aliases/FormRuleTest.md -->\n# Type Alias: FormRuleTest\n\n> **FormRuleTest** = `Exclude`\\<[`FilterTest`](../../../../../generated/storage/types.gen/type-aliases/FilterTest.md), \\{ `kind`: `\"options\"` \\| `\"entities\"`; \\}\\> \\| \\{ `kind`: `\"options\"`; `operator`: `Extract`\\<[`FilterTest`](../../../../../generated/storage/types.gen/type-aliases/FilterTest.md), \\{ `kind`: `\"options\"`; \\}\\>\\[`\"operator\"`\\]; `options`: [`FormOption`](../../question/classes/FormOption.md)[]; \\} \\| \\{ `entities`: [`FormEntityHandle`](../interfaces/FormEntityHandle.md)[]; `kind`: `\"entities\"`; `operator`: `Extract`\\<[`FilterTest`](../../../../../generated/storage/types.gen/type-aliases/FilterTest.md), \\{ `kind`: `\"entities\"`; \\}\\>\\[`\"operator\"`\\]; \\}\n\nA form rule, with option and entity references represented by handles.\n\n\n<!-- src/entities/forms/form/type-aliases/FormRules.md -->\n# Type Alias: FormRules\n\n> **FormRules** = \\{ `conditions`: (\\{ `column`: [`DatabaseColumn`](../../../databases/column/classes/DatabaseColumn.md); `kind`: `\"condition\"`; `test`: [`FormRuleTest`](FormRuleTest.md); \\} \\| \\{ `kind`: `\"group\"`; \\} & `FormRules`)[]; `conjunction`: [`FilterGroup`](../../../../../generated/storage/types.gen/type-aliases/FilterGroup.md)\\[`\"conjunction\"`\\]; \\}\n\nConditions over columns asked in earlier sections.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-conditions\"></a> `conditions` | (\\{ `column`: [`DatabaseColumn`](../../../databases/column/classes/DatabaseColumn.md); `kind`: `\"condition\"`; `test`: [`FormRuleTest`](FormRuleTest.md); \\} \\| \\{ `kind`: `\"group\"`; \\} & `FormRules`)[] |\n| <a id=\"property-conjunction\"></a> `conjunction` | [`FilterGroup`](../../../../../generated/storage/types.gen/type-aliases/FilterGroup.md)\\[`\"conjunction\"`\\] |\n\n\n<!-- src/entities/forms/form/type-aliases/FormSectionPlacement.md -->\n# Type Alias: FormSectionPlacement\n\n> **FormSectionPlacement** = \\{ `description?`: `string`; `section?`: [`FormSection`](../../section/classes/FormSection.md); `title`: `string`; \\} & \\{ `kind`: `\"questions\"`; `questions`: [`FormQuestionPlacement`](FormQuestionPlacement.md)[]; \\} \\| \\{ `kind`: `\"gate\"`; `message`: `string`; `rules`: [`FormRules`](FormRules.md); \\} \\| \\{ `kind`: `\"booking\"`; `target`: [`BookingTarget`](../../../../../generated/storage/types.gen/type-aliases/BookingTarget.md); \\}\n\nA section in a layout replacement. Omit section to mint a new stable section.\n\n## Type Declaration\n\n| Name | Type |\n| ------ | ------ |\n| `description?` | `string` |\n| `section?` | [`FormSection`](../../section/classes/FormSection.md) |\n| `title` | `string` |\n\n\n<!-- src/entities/forms/form/type-aliases/FormSubmissionOutcome.md -->\n# Type Alias: FormSubmissionOutcome\n\n> **FormSubmissionOutcome** = \\{ `booking?`: [`FormBookingStep`](FormBookingStep.md); `outcome`: `\"submitted\"`; `response`: [`FormResponse`](../../response/classes/FormResponse.md); `row`: [`DatabaseRow`](../../../databases/row/classes/DatabaseRow.md); \\} \\| \\{ `message`: `string`; `outcome`: `\"stopped\"`; `section`: [`FormSection`](../../section/classes/FormSection.md); \\}\n\nThe result of submitting or editing a response. A stopped submission has no row.\n\n\n<!-- src/entities/forms/form/type-aliases/MyFormResponse.md -->\n# Type Alias: MyFormResponse\n\n> **MyFormResponse** = \\{ `answers`: [`FormAnswer`](FormAnswer.md)[]; `booking?`: [`FormBookingStep`](FormBookingStep.md); `response`: [`FormResponse`](../../response/classes/FormResponse.md); `row?`: [`DatabaseRow`](../../../databases/row/classes/DatabaseRow.md); `status`: [`ResponseStatus`](../../../../../generated/storage/types.gen/type-aliases/ResponseStatus.md); `stoppedAtSection?`: [`FormSection`](../../section/classes/FormSection.md); `submittedAt`: `string`; `updatedAt`: `string`; \\}\n\nThe caller's receipt and current answers, read without access to other responses.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-answers\"></a> `answers` | [`FormAnswer`](FormAnswer.md)[] |\n| <a id=\"property-booking\"></a> `booking?` | [`FormBookingStep`](FormBookingStep.md) |\n| <a id=\"property-response\"></a> `response` | [`FormResponse`](../../response/classes/FormResponse.md) |\n| <a id=\"property-row\"></a> `row?` | [`DatabaseRow`](../../../databases/row/classes/DatabaseRow.md) |\n| <a id=\"property-status\"></a> `status` | [`ResponseStatus`](../../../../../generated/storage/types.gen/type-aliases/ResponseStatus.md) |\n| <a id=\"property-stoppedatsection\"></a> `stoppedAtSection?` | [`FormSection`](../../section/classes/FormSection.md) |\n| <a id=\"property-submittedat\"></a> `submittedAt` | `string` |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `string` |\n\n\n<!-- src/entities/forms/namespace/classes/FormNamespace.md -->\n# Class: FormNamespace\n\nForms collect answers into a database table without granting respondents table access.\n\n## Constructors\n\n### Constructor\n\n> **new FormNamespace**(`client`): `FormNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`FormNamespace`\n\n## Methods\n\n### byId()\n\n> **byId**(`id`): [`Form`](../../form/classes/Form.md)\n\nA form handle. Details load on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`Form`](../../form/classes/Form.md)\n\n***\n\n### create()\n\n> **create**(`options`): `Promise`\\<[`Form`](../../form/classes/Form.md)\\>\n\nCreate a form over an existing table, or create its own Responses database.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | \\{ `name`: `string`; `table?`: [`DatabaseTable`](../../../databases/table/classes/DatabaseTable.md); \\} |\n| `options.name` | `string` |\n| `options.table?` | [`DatabaseTable`](../../../databases/table/classes/DatabaseTable.md) |\n\n#### Returns\n\n`Promise`\\<[`Form`](../../form/classes/Form.md)\\>\n\n***\n\n### list()\n\n> **list**(`database?`): `Promise`\\<[`Form`](../../form/classes/Form.md)[]\\>\n\nList forms shared with the caller, or forms over a database the caller can read.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `database?` | [`Database`](../../../databases/database/classes/Database.md) |\n\n#### Returns\n\n`Promise`\\<[`Form`](../../form/classes/Form.md)[]\\>\n\n\n<!-- src/entities/forms/question/classes/FormOption.md -->\n# Class: FormOption\n\nA choice of one form question, resolved through that question's current options.\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` | The backing database option's identifier. |\n| <a id=\"property-question\"></a> `question` | `readonly` | [`FormQuestion`](FormQuestion.md) | The question offering this choice. |\n\n## Methods\n\n### color()\n\n> **color**(): `Promise`\\<`string` \\| `undefined`\\>\n\nThe choice's color, when one is set.\n\n#### Returns\n\n`Promise`\\<`string` \\| `undefined`\\>\n\n***\n\n### detail()\n\n> **detail**(): `Promise`\\<[`QuestionOption`](../../../../../generated/storage/types.gen/type-aliases/QuestionOption.md)\\>\n\nThe choice's label and color.\n\n#### Returns\n\n`Promise`\\<[`QuestionOption`](../../../../../generated/storage/types.gen/type-aliases/QuestionOption.md)\\>\n\n***\n\n### label()\n\n> **label**(): `Promise`\\<`string`\\>\n\nThe choice's label.\n\n#### Returns\n\n`Promise`\\<`string`\\>\n\n***\n\n### byId()\n\n> `static` **byId**(`question`, `id`): `FormOption`\n\nA handle to a known choice of a question.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `question` | [`FormQuestion`](FormQuestion.md) |\n| `id` | `string` |\n\n#### Returns\n\n`FormOption`\n\n\n<!-- src/entities/forms/question/classes/FormQuestion.md -->\n# Class: FormQuestion\n\nOne question, backed by a column. Its details never require reading the response table.\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-form\"></a> `form` | `readonly` | [`Form`](../../form/classes/Form.md) | The form that asks this question. |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` | The question's stable identifier within its form layout. |\n\n## Methods\n\n### column()\n\n> **column**(): `Promise`\\<[`DatabaseColumn`](../../../databases/column/classes/DatabaseColumn.md)\\>\n\nThe column behind the question. Reading the column itself needs database access.\n\n#### Returns\n\n`Promise`\\<[`DatabaseColumn`](../../../databases/column/classes/DatabaseColumn.md)\\>\n\n***\n\n### detail()\n\n> **detail**(): `Promise`\\<[`FormQuestionDetail`](../../../../../generated/storage/types.gen/type-aliases/FormQuestionDetail.md)\\>\n\nThe question's current presentation and column facts.\n\n#### Returns\n\n`Promise`\\<[`FormQuestionDetail`](../../../../../generated/storage/types.gen/type-aliases/FormQuestionDetail.md)\\>\n\n***\n\n### options()\n\n> **options**(): `Promise`\\<[`FormOption`](FormOption.md)[]\\>\n\nCurrent choices, in display order.\n\n#### Returns\n\n`Promise`\\<[`FormOption`](FormOption.md)[]\\>\n\n***\n\n### title()\n\n> **title**(): `Promise`\\<`string`\\>\n\nThe question's current title (its column's name).\n\n#### Returns\n\n`Promise`\\<`string`\\>\n\n***\n\n### byId()\n\n> `static` **byId**(`form`, `id`): `FormQuestion`\n\nA question handle within a form.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `form` | [`Form`](../../form/classes/Form.md) |\n| `id` | `string` |\n\n#### Returns\n\n`FormQuestion`\n\n\n<!-- src/entities/forms/response/classes/FormResponse.md -->\n# Class: FormResponse\n\nA cached receipt for the caller's response; other respondents' receipts are private.\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-form\"></a> `form` | `readonly` | [`Form`](../../form/classes/Form.md) | The form that received this response. |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` | The response ledger entry's identifier. |\n\n## Methods\n\n### answers()\n\n> **answers**(): `Promise`\\<[`FormAnswer`](../../form/type-aliases/FormAnswer.md)[]\\>\n\nAnswers as submitted or last read. Refresh to include later changes to the row.\n\n#### Returns\n\n`Promise`\\<[`FormAnswer`](../../form/type-aliases/FormAnswer.md)[]\\>\n\n***\n\n### booking()\n\n> **booking**(): `Promise`\\<[`FormBookingStep`](../../form/type-aliases/FormBookingStep.md) \\| `undefined`\\>\n\nThe booking step unlocked by this saved response, if any.\n\n#### Returns\n\n`Promise`\\<[`FormBookingStep`](../../form/type-aliases/FormBookingStep.md) \\| `undefined`\\>\n\n***\n\n### refresh()\n\n> **refresh**(): `Promise`\\<`FormResponse`\\>\n\nReload the caller's current receipt; requires a signed-in respondent.\n\n#### Returns\n\n`Promise`\\<`FormResponse`\\>\n\n***\n\n### row()\n\n> **row**(): `Promise`\\<[`DatabaseRow`](../../../databases/row/classes/DatabaseRow.md) \\| `undefined`\\>\n\nThe receipt's row, if any. Reading that row requires database access.\n\n#### Returns\n\n`Promise`\\<[`DatabaseRow`](../../../databases/row/classes/DatabaseRow.md) \\| `undefined`\\>\n\n***\n\n### status()\n\n> **status**(): `Promise`\\<[`ResponseStatus`](../../../../../generated/storage/types.gen/type-aliases/ResponseStatus.md)\\>\n\nWhether this receipt was submitted or stopped by a gate.\n\n#### Returns\n\n`Promise`\\<[`ResponseStatus`](../../../../../generated/storage/types.gen/type-aliases/ResponseStatus.md)\\>\n\n***\n\n### byId()\n\n> `static` **byId**(`form`, `id`, `snapshot?`): `FormResponse`\n\nA response handle, optionally seeded with an already returned receipt.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `form` | [`Form`](../../form/classes/Form.md) |\n| `id` | `string` |\n| `snapshot?` | `ResponseSnapshot` |\n\n#### Returns\n\n`FormResponse`\n\n\n<!-- src/entities/forms/section/classes/FormSection.md -->\n# Class: FormSection\n\nAn ordered group of questions, or a gate between groups.\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-form\"></a> `form` | `readonly` | [`Form`](../../form/classes/Form.md) | The owning form. |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` | The section's stable identifier. |\n\n## Methods\n\n### detail()\n\n> **detail**(): `Promise`\\<[`FormSectionDetail`](../../../../../generated/storage/types.gen/type-aliases/FormSectionDetail.md)\\>\n\nThe section's current presentation.\n\n#### Returns\n\n`Promise`\\<[`FormSectionDetail`](../../../../../generated/storage/types.gen/type-aliases/FormSectionDetail.md)\\>\n\n***\n\n### questions()\n\n> **questions**(): `Promise`\\<[`FormQuestion`](../../question/classes/FormQuestion.md)[]\\>\n\nQuestions in display order; gates contain no questions.\n\n#### Returns\n\n`Promise`\\<[`FormQuestion`](../../question/classes/FormQuestion.md)[]\\>\n\n***\n\n### title()\n\n> **title**(): `Promise`\\<`string`\\>\n\nThe section heading.\n\n#### Returns\n\n`Promise`\\<`string`\\>\n\n***\n\n### byId()\n\n> `static` **byId**(`form`, `id`): `FormSection`\n\nA section handle within a form.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `form` | [`Form`](../../form/classes/Form.md) |\n| `id` | `string` |\n\n#### Returns\n\n`FormSection`\n"
+ "documentation": "# Macro SDK: forms\n\nGenerated by TypeDoc. Paths below refer to the canonical Markdown hierarchy. Other entity handles are documented in their named section; request core for shared SDK helpers.\n\n<!-- generated/storage/types.gen/type-aliases/AccessLevel.md -->\n# Type Alias: AccessLevel\n\n> **AccessLevel** = `\"view\"` \\| `\"comment\"` \\| `\"edit\"` \\| `\"owner\"`\n\nOrdered from least to most access top -> bottom\n\n\n<!-- generated/storage/types.gen/type-aliases/Audience.md -->\n# Type Alias: Audience\n\n> **Audience** = `\"members\"` \\| `\"public\"`\n\nWho may respond to a form.\n\n\n<!-- generated/storage/types.gen/type-aliases/BookingTarget.md -->\n# Type Alias: BookingTarget\n\n> **BookingTarget** = \\{ `eventTypeId`: `string`; `profileId`: `string`; \\}\n\nAn existing native Macro scheduling event offered after an accepted response.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-eventtypeid\"></a> `eventTypeId` | `string` | The event type to book. |\n| <a id=\"property-profileid\"></a> `profileId` | `string` | The scheduling profile that owns the event. |\n\n\n<!-- generated/storage/types.gen/type-aliases/CellValue.md -->\n# Type Alias: CellValue\n\n> **CellValue** = \\{ `type`: `\"text\"`; `value`: `string`; \\} \\| \\{ `type`: `\"number\"`; `value`: `number`; \\} \\| \\{ `type`: `\"boolean\"`; `value`: `boolean`; \\} \\| \\{ `type`: `\"date\"`; `value`: `string`; \\} \\| \\{ `type`: `\"link\"`; `value`: `string`[]; \\} \\| \\{ `type`: `\"options\"`; `value`: [`OptionRef`](OptionRef.md)[]; \\} \\| \\{ `type`: `\"entities\"`; `value`: [`EntityRef`](EntityRef.md)[]; \\} \\| \\{ `type`: `\"rows\"`; `value`: `string`[]; \\} \\| \\{ `type`: `\"clear\"`; \\}\n\nA cell's value. It must fit the column's type: text for a text column,\noptions of the column for a select, and so on.\n\n## Union Members\n\n### Type Literal\n\n\\{ `type`: `\"text\"`; `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"text\"` | - |\n| `value` | `string` | Free text. |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"number\"`; `value`: `number`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"number\"` | - |\n| `value` | `number` | A finite number. |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"boolean\"`; `value`: `boolean`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"boolean\"` | - |\n| `value` | `boolean` | A checkbox. |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"date\"`; `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"date\"` | - |\n| `value` | `string` | A date-time. |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"link\"`; `value`: `string`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"link\"` | - |\n| `value` | `string`[] | Complete http or https URLs; at most one for a single-valued column. |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"options\"`; `value`: [`OptionRef`](OptionRef.md)[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"options\"` | - |\n| `value` | [`OptionRef`](OptionRef.md)[] | Options of a select or tag column; at most one for a single-valued column. |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"entities\"`; `value`: [`EntityRef`](EntityRef.md)[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"entities\"` | - |\n| `value` | [`EntityRef`](EntityRef.md)[] | References to Macro entities of the kind the column points at; at most one for a single-valued column. |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"rows\"`; `value`: `string`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `type` | `\"rows\"` | - |\n| `value` | `string`[] | Rows of the table a relation column points at. |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"clear\"`; \\}\n\n\n<!-- generated/storage/types.gen/type-aliases/ChannelSharePermission.md -->\n# Type Alias: ChannelSharePermission\n\n> **ChannelSharePermission** = \\{ `access_level`: [`AccessLevel`](AccessLevel.md); `channel_id`: `string`; \\}\n\nThe channel share permission\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-access_level\"></a> `access_level` | [`AccessLevel`](AccessLevel.md) | The access level for the channel |\n| <a id=\"property-channel_id\"></a> `channel_id` | `string` | The channel id |\n\n\n<!-- generated/storage/types.gen/type-aliases/ColumnKind.md -->\n# Type Alias: ColumnKind\n\n> **ColumnKind** = \\{ `type`: `\"text\"`; \\} \\| \\{ `type`: `\"number\"`; \\} \\| \\{ `type`: `\"boolean\"`; \\} \\| \\{ `type`: `\"date\"`; \\} \\| \\{ `type`: `\"link\"`; \\} \\| \\{ `multi`: `boolean`; `type`: `\"select\"`; \\} \\| \\{ `multi`: `boolean`; `type`: `\"select_number\"`; \\} \\| \\{ `type`: `\"tag\"`; \\} \\| \\{ `multi`: `boolean`; `target`: [`EntityKind`](EntityKind.md); `type`: `\"entity\"`; \\} \\| \\{ `database`: `string`; `table`: `string`; `type`: `\"relation\"`; \\}\n\nA type a column can have.\n\n## Union Members\n\n### Type Literal\n\n\\{ `type`: `\"text\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"number\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"boolean\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"date\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"link\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `multi`: `boolean`; `type`: `\"select\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `multi` | `boolean` | Whether a cell holds several options. |\n| `type` | `\"select\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `multi`: `boolean`; `type`: `\"select_number\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `multi` | `boolean` | Whether a cell holds several options. |\n| `type` | `\"select_number\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `type`: `\"tag\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `multi`: `boolean`; `target`: [`EntityKind`](EntityKind.md); `type`: `\"entity\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `multi` | `boolean` | Whether a cell holds several references. |\n| `target` | [`EntityKind`](EntityKind.md) | What the references point at. |\n| `type` | `\"entity\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `database`: `string`; `table`: `string`; `type`: `\"relation\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `database` | `string` | The database of the related table. |\n| `table` | `string` | The related table. |\n| `type` | `\"relation\"` | - |\n\n\n<!-- generated/storage/types.gen/type-aliases/Conjunction.md -->\n# Type Alias: Conjunction\n\n> **Conjunction** = `\"and\"` \\| `\"or\"`\n\nHow a group's conditions combine.\n\n\n<!-- generated/storage/types.gen/type-aliases/DateOperator.md -->\n# Type Alias: DateOperator\n\n> **DateOperator** = `\"before\"` \\| `\"after\"` \\| `\"onOrBefore\"` \\| `\"onOrAfter\"`\n\nHow a date cell compares to a date-time.\n\n\n<!-- generated/storage/types.gen/type-aliases/EntityKind.md -->\n# Type Alias: EntityKind\n\n> **EntityKind** = `\"USER\"` \\| `\"DOCUMENT\"` \\| `\"TASK\"` \\| `\"COMPANY\"` \\| `\"CONTACT\"` \\| `\"CALL_RECORD\"` \\| `\"CHANNEL\"` \\| `\"CHAT\"` \\| `\"PROJECT\"` \\| `\"THREAD\"` \\| `\"CALENDAR_EVENT\"` \\| `\"INITIATIVE\"`\n\nA kind of Macro entity a reference column can point at.\n\n\n<!-- generated/storage/types.gen/type-aliases/EntityRef.md -->\n# Type Alias: EntityRef\n\n> **EntityRef** = \\{ `entityId`: `string`; `entityType`: [`EntityKind`](EntityKind.md); \\}\n\nA reference to one Macro entity.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-entityid\"></a> `entityId` | `string` | The entity's id. |\n| <a id=\"property-entitytype\"></a> `entityType` | [`EntityKind`](EntityKind.md) | What kind of entity it is; it must be the kind the column points at. |\n\n\n<!-- generated/storage/types.gen/type-aliases/FilterCondition.md -->\n# Type Alias: FilterCondition\n\n> **FilterCondition** = \\{ `column`: `string`; `test`: [`FilterTest`](FilterTest.md); \\}\n\nA test of one column's cells.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-column\"></a> `column` | `string` | The column tested. |\n| <a id=\"property-test\"></a> `test` | [`FilterTest`](FilterTest.md) | What its cell must be. The test's kind must fit the column's type. |\n\n\n<!-- generated/storage/types.gen/type-aliases/FilterGroup.md -->\n# Type Alias: FilterGroup\n\n> **FilterGroup** = \\{ `conditions`: [`FilterNode`](FilterNode.md)[]; `conjunction`: [`Conjunction`](Conjunction.md); \\}\n\nConditions joined by one conjunction.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-conditions\"></a> `conditions` | [`FilterNode`](FilterNode.md)[] | The conditions and nested groups. A group without any keeps every row. |\n| <a id=\"property-conjunction\"></a> `conjunction` | [`Conjunction`](Conjunction.md) | Whether every condition must hold, or any one. |\n\n\n<!-- generated/storage/types.gen/type-aliases/FilterNode.md -->\n# Type Alias: FilterNode\n\n> **FilterNode** = [`FilterCondition`](FilterCondition.md) & \\{ `kind`: `\"condition\"`; \\} \\| [`FilterGroup`](FilterGroup.md) & \\{ `kind`: `\"group\"`; \\}\n\nOne entry of a group: a condition, or a group of its own.\n\n\n<!-- generated/storage/types.gen/type-aliases/FilterTest.md -->\n# Type Alias: FilterTest\n\n> **FilterTest** = \\{ `kind`: `\"presence\"`; `operator`: [`PresenceOperator`](PresenceOperator.md); \\} \\| \\{ `kind`: `\"text\"`; `operator`: [`TextOperator`](TextOperator.md); `value`: `string`; \\} \\| \\{ `kind`: `\"number\"`; `operator`: [`NumberOperator`](NumberOperator.md); `value`: `number`; \\} \\| \\{ `kind`: `\"date\"`; `operator`: [`DateOperator`](DateOperator.md); `value`: `string`; \\} \\| \\{ `checked`: `boolean`; `kind`: `\"checkbox\"`; \\} \\| \\{ `kind`: `\"options\"`; `operator`: [`SetOperator`](SetOperator.md); `options`: `string`[]; \\} \\| \\{ `entities`: `string`[]; `kind`: `\"entities\"`; `operator`: [`SetOperator`](SetOperator.md); \\}\n\nWhat a column's cell must be, by the kind of value the column holds.\n\n## Union Members\n\n### Type Literal\n\n\\{ `kind`: `\"presence\"`; `operator`: [`PresenceOperator`](PresenceOperator.md); \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"presence\"` | - |\n| `operator` | [`PresenceOperator`](PresenceOperator.md) | Empty, or not. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"text\"`; `operator`: [`TextOperator`](TextOperator.md); `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"text\"` | - |\n| `operator` | [`TextOperator`](TextOperator.md) | How the cell compares. |\n| `value` | `string` | The text compared against, ignoring case for the containment tests. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"number\"`; `operator`: [`NumberOperator`](NumberOperator.md); `value`: `number`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"number\"` | - |\n| `operator` | [`NumberOperator`](NumberOperator.md) | How the cell compares. |\n| `value` | `number` | The number compared against; finite. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"date\"`; `operator`: [`DateOperator`](DateOperator.md); `value`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"date\"` | - |\n| `operator` | [`DateOperator`](DateOperator.md) | How the cell compares. |\n| `value` | `string` | The date-time compared against. |\n\n***\n\n### Type Literal\n\n\\{ `checked`: `boolean`; `kind`: `\"checkbox\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `checked` | `boolean` | Whether the box is checked. |\n| `kind` | `\"checkbox\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"options\"`; `operator`: [`SetOperator`](SetOperator.md); `options`: `string`[]; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"options\"` | - |\n| `operator` | [`SetOperator`](SetOperator.md) | How the cell's options relate to these. |\n| `options` | `string`[] | Options of the column; at least one. |\n\n***\n\n### Type Literal\n\n\\{ `entities`: `string`[]; `kind`: `\"entities\"`; `operator`: [`SetOperator`](SetOperator.md); \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `entities` | `string`[] | Entity ids, or for a relation the related rows' ids; at least one. |\n| `kind` | `\"entities\"` | - |\n| `operator` | [`SetOperator`](SetOperator.md) | How the cell's references relate to these. |\n\n\n<!-- generated/storage/types.gen/type-aliases/Form.md -->\n# Type Alias: Form\n\n> **Form** = \\{ `audience`: [`Audience`](Audience.md); `closesAt`: `string` \\| `null`; `confirmationMessage`: `string`; `createdAt`: `string`; `databaseId`: `string`; `description`: `string`; `id`: `string`; `isHiddenInDrive`: `boolean`; `name`: `string`; `ownerId`: `string`; `respondentColumnId`: `string` \\| `null`; `status`: [`FormStatus`](FormStatus.md); `submittedColumnId`: `string` \\| `null`; `tableId`: `string`; `tallyVisible`: `boolean`; `updatedAt`: `string`; \\}\n\nA form: a view of one database table whose rows are its responses.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-audience\"></a> `audience` | [`Audience`](Audience.md) | Who may respond. |\n| <a id=\"property-closesat\"></a> `closesAt` | `string` \\| `null` | When it stops taking responses, if it does. |\n| <a id=\"property-confirmationmessage\"></a> `confirmationMessage` | `string` | What a respondent reads once their response is saved; empty for the default. |\n| <a id=\"property-createdat\"></a> `createdAt` | `string` | When it was created. |\n| <a id=\"property-databaseid\"></a> `databaseId` | `string` | The database holding its responses. |\n| <a id=\"property-description\"></a> `description` | `string` | What respondents read under the name. |\n| <a id=\"property-id\"></a> `id` | `string` | The form. |\n| <a id=\"property-ishiddenindrive\"></a> `isHiddenInDrive` | `boolean` | Whether Drive leaves it, and the database behind it, out of its listings, as for a channel poll. |\n| <a id=\"property-name\"></a> `name` | `string` | Its display name. A standalone form follows the database it created; a form attached to an existing table has its own name. |\n| <a id=\"property-ownerid\"></a> `ownerId` | `string` | Its owner. |\n| <a id=\"property-respondentcolumnid\"></a> `respondentColumnId` | `string` \\| `null` | The person column each signed-in submission names its respondent in; `null` once deleted. |\n| <a id=\"property-status\"></a> `status` | [`FormStatus`](FormStatus.md) | Whether its owner closed it. |\n| <a id=\"property-submittedcolumnid\"></a> `submittedColumnId` | `string` \\| `null` | The date column each submission stamps; `null` once deleted. |\n| <a id=\"property-tableid\"></a> `tableId` | `string` | The table whose rows are its responses. |\n| <a id=\"property-tallyvisible\"></a> `tallyVisible` | `boolean` | Whether respondents may read option tallies. |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `string` | When its facts or layout last changed. |\n\n\n<!-- generated/storage/types.gen/type-aliases/FormAccess.md -->\n# Type Alias: FormAccess\n\n> **FormAccess** = `\"view\"` \\| `\"edit\"` \\| `\"owner\"`\n\nThe caller's level on a form: view responds, edit changes questions and\nreads responses, owner also sets the audience, closes and trashes it.\n\n\n<!-- generated/storage/types.gen/type-aliases/FormDetail.md -->\n# Type Alias: FormDetail\n\n> **FormDetail** = \\{ `access`: [`FormAccess`](FormAccess.md); `form`: [`Form`](Form.md); `sections`: [`FormSectionDetail`](FormSectionDetail.md)[]; `tableGone`: `boolean`; \\}\n\nA form with its layout, as the caller may see it.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-access\"></a> `access` | [`FormAccess`](FormAccess.md) | The caller's level on it. |\n| <a id=\"property-form\"></a> `form` | [`Form`](Form.md) | The form's facts. |\n| <a id=\"property-sections\"></a> `sections` | [`FormSectionDetail`](FormSectionDetail.md)[] | Its sections, in order. |\n| <a id=\"property-tablegone\"></a> `tableGone` | `boolean` | Whether its database is in the trash, so it has no table to show or write: its sections keep no questions and it takes no responses. |\n\n\n<!-- generated/storage/types.gen/type-aliases/FormPublicationProblem.md -->\n# Type Alias: FormPublicationProblem\n\n> **FormPublicationProblem** = \\{ `kind`: `\"invalidDraft\"`; \\} \\| \\{ `kind`: `\"layout\"`; `problem`: [`LayoutProblem`](LayoutProblem.md); \\} \\| \\{ `kind`: `\"widgetMismatch\"`; `question`: `string`; \\} \\| \\{ `kind`: `\"fileUploadNeedsSignIn\"`; \\} \\| \\{ `kind`: `\"pending\"`; \\}\n\nAn editor's saved draft is not yet the version respondents can use.\n\n## Union Members\n\n### Type Literal\n\n\\{ `kind`: `\"invalidDraft\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"layout\"`; `problem`: [`LayoutProblem`](LayoutProblem.md); \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"layout\"` | - |\n| `problem` | [`LayoutProblem`](LayoutProblem.md) | The invariant the editor needs to repair. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"widgetMismatch\"`; `question`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"widgetMismatch\"` | - |\n| `question` | `string` | The question to repair. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"fileUploadNeedsSignIn\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"pending\"`; \\}\n\n\n<!-- generated/storage/types.gen/type-aliases/FormQuestionDetail.md -->\n# Type Alias: FormQuestionDetail\n\n> **FormQuestionDetail** = \\{ `column`: `string`; `helpText`: `string`; `id`: `string`; `kind`: [`ColumnKind`](ColumnKind.md); `options`: [`QuestionOption`](QuestionOption.md)[]; `required`: `boolean`; `title`: `string`; `widget`: `null` \\| [`Widget`](Widget.md); \\}\n\nA question with its column's facts.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-column\"></a> `column` | `string` | The column it writes. |\n| <a id=\"property-helptext\"></a> `helpText` | `string` | What respondents read under the title. |\n| <a id=\"property-id\"></a> `id` | `string` | The question. |\n| <a id=\"property-kind\"></a> `kind` | [`ColumnKind`](ColumnKind.md) | The column's type. |\n| <a id=\"property-options\"></a> `options` | [`QuestionOption`](QuestionOption.md)[] | The column's options, in order, for a select or tag column. |\n| <a id=\"property-required\"></a> `required` | `boolean` | Whether a response must answer it. |\n| <a id=\"property-title\"></a> `title` | `string` | The column's name. |\n| <a id=\"property-widget\"></a> `widget` | `null` \\| [`Widget`](Widget.md) | - |\n\n\n<!-- generated/storage/types.gen/type-aliases/FormSectionDetail.md -->\n# Type Alias: FormSectionDetail\n\n> **FormSectionDetail** = \\{ `description`: `string`; `id`: `string`; `kind`: `\"questions\"`; `questions`: [`FormQuestionDetail`](FormQuestionDetail.md)[]; `title`: `string`; \\} \\| \\{ `description`: `string`; `id`: `string`; `kind`: `\"gate\"`; `message`: `string`; `rules`: [`FilterGroup`](FilterGroup.md); `title`: `string`; \\} \\| \\{ `description`: `string`; `id`: `string`; `kind`: `\"booking\"`; `target?`: [`BookingTarget`](BookingTarget.md); `title`: `string`; \\}\n\nOne section of a form as it reads.\n\n## Union Members\n\n### Type Literal\n\n\\{ `description`: `string`; `id`: `string`; `kind`: `\"questions\"`; `questions`: [`FormQuestionDetail`](FormQuestionDetail.md)[]; `title`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `description` | `string` | Its description. |\n| `id` | `string` | The section. |\n| `kind` | `\"questions\"` | - |\n| `questions` | [`FormQuestionDetail`](FormQuestionDetail.md)[] | Its questions, in order. |\n| `title` | `string` | Its title. |\n\n***\n\n### Type Literal\n\n\\{ `description`: `string`; `id`: `string`; `kind`: `\"gate\"`; `message`: `string`; `rules`: [`FilterGroup`](FilterGroup.md); `title`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `description` | `string` | Its description. |\n| `id` | `string` | The section. |\n| `kind` | `\"gate\"` | - |\n| `message` | `string` | What a stopped respondent reads. |\n| `rules` | [`FilterGroup`](FilterGroup.md) | The rules. |\n| `title` | `string` | Its title. |\n\n***\n\n### Type Literal\n\n\\{ `description`: `string`; `id`: `string`; `kind`: `\"booking\"`; `target?`: [`BookingTarget`](BookingTarget.md); `title`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `description` | `string` | Its description. |\n| `id` | `string` | The section. |\n| `kind` | `\"booking\"` | - |\n| `target?` | [`BookingTarget`](BookingTarget.md) | Editors can configure the destination; respondent layouts omit it. |\n| `title` | `string` | Its title. |\n\n\n<!-- generated/storage/types.gen/type-aliases/FormStatus.md -->\n# Type Alias: FormStatus\n\n> **FormStatus** = `\"open\"` \\| `\"closed\"`\n\nWhether a form takes responses, as its owner set it. A form also stops\ntaking them once its closing time passes.\n\n\n<!-- generated/storage/types.gen/type-aliases/LayoutProblem.md -->\n# Type Alias: LayoutProblem\n\n> **LayoutProblem** = \\{ `kind`: `\"bookingMustBeLast\"`; \\} \\| \\{ `column`: `string`; `kind`: `\"unknownColumn\"`; \\} \\| \\{ `column`: `string`; `kind`: `\"managedColumn\"`; \\} \\| \\{ `column`: `string`; `kind`: `\"repeatedColumn\"`; \\} \\| \\{ `id`: `string`; `kind`: `\"repeatedId\"`; \\} \\| \\{ `column`: `string`; `kind`: `\"gateNamesLaterColumn\"`; \\} \\| \\{ `kind`: `\"gateRule\"`; `reason`: `string`; \\} \\| \\{ `kind`: `\"textTooLong\"`; `max`: `number`; \\}\n\nWhy a layout does not fit the form's table.\n\n## Union Members\n\n### Type Literal\n\n\\{ `kind`: `\"bookingMustBeLast\"`; \\}\n\n***\n\n### Type Literal\n\n\\{ `column`: `string`; `kind`: `\"unknownColumn\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `column` | `string` | The column. |\n| `kind` | `\"unknownColumn\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `column`: `string`; `kind`: `\"managedColumn\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `column` | `string` | The column. |\n| `kind` | `\"managedColumn\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `column`: `string`; `kind`: `\"repeatedColumn\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `column` | `string` | The column. |\n| `kind` | `\"repeatedColumn\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `id`: `string`; `kind`: `\"repeatedId\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | The id. |\n| `kind` | `\"repeatedId\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `column`: `string`; `kind`: `\"gateNamesLaterColumn\"`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `column` | `string` | The column. |\n| `kind` | `\"gateNamesLaterColumn\"` | - |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"gateRule\"`; `reason`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"gateRule\"` | - |\n| `reason` | `string` | Why. |\n\n***\n\n### Type Literal\n\n\\{ `kind`: `\"textTooLong\"`; `max`: `number`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `kind` | `\"textTooLong\"` | - |\n| `max` | `number` | The longest allowed. |\n\n\n<!-- generated/storage/types.gen/type-aliases/LinkShare.md -->\n# Type Alias: LinkShare\n\n> **LinkShare** = `\"PUBLIC\"` \\| `\"TEAM\"`\n\nDefines who can access an item through its share link.\n\n\n<!-- generated/storage/types.gen/type-aliases/NumberOperator.md -->\n# Type Alias: NumberOperator\n\n> **NumberOperator** = `\"is\"` \\| `\"isNot\"` \\| `\"greaterThan\"` \\| `\"greaterThanOrEqual\"` \\| `\"lessThan\"` \\| `\"lessThanOrEqual\"`\n\nHow a number cell compares to a number.\n\n\n<!-- generated/storage/types.gen/type-aliases/OptionRef.md -->\n# Type Alias: OptionRef\n\n> **OptionRef** = \\{ `id`: `string`; \\} \\| \\{ `label`: `string`; \\}\n\nA select option, by its id or by its label.\n\n## Union Members\n\n### Type Literal\n\n\\{ `id`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `id` | `string` | An option the column has. |\n\n***\n\n### Type Literal\n\n\\{ `label`: `string`; \\}\n\n| Name | Type | Description |\n| ------ | ------ | ------ |\n| `label` | `string` | An option's label, matched without regard to case. An unknown label is refused. |\n\n\n<!-- generated/storage/types.gen/type-aliases/PresenceOperator.md -->\n# Type Alias: PresenceOperator\n\n> **PresenceOperator** = `\"isEmpty\"` \\| `\"isNotEmpty\"`\n\nWhether a cell is empty.\n\n\n<!-- generated/storage/types.gen/type-aliases/QuestionOption.md -->\n# Type Alias: QuestionOption\n\n> **QuestionOption** = \\{ `color`: `string` \\| `null`; `id`: `string`; `label`: `string`; \\}\n\nOne option of a question's column.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-color\"></a> `color` | `string` \\| `null` | Its colour, a hex string, if it has one. |\n| <a id=\"property-id\"></a> `id` | `string` | The option. |\n| <a id=\"property-label\"></a> `label` | `string` | Its label. |\n\n\n<!-- generated/storage/types.gen/type-aliases/ResponseStatus.md -->\n# Type Alias: ResponseStatus\n\n> **ResponseStatus** = `\"submitted\"` \\| `\"stopped\"`\n\nWhether a ledger entry is a saved response or a stop at a gate.\n\n\n<!-- generated/storage/types.gen/type-aliases/SetOperator.md -->\n# Type Alias: SetOperator\n\n> **SetOperator** = `\"isAnyOf\"` \\| `\"isNoneOf\"` \\| `\"hasAny\"` \\| `\"hasAll\"` \\| `\"hasNone\"`\n\nHow a cell's options or references relate to a set of them. The first\ntwo fit a column holding one value, the last three one holding several.\n\n\n<!-- generated/storage/types.gen/type-aliases/SharePermissionV2.md -->\n# Type Alias: SharePermissionV2\n\n> **SharePermissionV2** = \\{ `channelSharePermissions?`: [`ChannelSharePermission`](ChannelSharePermission.md)[] \\| `null`; `id`: `string`; `linkShare?`: `null` \\| [`LinkShare`](LinkShare.md); `linkShareAccessLevel?`: `null` \\| [`AccessLevel`](AccessLevel.md); `owner`: `string`; `teamShareAccessLevel?`: `null` \\| [`AccessLevel`](AccessLevel.md); \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-channelsharepermissions\"></a> `channelSharePermissions?` | [`ChannelSharePermission`](ChannelSharePermission.md)[] \\| `null` | The channel share permissions for the item |\n| <a id=\"property-id\"></a> `id` | `string` | The share permission id |\n| <a id=\"property-linkshare\"></a> `linkShare?` | `null` \\| [`LinkShare`](LinkShare.md) | - |\n| <a id=\"property-linkshareaccesslevel\"></a> `linkShareAccessLevel?` | `null` \\| [`AccessLevel`](AccessLevel.md) | - |\n| <a id=\"property-owner\"></a> `owner` | `string` | The owner of the item |\n| <a id=\"property-teamshareaccesslevel\"></a> `teamShareAccessLevel?` | `null` \\| [`AccessLevel`](AccessLevel.md) | - |\n\n\n<!-- generated/storage/types.gen/type-aliases/TextOperator.md -->\n# Type Alias: TextOperator\n\n> **TextOperator** = `\"is\"` \\| `\"isNot\"` \\| `\"contains\"` \\| `\"doesNotContain\"` \\| `\"startsWith\"` \\| `\"endsWith\"`\n\nHow a text cell compares to a text.\n\n\n<!-- generated/storage/types.gen/type-aliases/UnlockedBooking.md -->\n# Type Alias: UnlockedBooking\n\n> **UnlockedBooking** = \\{ `description`: `string`; `section`: `string`; `target`: [`BookingTarget`](BookingTarget.md); `title`: `string`; \\}\n\nA booking step a passing response has unlocked, with its destination.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-description\"></a> `description` | `string` | What respondents read before choosing a time. |\n| <a id=\"property-section\"></a> `section` | `string` | The booking section. |\n| <a id=\"property-target\"></a> `target` | [`BookingTarget`](BookingTarget.md) | The native booking event to open. |\n| <a id=\"property-title\"></a> `title` | `string` | Its title. |\n\n\n<!-- generated/storage/types.gen/type-aliases/UpdateChannelSharePermission.md -->\n# Type Alias: UpdateChannelSharePermission\n\n> **UpdateChannelSharePermission** = \\{ `accessLevel?`: `null` \\| [`AccessLevel`](AccessLevel.md); `channelId`: `string`; `operation`: [`UpdateOperation`](UpdateOperation.md); \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-accesslevel\"></a> `accessLevel?` | `null` \\| [`AccessLevel`](AccessLevel.md) | - |\n| <a id=\"property-channelid\"></a> `channelId` | `string` | The channel id |\n| <a id=\"property-operation\"></a> `operation` | [`UpdateOperation`](UpdateOperation.md) | The type of operation to be performed on the chanel share permission You can add, remove or replace and existing permission |\n\n\n<!-- generated/storage/types.gen/type-aliases/UpdateForm.md -->\n# Type Alias: UpdateForm\n\n> **UpdateForm** = \\{ `audience?`: [`Audience`](Audience.md); `closesAt?`: `string` \\| `null`; `confirmationMessage?`: `string`; `description?`: `string`; `status?`: [`FormStatus`](FormStatus.md); `tallyVisible?`: `boolean`; \\}\n\nA change to a form's facts; what is left out stays. The description and\nconfirmation message take edit, the rest owner. A form is renamed\nthrough the entity mutation router.\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-audience\"></a> `audience?` | [`Audience`](Audience.md) | Who may respond from now on. |\n| <a id=\"property-closesat\"></a> `closesAt?` | `string` \\| `null` | When it stops taking responses, or `null` for never. |\n| <a id=\"property-confirmationmessage\"></a> `confirmationMessage?` | `string` | Its new confirmation message. |\n| <a id=\"property-description\"></a> `description?` | `string` | Its new description. |\n| <a id=\"property-status\"></a> `status?` | [`FormStatus`](FormStatus.md) | Open or close it. |\n| <a id=\"property-tallyvisible\"></a> `tallyVisible?` | `boolean` | Whether respondents may read option tallies. |\n\n\n<!-- generated/storage/types.gen/type-aliases/UpdateOperation.md -->\n# Type Alias: UpdateOperation\n\n> **UpdateOperation** = `\"add\"` \\| `\"remove\"` \\| `\"replace\"`\n\n\n<!-- generated/storage/types.gen/type-aliases/UpdateSharePermissionRequestV2.md -->\n# Type Alias: UpdateSharePermissionRequestV2\n\n> **UpdateSharePermissionRequestV2** = \\{ `channelSharePermissions?`: [`UpdateChannelSharePermission`](UpdateChannelSharePermission.md)[] \\| `null`; `linkShare?`: `null` \\| [`LinkShare`](LinkShare.md); `linkShareAccessLevel?`: `null` \\| [`AccessLevel`](AccessLevel.md); `teamShareAccessLevel?`: `null` \\| [`AccessLevel`](AccessLevel.md); \\}\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ | ------ |\n| <a id=\"property-channelsharepermissions\"></a> `channelSharePermissions?` | [`UpdateChannelSharePermission`](UpdateChannelSharePermission.md)[] \\| `null` | Any channel share permissions to be created/updated/removed |\n| <a id=\"property-linkshare\"></a> `linkShare?` | `null` \\| [`LinkShare`](LinkShare.md) | - |\n| <a id=\"property-linkshareaccesslevel\"></a> `linkShareAccessLevel?` | `null` \\| [`AccessLevel`](AccessLevel.md) | - |\n| <a id=\"property-teamshareaccesslevel\"></a> `teamShareAccessLevel?` | `null` \\| [`AccessLevel`](AccessLevel.md) | - |\n\n\n<!-- generated/storage/types.gen/type-aliases/Widget.md -->\n# Type Alias: Widget\n\n> **Widget** = `\"short\"` \\| `\"paragraph\"` \\| `\"datetime\"` \\| `\"date\"` \\| `\"url\"` \\| `\"file\"` \\| `\"choice\"` \\| `\"dropdown\"` \\| `\"checkboxes\"`\n\nHow a question is asked. Each column kind takes a few, the first its\ndefault; kinds asked one way only (numbers, checkboxes, entity and row\npickers) take none.\n\n\n<!-- src/entities/forms/form/classes/Form.md -->\n# Class: Form\n\nA form over a database table. Viewers can read its questions and submit;\neditors can build it and read responses; owners control its audience.\n\n## Extends\n\n- [`MacroEntity`](../../../entity/classes/MacroEntity.md)\\<[`FormDetail`](../../../../../generated/storage/types.gen/type-aliases/FormDetail.md)\\>\n\n## Properties\n\n| Property | Modifier | Type | Description | Inherited from |\n| ------ | ------ | ------ | ------ | ------ |\n| <a id=\"property-access\"></a> `access` | `readonly` | () => `Promise`\\<[`FormAccess`](../../../../../generated/storage/types.gen/type-aliases/FormAccess.md)\\> | The caller's access level. | - |\n| <a id=\"property-audience\"></a> `audience` | `readonly` | () => `Promise`\\<[`Audience`](../../../../../generated/storage/types.gen/type-aliases/Audience.md)\\> | Who may respond. | - |\n| <a id=\"property-closesat\"></a> `closesAt` | `readonly` | () => `Promise`\\<`string` \\| `undefined`\\> | Scheduled closing time, when set. | - |\n| <a id=\"property-database\"></a> `database` | `readonly` | () => `Promise`\\<[`Database`](../../../databases/database/classes/Database.md)\\> | The response database. Reading its contents requires separate access. | - |\n| <a id=\"property-description\"></a> `description` | `readonly` | () => `Promise`\\<`string`\\> | Introductory text shown to respondents. | - |\n| <a id=\"property-id\"></a> `id` | `public readonly` | `string` | - | [`MacroEntity`](../../../entity/classes/MacroEntity.md).[`id`](../../../entity/classes/MacroEntity.md#property-id) |\n| <a id=\"property-name\"></a> `name` | `readonly` | () => `Promise`\\<`string`\\> | The form's display name. | - |\n| <a id=\"property-owner\"></a> `owner` | `readonly` | () => `Promise`\\<[`User`](../../../users/user/classes/User.md)\\> | The owning user. | - |\n| <a id=\"property-status\"></a> `status` | `readonly` | () => `Promise`\\<[`FormStatus`](../../../../../generated/storage/types.gen/type-aliases/FormStatus.md)\\> | Whether submissions are currently enabled. A closing time can also close the form. | - |\n| <a id=\"property-table\"></a> `table` | `readonly` | () => `Promise`\\<[`DatabaseTable`](../../../databases/table/classes/DatabaseTable.md)\\> | The linked table, without fetching its contents. | - |\n\n## Methods\n\n### editResponse()\n\n> **editResponse**(`answers`): `Promise`\\<[`FormSubmissionOutcome`](../type-aliases/FormSubmissionOutcome.md)\\>\n\nReplace the caller's answers while the form is open; gates are evaluated again.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `answers` | [`FormAnswer`](../type-aliases/FormAnswer.md)[] |\n\n#### Returns\n\n`Promise`\\<[`FormSubmissionOutcome`](../type-aliases/FormSubmissionOutcome.md)\\>\n\n***\n\n### myResponse()\n\n> **myResponse**(): `Promise`\\<[`MyFormResponse`](../type-aliases/MyFormResponse.md)\\>\n\nRead the caller's receipt and answers without reading anyone else's responses.\n\n#### Returns\n\n`Promise`\\<[`MyFormResponse`](../type-aliases/MyFormResponse.md)\\>\n\n***\n\n### questions()\n\n> **questions**(): `Promise`\\<[`FormQuestion`](../../question/classes/FormQuestion.md)[]\\>\n\nAll questions in display order, skipping gates.\n\n#### Returns\n\n`Promise`\\<[`FormQuestion`](../../question/classes/FormQuestion.md)[]\\>\n\n***\n\n### replaceLayout()\n\n> **replaceLayout**(`sections`): `Promise`\\<[`FormLayoutResult`](../type-aliases/FormLayoutResult.md)\\>\n\nSave a replacement in the shared draft. Existing handles retain identity;\nomitted handles mint sections or questions. Column facts use the database API.\nA publicationError means the draft was saved but respondents still see the last\nvalid version. Repair the reported problem or reload to retry publication.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `sections` | [`FormSectionPlacement`](../type-aliases/FormSectionPlacement.md)[] |\n\n#### Returns\n\n`Promise`\\<[`FormLayoutResult`](../type-aliases/FormLayoutResult.md)\\>\n\n***\n\n### respondUrl()\n\n> **respondUrl**(): `string`\n\nThe respondent page, which public forms also expose without signing in.\n\n#### Returns\n\n`string`\n\n***\n\n### responseSummary()\n\n> **responseSummary**(): `Promise`\\<[`FormResponseSummary`](../type-aliases/FormResponseSummary.md)\\>\n\nLedger counts and total table rows; requires edit access.\n\n#### Returns\n\n`Promise`\\<[`FormResponseSummary`](../type-aliases/FormResponseSummary.md)\\>\n\n***\n\n### schema()\n\n> **schema**(): `Promise`\\<[`FormDetail`](../../../../../generated/storage/types.gen/type-aliases/FormDetail.md)\\>\n\nThe form's presentation and column facts; this never contains response rows.\n\n#### Returns\n\n`Promise`\\<[`FormDetail`](../../../../../generated/storage/types.gen/type-aliases/FormDetail.md)\\>\n\n***\n\n### sections()\n\n> **sections**(): `Promise`\\<[`FormSection`](../../section/classes/FormSection.md)[]\\>\n\nSections in display order.\n\n#### Returns\n\n`Promise`\\<[`FormSection`](../../section/classes/FormSection.md)[]\\>\n\n***\n\n### sharePermissions()\n\n> **sharePermissions**(): `Promise`\\<[`SharePermissionV2`](../../../../../generated/storage/types.gen/type-aliases/SharePermissionV2.md)\\>\n\nRead the form's sharing grants. Requires ownership.\n\n#### Returns\n\n`Promise`\\<[`SharePermissionV2`](../../../../../generated/storage/types.gen/type-aliases/SharePermissionV2.md)\\>\n\n***\n\n### submit()\n\n> **submit**(`answers`): `Promise`\\<[`FormSubmissionOutcome`](../type-aliases/FormSubmissionOutcome.md)\\>\n\nSubmit answers. Signed-in respondents get at most one response; use editResponse afterwards.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `answers` | [`FormAnswer`](../type-aliases/FormAnswer.md)[] |\n\n#### Returns\n\n`Promise`\\<[`FormSubmissionOutcome`](../type-aliases/FormSubmissionOutcome.md)\\>\n\n***\n\n### tally()\n\n> **tally**(): `Promise`\\<[`FormQuestionTally`](../type-aliases/FormQuestionTally.md)[]\\>\n\nChoice and checkbox counts, available to viewers when tally visibility is enabled.\n\n#### Returns\n\n`Promise`\\<[`FormQuestionTally`](../type-aliases/FormQuestionTally.md)[]\\>\n\n***\n\n### toJSON()\n\n> **toJSON**(): \\{ `detail?`: [`FormDetail`](../../../../../generated/storage/types.gen/type-aliases/FormDetail.md); `id`: `string`; \\}\n\n#### Returns\n\n\\{ `detail?`: [`FormDetail`](../../../../../generated/storage/types.gen/type-aliases/FormDetail.md); `id`: `string`; \\}\n\n| Name | Type |\n| ------ | ------ |\n| `detail?` | [`FormDetail`](../../../../../generated/storage/types.gen/type-aliases/FormDetail.md) |\n| `id` | `string` |\n\n#### Inherited from\n\n[`MacroEntity`](../../../entity/classes/MacroEntity.md).[`toJSON`](../../../entity/classes/MacroEntity.md#tojson)\n\n***\n\n### update()\n\n> **update**(`updates`): `Promise`\\<`Form`\\>\n\nUpdate presentation or owner-controlled settings; null explicitly clears the closing time.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `updates` | [`UpdateForm`](../../../../../generated/storage/types.gen/type-aliases/UpdateForm.md) |\n\n#### Returns\n\n`Promise`\\<`Form`\\>\n\n***\n\n### updateSharePermissions()\n\n> **updateSharePermissions**(`request`): `Promise`\\<[`SharePermissionV2`](../../../../../generated/storage/types.gen/type-aliases/SharePermissionV2.md)\\>\n\nUpdate grants. Public responding is controlled by audience, not link sharing.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `request` | [`UpdateSharePermissionRequestV2`](../../../../../generated/storage/types.gen/type-aliases/UpdateSharePermissionRequestV2.md) |\n\n#### Returns\n\n`Promise`\\<[`SharePermissionV2`](../../../../../generated/storage/types.gen/type-aliases/SharePermissionV2.md)\\>\n\n***\n\n### webUrl()\n\n> **webUrl**(): `string`\n\nOpen the form's builder in Macro.\n\n#### Returns\n\n`string`\n\n***\n\n### byId()\n\n> `static` **byId**(`client`, `id`): `Form`\n\nA form handle with details loaded on demand.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `id` | `string` |\n\n#### Returns\n\n`Form`\n\n***\n\n### create()\n\n> `static` **create**(`client`, `options`): `Promise`\\<`Form`\\>\n\nCreate a form, optionally over a table of a database the caller owns.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `options` | \\{ `name`: `string`; `table?`: [`DatabaseTable`](../../../databases/table/classes/DatabaseTable.md); \\} |\n| `options.name` | `string` |\n| `options.table?` | [`DatabaseTable`](../../../databases/table/classes/DatabaseTable.md) |\n\n#### Returns\n\n`Promise`\\<`Form`\\>\n\n***\n\n### list()\n\n> `static` **list**(`client`, `database?`): `Promise`\\<`Form`[]\\>\n\nForms shared with the caller, or live forms over a specified database.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n| `database?` | [`Database`](../../../databases/database/classes/Database.md) |\n\n#### Returns\n\n`Promise`\\<`Form`[]\\>\n\n\n<!-- src/entities/forms/form/classes/FormReference.md -->\n# Class: FormReference\n\nA typed reference read from a form answer, without fetching the referenced entity.\n\n## Implements\n\n- [`FormEntityHandle`](../interfaces/FormEntityHandle.md)\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-entitytype\"></a> `entityType` | `readonly` | [`EntityKind`](../../../../../generated/storage/types.gen/type-aliases/EntityKind.md) | The referenced entity's kind. |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` | The referenced entity's identifier. |\n\n## Methods\n\n### byId()\n\n> `static` **byId**(`entityType`, `id`): `FormReference`\n\nConstruct a reference when its kind and identifier are known.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `entityType` | [`EntityKind`](../../../../../generated/storage/types.gen/type-aliases/EntityKind.md) |\n| `id` | `string` |\n\n#### Returns\n\n`FormReference`\n\n\n<!-- src/entities/forms/form/interfaces/FormEntityHandle.md -->\n# Interface: FormEntityHandle\n\nAn entity handle used in a reference answer or rule.\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` | The entity's identifier. |\n\n\n<!-- src/entities/forms/form/type-aliases/FormAnswer.md -->\n# Type Alias: FormAnswer\n\n> **FormAnswer** = \\{ `question`: [`FormQuestion`](../../question/classes/FormQuestion.md); `value`: [`FormAnswerValue`](FormAnswerValue.md); \\}\n\nOne question and its answer.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-question\"></a> `question` | [`FormQuestion`](../../question/classes/FormQuestion.md) |\n| <a id=\"property-value\"></a> `value` | [`FormAnswerValue`](FormAnswerValue.md) |\n\n\n<!-- src/entities/forms/form/type-aliases/FormAnswerValue.md -->\n# Type Alias: FormAnswerValue\n\n> **FormAnswerValue** = `Exclude`\\<[`CellValue`](../../../../../generated/storage/types.gen/type-aliases/CellValue.md), \\{ `type`: `\"rows\"` \\| `\"options\"` \\| `\"entities\"`; \\}\\> \\| \\{ `type`: `\"rows\"`; `value`: [`DatabaseRow`](../../../databases/row/classes/DatabaseRow.md)[]; \\} \\| \\{ `type`: `\"options\"`; `value`: [`FormOption`](../../question/classes/FormOption.md)[]; \\} \\| \\{ `type`: `\"entities\"`; `value`: \\{ `entity`: [`FormEntityHandle`](../interfaces/FormEntityHandle.md); `entityType`: [`EntityKind`](../../../../../generated/storage/types.gen/type-aliases/EntityKind.md); \\}[]; \\}\n\nAn answer value; references use handles, and scalar values keep their cell representation.\n\n\n<!-- src/entities/forms/form/type-aliases/FormBookingStep.md -->\n# Type Alias: FormBookingStep\n\n> **FormBookingStep** = `Omit`\\<[`UnlockedBooking`](../../../../../generated/storage/types.gen/type-aliases/UnlockedBooking.md), `\"section\"`\\> & \\{ `section`: [`FormSection`](../../section/classes/FormSection.md); \\}\n\nA booking step released after the form accepts the caller's answers.\n\n## Type Declaration\n\n| Name | Type |\n| ------ | ------ |\n| `section` | [`FormSection`](../../section/classes/FormSection.md) |\n\n\n<!-- src/entities/forms/form/type-aliases/FormBookingTarget.md -->\n# Type Alias: FormBookingTarget\n\n> **FormBookingTarget** = [`BookingTarget`](../../../../../generated/storage/types.gen/type-aliases/BookingTarget.md)\n\nThe public Macro booking destination selected by a form editor.\n\n\n<!-- src/entities/forms/form/type-aliases/FormLayoutResult.md -->\n# Type Alias: FormLayoutResult\n\n> **FormLayoutResult** = \\{ `form`: [`Form`](../classes/Form.md); `publicationError?`: [`FormPublicationProblem`](../../../../../generated/storage/types.gen/type-aliases/FormPublicationProblem.md); \\}\n\nA saved layout and any reason it is not yet visible to respondents.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-form\"></a> `form` | [`Form`](../classes/Form.md) |\n| <a id=\"property-publicationerror\"></a> `publicationError?` | [`FormPublicationProblem`](../../../../../generated/storage/types.gen/type-aliases/FormPublicationProblem.md) |\n\n\n<!-- src/entities/forms/form/type-aliases/FormQuestionPlacement.md -->\n# Type Alias: FormQuestionPlacement\n\n> **FormQuestionPlacement** = \\{ `column`: [`DatabaseColumn`](../../../databases/column/classes/DatabaseColumn.md); `helpText?`: `string`; `question?`: [`FormQuestion`](../../question/classes/FormQuestion.md); `required?`: `boolean`; `widget?`: [`Widget`](../../../../../generated/storage/types.gen/type-aliases/Widget.md); \\}\n\nA question placement in a layout replacement. Omit question to mint a new stable question.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-column\"></a> `column` | [`DatabaseColumn`](../../../databases/column/classes/DatabaseColumn.md) |\n| <a id=\"property-helptext\"></a> `helpText?` | `string` |\n| <a id=\"property-question\"></a> `question?` | [`FormQuestion`](../../question/classes/FormQuestion.md) |\n| <a id=\"property-required\"></a> `required?` | `boolean` |\n| <a id=\"property-widget\"></a> `widget?` | [`Widget`](../../../../../generated/storage/types.gen/type-aliases/Widget.md) |\n\n\n<!-- src/entities/forms/form/type-aliases/FormQuestionTally.md -->\n# Type Alias: FormQuestionTally\n\n> **FormQuestionTally** = \\{ `buckets`: \\{ `count`: `number`; `value`: \\{ `kind`: `\"option\"`; `option`: [`FormOption`](../../question/classes/FormOption.md); \\} \\| \\{ `checked`: `boolean`; `kind`: `\"checkbox\"`; \\}; \\}[]; `question`: [`FormQuestion`](../../question/classes/FormQuestion.md); `responses`: `number`; \\}\n\nA question's public tally. Options with no votes are retained.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-buckets\"></a> `buckets` | \\{ `count`: `number`; `value`: \\{ `kind`: `\"option\"`; `option`: [`FormOption`](../../question/classes/FormOption.md); \\} \\| \\{ `checked`: `boolean`; `kind`: `\"checkbox\"`; \\}; \\}[] |\n| <a id=\"property-question\"></a> `question` | [`FormQuestion`](../../question/classes/FormQuestion.md) |\n| <a id=\"property-responses\"></a> `responses` | `number` |\n\n\n<!-- src/entities/forms/form/type-aliases/FormResponseSummary.md -->\n# Type Alias: FormResponseSummary\n\n> **FormResponseSummary** = \\{ `rows`: `number`; `stopped`: `number`; `stoppedBySection`: \\{ `count`: `number`; `section`: [`FormSection`](../../section/classes/FormSection.md); \\}[]; `submitted`: `number`; \\}\n\nCounts from the response ledger and its linked table.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-rows\"></a> `rows` | `number` |\n| <a id=\"property-stopped\"></a> `stopped` | `number` |\n| <a id=\"property-stoppedbysection\"></a> `stoppedBySection` | \\{ `count`: `number`; `section`: [`FormSection`](../../section/classes/FormSection.md); \\}[] |\n| <a id=\"property-submitted\"></a> `submitted` | `number` |\n\n\n<!-- src/entities/forms/form/type-aliases/FormRuleTest.md -->\n# Type Alias: FormRuleTest\n\n> **FormRuleTest** = `Exclude`\\<[`FilterTest`](../../../../../generated/storage/types.gen/type-aliases/FilterTest.md), \\{ `kind`: `\"options\"` \\| `\"entities\"`; \\}\\> \\| \\{ `kind`: `\"options\"`; `operator`: `Extract`\\<[`FilterTest`](../../../../../generated/storage/types.gen/type-aliases/FilterTest.md), \\{ `kind`: `\"options\"`; \\}\\>\\[`\"operator\"`\\]; `options`: [`FormOption`](../../question/classes/FormOption.md)[]; \\} \\| \\{ `entities`: [`FormEntityHandle`](../interfaces/FormEntityHandle.md)[]; `kind`: `\"entities\"`; `operator`: `Extract`\\<[`FilterTest`](../../../../../generated/storage/types.gen/type-aliases/FilterTest.md), \\{ `kind`: `\"entities\"`; \\}\\>\\[`\"operator\"`\\]; \\}\n\nA form rule, with option and entity references represented by handles.\n\n\n<!-- src/entities/forms/form/type-aliases/FormRules.md -->\n# Type Alias: FormRules\n\n> **FormRules** = \\{ `conditions`: (\\{ `column`: [`DatabaseColumn`](../../../databases/column/classes/DatabaseColumn.md); `kind`: `\"condition\"`; `test`: [`FormRuleTest`](FormRuleTest.md); \\} \\| \\{ `kind`: `\"group\"`; \\} & `FormRules`)[]; `conjunction`: [`FilterGroup`](../../../../../generated/storage/types.gen/type-aliases/FilterGroup.md)\\[`\"conjunction\"`\\]; \\}\n\nConditions over columns asked in earlier sections.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-conditions\"></a> `conditions` | (\\{ `column`: [`DatabaseColumn`](../../../databases/column/classes/DatabaseColumn.md); `kind`: `\"condition\"`; `test`: [`FormRuleTest`](FormRuleTest.md); \\} \\| \\{ `kind`: `\"group\"`; \\} & `FormRules`)[] |\n| <a id=\"property-conjunction\"></a> `conjunction` | [`FilterGroup`](../../../../../generated/storage/types.gen/type-aliases/FilterGroup.md)\\[`\"conjunction\"`\\] |\n\n\n<!-- src/entities/forms/form/type-aliases/FormSectionPlacement.md -->\n# Type Alias: FormSectionPlacement\n\n> **FormSectionPlacement** = \\{ `description?`: `string`; `section?`: [`FormSection`](../../section/classes/FormSection.md); `title`: `string`; \\} & \\{ `kind`: `\"questions\"`; `questions`: [`FormQuestionPlacement`](FormQuestionPlacement.md)[]; \\} \\| \\{ `kind`: `\"gate\"`; `message`: `string`; `rules`: [`FormRules`](FormRules.md); \\} \\| \\{ `kind`: `\"booking\"`; `target`: [`BookingTarget`](../../../../../generated/storage/types.gen/type-aliases/BookingTarget.md); \\}\n\nA section in a layout replacement. Omit section to mint a new stable section.\n\n## Type Declaration\n\n| Name | Type |\n| ------ | ------ |\n| `description?` | `string` |\n| `section?` | [`FormSection`](../../section/classes/FormSection.md) |\n| `title` | `string` |\n\n\n<!-- src/entities/forms/form/type-aliases/FormSubmissionOutcome.md -->\n# Type Alias: FormSubmissionOutcome\n\n> **FormSubmissionOutcome** = \\{ `booking?`: [`FormBookingStep`](FormBookingStep.md); `outcome`: `\"submitted\"`; `response`: [`FormResponse`](../../response/classes/FormResponse.md); `row`: [`DatabaseRow`](../../../databases/row/classes/DatabaseRow.md); \\} \\| \\{ `message`: `string`; `outcome`: `\"stopped\"`; `section`: [`FormSection`](../../section/classes/FormSection.md); \\}\n\nThe result of submitting or editing a response. A stopped submission has no row.\n\n\n<!-- src/entities/forms/form/type-aliases/MyFormResponse.md -->\n# Type Alias: MyFormResponse\n\n> **MyFormResponse** = \\{ `answers`: [`FormAnswer`](FormAnswer.md)[]; `booking?`: [`FormBookingStep`](FormBookingStep.md); `response`: [`FormResponse`](../../response/classes/FormResponse.md); `row?`: [`DatabaseRow`](../../../databases/row/classes/DatabaseRow.md); `status`: [`ResponseStatus`](../../../../../generated/storage/types.gen/type-aliases/ResponseStatus.md); `stoppedAtSection?`: [`FormSection`](../../section/classes/FormSection.md); `submittedAt`: `string`; `updatedAt`: `string`; \\}\n\nThe caller's receipt and current answers, read without access to other responses.\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a id=\"property-answers\"></a> `answers` | [`FormAnswer`](FormAnswer.md)[] |\n| <a id=\"property-booking\"></a> `booking?` | [`FormBookingStep`](FormBookingStep.md) |\n| <a id=\"property-response\"></a> `response` | [`FormResponse`](../../response/classes/FormResponse.md) |\n| <a id=\"property-row\"></a> `row?` | [`DatabaseRow`](../../../databases/row/classes/DatabaseRow.md) |\n| <a id=\"property-status\"></a> `status` | [`ResponseStatus`](../../../../../generated/storage/types.gen/type-aliases/ResponseStatus.md) |\n| <a id=\"property-stoppedatsection\"></a> `stoppedAtSection?` | [`FormSection`](../../section/classes/FormSection.md) |\n| <a id=\"property-submittedat\"></a> `submittedAt` | `string` |\n| <a id=\"property-updatedat\"></a> `updatedAt` | `string` |\n\n\n<!-- src/entities/forms/namespace/classes/FormNamespace.md -->\n# Class: FormNamespace\n\nForms collect answers into a database table without granting respondents table access.\n\n## Constructors\n\n### Constructor\n\n> **new FormNamespace**(`client`): `FormNamespace`\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `client` | `MacroClient` |\n\n#### Returns\n\n`FormNamespace`\n\n## Methods\n\n### byId()\n\n> **byId**(`id`): [`Form`](../../form/classes/Form.md)\n\nA form handle. Details load on first access.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `id` | `string` |\n\n#### Returns\n\n[`Form`](../../form/classes/Form.md)\n\n***\n\n### create()\n\n> **create**(`options`): `Promise`\\<[`Form`](../../form/classes/Form.md)\\>\n\nCreate a form over an existing table, or create its own Responses database.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `options` | \\{ `name`: `string`; `table?`: [`DatabaseTable`](../../../databases/table/classes/DatabaseTable.md); \\} |\n| `options.name` | `string` |\n| `options.table?` | [`DatabaseTable`](../../../databases/table/classes/DatabaseTable.md) |\n\n#### Returns\n\n`Promise`\\<[`Form`](../../form/classes/Form.md)\\>\n\n***\n\n### list()\n\n> **list**(`database?`): `Promise`\\<[`Form`](../../form/classes/Form.md)[]\\>\n\nList forms shared with the caller, or forms over a database the caller can read.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `database?` | [`Database`](../../../databases/database/classes/Database.md) |\n\n#### Returns\n\n`Promise`\\<[`Form`](../../form/classes/Form.md)[]\\>\n\n\n<!-- src/entities/forms/question/classes/FormOption.md -->\n# Class: FormOption\n\nA choice of one form question, resolved through that question's current options.\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` | The backing database option's identifier. |\n| <a id=\"property-question\"></a> `question` | `readonly` | [`FormQuestion`](FormQuestion.md) | The question offering this choice. |\n\n## Methods\n\n### color()\n\n> **color**(): `Promise`\\<`string` \\| `undefined`\\>\n\nThe choice's color, when one is set.\n\n#### Returns\n\n`Promise`\\<`string` \\| `undefined`\\>\n\n***\n\n### detail()\n\n> **detail**(): `Promise`\\<[`QuestionOption`](../../../../../generated/storage/types.gen/type-aliases/QuestionOption.md)\\>\n\nThe choice's label and color.\n\n#### Returns\n\n`Promise`\\<[`QuestionOption`](../../../../../generated/storage/types.gen/type-aliases/QuestionOption.md)\\>\n\n***\n\n### label()\n\n> **label**(): `Promise`\\<`string`\\>\n\nThe choice's label.\n\n#### Returns\n\n`Promise`\\<`string`\\>\n\n***\n\n### byId()\n\n> `static` **byId**(`question`, `id`): `FormOption`\n\nA handle to a known choice of a question.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `question` | [`FormQuestion`](FormQuestion.md) |\n| `id` | `string` |\n\n#### Returns\n\n`FormOption`\n\n\n<!-- src/entities/forms/question/classes/FormQuestion.md -->\n# Class: FormQuestion\n\nOne question, backed by a column. Its details never require reading the response table.\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-form\"></a> `form` | `readonly` | [`Form`](../../form/classes/Form.md) | The form that asks this question. |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` | The question's stable identifier within its form layout. |\n\n## Methods\n\n### column()\n\n> **column**(): `Promise`\\<[`DatabaseColumn`](../../../databases/column/classes/DatabaseColumn.md)\\>\n\nThe column behind the question. Reading the column itself needs database access.\n\n#### Returns\n\n`Promise`\\<[`DatabaseColumn`](../../../databases/column/classes/DatabaseColumn.md)\\>\n\n***\n\n### detail()\n\n> **detail**(): `Promise`\\<[`FormQuestionDetail`](../../../../../generated/storage/types.gen/type-aliases/FormQuestionDetail.md)\\>\n\nThe question's current presentation and column facts.\n\n#### Returns\n\n`Promise`\\<[`FormQuestionDetail`](../../../../../generated/storage/types.gen/type-aliases/FormQuestionDetail.md)\\>\n\n***\n\n### options()\n\n> **options**(): `Promise`\\<[`FormOption`](FormOption.md)[]\\>\n\nCurrent choices, in display order.\n\n#### Returns\n\n`Promise`\\<[`FormOption`](FormOption.md)[]\\>\n\n***\n\n### title()\n\n> **title**(): `Promise`\\<`string`\\>\n\nThe question's current title (its column's name).\n\n#### Returns\n\n`Promise`\\<`string`\\>\n\n***\n\n### byId()\n\n> `static` **byId**(`form`, `id`): `FormQuestion`\n\nA question handle within a form.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `form` | [`Form`](../../form/classes/Form.md) |\n| `id` | `string` |\n\n#### Returns\n\n`FormQuestion`\n\n\n<!-- src/entities/forms/response/classes/FormResponse.md -->\n# Class: FormResponse\n\nA cached receipt for the caller's response; other respondents' receipts are private.\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-form\"></a> `form` | `readonly` | [`Form`](../../form/classes/Form.md) | The form that received this response. |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` | The response ledger entry's identifier. |\n\n## Methods\n\n### answers()\n\n> **answers**(): `Promise`\\<[`FormAnswer`](../../form/type-aliases/FormAnswer.md)[]\\>\n\nAnswers as submitted or last read. Refresh to include later changes to the row.\n\n#### Returns\n\n`Promise`\\<[`FormAnswer`](../../form/type-aliases/FormAnswer.md)[]\\>\n\n***\n\n### booking()\n\n> **booking**(): `Promise`\\<[`FormBookingStep`](../../form/type-aliases/FormBookingStep.md) \\| `undefined`\\>\n\nThe booking step unlocked by this saved response, if any.\n\n#### Returns\n\n`Promise`\\<[`FormBookingStep`](../../form/type-aliases/FormBookingStep.md) \\| `undefined`\\>\n\n***\n\n### refresh()\n\n> **refresh**(): `Promise`\\<`FormResponse`\\>\n\nReload the caller's current receipt; requires a signed-in respondent.\n\n#### Returns\n\n`Promise`\\<`FormResponse`\\>\n\n***\n\n### row()\n\n> **row**(): `Promise`\\<[`DatabaseRow`](../../../databases/row/classes/DatabaseRow.md) \\| `undefined`\\>\n\nThe receipt's row, if any. Reading that row requires database access.\n\n#### Returns\n\n`Promise`\\<[`DatabaseRow`](../../../databases/row/classes/DatabaseRow.md) \\| `undefined`\\>\n\n***\n\n### status()\n\n> **status**(): `Promise`\\<[`ResponseStatus`](../../../../../generated/storage/types.gen/type-aliases/ResponseStatus.md)\\>\n\nWhether this receipt was submitted or stopped by a gate.\n\n#### Returns\n\n`Promise`\\<[`ResponseStatus`](../../../../../generated/storage/types.gen/type-aliases/ResponseStatus.md)\\>\n\n***\n\n### byId()\n\n> `static` **byId**(`form`, `id`, `snapshot?`): `FormResponse`\n\nA response handle, optionally seeded with an already returned receipt.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `form` | [`Form`](../../form/classes/Form.md) |\n| `id` | `string` |\n| `snapshot?` | `ResponseSnapshot` |\n\n#### Returns\n\n`FormResponse`\n\n\n<!-- src/entities/forms/section/classes/FormSection.md -->\n# Class: FormSection\n\nAn ordered group of questions, or a gate between groups.\n\n## Properties\n\n| Property | Modifier | Type | Description |\n| ------ | ------ | ------ | ------ |\n| <a id=\"property-form\"></a> `form` | `readonly` | [`Form`](../../form/classes/Form.md) | The owning form. |\n| <a id=\"property-id\"></a> `id` | `readonly` | `string` | The section's stable identifier. |\n\n## Methods\n\n### detail()\n\n> **detail**(): `Promise`\\<[`FormSectionDetail`](../../../../../generated/storage/types.gen/type-aliases/FormSectionDetail.md)\\>\n\nThe section's current presentation.\n\n#### Returns\n\n`Promise`\\<[`FormSectionDetail`](../../../../../generated/storage/types.gen/type-aliases/FormSectionDetail.md)\\>\n\n***\n\n### questions()\n\n> **questions**(): `Promise`\\<[`FormQuestion`](../../question/classes/FormQuestion.md)[]\\>\n\nQuestions in display order; gates contain no questions.\n\n#### Returns\n\n`Promise`\\<[`FormQuestion`](../../question/classes/FormQuestion.md)[]\\>\n\n***\n\n### title()\n\n> **title**(): `Promise`\\<`string`\\>\n\nThe section heading.\n\n#### Returns\n\n`Promise`\\<`string`\\>\n\n***\n\n### byId()\n\n> `static` **byId**(`form`, `id`): `FormSection`\n\nA section handle within a form.\n\n#### Parameters\n\n| Parameter | Type |\n| ------ | ------ |\n| `form` | [`Form`](../../form/classes/Form.md) |\n| `id` | `string` |\n\n#### Returns\n\n`FormSection`\n"
},
{
"name": "notifications",
diff --git a/crates/forms/src/domain/authoring/workflow/create.rs b/crates/forms/src/domain/authoring/workflow/create.rs
index b6566f85ce..acec7c04fb 100644
--- a/crates/forms/src/domain/authoring/workflow/create.rs
+++ b/crates/forms/src/domain/authoring/workflow/create.rs
@@ -24,7 +24,9 @@ impl<
));
}
let source = match intent.source {
- FormSource::New => CreateSource::NewDatabase,
+ FormSource::New { is_hidden_in_drive } => {
+ CreateSource::NewDatabase { is_hidden_in_drive }
+ }
FormSource::Table {
database_id,
table_id,
diff --git a/crates/forms/src/domain/ports.rs b/crates/forms/src/domain/ports.rs
index 79b6b9424a..966d51ad01 100644
--- a/crates/forms/src/domain/ports.rs
+++ b/crates/forms/src/domain/ports.rs
@@ -20,7 +20,10 @@ use crate::domain::models::{
#[derive(Debug, Clone)]
pub enum CreateSource {
/// A new database for the caller.
- NewDatabase,
+ NewDatabase {
+ /// Keep the form, and the database made for it, out of Drive.
+ is_hidden_in_drive: bool,
+ },
/// An existing table of the database the receipt names. Attaching a
/// form to an existing table takes the database's Owner: the form's
/// editors gain Edit on the database through it, which only the
diff --git a/crates/forms/src/domain/service/authoring.rs b/crates/forms/src/domain/service/authoring.rs
index 5b7fcf3840..758b750090 100644
--- a/crates/forms/src/domain/service/authoring.rs
+++ b/crates/forms/src/domain/service/authoring.rs
@@ -38,7 +38,7 @@ where
]
};
match source {
- CreateSource::NewDatabase => {
+ CreateSource::NewDatabase { .. } => {
let columns = new_columns();
let managed = columns.iter().map(|c| c.id).collect();
Ok((columns, managed))
diff --git a/crates/forms/src/domain/service/create.rs b/crates/forms/src/domain/service/create.rs
index 1d9fe57a37..43415976e4 100644
--- a/crates/forms/src/domain/service/create.rs
+++ b/crates/forms/src/domain/service/create.rs
@@ -33,6 +33,16 @@ pub(super) const SUBMITTED_COLUMN: &str = "Submitted";
/// The person column each signed-in submission names its respondent in.
pub(super) const RESPONDENT_COLUMN: &str = "Respondent";
+/// Where a new form's table came from.
+#[derive(Clone, Copy)]
+enum Provenance {
+ /// A database made for the form, which goes by its name and may stay
+ /// out of Drive with it.
+ OwnDatabase { is_hidden_in_drive: bool },
+ /// A table of a database the creator already had.
+ ExistingTable,
+}
+
/// A column the form writes itself: one the table already has, reused, or
/// one to create.
pub(super) enum ManagedColumn {
@@ -146,8 +156,8 @@ where
};
let name = validated_name(&command.name)?;
match command.source {
- CreateSource::NewDatabase => {
- self.create_over_new_database(creator, name, id, status, policy)
+ CreateSource::NewDatabase { is_hidden_in_drive } => {
+ self.create_over_new_database(creator, name, is_hidden_in_drive, id, status, policy)
.await
}
CreateSource::Table { receipt, table_id } => {
@@ -164,6 +174,7 @@ where
&self,
creator: Viewer,
name: String,
+ is_hidden_in_drive: bool,
id: FormId,
status: FormStatus,
policy: CreationPolicy,
@@ -178,7 +189,15 @@ where
.await
.map_err(database_error)?;
match self
- .attach_to_new_database(&creator, database.name, database.id, id, status, policy)
+ .attach_to_new_database(
+ &creator,
+ database.name,
+ database.id,
+ is_hidden_in_drive,
+ id,
+ status,
+ policy,
+ )
.await
{
Ok(detail) => Ok(detail),
@@ -195,11 +214,16 @@ where
}
}
+ #[expect(
+ clippy::too_many_arguments,
+ reason = "Attaching carries the new form's identity, status and Drive visibility"
+ )]
async fn attach_to_new_database(
&self,
creator: &Viewer,
name: String,
database_id: DatabaseId,
+ is_hidden_in_drive: bool,
id: FormId,
status: FormStatus,
policy: CreationPolicy,
@@ -291,7 +315,7 @@ where
(submitted.id(), respondent.id()),
layout,
&table,
- true,
+ Provenance::OwnDatabase { is_hidden_in_drive },
id,
status,
)
@@ -397,7 +421,7 @@ where
(submitted.id(), respondent.id()),
layout,
&table,
- false,
+ Provenance::ExistingTable,
id,
status,
)
@@ -418,7 +442,7 @@ where
(submitted, respondent): (ColumnId, ColumnId),
layout: FormLayout,
table: &TableDetail,
- name_follows_database: bool,
+ provenance: Provenance,
id: FormId,
status: FormStatus,
) -> Result<FormDetail, FormError> {
@@ -440,10 +464,20 @@ where
confirmation_message: String::new(),
created_at: now,
updated_at: now,
+ is_hidden_in_drive: matches!(
+ provenance,
+ Provenance::OwnDatabase {
+ is_hidden_in_drive: true
+ }
+ ),
};
match self
.repository
- .create_form(&form, &layout, name_follows_database)
+ .create_form(
+ &form,
+ &layout,
+ matches!(provenance, Provenance::OwnDatabase { .. }),
+ )
.await
.map_err(repository_error)?
{
diff --git a/crates/forms/src/domain/service/test.rs b/crates/forms/src/domain/service/test.rs
index e884956f0f..d05bcb63f3 100644
--- a/crates/forms/src/domain/service/test.rs
+++ b/crates/forms/src/domain/service/test.rs
@@ -295,6 +295,7 @@ fn seed_rsvp(world: &Shared, audience: Audience) {
confirmation_message: "".into(),
created_at: now,
updated_at: now,
+ is_hidden_in_drive: false,
},
trashed_at: None,
name_follows_database: false,
diff --git a/crates/forms/src/domain/service/test/create.rs b/crates/forms/src/domain/service/test/create.rs
index cad4c91bad..652d71b9cf 100644
--- a/crates/forms/src/domain/service/test/create.rs
+++ b/crates/forms/src/domain/service/test/create.rs
@@ -98,6 +98,7 @@ async fn a_form_over_a_table_asks_every_column_and_adds_the_managed_ones() {
confirmation_message: "".into(),
created_at: start_of_tests(),
updated_at: start_of_tests(),
+ is_hidden_in_drive: false,
},
access: FormAccess::Owner,
table_gone: false,
@@ -293,7 +294,9 @@ async fn a_form_needs_a_name() {
viewer(OWNER),
CreateFormCommand {
name: " ".into(),
- source: CreateSource::NewDatabase,
+ source: CreateSource::NewDatabase {
+ is_hidden_in_drive: false,
+ },
},
)
.await;
@@ -303,7 +306,9 @@ async fn a_form_needs_a_name() {
viewer(OWNER),
CreateFormCommand {
name: "x".repeat(201),
- source: CreateSource::NewDatabase,
+ source: CreateSource::NewDatabase {
+ is_hidden_in_drive: false,
+ },
},
)
.await;
@@ -311,6 +316,25 @@ async fn a_form_needs_a_name() {
assert!(world.lock().unwrap().created_databases.is_empty());
}
+#[tokio::test]
+async fn a_form_over_a_new_database_can_stay_out_of_drive() {
+ let world = world();
+ let detail = service(&world)
+ .create_form(
+ viewer(OWNER),
+ CreateFormCommand {
+ name: "Lunch?".into(),
+ source: CreateSource::NewDatabase {
+ is_hidden_in_drive: true,
+ },
+ },
+ )
+ .await
+ .unwrap();
+ assert!(detail.form.is_hidden_in_drive);
+ assert!(world.lock().unwrap().forms[0].form.is_hidden_in_drive);
+}
+
#[tokio::test]
async fn a_new_database_whose_setup_fails_is_removed_and_no_form_is_left() {
let world = world();
@@ -320,7 +344,9 @@ async fn a_new_database_whose_setup_fails_is_removed_and_no_form_is_left() {
viewer(OWNER),
CreateFormCommand {
name: "Q4 offsite RSVP".into(),
- source: CreateSource::NewDatabase,
+ source: CreateSource::NewDatabase {
+ is_hidden_in_drive: false,
+ },
},
)
.await;
diff --git a/crates/forms/src/domain/service/test/end_to_end.rs b/crates/forms/src/domain/service/test/end_to_end.rs
index 2b908a633d..4353ca33ee 100644
--- a/crates/forms/src/domain/service/test/end_to_end.rs
+++ b/crates/forms/src/domain/service/test/end_to_end.rs
@@ -49,7 +49,9 @@ async fn a_form_over_a_new_database_writes_a_passing_response_as_a_row_and_stops
viewer(OWNER),
CreateFormCommand {
name: "Q4 offsite RSVP".into(),
- source: CreateSource::NewDatabase,
+ source: CreateSource::NewDatabase {
+ is_hidden_in_drive: false,
+ },
},
)
.await
@@ -79,6 +81,7 @@ async fn a_form_over_a_new_database_writes_a_passing_response_as_a_row_and_stops
confirmation_message: "".into(),
created_at: Utc.with_ymd_and_hms(2026, 9, 1, 9, 0, 0).unwrap(),
updated_at: Utc.with_ymd_and_hms(2026, 9, 1, 9, 0, 0).unwrap(),
+ is_hidden_in_drive: false,
},
access: FormAccess::Owner,
table_gone: false,
diff --git a/crates/forms/src/domain/service/test/layout.rs b/crates/forms/src/domain/service/test/layout.rs
index 4efedf6681..64117f132b 100644
--- a/crates/forms/src/domain/service/test/layout.rs
+++ b/crates/forms/src/domain/service/test/layout.rs
@@ -26,6 +26,7 @@ fn respondent_details_withhold_the_booking_destination() {
confirmation_message: "Thank you".into(),
created_at: start_of_tests(),
updated_at: start_of_tests(),
+ is_hidden_in_drive: false,
};
let layout = FormLayout {
sections: vec![FormSection::Booking {
diff --git a/crates/forms/src/domain/service/test/names.rs b/crates/forms/src/domain/service/test/names.rs
index 276a509157..d513d879a9 100644
--- a/crates/forms/src/domain/service/test/names.rs
+++ b/crates/forms/src/domain/service/test/names.rs
@@ -24,7 +24,9 @@ async fn create_standalone(world: &Shared) -> (FormId, DatabaseId) {
viewer(OWNER),
CreateFormCommand {
name: "Offsite RSVP".into(),
- source: CreateSource::NewDatabase,
+ source: CreateSource::NewDatabase {
+ is_hidden_in_drive: false,
+ },
},
)
.await
@@ -128,6 +130,7 @@ async fn which_name_a_new_form_goes_by_is_recorded_from_where_it_was_created() {
confirmation_message: "".into(),
created_at: start_of_tests(),
updated_at: start_of_tests(),
+ is_hidden_in_drive: false,
},
trashed_at: None,
name_follows_database: true,
diff --git a/crates/forms/src/inbound/axum_router/forms.rs b/crates/forms/src/inbound/axum_router/forms.rs
index dfef923f2e..de8c8c054f 100644
--- a/crates/forms/src/inbound/axum_router/forms.rs
+++ b/crates/forms/src/inbound/axum_router/forms.rs
@@ -50,7 +50,7 @@ where
{
let creator = viewer_of(&user);
let source = match request.source {
- FormSource::New => CreateSource::NewDatabase,
+ FormSource::New { is_hidden_in_drive } => CreateSource::NewDatabase { is_hidden_in_drive },
FormSource::Table {
database_id,
table_id,
diff --git a/crates/forms/src/inbound/axum_router/test/fakes.rs b/crates/forms/src/inbound/axum_router/test/fakes.rs
index bd44262112..23da59f633 100644
--- a/crates/forms/src/inbound/axum_router/test/fakes.rs
+++ b/crates/forms/src/inbound/axum_router/test/fakes.rs
@@ -245,6 +245,7 @@ pub(super) fn form() -> Form {
confirmation_message: "".into(),
created_at: at,
updated_at: at,
+ is_hidden_in_drive: false,
}
}
@@ -288,7 +289,7 @@ impl FormsService for RecordingForms {
command: CreateFormCommand,
) -> Result<FormDetail, FormError> {
let entity_id = match &command.source {
- crate::domain::ports::CreateSource::NewDatabase => String::new(),
+ crate::domain::ports::CreateSource::NewDatabase { .. } => String::new(),
crate::domain::ports::CreateSource::Table { receipt, .. } => {
receipt.entity().entity_id.clone()
}
diff --git a/crates/forms/src/outbound/pg_forms_repo.rs b/crates/forms/src/outbound/pg_forms_repo.rs
index b0db7b0e3f..b1b4bb8060 100644
--- a/crates/forms/src/outbound/pg_forms_repo.rs
+++ b/crates/forms/src/outbound/pg_forms_repo.rs
@@ -94,6 +94,7 @@ struct FormRow {
updated_at: DateTime<Utc>,
trashed_at: Option<DateTime<Utc>>,
name_follows_database: bool,
+ is_hidden_in_drive: bool,
}
impl TryFrom<FormRow> for StoredForm {
@@ -117,6 +118,7 @@ impl TryFrom<FormRow> for StoredForm {
confirmation_message: row.confirmation_message,
created_at: row.created_at,
updated_at: row.updated_at,
+ is_hidden_in_drive: row.is_hidden_in_drive,
},
trashed_at: row.trashed_at,
name_follows_database: row.name_follows_database,
@@ -163,9 +165,9 @@ impl crate::domain::ports::FormsRepo for PgFormsRepo {
id, name, description, owner_id, database_id, table_id,
submitted_column_id, respondent_column_id, audience, tally_visible,
status, closes_at, confirmation_message, created_at, updated_at,
- name_follows_database
+ name_follows_database, is_hidden_in_drive
)
- VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16)
+ VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17)
ON CONFLICT (table_id) DO NOTHING
"#,
form.id.into_uuid(),
@@ -184,6 +186,7 @@ impl crate::domain::ports::FormsRepo for PgFormsRepo {
form.created_at,
form.updated_at,
name_follows_database,
+ form.is_hidden_in_drive,
)
.execute(&mut *transaction)
.await;
@@ -230,7 +233,7 @@ impl crate::domain::ports::FormsRepo for PgFormsRepo {
SELECT id, name, description, owner_id, database_id, table_id,
submitted_column_id, respondent_column_id, audience, tally_visible,
status, closes_at, confirmation_message, created_at, updated_at, trashed_at,
- name_follows_database
+ name_follows_database, is_hidden_in_drive
FROM forms WHERE id = $1
"#,
id.into_uuid(),
@@ -250,7 +253,7 @@ impl crate::domain::ports::FormsRepo for PgFormsRepo {
SELECT id, name, description, owner_id, database_id, table_id,
submitted_column_id, respondent_column_id, audience, tally_visible,
status, closes_at, confirmation_message, created_at, updated_at, trashed_at,
- name_follows_database
+ name_follows_database, is_hidden_in_drive
FROM forms WHERE id = ANY($1) AND trashed_at IS NULL
ORDER BY id
"#,
@@ -283,7 +286,7 @@ impl crate::domain::ports::FormsRepo for PgFormsRepo {
SELECT id, name, description, owner_id, database_id, table_id,
submitted_column_id, respondent_column_id, audience, tally_visible,
status, closes_at, confirmation_message, created_at, updated_at, trashed_at,
- name_follows_database
+ name_follows_database, is_hidden_in_drive
FROM forms WHERE database_id = $1 AND trashed_at IS NULL
ORDER BY created_at, id
"#,
@@ -370,7 +373,7 @@ impl crate::domain::ports::FormsRepo for PgFormsRepo {
RETURNING id, name, description, owner_id, database_id, table_id,
submitted_column_id, respondent_column_id, audience, tally_visible,
status, closes_at, confirmation_message, created_at, updated_at, trashed_at,
- name_follows_database
+ name_follows_database, is_hidden_in_drive
"#,
id.into_uuid(),
changes.description.as_deref(),
@@ -404,7 +407,7 @@ impl crate::domain::ports::FormsRepo for PgFormsRepo {
RETURNING id, name, description, owner_id, database_id, table_id,
submitted_column_id, respondent_column_id, audience, tally_visible,
status, closes_at, confirmation_message, created_at, updated_at, trashed_at,
- name_follows_database
+ name_follows_database, is_hidden_in_drive
"#,
id.into_uuid(),
name,
@@ -430,7 +433,7 @@ impl crate::domain::ports::FormsRepo for PgFormsRepo {
RETURNING id, name, description, owner_id, database_id, table_id,
submitted_column_id, respondent_column_id, audience, tally_visible,
status, closes_at, confirmation_message, created_at, updated_at, trashed_at,
- name_follows_database
+ name_follows_database, is_hidden_in_drive
"#,
id.into_uuid(),
updated_at,
diff --git a/crates/forms/src/outbound/pg_forms_repo/test.rs b/crates/forms/src/outbound/pg_forms_repo/test.rs
index 6128878e18..22ac7f1d85 100644
--- a/crates/forms/src/outbound/pg_forms_repo/test.rs
+++ b/crates/forms/src/outbound/pg_forms_repo/test.rs
@@ -172,6 +172,7 @@ fn form_over(table: &Table) -> Form {
confirmation_message: "".into(),
created_at: at(9),
updated_at: at(9),
+ is_hidden_in_drive: false,
}
}
@@ -251,6 +252,30 @@ async fn a_created_form_reads_back_with_its_layout_and_owner_grant(pool: PgPool)
);
}
+#[sqlx::test(migrator = "MACRO_DB_MIGRATIONS")]
+async fn a_form_hidden_in_drive_stays_hidden_through_a_rename(pool: PgPool) {
+ let table = insert_table(&pool).await;
+ let repo = PgFormsRepo::new(pool.clone());
+ let form = Form {
+ is_hidden_in_drive: true,
+ ..form_over(&table)
+ };
+ repo.create_form(&form, &layout_over(&table), true)
+ .await
+ .unwrap();
+
+ assert_eq!(
+ repo.forms_by_ids(&[form.id]).await.unwrap(),
+ vec![form.clone()]
+ );
+ let renamed = repo
+ .rename_form(form.id, "Lunch?", at(12))
+ .await
+ .unwrap()
+ .unwrap();
+ assert!(renamed.is_hidden_in_drive);
+}
+
#[sqlx::test(migrator = "MACRO_DB_MIGRATIONS")]
async fn a_layout_is_replaced_whole_and_a_trashed_forms_is_not(pool: PgPool) {
let table = insert_table(&pool).await;
diff --git a/crates/forms/src/outbound/pg_forms_repo/test/drafts.rs b/crates/forms/src/outbound/pg_forms_repo/test/drafts.rs
index b7283c6d71..3d9c5ee4a9 100644
--- a/crates/forms/src/outbound/pg_forms_repo/test/drafts.rs
+++ b/crates/forms/src/outbound/pg_forms_repo/test/drafts.rs
@@ -21,6 +21,7 @@ async fn a_projection_commits_its_layout_and_revision_together(pool: PgPool) {
confirmation_message: "Thanks".into(),
created_at: at(9),
updated_at: at(9),
+ is_hidden_in_drive: false,
};
let layout = FormLayout {
sections: vec![FormSection::Questions {
diff --git a/crates/macro_db_client/migrations/20261019220350_forms_hidden_in_drive.sql b/crates/macro_db_client/migrations/20261019220350_forms_hidden_in_drive.sql
new file mode 100644
index 0000000000..99bc2807d4
--- /dev/null
+++ b/crates/macro_db_client/migrations/20261019220350_forms_hidden_in_drive.sql
@@ -0,0 +1,3 @@
+-- A form made in passing, such as a channel poll, stays out of its owner's
+-- Drive along with the database behind it. Set at creation.
+ALTER TABLE forms ADD COLUMN is_hidden_in_drive BOOLEAN NOT NULL DEFAULT FALSE;
diff --git a/crates/models_forms/src/form.rs b/crates/models_forms/src/form.rs
index fa5c1f44f5..39b0c34da7 100644
--- a/crates/models_forms/src/form.rs
+++ b/crates/models_forms/src/form.rs
@@ -129,6 +129,9 @@ pub struct Form {
pub created_at: DateTime<Utc>,
/// When its facts or layout last changed.
pub updated_at: DateTime<Utc>,
+ /// Whether Drive leaves it, and the database behind it, out of its
+ /// listings, as for a channel poll.
+ pub is_hidden_in_drive: bool,
}
impl Form {
@@ -161,7 +164,12 @@ pub struct CreateForm {
pub enum FormSource {
/// A new database named like the form, whose one table, "Responses",
/// starts with only the form's own columns.
- New,
+ New {
+ /// Keep the form, and the database made for it, out of Drive, as
+ /// for a channel poll.
+ #[serde(default, rename = "isHiddenInDrive")]
+ is_hidden_in_drive: bool,
+ },
/// An existing table in a database the caller owns. The form starts with a
/// question per column.
Table {
diff --git a/crates/models_forms/src/test.rs b/crates/models_forms/src/test.rs
index dd026e97cf..ff10ba7715 100644
--- a/crates/models_forms/src/test.rs
+++ b/crates/models_forms/src/test.rs
@@ -59,6 +59,7 @@ fn a_form_detail_reads_as_the_web_client_expects() {
confirmation_message: "".into(),
created_at: Utc.with_ymd_and_hms(2026, 9, 1, 9, 0, 0).unwrap(),
updated_at: Utc.with_ymd_and_hms(2026, 9, 2, 9, 0, 0).unwrap(),
+ is_hidden_in_drive: false,
},
access: FormAccess::Edit,
table_gone: false,
@@ -120,6 +121,7 @@ fn a_form_detail_reads_as_the_web_client_expects() {
"confirmationMessage": "",
"createdAt": "2026-09-01T09:00:00Z",
"updatedAt": "2026-09-02T09:00:00Z",
+ "isHiddenInDrive": false,
},
"access": "edit",
"tableGone": false,
@@ -236,7 +238,23 @@ fn a_layout_put_reads_sections_by_kind_and_a_missing_widget_as_default() {
fn a_create_request_names_its_source_by_kind() {
let new: CreateForm =
serde_json::from_value(json!({"name": "RSVP", "source": {"kind": "new"}})).unwrap();
- assert_eq!(new.source, FormSource::New);
+ assert_eq!(
+ new.source,
+ FormSource::New {
+ is_hidden_in_drive: false
+ }
+ );
+
+ let hidden: CreateForm = serde_json::from_value(
+ json!({"name": "Lunch?", "source": {"kind": "new", "isHiddenInDrive": true}}),
+ )
+ .unwrap();
+ assert_eq!(
+ hidden.source,
+ FormSource::New {
+ is_hidden_in_drive: true
+ }
+ );
let table: CreateForm = serde_json::from_value(json!({
"name": "RSVP",
@@ -393,6 +411,7 @@ fn a_form_takes_responses_while_open_and_before_it_closes() {
confirmation_message: "".into(),
created_at: now,
updated_at: now,
+ is_hidden_in_drive: false,
};
assert!(form(FormStatus::Open, None).accepts_responses_at(now));
assert!(
@@ -422,6 +441,7 @@ fn a_listed_form_names_the_callers_access_beside_the_form() {
confirmation_message: "Thanks".into(),
created_at: now,
updated_at: now,
+ is_hidden_in_drive: false,
},
access: FormAccess::View,
};
@@ -444,6 +464,7 @@ fn a_listed_form_names_the_callers_access_beside_the_form() {
"confirmationMessage": "Thanks",
"createdAt": "2026-09-01T09:00:00Z",
"updatedAt": "2026-09-01T09:00:00Z",
+ "isHiddenInDrive": false,
},
"access": "view",
})
@@ -509,6 +530,7 @@ fn form_and_response_schemas_require_every_field_they_always_serialize() {
confirmation_message: "".into(),
created_at: now,
updated_at: now,
+ is_hidden_in_drive: false,
};
let response = FormResponse {
id: FormResponseId::from_uuid(Uuid::from_u128(0xe1)),
diff --git a/packages/sdk-docs/reference/generated/storage/types.gen/type-aliases/Form.md b/packages/sdk-docs/reference/generated/storage/types.gen/type-aliases/Form.md
index 8a2421d691..4b7ba403c9 100644
--- a/packages/sdk-docs/reference/generated/storage/types.gen/type-aliases/Form.md
+++ b/packages/sdk-docs/reference/generated/storage/types.gen/type-aliases/Form.md
@@ -1,6 +1,6 @@
# Type Alias: Form
-> **Form** = \{ `audience`: [`Audience`](Audience.md); `closesAt`: `string` \| `null`; `confirmationMessage`: `string`; `createdAt`: `string`; `databaseId`: `string`; `description`: `string`; `id`: `string`; `name`: `string`; `ownerId`: `string`; `respondentColumnId`: `string` \| `null`; `status`: [`FormStatus`](FormStatus.md); `submittedColumnId`: `string` \| `null`; `tableId`: `string`; `tallyVisible`: `boolean`; `updatedAt`: `string`; \}
+> **Form** = \{ `audience`: [`Audience`](Audience.md); `closesAt`: `string` \| `null`; `confirmationMessage`: `string`; `createdAt`: `string`; `databaseId`: `string`; `description`: `string`; `id`: `string`; `isHiddenInDrive`: `boolean`; `name`: `string`; `ownerId`: `string`; `respondentColumnId`: `string` \| `null`; `status`: [`FormStatus`](FormStatus.md); `submittedColumnId`: `string` \| `null`; `tableId`: `string`; `tallyVisible`: `boolean`; `updatedAt`: `string`; \}
A form: a view of one database table whose rows are its responses.
@@ -15,6 +15,7 @@ A form: a view of one database table whose rows are its responses.
| <a id="property-databaseid"></a> `databaseId` | `string` | The database holding its responses. |
| <a id="property-description"></a> `description` | `string` | What respondents read under the name. |
| <a id="property-id"></a> `id` | `string` | The form. |
+| <a id="property-ishiddenindrive"></a> `isHiddenInDrive` | `boolean` | Whether Drive leaves it, and the database behind it, out of its listings, as for a channel poll. |
| <a id="property-name"></a> `name` | `string` | Its display name. A standalone form follows the database it created; a form attached to an existing table has its own name. |
| <a id="property-ownerid"></a> `ownerId` | `string` | Its owner. |
| <a id="property-respondentcolumnid"></a> `respondentColumnId` | `string` \| `null` | The person column each signed-in submission names its respondent in; `null` once deleted. |
diff --git a/packages/sdk-docs/reference/generated/storage/types.gen/type-aliases/FormSource.md b/packages/sdk-docs/reference/generated/storage/types.gen/type-aliases/FormSource.md
index e467ea0276..be5a0f77d1 100644
--- a/packages/sdk-docs/reference/generated/storage/types.gen/type-aliases/FormSource.md
+++ b/packages/sdk-docs/reference/generated/storage/types.gen/type-aliases/FormSource.md
@@ -1,6 +1,6 @@
# Type Alias: FormSource
-> **FormSource** = \{ `kind`: `"new"`; \} \| \{ `databaseId`: `string`; `kind`: `"table"`; `tableId`: `string`; \}
+> **FormSource** = \{ `isHiddenInDrive?`: `boolean`; `kind`: `"new"`; \} \| \{ `databaseId`: `string`; `kind`: `"table"`; `tableId`: `string`; \}
Where a new form's responses go.
@@ -8,7 +8,12 @@ Where a new form's responses go.
### Type Literal
-\{ `kind`: `"new"`; \}
+\{ `isHiddenInDrive?`: `boolean`; `kind`: `"new"`; \}
+
+| Name | Type | Description |
+| ------ | ------ | ------ |
+| `isHiddenInDrive?` | `boolean` | Keep the form, and the database made for it, out of Drive, as for a channel poll. |
+| `kind` | `"new"` | - |
***
diff --git a/packages/sdk/generated/storage/types.gen.ts b/packages/sdk/generated/storage/types.gen.ts
index c8701c703b..bb6d568a08 100644
--- a/packages/sdk/generated/storage/types.gen.ts
+++ b/packages/sdk/generated/storage/types.gen.ts
@@ -6686,6 +6686,11 @@ export type Form = {
* The form.
*/
id: string;
+ /**
+ * Whether Drive leaves it, and the database behind it, out of its
+ * listings, as for a channel poll.
+ */
+ isHiddenInDrive: boolean;
/**
* Its display name. A standalone form follows the database it created;
* a form attached to an existing table has its own name.
@@ -7025,6 +7030,11 @@ export type FormSectionDetail = {
* Where a new form's responses go.
*/
export type FormSource = {
+ /**
+ * Keep the form, and the database made for it, out of Drive, as
+ * for a channel poll.
+ */
+ isHiddenInDrive?: boolean;
kind: 'new';
} | {
/**
diff --git a/packages/sdk/specs/storage.json b/packages/sdk/specs/storage.json
index 788707c4f6..321a0bb121 100644
--- a/packages/sdk/specs/storage.json
+++ b/packages/sdk/specs/storage.json
@@ -28870,7 +28870,8 @@
"closesAt",
"confirmationMessage",
"createdAt",
- "updatedAt"
+ "updatedAt",
+ "isHiddenInDrive"
],
"properties": {
"audience": {
@@ -28905,6 +28906,10 @@
"format": "uuid",
"description": "The form."
},
+ "isHiddenInDrive": {
+ "type": "boolean",
+ "description": "Whether Drive leaves it, and the database behind it, out of its\nlistings, as for a channel poll."
+ },
"name": {
"type": "string",
"description": "Its display name. A standalone form follows the database it created;\na form attached to an existing table has its own name."
@@ -29452,6 +29457,10 @@
"description": "A new database named like the form, whose one table, \"Responses\",\nstarts with only the form's own columns.",
"required": ["kind"],
"properties": {
+ "isHiddenInDrive": {
+ "type": "boolean",
+ "description": "Keep the form, and the database made for it, out of Drive, as\nfor a channel poll."
+ },
"kind": {
"type": "string",
"enum": ["new"]