@omelhorsite/sdk 0.3.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/README.md +113 -131
  2. package/dist/index.js +1049 -1246
  3. package/dist/types/auth/device.d.ts +1 -1
  4. package/dist/types/auth/index.d.ts +2 -2
  5. package/dist/types/auth/tokens.d.ts +15 -15
  6. package/dist/types/client.d.ts +10 -10
  7. package/dist/types/errors.d.ts +12 -15
  8. package/dist/types/http.d.ts +74 -118
  9. package/dist/types/index.d.ts +2 -2
  10. package/dist/types/internal/attachments.d.ts +17 -0
  11. package/dist/types/internal/helpers.d.ts +9 -0
  12. package/dist/types/listing.d.ts +90 -0
  13. package/dist/types/local/qr.d.ts +1 -1
  14. package/dist/types/local/wordlist.d.ts +2 -3
  15. package/dist/types/resources/account.d.ts +19 -19
  16. package/dist/types/resources/admin/authorizedApplications.d.ts +133 -0
  17. package/dist/types/resources/admin/chests.d.ts +51 -0
  18. package/dist/types/resources/admin/eventAlerts.d.ts +60 -0
  19. package/dist/types/resources/admin/identities.d.ts +99 -0
  20. package/dist/types/resources/admin/index.d.ts +77 -0
  21. package/dist/types/resources/admin/jobs.d.ts +97 -0
  22. package/dist/types/resources/admin/myOauthApplications.d.ts +282 -0
  23. package/dist/types/resources/admin/notepads.d.ts +49 -0
  24. package/dist/types/resources/admin/oauthApplications.d.ts +309 -0
  25. package/dist/types/resources/admin/quotas.d.ts +114 -0
  26. package/dist/types/resources/admin/shortLinks.d.ts +201 -0
  27. package/dist/types/resources/admin/types.d.ts +222 -0
  28. package/dist/types/resources/admin/vocalSeparations.d.ts +98 -0
  29. package/dist/types/resources/admin.d.ts +17 -13
  30. package/dist/types/resources/auth/index.d.ts +1 -1
  31. package/dist/types/resources/auth/passkeys.d.ts +127 -163
  32. package/dist/types/resources/auth/sessions.d.ts +116 -161
  33. package/dist/types/resources/chests.d.ts +27 -31
  34. package/dist/types/resources/content/analysis.d.ts +62 -0
  35. package/dist/types/resources/content/blogs.d.ts +471 -0
  36. package/dist/types/resources/content/feedbacks.d.ts +263 -0
  37. package/dist/types/resources/content/index.d.ts +52 -0
  38. package/dist/types/resources/content/intel/articles.d.ts +230 -0
  39. package/dist/types/resources/content/intel/config.d.ts +135 -0
  40. package/dist/types/resources/content/intel/index.d.ts +53 -0
  41. package/dist/types/resources/content/intel/items.d.ts +91 -0
  42. package/dist/types/resources/content/intel/reports.d.ts +108 -0
  43. package/dist/types/resources/content/intel/scripts.d.ts +152 -0
  44. package/dist/types/resources/content/intel/sources.d.ts +236 -0
  45. package/dist/types/resources/content/intel/stats.d.ts +105 -0
  46. package/dist/types/resources/content/intel/types.d.ts +86 -0
  47. package/dist/types/resources/content/jokes.d.ts +93 -0
  48. package/dist/types/resources/content/notifications.d.ts +147 -0
  49. package/dist/types/resources/content/serviceUsages.d.ts +73 -0
  50. package/dist/types/resources/content/servicesStatus.d.ts +194 -0
  51. package/dist/types/resources/content/siteConfig.d.ts +43 -0
  52. package/dist/types/resources/content/spaceInvaders.d.ts +154 -0
  53. package/dist/types/resources/content.d.ts +41 -236
  54. package/dist/types/resources/dynamicQrs.d.ts +29 -45
  55. package/dist/types/resources/forms.d.ts +37 -58
  56. package/dist/types/resources/jobs.d.ts +35 -44
  57. package/dist/types/resources/library/annotations.d.ts +162 -0
  58. package/dist/types/resources/library/books.d.ts +534 -0
  59. package/dist/types/resources/library/chat.d.ts +259 -0
  60. package/dist/types/resources/library/index.d.ts +39 -0
  61. package/dist/types/resources/library/shelves.d.ts +237 -0
  62. package/dist/types/resources/library/types.d.ts +120 -0
  63. package/dist/types/resources/library.d.ts +20 -22
  64. package/dist/types/resources/media.d.ts +48 -61
  65. package/dist/types/resources/movies/addons.d.ts +388 -0
  66. package/dist/types/resources/movies/collections.d.ts +352 -0
  67. package/dist/types/resources/movies/index.d.ts +29 -0
  68. package/dist/types/resources/movies/types.d.ts +50 -0
  69. package/dist/types/resources/movies/watchProgress.d.ts +277 -0
  70. package/dist/types/resources/movies.d.ts +27 -53
  71. package/dist/types/resources/music/artists.d.ts +182 -246
  72. package/dist/types/resources/music/imports.d.ts +190 -218
  73. package/dist/types/resources/music/index.d.ts +8 -7
  74. package/dist/types/resources/music/playlists.d.ts +85 -117
  75. package/dist/types/resources/music/social.d.ts +153 -228
  76. package/dist/types/resources/music/songs.d.ts +165 -227
  77. package/dist/types/resources/realtime.d.ts +75 -88
  78. package/dist/types/resources/shortLinks.d.ts +38 -47
  79. package/dist/types/resources/social/groupChats.d.ts +458 -0
  80. package/dist/types/resources/social/index.d.ts +19 -0
  81. package/dist/types/resources/social/messages.d.ts +424 -0
  82. package/dist/types/resources/social/relationships.d.ts +322 -0
  83. package/dist/types/resources/social/types.d.ts +37 -0
  84. package/dist/types/resources/social.d.ts +21 -3
  85. package/dist/types/resources/storage/upload.d.ts +42 -56
  86. package/dist/types/resources/storage.d.ts +94 -109
  87. package/dist/types/resources/tickets.d.ts +19 -10
  88. package/dist/types/resources/tools/backgroundRemoval.d.ts +11 -13
  89. package/dist/types/resources/tools/captions.d.ts +107 -135
  90. package/dist/types/resources/tools/upscale.d.ts +12 -16
  91. package/dist/types/types.d.ts +29 -38
  92. package/package.json +1 -1
