@dork-labs/cloud-api 0.83.0 → 0.88.0

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 (55) hide show
  1. package/README.md +210 -22
  2. package/dist/billing.d.ts +225 -12
  3. package/dist/billing.d.ts.map +1 -1
  4. package/dist/billing.js +159 -36
  5. package/dist/billing.js.map +1 -1
  6. package/dist/connections.d.ts +19 -0
  7. package/dist/connections.d.ts.map +1 -1
  8. package/dist/connections.js +16 -0
  9. package/dist/connections.js.map +1 -1
  10. package/dist/display.d.ts +172 -0
  11. package/dist/display.d.ts.map +1 -0
  12. package/dist/display.js +431 -0
  13. package/dist/display.js.map +1 -0
  14. package/dist/primitives.d.ts +63 -0
  15. package/dist/primitives.d.ts.map +1 -1
  16. package/dist/primitives.js +78 -1
  17. package/dist/primitives.js.map +1 -1
  18. package/dist/problem.d.ts +22 -0
  19. package/dist/problem.d.ts.map +1 -1
  20. package/dist/problem.js +26 -2
  21. package/dist/problem.js.map +1 -1
  22. package/dist/remote.d.ts +151 -1
  23. package/dist/remote.d.ts.map +1 -1
  24. package/dist/remote.js +163 -8
  25. package/dist/remote.js.map +1 -1
  26. package/dist/routes.d.ts +16 -1
  27. package/dist/routes.d.ts.map +1 -1
  28. package/dist/routes.js +16 -1
  29. package/dist/routes.js.map +1 -1
  30. package/dist/seats.d.ts +43 -2
  31. package/dist/seats.d.ts.map +1 -1
  32. package/dist/seats.js +29 -3
  33. package/dist/seats.js.map +1 -1
  34. package/fixtures/v1/billing/balance-denominated.json +20 -0
  35. package/fixtures/v1/billing/entitlements-denominated.json +38 -0
  36. package/fixtures/v1/billing/nudge-denominated.json +13 -0
  37. package/fixtures/v1/billing/offers-empty.json +3 -0
  38. package/fixtures/v1/billing/offers.json +48 -0
  39. package/fixtures/v1/billing/price-list-cache-rates.json +19 -0
  40. package/fixtures/v1/billing/statement-itemised.json +35 -0
  41. package/fixtures/v1/billing/usage-denominated.json +25 -0
  42. package/fixtures/v1/index.json +20 -0
  43. package/fixtures/v1/problem/malformed-identifier.json +7 -0
  44. package/fixtures/v1/problem/malformed-request.json +7 -0
  45. package/fixtures/v1/remote/credential-with-hosts.json +8 -0
  46. package/fixtures/v1/remote/designation-current.json +5 -0
  47. package/fixtures/v1/remote/designation-none.json +5 -0
  48. package/fixtures/v1/remote/events-batch-spans.json +15 -0
  49. package/fixtures/v1/remote/events-batch.json +5 -0
  50. package/fixtures/v1/remote/status-open-with-instance.json +10 -0
  51. package/fixtures/v1/remote/usage-fresh.json +17 -0
  52. package/fixtures/v1/remote/usage.json +39 -0
  53. package/fixtures/v1/seats/agent-approved-claim.json +8 -0
  54. package/fixtures/v1/seats/agent-pending-claim.json +9 -0
  55. package/package.json +5 -1
package/README.md CHANGED
@@ -10,7 +10,7 @@ against it, and neither side gets to change the wire without changing it here fi
10
10
  npm install @dork-labs/cloud-api zod
11
11
  ```
12
12
 
13
- ## Two entry points
13
+ ## Three entry points
14
14
 
15
15
  ```ts
16
16
  // Schemas, types and route paths. No network code, so you can validate
@@ -30,24 +30,29 @@ const entitlements = await cloud.get(V1_ROUTES.entitlements, EntitlementsSchema)
30
30
  const seat = await cloud.get(v1Path.seat(seatId), SeatSchema);
