Skip to main content

Class: AIGatewayConfigsClient

Defined in: src/ai-gateway/configs-client.ts:30

Client for AI Gateway config operations (data plane).

Constructors

Constructor

new AIGatewayConfigsClient(opts): AIGatewayConfigsClient;

Defined in: src/ai-gateway/configs-client.ts:35

Parameters

ParameterType
optsAIGatewaySubClientOptions

Returns

AIGatewayConfigsClient

Methods

list()

list(opts): Promise<objectOutputType<{
object: ZodString;
total: ZodNumber;
has_more: ZodOptional<ZodBoolean>;
data: ZodArray<ZodObject<{
id: ZodString;
name: ZodString;
slug: ZodString;
organisation_id: ZodString;
is_default: ZodNumber;
status: ZodString;
owner_id: ZodString;
updated_by: ZodString;
created_at: ZodString;
last_updated_at: ZodString;
workspace_id: ZodString;
object: ZodString;
}, "passthrough", ZodTypeAny, objectOutputType<{
id: ZodString;
name: ZodString;
slug: ZodString;
organisation_id: ZodString;
is_default: ZodNumber;
status: ZodString;
owner_id: ZodString;
updated_by: ZodString;
created_at: ZodString;
last_updated_at: ZodString;
workspace_id: ZodString;
object: ZodString;
}, ZodTypeAny, "passthrough">, objectInputType<{
id: ZodString;
name: ZodString;
slug: ZodString;
organisation_id: ZodString;
is_default: ZodNumber;
status: ZodString;
owner_id: ZodString;
updated_by: ZodString;
created_at: ZodString;
last_updated_at: ZodString;
workspace_id: ZodString;
object: ZodString;
}, ZodTypeAny, "passthrough">>, "many">;
}, ZodTypeAny, "passthrough">>;

Defined in: src/ai-gateway/configs-client.ts:59

List configs in a workspace.

Parameters

ParameterTypeDescription
optsAIGatewayWorkspaceScopedListOptionsMust include the workspace UUID.

Returns

Promise<objectOutputType<{ object: ZodString; total: ZodNumber; has_more: ZodOptional<ZodBoolean>; data: ZodArray<ZodObject<{ id: ZodString; name: ZodString; slug: ZodString; organisation_id: ZodString; is_default: ZodNumber; status: ZodString; owner_id: ZodString; updated_by: ZodString; created_at: ZodString; last_updated_at: ZodString; workspace_id: ZodString; object: ZodString; }, "passthrough", ZodTypeAny, objectOutputType<{ id: ZodString; name: ZodString; slug: ZodString; organisation_id: ZodString; is_default: ZodNumber; status: ZodString; owner_id: ZodString; updated_by: ZodString; created_at: ZodString; last_updated_at: ZodString; workspace_id: ZodString; object: ZodString; }, ZodTypeAny, "passthrough">, objectInputType<{ id: ZodString; name: ZodString; slug: ZodString; organisation_id: ZodString; is_default: ZodNumber; status: ZodString; owner_id: ZodString; updated_by: ZodString; created_at: ZodString; last_updated_at: ZodString; workspace_id: ZodString; object: ZodString; }, ZodTypeAny, "passthrough">>, "many">; }, ZodTypeAny, "passthrough">>

Config list rows.

Remarks

List rows are a strict 12-field subset of the detail read — they do NOT carry config, format, type, or version_id. Call get for those.

Example

import { AIGatewayClient } from '@cdot65/prisma-airs-sdk';
const gw = new AIGatewayClient();

const cfgs = await gw.configs.list({ workspaceId: '16f7e90d-382a-4e78-b577-1b01eb5f8297' });
// cfgs.data[0] => { name: 'claude-code', slug: 'pc-claude-e46fe6', status: 'active', ... }

get()

get(configId): Promise<objectOutputType<{
id: ZodString;
name: ZodString;
slug: ZodString;
organisation_id: ZodString;
is_default: ZodNumber;
status: ZodString;
owner_id: ZodString;
updated_by: ZodString;
created_at: ZodString;
last_updated_at: ZodString;
workspace_id: ZodString;
object: ZodString;
} & {
config: ZodString;
format: ZodString;
type: ZodString;
version_id: ZodString;
}, ZodTypeAny, "passthrough">>;