@@ -1,48 +1,47 @@
1
1
  /**
2
2
  * The `storage` namespace: the virtual filesystem.
3
3
  *
4
- * A node is a file or a directory, identified by an opaque id. Since the ltree
5
- * migration the id IS the address: there is no `path` column any more, and
6
- * navigation goes parent id -> children, with `ancestors()` for a breadcrumb.
7
- * Never build or parse a path string.
4
+ * A node is a file or a directory, identified by an opaque id. The id IS the
5
+ * address: a node carries no path, and navigation goes parent id -> children,
6
+ * with `ancestors()` for a breadcrumb. Never build or parse a path string.
8
7
  *
9
8
  * {@link StorageNamespace.resolvePath} exists for humans typing `docs/a.pdf`,
10
9
  * and it is exactly what it looks like: one request per segment, walking
11
- * `name` + `parent_id` down the filtered index. It memoises what it learns per
12
- * client instance so a CLI session does not re-walk the same prefix, but the
13
- * cheap call is always the one that already has an id.
10
+ * `name` + `parent_id` down a filtered listing. It memoises what it learns per
11
+ * client instance so a second walk down the same prefix is free, but the cheap
12
+ * call is always the one that already has an id.
14
13
  *
15
14
  * Uploads do NOT stream through this namespace. Bytes go straight to object
16
- * storage with a presigned URL; Rails only mints the plan and, at the end,
15
+ * storage with a presigned URL; the API only mints the plan and, at the end,
17
16
  * binds the blob. That whole dance lives in `storage/upload.ts` and is reached
18
17
  * through {@link StorageNamespace.upload}.
19
18
  *
20
- * Four throttles bound what this namespace can do, and they are far tighter
19
+ * Three rate limits bound what this namespace can do, and two are far tighter
21
20
  * than the API's general ceiling:
22
21
  *
23
- * - `fs_upload` - 300/min for the whole upload control plane. Paced by
22
+ * - 300 requests a minute for the whole upload control plane. Paced by
24
23
  * {@link UploadManager}.
25
- * - `fs_bulk_job` - TWELVE a minute for `copy`, `createDirectories`,
26
- * `emptyTrash` and `trash` together. Paced by {@link StorageNamespace.bulkGate}.
27
- * - the general 600/min for everything else.
28
- * - the direct PUTs at the object store, which rack-attack never sees at all.
24
+ * - TWELVE a minute for `copy`, `createDirectories`, `emptyTrash` and `trash`
25
+ * together. Paced by {@link StorageNamespace.bulkGate}.
26
+ * - the general 600 a minute for everything else.
27
+ *
28
+ * The direct PUTs at the object store are not rate limited by the API.
29
29
  */
