Class: AIGatewayIntegrationsClient
Defined in: src/ai-gateway/integrations-client.ts:47
Client for AI Gateway organisation-level integrations (admin plane).
Constructors
Constructor
new AIGatewayIntegrationsClient(opts): AIGatewayIntegrationsClient;
Defined in: src/ai-gateway/integrations-client.ts:52
Parameters
| Parameter | Type |
|---|---|
opts | AIGatewaySubClientOptions |
Returns
AIGatewayIntegrationsClient
Methods
list()
list(): Promise<objectOutputType<{
object: ZodString;
total: ZodNumber;
has_more: ZodOptional<ZodBoolean>;
data: ZodArray<ZodObject<{
id: ZodString;
organisation_id: ZodOptional<ZodString>;
name: ZodString;
owner_id: ZodString;
status: ZodString;
created_at: ZodString;
last_updated_at: ZodString;
slug: ZodString;
tags: ZodNullable<ZodUnknown>;
description: ZodNullable<ZodString>;
workspaces_count: ZodOptional<ZodNumber>;
type: ZodOptional<ZodString>;
workspace_id: ZodNullable<ZodString>;
ai_provider_id: ZodString;
object: ZodString;
}, "passthrough", ZodTypeAny, objectOutputType<{
id: ZodString;
organisation_id: ZodOptional<ZodString>;
name: ZodString;
owner_id: ZodString;
status: ZodString;
created_at: ZodString;
last_updated_at: ZodString;
slug: ZodString;
tags: ZodNullable<ZodUnknown>;
description: ZodNullable<ZodString>;
workspaces_count: ZodOptional<ZodNumber>;
type: ZodOptional<ZodString>;
workspace_id: ZodNullable<ZodString>;
ai_provider_id: ZodString;
object: ZodString;
}, ZodTypeAny, "passthrough">, objectInputType<{
id: ZodString;
organisation_id: ZodOptional<ZodString>;
name: ZodString;
owner_id: ZodString;
status: ZodString;
created_at: ZodString;
last_updated_at: ZodString;
slug: ZodString;
tags: ZodNullable<ZodUnknown>;
description: ZodNullable<ZodString>;
workspaces_count: ZodOptional<ZodNumber>;
type: ZodOptional<ZodString>;
workspace_id: ZodNullable<ZodString>;
ai_provider_id: ZodString;
object: ZodString;
}, ZodTypeAny, "passthrough">>, "many">;
}, ZodTypeAny, "passthrough">>;
Defined in: src/ai-gateway/integrations-client.ts:70
List organisation integrations.
Returns
Promise<objectOutputType<{
object: ZodString;
total: ZodNumber;
has_more: ZodOptional<ZodBoolean>;
data: ZodArray<ZodObject<{
id: ZodString;
organisation_id: ZodOptional<ZodString>;
name: ZodString;
owner_id: ZodString;
status: ZodString;
created_at: ZodString;
last_updated_at: ZodString;
slug: ZodString;
tags: ZodNullable<ZodUnknown>;
description: ZodNullable<ZodString>;
workspaces_count: ZodOptional<ZodNumber>;
type: ZodOptional<ZodString>;
workspace_id: ZodNullable<ZodString>;
ai_provider_id: ZodString;
object: ZodString;
}, "passthrough", ZodTypeAny, objectOutputType<{
id: ZodString;
organisation_id: ZodOptional<ZodString>;
name: ZodString;
owner_id: ZodString;
status: ZodString;
created_at: ZodString;
last_updated_at: ZodString;
slug: ZodString;
tags: ZodNullable<ZodUnknown>;
description: ZodNullable<ZodString>;
workspaces_count: ZodOptional<ZodNumber>;
type: ZodOptional<ZodString>;
workspace_id: ZodNullable<ZodString>;
ai_provider_id: ZodString;
object: ZodString;
}, ZodTypeAny, "passthrough">, objectInputType<{
id: ZodString;
organisation_id: ZodOptional<ZodString>;
name: ZodString;
owner_id: ZodString;
status: ZodString;
created_at: ZodString;
last_updated_at: ZodString;
slug: ZodString;
tags: ZodNullable<ZodUnknown>;
description: ZodNullable<ZodString>;
workspaces_count: ZodOptional<ZodNumber>;
type: ZodOptional<ZodString>;
workspace_id: ZodNullable<ZodString>;
ai_provider_id: ZodString;
object: ZodString;
}, ZodTypeAny, "passthrough">>, "many">;
}, ZodTypeAny, "passthrough">>
All provider integrations defined on the organisation.
Example
import { AIGatewayClient } from '@cdot65/prisma-airs-sdk';
const gw = new AIGatewayClient();
const ints = await gw.integrations.list();
// ints.data[0] => { name: 'openai-calvin', slug: 'openai-calvin', ... }
get()
get(integrationId): Promise<objectOutputType<{
id: ZodString;
organisation_id: ZodOptional<ZodString>;
name: ZodString;
owner_id: ZodString;
status: ZodString;
created_at: ZodString;
last_updated_at: ZodString;
slug: ZodString;
tags: ZodNullable<ZodUnknown>;
description: ZodNullable<ZodString>;
workspaces_count: ZodOptional<ZodNumber>;
type: ZodOptional<ZodString>;
workspace_id: ZodNullable<ZodString>;
ai_provider_id: ZodString;
object: ZodString;
}, ZodTypeAny, "passthrough">>;
Defined in: src/ai-gateway/integrations-client.ts:94
Fetch one integration.
Parameters
| Parameter | Type | Description |
|---|---|---|
integrationId | string | Integration UUID. |
Returns
Promise<objectOutputType<{
id: ZodString;
organisation_id: ZodOptional<ZodString>;
name: ZodString;
owner_id: ZodString;
status: ZodString;
created_at: ZodString;
last_updated_at: ZodString;
slug: ZodString;
tags: ZodNullable<ZodUnknown>;
description: ZodNullable<ZodString>;
workspaces_count: ZodOptional<ZodNumber>;
type: ZodOptional<ZodString>;
workspace_id: ZodNullable<ZodString>;
ai_provider_id: ZodString;
object: ZodString;
}, ZodTypeAny, "passthrough">>
The integration record.
Example
import { AIGatewayClient } from '@cdot65/prisma-airs-sdk';
const gw = new AIGatewayClient();
const i = await gw.integrations.get('f6692544-3265-49be-9711-bbdcebc079e4');
// i.name => 'openai-calvin'
create()
create(body): Promise<objectOutputType<{
}, ZodTypeAny, "passthrough">>;
Defined in: src/ai-gateway/integrations-client.ts:129
Create an integration.
Parameters
| Parameter | Type | Description |
|---|---|---|
body | GatewayIntegrationCreateRequest | Provider id, name, slug, and provider-specific configuration. |
Returns
Promise<objectOutputType<{
}, ZodTypeAny, "passthrough">>
The raw create response. Shape unverified against a live tenant — see the PRD.
Remarks
body.key (the provider API key) is a live secret. Setting PANW_AI_SEC_DEBUG will
print it, unredacted, to the SDK's own debug log.
Example
import { AIGatewayClient } from '@cdot65/prisma-airs-sdk';
const gw = new AIGatewayClient();
await gw.integrations.create({
organisation_id: '1852583913',
ai_provider_id: 'de7d7d50-31cd-11ee-b93b-0e06f1aa7f7c',
name: 'openai-prod',
slug: 'openai-prod',
key: process.env.OPENAI_API_KEY,
});
update()
update(integrationId, body): Promise<objectOutputType<{
}, ZodTypeAny, "passthrough">>;
Defined in: src/ai-gateway/integrations-client.ts:158
Update an integration.
Parameters
| Parameter | Type | Description |
|---|---|---|
integrationId | string | Integration UUID. |
body | Partial<GatewayIntegrationCreateRequest> | Replacement 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.integrations.update('f6692544-3265-49be-9711-bbdcebc079e4', {
name: 'openai-prod',
description: 'Production OpenAI',
});
delete()
delete(integrationId, organisationId): Promise<void>;
Defined in: src/ai-gateway/integrations-client.ts:188
Delete an integration.
Parameters
| Parameter | Type | Description |
|---|---|---|
integrationId | string | Integration UUID. |
organisationId | string | The TSG as a numeric string; sent as a query param. |
Returns
Promise<void>
Nothing — the API replies 200 with an empty body.
Example
import { AIGatewayClient } from '@cdot65/prisma-airs-sdk';
const gw = new AIGatewayClient();
await gw.integrations.delete('f6692544-3265-49be-9711-bbdcebc079e4', '1852583913');
getModels()
getModels(integrationId): Promise<objectOutputType<{
models: ZodArray<ZodObject<{
slug: ZodString;
enabled: ZodBoolean;
}, "passthrough", ZodTypeAny, objectOutputType<{
slug: ZodString;
enabled: ZodBoolean;
}, ZodTypeAny, "passthrough">, objectInputType<{
slug: ZodString;
enabled: ZodBoolean;
}, ZodTypeAny, "passthrough">>, "many">;
allow_all_models: ZodBoolean;
object: ZodString;
}, ZodTypeAny, "passthrough">>;
Defined in: src/ai-gateway/integrations-client.ts:217
Read which models this integration exposes.
Parameters
| Parameter | Type | Description |
|---|---|---|
integrationId | string | Integration UUID. |
Returns
Promise<objectOutputType<{
models: ZodArray<ZodObject<{
slug: ZodString;
enabled: ZodBoolean;
}, "passthrough", ZodTypeAny, objectOutputType<{
slug: ZodString;
enabled: ZodBoolean;
}, ZodTypeAny, "passthrough">, objectInputType<{
slug: ZodString;
enabled: ZodBoolean;
}, ZodTypeAny, "passthrough">>, "many">;
allow_all_models: ZodBoolean;
object: ZodString;
}, ZodTypeAny, "passthrough">>
Per-model enablement plus the allow_all_models flag.
Example
import { AIGatewayClient } from '@cdot65/prisma-airs-sdk';
const gw = new AIGatewayClient();
const m = await gw.integrations.getModels('f6692544-3265-49be-9711-bbdcebc079e4');
// m.models[0] => { slug: 'gpt-4', enabled: true }
setModels()
setModels(integrationId, body): Promise<objectOutputType<{
}, ZodTypeAny, "passthrough">>;
Defined in: src/ai-gateway/integrations-client.ts:244
Replace which models this integration exposes.
Parameters
| Parameter | Type | Description |
|---|---|---|
integrationId | string | Integration UUID. |
body | GatewayIntegrationModelsRequest | Full model list; this is a replace, not a merge. |
Returns
Promise<objectOutputType<{
}, ZodTypeAny, "passthrough">>
The raw response. Shape unverified against a live tenant — see the PRD.
Example
import { AIGatewayClient } from '@cdot65/prisma-airs-sdk';
const gw = new AIGatewayClient();
await gw.integrations.setModels('f6692544-3265-49be-9711-bbdcebc079e4', {
models: [{ slug: 'gpt-4', enabled: true }, { slug: 'gpt-4-32k', enabled: false }],
});
getWorkspaces()
getWorkspaces(integrationId): Promise<objectOutputType<{
workspaces: ZodArray<ZodObject<{
id: ZodString;
usage_limits: ZodNullable<ZodUnion<[ZodArray<ZodObject<..., ..., ..., ..., ...>, "many">, ZodRecord<ZodString, ZodUnknown>]>>;
rate_limits: ZodNullable<ZodUnion<[ZodArray<ZodObject<..., ..., ..., ..., ...>, "many">, ZodRecord<ZodString, ZodUnknown>]>>;
enabled: ZodBoolean;
status: ZodString;
created_at: ZodString;
last_updated_at: ZodString;
last_reset_at: ZodNullable<ZodString>;
}, "passthrough", ZodTypeAny, objectOutputType<{
id: ZodString;
usage_limits: ZodNullable<ZodUnion<[ZodArray<..., ...>, ZodRecord<..., ...>]>>;
rate_limits: ZodNullable<ZodUnion<[ZodArray<..., ...>, ZodRecord<..., ...>]>>;
enabled: ZodBoolean;
status: ZodString;
created_at: ZodString;
last_updated_at: ZodString;
last_reset_at: ZodNullable<ZodString>;
}, ZodTypeAny, "passthrough">, objectInputType<{
id: ZodString;
usage_limits: ZodNullable<ZodUnion<[ZodArray<..., ...>, ZodRecord<..., ...>]>>;
rate_limits: ZodNullable<ZodUnion<[ZodArray<..., ...>, ZodRecord<..., ...>]>>;
enabled: ZodBoolean;
status: ZodString;
created_at: ZodString;
last_updated_at: ZodString;
last_reset_at: ZodNullable<ZodString>;
}, ZodTypeAny, "passthrough">>, "many">;
global_workspace_access: ZodObject<{
enabled: ZodBoolean;
rate_limits: ZodNullable<ZodUnion<[ZodArray<ZodObject<{
type: ...;
unit: ...;
value: ...;
}, "passthrough", ZodTypeAny, objectOutputType<..., ..., ...>, objectInputType<..., ..., ...>>, "many">, ZodRecord<ZodString, ZodUnknown>]>>;
usage_limits: ZodNullable<ZodUnion<[ZodArray<ZodObject<{
credit_limit: ...;
type: ...;
alert_threshold: ...;
periodic_reset: ...;
periodic_reset_days: ...;
next_usage_reset_at: ...;
}, "passthrough", ZodTypeAny, objectOutputType<..., ..., ...>, objectInputType<..., ..., ...>>, "many">, ZodRecord<ZodString, ZodUnknown>]>>;
}, "passthrough", ZodTypeAny, objectOutputType<{
enabled: ZodBoolean;
rate_limits: ZodNullable<ZodUnion<[ZodArray<ZodObject<..., ..., ..., ..., ...>, "many">, ZodRecord<ZodString, ZodUnknown>]>>;
usage_limits: ZodNullable<ZodUnion<[ZodArray<ZodObject<..., ..., ..., ..., ...>, "many">, ZodRecord<ZodString, ZodUnknown>]>>;
}, ZodTypeAny, "passthrough">, objectInputType<{
enabled: ZodBoolean;
rate_limits: ZodNullable<ZodUnion<[ZodArray<ZodObject<..., ..., ..., ..., ...>, "many">, ZodRecord<ZodString, ZodUnknown>]>>;
usage_limits: ZodNullable<ZodUnion<[ZodArray<ZodObject<..., ..., ..., ..., ...>, "many">, ZodRecord<ZodString, ZodUnknown>]>>;
}, ZodTypeAny, "passthrough">>;
object: ZodString;
}, ZodTypeAny, "passthrough">>;
Defined in: src/ai-gateway/integrations-client.ts:279
Read which workspaces may use this integration.
Parameters
| Parameter | Type | Description |
|---|---|---|
integrationId | string | Integration UUID. |
Returns
Promise<objectOutputType<{
workspaces: ZodArray<ZodObject<{
id: ZodString;
usage_limits: ZodNullable<ZodUnion<[ZodArray<ZodObject<..., ..., ..., ..., ...>, "many">, ZodRecord<ZodString, ZodUnknown>]>>;
rate_limits: ZodNullable<ZodUnion<[ZodArray<ZodObject<..., ..., ..., ..., ...>, "many">, ZodRecord<ZodString, ZodUnknown>]>>;
enabled: ZodBoolean;
status: ZodString;
created_at: ZodString;
last_updated_at: ZodString;
last_reset_at: ZodNullable<ZodString>;
}, "passthrough", ZodTypeAny, objectOutputType<{
id: ZodString;
usage_limits: ZodNullable<ZodUnion<[ZodArray<..., ...>, ZodRecord<..., ...>]>>;
rate_limits: ZodNullable<ZodUnion<[ZodArray<..., ...>, ZodRecord<..., ...>]>>;
enabled: ZodBoolean;
status: ZodString;
created_at: ZodString;
last_updated_at: ZodString;
last_reset_at: ZodNullable<ZodString>;
}, ZodTypeAny, "passthrough">, objectInputType<{
id: ZodString;
usage_limits: ZodNullable<ZodUnion<[ZodArray<..., ...>, ZodRecord<..., ...>]>>;
rate_limits: ZodNullable<ZodUnion<[ZodArray<..., ...>, ZodRecord<..., ...>]>>;
enabled: ZodBoolean;
status: ZodString;
created_at: ZodString;
last_updated_at: ZodString;
last_reset_at: ZodNullable<ZodString>;
}, ZodTypeAny, "passthrough">>, "many">;
global_workspace_access: ZodObject<{
enabled: ZodBoolean;
rate_limits: ZodNullable<ZodUnion<[ZodArray<ZodObject<{
type: ...;
unit: ...;
value: ...;
}, "passthrough", ZodTypeAny, objectOutputType<..., ..., ...>, objectInputType<..., ..., ...>>, "many">, ZodRecord<ZodString, ZodUnknown>]>>;
usage_limits: ZodNullable<ZodUnion<[ZodArray<ZodObject<{
credit_limit: ...;
type: ...;
alert_threshold: ...;
periodic_reset: ...;
periodic_reset_days: ...;
next_usage_reset_at: ...;
}, "passthrough", ZodTypeAny, objectOutputType<..., ..., ...>, objectInputType<..., ..., ...>>, "many">, ZodRecord<ZodString, ZodUnknown>]>>;
}, "passthrough", ZodTypeAny, objectOutputType<{
enabled: ZodBoolean;
rate_limits: ZodNullable<ZodUnion<[ZodArray<ZodObject<..., ..., ..., ..., ...>, "many">, ZodRecord<ZodString, ZodUnknown>]>>;
usage_limits: ZodNullable<ZodUnion<[ZodArray<ZodObject<..., ..., ..., ..., ...>, "many">, ZodRecord<ZodString, ZodUnknown>]>>;
}, ZodTypeAny, "passthrough">, objectInputType<{
enabled: ZodBoolean;
rate_limits: ZodNullable<ZodUnion<[ZodArray<ZodObject<..., ..., ..., ..., ...>, "many">, ZodRecord<ZodString, ZodUnknown>]>>;
usage_limits: ZodNullable<ZodUnion<[ZodArray<ZodObject<..., ..., ..., ..., ...>, "many">, ZodRecord<ZodString, ZodUnknown>]>>;
}, ZodTypeAny, "passthrough">>;
object: ZodString;
}, ZodTypeAny, "passthrough">>
Bound workspaces plus the global_workspace_access object.
Remarks
global_workspace_access is an object on this read, not a boolean, despite the
field name — { enabled, rate_limits, usage_limits }. The corresponding write
(setWorkspaces) DOES send a plain boolean; the two are not symmetric.
Example
import { AIGatewayClient } from '@cdot65/prisma-airs-sdk';
const gw = new AIGatewayClient();
const w = await gw.integrations.getWorkspaces('f6692544-3265-49be-9711-bbdcebc079e4');
// w.global_workspace_access => { enabled: false, rate_limits: null, usage_limits: null }
setWorkspaces()
setWorkspaces(integrationId, body): Promise<objectOutputType<{
}, ZodTypeAny, "passthrough">>;
Defined in: src/ai-gateway/integrations-client.ts:306
Replace which workspaces may use this integration.
Parameters
| Parameter | Type | Description |
|---|---|---|
integrationId | string | Integration UUID. |
body | GatewayIntegrationWorkspacesRequest | Workspace bindings or a global-access flag. |
Returns
Promise<objectOutputType<{
}, ZodTypeAny, "passthrough">>
The raw response. Shape unverified against a live tenant — see the PRD.
Example
import { AIGatewayClient } from '@cdot65/prisma-airs-sdk';
const gw = new AIGatewayClient();
await gw.integrations.setWorkspaces('f6692544-3265-49be-9711-bbdcebc079e4', {
global_workspace_access: true,
});