Skip to content

Commit 29b8b4a

Browse files
committed
feat(files): unify document read subscriptions and write capabilities
1 parent b4ea155 commit 29b8b4a

17 files changed

Lines changed: 932 additions & 259 deletions

File tree

‎apps/docs/content/docs/cli/projects.mdx‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ sim projects files list <projectId> [options]
6868
| `--no-recursive` | No | Send --recursive as false. |
6969
| `--scope <value>` | No | Which lifecycle set to list: `active` (default) for live files, `archived` for files a delete soft-deleted. `folderPath` resolves against active folders only, so pairing it with `scope=archived` returns an empty page when the containing folder was archived too. Accepted values: `active`, `archived`. |
7070
| `--search <value>` | No | Case-insensitive substring match against the file name. |
71-
| `--sort-by <value>` | No | Field used to sort the result. Sorting by `name` is case-sensitive and follows the storage collation, so do not rely on a case-insensitive order. Defaults to "uploadedAt". Accepted values: `name`, `size`, `uploadedAt`, `updatedAt`. |
71+
| `--sort-by <value>` | No | Field used to sort the result. Do not rely on case-insensitive ordering when sorting by `name`. Defaults to "uploadedAt". Accepted values: `name`, `size`, `uploadedAt`, `updatedAt`. |
7272
| `--sort-order <value>` | No | Sort direction. Defaults to "asc". Accepted values: `asc`, `desc`. |
7373
| `--limit <n>` | No | Maximum items to return (0 for everything). Defaults to `100`. |
7474
| `--cursor <value>` | No | Continue from nextCursor returned by a previous result. |
@@ -180,7 +180,7 @@ sim projects files create <projectId> [options]
180180
| --- | --- | --- |
181181
| `--name <value>` | Yes | File name, including its extension. Path separators and dot segments are rejected. |
182182
| `--content-type <value>` | No | MIME type. When omitted, it is inferred from the file extension. |
183-
| `--content <value>` | No | Initial file content. Omit or send an empty string for a zero-byte file. The 70,000,000-character bound guards the JSON envelope; the decoded bytes must be at most 50 MiB, and a longer base64 payload is rejected with `413`. Use an upload session for anything larger. Defaults to "". |
183+
| `--content <value>` | No | Initial file content. Omit or send an empty string for a zero-byte file. The complete JSON request is capped at 10 MiB, including UTF-8 encoding, escaping, base64, and the envelope. The separate decoded-file limit is 50 MiB. Use an upload session for larger payloads. Defaults to "". |
184184
| `--encoding <value>` | No | Encoding of the content field. Defaults to "utf-8". Accepted values: `utf-8`, `base64`. |
185185
| `--folder <value>` | No | Folder path as shown in the app; the leading / is optional. |
186186

@@ -309,7 +309,7 @@ sim projects files versions revert <projectId> <fileId> <version> [options]
309309
| Option | Required | Description |
310310
| --- | --- | --- |
311311
| `--expected-current-version <value>` | No | Revert only while this is still the current version; otherwise the request fails with `409`. Omit to revert whatever is current. Collaborative edits and repeated workflow writes that fold into the current version keep its number, so prefer `expectedRevision` to guard content. |
312-
| `--expected-revision <value>` | No | Revert only while the file still holds the content this revision names, as returned by Get File Metadata or an earlier write; otherwise the request fails with `409`. Unlike a version number, it also catches edits that folded into the current version. |
312+
| `--expected-revision <value>` | No | Revert only while the file still holds the content this revision names, as returned by Get file metadata or an earlier write; otherwise the request fails with `409`. Unlike a version number, it also catches edits that folded into the current version. |
313313

314314
</CommandTable>
315315

@@ -513,9 +513,9 @@ sim projects files set-content <projectId> <fileId> [options]
513513

514514
| Option | Required | Description |
515515
| --- | --- | --- |
516-
| `--content <value>` | Yes | Complete replacement content for the file. The 70,000,000-character bound guards the JSON envelope; the decoded bytes must be at most 50 MiB, and a longer base64 payload is rejected with `413`. |
516+
| `--content <value>` | Yes | Complete replacement content for the file. The complete JSON request is capped at 10 MiB, including UTF-8 encoding, escaping, base64, and the envelope. The separate decoded-file limit is 50 MiB. Small patches can edit a larger stored text file without sending its full content. |
517517
| `--encoding <value>` | No | Content encoding. Defaults to "utf-8". Accepted values: `utf-8`, `base64`. |
518-
| `--expected-revision <value>` | No | Revision from Get File Metadata or an earlier write; the request is refused with `409` when the content moved on. |
518+
| `--expected-revision <value>` | No | Revision from Get file metadata or an earlier write; the request is refused with `409` when the content moved on. |
519519