31
31
  ```
32
32
 
33
+ ```ts
34
+ // One way to render an amount for a person. No Zod, no network code.
35
+ import { formatCharge, formatPosition } from '@dork-labs/cloud-api/display';
36
+ ```
37
+
33
38
  Every response is either the route's success schema or the `Problem` envelope. The client throws
34
39
  `CloudApiProblemError` for a refusal the service described, and `CloudApiResponseError` when the
35
40
  body is neither.
36
41
 
37
42
  ## What is in the contract
38
43
 
39
- | Group | Covers |
40
- | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
41
- | Session and account | `GET /v1/session`, `GET /v1/account`, `POST /v1/account/export` |
42
- | Device link | `POST /v1/device/code`, `POST /v1/device/token` (RFC 8628) |
43
- | Instances | heartbeat, revoke, list, organization re-link |
44
- | Managed connections | catalog, toolkits, connections, authentication flows, authority commands, executions, the lease-based event pull and acknowledgement, usage |
45
- | Billing | `GET /v1/entitlements`, `/v1/balance`, `/v1/usage`, `/v1/price-list`, `/v1/nudge`, `POST /v1/checkout`, `/v1/topup`, `/v1/refunds`, `/v1/portal`, `GET /v1/statement` |
46
- | Inference | `POST /v1/inference/tokens`, `GET /v1/inference/models`, token revocation |
47
- | Seats, orgs and addresses | organizations, membership, invitations, agents and claims, seats, addresses, grants, add-ons, the seat inbox, presence, the seat activity event |
48
- | Remote access | status, open/close, wake tokens, enrolment, canonical and custom addresses, designation, instance credentials, the command stream and its acknowledgement, event batches |
49
- | Hosted communities | `GET`/`POST /v1/communities`, the short-name check, a fresh owner-claim link, keep (with a preview of what it holds) and restore, and moves: start, list, poll, cancel |
50
- | Shared | the `Problem` envelope, bearer auth, cursor pagination, the `X-DorkOS-Wire: 1` header |
44
+ | Group | Covers |
45
+ | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
46
+ | Session and account | `GET /v1/session`, `GET /v1/account`, `POST /v1/account/export` |
47
+ | Device link | `POST /v1/device/code`, `POST /v1/device/token` (RFC 8628) |
48
+ | Instances | heartbeat, revoke, list, organization re-link |
49
+ | Managed connections | catalog, toolkits, connections, authentication flows, authority commands, executions, the lease-based event pull and acknowledgement, usage, who a grant covers (one agent or every agent) |
50
+ | Billing | `GET /v1/entitlements`, `/v1/balance`, `/v1/usage`, `/v1/price-list`, `/v1/nudge`, `/v1/offers`, `POST /v1/checkout`, `/v1/topup`, `/v1/portal`, `GET /v1/statement` |
51
+ | Inference | `POST /v1/inference/tokens`, `GET /v1/inference/models`, token revocation |
52
+ | Seats, orgs and addresses | organizations, membership, invitations, agents and claims (an agent says whether a claim waits on approval, and which), seats, addresses, grants, add-ons, the seat inbox, presence, the seat activity event |
53
+ | Remote access | status, open/close, wake tokens, enrolment, canonical and custom addresses, designation and its read, usage against the published limits, instance credentials, the command stream and its acknowledgement, event batches |
54
+ | Hosted communities | `GET`/`POST /v1/communities`, the short-name check, a fresh owner-claim link, keep (with a preview of what it holds) and restore, and moves: start, list, poll, cancel |
55
+ | Shared | the `Problem` envelope, bearer auth, cursor pagination, the `X-DorkOS-Wire: 1` header |
51
56
 
52
57
  ### What is deliberately not in it
53
58
 
@@ -57,6 +62,11 @@ machine-to-machine wire. Publishing them would freeze a dependency's internals i
57
62
  contract. The two device-code endpoints are the one exception: they live under `/api/auth/` today
58
63
  but are a machine wire, so they are here.
59
64
 
65
+ Refunds are not offered through this API.
66
+ Earlier releases published `POST /v1/refunds` with `RefundRequestSchema` and
67
+ `RefundResponseSchema`; no release of the service ever answered it, and it is **withdrawn**. See
68
+ [Withdrawn within `/v1`](#withdrawn-within-v1).
69
+
60
70
  The closed-address browser surface — the page an address serves while the machine is asleep,
61
71
  and the authorized reopen path on it — is excluded on the same grounds. The omission is a
62
72
  decision, not a gap.
@@ -100,6 +110,22 @@ published as its own export (`HandleSchema`) rather than applied to a field a ca
100
110
  sends — narrowing `handle` would make a request that parsed before fail afterwards, which is a
101
111
  `/v2` change however sensible it looks.
102
112
 
113
+ ### Withdrawn within `/v1`
114
+
115
+ Because nothing published is deleted within `/v1`, a shape the service stops offering is
116
+ **withdrawn** rather than removed: it stays exported and parses exactly as it did, it carries
117
+ `@deprecated` in the types and `"deprecated": true` in its JSON Schema, and the service answers its
118
+ route with `not_found`. Do not build against a withdrawn shape. It is deleted in `/v2`.
119
+
120
+ | Withdrawn | Why |
121
+ | --------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ |
122
+ | `POST /v1/refunds` (`V1_ROUTES.refunds`, `RefundRequestSchema`, `RefundResponseSchema`) | Refunds are not offered through the API. No release of the service ever answered it. |
123
+
124
+ Two things stay with it for the same reason. The `refund_window_closed` problem code stays in
125
+ `ProblemCodeSchema`, because taking a member out narrows a published type; no release of the service
126
+ sends it. And its two example payloads, `fixtures/v1/billing/refund-request.json` and `refund.json`,
127
+ stay in the fixture corpus, because a fixture path is an export too.
128
+
103
129
  ### Catalog blindness
104
130
 
105
131
  **No type here enumerates the subscription catalog or the model catalog.** `planId`, `skuId`,
@@ -134,6 +160,67 @@ person bought or what would change it. Limits reach the app as numbers
134
160
  (`limits.communities`, `used.communities`, and each hosted community's `limits` and `usage`),
135
161
  so it can say "this community is full" without naming a plan.
136
162
 
163
+ ### A missing thing, or an unreadable request
164
+
165
+ Two codes answer two different facts, so a client can tell whether the address it asked about
166
+ resolves without parsing the path:
167
+
168
+ | Code | The fact |
169
+ | ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
170
+ | `malformed_identifier` | The address named nothing. An identifier in the path is not one the service could have issued (`/v1/seats/not-an-id`). Say there is no such thing. |
171
+ | `malformed_request` | The address resolves, and the request to it could not be read: a bad cursor, limit, window, period or body, including an identifier carried in the query or the body. Fix the request and ask again. |
172
+ | `not_found` | The identifier is well formed, and nothing by that identifier exists (or the caller may not see it). Say there is no such thing. |
173
+
174
+ `malformed_identifier` is newer than `malformed_request`. A service that predates it sends
175
+ `malformed_request` for both of the first two facts, so from an older service that code cannot
176
+ rule out the first one.
177
+
178
+ A client one release behind this package does not get its old `malformed_request` handling for
179
+ the new code. An unrecognised code fails `ProblemSchema`, so the thin client raises
180
+ `CloudApiResponseError` rather than `CloudApiProblemError`, with `error.body.code` still carrying
181
+ `malformed_identifier` (see "Additive within a major" above). Move to this release before relying
182
+ on the service to send it.
183
+
184
+ ### Remote usage and the designation
185
+
186
+ `GET /v1/remote/usage` answers where the caller's account stands against each published
187
+ remote-access limit this period. It takes a bearer or the person's own browser session and
188
+ always answers for the caller's own account. Each entry carries `limit` and `used` already in
189
+ its `unit`, and a `fraction` the server computed: render it, never recompute it, so a page can
190
+ never round differently from the service that enforces the limit. `enforceable: false` means
191
+ `used` is the period's peak rather than a figure for now, and such a limit frees as soon as the
192
+ usage ends. An account that used nothing gets zeroes, never a 404. Nothing in it is money.
193
+
194
+ `GET /v1/orgs/{orgId}/remote/designation` reads which instance the organization keeps always
195
+ available, with every field nullable so "nobody holds it" is a state. `cooldownUntil` says when
196
+ it may next change, before anybody tries. No route withdraws a designation.
197
+
198
+ `RemoteStatusSchema` may echo the `instanceId` it is about, so answers read concurrently can be
199
+ matched to their instance. Each close report in `POST /v1/remote/events` may name its span
200
+ (`openedAt` beside `at`), the requests in that span and the bytes each way. Byte counts are
201
+ base-10 strings (`ByteCountSchema`), because a long window can move more bytes than a JavaScript
202
+ number holds exactly. A batch without these fields is accepted as before.
203
+
204
+ Every `POST /v1/remote/events` request names its batch in an `Idempotency-Key` header
205
+ (`REMOTE_EVENTS_IDEMPOTENCY_HEADER`, value `RemoteEventBatchKeySchema`): an opaque string you
206
+ choose, one per batch, at most 200 characters. A request without it is refused with
207
+ `malformed_request`. When a batch's acknowledgement is lost, send it again with the same key;
208
+ when the contents change, use a new key. A key whose batch was already accepted from your instance
209
+ is answered `200` with `{ accepted: 0 }`: the batch was already applied, and nothing in it is
210
+ counted twice. A batch that was refused or failed was not accepted, so retrying it with its key
211
+ applies it.
212
+
213
+ ### Tunnel credentials: which hostnames, and how a replacement arrives
214
+
215
+ A credential from `POST /v1/remote/credentials/issue` may carry `hosts`: every hostname the
216
+ instance should serve with it, its own address first. Serve each one, and stop serving any
217
+ hostname that is no longer listed; compare without regard to case. When `hosts` is absent,
218
+ keep serving as before: absent is not an empty list, and a present list is never empty. `acl`
219
+ stays opaque; do not parse it for names. A `rotate` command's `credentialId` is an issue key,
220
+ not a credential id: present it as the issue call's `idempotencyKey` to receive the
221
+ replacement, then confirm the replacement with the `credentialId` that call returns. If that
222
+ call is refused, keep the current credential; the service may offer another later.
223
+
137
224
  ### Hosted communities
138
225
 
139
226
  The service starts a community on a Community server and hands ownership to a person through
@@ -168,14 +255,89 @@ that server's single-use owner claim; it never owns one itself.
168
255
  - **Generate JSON Schema with `{ io: 'input' }`.** `tolerantEnum` maps an unknown value with a
169
256
  transform, and Zod cannot express a transform's output in JSON Schema. Call
170
257
  `z.toJSONSchema(schema, { io: 'input' })` (or pass `unrepresentable: 'any'`) for the
171
- communities shapes, or the conversion throws.
258
+ communities shapes, or the conversion throws. The same holds for `OffersResponseSchema`, whose
259
+ `interval` is tolerant, for `RemoteUsageResponseSchema`, whose `unit` and `state` are tolerant,
260
+ and for `AgentSchema`, whose `claimStatus` is tolerant, all for the same reason.
172
261
 
173
262
  Every link to a community is a runtime value.
174
263
 
175
264
  ### Money is never a number
176
265
 
177
266
  Every amount is an **integer count of micro-units carried as a string** (`MicroAmountSchema`). A
178
- `z.number()` on an amount is a precision bug, not a style choice.
267
+ `z.number()` on an amount is a precision bug, not a style choice. A micro-unit is a millionth of
268
+ the major unit of the currency the response names.
269
+
270
+ ### Money or credits: every amount says which
271
+
272
+ An amount is one of two kinds, and a renderer has to know which before it shows it: the same
273
+ string read the wrong way prints a price as a credit balance.
274
+
275
+ - **`MoneyMicroSchema`** (and `PositiveMoneyMicroSchema` for an amount to pay): money paid,
276
+ refunded, offered or capped. The auto-reload ceiling, the usage and statement list price, the
277
+ nudge's suggested plan price and saving, an offer's price and the top-up amount are money, and
278
+ so is the amount on the withdrawn refund answer.
279
+ - **`CreditMicroSchema`**: credits held, spent or priced. Included credits, the balance's
280
+ granted, remaining, pending, held and owed amounts, the usage and statement DorkOS price, the
281
+ price-list rates and the nudge's trailing spend are credits.
282
+
283
+ Both have exactly the wire shape of `MicroAmountSchema` and both infer `string`, so nothing on
284
+ the wire or in a consumer's types moves. The kind is a `.meta({ amountKind })` mark
285
+ (`AMOUNT_KIND_META`), which reaches the JSON Schema as an `amountKind` keyword.
286
+ `src/__tests__/amount-kinds.test.ts` fails on an amount field without a mark or with the wrong
287
+ one.
288
+
289
+ ### The denomination is served, never assumed
290
+
291
+ The entitlements, balance, usage, price-list, nudge, offers and statement responses carry an optional
292
+ `denomination` (`DenominationSchema`):
293
+
294
+ - `currency`, an ISO 4217 code: what the micro-units are millionths of;
295
+ - `microPerCredit`, a positive integer string: how many micro-units one credit is.
296
+
297
+ This package publishes no value for either. The service sends them, so the scale can change
298
+ without a client release and two clients can never disagree about it. **A client that receives
299
+ no `denomination` must not guess one**: show the surface's "could not read this" state instead.
300
+ The fixtures use the ISO 4217 test code `XTS` and a placeholder scale, and a test fails if any
301
+ fixture carries another.
302
+
303
+ ```json
304
+ { "heldMicro": "4700", "denomination": { "currency": "XTS", "microPerCredit": "250" } }
305
+ ```
306
+
307
+ ### Rendering an amount: `@dork-labs/cloud-api/display`
308
+
309
+ One formatter for every client, so the same balance reads the same everywhere. Each function
310
+ takes the amount string and the response's `denomination`, and returns a string, or `null` for
311
+ a malformed amount or a missing or malformed denomination. It never guesses.
312
+
313
+ | Function | Kind | Rounding |
314
+ | --------------------------------------------------- | ---------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
315
+ | `formatPosition(micro, denomination)` | what someone has or may still spend | down to whole credits, so no page shows credit that cannot be spent |
316
+ | `formatCharge(micro, denomination)` | what someone spent, was charged or is held for | half away from zero to whole credits; `0` for zero; `<1` (or `-<1`) for a non-zero amount under half a credit |
317
+ | `formatRate(micro, denomination)` | a price per unit of something | never rounded: every significant digit, trailing zeros trimmed (`null` if the scale cannot write it as a finite decimal) |
318
+ | `formatMoney(micro, { currency })` | money paid, refunded or offered | to the currency's minor unit, half away from zero; an exactly whole amount has no minor digits; a tiny non-zero amount reads `<` the smallest unit |
319
+ | `formatCap(micro, { currency })` | a money limit | as money, but rounded down, so a limit never reads higher than the one enforced |
320
+ | `formatMoneyRate(micro, { currency })` | a price in money | exact, with at least the currency's minor digits |
321
+ | `formatCreditsWithMoney(micro, denomination, kind)` | a credit figure with its money value beside it | `<n> credits (<money>)`; the money comes from the rounded credit count, so the two always agree |
322
+ | `formatTotal(lines, denomination, kind)` | a total | the exact sum of the lines, rounded once; never the sum of rounded lines, so it may differ from them by a credit or two |
323
+
324
+ ```ts
325
+ import { formatCharge, formatCreditsWithMoney } from '@dork-labs/cloud-api/display';
326
+
327
+ const balance = BalanceSchema.parse(body);
328
+ if (!balance.denomination) return couldNotRead();
329
+ formatCharge(balance.heldMicro, balance.denomination); // "19" for the example above
330
+ formatCreditsWithMoney(balance.allowance.remainingMicro, balance.denomination, 'position');
331
+ ```
332
+
333
+ A rate's money always shows the minor digits and a position's or charge's money drops them
334
+ when the amount is whole, so one credit can read `1 credit (XTS 1.00)` as a rate and
335
+ `1 credit (XTS 1)` as a position. That is deliberate: a price keeps its precision, a quantity
336
+ reads plainly.
337
+
338
+ Digits come from `BigInt` alone, so no amount ever becomes a JavaScript number. `Intl` is asked
339
+ only for a currency's symbol and its minor-unit digits, never to format an amount. Numbers are
340
+ grouped the way `en-US` groups them. The module imports nothing.
179
341
 
180
342
  ### No origin baked in
181
343
 
@@ -190,8 +352,8 @@ request is not part of this contract and is published nowhere.
190
352
 
191
353
  ### Where amounts appear, and where they do not
192
354
 
193
- Three routes carry amounts, and it is worth being precise about which, because "no prices here"
194
- would be a comfortable claim and a false one:
355
+ Five routes carry prices or charges, and it is worth being precise about which, because "no
356
+ prices here" would be a comfortable claim and a false one:
195
357
 
196
358
  - **`GET /v1/price-list`** publishes the per-model list. That is its whole job.
197
359
  - **`GET /v1/usage`** returns, per row and in the totals, both `listPriceMicro` (the upstream
@@ -199,16 +361,42 @@ would be a comfortable claim and a false one:
199
361
  difference, and that is the point rather than an accident: somebody paying for inference
200
362
  through us can see exactly what the routing costs them without asking. If that ever stops
201
363
  being the intent, the field to drop is `listPriceMicro`, and dropping it is a `/v2` change.
364
+ - **`GET /v1/statement`** may carry the same projection as `GET /v1/usage`, one line per model
365
+ for the statement's period, with `totals` that are the exact sum of the lines, and the `from`
366
+ and `to` of the window the period covers (a period is labelled by a month, but it need not be a
367
+ calendar month). The lines cover inference usage only: any other charge in the period is in the
368
+ downloadable statement, so `totals` is not the whole bill when there are other charges. It is
369
+ the caller's own bill, so it carries both prices for the same reason `GET /v1/usage` does.
370
+ `lines` and `totals` arrive together or not at all, and a service that predates them answers
371
+ with the download link alone.
202
372
  - **`GET /v1/nudge`** returns one already-computed comparison — one subscription, one price, one
203
373
  subtraction the server already did. The client renders it and computes nothing.
374
+ - **`GET /v1/offers`** lists what the service will sell the caller: per offer, an opaque `skuId`
375
+ (the one string `POST /v1/checkout` takes back, and the only place a client gets one), the
376
+ opaque `planId` `GET /v1/entitlements` also publishes, the server's own `displayName`, the
377
+ `interval` (`month` or `year`), the price per interval as money, and the published
378
+ `EntitlementLimitsSchema`. It carries no "recommended" flag and no "current" flag: compare
379
+ `planId` with the entitlement's to mark what the caller is on, and render the offers in the
380
+ order served, without re-sorting. `interval` is tolerant, so an interval added later reads as
381
+ `unrecognised` rather than failing the list. An account with nothing on sale gets an empty
382
+ list, never a 404. It takes a bearer or the person's own browser session.
383
+
384
+ Each of those, and the balance and the entitlements, carries the optional
385
+ `denomination` above. The price list's entries also carry optional cache-read and cache-write
386
+ rates (`cacheReadMicro`, `cacheWriteMicro`) beside input and output, in the entry's existing
387
+ `unit`.
204
388
 
205
389
  Nothing else carries an amount. In particular, no inference route does: not a rate, not a
206
390
  multiplier, not a unit cost. And no route anywhere carries a supplier's terms.
207
391
 
208
- `POST /v1/topup` carries an amount in the request (`TopupRequestSchema`), and `POST /v1/refunds`
209
- answers with the amount that came back. Neither publishes a minimum, a first-purchase ceiling or
210
- a refund window: those are server policy, and a request that misses one is refused with
211
- `topup_below_minimum`, `first_purchase_cap` or `refund_window_closed` rather than described here.
392
+ `POST /v1/checkout` and `POST /v1/portal` accept either a bearer token or the person's own
393
+ browser session, with the same request and response shapes either way. A request authenticated
394
+ by a browser session must come from an origin the service trusts, or it is refused with
395
+ `forbidden`.
396
+
397
+ `POST /v1/topup` carries an amount in the request (`TopupRequestSchema`). It publishes neither a
398
+ minimum nor a first-purchase ceiling: those are server policy, and a request that misses one is
399
+ refused with `topup_below_minimum` or `first_purchase_cap` rather than described here.
212
400
 
213
401
  Fields typed `SecretValueSchema` are returned **once**: hold them as credential references, never
214
402
  as configuration strings, and never log them.
@@ -221,7 +409,7 @@ the same examples; `src/__tests__/fixtures.test.ts` proves every example is vali
221
409
  manifest and the directory have not drifted apart.
222
410
 
223
411
  The corpus covers responses, stream events, and the request shapes a caller has to build itself
224
- (a top-up, a refund, a command acknowledgement). Every example is synthetic: opaque identifiers,
412
+ (a top-up, a command acknowledgement). Every example is synthetic: opaque identifiers,
225
413
  RFC 2606 `.invalid` hosts, and no real catalog value anywhere.
226
414
 
227
415
  ```ts
