Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .changeset/22079-publiclink-describe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
'@objectstack/spec': patch
---

The `sharing.publicLink` describe says the value is a slug and names where it is served

Clause-②: no

`FormView.sharing.publicLink` described itself as a "Generated public share URL". It is
neither: the author chooses it, nothing generates it, and the server reads it as a slug, where
`/forms/x`, `forms/x` and `x` name one slug, `x` (`publicFormSlug`). The describe now says so,
and names where an anonymous visitor reaches the form while `enabled` and `allowAnonymous` are
both true: the REST form door `GET /api/v1/forms/:slug` (on the default API base), and, on a
host that serves the console, the console page `/_console/f/:slug`, with `/forms/:slug`
redirected there and its query string carried. The generated `ui/sharing` and `ui/view`
reference pages carry the new text. Describe text only: the accepted values, keys, types and
exports do not change.
2 changes: 1 addition & 1 deletion content/docs/references/ui/sharing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const result = SharingConfigSchema.parse(data);
| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **enabled** | `boolean` | optional (default: `false`) | Enable public sharing |
| **publicLink** | `string` | optional | Generated public share URL |
| **publicLink** | `string` | optional | Public slug of the form, chosen by the author: not a URL, and never generated. `/forms/x`, `forms/x` and `x` name one slug, `x`. It is served to anonymous visitors only while `enabled` and `allowAnonymous` are both true: the REST form door answers `GET /api/v1/forms/:slug` (default API base), and a host that serves the console shows the form at `/_console/f/:slug` and redirects `/forms/:slug` there, query string carried. |
| **password** | `string` | optional | Password required to access shared link |
| **allowedDomains** | `string[]` | optional | Restrict access to specific email domains (e.g. ["example.com"]) |
| **expiresAt** | `string` | optional | Expiration date/time in ISO 8601 format |
Expand Down
2 changes: 1 addition & 1 deletion content/docs/references/ui/view.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ Form-view select option — the object-field option shape minus the per-option `
| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **enabled** | `boolean` | optional (default: `false`) | Enable public sharing |
| **publicLink** | `string` | optional | Generated public share URL |
| **publicLink** | `string` | optional | Public slug of the form, chosen by the author: not a URL, and never generated. `/forms/x`, `forms/x` and `x` name one slug, `x`. It is served to anonymous visitors only while `enabled` and `allowAnonymous` are both true: the REST form door answers `GET /api/v1/forms/:slug` (default API base), and a host that serves the console shows the form at `/_console/f/:slug` and redirects `/forms/:slug` there, query string carried. |
| **password** | `string` | optional | Password required to access shared link |
| **allowedDomains** | `string[]` | optional | Restrict access to specific email domains (e.g. ["example.com"]) |
| **expiresAt** | `string` | optional | Expiration date/time in ISO 8601 format |
Expand Down
8 changes: 7 additions & 1 deletion packages/spec/src/ui/sharing.zod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,13 @@ export const SharingConfigSchema = lazySchema(() => strictObject({
},
}, {
enabled: z.boolean().default(false).describe('Enable public sharing'),
publicLink: z.string().optional().describe('Generated public share URL'),
publicLink: z.string().optional().describe(
'Public slug of the form, chosen by the author: not a URL, and never generated. '
+ '`/forms/x`, `forms/x` and `x` name one slug, `x`. It is served to anonymous visitors only while '
+ '`enabled` and `allowAnonymous` are both true: the REST form door answers `GET /api/v1/forms/:slug` '
+ '(default API base), and a host that serves the console shows the form at `/_console/f/:slug` and '
+ 'redirects `/forms/:slug` there, query string carried.',
),
password: z.string().optional().describe('Password required to access shared link'),
allowedDomains: z.array(z.string()).optional()
.describe('Restrict access to specific email domains (e.g. ["example.com"])'),
Expand Down
Loading