codai-sdk 0.29.0 → 0.54.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.
package/README.md CHANGED
@@ -65,11 +65,30 @@ surface.
65
65
  | `receipt` | `get` | `GET /v1/receipt` |
66
66
  | `feedback` | `submit` | `POST /v1/feedback` |
67
67
  | `phoneModels` | `list` | `GET /v1/phone/models` |
68
- | `resolve` | `submit`, `get`, `accept`, `balance`, `attestation`, `keys`, `verifyAttestation`, `health`, `waitFor` | `https://resolve.codai.ro/v1/resolve/*` (own host) |
68
+ | `billing` | `get`, `invoices`, `watchBalance` (read-only) | `GET /v1/billing`, `GET /v1/billing/invoices` |
69
+ | `referrals` | `get`, `redeem`, `setConsent` | `GET /v1/referrals`, `PATCH /v1/account` |
70
+ | `resolve` | `submit`, `get`, `list`, `iterate`, `accept`, `balance`, `attestation`, `keys`, `verifyAttestation`, `health`, `waitFor` | `https://resolve.codai.ro/v1/resolve/*` (own host) |
69
71
 
70
72
  Every method takes an optional last argument `{ ext, signal }` where `ext` is a
71
73
  typed bag of `X-Codai-*` extension headers (see below).
72
74
 
75
+ ## Lists and the share sheet
76
+
77
+ `lists` covers `/v1/lists/*` and `POST /v1/share`: `list`, `create`, `reorder`,
78
+ `update`, `delete`, `items`, `add`, `updateItem`, `deleteItem`, `image`
79
+ (bytes + content type), `exportMarkdown` (string), `share` and `stream` (live
80
+ `list` events). `add` and `share` are idempotent on `client_id` / the canonical
81
+ URL: a duplicate answers 200 with `created: false`.
82
+
83
+ ```ts
84
+ const { item, list } = await client.lists.share({ url: 'https://example.com', auto: true });
85
+ const md = await client.lists.exportMarkdown(list.id);
86
+ for await (const ev of client.lists.stream()) console.log(ev.op, ev.listId, ev.itemId);
87
+ ```
88
+
89
+ `schedules.audit({ schedule_id?, limit? })` returns the scheduler audit log
90
+ (`GET /v1/schedules/audit`), newest first.
91
+
73
92
  ## Streaming
74
93
 
75
94
  ```ts