package/dist/billing.d.ts CHANGED
@@ -139,6 +139,10 @@ export declare const EntitlementsSchema: z.ZodObject<{
139
139
  canCreateSeat: z.ZodBoolean;
140
140
  canInviteMember: z.ZodBoolean;
141
141
  staleAt: z.ZodISODateTime;
142
+ denomination: z.ZodOptional<z.ZodObject<{
143
+ currency: z.ZodString;
144
+ microPerCredit: z.ZodString;
145
+ }, z.core.$strip>>;
142
146
  }, z.core.$strip>;
143
147
  /** What the caller is allowed to do. */
144
148
  export type Entitlements = z.infer<typeof EntitlementsSchema>;
@@ -167,6 +171,10 @@ export declare const BalanceSchema: z.ZodObject<{
167
171
  enabled: z.ZodBoolean;
168
172
  ceilingMicro: z.ZodNullable<z.ZodString>;
169
173
  }, z.core.$strip>;
174
+ denomination: z.ZodOptional<z.ZodObject<{
175
+ currency: z.ZodString;
176
+ microPerCredit: z.ZodString;
177
+ }, z.core.$strip>>;
170
178
  }, z.core.$strip>;
171
179
  /** The caller`s credit position. */
172
180
  export type Balance = z.infer<typeof BalanceSchema>;