520520
</CommandTable>
521521

‎apps/docs/content/docs/cli/reference.mdx‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4804,7 +4804,7 @@ sim projects files create <projectId> [options]
48044804
| --- | --- | --- |
48054805
| `--name <value>` | Yes | File name, including its extension. Path separators and dot segments are rejected. |
48064806
| `--content-type <value>` | No | MIME type. When omitted, it is inferred from the file extension. |
4807-
| `--content <value>` | No | Initial file content. Omit or send an empty string for a zero-byte file. The 70,000,000-character bound guards the JSON envelope; the decoded bytes must be at most 50 MiB, and a longer base64 payload is rejected with `413`. Use an upload session for anything larger. Defaults to "". |
4807+
| `--content <value>` | No | Initial file content. Omit or send an empty string for a zero-byte file. The complete JSON request is capped at 10 MiB, including UTF-8 encoding, escaping, base64, and the envelope. The separate decoded-file limit is 50 MiB. Use an upload session for larger payloads. Defaults to "". |
48084808
| `--encoding <value>` | No | Encoding of the content field. Defaults to "utf-8". Accepted values: `utf-8`, `base64`. |
48094809
| `--folder <value>` | No | Folder path as shown in the app; the leading / is optional. |
48104810

@@ -5044,7 +5044,7 @@ sim projects files versions revert <projectId> <fileId> <version> [options]
50445044
| Option | Required | Description |
50455045
| --- | --- | --- |
50465046
| `--expected-current-version <value>` | No | Revert only while this is still the current version; otherwise the request fails with `409`. Omit to revert whatever is current. Collaborative edits and repeated workflow writes that fold into the current version keep its number, so prefer `expectedRevision` to guard content. |
5047-
| `--expected-revision <value>` | No | Revert only while the file still holds the content this revision names, as returned by Get File Metadata or an earlier write; otherwise the request fails with `409`. Unlike a version number, it also catches edits that folded into the current version. |
5047+
| `--expected-revision <value>` | No | Revert only while the file still holds the content this revision names, as returned by Get file metadata or an earlier write; otherwise the request fails with `409`. Unlike a version number, it also catches edits that folded into the current version. |
50485048

50495049
</CommandTable>
50505050

@@ -5133,7 +5133,7 @@ sim projects files list <projectId> [options]
51335133
| `--no-recursive` | No | Send --recursive as false. |
51345134
| `--scope <value>` | No | Which lifecycle set to list: `active` (default) for live files, `archived` for files a delete soft-deleted. `folderPath` resolves against active folders only, so pairing it with `scope=archived` returns an empty page when the containing folder was archived too. Accepted values: `active`, `archived`. |
51355135
| `--search <value>` | No | Case-insensitive substring match against the file name. |
5136-
| `--sort-by <value>` | No | Field used to sort the result. Sorting by `name` is case-sensitive and follows the storage collation, so do not rely on a case-insensitive order. Defaults to "uploadedAt". Accepted values: `name`, `size`, `uploadedAt`, `updatedAt`. |
5136+
| `--sort-by <value>` | No | Field used to sort the result. Do not rely on case-insensitive ordering when sorting by `name`. Defaults to "uploadedAt". Accepted values: `name`, `size`, `uploadedAt`, `updatedAt`. |
51375137
| `--sort-order <value>` | No | Sort direction. Defaults to "asc". Accepted values: `asc`, `desc`. |
51385138
| `--limit <n>` | No | Maximum items to return (0 for everything). Defaults to `100`. |
51395139
| `--cursor <value>` | No | Continue from nextCursor returned by a previous result. |
@@ -5251,9 +5251,9 @@ sim projects files set-content <projectId> <fileId> [options]
52515251

52525252
| Option | Required | Description |
52535253
| --- | --- | --- |
5254-
| `--content <value>` | Yes | Complete replacement content for the file. The 70,000,000-character bound guards the JSON envelope; the decoded bytes must be at most 50 MiB, and a longer base64 payload is rejected with `413`. |
5254+
| `--content <value>` | Yes | Complete replacement content for the file. The complete JSON request is capped at 10 MiB, including UTF-8 encoding, escaping, base64, and the envelope. The separate decoded-file limit is 50 MiB. Small patches can edit a larger stored text file without sending its full content. |
52555255
| `--encoding <value>` | No | Content encoding. Defaults to "utf-8". Accepted values: `utf-8`, `base64`. |
5256-
| `--expected-revision <value>` | No | Revision from Get File Metadata or an earlier write; the request is refused with `409` when the content moved on. |
5256+
| `--expected-revision <value>` | No | Revision from Get file metadata or an earlier write; the request is refused with `409` when the content moved on. |
52575257

52585258
</CommandTable>
52595259

0 commit comments

Comments
 (0)