diff --git a/.changeset/22079-publiclink-describe.md b/.changeset/22079-publiclink-describe.md new file mode 100644 index 00000000000..3cabe9d8e39 --- /dev/null +++ b/.changeset/22079-publiclink-describe.md @@ -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. diff --git a/content/docs/references/ui/sharing.mdx b/content/docs/references/ui/sharing.mdx index 06bf01903cd..6c8af4e8eab 100644 --- a/content/docs/references/ui/sharing.mdx +++ b/content/docs/references/ui/sharing.mdx @@ -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 | diff --git a/content/docs/references/ui/view.mdx b/content/docs/references/ui/view.mdx index 4de6caa9d3d..f3b26251a7b 100644 --- a/content/docs/references/ui/view.mdx +++ b/content/docs/references/ui/view.mdx @@ -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 | diff --git a/packages/spec/src/ui/sharing.zod.ts b/packages/spec/src/ui/sharing.zod.ts index 945b0a62bf6..f23cdd48460 100644 --- a/packages/spec/src/ui/sharing.zod.ts +++ b/packages/spec/src/ui/sharing.zod.ts @@ -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"])'),