API reference
grabkit
Section titled “grabkit”Classes
Section titled “Classes”| Class | Description |
|---|---|
| Call | - |
| GrabkitError | - |
| GrabkitTransportError | - |
| GrabkitValidationError | - |
Interfaces
Section titled “Interfaces”| Interface | Description |
|---|---|
| ClosureOptions | Options passed to grabkit(baseURL?, options?). |
| GrabkitFactoryOptions | Options passed to grabkit(baseURL?, options?). |
| JsonApiError | - |
| SuccessMeta | Third tuple slot on a successful grab. |
Type Aliases
Section titled “Type Aliases”| Type Alias | Description |
|---|---|
| AnyRecord | - |
| Casing | Key convention applied to consolidated object keys. Values (e.g. JSON:API type strings) are never transformed. |
| Endpoint | - |
| GrabkitFormat | Serialisation format for request and response bodies. |
| GrabResult | - |
| HttpMethod | - |
| OrThrowResult | Success tuple from orThrow: [data, meta] with no error slot. |
| StatusCode | - |
| UrlShape | - |
Functions
Section titled “Functions”| Function | Description |
|---|---|
| default | Create a grab callable for METHOD /path requests. |
| isGrabHttpError | - |
| isGrabTransportError | - |
| orThrow | Await a grab and return [data, meta], or throw on failure. |