30
30
  /**
31
31
  * The server's null sentinel: U+0008, a literal backspace.
32
32
  *
33
- * `CrudActions` rewrites any filter value equal to it before the query layer
34
- * ever sees it - `transform_values! { |v| v == "\b" ? nil : v }`, applied to
35
- * every option bag, not just to `exact_search`. Through `exact_search` that is
36
- * exactly what is wanted: `where(parent_id: nil)`, the root nodes.
33
+ * The server reads any filter value equal to it as `null`, in every option
34
+ * bag. Through `exact_search[parent_id]` that is exactly what is wanted: the
35
+ * nodes with no parent, i.e. the roots.
37
36
  *
38
- * Through `extra_options` the same rewrite is a trap, because
39
- * `QueryExtraOptions::FsNodes` opens with
40
- * `return unless params[:parent_id].present?` and `nil` is not present, so the
41
- * filter is dropped without a word. {@link StorageNamespace.list} is built
42
- * around that difference; do not collapse the two filters back together.
37
+ * Through `extra_options[parent_id]` the same value is a trap: a `null` there
38
+ * counts as no filter at all, and the filter is dropped without a word.
39
+ * {@link StorageNamespace.list} is built around that difference; do not
40
+ * collapse the two filters back together.
43
41
  */
44
42
  import { type ApiClient, Resource } from "../http";
45
- import type { BaseRecord, FileOutput, Id, OperationOptions, Paginated, PageParams, RequestOptions } from "../types";
43
+ import type { ListParams } from "../listing";
44
+ import type { BaseRecord, FileOutput, Id, OperationOptions, Paginated, RequestOptions } from "../types";
46
45
  import type { User } from "./account";
47
46
  import { StorageRateGate, UploadManager } from "./storage/upload";
48
47
  import type { UploadInput } from "./storage/upload";
@@ -51,27 +50,14 @@ export type FsNodeKind = "file" | "directory";
51
50
  /**
52
51
  * A node in the virtual filesystem.
53
52
  *
54
- * This is the WHOLE record, and it was checked against the blueprint CHAIN
55
- * rather than against the table, because those two disagree.
56
- * `FsNodeBlueprint` declares `name`, `parent_id`, `kind`, `size`,
57
- * `max_size`; it extends `ApplicationBlueprint`, which contributes `id`,
58
- * `created_at` and `updated_at`; and its `:extended` view has an EMPTY body,
59
- * which in Blueprinter inherits the base fields rather than emitting nothing.
60
- * So `list`, `get`, `create` and `update` all answer the same eight fields.
61
- * Reading a view name and assuming it adds something has already produced bugs
62
- * in this repo - follow the `<` before deciding a field does or does not exist.
63
- *
64
- * The `fs_nodes` TABLE is wider than that, and the difference is never sent:
65
- * `creator_id`, `updater_id`, `destroyer_id`, `signed_url_generated`,
66
- * `is_vault_root` and the `id_path` ltree are all real columns that appear in
67
- * no view. Declaring them client-side is worse than leaving them out, because
68
- * every later reader then believes they arrive.
53
+ * This is the WHOLE record: `list`, `get`, `create` and `update` all answer
54
+ * the same eight fields.
69
55
  *
70
- * There is no `data` and no `url` field either: bytes are reached through
56
+ * There is no `data` and no `url` field: bytes are reached through
71
57
  * {@link StorageNamespace.download}, {@link StorageNamespace.downloadStream} or
72
58
  * {@link StorageNamespace.downloadUrl}, never off the record. And no
73
59
  * `content_type` and no `path` - the type is decided from the name at download
74
- * time, and the `path` column was dropped in the ltree migration.
60
+ * time, and a node is addressed by id.
75
61
  */
