Refresh HiveGrid Cloud reference snapshot

This commit is contained in:
david committed 2026-08-03 15:31:14 +02:00
1 parent 5e99e14772
commit 7f88026f79
5955 files changed
+1177325 -188362

No files matched your search

@@ -112,6 +112,36 @@ try {
Exhausted retries throw `HiveGridNetworkError` with the underlying `cause`.
## Transport security and resource limits
The wrapper accepts only an HTTPS `baseUrl`. Local HTTP development is an
explicit exception restricted to loopback addresses:
```ts
createHiveGridClient({
baseUrl: "http://127.0.0.1:3000",
allowInsecureLocalhost: true,
});
```
Request paths must be relative or absolute URLs on exactly the configured
origin. Cross-origin paths, credential-bearing URLs, fragments, and redirects
fail closed. Per-request custom headers cannot override `Authorization`,
`X-API-Key`, `X-Tenant-ID`, `Host`, or `Content-Length`.
Every network attempt is aborted after 30 seconds by default. Response bodies
are streamed through a 10 MiB default ceiling before JSON/text decoding, so a
remote endpoint cannot force an unbounded buffer allocation. Both values are
configurable within hard safety bounds:
```ts
createHiveGridClient({
baseUrl,
timeoutMs: 15_000,
maxResponseBodyBytes: 2 * 1024 * 1024,
});
```
## Idempotency
POST / PUT / PATCH requests automatically receive an `Idempotency-Key` header
@@ -226,17 +256,18 @@ pnpm --filter @hivegrid/api-client-ts generate
pnpm --filter @hivegrid/api-client-ts generate:all
```
The CI workflow `.github/workflows/sdk-codegen.yml` regenerates on every PR
The CI workflow `.gitea/workflows/sdk-codegen.yml` regenerates on every pull request
that touches `apps/api/src/openapi.ts` or the SDK package and fails the merge
if the committed `src/generated/` tree drifts from the captured OpenAPI
document.
## Error model
| Class | When it fires | Notable fields |
| ---------------------- | ------------------------------------------- | --------------------------------------------- |
| `HiveGridApiError` | API returned a non-retryable HTTP error | `status`, `body`, `requestId` (`x-request-id`) |
| `HiveGridNetworkError` | Network failure after all retries exhausted | `cause` (the underlying transport error) |
| Class | When it fires | Notable fields |
| ------------------------------- | --------------------------------------------- | ---------------------------------------------- |
| `HiveGridApiError` | API returned a non-retryable HTTP error | `status`, `body`, `requestId` (`x-request-id`) |
| `HiveGridNetworkError` | Network failure after all retries exhausted | `cause` (the underlying transport error) |
| `HiveGridResponseTooLargeError` | Response exceeds `maxResponseBodyBytes` | `limitBytes` |
Both inherit from the built-in `Error` so existing `instanceof Error` checks
continue to work.