@deepraxis/sdk 0.2.0-dev.af2cf98 → 0.2.0-dev.b4ab287

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.
package/METHODS.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # SDK methods
2
2
 
3
- Generated by `bun run generate`. 970 HTTP operations, plus product aliases. Version segments and path parameters are omitted from resource names. Inputs use typed `{ path, query, body, headers }` options. Collections form nested resource objects; POST actions retain their verb. Naming rules are documented in `scripts/resources.ts`; semantic exceptions and aliases with reasons are in `scripts/naming-overrides.ts`.
3
+ Generated by `bun run generate`. 992 HTTP operations, plus product aliases. Version segments and path parameters are omitted from resource names. Inputs use typed `{ path, query, body, headers }` options. Collections form nested resource objects; POST actions retain their verb. Naming rules are documented in `scripts/resources.ts`; semantic exceptions and aliases with reasons are in `scripts/naming-overrides.ts`.
4
4
 
5
5
  `always` returns an AsyncIterable; `optional` streams with `{ stream: true }`; `yes` pagination returns a Page. Only `{ data, next_cursor }` + `cursor` query contracts are automatically paginated.
6
6
 
@@ -55,6 +55,12 @@ Multipart request bodies expand plain objects into bracketed fields (for example
55
55
  |---|---|---|---|---|
56
56
  | create | POST | `/agent/v1/agents/{agent_id}/customers/{customer_id}/unblock` | no | no |
57
57
 
58
+ ### agent.agents.devices.localSessions
59
+
60
+ | Method | HTTP | Path | Streaming | Pagination |
61
+ |---|---|---|---|---|
62
+ | list | GET | `/agent/v1/agents/{agent_id}/devices/{device_id}/local-sessions` | no | yes |
63
+
58
64
  ### agent.agents.events
59
65
 
60
66
  | Method | HTTP | Path | Streaming | Pagination |
@@ -619,6 +625,33 @@ Multipart request bodies expand plain objects into bracketed fields (for example
619
625
 
620
626
  ## browser
621
627
 
628
+ ### browser.byob.browsers
629
+
630
+ | Method | HTTP | Path | Streaming | Pagination |
631
+ |---|---|---|---|---|
632
+ | list | GET | `/browser/v1/byob/browsers` | no | no |
633
+ | retrieve | GET | `/browser/v1/byob/browsers/{browser_id}` | no | no |
634
+ | update | PATCH | `/browser/v1/byob/browsers/{browser_id}` | no | no |
635
+
636
+ ### browser.byob.browsers.disconnect
637
+
638
+ | Method | HTTP | Path | Streaming | Pagination |
639
+ |---|---|---|---|---|
640
+ | create | POST | `/browser/v1/byob/browsers/{browser_id}/disconnect` | no | no |
641
+
642
+ ### browser.byob.pairings
643
+
644
+ | Method | HTTP | Path | Streaming | Pagination |
645
+ |---|---|---|---|---|
646
+ | create | POST | `/browser/v1/byob/pairings` | no | no |
647
+ | retrieve | GET | `/browser/v1/byob/pairings/{code}` | no | no |
648
+
649
+ ### browser.byob.pairings.claim
650
+
651
+ | Method | HTTP | Path | Streaming | Pagination |
652
+ |---|---|---|---|---|
653
+ | create | POST | `/browser/v1/byob/pairings/{code}/claim` | no | no |
654
+
622
655
  ### browser.connect
623
656
 
624
657
  | Method | HTTP | Path | Streaming | Pagination |
@@ -1161,6 +1194,12 @@ Multipart request bodies expand plain objects into bracketed fields (for example
1161
1194
  | openPullRequest | POST | `/devops/v1/changes/{id}:openPullRequest` | no | no |
1162
1195
  | retrieve | GET | `/devops/v1/changes/{id}` | no | no |
1163
1196
 
1197
+ ### devops.changes.slices
1198
+
1199
+ | Method | HTTP | Path | Streaming | Pagination |
1200
+ |---|---|---|---|---|
1201
+ | create | POST | `/devops/v1/projects/{project}/changes/{change}/slices` | no | no |
1202
+
1164
1203
  ### devops.connections
1165
1204
 
1166
1205
  | Method | HTTP | Path | Streaming | Pagination |
@@ -1669,6 +1708,12 @@ Multipart request bodies expand plain objects into bracketed fields (for example
1669
1708
  |---|---|---|---|---|
1670
1709
  | restore | POST | `/media/v1/libraries/{library_id}/assets/{asset_id}/versions/{version_id}/restore` | no | no |
1671
1710
 
1711
+ ### media.libraries.assets.works
1712
+
1713
+ | Method | HTTP | Path | Streaming | Pagination |
1714
+ |---|---|---|---|---|
1715
+ | list | GET | `/media/v1/libraries/{library_id}/assets/{asset_id}/works` | no | yes |
1716
+
1672
1717
  ### media.libraries.batches
1673
1718
 
1674
1719
  | Method | HTTP | Path | Streaming | Pagination |
@@ -1759,6 +1804,16 @@ Multipart request bodies expand plain objects into bracketed fields (for example
1759
1804
  |---|---|---|---|---|
1760
1805
  | create | POST | `/media/v1/libraries/{library_id}/voices/designs` | no | no |
1761
1806
 
1807
+ ### media.libraries.works
1808
+
1809
+ | Method | HTTP | Path | Streaming | Pagination |
1810
+ |---|---|---|---|---|
1811
+ | create | POST | `/media/v1/libraries/{library_id}/works` | no | no |
1812
+ | delete | DELETE | `/media/v1/libraries/{library_id}/works/{work_id}` | no | no |
1813
+ | list | GET | `/media/v1/libraries/{library_id}/works` | no | yes |
1814
+ | retrieve | GET | `/media/v1/libraries/{library_id}/works/{work_id}` | no | no |
1815
+ | update | PATCH | `/media/v1/libraries/{library_id}/works/{work_id}` | no | no |
1816
+
1762
1817
  ### media.pipelines
1763
1818
 
1764
1819
  | Method | HTTP | Path | Streaming | Pagination |
@@ -2118,9 +2173,21 @@ Multipart request bodies expand plain objects into bracketed fields (for example
2118
2173
  | Method | HTTP | Path | Streaming | Pagination |
2119
2174
  |---|---|---|---|---|
2120
2175
  | archive | POST | `/organization/v1/notifications/letters/{id}:archive` | no | no |
2176
+ | create | POST | `/organization/v1/notifications/letters` | no | no |
2121
2177
  | list | GET | `/organization/v1/notifications/letters` | no | no |
2122
2178
  | read | POST | `/organization/v1/notifications/letters/{id}:read` | no | no |
2123
2179
  | readAll | POST | `/organization/v1/notifications/letters:readAll` | no | no |
2180
+ | retrieve | GET | `/organization/v1/notifications/letters/{id}` | no | no |
2181
+
2182
+ ### organization.notifications.messages
2183
+
2184
+ | Method | HTTP | Path | Streaming | Pagination |
2185
+ |---|---|---|---|---|
2186
+ | delete | DELETE | `/organization/v1/notifications/messages/{name}` | no | no |
2187
+ | list | GET | `/organization/v1/notifications/messages` | no | no |
2188
+ | readAll | POST | `/organization/v1/notifications/messages:readAll` | no | no |
2189
+ | retrieve | GET | `/organization/v1/notifications/messages/{name}` | no | no |
2190
+ | update | POST | `/organization/v1/notifications/messages/{name}` | no | no |
2124
2191
 
2125
2192
  ### organization.notifications.organizationDefault
2126
2193
 
@@ -3084,6 +3151,7 @@ Multipart request bodies expand plain objects into bracketed fields (for example
3084
3151
  | database.kv.keys.update | PATCH changes one field (ttl_ms) of an existing key; update matches tables.update and fields.update in the same domain, and the path-derived name collides with PUT. |
3085
3152
  | database.kv.keys.set | PUT writes a whole key value (Redis SET semantics); use the assignment vocabulary set, as dist-tags and vaults do, so update stays the PATCH that changes the TTL. |
3086
3153
  | database.table.rest.create | The final parameter identifies a table collection; POST inserts rows rather than updating the table. |
3154
+ | devops.changes.slices.create | ticket-4768: the slice belongs to the change, whose other operations (retrieve, abandon, markLastSlice) are devops.changes.*, and the RPC is devops.changes.slices.create; the project in the path is only the mount, so the path alone would derive devops.projects.changes.slices.create and split a change's operations across two namespaces. |
3087
3155
  | devops.projects.flags.reportCodeRefs | ADR-125 §4 / #1881: a checkout reports where code names each flag key, so the write is an operation on the project's flags (devops.flags.reportCodeRefs) and returns counts, not a code-refs resource; the path alone would derive a nested codeRefs collection create. |
3088
3156
  | file.uploads.createSigned | Signed upload creation returns a one-time local PUT URL; ADR-039 names this operation uploads.createSigned. |
3089
3157
  | media.libraries.retrieveDefault | ADR-094 §9 names the default-library read libraries.retrieveDefault; the URL names a reference rather than an id, so the path-derived name would otherwise read as retrieving a library called default. |
@@ -37,6 +37,8 @@ export async function fetchWithRetry(request, fetcher, options) {
37
37
  let response;
38
38
  try {
39
39
  // Preserve a replayable request; never reuse a consumed body on the next attempt.
40
+ // `Request` is generic over the request-init type (`Request<CfHostMetadata, Cf>` under the Workers types), which
41
+ // `RequestInfo` does not name; the clone is still the same request the platform accepts.
40
42
  response = await abortable(fetcher(request.clone()), options.signal);
41
43
  }
42
44
  catch (cause) {
@@ -7,9 +7,17 @@ import { isBinaryOperation } from "./binary-operations.js";
7
7
  import { envSilencesDeprecations } from "./deprecation.js";
8
8
  /** Our own per-call keys, beyond what the generated hey-api client accepts. */
9
9
  const SDK_OPTION_KEYS = ['timeoutMs', 'maxRetries', 'stream', 'lastEventId'];
10
- /** Every key of the generated client's per-call RequestOptions (request parts, fetch/RequestInit, serializers,
11
- * auth, SSE hooks, ...). Typed as a total record so a regenerated client that adds a key fails to typecheck here
12
- * until the key is classified, instead of being rejected at runtime by the guard below. */
10
+ /**
11
+ * Every key of the generated client's per-call RequestOptions (request parts, fetch/RequestInit, serializers,
12
+ * auth, SSE hooks, ...), classified by whether the guard below should accept it. The exhaustiveness check after the
13
+ * literal is what keeps this true: a regenerated client that adds a key leaves it out of `HeyApiOptionKey` and fails
14
+ * to typecheck here, instead of being rejected at runtime by the guard.
15
+ *
16
+ * Written as a plain literal plus a mapped assertion rather than as a `Record<keyof GeneratedRequestOptions, true>`:
17
+ * the generated type's key set differs with the compiler's lib (the Workers types add `cf`, hey-api's Config adds
18
+ * `fetcher` and `encodeResponseBody`), so a total Record literal is rejected as excess in one configuration and as
19
+ * incomplete in the other.
20
+ */
13
21
  const HEY_API_OPTION_KEYS = {
14
22
  body: true, path: true, query: true, headers: true, security: true, baseUrl: true, fetch: true, parseAs: true,
15
23
  responseStyle: true, throwOnError: true, auth: true, bodySerializer: true, querySerializer: true,
@@ -18,7 +26,11 @@ const HEY_API_OPTION_KEYS = {
18
26
  // Config extends RequestInit (minus body/headers/method).
19
27
  signal: true, cache: true, credentials: true, integrity: true, keepalive: true, mode: true, priority: true,
20
28
  redirect: true, referrer: true, referrerPolicy: true, window: true,
29
+ // hey-api's own transport hooks: the fetch implementation, the Workers `cf` bag and the body encoder.
30
+ fetcher: true, cf: true, encodeResponseBody: true,
21
31
  };
32
+ const classified = {};
33
+ void classified;
22
34
  const OPTION_KEYS = new Set([...Object.keys(HEY_API_OPTION_KEYS), ...SDK_OPTION_KEYS]);
23
35
  /** Client-side guard: flat params like `{ limit: 20 }` would otherwise be silently dropped by the generated client. */
24
36
  function assertKnownOptions(options) {