@chronary/sdk 0.9.0 → 0.11.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.
- package/CHANGELOG.md +11 -1
- package/README.md +10 -0
- package/dist/index.cjs +123 -109
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +162 -87
- package/dist/index.d.ts +162 -87
- package/dist/index.js +123 -109
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@chronary/sdk` will be documented in this file starting with the soft-launch release.
|
|
4
4
|
|
|
5
|
-
## 0.
|
|
5
|
+
## 0.11.0 — 2026-11-16
|
|
6
|
+
|
|
7
|
+
- **Time-zone-aware recurrence (#2276).** `events.create()` takes `timezone` (IANA, e.g. `"America/Los_Angeles"`) and `events.update()` / `updateById()` take `timezone` (or `null` for UTC): a recurring series then repeats on local wall time across daylight-saving changes. Events gain `timezone`; expanded instances gain `startLocal`, `utcOffset` and `dstAdjusted` (`"gap"` when a DST gap moved the start forward).
|
|
8
|
+
- **Series edits keep cancelled occurrences (#2277).** An update that changes `start_time`, `recurrence_rule` or `timezone` on a recurring series now keeps each cancelled occurrence on its local date. Any with no match are dropped and listed in the response's `droppedExdates`.
|
|
9
|
+
|
|
10
|
+
## 0.10.0
|
|
11
|
+
|
|
12
|
+
- `client.usage.get()` types the two fields the API already returned: `webhook_endpoints` (`{ used, limit }`, registered webhook endpoints vs. the plan cap) and `scoped_keys` (`{ count, limit }`, active agent-scoped keys). Add the `ScopedKeysUsage` type and export `HoldsUsage` and `CrossCalendarQueriesUsage`. A new test fails when the API's `Usage` response gains a field the SDK type lacks (#1995).
|
|
13
|
+
- Every single-request resource method now returns an `APIPromise<T>`, so `.withResponse()` works on them as documented: `const { data, response } = await client.agents.get('agt_1').withResponse()` gives the status, headers and parsed `response.quota`. `APIPromise` is now a real `Promise` subclass, so `await`, `Promise.all` and `Promise<T>` annotations work as before. The auto-paginating `list()` helpers still return a `PageIterator` (#2002).
|
|
14
|
+
|
|
15
|
+
## 0.9.0
|
|
6
16
|
|
|
7
17
|
- A 429 `quota_exceeded` (a monthly plan limit) is no longer retried: the request rejects with `QuotaExceededError` at once instead of sleeping on `Retry-After` and asking again. A rate-limit 429 still retries, waiting at most 60 seconds (#1936).
|
|
8
18
|
- Add the `developer` plan: `PlanId` includes it, `Plan.annual_price`, `BillingSummary.pending_plan` / `pending_plan_interval` / `pending_plan_at`, `BillingUpgradeOption.plan` (`developer` | `pro`) and `via`, `UpgradeRequest.plan`. Errors expose `upgradePlan` (the plan `upgradeUrl` leads to). Additive; `BillingSummary.plan` stays a plain string (#1911).
|
package/README.md
CHANGED
|
@@ -74,6 +74,16 @@ Chronary enforces a per-key rate limit and per-org monthly quotas that vary by p
|
|
|
74
74
|
|
|
75
75
|
Pro-only feature calls return `403` with an upgrade hint on Free. See the full matrix and rate-limit handling guidance at <https://docs.chronary.ai/resources/rate-limits/>.
|
|
76
76
|
|
|
77
|
+
## Response headers and quota
|
|
78
|
+
|
|
79
|
+
Every single-request method returns an `APIPromise`: `await` it for the data, or call `.withResponse()` to also get the status, headers and parsed quota headers. The auto-paginating `list()` helpers return a `PageIterator` instead.
|
|
80
|
+
|
|
81
|
+
```ts
|
|
82
|
+
const { data: agent, response } = await client.agents.get('agt_1').withResponse();
|
|
83
|
+
console.log(response.headers.get('x-request-id'));
|
|
84
|
+
console.log(response.quota?.remaining, response.quota?.resetAt);
|
|
85
|
+
```
|
|
86
|
+
|
|
77
87
|
## Webhook Verification
|
|
78
88
|
|
|
79
89
|
```ts
|