@@ -272,6 +280,10 @@ export declare const UsageResponseSchema: z.ZodObject<{
272
280
  listPriceMicro: z.ZodString;
273
281
  dorkosPriceMicro: z.ZodString;
274
282
  }, z.core.$strip>;
283
+ denomination: z.ZodOptional<z.ZodObject<{
284
+ currency: z.ZodString;
285
+ microPerCredit: z.ZodString;
286
+ }, z.core.$strip>>;
275
287
  }, z.core.$strip>;
276
288
  /** The caller`s own usage for a window. */
277
289
  export type UsageResponse = z.infer<typeof UsageResponseSchema>;
@@ -282,6 +294,8 @@ export declare const PriceListEntrySchema: z.ZodObject<{
282
294
  unit: z.ZodString;
283
295
  inputMicro: z.ZodString;
284
296
  outputMicro: z.ZodString;
297
+ cacheReadMicro: z.ZodOptional<z.ZodString>;
298
+ cacheWriteMicro: z.ZodOptional<z.ZodString>;
285
299
  }, z.core.$strip>;
286
300
  /**
287
301
  * `GET /v1/price-list` — the published per-model price list.
@@ -300,6 +314,12 @@ export declare const PriceListResponseSchema: z.ZodObject<{
300
314
  unit: z.ZodString;
301
315
  inputMicro: z.ZodString;
302
316
  outputMicro: z.ZodString;
317
+ cacheReadMicro: z.ZodOptional<z.ZodString>;
318
+ cacheWriteMicro: z.ZodOptional<z.ZodString>;
319
+ }, z.core.$strip>>;
320
+ denomination: z.ZodOptional<z.ZodObject<{
321
+ currency: z.ZodString;
322
+ microPerCredit: z.ZodString;
303
323
  }, z.core.$strip>>;
304
324
  }, z.core.$strip>;
305
325
  /**
@@ -318,15 +338,150 @@ export declare const NudgeSchema: z.ZodObject<{
318
338
  savingMicro: z.ZodString;
319
339
  computedAt: z.ZodISODateTime;
320
340
  dismissible: z.ZodLiteral<true>;
341
+ denomination: z.ZodOptional<z.ZodObject<{
342
+ currency: z.ZodString;
343
+ microPerCredit: z.ZodString;
344
+ }, z.core.$strip>>;
321
345
  }, z.core.$strip>;
322
346
  /** One already-computed comparison. */
