@cdot65/prisma-airs-sdk 0.12.0 → 0.13.1

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/dist/index.cjs CHANGED
@@ -66,6 +66,12 @@ __export(index_exports, {
66
66
  CategoryModelSchema: () => CategoryModelSchema,
67
67
  CategoryReportSchema: () => CategoryReportSchema,
68
68
  CgReportSchema: () => CgReportSchema,
69
+ ChannelListPaginationSchema: () => ChannelListPaginationSchema,
70
+ ChannelListResponseSchema: () => ChannelListResponseSchema,
71
+ ChannelSchema: () => ChannelSchema,
72
+ ChannelStatsSchema: () => ChannelStatsSchema,
73
+ ChannelStatus: () => ChannelStatus,
74
+ ChannelStatusSchema: () => ChannelStatusSchema,
69
75
  ClientIdAndCustomerAppSchema: () => ClientIdAndCustomerAppSchema,
70
76
  CmdEntrySchema: () => CmdEntrySchema,
71
77
  CmdInjectReportSchema: () => CmdInjectReportSchema,
@@ -79,6 +85,7 @@ __export(index_exports, {
79
85
  ContentErrorType: () => ContentErrorType,
80
86
  CountByNameSchema: () => CountByNameSchema,
81
87
  CountedQuotaEnum: () => CountedQuotaEnum,
88
+ CreateChannelRequestSchema: () => CreateChannelRequestSchema,
82
89
  CreateCustomTopicRequestSchema: () => CreateCustomTopicRequestSchema,
83
90
  CreateSecurityProfileRequestSchema: () => CreateSecurityProfileRequestSchema,
84
91
  CustomAttackOutputSchema: () => CustomAttackOutputSchema,
@@ -113,6 +120,7 @@ __export(index_exports, {
113
120
  DEFAULT_MODEL_SEC_MGMT_ENDPOINT: () => DEFAULT_MODEL_SEC_MGMT_ENDPOINT,
114
121
  DEFAULT_RED_TEAM_DATA_ENDPOINT: () => DEFAULT_RED_TEAM_DATA_ENDPOINT,
115
122
  DEFAULT_RED_TEAM_MGMT_ENDPOINT: () => DEFAULT_RED_TEAM_MGMT_ENDPOINT,
123
+ DEFAULT_RED_TEAM_NETWORK_BROKER_ENDPOINT: () => DEFAULT_RED_TEAM_NETWORK_BROKER_ENDPOINT,
116
124
  DEFAULT_TOKEN_ENDPOINT: () => DEFAULT_TOKEN_ENDPOINT,
117
125
  DLP_DATA_FILTERING_PROFILES_PATH: () => DLP_DATA_FILTERING_PROFILES_PATH,
118
126
  DLP_DATA_PATTERNS_PATH: () => DLP_DATA_PATTERNS_PATH,
@@ -254,6 +262,7 @@ __export(index_exports, {
254
262
  LabelValueListSchema: () => LabelValueListSchema,
255
263
  LabelsCreateRequestSchema: () => LabelsCreateRequestSchema,
256
264
  LabelsResponseSchema: () => LabelsResponseSchema,
265
+ LanguageOptionSchema: () => LanguageOptionSchema,
257
266
  ListModelSecurityGroupsResponseSchema: () => ListModelSecurityGroupsResponseSchema,
258
267
  ListModelSecurityRuleInstancesResponseSchema: () => ListModelSecurityRuleInstancesResponseSchema,
259
268
  ListModelSecurityRulesResponseSchema: () => ListModelSecurityRulesResponseSchema,
@@ -299,6 +308,8 @@ __export(index_exports, {
299
308
  MODEL_SEC_DATA_ENDPOINT: () => MODEL_SEC_DATA_ENDPOINT,
300
309
  MODEL_SEC_EVALUATIONS_PATH: () => MODEL_SEC_EVALUATIONS_PATH,
301
310
  MODEL_SEC_MGMT_ENDPOINT: () => MODEL_SEC_MGMT_ENDPOINT,
311
+ MODEL_SEC_MODELS_PATH: () => MODEL_SEC_MODELS_PATH,
312
+ MODEL_SEC_MODEL_VERSIONS_PATH: () => MODEL_SEC_MODEL_VERSIONS_PATH,
302
313
  MODEL_SEC_PYPI_AUTH_PATH: () => MODEL_SEC_PYPI_AUTH_PATH,
303
314
  MODEL_SEC_SCANS_PATH: () => MODEL_SEC_SCANS_PATH,
304
315
  MODEL_SEC_SECURITY_GROUPS_PATH: () => MODEL_SEC_SECURITY_GROUPS_PATH,
@@ -315,7 +326,9 @@ __export(index_exports, {
315
326
  MetadataCriterionSchema: () => MetadataCriterionSchema,
316
327
  MetadataSchema: () => MetadataSchema,
317
328
  ModelConfigurationSchema: () => ModelConfigurationSchema,
329
+ ModelListSchema: () => ModelListSchema,
318
330
  ModelProtectionItemSchema: () => ModelProtectionItemSchema,
331
+ ModelResponseSchema: () => ModelResponseSchema,
319
332
  ModelScanIssueSchema: () => ModelScanIssueSchema,
320
333
  ModelScanStatus: () => ModelScanStatus,
321
334
  ModelSecurityClient: () => ModelSecurityClient,
@@ -324,12 +337,15 @@ __export(index_exports, {
324
337
  ModelSecurityGroupState: () => ModelSecurityGroupState,
325
338
  ModelSecurityGroupUpdateRequestSchema: () => ModelSecurityGroupUpdateRequestSchema,
326
339
  ModelSecurityGroupsClient: () => ModelSecurityGroupsClient,
340
+ ModelSecurityModelsClient: () => ModelSecurityModelsClient,
327
341
  ModelSecurityPaginationSchema: () => ModelSecurityPaginationSchema,
328
342
  ModelSecurityRuleInstanceResponseSchema: () => ModelSecurityRuleInstanceResponseSchema,
329
343
  ModelSecurityRuleInstanceUpdateRequestSchema: () => ModelSecurityRuleInstanceUpdateRequestSchema,
330
344
  ModelSecurityRuleResponseSchema: () => ModelSecurityRuleResponseSchema,
331
345
  ModelSecurityRulesClient: () => ModelSecurityRulesClient,
332
346
  ModelSecurityScansClient: () => ModelSecurityScansClient,
347
+ ModelVersionListSchema: () => ModelVersionListSchema,
348
+ ModelVersionResponseSchema: () => ModelVersionResponseSchema,
333
349
  MultiProfileDataNodeSchema: () => MultiProfileDataNodeSchema,
334
350
  MultiProfileDetectionRuleSchema: () => MultiProfileDetectionRuleSchema,
335
351
  MultiTurnStatefulConfigSchema: () => MultiTurnStatefulConfigSchema,
@@ -374,6 +390,8 @@ __export(index_exports, {
374
390
  QuotaDetailsSchema: () => QuotaDetailsSchema,
375
391
  QuotaSummarySchema: () => QuotaSummarySchema,
376
392
  RED_TEAM_CATEGORIES_PATH: () => RED_TEAM_CATEGORIES_PATH,
393
+ RED_TEAM_CHANNELS_PATH: () => RED_TEAM_CHANNELS_PATH,
394
+ RED_TEAM_CHANNELS_STATS_PATH: () => RED_TEAM_CHANNELS_STATS_PATH,
377
395
  RED_TEAM_CLIENT_ID: () => RED_TEAM_CLIENT_ID,
378
396
  RED_TEAM_CLIENT_SECRET: () => RED_TEAM_CLIENT_SECRET,
379
397
  RED_TEAM_CUSTOM_ATTACKS_REPORT_PATH: () => RED_TEAM_CUSTOM_ATTACKS_REPORT_PATH,
@@ -381,10 +399,13 @@ __export(index_exports, {
381
399
  RED_TEAM_DASHBOARD_PATH: () => RED_TEAM_DASHBOARD_PATH,
382
400
  RED_TEAM_DATA_ENDPOINT: () => RED_TEAM_DATA_ENDPOINT,
383
401
  RED_TEAM_ERROR_LOG_PATH: () => RED_TEAM_ERROR_LOG_PATH,
402
+ RED_TEAM_ERROR_LOG_TARGET_PROFILE_PATH: () => RED_TEAM_ERROR_LOG_TARGET_PROFILE_PATH,
384
403
  RED_TEAM_EULA_PATH: () => RED_TEAM_EULA_PATH,
385
404
  RED_TEAM_INSTANCES_PATH: () => RED_TEAM_INSTANCES_PATH,
405
+ RED_TEAM_LANGUAGES_PATH: () => RED_TEAM_LANGUAGES_PATH,
386
406
  RED_TEAM_MGMT_DASHBOARD_PATH: () => RED_TEAM_MGMT_DASHBOARD_PATH,
387
407
  RED_TEAM_MGMT_ENDPOINT: () => RED_TEAM_MGMT_ENDPOINT,
408
+ RED_TEAM_NETWORK_BROKER_ENDPOINT: () => RED_TEAM_NETWORK_BROKER_ENDPOINT,
388
409
  RED_TEAM_QUOTA_PATH: () => RED_TEAM_QUOTA_PATH,
389
410
  RED_TEAM_REGISTRY_CREDENTIALS_PATH: () => RED_TEAM_REGISTRY_CREDENTIALS_PATH,
390
411
  RED_TEAM_REPORT_DYNAMIC_PATH: () => RED_TEAM_REPORT_DYNAMIC_PATH,
@@ -404,6 +425,7 @@ __export(index_exports, {
404
425
  RedTeamErrorType: () => RedTeamErrorType,
405
426
  RedTeamEulaClient: () => RedTeamEulaClient,
406
427
  RedTeamInstancesClient: () => RedTeamInstancesClient,
428
+ RedTeamNetworkBrokerClient: () => RedTeamNetworkBrokerClient,
407
429
  RedTeamPaginationSchema: () => RedTeamPaginationSchema,
408
430
  RedTeamReportsClient: () => RedTeamReportsClient,
409
431
  RedTeamScansClient: () => RedTeamScansClient,
@@ -506,6 +528,7 @@ __export(index_exports, {
506
528
  TargetType: () => TargetType,
507
529
  TargetUpdateRequestSchema: () => TargetUpdateRequestSchema,
508
530
  TcReportSchema: () => TcReportSchema,
531
+ TenantLanguagesResponseSchema: () => TenantLanguagesResponseSchema,
509
532
  TgReportSchema: () => TgReportSchema,
510
533
  ThreatCategory: () => ThreatCategory,
511
534
  ThreatScanReportSchema: () => ThreatScanReportSchema,
@@ -521,11 +544,13 @@ __export(index_exports, {
521
544
  TopicsClient: () => TopicsClient,
522
545
  URLExclusionSchema: () => URLExclusionSchema,
523
546
  USER_AGENT: () => USER_AGENT,
547
+ UpdateChannelRequestSchema: () => UpdateChannelRequestSchema,
524
548
  UrlCategorySchema: () => UrlCategorySchema,
525
549
  UrlfEntrySchema: () => UrlfEntrySchema,
526
550
  ValidationErrorSchema: () => ValidationErrorSchema,
527
551
  Verdict: () => Verdict,
528
552
  ViolationListSchema: () => ViolationListSchema,
553
+ ViolationRemediationSchema: () => ViolationRemediationSchema,
529
554
  ViolationResponseSchema: () => ViolationResponseSchema,
530
555
  ViolationSeverityCountsSchema: () => ViolationSeverityCountsSchema,
531
556
  WebSocketConnectionParamsSchema: () => WebSocketConnectionParamsSchema,
@@ -568,7 +593,7 @@ var MAX_NUMBER_OF_BATCH_SCAN_OBJECTS = 5;
568
593
  var MAX_CONNECTION_POOL_SIZE = 100;
569
594
  var MAX_NUMBER_OF_RETRIES = 5;
570
595
  var HTTP_FORCE_RETRY_STATUS_CODES = [500, 502, 503, 504];
571
- var SDK_VERSION = "0.12.0";
596
+ var SDK_VERSION = "0.13.1";
572
597
  var USER_AGENT = `PAN-AIRS/${SDK_VERSION}-typescript-sdk`;
573
598
  var DEFAULT_MGMT_ENDPOINT = "https://api.sase.paloaltonetworks.com/aisec";
574
599
  var DEFAULT_TOKEN_ENDPOINT = "https://auth.apps.paloaltonetworks.com/oauth2/access_token";
@@ -614,17 +639,21 @@ var MODEL_SEC_TOKEN_ENDPOINT = "PANW_MODEL_SEC_TOKEN_ENDPOINT";
614
639
  var MODEL_SEC_SCANS_PATH = "/v1/scans";
615
640
  var MODEL_SEC_EVALUATIONS_PATH = "/v1/evaluations";
616
641
  var MODEL_SEC_VIOLATIONS_PATH = "/v1/violations";
642
+ var MODEL_SEC_MODELS_PATH = "/v1/models";
643
+ var MODEL_SEC_MODEL_VERSIONS_PATH = "/v1/model-versions";
617
644
  var MODEL_SEC_SECURITY_GROUPS_PATH = "/v1/security-groups";
618
645
  var MODEL_SEC_SECURITY_RULES_PATH = "/v1/security-rules";
619
646
  var MODEL_SEC_PYPI_AUTH_PATH = "/v1/pypi/authenticate";
620
647
  var DEFAULT_RED_TEAM_DATA_ENDPOINT = "https://api.sase.paloaltonetworks.com/ai-red-teaming/data-plane";
621
648
  var DEFAULT_RED_TEAM_MGMT_ENDPOINT = "https://api.sase.paloaltonetworks.com/ai-red-teaming/mgmt-plane";
649
+ var DEFAULT_RED_TEAM_NETWORK_BROKER_ENDPOINT = "https://api.sase.paloaltonetworks.com/ai-red-teaming/data-plane/network-broker";
622
650
  var RED_TEAM_CLIENT_ID = "PANW_RED_TEAM_CLIENT_ID";
623
651
  var RED_TEAM_CLIENT_SECRET = "PANW_RED_TEAM_CLIENT_SECRET";
624
652
  var RED_TEAM_TSG_ID = "PANW_RED_TEAM_TSG_ID";
625
653
  var RED_TEAM_DATA_ENDPOINT = "PANW_RED_TEAM_DATA_ENDPOINT";
626
654
  var RED_TEAM_MGMT_ENDPOINT = "PANW_RED_TEAM_MGMT_ENDPOINT";
627
655
  var RED_TEAM_TOKEN_ENDPOINT = "PANW_RED_TEAM_TOKEN_ENDPOINT";
656
+ var RED_TEAM_NETWORK_BROKER_ENDPOINT = "PANW_RED_TEAM_NETWORK_BROKER_ENDPOINT";
628
657
  var RED_TEAM_SCAN_PATH = "/v1/scan";
629
658
  var RED_TEAM_CATEGORIES_PATH = "/v1/categories";
630
659
  var RED_TEAM_REPORT_STATIC_PATH = "/v1/report/static";
@@ -635,6 +664,8 @@ var RED_TEAM_DASHBOARD_PATH = "/v1/dashboard";
635
664
  var RED_TEAM_QUOTA_PATH = "/v1/metering/quota";
636
665
  var RED_TEAM_ERROR_LOG_PATH = "/v1/error-log/job";
637
666
  var RED_TEAM_SENTIMENT_PATH = "/v1/sentiment";
667
+ var RED_TEAM_LANGUAGES_PATH = "/v1/languages";
668
+ var RED_TEAM_ERROR_LOG_TARGET_PROFILE_PATH = "/v1/error-log/target-profile";
638
669
  var RED_TEAM_TARGET_PATH = "/v1/target";
639
670
  var RED_TEAM_TARGET_VALIDATE_AUTH_PATH = "/v1/target/validate-auth";
640
671
  var RED_TEAM_TEMPLATE_PATH = "/v1/template";
@@ -643,6 +674,8 @@ var RED_TEAM_INSTANCES_PATH = "/v1/instances";
643
674
  var RED_TEAM_REGISTRY_CREDENTIALS_PATH = "/v1/registry-credentials";
644
675
  var RED_TEAM_CUSTOM_ATTACK_PATH = "/v1/custom-attack";
645
676
  var RED_TEAM_MGMT_DASHBOARD_PATH = "/v1/dashboard/overview";
677
+ var RED_TEAM_CHANNELS_PATH = "/v1/channels";
678
+ var RED_TEAM_CHANNELS_STATS_PATH = "/v1/channels/stats";
646
679
 
647
680
  // src/errors.ts
648
681
  var ErrorType = /* @__PURE__ */ ((ErrorType2) => {
@@ -660,11 +693,15 @@ var AISecSDKException = class _AISecSDKException extends Error {
660
693
  /**
661
694
  * @param message - Human-readable error description.
662
695
  * @param errorType - Classification of the error.
696
+ * @param metadata - Optional transport failure metadata.
663
697
  */
664
- constructor(message, errorType) {
698
+ constructor(message, errorType, metadata = {}) {
665
699
  super(errorType ? `${errorType}:${message}` : message);
666
700
  this.name = "AISecSDKException";
667
701
  this.errorType = errorType;
702
+ if (metadata.failureKind !== void 0) this.failureKind = metadata.failureKind;
703
+ if (metadata.statusCode !== void 0) this.statusCode = metadata.statusCode;
704
+ if (metadata.retryAfterMs !== void 0) this.retryAfterMs = metadata.retryAfterMs;
668
705
  if (Error.captureStackTrace) {
669
706
  Error.captureStackTrace(this, _AISecSDKException);
670
707
  }
@@ -806,6 +843,59 @@ function extractErrorMessage(body, status) {
806
843
  return body ? `API error ${status}: ${body}` : `API error ${status}`;
807
844
  }
808
845
  }
846
+ function parseRetryAfterHeader(value) {
847
+ if (value === null) return void 0;
848
+ const normalized = value.trim();
849
+ if (/^\d+$/.test(normalized)) {
850
+ const milliseconds = Number(normalized) * 1e3;
851
+ return Number.isFinite(milliseconds) ? milliseconds : void 0;
852
+ }
853
+ const weekday = "(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)";
854
+ const longWeekday = "(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday)";
855
+ const month = "(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)";
856
+ const httpDatePatterns = [
857
+ new RegExp(`^${weekday}, \\d{2} ${month} \\d{4} \\d{2}:\\d{2}:\\d{2} GMT$`),
858
+ new RegExp(`^${longWeekday}, \\d{2}-${month}-\\d{2} \\d{2}:\\d{2}:\\d{2} GMT$`),
859
+ new RegExp(`^${weekday} ${month} [ \\d]\\d \\d{2}:\\d{2}:\\d{2} \\d{4}$`)
860
+ ];
861
+ if (!httpDatePatterns.some((pattern) => pattern.test(normalized))) return void 0;
862
+ const timestamp = Date.parse(normalized);
863
+ if (!Number.isFinite(timestamp)) return void 0;
864
+ return Math.max(0, timestamp - Date.now());
865
+ }
866
+ function parseRetryAfterBody(body) {
867
+ try {
868
+ const parsed = JSON.parse(body);
869
+ const interval = parsed.retry_after?.interval;
870
+ const unit = parsed.retry_after?.unit;
871
+ if (typeof interval !== "number" || !Number.isFinite(interval) || interval < 0)
872
+ return void 0;
873
+ if (typeof unit !== "string") return void 0;
874
+ const unitMultipliers = {
875
+ ms: 1,
876
+ msec: 1,
877
+ msecs: 1,
878
+ millisecond: 1,
879
+ milliseconds: 1,
880
+ s: 1e3,
881
+ sec: 1e3,
882
+ secs: 1e3,
883
+ second: 1e3,
884
+ seconds: 1e3,
885
+ m: 6e4,
886
+ min: 6e4,
887
+ mins: 6e4,
888
+ minute: 6e4,
889
+ minutes: 6e4
890
+ };
891
+ const multiplier = unitMultipliers[unit.toLowerCase()];
892
+ if (multiplier === void 0) return void 0;
893
+ const milliseconds = interval * multiplier;
894
+ return Number.isFinite(milliseconds) ? milliseconds : void 0;
895
+ } catch {
896
+ return void 0;
897
+ }
898
+ }
809
899
  async function executeWithRetry(opts) {
810
900
  const { maxRetries, execute, onRetryableFailure } = opts;
811
901
  let lastError;
@@ -822,7 +912,8 @@ async function executeWithRetry(opts) {
822
912
  }
823
913
  throw new AISecSDKException(
824
914
  lastError.message ?? "Network error",
825
- "AISEC_CLIENT_SIDE_ERROR" /* CLIENT_SIDE_ERROR */
915
+ "AISEC_CLIENT_SIDE_ERROR" /* CLIENT_SIDE_ERROR */,
916
+ { failureKind: "network" }
826
917
  );
827
918
  }
828
919
  if (response.ok) return response;
@@ -839,17 +930,53 @@ async function executeWithRetry(opts) {
839
930
  }
840
931
  const errorText = await response.text();
841
932
  const errorMessage = extractErrorMessage(errorText, response.status);
842
- throw new AISecSDKException(errorMessage, classifyErrorType(response.status));
933
+ const retryAfterHeader = response.headers?.get?.("Retry-After") ?? null;
934
+ const headerRetryAfterMs = parseRetryAfterHeader(retryAfterHeader);
935
+ throw new AISecSDKException(errorMessage, classifyErrorType(response.status), {
936
+ failureKind: "http",
937
+ statusCode: response.status,
938
+ retryAfterMs: headerRetryAfterMs ?? parseRetryAfterBody(errorText)
939
+ });
843
940
  }
844
941
  throw new AISecSDKException(
845
942
  lastError?.message ?? "Max retries exceeded",
846
- "AISEC_CLIENT_SIDE_ERROR" /* CLIENT_SIDE_ERROR */
943
+ "AISEC_CLIENT_SIDE_ERROR" /* CLIENT_SIDE_ERROR */,
944
+ lastError ? { failureKind: "network" } : {}
847
945
  );
848
946
  }
849
947
 
948
+ // src/http/debug.ts
949
+ var import_node_crypto2 = require("crypto");
950
+ var TRUTHY = /* @__PURE__ */ new Set(["1", "true", "yes", "on"]);
951
+ var SENSITIVE_HEADERS = /* @__PURE__ */ new Set([HEADER_AUTH_TOKEN.toLowerCase(), HEADER_API_KEY.toLowerCase()]);
952
+ var PREFIX = "[airs-sdk]";
953
+ function isDebugEnabled() {
954
+ const raw = process.env.PANW_AI_SEC_DEBUG;
955
+ return raw !== void 0 && TRUTHY.has(raw.trim().toLowerCase());
956
+ }
957
+ function hashToken(value) {
958
+ return "sha256:" + (0, import_node_crypto2.createHash)("sha256").update(value).digest("hex").slice(0, 12);
959
+ }
960
+ function sanitizeHeaders(headers) {
961
+ const out = {};
962
+ for (const [key, value] of Object.entries(headers)) {
963
+ out[key] = SENSITIVE_HEADERS.has(key.toLowerCase()) ? hashToken(value) : value;
964
+ }
965
+ return out;
966
+ }
967
+ function logRequest(method, url, headers, body) {
968
+ console.error(`${PREFIX} \u2192 ${method} ${url}`);
969
+ console.error(`${PREFIX} headers ${JSON.stringify(sanitizeHeaders(headers))}`);
970
+ if (body !== void 0) console.error(`${PREFIX} body ${body}`);
971
+ }
972
+ function logResponse(status, ms, body) {
973
+ console.error(`${PREFIX} \u2190 ${status} (${ms}ms)${body !== void 0 ? ` ${body}` : ""}`);
974
+ }
975
+
850
976
  // src/http/request.ts
851
977
  async function request(spec) {
852
978
  let hasRetriedAuth = false;
979
+ const debug = isDebugEnabled();
853
980
  const response = await executeWithRetry({
854
981
  maxRetries: spec.numRetries,
855
982
  execute: async () => {
@@ -879,11 +1006,25 @@ async function request(spec) {
879
1006
  }
880
1007
  const prepared = { method: spec.method, url, headers, bodyText };
881
1008
  const final = await spec.auth.prepare(prepared);
882
- return fetch(final.url.toString(), {
1009
+ const startedAt = debug ? Date.now() : 0;
1010
+ if (debug) {
1011
+ const logBody = spec.formData !== void 0 ? "[multipart/form-data]" : final.bodyText;
1012
+ logRequest(final.method, final.url.toString(), final.headers, logBody);
1013
+ }
1014
+ const res = await fetch(final.url.toString(), {
883
1015
  method: final.method,
884
1016
  headers: final.headers,
885
1017
  body: spec.formData !== void 0 ? bodyForFetch : final.bodyText
886
1018
  });
1019
+ if (debug) {
1020
+ let respBody;
1021
+ try {
1022
+ respBody = await res.clone().text();
1023
+ } catch {
1024
+ }
1025
+ logResponse(res.status, Date.now() - startedAt, respBody);
1026
+ }
1027
+ return res;
887
1028
  },
888
1029
  onRetryableFailure: async (res) => {
889
1030
  if (hasRetriedAuth) return false;
@@ -933,6 +1074,7 @@ var PromptDetectedSchema = import_zod.z.object({
933
1074
  injection: import_zod.z.boolean().optional(),
934
1075
  toxic_content: import_zod.z.boolean().optional(),
935
1076
  malicious_code: import_zod.z.boolean().optional(),
1077
+ source_code: import_zod.z.boolean().optional(),
936
1078
  agent: import_zod.z.boolean().optional(),
937
1079
  topic_violation: import_zod.z.boolean().optional()
938
1080
  }).passthrough();
@@ -1237,6 +1379,16 @@ var ThreatScanReportSchema = import_zod14.z.object({
1237
1379
  }).passthrough();
1238
1380
 
1239
1381
  // src/scan/scanner.ts
1382
+ function resolveNumRetries(opts) {
1383
+ const numRetries = opts.numRetries ?? globalConfiguration.numRetries;
1384
+ if (!Number.isFinite(numRetries) || !Number.isInteger(numRetries) || numRetries < 0 || numRetries > MAX_NUMBER_OF_RETRIES) {
1385
+ throw new AISecSDKException(
1386
+ `numRetries must be a finite integer between 0 and ${MAX_NUMBER_OF_RETRIES}`,
1387
+ "AISEC_USER_REQUEST_PAYLOAD_ERROR" /* USER_REQUEST_PAYLOAD_ERROR */
1388
+ );
1389
+ }
1390
+ return numRetries;
1391
+ }
1240
1392
  var Scanner = class {
1241
1393
  /**
1242
1394
  * @internal
@@ -1257,7 +1409,7 @@ var Scanner = class {
1257
1409
  * Perform a synchronous content scan.
1258
1410
  * @param aiProfile - AI security profile to scan against.
1259
1411
  * @param content - Content to scan.
1260
- * @param opts - Optional transaction/session IDs and metadata.
1412
+ * @param opts - Optional transaction/session IDs, metadata, and per-call retry override.
1261
1413
  * @returns Scan response with verdict, action, and detection details.
1262
1414
  * @example
1263
1415
  * ```ts
@@ -1276,6 +1428,7 @@ var Scanner = class {
1276
1428
  * ```
1277
1429
  */
1278
1430
  async syncScan(aiProfile, content, opts = {}) {
1431
+ const numRetries = resolveNumRetries(opts);
1279
1432
  if (opts.trId && opts.trId.length > MAX_TRANSACTION_ID_STR_LENGTH) {
1280
1433
  throw new AISecSDKException(
1281
1434
  `trId exceeds max length of ${MAX_TRANSACTION_ID_STR_LENGTH}`,
@@ -1302,33 +1455,52 @@ var Scanner = class {
1302
1455
  body,
1303
1456
  responseSchema: ScanResponseSchema,
1304
1457
  auth: this.buildAuth(),
1305
- numRetries: globalConfiguration.numRetries
1458
+ numRetries
1306
1459
  });
1307
1460
  }
1308
1461
  /**
1309
- * Submit content for asynchronous scanning.
1310
- * @param scanObjects - Array of scan objects (1–5 items).
1311
- * @returns Response containing scan IDs for later querying.
1462
+ * Submit one batch of content for asynchronous scanning.
1463
+ *
1464
+ * The call accepts 1–5 request objects and returns one batch receipt. A batch `scan_id` can fan
1465
+ * out to several unordered result rows. Correlate each row by `(scan_id, req_id)`, never array
1466
+ * position or `scan_id` alone. The SDK preserves the server's row order and cardinality.
1467
+ *
1468
+ * Setting `numRetries: 0` guarantees one SDK fetch attempt, but cannot guarantee exactly-once
1469
+ * server submission after an ambiguous network or 5xx failure.
1470
+ * @param scanObjects - Array of scan objects (1–5 items), each with its own `req_id`.
1471
+ * @param opts - Optional per-call retry override.
1472
+ * @returns One batch receipt containing the shared scan ID for later querying.
1312
1473
  * @example
1313
1474
  * ```ts
1314
1475
  * import { init, Scanner } from '@cdot65/prisma-airs-sdk';
1315
1476
  * init();
1316
1477
  * const scanner = new Scanner();
1317
1478
  *
1318
- * const result = await scanner.asyncScan([
1319
- * {
1320
- * req_id: 1,
1321
- * scan_req: {
1322
- * ai_profile: { profile_name: 'my-profile' },
1323
- * contents: [{ prompt: 'Tell me about machine learning.' }],
1479
+ * const receipt = await scanner.asyncScan(
1480
+ * [
1481
+ * {
1482
+ * req_id: 1,
1483
+ * scan_req: {
1484
+ * ai_profile: { profile_name: 'my-profile' },
1485
+ * contents: [{ prompt: 'Tell me about machine learning.' }],
1486
+ * },
1324
1487
  * },
1325
- * },
1326
- * ]);
1327
- * // result =>
1488
+ * {
1489
+ * req_id: 2,
1490
+ * scan_req: {
1491
+ * ai_profile: { profile_name: 'my-profile' },
1492
+ * contents: [{ prompt: 'What are neural networks?' }],
1493
+ * },
1494
+ * },
1495
+ * ],
1496
+ * { numRetries: 0 },
1497
+ * );
1498
+ * // receipt =>
1328
1499
  * // { received: '2024-01-01T00:00:00Z', scan_id: '550e...' }
1329
1500
  * ```
1330
1501
  */
1331
- async asyncScan(scanObjects) {
1502
+ async asyncScan(scanObjects, opts = {}) {
1503
+ const numRetries = resolveNumRetries(opts);
1332
1504
  if (scanObjects.length < 1) {
1333
1505
  throw new AISecSDKException(
1334
1506
  "At least 1 scan object is required",
@@ -1348,13 +1520,17 @@ var Scanner = class {
1348
1520
  body: scanObjects,
1349
1521
  responseSchema: AsyncScanResponseSchema,
1350
1522
  auth: this.buildAuth(),
1351
- numRetries: globalConfiguration.numRetries
1523
+ numRetries
1352
1524
  });
1353
1525
  }
1354
1526
  /**
1355
1527
  * Query scan results by scan IDs.
1528
+ *
1529
+ * One scan ID can return several unordered rows. Correlate them using `(scan_id, req_id)`. The
1530
+ * SDK does not sort, deduplicate, or collapse the response.
1356
1531
  * @param scanIds - Array of scan UUIDs (1–5 items).
1357
- * @returns Array of scan results with status and response data.
1532
+ * @param opts - Optional per-call retry override.
1533
+ * @returns Every scan-result row in server order, with status and response data.
1358
1534
  * @example
1359
1535
  * ```ts
1360
1536
  * import { init, Scanner } from '@cdot65/prisma-airs-sdk';
@@ -1364,12 +1540,14 @@ var Scanner = class {
1364
1540
  * const results = await scanner.queryByScanIds([
1365
1541
  * '550e8400-e29b-41d4-a716-446655440000',
1366
1542
  * ]);
1367
- * // results =>
1368
- * // [{ scan_id: '550e8400-e29b-41d4-a716-446655440000', status: 'complete',
1369
- * // result: { category: 'benign', action: 'allow', ... } }]
1543
+ * // A single scan ID may produce multiple rows, for example req_id 2 then req_id 1.
1544
+ * for (const row of results) {
1545
+ * console.log(`${row.scan_id}:${row.req_id}`, row.status, row.result?.action);
1546
+ * }
1370
1547
  * ```
1371
1548
  */
1372
- async queryByScanIds(scanIds) {
1549
+ async queryByScanIds(scanIds, opts = {}) {
1550
+ const numRetries = resolveNumRetries(opts);
1373
1551
  if (scanIds.length < 1) {
1374
1552
  throw new AISecSDKException(
1375
1553
  "At least 1 scan_id is required",
@@ -1394,13 +1572,17 @@ var Scanner = class {
1394
1572
  params: { scan_ids: scanIds.join(",") },
1395
1573
  responseSchema: import_zod15.z.array(ScanIdResultSchema),
1396
1574
  auth: this.buildAuth(),
1397
- numRetries: globalConfiguration.numRetries
1575
+ numRetries
1398
1576
  });
1399
1577
  }
1400
1578
  /**
1401
1579
  * Query detailed threat reports by report IDs.
1580
+ *
1581
+ * One report ID can return several rows. Correlate them using `(report_id, req_id)`. The SDK
1582
+ * preserves server order and cardinality without sorting or deduplicating.
1402
1583
  * @param reportIds - Array of report IDs (1–5 items).
1403
- * @returns Array of threat scan reports with detection details.
1584
+ * @param opts - Optional per-call retry override.
1585
+ * @returns Every report row in server order, with detection details.
1404
1586
  * @example
1405
1587
  * ```ts
1406
1588
  * import { init, Scanner } from '@cdot65/prisma-airs-sdk';
@@ -1408,12 +1590,13 @@ var Scanner = class {
1408
1590
  * const scanner = new Scanner();
1409
1591
  *
1410
1592
  * const reports = await scanner.queryByReportIds(['R000...']);
1411
- * // reports =>
1412
- * // [{ report_id: 'R000...', scan_id: '550e...',
1413
- * // detection_results: [{ detection_service: 'pi', verdict: 'benign', action: 'allow' }] }]
1593
+ * for (const report of reports) {
1594
+ * console.log(`${report.report_id}:${report.req_id}`, report.detection_results);
1595
+ * }
1414
1596
  * ```
1415
1597
  */
1416
- async queryByReportIds(reportIds) {
1598
+ async queryByReportIds(reportIds, opts = {}) {
1599
+ const numRetries = resolveNumRetries(opts);
1417
1600
  if (reportIds.length < 1) {
1418
1601
  throw new AISecSDKException(
1419
1602
  "At least 1 report_id is required",
@@ -1433,7 +1616,7 @@ var Scanner = class {
1433
1616
  params: { report_ids: reportIds.join(",") },
1434
1617
  responseSchema: import_zod15.z.array(ThreatScanReportSchema),
1435
1618
  auth: this.buildAuth(),
1436
- numRetries: globalConfiguration.numRetries
1619
+ numRetries
1437
1620
  });
1438
1621
  }
1439
1622
  };
@@ -2845,7 +3028,8 @@ var ScanDetailsSchema = import_zod32.z.object({
2845
3028
  var ScanCreateRequestSchema = import_zod32.z.object({
2846
3029
  model_uri: import_zod32.z.string(),
2847
3030
  security_group_uuid: import_zod32.z.string(),
2848
- scan_origin: import_zod32.z.string(),
3031
+ // Optional per the OpenAPI spec (server defaults it); the scans-client example still sets it.
3032
+ scan_origin: import_zod32.z.string().optional(),
2849
3033
  allow_patterns: import_zod32.z.array(import_zod32.z.string()).nullable().optional(),
2850
3034
  ignore_patterns: import_zod32.z.array(import_zod32.z.string()).nullable().optional(),
2851
3035
  labels: import_zod32.z.array(LabelSchema).nullable().optional(),
@@ -2864,7 +3048,8 @@ var ScanBaseResponseSchema = import_zod32.z.object({
2864
3048
  scan_origin: import_zod32.z.string(),
2865
3049
  security_group_uuid: import_zod32.z.string(),
2866
3050
  security_group_name: import_zod32.z.string(),
2867
- model_version_uuid: import_zod32.z.string(),
3051
+ // Optional per the OpenAPI spec — a scan may not have a resolved model version yet.
3052
+ model_version_uuid: import_zod32.z.string().nullable().optional(),
2868
3053
  eval_outcome: import_zod32.z.string(),
2869
3054
  source_type: import_zod32.z.string(),
2870
3055
  created_by: import_zod32.z.string().nullable().optional(),
@@ -2901,6 +3086,50 @@ var FileListSchema = import_zod32.z.object({
2901
3086
  pagination: ModelSecurityPaginationSchema,
2902
3087
  files: import_zod32.z.array(FileResponseSchema)
2903
3088
  }).passthrough();
3089
+ var ModelResponseSchema = import_zod32.z.object({
3090
+ uuid: import_zod32.z.string(),
3091
+ tsg_id: import_zod32.z.string(),
3092
+ created_at: import_zod32.z.string(),
3093
+ updated_at: import_zod32.z.string(),
3094
+ name: import_zod32.z.string(),
3095
+ latest_version_uuid: import_zod32.z.string().nullable().optional(),
3096
+ latest_version_fingerprint: import_zod32.z.string().nullable().optional(),
3097
+ latest_version_revision: import_zod32.z.string().nullable().optional(),
3098
+ latest_version_hf_commit_sha: import_zod32.z.string().nullable().optional(),
3099
+ latest_version_outcome: import_zod32.z.string().nullable().optional(),
3100
+ latest_version_formats: import_zod32.z.array(import_zod32.z.string()).nullable().optional(),
3101
+ latest_version_source_types: import_zod32.z.array(import_zod32.z.string()).nullable().optional(),
3102
+ latest_version_scan_time: import_zod32.z.string().nullable().optional()
3103
+ }).passthrough();
3104
+ var ModelListSchema = import_zod32.z.object({
3105
+ pagination: ModelSecurityPaginationSchema,
3106
+ models: import_zod32.z.array(ModelResponseSchema)
3107
+ }).passthrough();
3108
+ var ModelVersionResponseSchema = import_zod32.z.object({
3109
+ uuid: import_zod32.z.string(),
3110
+ tsg_id: import_zod32.z.string(),
3111
+ created_at: import_zod32.z.string(),
3112
+ updated_at: import_zod32.z.string(),
3113
+ revision: import_zod32.z.string(),
3114
+ model_uuid: import_zod32.z.string(),
3115
+ fingerprint: import_zod32.z.string().nullable().optional(),
3116
+ file_count: import_zod32.z.number().int().nullable().optional(),
3117
+ license: import_zod32.z.string().nullable().optional(),
3118
+ latest_scan_time: import_zod32.z.string().nullable().optional(),
3119
+ hf_commit_sha: import_zod32.z.string().nullable().optional(),
3120
+ hf_commit_title: import_zod32.z.string().nullable().optional(),
3121
+ hf_commit_authors: import_zod32.z.array(import_zod32.z.string()).nullable().optional(),
3122
+ hf_model_name: import_zod32.z.string().nullable().optional(),
3123
+ hf_organization: import_zod32.z.string().nullable().optional(),
3124
+ model_formats: import_zod32.z.array(import_zod32.z.string()).nullable().optional(),
3125
+ source_types: import_zod32.z.array(import_zod32.z.string()).nullable().optional(),
3126
+ last_eval_outcome: import_zod32.z.string().nullable().optional(),
3127
+ last_eval_summary: EvalSummarySchema.nullable().optional()
3128
+ }).passthrough();
3129
+ var ModelVersionListSchema = import_zod32.z.object({
3130
+ pagination: ModelSecurityPaginationSchema,
3131
+ model_versions: import_zod32.z.array(ModelVersionResponseSchema)
3132
+ }).passthrough();
2904
3133
  var RuleEvaluationResponseSchema = import_zod32.z.object({
2905
3134
  uuid: import_zod32.z.string(),
2906
3135
  tsg_id: import_zod32.z.string(),
@@ -2918,6 +3147,10 @@ var RuleEvaluationListSchema = import_zod32.z.object({
2918
3147
  pagination: ModelSecurityPaginationSchema,
2919
3148
  evaluations: import_zod32.z.array(RuleEvaluationResponseSchema)
2920
3149
  }).passthrough();
3150
+ var ViolationRemediationSchema = import_zod32.z.object({
3151
+ steps: import_zod32.z.array(import_zod32.z.string()),
3152
+ url: import_zod32.z.string()
3153
+ }).passthrough();
2921
3154
  var ViolationResponseSchema = import_zod32.z.object({
2922
3155
  uuid: import_zod32.z.string(),
2923
3156
  tsg_id: import_zod32.z.string(),
@@ -2928,6 +3161,7 @@ var ViolationResponseSchema = import_zod32.z.object({
2928
3161
  rule_name: import_zod32.z.string(),
2929
3162
  rule_description: import_zod32.z.string(),
2930
3163
  rule_instance_state: import_zod32.z.string(),
3164
+ remediation: ViolationRemediationSchema,
2931
3165
  file: import_zod32.z.string().nullable().optional(),
2932
3166
  hash: import_zod32.z.string().nullable().optional(),
2933
3167
  module: import_zod32.z.string().nullable().optional(),
@@ -3063,6 +3297,11 @@ var BrandSubCategory = {
3063
3297
  DISCRIMINATING_CLAIMS: "DISCRIMINATING_CLAIMS",
3064
3298
  POLITICAL_ENDORSEMENTS: "POLITICAL_ENDORSEMENTS"
3065
3299
  };
3300
+ var ChannelStatus = {
3301
+ ONLINE: "ONLINE",
3302
+ OFFLINE: "OFFLINE",
3303
+ DRAFT: "DRAFT"
3304
+ };
3066
3305
  var ComplianceSubCategory = {
3067
3306
  OWASP: "OWASP",
3068
3307
  MITRE_ATLAS: "MITRE_ATLAS",
@@ -3886,6 +4125,12 @@ var ErrorLogSchema = import_zod33.z.object({
3886
4125
  version: import_zod33.z.number().int().optional()
3887
4126
  }).passthrough();
3888
4127
  var ErrorLogListResponseSchema = import_zod33.z.object({ pagination: RedTeamPaginationSchema, data: import_zod33.z.array(ErrorLogSchema) }).passthrough();
4128
+ var LanguageOptionSchema = import_zod33.z.object({ code: import_zod33.z.string(), name: import_zod33.z.string() }).passthrough();
4129
+ var TenantLanguagesResponseSchema = import_zod33.z.object({
4130
+ multilingual_enabled: import_zod33.z.boolean(),
4131
+ supported_job_types: import_zod33.z.array(import_zod33.z.string()),
4132
+ languages: import_zod33.z.array(LanguageOptionSchema)
4133
+ }).passthrough();
3889
4134
  var TargetRequestBaseFields = {
3890
4135
  name: import_zod33.z.string(),
3891
4136
  description: import_zod33.z.string().nullable().optional(),
@@ -4240,6 +4485,48 @@ var RegistryCredentialsSchema = import_zod33.z.object({
4240
4485
  expiry: import_zod33.z.string()
4241
4486
  }).passthrough();
4242
4487
 
4488
+ // src/models/red-team-network-broker.ts
4489
+ var import_zod34 = require("zod");
4490
+ var ChannelStatusSchema = import_zod34.z.nativeEnum(ChannelStatus);
4491
+ var CreateChannelRequestSchema = import_zod34.z.object({
4492
+ name: import_zod34.z.string(),
4493
+ description: import_zod34.z.string().optional()
4494
+ }).passthrough();
4495
+ var UpdateChannelRequestSchema = import_zod34.z.object({
4496
+ name: import_zod34.z.string().optional(),
4497
+ description: import_zod34.z.string().optional()
4498
+ }).passthrough();
4499
+ var ChannelSchema = import_zod34.z.object({
4500
+ uuid: import_zod34.z.string().optional(),
4501
+ name: import_zod34.z.string().nullable().optional(),
4502
+ description: import_zod34.z.string().nullable().optional(),
4503
+ // Kept as a plain string (not the enum) so unknown upstream statuses never fail parsing.
4504
+ status: import_zod34.z.string().nullable().optional(),
4505
+ added_by: import_zod34.z.string().nullable().optional(),
4506
+ created_at: import_zod34.z.string().nullable().optional(),
4507
+ updated_at: import_zod34.z.string().nullable().optional(),
4508
+ last_online_at: import_zod34.z.string().nullable().optional(),
4509
+ // Present on live responses (not in the base OpenAPI Channel schema).
4510
+ connected_clients_count: import_zod34.z.number().int().nullable().optional(),
4511
+ outdated_clients_count: import_zod34.z.number().int().nullable().optional(),
4512
+ features: import_zod34.z.record(import_zod34.z.boolean()).nullable().optional()
4513
+ }).passthrough();
4514
+ var ChannelListPaginationSchema = import_zod34.z.object({ total_items: import_zod34.z.number().int().nullable().optional() }).passthrough();
4515
+ var ChannelListResponseSchema = import_zod34.z.object({
4516
+ pagination: ChannelListPaginationSchema.optional(),
4517
+ data: import_zod34.z.array(ChannelSchema).default([])
4518
+ }).passthrough();
4519
+ var ChannelStatsSchema = import_zod34.z.object({
4520
+ network_channels_server_domain: import_zod34.z.string().nullable().optional(),
4521
+ docker_registry: import_zod34.z.string().nullable().optional(),
4522
+ helm_chart: import_zod34.z.string().nullable().optional(),
4523
+ docker_image: import_zod34.z.string().nullable().optional(),
4524
+ online_channels: import_zod34.z.number().int().nullable().optional(),
4525
+ total_channels: import_zod34.z.number().int().nullable().optional(),
4526
+ // Present on live responses (not in the base OpenAPI ChannelStats schema).
4527
+ client_version: import_zod34.z.string().nullable().optional()
4528
+ }).passthrough();
4529
+
4243
4530
  // src/http/auth/oauth.ts
4244
4531
  var OAuthAuth = class {
4245
4532
  constructor(oauthClient) {
@@ -4262,12 +4549,12 @@ var OAuthAuth = class {
4262
4549
  };
4263
4550
 
4264
4551
  // src/models/oauth-token.ts
4265
- var import_zod34 = require("zod");
4266
- var OAuthTokenResponseSchema = import_zod34.z.object({
4267
- access_token: import_zod34.z.string(),
4268
- token_type: import_zod34.z.string().optional(),
4269
- expires_in: import_zod34.z.number(),
4270
- scope: import_zod34.z.string().optional()
4552
+ var import_zod35 = require("zod");
4553
+ var OAuthTokenResponseSchema = import_zod35.z.object({
4554
+ access_token: import_zod35.z.string(),
4555
+ token_type: import_zod35.z.string().optional(),
4556
+ expires_in: import_zod35.z.number(),
4557
+ scope: import_zod35.z.string().optional()
4271
4558
  }).passthrough();
4272
4559
 
4273
4560
  // src/management/oauth-client.ts
@@ -5058,7 +5345,7 @@ var CustomerAppsClient = class {
5058
5345
  return request({
5059
5346
  method: "GET",
5060
5347
  baseUrl: this.baseUrl,
5061
- path: `${MGMT_CUSTOMER_APPS_TSG_PATH}/${this.tsgId}`,
5348
+ path: `${MGMT_CUSTOMER_APPS_TSG_PATH}/${encodeURIComponent(this.tsgId)}`,
5062
5349
  params,
5063
5350
  responseSchema: CustomerAppListResponseSchema,
5064
5351
  auth: this.auth,
@@ -5252,7 +5539,7 @@ var ScanLogsClient = class {
5252
5539
  };
5253
5540
 
5254
5541
  // src/management/oauth-management.ts
5255
- var import_zod35 = require("zod");
5542
+ var import_zod36 = require("zod");
5256
5543
  var OAuthManagementClient = class {
5257
5544
  baseUrl;
5258
5545
  auth;
@@ -5286,7 +5573,7 @@ var OAuthManagementClient = class {
5286
5573
  path: MGMT_OAUTH_INVALIDATE_PATH,
5287
5574
  params: { token },
5288
5575
  body,
5289
- responseSchema: import_zod35.z.string(),
5576
+ responseSchema: import_zod36.z.string(),
5290
5577
  auth: this.auth,
5291
5578
  numRetries: this.numRetries
5292
5579
  });
@@ -6914,6 +7201,170 @@ var ModelSecurityRulesClient = class {
6914
7201
  }
6915
7202
  };
6916
7203
 
7204
+ // src/model-security/models-client.ts
7205
+ function buildModelListParams(opts) {
7206
+ const params = serializeListing(opts);
7207
+ if (opts?.search_query !== void 0) params.search_query = opts.search_query;
7208
+ if (opts?.sort_field !== void 0) params.sort_field = opts.sort_field;
7209
+ if (opts?.sort_order !== void 0) params.sort_order = opts.sort_order;
7210
+ if (opts?.latest_version_outcomes !== void 0)
7211
+ params.latest_version_outcomes = opts.latest_version_outcomes;
7212
+ if (opts?.latest_version_formats !== void 0)
7213
+ params.latest_version_formats = opts.latest_version_formats;
7214
+ if (opts?.latest_version_source_types !== void 0)
7215
+ params.latest_version_source_types = opts.latest_version_source_types;
7216
+ if (opts?.latest_version_scan_time_before !== void 0)
7217
+ params.latest_version_scan_time_before = opts.latest_version_scan_time_before;
7218
+ if (opts?.start_time !== void 0) params.start_time = opts.start_time;
7219
+ if (opts?.end_time !== void 0) params.end_time = opts.end_time;
7220
+ return params;
7221
+ }
7222
+ var ModelSecurityModelsClient = class {
7223
+ baseUrl;
7224
+ auth;
7225
+ numRetries;
7226
+ constructor(opts) {
7227
+ this.baseUrl = opts.baseUrl;
7228
+ this.auth = opts.auth;
7229
+ this.numRetries = opts.numRetries;
7230
+ }
7231
+ /**
7232
+ * List models with optional search, sort, and latest-version filters.
7233
+ * @param opts - Pagination and filter options.
7234
+ * @returns Paginated list of models.
7235
+ * @example
7236
+ * ```ts
7237
+ * import { ModelSecurityClient } from '@cdot65/prisma-airs-sdk';
7238
+ * const ms = new ModelSecurityClient();
7239
+ *
7240
+ * const models = await ms.models.listModels({ limit: 10, search_query: 'llama' });
7241
+ * // models =>
7242
+ * // { pagination: { total_items: 3 }, models: [{ uuid: '550e8400-...', name: 'org/llama', latest_version_outcome: 'PASSED' }] }
7243
+ * ```
7244
+ */
7245
+ async listModels(opts) {
7246
+ return request({
7247
+ method: "GET",
7248
+ baseUrl: this.baseUrl,
7249
+ path: MODEL_SEC_MODELS_PATH,
7250
+ params: buildModelListParams(opts),
7251
+ responseSchema: ModelListSchema,
7252
+ auth: this.auth,
7253
+ numRetries: this.numRetries
7254
+ });
7255
+ }
7256
+ /**
7257
+ * Get a single model by UUID.
7258
+ * @param uuid - Model UUID.
7259
+ * @returns The model.
7260
+ * @example
7261
+ * ```ts
7262
+ * import { ModelSecurityClient } from '@cdot65/prisma-airs-sdk';
7263
+ * const ms = new ModelSecurityClient();
7264
+ *
7265
+ * const model = await ms.models.getModel('550e8400-e29b-41d4-a716-446655440000');
7266
+ * // model =>
7267
+ * // { uuid: '550e8400-...', name: 'org/model', latest_version_uuid: '660e8400-...', latest_version_outcome: 'PASSED' }
7268
+ * ```
7269
+ */
7270
+ async getModel(uuid) {
7271
+ assertUuid(uuid, "model uuid");
7272
+ return request({
7273
+ method: "GET",
7274
+ baseUrl: this.baseUrl,
7275
+ path: `${MODEL_SEC_MODELS_PATH}/${uuid}`,
7276
+ responseSchema: ModelResponseSchema,
7277
+ auth: this.auth,
7278
+ numRetries: this.numRetries
7279
+ });
7280
+ }
7281
+ /**
7282
+ * List the versions of a model.
7283
+ * @param modelUuid - Model UUID.
7284
+ * @param opts - Pagination and sort options.
7285
+ * @returns Paginated list of model versions.
7286
+ * @example
7287
+ * ```ts
7288
+ * import { ModelSecurityClient } from '@cdot65/prisma-airs-sdk';
7289
+ * const ms = new ModelSecurityClient();
7290
+ *
7291
+ * const versions = await ms.models.listModelVersions('550e8400-e29b-41d4-a716-446655440000', {
7292
+ * sort_order: 'desc',
7293
+ * });
7294
+ * // versions =>
7295
+ * // { pagination: { total_items: 2 }, model_versions: [{ uuid: '660e8400-...', revision: 'main', file_count: 12 }] }
7296
+ * ```
7297
+ */
7298
+ async listModelVersions(modelUuid, opts) {
7299
+ assertUuid(modelUuid, "model uuid");
7300
+ const params = serializeListing(opts);
7301
+ if (opts?.sort_order !== void 0) params.sort_order = opts.sort_order;
7302
+ return request({
7303
+ method: "GET",
7304
+ baseUrl: this.baseUrl,
7305
+ path: `${MODEL_SEC_MODELS_PATH}/${modelUuid}/model-versions`,
7306
+ params,
7307
+ responseSchema: ModelVersionListSchema,
7308
+ auth: this.auth,
7309
+ numRetries: this.numRetries
7310
+ });
7311
+ }
7312
+ /**
7313
+ * Get a single model version by UUID.
7314
+ * @param uuid - Model version UUID.
7315
+ * @returns The model version.
7316
+ * @example
7317
+ * ```ts
7318
+ * import { ModelSecurityClient } from '@cdot65/prisma-airs-sdk';
7319
+ * const ms = new ModelSecurityClient();
7320
+ *
7321
+ * const version = await ms.models.getModelVersion('660e8400-e29b-41d4-a716-446655440000');
7322
+ * // version =>
7323
+ * // { uuid: '660e8400-...', revision: 'main', model_uuid: '550e8400-...', last_eval_outcome: 'PASSED' }
7324
+ * ```
7325
+ */
7326
+ async getModelVersion(uuid) {
7327
+ assertUuid(uuid, "model version uuid");
7328
+ return request({
7329
+ method: "GET",
7330
+ baseUrl: this.baseUrl,
7331
+ path: `${MODEL_SEC_MODEL_VERSIONS_PATH}/${uuid}`,
7332
+ responseSchema: ModelVersionResponseSchema,
7333
+ auth: this.auth,
7334
+ numRetries: this.numRetries
7335
+ });
7336
+ }
7337
+ /**
7338
+ * List the files of a model version.
7339
+ * @param modelVersionUuid - Model version UUID.
7340
+ * @param opts - Pagination options.
7341
+ * @returns Paginated list of files (same shape as scan files).
7342
+ * @example
7343
+ * ```ts
7344
+ * import { ModelSecurityClient } from '@cdot65/prisma-airs-sdk';
7345
+ * const ms = new ModelSecurityClient();
7346
+ *
7347
+ * const files = await ms.models.listModelVersionFiles('660e8400-e29b-41d4-a716-446655440000', {
7348
+ * limit: 50,
7349
+ * });
7350
+ * // files =>
7351
+ * // { pagination: { total_items: 12 }, files: [{ uuid: '770e8400-...', path: '/model.safetensors', type: 'FILE', result: 'SUCCESS' }] }
7352
+ * ```
7353
+ */
7354
+ async listModelVersionFiles(modelVersionUuid, opts) {
7355
+ assertUuid(modelVersionUuid, "model version uuid");
7356
+ return request({
7357
+ method: "GET",
7358
+ baseUrl: this.baseUrl,
7359
+ path: `${MODEL_SEC_MODEL_VERSIONS_PATH}/${modelVersionUuid}/files`,
7360
+ params: serializeListing(opts),
7361
+ responseSchema: FileListSchema,
7362
+ auth: this.auth,
7363
+ numRetries: this.numRetries
7364
+ });
7365
+ }
7366
+ };
7367
+
6917
7368
  // src/model-security/client.ts
6918
7369
  var ModelSecurityClient = class {
6919
7370
  /** Data plane scan operations. */
@@ -6922,6 +7373,8 @@ var ModelSecurityClient = class {
6922
7373
  securityGroups;
6923
7374
  /** Management plane security rule operations (read-only). */
6924
7375
  securityRules;
7376
+ /** Data plane model and model-version operations (read-only). */
7377
+ models;
6925
7378
  mgmtEndpoint;
6926
7379
  auth;
6927
7380
  numRetries;
@@ -6943,6 +7396,7 @@ var ModelSecurityClient = class {
6943
7396
  this.mgmtEndpoint = mgmtEndpoint;
6944
7397
  this.numRetries = numRetries;
6945
7398
  this.scans = new ModelSecurityScansClient({ baseUrl: dataEndpoint, auth, numRetries });
7399
+ this.models = new ModelSecurityModelsClient({ baseUrl: dataEndpoint, auth, numRetries });
6946
7400
  this.securityGroups = new ModelSecurityGroupsClient({
6947
7401
  baseUrl: mgmtEndpoint,
6948
7402
  auth,
@@ -6980,7 +7434,7 @@ var ModelSecurityClient = class {
6980
7434
  };
6981
7435
 
6982
7436
  // src/red-team/scans-client.ts
6983
- var import_zod36 = require("zod");
7437
+ var import_zod37 = require("zod");
6984
7438
  var RedTeamScansClient = class {
6985
7439
  baseUrl;
6986
7440
  auth;
@@ -7117,7 +7571,7 @@ var RedTeamScansClient = class {
7117
7571
  method: "GET",
7118
7572
  baseUrl: this.baseUrl,
7119
7573
  path: RED_TEAM_CATEGORIES_PATH,
7120
- responseSchema: import_zod36.z.array(CategoryModelSchema),
7574
+ responseSchema: import_zod37.z.array(CategoryModelSchema),
7121
7575
  auth: this.auth,
7122
7576
  numRetries: this.numRetries
7123
7577
  });
@@ -7125,7 +7579,7 @@ var RedTeamScansClient = class {
7125
7579
  };
7126
7580
 
7127
7581
  // src/red-team/reports-client.ts
7128
- var import_zod37 = require("zod");
7582
+ var import_zod38 = require("zod");
7129
7583
  var RedTeamReportsClient = class {
7130
7584
  baseUrl;
7131
7585
  auth;
@@ -7500,7 +7954,7 @@ var RedTeamReportsClient = class {
7500
7954
  baseUrl: this.baseUrl,
7501
7955
  path: `${RED_TEAM_REPORT_PATH}/${jobId}/download`,
7502
7956
  params: { file_format: format },
7503
- responseSchema: import_zod37.z.unknown(),
7957
+ responseSchema: import_zod38.z.unknown(),
7504
7958
  auth: this.auth,
7505
7959
  numRetries: this.numRetries
7506
7960
  });
@@ -7524,7 +7978,7 @@ var RedTeamReportsClient = class {
7524
7978
  method: "POST",
7525
7979
  baseUrl: this.baseUrl,
7526
7980
  path: `${RED_TEAM_REPORT_PATH}/${jobId}/generate-partial-report`,
7527
- responseSchema: import_zod37.z.unknown(),
7981
+ responseSchema: import_zod38.z.unknown(),
7528
7982
  auth: this.auth,
7529
7983
  numRetries: this.numRetries
7530
7984
  });
@@ -7532,7 +7986,7 @@ var RedTeamReportsClient = class {
7532
7986
  };
7533
7987
 
7534
7988
  // src/red-team/custom-attack-reports-client.ts
7535
- var import_zod38 = require("zod");
7989
+ var import_zod39 = require("zod");
7536
7990
  var RedTeamCustomAttackReportsClient = class {
7537
7991
  baseUrl;
7538
7992
  auth;
@@ -7622,7 +8076,7 @@ var RedTeamCustomAttackReportsClient = class {
7622
8076
  baseUrl: this.baseUrl,
7623
8077
  path: `${RED_TEAM_CUSTOM_ATTACKS_REPORT_PATH}/report/${jobId}/prompt-set/${promptSetId}/prompts`,
7624
8078
  params,
7625
- responseSchema: import_zod38.z.array(PromptDetailResponseSchema),
8079
+ responseSchema: import_zod39.z.array(PromptDetailResponseSchema),
7626
8080
  auth: this.auth,
7627
8081
  numRetries: this.numRetries
7628
8082
  });
@@ -7716,7 +8170,7 @@ var RedTeamCustomAttackReportsClient = class {
7716
8170
  method: "GET",
7717
8171
  baseUrl: this.baseUrl,
7718
8172
  path: `${RED_TEAM_CUSTOM_ATTACKS_REPORT_PATH}/job/${jobId}/attack/${attackId}/list-outputs`,
7719
- responseSchema: import_zod38.z.array(CustomAttackOutputSchema),
8173
+ responseSchema: import_zod39.z.array(CustomAttackOutputSchema),
7720
8174
  auth: this.auth,
7721
8175
  numRetries: this.numRetries
7722
8176
  });
@@ -7741,7 +8195,7 @@ var RedTeamCustomAttackReportsClient = class {
7741
8195
  method: "GET",
7742
8196
  baseUrl: this.baseUrl,
7743
8197
  path: `${RED_TEAM_CUSTOM_ATTACKS_REPORT_PATH}/job/${jobId}/property-stats`,
7744
- responseSchema: import_zod38.z.array(PropertyStatisticSchema),
8198
+ responseSchema: import_zod39.z.array(PropertyStatisticSchema),
7745
8199
  auth: this.auth,
7746
8200
  numRetries: this.numRetries
7747
8201
  });
@@ -7749,7 +8203,7 @@ var RedTeamCustomAttackReportsClient = class {
7749
8203
  };
7750
8204
 
7751
8205
  // src/red-team/targets-client.ts
7752
- var import_zod39 = require("zod");
8206
+ var import_zod40 = require("zod");
7753
8207
  var RedTeamTargetsClient = class {
7754
8208
  baseUrl;
7755
8209
  auth;
@@ -8042,7 +8496,7 @@ var RedTeamTargetsClient = class {
8042
8496
  method: "GET",
8043
8497
  baseUrl: this.baseUrl,
8044
8498
  path: `${RED_TEAM_TEMPLATE_PATH}/target-metadata`,
8045
- responseSchema: import_zod39.z.record(import_zod39.z.unknown()),
8499
+ responseSchema: import_zod40.z.record(import_zod40.z.unknown()),
8046
8500
  auth: this.auth,
8047
8501
  numRetries: this.numRetries
8048
8502
  });
@@ -8991,6 +9445,155 @@ var RedTeamInstancesClient = class {
8991
9445
  }
8992
9446
  };
8993
9447
 
9448
+ // src/red-team/network-broker-client.ts
9449
+ var RedTeamNetworkBrokerClient = class {
9450
+ baseUrl;
9451
+ auth;
9452
+ numRetries;
9453
+ constructor(opts) {
9454
+ this.baseUrl = opts.baseUrl;
9455
+ this.auth = opts.auth;
9456
+ this.numRetries = opts.numRetries;
9457
+ }
9458
+ /**
9459
+ * List network broker channels with optional filters.
9460
+ * @param opts - Optional pagination, search, and status filter options.
9461
+ * @returns The paginated list of channels.
9462
+ * @example
9463
+ * ```ts
9464
+ * import { RedTeamClient } from '@cdot65/prisma-airs-sdk';
9465
+ * const rt = new RedTeamClient();
9466
+ *
9467
+ * const channels = await rt.networkBroker.listChannels({ status: ['ONLINE', 'DRAFT'], limit: 10 });
9468
+ * // channels =>
9469
+ * // { pagination: { total_items: 2 }, data: [{ uuid: '550e8400-...', name: 'prod-broker', status: 'ONLINE' }] }
9470
+ * ```
9471
+ */
9472
+ async listChannels(opts) {
9473
+ const params = serializeListing(opts);
9474
+ if (opts?.status !== void 0) {
9475
+ params.status = Array.isArray(opts.status) ? opts.status : [opts.status];
9476
+ }
9477
+ if (opts?.include_all_if_empty !== void 0) {
9478
+ params.include_all_if_empty = String(opts.include_all_if_empty);
9479
+ }
9480
+ return request({
9481
+ method: "GET",
9482
+ baseUrl: this.baseUrl,
9483
+ path: RED_TEAM_CHANNELS_PATH,
9484
+ params,
9485
+ responseSchema: ChannelListResponseSchema,
9486
+ auth: this.auth,
9487
+ numRetries: this.numRetries
9488
+ });
9489
+ }
9490
+ /**
9491
+ * Create a network broker channel.
9492
+ * @param body - Channel creation request body (requires `name`).
9493
+ * @returns The created channel.
9494
+ * @example
9495
+ * ```ts
9496
+ * import { RedTeamClient } from '@cdot65/prisma-airs-sdk';
9497
+ * const rt = new RedTeamClient();
9498
+ *
9499
+ * const channel = await rt.networkBroker.createChannel({
9500
+ * name: 'prod-broker',
9501
+ * description: 'Production network broker channel',
9502
+ * });
9503
+ * // channel =>
9504
+ * // { uuid: '550e8400-...', name: 'prod-broker', status: 'DRAFT' }
9505
+ * ```
9506
+ */
9507
+ async createChannel(body) {
9508
+ return request({
9509
+ method: "POST",
9510
+ baseUrl: this.baseUrl,
9511
+ path: RED_TEAM_CHANNELS_PATH,
9512
+ body,
9513
+ responseSchema: ChannelSchema,
9514
+ auth: this.auth,
9515
+ numRetries: this.numRetries
9516
+ });
9517
+ }
9518
+ /**
9519
+ * Get network broker channel stats.
9520
+ * @returns The channel stats (broker server, registry, chart, image, channel counts).
9521
+ * @example
9522
+ * ```ts
9523
+ * import { RedTeamClient } from '@cdot65/prisma-airs-sdk';
9524
+ * const rt = new RedTeamClient();
9525
+ *
9526
+ * const stats = await rt.networkBroker.getChannelStats();
9527
+ * // stats =>
9528
+ * // { network_channels_server_domain: 'broker.example.com', online_channels: 3, total_channels: 5, client_version: '1.4.0' }
9529
+ * ```
9530
+ */
9531
+ async getChannelStats() {
9532
+ return request({
9533
+ method: "GET",
9534
+ baseUrl: this.baseUrl,
9535
+ path: RED_TEAM_CHANNELS_STATS_PATH,
9536
+ responseSchema: ChannelStatsSchema,
9537
+ auth: this.auth,
9538
+ numRetries: this.numRetries
9539
+ });
9540
+ }
9541
+ /**
9542
+ * Get a network broker channel by UUID.
9543
+ * @param channelId - The channel UUID.
9544
+ * @returns The channel.
9545
+ * @example
9546
+ * ```ts
9547
+ * import { RedTeamClient } from '@cdot65/prisma-airs-sdk';
9548
+ * const rt = new RedTeamClient();
9549
+ *
9550
+ * const channel = await rt.networkBroker.getChannel('550e8400-e29b-41d4-a716-446655440000');
9551
+ * // channel =>
9552
+ * // { uuid: '550e8400-...', name: 'prod-broker', status: 'ONLINE' }
9553
+ * ```
9554
+ */
9555
+ async getChannel(channelId) {
9556
+ assertUuid(channelId, "channel id");
9557
+ return request({
9558
+ method: "GET",
9559
+ baseUrl: this.baseUrl,
9560
+ path: `${RED_TEAM_CHANNELS_PATH}/${channelId}`,
9561
+ responseSchema: ChannelSchema,
9562
+ auth: this.auth,
9563
+ numRetries: this.numRetries
9564
+ });
9565
+ }
9566
+ /**
9567
+ * Update a network broker channel's name or description.
9568
+ * @param channelId - The channel UUID.
9569
+ * @param body - Channel update request body.
9570
+ * @returns The updated channel.
9571
+ * @example
9572
+ * ```ts
9573
+ * import { RedTeamClient } from '@cdot65/prisma-airs-sdk';
9574
+ * const rt = new RedTeamClient();
9575
+ *
9576
+ * const channel = await rt.networkBroker.updateChannel('550e8400-e29b-41d4-a716-446655440000', {
9577
+ * description: 'Updated description',
9578
+ * });
9579
+ * // channel =>
9580
+ * // { uuid: '550e8400-...', name: 'prod-broker', description: 'Updated description', status: 'ONLINE' }
9581
+ * ```
9582
+ */
9583
+ async updateChannel(channelId, body) {
9584
+ assertUuid(channelId, "channel id");
9585
+ return request({
9586
+ method: "PATCH",
9587
+ baseUrl: this.baseUrl,
9588
+ path: `${RED_TEAM_CHANNELS_PATH}/${channelId}`,
9589
+ body,
9590
+ responseSchema: ChannelSchema,
9591
+ auth: this.auth,
9592
+ numRetries: this.numRetries
9593
+ });
9594
+ }
9595
+ };
9596
+
8994
9597
  // src/red-team/client.ts
8995
9598
  var RedTeamClient = class {
8996
9599
  /** Data plane scan operations. */
@@ -9007,6 +9610,8 @@ var RedTeamClient = class {
9007
9610
  eula;
9008
9611
  /** Management plane instance/licensing operations. */
9009
9612
  instances;
9613
+ /** Network broker channel operations (distinct network broker base URL). */
9614
+ networkBroker;
9010
9615
  dataEndpoint;
9011
9616
  mgmtEndpoint;
9012
9617
  auth;
@@ -9014,6 +9619,7 @@ var RedTeamClient = class {
9014
9619
  constructor(opts = {}) {
9015
9620
  const dataEndpoint = opts.dataEndpoint ?? process.env[RED_TEAM_DATA_ENDPOINT] ?? DEFAULT_RED_TEAM_DATA_ENDPOINT;
9016
9621
  const mgmtEndpoint = opts.mgmtEndpoint ?? process.env[RED_TEAM_MGMT_ENDPOINT] ?? DEFAULT_RED_TEAM_MGMT_ENDPOINT;
9622
+ const networkBrokerEndpoint = opts.networkBrokerEndpoint ?? process.env[RED_TEAM_NETWORK_BROKER_ENDPOINT] ?? DEFAULT_RED_TEAM_NETWORK_BROKER_ENDPOINT;
9017
9623
  const { oauthClient, numRetries } = resolveOAuthConfig({
9018
9624
  clientId: opts.clientId,
9019
9625
  clientSecret: opts.clientSecret,
@@ -9044,6 +9650,11 @@ var RedTeamClient = class {
9044
9650
  });
9045
9651
  this.eula = new RedTeamEulaClient({ baseUrl: mgmtEndpoint, auth, numRetries });
9046
9652
  this.instances = new RedTeamInstancesClient({ baseUrl: mgmtEndpoint, auth, numRetries });
9653
+ this.networkBroker = new RedTeamNetworkBrokerClient({
9654
+ baseUrl: networkBrokerEndpoint,
9655
+ auth,
9656
+ numRetries
9657
+ });
9047
9658
  }
9048
9659
  // -----------------------------------------------------------------------
9049
9660
  // Data plane convenience methods
@@ -9152,6 +9763,82 @@ var RedTeamClient = class {
9152
9763
  numRetries: this.numRetries
9153
9764
  });
9154
9765
  }
9766
+ /**
9767
+ * List profiling error logs for a target (data plane).
9768
+ * @param targetId - The target UUID.
9769
+ * @param opts - Optional pagination/search options (the endpoint honors `limit`).
9770
+ * @returns The paginated list of target-profile error logs.
9771
+ * @example
9772
+ * ```ts
9773
+ * import { RedTeamClient } from '@cdot65/prisma-airs-sdk';
9774
+ * const rt = new RedTeamClient();
9775
+ *
9776
+ * const logs = await rt.getTargetProfileErrorLogs('550e8400-e29b-41d4-a716-446655440000', { limit: 10 });
9777
+ * // logs =>
9778
+ * // { pagination: { total_items: 1 }, data: [{ target_id: '550e8400-...', error_type: 'PROBE', error_message: '...', created_at: '2025-01-01T00:00:00Z' }] }
9779
+ * ```
9780
+ */
9781
+ async getTargetProfileErrorLogs(targetId, opts) {
9782
+ assertUuid(targetId, "target id");
9783
+ return request({
9784
+ method: "GET",
9785
+ baseUrl: this.dataEndpoint,
9786
+ path: `${RED_TEAM_ERROR_LOG_TARGET_PROFILE_PATH}/${targetId}`,
9787
+ params: serializeListing(opts),
9788
+ responseSchema: ErrorLogListResponseSchema,
9789
+ auth: this.auth,
9790
+ numRetries: this.numRetries
9791
+ });
9792
+ }
9793
+ /**
9794
+ * Get the tenant's allowed languages for Red Team scans (data plane).
9795
+ * @returns The supported-languages response.
9796
+ * @example
9797
+ * ```ts
9798
+ * import { RedTeamClient } from '@cdot65/prisma-airs-sdk';
9799
+ * const rt = new RedTeamClient();
9800
+ *
9801
+ * const langs = await rt.getLanguages();
9802
+ * // langs =>
9803
+ * // { multilingual_enabled: true, supported_job_types: ['STATIC', 'DYNAMIC'],
9804
+ * // languages: [{ code: 'en', name: 'English' }, { code: 'es', name: 'Spanish' }] }
9805
+ * ```
9806
+ */
9807
+ async getLanguages() {
9808
+ return request({
9809
+ method: "GET",
9810
+ baseUrl: this.dataEndpoint,
9811
+ path: RED_TEAM_LANGUAGES_PATH,
9812
+ responseSchema: TenantLanguagesResponseSchema,
9813
+ auth: this.auth,
9814
+ numRetries: this.numRetries
9815
+ });
9816
+ }
9817
+ /**
9818
+ * Get the tenant's allowed languages from the management plane.
9819
+ * Same response shape as {@link RedTeamClient.getLanguages}, served from the management endpoint.
9820
+ * @returns The supported-languages response.
9821
+ * @example
9822
+ * ```ts
9823
+ * import { RedTeamClient } from '@cdot65/prisma-airs-sdk';
9824
+ * const rt = new RedTeamClient();
9825
+ *
9826
+ * const langs = await rt.getManagementLanguages();
9827
+ * // langs =>
9828
+ * // { multilingual_enabled: true, supported_job_types: ['STATIC', 'DYNAMIC'],
9829
+ * // languages: [{ code: 'en', name: 'English' }] }
9830
+ * ```
9831
+ */
9832
+ async getManagementLanguages() {
9833
+ return request({
9834
+ method: "GET",
9835
+ baseUrl: this.mgmtEndpoint,
9836
+ path: RED_TEAM_LANGUAGES_PATH,
9837
+ responseSchema: TenantLanguagesResponseSchema,
9838
+ auth: this.auth,
9839
+ numRetries: this.numRetries
9840
+ });
9841
+ }
9155
9842
  /**
9156
9843
  * Update sentiment for a scan report.
9157
9844
  * @param body - The sentiment request body.
@@ -9280,6 +9967,12 @@ var RedTeamClient = class {
9280
9967
  CategoryModelSchema,
9281
9968
  CategoryReportSchema,
9282
9969
  CgReportSchema,
9970
+ ChannelListPaginationSchema,
9971
+ ChannelListResponseSchema,
9972
+ ChannelSchema,
9973
+ ChannelStatsSchema,
9974
+ ChannelStatus,
9975
+ ChannelStatusSchema,
9283
9976
  ClientIdAndCustomerAppSchema,
9284
9977
  CmdEntrySchema,
9285
9978
  CmdInjectReportSchema,
@@ -9293,6 +9986,7 @@ var RedTeamClient = class {
9293
9986
  ContentErrorType,
9294
9987
  CountByNameSchema,
9295
9988
  CountedQuotaEnum,
9989
+ CreateChannelRequestSchema,
9296
9990
  CreateCustomTopicRequestSchema,
9297
9991
  CreateSecurityProfileRequestSchema,
9298
9992
  CustomAttackOutputSchema,
@@ -9327,6 +10021,7 @@ var RedTeamClient = class {
9327
10021
  DEFAULT_MODEL_SEC_MGMT_ENDPOINT,
9328
10022
  DEFAULT_RED_TEAM_DATA_ENDPOINT,
9329
10023
  DEFAULT_RED_TEAM_MGMT_ENDPOINT,
10024
+ DEFAULT_RED_TEAM_NETWORK_BROKER_ENDPOINT,
9330
10025
  DEFAULT_TOKEN_ENDPOINT,
9331
10026
  DLP_DATA_FILTERING_PROFILES_PATH,
9332
10027
  DLP_DATA_PATTERNS_PATH,
@@ -9468,6 +10163,7 @@ var RedTeamClient = class {
9468
10163
  LabelValueListSchema,
9469
10164
  LabelsCreateRequestSchema,
9470
10165
  LabelsResponseSchema,
10166
+ LanguageOptionSchema,
9471
10167
  ListModelSecurityGroupsResponseSchema,
9472
10168
  ListModelSecurityRuleInstancesResponseSchema,
9473
10169
  ListModelSecurityRulesResponseSchema,
@@ -9513,6 +10209,8 @@ var RedTeamClient = class {
9513
10209
  MODEL_SEC_DATA_ENDPOINT,
9514
10210
  MODEL_SEC_EVALUATIONS_PATH,
9515
10211
  MODEL_SEC_MGMT_ENDPOINT,
10212
+ MODEL_SEC_MODELS_PATH,
10213
+ MODEL_SEC_MODEL_VERSIONS_PATH,
9516
10214
  MODEL_SEC_PYPI_AUTH_PATH,
9517
10215
  MODEL_SEC_SCANS_PATH,
9518
10216
  MODEL_SEC_SECURITY_GROUPS_PATH,
@@ -9529,7 +10227,9 @@ var RedTeamClient = class {
9529
10227
  MetadataCriterionSchema,
9530
10228
  MetadataSchema,
9531
10229
  ModelConfigurationSchema,
10230
+ ModelListSchema,
9532
10231
  ModelProtectionItemSchema,
10232
+ ModelResponseSchema,
9533
10233
  ModelScanIssueSchema,
9534
10234
  ModelScanStatus,
9535
10235
  ModelSecurityClient,
@@ -9538,12 +10238,15 @@ var RedTeamClient = class {
9538
10238
  ModelSecurityGroupState,
9539
10239
  ModelSecurityGroupUpdateRequestSchema,
9540
10240
  ModelSecurityGroupsClient,
10241
+ ModelSecurityModelsClient,
9541
10242
  ModelSecurityPaginationSchema,
9542
10243
  ModelSecurityRuleInstanceResponseSchema,
9543
10244
  ModelSecurityRuleInstanceUpdateRequestSchema,
9544
10245
  ModelSecurityRuleResponseSchema,
9545
10246
  ModelSecurityRulesClient,
9546
10247
  ModelSecurityScansClient,
10248
+ ModelVersionListSchema,
10249
+ ModelVersionResponseSchema,
9547
10250
  MultiProfileDataNodeSchema,
9548
10251
  MultiProfileDetectionRuleSchema,
9549
10252
  MultiTurnStatefulConfigSchema,
@@ -9588,6 +10291,8 @@ var RedTeamClient = class {
9588
10291
  QuotaDetailsSchema,
9589
10292
  QuotaSummarySchema,
9590
10293
  RED_TEAM_CATEGORIES_PATH,
10294
+ RED_TEAM_CHANNELS_PATH,
10295
+ RED_TEAM_CHANNELS_STATS_PATH,
9591
10296
  RED_TEAM_CLIENT_ID,
9592
10297
  RED_TEAM_CLIENT_SECRET,
9593
10298
  RED_TEAM_CUSTOM_ATTACKS_REPORT_PATH,
@@ -9595,10 +10300,13 @@ var RedTeamClient = class {
9595
10300
  RED_TEAM_DASHBOARD_PATH,
9596
10301
  RED_TEAM_DATA_ENDPOINT,
9597
10302
  RED_TEAM_ERROR_LOG_PATH,
10303
+ RED_TEAM_ERROR_LOG_TARGET_PROFILE_PATH,
9598
10304
  RED_TEAM_EULA_PATH,
9599
10305
  RED_TEAM_INSTANCES_PATH,
10306
+ RED_TEAM_LANGUAGES_PATH,
9600
10307
  RED_TEAM_MGMT_DASHBOARD_PATH,
9601
10308
  RED_TEAM_MGMT_ENDPOINT,
10309
+ RED_TEAM_NETWORK_BROKER_ENDPOINT,
9602
10310
  RED_TEAM_QUOTA_PATH,
9603
10311
  RED_TEAM_REGISTRY_CREDENTIALS_PATH,
9604
10312
  RED_TEAM_REPORT_DYNAMIC_PATH,
@@ -9618,6 +10326,7 @@ var RedTeamClient = class {
9618
10326
  RedTeamErrorType,
9619
10327
  RedTeamEulaClient,
9620
10328
  RedTeamInstancesClient,
10329
+ RedTeamNetworkBrokerClient,
9621
10330
  RedTeamPaginationSchema,
9622
10331
  RedTeamReportsClient,
9623
10332
  RedTeamScansClient,
@@ -9720,6 +10429,7 @@ var RedTeamClient = class {
9720
10429
  TargetType,
9721
10430
  TargetUpdateRequestSchema,
9722
10431
  TcReportSchema,
10432
+ TenantLanguagesResponseSchema,
9723
10433
  TgReportSchema,
9724
10434
  ThreatCategory,
9725
10435
  ThreatScanReportSchema,
@@ -9735,11 +10445,13 @@ var RedTeamClient = class {
9735
10445
  TopicsClient,
9736
10446
  URLExclusionSchema,
9737
10447
  USER_AGENT,
10448
+ UpdateChannelRequestSchema,
9738
10449
  UrlCategorySchema,
9739
10450
  UrlfEntrySchema,
9740
10451
  ValidationErrorSchema,
9741
10452
  Verdict,
9742
10453
  ViolationListSchema,
10454
+ ViolationRemediationSchema,
9743
10455
  ViolationResponseSchema,
9744
10456
  ViolationSeverityCountsSchema,
9745
10457
  WebSocketConnectionParamsSchema,