76
62
  export interface FsNode extends BaseRecord {
77
63
  readonly name: string;
@@ -100,10 +86,8 @@ export interface FsRoots {
100
86
  * A bulk operation the server runs in the background.
101
87
  *
102
88
  * `copy`, `createDirectories`, `trash` and `emptyTrash` all answer with nothing
103
- * but a job id: the work happens in a worker and the response says only that it
104
- * was enqueued. Poll it with `oms.jobs.wait(jobId)`; this namespace has no
105
- * access to the jobs namespace and deliberately does not grow a second polling
106
- * loop.
89
+ * but a job id: the response says only that the work was enqueued. Poll it
90
+ * with `oms.jobs.wait(jobId)`.
107
91
  */
108
92
  export interface FsBulkJob {
109
93
  /** Feed this to `oms.jobs.get` / `oms.jobs.wait`. */
@@ -124,13 +108,27 @@ export interface FsStream {
124
108
  /** Byte length when the server sent one. Always `undefined` for a zip. */
125
109
  readonly size: number | undefined;
126
110
  }
111
+ /** Filter columns of `GET /fs_nodes`. */
112
+ export declare const FS_NODE_FILTER_COLUMNS: readonly ["id", "created_at", "updated_at", "name", "parent_id"];
113
+ /** `extra_options` keys of `GET /fs_nodes`. */
114
+ export declare const FS_NODE_EXTRA_OPTION_KEYS: readonly ["parent_id", "include_pending"];
115
+ /**
116
+ * `extra_options` of `GET /fs_nodes`. `parent_id` here returns the folder's
117
+ * children AND the folder itself; the `parent_id` column in `exactSearch`
118
+ * returns the children only, and is the only one that can say `null`.
119
+ */
120
+ export interface FsNodeExtraOptions {
121
+ readonly parent_id?: Id;
122
+ readonly include_pending?: boolean;
123
+ }
127
124
  /** Filters for {@link StorageNamespace.list}. */
128
- export interface ListFsNodesParams extends PageParams {
125
+ export interface ListFsNodesParams extends ListParams<(typeof FS_NODE_FILTER_COLUMNS)[number], FsNodeExtraOptions> {
129
126
  /**
130
127
  * Directory to list. `null` lists the caller's ROOT nodes (home, trash,
131
- * vault), which the server selects through its `\b` null sentinel.
128
+ * vault). Omitted, no parent filter is applied and the listing spans the
129
+ * caller's whole tree, which is what a name search across folders wants.
132
130
  */
133
- readonly parentId: Id | null;
131
+ readonly parentId?: Id | null;
134
132
  /**
135
133
  * Include nodes whose bytes never landed. Off by default, because a
136
134
  * half-finished upload is not something a user wants to see - and because a
@@ -141,10 +139,9 @@ export interface ListFsNodesParams extends PageParams {
141
139
  * Also return the parent itself, so one call gets both the folder's metadata
142
140
  * and its children. It occupies a slot on the page like any other row.
143
141
  *
144
- * IGNORED when `parentId` is `null`, and that is a correction rather than a
145
- * convenience: the server-side filter behind this flag cannot express "no
146
- * parent" at all, and asking it to used to answer with the caller's whole
147
- * tree. The roots have no folder to fold in anyway. The detail is on
142
+ * IGNORED when `parentId` is `null`: the server-side filter behind this flag
143
+ * cannot express "no parent", and asking it to answers with the caller's
144
+ * whole tree. The roots have no folder to fold in anyway. The detail is on
148
145
  * {@link StorageNamespace.list}.
149
146
  */
150
147
  readonly includeSelf?: boolean;
@@ -165,6 +162,8 @@ export interface CopyFsNodesInput {
165
162
  readonly ids: Id[];
166
163
  readonly newParentId: Id;
167
164
  }
165
+ /** `GET /fs_grants` filters on {@link BASE_FILTER_COLUMNS} only. */
166
+ export type ListFsGrantsParams = ListParams<never>;
168
167
  /**
169
168
  * A sharing grant on a node.
170
169
  *
@@ -179,7 +178,7 @@ export interface FsGrant extends BaseRecord {
179
178
  readonly grantee_id: Id | null;
180
179
  /** Write access. Always `false` on a public grant - the server validates it. */
181
180
  readonly editable: boolean;
182
- /** Only on the `:extended` view, i.e. from `get`, `create` and `update`. */
181
+ /** Only from `get`, `create` and `update`; absent in listings. */
183
182
  readonly fs_node?: FsNode;
184
183
  readonly grantor?: User;
185
184
  readonly grantee?: User | null;
@@ -214,22 +213,22 @@ export interface SharedFsNodeView {
214
213
  *
215
214
  * Creating one with a `granteeId` notifies that user. Creating one WITHOUT a
216
215
  * grantee mints a public link: the server also creates a short link in the `ss`
217
- * namespace whose endpoint is the grant's own id, pointing at the frontend's
218
- * `/storage/shared?id=<node>` page. Deleting the grant deletes that link.
216
+ * namespace whose endpoint is the grant's own id. Deleting the grant deletes
217
+ * that link.
219
218
  */
220
219
  export declare class FsGrantsNamespace extends Resource {
221
220
  /**
222
221
  * `GET /fs_grants` - the grants you hold: issued by you, or issued to you.
223
222
  *
224
- * There is no server-side filter for the node. The controller allows only
225
- * `id`, `created_at` and `updated_at` as search keys, and an unknown key is a
226
- * 400, not a wider result - so narrowing to one node is a client-side filter
227
- * over this listing. {@link StorageNamespace.shared} is the cheap way to ask
223
+ * There is no server-side filter for the node. The only search keys accepted
224
+ * are `id`, `created_at` and `updated_at`, and an unknown key is a 400, not a
225
+ * wider result - so narrowing to one node is a client-side filter over this
226
+ * listing. {@link StorageNamespace.shared} is the cheap way to ask
228
227
  * "how is THIS node shared".
229
228
  *
230
229
  * @throws {OmsAuthError} 401 when anonymous.
231
230
  */
232
- list(params?: PageParams, options?: RequestOptions): Promise<Paginated<FsGrant>>;
231
+ list(params?: ListFsGrantsParams, options?: RequestOptions): Promise<Paginated<FsGrant>>;
233
232
  /** `GET /fs_grants/:id` - one grant, with its node, grantor and grantee expanded. */
234
233
  get(id: Id, options?: RequestOptions): Promise<FsGrant>;
235
234
  /**
@@ -259,9 +258,9 @@ export declare class StorageNamespace extends Resource {
259
258
  /** Sharing grants. */
260
259
  readonly grants: FsGrantsNamespace;
261
260
  /**
262
- * Paces the four bulk-job endpoints against the `fs_bulk_job` throttle, which
263
- * is twelve requests a minute for all of them together. A loop that trashes
264
- * files one at a time waits here rather than collecting 429s.
261
+ * Paces the four bulk-job endpoints against their shared limit of twelve
262
+ * requests a minute. A loop that trashes files one at a time waits here
263
+ * rather than collecting 429s.
265
264
  */
266
265
  readonly bulkGate: StorageRateGate;
267
266
  /**
@@ -300,40 +299,29 @@ export declare class StorageNamespace extends Resource {
300
299
  * TWO server-side filters address a directory and they are NOT
301
300
  * interchangeable. That asymmetry is the whole subtlety of this method:
302
301
  *
303
- * - `exact_search[parent_id]` reaches `Searchable.exact_search`, which is a
304
- * bare `where(params)`. The controller has already rewritten a `\b` value
305
- * to `nil` by then, so the sentinel lands as `WHERE parent_id IS NULL` -
306
- * and since `FsNode.root_nodes` is exactly `where(parent_id: nil)`, this is
307
- * the only filter in the API that can say "the roots". The ltree
308
- * `id_path` is the source of truth for ANCESTRY, but rootness is still a
309
- * null `parent_id`.
310
- * - `extra_options[parent_id]` reaches `QueryExtraOptions::FsNodes`, which
311
- * runs `where(parent_id: x).or(where(id: x))` and so folds the folder
312
- * itself back into its own listing. Convenient - and guarded by
313
- * `return unless params[:parent_id].present?`, with that same `\b` -> `nil`
314
- * rewrite happening first. Hand it the sentinel and the guard drops the
315
- * filter IN SILENCE. The request still answers 200; it just answers with
316
- * the caller's ENTIRE listable tree, page after page, instead of three
317
- * rows. It is the same failure shape as the `inside_path` incident that
318
- * `reject_unknown_filter_keys!` was written for, except this key IS known,
319
- * so nothing rejects it.
302
+ * - `exact_search[parent_id]` selects the children only. A `\b` value is
303
+ * read as `null` and selects the nodes with no parent, so this is the only
304
+ * filter in the API that can say "the roots".
305
+ * - `extra_options[parent_id]` selects the children AND the folder itself.
306
+ * Hand it the sentinel and the filter is dropped IN SILENCE. The request
307
+ * still answers 200; it just answers with the caller's ENTIRE listable
308
+ * tree, page after page, instead of three rows.
320
309
  *
321
310
  * Hence `includeSelf` is honoured under a real directory and ignored at the
322
311
  * top of the tree. Not client-side taste: it is the only combination the
323
312
  * server can actually express.
324
313
  *
325
- * The endpoint is conditional-GET aware and answers 304 to a matching
326
- * `If-None-Match`. The SDK never sends one, and asks the runtime not to
327
- * revalidate on its own, because a 304 has no body and would surface here as
328
- * an error rather than as an empty page.
314
+ * The endpoint answers 304 to a matching `If-None-Match`. The SDK never
315
+ * sends one, and asks the runtime not to revalidate on its own, because a
316
+ * 304 has no body and would surface here as an error rather than as an
317
+ * empty page.
329
318
  */
330
- list(params: ListFsNodesParams, options?: RequestOptions): Promise<Paginated<FsNode>>;
319
+ list(params?: ListFsNodesParams, options?: RequestOptions): Promise<Paginated<FsNode>>;
331
320
  /**
332
321
  * `GET /fs_nodes/:id` - one node.
333
322
  *
334
- * Resolves against the broader `viewable_by` scope, so a node reached through
335
- * a public share link answers here even though it never appears in
336
- * {@link list}.
323
+ * Visibility is wider than {@link list}'s: a node reached through a public
324
+ * share link answers here even though it never appears in a listing.
337
325
  *
338
326
  * @throws {OmsApiError} 404 when the node does not exist or is not visible.
339
327
  */
@@ -352,11 +340,10 @@ export declare class StorageNamespace extends Resource {
352
340
  * Resolves a slash-separated path under a starting node, walking children one
353
341
  * level at a time.
354
342
  *
355
- * A convenience for humans and CLIs, NOT how the API works. The `path` column
356
- * was dropped in the ltree migration and nothing on the server accepts a path
357
- * string, so each segment costs one filtered listing. Results are memoised
358
- * per client instance, which makes a second walk down the same prefix free,
359
- * but the cheap call is always the one that already has an id.
343
+ * A convenience for humans, NOT how the API works. Nothing on the server
344
+ * accepts a path string, so each segment costs one filtered listing. Results
345
+ * are memoised per client instance, which makes a second walk down the same
346
+ * prefix free, but the cheap call is always the one that already has an id.
360
347
  *
361
348
  * `.` is skipped and `..` climbs to the parent. A leading `/` means "from the
362
349
  * home root" and ignores `from`.
@@ -376,9 +363,9 @@ export declare class StorageNamespace extends Resource {
376
363
  * blobs and reads the finished nodes back.
377
364
  *
378
365
  * Files at or above `MULTIPART_THRESHOLD` (32 MiB, exported from this
379
- * package) take the multipart path automatically, and that is not tuning:
380
- * the object store sits behind Cloudflare with a request-body cap around
381
- * 100 MB, so it is the only way a large file gets in at all.
366
+ * package) take the multipart path automatically, and that is not tuning: a
367
+ * single request to the object store is capped at roughly 100 MB, so it is
368
+ * the only way a large file gets in at all.
382
369
  *
383
370
  * A per-file rejection - a quota that ran out, a name that collides with a
384
371
  * directory - does not throw. It comes back in
@@ -404,7 +391,7 @@ export declare class StorageNamespace extends Resource {
404
391
  * job's result is the list of directories that were created. Existing levels
405
392
  * are reused, so re-running the same paths is a no-op that creates nothing.
406
393
  *
407
- * Costs one of the twelve `fs_bulk_job` requests a minute. Pass every path in
394
+ * Counts against the twelve bulk-job requests a minute. Pass every path in
408
395
  * one call rather than looping.
409
396
  *
410
397
  * @throws {OmsApiError} 400 when `paths` is empty or the parent is not a
@@ -471,10 +458,10 @@ export declare class StorageNamespace extends Resource {
471
458
  * `GET /fs_nodes/:id/zip` - a directory and every file under it that the
472
459
  * caller can see, as a zip archive.
473
460
  *
474
- * Streamed, and streamed for real: the server generates it with
475
- * `ActionController::Live`, so there is no `Content-Length` and no way to
476
- * know the size in advance. Never retried automatically either - a retry
477
- * restarts the whole archive from zero.
461
+ * Streamed, and streamed for real: the server generates the archive as it
462
+ * sends it, so there is no `Content-Length` and no way to know the size in
463
+ * advance. Never retried automatically either - a retry restarts the whole
464
+ * archive from zero.
478
465
  *
479
466
  * @throws {OmsApiError} 400 when the node is not a directory, 404 when it is
480
467
  * not visible.
@@ -483,8 +470,8 @@ export declare class StorageNamespace extends Resource {
483
470
  /**
484
471
  * `PATCH /fs_nodes/:id` with a new name.
485
472
  *
486
- * The returned node is checked against what was asked for. The controller
487
- * silently drops any field outside its update allowlist, so a 200 alone
473
+ * The returned node is checked against what was asked for. The server
474
+ * silently drops any field it does not accept on update, so a 200 alone
488
475
  * proves nothing about the write having happened.
489
476
  *
490
477
  * @throws {OmsApiError} 400 when the name collides with a sibling or contains
@@ -494,9 +481,7 @@ export declare class StorageNamespace extends Resource {
494
481
  /**
495
482
  * `PATCH /fs_nodes/:id` with a new parent.
496
483
  *
497
- * The server refuses a move that would make a node its own ancestor; that
498
- * cycle check is the fix for the 2026-07-27 copy outage and must not be
499
- * second-guessed client-side.
484
+ * The server refuses a move that would make a node its own ancestor.
500
485
  *
501
486
  * Like {@link rename}, the answer is verified rather than assumed.
502
487
  *
@@ -515,7 +500,7 @@ export declare class StorageNamespace extends Resource {
515
500
  * filters the index does, so a copy with NO selection would resolve to the
516
501
  * caller's entire listable tree and duplicate it.
517
502
  *
518
- * Costs one of the twelve `fs_bulk_job` requests a minute.
503
+ * Counts against the twelve bulk-job requests a minute.
519
504
  */
520
505
  copy(input: CopyFsNodesInput, options?: RequestOptions): Promise<FsBulkJob>;
521
506
  /**
@@ -528,7 +513,7 @@ export declare class StorageNamespace extends Resource {
528
513
  * Refuses an empty id list for the same reason {@link copy} does: with no
529
514
  * selection the endpoint resolves to the caller's whole listable tree.
530
515
  *
531
- * Costs one of the twelve `fs_bulk_job` requests a minute, so trash the whole
516
+ * Counts against the twelve bulk-job requests a minute, so trash the whole
532
517
  * selection in one call.
533
518
  */
534
519
  trash(ids: Id[], options?: RequestOptions): Promise<FsBulkJob>;
@@ -587,7 +572,7 @@ export declare class StorageNamespace extends Resource {
587
572
  /**
588
573
  * Fetches an object-storage URL on the injected transport with no credential
589
574
  * of ours attached. The presigned signature in the URL IS the credential, and
590
- * a bearer header alongside it is what makes MinIO reject the request.
575
+ * the store rejects a request that carries a bearer header alongside it.
591
576
  */
592
577
  private fetchObject;
593
578
  }
@@ -11,7 +11,8 @@
11
11
  * in the same request.
12
12
  */
13
13
  import { type ApiClient, Resource } from "../http";
14
- import type { FileInput, Id, Paginated, PageParams, RequestOptions, Timestamp } from "../types";
14
+ import type { ListParams } from "../listing";
15
+ import type { FileInput, Id, Paginated, RequestOptions, Timestamp } from "../types";
15
16
  /** Lifecycle of a ticket. */
16
17
  export type TicketStatus = "open" | "closed";
17
18
  /**
@@ -99,29 +100,37 @@ export interface CreateTicketInput {
99
100
  readonly initialMessage?: string;
100
101
  readonly context?: TicketContext;
101
102
  /**
102
- * Files to attach. The SDK turns each one into the data URI the endpoint
103
- * expects, so every attachment is buffered in memory.
103
+ * Files to attach, as bytes or as an already-encoded data URL. Bytes are
104
+ * base64-encoded here, so every attachment is buffered in memory.
104
105
  *
105
- * Backend caps: {@link TICKET_MAX_ATTACHMENTS} files,
106
+ * Server caps: {@link TICKET_MAX_ATTACHMENTS} files,
106
107
  * {@link TICKET_MAX_ATTACHMENT_BYTES} in total, `image/*` and `video/*`
107
- * only - and an attachment that breaks any of them is dropped in SILENCE,
108
- * with the ticket still answering 201. The SDK therefore validates before
109
- * sending and raises rather than let a screenshot disappear.
108
+ * only. An attachment over a cap is dropped server-side with the ticket
109
+ * still answering 201, so the SDK validates first and throws instead.
110
110
  */
111
- readonly attachments?: FileInput[];
111
+ readonly attachments?: ReadonlyArray<FileInput | TicketAttachmentDataUrl>;
112
+ }
113
+ /** An attachment that is already a `data:<mime>;base64,...` URL. */
114
+ export interface TicketAttachmentDataUrl {
115
+ readonly dataUrl: string;
116
+ readonly filename: string;
112
117
  }
113
118
  /** Fields that can change after a ticket exists. */
114
119
  export interface UpdateTicketInput {
115
120
  readonly status?: TicketStatus;
116
121
  }
122
+ /** Filter columns of `GET /tickets`, on top of {@link BASE_FILTER_COLUMNS}. */
123
+ export declare const TICKET_FILTER_COLUMNS: readonly ["status", "user_id"];
117
124
  /** Filters for {@link TicketsNamespace.list}. */
118
- export interface ListTicketsParams extends PageParams {
125
+ export interface ListTicketsParams extends ListParams<(typeof TICKET_FILTER_COLUMNS)[number]> {
119
126
  readonly status?: TicketStatus;
120
127
  /** Administrators only: someone else's tickets. */
121
128
  readonly userId?: Id;
122
129
  }
130
+ /** Filter columns of `GET /ticket_messages`, on top of {@link BASE_FILTER_COLUMNS}. */
131
+ export declare const TICKET_MESSAGE_FILTER_COLUMNS: readonly ["ticket_id", "sender_id", "created_at"];
123
132
  /** Filters for {@link TicketMessagesNamespace.list}. */
124
- export interface ListTicketMessagesParams extends PageParams {
133
+ export interface ListTicketMessagesParams extends ListParams<(typeof TICKET_MESSAGE_FILTER_COLUMNS)[number]> {
125
134
  readonly ticketId: TicketId;
126
135
  }
127
136
  /** Arguments for replying to a ticket. */
@@ -1,15 +1,14 @@
1
1
  /**
2
2
  * Background removal: cuts the subject out of an image.
3
3
  *
4
- * `POST /background_removals` enqueues a proxy job and answers immediately with
5
- * a row plus a `job_id` and, for an anonymous caller, a `watch_token`. Poll
4
+ * `POST /background_removals` enqueues a job and answers immediately with a
5
+ * row plus a `job_id` and, for an anonymous caller, a `watch_token`. Poll
6
6
  * through `oms.jobs` with that handle, or use {@link BackgroundRemovalNamespace.run}.
7
7
  *
8
- * Backend limits: 15 MiB, and an image bomb (absurd pixel count for its byte
9
- * size) is rejected with a 400 before any work starts.
8
+ * Limits: 15 MiB, and an image bomb (absurd pixel count for its byte size) is
9
+ * rejected with a 400 before any work starts.
10
10
  *
11
- * This tool has no daily quota - it is one of the two that the `Quotas`
12
- * catalogue does not meter - so there is no `quota()` here to call first.
11
+ * This tool has no daily quota, so there is no `quota()` here to call first.
13
12
  */
14
13
  import { Resource } from "../../http";
15
14
  import type { FileInput, Id, RequestOptions } from "../../types";
@@ -18,12 +17,12 @@ import { type ToolCaptcha, type ToolJobHandle, type ToolRecord, type ToolRunOpti
18
17
  * A background removal run.
19
18
  *
20
19
  * Both routes that answer with one - `POST /background_removals` and
21
- * `GET /background_removals/:id` - render the `:extended` view, so `result_url`
22
- * is always PRESENT and simply `null` until the run completes.
20
+ * `GET /background_removals/:id` - answer the same shape, so `result_url` is
21
+ * always PRESENT and simply `null` until the run completes.
23
22
  *
24
23
  * `progress_percent`, inherited from {@link ToolRecord}, is never sent for this
25
- * tool: `BackgroundRemovalBlueprint` has no such field. Progress lives on the
26
- * {@link Job} row that {@link BackgroundRemovalCreated.job_id} names.
24
+ * tool. Progress lives on the {@link Job} row that
25
+ * {@link BackgroundRemovalCreated.job_id} names.
27
26
  */
28
27
  export interface BackgroundRemoval extends ToolRecord {
29
28
  /**
@@ -38,7 +37,7 @@ export interface BackgroundRemoval extends ToolRecord {
38
37
  export type BackgroundRemovalCreated = BackgroundRemoval & ToolJobHandle;
39
38
  /** Arguments for starting a run. */
40
39
  export interface CreateBackgroundRemovalInput extends ToolCaptcha {
41
- /** The image. Backend cap: 15 MiB. */
40
+ /** The image. Cap: 15 MiB. */
42
41
  readonly file: FileInput;
43
42
  }
44
43
  /** The `backgroundRemoval` tool, reachable as `oms.tools.backgroundRemoval`. */
@@ -56,8 +55,7 @@ export declare class BackgroundRemovalNamespace extends Resource {
56
55
  *
57
56
  * NOT retried by default, unlike most of the SDK. The transport's policy
58
57
  * replays a `POST` that died with a 502, and here that would re-upload the
59
- * image and start a second run on a sidecar that serialises them. Pass
60
- * `retry: {}` to opt back in.
58
+ * image and start a second run. Pass `retry: {}` to opt back in.
61
59
  *
62
60
  * @throws {OmsApiError} 400 when the image is too large or looks like a bomb.
63
61
  * @throws {OmsAuthError} 401 when anonymous and the captcha is missing or bad.