Skip to main content

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:

NameTypeRequiredDescription
bodyunknown,noBody of the call made by the protected call helper.
methodHttpMethod,yesHTTP method of the call made by call.
optsCallOptions & Pick<RequestOptions, "responseType">,noPer call options of call: headers, idempotency key, signal, traceparent and response type.
paramsPathParams,noValues of the placeholders of the path of call.
pathstring,yesPath template of the route called by call.
queryQuery,noQuery parameters of the call made by call.

Constructor Resource​

new Resource(readonly http: HttpClient)

Keeps the HTTP client shared with EnterpriseAI.

NameTypeDefaultRequiredDescription
readonly httpHttpClientyesHTTP client of the EnterpriseAI client.