@cdot65/prisma-airs-sdk 0.12.0 → 0.13.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/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.0";
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) => {
@@ -847,9 +880,38 @@ async function executeWithRetry(opts) {
847
880
  );
848
881
  }
849
882
 
883
+ // src/http/debug.ts
884
+ var import_node_crypto2 = require("crypto");
885
+ var TRUTHY = /* @__PURE__ */ new Set(["1", "true", "yes", "on"]);
886
+ var SENSITIVE_HEADERS = /* @__PURE__ */ new Set([HEADER_AUTH_TOKEN.toLowerCase(), HEADER_API_KEY.toLowerCase()]);
887
+ var PREFIX = "[airs-sdk]";
888
+ function isDebugEnabled() {
889
+ const raw = process.env.PANW_AI_SEC_DEBUG;
890
+ return raw !== void 0 && TRUTHY.has(raw.trim().toLowerCase());
891
+ }
892
+ function hashToken(value) {
893
+ return "sha256:" + (0, import_node_crypto2.createHash)("sha256").update(value).digest("hex").slice(0, 12);
894
+ }
895
+ function sanitizeHeaders(headers) {
896
+ const out = {};
897
+ for (const [key, value] of Object.entries(headers)) {
898
+ out[key] = SENSITIVE_HEADERS.has(key.toLowerCase()) ? hashToken(value) : value;
899
+ }
900
+ return out;
901
+ }
902
+ function logRequest(method, url, headers, body) {
903
+ console.error(`${PREFIX} \u2192 ${method} ${url}`);
904
+ console.error(`${PREFIX} headers ${JSON.stringify(sanitizeHeaders(headers))}`);
905
+ if (body !== void 0) console.error(`${PREFIX} body ${body}`);
906
+ }
907
+ function logResponse(status, ms, body) {
908
+ console.error(`${PREFIX} \u2190 ${status} (${ms}ms)${body !== void 0 ? ` ${body}` : ""}`);
909
+ }
910
+
850
911
  // src/http/request.ts