323
347
  export type Nudge = z.infer<typeof NudgeSchema>;
348
+ /**
349
+ * How often an offer recurs.
350
+ *
351
+ * Mechanism, not catalog: it says how a charge repeats, not what is on sale.
352
+ */
353
+ export declare const OfferIntervalSchema: z.ZodEnum<{
354
+ month: "month";
355
+ year: "year";
356
+ }>;
357
+ /** How often an offer recurs. */
358
+ export type OfferInterval = z.infer<typeof OfferIntervalSchema>;
359
+ /**
360
+ * One thing the service will sell the caller, as `GET /v1/offers` lists it.
361
+ *
362
+ * It is the only place a client is handed a `skuId`, which is the string
363
+ * `POST /v1/checkout` takes back. `skuId` and `planId` are different identifier
364
+ * spaces and neither can stand in for the other: one subscription has one
365
+ * `planId` and one `skuId` per interval. `planId` is the same opaque token
366
+ * `GET /v1/entitlements` publishes, so a page compares the two to mark what the
367
+ * caller is on; this shape deliberately carries no "current" flag of its own.
368
+ *
369
+ * It carries no "recommended" flag and no badge. Render the offers in the order
370
+ * the service sends them and do not re-sort them; the order carries no meaning
371
+ * beyond that.
372
+ *
373
+ * `interval` is tolerant: an interval added in a later release reads as
374
+ * `unrecognised`, so one new offer cannot fail the whole list. Generate the JSON
375
+ * Schema with `{ io: 'input' }`. `limits` is the published entitlement-limits
376
+ * shape itself, so its own description speaks of an entitlement.
377
+ */
378
+ export declare const OfferSchema: z.ZodObject<{
379
+ skuId: z.ZodString;
380
+ planId: z.ZodString;
381
+ displayName: z.ZodString;
382
+ interval: z.ZodUnion<readonly [z.ZodEnum<{
383
+ month: "month";
384
+ year: "year";
385
+ }>, z.ZodPipe<z.ZodString, z.ZodTransform<"unrecognised", string>>]>;
386
+ amountMicro: z.ZodString;
387
+ limits: z.ZodObject<{
388
+ personSeatsIncluded: z.ZodNumber;
389
+ agentSeatsIncluded: z.ZodNumber;
390
+ includedCreditsMicro: z.ZodString;
391
+ cloudHours: z.ZodNumber;
392
+ storageGb: z.ZodNumber;
393
+ remoteAccess: z.ZodEnum<{
394
+ byo: "byo";
395
+ on_demand: "on_demand";
396
+ always_available: "always_available";
397
+ }>;
398
+ alwaysAvailableInstances: z.ZodNumber;
399
+ customAddress: z.ZodEnum<{
400
+ none: "none";
401
+ addon: "addon";
402
+ included: "included";
403
+ }>;
404
+ managedConnectionActions: z.ZodNullable<z.ZodNumber>;
405
+ support: z.ZodEnum<{
406
+ community: "community";
407
+ priority: "priority";
408
+ }>;
409
+ emailAddressPerSeat: z.ZodBoolean;
410
+ communities: z.ZodOptional<z.ZodObject<{
411
+ maxCommunities: z.ZodNullable<z.ZodNumber>;
412
+ maxMembersPerCommunity: z.ZodNullable<z.ZodNumber>;
413
+ maxStorageBytesPerCommunity: z.ZodNullable<z.ZodNumber>;
414
+ }, z.core.$strip>>;
415
+ }, z.core.$strip>;
416
+ }, z.core.$strip>;
417
+ /** One thing the service will sell the caller. */
418
+ export type Offer = z.infer<typeof OfferSchema>;
419
+ /**
420
+ * `GET /v1/offers` — everything the service will sell the caller right now.
421
+ *
422
+ * A bearer token or the person's own browser session. An account with nothing
423
+ * on sale gets 200 and an empty list, never a 404: nothing on sale is a normal
424
+ * state, and a client that met a 404 would report an outage.
425
+ */
426
+ export declare const OffersResponseSchema: z.ZodObject<{
427
+ offers: z.ZodArray<z.ZodObject<{
428
+ skuId: z.ZodString;
429
+ planId: z.ZodString;
430
+ displayName: z.ZodString;
431
+ interval: z.ZodUnion<readonly [z.ZodEnum<{
432
+ month: "month";
433
+ year: "year";
434
+ }>, z.ZodPipe<z.ZodString, z.ZodTransform<"unrecognised", string>>]>;
435
+ amountMicro: z.ZodString;
436
+ limits: z.ZodObject<{
437
+ personSeatsIncluded: z.ZodNumber;
438
+ agentSeatsIncluded: z.ZodNumber;
439
+ includedCreditsMicro: z.ZodString;
440
+ cloudHours: z.ZodNumber;
441
+ storageGb: z.ZodNumber;
442
+ remoteAccess: z.ZodEnum<{
443
+ byo: "byo";
444
+ on_demand: "on_demand";
445
+ always_available: "always_available";
446
+ }>;
447
+ alwaysAvailableInstances: z.ZodNumber;
448
+ customAddress: z.ZodEnum<{
449
+ none: "none";
450
+ addon: "addon";
451
+ included: "included";
452
+ }>;
453
+ managedConnectionActions: z.ZodNullable<z.ZodNumber>;
454
+ support: z.ZodEnum<{
455
+ community: "community";
456
+ priority: "priority";
457
+ }>;
458
+ emailAddressPerSeat: z.ZodBoolean;
459
+ communities: z.ZodOptional<z.ZodObject<{
460
+ maxCommunities: z.ZodNullable<z.ZodNumber>;
461
+ maxMembersPerCommunity: z.ZodNullable<z.ZodNumber>;
462
+ maxStorageBytesPerCommunity: z.ZodNullable<z.ZodNumber>;
463
+ }, z.core.$strip>>;
464
+ }, z.core.$strip>;
465
+ }, z.core.$strip>>;
466
+ denomination: z.ZodOptional<z.ZodObject<{
467
+ currency: z.ZodString;
468
+ microPerCredit: z.ZodString;
469
+ }, z.core.$strip>>;
470
+ }, z.core.$strip>;
471
+ /** Everything the service will sell the caller right now. */
472
+ export type OffersResponse = z.infer<typeof OffersResponseSchema>;
324
473
  /**
325
474
  * A request for a hosted page.
326
475
  *
327
- * `skuId` is an identifier the client received from the server. A client never
328
- * constructs one and never enumerates the set. The amount and its rendering
329
- * belong to the hosted page, not to this contract.
476
+ * `skuId` is an identifier the client received from the server, from
477
+ * `GET /v1/offers` ({@link OffersResponseSchema}). A client never constructs one
478
+ * and never enumerates the set. The amount and its rendering belong to the
479
+ * hosted page, not to this contract.
480
+ *
481
+ * `POST /v1/checkout` and `POST /v1/portal` accept either credential: a bearer
482
+ * token, or the person's own browser session. Their request and response shapes
483
+ * are the same either way. A request authenticated by a browser session must
484
+ * come from an origin the service trusts, or it is refused with `forbidden`.
330
485
  */
