resources/base.ts
Source: sdks/typescript/packages/sdk/src/resources/base.ts. Back to the TypeScript SDK reference index.
note
This page is generated by tools/docs/gen_sdk_reference.py from the SDK sources and the OpenAPI text folders. Do not edit it by hand: change the source and regenerate.
Type alias CallOptions
Per call options accepted by every SDK method.
Definition: Pick<RequestOptions, "headers" \| "idempotencyKey" \| "signal" \| "traceparent">.
Type alias PathParams
Values of the {name} placeholders of a route.
Definition: Record<string, string \| number>.
Type alias Query
Query parameters of a call.
Definition: Record<string, QueryValue>.
Class Resource
Base of the Control Plane sub-clients: call, page and iter helpers on the shared HttpClient.
Attributes:
| Name | Type | Required | Description |
|---|---|---|---|
body | unknown, | no | Body of the call made by the protected call helper. |
method | HttpMethod, | yes | HTTP method of the call made by call. |
opts | CallOptions & Pick<RequestOptions, "responseType">, | no | Per call options of call: headers, idempotency key, signal, traceparent and response type. |
params | PathParams, | no | Values of the placeholders of the path of call. |
path | string, | yes | Path template of the route called by call. |
query | Query, | no | Query parameters of the call made by call. |
Constructor Resource
new Resource(readonly http: HttpClient)
Keeps the HTTP client shared with EnterpriseAI.
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
readonly http | HttpClient | yes | HTTP client of the EnterpriseAI client. |