@cdot65/prisma-airs-sdk 0.18.0 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -2
- package/dist/index.cjs +1616 -196
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5503 -1007
- package/dist/index.d.ts +5503 -1007
- package/dist/index.js +1523 -195
- package/dist/index.js.map +1 -1
- package/package.json +5 -2
package/dist/index.js
CHANGED
|
@@ -29,7 +29,7 @@ var MAX_NUMBER_OF_BATCH_SCAN_OBJECTS = 20;
|
|
|
29
29
|
var MAX_CONNECTION_POOL_SIZE = 100;
|
|
30
30
|
var MAX_NUMBER_OF_RETRIES = 5;
|
|
31
31
|
var HTTP_FORCE_RETRY_STATUS_CODES = [500, 502, 503, 504];
|
|
32
|
-
var SDK_VERSION = "0.
|
|
32
|
+
var SDK_VERSION = "0.20.0";
|
|
33
33
|
var USER_AGENT = `PAN-AIRS/${SDK_VERSION}-typescript-sdk`;
|
|
34
34
|
var DEFAULT_MGMT_ENDPOINT = "https://api.sase.paloaltonetworks.com/aisec";
|
|
35
35
|
var DEFAULT_TOKEN_ENDPOINT = "https://auth.apps.paloaltonetworks.com/oauth2/access_token";
|
|
@@ -272,8 +272,8 @@ import { z as z15 } from "zod";
|
|
|
272
272
|
// src/utils.ts
|
|
273
273
|
import { createHmac } from "crypto";
|
|
274
274
|
var UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
275
|
-
function isValidUuid(
|
|
276
|
-
return UUID_RE.test(
|
|
275
|
+
function isValidUuid(value2) {
|
|
276
|
+
return UUID_RE.test(value2);
|
|
277
277
|
}
|
|
278
278
|
function generatePayloadHash(payload, secret) {
|
|
279
279
|
return createHmac("sha256", secret).update(payload).digest("hex");
|
|
@@ -333,9 +333,9 @@ function extractErrorMessage(body, status) {
|
|
|
333
333
|
return body ? `API error ${status}: ${body}` : `API error ${status}`;
|
|
334
334
|
}
|
|
335
335
|
}
|
|
336
|
-
function parseRetryAfterHeader(
|
|
337
|
-
if (
|
|
338
|
-
const normalized =
|
|
336
|
+
function parseRetryAfterHeader(value2) {
|
|
337
|
+
if (value2 === null) return void 0;
|
|
338
|
+
const normalized = value2.trim();
|
|
339
339
|
if (/^\d+$/.test(normalized)) {
|
|
340
340
|
const milliseconds = Number(normalized) * 1e3;
|
|
341
341
|
return Number.isFinite(milliseconds) ? milliseconds : void 0;
|
|
@@ -437,6 +437,120 @@ async function executeWithRetry(opts) {
|
|
|
437
437
|
|
|
438
438
|
// src/http/debug.ts
|
|
439
439
|
import { createHash } from "crypto";
|
|
440
|
+
|
|
441
|
+
// src/ai-gateway/secret-fields.ts
|
|
442
|
+
var AI_GATEWAY_REDACTED = "[REDACTED]";
|
|
443
|
+
var value = (...path) => ({
|
|
444
|
+
path,
|
|
445
|
+
redact: "value"
|
|
446
|
+
});
|
|
447
|
+
var subtree = (...path) => ({
|
|
448
|
+
path,
|
|
449
|
+
redact: "subtree"
|
|
450
|
+
});
|
|
451
|
+
var oneTime = (...path) => ({
|
|
452
|
+
path,
|
|
453
|
+
redact: "value",
|
|
454
|
+
oneTime: true
|
|
455
|
+
});
|
|
456
|
+
var providerRequestSecrets = [
|
|
457
|
+
value("key"),
|
|
458
|
+
value("configurations", "azure_entra_client_secret"),
|
|
459
|
+
value("configurations", "aws_secret_access_key"),
|
|
460
|
+
subtree("configurations", "vertex_service_account_json"),
|
|
461
|
+
value("configurations", "custom_headers", "*")
|
|
462
|
+
];
|
|
463
|
+
var mcpRequestSecrets = [
|
|
464
|
+
value("configurations", "custom_headers", "*"),
|
|
465
|
+
value("configurations", "client_secret"),
|
|
466
|
+
value("configurations", "oauth_client_secret"),
|
|
467
|
+
subtree("configurations", "oauth_metadata")
|
|
468
|
+
];
|
|
469
|
+
var empty = [];
|
|
470
|
+
var AI_GATEWAY_SECRET_FIELDS = {
|
|
471
|
+
"apiKeys.createService": { request: empty, response: [oneTime("key")] },
|
|
472
|
+
"apiKeys.createUser": { request: empty, response: [oneTime("key")] },
|
|
473
|
+
"apiKeys.rotateService": { request: empty, response: [oneTime("key")] },
|
|
474
|
+
"apiKeys.rotateUser": { request: empty, response: [oneTime("key")] },
|
|
475
|
+
"deployments.create": {
|
|
476
|
+
request: empty,
|
|
477
|
+
response: [oneTime("client_auth"), oneTime("credentials", "password")]
|
|
478
|
+
},
|
|
479
|
+
"deployments.update": {
|
|
480
|
+
request: empty,
|
|
481
|
+
response: [oneTime("client_auth"), oneTime("credentials", "password")]
|
|
482
|
+
},
|
|
483
|
+
"integrations.create": { request: providerRequestSecrets, response: empty },
|
|
484
|
+
"integrations.update": { request: providerRequestSecrets, response: empty },
|
|
485
|
+
"mcpIntegrations.create": { request: mcpRequestSecrets, response: empty },
|
|
486
|
+
"mcpIntegrations.update": { request: mcpRequestSecrets, response: empty },
|
|
487
|
+
"organisations.getAuthSettings": {
|
|
488
|
+
request: empty,
|
|
489
|
+
response: [value("scim_token"), value("data", "scim_token")]
|
|
490
|
+
},
|
|
491
|
+
"organisations.updateAuthSettings": {
|
|
492
|
+
request: [value("scim_token"), value("auth_settings", "client_secret")],
|
|
493
|
+
response: [value("scim_token"), value("data", "scim_token")]
|
|
494
|
+
},
|
|
495
|
+
"plugins.create": { request: [value("credentials", "*")], response: empty },
|
|
496
|
+
"providers.get": {
|
|
497
|
+
request: empty,
|
|
498
|
+
response: [
|
|
499
|
+
value("key"),
|
|
500
|
+
subtree("model_config"),
|
|
501
|
+
subtree("credentials"),
|
|
502
|
+
value("configurations", "azure_entra_client_secret"),
|
|
503
|
+
value("configurations", "aws_secret_access_key"),
|
|
504
|
+
subtree("configurations", "vertex_service_account_json"),
|
|
505
|
+
value("configurations", "custom_headers", "*")
|
|
506
|
+
]
|
|
507
|
+
}
|
|
508
|
+
};
|
|
509
|
+
function cloneValue(input, seen = /* @__PURE__ */ new WeakMap()) {
|
|
510
|
+
if (typeof input !== "object" || input === null) return input;
|
|
511
|
+
const cached = seen.get(input);
|
|
512
|
+
if (cached !== void 0) return cached;
|
|
513
|
+
const output = Array.isArray(input) ? [] : {};
|
|
514
|
+
seen.set(input, output);
|
|
515
|
+
if (Array.isArray(input)) {
|
|
516
|
+
for (const item of input) output.push(cloneValue(item, seen));
|
|
517
|
+
} else {
|
|
518
|
+
for (const [key, item] of Object.entries(input)) {
|
|
519
|
+
Object.defineProperty(output, key, {
|
|
520
|
+
value: cloneValue(item, seen),
|
|
521
|
+
enumerable: true,
|
|
522
|
+
configurable: true,
|
|
523
|
+
writable: true
|
|
524
|
+
});
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
return output;
|
|
528
|
+
}
|
|
529
|
+
function applyRule(current, path, index) {
|
|
530
|
+
if (index === path.length) return AI_GATEWAY_REDACTED;
|
|
531
|
+
if (typeof current !== "object" || current === null) return current;
|
|
532
|
+
const segment = path[index];
|
|
533
|
+
if (Array.isArray(current)) {
|
|
534
|
+
if (segment !== "*") return current;
|
|
535
|
+
for (let i = 0; i < current.length; i++) current[i] = applyRule(current[i], path, index + 1);
|
|
536
|
+
return current;
|
|
537
|
+
}
|
|
538
|
+
const record = current;
|
|
539
|
+
if (segment === "*") {
|
|
540
|
+
for (const key of Object.keys(record)) record[key] = applyRule(record[key], path, index + 1);
|
|
541
|
+
} else if (Object.prototype.hasOwnProperty.call(record, segment)) {
|
|
542
|
+
record[segment] = applyRule(record[segment], path, index + 1);
|
|
543
|
+
}
|
|
544
|
+
return record;
|
|
545
|
+
}
|
|
546
|
+
function redactAIGatewaySecrets(operation, input, direction = "request") {
|
|
547
|
+
const output = cloneValue(input);
|
|
548
|
+
const metadata = AI_GATEWAY_SECRET_FIELDS[operation];
|
|
549
|
+
for (const rule of metadata[direction]) applyRule(output, rule.path, 0);
|
|
550
|
+
return output;
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
// src/http/debug.ts
|
|
440
554
|
var TRUTHY = /* @__PURE__ */ new Set(["1", "true", "yes", "on"]);
|
|
441
555
|
var SENSITIVE_HEADERS = /* @__PURE__ */ new Set([HEADER_AUTH_TOKEN.toLowerCase(), HEADER_API_KEY.toLowerCase()]);
|
|
442
556
|
var PREFIX = "[airs-sdk]";
|
|
@@ -444,16 +558,23 @@ function isDebugEnabled() {
|
|
|
444
558
|
const raw = process.env.PANW_AI_SEC_DEBUG;
|
|
445
559
|
return raw !== void 0 && TRUTHY.has(raw.trim().toLowerCase());
|
|
446
560
|
}
|
|
447
|
-
function hashToken(
|
|
448
|
-
return "sha256:" + createHash("sha256").update(
|
|
561
|
+
function hashToken(value2) {
|
|
562
|
+
return "sha256:" + createHash("sha256").update(value2).digest("hex").slice(0, 12);
|
|
449
563
|
}
|
|
450
564
|
function sanitizeHeaders(headers) {
|
|
451
565
|
const out = {};
|
|
452
|
-
for (const [key,
|
|
453
|
-
out[key] = SENSITIVE_HEADERS.has(key.toLowerCase()) ? hashToken(
|
|
566
|
+
for (const [key, value2] of Object.entries(headers)) {
|
|
567
|
+
out[key] = SENSITIVE_HEADERS.has(key.toLowerCase()) ? hashToken(value2) : value2;
|
|
454
568
|
}
|
|
455
569
|
return out;
|
|
456
570
|
}
|
|
571
|
+
function sanitizeAIGatewayDebugBody(body, operation, direction) {
|
|
572
|
+
try {
|
|
573
|
+
return JSON.stringify(redactAIGatewaySecrets(operation, JSON.parse(body), direction));
|
|
574
|
+
} catch {
|
|
575
|
+
return "[BODY OMITTED: REDACTION FAILED]";
|
|
576
|
+
}
|
|
577
|
+
}
|
|
457
578
|
function logRequest(method, url, headers, body) {
|
|
458
579
|
console.error(`${PREFIX} \u2192 ${method} ${url}`);
|
|
459
580
|
console.error(`${PREFIX} headers ${JSON.stringify(sanitizeHeaders(headers))}`);
|
|
@@ -465,6 +586,20 @@ function logResponse(status, ms, body) {
|
|
|
465
586
|
|
|
466
587
|
// src/http/request.ts
|
|
467
588
|
async function request(spec) {
|
|
589
|
+
let validatedBody = spec.body;
|
|
590
|
+
if (spec.requestSchema !== void 0) {
|
|
591
|
+
const result2 = spec.requestSchema.safeParse(spec.body);
|
|
592
|
+
if (!result2.success) {
|
|
593
|
+
const issues = result2.error.issues.map(
|
|
594
|
+
(issue) => `${issue.path.length > 0 ? issue.path.join(".") : "<root>"}: ${issue.message}`
|
|
595
|
+
).join("; ");
|
|
596
|
+
throw new AISecSDKException(
|
|
597
|
+
`Request body for ${spec.method} ${spec.path} did not match schema: ${issues}`,
|
|
598
|
+
"AISEC_USER_REQUEST_PAYLOAD_ERROR" /* USER_REQUEST_PAYLOAD_ERROR */
|
|
599
|
+
);
|
|
600
|
+
}
|
|
601
|
+
validatedBody = result2.data;
|
|
602
|
+
}
|
|
468
603
|
let hasRetriedAuth = false;
|
|
469
604
|
const debug = isDebugEnabled();
|
|
470
605
|
const response = await executeWithRetry({
|
|
@@ -473,11 +608,11 @@ async function request(spec) {
|
|
|
473
608
|
const baseUrl = spec.baseUrl.replace(/\/+$/, "");
|
|
474
609
|
const url = new URL(`${baseUrl}${spec.path}`);
|
|
475
610
|
if (spec.params) {
|
|
476
|
-
for (const [key,
|
|
477
|
-
if (Array.isArray(
|
|
478
|
-
for (const v of
|
|
611
|
+
for (const [key, value2] of Object.entries(spec.params)) {
|
|
612
|
+
if (Array.isArray(value2)) {
|
|
613
|
+
for (const v of value2) url.searchParams.append(key, v);
|
|
479
614
|
} else {
|
|
480
|
-
url.searchParams.set(key,
|
|
615
|
+
url.searchParams.set(key, value2);
|
|
481
616
|
}
|
|
482
617
|
}
|
|
483
618
|
}
|
|
@@ -489,16 +624,19 @@ async function request(spec) {
|
|
|
489
624
|
let bodyForFetch;
|
|
490
625
|
if (spec.formData !== void 0) {
|
|
491
626
|
bodyForFetch = spec.formData;
|
|
492
|
-
} else if (
|
|
627
|
+
} else if (validatedBody !== void 0) {
|
|
493
628
|
headers["Content-Type"] = spec.contentType ?? "application/json";
|
|
494
|
-
bodyText = JSON.stringify(
|
|
629
|
+
bodyText = JSON.stringify(validatedBody);
|
|
495
630
|
bodyForFetch = bodyText;
|
|
496
631
|
}
|
|
497
632
|
const prepared = { method: spec.method, url, headers, bodyText };
|
|
498
633
|
const final = await spec.auth.prepare(prepared);
|
|
499
634
|
const startedAt = debug ? Date.now() : 0;
|
|
500
635
|
if (debug) {
|
|
501
|
-
|
|
636
|
+
let logBody = spec.formData !== void 0 ? "[multipart/form-data]" : final.bodyText;
|
|
637
|
+
if (logBody !== void 0 && spec.secretOperation !== void 0) {
|
|
638
|
+
logBody = sanitizeAIGatewayDebugBody(logBody, spec.secretOperation, "request");
|
|
639
|
+
}
|
|
502
640
|
logRequest(final.method, final.url.toString(), final.headers, logBody);
|
|
503
641
|
}
|
|
504
642
|
const res = await fetch(final.url.toString(), {
|
|
@@ -510,6 +648,9 @@ async function request(spec) {
|
|
|
510
648
|
let respBody;
|
|
511
649
|
try {
|
|
512
650
|
respBody = await res.clone().text();
|
|
651
|
+
if (respBody && spec.secretOperation !== void 0) {
|
|
652
|
+
respBody = sanitizeAIGatewayDebugBody(respBody, spec.secretOperation, "response");
|
|
653
|
+
}
|
|
513
654
|
} catch {
|
|
514
655
|
}
|
|
515
656
|
logResponse(res.status, Date.now() - startedAt, respBody);
|
|
@@ -1163,14 +1304,14 @@ var Content = class _Content {
|
|
|
1163
1304
|
get prompt() {
|
|
1164
1305
|
return this._prompt;
|
|
1165
1306
|
}
|
|
1166
|
-
set prompt(
|
|
1167
|
-
if (
|
|
1307
|
+
set prompt(value2) {
|
|
1308
|
+
if (value2 !== void 0 && Buffer.byteLength(value2) > MAX_CONTENT_PROMPT_LENGTH) {
|
|
1168
1309
|
throw new AISecSDKException(
|
|
1169
1310
|
`prompt exceeds max length of ${MAX_CONTENT_PROMPT_LENGTH} bytes`,
|
|
1170
1311
|
"AISEC_USER_REQUEST_PAYLOAD_ERROR" /* USER_REQUEST_PAYLOAD_ERROR */
|
|
1171
1312
|
);
|
|
1172
1313
|
}
|
|
1173
|
-
this._prompt =
|
|
1314
|
+
this._prompt = value2;
|
|
1174
1315
|
}
|
|
1175
1316
|
/**
|
|
1176
1317
|
* AI model response text. Setting a value validates its byte length (max 2 MB).
|
|
@@ -1185,14 +1326,14 @@ var Content = class _Content {
|
|
|
1185
1326
|
get response() {
|
|
1186
1327
|
return this._response;
|
|
1187
1328
|
}
|
|
1188
|
-
set response(
|
|
1189
|
-
if (
|
|
1329
|
+
set response(value2) {
|
|
1330
|
+
if (value2 !== void 0 && Buffer.byteLength(value2) > MAX_CONTENT_RESPONSE_LENGTH) {
|
|
1190
1331
|
throw new AISecSDKException(
|
|
1191
1332
|
`response exceeds max length of ${MAX_CONTENT_RESPONSE_LENGTH} bytes`,
|
|
1192
1333
|
"AISEC_USER_REQUEST_PAYLOAD_ERROR" /* USER_REQUEST_PAYLOAD_ERROR */
|
|
1193
1334
|
);
|
|
1194
1335
|
}
|
|
1195
|
-
this._response =
|
|
1336
|
+
this._response = value2;
|
|
1196
1337
|
}
|
|
1197
1338
|
/**
|
|
1198
1339
|
* Conversation context. Setting a value validates its byte length (max 100 MB).
|
|
@@ -1207,14 +1348,14 @@ var Content = class _Content {
|
|
|
1207
1348
|
get context() {
|
|
1208
1349
|
return this._context;
|
|
1209
1350
|
}
|
|
1210
|
-
set context(
|
|
1211
|
-
if (
|
|
1351
|
+
set context(value2) {
|
|
1352
|
+
if (value2 !== void 0 && Buffer.byteLength(value2) > MAX_CONTENT_CONTEXT_LENGTH) {
|
|
1212
1353
|
throw new AISecSDKException(
|
|
1213
1354
|
`context exceeds max length of ${MAX_CONTENT_CONTEXT_LENGTH} bytes`,
|
|
1214
1355
|
"AISEC_USER_REQUEST_PAYLOAD_ERROR" /* USER_REQUEST_PAYLOAD_ERROR */
|
|
1215
1356
|
);
|
|
1216
1357
|
}
|
|
1217
|
-
this._context =
|
|
1358
|
+
this._context = value2;
|
|
1218
1359
|
}
|
|
1219
1360
|
/**
|
|
1220
1361
|
* Code prompt text. Setting a value validates its byte length (max 2 MB).
|
|
@@ -1229,14 +1370,14 @@ var Content = class _Content {
|
|
|
1229
1370
|
get codePrompt() {
|
|
1230
1371
|
return this._codePrompt;
|
|
1231
1372
|
}
|
|
1232
|
-
set codePrompt(
|
|
1233
|
-
if (
|
|
1373
|
+
set codePrompt(value2) {
|
|
1374
|
+
if (value2 !== void 0 && Buffer.byteLength(value2) > MAX_CONTENT_PROMPT_LENGTH) {
|
|
1234
1375
|
throw new AISecSDKException(
|
|
1235
1376
|
`codePrompt exceeds max length of ${MAX_CONTENT_PROMPT_LENGTH} bytes`,
|
|
1236
1377
|
"AISEC_USER_REQUEST_PAYLOAD_ERROR" /* USER_REQUEST_PAYLOAD_ERROR */
|
|
1237
1378
|
);
|
|
1238
1379
|
}
|
|
1239
|
-
this._codePrompt =
|
|
1380
|
+
this._codePrompt = value2;
|
|
1240
1381
|
}
|
|
1241
1382
|
/**
|
|
1242
1383
|
* Code response text. Setting a value validates its byte length (max 2 MB).
|
|
@@ -1251,14 +1392,14 @@ var Content = class _Content {
|
|
|
1251
1392
|
get codeResponse() {
|
|
1252
1393
|
return this._codeResponse;
|
|
1253
1394
|
}
|
|
1254
|
-
set codeResponse(
|
|
1255
|
-
if (
|
|
1395
|
+
set codeResponse(value2) {
|
|
1396
|
+
if (value2 !== void 0 && Buffer.byteLength(value2) > MAX_CONTENT_RESPONSE_LENGTH) {
|
|
1256
1397
|
throw new AISecSDKException(
|
|
1257
1398
|
`codeResponse exceeds max length of ${MAX_CONTENT_RESPONSE_LENGTH} bytes`,
|
|
1258
1399
|
"AISEC_USER_REQUEST_PAYLOAD_ERROR" /* USER_REQUEST_PAYLOAD_ERROR */
|
|
1259
1400
|
);
|
|
1260
1401
|
}
|
|
1261
|
-
this._codeResponse =
|
|
1402
|
+
this._codeResponse = value2;
|
|
1262
1403
|
}
|
|
1263
1404
|
/**
|
|
1264
1405
|
* Tool/function call event data attached to the content.
|
|
@@ -1276,8 +1417,8 @@ var Content = class _Content {
|
|
|
1276
1417
|
get toolEvent() {
|
|
1277
1418
|
return this._toolEvent;
|
|
1278
1419
|
}
|
|
1279
|
-
set toolEvent(
|
|
1280
|
-
this._toolEvent =
|
|
1420
|
+
set toolEvent(value2) {
|
|
1421
|
+
this._toolEvent = value2;
|
|
1281
1422
|
}
|
|
1282
1423
|
/**
|
|
1283
1424
|
* Total byte length of all text content fields.
|
|
@@ -2693,7 +2834,7 @@ var RuleEvaluationListSchema = z32.object({
|
|
|
2693
2834
|
}).passthrough();
|
|
2694
2835
|
var ViolationRemediationSchema = z32.object({
|
|
2695
2836
|
steps: z32.array(z32.string()),
|
|
2696
|
-
url: z32.string()
|
|
2837
|
+
url: z32.string().optional()
|
|
2697
2838
|
}).passthrough();
|
|
2698
2839
|
var ViolationResponseSchema = z32.object({
|
|
2699
2840
|
uuid: z32.string(),
|
|
@@ -2705,7 +2846,7 @@ var ViolationResponseSchema = z32.object({
|
|
|
2705
2846
|
rule_name: z32.string(),
|
|
2706
2847
|
rule_description: z32.string(),
|
|
2707
2848
|
rule_instance_state: z32.string(),
|
|
2708
|
-
remediation: ViolationRemediationSchema,
|
|
2849
|
+
remediation: ViolationRemediationSchema.optional(),
|
|
2709
2850
|
file: z32.string().nullable().optional(),
|
|
2710
2851
|
hash: z32.string().nullable().optional(),
|
|
2711
2852
|
module: z32.string().nullable().optional(),
|
|
@@ -2757,12 +2898,12 @@ var ListModelSecurityRulesResponseSchema = z32.object({
|
|
|
2757
2898
|
var ModelSecurityRuleInstanceResponseSchema = z32.object({
|
|
2758
2899
|
uuid: z32.string(),
|
|
2759
2900
|
tsg_id: z32.string(),
|
|
2760
|
-
created_at: z32.string(),
|
|
2761
|
-
updated_at: z32.string(),
|
|
2901
|
+
created_at: z32.string().optional(),
|
|
2902
|
+
updated_at: z32.string().optional(),
|
|
2762
2903
|
security_group_uuid: z32.string(),
|
|
2763
|
-
security_rule_uuid: z32.string(),
|
|
2904
|
+
security_rule_uuid: z32.string().optional(),
|
|
2764
2905
|
state: z32.string(),
|
|
2765
|
-
rule: ModelSecurityRuleResponseSchema,
|
|
2906
|
+
rule: ModelSecurityRuleResponseSchema.optional(),
|
|
2766
2907
|
field_values: z32.record(z32.unknown()).optional()
|
|
2767
2908
|
}).passthrough();
|
|
2768
2909
|
var ModelSecurityRuleInstanceUpdateRequestSchema = z32.object({
|
|
@@ -4443,6 +4584,11 @@ var GatewayConfigDetailSchema = GatewayConfigSchema.extend({
|
|
|
4443
4584
|
type: z35.string(),
|
|
4444
4585
|
version_id: z35.string()
|
|
4445
4586
|
}).passthrough();
|
|
4587
|
+
var GatewayConfigVersionSchema = GatewayConfigDetailSchema.extend({
|
|
4588
|
+
version_created_at: z35.string(),
|
|
4589
|
+
version_owner_id: z35.string()
|
|
4590
|
+
}).passthrough();
|
|
4591
|
+
var ListConfigVersionsResponseSchema = aiGatewayList(GatewayConfigVersionSchema);
|
|
4446
4592
|
var GatewayConfigCreateResponseSchema = z35.object({
|
|
4447
4593
|
id: z35.string(),
|
|
4448
4594
|
version_id: z35.string(),
|
|
@@ -4480,8 +4626,8 @@ var GatewayGuardrailDetailSchema = GatewayGuardrailSchema.extend({
|
|
|
4480
4626
|
async: z35.boolean(),
|
|
4481
4627
|
sequential: z35.boolean(),
|
|
4482
4628
|
/** Absent when the guardrail was created without a pass/fail feedback action. */
|
|
4483
|
-
on_success: guardrailFeedbackActionSchema.optional(),
|
|
4484
|
-
on_fail: guardrailFeedbackActionSchema.optional()
|
|
4629
|
+
on_success: guardrailFeedbackActionSchema.nullable().optional(),
|
|
4630
|
+
on_fail: guardrailFeedbackActionSchema.nullable().optional()
|
|
4485
4631
|
}).passthrough(),
|
|
4486
4632
|
version_id: z35.string()
|
|
4487
4633
|
}).passthrough();
|
|
@@ -4498,6 +4644,27 @@ var GatewayProviderSchema = z35.object({
|
|
|
4498
4644
|
object: z35.string().optional()
|
|
4499
4645
|
}).passthrough();
|
|
4500
4646
|
var ListProvidersResponseSchema = aiGatewayList(GatewayProviderSchema);
|
|
4647
|
+
var GatewayProviderDetailSchema = z35.object({
|
|
4648
|
+
id: z35.string(),
|
|
4649
|
+
ai_provider_name: z35.string(),
|
|
4650
|
+
model_config: z35.record(z35.unknown()),
|
|
4651
|
+
/** Potentially secret-bearing. Never log or persist this field. */
|
|
4652
|
+
key: z35.string(),
|
|
4653
|
+
masked_api_key: z35.string(),
|
|
4654
|
+
slug: z35.string(),
|
|
4655
|
+
name: z35.string(),
|
|
4656
|
+
usage_limits: z35.unknown().nullable(),
|
|
4657
|
+
status: z35.string(),
|
|
4658
|
+
note: z35.string().nullable(),
|
|
4659
|
+
created_at: z35.string(),
|
|
4660
|
+
expires_at: z35.string().nullable(),
|
|
4661
|
+
last_reset_at: z35.string().nullable(),
|
|
4662
|
+
rate_limits: z35.array(z35.unknown()),
|
|
4663
|
+
integration_id: z35.string(),
|
|
4664
|
+
tags: z35.unknown().nullable(),
|
|
4665
|
+
secret_mappings: z35.array(z35.unknown()).optional(),
|
|
4666
|
+
object: z35.string()
|
|
4667
|
+
}).passthrough();
|
|
4501
4668
|
var GatewayProviderCreateResponseSchema = z35.object({
|
|
4502
4669
|
id: z35.string(),
|
|
4503
4670
|
slug: z35.string(),
|
|
@@ -4509,6 +4676,11 @@ var GatewayApiKeySchema = z35.object({
|
|
|
4509
4676
|
object: z35.string().optional()
|
|
4510
4677
|
}).passthrough();
|
|
4511
4678
|
var ListApiKeysResponseSchema = aiGatewayList(GatewayApiKeySchema);
|
|
4679
|
+
var GatewayApiKeyRotateResponseSchema = z35.object({
|
|
4680
|
+
id: z35.string(),
|
|
4681
|
+
key: z35.string(),
|
|
4682
|
+
key_transition_expires_at: z35.string()
|
|
4683
|
+
}).passthrough();
|
|
4512
4684
|
var GatewayIntegrationSchema = z35.object({
|
|
4513
4685
|
id: z35.string(),
|
|
4514
4686
|
organisation_id: z35.string().optional(),
|
|
@@ -4539,7 +4711,7 @@ var GatewayIntegrationWorkspaceSchema = z35.object({
|
|
|
4539
4711
|
enabled: z35.boolean(),
|
|
4540
4712
|
status: z35.string(),
|
|
4541
4713
|
created_at: z35.string(),
|
|
4542
|
-
last_updated_at: z35.string(),
|
|
4714
|
+
last_updated_at: z35.string().nullable(),
|
|
4543
4715
|
last_reset_at: z35.string().nullable()
|
|
4544
4716
|
}).passthrough();
|
|
4545
4717
|
var GatewayGlobalWorkspaceAccessSchema = z35.object({
|
|
@@ -4572,6 +4744,70 @@ var McpIntegrationSchema = z35.object({
|
|
|
4572
4744
|
last_updated_at: z35.string()
|
|
4573
4745
|
}).passthrough();
|
|
4574
4746
|
var ListMcpIntegrationsResponseSchema = aiGatewayList(McpIntegrationSchema);
|
|
4747
|
+
var McpIntegrationDetailSchema = z35.object({
|
|
4748
|
+
id: z35.string(),
|
|
4749
|
+
name: z35.string(),
|
|
4750
|
+
description: z35.string().nullable(),
|
|
4751
|
+
owner_id: z35.string(),
|
|
4752
|
+
status: z35.string(),
|
|
4753
|
+
created_at: z35.string(),
|
|
4754
|
+
last_updated_at: z35.string(),
|
|
4755
|
+
configurations: z35.record(z35.unknown()),
|
|
4756
|
+
global_workspace_access: z35.object({ enabled: z35.boolean() }).passthrough().nullable(),
|
|
4757
|
+
workspace_id: z35.string().nullable(),
|
|
4758
|
+
slug: z35.string(),
|
|
4759
|
+
url: z35.string(),
|
|
4760
|
+
auth_type: z35.string(),
|
|
4761
|
+
transport: z35.string(),
|
|
4762
|
+
type: z35.string(),
|
|
4763
|
+
secret_mappings: z35.array(z35.unknown()).nullable(),
|
|
4764
|
+
object: z35.string()
|
|
4765
|
+
}).passthrough();
|
|
4766
|
+
var McpCapabilityCountSchema = z35.object({ total: z35.number(), enabled: z35.number() }).passthrough();
|
|
4767
|
+
var McpIntegrationCapabilitySchema = z35.object({
|
|
4768
|
+
name: z35.string(),
|
|
4769
|
+
type: z35.string(),
|
|
4770
|
+
title: z35.string().nullable(),
|
|
4771
|
+
description: z35.string().nullable(),
|
|
4772
|
+
icons: z35.unknown().nullable(),
|
|
4773
|
+
enabled: z35.boolean(),
|
|
4774
|
+
created_at: z35.string(),
|
|
4775
|
+
last_updated_at: z35.string(),
|
|
4776
|
+
input_schema: z35.record(z35.unknown()).nullable(),
|
|
4777
|
+
output_schema: z35.record(z35.unknown()).nullable(),
|
|
4778
|
+
execution: z35.unknown().nullable(),
|
|
4779
|
+
annotations: z35.record(z35.unknown()).nullable(),
|
|
4780
|
+
object: z35.string()
|
|
4781
|
+
}).passthrough();
|
|
4782
|
+
var McpIntegrationCapabilitiesResponseSchema = z35.object({
|
|
4783
|
+
object: z35.string(),
|
|
4784
|
+
counts: z35.object({
|
|
4785
|
+
tools: McpCapabilityCountSchema.optional(),
|
|
4786
|
+
prompts: McpCapabilityCountSchema.optional(),
|
|
4787
|
+
resources: McpCapabilityCountSchema.optional(),
|
|
4788
|
+
resource_templates: McpCapabilityCountSchema.optional()
|
|
4789
|
+
}).passthrough(),
|
|
4790
|
+
total: z35.number(),
|
|
4791
|
+
has_more: z35.boolean(),
|
|
4792
|
+
data: z35.array(McpIntegrationCapabilitySchema)
|
|
4793
|
+
}).passthrough();
|
|
4794
|
+
var McpIntegrationCapabilitiesUpdateResponseSchema = z35.object({ success: z35.boolean() }).passthrough();
|
|
4795
|
+
var McpIntegrationWorkspacesUpdateResponseSchema = z35.object({}).strict();
|
|
4796
|
+
var McpIntegrationMetadataSchema = z35.object({
|
|
4797
|
+
server_name: z35.string(),
|
|
4798
|
+
server_version: z35.string(),
|
|
4799
|
+
title: z35.string().nullable(),
|
|
4800
|
+
description: z35.string().nullable(),
|
|
4801
|
+
website_url: z35.string().nullable(),
|
|
4802
|
+
icons: z35.unknown().nullable(),
|
|
4803
|
+
protocol_version: z35.string().nullable(),
|
|
4804
|
+
capability_flags: z35.record(z35.unknown()),
|
|
4805
|
+
instructions: z35.string().nullable(),
|
|
4806
|
+
sync_status: z35.string(),
|
|
4807
|
+
last_synced_at: z35.string().nullable(),
|
|
4808
|
+
sync_error: z35.string().nullable(),
|
|
4809
|
+
object: z35.string()
|
|
4810
|
+
}).passthrough();
|
|
4575
4811
|
var GatewayDeploymentSchema = z35.object({
|
|
4576
4812
|
id: z35.string(),
|
|
4577
4813
|
name: z35.string(),
|
|
@@ -4607,6 +4843,18 @@ var GatewayDeploymentCreateResponseSchema = z35.object({
|
|
|
4607
4843
|
organisation_id: z35.string(),
|
|
4608
4844
|
object: z35.string()
|
|
4609
4845
|
}).passthrough();
|
|
4846
|
+
var GatewayDeploymentPingResponseSchema = z35.object({
|
|
4847
|
+
status: z35.string(),
|
|
4848
|
+
gateway_base_url: z35.string(),
|
|
4849
|
+
outbound: z35.object({
|
|
4850
|
+
status: z35.string(),
|
|
4851
|
+
status_code: z35.number().optional(),
|
|
4852
|
+
version: z35.string().optional(),
|
|
4853
|
+
error: z35.string().optional()
|
|
4854
|
+
}).passthrough(),
|
|
4855
|
+
inbound: z35.object({ status: z35.string(), error: z35.string().optional() }).passthrough(),
|
|
4856
|
+
object: z35.string()
|
|
4857
|
+
}).passthrough();
|
|
4610
4858
|
var ListDeploymentsResponseSchema = aiGatewayList(GatewayDeploymentSchema);
|
|
4611
4859
|
var GatewayPluginSchema = z35.object({
|
|
4612
4860
|
id: z35.string(),
|
|
@@ -4644,6 +4892,472 @@ var GatewayAuditLogRecordSchema = z35.object({
|
|
|
4644
4892
|
}).passthrough();
|
|
4645
4893
|
var GatewayAuditLogsResponseSchema = z35.object({ records: z35.array(GatewayAuditLogRecordSchema) }).passthrough();
|
|
4646
4894
|
|
|
4895
|
+
// src/models/ai-gateway-routing.ts
|
|
4896
|
+
import { z as z36 } from "zod";
|
|
4897
|
+
var AI_GATEWAY_DEPLOYMENT_TYPES = ["non_production", "production"];
|
|
4898
|
+
var GatewayDeploymentTypeSchema = z36.enum(AI_GATEWAY_DEPLOYMENT_TYPES);
|
|
4899
|
+
var AI_GATEWAY_DEPLOYMENT_STATUSES = ["active", "archived"];
|
|
4900
|
+
var GatewayDeploymentStatusSchema = z36.enum(AI_GATEWAY_DEPLOYMENT_STATUSES);
|
|
4901
|
+
var AI_GATEWAY_MUTABLE_MCP_CAPABILITY_TYPES = ["prompt", "resource", "tool"];
|
|
4902
|
+
var GatewayMutableMcpCapabilityTypeSchema = z36.enum(
|
|
4903
|
+
AI_GATEWAY_MUTABLE_MCP_CAPABILITY_TYPES
|
|
4904
|
+
);
|
|
4905
|
+
var AI_GATEWAY_KNOWN_API_KEY_SCOPES = [
|
|
4906
|
+
"agents.invoke",
|
|
4907
|
+
"completions.write",
|
|
4908
|
+
"logs.write",
|
|
4909
|
+
"mcp.invoke",
|
|
4910
|
+
"prompts.render"
|
|
4911
|
+
];
|
|
4912
|
+
var AI_GATEWAY_KNOWN_CACHE_MODES = ["semantic", "simple"];
|
|
4913
|
+
var AI_GATEWAY_KNOWN_CONFIG_STRATEGIES = ["fallback", "loadbalance", "single"];
|
|
4914
|
+
var AI_GATEWAY_KNOWN_MCP_AUTH_TYPES = [
|
|
4915
|
+
"headers",
|
|
4916
|
+
"none",
|
|
4917
|
+
"oauth_auto",
|
|
4918
|
+
"oauth_client_credentials"
|
|
4919
|
+
];
|
|
4920
|
+
var AI_GATEWAY_KNOWN_MCP_TRANSPORTS = ["http", "interactive", "sse"];
|
|
4921
|
+
var AI_GATEWAY_KNOWN_RATE_LIMIT_TYPES = ["requests", "tokens"];
|
|
4922
|
+
var AI_GATEWAY_KNOWN_RATE_LIMIT_UNITS = ["rpd", "rph", "rpm", "rps", "rpw"];
|
|
4923
|
+
var openValue = () => z36.string().min(1);
|
|
4924
|
+
var GatewayApiKeyScopeSchema = openValue();
|
|
4925
|
+
var GatewayConfigCacheModeSchema = openValue();
|
|
4926
|
+
var GatewayConfigStrategySchema = openValue();
|
|
4927
|
+
var GatewayMcpAuthTypeSchema = openValue();
|
|
4928
|
+
var GatewayMcpTransportSchema = openValue();
|
|
4929
|
+
var GatewayRateLimitTypeSchema = openValue();
|
|
4930
|
+
var GatewayRateLimitUnitSchema = openValue();
|
|
4931
|
+
var unsafeJsonKeys = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]);
|
|
4932
|
+
function isFiniteJsonValue(value2, ancestors = /* @__PURE__ */ new WeakSet()) {
|
|
4933
|
+
if (value2 === null || typeof value2 === "string" || typeof value2 === "boolean" || typeof value2 === "number" && Number.isFinite(value2)) {
|
|
4934
|
+
return true;
|
|
4935
|
+
}
|
|
4936
|
+
if (typeof value2 !== "object" || ancestors.has(value2)) return false;
|
|
4937
|
+
if (Array.isArray(value2)) {
|
|
4938
|
+
const keys = Object.keys(value2);
|
|
4939
|
+
if (keys.length !== value2.length || keys.some((key, index) => key !== String(index)) || Object.getOwnPropertySymbols(value2).length > 0) {
|
|
4940
|
+
return false;
|
|
4941
|
+
}
|
|
4942
|
+
ancestors.add(value2);
|
|
4943
|
+
const valid2 = value2.every((item) => isFiniteJsonValue(item, ancestors));
|
|
4944
|
+
ancestors.delete(value2);
|
|
4945
|
+
return valid2;
|
|
4946
|
+
}
|
|
4947
|
+
const prototype = Object.getPrototypeOf(value2);
|
|
4948
|
+
if (prototype !== Object.prototype && prototype !== null) return false;
|
|
4949
|
+
if (Object.getOwnPropertySymbols(value2).length > 0) return false;
|
|
4950
|
+
ancestors.add(value2);
|
|
4951
|
+
const valid = Object.entries(Object.getOwnPropertyDescriptors(value2)).every(
|
|
4952
|
+
([key, descriptor]) => descriptor.enumerable === true && "value" in descriptor && !unsafeJsonKeys.has(key) && isFiniteJsonValue(descriptor.value, ancestors)
|
|
4953
|
+
);
|
|
4954
|
+
ancestors.delete(value2);
|
|
4955
|
+
return valid;
|
|
4956
|
+
}
|
|
4957
|
+
var GatewayJsonValueSchema = z36.custom(
|
|
4958
|
+
(value2) => isFiniteJsonValue(value2),
|
|
4959
|
+
"Expected a finite, prototype-safe JSON value"
|
|
4960
|
+
);
|
|
4961
|
+
var GatewayJsonObjectSchema = z36.custom(
|
|
4962
|
+
(value2) => typeof value2 === "object" && value2 !== null && !Array.isArray(value2) && isFiniteJsonValue(value2),
|
|
4963
|
+
"Expected a finite, prototype-safe JSON object"
|
|
4964
|
+
);
|
|
4965
|
+
var GatewayRoutingRetrySchema = z36.object({
|
|
4966
|
+
attempts: z36.number().int().min(0).optional(),
|
|
4967
|
+
on_status_codes: z36.array(z36.number().int().min(100).max(599)).optional()
|
|
4968
|
+
}).catchall(GatewayJsonValueSchema);
|
|
4969
|
+
var GatewayRoutingCacheSchema = z36.object({
|
|
4970
|
+
mode: GatewayConfigCacheModeSchema.optional(),
|
|
4971
|
+
max_age: z36.number().int().min(0).optional()
|
|
4972
|
+
}).catchall(GatewayJsonValueSchema);
|
|
4973
|
+
var GatewayRoutingStrategySchema = z36.object({ mode: GatewayConfigStrategySchema }).catchall(GatewayJsonValueSchema);
|
|
4974
|
+
var GatewayRoutingTargetSchema = z36.object({
|
|
4975
|
+
provider: z36.string().min(1).optional(),
|
|
4976
|
+
virtual_key: z36.string().min(1).optional()
|
|
4977
|
+
}).catchall(GatewayJsonValueSchema);
|
|
4978
|
+
var GatewayRoutingConfigSchema = z36.object({
|
|
4979
|
+
retry: GatewayRoutingRetrySchema.optional(),
|
|
4980
|
+
cache: GatewayRoutingCacheSchema.optional(),
|
|
4981
|
+
strategy: GatewayRoutingStrategySchema.optional(),
|
|
4982
|
+
targets: z36.array(GatewayRoutingTargetSchema).optional(),
|
|
4983
|
+
provider: z36.string().min(1).optional(),
|
|
4984
|
+
virtual_key: z36.string().min(1).optional()
|
|
4985
|
+
}).catchall(GatewayJsonValueSchema);
|
|
4986
|
+
var GatewayOpenAIConfigurationSchema = z36.object({
|
|
4987
|
+
openai_organization: z36.string().min(1).optional(),
|
|
4988
|
+
openai_project: z36.string().min(1).optional()
|
|
4989
|
+
}).catchall(GatewayJsonValueSchema);
|
|
4990
|
+
var GatewayAzureDeploymentConfigurationSchema = z36.object({
|
|
4991
|
+
alias: z36.string().min(1).optional(),
|
|
4992
|
+
azure_api_version: z36.string().min(1).max(30),
|
|
4993
|
+
azure_deployment_name: z36.string().min(1),
|
|
4994
|
+
is_default: z36.boolean().optional(),
|
|
4995
|
+
azure_model_slug: z36.string().min(1)
|
|
4996
|
+
}).catchall(GatewayJsonValueSchema);
|
|
4997
|
+
var azureAuthModeSchema = z36.enum(["default", "entra", "managed"]);
|
|
4998
|
+
var GatewayAzureOpenAIConfigurationSchema = z36.object({
|
|
4999
|
+
azure_auth_mode: azureAuthModeSchema,
|
|
5000
|
+
azure_resource_name: z36.string().min(1),
|
|
5001
|
+
azure_deployment_config: z36.array(GatewayAzureDeploymentConfigurationSchema).min(1),
|
|
5002
|
+
azure_entra_tenant_id: z36.string().min(1).optional(),
|
|
5003
|
+
azure_entra_client_id: z36.string().min(1).optional(),
|
|
5004
|
+
azure_entra_client_secret: z36.string().min(1).optional(),
|
|
5005
|
+
azure_managed_client_id: z36.string().min(1).optional()
|
|
5006
|
+
}).catchall(GatewayJsonValueSchema);
|
|
5007
|
+
var GatewayBedrockConfigurationSchema = z36.object({
|
|
5008
|
+
aws_auth_type: z36.enum(["accessKey", "assumedRole"]),
|
|
5009
|
+
aws_region: z36.string().min(1),
|
|
5010
|
+
aws_access_key_id: z36.string().min(1).optional(),
|
|
5011
|
+
aws_secret_access_key: z36.string().min(1).optional(),
|
|
5012
|
+
aws_role_arn: z36.string().min(1).optional(),
|
|
5013
|
+
aws_external_id: z36.string().min(1).nullable().optional()
|
|
5014
|
+
}).catchall(GatewayJsonValueSchema);
|
|
5015
|
+
var GatewaySageMakerConfigurationSchema = GatewayBedrockConfigurationSchema.extend({
|
|
5016
|
+
amzn_sagemaker_custom_attributes: z36.string().optional(),
|
|
5017
|
+
amzn_sagemaker_target_model: z36.string().optional(),
|
|
5018
|
+
amzn_sagemaker_target_variant: z36.string().optional(),
|
|
5019
|
+
amzn_sagemaker_target_container_hostname: z36.string().optional(),
|
|
5020
|
+
amzn_sagemaker_inference_id: z36.string().optional(),
|
|
5021
|
+
amzn_sagemaker_enable_explanations: z36.string().optional(),
|
|
5022
|
+
amzn_sagemaker_inference_component: z36.string().optional(),
|
|
5023
|
+
amzn_sagemaker_session_id: z36.string().optional(),
|
|
5024
|
+
amzn_sagemaker_model_name: z36.string().optional()
|
|
5025
|
+
}).catchall(GatewayJsonValueSchema);
|
|
5026
|
+
var GatewayVertexAIConfigurationSchema = z36.object({
|
|
5027
|
+
vertex_auth_type: z36.enum(["basic", "serviceAccount"]),
|
|
5028
|
+
vertex_region: z36.string().min(1),
|
|
5029
|
+
vertex_project_id: z36.string().min(1).optional(),
|
|
5030
|
+
vertex_service_account_json: GatewayJsonObjectSchema.optional()
|
|
5031
|
+
}).catchall(GatewayJsonValueSchema);
|
|
5032
|
+
var GatewayAzureAIConfigurationSchema = z36.object({
|
|
5033
|
+
azure_auth_mode: azureAuthModeSchema,
|
|
5034
|
+
azure_foundry_url: z36.string().url(),
|
|
5035
|
+
azure_api_version: z36.string().min(1).max(30).optional(),
|
|
5036
|
+
azure_deployment_name: z36.string().min(1).optional(),
|
|
5037
|
+
azure_entra_tenant_id: z36.string().min(1).optional(),
|
|
5038
|
+
azure_entra_client_id: z36.string().min(1).optional(),
|
|
5039
|
+
azure_entra_client_secret: z36.string().min(1).optional(),
|
|
5040
|
+
azure_managed_client_id: z36.string().min(1).optional()
|
|
5041
|
+
}).catchall(GatewayJsonValueSchema);
|
|
5042
|
+
var GatewayWorkersAIConfigurationSchema = z36.object({ workers_ai_account_id: z36.string().min(1) }).catchall(GatewayJsonValueSchema);
|
|
5043
|
+
var GatewayHuggingFaceConfigurationSchema = z36.object({ huggingface_base_url: z36.string().url().optional() }).catchall(GatewayJsonValueSchema);
|
|
5044
|
+
var GatewayCortexConfigurationSchema = z36.object({ snowflake_account: z36.string().min(1) }).catchall(GatewayJsonValueSchema);
|
|
5045
|
+
var GatewayCustomHostConfigurationSchema = z36.object({
|
|
5046
|
+
custom_host: z36.string().url().optional(),
|
|
5047
|
+
custom_headers: z36.record(z36.string()).optional()
|
|
5048
|
+
}).catchall(GatewayJsonValueSchema);
|
|
5049
|
+
|
|
5050
|
+
// src/models/ai-gateway-requests.ts
|
|
5051
|
+
import { z as z37 } from "zod";
|
|
5052
|
+
var nonEmptyString = z37.string().min(1);
|
|
5053
|
+
var uuid = z37.string().uuid();
|
|
5054
|
+
var numericId = z37.string().regex(/^\d+$/, "Expected a numeric-string TSG id");
|
|
5055
|
+
var workspaceRef = z37.string().regex(/^[A-Za-z0-9][A-Za-z0-9_-]*$/);
|
|
5056
|
+
var dateTime = z37.string().datetime({ offset: true });
|
|
5057
|
+
var nonEmptyObject = (schema, message = "Provide at least one field") => schema.refine((body) => Object.keys(body).length > 0, { message });
|
|
5058
|
+
var GatewayRateLimitInputSchema = z37.object({
|
|
5059
|
+
type: GatewayRateLimitTypeSchema,
|
|
5060
|
+
unit: GatewayRateLimitUnitSchema,
|
|
5061
|
+
value: z37.number().int().min(0)
|
|
5062
|
+
}).strict();
|
|
5063
|
+
var GatewayUsageLimitInputSchema = nonEmptyObject(
|
|
5064
|
+
z37.object({
|
|
5065
|
+
credit_limit: z37.number().min(0).optional(),
|
|
5066
|
+
type: z37.enum(["cost", "tokens"]).optional(),
|
|
5067
|
+
alert_threshold: z37.number().min(0).optional(),
|
|
5068
|
+
periodic_reset: z37.enum(["monthly", "weekly"]).nullable().optional(),
|
|
5069
|
+
periodic_reset_days: z37.number().int().min(1).max(365).nullable().optional(),
|
|
5070
|
+
next_usage_reset_at: dateTime.nullable().optional()
|
|
5071
|
+
}).strict()
|
|
5072
|
+
).refine(
|
|
5073
|
+
(value2) => value2.periodic_reset == null || value2.periodic_reset_days == null,
|
|
5074
|
+
"periodic_reset and periodic_reset_days are mutually exclusive"
|
|
5075
|
+
);
|
|
5076
|
+
var GatewayDefaultsInputSchema = z37.object({
|
|
5077
|
+
metadata: z37.record(GatewayJsonValueSchema).optional(),
|
|
5078
|
+
config_id: nonEmptyString.optional(),
|
|
5079
|
+
allow_config_override: z37.boolean().optional()
|
|
5080
|
+
}).catchall(GatewayJsonValueSchema);
|
|
5081
|
+
var GatewaySecretMappingSchema = z37.object({
|
|
5082
|
+
target_field: nonEmptyString,
|
|
5083
|
+
secret_reference_id: nonEmptyString,
|
|
5084
|
+
secret_key: nonEmptyString.nullable().optional(),
|
|
5085
|
+
value_format: z37.enum(["json", "string"]).nullable().optional()
|
|
5086
|
+
}).strict();
|
|
5087
|
+
var GatewayGlobalWorkspaceAccessInputSchema = z37.object({
|
|
5088
|
+
enabled: z37.boolean(),
|
|
5089
|
+
usage_limits: z37.array(GatewayUsageLimitInputSchema).max(1).nullable().optional(),
|
|
5090
|
+
rate_limits: z37.array(GatewayRateLimitInputSchema).max(1).nullable().optional()
|
|
5091
|
+
}).strict();
|
|
5092
|
+
var GatewayWorkspaceBindingSchema = z37.object({
|
|
5093
|
+
id: workspaceRef,
|
|
5094
|
+
enabled: z37.boolean(),
|
|
5095
|
+
usage_limits: z37.array(GatewayUsageLimitInputSchema).max(1).nullable().optional(),
|
|
5096
|
+
rate_limits: z37.array(GatewayRateLimitInputSchema).max(1).nullable().optional(),
|
|
5097
|
+
reset_usage: z37.boolean().optional(),
|
|
5098
|
+
create_default_provider: z37.boolean().optional(),
|
|
5099
|
+
default_provider_slug: nonEmptyString.optional()
|
|
5100
|
+
}).strict();
|
|
5101
|
+
var GatewayWorkspaceCreateRequestSchema = z37.object({
|
|
5102
|
+
name: nonEmptyString,
|
|
5103
|
+
scope_name: nonEmptyString,
|
|
5104
|
+
description: z37.string().optional(),
|
|
5105
|
+
icon: z37.string().optional(),
|
|
5106
|
+
defaults: GatewayDefaultsInputSchema.optional(),
|
|
5107
|
+
users: z37.array(nonEmptyString).optional(),
|
|
5108
|
+
usage_limits: z37.array(GatewayUsageLimitInputSchema).optional(),
|
|
5109
|
+
rate_limits: z37.array(GatewayRateLimitInputSchema).optional()
|
|
5110
|
+
}).strict();
|
|
5111
|
+
var GatewayWorkspaceUpdateRequestSchema = nonEmptyObject(
|
|
5112
|
+
z37.object({
|
|
5113
|
+
name: nonEmptyString.optional(),
|
|
5114
|
+
description: z37.string().optional(),
|
|
5115
|
+
icon: z37.string().optional(),
|
|
5116
|
+
defaults: GatewayDefaultsInputSchema.optional(),
|
|
5117
|
+
usage_limits: z37.array(GatewayUsageLimitInputSchema).optional(),
|
|
5118
|
+
rate_limits: z37.array(GatewayRateLimitInputSchema).optional()
|
|
5119
|
+
}).strict()
|
|
5120
|
+
);
|
|
5121
|
+
var GatewayConfigCreateRequestSchema = z37.object({
|
|
5122
|
+
name: nonEmptyString,
|
|
5123
|
+
workspace_id: uuid,
|
|
5124
|
+
config: GatewayRoutingConfigSchema
|
|
5125
|
+
}).strict();
|
|
5126
|
+
var GatewayConfigUpdateRequestSchema = nonEmptyObject(
|
|
5127
|
+
z37.object({
|
|
5128
|
+
name: nonEmptyString.optional(),
|
|
5129
|
+
workspace_id: uuid.optional(),
|
|
5130
|
+
config: GatewayRoutingConfigSchema.optional(),
|
|
5131
|
+
status: nonEmptyString.optional()
|
|
5132
|
+
}).strict()
|
|
5133
|
+
);
|
|
5134
|
+
var GatewayGuardrailCheckSchema = z37.object({
|
|
5135
|
+
id: nonEmptyString,
|
|
5136
|
+
parameters: GatewayJsonObjectSchema.optional(),
|
|
5137
|
+
is_enabled: z37.boolean().optional(),
|
|
5138
|
+
name: nonEmptyString.optional()
|
|
5139
|
+
}).strict();
|
|
5140
|
+
var feedbackSchema = z37.object({
|
|
5141
|
+
value: z37.number(),
|
|
5142
|
+
weight: z37.number(),
|
|
5143
|
+
metadata: z37.string()
|
|
5144
|
+
}).catchall(GatewayJsonValueSchema);
|
|
5145
|
+
var actionResultSchema = z37.object({ feedback: feedbackSchema.optional() }).catchall(GatewayJsonValueSchema);
|
|
5146
|
+
var GatewayGuardrailActionsSchema = nonEmptyObject(
|
|
5147
|
+
z37.object({
|
|
5148
|
+
deny: z37.boolean().optional(),
|
|
5149
|
+
async: z37.boolean().optional(),
|
|
5150
|
+
on_success: actionResultSchema.optional(),
|
|
5151
|
+
on_fail: actionResultSchema.optional()
|
|
5152
|
+
}).catchall(GatewayJsonValueSchema)
|
|
5153
|
+
);
|
|
5154
|
+
var GatewayGuardrailCreateRequestSchema = z37.object({
|
|
5155
|
+
workspace_id: uuid,
|
|
5156
|
+
name: nonEmptyString,
|
|
5157
|
+
checks: z37.array(GatewayGuardrailCheckSchema).min(1),
|
|
5158
|
+
actions: GatewayGuardrailActionsSchema
|
|
5159
|
+
}).strict();
|
|
5160
|
+
var GatewayGuardrailUpdateRequestSchema = nonEmptyObject(
|
|
5161
|
+
z37.object({
|
|
5162
|
+
name: nonEmptyString.optional(),
|
|
5163
|
+
checks: z37.array(GatewayGuardrailCheckSchema).min(1).optional(),
|
|
5164
|
+
actions: GatewayGuardrailActionsSchema.optional()
|
|
5165
|
+
}).strict()
|
|
5166
|
+
);
|
|
5167
|
+
var GatewayProviderCreateRequestSchema = z37.object({
|
|
5168
|
+
workspace_id: uuid,
|
|
5169
|
+
ai_provider_id: uuid,
|
|
5170
|
+
name: nonEmptyString,
|
|
5171
|
+
integration_id: uuid,
|
|
5172
|
+
slug: nonEmptyString,
|
|
5173
|
+
note: z37.string().nullable().optional(),
|
|
5174
|
+
usage_limits: GatewayUsageLimitInputSchema.nullable().optional(),
|
|
5175
|
+
rate_limits: GatewayRateLimitInputSchema.nullable().optional(),
|
|
5176
|
+
expires_at: dateTime.nullable().optional()
|
|
5177
|
+
}).strict();
|
|
5178
|
+
var GatewayProviderUpdateRequestSchema = nonEmptyObject(
|
|
5179
|
+
z37.object({
|
|
5180
|
+
name: nonEmptyString.optional(),
|
|
5181
|
+
note: z37.string().nullable().optional(),
|
|
5182
|
+
usage_limits: GatewayUsageLimitInputSchema.nullable().optional(),
|
|
5183
|
+
rate_limits: GatewayRateLimitInputSchema.nullable().optional(),
|
|
5184
|
+
expires_at: dateTime.nullable().optional(),
|
|
5185
|
+
reset_usage: z37.boolean().optional()
|
|
5186
|
+
}).strict()
|
|
5187
|
+
);
|
|
5188
|
+
var GatewayApiKeyRotationPolicySchema = nonEmptyObject(
|
|
5189
|
+
z37.object({
|
|
5190
|
+
rotation_period: z37.enum(["monthly", "weekly"]).nullable().optional(),
|
|
5191
|
+
next_rotation_at: dateTime.nullable().optional(),
|
|
5192
|
+
key_transition_period_ms: z37.number().int().min(18e5).optional()
|
|
5193
|
+
}).strict()
|
|
5194
|
+
).refine(
|
|
5195
|
+
(value2) => value2.rotation_period == null || value2.next_rotation_at == null,
|
|
5196
|
+
"rotation_period and next_rotation_at are mutually exclusive"
|
|
5197
|
+
);
|
|
5198
|
+
var apiKeyMutableFields = {
|
|
5199
|
+
name: nonEmptyString,
|
|
5200
|
+
description: z37.string().optional(),
|
|
5201
|
+
scopes: z37.array(GatewayApiKeyScopeSchema).min(1),
|
|
5202
|
+
rate_limits: z37.array(GatewayRateLimitInputSchema).nullable().optional(),
|
|
5203
|
+
usage_limits: GatewayUsageLimitInputSchema.nullable().optional(),
|
|
5204
|
+
defaults: GatewayDefaultsInputSchema.nullable().optional(),
|
|
5205
|
+
alert_emails: z37.array(z37.string().email()).optional(),
|
|
5206
|
+
expires_at: dateTime.nullable().optional(),
|
|
5207
|
+
rotation_policy: GatewayApiKeyRotationPolicySchema.nullable().optional()
|
|
5208
|
+
};
|
|
5209
|
+
var serviceApiKeyCreateFields = {
|
|
5210
|
+
...apiKeyMutableFields,
|
|
5211
|
+
organisation_id: numericId,
|
|
5212
|
+
workspace_id: uuid,
|
|
5213
|
+
type: nonEmptyString
|
|
5214
|
+
};
|
|
5215
|
+
var GatewayServiceApiKeyCreateRequestSchema = z37.object(serviceApiKeyCreateFields).strict();
|
|
5216
|
+
var GatewayUserApiKeyCreateRequestSchema = z37.object({ ...serviceApiKeyCreateFields, user_id: uuid }).strict();
|
|
5217
|
+
var GatewayApiKeyCreateRequestSchema = z37.union([
|
|
5218
|
+
GatewayUserApiKeyCreateRequestSchema,
|
|
5219
|
+
GatewayServiceApiKeyCreateRequestSchema
|
|
5220
|
+
]);
|
|
5221
|
+
var GatewayApiKeyUpdateRequestSchema = nonEmptyObject(
|
|
5222
|
+
z37.object({
|
|
5223
|
+
name: nonEmptyString.optional(),
|
|
5224
|
+
description: z37.string().optional(),
|
|
5225
|
+
scopes: z37.array(GatewayApiKeyScopeSchema).min(1).optional(),
|
|
5226
|
+
rate_limits: z37.array(GatewayRateLimitInputSchema).nullable().optional(),
|
|
5227
|
+
usage_limits: GatewayUsageLimitInputSchema.nullable().optional(),
|
|
5228
|
+
reset_usage: z37.boolean().optional(),
|
|
5229
|
+
defaults: GatewayDefaultsInputSchema.nullable().optional(),
|
|
5230
|
+
alert_emails: z37.array(z37.string().email()).optional(),
|
|
5231
|
+
expires_at: dateTime.nullable().optional(),
|
|
5232
|
+
rotation_policy: GatewayApiKeyRotationPolicySchema.nullable().optional()
|
|
5233
|
+
}).strict()
|
|
5234
|
+
);
|
|
5235
|
+
var GatewayApiKeyRotateRequestSchema = z37.object({ key_transition_period_ms: z37.number().int().min(18e5).optional() }).strict();
|
|
5236
|
+
var GatewayIntegrationCreateRequestSchema = z37.object({
|
|
5237
|
+
organisation_id: numericId,
|
|
5238
|
+
ai_provider_id: uuid,
|
|
5239
|
+
name: nonEmptyString,
|
|
5240
|
+
slug: nonEmptyString,
|
|
5241
|
+
description: z37.string().optional(),
|
|
5242
|
+
configurations: GatewayJsonObjectSchema.optional(),
|
|
5243
|
+
key: nonEmptyString.optional(),
|
|
5244
|
+
secret_mappings: z37.array(GatewaySecretMappingSchema).optional()
|
|
5245
|
+
}).strict();
|
|
5246
|
+
var GatewayIntegrationUpdateRequestSchema = nonEmptyObject(
|
|
5247
|
+
z37.object({
|
|
5248
|
+
name: nonEmptyString.optional(),
|
|
5249
|
+
description: z37.string().optional(),
|
|
5250
|
+
configurations: GatewayJsonObjectSchema.optional(),
|
|
5251
|
+
key: nonEmptyString.optional(),
|
|
5252
|
+
secret_mappings: z37.array(GatewaySecretMappingSchema).optional()
|
|
5253
|
+
}).strict()
|
|
5254
|
+
);
|
|
5255
|
+
var GatewayIntegrationModelUpdateSchema = z37.object({
|
|
5256
|
+
slug: nonEmptyString,
|
|
5257
|
+
enabled: z37.boolean(),
|
|
5258
|
+
is_custom: z37.boolean().nullable().optional(),
|
|
5259
|
+
is_finetune: z37.boolean().nullable().optional(),
|
|
5260
|
+
base_model_slug: nonEmptyString.nullable().optional(),
|
|
5261
|
+
configurations: GatewayJsonObjectSchema.optional(),
|
|
5262
|
+
pricing_config: GatewayJsonObjectSchema.optional()
|
|
5263
|
+
}).strict();
|
|
5264
|
+
var GatewayIntegrationModelsBulkUpdateRequestSchema = z37.object({
|
|
5265
|
+
models: z37.array(GatewayIntegrationModelUpdateSchema).min(1),
|
|
5266
|
+
allow_all_models: z37.boolean().optional()
|
|
5267
|
+
}).strict();
|
|
5268
|
+
var GatewayIntegrationWorkspacesBulkUpdateRequestSchema = nonEmptyObject(
|
|
5269
|
+
z37.object({
|
|
5270
|
+
workspaces: z37.array(GatewayWorkspaceBindingSchema).optional(),
|
|
5271
|
+
global_workspace_access: GatewayGlobalWorkspaceAccessInputSchema.optional(),
|
|
5272
|
+
override_existing_workspace_access: z37.boolean().optional(),
|
|
5273
|
+
create_default_provider: z37.boolean().optional(),
|
|
5274
|
+
default_provider_slug: nonEmptyString.optional()
|
|
5275
|
+
}).strict()
|
|
5276
|
+
);
|
|
5277
|
+
var McpIntegrationCreateRequestSchema = z37.object({
|
|
5278
|
+
name: nonEmptyString,
|
|
5279
|
+
organisation_id: numericId,
|
|
5280
|
+
slug: nonEmptyString,
|
|
5281
|
+
url: z37.string().url(),
|
|
5282
|
+
auth_type: GatewayMcpAuthTypeSchema,
|
|
5283
|
+
transport: GatewayMcpTransportSchema,
|
|
5284
|
+
description: z37.string().nullable().optional(),
|
|
5285
|
+
configurations: GatewayJsonObjectSchema.optional(),
|
|
5286
|
+
secret_mappings: z37.array(GatewaySecretMappingSchema).optional()
|
|
5287
|
+
}).strict();
|
|
5288
|
+
var McpIntegrationUpdateRequestSchema = nonEmptyObject(
|
|
5289
|
+
z37.object({
|
|
5290
|
+
name: nonEmptyString.optional(),
|
|
5291
|
+
description: z37.string().nullable().optional(),
|
|
5292
|
+
configurations: GatewayJsonObjectSchema.optional(),
|
|
5293
|
+
url: z37.string().url().optional(),
|
|
5294
|
+
auth_type: GatewayMcpAuthTypeSchema.optional(),
|
|
5295
|
+
transport: GatewayMcpTransportSchema.optional(),
|
|
5296
|
+
secret_mappings: z37.array(GatewaySecretMappingSchema).optional()
|
|
5297
|
+
}).strict()
|
|
5298
|
+
);
|
|
5299
|
+
var McpIntegrationCapabilityUpdateSchema = z37.object({
|
|
5300
|
+
name: nonEmptyString,
|
|
5301
|
+
type: GatewayMutableMcpCapabilityTypeSchema,
|
|
5302
|
+
enabled: z37.boolean()
|
|
5303
|
+
}).strict();
|
|
5304
|
+
var McpIntegrationCapabilitiesBulkUpdateRequestSchema = z37.object({ capabilities: z37.array(McpIntegrationCapabilityUpdateSchema).min(1) }).strict();
|
|
5305
|
+
var McpIntegrationWorkspacesBulkUpdateRequestSchema = nonEmptyObject(
|
|
5306
|
+
z37.object({
|
|
5307
|
+
workspaces: z37.array(z37.object({ id: workspaceRef, enabled: z37.boolean() }).strict()).optional(),
|
|
5308
|
+
global_workspace_access: z37.object({ enabled: z37.boolean() }).strict().nullable().optional(),
|
|
5309
|
+
override_existing_workspace_access: z37.boolean().optional()
|
|
5310
|
+
}).strict()
|
|
5311
|
+
);
|
|
5312
|
+
var GatewayDeploymentAuthSettingsInputSchema = z37.object({
|
|
5313
|
+
gateway_base_url: z37.string().url().optional(),
|
|
5314
|
+
mcp_gateway_base_url: z37.string().url().optional(),
|
|
5315
|
+
is_dataservice_hosted: z37.union([z37.literal(0), z37.literal(1)]).optional(),
|
|
5316
|
+
is_playground_proxy_allowed: z37.union([z37.literal(0), z37.literal(1)]).optional(),
|
|
5317
|
+
workspaces_allowed: z37.array(workspaceRef).optional(),
|
|
5318
|
+
jwt_subs_allowed: z37.array(nonEmptyString).optional(),
|
|
5319
|
+
jwt_sub_workspace_mapping: z37.record(workspaceRef).optional(),
|
|
5320
|
+
allow_all_workspaces: z37.boolean().optional(),
|
|
5321
|
+
remove_workspaces_allowed: z37.array(workspaceRef).optional(),
|
|
5322
|
+
remove_subs_allowed: z37.array(nonEmptyString).optional()
|
|
5323
|
+
}).strict();
|
|
5324
|
+
var GatewayDeploymentCreateRequestSchema = z37.object({
|
|
5325
|
+
name: nonEmptyString,
|
|
5326
|
+
type: GatewayDeploymentTypeSchema,
|
|
5327
|
+
organisation_id: numericId,
|
|
5328
|
+
auth_settings: GatewayDeploymentAuthSettingsInputSchema.optional(),
|
|
5329
|
+
deployment_config: GatewayJsonObjectSchema.optional(),
|
|
5330
|
+
is_default: z37.boolean().optional(),
|
|
5331
|
+
slug: nonEmptyString.optional()
|
|
5332
|
+
}).strict();
|
|
5333
|
+
var GatewayDeploymentUpdateRequestSchema = nonEmptyObject(
|
|
5334
|
+
z37.object({
|
|
5335
|
+
name: nonEmptyString.optional(),
|
|
5336
|
+
type: GatewayDeploymentTypeSchema.optional(),
|
|
5337
|
+
status: GatewayDeploymentStatusSchema.optional(),
|
|
5338
|
+
deployment_config: GatewayJsonObjectSchema.nullable().optional(),
|
|
5339
|
+
is_default: z37.boolean().optional(),
|
|
5340
|
+
rotate_auth: z37.boolean().optional(),
|
|
5341
|
+
override_existing: z37.boolean().optional(),
|
|
5342
|
+
auth_settings: GatewayDeploymentAuthSettingsInputSchema.optional()
|
|
5343
|
+
}).strict()
|
|
5344
|
+
);
|
|
5345
|
+
var GatewayPluginCreateRequestSchema = z37.object({
|
|
5346
|
+
organisation_id: numericId,
|
|
5347
|
+
integration_id: uuid,
|
|
5348
|
+
credentials: z37.record(z37.string().min(1)).refine((value2) => Object.keys(value2).length > 0)
|
|
5349
|
+
}).strict();
|
|
5350
|
+
var GatewayOrganisationUpdateRequestSchema = nonEmptyObject(
|
|
5351
|
+
z37.object({ name: nonEmptyString.optional() }).catchall(GatewayJsonValueSchema)
|
|
5352
|
+
);
|
|
5353
|
+
var GatewayOrganisationAuthSettingsUpdateRequestSchema = nonEmptyObject(
|
|
5354
|
+
z37.object({
|
|
5355
|
+
auth_settings: GatewayJsonObjectSchema.optional(),
|
|
5356
|
+
domains: z37.array(nonEmptyString).optional(),
|
|
5357
|
+
scim_token: nonEmptyString.optional()
|
|
5358
|
+
}).catchall(GatewayJsonValueSchema)
|
|
5359
|
+
);
|
|
5360
|
+
|
|
4647
5361
|
// src/http/auth/oauth.ts
|
|
4648
5362
|
var OAuthAuth = class {
|
|
4649
5363
|
constructor(oauthClient) {
|
|
@@ -4666,12 +5380,12 @@ var OAuthAuth = class {
|
|
|
4666
5380
|
};
|
|
4667
5381
|
|
|
4668
5382
|
// src/models/oauth-token.ts
|
|
4669
|
-
import { z as
|
|
4670
|
-
var OAuthTokenResponseSchema =
|
|
4671
|
-
access_token:
|
|
4672
|
-
token_type:
|
|
4673
|
-
expires_in:
|
|
4674
|
-
scope:
|
|
5383
|
+
import { z as z38 } from "zod";
|
|
5384
|
+
var OAuthTokenResponseSchema = z38.object({
|
|
5385
|
+
access_token: z38.string(),
|
|
5386
|
+
token_type: z38.string().optional(),
|
|
5387
|
+
expires_in: z38.number(),
|
|
5388
|
+
scope: z38.string().optional()
|
|
4675
5389
|
}).passthrough();
|
|
4676
5390
|
|
|
4677
5391
|
// src/management/oauth-client.ts
|
|
@@ -4889,26 +5603,26 @@ function resolveOAuthConfig(opts) {
|
|
|
4889
5603
|
}
|
|
4890
5604
|
|
|
4891
5605
|
// src/validators.ts
|
|
4892
|
-
function assertUuid(
|
|
4893
|
-
if (!isValidUuid(
|
|
5606
|
+
function assertUuid(value2, fieldName) {
|
|
5607
|
+
if (!isValidUuid(value2)) {
|
|
4894
5608
|
throw new AISecSDKException(
|
|
4895
|
-
`Invalid ${fieldName}: ${
|
|
5609
|
+
`Invalid ${fieldName}: ${value2}`,
|
|
4896
5610
|
"AISEC_USER_REQUEST_PAYLOAD_ERROR" /* USER_REQUEST_PAYLOAD_ERROR */
|
|
4897
5611
|
);
|
|
4898
5612
|
}
|
|
4899
5613
|
}
|
|
4900
|
-
function assertWorkspaceRef(
|
|
4901
|
-
if (!isValidUuid(
|
|
5614
|
+
function assertWorkspaceRef(value2, fieldName) {
|
|
5615
|
+
if (!isValidUuid(value2) && !/^[A-Za-z0-9][A-Za-z0-9_-]*$/.test(value2)) {
|
|
4902
5616
|
throw new AISecSDKException(
|
|
4903
|
-
`Invalid ${fieldName}: ${
|
|
5617
|
+
`Invalid ${fieldName}: ${value2} (expected a workspace UUID or slug)`,
|
|
4904
5618
|
"AISEC_USER_REQUEST_PAYLOAD_ERROR" /* USER_REQUEST_PAYLOAD_ERROR */
|
|
4905
5619
|
);
|
|
4906
5620
|
}
|
|
4907
5621
|
}
|
|
4908
|
-
function assertNumericId(
|
|
4909
|
-
if (!/^\d+$/.test(
|
|
5622
|
+
function assertNumericId(value2, fieldName) {
|
|
5623
|
+
if (!/^\d+$/.test(value2)) {
|
|
4910
5624
|
throw new AISecSDKException(
|
|
4911
|
-
`Invalid ${fieldName}: ${
|
|
5625
|
+
`Invalid ${fieldName}: ${value2}`,
|
|
4912
5626
|
"AISEC_USER_REQUEST_PAYLOAD_ERROR" /* USER_REQUEST_PAYLOAD_ERROR */
|
|
4913
5627
|
);
|
|
4914
5628
|
}
|
|
@@ -5777,7 +6491,7 @@ var ScanLogsClient = class {
|
|
|
5777
6491
|
};
|
|
5778
6492
|
|
|
5779
6493
|
// src/management/oauth-management.ts
|
|
5780
|
-
import { z as
|
|
6494
|
+
import { z as z39 } from "zod";
|
|
5781
6495
|
var OAuthManagementClient = class {
|
|
5782
6496
|
baseUrl;
|
|
5783
6497
|
auth;
|
|
@@ -5811,7 +6525,7 @@ var OAuthManagementClient = class {
|
|
|
5811
6525
|
path: MGMT_OAUTH_INVALIDATE_PATH,
|
|
5812
6526
|
params: { token },
|
|
5813
6527
|
body,
|
|
5814
|
-
responseSchema:
|
|
6528
|
+
responseSchema: z39.string(),
|
|
5815
6529
|
auth: this.auth,
|
|
5816
6530
|
numRetries: this.numRetries
|
|
5817
6531
|
});
|
|
@@ -6875,12 +7589,12 @@ var ModelSecurityScansClient = class {
|
|
|
6875
7589
|
* // { uuid: '550e8400-...', eval_outcome: 'ALLOWED', model_uri: 'hf://org/model', ... }
|
|
6876
7590
|
* ```
|
|
6877
7591
|
*/
|
|
6878
|
-
async get(
|
|
6879
|
-
assertUuid(
|
|
7592
|
+
async get(uuid2) {
|
|
7593
|
+
assertUuid(uuid2, "scan uuid");
|
|
6880
7594
|
return request({
|
|
6881
7595
|
method: "GET",
|
|
6882
7596
|
baseUrl: this.baseUrl,
|
|
6883
|
-
path: `${MODEL_SEC_SCANS_PATH}/${
|
|
7597
|
+
path: `${MODEL_SEC_SCANS_PATH}/${uuid2}`,
|
|
6884
7598
|
responseSchema: ScanBaseResponseSchema,
|
|
6885
7599
|
auth: this.auth,
|
|
6886
7600
|
numRetries: this.numRetries
|
|
@@ -7117,12 +7831,12 @@ var ModelSecurityScansClient = class {
|
|
|
7117
7831
|
* // { uuid: '660e8400-...', rule_name: 'Pickle Scan', result: 'FAILED', violation_count: 2, ... }
|
|
7118
7832
|
* ```
|
|
7119
7833
|
*/
|
|
7120
|
-
async getEvaluation(
|
|
7121
|
-
assertUuid(
|
|
7834
|
+
async getEvaluation(uuid2) {
|
|
7835
|
+
assertUuid(uuid2, "evaluation uuid");
|
|
7122
7836
|
return request({
|
|
7123
7837
|
method: "GET",
|
|
7124
7838
|
baseUrl: this.baseUrl,
|
|
7125
|
-
path: `${MODEL_SEC_EVALUATIONS_PATH}/${
|
|
7839
|
+
path: `${MODEL_SEC_EVALUATIONS_PATH}/${uuid2}`,
|
|
7126
7840
|
responseSchema: RuleEvaluationResponseSchema,
|
|
7127
7841
|
auth: this.auth,
|
|
7128
7842
|
numRetries: this.numRetries
|
|
@@ -7142,12 +7856,12 @@ var ModelSecurityScansClient = class {
|
|
|
7142
7856
|
* // { uuid: '660e8400-...', rule_name: 'Pickle Scan', description: 'Unsafe pickle opcode', ... }
|
|
7143
7857
|
* ```
|
|
7144
7858
|
*/
|
|
7145
|
-
async getViolation(
|
|
7146
|
-
assertUuid(
|
|
7859
|
+
async getViolation(uuid2) {
|
|
7860
|
+
assertUuid(uuid2, "violation uuid");
|
|
7147
7861
|
return request({
|
|
7148
7862
|
method: "GET",
|
|
7149
7863
|
baseUrl: this.baseUrl,
|
|
7150
|
-
path: `${MODEL_SEC_VIOLATIONS_PATH}/${
|
|
7864
|
+
path: `${MODEL_SEC_VIOLATIONS_PATH}/${uuid2}`,
|
|
7151
7865
|
responseSchema: ViolationResponseSchema,
|
|
7152
7866
|
auth: this.auth,
|
|
7153
7867
|
numRetries: this.numRetries
|
|
@@ -7260,12 +7974,12 @@ var ModelSecurityGroupsClient = class {
|
|
|
7260
7974
|
* // { uuid: '550e8400-...', name: 'hf-strict', source_type: 'HUGGING_FACE', state: 'ACTIVE', ... }
|
|
7261
7975
|
* ```
|
|
7262
7976
|
*/
|
|
7263
|
-
async get(
|
|
7264
|
-
assertUuid(
|
|
7977
|
+
async get(uuid2) {
|
|
7978
|
+
assertUuid(uuid2, "security group uuid");
|
|
7265
7979
|
return request({
|
|
7266
7980
|
method: "GET",
|
|
7267
7981
|
baseUrl: this.baseUrl,
|
|
7268
|
-
path: `${MODEL_SEC_SECURITY_GROUPS_PATH}/${
|
|
7982
|
+
path: `${MODEL_SEC_SECURITY_GROUPS_PATH}/${uuid2}`,
|
|
7269
7983
|
responseSchema: ModelSecurityGroupResponseSchema,
|
|
7270
7984
|
auth: this.auth,
|
|
7271
7985
|
numRetries: this.numRetries
|
|
@@ -7289,12 +8003,12 @@ var ModelSecurityGroupsClient = class {
|
|
|
7289
8003
|
* // { uuid: '550e8400-...', name: 'hf-strict-v2', state: 'ACTIVE', ... }
|
|
7290
8004
|
* ```
|
|
7291
8005
|
*/
|
|
7292
|
-
async update(
|
|
7293
|
-
assertUuid(
|
|
8006
|
+
async update(uuid2, body) {
|
|
8007
|
+
assertUuid(uuid2, "security group uuid");
|
|
7294
8008
|
return request({
|
|
7295
8009
|
method: "PUT",
|
|
7296
8010
|
baseUrl: this.baseUrl,
|
|
7297
|
-
path: `${MODEL_SEC_SECURITY_GROUPS_PATH}/${
|
|
8011
|
+
path: `${MODEL_SEC_SECURITY_GROUPS_PATH}/${uuid2}`,
|
|
7298
8012
|
body,
|
|
7299
8013
|
responseSchema: ModelSecurityGroupResponseSchema,
|
|
7300
8014
|
auth: this.auth,
|
|
@@ -7314,12 +8028,12 @@ var ModelSecurityGroupsClient = class {
|
|
|
7314
8028
|
* // resolves to undefined on success
|
|
7315
8029
|
* ```
|
|
7316
8030
|
*/
|
|
7317
|
-
async delete(
|
|
7318
|
-
assertUuid(
|
|
8031
|
+
async delete(uuid2) {
|
|
8032
|
+
assertUuid(uuid2, "security group uuid");
|
|
7319
8033
|
await request({
|
|
7320
8034
|
method: "DELETE",
|
|
7321
8035
|
baseUrl: this.baseUrl,
|
|
7322
|
-
path: `${MODEL_SEC_SECURITY_GROUPS_PATH}/${
|
|
8036
|
+
path: `${MODEL_SEC_SECURITY_GROUPS_PATH}/${uuid2}`,
|
|
7323
8037
|
auth: this.auth,
|
|
7324
8038
|
numRetries: this.numRetries
|
|
7325
8039
|
});
|
|
@@ -7482,12 +8196,12 @@ var ModelSecurityRulesClient = class {
|
|
|
7482
8196
|
* // { uuid: '550e8400-...', name: 'Pickle Scan', rule_type: 'ARTIFACT', default_state: 'BLOCKING', ... }
|
|
7483
8197
|
* ```
|
|
7484
8198
|
*/
|
|
7485
|
-
async get(
|
|
7486
|
-
assertUuid(
|
|
8199
|
+
async get(uuid2) {
|
|
8200
|
+
assertUuid(uuid2, "security rule uuid");
|
|
7487
8201
|
return request({
|
|
7488
8202
|
method: "GET",
|
|
7489
8203
|
baseUrl: this.baseUrl,
|
|
7490
|
-
path: `${MODEL_SEC_SECURITY_RULES_PATH}/${
|
|
8204
|
+
path: `${MODEL_SEC_SECURITY_RULES_PATH}/${uuid2}`,
|
|
7491
8205
|
responseSchema: ModelSecurityRuleResponseSchema,
|
|
7492
8206
|
auth: this.auth,
|
|
7493
8207
|
numRetries: this.numRetries
|
|
@@ -7568,12 +8282,12 @@ var ModelSecurityModelsClient = class {
|
|
|
7568
8282
|
* // { uuid: '550e8400-...', name: 'org/model', latest_version_uuid: '660e8400-...', latest_version_outcome: 'PASSED' }
|
|
7569
8283
|
* ```
|
|
7570
8284
|
*/
|
|
7571
|
-
async getModel(
|
|
7572
|
-
assertUuid(
|
|
8285
|
+
async getModel(uuid2) {
|
|
8286
|
+
assertUuid(uuid2, "model uuid");
|
|
7573
8287
|
return request({
|
|
7574
8288
|
method: "GET",
|
|
7575
8289
|
baseUrl: this.baseUrl,
|
|
7576
|
-
path: `${MODEL_SEC_MODELS_PATH}/${
|
|
8290
|
+
path: `${MODEL_SEC_MODELS_PATH}/${uuid2}`,
|
|
7577
8291
|
responseSchema: ModelResponseSchema,
|
|
7578
8292
|
auth: this.auth,
|
|
7579
8293
|
numRetries: this.numRetries
|
|
@@ -7631,12 +8345,12 @@ var ModelSecurityModelsClient = class {
|
|
|
7631
8345
|
* // { uuid: '660e8400-...', revision: 'main', model_uuid: '550e8400-...', last_eval_outcome: 'PASSED' }
|
|
7632
8346
|
* ```
|
|
7633
8347
|
*/
|
|
7634
|
-
async getModelVersion(
|
|
7635
|
-
assertUuid(
|
|
8348
|
+
async getModelVersion(uuid2) {
|
|
8349
|
+
assertUuid(uuid2, "model version uuid");
|
|
7636
8350
|
return request({
|
|
7637
8351
|
method: "GET",
|
|
7638
8352
|
baseUrl: this.baseUrl,
|
|
7639
|
-
path: `${MODEL_SEC_MODEL_VERSIONS_PATH}/${
|
|
8353
|
+
path: `${MODEL_SEC_MODEL_VERSIONS_PATH}/${uuid2}`,
|
|
7640
8354
|
responseSchema: ModelVersionResponseSchema,
|
|
7641
8355
|
auth: this.auth,
|
|
7642
8356
|
numRetries: this.numRetries
|
|
@@ -7749,7 +8463,7 @@ var ModelSecurityClient = class {
|
|
|
7749
8463
|
};
|
|
7750
8464
|
|
|
7751
8465
|
// src/red-team/scans-client.ts
|
|
7752
|
-
import { z as
|
|
8466
|
+
import { z as z40 } from "zod";
|
|
7753
8467
|
var RedTeamScansClient = class {
|
|
7754
8468
|
baseUrl;
|
|
7755
8469
|
auth;
|
|
@@ -7893,7 +8607,7 @@ var RedTeamScansClient = class {
|
|
|
7893
8607
|
method: "GET",
|
|
7894
8608
|
baseUrl: this.baseUrl,
|
|
7895
8609
|
path: RED_TEAM_CATEGORIES_PATH,
|
|
7896
|
-
responseSchema:
|
|
8610
|
+
responseSchema: z40.array(CategoryModelSchema),
|
|
7897
8611
|
auth: this.auth,
|
|
7898
8612
|
numRetries: this.numRetries
|
|
7899
8613
|
});
|
|
@@ -7901,7 +8615,7 @@ var RedTeamScansClient = class {
|
|
|
7901
8615
|
};
|
|
7902
8616
|
|
|
7903
8617
|
// src/red-team/reports-client.ts
|
|
7904
|
-
import { z as
|
|
8618
|
+
import { z as z41 } from "zod";
|
|
7905
8619
|
var RedTeamReportsClient = class {
|
|
7906
8620
|
baseUrl;
|
|
7907
8621
|
auth;
|
|
@@ -8276,7 +8990,7 @@ var RedTeamReportsClient = class {
|
|
|
8276
8990
|
baseUrl: this.baseUrl,
|
|
8277
8991
|
path: `${RED_TEAM_REPORT_PATH}/${jobId}/download`,
|
|
8278
8992
|
params: { file_format: format },
|
|
8279
|
-
responseSchema:
|
|
8993
|
+
responseSchema: z41.unknown(),
|
|
8280
8994
|
auth: this.auth,
|
|
8281
8995
|
numRetries: this.numRetries
|
|
8282
8996
|
});
|
|
@@ -8300,7 +9014,7 @@ var RedTeamReportsClient = class {
|
|
|
8300
9014
|
method: "POST",
|
|
8301
9015
|
baseUrl: this.baseUrl,
|
|
8302
9016
|
path: `${RED_TEAM_REPORT_PATH}/${jobId}/generate-partial-report`,
|
|
8303
|
-
responseSchema:
|
|
9017
|
+
responseSchema: z41.unknown(),
|
|
8304
9018
|
auth: this.auth,
|
|
8305
9019
|
numRetries: this.numRetries
|
|
8306
9020
|
});
|
|
@@ -8308,7 +9022,7 @@ var RedTeamReportsClient = class {
|
|
|
8308
9022
|
};
|
|
8309
9023
|
|
|
8310
9024
|
// src/red-team/custom-attack-reports-client.ts
|
|
8311
|
-
import { z as
|
|
9025
|
+
import { z as z42 } from "zod";
|
|
8312
9026
|
var RedTeamCustomAttackReportsClient = class {
|
|
8313
9027
|
baseUrl;
|
|
8314
9028
|
auth;
|
|
@@ -8398,7 +9112,7 @@ var RedTeamCustomAttackReportsClient = class {
|
|
|
8398
9112
|
baseUrl: this.baseUrl,
|
|
8399
9113
|
path: `${RED_TEAM_CUSTOM_ATTACKS_REPORT_PATH}/report/${jobId}/prompt-set/${promptSetId}/prompts`,
|
|
8400
9114
|
params,
|
|
8401
|
-
responseSchema:
|
|
9115
|
+
responseSchema: z42.array(PromptDetailResponseSchema),
|
|
8402
9116
|
auth: this.auth,
|
|
8403
9117
|
numRetries: this.numRetries
|
|
8404
9118
|
});
|
|
@@ -8492,7 +9206,7 @@ var RedTeamCustomAttackReportsClient = class {
|
|
|
8492
9206
|
method: "GET",
|
|
8493
9207
|
baseUrl: this.baseUrl,
|
|
8494
9208
|
path: `${RED_TEAM_CUSTOM_ATTACKS_REPORT_PATH}/job/${jobId}/attack/${attackId}/list-outputs`,
|
|
8495
|
-
responseSchema:
|
|
9209
|
+
responseSchema: z42.array(CustomAttackOutputSchema),
|
|
8496
9210
|
auth: this.auth,
|
|
8497
9211
|
numRetries: this.numRetries
|
|
8498
9212
|
});
|
|
@@ -8517,7 +9231,7 @@ var RedTeamCustomAttackReportsClient = class {
|
|
|
8517
9231
|
method: "GET",
|
|
8518
9232
|
baseUrl: this.baseUrl,
|
|
8519
9233
|
path: `${RED_TEAM_CUSTOM_ATTACKS_REPORT_PATH}/job/${jobId}/property-stats`,
|
|
8520
|
-
responseSchema:
|
|
9234
|
+
responseSchema: z42.array(PropertyStatisticSchema),
|
|
8521
9235
|
auth: this.auth,
|
|
8522
9236
|
numRetries: this.numRetries
|
|
8523
9237
|
});
|
|
@@ -8525,7 +9239,7 @@ var RedTeamCustomAttackReportsClient = class {
|
|
|
8525
9239
|
};
|
|
8526
9240
|
|
|
8527
9241
|
// src/red-team/targets-client.ts
|
|
8528
|
-
import { z as
|
|
9242
|
+
import { z as z43 } from "zod";
|
|
8529
9243
|
var RedTeamTargetsClient = class {
|
|
8530
9244
|
baseUrl;
|
|
8531
9245
|
auth;
|
|
@@ -8639,12 +9353,12 @@ var RedTeamTargetsClient = class {
|
|
|
8639
9353
|
* // { uuid: '550e8400-...', name: 'prod-chatbot', status: 'READY', active: true, validated: true }
|
|
8640
9354
|
* ```
|
|
8641
9355
|
*/
|
|
8642
|
-
async get(
|
|
8643
|
-
assertUuid(
|
|
9356
|
+
async get(uuid2) {
|
|
9357
|
+
assertUuid(uuid2, "target uuid");
|
|
8644
9358
|
return request({
|
|
8645
9359
|
method: "GET",
|
|
8646
9360
|
baseUrl: this.baseUrl,
|
|
8647
|
-
path: `${RED_TEAM_TARGET_PATH}/${
|
|
9361
|
+
path: `${RED_TEAM_TARGET_PATH}/${uuid2}`,
|
|
8648
9362
|
responseSchema: TargetResponseSchema,
|
|
8649
9363
|
auth: this.auth,
|
|
8650
9364
|
numRetries: this.numRetries
|
|
@@ -8670,14 +9384,14 @@ var RedTeamTargetsClient = class {
|
|
|
8670
9384
|
* // { uuid: '550e8400-...', name: 'prod-chatbot-v2', status: 'READY', updated_at: '2026-03-08T10:00:00Z' }
|
|
8671
9385
|
* ```
|
|
8672
9386
|
*/
|
|
8673
|
-
async update(
|
|
8674
|
-
assertUuid(
|
|
9387
|
+
async update(uuid2, body, opts) {
|
|
9388
|
+
assertUuid(uuid2, "target uuid");
|
|
8675
9389
|
const params = {};
|
|
8676
9390
|
if (opts?.validate !== void 0) params.validate = String(opts.validate);
|
|
8677
9391
|
return request({
|
|
8678
9392
|
method: "PUT",
|
|
8679
9393
|
baseUrl: this.baseUrl,
|
|
8680
|
-
path: `${RED_TEAM_TARGET_PATH}/${
|
|
9394
|
+
path: `${RED_TEAM_TARGET_PATH}/${uuid2}`,
|
|
8681
9395
|
body,
|
|
8682
9396
|
params: Object.keys(params).length > 0 ? params : void 0,
|
|
8683
9397
|
responseSchema: TargetResponseSchema,
|
|
@@ -8699,12 +9413,12 @@ var RedTeamTargetsClient = class {
|
|
|
8699
9413
|
* // { message: 'ok', status: 200 }
|
|
8700
9414
|
* ```
|
|
8701
9415
|
*/
|
|
8702
|
-
async delete(
|
|
8703
|
-
assertUuid(
|
|
9416
|
+
async delete(uuid2) {
|
|
9417
|
+
assertUuid(uuid2, "target uuid");
|
|
8704
9418
|
return request({
|
|
8705
9419
|
method: "DELETE",
|
|
8706
9420
|
baseUrl: this.baseUrl,
|
|
8707
|
-
path: `${RED_TEAM_TARGET_PATH}/${
|
|
9421
|
+
path: `${RED_TEAM_TARGET_PATH}/${uuid2}`,
|
|
8708
9422
|
responseSchema: BaseResponseSchema.optional(),
|
|
8709
9423
|
allowEmptyBody: true,
|
|
8710
9424
|
auth: this.auth,
|
|
@@ -8754,12 +9468,12 @@ var RedTeamTargetsClient = class {
|
|
|
8754
9468
|
* // { target_id: '550e8400-...', target_version: 1, status: 'READY' }
|
|
8755
9469
|
* ```
|
|
8756
9470
|
*/
|
|
8757
|
-
async getProfile(
|
|
8758
|
-
assertUuid(
|
|
9471
|
+
async getProfile(uuid2) {
|
|
9472
|
+
assertUuid(uuid2, "target uuid");
|
|
8759
9473
|
return request({
|
|
8760
9474
|
method: "GET",
|
|
8761
9475
|
baseUrl: this.baseUrl,
|
|
8762
|
-
path: `${RED_TEAM_TARGET_PATH}/${
|
|
9476
|
+
path: `${RED_TEAM_TARGET_PATH}/${uuid2}/profile`,
|
|
8763
9477
|
responseSchema: TargetProfileResponseSchema,
|
|
8764
9478
|
auth: this.auth,
|
|
8765
9479
|
numRetries: this.numRetries
|
|
@@ -8783,12 +9497,12 @@ var RedTeamTargetsClient = class {
|
|
|
8783
9497
|
* // { uuid: '550e8400-...', name: 'prod-chatbot', status: 'READY' }
|
|
8784
9498
|
* ```
|
|
8785
9499
|
*/
|
|
8786
|
-
async updateProfile(
|
|
8787
|
-
assertUuid(
|
|
9500
|
+
async updateProfile(uuid2, body) {
|
|
9501
|
+
assertUuid(uuid2, "target uuid");
|
|
8788
9502
|
return request({
|
|
8789
9503
|
method: "PUT",
|
|
8790
9504
|
baseUrl: this.baseUrl,
|
|
8791
|
-
path: `${RED_TEAM_TARGET_PATH}/${
|
|
9505
|
+
path: `${RED_TEAM_TARGET_PATH}/${uuid2}/profile`,
|
|
8792
9506
|
body,
|
|
8793
9507
|
responseSchema: TargetResponseSchema,
|
|
8794
9508
|
auth: this.auth,
|
|
@@ -8841,7 +9555,7 @@ var RedTeamTargetsClient = class {
|
|
|
8841
9555
|
method: "GET",
|
|
8842
9556
|
baseUrl: this.baseUrl,
|
|
8843
9557
|
path: `${RED_TEAM_TEMPLATE_PATH}/target-metadata`,
|
|
8844
|
-
responseSchema:
|
|
9558
|
+
responseSchema: z43.record(z43.unknown()),
|
|
8845
9559
|
auth: this.auth,
|
|
8846
9560
|
numRetries: this.numRetries
|
|
8847
9561
|
});
|
|
@@ -8962,12 +9676,12 @@ var RedTeamCustomAttacksClient = class {
|
|
|
8962
9676
|
* // { uuid: '550e8400-...', name: 'jailbreaks', status: 'READY', active: true, archive: false }
|
|
8963
9677
|
* ```
|
|
8964
9678
|
*/
|
|
8965
|
-
async getPromptSet(
|
|
8966
|
-
assertUuid(
|
|
9679
|
+
async getPromptSet(uuid2) {
|
|
9680
|
+
assertUuid(uuid2, "prompt set uuid");
|
|
8967
9681
|
return request({
|
|
8968
9682
|
method: "GET",
|
|
8969
9683
|
baseUrl: this.baseUrl,
|
|
8970
|
-
path: `${RED_TEAM_CUSTOM_ATTACK_PATH}/custom-prompt-set/${
|
|
9684
|
+
path: `${RED_TEAM_CUSTOM_ATTACK_PATH}/custom-prompt-set/${uuid2}`,
|
|
8971
9685
|
responseSchema: CustomPromptSetResponseSchema,
|
|
8972
9686
|
auth: this.auth,
|
|
8973
9687
|
numRetries: this.numRetries
|
|
@@ -8990,12 +9704,12 @@ var RedTeamCustomAttacksClient = class {
|
|
|
8990
9704
|
* // { uuid: '550e8400-...', name: 'jailbreaks-v2', status: 'READY', active: true }
|
|
8991
9705
|
* ```
|
|
8992
9706
|
*/
|
|
8993
|
-
async updatePromptSet(
|
|
8994
|
-
assertUuid(
|
|
9707
|
+
async updatePromptSet(uuid2, body) {
|
|
9708
|
+
assertUuid(uuid2, "prompt set uuid");
|
|
8995
9709
|
return request({
|
|
8996
9710
|
method: "PUT",
|
|
8997
9711
|
baseUrl: this.baseUrl,
|
|
8998
|
-
path: `${RED_TEAM_CUSTOM_ATTACK_PATH}/custom-prompt-set/${
|
|
9712
|
+
path: `${RED_TEAM_CUSTOM_ATTACK_PATH}/custom-prompt-set/${uuid2}`,
|
|
8999
9713
|
body,
|
|
9000
9714
|
responseSchema: CustomPromptSetResponseSchema,
|
|
9001
9715
|
auth: this.auth,
|
|
@@ -9019,12 +9733,12 @@ var RedTeamCustomAttacksClient = class {
|
|
|
9019
9733
|
* // { uuid: '550e8400-...', name: 'jailbreaks', status: 'READY', archive: true }
|
|
9020
9734
|
* ```
|
|
9021
9735
|
*/
|
|
9022
|
-
async archivePromptSet(
|
|
9023
|
-
assertUuid(
|
|
9736
|
+
async archivePromptSet(uuid2, body) {
|
|
9737
|
+
assertUuid(uuid2, "prompt set uuid");
|
|
9024
9738
|
return request({
|
|
9025
9739
|
method: "PUT",
|
|
9026
9740
|
baseUrl: this.baseUrl,
|
|
9027
|
-
path: `${RED_TEAM_CUSTOM_ATTACK_PATH}/custom-prompt-set/${
|
|
9741
|
+
path: `${RED_TEAM_CUSTOM_ATTACK_PATH}/custom-prompt-set/${uuid2}/archive`,
|
|
9028
9742
|
body,
|
|
9029
9743
|
responseSchema: CustomPromptSetResponseSchema,
|
|
9030
9744
|
auth: this.auth,
|
|
@@ -9045,12 +9759,12 @@ var RedTeamCustomAttacksClient = class {
|
|
|
9045
9759
|
* // { uuid: '550e8400-...', name: 'jailbreaks', status: 'READY', active: true, tsg_id: 'tsg-1' }
|
|
9046
9760
|
* ```
|
|
9047
9761
|
*/
|
|
9048
|
-
async getPromptSetReference(
|
|
9049
|
-
assertUuid(
|
|
9762
|
+
async getPromptSetReference(uuid2) {
|
|
9763
|
+
assertUuid(uuid2, "prompt set uuid");
|
|
9050
9764
|
return request({
|
|
9051
9765
|
method: "GET",
|
|
9052
9766
|
baseUrl: this.baseUrl,
|
|
9053
|
-
path: `${RED_TEAM_CUSTOM_ATTACK_PATH}/custom-prompt-set/${
|
|
9767
|
+
path: `${RED_TEAM_CUSTOM_ATTACK_PATH}/custom-prompt-set/${uuid2}/reference`,
|
|
9054
9768
|
responseSchema: CustomPromptSetReferenceSchema,
|
|
9055
9769
|
auth: this.auth,
|
|
9056
9770
|
numRetries: this.numRetries
|
|
@@ -9071,14 +9785,14 @@ var RedTeamCustomAttacksClient = class {
|
|
|
9071
9785
|
* // { uuid: '550e8400-...', status: 'READY', is_latest: true, version: 'gen-12345' }
|
|
9072
9786
|
* ```
|
|
9073
9787
|
*/
|
|
9074
|
-
async getPromptSetVersionInfo(
|
|
9075
|
-
assertUuid(
|
|
9788
|
+
async getPromptSetVersionInfo(uuid2, opts) {
|
|
9789
|
+
assertUuid(uuid2, "prompt set uuid");
|
|
9076
9790
|
const params = {};
|
|
9077
9791
|
if (opts?.version !== void 0) params.version = opts.version;
|
|
9078
9792
|
return request({
|
|
9079
9793
|
method: "GET",
|
|
9080
9794
|
baseUrl: this.baseUrl,
|
|
9081
|
-
path: `${RED_TEAM_CUSTOM_ATTACK_PATH}/custom-prompt-set/${
|
|
9795
|
+
path: `${RED_TEAM_CUSTOM_ATTACK_PATH}/custom-prompt-set/${uuid2}/version-info`,
|
|
9082
9796
|
params: Object.keys(params).length > 0 ? params : void 0,
|
|
9083
9797
|
responseSchema: CustomPromptSetVersionInfoSchema,
|
|
9084
9798
|
auth: this.auth,
|
|
@@ -9126,10 +9840,10 @@ var RedTeamCustomAttacksClient = class {
|
|
|
9126
9840
|
* // 'prompt,goal,category,severity\n'
|
|
9127
9841
|
* ```
|
|
9128
9842
|
*/
|
|
9129
|
-
async downloadTemplate(
|
|
9130
|
-
assertUuid(
|
|
9843
|
+
async downloadTemplate(uuid2) {
|
|
9844
|
+
assertUuid(uuid2, "prompt set uuid");
|
|
9131
9845
|
const url = new URL(
|
|
9132
|
-
`${this.baseUrl.replace(/\/+$/, "")}${RED_TEAM_CUSTOM_ATTACK_PATH}/download-template/${
|
|
9846
|
+
`${this.baseUrl.replace(/\/+$/, "")}${RED_TEAM_CUSTOM_ATTACK_PATH}/download-template/${uuid2}`
|
|
9133
9847
|
);
|
|
9134
9848
|
const stub = {
|
|
9135
9849
|
method: "GET",
|
|
@@ -10030,12 +10744,12 @@ var RedTeamAdaptersClient = class {
|
|
|
10030
10744
|
* // adapter.status => 'ACTIVE'
|
|
10031
10745
|
* ```
|
|
10032
10746
|
*/
|
|
10033
|
-
async get(
|
|
10034
|
-
assertUuid(
|
|
10747
|
+
async get(uuid2) {
|
|
10748
|
+
assertUuid(uuid2, "adapter uuid");
|
|
10035
10749
|
return request({
|
|
10036
10750
|
method: "GET",
|
|
10037
10751
|
baseUrl: this.baseUrl,
|
|
10038
|
-
path: `${RED_TEAM_ADAPTER_PATH}/${
|
|
10752
|
+
path: `${RED_TEAM_ADAPTER_PATH}/${uuid2}`,
|
|
10039
10753
|
responseSchema: AdapterResponseSchema,
|
|
10040
10754
|
auth: this.auth,
|
|
10041
10755
|
numRetries: this.numRetries
|
|
@@ -10063,13 +10777,13 @@ var RedTeamAdaptersClient = class {
|
|
|
10063
10777
|
* });
|
|
10064
10778
|
* ```
|
|
10065
10779
|
*/
|
|
10066
|
-
async update(
|
|
10067
|
-
assertUuid(
|
|
10780
|
+
async update(uuid2, body, opts) {
|
|
10781
|
+
assertUuid(uuid2, "adapter uuid");
|
|
10068
10782
|
const validate = opts?.validate ?? true;
|
|
10069
10783
|
return request({
|
|
10070
10784
|
method: "PUT",
|
|
10071
10785
|
baseUrl: this.baseUrl,
|
|
10072
|
-
path: `${RED_TEAM_ADAPTER_PATH}/${
|
|
10786
|
+
path: `${RED_TEAM_ADAPTER_PATH}/${uuid2}`,
|
|
10073
10787
|
params: { validate: String(validate) },
|
|
10074
10788
|
body,
|
|
10075
10789
|
responseSchema: AdapterResponseSchema,
|
|
@@ -10085,12 +10799,12 @@ var RedTeamAdaptersClient = class {
|
|
|
10085
10799
|
* await rt.adapters.delete('550e8400-e29b-41d4-a716-446655440000');
|
|
10086
10800
|
* ```
|
|
10087
10801
|
*/
|
|
10088
|
-
async delete(
|
|
10089
|
-
assertUuid(
|
|
10802
|
+
async delete(uuid2) {
|
|
10803
|
+
assertUuid(uuid2, "adapter uuid");
|
|
10090
10804
|
return request({
|
|
10091
10805
|
method: "DELETE",
|
|
10092
10806
|
baseUrl: this.baseUrl,
|
|
10093
|
-
path: `${RED_TEAM_ADAPTER_PATH}/${
|
|
10807
|
+
path: `${RED_TEAM_ADAPTER_PATH}/${uuid2}`,
|
|
10094
10808
|
responseSchema: BaseResponseSchema.optional(),
|
|
10095
10809
|
allowEmptyBody: true,
|
|
10096
10810
|
auth: this.auth,
|
|
@@ -10959,12 +11673,12 @@ var AIGatewayWorkspacesClient = class {
|
|
|
10959
11673
|
* const other = await gw.workspaces.get('ws-produc-985697', { plane: 'admin' });
|
|
10960
11674
|
* ```
|
|
10961
11675
|
*/
|
|
10962
|
-
async get(
|
|
10963
|
-
assertWorkspaceRef(
|
|
11676
|
+
async get(workspaceRef2, options = {}) {
|
|
11677
|
+
assertWorkspaceRef(workspaceRef2, "workspaceRef");
|
|
10964
11678
|
return request({
|
|
10965
11679
|
method: "GET",
|
|
10966
11680
|
baseUrl: this.urlFor(options.plane),
|
|
10967
|
-
path: `${AI_GW_WORKSPACES_PATH}/${
|
|
11681
|
+
path: `${AI_GW_WORKSPACES_PATH}/${workspaceRef2}`,
|
|
10968
11682
|
responseSchema: GatewayWorkspaceDetailSchema,
|
|
10969
11683
|
auth: this.auth,
|
|
10970
11684
|
numRetries: this.numRetries
|
|
@@ -10993,17 +11707,12 @@ var AIGatewayWorkspacesClient = class {
|
|
|
10993
11707
|
* ```
|
|
10994
11708
|
*/
|
|
10995
11709
|
async create(body) {
|
|
10996
|
-
if (!body.name) {
|
|
10997
|
-
throw new AISecSDKException("Missing name", "AISEC_USER_REQUEST_PAYLOAD_ERROR" /* USER_REQUEST_PAYLOAD_ERROR */);
|
|
10998
|
-
}
|
|
10999
|
-
if (!body.scope_name) {
|
|
11000
|
-
throw new AISecSDKException("Missing scope_name", "AISEC_USER_REQUEST_PAYLOAD_ERROR" /* USER_REQUEST_PAYLOAD_ERROR */);
|
|
11001
|
-
}
|
|
11002
11710
|
return request({
|
|
11003
11711
|
method: "POST",
|
|
11004
11712
|
baseUrl: this.adminBaseUrl,
|
|
11005
11713
|
path: AI_GW_WORKSPACES_PATH,
|
|
11006
11714
|
body,
|
|
11715
|
+
requestSchema: GatewayWorkspaceCreateRequestSchema,
|
|
11007
11716
|
responseSchema: GatewayWorkspaceCreateResponseSchema,
|
|
11008
11717
|
auth: this.auth,
|
|
11009
11718
|
numRetries: this.numRetries
|
|
@@ -11028,19 +11737,14 @@ var AIGatewayWorkspacesClient = class {
|
|
|
11028
11737
|
* });
|
|
11029
11738
|
* ```
|
|
11030
11739
|
*/
|
|
11031
|
-
async update(
|
|
11032
|
-
assertWorkspaceRef(
|
|
11033
|
-
if (Object.keys(body).length === 0) {
|
|
11034
|
-
throw new AISecSDKException(
|
|
11035
|
-
"Empty update: provide at least one of name, description, icon, defaults, usage_limits, rate_limits",
|
|
11036
|
-
"AISEC_USER_REQUEST_PAYLOAD_ERROR" /* USER_REQUEST_PAYLOAD_ERROR */
|
|
11037
|
-
);
|
|
11038
|
-
}
|
|
11740
|
+
async update(workspaceRef2, body) {
|
|
11741
|
+
assertWorkspaceRef(workspaceRef2, "workspaceRef");
|
|
11039
11742
|
return request({
|
|
11040
11743
|
method: "PUT",
|
|
11041
11744
|
baseUrl: this.adminBaseUrl,
|
|
11042
|
-
path: `${AI_GW_WORKSPACES_PATH}/${
|
|
11745
|
+
path: `${AI_GW_WORKSPACES_PATH}/${workspaceRef2}`,
|
|
11043
11746
|
body,
|
|
11747
|
+
requestSchema: GatewayWorkspaceUpdateRequestSchema,
|
|
11044
11748
|
responseSchema: GatewayWriteResponseSchema,
|
|
11045
11749
|
auth: this.auth,
|
|
11046
11750
|
numRetries: this.numRetries
|
|
@@ -11071,12 +11775,12 @@ var AIGatewayWorkspacesClient = class {
|
|
|
11071
11775
|
* const gone = await gw.workspaces.list({ plane: 'admin', status: 'archived' });
|
|
11072
11776
|
* ```
|
|
11073
11777
|
*/
|
|
11074
|
-
async delete(
|
|
11075
|
-
assertWorkspaceRef(
|
|
11778
|
+
async delete(workspaceRef2) {
|
|
11779
|
+
assertWorkspaceRef(workspaceRef2, "workspaceRef");
|
|
11076
11780
|
return request({
|
|
11077
11781
|
method: "DELETE",
|
|
11078
11782
|
baseUrl: this.adminBaseUrl,
|
|
11079
|
-
path: `${AI_GW_WORKSPACES_PATH}/${
|
|
11783
|
+
path: `${AI_GW_WORKSPACES_PATH}/${workspaceRef2}`,
|
|
11080
11784
|
auth: this.auth,
|
|
11081
11785
|
numRetries: this.numRetries
|
|
11082
11786
|
});
|
|
@@ -11149,6 +11853,29 @@ var AIGatewayConfigsClient = class {
|
|
|
11149
11853
|
numRetries: this.numRetries
|
|
11150
11854
|
});
|
|
11151
11855
|
}
|
|
11856
|
+
/**
|
|
11857
|
+
* List the immutable version history for one config. Verified live 2026-08-29.
|
|
11858
|
+
* @param configId - Config UUID.
|
|
11859
|
+
* @returns Config versions, including version ownership and creation timestamps.
|
|
11860
|
+
* @example
|
|
11861
|
+
* ```ts
|
|
11862
|
+
* import { AIGatewayClient } from '@cdot65/prisma-airs-sdk';
|
|
11863
|
+
* const gw = new AIGatewayClient();
|
|
11864
|
+
* const versions = await gw.configs.listVersions('764cf9cd-4ebf-449e-b669-08149b0fbbbc');
|
|
11865
|
+
* console.log(versions.data[0].version_id);
|
|
11866
|
+
* ```
|
|
11867
|
+
*/
|
|
11868
|
+
async listVersions(configId) {
|
|
11869
|
+
assertUuid(configId, "configId");
|
|
11870
|
+
return request({
|
|
11871
|
+
method: "GET",
|
|
11872
|
+
baseUrl: this.baseUrl,
|
|
11873
|
+
path: `${AI_GW_CONFIGS_PATH}/${configId}/versions`,
|
|
11874
|
+
responseSchema: ListConfigVersionsResponseSchema,
|
|
11875
|
+
auth: this.auth,
|
|
11876
|
+
numRetries: this.numRetries
|
|
11877
|
+
});
|
|
11878
|
+
}
|
|
11152
11879
|
/**
|
|
11153
11880
|
* Create a config.
|
|
11154
11881
|
*
|
|
@@ -11179,6 +11906,7 @@ var AIGatewayConfigsClient = class {
|
|
|
11179
11906
|
baseUrl: this.baseUrl,
|
|
11180
11907
|
path: AI_GW_CONFIGS_PATH,
|
|
11181
11908
|
body,
|
|
11909
|
+
requestSchema: GatewayConfigCreateRequestSchema,
|
|
11182
11910
|
responseSchema: GatewayConfigCreateResponseSchema,
|
|
11183
11911
|
auth: this.auth,
|
|
11184
11912
|
numRetries: this.numRetries
|
|
@@ -11187,7 +11915,7 @@ var AIGatewayConfigsClient = class {
|
|
|
11187
11915
|
/**
|
|
11188
11916
|
* Update a config.
|
|
11189
11917
|
* @param configId - Config UUID.
|
|
11190
|
-
* @param body -
|
|
11918
|
+
* @param body - One or more fields to update. A supplied `config` replaces the routing document.
|
|
11191
11919
|
* @returns The raw update response. Shape unverified against a live tenant — see the PRD.
|
|
11192
11920
|
* @example
|
|
11193
11921
|
* ```ts
|
|
@@ -11203,12 +11931,12 @@ var AIGatewayConfigsClient = class {
|
|
|
11203
11931
|
*/
|
|
11204
11932
|
async update(configId, body) {
|
|
11205
11933
|
assertUuid(configId, "configId");
|
|
11206
|
-
assertUuid(body.workspace_id, "workspace_id");
|
|
11207
11934
|
return request({
|
|
11208
11935
|
method: "PUT",
|
|
11209
11936
|
baseUrl: this.baseUrl,
|
|
11210
11937
|
path: `${AI_GW_CONFIGS_PATH}/${configId}`,
|
|
11211
11938
|
body,
|
|
11939
|
+
requestSchema: GatewayConfigUpdateRequestSchema,
|
|
11212
11940
|
responseSchema: GatewayWriteResponseSchema,
|
|
11213
11941
|
auth: this.auth,
|
|
11214
11942
|
numRetries: this.numRetries
|
|
@@ -11336,11 +12064,39 @@ var AIGatewayGuardrailsClient = class {
|
|
|
11336
12064
|
baseUrl: this.baseUrl,
|
|
11337
12065
|
path: AI_GW_GUARDRAILS_PATH,
|
|
11338
12066
|
body,
|
|
12067
|
+
requestSchema: GatewayGuardrailCreateRequestSchema,
|
|
11339
12068
|
responseSchema: GatewayGuardrailCreateResponseSchema,
|
|
11340
12069
|
auth: this.auth,
|
|
11341
12070
|
numRetries: this.numRetries
|
|
11342
12071
|
});
|
|
11343
12072
|
}
|
|
12073
|
+
/**
|
|
12074
|
+
* Update a guardrail. Verified live 2026-08-29.
|
|
12075
|
+
* @param guardrailId - Guardrail UUID.
|
|
12076
|
+
* @param body - Fields to update.
|
|
12077
|
+
* @returns The gateway write response.
|
|
12078
|
+
* @example
|
|
12079
|
+
* ```ts
|
|
12080
|
+
* import { AIGatewayClient } from '@cdot65/prisma-airs-sdk';
|
|
12081
|
+
* const gw = new AIGatewayClient();
|
|
12082
|
+
* await gw.guardrails.update('9f6c2a8e-2b3d-4e5f-8a9b-0c1d2e3f4a5b', {
|
|
12083
|
+
* name: 'Updated guardrail',
|
|
12084
|
+
* });
|
|
12085
|
+
* ```
|
|
12086
|
+
*/
|
|
12087
|
+
async update(guardrailId, body) {
|
|
12088
|
+
assertUuid(guardrailId, "guardrailId");
|
|
12089
|
+
return request({
|
|
12090
|
+
method: "PUT",
|
|
12091
|
+
baseUrl: this.baseUrl,
|
|
12092
|
+
path: `${AI_GW_GUARDRAILS_PATH}/${guardrailId}`,
|
|
12093
|
+
body,
|
|
12094
|
+
requestSchema: GatewayGuardrailUpdateRequestSchema,
|
|
12095
|
+
responseSchema: GatewayWriteResponseSchema,
|
|
12096
|
+
auth: this.auth,
|
|
12097
|
+
numRetries: this.numRetries
|
|
12098
|
+
});
|
|
12099
|
+
}
|
|
11344
12100
|
/**
|
|
11345
12101
|
* Delete a guardrail.
|
|
11346
12102
|
*
|
|
@@ -11407,6 +12163,34 @@ var AIGatewayProvidersClient = class {
|
|
|
11407
12163
|
numRetries: this.numRetries
|
|
11408
12164
|
});
|
|
11409
12165
|
}
|
|
12166
|
+
/**
|
|
12167
|
+
* Fetch one provider binding. Verified live 2026-08-29.
|
|
12168
|
+
*
|
|
12169
|
+
* @remarks The response can contain provider credential material. Do not log or persist it,
|
|
12170
|
+
* and avoid logging the complete returned object. SDK debug logs redact the known credential
|
|
12171
|
+
* fields for this operation.
|
|
12172
|
+
* @param providerId - Provider UUID.
|
|
12173
|
+
* @returns Provider configuration and lifecycle detail.
|
|
12174
|
+
* @example
|
|
12175
|
+
* ```ts
|
|
12176
|
+
* import { AIGatewayClient } from '@cdot65/prisma-airs-sdk';
|
|
12177
|
+
* const gw = new AIGatewayClient();
|
|
12178
|
+
* const provider = await gw.providers.get('f6692544-3265-49be-9711-bbdcebc079e4');
|
|
12179
|
+
* console.log(provider.name);
|
|
12180
|
+
* ```
|
|
12181
|
+
*/
|
|
12182
|
+
async get(providerId) {
|
|
12183
|
+
assertUuid(providerId, "providerId");
|
|
12184
|
+
return request({
|
|
12185
|
+
method: "GET",
|
|
12186
|
+
baseUrl: this.baseUrl,
|
|
12187
|
+
path: `${AI_GW_PROVIDERS_PATH}/${providerId}`,
|
|
12188
|
+
secretOperation: "providers.get",
|
|
12189
|
+
responseSchema: GatewayProviderDetailSchema,
|
|
12190
|
+
auth: this.auth,
|
|
12191
|
+
numRetries: this.numRetries
|
|
12192
|
+
});
|
|
12193
|
+
}
|
|
11410
12194
|
/**
|
|
11411
12195
|
* Create a provider.
|
|
11412
12196
|
*
|
|
@@ -11442,11 +12226,40 @@ var AIGatewayProvidersClient = class {
|
|
|
11442
12226
|
baseUrl: this.baseUrl,
|
|
11443
12227
|
path: AI_GW_PROVIDERS_PATH,
|
|
11444
12228
|
body,
|
|
12229
|
+
requestSchema: GatewayProviderCreateRequestSchema,
|
|
11445
12230
|
responseSchema: GatewayProviderCreateResponseSchema,
|
|
11446
12231
|
auth: this.auth,
|
|
11447
12232
|
numRetries: this.numRetries
|
|
11448
12233
|
});
|
|
11449
12234
|
}
|
|
12235
|
+
/**
|
|
12236
|
+
* Update a provider binding. Verified live 2026-08-29.
|
|
12237
|
+
* @param providerId - Provider UUID.
|
|
12238
|
+
* @param body - Fields to update.
|
|
12239
|
+
* @returns The gateway write response.
|
|
12240
|
+
* @example
|
|
12241
|
+
* ```ts
|
|
12242
|
+
* import { AIGatewayClient } from '@cdot65/prisma-airs-sdk';
|
|
12243
|
+
* const gw = new AIGatewayClient();
|
|
12244
|
+
* await gw.providers.update('f6692544-3265-49be-9711-bbdcebc079e4', {
|
|
12245
|
+
* name: 'Vertex production',
|
|
12246
|
+
* note: 'Updated by automation',
|
|
12247
|
+
* });
|
|
12248
|
+
* ```
|
|
12249
|
+
*/
|
|
12250
|
+
async update(providerId, body) {
|
|
12251
|
+
assertUuid(providerId, "providerId");
|
|
12252
|
+
return request({
|
|
12253
|
+
method: "PUT",
|
|
12254
|
+
baseUrl: this.baseUrl,
|
|
12255
|
+
path: `${AI_GW_PROVIDERS_PATH}/${providerId}`,
|
|
12256
|
+
body,
|
|
12257
|
+
requestSchema: GatewayProviderUpdateRequestSchema,
|
|
12258
|
+
responseSchema: GatewayWriteResponseSchema,
|
|
12259
|
+
auth: this.auth,
|
|
12260
|
+
numRetries: this.numRetries
|
|
12261
|
+
});
|
|
12262
|
+
}
|
|
11450
12263
|
/**
|
|
11451
12264
|
* Delete a provider.
|
|
11452
12265
|
*
|
|
@@ -11502,13 +12315,14 @@ var AIGatewayApiKeysClient = class {
|
|
|
11502
12315
|
});
|
|
11503
12316
|
}
|
|
11504
12317
|
/** @internal */
|
|
11505
|
-
writeAt(method, path, body) {
|
|
11506
|
-
assertUuid(body.workspace_id, "workspace_id");
|
|
12318
|
+
writeAt(method, path, body, requestSchema, secretOperation) {
|
|
11507
12319
|
return request({
|
|
11508
12320
|
method,
|
|
11509
12321
|
baseUrl: this.baseUrl,
|
|
11510
12322
|
path,
|
|
11511
12323
|
body,
|
|
12324
|
+
requestSchema,
|
|
12325
|
+
secretOperation,
|
|
11512
12326
|
responseSchema: GatewayWriteResponseSchema,
|
|
11513
12327
|
auth: this.auth,
|
|
11514
12328
|
numRetries: this.numRetries
|
|
@@ -11546,6 +12360,65 @@ var AIGatewayApiKeysClient = class {
|
|
|
11546
12360
|
async listUser(opts) {
|
|
11547
12361
|
return this.listAt(AI_GW_API_KEYS_USER_PATH, opts);
|
|
11548
12362
|
}
|
|
12363
|
+
getAt(path, keyId) {
|
|
12364
|
+
assertUuid(keyId, "keyId");
|
|
12365
|
+
return request({
|
|
12366
|
+
method: "GET",
|
|
12367
|
+
baseUrl: this.baseUrl,
|
|
12368
|
+
path: `${path}/${keyId}`,
|
|
12369
|
+
responseSchema: GatewayApiKeySchema,
|
|
12370
|
+
auth: this.auth,
|
|
12371
|
+
numRetries: this.numRetries
|
|
12372
|
+
});
|
|
12373
|
+
}
|
|
12374
|
+
async deleteAt(path, keyId) {
|
|
12375
|
+
assertUuid(keyId, "keyId");
|
|
12376
|
+
await request({
|
|
12377
|
+
method: "DELETE",
|
|
12378
|
+
baseUrl: this.baseUrl,
|
|
12379
|
+
path: `${path}/${keyId}`,
|
|
12380
|
+
auth: this.auth,
|
|
12381
|
+
numRetries: this.numRetries
|
|
12382
|
+
});
|
|
12383
|
+
}
|
|
12384
|
+
rotateAt(path, keyId, body, secretOperation) {
|
|
12385
|
+
assertUuid(keyId, "keyId");
|
|
12386
|
+
return request({
|
|
12387
|
+
method: "POST",
|
|
12388
|
+
baseUrl: this.baseUrl,
|
|
12389
|
+
path: `${path}/${keyId}/rotate`,
|
|
12390
|
+
body,
|
|
12391
|
+
requestSchema: GatewayApiKeyRotateRequestSchema,
|
|
12392
|
+
secretOperation,
|
|
12393
|
+
responseSchema: GatewayApiKeyRotateResponseSchema,
|
|
12394
|
+
auth: this.auth,
|
|
12395
|
+
numRetries: this.numRetries
|
|
12396
|
+
});
|
|
12397
|
+
}
|
|
12398
|
+
/** Get a service key. @example `await gw.apiKeys.getService(keyId);` */
|
|
12399
|
+
async getService(keyId) {
|
|
12400
|
+
return this.getAt(AI_GW_API_KEYS_SERVICE_PATH, keyId);
|
|
12401
|
+
}
|
|
12402
|
+
/** Get a user key. @example `await gw.apiKeys.getUser(keyId);` */
|
|
12403
|
+
async getUser(keyId) {
|
|
12404
|
+
return this.getAt(AI_GW_API_KEYS_USER_PATH, keyId);
|
|
12405
|
+
}
|
|
12406
|
+
/** Permanently delete a service key. @example `await gw.apiKeys.deleteService(keyId);` */
|
|
12407
|
+
async deleteService(keyId) {
|
|
12408
|
+
return this.deleteAt(AI_GW_API_KEYS_SERVICE_PATH, keyId);
|
|
12409
|
+
}
|
|
12410
|
+
/** Permanently delete a user key. @example `await gw.apiKeys.deleteUser(keyId);` */
|
|
12411
|
+
async deleteUser(keyId) {
|
|
12412
|
+
return this.deleteAt(AI_GW_API_KEYS_USER_PATH, keyId);
|
|
12413
|
+
}
|
|
12414
|
+
/** Rotate a service key; capture the returned secret. @example `const rotated = await gw.apiKeys.rotateService(keyId);` */
|
|
12415
|
+
async rotateService(keyId, body = {}) {
|
|
12416
|
+
return this.rotateAt(AI_GW_API_KEYS_SERVICE_PATH, keyId, body, "apiKeys.rotateService");
|
|
12417
|
+
}
|
|
12418
|
+
/** Rotate a user key; capture the returned secret. @example `const rotated = await gw.apiKeys.rotateUser(keyId);` */
|
|
12419
|
+
async rotateUser(keyId, body = {}) {
|
|
12420
|
+
return this.rotateAt(AI_GW_API_KEYS_USER_PATH, keyId, body, "apiKeys.rotateUser");
|
|
12421
|
+
}
|
|
11549
12422
|
/**
|
|
11550
12423
|
* Create a service API key.
|
|
11551
12424
|
* @param body - Name, scopes, TSG, workspace UUID, and type.
|
|
@@ -11565,7 +12438,13 @@ var AIGatewayApiKeysClient = class {
|
|
|
11565
12438
|
* ```
|
|
11566
12439
|
*/
|
|
11567
12440
|
async createService(body) {
|
|
11568
|
-
return this.writeAt(
|
|
12441
|
+
return this.writeAt(
|
|
12442
|
+
"POST",
|
|
12443
|
+
AI_GW_API_KEYS_SERVICE_PATH,
|
|
12444
|
+
body,
|
|
12445
|
+
GatewayServiceApiKeyCreateRequestSchema,
|
|
12446
|
+
"apiKeys.createService"
|
|
12447
|
+
);
|
|
11569
12448
|
}
|
|
11570
12449
|
/**
|
|
11571
12450
|
* Create a user API key.
|
|
@@ -11587,12 +12466,18 @@ var AIGatewayApiKeysClient = class {
|
|
|
11587
12466
|
* ```
|
|
11588
12467
|
*/
|
|
11589
12468
|
async createUser(body) {
|
|
11590
|
-
return this.writeAt(
|
|
12469
|
+
return this.writeAt(
|
|
12470
|
+
"POST",
|
|
12471
|
+
AI_GW_API_KEYS_USER_PATH,
|
|
12472
|
+
body,
|
|
12473
|
+
GatewayUserApiKeyCreateRequestSchema,
|
|
12474
|
+
"apiKeys.createUser"
|
|
12475
|
+
);
|
|
11591
12476
|
}
|
|
11592
12477
|
/**
|
|
11593
12478
|
* Update a service API key.
|
|
11594
12479
|
* @param keyId - Key UUID.
|
|
11595
|
-
* @param body -
|
|
12480
|
+
* @param body - One or more fields to update.
|
|
11596
12481
|
* @returns The raw update response. Shape unverified against a live tenant — see the PRD.
|
|
11597
12482
|
* @example
|
|
11598
12483
|
* ```ts
|
|
@@ -11610,12 +12495,17 @@ var AIGatewayApiKeysClient = class {
|
|
|
11610
12495
|
*/
|
|
11611
12496
|
async updateService(keyId, body) {
|
|
11612
12497
|
assertUuid(keyId, "keyId");
|
|
11613
|
-
return this.writeAt(
|
|
12498
|
+
return this.writeAt(
|
|
12499
|
+
"PUT",
|
|
12500
|
+
`${AI_GW_API_KEYS_SERVICE_PATH}/${keyId}`,
|
|
12501
|
+
body,
|
|
12502
|
+
GatewayApiKeyUpdateRequestSchema
|
|
12503
|
+
);
|
|
11614
12504
|
}
|
|
11615
12505
|
/**
|
|
11616
12506
|
* Update a user API key.
|
|
11617
12507
|
* @param keyId - Key UUID.
|
|
11618
|
-
* @param body -
|
|
12508
|
+
* @param body - One or more fields to update.
|
|
11619
12509
|
* @returns The raw update response. Shape unverified against a live tenant — see the PRD.
|
|
11620
12510
|
* @example
|
|
11621
12511
|
* ```ts
|
|
@@ -11634,7 +12524,12 @@ var AIGatewayApiKeysClient = class {
|
|
|
11634
12524
|
*/
|
|
11635
12525
|
async updateUser(keyId, body) {
|
|
11636
12526
|
assertUuid(keyId, "keyId");
|
|
11637
|
-
return this.writeAt(
|
|
12527
|
+
return this.writeAt(
|
|
12528
|
+
"PUT",
|
|
12529
|
+
`${AI_GW_API_KEYS_USER_PATH}/${keyId}`,
|
|
12530
|
+
body,
|
|
12531
|
+
GatewayApiKeyUpdateRequestSchema
|
|
12532
|
+
);
|
|
11638
12533
|
}
|
|
11639
12534
|
};
|
|
11640
12535
|
|
|
@@ -11698,8 +12593,8 @@ var AIGatewayIntegrationsClient = class {
|
|
|
11698
12593
|
* Create an integration.
|
|
11699
12594
|
*
|
|
11700
12595
|
* @remarks
|
|
11701
|
-
* `body.key` (the provider API key) is a live secret.
|
|
11702
|
-
*
|
|
12596
|
+
* `body.key` (the provider API key) is a live secret. SDK debug logs replace known
|
|
12597
|
+
* credential fields with `[REDACTED]`, but callers must still avoid logging the input object.
|
|
11703
12598
|
*
|
|
11704
12599
|
* @param body - Provider id, name, slug, and provider-specific configuration.
|
|
11705
12600
|
* @returns The raw create response. Shape unverified against a live tenant — see the PRD.
|
|
@@ -11724,6 +12619,8 @@ var AIGatewayIntegrationsClient = class {
|
|
|
11724
12619
|
baseUrl: this.baseUrl,
|
|
11725
12620
|
path: AI_GW_INTEGRATIONS_PATH,
|
|
11726
12621
|
body,
|
|
12622
|
+
requestSchema: GatewayIntegrationCreateRequestSchema,
|
|
12623
|
+
secretOperation: "integrations.create",
|
|
11727
12624
|
responseSchema: GatewayWriteResponseSchema,
|
|
11728
12625
|
auth: this.auth,
|
|
11729
12626
|
numRetries: this.numRetries
|
|
@@ -11732,7 +12629,7 @@ var AIGatewayIntegrationsClient = class {
|
|
|
11732
12629
|
/**
|
|
11733
12630
|
* Update an integration.
|
|
11734
12631
|
* @param integrationId - Integration UUID.
|
|
11735
|
-
* @param body -
|
|
12632
|
+
* @param body - One or more fields to update.
|
|
11736
12633
|
* @returns The raw update response. Shape unverified against a live tenant — see the PRD.
|
|
11737
12634
|
* @example
|
|
11738
12635
|
* ```ts
|
|
@@ -11747,12 +12644,13 @@ var AIGatewayIntegrationsClient = class {
|
|
|
11747
12644
|
*/
|
|
11748
12645
|
async update(integrationId, body) {
|
|
11749
12646
|
assertUuid(integrationId, "integrationId");
|
|
11750
|
-
if (body.ai_provider_id !== void 0) assertUuid(body.ai_provider_id, "ai_provider_id");
|
|
11751
12647
|
return request({
|
|
11752
12648
|
method: "PUT",
|
|
11753
12649
|
baseUrl: this.baseUrl,
|
|
11754
12650
|
path: `${AI_GW_INTEGRATIONS_PATH}/${integrationId}`,
|
|
11755
12651
|
body,
|
|
12652
|
+
requestSchema: GatewayIntegrationUpdateRequestSchema,
|
|
12653
|
+
secretOperation: "integrations.update",
|
|
11756
12654
|
responseSchema: GatewayWriteResponseSchema,
|
|
11757
12655
|
auth: this.auth,
|
|
11758
12656
|
numRetries: this.numRetries
|
|
@@ -11808,9 +12706,9 @@ var AIGatewayIntegrationsClient = class {
|
|
|
11808
12706
|
});
|
|
11809
12707
|
}
|
|
11810
12708
|
/**
|
|
11811
|
-
*
|
|
12709
|
+
* Bulk-update model enablement for this integration.
|
|
11812
12710
|
* @param integrationId - Integration UUID.
|
|
11813
|
-
* @param body -
|
|
12711
|
+
* @param body - One or more model entries to update; omission is not documented as deletion.
|
|
11814
12712
|
* @returns The raw response. Shape unverified against a live tenant — see the PRD.
|
|
11815
12713
|
* @example
|
|
11816
12714
|
* ```ts
|
|
@@ -11829,6 +12727,7 @@ var AIGatewayIntegrationsClient = class {
|
|
|
11829
12727
|
baseUrl: this.baseUrl,
|
|
11830
12728
|
path: `${AI_GW_INTEGRATIONS_PATH}/${integrationId}/models`,
|
|
11831
12729
|
body,
|
|
12730
|
+
requestSchema: GatewayIntegrationModelsBulkUpdateRequestSchema,
|
|
11832
12731
|
responseSchema: GatewayWriteResponseSchema,
|
|
11833
12732
|
auth: this.auth,
|
|
11834
12733
|
numRetries: this.numRetries
|
|
@@ -11840,7 +12739,7 @@ var AIGatewayIntegrationsClient = class {
|
|
|
11840
12739
|
* @remarks
|
|
11841
12740
|
* `global_workspace_access` is an **object** on this read, not a boolean, despite the
|
|
11842
12741
|
* field name — `{ enabled, rate_limits, usage_limits }`. The corresponding write
|
|
11843
|
-
* ({@link setWorkspaces})
|
|
12742
|
+
* ({@link setWorkspaces}) uses the same object shape.
|
|
11844
12743
|
*
|
|
11845
12744
|
* @param integrationId - Integration UUID.
|
|
11846
12745
|
* @returns Bound workspaces plus the `global_workspace_access` object.
|
|
@@ -11865,9 +12764,9 @@ var AIGatewayIntegrationsClient = class {
|
|
|
11865
12764
|
});
|
|
11866
12765
|
}
|
|
11867
12766
|
/**
|
|
11868
|
-
*
|
|
12767
|
+
* Bulk-update which workspaces may use this integration.
|
|
11869
12768
|
* @param integrationId - Integration UUID.
|
|
11870
|
-
* @param body - Workspace bindings
|
|
12769
|
+
* @param body - Workspace bindings, global-access settings, or explicit override behavior.
|
|
11871
12770
|
* @returns The raw response. Shape unverified against a live tenant — see the PRD.
|
|
11872
12771
|
* @example
|
|
11873
12772
|
* ```ts
|
|
@@ -11875,7 +12774,7 @@ var AIGatewayIntegrationsClient = class {
|
|
|
11875
12774
|
* const gw = new AIGatewayClient();
|
|
11876
12775
|
*
|
|
11877
12776
|
* await gw.integrations.setWorkspaces('f6692544-3265-49be-9711-bbdcebc079e4', {
|
|
11878
|
-
* global_workspace_access: true,
|
|
12777
|
+
* global_workspace_access: { enabled: true },
|
|
11879
12778
|
* });
|
|
11880
12779
|
* ```
|
|
11881
12780
|
*/
|
|
@@ -11886,6 +12785,7 @@ var AIGatewayIntegrationsClient = class {
|
|
|
11886
12785
|
baseUrl: this.baseUrl,
|
|
11887
12786
|
path: `${AI_GW_INTEGRATIONS_PATH}/${integrationId}/workspaces`,
|
|
11888
12787
|
body,
|
|
12788
|
+
requestSchema: GatewayIntegrationWorkspacesBulkUpdateRequestSchema,
|
|
11889
12789
|
responseSchema: GatewayWriteResponseSchema,
|
|
11890
12790
|
auth: this.auth,
|
|
11891
12791
|
numRetries: this.numRetries
|
|
@@ -11925,6 +12825,75 @@ var AIGatewayMcpIntegrationsClient = class {
|
|
|
11925
12825
|
numRetries: this.numRetries
|
|
11926
12826
|
});
|
|
11927
12827
|
}
|
|
12828
|
+
/**
|
|
12829
|
+
* Fetch one MCP integration. Verified live 2026-08-29.
|
|
12830
|
+
* @param mcpIntegrationId - MCP integration UUID.
|
|
12831
|
+
* @returns Integration detail; unlike list rows, `configurations` is an object.
|
|
12832
|
+
* @example
|
|
12833
|
+
* ```ts
|
|
12834
|
+
* import { AIGatewayClient } from '@cdot65/prisma-airs-sdk';
|
|
12835
|
+
* const gw = new AIGatewayClient();
|
|
12836
|
+
* const integration = await gw.mcpIntegrations.get('2a6f4e2e-6f5a-4a1f-9d0e-9b2b6f6c3a11');
|
|
12837
|
+
* console.log(integration.url);
|
|
12838
|
+
* ```
|
|
12839
|
+
*/
|
|
12840
|
+
async get(mcpIntegrationId) {
|
|
12841
|
+
assertUuid(mcpIntegrationId, "mcpIntegrationId");
|
|
12842
|
+
return request({
|
|
12843
|
+
method: "GET",
|
|
12844
|
+
baseUrl: this.baseUrl,
|
|
12845
|
+
path: `${AI_GW_MCP_INTEGRATIONS_PATH}/${mcpIntegrationId}`,
|
|
12846
|
+
responseSchema: McpIntegrationDetailSchema,
|
|
12847
|
+
auth: this.auth,
|
|
12848
|
+
numRetries: this.numRetries
|
|
12849
|
+
});
|
|
12850
|
+
}
|
|
12851
|
+
/**
|
|
12852
|
+
* List capabilities discovered from an MCP integration. Verified live 2026-08-29.
|
|
12853
|
+
* @param mcpIntegrationId - MCP integration UUID.
|
|
12854
|
+
* @returns Tools, prompts, resources, and resource templates with enablement counts.
|
|
12855
|
+
* @example
|
|
12856
|
+
* ```ts
|
|
12857
|
+
* import { AIGatewayClient } from '@cdot65/prisma-airs-sdk';
|
|
12858
|
+
* const gw = new AIGatewayClient();
|
|
12859
|
+
* const capabilities = await gw.mcpIntegrations.getCapabilities('2a6f4e2e-6f5a-4a1f-9d0e-9b2b6f6c3a11');
|
|
12860
|
+
* console.log(capabilities.data.map((capability) => capability.name));
|
|
12861
|
+
* ```
|
|
12862
|
+
*/
|
|
12863
|
+
async getCapabilities(mcpIntegrationId) {
|
|
12864
|
+
assertUuid(mcpIntegrationId, "mcpIntegrationId");
|
|
12865
|
+
return request({
|
|
12866
|
+
method: "GET",
|
|
12867
|
+
baseUrl: this.baseUrl,
|
|
12868
|
+
path: `${AI_GW_MCP_INTEGRATIONS_PATH}/${mcpIntegrationId}/capabilities`,
|
|
12869
|
+
responseSchema: McpIntegrationCapabilitiesResponseSchema,
|
|
12870
|
+
auth: this.auth,
|
|
12871
|
+
numRetries: this.numRetries
|
|
12872
|
+
});
|
|
12873
|
+
}
|
|
12874
|
+
/**
|
|
12875
|
+
* Fetch metadata discovered from an MCP server. Verified live 2026-08-29.
|
|
12876
|
+
* @param mcpIntegrationId - MCP integration UUID.
|
|
12877
|
+
* @returns Server identity, protocol, capability flags, and sync state.
|
|
12878
|
+
* @example
|
|
12879
|
+
* ```ts
|
|
12880
|
+
* import { AIGatewayClient } from '@cdot65/prisma-airs-sdk';
|
|
12881
|
+
* const gw = new AIGatewayClient();
|
|
12882
|
+
* const metadata = await gw.mcpIntegrations.getMetadata('2a6f4e2e-6f5a-4a1f-9d0e-9b2b6f6c3a11');
|
|
12883
|
+
* console.log(metadata.sync_status);
|
|
12884
|
+
* ```
|
|
12885
|
+
*/
|
|
12886
|
+
async getMetadata(mcpIntegrationId) {
|
|
12887
|
+
assertUuid(mcpIntegrationId, "mcpIntegrationId");
|
|
12888
|
+
return request({
|
|
12889
|
+
method: "GET",
|
|
12890
|
+
baseUrl: this.baseUrl,
|
|
12891
|
+
path: `${AI_GW_MCP_INTEGRATIONS_PATH}/${mcpIntegrationId}/metadata`,
|
|
12892
|
+
responseSchema: McpIntegrationMetadataSchema,
|
|
12893
|
+
auth: this.auth,
|
|
12894
|
+
numRetries: this.numRetries
|
|
12895
|
+
});
|
|
12896
|
+
}
|
|
11928
12897
|
/**
|
|
11929
12898
|
* Register an MCP server.
|
|
11930
12899
|
* @param body - Name, server URL, auth type, transport, and provider-specific configuration.
|
|
@@ -11950,23 +12919,68 @@ var AIGatewayMcpIntegrationsClient = class {
|
|
|
11950
12919
|
baseUrl: this.baseUrl,
|
|
11951
12920
|
path: AI_GW_MCP_INTEGRATIONS_PATH,
|
|
11952
12921
|
body,
|
|
12922
|
+
requestSchema: McpIntegrationCreateRequestSchema,
|
|
12923
|
+
secretOperation: "mcpIntegrations.create",
|
|
11953
12924
|
responseSchema: GatewayWriteResponseSchema,
|
|
11954
12925
|
auth: this.auth,
|
|
11955
12926
|
numRetries: this.numRetries
|
|
11956
12927
|
});
|
|
11957
12928
|
}
|
|
12929
|
+
/** Update an MCP integration. @example `await gw.mcpIntegrations.update(id, { name: 'Docs MCP' });` */
|
|
12930
|
+
async update(mcpIntegrationId, body) {
|
|
12931
|
+
assertUuid(mcpIntegrationId, "mcpIntegrationId");
|
|
12932
|
+
return request({
|
|
12933
|
+
method: "PUT",
|
|
12934
|
+
baseUrl: this.baseUrl,
|
|
12935
|
+
path: `${AI_GW_MCP_INTEGRATIONS_PATH}/${mcpIntegrationId}`,
|
|
12936
|
+
body,
|
|
12937
|
+
requestSchema: McpIntegrationUpdateRequestSchema,
|
|
12938
|
+
secretOperation: "mcpIntegrations.update",
|
|
12939
|
+
responseSchema: GatewayWriteResponseSchema,
|
|
12940
|
+
auth: this.auth,
|
|
12941
|
+
numRetries: this.numRetries
|
|
12942
|
+
});
|
|
12943
|
+
}
|
|
12944
|
+
/** Permanently delete an MCP integration. @example `await gw.mcpIntegrations.delete(id);` */
|
|
12945
|
+
async delete(mcpIntegrationId) {
|
|
12946
|
+
assertUuid(mcpIntegrationId, "mcpIntegrationId");
|
|
12947
|
+
await request({
|
|
12948
|
+
method: "DELETE",
|
|
12949
|
+
baseUrl: this.baseUrl,
|
|
12950
|
+
path: `${AI_GW_MCP_INTEGRATIONS_PATH}/${mcpIntegrationId}`,
|
|
12951
|
+
auth: this.auth,
|
|
12952
|
+
numRetries: this.numRetries
|
|
12953
|
+
});
|
|
12954
|
+
}
|
|
12955
|
+
/** Bulk-update capability enablement values. @example `await gw.mcpIntegrations.setCapabilities(id, { capabilities: [{ name: 'lookup', type: 'tool', enabled: true }] });` */
|
|
12956
|
+
async setCapabilities(mcpIntegrationId, body) {
|
|
12957
|
+
assertUuid(mcpIntegrationId, "mcpIntegrationId");
|
|
12958
|
+
return request({
|
|
12959
|
+
method: "PUT",
|
|
12960
|
+
baseUrl: this.baseUrl,
|
|
12961
|
+
path: `${AI_GW_MCP_INTEGRATIONS_PATH}/${mcpIntegrationId}/capabilities`,
|
|
12962
|
+
body,
|
|
12963
|
+
requestSchema: McpIntegrationCapabilitiesBulkUpdateRequestSchema,
|
|
12964
|
+
responseSchema: McpIntegrationCapabilitiesUpdateResponseSchema,
|
|
12965
|
+
auth: this.auth,
|
|
12966
|
+
numRetries: this.numRetries
|
|
12967
|
+
});
|
|
12968
|
+
}
|
|
11958
12969
|
/**
|
|
11959
|
-
*
|
|
12970
|
+
* Bulk-update which workspaces may use this MCP integration.
|
|
11960
12971
|
* @param mcpIntegrationId - MCP integration UUID.
|
|
11961
|
-
* @param body - Workspace bindings or
|
|
11962
|
-
*
|
|
12972
|
+
* @param body - Workspace bindings or global-access settings. Use the explicit override flag
|
|
12973
|
+
* to request replacement behavior.
|
|
12974
|
+
* @returns An empty object. Verified live 2026-08-30.
|
|
11963
12975
|
* @example
|
|
11964
12976
|
* ```ts
|
|
11965
12977
|
* import { AIGatewayClient } from '@cdot65/prisma-airs-sdk';
|
|
11966
12978
|
* const gw = new AIGatewayClient();
|
|
11967
12979
|
*
|
|
11968
12980
|
* await gw.mcpIntegrations.setWorkspaces('f6692544-3265-49be-9711-bbdcebc079e4', {
|
|
11969
|
-
*
|
|
12981
|
+
* workspaces: [{ id: 'ws-development', enabled: true }],
|
|
12982
|
+
* global_workspace_access: { enabled: false },
|
|
12983
|
+
* override_existing_workspace_access: true,
|
|
11970
12984
|
* });
|
|
11971
12985
|
* ```
|
|
11972
12986
|
*/
|
|
@@ -11977,7 +12991,8 @@ var AIGatewayMcpIntegrationsClient = class {
|
|
|
11977
12991
|
baseUrl: this.baseUrl,
|
|
11978
12992
|
path: `${AI_GW_MCP_INTEGRATIONS_PATH}/${mcpIntegrationId}/workspaces`,
|
|
11979
12993
|
body,
|
|
11980
|
-
|
|
12994
|
+
requestSchema: McpIntegrationWorkspacesBulkUpdateRequestSchema,
|
|
12995
|
+
responseSchema: McpIntegrationWorkspacesUpdateResponseSchema,
|
|
11981
12996
|
auth: this.auth,
|
|
11982
12997
|
numRetries: this.numRetries
|
|
11983
12998
|
});
|
|
@@ -12055,8 +13070,8 @@ var AIGatewayDeploymentsClient = class {
|
|
|
12055
13070
|
*
|
|
12056
13071
|
* This is the **only** time `credentials.password` and `client_auth` are readable; the
|
|
12057
13072
|
* detail read masks them. Capture them here or they are unrecoverable. Never log them.
|
|
12058
|
-
*
|
|
12059
|
-
*
|
|
13073
|
+
* SDK debug logs redact returned one-time `client_auth` and registry passwords. Callers
|
|
13074
|
+
* must still capture the create response once and store it securely.
|
|
12060
13075
|
*
|
|
12061
13076
|
* @param body - Name, type, TSG, and auth settings.
|
|
12062
13077
|
* @returns The creation receipt including the deployment's gateway credentials.
|
|
@@ -12081,11 +13096,67 @@ var AIGatewayDeploymentsClient = class {
|
|
|
12081
13096
|
baseUrl: this.baseUrl,
|
|
12082
13097
|
path: AI_GW_DEPLOYMENTS_PATH,
|
|
12083
13098
|
body,
|
|
13099
|
+
requestSchema: GatewayDeploymentCreateRequestSchema,
|
|
13100
|
+
secretOperation: "deployments.create",
|
|
12084
13101
|
responseSchema: GatewayDeploymentCreateResponseSchema,
|
|
12085
13102
|
auth: this.auth,
|
|
12086
13103
|
numRetries: this.numRetries
|
|
12087
13104
|
});
|
|
12088
13105
|
}
|
|
13106
|
+
/**
|
|
13107
|
+
* Update deployment settings, including its externally deployed gateway URL and workspace scope.
|
|
13108
|
+
* @param deploymentId - Deployment UUID.
|
|
13109
|
+
* @param body - Fields to update.
|
|
13110
|
+
* @returns The gateway write response.
|
|
13111
|
+
* @example
|
|
13112
|
+
* ```ts
|
|
13113
|
+
* import { AIGatewayClient } from '@cdot65/prisma-airs-sdk';
|
|
13114
|
+
* const gw = new AIGatewayClient();
|
|
13115
|
+
* await gw.deployments.update('21414819-485e-4ba3-b3d3-3e1815580e43', {
|
|
13116
|
+
* auth_settings: {
|
|
13117
|
+
* gateway_base_url: 'https://gateway.example.com',
|
|
13118
|
+
* workspaces_allowed: ['ws-develo-71f8d8'],
|
|
13119
|
+
* },
|
|
13120
|
+
* });
|
|
13121
|
+
* ```
|
|
13122
|
+
*/
|
|
13123
|
+
async update(deploymentId, body) {
|
|
13124
|
+
assertUuid(deploymentId, "deploymentId");
|
|
13125
|
+
return request({
|
|
13126
|
+
method: "PUT",
|
|
13127
|
+
baseUrl: this.baseUrl,
|
|
13128
|
+
path: `${AI_GW_DEPLOYMENTS_PATH}/${deploymentId}`,
|
|
13129
|
+
body,
|
|
13130
|
+
requestSchema: GatewayDeploymentUpdateRequestSchema,
|
|
13131
|
+
secretOperation: "deployments.update",
|
|
13132
|
+
responseSchema: GatewayWriteResponseSchema,
|
|
13133
|
+
auth: this.auth,
|
|
13134
|
+
numRetries: this.numRetries
|
|
13135
|
+
});
|
|
13136
|
+
}
|
|
13137
|
+
/**
|
|
13138
|
+
* Run SCM's outbound and inbound connectivity checks against a configured gateway.
|
|
13139
|
+
* @param deploymentId - Deployment UUID.
|
|
13140
|
+
* @returns Health of both connectivity directions.
|
|
13141
|
+
* @example
|
|
13142
|
+
* ```ts
|
|
13143
|
+
* import { AIGatewayClient } from '@cdot65/prisma-airs-sdk';
|
|
13144
|
+
* const gw = new AIGatewayClient();
|
|
13145
|
+
* const health = await gw.deployments.ping('21414819-485e-4ba3-b3d3-3e1815580e43');
|
|
13146
|
+
* console.log(health.status, health.outbound.status, health.inbound.status);
|
|
13147
|
+
* ```
|
|
13148
|
+
*/
|
|
13149
|
+
async ping(deploymentId) {
|
|
13150
|
+
assertUuid(deploymentId, "deploymentId");
|
|
13151
|
+
return request({
|
|
13152
|
+
method: "GET",
|
|
13153
|
+
baseUrl: this.baseUrl,
|
|
13154
|
+
path: `${AI_GW_DEPLOYMENTS_PATH}/${deploymentId}/ping`,
|
|
13155
|
+
responseSchema: GatewayDeploymentPingResponseSchema,
|
|
13156
|
+
auth: this.auth,
|
|
13157
|
+
numRetries: this.numRetries
|
|
13158
|
+
});
|
|
13159
|
+
}
|
|
12089
13160
|
/**
|
|
12090
13161
|
* Archive a deployment.
|
|
12091
13162
|
*
|
|
@@ -12160,8 +13231,8 @@ var AIGatewayPluginsClient = class {
|
|
|
12160
13231
|
* Bind a plugin to the organisation.
|
|
12161
13232
|
*
|
|
12162
13233
|
* @remarks
|
|
12163
|
-
* `body.credentials` (e.g. `AIRS_API_KEY`) is a live secret.
|
|
12164
|
-
*
|
|
13234
|
+
* `body.credentials` (e.g. `AIRS_API_KEY`) is a live secret. SDK debug logs replace each
|
|
13235
|
+
* credential value with `[REDACTED]`, but callers must still avoid logging the input object.
|
|
12165
13236
|
*
|
|
12166
13237
|
* @param body - Integration id and provider-specific credentials.
|
|
12167
13238
|
* @returns The raw create response. Shape unverified against a live tenant — see the PRD.
|
|
@@ -12184,6 +13255,8 @@ var AIGatewayPluginsClient = class {
|
|
|
12184
13255
|
baseUrl: this.baseUrl,
|
|
12185
13256
|
path: AI_GW_PLUGINS_PATH,
|
|
12186
13257
|
body,
|
|
13258
|
+
requestSchema: GatewayPluginCreateRequestSchema,
|
|
13259
|
+
secretOperation: "plugins.create",
|
|
12187
13260
|
responseSchema: GatewayWriteResponseSchema,
|
|
12188
13261
|
auth: this.auth,
|
|
12189
13262
|
numRetries: this.numRetries
|
|
@@ -12225,7 +13298,7 @@ var AIGatewayOrganisationsClient = class {
|
|
|
12225
13298
|
}
|
|
12226
13299
|
/**
|
|
12227
13300
|
* Update the calling organisation's settings.
|
|
12228
|
-
* @param body -
|
|
13301
|
+
* @param body - One or more fields to update.
|
|
12229
13302
|
* @returns The raw update response. Shape unverified against a live tenant — see the PRD.
|
|
12230
13303
|
* @example
|
|
12231
13304
|
* ```ts
|
|
@@ -12241,6 +13314,7 @@ var AIGatewayOrganisationsClient = class {
|
|
|
12241
13314
|
baseUrl: this.baseUrl,
|
|
12242
13315
|
path: AI_GW_ORGANISATIONS_SELF_PATH,
|
|
12243
13316
|
body,
|
|
13317
|
+
requestSchema: GatewayOrganisationUpdateRequestSchema,
|
|
12244
13318
|
responseSchema: GatewayWriteResponseSchema,
|
|
12245
13319
|
auth: this.auth,
|
|
12246
13320
|
numRetries: this.numRetries
|
|
@@ -12251,8 +13325,8 @@ var AIGatewayOrganisationsClient = class {
|
|
|
12251
13325
|
*
|
|
12252
13326
|
* @remarks
|
|
12253
13327
|
* The response includes a `scim_token` — a live secret. Never log the returned object.
|
|
12254
|
-
*
|
|
12255
|
-
*
|
|
13328
|
+
* SDK debug logs redact `scim_token` and known nested client-secret fields. Callers must
|
|
13329
|
+
* still avoid logging the input object or returned auth settings directly.
|
|
12256
13330
|
*
|
|
12257
13331
|
* @param tsgId - The TSG as a numeric string, not a UUID.
|
|
12258
13332
|
* @returns Auth settings, including domains and the SCIM token.
|
|
@@ -12271,6 +13345,7 @@ var AIGatewayOrganisationsClient = class {
|
|
|
12271
13345
|
method: "GET",
|
|
12272
13346
|
baseUrl: this.baseUrl,
|
|
12273
13347
|
path: aiGwOrganisationsAuthSettingsPath(tsgId),
|
|
13348
|
+
secretOperation: "organisations.getAuthSettings",
|
|
12274
13349
|
responseSchema: AuthSettingsResponseSchema,
|
|
12275
13350
|
auth: this.auth,
|
|
12276
13351
|
numRetries: this.numRetries
|
|
@@ -12279,7 +13354,7 @@ var AIGatewayOrganisationsClient = class {
|
|
|
12279
13354
|
/**
|
|
12280
13355
|
* Update an organisation's auth settings.
|
|
12281
13356
|
* @param tsgId - The TSG as a numeric string, not a UUID.
|
|
12282
|
-
* @param body -
|
|
13357
|
+
* @param body - One or more auth-setting fields to update.
|
|
12283
13358
|
* @returns The raw update response. Shape unverified against a live tenant — see the PRD.
|
|
12284
13359
|
* @example
|
|
12285
13360
|
* ```ts
|
|
@@ -12298,6 +13373,8 @@ var AIGatewayOrganisationsClient = class {
|
|
|
12298
13373
|
baseUrl: this.baseUrl,
|
|
12299
13374
|
path: aiGwOrganisationsAuthSettingsPath(tsgId),
|
|
12300
13375
|
body,
|
|
13376
|
+
requestSchema: GatewayOrganisationAuthSettingsUpdateRequestSchema,
|
|
13377
|
+
secretOperation: "organisations.updateAuthSettings",
|
|
12301
13378
|
responseSchema: GatewayWriteResponseSchema,
|
|
12302
13379
|
auth: this.auth,
|
|
12303
13380
|
numRetries: this.numRetries
|
|
@@ -12415,6 +13492,165 @@ var AIGatewayClient = class {
|
|
|
12415
13492
|
this.auditLogs = new AIGatewayAuditLogsClient(adminOpts);
|
|
12416
13493
|
}
|
|
12417
13494
|
};
|
|
13495
|
+
|
|
13496
|
+
// src/ai-gateway/nested-values.ts
|
|
13497
|
+
var FORBIDDEN_SEGMENTS = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]);
|
|
13498
|
+
var ESCAPABLE = /* @__PURE__ */ new Set([".", "[", "]", "\\"]);
|
|
13499
|
+
function invalid(message) {
|
|
13500
|
+
throw new AISecSDKException(message, "AISEC_USER_REQUEST_PAYLOAD_ERROR" /* USER_REQUEST_PAYLOAD_ERROR */);
|
|
13501
|
+
}
|
|
13502
|
+
function pushProperty(tokens, value2, path) {
|
|
13503
|
+
if (!value2) invalid(`Invalid dotted path: ${path}`);
|
|
13504
|
+
if (FORBIDDEN_SEGMENTS.has(value2)) invalid(`Unsafe dotted path segment: ${value2}`);
|
|
13505
|
+
tokens.push(value2);
|
|
13506
|
+
}
|
|
13507
|
+
function parsePath(path) {
|
|
13508
|
+
if (!path) invalid("Dotted path must not be empty");
|
|
13509
|
+
const tokens = [];
|
|
13510
|
+
let property = "";
|
|
13511
|
+
let afterDot = false;
|
|
13512
|
+
let afterIndex = false;
|
|
13513
|
+
for (let i = 0; i < path.length; i++) {
|
|
13514
|
+
const char = path[i];
|
|
13515
|
+
if (char === "\\") {
|
|
13516
|
+
const escaped = path[++i];
|
|
13517
|
+
if (escaped === void 0 || !ESCAPABLE.has(escaped)) {
|
|
13518
|
+
invalid(`Invalid escape in dotted path: ${path}`);
|
|
13519
|
+
}
|
|
13520
|
+
if (afterIndex) invalid(`Missing dot after array index in path: ${path}`);
|
|
13521
|
+
property += escaped;
|
|
13522
|
+
afterDot = false;
|
|
13523
|
+
continue;
|
|
13524
|
+
}
|
|
13525
|
+
if (char === ".") {
|
|
13526
|
+
if (property) {
|
|
13527
|
+
pushProperty(tokens, property, path);
|
|
13528
|
+
property = "";
|
|
13529
|
+
} else if (!afterIndex) {
|
|
13530
|
+
invalid(`Invalid empty segment in dotted path: ${path}`);
|
|
13531
|
+
}
|
|
13532
|
+
afterDot = true;
|
|
13533
|
+
afterIndex = false;
|
|
13534
|
+
continue;
|
|
13535
|
+
}
|
|
13536
|
+
if (char === "[") {
|
|
13537
|
+
if (afterDot) invalid(`Invalid array segment in dotted path: ${path}`);
|
|
13538
|
+
if (property) {
|
|
13539
|
+
pushProperty(tokens, property, path);
|
|
13540
|
+
property = "";
|
|
13541
|
+
} else if (tokens.length === 0) {
|
|
13542
|
+
invalid(`Dotted paths must start with an object property: ${path}`);
|
|
13543
|
+
}
|
|
13544
|
+
const close = path.indexOf("]", i + 1);
|
|
13545
|
+
if (close === -1) invalid(`Unclosed array index in dotted path: ${path}`);
|
|
13546
|
+
const rawIndex = path.slice(i + 1, close);
|
|
13547
|
+
if (!/^(0|[1-9]\d*)$/.test(rawIndex)) invalid(`Invalid array index in dotted path: ${path}`);
|
|
13548
|
+
tokens.push(Number(rawIndex));
|
|
13549
|
+
i = close;
|
|
13550
|
+
afterIndex = true;
|
|
13551
|
+
afterDot = false;
|
|
13552
|
+
continue;
|
|
13553
|
+
}
|
|
13554
|
+
if (char === "]") invalid(`Unexpected ] in dotted path: ${path}`);
|
|
13555
|
+
if (afterIndex) invalid(`Missing dot after array index in path: ${path}`);
|
|
13556
|
+
property += char;
|
|
13557
|
+
afterDot = false;
|
|
13558
|
+
}
|
|
13559
|
+
if (property) pushProperty(tokens, property, path);
|
|
13560
|
+
else if (afterDot) invalid(`Dotted path must not end with a dot: ${path}`);
|
|
13561
|
+
if (tokens.length === 0) invalid(`Invalid dotted path: ${path}`);
|
|
13562
|
+
return tokens;
|
|
13563
|
+
}
|
|
13564
|
+
function isContainerFor(value2, expectArray) {
|
|
13565
|
+
return expectArray ? Array.isArray(value2) : typeof value2 === "object" && value2 !== null && !Array.isArray(value2);
|
|
13566
|
+
}
|
|
13567
|
+
function readSegment(container, segment) {
|
|
13568
|
+
return typeof segment === "number" ? container[segment] : container[segment];
|
|
13569
|
+
}
|
|
13570
|
+
function writeSegment(container, segment, value2) {
|
|
13571
|
+
if (typeof segment === "number") container[segment] = value2;
|
|
13572
|
+
else container[segment] = value2;
|
|
13573
|
+
}
|
|
13574
|
+
function assign(root, tokens, value2, replaceExisting) {
|
|
13575
|
+
let current = root;
|
|
13576
|
+
for (let i = 0; i < tokens.length; i++) {
|
|
13577
|
+
const segment = tokens[i];
|
|
13578
|
+
const final = i === tokens.length - 1;
|
|
13579
|
+
if (typeof segment === "number" && !Array.isArray(current)) {
|
|
13580
|
+
invalid("Array index conflicts with an object path");
|
|
13581
|
+
}
|
|
13582
|
+
if (typeof segment === "string" && Array.isArray(current)) {
|
|
13583
|
+
invalid("Object property conflicts with an array path");
|
|
13584
|
+
}
|
|
13585
|
+
const hasValue = Object.prototype.hasOwnProperty.call(current, segment);
|
|
13586
|
+
if (final) {
|
|
13587
|
+
if (hasValue && !replaceExisting) invalid("Duplicate dotted path");
|
|
13588
|
+
writeSegment(current, segment, value2);
|
|
13589
|
+
return;
|
|
13590
|
+
}
|
|
13591
|
+
const expectArray = typeof tokens[i + 1] === "number";
|
|
13592
|
+
if (!hasValue) {
|
|
13593
|
+
writeSegment(current, segment, expectArray ? [] : {});
|
|
13594
|
+
} else {
|
|
13595
|
+
const existing = readSegment(current, segment);
|
|
13596
|
+
if (!isContainerFor(existing, expectArray)) invalid("Dotted path shape conflict");
|
|
13597
|
+
}
|
|
13598
|
+
current = readSegment(current, segment);
|
|
13599
|
+
}
|
|
13600
|
+
}
|
|
13601
|
+
function assertDenseArrays(value2) {
|
|
13602
|
+
if (Array.isArray(value2)) {
|
|
13603
|
+
for (let i = 0; i < value2.length; i++) {
|
|
13604
|
+
if (!Object.prototype.hasOwnProperty.call(value2, i))
|
|
13605
|
+
invalid("Sparse arrays are not supported");
|
|
13606
|
+
assertDenseArrays(value2[i]);
|
|
13607
|
+
}
|
|
13608
|
+
return;
|
|
13609
|
+
}
|
|
13610
|
+
if (typeof value2 === "object" && value2 !== null) {
|
|
13611
|
+
for (const nested of Object.values(value2)) assertDenseArrays(nested);
|
|
13612
|
+
}
|
|
13613
|
+
}
|
|
13614
|
+
function cloneJson(value2) {
|
|
13615
|
+
if (Array.isArray(value2)) {
|
|
13616
|
+
return value2.map((item) => cloneJson(item));
|
|
13617
|
+
}
|
|
13618
|
+
if (typeof value2 === "object" && value2 !== null) {
|
|
13619
|
+
return Object.fromEntries(
|
|
13620
|
+
Object.entries(value2).map(([key, item]) => [key, cloneJson(item)])
|
|
13621
|
+
);
|
|
13622
|
+
}
|
|
13623
|
+
return value2;
|
|
13624
|
+
}
|
|
13625
|
+
function parseJsonValue(value2) {
|
|
13626
|
+
const result = GatewayJsonValueSchema.safeParse(value2);
|
|
13627
|
+
if (!result.success) invalid("Dotted value must be finite JSON");
|
|
13628
|
+
return cloneJson(result.data);
|
|
13629
|
+
}
|
|
13630
|
+
function buildDottedObject(entries) {
|
|
13631
|
+
const parsed = entries.map((entry) => ({
|
|
13632
|
+
tokens: parsePath(entry.path),
|
|
13633
|
+
value: parseJsonValue(entry.value)
|
|
13634
|
+
}));
|
|
13635
|
+
const identities = /* @__PURE__ */ new Set();
|
|
13636
|
+
for (const entry of parsed) {
|
|
13637
|
+
const identity = JSON.stringify(entry.tokens);
|
|
13638
|
+
if (identities.has(identity)) invalid("Duplicate dotted path");
|
|
13639
|
+
identities.add(identity);
|
|
13640
|
+
}
|
|
13641
|
+
const result = {};
|
|
13642
|
+
for (const entry of parsed) assign(result, entry.tokens, entry.value, false);
|
|
13643
|
+
assertDenseArrays(result);
|
|
13644
|
+
return result;
|
|
13645
|
+
}
|
|
13646
|
+
function setDottedValue(input, path, value2) {
|
|
13647
|
+
const parsedInput = GatewayJsonObjectSchema.safeParse(input);
|
|
13648
|
+
if (!parsedInput.success) invalid("Input must be a finite JSON object");
|
|
13649
|
+
const result = cloneJson(parsedInput.data);
|
|
13650
|
+
assign(result, parsePath(path), parseJsonValue(value2), true);
|
|
13651
|
+
assertDenseArrays(result);
|
|
13652
|
+
return result;
|
|
13653
|
+
}
|
|
12418
13654
|
export {
|
|
12419
13655
|
AIGatewayApiKeysClient,
|
|
12420
13656
|
AIGatewayAuditLogsClient,
|
|
@@ -12431,6 +13667,18 @@ export {
|
|
|
12431
13667
|
AIGatewayWorkspacesClient,
|
|
12432
13668
|
AIRS_ENDPOINTS,
|
|
12433
13669
|
AISecSDKException,
|
|
13670
|
+
AI_GATEWAY_DEPLOYMENT_STATUSES,
|
|
13671
|
+
AI_GATEWAY_DEPLOYMENT_TYPES,
|
|
13672
|
+
AI_GATEWAY_KNOWN_API_KEY_SCOPES,
|
|
13673
|
+
AI_GATEWAY_KNOWN_CACHE_MODES,
|
|
13674
|
+
AI_GATEWAY_KNOWN_CONFIG_STRATEGIES,
|
|
13675
|
+
AI_GATEWAY_KNOWN_MCP_AUTH_TYPES,
|
|
13676
|
+
AI_GATEWAY_KNOWN_MCP_TRANSPORTS,
|
|
13677
|
+
AI_GATEWAY_KNOWN_RATE_LIMIT_TYPES,
|
|
13678
|
+
AI_GATEWAY_KNOWN_RATE_LIMIT_UNITS,
|
|
13679
|
+
AI_GATEWAY_MUTABLE_MCP_CAPABILITY_TYPES,
|
|
13680
|
+
AI_GATEWAY_REDACTED,
|
|
13681
|
+
AI_GATEWAY_SECRET_FIELDS,
|
|
12434
13682
|
AI_GW_ADMIN_ENDPOINT,
|
|
12435
13683
|
AI_GW_API_KEYS_SERVICE_PATH,
|
|
12436
13684
|
AI_GW_API_KEYS_USER_PATH,
|
|
@@ -12682,35 +13930,100 @@ export {
|
|
|
12682
13930
|
FileScanDataSchema,
|
|
12683
13931
|
FileScanResult,
|
|
12684
13932
|
FileType,
|
|
13933
|
+
GatewayApiKeyCreateRequestSchema,
|
|
13934
|
+
GatewayApiKeyRotateRequestSchema,
|
|
13935
|
+
GatewayApiKeyRotateResponseSchema,
|
|
13936
|
+
GatewayApiKeyRotationPolicySchema,
|
|
12685
13937
|
GatewayApiKeySchema,
|
|
13938
|
+
GatewayApiKeyScopeSchema,
|
|
13939
|
+
GatewayApiKeyUpdateRequestSchema,
|
|
12686
13940
|
GatewayAuditLogRecordSchema,
|
|
12687
13941
|
GatewayAuditLogsResponseSchema,
|
|
13942
|
+
GatewayAzureAIConfigurationSchema,
|
|
13943
|
+
GatewayAzureDeploymentConfigurationSchema,
|
|
13944
|
+
GatewayAzureOpenAIConfigurationSchema,
|
|
13945
|
+
GatewayBedrockConfigurationSchema,
|
|
12688
13946
|
GatewayChartRecordSchema,
|
|
13947
|
+
GatewayConfigCacheModeSchema,
|
|
13948
|
+
GatewayConfigCreateRequestSchema,
|
|
12689
13949
|
GatewayConfigCreateResponseSchema,
|
|
12690
13950
|
GatewayConfigDetailSchema,
|
|
12691
13951
|
GatewayConfigSchema,
|
|
13952
|
+
GatewayConfigStrategySchema,
|
|
13953
|
+
GatewayConfigUpdateRequestSchema,
|
|
13954
|
+
GatewayConfigVersionSchema,
|
|
13955
|
+
GatewayCortexConfigurationSchema,
|
|
13956
|
+
GatewayCustomHostConfigurationSchema,
|
|
13957
|
+
GatewayDefaultsInputSchema,
|
|
13958
|
+
GatewayDeploymentAuthSettingsInputSchema,
|
|
13959
|
+
GatewayDeploymentCreateRequestSchema,
|
|
12692
13960
|
GatewayDeploymentCreateResponseSchema,
|
|
12693
13961
|
GatewayDeploymentDetailSchema,
|
|
13962
|
+
GatewayDeploymentPingResponseSchema,
|
|
12694
13963
|
GatewayDeploymentSchema,
|
|
13964
|
+
GatewayDeploymentStatusSchema,
|
|
13965
|
+
GatewayDeploymentTypeSchema,
|
|
13966
|
+
GatewayDeploymentUpdateRequestSchema,
|
|
13967
|
+
GatewayGlobalWorkspaceAccessInputSchema,
|
|
12695
13968
|
GatewayGlobalWorkspaceAccessSchema,
|
|
12696
13969
|
GatewayGroupRowSchema,
|
|
13970
|
+
GatewayGuardrailActionsSchema,
|
|
13971
|
+
GatewayGuardrailCheckSchema,
|
|
13972
|
+
GatewayGuardrailCreateRequestSchema,
|
|
12697
13973
|
GatewayGuardrailCreateResponseSchema,
|
|
12698
13974
|
GatewayGuardrailDetailSchema,
|
|
12699
13975
|
GatewayGuardrailSchema,
|
|
13976
|
+
GatewayGuardrailUpdateRequestSchema,
|
|
13977
|
+
GatewayHuggingFaceConfigurationSchema,
|
|
13978
|
+
GatewayIntegrationCreateRequestSchema,
|
|
13979
|
+
GatewayIntegrationModelUpdateSchema,
|
|
13980
|
+
GatewayIntegrationModelsBulkUpdateRequestSchema,
|
|
12700
13981
|
GatewayIntegrationModelsResponseSchema,
|
|
12701
13982
|
GatewayIntegrationSchema,
|
|
13983
|
+
GatewayIntegrationUpdateRequestSchema,
|
|
12702
13984
|
GatewayIntegrationWorkspaceSchema,
|
|
13985
|
+
GatewayIntegrationWorkspacesBulkUpdateRequestSchema,
|
|
12703
13986
|
GatewayIntegrationWorkspacesResponseSchema,
|
|
13987
|
+
GatewayJsonObjectSchema,
|
|
13988
|
+
GatewayJsonValueSchema,
|
|
12704
13989
|
GatewayLogRecordSchema,
|
|
12705
13990
|
GatewayLogsResponseSchema,
|
|
13991
|
+
GatewayMcpAuthTypeSchema,
|
|
13992
|
+
GatewayMcpTransportSchema,
|
|
13993
|
+
GatewayMutableMcpCapabilityTypeSchema,
|
|
13994
|
+
GatewayOpenAIConfigurationSchema,
|
|
13995
|
+
GatewayOrganisationAuthSettingsUpdateRequestSchema,
|
|
13996
|
+
GatewayOrganisationUpdateRequestSchema,
|
|
13997
|
+
GatewayPluginCreateRequestSchema,
|
|
12706
13998
|
GatewayPluginSchema,
|
|
13999
|
+
GatewayProviderCreateRequestSchema,
|
|
12707
14000
|
GatewayProviderCreateResponseSchema,
|
|
14001
|
+
GatewayProviderDetailSchema,
|
|
12708
14002
|
GatewayProviderSchema,
|
|
14003
|
+
GatewayProviderUpdateRequestSchema,
|
|
14004
|
+
GatewayRateLimitInputSchema,
|
|
12709
14005
|
GatewayRateLimitSchema,
|
|
14006
|
+
GatewayRateLimitTypeSchema,
|
|
14007
|
+
GatewayRateLimitUnitSchema,
|
|
14008
|
+
GatewayRoutingCacheSchema,
|
|
14009
|
+
GatewayRoutingConfigSchema,
|
|
14010
|
+
GatewayRoutingRetrySchema,
|
|
14011
|
+
GatewayRoutingStrategySchema,
|
|
14012
|
+
GatewayRoutingTargetSchema,
|
|
14013
|
+
GatewaySageMakerConfigurationSchema,
|
|
14014
|
+
GatewaySecretMappingSchema,
|
|
14015
|
+
GatewayServiceApiKeyCreateRequestSchema,
|
|
14016
|
+
GatewayUsageLimitInputSchema,
|
|
12710
14017
|
GatewayUsageLimitSchema,
|
|
14018
|
+
GatewayUserApiKeyCreateRequestSchema,
|
|
14019
|
+
GatewayVertexAIConfigurationSchema,
|
|
14020
|
+
GatewayWorkersAIConfigurationSchema,
|
|
14021
|
+
GatewayWorkspaceBindingSchema,
|
|
14022
|
+
GatewayWorkspaceCreateRequestSchema,
|
|
12711
14023
|
GatewayWorkspaceCreateResponseSchema,
|
|
12712
14024
|
GatewayWorkspaceDetailSchema,
|
|
12713
14025
|
GatewayWorkspaceSchema,
|
|
14026
|
+
GatewayWorkspaceUpdateRequestSchema,
|
|
12714
14027
|
GatewayWriteResponseSchema,
|
|
12715
14028
|
GoalListResponseSchema,
|
|
12716
14029
|
GoalSchema,
|
|
@@ -12745,6 +14058,7 @@ export {
|
|
|
12745
14058
|
LanguageOptionSchema,
|
|
12746
14059
|
LatencyChartResponseSchema,
|
|
12747
14060
|
ListApiKeysResponseSchema,
|
|
14061
|
+
ListConfigVersionsResponseSchema,
|
|
12748
14062
|
ListConfigsResponseSchema,
|
|
12749
14063
|
ListDeploymentsResponseSchema,
|
|
12750
14064
|
ListGuardrailsResponseSchema,
|
|
@@ -12813,7 +14127,18 @@ export {
|
|
|
12813
14127
|
MaskedDataSchema,
|
|
12814
14128
|
McEntrySchema,
|
|
12815
14129
|
McReportSchema,
|
|
14130
|
+
McpIntegrationCapabilitiesBulkUpdateRequestSchema,
|
|
14131
|
+
McpIntegrationCapabilitiesResponseSchema,
|
|
14132
|
+
McpIntegrationCapabilitiesUpdateResponseSchema,
|
|
14133
|
+
McpIntegrationCapabilitySchema,
|
|
14134
|
+
McpIntegrationCapabilityUpdateSchema,
|
|
14135
|
+
McpIntegrationCreateRequestSchema,
|
|
14136
|
+
McpIntegrationDetailSchema,
|
|
14137
|
+
McpIntegrationMetadataSchema,
|
|
12816
14138
|
McpIntegrationSchema,
|
|
14139
|
+
McpIntegrationUpdateRequestSchema,
|
|
14140
|
+
McpIntegrationWorkspacesBulkUpdateRequestSchema,
|
|
14141
|
+
McpIntegrationWorkspacesUpdateResponseSchema,
|
|
12817
14142
|
MetadataCriterionSchema,
|
|
12818
14143
|
MetadataSchema,
|
|
12819
14144
|
ModelConfigurationSchema,
|
|
@@ -13056,6 +14381,7 @@ export {
|
|
|
13056
14381
|
WebSocketConnectionParamsSchema,
|
|
13057
14382
|
WeightedRegexSchema,
|
|
13058
14383
|
aiGwOrganisationsAuthSettingsPath,
|
|
14384
|
+
buildDottedObject,
|
|
13059
14385
|
collectAll,
|
|
13060
14386
|
collectSkipPages,
|
|
13061
14387
|
collectSpringPages,
|
|
@@ -13064,6 +14390,8 @@ export {
|
|
|
13064
14390
|
jsonNullable,
|
|
13065
14391
|
pageSchema,
|
|
13066
14392
|
paginate,
|
|
13067
|
-
|
|
14393
|
+
redactAIGatewaySecrets,
|
|
14394
|
+
serializeListing,
|
|
14395
|
+
setDottedValue
|
|
13068
14396
|
};
|
|
13069
14397
|
//# sourceMappingURL=index.js.map
|