331
486
  export declare const HostedPageRequestSchema: z.ZodObject<{
332
487
  skuId: z.ZodOptional<z.ZodString>;
@@ -345,12 +500,57 @@ export declare const HostedPageResponseSchema: z.ZodObject<{
345
500
  export declare const StatementQuerySchema: z.ZodObject<{
346
501
  period: z.ZodString;
347
502
  }, z.core.$strip>;
348
- /** `GET /v1/statement` — a download link for the caller`s itemised statement. */
503
+ /**
504
+ * `GET /v1/statement` — the caller`s own statement for one period: a download
505
+ * link, and optionally its lines and totals.
506
+ *
507
+ * `lines` and `totals` are the same projection `GET /v1/usage` publishes, one
508
+ * line per model for the statement's period. They cover inference usage only:
509
+ * any other charge in the period appears in the downloadable statement, not
510
+ * here, so `totals` is not the whole bill when there are other charges.
511
+ *
512
+ * `from` and `to` are the window the period covers. A period is labelled by a
513
+ * month, but it need not be a calendar month, so a client never derives the
514
+ * window from the label.
515
+ *
516
+ * All four are optional, and a service sends `lines` and `totals` together or
517
+ * not at all. A service that predates them answers with the link alone; a client
518
+ * that meets no `lines` but has `from` and `to` can read the same projection
519
+ * from `GET /v1/usage` with `groupBy=model` for that window.
520
+ *
521
+ * `totals` is the exact sum of the lines. Render it from the exact figures, never
522
+ * by adding rounded lines.
523
+ */
349
524
  export declare const StatementResponseSchema: z.ZodObject<{
350
525
  period: z.ZodString;
351
526
  downloadUrl: z.ZodString;
352
527
  expiresAt: z.ZodISODateTime;
528
+ from: z.ZodOptional<z.ZodISODateTime>;
529
+ to: z.ZodOptional<z.ZodISODateTime>;
530
+ lines: z.ZodOptional<z.ZodArray<z.ZodObject<{
531
+ key: z.ZodString;
532
+ displayName: z.ZodString;
533
+ units: z.ZodNumber;
534
+ unit: z.ZodString;
535
+ listPriceMicro: z.ZodString;
536
+ dorkosPriceMicro: z.ZodString;
537
+ costBasis: z.ZodEnum<{
538
+ byo_key: "byo_key";
539
+ managed: "managed";
540
+ published_price: "published_price";
541
+ }>;
542
+ }, z.core.$strip>>>;
543
+ totals: z.ZodOptional<z.ZodObject<{
544
+ listPriceMicro: z.ZodString;
545
+ dorkosPriceMicro: z.ZodString;
546
+ }, z.core.$strip>>;
547
+ denomination: z.ZodOptional<z.ZodObject<{
548
+ currency: z.ZodString;
549
+ microPerCredit: z.ZodString;
550
+ }, z.core.$strip>>;
353
551
  }, z.core.$strip>;
552
+ /** The caller`s own statement for one period. */
553
+ export type StatementResponse = z.infer<typeof StatementResponseSchema>;
354
554
  /**
355
555
  * `POST /v1/topup` — buy credit, answered with {@link HostedPageResponseSchema}.
356
556
  *
@@ -378,25 +578,38 @@ export declare const TopupRequestSchema: z.ZodObject<{
378
578
  /** A request to buy credit. */
379
579
  export type TopupRequest = z.infer<typeof TopupRequestSchema>;
380
580
  /**
381
- * `POST /v1/refunds` — ask for one charge to be refunded.
581
+ * `POST /v1/refunds` — withdrawn. A request no release of the service accepts.
382
582
  *
383
- * Opaque identifiers only. The amount is the charge`s own, so the request never
384
- * names one, and a refund asked for after the window has closed is refused with
385
- * `refund_window_closed`. How long the window is is server policy and is not
386
- * published here.
583
+ * @deprecated DorkOS Cloud does not offer refunds through this API, and the
584
+ * route answers `not_found`. Kept only so an import from an earlier release
585
+ * still compiles; it is removed in `/v2`.
387
586
  */
388
587
  export declare const RefundRequestSchema: z.ZodObject<{
389
588
  chargeId: z.ZodString;
390
589
  }, z.core.$strip>;
391
- /** Ask for one charge to be refunded. */
590
+ /**
591
+ * A withdrawn refund request.
592
+ *
593
+ * @deprecated See {@link RefundRequestSchema}.
594
+ */
392
595
  export type RefundRequest = z.infer<typeof RefundRequestSchema>;
393
- /** `POST /v1/refunds` — the accepted refund. */
596
+ /**
597
+ * `POST /v1/refunds` — withdrawn. An answer no release of the service sends.
598
+ *
599
+ * @deprecated DorkOS Cloud does not offer refunds through this API, and the
600
+ * route answers `not_found`. Kept only so an import from an earlier release
601
+ * still compiles; it is removed in `/v2`.
602
+ */
394
603
  export declare const RefundResponseSchema: z.ZodObject<{
395
604
  refundId: z.ZodString;
396
605
  chargeId: z.ZodString;
397
606
  refundedMicro: z.ZodString;
398
607
  refundedAt: z.ZodISODateTime;
399
608
  }, z.core.$strip>;
400
- /** The accepted refund. */
609
+ /**
610
+ * A withdrawn refund answer.
611
+ *
612
+ * @deprecated See {@link RefundResponseSchema}.
613
+ */
401
614
  export type RefundResponse = z.infer<typeof RefundResponseSchema>;
402
615
  //# sourceMappingURL=billing.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"billing.d.ts","sourceRoot":"","sources":["../src/billing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB;;;;;GAKG;AACH,eAAO,MAAM,4BAA4B;;;;EAItC,CAAC;AAEJ,8FAA8F;AAC9F,eAAO,MAAM,6BAA6B;;;;EAIvC,CAAC;AAEJ,gDAAgD;AAChD,eAAO,MAAM,uBAAuB;;;EAEoB,CAAC;AAEzD;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB;;;;;;;iBASmC,CAAC;AAEvE;;;;;;;GAOG;AACH,eAAO,MAAM,gCAAgC;;;;iBAyBuC,CAAC;AAErF,yDAAyD;AACzD,eAAO,MAAM,uBAAuB;;;;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