@xberg-io/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/README.md +21 -5
- package/dist/index.d.ts +12711 -3944
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +706 -28
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -131,7 +131,7 @@ control plane — `listProjects` / `createProject`, `listApiKeys` / `createApiKe
|
|
|
131
131
|
`deleteIntegration`, `connectIntegration` / `disconnectIntegration`,
|
|
132
132
|
`listIntegrationDocuments` / `fetchIntegrationDocument`.
|
|
133
133
|
|
|
134
|
-
Xberg Enterprise only: `getDocument`, `versions`, `diff` / `getDiffJob`,
|
|
134
|
+
Xberg Enterprise only: `enterpriseHealthz`, `getDocument`, `versions`, `diff` / `getDiffJob`,
|
|
135
135
|
`listExtractionEvents`, `listSubscriptionDeliveries` / `getSubscriptionDelivery`.
|
|
136
136
|
|
|
137
137
|
Both tiers also carry `stopAutoTuneJob` and `listManagedEmbeddingPresets`.
|
|
@@ -149,15 +149,31 @@ a Server-Sent Events stream).
|
|
|
149
149
|
A few documented endpoints are deliberately left out of the client:
|
|
150
150
|
|
|
151
151
|
- `GET /readyz` — an infrastructure readiness probe for orchestrators, not
|
|
152
|
-
application surface. `GET /healthz` *is* used: it backs the tier probe
|
|
152
|
+
application surface. `GET /healthz` *is* used: it backs the tier probe
|
|
153
|
+
and `enterpriseHealthz`.
|
|
153
154
|
- `GET /v1/oauth/callback` and `DELETE /auth/account` (Pro) — browser
|
|
154
155
|
redirect/cookie flows, not API-key surface. `POST /auth/login`, which does
|
|
155
156
|
work with a verified ID token, is exposed.
|
|
156
157
|
|
|
157
158
|
Errors throw subclasses of `XbergError` (`AuthError`, `RateLimitError`,
|
|
158
|
-
`ValidationError`, `NotFoundError`, `ServerError`, `TimeoutError
|
|
159
|
-
|
|
160
|
-
|
|
159
|
+
`ValidationError`, `NotFoundError`, `ServerError`, `TimeoutError`, plus
|
|
160
|
+
`RequestTimeoutError` (408), `ResultExpiredError` (410), `PreconditionFailedError`
|
|
161
|
+
(412), `PreconditionRequiredError` (428) and `GatewayTimeoutError` (504, a
|
|
162
|
+
`ServerError`)). Each carries `status: number`, `body: unknown`, and the
|
|
163
|
+
envelope's `code` and `details`; the two timeout errors also expose `limit` and
|
|
164
|
+
`timeoutSeconds`. `RateLimitError.retryAfter` is parsed from the `Retry-After`
|
|
165
|
+
response header.
|
|
166
|
+
|
|
167
|
+
`retries` enables retries (off by default). 429 and transport failures are
|
|
168
|
+
retried for every method; 502, 503 and 504 only for GET, HEAD, OPTIONS, PUT and
|
|
169
|
+
DELETE without `If-Match`, because a POST, PATCH or versioned write the gateway
|
|
170
|
+
timed out on may still have run, and a replayed `If-Match` write then fails with
|
|
171
|
+
412. Set `retryNonIdempotent: true` to retry them too. A replayed DELETE whose
|
|
172
|
+
first attempt applied throws `NotFoundError`. 408 is not retried by default.
|
|
173
|
+
|
|
174
|
+
`verifyWebhookSignature(secret, header, rawBody)` checks a delivery's
|
|
175
|
+
`X-Webhook-Signature` header in constant time and rejects timestamps older or
|
|
176
|
+
newer than five minutes.
|
|
161
177
|
|
|
162
178
|
The low-level `createClient(...)` factory (a thin `openapi-fetch` wrapper)
|
|
163
179
|
is still exported for direct OpenAPI access.
|