Defined in: src/ai-gateway/configs-client.ts:87

Fetch one config.

Parameters

ParameterTypeDescription
configIdstringConfig UUID.

Returns

Promise<objectOutputType<{ id: ZodString; name: ZodString; slug: ZodString; organisation_id: ZodString; is_default: ZodNumber; status: ZodString; owner_id: ZodString; updated_by: ZodString; created_at: ZodString; last_updated_at: ZodString; workspace_id: ZodString; object: ZodString; } & { config: ZodString; format: ZodString; type: ZodString; version_id: ZodString; }, ZodTypeAny, "passthrough">>

The config detail — adds config (a JSON-encoded string, not an object), format, type, and version_id on top of the list row.

Example

import { AIGatewayClient } from '@cdot65/prisma-airs-sdk';
const gw = new AIGatewayClient();

const cfg = await gw.configs.get('764cf9cd-4ebf-449e-b669-08149b0fbbbc');
const routing = JSON.parse(cfg.config) as Record<string, unknown>;
// routing.provider => '@anthropic-prod'

create()

create(body): Promise<objectOutputType<{
id: ZodString;
version_id: ZodString;
slug: ZodString;
object: ZodString;
}, ZodTypeAny, "passthrough">>;

Defined in: src/ai-gateway/configs-client.ts:122

Create a config.

Parameters

ParameterTypeDescription
bodyGatewayConfigCreateRequestName, workspace UUID, and the routing config object.

Returns

Promise<objectOutputType<{ id: ZodString; version_id: ZodString; slug: ZodString; object: ZodString; }, ZodTypeAny, "passthrough">>

The creation receipt.

Remarks

The response is a creation receipt{ id, version_id, slug, object } — not a GatewayConfigDetail. Call get for the full record. Verified live 2026-07-28.

Example

import { AIGatewayClient } from '@cdot65/prisma-airs-sdk';
const gw = new AIGatewayClient();

const receipt = await gw.configs.create({
name: 'vertex-airs',
workspace_id: '16f7e90d-382a-4e78-b577-1b01eb5f8297',
config: { retry: { attempts: 3 }, cache: { mode: 'simple' } },
});
// receipt => { id: '...', version_id: '...', slug: 'pc-sdk-ve-14620d', object: 'config' }

update()

update(configId, body): Promise<objectOutputType<{
}, ZodTypeAny, "passthrough">>;

Defined in: src/ai-gateway/configs-client.ts:152

Update a config.

Parameters

ParameterTypeDescription
configIdstringConfig UUID.
bodyGatewayConfigCreateRequestReplacement fields.

Returns

Promise<objectOutputType<{ }, ZodTypeAny, "passthrough">>

The raw update response. Shape unverified against a live tenant — see the PRD.

Example

import { AIGatewayClient } from '@cdot65/prisma-airs-sdk';
const gw = new AIGatewayClient();

await gw.configs.update('764cf9cd-4ebf-449e-b669-08149b0fbbbc', {
name: 'claude-code',
workspace_id: '16f7e90d-382a-4e78-b577-1b01eb5f8297',
config: { retry: { attempts: 5 } },
});

delete()

delete(configId): Promise<void>;

Defined in: src/ai-gateway/configs-client.ts:185

Delete a config.

Parameters

ParameterTypeDescription
configIdstringConfig UUID.

Returns

Promise<void>

Nothing.

Remarks

This is a hard delete — unlike deployments.delete (which archives), the config disappears from list entirely. Verified live 2026-07-28. No organisation_id query param is required, unlike deployments/integrations.

Example

import { AIGatewayClient } from '@cdot65/prisma-airs-sdk';
const gw = new AIGatewayClient();

await gw.configs.delete('764cf9cd-4ebf-449e-b669-08149b0fbbbc');
// the config no longer appears in gw.configs.list()