Class: AIGatewayDeploymentsClient
Defined in: src/ai-gateway/deployments-client.ts:26
Client for AI Gateway deployment operations (admin plane).
Constructors
Constructor
new AIGatewayDeploymentsClient(opts): AIGatewayDeploymentsClient;
Defined in: src/ai-gateway/deployments-client.ts:31
Parameters
| Parameter | Type |
|---|---|
opts | AIGatewaySubClientOptions |
Returns
AIGatewayDeploymentsClient
Methods
list()
list(): Promise<objectOutputType<{
object: ZodString;
total: ZodNumber;
success: ZodOptional<ZodBoolean>;
has_more: ZodOptional<ZodBoolean>;
data: ZodArray<ZodObject<{
connection_status: ZodOptional<ZodString>;
tags: ZodOptional<ZodNullable<ZodType<
| {
[key: ...]: ...;
}
| null, ZodTypeDef,
| {
[key: ...]: ...;
}
| null>>>;
id: ZodString;
name: ZodString;
slug: ZodString;
type: ZodString;
status: ZodString;
created_at: ZodString;
last_updated_at: ZodString;
last_synced_at: ZodNullable<ZodString>;
last_resynced_at: ZodNullable<ZodString>;
is_default: ZodNumber;
created_by: ZodString;
object: ZodString;
}, "passthrough", ZodTypeAny, objectOutputType<{
connection_status: ZodOptional<ZodString>;
tags: ZodOptional<ZodNullable<ZodType<... | ..., ZodTypeDef, ... | ...>>>;
id: ZodString;
name: ZodString;
slug: ZodString;
type: ZodString;
status: ZodString;
created_at: ZodString;
last_updated_at: ZodString;
last_synced_at: ZodNullable<ZodString>;
last_resynced_at: ZodNullable<ZodString>;
is_default: ZodNumber;
created_by: ZodString;
object: ZodString;
}, ZodTypeAny, "passthrough">, objectInputType<{
connection_status: ZodOptional<ZodString>;
tags: ZodOptional<ZodNullable<ZodType<... | ..., ZodTypeDef, ... | ...>>>;
id: ZodString;
name: ZodString;
slug: ZodString;
type: ZodString;
status: ZodString;
created_at: ZodString;
last_updated_at: ZodString;
last_synced_at: ZodNullable<ZodString>;
last_resynced_at: ZodNullable<ZodString>;
is_default: ZodNumber;
created_by: ZodString;
object: ZodString;
}, ZodTypeAny, "passthrough">>, "many">;
}, ZodTypeAny, "passthrough">>;
Defined in: src/ai-gateway/deployments-client.ts:55
List deployments.
Returns
Promise<objectOutputType<{
object: ZodString;
total: ZodNumber;
success: ZodOptional<ZodBoolean>;
has_more: ZodOptional<ZodBoolean>;
data: ZodArray<ZodObject<{
connection_status: ZodOptional<ZodString>;
tags: ZodOptional<ZodNullable<ZodType<
| {
[key: ...]: ...;
}
| null, ZodTypeDef,
| {
[key: ...]: ...;
}
| null>>>;
id: ZodString;
name: ZodString;
slug: ZodString;
type: ZodString;
status: ZodString;
created_at: ZodString;
last_updated_at: ZodString;
last_synced_at: ZodNullable<ZodString>;
last_resynced_at: ZodNullable<ZodString>;
is_default: ZodNumber;
created_by: ZodString;
object: ZodString;
}, "passthrough", ZodTypeAny, objectOutputType<{
connection_status: ZodOptional<ZodString>;
tags: ZodOptional<ZodNullable<ZodType<... | ..., ZodTypeDef, ... | ...>>>;
id: ZodString;
name: ZodString;
slug: ZodString;
type: ZodString;
status: ZodString;
created_at: ZodString;
last_updated_at: ZodString;
last_synced_at: ZodNullable<ZodString>;
last_resynced_at: ZodNullable<ZodString>;
is_default: ZodNumber;
created_by: ZodString;
object: ZodString;
}, ZodTypeAny, "passthrough">, objectInputType<{
connection_status: ZodOptional<ZodString>;
tags: ZodOptional<ZodNullable<ZodType<... | ..., ZodTypeDef, ... | ...>>>;
id: ZodString;
name: ZodString;
slug: ZodString;
type: ZodString;
status: ZodString;
created_at: ZodString;
last_updated_at: ZodString;
last_synced_at: ZodNullable<ZodString>;
last_resynced_at: ZodNullable<ZodString>;
is_default: ZodNumber;
created_by: ZodString;
object: ZodString;
}, ZodTypeAny, "passthrough">>, "many">;
}, ZodTypeAny, "passthrough">>
All deployments, active and archived.
Remarks
Archived deployments are included — delete() is a soft-delete. Filter on
status === 'active' if you only want live ones.
Example
import { AIGatewayClient } from '@cdot65/prisma-airs-sdk';
const gw = new AIGatewayClient();
const all = await gw.deployments.list();
const live = all.data.filter((d) => d.status === 'active');
// live[0] => { name: 'talos', slug: 'dp-talos-f3b74e', status: 'active', ... }
get()
get(deploymentId): Promise<objectOutputType<{
connection_status: ZodOptional<ZodString>;
tags: ZodOptional<ZodNullable<ZodType<
| {
[key: string]: string;
}
| null, ZodTypeDef,
| {
[key: string]: string;
}
| null>>>;
id: ZodString;
name: ZodString;
slug: ZodString;
type: ZodString;
status: ZodString;
created_at: ZodString;
last_updated_at: ZodString;
last_synced_at: ZodNullable<ZodString>;
last_resynced_at: ZodNullable<ZodString>;
is_default: ZodNumber;
created_by: ZodString;
object: ZodString;
} & {
credentials: ZodOptional<ZodObject<{
username: ZodString;
password: ZodString;
}, "passthrough", ZodTypeAny, objectOutputType<{
username: ZodString;
password: ZodString;
}, ZodTypeAny, "passthrough">, objectInputType<{
username: ZodString;
password: ZodString;
}, ZodTypeAny, "passthrough">>>;
deployment_config: ZodNullable<ZodRecord<ZodString, ZodUnknown>>;
auth_settings: ZodOptional<ZodObject<{
gateway_base_url: ZodOptional<ZodString>;
mcp_gateway_base_url: ZodOptional<ZodString>;
private_link_endpoint: ZodOptional<ZodString>;
use_private_link_proxy: ZodOptional<ZodNumber>;
is_dataservice_hosted: ZodOptional<ZodNumber>;
is_playground_proxy_allowed: ZodOptional<ZodNumber>;
jwt_subs_allowed: ZodOptional<ZodArray<ZodString, "many">>;
jwt_sub_workspace_mapping: ZodOptional<ZodRecord<ZodString, ZodString>>;
disable_portkey_gateway: ZodNumber;
workspaces_allowed: ZodArray<ZodString, "many">;
allow_all_workspaces: ZodNumber;
}, "passthrough", ZodTypeAny, objectOutputType<{
gateway_base_url: ZodOptional<ZodString>;
mcp_gateway_base_url: ZodOptional<ZodString>;
private_link_endpoint: ZodOptional<ZodString>;
use_private_link_proxy: ZodOptional<ZodNumber>;
is_dataservice_hosted: ZodOptional<ZodNumber>;
is_playground_proxy_allowed: ZodOptional<ZodNumber>;
jwt_subs_allowed: ZodOptional<ZodArray<ZodString, "many">>;
jwt_sub_workspace_mapping: ZodOptional<ZodRecord<ZodString, ZodString>>;
disable_portkey_gateway: ZodNumber;
workspaces_allowed: ZodArray<ZodString, "many">;
allow_all_workspaces: ZodNumber;
}, ZodTypeAny, "passthrough">, objectInputType<{
gateway_base_url: ZodOptional<ZodString>;
mcp_gateway_base_url: ZodOptional<ZodString>;
private_link_endpoint: ZodOptional<ZodString>;
use_private_link_proxy: ZodOptional<ZodNumber>;
is_dataservice_hosted: ZodOptional<ZodNumber>;
is_playground_proxy_allowed: ZodOptional<ZodNumber>;
jwt_subs_allowed: ZodOptional<ZodArray<ZodString, "many">>;
jwt_sub_workspace_mapping: ZodOptional<ZodRecord<ZodString, ZodString>>;
disable_portkey_gateway: ZodNumber;
workspaces_allowed: ZodArray<ZodString, "many">;
allow_all_workspaces: ZodNumber;
}, ZodTypeAny, "passthrough">>>;
client_auth: ZodOptional<ZodString>;
workspaces: ZodOptional<ZodArray<ZodObject<{
id: ZodString;
slug: ZodString;
}, "passthrough", ZodTypeAny, objectOutputType<{
id: ZodString;
slug: ZodString;
}, ZodTypeAny, "passthrough">, objectInputType<{
id: ZodString;
slug: ZodString;
}, ZodTypeAny, "passthrough">>, "many">>;
}, ZodTypeAny, "passthrough">>;
Defined in: src/ai-gateway/deployments-client.ts:79
Fetch one deployment.
Parameters
| Parameter | Type | Description |
|---|---|---|
deploymentId | string | Deployment UUID. |
Returns
Promise<objectOutputType<{
connection_status: ZodOptional<ZodString>;
tags: ZodOptional<ZodNullable<ZodType<
| {
[key: string]: string;
}
| null, ZodTypeDef,
| {
[key: string]: string;
}
| null>>>;
id: ZodString;
name: ZodString;
slug: ZodString;
type: ZodString;
status: ZodString;
created_at: ZodString;
last_updated_at: ZodString;
last_synced_at: ZodNullable<ZodString>;
last_resynced_at: ZodNullable<ZodString>;
is_default: ZodNumber;
created_by: ZodString;
object: ZodString;
} & {
credentials: ZodOptional<ZodObject<{
username: ZodString;
password: ZodString;
}, "passthrough", ZodTypeAny, objectOutputType<{
username: ZodString;
password: ZodString;
}, ZodTypeAny, "passthrough">, objectInputType<{
username: ZodString;
password: ZodString;
}, ZodTypeAny, "passthrough">>>;
deployment_config: ZodNullable<ZodRecord<ZodString, ZodUnknown>>;
auth_settings: ZodOptional<ZodObject<{
gateway_base_url: ZodOptional<ZodString>;
mcp_gateway_base_url: ZodOptional<ZodString>;
private_link_endpoint: ZodOptional<ZodString>;
use_private_link_proxy: ZodOptional<ZodNumber>;
is_dataservice_hosted: ZodOptional<ZodNumber>;
is_playground_proxy_allowed: ZodOptional<ZodNumber>;
jwt_subs_allowed: ZodOptional<ZodArray<ZodString, "many">>;
jwt_sub_workspace_mapping: ZodOptional<ZodRecord<ZodString, ZodString>>;
disable_portkey_gateway: ZodNumber;
workspaces_allowed: ZodArray<ZodString, "many">;
allow_all_workspaces: ZodNumber;
}, "passthrough", ZodTypeAny, objectOutputType<{
gateway_base_url: ZodOptional<ZodString>;
mcp_gateway_base_url: ZodOptional<ZodString>;
private_link_endpoint: ZodOptional<ZodString>;
use_private_link_proxy: ZodOptional<ZodNumber>;
is_dataservice_hosted: ZodOptional<ZodNumber>;
is_playground_proxy_allowed: ZodOptional<ZodNumber>;
jwt_subs_allowed: ZodOptional<ZodArray<ZodString, "many">>;
jwt_sub_workspace_mapping: ZodOptional<ZodRecord<ZodString, ZodString>>;
disable_portkey_gateway: ZodNumber;
workspaces_allowed: ZodArray<ZodString, "many">;
allow_all_workspaces: ZodNumber;
}, ZodTypeAny, "passthrough">, objectInputType<{
gateway_base_url: ZodOptional<ZodString>;
mcp_gateway_base_url: ZodOptional<ZodString>;
private_link_endpoint: ZodOptional<ZodString>;
use_private_link_proxy: ZodOptional<ZodNumber>;
is_dataservice_hosted: ZodOptional<ZodNumber>;
is_playground_proxy_allowed: ZodOptional<ZodNumber>;
jwt_subs_allowed: ZodOptional<ZodArray<ZodString, "many">>;
jwt_sub_workspace_mapping: ZodOptional<ZodRecord<ZodString, ZodString>>;
disable_portkey_gateway: ZodNumber;
workspaces_allowed: ZodArray<ZodString, "many">;
allow_all_workspaces: ZodNumber;
}, ZodTypeAny, "passthrough">>>;
client_auth: ZodOptional<ZodString>;
workspaces: ZodOptional<ZodArray<ZodObject<{
id: ZodString;
slug: ZodString;
}, "passthrough", ZodTypeAny, objectOutputType<{
id: ZodString;
slug: ZodString;
}, ZodTypeAny, "passthrough">, objectInputType<{
id: ZodString;
slug: ZodString;
}, ZodTypeAny, "passthrough">>, "many">>;
}, ZodTypeAny, "passthrough">>
Deployment detail, including bound workspaces and masked credentials.
Example
import { AIGatewayClient } from '@cdot65/prisma-airs-sdk';
const gw = new AIGatewayClient();
const d = await gw.deployments.get('32e8314e-7e68-4384-aacb-a476f6c3f91d');
// d.auth_settings?.allow_all_workspaces => 1 (a number, not a boolean)
create()
create(body): Promise<objectOutputType<{
id: ZodString;
client_auth: ZodString;
credentials: ZodObject<{
username: ZodString;
password: ZodString;
}, "passthrough", ZodTypeAny, objectOutputType<{
username: ZodString;
password: ZodString;
}, ZodTypeAny, "passthrough">, objectInputType<{
username: ZodString;
password: ZodString;
}, ZodTypeAny, "passthrough">>;
organisation_id: ZodString;
object: ZodString;
}, ZodTypeAny, "passthrough">>;
Defined in: src/ai-gateway/deployments-client.ts:120
Create a deployment.
Parameters
| Parameter | Type | Description |
|---|---|---|
body | { name: string; type: "non_production" | "production"; organisation_id: string; auth_settings?: { gateway_base_url?: string; mcp_gateway_base_url?: string; is_dataservice_hosted?: 0 | 1; is_playground_proxy_allowed?: 0 | 1; workspaces_allowed?: string[]; jwt_subs_allowed?: string[]; jwt_sub_workspace_mapping?: Record<string, string>; allow_all_workspaces?: boolean; remove_workspaces_allowed?: string[]; remove_subs_allowed?: string[]; }; deployment_config?: GatewayJsonObject; is_default?: boolean; slug?: string; tags?: | { [key: string]: string; } & GatewayJsonObject | null; } | Name, type, TSG, and auth settings. |
body.name | string | - |
body.type | "non_production" | "production" | - |
body.organisation_id | string | - |
body.auth_settings? | { gateway_base_url?: string; mcp_gateway_base_url?: string; is_dataservice_hosted?: 0 | 1; is_playground_proxy_allowed?: 0 | 1; workspaces_allowed?: string[]; jwt_subs_allowed?: string[]; jwt_sub_workspace_mapping?: Record<string, string>; allow_all_workspaces?: boolean; remove_workspaces_allowed?: string[]; remove_subs_allowed?: string[]; } | - |
body.auth_settings.gateway_base_url? | string | - |
body.auth_settings.mcp_gateway_base_url? | string | - |
body.auth_settings.is_dataservice_hosted? | 0 | 1 | - |
body.auth_settings.is_playground_proxy_allowed? | 0 | 1 | - |
body.auth_settings.workspaces_allowed? | string[] | - |
body.auth_settings.jwt_subs_allowed? | string[] | - |
body.auth_settings.jwt_sub_workspace_mapping? | Record<string, string> | - |
body.auth_settings.allow_all_workspaces? | boolean | - |
body.auth_settings.remove_workspaces_allowed? | string[] | - |
body.auth_settings.remove_subs_allowed? | string[] | - |
body.deployment_config? | GatewayJsonObject | - |
body.is_default? | boolean | - |
body.slug? | string | - |
body.tags? | | { [key: string]: string; } & GatewayJsonObject | null | - |
Returns
Promise<objectOutputType<{
id: ZodString;
client_auth: ZodString;
credentials: ZodObject<{
username: ZodString;
password: ZodString;
}, "passthrough", ZodTypeAny, objectOutputType<{
username: ZodString;
password: ZodString;
}, ZodTypeAny, "passthrough">, objectInputType<{
username: ZodString;
password: ZodString;
}, ZodTypeAny, "passthrough">>;
organisation_id: ZodString;
object: ZodString;
}, ZodTypeAny, "passthrough">>
The creation receipt including the deployment's gateway credentials.
Remarks
The response is a creation receipt, not a deployment record — it has 5 fields and
carries no name, slug, or status. Call get for the full record.
This is the only time credentials.password and client_auth are readable; the
detail read masks them. Capture them here or they are unrecoverable. Never log them.
SDK debug logs redact returned one-time client_auth and registry passwords. Callers
must still capture the create response once and store it securely.
Example
import { AIGatewayClient } from '@cdot65/prisma-airs-sdk';
const gw = new AIGatewayClient();
const receipt = await gw.deployments.create({
name: 'prod-us',
type: 'production',
organisation_id: '1852583913',
auth_settings: { allow_all_workspaces: true },
});
// receipt => { id: '2141...', client_auth: 'client-auth-...', credentials: { username, password }, ... }
const full = await gw.deployments.get(receipt.id);
update()
update(deploymentId, body): Promise<objectOutputType<{
id: ZodOptional<ZodString>;
slug: ZodOptional<ZodString>;
version_id: ZodOptional<ZodString>;
success: ZodOptional<ZodBoolean>;
data: ZodOptional<ZodUnion<[ZodObject<{
id: ZodOptional<ZodString>;
slug: ZodOptional<ZodString>;
version_id: ZodOptional<ZodString>;
}, "passthrough", ZodTypeAny, objectOutputType<{
id: ZodOptional<ZodString>;
slug: ZodOptional<ZodString>;
version_id: ZodOptional<ZodString>;
}, ZodTypeAny, "passthrough">, objectInputType<{
id: ZodOptional<ZodString>;
slug: ZodOptional<ZodString>;
version_id: ZodOptional<ZodString>;
}, ZodTypeAny, "passthrough">>, ZodString, ZodNumber]>>;
}, ZodTypeAny, "passthrough">>;
Defined in: src/ai-gateway/deployments-client.ts:151
Update deployment settings, including its externally deployed gateway URL and workspace scope.
Parameters
| Parameter | Type | Description |
|---|---|---|
deploymentId | string | Deployment UUID. |
body | { [key: string]: any; } | Fields to update. |
Returns
Promise<objectOutputType<{
id: ZodOptional<ZodString>;
slug: ZodOptional<ZodString>;
version_id: ZodOptional<ZodString>;
success: ZodOptional<ZodBoolean>;
data: ZodOptional<ZodUnion<[ZodObject<{
id: ZodOptional<ZodString>;
slug: ZodOptional<ZodString>;
version_id: ZodOptional<ZodString>;
}, "passthrough", ZodTypeAny, objectOutputType<{
id: ZodOptional<ZodString>;
slug: ZodOptional<ZodString>;
version_id: ZodOptional<ZodString>;
}, ZodTypeAny, "passthrough">, objectInputType<{
id: ZodOptional<ZodString>;
slug: ZodOptional<ZodString>;
version_id: ZodOptional<ZodString>;
}, ZodTypeAny, "passthrough">>, ZodString, ZodNumber]>>;
}, ZodTypeAny, "passthrough">>
The gateway write response.
Example
import { AIGatewayClient } from '@cdot65/prisma-airs-sdk';
const gw = new AIGatewayClient();
await gw.deployments.update('21414819-485e-4ba3-b3d3-3e1815580e43', {
auth_settings: {
gateway_base_url: 'https://gateway.example.com',
workspaces_allowed: ['ws-develo-71f8d8'],
},
});
ping()
ping(deploymentId): Promise<objectOutputType<{
status: ZodString;
gateway_base_url: ZodString;
outbound: ZodObject<{
status: ZodString;
status_code: ZodOptional<ZodNumber>;
version: ZodOptional<ZodString>;
error: ZodOptional<ZodString>;
}, "passthrough", ZodTypeAny, objectOutputType<{
status: ZodString;
status_code: ZodOptional<ZodNumber>;
version: ZodOptional<ZodString>;
error: ZodOptional<ZodString>;
}, ZodTypeAny, "passthrough">, objectInputType<{
status: ZodString;
status_code: ZodOptional<ZodNumber>;
version: ZodOptional<ZodString>;
error: ZodOptional<ZodString>;
}, ZodTypeAny, "passthrough">>;
inbound: ZodObject<{
status: ZodString;
error: ZodOptional<ZodString>;
}, "passthrough", ZodTypeAny, objectOutputType<{
status: ZodString;
error: ZodOptional<ZodString>;
}, ZodTypeAny, "passthrough">, objectInputType<{
status: ZodString;
error: ZodOptional<ZodString>;
}, ZodTypeAny, "passthrough">>;
object: ZodString;
}, ZodTypeAny, "passthrough">>;
Defined in: src/ai-gateway/deployments-client.ts:181
Run SCM's outbound and inbound connectivity checks against a configured gateway.
Parameters
| Parameter | Type | Description |
|---|---|---|
deploymentId | string | Deployment UUID. |
Returns
Promise<objectOutputType<{
status: ZodString;
gateway_base_url: ZodString;
outbound: ZodObject<{
status: ZodString;
status_code: ZodOptional<ZodNumber>;
version: ZodOptional<ZodString>;
error: ZodOptional<ZodString>;
}, "passthrough", ZodTypeAny, objectOutputType<{
status: ZodString;
status_code: ZodOptional<ZodNumber>;
version: ZodOptional<ZodString>;
error: ZodOptional<ZodString>;
}, ZodTypeAny, "passthrough">, objectInputType<{
status: ZodString;
status_code: ZodOptional<ZodNumber>;
version: ZodOptional<ZodString>;
error: ZodOptional<ZodString>;
}, ZodTypeAny, "passthrough">>;
inbound: ZodObject<{
status: ZodString;
error: ZodOptional<ZodString>;
}, "passthrough", ZodTypeAny, objectOutputType<{
status: ZodString;
error: ZodOptional<ZodString>;
}, ZodTypeAny, "passthrough">, objectInputType<{
status: ZodString;
error: ZodOptional<ZodString>;
}, ZodTypeAny, "passthrough">>;
object: ZodString;
}, ZodTypeAny, "passthrough">>
Health of both connectivity directions.
Example
import { AIGatewayClient } from '@cdot65/prisma-airs-sdk';
const gw = new AIGatewayClient();
const health = await gw.deployments.ping('21414819-485e-4ba3-b3d3-3e1815580e43');
console.log(health.status, health.outbound.status, health.inbound.status);
delete()
delete(deploymentId, organisationId): Promise<void>;
Defined in: src/ai-gateway/deployments-client.ts:217
Archive a deployment.
Parameters
| Parameter | Type | Description |
|---|---|---|
deploymentId | string | Deployment UUID. |
organisationId | string | The TSG as a numeric string; sent as a query param. |
Returns
Promise<void>
Nothing.
Remarks
This is a soft delete — the one exception to the gateway's usual delete semantics.
The API returns 200 with an empty body and the record persists with status: 'archived', still visible in list. There is no observed hard-delete for
deployments specifically. Contrast with configs.delete, guardrails.delete, and
providers.delete, all of which hard-delete —
do not assume archive-on-delete is a gateway-wide convention.
Example
import { AIGatewayClient } from '@cdot65/prisma-airs-sdk';
const gw = new AIGatewayClient();
await gw.deployments.delete('21414819-485e-4ba3-b3d3-3e1815580e43', '1852583913');
// the record remains in list() with status 'archived'