851
912
  async function request(spec) {
852
913
  let hasRetriedAuth = false;
914
+ const debug = isDebugEnabled();
853
915
  const response = await executeWithRetry({
854
916
  maxRetries: spec.numRetries,
855
917
  execute: async () => {
@@ -879,11 +941,25 @@ async function request(spec) {
879
941
  }
880
942
  const prepared = { method: spec.method, url, headers, bodyText };
881
943
  const final = await spec.auth.prepare(prepared);
882
- return fetch(final.url.toString(), {
944
+ const startedAt = debug ? Date.now() : 0;
945
+ if (debug) {
946
+ const logBody = spec.formData !== void 0 ? "[multipart/form-data]" : final.bodyText;
947
+ logRequest(final.method, final.url.toString(), final.headers, logBody);
948
+ }
949
+ const res = await fetch(final.url.toString(), {
883
950
  method: final.method,
884
951
  headers: final.headers,
885
952
  body: spec.formData !== void 0 ? bodyForFetch : final.bodyText
886
953
  });
954
+ if (debug) {
955
+ let respBody;
956
+ try {
957
+ respBody = await res.clone().text();
958
+ } catch {
959
+ }
960
+ logResponse(res.status, Date.now() - startedAt, respBody);
961
+ }
962
+ return res;
887
963
  },
888
964
  onRetryableFailure: async (res) => {
889
965
  if (hasRetriedAuth) return false;
@@ -2845,7 +2921,8 @@ var ScanDetailsSchema = import_zod32.z.object({
2845
2921
  var ScanCreateRequestSchema = import_zod32.z.object({
2846
2922
  model_uri: import_zod32.z.string(),
2847
2923
  security_group_uuid: import_zod32.z.string(),
2848
- scan_origin: import_zod32.z.string(),
2924
+ // Optional per the OpenAPI spec (server defaults it); the scans-client example still sets it.
2925
+ scan_origin: import_zod32.z.string().optional(),
2849
2926
  allow_patterns: import_zod32.z.array(import_zod32.z.string()).nullable().optional(),
2850
2927
  ignore_patterns: import_zod32.z.array(import_zod32.z.string()).nullable().optional(),
2851
2928
  labels: import_zod32.z.array(LabelSchema).nullable().optional(),
@@ -2864,7 +2941,8 @@ var ScanBaseResponseSchema = import_zod32.z.object({
2864
2941
  scan_origin: import_zod32.z.string(),
2865
2942
  security_group_uuid: import_zod32.z.string(),
2866
2943
  security_group_name: import_zod32.z.string(),
2867
- model_version_uuid: import_zod32.z.string(),
2944
+ // Optional per the OpenAPI spec — a scan may not have a resolved model version yet.
2945
+ model_version_uuid: import_zod32.z.string().nullable().optional(),
2868
2946
  eval_outcome: import_zod32.z.string(),
2869
2947
  source_type: import_zod32.z.string(),
2870
2948
  created_by: import_zod32.z.string().nullable().optional(),
@@ -2901,6 +2979,50 @@ var FileListSchema = import_zod32.z.object({
2901
2979
  pagination: ModelSecurityPaginationSchema,
2902
2980
  files: import_zod32.z.array(FileResponseSchema)
2903
2981
  }).passthrough();
2982
+ var ModelResponseSchema = import_zod32.z.object({
2983
+ uuid: import_zod32.z.string(),
2984
+ tsg_id: import_zod32.z.string(),
2985
+ created_at: import_zod32.z.string(),
2986
+ updated_at: import_zod32.z.string(),
2987
+ name: import_zod32.z.string(),
2988
+ latest_version_uuid: import_zod32.z.string().nullable().optional(),
2989
+ latest_version_fingerprint: import_zod32.z.string().nullable().optional(),
2990
+ latest_version_revision: import_zod32.z.string().nullable().optional(),
2991
+ latest_version_hf_commit_sha: import_zod32.z.string().nullable().optional(),
2992
+ latest_version_outcome: import_zod32.z.string().nullable().optional(),
2993
+ latest_version_formats: import_zod32.z.array(import_zod32.z.string()).nullable().optional(),
2994
+ latest_version_source_types: import_zod32.z.array(import_zod32.z.string()).nullable().optional(),
2995
+ latest_version_scan_time: import_zod32.z.string().nullable().optional()
2996
+ }).passthrough();
2997
+ var ModelListSchema = import_zod32.z.object({
2998
+ pagination: ModelSecurityPaginationSchema,
2999
+ models: import_zod32.z.array(ModelResponseSchema)
3000
+ }).passthrough();
3001
+ var ModelVersionResponseSchema = import_zod32.z.object({
3002
+ uuid: import_zod32.z.string(),
3003
+ tsg_id: import_zod32.z.string(),
3004
+ created_at: import_zod32.z.string(),
3005
+ updated_at: import_zod32.z.string(),
3006
+ revision: import_zod32.z.string(),
3007
+ model_uuid: import_zod32.z.string(),
3008
+ fingerprint: import_zod32.z.string().nullable().optional(),
3009
+ file_count: import_zod32.z.number().int().nullable().optional(),
3010
+ license: import_zod32.z.string().nullable().optional(),
3011
+ latest_scan_time: import_zod32.z.string().nullable().optional(),
3012
+ hf_commit_sha: import_zod32.z.string().nullable().optional(),
3013
+ hf_commit_title: import_zod32.z.string().nullable().optional(),
3014
+ hf_commit_authors: import_zod32.z.array(import_zod32.z.string()).nullable().optional(),
3015
+ hf_model_name: import_zod32.z.string().nullable().optional(),
3016
+ hf_organization: import_zod32.z.string().nullable().optional(),
3017
+ model_formats: import_zod32.z.array(import_zod32.z.string()).nullable().optional(),
3018
+ source_types: import_zod32.z.array(import_zod32.z.string()).nullable().optional(),
3019
+ last_eval_outcome: import_zod32.z.string().nullable().optional(),
3020
+ last_eval_summary: EvalSummarySchema.nullable().optional()
3021
+ }).passthrough();
3022
+ var ModelVersionListSchema = import_zod32.z.object({
3023
+ pagination: ModelSecurityPaginationSchema,
3024
+ model_versions: import_zod32.z.array(ModelVersionResponseSchema)
3025
+ }).passthrough();
2904
3026
  var RuleEvaluationResponseSchema = import_zod32.z.object({
2905
3027
  uuid: import_zod32.z.string(),
2906
3028
  tsg_id: import_zod32.z.string(),
@@ -2918,6 +3040,10 @@ var RuleEvaluationListSchema = import_zod32.z.object({
2918
3040
  pagination: ModelSecurityPaginationSchema,
2919
3041
  evaluations: import_zod32.z.array(RuleEvaluationResponseSchema)
2920
3042
  }).passthrough();
3043
+ var ViolationRemediationSchema = import_zod32.z.object({
3044
+ steps: import_zod32.z.array(import_zod32.z.string()),
3045
+ url: import_zod32.z.string()
3046
+ }).passthrough();
2921
3047
  var ViolationResponseSchema = import_zod32.z.object({
2922
3048
  uuid: import_zod32.z.string(),
2923
3049
  tsg_id: import_zod32.z.string(),
@@ -2928,6 +3054,7 @@ var ViolationResponseSchema = import_zod32.z.object({
2928
3054
  rule_name: import_zod32.z.string(),
2929
3055
  rule_description: import_zod32.z.string(),
2930
3056
  rule_instance_state: import_zod32.z.string(),
3057
+ remediation: ViolationRemediationSchema,
2931
3058
  file: import_zod32.z.string().nullable().optional(),
2932
3059
  hash: import_zod32.z.string().nullable().optional(),
2933
3060
  module: import_zod32.z.string().nullable().optional(),
@@ -3063,6 +3190,11 @@ var BrandSubCategory = {
3063
3190
  DISCRIMINATING_CLAIMS: "DISCRIMINATING_CLAIMS",
3064
3191
  POLITICAL_ENDORSEMENTS: "POLITICAL_ENDORSEMENTS"
3065
3192
  };
3193
+ var ChannelStatus = {
3194
+ ONLINE: "ONLINE",
3195
+ OFFLINE: "OFFLINE",
3196
+ DRAFT: "DRAFT"
3197
+ };
3066
3198
  var ComplianceSubCategory = {
3067
3199
  OWASP: "OWASP",
3068
3200
  MITRE_ATLAS: "MITRE_ATLAS",
@@ -3886,6 +4018,12 @@ var ErrorLogSchema = import_zod33.z.object({
3886
4018
  version: import_zod33.z.number().int().optional()
3887
4019
  }).passthrough();
3888
4020
  var ErrorLogListResponseSchema = import_zod33.z.object({ pagination: RedTeamPaginationSchema, data: import_zod33.z.array(ErrorLogSchema) }).passthrough();
4021
+ var LanguageOptionSchema = import_zod33.z.object({ code: import_zod33.z.string(), name: import_zod33.z.string() }).passthrough();
4022
+ var TenantLanguagesResponseSchema = import_zod33.z.object({
4023
+ multilingual_enabled: import_zod33.z.boolean(),
4024
+ supported_job_types: import_zod33.z.array(import_zod33.z.string()),
4025
+ languages: import_zod33.z.array(LanguageOptionSchema)
4026
+ }).passthrough();
3889
4027
  var TargetRequestBaseFields = {
3890
4028
  name: import_zod33.z.string(),
3891
4029
  description: import_zod33.z.string().nullable().optional(),
@@ -4240,6 +4378,48 @@ var RegistryCredentialsSchema = import_zod33.z.object({
4240
4378
  expiry: import_zod33.z.string()
4241
4379
  }).passthrough();
4242
4380
 
4381
+ // src/models/red-team-network-broker.ts
4382
+ var import_zod34 = require("zod");
4383
+ var ChannelStatusSchema = import_zod34.z.nativeEnum(ChannelStatus);
4384
+ var CreateChannelRequestSchema = import_zod34.z.object({
4385
+ name: import_zod34.z.string(),
4386
+ description: import_zod34.z.string().optional()
4387
+ }).passthrough();
4388
+ var UpdateChannelRequestSchema = import_zod34.z.object({
4389
+ name: import_zod34.z.string().optional(),
4390
+ description: import_zod34.z.string().optional()
4391
+ }).passthrough();
4392
+ var ChannelSchema = import_zod34.z.object({
4393
+ uuid: import_zod34.z.string().optional(),
4394
+ name: import_zod34.z.string().nullable().optional(),
4395
+ description: import_zod34.z.string().nullable().optional(),
4396
+ // Kept as a plain string (not the enum) so unknown upstream statuses never fail parsing.
4397
+ status: import_zod34.z.string().nullable().optional(),
4398
+ added_by: import_zod34.z.string().nullable().optional(),
4399
+ created_at: import_zod34.z.string().nullable().optional(),
4400
+ updated_at: import_zod34.z.string().nullable().optional(),
4401
+ last_online_at: import_zod34.z.string().nullable().optional(),
4402
+ // Present on live responses (not in the base OpenAPI Channel schema).
4403
+ connected_clients_count: import_zod34.z.number().int().nullable().optional(),
4404
+ outdated_clients_count: import_zod34.z.number().int().nullable().optional(),
4405
+ features: import_zod34.z.record(import_zod34.z.boolean()).nullable().optional()
4406
+ }).passthrough();
4407
+ var ChannelListPaginationSchema = import_zod34.z.object({ total_items: import_zod34.z.number().int().nullable().optional() }).passthrough();
4408
+ var ChannelListResponseSchema = import_zod34.z.object({
4409
+ pagination: ChannelListPaginationSchema.optional(),
4410
+ data: import_zod34.z.array(ChannelSchema).default([])
4411
+ }).passthrough();
4412
+ var ChannelStatsSchema = import_zod34.z.object({
4413
+ network_channels_server_domain: import_zod34.z.string().nullable().optional(),
4414
+ docker_registry: import_zod34.z.string().nullable().optional(),
4415
+ helm_chart: import_zod34.z.string().nullable().optional(),
4416
+ docker_image: import_zod34.z.string().nullable().optional(),
4417
+ online_channels: import_zod34.z.number().int().nullable().optional(),
4418
+ total_channels: import_zod34.z.number().int().nullable().optional(),
4419
+ // Present on live responses (not in the base OpenAPI ChannelStats schema).
4420
+ client_version: import_zod34.z.string().nullable().optional()
4421
+ }).passthrough();
4422
+
4243
4423
  // src/http/auth/oauth.ts
4244
4424
  var OAuthAuth = class {
4245
4425
  constructor(oauthClient) {
@@ -4262,12 +4442,12 @@ var OAuthAuth = class {
4262
4442
  };
4263
4443
 
4264
4444
  // 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()
4445
+ var import_zod35 = require("zod");
4446
+ var OAuthTokenResponseSchema = import_zod35.z.object({
4447
+ access_token: import_zod35.z.string(),
4448
+ token_type: import_zod35.z.string().optional(),
4449
+ expires_in: import_zod35.z.number(),
4450
+ scope: import_zod35.z.string().optional()
4271
4451
  }).passthrough();
4272
4452
 
4273
4453
  // src/management/oauth-client.ts
@@ -5058,7 +5238,7 @@ var CustomerAppsClient = class {
5058
5238
  return request({
5059
5239
  method: "GET",
5060
5240
  baseUrl: this.baseUrl,
5061
- path: `${MGMT_CUSTOMER_APPS_TSG_PATH}/${this.tsgId}`,
5241
+ path: `${MGMT_CUSTOMER_APPS_TSG_PATH}/${encodeURIComponent(this.tsgId)}`,
5062
5242
  params,
5063
5243
  responseSchema: CustomerAppListResponseSchema,
5064
5244
  auth: this.auth,
@@ -5252,7 +5432,7 @@ var ScanLogsClient = class {
5252
5432
  };
5253
5433
 
5254
5434
  // src/management/oauth-management.ts
5255
- var import_zod35 = require("zod");
5435
+ var import_zod36 = require("zod");
5256
5436
  var OAuthManagementClient = class {
5257
5437
  baseUrl;
5258
5438
  auth;
@@ -5286,7 +5466,7 @@ var OAuthManagementClient = class {
5286
5466
  path: MGMT_OAUTH_INVALIDATE_PATH,
5287
5467
  params: { token },
5288
5468
  body,
5289
- responseSchema: import_zod35.z.string(),
5469
+ responseSchema: import_zod36.z.string(),
5290
5470
  auth: this.auth,
5291
5471
  numRetries: this.numRetries
5292
5472
  });
@@ -6914,6 +7094,170 @@ var ModelSecurityRulesClient = class {
6914
7094
  }
6915
7095
  };
6916
7096
 
7097
+ // src/model-security/models-client.ts
7098
+ function buildModelListParams(opts) {
7099
+ const params = serializeListing(opts);
7100
+ if (opts?.search_query !== void 0) params.search_query = opts.search_query;
7101
+ if (opts?.sort_field !== void 0) params.sort_field = opts.sort_field;
7102
+ if (opts?.sort_order !== void 0) params.sort_order = opts.sort_order;
7103
+ if (opts?.latest_version_outcomes !== void 0)
7104
+ params.latest_version_outcomes = opts.latest_version_outcomes;
7105
+ if (opts?.latest_version_formats !== void 0)
7106
+ params.latest_version_formats = opts.latest_version_formats;
7107
+ if (opts?.latest_version_source_types !== void 0)
7108
+ params.latest_version_source_types = opts.latest_version_source_types;
7109
+ if (opts?.latest_version_scan_time_before !== void 0)
7110
+ params.latest_version_scan_time_before = opts.latest_version_scan_time_before;
7111
+ if (opts?.start_time !== void 0) params.start_time = opts.start_time;
7112
+ if (opts?.end_time !== void 0) params.end_time = opts.end_time;
7113
+ return params;
7114
+ }
7115
+ var ModelSecurityModelsClient = class {
7116
+ baseUrl;
7117
+ auth;
7118
+ numRetries;
7119
+ constructor(opts) {
7120
+ this.baseUrl = opts.baseUrl;
7121
+ this.auth = opts.auth;
7122
+ this.numRetries = opts.numRetries;
7123
+ }
7124
+ /**
7125
+ * List models with optional search, sort, and latest-version filters.
7126
+ * @param opts - Pagination and filter options.
7127
+ * @returns Paginated list of models.
7128
+ * @example
7129
+ * ```ts
7130
+ * import { ModelSecurityClient } from '@cdot65/prisma-airs-sdk';
7131
+ * const ms = new ModelSecurityClient();
7132
+ *
7133
+ * const models = await ms.models.listModels({ limit: 10, search_query: 'llama' });
7134
+ * // models =>
7135
+ * // { pagination: { total_items: 3 }, models: [{ uuid: '550e8400-...', name: 'org/llama', latest_version_outcome: 'PASSED' }] }
7136
+ * ```
7137
+ */
7138
+ async listModels(opts) {
7139
+ return request({
7140
+ method: "GET",
7141
+ baseUrl: this.baseUrl,
7142
+ path: MODEL_SEC_MODELS_PATH,
7143
+ params: buildModelListParams(opts),
7144
+ responseSchema: ModelListSchema,
7145
+ auth: this.auth,
7146
+ numRetries: this.numRetries
7147
+ });
7148
+ }
7149
+ /**
7150
+ * Get a single model by UUID.
7151
+ * @param uuid - Model UUID.
7152
+ * @returns The model.
7153
+ * @example
7154
+ * ```ts
7155
+ * import { ModelSecurityClient } from '@cdot65/prisma-airs-sdk';
7156
+ * const ms = new ModelSecurityClient();
7157
+ *
7158
+ * const model = await ms.models.getModel('550e8400-e29b-41d4-a716-446655440000');
7159
+ * // model =>
7160
+ * // { uuid: '550e8400-...', name: 'org/model', latest_version_uuid: '660e8400-...', latest_version_outcome: 'PASSED' }
7161
+ * ```
7162
+ */
7163
+ async getModel(uuid) {
7164
+ assertUuid(uuid, "model uuid");
7165
+ return request({
7166
+ method: "GET",
7167
+ baseUrl: this.baseUrl,
7168
+ path: `${MODEL_SEC_MODELS_PATH}/${uuid}`,
7169
+ responseSchema: ModelResponseSchema,
7170
+ auth: this.auth,
7171
+ numRetries: this.numRetries
7172
+ });
7173
+ }
7174
+ /**
7175
+ * List the versions of a model.
7176
+ * @param modelUuid - Model UUID.
7177
+ * @param opts - Pagination and sort options.
7178
+ * @returns Paginated list of model versions.
7179
+ * @example
7180
+ * ```ts
7181
+ * import { ModelSecurityClient } from '@cdot65/prisma-airs-sdk';
7182
+ * const ms = new ModelSecurityClient();
7183
+ *
7184
+ * const versions = await ms.models.listModelVersions('550e8400-e29b-41d4-a716-446655440000', {
7185
+ * sort_order: 'desc',
7186
+ * });
7187
+ * // versions =>
7188
+ * // { pagination: { total_items: 2 }, model_versions: [{ uuid: '660e8400-...', revision: 'main', file_count: 12 }] }
7189
+ * ```
7190
+ */
7191
+ async listModelVersions(modelUuid, opts) {
7192
+ assertUuid(modelUuid, "model uuid");
7193
+ const params = serializeListing(opts);
7194
+ if (opts?.sort_order !== void 0) params.sort_order = opts.sort_order;
7195
+ return request({
7196
+ method: "GET",
7197
+ baseUrl: this.baseUrl,
7198
+ path: `${MODEL_SEC_MODELS_PATH}/${modelUuid}/model-versions`,
7199
+ params,
7200
+ responseSchema: ModelVersionListSchema,
7201
+ auth: this.auth,
7202
+ numRetries: this.numRetries
7203
+ });
7204
+ }
7205
+ /**
7206
+ * Get a single model version by UUID.
7207
+ * @param uuid - Model version UUID.
7208
+ * @returns The model version.
7209
+ * @example
7210
+ * ```ts
7211
+ * import { ModelSecurityClient } from '@cdot65/prisma-airs-sdk';
7212
+ * const ms = new ModelSecurityClient();
7213
+ *
7214
+ * const version = await ms.models.getModelVersion('660e8400-e29b-41d4-a716-446655440000');
7215
+ * // version =>
7216
+ * // { uuid: '660e8400-...', revision: 'main', model_uuid: '550e8400-...', last_eval_outcome: 'PASSED' }
7217
+ * ```
7218
+ */
7219
+ async getModelVersion(uuid) {
7220
+ assertUuid(uuid, "model version uuid");
7221
+ return request({
7222
+ method: "GET",
7223
+ baseUrl: this.baseUrl,
7224
+ path: `${MODEL_SEC_MODEL_VERSIONS_PATH}/${uuid}`,
7225
+ responseSchema: ModelVersionResponseSchema,
7226
+ auth: this.auth,
7227
+ numRetries: this.numRetries
7228
+ });
7229
+ }
7230
+ /**
7231
+ * List the files of a model version.
7232
+ * @param modelVersionUuid - Model version UUID.
7233
+ * @param opts - Pagination options.
7234
+ * @returns Paginated list of files (same shape as scan files).
7235
+ * @example
7236
+ * ```ts
7237
+ * import { ModelSecurityClient } from '@cdot65/prisma-airs-sdk';
7238
+ * const ms = new ModelSecurityClient();
7239
+ *
7240
+ * const files = await ms.models.listModelVersionFiles('660e8400-e29b-41d4-a716-446655440000', {
7241
+ * limit: 50,
7242
+ * });
7243
+ * // files =>
7244
+ * // { pagination: { total_items: 12 }, files: [{ uuid: '770e8400-...', path: '/model.safetensors', type: 'FILE', result: 'SUCCESS' }] }
7245
+ * ```
7246
+ */
7247
+ async listModelVersionFiles(modelVersionUuid, opts) {
7248
+ assertUuid(modelVersionUuid, "model version uuid");
7249
+ return request({
7250
+ method: "GET",
7251
+ baseUrl: this.baseUrl,
7252
+ path: `${MODEL_SEC_MODEL_VERSIONS_PATH}/${modelVersionUuid}/files`,
7253
+ params: serializeListing(opts),
7254
+ responseSchema: FileListSchema,
7255
+ auth: this.auth,
7256
+ numRetries: this.numRetries
7257
+ });
7258
+ }
7259
+ };
7260
+
6917
7261
  // src/model-security/client.ts
6918
7262
  var ModelSecurityClient = class {
6919
7263
  /** Data plane scan operations. */
@@ -6922,6 +7266,8 @@ var ModelSecurityClient = class {
6922
7266
  securityGroups;
6923
7267
  /** Management plane security rule operations (read-only). */
6924
7268
  securityRules;
7269
+ /** Data plane model and model-version operations (read-only). */
7270
+ models;
6925
7271
  mgmtEndpoint;
6926
7272
  auth;
6927
7273
  numRetries;
@@ -6943,6 +7289,7 @@ var ModelSecurityClient = class {
6943
7289
  this.mgmtEndpoint = mgmtEndpoint;
6944
7290
  this.numRetries = numRetries;
6945
7291
  this.scans = new ModelSecurityScansClient({ baseUrl: dataEndpoint, auth, numRetries });
7292
+ this.models = new ModelSecurityModelsClient({ baseUrl: dataEndpoint, auth, numRetries });
6946
7293
  this.securityGroups = new ModelSecurityGroupsClient({
6947
7294
  baseUrl: mgmtEndpoint,
6948
7295
  auth,
@@ -6980,7 +7327,7 @@ var ModelSecurityClient = class {
6980
7327
  };
6981
7328
 
6982
7329
  // src/red-team/scans-client.ts
6983
- var import_zod36 = require("zod");
7330
+ var import_zod37 = require("zod");
6984
7331
  var RedTeamScansClient = class {
6985
7332
  baseUrl;
6986
7333
  auth;
@@ -7117,7 +7464,7 @@ var RedTeamScansClient = class {
7117
7464
  method: "GET",
7118
7465
  baseUrl: this.baseUrl,
7119
7466
  path: RED_TEAM_CATEGORIES_PATH,
7120
- responseSchema: import_zod36.z.array(CategoryModelSchema),
7467
+ responseSchema: import_zod37.z.array(CategoryModelSchema),
7121
7468
  auth: this.auth,
7122
7469
  numRetries: this.numRetries
7123
7470
  });
@@ -7125,7 +7472,7 @@ var RedTeamScansClient = class {
7125
7472
  };
7126
7473
 
7127
7474
  // src/red-team/reports-client.ts
7128
- var import_zod37 = require("zod");
7475
+ var import_zod38 = require("zod");
7129
7476
  var RedTeamReportsClient = class {
7130
7477
  baseUrl;
7131
7478
  auth;
@@ -7500,7 +7847,7 @@ var RedTeamReportsClient = class {
7500
7847
  baseUrl: this.baseUrl,
7501
7848
  path: `${RED_TEAM_REPORT_PATH}/${jobId}/download`,
7502
7849
  params: { file_format: format },
7503
- responseSchema: import_zod37.z.unknown(),
7850
+ responseSchema: import_zod38.z.unknown(),
7504
7851
  auth: this.auth,
7505
7852
  numRetries: this.numRetries
7506
7853
  });
@@ -7524,7 +7871,7 @@ var RedTeamReportsClient = class {
7524
7871
  method: "POST",
7525
7872
  baseUrl: this.baseUrl,
7526
7873
  path: `${RED_TEAM_REPORT_PATH}/${jobId}/generate-partial-report`,
7527
- responseSchema: import_zod37.z.unknown(),
7874
+ responseSchema: import_zod38.z.unknown(),
7528
7875
  auth: this.auth,
7529
7876
  numRetries: this.numRetries
7530
7877
  });
@@ -7532,7 +7879,7 @@ var RedTeamReportsClient = class {
7532
7879
  };
7533
7880
 
7534
7881
  // src/red-team/custom-attack-reports-client.ts
7535
- var import_zod38 = require("zod");
7882
+ var import_zod39 = require("zod");
7536
7883
  var RedTeamCustomAttackReportsClient = class {
7537
7884
  baseUrl;
7538
7885
  auth;
@@ -7622,7 +7969,7 @@ var RedTeamCustomAttackReportsClient = class {
7622
7969
  baseUrl: this.baseUrl,
7623
7970
  path: `${RED_TEAM_CUSTOM_ATTACKS_REPORT_PATH}/report/${jobId}/prompt-set/${promptSetId}/prompts`,
7624
7971
  params,
7625
- responseSchema: import_zod38.z.array(PromptDetailResponseSchema),
7972
+ responseSchema: import_zod39.z.array(PromptDetailResponseSchema),
7626
7973
  auth: this.auth,
7627
7974
  numRetries: this.numRetries
7628
7975
  });
@@ -7716,7 +8063,7 @@ var RedTeamCustomAttackReportsClient = class {
7716
8063
  method: "GET",
7717
8064
  baseUrl: this.baseUrl,
7718
8065
  path: `${RED_TEAM_CUSTOM_ATTACKS_REPORT_PATH}/job/${jobId}/attack/${attackId}/list-outputs`,
7719
- responseSchema: import_zod38.z.array(CustomAttackOutputSchema),
8066
+ responseSchema: import_zod39.z.array(CustomAttackOutputSchema),
7720
8067
  auth: this.auth,
7721
8068
  numRetries: this.numRetries
7722
8069
  });
@@ -7741,7 +8088,7 @@ var RedTeamCustomAttackReportsClient = class {
7741
8088
  method: "GET",
7742
8089
  baseUrl: this.baseUrl,
7743
8090
  path: `${RED_TEAM_CUSTOM_ATTACKS_REPORT_PATH}/job/${jobId}/property-stats`,
7744
- responseSchema: import_zod38.z.array(PropertyStatisticSchema),
8091
+ responseSchema: import_zod39.z.array(PropertyStatisticSchema),
7745
8092
  auth: this.auth,
7746
8093
  numRetries: this.numRetries
7747
8094
  });
@@ -7749,7 +8096,7 @@ var RedTeamCustomAttackReportsClient = class {
7749
8096
  };
7750
8097
 
7751
8098
  // src/red-team/targets-client.ts
7752
- var import_zod39 = require("zod");
8099
+ var import_zod40 = require("zod");
7753
8100
  var RedTeamTargetsClient = class {
7754
8101
  baseUrl;
7755
8102
  auth;
@@ -8042,7 +8389,7 @@ var RedTeamTargetsClient = class {
8042
8389
  method: "GET",
8043
8390
  baseUrl: this.baseUrl,
8044
8391
  path: `${RED_TEAM_TEMPLATE_PATH}/target-metadata`,
8045
- responseSchema: import_zod39.z.record(import_zod39.z.unknown()),
8392
+ responseSchema: import_zod40.z.record(import_zod40.z.unknown()),
8046
8393
  auth: this.auth,
8047
8394
  numRetries: this.numRetries
8048
8395
  });
@@ -8991,6 +9338,155 @@ var RedTeamInstancesClient = class {
8991
9338
  }
8992
9339
  };
8993
9340
 
9341
+ // src/red-team/network-broker-client.ts
9342
+ var RedTeamNetworkBrokerClient = class {
9343
+ baseUrl;
9344
+ auth;
9345
+ numRetries;
9346
+ constructor(opts) {
9347
+ this.baseUrl = opts.baseUrl;
9348
+ this.auth = opts.auth;
9349
+ this.numRetries = opts.numRetries;
9350
+ }
9351
+ /**
9352
+ * List network broker channels with optional filters.
9353
+ * @param opts - Optional pagination, search, and status filter options.
9354
+ * @returns The paginated list of channels.
9355
+ * @example
9356
+ * ```ts
9357
+ * import { RedTeamClient } from '@cdot65/prisma-airs-sdk';
9358
+ * const rt = new RedTeamClient();
9359
+ *
9360
+ * const channels = await rt.networkBroker.listChannels({ status: ['ONLINE', 'DRAFT'], limit: 10 });
9361
+ * // channels =>
9362
+ * // { pagination: { total_items: 2 }, data: [{ uuid: '550e8400-...', name: 'prod-broker', status: 'ONLINE' }] }
9363
+ * ```
9364
+ */
9365
+ async listChannels(opts) {
9366
+ const params = serializeListing(opts);
9367
+ if (opts?.status !== void 0) {
9368
+ params.status = Array.isArray(opts.status) ? opts.status : [opts.status];
9369
+ }
9370
+ if (opts?.include_all_if_empty !== void 0) {
9371
+ params.include_all_if_empty = String(opts.include_all_if_empty);
9372
+ }
9373
+ return request({
9374
+ method: "GET",
9375
+ baseUrl: this.baseUrl,
9376
+ path: RED_TEAM_CHANNELS_PATH,
9377
+ params,
9378
+ responseSchema: ChannelListResponseSchema,
9379
+ auth: this.auth,
9380
+ numRetries: this.numRetries
9381
+ });
9382
+ }
9383
+ /**
9384
+ * Create a network broker channel.
9385
+ * @param body - Channel creation request body (requires `name`).
9386
+ * @returns The created channel.
9387
+ * @example
9388
+ * ```ts
9389
+ * import { RedTeamClient } from '@cdot65/prisma-airs-sdk';
9390
+ * const rt = new RedTeamClient();
9391
+ *
9392
+ * const channel = await rt.networkBroker.createChannel({
9393
+ * name: 'prod-broker',
9394
+ * description: 'Production network broker channel',
9395
+ * });
9396
+ * // channel =>
9397
+ * // { uuid: '550e8400-...', name: 'prod-broker', status: 'DRAFT' }
9398
+ * ```
9399
+ */
9400
+ async createChannel(body) {
9401
+ return request({
9402
+ method: "POST",
9403
+ baseUrl: this.baseUrl,
9404
+ path: RED_TEAM_CHANNELS_PATH,
9405
+ body,
9406
+ responseSchema: ChannelSchema,
9407
+ auth: this.auth,
9408
+ numRetries: this.numRetries
9409
+ });
9410
+ }
9411
+ /**
9412
+ * Get network broker channel stats.
9413
+ * @returns The channel stats (broker server, registry, chart, image, channel counts).
9414
+ * @example
9415
+ * ```ts
9416
+ * import { RedTeamClient } from '@cdot65/prisma-airs-sdk';
9417
+ * const rt = new RedTeamClient();
9418
+ *
9419
+ * const stats = await rt.networkBroker.getChannelStats();
9420
+ * // stats =>
9421
+ * // { network_channels_server_domain: 'broker.example.com', online_channels: 3, total_channels: 5, client_version: '1.4.0' }
9422
+ * ```
9423
+ */
9424
+ async getChannelStats() {
9425
+ return request({
9426
+ method: "GET",
9427
+ baseUrl: this.baseUrl,
9428
+ path: RED_TEAM_CHANNELS_STATS_PATH,
9429
+ responseSchema: ChannelStatsSchema,
9430
+ auth: this.auth,
9431
+ numRetries: this.numRetries
9432
+ });
9433
+ }
9434
+ /**
9435
+ * Get a network broker channel by UUID.
9436
+ * @param channelId - The channel UUID.
9437
+ * @returns The channel.
9438
+ * @example
9439
+ * ```ts
9440
+ * import { RedTeamClient } from '@cdot65/prisma-airs-sdk';
9441
+ * const rt = new RedTeamClient();
9442
+ *
9443
+ * const channel = await rt.networkBroker.getChannel('550e8400-e29b-41d4-a716-446655440000');
9444
+ * // channel =>
9445
+ * // { uuid: '550e8400-...', name: 'prod-broker', status: 'ONLINE' }
9446
+ * ```
9447
+ */
9448
+ async getChannel(channelId) {
9449
+ assertUuid(channelId, "channel id");
9450
+ return request({
9451
+ method: "GET",
9452
+ baseUrl: this.baseUrl,
9453
+ path: `${RED_TEAM_CHANNELS_PATH}/${channelId}`,
9454
+ responseSchema: ChannelSchema,
9455
+ auth: this.auth,
9456
+ numRetries: this.numRetries
9457
+ });
9458
+ }
9459
+ /**
9460
+ * Update a network broker channel's name or description.
9461
+ * @param channelId - The channel UUID.
9462
+ * @param body - Channel update request body.
9463
+ * @returns The updated channel.
9464
+ * @example
9465
+ * ```ts
9466
+ * import { RedTeamClient } from '@cdot65/prisma-airs-sdk';
9467
+ * const rt = new RedTeamClient();
9468
+ *
9469
+ * const channel = await rt.networkBroker.updateChannel('550e8400-e29b-41d4-a716-446655440000', {
9470
+ * description: 'Updated description',
9471
+ * });
9472
+ * // channel =>
9473
+ * // { uuid: '550e8400-...', name: 'prod-broker', description: 'Updated description', status: 'ONLINE' }
9474
+ * ```
9475
+ */
9476
+ async updateChannel(channelId, body) {
9477
+ assertUuid(channelId, "channel id");
9478
+ return request({
9479
+ method: "PATCH",
9480
+ baseUrl: this.baseUrl,
9481
+ path: `${RED_TEAM_CHANNELS_PATH}/${channelId}`,
9482
+ body,
9483
+ responseSchema: ChannelSchema,
9484
+ auth: this.auth,
9485
+ numRetries: this.numRetries
9486
+ });
9487
+ }
9488
+ };
9489
+
8994
9490
  // src/red-team/client.ts
8995
9491
  var RedTeamClient = class {
8996
9492
  /** Data plane scan operations. */
@@ -9007,6 +9503,8 @@ var RedTeamClient = class {
9007
9503
  eula;
9008
9504
  /** Management plane instance/licensing operations. */
9009
9505
  instances;
9506
+ /** Network broker channel operations (distinct network broker base URL). */
9507
+ networkBroker;
9010
9508
  dataEndpoint;
9011
9509
  mgmtEndpoint;
9012
9510
  auth;
@@ -9014,6 +9512,7 @@ var RedTeamClient = class {
9014
9512
  constructor(opts = {}) {
9015
9513
  const dataEndpoint = opts.dataEndpoint ?? process.env[RED_TEAM_DATA_ENDPOINT] ?? DEFAULT_RED_TEAM_DATA_ENDPOINT;
9016
9514
  const mgmtEndpoint = opts.mgmtEndpoint ?? process.env[RED_TEAM_MGMT_ENDPOINT] ?? DEFAULT_RED_TEAM_MGMT_ENDPOINT;
9515
+ const networkBrokerEndpoint = opts.networkBrokerEndpoint ?? process.env[RED_TEAM_NETWORK_BROKER_ENDPOINT] ?? DEFAULT_RED_TEAM_NETWORK_BROKER_ENDPOINT;
9017
9516
  const { oauthClient, numRetries } = resolveOAuthConfig({
9018
9517
  clientId: opts.clientId,
9019
9518
  clientSecret: opts.clientSecret,
@@ -9044,6 +9543,11 @@ var RedTeamClient = class {
9044
9543
  });
9045
9544
  this.eula = new RedTeamEulaClient({ baseUrl: mgmtEndpoint, auth, numRetries });
9046
9545
  this.instances = new RedTeamInstancesClient({ baseUrl: mgmtEndpoint, auth, numRetries });
9546
+ this.networkBroker = new RedTeamNetworkBrokerClient({
9547
+ baseUrl: networkBrokerEndpoint,
9548
+ auth,
9549
+ numRetries
9550
+ });
9047
9551
  }
9048
9552
  // -----------------------------------------------------------------------
9049
9553
  // Data plane convenience methods
@@ -9152,6 +9656,82 @@ var RedTeamClient = class {
9152
9656
  numRetries: this.numRetries
9153
9657
  });
9154
9658
  }
9659
+ /**
9660
+ * List profiling error logs for a target (data plane).
9661
+ * @param targetId - The target UUID.
9662
+ * @param opts - Optional pagination/search options (the endpoint honors `limit`).
9663
+ * @returns The paginated list of target-profile error logs.
9664
+ * @example
9665
+ * ```ts
9666
+ * import { RedTeamClient } from '@cdot65/prisma-airs-sdk';
9667
+ * const rt = new RedTeamClient();
9668
+ *
9669
+ * const logs = await rt.getTargetProfileErrorLogs('550e8400-e29b-41d4-a716-446655440000', { limit: 10 });
9670
+ * // logs =>
9671
+ * // { pagination: { total_items: 1 }, data: [{ target_id: '550e8400-...', error_type: 'PROBE', error_message: '...', created_at: '2025-01-01T00:00:00Z' }] }
9672
+ * ```
9673
+ */
9674
+ async getTargetProfileErrorLogs(targetId, opts) {
9675
+ assertUuid(targetId, "target id");
9676
+ return request({
9677
+ method: "GET",
9678
+ baseUrl: this.dataEndpoint,
9679
+ path: `${RED_TEAM_ERROR_LOG_TARGET_PROFILE_PATH}/${targetId}`,
9680
+ params: serializeListing(opts),
9681
+ responseSchema: ErrorLogListResponseSchema,
9682
+ auth: this.auth,
9683
+ numRetries: this.numRetries
9684
+ });
9685
+ }
9686
+ /**
9687
+ * Get the tenant's allowed languages for Red Team scans (data plane).
9688
+ * @returns The supported-languages response.
9689
+ * @example
9690
+ * ```ts
9691
+ * import { RedTeamClient } from '@cdot65/prisma-airs-sdk';
9692
+ * const rt = new RedTeamClient();
9693
+ *
9694
+ * const langs = await rt.getLanguages();
9695
+ * // langs =>
9696
+ * // { multilingual_enabled: true, supported_job_types: ['STATIC', 'DYNAMIC'],
9697
+ * // languages: [{ code: 'en', name: 'English' }, { code: 'es', name: 'Spanish' }] }
9698
+ * ```
9699
+ */
9700
+ async getLanguages() {
9701
+ return request({
9702
+ method: "GET",
9703
+ baseUrl: this.dataEndpoint,
9704
+ path: RED_TEAM_LANGUAGES_PATH,
9705
+ responseSchema: TenantLanguagesResponseSchema,
9706
+ auth: this.auth,
9707
+ numRetries: this.numRetries
9708
+ });
9709
+ }
9710
+ /**
9711
+ * Get the tenant's allowed languages from the management plane.
9712
+ * Same response shape as {@link RedTeamClient.getLanguages}, served from the management endpoint.
9713
+ * @returns The supported-languages response.
9714
+ * @example
9715
+ * ```ts
9716
+ * import { RedTeamClient } from '@cdot65/prisma-airs-sdk';
9717
+ * const rt = new RedTeamClient();
9718
+ *
9719
+ * const langs = await rt.getManagementLanguages();
9720
+ * // langs =>
9721
+ * // { multilingual_enabled: true, supported_job_types: ['STATIC', 'DYNAMIC'],
9722
+ * // languages: [{ code: 'en', name: 'English' }] }
9723
+ * ```
9724
+ */
9725
+ async getManagementLanguages() {
9726
+ return request({
9727
+ method: "GET",
9728
+ baseUrl: this.mgmtEndpoint,
9729
+ path: RED_TEAM_LANGUAGES_PATH,
9730
+ responseSchema: TenantLanguagesResponseSchema,
9731
+ auth: this.auth,
9732
+ numRetries: this.numRetries
9733
+ });
9734
+ }
9155
9735
  /**
9156
9736
  * Update sentiment for a scan report.
9157
9737
  * @param body - The sentiment request body.
@@ -9280,6 +9860,12 @@ var RedTeamClient = class {
9280
9860
  CategoryModelSchema,
9281
9861
  CategoryReportSchema,
9282
9862
  CgReportSchema,
9863
+ ChannelListPaginationSchema,
9864
+ ChannelListResponseSchema,
9865
+ ChannelSchema,
9866
+ ChannelStatsSchema,
9867
+ ChannelStatus,
9868
+ ChannelStatusSchema,
9283
9869
  ClientIdAndCustomerAppSchema,
9284
9870
  CmdEntrySchema,
9285
9871
  CmdInjectReportSchema,
@@ -9293,6 +9879,7 @@ var RedTeamClient = class {
9293
9879
  ContentErrorType,
9294
9880
  CountByNameSchema,
9295
9881
  CountedQuotaEnum,
9882
+ CreateChannelRequestSchema,
9296
9883
  CreateCustomTopicRequestSchema,
9297
9884
  CreateSecurityProfileRequestSchema,
9298
9885
  CustomAttackOutputSchema,
@@ -9327,6 +9914,7 @@ var RedTeamClient = class {
9327
9914
  DEFAULT_MODEL_SEC_MGMT_ENDPOINT,
9328
9915
  DEFAULT_RED_TEAM_DATA_ENDPOINT,
9329
9916
  DEFAULT_RED_TEAM_MGMT_ENDPOINT,
9917
+ DEFAULT_RED_TEAM_NETWORK_BROKER_ENDPOINT,
9330
9918
  DEFAULT_TOKEN_ENDPOINT,
9331
9919
  DLP_DATA_FILTERING_PROFILES_PATH,
9332
9920
  DLP_DATA_PATTERNS_PATH,
@@ -9468,6 +10056,7 @@ var RedTeamClient = class {
9468
10056
  LabelValueListSchema,
9469
10057
  LabelsCreateRequestSchema,
9470
10058
  LabelsResponseSchema,
10059
+ LanguageOptionSchema,
9471
10060
  ListModelSecurityGroupsResponseSchema,
9472
10061
  ListModelSecurityRuleInstancesResponseSchema,
9473
10062
  ListModelSecurityRulesResponseSchema,
@@ -9513,6 +10102,8 @@ var RedTeamClient = class {
9513
10102
  MODEL_SEC_DATA_ENDPOINT,
9514
10103
  MODEL_SEC_EVALUATIONS_PATH,
9515
10104
  MODEL_SEC_MGMT_ENDPOINT,
10105
+ MODEL_SEC_MODELS_PATH,
10106
+ MODEL_SEC_MODEL_VERSIONS_PATH,
9516
10107
  MODEL_SEC_PYPI_AUTH_PATH,
9517
10108
  MODEL_SEC_SCANS_PATH,
9518
10109
  MODEL_SEC_SECURITY_GROUPS_PATH,
@@ -9529,7 +10120,9 @@ var RedTeamClient = class {
9529
10120
  MetadataCriterionSchema,
9530
10121
  MetadataSchema,
9531
10122
  ModelConfigurationSchema,
10123
+ ModelListSchema,
9532
10124
  ModelProtectionItemSchema,
10125
+ ModelResponseSchema,
9533
10126
  ModelScanIssueSchema,
9534
10127
  ModelScanStatus,
9535
10128
  ModelSecurityClient,
@@ -9538,12 +10131,15 @@ var RedTeamClient = class {
9538
10131
  ModelSecurityGroupState,
9539
10132
  ModelSecurityGroupUpdateRequestSchema,
9540
10133
  ModelSecurityGroupsClient,
10134
+ ModelSecurityModelsClient,
9541
10135
  ModelSecurityPaginationSchema,
9542
10136
  ModelSecurityRuleInstanceResponseSchema,
9543
10137
  ModelSecurityRuleInstanceUpdateRequestSchema,
9544
10138
  ModelSecurityRuleResponseSchema,
9545
10139
  ModelSecurityRulesClient,
9546
10140
  ModelSecurityScansClient,
10141
+ ModelVersionListSchema,
10142
+ ModelVersionResponseSchema,
9547
10143
  MultiProfileDataNodeSchema,
9548
10144
  MultiProfileDetectionRuleSchema,
9549
10145
  MultiTurnStatefulConfigSchema,
@@ -9588,6 +10184,8 @@ var RedTeamClient = class {
9588
10184
  QuotaDetailsSchema,
9589
10185
  QuotaSummarySchema,
9590
10186
  RED_TEAM_CATEGORIES_PATH,
10187
+ RED_TEAM_CHANNELS_PATH,
10188
+ RED_TEAM_CHANNELS_STATS_PATH,
9591
10189
  RED_TEAM_CLIENT_ID,
9592
10190
  RED_TEAM_CLIENT_SECRET,
9593
10191
  RED_TEAM_CUSTOM_ATTACKS_REPORT_PATH,
@@ -9595,10 +10193,13 @@ var RedTeamClient = class {
9595
10193
  RED_TEAM_DASHBOARD_PATH,
9596
10194
  RED_TEAM_DATA_ENDPOINT,
9597
10195
  RED_TEAM_ERROR_LOG_PATH,
10196
+ RED_TEAM_ERROR_LOG_TARGET_PROFILE_PATH,
9598
10197
  RED_TEAM_EULA_PATH,
9599
10198
  RED_TEAM_INSTANCES_PATH,
10199
+ RED_TEAM_LANGUAGES_PATH,
9600
10200
  RED_TEAM_MGMT_DASHBOARD_PATH,
9601
10201
  RED_TEAM_MGMT_ENDPOINT,
10202
+ RED_TEAM_NETWORK_BROKER_ENDPOINT,
9602
10203
  RED_TEAM_QUOTA_PATH,
9603
10204
  RED_TEAM_REGISTRY_CREDENTIALS_PATH,
9604
10205
  RED_TEAM_REPORT_DYNAMIC_PATH,
@@ -9618,6 +10219,7 @@ var RedTeamClient = class {
9618
10219
  RedTeamErrorType,
9619
10220
  RedTeamEulaClient,
9620
10221
  RedTeamInstancesClient,
10222
+ RedTeamNetworkBrokerClient,
9621
10223
  RedTeamPaginationSchema,
9622
10224
  RedTeamReportsClient,
9623
10225
  RedTeamScansClient,
@@ -9720,6 +10322,7 @@ var RedTeamClient = class {
9720
10322
  TargetType,
9721
10323
  TargetUpdateRequestSchema,
9722
10324
  TcReportSchema,
10325
+ TenantLanguagesResponseSchema,
9723
10326
  TgReportSchema,
9724
10327
  ThreatCategory,
9725
10328
  ThreatScanReportSchema,
@@ -9735,11 +10338,13 @@ var RedTeamClient = class {
9735
10338
  TopicsClient,
9736
10339
  URLExclusionSchema,
9737
10340
  USER_AGENT,
10341
+ UpdateChannelRequestSchema,
9738
10342
  UrlCategorySchema,
9739
10343
  UrlfEntrySchema,
9740
10344
  ValidationErrorSchema,
9741
10345
  Verdict,
9742
10346
  ViolationListSchema,
10347
+ ViolationRemediationSchema,
9743
10348
  ViolationResponseSchema,
9744
10349
  ViolationSeverityCountsSchema,
9745
10350
  WebSocketConnectionParamsSchema,