@cdot65/prisma-airs-sdk 0.6.1 → 0.6.3

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.js CHANGED
@@ -4,6 +4,12 @@ var HEADER_AUTH_TOKEN = "Authorization";
4
4
  var PAYLOAD_HASH = "x-payload-hash";
5
5
  var BEARER = "Bearer ";
6
6
  var DEFAULT_ENDPOINT = "https://service.api.aisecurity.paloaltonetworks.com";
7
+ var AIRS_ENDPOINTS = {
8
+ US: "https://service.api.aisecurity.paloaltonetworks.com",
9
+ EU: "https://service-de.api.aisecurity.paloaltonetworks.com",
10
+ INDIA: "https://service-in.api.aisecurity.paloaltonetworks.com",
11
+ SINGAPORE: "https://service-sg.api.aisecurity.paloaltonetworks.com"
12
+ };
7
13
  var AI_SEC_API_KEY = "PANW_AI_SEC_API_KEY";
8
14
  var AI_SEC_API_TOKEN = "PANW_AI_SEC_API_TOKEN";
9
15
  var AI_SEC_API_ENDPOINT = "PANW_AI_SEC_API_ENDPOINT";
@@ -23,7 +29,7 @@ var MAX_NUMBER_OF_BATCH_SCAN_OBJECTS = 5;
23
29
  var MAX_CONNECTION_POOL_SIZE = 100;
24
30
  var MAX_NUMBER_OF_RETRIES = 5;
25
31
  var HTTP_FORCE_RETRY_STATUS_CODES = [500, 502, 503, 504];
26
- var SDK_VERSION = "0.6.1";
32
+ var SDK_VERSION = "0.6.3";
27
33
  var USER_AGENT = `PAN-AIRS/${SDK_VERSION}-typescript-sdk`;
28
34
  var DEFAULT_MGMT_ENDPOINT = "https://api.sase.paloaltonetworks.com/aisec";
29
35
  var DEFAULT_TOKEN_ENDPOINT = "https://auth.apps.paloaltonetworks.com/oauth2/access_token";
@@ -41,6 +47,15 @@ var MGMT_PROFILES_TSG_PATH = "/v1/mgmt/profiles/tsg";
41
47
  var MGMT_TOPIC_PATH = "/v1/mgmt/topic";
42
48
  var MGMT_TOPICS_TSG_PATH = "/v1/mgmt/topics/tsg";
43
49
  var MGMT_TOPIC_FORCE_PATH = "/v1/mgmt/topic/force";
50
+ var MGMT_API_KEY_PATH = "/v1/mgmt/apikey";
51
+ var MGMT_API_KEYS_TSG_PATH = "/v1/mgmt/apikeys/tsg";
52
+ var MGMT_DLP_PROFILES_PATH = "/v1/mgmt/dlpprofiles";
53
+ var MGMT_DEPLOYMENT_PROFILES_PATH = "/v1/mgmt/deploymentprofiles";
54
+ var MGMT_SCAN_LOGS_PATH = "/v1/mgmt/scanlogs";
55
+ var MGMT_CUSTOMER_APP_PATH = "/v1/mgmt/customerapp";
56
+ var MGMT_CUSTOMER_APPS_TSG_PATH = "/v1/mgmt/customerapp/tsg";
57
+ var MGMT_OAUTH_INVALIDATE_PATH = "/v1/mgmt/oauth/invalidateToken";
58
+ var MGMT_OAUTH_TOKEN_PATH = "/v1/mgmt/oauth/client_credential/accesstoken";
44
59
  var DEFAULT_MODEL_SEC_DATA_ENDPOINT = "https://api.sase.paloaltonetworks.com/aims/data";
45
60
  var DEFAULT_MODEL_SEC_MGMT_ENDPOINT = "https://api.sase.paloaltonetworks.com/aims/mgmt";
46
61
  var MODEL_SEC_CLIENT_ID = "PANW_MODEL_SEC_CLIENT_ID";
@@ -422,6 +437,11 @@ var Content = class _Content {
422
437
  _codePrompt;
423
438
  _codeResponse;
424
439
  _toolEvent;
440
+ /**
441
+ * Create a new Content instance.
442
+ * @param opts - Content fields; at least one of prompt, response, codePrompt, codeResponse, or toolEvent is required.
443
+ * @throws {AISecSDKException} If no content field is provided or a field exceeds its byte-length limit.
444
+ */
425
445
  constructor(opts) {
426
446
  if (!opts.prompt && !opts.response && !opts.codePrompt && !opts.codeResponse && !opts.toolEvent) {
427
447
  throw new AISecSDKException(
@@ -564,13 +584,32 @@ var Category = {
564
584
  MALICIOUS: "malicious",
565
585
  UNKNOWN: "unknown"
566
586
  };
587
+ var DetectionServiceName = {
588
+ DLP: "dlp",
589
+ INJECTION: "injection",
590
+ URL_CATS: "url_cats",
591
+ TOXIC_CONTENT: "toxic_content",
592
+ MALICIOUS_CODE: "malicious_code",
593
+ AGENT: "agent",
594
+ TOPIC_VIOLATION: "topic_violation",
595
+ DB_SECURITY: "db_security",
596
+ UNGROUNDED: "ungrounded"
597
+ };
598
+ var ContentErrorType = {
599
+ PROMPT: "prompt",
600
+ RESPONSE: "response"
601
+ };
602
+ var ErrorStatus = {
603
+ ERROR: "error",
604
+ TIMEOUT: "timeout"
605
+ };
567
606
 
568
607
  // src/models/ai-profile.ts
569
608
  import { z } from "zod";
570
609
  var AiProfileSchema = z.object({
571
610
  profile_id: z.string().uuid().optional(),
572
611
  profile_name: z.string().max(MAX_AI_PROFILE_NAME_LENGTH).optional()
573
- }).refine((d) => d.profile_id || d.profile_name, {
612
+ }).passthrough().refine((d) => d.profile_id || d.profile_name, {
574
613
  message: "Either profile_id or profile_name must be provided"
575
614
  });
576
615
 
@@ -580,14 +619,14 @@ var AgentMetaSchema = z2.object({
580
619
  agent_id: z2.string().optional(),
581
620
  agent_version: z2.string().optional(),
582
621
  agent_arn: z2.string().optional()
583
- });
622
+ }).passthrough();
584
623
  var MetadataSchema = z2.object({
585
624
  app_name: z2.string().optional(),
586
625
  app_user: z2.string().optional(),
587
626
  ai_model: z2.string().optional(),
588
627
  user_ip: z2.string().optional(),
589
628
  agent_meta: AgentMetaSchema.optional()
590
- });
629
+ }).passthrough();
591
630
 
592
631
  // src/models/tool-event.ts
593
632
  import { z as z3 } from "zod";
@@ -596,12 +635,12 @@ var ToolEventMetadataSchema = z3.object({
596
635
  method: z3.string(),
597
636
  server_name: z3.string(),
598
637
  tool_invoked: z3.string().optional()
599
- });
638
+ }).passthrough();
600
639
  var ToolEventSchema = z3.object({
601
640
  metadata: ToolEventMetadataSchema.optional(),
602
641
  input: z3.string().optional(),
603
642
  output: z3.string().optional()
604
- });
643
+ }).passthrough();
605
644
 
606
645
  // src/models/scan-request.ts
607
646
  import { z as z4 } from "zod";
@@ -612,23 +651,23 @@ var ScanRequestContentsInnerSchema = z4.object({
612
651
  code_response: z4.string().optional(),
613
652
  context: z4.string().optional(),
614
653
  tool_event: ToolEventSchema.optional()
615
- });
654
+ }).passthrough();
616
655
  var ScanRequestSchema = z4.object({
617
656
  tr_id: z4.string().max(MAX_TRANSACTION_ID_STR_LENGTH).optional(),
618
657
  session_id: z4.string().max(MAX_SESSION_ID_STR_LENGTH).optional(),
619
658
  ai_profile: AiProfileSchema,
620
659
  metadata: MetadataSchema.optional(),
621
660
  contents: z4.array(ScanRequestContentsInnerSchema).min(1)
622
- });
661
+ }).passthrough();
623
662
 
624
663
  // src/models/scan-response.ts
625
- import { z as z7 } from "zod";
664
+ import { z as z8 } from "zod";
626
665
 
627
666
  // src/models/prompt-detected.ts
628
667
  import { z as z5 } from "zod";
629
668
  var PromptDetectionDetailsSchema = z5.object({
630
669
  topic_guardrails_details: z5.record(z5.unknown()).optional()
631
- });
670
+ }).passthrough();
632
671
  var PromptDetectedSchema = z5.object({
633
672
  url_cats: z5.boolean().optional(),
634
673
  dlp: z5.boolean().optional(),
@@ -637,13 +676,13 @@ var PromptDetectedSchema = z5.object({
637
676
  malicious_code: z5.boolean().optional(),
638
677
  agent: z5.boolean().optional(),
639
678
  topic_violation: z5.boolean().optional()
640
- });
679
+ }).passthrough();
641
680
 
642
681
  // src/models/response-detected.ts
643
682
  import { z as z6 } from "zod";
644
683
  var ResponseDetectionDetailsSchema = z6.object({
645
684
  topic_guardrails_details: z6.record(z6.unknown()).optional()
646
- });
685
+ }).passthrough();
647
686
  var ResponseDetectedSchema = z6.object({
648
687
  url_cats: z6.boolean().optional(),
649
688
  dlp: z6.boolean().optional(),
@@ -653,41 +692,114 @@ var ResponseDetectedSchema = z6.object({
653
692
  agent: z6.boolean().optional(),
654
693
  ungrounded: z6.boolean().optional(),
655
694
  topic_violation: z6.boolean().optional()
656
- });
695
+ }).passthrough();
657
696
 
658
- // src/models/scan-response.ts
659
- var MaskedDataSchema = z7.object({
660
- data: z7.string().optional(),
661
- pattern_detections: z7.array(z7.record(z7.unknown())).optional()
662
- });
663
- var IODetectedSchema = z7.object({
664
- url_cats: z7.boolean().optional(),
665
- dlp: z7.boolean().optional(),
666
- injection: z7.boolean().optional(),
667
- toxic_content: z7.boolean().optional(),
668
- malicious_code: z7.boolean().optional()
669
- }).passthrough();
670
- var ScanSummarySchema = z7.object({
697
+ // src/models/detection-reports.ts
698
+ import { z as z7 } from "zod";
699
+ var TcReportSchema = z7.object({
700
+ confidence: z7.string().optional(),
701
+ verdict: z7.string().optional()
702
+ }).passthrough();
703
+ var DbsEntrySchema = z7.object({
704
+ sub_type: z7.string().optional(),
671
705
  verdict: z7.string().optional(),
672
706
  action: z7.string().optional()
673
707
  }).passthrough();
674
- var ToolDetectedSchema = z7.object({
708
+ var DbsReportSchema = z7.array(DbsEntrySchema);
709
+ var McEntrySchema = z7.object({
710
+ file_type: z7.string().optional(),
711
+ code_sha256: z7.string().optional()
712
+ }).passthrough();
713
+ var MalwareReportSchema = z7.object({
714
+ verdict: z7.string().optional()
715
+ }).passthrough();
716
+ var CmdEntrySchema = z7.object({
717
+ code_block: z7.string().optional(),
718
+ verdict: z7.string().optional()
719
+ }).passthrough();
720
+ var CmdInjectReportSchema = z7.array(CmdEntrySchema);
721
+ var McReportSchema = z7.object({
722
+ all_code_blocks: z7.array(z7.string()).optional(),
723
+ code_analysis_by_type: z7.array(McEntrySchema).optional(),
675
724
  verdict: z7.string().optional(),
725
+ malware_script_report: MalwareReportSchema.optional(),
726
+ command_injection_report: CmdInjectReportSchema.optional()
727
+ }).passthrough();
728
+ var AgentEntrySchema = z7.object({
729
+ category_type: z7.string().optional(),
730
+ verdict: z7.string().optional()
731
+ }).passthrough();
732
+ var AgentReportSchema = z7.object({
733
+ model_verdict: z7.string().optional(),
734
+ agent_framework: z7.string().optional(),
735
+ agent_patterns: z7.array(AgentEntrySchema).optional()
736
+ }).passthrough();
737
+ var TgReportSchema = z7.object({
738
+ allowed_topic_list: z7.string().optional(),
739
+ blocked_topic_list: z7.string().optional(),
740
+ allowedTopics: z7.array(z7.string()).optional(),
741
+ blockedTopics: z7.array(z7.string()).optional()
742
+ }).passthrough();
743
+ var CgReportSchema = z7.object({
744
+ status: z7.string().optional(),
745
+ explanation: z7.string().optional(),
746
+ category: z7.string().optional()
747
+ }).passthrough();
748
+ var OffsetSchema = z7.array(z7.array(z7.number()));
749
+ var DlpPatternDetectionSchema = z7.object({
750
+ data_pattern_id: z7.string().optional(),
751
+ version: z7.number().optional(),
752
+ name: z7.string().optional(),
753
+ high_confidence_detections: OffsetSchema.optional(),
754
+ medium_confidence_detections: OffsetSchema.optional(),
755
+ low_confidence_detections: OffsetSchema.optional()
756
+ }).passthrough();
757
+ var PatternDetectionSchema = z7.object({
758
+ pattern: z7.string().optional(),
759
+ locations: OffsetSchema.optional()
760
+ }).passthrough();
761
+ var ContentErrorSchema = z7.object({
762
+ content_type: z7.string().optional(),
763
+ feature: z7.string().optional(),
764
+ status: z7.string().optional()
765
+ }).passthrough();
766
+
767
+ // src/models/scan-response.ts
768
+ var MaskedDataSchema = z8.object({
769
+ data: z8.string().optional(),
770
+ pattern_detections: z8.array(PatternDetectionSchema).optional()
771
+ }).passthrough();
772
+ var IODetectedSchema = z8.object({
773
+ url_cats: z8.boolean().optional(),
774
+ dlp: z8.boolean().optional(),
775
+ injection: z8.boolean().optional(),
776
+ toxic_content: z8.boolean().optional(),
777
+ malicious_code: z8.boolean().optional()
778
+ }).passthrough();
779
+ var ScanSummarySchema = z8.object({
780
+ verdict: z8.string().optional(),
781
+ action: z8.string().optional()
782
+ }).passthrough();
783
+ var ToolDetectedSchema = z8.object({
784
+ verdict: z8.string().optional(),
676
785
  metadata: ToolEventMetadataSchema.optional(),
677
786
  summary: ScanSummarySchema.optional(),
678
787
  input_detected: IODetectedSchema.optional(),
679
788
  output_detected: IODetectedSchema.optional()
680
- });
681
- var ScanResponseSchema = z7.object({
682
- source: z7.string().optional(),
683
- report_id: z7.string(),
684
- scan_id: z7.string(),
685
- tr_id: z7.string().optional(),
686
- session_id: z7.string().optional(),
687
- profile_id: z7.string().optional(),
688
- profile_name: z7.string().optional(),
689
- category: z7.string(),
690
- action: z7.string(),
789
+ }).passthrough();
790
+ var ScanResponseSchema = z8.object({
791
+ source: z8.string().optional(),
792
+ report_id: z8.string(),
793
+ scan_id: z8.string(),
794
+ tr_id: z8.string().optional(),
795
+ session_id: z8.string().optional(),
796
+ profile_id: z8.string().optional(),
797
+ profile_name: z8.string().optional(),
798
+ category: z8.string(),
799
+ action: z8.string(),
800
+ timeout: z8.boolean().optional(),
801
+ error: z8.boolean().optional(),
802
+ errors: z8.array(ContentErrorSchema).optional(),
691
803
  prompt_detected: PromptDetectedSchema.optional(),
692
804
  response_detected: ResponseDetectedSchema.optional(),
693
805
  prompt_masked_data: MaskedDataSchema.optional(),
@@ -695,221 +807,459 @@ var ScanResponseSchema = z7.object({
695
807
  prompt_detection_details: PromptDetectionDetailsSchema.optional(),
696
808
  response_detection_details: ResponseDetectionDetailsSchema.optional(),
697
809
  tool_detected: ToolDetectedSchema.optional(),
698
- created_at: z7.string().optional(),
699
- completed_at: z7.string().optional()
700
- });
810
+ created_at: z8.string().optional(),
811
+ completed_at: z8.string().optional()
812
+ }).passthrough();
701
813
 
702
814
  // src/models/async-scan.ts
703
- import { z as z8 } from "zod";
704
- var AsyncScanObjectSchema = z8.object({
705
- req_id: z8.number().int(),
815
+ import { z as z9 } from "zod";
816
+ var AsyncScanObjectSchema = z9.object({
817
+ req_id: z9.number().int(),
706
818
  scan_req: ScanRequestSchema
707
- });
708
- var AsyncScanResponseSchema = z8.object({
709
- received: z8.string(),
710
- scan_id: z8.string(),
711
- report_id: z8.string().optional(),
712
- source: z8.string().optional()
713
- });
819
+ }).passthrough();
820
+ var AsyncScanResponseSchema = z9.object({
821
+ received: z9.string(),
822
+ scan_id: z9.string(),
823
+ report_id: z9.string().optional(),
824
+ source: z9.string().optional()
825
+ }).passthrough();
714
826
 
715
827
  // src/models/scan-id-result.ts
716
- import { z as z9 } from "zod";
717
- var ScanIdResultSchema = z9.object({
718
- source: z9.string().optional(),
719
- req_id: z9.number().optional(),
720
- status: z9.string().optional(),
721
- scan_id: z9.string().optional(),
828
+ import { z as z10 } from "zod";
829
+ var ScanIdResultSchema = z10.object({
830
+ source: z10.string().optional(),
831
+ req_id: z10.number().optional(),
832
+ status: z10.string().optional(),
833
+ scan_id: z10.string().optional(),
722
834
  result: ScanResponseSchema.optional()
723
- });
835
+ }).passthrough();
724
836
 
725
837
  // src/models/threat-report.ts
726
- import { z as z13 } from "zod";
838
+ import { z as z14 } from "zod";
727
839
 
728
840
  // src/models/detection.ts
729
- import { z as z12 } from "zod";
841
+ import { z as z13 } from "zod";
730
842
 
731
843
  // src/models/dlp-report.ts
732
- import { z as z10 } from "zod";
733
- var DlpReportSchema = z10.object({
734
- dlp_report_id: z10.string().optional(),
735
- dlp_profile_name: z10.string().optional(),
736
- dlp_profile_id: z10.string().optional(),
737
- dlp_profile_version: z10.number().optional(),
738
- data_pattern_rule1_verdict: z10.string().optional(),
739
- data_pattern_rule2_verdict: z10.string().optional()
740
- });
844
+ import { z as z11 } from "zod";
845
+ var DlpReportSchema = z11.object({
846
+ dlp_report_id: z11.string().optional(),
847
+ dlp_profile_name: z11.string().optional(),
848
+ dlp_profile_id: z11.string().optional(),
849
+ dlp_profile_version: z11.number().optional(),
850
+ data_pattern_rule1_verdict: z11.string().optional(),
851
+ data_pattern_rule2_verdict: z11.string().optional(),
852
+ data_pattern_detection_offsets: z11.array(DlpPatternDetectionSchema).optional()
853
+ }).passthrough();
741
854
 
742
855
  // src/models/urlf-report.ts
743
- import { z as z11 } from "zod";
744
- var UrlfEntrySchema = z11.object({
745
- url: z11.string().optional(),
746
- risk_level: z11.string().optional(),
747
- categories: z11.array(z11.string()).optional()
748
- });
856
+ import { z as z12 } from "zod";
857
+ var UrlfEntrySchema = z12.object({
858
+ url: z12.string().optional(),
859
+ risk_level: z12.string().optional(),
860
+ action: z12.string().optional(),
861
+ categories: z12.array(z12.string()).optional()
862
+ }).passthrough();
749
863
 
750
864
  // src/models/detection.ts
751
- var DSDetailResultSchema = z12.object({
752
- urlf_report: z12.array(UrlfEntrySchema).optional(),
753
- dlp_report: DlpReportSchema.optional()
754
- });
755
- var DSResultMetadataSchema = z12.object({
756
- score: z12.number().optional(),
757
- confidence: z12.string().optional()
758
- }).passthrough();
759
- var DetectionServiceResultSchema = z12.object({
760
- data_type: z12.string().optional(),
761
- detection_service: z12.string().optional(),
762
- verdict: z12.string().optional(),
763
- action: z12.string().optional(),
865
+ var DSDetailResultSchema = z13.object({
866
+ urlf_report: z13.array(UrlfEntrySchema).optional(),
867
+ dlp_report: DlpReportSchema.optional(),
868
+ dbs_report: DbsReportSchema.optional(),
869
+ tc_report: TcReportSchema.optional(),
870
+ mc_report: McReportSchema.optional(),
871
+ agent_report: AgentReportSchema.optional(),
872
+ topic_guardrails_report: TgReportSchema.optional(),
873
+ cg_report: CgReportSchema.optional()
874
+ }).passthrough();
875
+ var DSResultMetadataSchema = z13.object({
876
+ score: z13.number().optional(),
877
+ confidence: z13.string().optional(),
878
+ ecosystem: z13.string().optional(),
879
+ method: z13.string().optional(),
880
+ server_name: z13.string().optional(),
881
+ tool_invoked: z13.string().optional(),
882
+ direction: z13.string().optional()
883
+ }).passthrough();
884
+ var DetectionServiceResultSchema = z13.object({
885
+ data_type: z13.string().optional(),
886
+ detection_service: z13.string().optional(),
887
+ verdict: z13.string().optional(),
888
+ action: z13.string().optional(),
764
889
  metadata: DSResultMetadataSchema.optional(),
765
890
  result_detail: DSDetailResultSchema.optional()
766
- });
891
+ }).passthrough();
767
892
 
768
893
  // src/models/threat-report.ts
769
- var ThreatScanReportSchema = z13.object({
770
- source: z13.string().optional(),
771
- report_id: z13.string().optional(),
772
- scan_id: z13.string().optional(),
773
- req_id: z13.number().optional(),
774
- transaction_id: z13.string().optional(),
775
- session_id: z13.string().optional(),
776
- detection_results: z13.array(DetectionServiceResultSchema).optional()
777
- });
894
+ var ThreatScanReportSchema = z14.object({
895
+ source: z14.string().optional(),
896
+ report_id: z14.string().optional(),
897
+ scan_id: z14.string().optional(),
898
+ req_id: z14.number().optional(),
899
+ transaction_id: z14.string().optional(),
900
+ session_id: z14.string().optional(),
901
+ detection_results: z14.array(DetectionServiceResultSchema).optional()
902
+ }).passthrough();
778
903
 
779
904
  // src/models/error-response.ts
780
- import { z as z14 } from "zod";
781
- var ErrorResponseSchema = z14.object({
782
- status_code: z14.number().optional(),
783
- message: z14.string().optional(),
784
- error: z14.object({
785
- message: z14.string().optional()
905
+ import { z as z15 } from "zod";
906
+ var ErrorResponseSchema = z15.object({
907
+ status_code: z15.number().optional(),
908
+ message: z15.string().optional(),
909
+ error: z15.object({
910
+ message: z15.string().optional()
786
911
  }).passthrough().optional(),
787
- retry_after: z14.object({
788
- interval: z14.number().optional(),
789
- unit: z14.string().optional()
912
+ retry_after: z15.object({
913
+ interval: z15.number().optional(),
914
+ unit: z15.string().optional()
790
915
  }).optional()
791
916
  });
792
917
 
793
918
  // src/models/mgmt-security-profile.ts
794
- import { z as z15 } from "zod";
795
- var DlpDataProfileSchema = z15.object({
796
- profile_name: z15.string(),
797
- active: z15.boolean().optional()
919
+ import { z as z16 } from "zod";
920
+ var DlpDataProfileSchema = z16.object({
921
+ profile_name: z16.string(),
922
+ active: z16.boolean().optional()
798
923
  }).passthrough();
799
- var DlpSchema = z15.object({
800
- dlp_status: z15.string().optional(),
801
- data_profiles: z15.array(DlpDataProfileSchema).optional()
924
+ var DlpSchema = z16.object({
925
+ dlp_status: z16.string().optional(),
926
+ data_profiles: z16.array(DlpDataProfileSchema).optional()
802
927
  }).passthrough();
803
- var DataLeakDetectionSchema = z15.object({
804
- "data-leak-detection-status": z15.string().optional(),
928
+ var DataLeakDetectionSchema = z16.object({
929
+ "data-leak-detection-status": z16.string().optional(),
805
930
  dlp: DlpSchema.optional()
806
931
  }).passthrough();
807
- var AppProtectionSchema = z15.object({
808
- "prompt-injection": z15.string().optional(),
809
- "jailbreak-detection": z15.string().optional()
932
+ var AppProtectionSchema = z16.object({
933
+ "prompt-injection": z16.string().optional(),
934
+ "jailbreak-detection": z16.string().optional()
810
935
  }).passthrough();
811
- var ModelProtectionSchema = z15.object({
812
- "model-denial-of-service": z15.string().optional()
936
+ var ModelProtectionSchema = z16.object({
937
+ "model-denial-of-service": z16.string().optional()
813
938
  }).passthrough();
814
- var AgentProtectionSchema = z15.object({
815
- "malicious-agent-activity": z15.string().optional()
939
+ var AgentProtectionSchema = z16.object({
940
+ "malicious-agent-activity": z16.string().optional()
816
941
  }).passthrough();
817
- var LatencySchema = z15.object({
818
- status: z15.string().optional(),
819
- max_latency_ms: z15.number().optional()
942
+ var LatencySchema = z16.object({
943
+ status: z16.string().optional(),
944
+ max_latency_ms: z16.number().optional()
820
945
  }).passthrough();
821
- var ModelConfigurationSchema = z15.object({
946
+ var ModelConfigurationSchema = z16.object({
822
947
  latency: LatencySchema.optional()
823
948
  }).passthrough();
824
- var PolicySchema = z15.object({
949
+ var PolicySchema = z16.object({
825
950
  "data-leak-detection": DataLeakDetectionSchema.optional(),
826
951
  "app-protection": AppProtectionSchema.optional(),
827
952
  "model-protection": ModelProtectionSchema.optional(),
828
953
  "agent-protection": AgentProtectionSchema.optional(),
829
954
  "model-configuration": ModelConfigurationSchema.optional()
830
955
  }).passthrough();
831
- var SecurityProfileSchema = z15.object({
832
- profile_id: z15.string().optional(),
833
- profile_name: z15.string(),
834
- revision: z15.number().optional(),
835
- active: z15.boolean().optional(),
836
- policy: PolicySchema.optional(),
837
- created_by: z15.string().optional(),
838
- updated_by: z15.string().optional(),
839
- last_modified_ts: z15.string().optional()
840
- }).passthrough();
841
- var CreateSecurityProfileRequestSchema = z15.object({
842
- profile_id: z15.string().optional(),
843
- profile_name: z15.string(),
844
- revision: z15.number().optional(),
845
- active: z15.boolean().optional(),
846
- policy: PolicySchema.optional(),
847
- created_by: z15.string().optional(),
848
- updated_by: z15.string().optional(),
849
- last_modified_ts: z15.string().optional()
850
- }).passthrough();
851
- var SecurityProfileListResponseSchema = z15.object({
852
- ai_profiles: z15.array(SecurityProfileSchema),
853
- next_offset: z15.number().optional()
854
- }).passthrough();
855
- var DeleteProfileResponseSchema = z15.object({
856
- message: z15.string()
857
- }).passthrough();
858
- var DeleteProfileConflictSchema = z15.object({
859
- message: z15.string(),
860
- payload: z15.array(
861
- z15.object({
862
- policy_id: z15.string(),
863
- policy_name: z15.string(),
864
- priority: z15.number()
865
- }).passthrough()
866
- )
867
- }).passthrough();
868
-
869
- // src/models/mgmt-custom-topic.ts
870
- import { z as z16 } from "zod";
871
- var CustomTopicSchema = z16.object({
872
- topic_id: z16.string().optional(),
873
- topic_name: z16.string(),
956
+ var SecurityProfileSchema = z16.object({
957
+ profile_id: z16.string().optional(),
958
+ profile_name: z16.string(),
874
959
  revision: z16.number().optional(),
875
960
  active: z16.boolean().optional(),
876
- description: z16.string().optional(),
877
- examples: z16.array(z16.string()).optional(),
961
+ policy: PolicySchema.optional(),
878
962
  created_by: z16.string().optional(),
879
963
  updated_by: z16.string().optional(),
880
- last_modified_ts: z16.string().optional(),
881
- created_ts: z16.string().optional()
964
+ last_modified_ts: z16.string().optional()
882
965
  }).passthrough();
883
- var CreateCustomTopicRequestSchema = z16.object({
884
- topic_id: z16.string().optional(),
885
- topic_name: z16.string(),
966
+ var CreateSecurityProfileRequestSchema = z16.object({
967
+ profile_id: z16.string().optional(),
968
+ profile_name: z16.string(),
886
969
  revision: z16.number().optional(),
887
970
  active: z16.boolean().optional(),
888
- description: z16.string().optional(),
889
- examples: z16.array(z16.string()).optional(),
971
+ policy: PolicySchema.optional(),
890
972
  created_by: z16.string().optional(),
891
973
  updated_by: z16.string().optional(),
892
- last_modified_ts: z16.string().optional(),
893
- created_ts: z16.string().optional()
974
+ last_modified_ts: z16.string().optional()
894
975
  }).passthrough();
895
- var CustomTopicListResponseSchema = z16.object({
896
- custom_topics: z16.array(CustomTopicSchema),
976
+ var SecurityProfileListResponseSchema = z16.object({
977
+ ai_profiles: z16.array(SecurityProfileSchema),
897
978
  next_offset: z16.number().optional()
898
979
  }).passthrough();
899
- var DeleteTopicResponseSchema = z16.object({
980
+ var DeleteProfileResponseSchema = z16.object({
900
981
  message: z16.string()
901
982
  }).passthrough();
902
- var DeleteTopicConflictSchema = z16.object({
983
+ var DeleteProfileConflictSchema = z16.object({
903
984
  message: z16.string(),
904
985
  payload: z16.array(
905
986
  z16.object({
906
- profile_id: z16.string(),
907
- profile_name: z16.string(),
908
- revision: z16.number()
987
+ policy_id: z16.string(),
988
+ policy_name: z16.string(),
989
+ priority: z16.number()
990
+ }).passthrough()
991
+ )
992
+ }).passthrough();
993
+
994
+ // src/models/mgmt-custom-topic.ts
995
+ import { z as z17 } from "zod";
996
+ var CustomTopicSchema = z17.object({
997
+ topic_id: z17.string().optional(),
998
+ topic_name: z17.string(),
999
+ revision: z17.number().optional(),
1000
+ active: z17.boolean().optional(),
1001
+ description: z17.string().optional(),
1002
+ examples: z17.array(z17.string()).optional(),
1003
+ created_by: z17.string().optional(),
1004
+ updated_by: z17.string().optional(),
1005
+ last_modified_ts: z17.string().optional(),
1006
+ created_ts: z17.string().optional()
1007
+ }).passthrough();
1008
+ var CreateCustomTopicRequestSchema = z17.object({
1009
+ topic_id: z17.string().optional(),
1010
+ topic_name: z17.string(),
1011
+ revision: z17.number().optional(),
1012
+ active: z17.boolean().optional(),
1013
+ description: z17.string().optional(),
1014
+ examples: z17.array(z17.string()).optional(),
1015
+ created_by: z17.string().optional(),
1016
+ updated_by: z17.string().optional(),
1017
+ last_modified_ts: z17.string().optional(),
1018
+ created_ts: z17.string().optional()
1019
+ }).passthrough();
1020
+ var CustomTopicListResponseSchema = z17.object({
1021
+ custom_topics: z17.array(CustomTopicSchema),
1022
+ next_offset: z17.number().optional()
1023
+ }).passthrough();
1024
+ var DeleteTopicResponseSchema = z17.object({
1025
+ message: z17.string()
1026
+ }).passthrough();
1027
+ var DeleteTopicConflictSchema = z17.object({
1028
+ message: z17.string(),
1029
+ payload: z17.array(
1030
+ z17.object({
1031
+ profile_id: z17.string(),
1032
+ profile_name: z17.string(),
1033
+ revision: z17.number()
909
1034
  }).passthrough()
910
1035
  )
911
1036
  }).passthrough();
912
1037
 
1038
+ // src/models/mgmt-api-key.ts
1039
+ import { z as z18 } from "zod";
1040
+ var ApiKeySchema = z18.object({
1041
+ api_key_id: z18.string(),
1042
+ api_key_last8: z18.string(),
1043
+ api_key_name: z18.string().optional(),
1044
+ auth_code: z18.string(),
1045
+ csp_id: z18.string().optional(),
1046
+ tsg_id: z18.string().optional(),
1047
+ expiration: z18.string(),
1048
+ revoked: z18.boolean(),
1049
+ revoke_reason: z18.string().optional(),
1050
+ cust_app: z18.string().optional(),
1051
+ cust_env: z18.string().optional(),
1052
+ cust_ai_agent_framework: z18.string().optional(),
1053
+ cust_cloud_provider: z18.string().optional(),
1054
+ created_by: z18.string().optional(),
1055
+ updated_by: z18.string().optional(),
1056
+ last_modified_ts: z18.string().optional(),
1057
+ rotation_time_interval: z18.number().optional(),
1058
+ rotation_time_unit: z18.string().optional(),
1059
+ dp_name: z18.string().optional(),
1060
+ status: z18.string().optional(),
1061
+ api_key: z18.string().optional(),
1062
+ lic_expiration: z18.string().optional(),
1063
+ avg_text_records: z18.number().optional(),
1064
+ creation_ts: z18.string().optional(),
1065
+ customer_appId: z18.string().optional()
1066
+ }).passthrough();
1067
+ var ApiKeyCreateRequestSchema = z18.object({
1068
+ dp_name: z18.string().optional(),
1069
+ auth_code: z18.string(),
1070
+ cust_app: z18.string(),
1071
+ cust_env: z18.string().optional(),
1072
+ cust_cloud_provider: z18.string().optional(),
1073
+ cust_ai_agent_framework: z18.string().optional(),
1074
+ revoked: z18.boolean(),
1075
+ created_by: z18.string(),
1076
+ api_key_name: z18.string(),
1077
+ rotation_time_interval: z18.number(),
1078
+ rotation_time_unit: z18.string()
1079
+ });
1080
+ var ApiKeyRegenerateRequestSchema = z18.object({
1081
+ rotation_time_interval: z18.number(),
1082
+ rotation_time_unit: z18.string(),
1083
+ updated_by: z18.string().optional()
1084
+ });
1085
+ var ApiKeyListResponseSchema = z18.object({
1086
+ api_keys: z18.array(ApiKeySchema).optional(),
1087
+ next_offset: z18.number().optional()
1088
+ }).passthrough();
1089
+ var ApiKeyDeleteResponseSchema = z18.object({
1090
+ message: z18.string().optional()
1091
+ }).passthrough();
1092
+
1093
+ // src/models/mgmt-customer-app.ts
1094
+ import { z as z19 } from "zod";
1095
+ var ApiKeyDPInfoSchema = z19.object({
1096
+ api_key_name: z19.string(),
1097
+ dp_name: z19.string(),
1098
+ auth_code: z19.string()
1099
+ }).passthrough();
1100
+ var CustomerAppSchema = z19.object({
1101
+ customer_appId: z19.string().optional(),
1102
+ tsg_id: z19.string(),
1103
+ app_name: z19.string(),
1104
+ model_name: z19.string().optional(),
1105
+ cloud_provider: z19.string(),
1106
+ environment: z19.string(),
1107
+ status: z19.string().optional(),
1108
+ created_by: z19.string().optional(),
1109
+ updated_by: z19.string().optional(),
1110
+ ai_agent_framework: z19.string().optional()
1111
+ }).passthrough();
1112
+ var CustomerAppWithKeysSchema = z19.object({
1113
+ customer_appId: z19.string(),
1114
+ tsg_id: z19.string(),
1115
+ app_name: z19.string(),
1116
+ model_name: z19.string().optional(),
1117
+ cloud_provider: z19.string(),
1118
+ environment: z19.string(),
1119
+ ai_agent_framework: z19.string().optional(),
1120
+ api_keys_dp_info: z19.array(ApiKeyDPInfoSchema).optional()
1121
+ }).passthrough();
1122
+ var CustomerAppListResponseSchema = z19.object({
1123
+ customer_apps: z19.array(CustomerAppWithKeysSchema).optional(),
1124
+ next_offset: z19.number().optional()
1125
+ }).passthrough();
1126
+
1127
+ // src/models/mgmt-deployment-profile.ts
1128
+ import { z as z20 } from "zod";
1129
+ var DeploymentProfileEntrySchema = z20.object({
1130
+ dp_name: z20.string(),
1131
+ auth_code: z20.string(),
1132
+ tsg_id: z20.string().optional(),
1133
+ status: z20.string().optional(),
1134
+ expiration_date: z20.string().optional(),
1135
+ ave_text_records: z20.number().optional()
1136
+ }).passthrough();
1137
+ var DeploymentProfilesResponseSchema = z20.object({
1138
+ deployment_profiles: z20.array(DeploymentProfileEntrySchema),
1139
+ status: z20.string()
1140
+ }).passthrough();
1141
+
1142
+ // src/models/mgmt-dlp-profile.ts
1143
+ import { z as z21 } from "zod";
1144
+ var DlpDataProfileSchema2 = z21.object({
1145
+ name: z21.string(),
1146
+ uuid: z21.string(),
1147
+ id: z21.string().optional(),
1148
+ version: z21.string().optional(),
1149
+ rule1: z21.object({ action: z21.string().optional() }).passthrough().optional(),
1150
+ rule2: z21.object({ action: z21.string().optional() }).passthrough().optional(),
1151
+ "log-severity": z21.string().optional(),
1152
+ "non-file-based": z21.string().optional(),
1153
+ "file-based": z21.string().optional()
1154
+ }).passthrough();
1155
+ var DlpProfileListResponseSchema = z21.object({
1156
+ dlp_profiles: z21.array(DlpDataProfileSchema2).optional()
1157
+ }).passthrough();
1158
+
1159
+ // src/models/mgmt-scan-log.ts
1160
+ import { z as z22 } from "zod";
1161
+ var ScanResultEntrySchema = z22.object({
1162
+ csp_id: z22.string(),
1163
+ tsg_id: z22.string(),
1164
+ scan_id: z22.string(),
1165
+ scan_sub_req_id: z22.number(),
1166
+ api_key_name: z22.string(),
1167
+ app_name: z22.string(),
1168
+ tokens: z22.number(),
1169
+ text_records: z22.number(),
1170
+ transaction_id: z22.string().optional(),
1171
+ profile_id: z22.string().optional(),
1172
+ profile_name: z22.string().optional(),
1173
+ model_name: z22.string().optional(),
1174
+ user: z22.string().optional(),
1175
+ environment: z22.string().optional(),
1176
+ cloud_provider: z22.string().optional(),
1177
+ agent_framework: z22.string().optional(),
1178
+ report_id: z22.string().optional(),
1179
+ received_ts: z22.string().optional(),
1180
+ completed_ts: z22.string().optional(),
1181
+ status: z22.string().optional(),
1182
+ verdict: z22.string().optional(),
1183
+ action: z22.string().optional(),
1184
+ is_prompt: z22.boolean().optional(),
1185
+ is_response: z22.boolean().optional(),
1186
+ pi_final_verdict: z22.string().optional(),
1187
+ uf_final_verdict: z22.string().optional(),
1188
+ dlp_final_verdict: z22.string().optional(),
1189
+ dbs_final_verdict: z22.string().optional(),
1190
+ tc_final_verdict: z22.string().optional(),
1191
+ mc_final_verdict: z22.string().optional(),
1192
+ agent_final_verdict: z22.string().optional(),
1193
+ cg_final_verdict: z22.string().optional(),
1194
+ tg_final_verdict: z22.string().optional(),
1195
+ prompt_pi_verdict: z22.string().optional(),
1196
+ prompt_uf_verdict: z22.string().optional(),
1197
+ prompt_dlp_verdict: z22.string().optional(),
1198
+ prompt_tc_verdict: z22.string().optional(),
1199
+ prompt_mc_verdict: z22.string().optional(),
1200
+ prompt_agent_verdict: z22.string().optional(),
1201
+ prompt_tg_verdict: z22.string().optional(),
1202
+ prompt_verdict: z22.string().optional(),
1203
+ prompt_pi_action: z22.string().optional(),
1204
+ prompt_uf_action: z22.string().optional(),
1205
+ prompt_dlp_action: z22.string().optional(),
1206
+ prompt_tc_action: z22.string().optional(),
1207
+ prompt_mc_action: z22.string().optional(),
1208
+ prompt_agent_action: z22.string().optional(),
1209
+ prompt_tg_action: z22.string().optional(),
1210
+ response_uf_verdict: z22.string().optional(),
1211
+ response_dlp_verdict: z22.string().optional(),
1212
+ response_dbs_verdict: z22.string().optional(),
1213
+ response_tc_verdict: z22.string().optional(),
1214
+ response_mc_verdict: z22.string().optional(),
1215
+ response_agent_verdict: z22.string().optional(),
1216
+ response_cg_verdict: z22.string().optional(),
1217
+ response_tg_verdict: z22.string().optional(),
1218
+ response_uf_action: z22.string().optional(),
1219
+ response_dlp_action: z22.string().optional(),
1220
+ response_dbs_action: z22.string().optional(),
1221
+ response_tc_action: z22.string().optional(),
1222
+ response_mc_action: z22.string().optional(),
1223
+ response_agent_action: z22.string().optional(),
1224
+ response_cg_action: z22.string().optional(),
1225
+ response_tg_action: z22.string().optional(),
1226
+ response_verdict: z22.string().optional(),
1227
+ detection_service_flags: z22.number().optional(),
1228
+ content_masked: z22.boolean().optional(),
1229
+ user_ip: z22.string().optional()
1230
+ }).passthrough();
1231
+ var ScanResultForDashboardSchema = z22.object({
1232
+ text_records_count: z22.number().optional(),
1233
+ api_calls_count: z22.number().optional(),
1234
+ threats_count: z22.number().optional(),
1235
+ all_transactions_count: z22.number().optional(),
1236
+ benign_transaction_count: z22.number().optional(),
1237
+ scan_result_entries: z22.array(ScanResultEntrySchema).optional()
1238
+ }).passthrough();
1239
+ var PaginatedScanResultsSchema = z22.object({
1240
+ scan_result_for_dashboard: ScanResultForDashboardSchema.optional(),
1241
+ total_pages: z22.number().optional(),
1242
+ page_number: z22.number().optional(),
1243
+ page_size: z22.number().optional(),
1244
+ page_token: z22.string().optional(),
1245
+ revision: z22.number().optional()
1246
+ }).passthrough();
1247
+
1248
+ // src/models/mgmt-oauth.ts
1249
+ import { z as z23 } from "zod";
1250
+ var ClientIdAndCustomerAppSchema = z23.object({
1251
+ client_id: z23.string(),
1252
+ customer_app: z23.string()
1253
+ });
1254
+ var Oauth2TokenSchema = z23.object({
1255
+ token_type: z23.string().optional(),
1256
+ issued_at: z23.string().optional(),
1257
+ client_id: z23.string().optional(),
1258
+ access_token: z23.string(),
1259
+ expires_in: z23.string().optional(),
1260
+ status: z23.string().optional()
1261
+ }).passthrough();
1262
+
913
1263
  // src/models/model-security-enums.ts
914
1264
  var ErrorCodes = {
915
1265
  UNKNOWN_ERROR: "UNKNOWN_ERROR",
@@ -1040,240 +1390,240 @@ var RuleFieldValueKey = {
1040
1390
  };
1041
1391
 
1042
1392
  // src/models/model-security.ts
1043
- import { z as z17 } from "zod";
1044
- var ModelSecurityPaginationSchema = z17.object({
1045
- total_items: z17.number().int().nullable().optional()
1393
+ import { z as z24 } from "zod";
1394
+ var ModelSecurityPaginationSchema = z24.object({
1395
+ total_items: z24.number().int().nullable().optional()
1046
1396
  }).passthrough();
1047
- var LabelSchema = z17.object({
1048
- key: z17.string(),
1049
- value: z17.string()
1397
+ var LabelSchema = z24.object({
1398
+ key: z24.string(),
1399
+ value: z24.string()
1050
1400
  });
1051
- var LabelsCreateRequestSchema = z17.object({
1052
- labels: z17.array(LabelSchema)
1401
+ var LabelsCreateRequestSchema = z24.object({
1402
+ labels: z24.array(LabelSchema)
1053
1403
  });
1054
- var LabelsResponseSchema = z17.object({}).passthrough();
1055
- var LabelKeyListSchema = z17.object({
1404
+ var LabelsResponseSchema = z24.object({}).passthrough();
1405
+ var LabelKeyListSchema = z24.object({
1056
1406
  pagination: ModelSecurityPaginationSchema,
1057
- keys: z17.array(z17.string())
1407
+ keys: z24.array(z24.string())
1058
1408
  }).passthrough();
1059
- var LabelValueListSchema = z17.object({
1409
+ var LabelValueListSchema = z24.object({
1060
1410
  pagination: ModelSecurityPaginationSchema,
1061
- values: z17.array(z17.string())
1062
- }).passthrough();
1063
- var EvalSummarySchema = z17.object({
1064
- rules_failed: z17.number().int().optional().default(0),
1065
- rules_passed: z17.number().int().optional().default(0),
1066
- total_rules: z17.number().int().optional().default(0)
1067
- }).passthrough();
1068
- var ModelScanIssueSchema = z17.object({
1069
- description: z17.string(),
1070
- source: z17.string(),
1071
- threat: z17.string().nullable().optional(),
1072
- module: z17.string().nullable().optional(),
1073
- operator: z17.string().nullable().optional()
1074
- }).passthrough();
1075
- var FileScanDataSchema = z17.object({
1076
- file_path: z17.string(),
1077
- modelscan_status: z17.string(),
1078
- blob_id: z17.string(),
1079
- error_message: z17.string().nullable().optional(),
1080
- formats: z17.array(z17.string()).nullable().optional(),
1081
- issues_detected: z17.array(ModelScanIssueSchema).nullable().optional()
1082
- }).passthrough();
1083
- var ScanDetailsSchema = z17.object({
1084
- scanner_version: z17.string(),
1085
- time_started: z17.string(),
1086
- files: z17.array(FileScanDataSchema),
1087
- total_files_scanned: z17.number().int(),
1088
- total_files_skipped: z17.number().int(),
1089
- model_formats: z17.array(z17.string()),
1090
- model_size_bytes: z17.number().int(),
1091
- scan_duration_ms: z17.number().int(),
1092
- error_code: z17.string().nullable().optional(),
1093
- error_message: z17.string().nullable().optional()
1411
+ values: z24.array(z24.string())
1412
+ }).passthrough();
1413
+ var EvalSummarySchema = z24.object({
1414
+ rules_failed: z24.number().int().optional().default(0),
1415
+ rules_passed: z24.number().int().optional().default(0),
1416
+ total_rules: z24.number().int().optional().default(0)
1417
+ }).passthrough();
1418
+ var ModelScanIssueSchema = z24.object({
1419
+ description: z24.string(),
1420
+ source: z24.string(),
1421
+ threat: z24.string().nullable().optional(),
1422
+ module: z24.string().nullable().optional(),
1423
+ operator: z24.string().nullable().optional()
1424
+ }).passthrough();
1425
+ var FileScanDataSchema = z24.object({
1426
+ file_path: z24.string(),
1427
+ modelscan_status: z24.string(),
1428
+ blob_id: z24.string(),
1429
+ error_message: z24.string().nullable().optional(),
1430
+ formats: z24.array(z24.string()).nullable().optional(),
1431
+ issues_detected: z24.array(ModelScanIssueSchema).nullable().optional()
1432
+ }).passthrough();
1433
+ var ScanDetailsSchema = z24.object({
1434
+ scanner_version: z24.string(),
1435
+ time_started: z24.string(),
1436
+ files: z24.array(FileScanDataSchema),
1437
+ total_files_scanned: z24.number().int(),
1438
+ total_files_skipped: z24.number().int(),
1439
+ model_formats: z24.array(z24.string()),
1440
+ model_size_bytes: z24.number().int(),
1441
+ scan_duration_ms: z24.number().int(),
1442
+ error_code: z24.string().nullable().optional(),
1443
+ error_message: z24.string().nullable().optional()
1094
1444
  });
1095
- var ScanCreateRequestSchema = z17.object({
1096
- model_uri: z17.string(),
1097
- security_group_uuid: z17.string(),
1098
- scan_origin: z17.string(),
1099
- allow_patterns: z17.array(z17.string()).nullable().optional(),
1100
- ignore_patterns: z17.array(z17.string()).nullable().optional(),
1101
- labels: z17.array(LabelSchema).nullable().optional(),
1102
- model_author: z17.string().nullable().optional(),
1103
- model_name: z17.string().nullable().optional(),
1104
- model_version: z17.string().nullable().optional(),
1445
+ var ScanCreateRequestSchema = z24.object({
1446
+ model_uri: z24.string(),
1447
+ security_group_uuid: z24.string(),
1448
+ scan_origin: z24.string(),
1449
+ allow_patterns: z24.array(z24.string()).nullable().optional(),
1450
+ ignore_patterns: z24.array(z24.string()).nullable().optional(),
1451
+ labels: z24.array(LabelSchema).nullable().optional(),
1452
+ model_author: z24.string().nullable().optional(),
1453
+ model_name: z24.string().nullable().optional(),
1454
+ model_version: z24.string().nullable().optional(),
1105
1455
  scan_details: ScanDetailsSchema.nullable().optional()
1106
1456
  });
1107
- var ScanBaseResponseSchema = z17.object({
1108
- uuid: z17.string(),
1109
- tsg_id: z17.string(),
1110
- created_at: z17.string(),
1111
- updated_at: z17.string(),
1112
- model_uri: z17.string(),
1113
- owner: z17.string(),
1114
- scan_origin: z17.string(),
1115
- security_group_uuid: z17.string(),
1116
- security_group_name: z17.string(),
1117
- model_version_uuid: z17.string(),
1118
- eval_outcome: z17.string(),
1119
- source_type: z17.string(),
1120
- created_by: z17.string().nullable().optional(),
1121
- enabled_rule_count_snapshot: z17.number().int().nullable().optional(),
1122
- error_code: z17.string().nullable().optional(),
1123
- error_message: z17.string().nullable().optional(),
1457
+ var ScanBaseResponseSchema = z24.object({
1458
+ uuid: z24.string(),
1459
+ tsg_id: z24.string(),
1460
+ created_at: z24.string(),
1461
+ updated_at: z24.string(),
1462
+ model_uri: z24.string(),
1463
+ owner: z24.string(),
1464
+ scan_origin: z24.string(),
1465
+ security_group_uuid: z24.string(),
1466
+ security_group_name: z24.string(),
1467
+ model_version_uuid: z24.string(),
1468
+ eval_outcome: z24.string(),
1469
+ source_type: z24.string(),
1470
+ created_by: z24.string().nullable().optional(),
1471
+ enabled_rule_count_snapshot: z24.number().int().nullable().optional(),
1472
+ error_code: z24.string().nullable().optional(),
1473
+ error_message: z24.string().nullable().optional(),
1124
1474
  eval_summary: EvalSummarySchema.nullable().optional(),
1125
- labels: z17.array(LabelSchema).optional(),
1126
- model_formats: z17.array(z17.string()).nullable().optional(),
1127
- scanner_version: z17.string().nullable().optional(),
1128
- time_started: z17.string().nullable().optional(),
1129
- total_files_scanned: z17.number().int().nullable().optional(),
1130
- total_files_skipped: z17.number().int().nullable().optional()
1131
- }).passthrough();
1132
- var ScanListSchema = z17.object({
1475
+ labels: z24.array(LabelSchema).optional(),
1476
+ model_formats: z24.array(z24.string()).nullable().optional(),
1477
+ scanner_version: z24.string().nullable().optional(),
1478
+ time_started: z24.string().nullable().optional(),
1479
+ total_files_scanned: z24.number().int().nullable().optional(),
1480
+ total_files_skipped: z24.number().int().nullable().optional()
1481
+ }).passthrough();
1482
+ var ScanListSchema = z24.object({
1133
1483
  pagination: ModelSecurityPaginationSchema,
1134
- scans: z17.array(ScanBaseResponseSchema)
1135
- }).passthrough();
1136
- var FileResponseSchema = z17.object({
1137
- uuid: z17.string(),
1138
- tsg_id: z17.string(),
1139
- created_at: z17.string(),
1140
- updated_at: z17.string(),
1141
- path: z17.string(),
1142
- parent_path: z17.string(),
1143
- type: z17.string(),
1144
- result: z17.string(),
1145
- model_version_uuid: z17.string(),
1146
- blob_id: z17.string().nullable().optional(),
1147
- formats: z17.array(z17.string()).nullable().optional(),
1148
- scan_uuid: z17.string().nullable().optional()
1149
- }).passthrough();
1150
- var FileListSchema = z17.object({
1484
+ scans: z24.array(ScanBaseResponseSchema)
1485
+ }).passthrough();
1486
+ var FileResponseSchema = z24.object({
1487
+ uuid: z24.string(),
1488
+ tsg_id: z24.string(),
1489
+ created_at: z24.string(),
1490
+ updated_at: z24.string(),
1491
+ path: z24.string(),
1492
+ parent_path: z24.string(),
1493
+ type: z24.string(),
1494
+ result: z24.string(),
1495
+ model_version_uuid: z24.string(),
1496
+ blob_id: z24.string().nullable().optional(),
1497
+ formats: z24.array(z24.string()).nullable().optional(),
1498
+ scan_uuid: z24.string().nullable().optional()
1499
+ }).passthrough();
1500
+ var FileListSchema = z24.object({
1151
1501
  pagination: ModelSecurityPaginationSchema,
1152
- files: z17.array(FileResponseSchema)
1153
- }).passthrough();
1154
- var RuleEvaluationResponseSchema = z17.object({
1155
- uuid: z17.string(),
1156
- tsg_id: z17.string(),
1157
- created_at: z17.string(),
1158
- updated_at: z17.string(),
1159
- result: z17.string(),
1160
- violation_count: z17.number().int(),
1161
- rule_instance_uuid: z17.string(),
1162
- scan_uuid: z17.string(),
1163
- rule_name: z17.string(),
1164
- rule_description: z17.string(),
1165
- rule_instance_state: z17.string()
1166
- }).passthrough();
1167
- var RuleEvaluationListSchema = z17.object({
1502
+ files: z24.array(FileResponseSchema)
1503
+ }).passthrough();
1504
+ var RuleEvaluationResponseSchema = z24.object({
1505
+ uuid: z24.string(),
1506
+ tsg_id: z24.string(),
1507
+ created_at: z24.string(),
1508
+ updated_at: z24.string(),
1509
+ result: z24.string(),
1510
+ violation_count: z24.number().int(),
1511
+ rule_instance_uuid: z24.string(),
1512
+ scan_uuid: z24.string(),
1513
+ rule_name: z24.string(),
1514
+ rule_description: z24.string(),
1515
+ rule_instance_state: z24.string()
1516
+ }).passthrough();
1517
+ var RuleEvaluationListSchema = z24.object({
1168
1518
  pagination: ModelSecurityPaginationSchema,
1169
- evaluations: z17.array(RuleEvaluationResponseSchema)
1170
- }).passthrough();
1171
- var ViolationResponseSchema = z17.object({
1172
- uuid: z17.string(),
1173
- tsg_id: z17.string(),
1174
- created_at: z17.string(),
1175
- updated_at: z17.string(),
1176
- description: z17.string(),
1177
- rule_instance_uuid: z17.string(),
1178
- rule_name: z17.string(),
1179
- rule_description: z17.string(),
1180
- rule_instance_state: z17.string(),
1181
- file: z17.string().nullable().optional(),
1182
- hash: z17.string().nullable().optional(),
1183
- module: z17.string().nullable().optional(),
1184
- operator: z17.string().nullable().optional(),
1185
- threat: z17.string().nullable().optional(),
1186
- threat_description: z17.string().nullable().optional()
1187
- }).passthrough();
1188
- var ViolationListSchema = z17.object({
1519
+ evaluations: z24.array(RuleEvaluationResponseSchema)
1520
+ }).passthrough();
1521
+ var ViolationResponseSchema = z24.object({
1522
+ uuid: z24.string(),
1523
+ tsg_id: z24.string(),
1524
+ created_at: z24.string(),
1525
+ updated_at: z24.string(),
1526
+ description: z24.string(),
1527
+ rule_instance_uuid: z24.string(),
1528
+ rule_name: z24.string(),
1529
+ rule_description: z24.string(),
1530
+ rule_instance_state: z24.string(),
1531
+ file: z24.string().nullable().optional(),
1532
+ hash: z24.string().nullable().optional(),
1533
+ module: z24.string().nullable().optional(),
1534
+ operator: z24.string().nullable().optional(),
1535
+ threat: z24.string().nullable().optional(),
1536
+ threat_description: z24.string().nullable().optional()
1537
+ }).passthrough();
1538
+ var ViolationListSchema = z24.object({
1189
1539
  pagination: ModelSecurityPaginationSchema,
1190
- violations: z17.array(ViolationResponseSchema)
1191
- }).passthrough();
1192
- var RuleEditableFieldDropdownSchema = z17.object({
1193
- value: z17.string(),
1194
- label: z17.string()
1195
- }).passthrough();
1196
- var RuleEditableFieldSchema = z17.object({
1197
- attribute_name: z17.string(),
1198
- type: z17.string(),
1199
- display_name: z17.string(),
1200
- display_type: z17.string(),
1201
- description: z17.string().nullable().optional(),
1202
- dropdown_values: z17.array(RuleEditableFieldDropdownSchema).nullable().optional()
1203
- }).passthrough();
1204
- var RuleRemediationSchema = z17.object({
1205
- description: z17.string(),
1206
- steps: z17.array(z17.string()),
1207
- url: z17.string()
1208
- }).passthrough();
1209
- var RuleConfigurationSchema = z17.object({
1210
- field_values: z17.record(z17.unknown()).optional(),
1211
- state: z17.string().nullable().optional()
1212
- }).passthrough();
1213
- var ModelSecurityRuleResponseSchema = z17.object({
1214
- uuid: z17.string(),
1215
- name: z17.string(),
1216
- description: z17.string(),
1217
- rule_type: z17.string(),
1218
- compatible_sources: z17.array(z17.string()),
1219
- default_state: z17.string(),
1540
+ violations: z24.array(ViolationResponseSchema)
1541
+ }).passthrough();
1542
+ var RuleEditableFieldDropdownSchema = z24.object({
1543
+ value: z24.string(),
1544
+ label: z24.string()
1545
+ }).passthrough();
1546
+ var RuleEditableFieldSchema = z24.object({
1547
+ attribute_name: z24.string(),
1548
+ type: z24.string(),
1549
+ display_name: z24.string(),
1550
+ display_type: z24.string(),
1551
+ description: z24.string().nullable().optional(),
1552
+ dropdown_values: z24.array(RuleEditableFieldDropdownSchema).nullable().optional()
1553
+ }).passthrough();
1554
+ var RuleRemediationSchema = z24.object({
1555
+ description: z24.string(),
1556
+ steps: z24.array(z24.string()),
1557
+ url: z24.string()
1558
+ }).passthrough();
1559
+ var RuleConfigurationSchema = z24.object({
1560
+ field_values: z24.record(z24.unknown()).optional(),
1561
+ state: z24.string().nullable().optional()
1562
+ }).passthrough();
1563
+ var ModelSecurityRuleResponseSchema = z24.object({
1564
+ uuid: z24.string(),
1565
+ name: z24.string(),
1566
+ description: z24.string(),
1567
+ rule_type: z24.string(),
1568
+ compatible_sources: z24.array(z24.string()),
1569
+ default_state: z24.string(),
1220
1570
  remediation: RuleRemediationSchema,
1221
- editable_fields: z17.array(RuleEditableFieldSchema),
1222
- constant_values: z17.record(z17.unknown()),
1223
- default_values: z17.record(z17.unknown())
1571
+ editable_fields: z24.array(RuleEditableFieldSchema),
1572
+ constant_values: z24.record(z24.unknown()),
1573
+ default_values: z24.record(z24.unknown())
1224
1574
  }).passthrough();
1225
- var ListModelSecurityRulesResponseSchema = z17.object({
1575
+ var ListModelSecurityRulesResponseSchema = z24.object({
1226
1576
  pagination: ModelSecurityPaginationSchema,
1227
- rules: z17.array(ModelSecurityRuleResponseSchema)
1228
- }).passthrough();
1229
- var ModelSecurityRuleInstanceResponseSchema = z17.object({
1230
- uuid: z17.string(),
1231
- tsg_id: z17.string(),
1232
- created_at: z17.string(),
1233
- updated_at: z17.string(),
1234
- security_group_uuid: z17.string(),
1235
- security_rule_uuid: z17.string(),
1236
- state: z17.string(),
1577
+ rules: z24.array(ModelSecurityRuleResponseSchema)
1578
+ }).passthrough();
1579
+ var ModelSecurityRuleInstanceResponseSchema = z24.object({
1580
+ uuid: z24.string(),
1581
+ tsg_id: z24.string(),
1582
+ created_at: z24.string(),
1583
+ updated_at: z24.string(),
1584
+ security_group_uuid: z24.string(),
1585
+ security_rule_uuid: z24.string(),
1586
+ state: z24.string(),
1237
1587
  rule: ModelSecurityRuleResponseSchema,
1238
- field_values: z17.record(z17.unknown()).optional()
1588
+ field_values: z24.record(z24.unknown()).optional()
1239
1589
  }).passthrough();
1240
- var ModelSecurityRuleInstanceUpdateRequestSchema = z17.object({
1241
- security_group_uuid: z17.string(),
1242
- state: z17.string().nullable().optional(),
1243
- field_values: z17.record(z17.unknown()).nullable().optional()
1590
+ var ModelSecurityRuleInstanceUpdateRequestSchema = z24.object({
1591
+ security_group_uuid: z24.string(),
1592
+ state: z24.string().nullable().optional(),
1593
+ field_values: z24.record(z24.unknown()).nullable().optional()
1244
1594
  });
1245
- var ListModelSecurityRuleInstancesResponseSchema = z17.object({
1595
+ var ListModelSecurityRuleInstancesResponseSchema = z24.object({
1246
1596
  pagination: ModelSecurityPaginationSchema,
1247
- rule_instances: z17.array(ModelSecurityRuleInstanceResponseSchema)
1597
+ rule_instances: z24.array(ModelSecurityRuleInstanceResponseSchema)
1248
1598
  }).passthrough();
1249
- var ModelSecurityGroupCreateRequestSchema = z17.object({
1250
- name: z17.string(),
1251
- source_type: z17.string(),
1252
- description: z17.string().optional().default(""),
1253
- rule_configurations: z17.record(RuleConfigurationSchema).optional()
1599
+ var ModelSecurityGroupCreateRequestSchema = z24.object({
1600
+ name: z24.string(),
1601
+ source_type: z24.string(),
1602
+ description: z24.string().optional().default(""),
1603
+ rule_configurations: z24.record(RuleConfigurationSchema).optional()
1254
1604
  });
1255
- var ModelSecurityGroupResponseSchema = z17.object({
1256
- uuid: z17.string(),
1257
- tsg_id: z17.string(),
1258
- created_at: z17.string(),
1259
- updated_at: z17.string(),
1260
- name: z17.string(),
1261
- description: z17.string(),
1262
- source_type: z17.string(),
1263
- state: z17.string(),
1264
- is_tombstone: z17.boolean()
1265
- }).passthrough();
1266
- var ModelSecurityGroupUpdateRequestSchema = z17.object({
1267
- name: z17.string().nullable().optional(),
1268
- description: z17.string().nullable().optional()
1605
+ var ModelSecurityGroupResponseSchema = z24.object({
1606
+ uuid: z24.string(),
1607
+ tsg_id: z24.string(),
1608
+ created_at: z24.string(),
1609
+ updated_at: z24.string(),
1610
+ name: z24.string(),
1611
+ description: z24.string(),
1612
+ source_type: z24.string(),
1613
+ state: z24.string(),
1614
+ is_tombstone: z24.boolean()
1615
+ }).passthrough();
1616
+ var ModelSecurityGroupUpdateRequestSchema = z24.object({
1617
+ name: z24.string().nullable().optional(),
1618
+ description: z24.string().nullable().optional()
1269
1619
  });
1270
- var ListModelSecurityGroupsResponseSchema = z17.object({
1620
+ var ListModelSecurityGroupsResponseSchema = z24.object({
1271
1621
  pagination: ModelSecurityPaginationSchema,
1272
- security_groups: z17.array(ModelSecurityGroupResponseSchema)
1622
+ security_groups: z24.array(ModelSecurityGroupResponseSchema)
1273
1623
  }).passthrough();
1274
- var PyPIAuthResponseSchema = z17.object({
1275
- url: z17.string(),
1276
- expires_at: z17.string()
1624
+ var PyPIAuthResponseSchema = z24.object({
1625
+ url: z24.string(),
1626
+ expires_at: z24.string()
1277
1627
  }).passthrough();
1278
1628
 
1279
1629
  // src/models/red-team-enums.ts
@@ -1471,892 +1821,892 @@ var TargetType = {
1471
1821
  };
1472
1822
 
1473
1823
  // src/models/red-team.ts
1474
- import { z as z18 } from "zod";
1475
- var RedTeamPaginationSchema = z18.object({ total_items: z18.number().int().nullable().optional() }).passthrough();
1476
- var CountByNameSchema = z18.object({ name: z18.string(), count: z18.number().int() });
1477
- var ValidationErrorSchema = z18.object({
1478
- loc: z18.array(z18.union([z18.string(), z18.number()])),
1479
- msg: z18.string(),
1480
- type: z18.string()
1824
+ import { z as z25 } from "zod";
1825
+ var RedTeamPaginationSchema = z25.object({ total_items: z25.number().int().nullable().optional() }).passthrough();
1826
+ var CountByNameSchema = z25.object({ name: z25.string(), count: z25.number().int() });
1827
+ var ValidationErrorSchema = z25.object({
1828
+ loc: z25.array(z25.union([z25.string(), z25.number()])),
1829
+ msg: z25.string(),
1830
+ type: z25.string()
1481
1831
  });
1482
- var HTTPValidationErrorSchema = z18.object({ detail: z18.array(ValidationErrorSchema).optional() }).passthrough();
1483
- var TargetBackgroundSchema = z18.object({
1484
- industry: z18.string().nullable().optional(),
1485
- use_case: z18.string().nullable().optional(),
1486
- competitors: z18.array(z18.string()).nullable().optional()
1487
- }).passthrough();
1488
- var TargetAdditionalContextSchema = z18.object({
1489
- base_model: z18.string().nullable().optional(),
1490
- core_architecture: z18.string().nullable().optional(),
1491
- system_prompt: z18.string().nullable().optional(),
1492
- languages_supported: z18.array(z18.string()).nullable().optional(),
1493
- banned_keywords: z18.array(z18.string()).nullable().optional(),
1494
- tools_accessible: z18.array(z18.string()).nullable().optional()
1495
- }).passthrough();
1496
- var TargetMetadataSchema = z18.object({
1497
- multi_turn: z18.boolean().optional(),
1498
- multi_turn_error_message: z18.string().nullable().optional(),
1499
- rate_limit: z18.number().int().nullable().optional(),
1500
- rate_limit_enabled: z18.boolean().optional(),
1501
- rate_limit_error_code: z18.number().int().nullable().optional(),
1502
- rate_limit_error_json: z18.record(z18.unknown()).nullable().optional(),
1503
- rate_limit_error_message: z18.string().nullable().optional(),
1504
- content_filter_enabled: z18.boolean().optional(),
1505
- content_filter_error_code: z18.number().int().nullable().optional(),
1506
- content_filter_error_json: z18.record(z18.unknown()).nullable().optional(),
1507
- content_filter_error_message: z18.string().nullable().optional(),
1508
- probe_message: z18.string().optional(),
1509
- request_timeout: z18.number().optional()
1510
- }).passthrough();
1511
- var MultiTurnStatefulConfigSchema = z18.object({
1512
- type: z18.string().default("stateful"),
1513
- response_id_field: z18.string(),
1514
- request_id_field: z18.string()
1515
- }).passthrough();
1516
- var MultiTurnStatelessConfigSchema = z18.object({
1517
- type: z18.string().default("stateless"),
1518
- assistant_role: z18.string().nullable().optional()
1519
- }).passthrough();
1520
- var OpenAIConnectionParamsSchema = z18.object({
1521
- api_key: z18.string(),
1522
- model_name: z18.string()
1523
- }).passthrough();
1524
- var HuggingfaceConnectionParamsSchema = z18.object({
1525
- api_key: z18.string(),
1526
- model_name: z18.string()
1527
- }).passthrough();
1528
- var DatabricksConnectionParamsSchema = z18.object({
1529
- auth_type: z18.string(),
1530
- workspace_url: z18.string(),
1531
- model_name: z18.string(),
1532
- access_token: z18.string().nullable().optional(),
1533
- client_id: z18.string().nullable().optional(),
1534
- secret: z18.string().nullable().optional()
1535
- }).passthrough();
1536
- var BedrockAccessConnectionParamsSchema = z18.object({
1537
- access_id: z18.string(),
1538
- access_secret: z18.string(),
1539
- region: z18.string(),
1540
- model_id: z18.string(),
1541
- session_token: z18.string().nullable().optional()
1542
- }).passthrough();
1543
- var RestConnectionParamsSchema = z18.object({
1544
- api_endpoint: z18.string().nullable().optional(),
1545
- request_headers: z18.record(z18.unknown()).nullable().optional(),
1546
- request_json: z18.record(z18.unknown()).nullable().optional(),
1547
- response_json: z18.record(z18.unknown()).nullable().optional(),
1548
- response_key: z18.string().nullable().optional(),
1549
- target_connection_config: z18.unknown().nullable().optional(),
1550
- curl: z18.string().nullable().optional(),
1551
- multi_turn_config: z18.unknown().nullable().optional()
1832
+ var HTTPValidationErrorSchema = z25.object({ detail: z25.array(ValidationErrorSchema).optional() }).passthrough();
1833
+ var TargetBackgroundSchema = z25.object({
1834
+ industry: z25.string().nullable().optional(),
1835
+ use_case: z25.string().nullable().optional(),
1836
+ competitors: z25.array(z25.string()).nullable().optional()
1837
+ }).passthrough();
1838
+ var TargetAdditionalContextSchema = z25.object({
1839
+ base_model: z25.string().nullable().optional(),
1840
+ core_architecture: z25.string().nullable().optional(),
1841
+ system_prompt: z25.string().nullable().optional(),
1842
+ languages_supported: z25.array(z25.string()).nullable().optional(),
1843
+ banned_keywords: z25.array(z25.string()).nullable().optional(),
1844
+ tools_accessible: z25.array(z25.string()).nullable().optional()
1845
+ }).passthrough();
1846
+ var TargetMetadataSchema = z25.object({
1847
+ multi_turn: z25.boolean().optional(),
1848
+ multi_turn_error_message: z25.string().nullable().optional(),
1849
+ rate_limit: z25.number().int().nullable().optional(),
1850
+ rate_limit_enabled: z25.boolean().optional(),
1851
+ rate_limit_error_code: z25.number().int().nullable().optional(),
1852
+ rate_limit_error_json: z25.record(z25.unknown()).nullable().optional(),
1853
+ rate_limit_error_message: z25.string().nullable().optional(),
1854
+ content_filter_enabled: z25.boolean().optional(),
1855
+ content_filter_error_code: z25.number().int().nullable().optional(),
1856
+ content_filter_error_json: z25.record(z25.unknown()).nullable().optional(),
1857
+ content_filter_error_message: z25.string().nullable().optional(),
1858
+ probe_message: z25.string().optional(),
1859
+ request_timeout: z25.number().optional()
1860
+ }).passthrough();
1861
+ var MultiTurnStatefulConfigSchema = z25.object({
1862
+ type: z25.string().default("stateful"),
1863
+ response_id_field: z25.string(),
1864
+ request_id_field: z25.string()
1865
+ }).passthrough();
1866
+ var MultiTurnStatelessConfigSchema = z25.object({
1867
+ type: z25.string().default("stateless"),
1868
+ assistant_role: z25.string().nullable().optional()
1869
+ }).passthrough();
1870
+ var OpenAIConnectionParamsSchema = z25.object({
1871
+ api_key: z25.string(),
1872
+ model_name: z25.string()
1873
+ }).passthrough();
1874
+ var HuggingfaceConnectionParamsSchema = z25.object({
1875
+ api_key: z25.string(),
1876
+ model_name: z25.string()
1877
+ }).passthrough();
1878
+ var DatabricksConnectionParamsSchema = z25.object({
1879
+ auth_type: z25.string(),
1880
+ workspace_url: z25.string(),
1881
+ model_name: z25.string(),
1882
+ access_token: z25.string().nullable().optional(),
1883
+ client_id: z25.string().nullable().optional(),
1884
+ secret: z25.string().nullable().optional()
1885
+ }).passthrough();
1886
+ var BedrockAccessConnectionParamsSchema = z25.object({
1887
+ access_id: z25.string(),
1888
+ access_secret: z25.string(),
1889
+ region: z25.string(),
1890
+ model_id: z25.string(),
1891
+ session_token: z25.string().nullable().optional()
1892
+ }).passthrough();
1893
+ var RestConnectionParamsSchema = z25.object({
1894
+ api_endpoint: z25.string().nullable().optional(),
1895
+ request_headers: z25.record(z25.unknown()).nullable().optional(),
1896
+ request_json: z25.record(z25.unknown()).nullable().optional(),
1897
+ response_json: z25.record(z25.unknown()).nullable().optional(),
1898
+ response_key: z25.string().nullable().optional(),
1899
+ target_connection_config: z25.unknown().nullable().optional(),
1900
+ curl: z25.string().nullable().optional(),
1901
+ multi_turn_config: z25.unknown().nullable().optional()
1552
1902
  }).passthrough();
1553
1903
  var StreamingConnectionParamsSchema = RestConnectionParamsSchema.extend({
1554
- response_stop_key: z18.string(),
1555
- response_stop_value: z18.string()
1904
+ response_stop_key: z25.string(),
1905
+ response_stop_value: z25.string()
1556
1906
  }).passthrough();
1557
- var ConnectionParamsSchema = z18.union([
1907
+ var ConnectionParamsSchema = z25.union([
1558
1908
  StreamingConnectionParamsSchema,
1559
1909
  RestConnectionParamsSchema
1560
1910
  ]);
1561
- var TargetJobRequestSchema = z18.object({
1562
- uuid: z18.string(),
1563
- version: z18.number().int().nullable().optional()
1911
+ var TargetJobRequestSchema = z25.object({
1912
+ uuid: z25.string(),
1913
+ version: z25.number().int().nullable().optional()
1564
1914
  });
1565
- var JobTimeRecordSchema = z18.object({
1566
- queued_at: z18.string().nullable().optional(),
1567
- started_at: z18.string().nullable().optional(),
1568
- completed_at: z18.string().nullable().optional(),
1569
- time_taken: z18.string().nullable().optional()
1570
- }).passthrough();
1571
- var StaticJobMetadataSchema = z18.object({
1572
- categories: z18.record(z18.unknown()),
1573
- rate_limit_enabled: z18.boolean().optional(),
1574
- rate_limit: z18.number().int().nullable().optional(),
1575
- rate_limit_error_code: z18.number().int().nullable().optional(),
1576
- rate_limit_error_message: z18.string().nullable().optional(),
1577
- rate_limit_error_json: z18.unknown().optional(),
1578
- content_filter_enabled: z18.boolean().optional(),
1579
- content_filter_error_code: z18.number().int().nullable().optional(),
1580
- content_filter_error_message: z18.string().nullable().optional(),
1581
- content_filter_error_json: z18.unknown().optional()
1582
- }).passthrough();
1583
- var DynamicJobMetadataSchema = z18.object({
1584
- rate_limit_enabled: z18.boolean().optional(),
1585
- rate_limit: z18.number().int().nullable().optional(),
1586
- rate_limit_error_code: z18.number().int().nullable().optional(),
1587
- rate_limit_error_message: z18.string().nullable().optional(),
1588
- rate_limit_error_json: z18.unknown().optional(),
1589
- content_filter_enabled: z18.boolean().optional(),
1590
- content_filter_error_code: z18.number().int().nullable().optional(),
1591
- content_filter_error_message: z18.string().nullable().optional(),
1592
- content_filter_error_json: z18.unknown().optional(),
1593
- stream_breadth: z18.number().int().optional(),
1594
- stream_depth: z18.number().int().optional(),
1595
- max_tokens: z18.number().int().optional(),
1596
- context_size: z18.number().int().optional(),
1597
- attack_goals: z18.array(z18.unknown()).optional(),
1598
- base_model: z18.string().nullable().optional(),
1599
- use_case: z18.string().nullable().optional(),
1600
- system_prompt: z18.string().nullable().optional()
1601
- }).passthrough();
1602
- var CustomJobMetadataSchema = z18.object({
1603
- custom_prompt_sets: z18.array(z18.unknown()),
1604
- rate_limit_enabled: z18.boolean().optional(),
1605
- rate_limit: z18.number().int().nullable().optional(),
1606
- rate_limit_error_code: z18.number().int().nullable().optional(),
1607
- rate_limit_error_message: z18.string().nullable().optional(),
1608
- rate_limit_error_json: z18.unknown().optional(),
1609
- content_filter_enabled: z18.boolean().optional(),
1610
- content_filter_error_code: z18.number().int().nullable().optional(),
1611
- content_filter_error_message: z18.string().nullable().optional(),
1612
- content_filter_error_json: z18.unknown().optional()
1613
- }).passthrough();
1614
- var JobCreateRequestSchema = z18.object({
1615
- name: z18.string(),
1915
+ var JobTimeRecordSchema = z25.object({
1916
+ queued_at: z25.string().nullable().optional(),
1917
+ started_at: z25.string().nullable().optional(),
1918
+ completed_at: z25.string().nullable().optional(),
1919
+ time_taken: z25.string().nullable().optional()
1920
+ }).passthrough();
1921
+ var StaticJobMetadataSchema = z25.object({
1922
+ categories: z25.record(z25.unknown()),
1923
+ rate_limit_enabled: z25.boolean().optional(),
1924
+ rate_limit: z25.number().int().nullable().optional(),
1925
+ rate_limit_error_code: z25.number().int().nullable().optional(),
1926
+ rate_limit_error_message: z25.string().nullable().optional(),
1927
+ rate_limit_error_json: z25.unknown().optional(),
1928
+ content_filter_enabled: z25.boolean().optional(),
1929
+ content_filter_error_code: z25.number().int().nullable().optional(),
1930
+ content_filter_error_message: z25.string().nullable().optional(),
1931
+ content_filter_error_json: z25.unknown().optional()
1932
+ }).passthrough();
1933
+ var DynamicJobMetadataSchema = z25.object({
1934
+ rate_limit_enabled: z25.boolean().optional(),
1935
+ rate_limit: z25.number().int().nullable().optional(),
1936
+ rate_limit_error_code: z25.number().int().nullable().optional(),
1937
+ rate_limit_error_message: z25.string().nullable().optional(),
1938
+ rate_limit_error_json: z25.unknown().optional(),
1939
+ content_filter_enabled: z25.boolean().optional(),
1940
+ content_filter_error_code: z25.number().int().nullable().optional(),
1941
+ content_filter_error_message: z25.string().nullable().optional(),
1942
+ content_filter_error_json: z25.unknown().optional(),
1943
+ stream_breadth: z25.number().int().optional(),
1944
+ stream_depth: z25.number().int().optional(),
1945
+ max_tokens: z25.number().int().optional(),
1946
+ context_size: z25.number().int().optional(),
1947
+ attack_goals: z25.array(z25.unknown()).optional(),
1948
+ base_model: z25.string().nullable().optional(),
1949
+ use_case: z25.string().nullable().optional(),
1950
+ system_prompt: z25.string().nullable().optional()
1951
+ }).passthrough();
1952
+ var CustomJobMetadataSchema = z25.object({
1953
+ custom_prompt_sets: z25.array(z25.unknown()),
1954
+ rate_limit_enabled: z25.boolean().optional(),
1955
+ rate_limit: z25.number().int().nullable().optional(),
1956
+ rate_limit_error_code: z25.number().int().nullable().optional(),
1957
+ rate_limit_error_message: z25.string().nullable().optional(),
1958
+ rate_limit_error_json: z25.unknown().optional(),
1959
+ content_filter_enabled: z25.boolean().optional(),
1960
+ content_filter_error_code: z25.number().int().nullable().optional(),
1961
+ content_filter_error_message: z25.string().nullable().optional(),
1962
+ content_filter_error_json: z25.unknown().optional()
1963
+ }).passthrough();
1964
+ var JobCreateRequestSchema = z25.object({
1965
+ name: z25.string(),
1616
1966
  target: TargetJobRequestSchema,
1617
- job_type: z18.string(),
1618
- job_metadata: z18.union([
1967
+ job_type: z25.string(),
1968
+ job_metadata: z25.union([
1619
1969
  StaticJobMetadataSchema,
1620
1970
  DynamicJobMetadataSchema,
1621
1971
  CustomJobMetadataSchema
1622
1972
  ]),
1623
- version: z18.number().int().nullable().optional(),
1624
- extra_info: z18.record(z18.unknown()).nullable().optional()
1973
+ version: z25.number().int().nullable().optional(),
1974
+ extra_info: z25.record(z25.unknown()).nullable().optional()
1625
1975
  });
1626
- var StaticJobReportStatsSchema = z18.object({
1627
- output_completion_percentage: z18.number(),
1628
- partial_report_unlocked: z18.boolean().optional(),
1629
- partial_report_unlocked_at: z18.string().nullable().optional(),
1630
- report_summary: z18.string().nullable().optional()
1631
- }).passthrough();
1632
- var DynamicJobReportStatsSchema = z18.object({
1633
- total_goals: z18.number().int().optional(),
1634
- total_streams: z18.number().int().optional(),
1635
- total_threats: z18.number().int().optional(),
1636
- goals_achieved: z18.number().int().optional(),
1637
- report_summary: z18.string().nullable().optional()
1638
- }).passthrough();
1639
- var TargetReferenceSchema = z18.object({
1640
- uuid: z18.string(),
1641
- tsg_id: z18.string(),
1642
- name: z18.string(),
1643
- description: z18.string().nullable().optional(),
1644
- target_type: z18.string().nullable().optional(),
1645
- connection_type: z18.string().nullable().optional(),
1646
- api_endpoint_type: z18.string().nullable().optional(),
1647
- response_mode: z18.string().nullable().optional(),
1648
- session_supported: z18.boolean().optional(),
1649
- extra_info: z18.record(z18.unknown()).nullable().optional(),
1650
- status: z18.string(),
1651
- active: z18.boolean(),
1652
- validated: z18.boolean(),
1653
- version: z18.number().int().nullable().optional(),
1654
- secret_version: z18.string().nullable().optional(),
1655
- created_by_user_id: z18.string().nullable().optional(),
1656
- updated_by_user_id: z18.string().nullable().optional(),
1657
- created_at: z18.string(),
1658
- updated_at: z18.string(),
1976
+ var StaticJobReportStatsSchema = z25.object({
1977
+ output_completion_percentage: z25.number(),
1978
+ partial_report_unlocked: z25.boolean().optional(),
1979
+ partial_report_unlocked_at: z25.string().nullable().optional(),
1980
+ report_summary: z25.string().nullable().optional()
1981
+ }).passthrough();
1982
+ var DynamicJobReportStatsSchema = z25.object({
1983
+ total_goals: z25.number().int().optional(),
1984
+ total_streams: z25.number().int().optional(),
1985
+ total_threats: z25.number().int().optional(),
1986
+ goals_achieved: z25.number().int().optional(),
1987
+ report_summary: z25.string().nullable().optional()
1988
+ }).passthrough();
1989
+ var TargetReferenceSchema = z25.object({
1990
+ uuid: z25.string(),
1991
+ tsg_id: z25.string(),
1992
+ name: z25.string(),
1993
+ description: z25.string().nullable().optional(),
1994
+ target_type: z25.string().nullable().optional(),
1995
+ connection_type: z25.string().nullable().optional(),
1996
+ api_endpoint_type: z25.string().nullable().optional(),
1997
+ response_mode: z25.string().nullable().optional(),
1998
+ session_supported: z25.boolean().optional(),
1999
+ extra_info: z25.record(z25.unknown()).nullable().optional(),
2000
+ status: z25.string(),
2001
+ active: z25.boolean(),
2002
+ validated: z25.boolean(),
2003
+ version: z25.number().int().nullable().optional(),
2004
+ secret_version: z25.string().nullable().optional(),
2005
+ created_by_user_id: z25.string().nullable().optional(),
2006
+ updated_by_user_id: z25.string().nullable().optional(),
2007
+ created_at: z25.string(),
2008
+ updated_at: z25.string(),
1659
2009
  target_metadata: TargetMetadataSchema.optional(),
1660
2010
  target_background: TargetBackgroundSchema.nullable().optional(),
1661
- profiling_status: z18.string().nullable().optional(),
2011
+ profiling_status: z25.string().nullable().optional(),
1662
2012
  additional_context: TargetAdditionalContextSchema.nullable().optional()
1663
2013
  }).passthrough();
1664
- var JobResponseSchema = z18.object({
1665
- uuid: z18.string(),
1666
- tsg_id: z18.string(),
1667
- name: z18.string(),
2014
+ var JobResponseSchema = z25.object({
2015
+ uuid: z25.string(),
2016
+ tsg_id: z25.string(),
2017
+ name: z25.string(),
1668
2018
  target: TargetReferenceSchema,
1669
- job_type: z18.string(),
1670
- job_metadata: z18.unknown(),
1671
- version: z18.number().int().nullable().optional(),
1672
- extra_info: z18.record(z18.unknown()).nullable().optional(),
1673
- target_id: z18.string(),
1674
- target_type: z18.string(),
1675
- total: z18.number().int().nullable().optional(),
1676
- completed: z18.number().int().nullable().optional(),
1677
- status: z18.string().optional(),
1678
- score: z18.number().nullable().optional(),
1679
- asr: z18.number().nullable().optional(),
2019
+ job_type: z25.string(),
2020
+ job_metadata: z25.unknown(),
2021
+ version: z25.number().int().nullable().optional(),
2022
+ extra_info: z25.record(z25.unknown()).nullable().optional(),
2023
+ target_id: z25.string(),
2024
+ target_type: z25.string(),
2025
+ total: z25.number().int().nullable().optional(),
2026
+ completed: z25.number().int().nullable().optional(),
2027
+ status: z25.string().optional(),
2028
+ score: z25.number().nullable().optional(),
2029
+ asr: z25.number().nullable().optional(),
1680
2030
  time_record: JobTimeRecordSchema.nullable().optional(),
1681
- created_at: z18.string().nullable().optional(),
1682
- updated_at: z18.string().nullable().optional(),
1683
- created_by_user_id: z18.string().nullable().optional(),
1684
- report_stats: z18.unknown().optional(),
1685
- metering_quota_uuid: z18.string().nullable().optional(),
1686
- counted_towards_quota: z18.string().optional(),
1687
- invocation_id: z18.string().nullable().optional()
1688
- }).passthrough();
1689
- var JobListResponseSchema = z18.object({
2031
+ created_at: z25.string().nullable().optional(),
2032
+ updated_at: z25.string().nullable().optional(),
2033
+ created_by_user_id: z25.string().nullable().optional(),
2034
+ report_stats: z25.unknown().optional(),
2035
+ metering_quota_uuid: z25.string().nullable().optional(),
2036
+ counted_towards_quota: z25.string().optional(),
2037
+ invocation_id: z25.string().nullable().optional()
2038
+ }).passthrough();
2039
+ var JobListResponseSchema = z25.object({
1690
2040
  pagination: RedTeamPaginationSchema,
1691
- data: z18.array(JobResponseSchema)
2041
+ data: z25.array(JobResponseSchema)
1692
2042
  }).passthrough();
1693
- var JobAbortResponseSchema = z18.object({
1694
- job_id: z18.string(),
1695
- message: z18.string()
2043
+ var JobAbortResponseSchema = z25.object({
2044
+ job_id: z25.string(),
2045
+ message: z25.string()
1696
2046
  });
1697
- var PrerequisiteModelSchema = z18.object({
1698
- id: z18.string(),
1699
- display_name: z18.string(),
1700
- description: z18.string()
2047
+ var PrerequisiteModelSchema = z25.object({
2048
+ id: z25.string(),
2049
+ display_name: z25.string(),
2050
+ description: z25.string()
1701
2051
  });
1702
- var SubCategoryModelSchema = z18.object({
1703
- id: z18.string(),
1704
- display_name: z18.string(),
1705
- description: z18.string(),
1706
- preselect: z18.boolean().optional(),
1707
- prerequisites: z18.array(PrerequisiteModelSchema).nullable().optional(),
1708
- active: z18.boolean().optional()
1709
- }).passthrough();
1710
- var CategoryModelSchema = z18.object({
1711
- id: z18.string(),
1712
- display_name: z18.string(),
1713
- description: z18.string(),
1714
- preselect: z18.boolean().optional(),
1715
- sub_categories: z18.array(SubCategoryModelSchema)
1716
- }).passthrough();
1717
- var AttackOutputSchema = z18.object({
1718
- uuid: z18.string(),
1719
- tsg_id: z18.string(),
1720
- attack_id: z18.string(),
1721
- job_id: z18.string(),
1722
- target_id: z18.string(),
1723
- output: z18.string(),
1724
- threat: z18.boolean().nullable().optional(),
1725
- marked_safe: z18.boolean().nullable().optional()
1726
- }).passthrough();
1727
- var AttackMultiTurnOutputSchema = z18.object({
1728
- uuid: z18.string(),
1729
- tsg_id: z18.string(),
1730
- attack_id: z18.string(),
1731
- job_id: z18.string(),
1732
- target_id: z18.string(),
1733
- output: z18.string(),
1734
- prompt: z18.string(),
1735
- turn: z18.number().int(),
1736
- threat: z18.boolean().nullable().optional(),
1737
- marked_safe: z18.boolean().nullable().optional(),
1738
- generation: z18.number().int().optional(),
1739
- multi_turn: z18.boolean().optional()
1740
- }).passthrough();
1741
- var AttackListItemSchema = z18.object({
1742
- uuid: z18.string(),
1743
- tsg_id: z18.string(),
1744
- job_id: z18.string(),
1745
- target_id: z18.string(),
1746
- prompt: z18.string(),
1747
- prompt_mapping_id: z18.string(),
1748
- prompt_id: z18.string(),
1749
- category: z18.string(),
1750
- sub_category: z18.string(),
1751
- category_display_name: z18.string(),
1752
- sub_category_display_name: z18.string(),
1753
- status: z18.string().optional(),
1754
- marked_safe: z18.boolean().nullable().optional(),
1755
- extra_info: z18.record(z18.unknown()).optional(),
1756
- threat: z18.boolean().nullable().optional(),
1757
- attack_type: z18.string().optional(),
1758
- multi_turn: z18.boolean().optional(),
1759
- asr: z18.number().nullable().optional(),
1760
- version: z18.number().int().nullable().optional(),
1761
- severity: z18.string().optional()
1762
- }).passthrough();
1763
- var AttackListResponseSchema = z18.object({
2052
+ var SubCategoryModelSchema = z25.object({
2053
+ id: z25.string(),
2054
+ display_name: z25.string(),
2055
+ description: z25.string(),
2056
+ preselect: z25.boolean().optional(),
2057
+ prerequisites: z25.array(PrerequisiteModelSchema).nullable().optional(),
2058
+ active: z25.boolean().optional()
2059
+ }).passthrough();
2060
+ var CategoryModelSchema = z25.object({
2061
+ id: z25.string(),
2062
+ display_name: z25.string(),
2063
+ description: z25.string(),
2064
+ preselect: z25.boolean().optional(),
2065
+ sub_categories: z25.array(SubCategoryModelSchema)
2066
+ }).passthrough();
2067
+ var AttackOutputSchema = z25.object({
2068
+ uuid: z25.string(),
2069
+ tsg_id: z25.string(),
2070
+ attack_id: z25.string(),
2071
+ job_id: z25.string(),
2072
+ target_id: z25.string(),
2073
+ output: z25.string(),
2074
+ threat: z25.boolean().nullable().optional(),
2075
+ marked_safe: z25.boolean().nullable().optional()
2076
+ }).passthrough();
2077
+ var AttackMultiTurnOutputSchema = z25.object({
2078
+ uuid: z25.string(),
2079
+ tsg_id: z25.string(),
2080
+ attack_id: z25.string(),
2081
+ job_id: z25.string(),
2082
+ target_id: z25.string(),
2083
+ output: z25.string(),
2084
+ prompt: z25.string(),
2085
+ turn: z25.number().int(),
2086
+ threat: z25.boolean().nullable().optional(),
2087
+ marked_safe: z25.boolean().nullable().optional(),
2088
+ generation: z25.number().int().optional(),
2089
+ multi_turn: z25.boolean().optional()
2090
+ }).passthrough();
2091
+ var AttackListItemSchema = z25.object({
2092
+ uuid: z25.string(),
2093
+ tsg_id: z25.string(),
2094
+ job_id: z25.string(),
2095
+ target_id: z25.string(),
2096
+ prompt: z25.string(),
2097
+ prompt_mapping_id: z25.string(),
2098
+ prompt_id: z25.string(),
2099
+ category: z25.string(),
2100
+ sub_category: z25.string(),
2101
+ category_display_name: z25.string(),
2102
+ sub_category_display_name: z25.string(),
2103
+ status: z25.string().optional(),
2104
+ marked_safe: z25.boolean().nullable().optional(),
2105
+ extra_info: z25.record(z25.unknown()).optional(),
2106
+ threat: z25.boolean().nullable().optional(),
2107
+ attack_type: z25.string().optional(),
2108
+ multi_turn: z25.boolean().optional(),
2109
+ asr: z25.number().nullable().optional(),
2110
+ version: z25.number().int().nullable().optional(),
2111
+ severity: z25.string().optional()
2112
+ }).passthrough();
2113
+ var AttackListResponseSchema = z25.object({
1764
2114
  pagination: RedTeamPaginationSchema,
1765
- data: z18.array(AttackListItemSchema)
1766
- }).passthrough();
1767
- var AttackDetailResponseSchema = z18.object({
1768
- uuid: z18.string(),
1769
- tsg_id: z18.string(),
1770
- job_id: z18.string(),
1771
- target_id: z18.string(),
1772
- prompt: z18.string(),
1773
- prompt_mapping_id: z18.string(),
1774
- prompt_id: z18.string(),
1775
- category: z18.string(),
1776
- sub_category: z18.string(),
1777
- category_display_name: z18.string(),
1778
- sub_category_display_name: z18.string(),
1779
- compliance_frameworks: z18.array(z18.unknown()),
1780
- goal: z18.string().nullable(),
1781
- status: z18.string().optional(),
1782
- marked_safe: z18.boolean().nullable().optional(),
1783
- extra_info: z18.record(z18.unknown()).optional(),
1784
- threat: z18.boolean().nullable().optional(),
1785
- attack_type: z18.string().optional(),
1786
- multi_turn: z18.boolean().optional(),
1787
- asr: z18.number().nullable().optional(),
1788
- version: z18.number().int().nullable().optional(),
1789
- severity: z18.string().optional(),
1790
- outputs: z18.array(AttackOutputSchema).optional()
1791
- }).passthrough();
1792
- var AttackMultiTurnDetailResponseSchema = z18.object({
1793
- uuid: z18.string(),
1794
- tsg_id: z18.string(),
1795
- job_id: z18.string(),
1796
- target_id: z18.string(),
1797
- prompt: z18.string(),
1798
- prompt_mapping_id: z18.string(),
1799
- prompt_id: z18.string(),
1800
- category: z18.string(),
1801
- sub_category: z18.string(),
1802
- category_display_name: z18.string(),
1803
- sub_category_display_name: z18.string(),
1804
- compliance_frameworks: z18.array(z18.unknown()),
1805
- goal: z18.string().nullable(),
1806
- status: z18.string().optional(),
1807
- marked_safe: z18.boolean().nullable().optional(),
1808
- extra_info: z18.record(z18.unknown()).optional(),
1809
- threat: z18.boolean().nullable().optional(),
1810
- attack_type: z18.string().optional(),
1811
- multi_turn: z18.boolean().optional(),
1812
- asr: z18.number().nullable().optional(),
1813
- version: z18.number().int().nullable().optional(),
1814
- severity: z18.string().optional(),
1815
- outputs: z18.array(AttackMultiTurnOutputSchema).optional()
1816
- }).passthrough();
1817
- var SubCategoryStatsSchema = z18.object({
1818
- id: z18.string(),
1819
- display_name: z18.string(),
1820
- description: z18.string(),
1821
- preselect: z18.boolean().optional(),
1822
- prerequisites: z18.array(PrerequisiteModelSchema).nullable().optional(),
1823
- active: z18.boolean().optional(),
1824
- successful: z18.number().int(),
1825
- failed: z18.number().int(),
1826
- total: z18.number().int().optional()
1827
- }).passthrough();
1828
- var CategoryReportSchema = z18.object({
1829
- id: z18.string(),
1830
- display_name: z18.string(),
1831
- description: z18.string(),
1832
- preselect: z18.boolean().optional(),
1833
- sub_categories: z18.array(SubCategoryStatsSchema),
1834
- asr: z18.number(),
1835
- total_prompts: z18.number().int(),
1836
- total_attacks: z18.number().int(),
1837
- successful: z18.number().int(),
1838
- failed: z18.number().int()
1839
- }).passthrough();
1840
- var SeverityStatsSchema = z18.object({
1841
- severity: z18.string(),
1842
- successful: z18.number().int().optional(),
1843
- failed: z18.number().int().optional()
1844
- }).passthrough();
1845
- var SeverityReportSchema = z18.object({
1846
- stats: z18.array(SeverityStatsSchema),
1847
- successful: z18.number().int().optional(),
1848
- failed: z18.number().int().optional(),
1849
- total_attacks: z18.number().int().optional()
1850
- }).passthrough();
1851
- var ComplianceTechniqueSchema = z18.object({
1852
- id: z18.string(),
1853
- display_name: z18.string(),
1854
- compliance_id: z18.string(),
1855
- description: z18.string(),
1856
- link: z18.string(),
1857
- version: z18.string(),
1858
- active: z18.boolean(),
1859
- successful: z18.number().int().optional(),
1860
- failed: z18.number().int().optional(),
1861
- total: z18.number().int().optional()
1862
- }).passthrough();
1863
- var ComplianceReportSchema = z18.object({
1864
- id: z18.string(),
1865
- display_name: z18.string(),
1866
- description: z18.string(),
1867
- active: z18.boolean(),
1868
- version: z18.string(),
1869
- link: z18.string(),
1870
- techniques: z18.array(ComplianceTechniqueSchema),
1871
- score: z18.number().int().optional()
1872
- }).passthrough();
1873
- var RuntimeSecurityPolicySchema = z18.object({
1874
- policy_id: z18.string(),
1875
- display_name: z18.string(),
1876
- config: z18.record(z18.unknown())
1877
- }).passthrough();
1878
- var StaticJobRemediationSchema = z18.object({
1879
- remediation: z18.string(),
1880
- description: z18.string(),
1881
- mapping_remediation_id: z18.string().nullable().optional(),
1882
- subcategories: z18.array(z18.string()).nullable().optional(),
1883
- effectiveness: z18.number().int().optional(),
1884
- ease_of_implementation: z18.number().int().optional(),
1885
- priority: z18.number().int().optional(),
1886
- resource_links: z18.array(z18.string()).optional(),
1887
- categories: z18.array(z18.string()).nullable().optional()
1888
- }).passthrough();
1889
- var StaticJobRemediationRecommendationSchema = z18.object({
1890
- runtime_security_policy_configuration: z18.array(RuntimeSecurityPolicySchema).nullable().optional(),
1891
- other_measures: z18.array(StaticJobRemediationSchema).optional()
1892
- }).passthrough();
1893
- var StaticJobReportSchema = z18.object({
2115
+ data: z25.array(AttackListItemSchema)
2116
+ }).passthrough();
2117
+ var AttackDetailResponseSchema = z25.object({
2118
+ uuid: z25.string(),
2119
+ tsg_id: z25.string(),
2120
+ job_id: z25.string(),
2121
+ target_id: z25.string(),
2122
+ prompt: z25.string(),
2123
+ prompt_mapping_id: z25.string(),
2124
+ prompt_id: z25.string(),
2125
+ category: z25.string(),
2126
+ sub_category: z25.string(),
2127
+ category_display_name: z25.string(),
2128
+ sub_category_display_name: z25.string(),
2129
+ compliance_frameworks: z25.array(z25.unknown()),
2130
+ goal: z25.string().nullable(),
2131
+ status: z25.string().optional(),
2132
+ marked_safe: z25.boolean().nullable().optional(),
2133
+ extra_info: z25.record(z25.unknown()).optional(),
2134
+ threat: z25.boolean().nullable().optional(),
2135
+ attack_type: z25.string().optional(),
2136
+ multi_turn: z25.boolean().optional(),
2137
+ asr: z25.number().nullable().optional(),
2138
+ version: z25.number().int().nullable().optional(),
2139
+ severity: z25.string().optional(),
2140
+ outputs: z25.array(AttackOutputSchema).optional()
2141
+ }).passthrough();
2142
+ var AttackMultiTurnDetailResponseSchema = z25.object({
2143
+ uuid: z25.string(),
2144
+ tsg_id: z25.string(),
2145
+ job_id: z25.string(),
2146
+ target_id: z25.string(),
2147
+ prompt: z25.string(),
2148
+ prompt_mapping_id: z25.string(),
2149
+ prompt_id: z25.string(),
2150
+ category: z25.string(),
2151
+ sub_category: z25.string(),
2152
+ category_display_name: z25.string(),
2153
+ sub_category_display_name: z25.string(),
2154
+ compliance_frameworks: z25.array(z25.unknown()),
2155
+ goal: z25.string().nullable(),
2156
+ status: z25.string().optional(),
2157
+ marked_safe: z25.boolean().nullable().optional(),
2158
+ extra_info: z25.record(z25.unknown()).optional(),
2159
+ threat: z25.boolean().nullable().optional(),
2160
+ attack_type: z25.string().optional(),
2161
+ multi_turn: z25.boolean().optional(),
2162
+ asr: z25.number().nullable().optional(),
2163
+ version: z25.number().int().nullable().optional(),
2164
+ severity: z25.string().optional(),
2165
+ outputs: z25.array(AttackMultiTurnOutputSchema).optional()
2166
+ }).passthrough();
2167
+ var SubCategoryStatsSchema = z25.object({
2168
+ id: z25.string(),
2169
+ display_name: z25.string(),
2170
+ description: z25.string(),
2171
+ preselect: z25.boolean().optional(),
2172
+ prerequisites: z25.array(PrerequisiteModelSchema).nullable().optional(),
2173
+ active: z25.boolean().optional(),
2174
+ successful: z25.number().int(),
2175
+ failed: z25.number().int(),
2176
+ total: z25.number().int().optional()
2177
+ }).passthrough();
2178
+ var CategoryReportSchema = z25.object({
2179
+ id: z25.string(),
2180
+ display_name: z25.string(),
2181
+ description: z25.string(),
2182
+ preselect: z25.boolean().optional(),
2183
+ sub_categories: z25.array(SubCategoryStatsSchema),
2184
+ asr: z25.number(),
2185
+ total_prompts: z25.number().int(),
2186
+ total_attacks: z25.number().int(),
2187
+ successful: z25.number().int(),
2188
+ failed: z25.number().int()
2189
+ }).passthrough();
2190
+ var SeverityStatsSchema = z25.object({
2191
+ severity: z25.string(),
2192
+ successful: z25.number().int().optional(),
2193
+ failed: z25.number().int().optional()
2194
+ }).passthrough();
2195
+ var SeverityReportSchema = z25.object({
2196
+ stats: z25.array(SeverityStatsSchema),
2197
+ successful: z25.number().int().optional(),
2198
+ failed: z25.number().int().optional(),
2199
+ total_attacks: z25.number().int().optional()
2200
+ }).passthrough();
2201
+ var ComplianceTechniqueSchema = z25.object({
2202
+ id: z25.string(),
2203
+ display_name: z25.string(),
2204
+ compliance_id: z25.string(),
2205
+ description: z25.string(),
2206
+ link: z25.string(),
2207
+ version: z25.string(),
2208
+ active: z25.boolean(),
2209
+ successful: z25.number().int().optional(),
2210
+ failed: z25.number().int().optional(),
2211
+ total: z25.number().int().optional()
2212
+ }).passthrough();
2213
+ var ComplianceReportSchema = z25.object({
2214
+ id: z25.string(),
2215
+ display_name: z25.string(),
2216
+ description: z25.string(),
2217
+ active: z25.boolean(),
2218
+ version: z25.string(),
2219
+ link: z25.string(),
2220
+ techniques: z25.array(ComplianceTechniqueSchema),
2221
+ score: z25.number().int().optional()
2222
+ }).passthrough();
2223
+ var RuntimeSecurityPolicySchema = z25.object({
2224
+ policy_id: z25.string(),
2225
+ display_name: z25.string(),
2226
+ config: z25.record(z25.unknown())
2227
+ }).passthrough();
2228
+ var StaticJobRemediationSchema = z25.object({
2229
+ remediation: z25.string(),
2230
+ description: z25.string(),
2231
+ mapping_remediation_id: z25.string().nullable().optional(),
2232
+ subcategories: z25.array(z25.string()).nullable().optional(),
2233
+ effectiveness: z25.number().int().optional(),
2234
+ ease_of_implementation: z25.number().int().optional(),
2235
+ priority: z25.number().int().optional(),
2236
+ resource_links: z25.array(z25.string()).optional(),
2237
+ categories: z25.array(z25.string()).nullable().optional()
2238
+ }).passthrough();
2239
+ var StaticJobRemediationRecommendationSchema = z25.object({
2240
+ runtime_security_policy_configuration: z25.array(RuntimeSecurityPolicySchema).nullable().optional(),
2241
+ other_measures: z25.array(StaticJobRemediationSchema).optional()
2242
+ }).passthrough();
2243
+ var StaticJobReportSchema = z25.object({
1894
2244
  severity_report: SeverityReportSchema,
1895
- asr: z18.number().nullable().optional(),
1896
- score: z18.number().nullable().optional(),
2245
+ asr: z25.number().nullable().optional(),
2246
+ score: z25.number().nullable().optional(),
1897
2247
  security_report: CategoryReportSchema.nullable().optional(),
1898
2248
  safety_report: CategoryReportSchema.nullable().optional(),
1899
2249
  brand_report: CategoryReportSchema.nullable().optional(),
1900
- compliance_report: z18.array(ComplianceReportSchema).nullable().optional(),
1901
- report_summary: z18.string().nullable().optional(),
2250
+ compliance_report: z25.array(ComplianceReportSchema).nullable().optional(),
2251
+ report_summary: z25.string().nullable().optional(),
1902
2252
  recommendations: StaticJobRemediationRecommendationSchema.nullable().optional()
1903
2253
  }).passthrough();
1904
- var DynamicJobReportSchema = z18.object({
1905
- total_goals: z18.number().int().optional(),
1906
- total_streams: z18.number().int().optional(),
1907
- total_threats: z18.number().int().optional(),
1908
- goals_achieved: z18.number().int().optional(),
1909
- report_summary: z18.string().nullable().optional(),
1910
- score: z18.number().optional(),
1911
- asr: z18.number().optional()
1912
- }).passthrough();
1913
- var RemediationDetailSchema = z18.object({
1914
- remediation: z18.string(),
1915
- description: z18.string(),
1916
- resource_links: z18.array(z18.string()).optional(),
1917
- priority_level: z18.string().optional(),
1918
- ease_of_implementation_level: z18.string().optional(),
1919
- effectiveness_level: z18.string().optional()
1920
- }).passthrough();
1921
- var RemediationResponseSchema = z18.object({ remediations: z18.array(RemediationDetailSchema).optional() }).passthrough();
1922
- var RuntimeSecurityProfileResponseSchema = z18.object({
1923
- runtime_security_profile: z18.array(RuntimeSecurityPolicySchema).nullable().optional()
1924
- }).passthrough();
1925
- var GoalSchema = z18.object({
1926
- goal: z18.string(),
1927
- safe_response: z18.string(),
1928
- jailbroken_response: z18.string(),
1929
- goal_metadata: z18.record(z18.unknown()).optional(),
1930
- custom_goal: z18.boolean().optional(),
1931
- goal_type: z18.string().optional(),
1932
- uuid: z18.string(),
1933
- tsg_id: z18.string(),
1934
- job_id: z18.string(),
1935
- goal_to_show: z18.string().nullable().optional(),
1936
- threat: z18.boolean().optional(),
1937
- version: z18.number().int().nullable().optional(),
1938
- extra_info: z18.record(z18.unknown()).nullable().optional()
1939
- }).passthrough();
1940
- var GoalListResponseSchema = z18.object({ pagination: RedTeamPaginationSchema, data: z18.array(GoalSchema) }).passthrough();
1941
- var StreamIterationDataSchema = z18.object({
1942
- uuid: z18.string(),
1943
- tsg_id: z18.string(),
1944
- job_id: z18.string(),
1945
- stream_id: z18.string(),
1946
- goal_id: z18.string(),
1947
- iteration: z18.number().int(),
1948
- prompt: z18.string(),
1949
- techniques: z18.string(),
1950
- improvement: z18.string(),
1951
- prompts_objective: z18.string(),
1952
- summary: z18.string(),
1953
- output: z18.string().nullable().optional(),
1954
- score: z18.number().int().nullable().optional(),
1955
- judge_reasoning: z18.string().nullable().optional(),
1956
- threat: z18.boolean().optional(),
1957
- created_at: z18.string().nullable().optional(),
1958
- updated_at: z18.string().nullable().optional(),
1959
- extra_info: z18.record(z18.unknown()).nullable().optional(),
1960
- version: z18.number().int().nullable().optional()
1961
- }).passthrough();
1962
- var StreamDetailResponseSchema = z18.object({
1963
- uuid: z18.string(),
1964
- tsg_id: z18.string(),
1965
- job_id: z18.string(),
1966
- target_id: z18.string(),
1967
- goal_id: z18.string(),
1968
- stream_idx: z18.number().int().optional(),
1969
- iteration: z18.number().int().optional(),
1970
- goal: z18.unknown().optional(),
1971
- marked_safe: z18.boolean().optional(),
1972
- stream_type: z18.string().nullable().optional(),
1973
- threat: z18.boolean().optional(),
2254
+ var DynamicJobReportSchema = z25.object({
2255
+ total_goals: z25.number().int().optional(),
2256
+ total_streams: z25.number().int().optional(),
2257
+ total_threats: z25.number().int().optional(),
2258
+ goals_achieved: z25.number().int().optional(),
2259
+ report_summary: z25.string().nullable().optional(),
2260
+ score: z25.number().optional(),
2261
+ asr: z25.number().optional()
2262
+ }).passthrough();
2263
+ var RemediationDetailSchema = z25.object({
2264
+ remediation: z25.string(),
2265
+ description: z25.string(),
2266
+ resource_links: z25.array(z25.string()).optional(),
2267
+ priority_level: z25.string().optional(),
2268
+ ease_of_implementation_level: z25.string().optional(),
2269
+ effectiveness_level: z25.string().optional()
2270
+ }).passthrough();
2271
+ var RemediationResponseSchema = z25.object({ remediations: z25.array(RemediationDetailSchema).optional() }).passthrough();
2272
+ var RuntimeSecurityProfileResponseSchema = z25.object({
2273
+ runtime_security_profile: z25.array(RuntimeSecurityPolicySchema).nullable().optional()
2274
+ }).passthrough();
2275
+ var GoalSchema = z25.object({
2276
+ goal: z25.string(),
2277
+ safe_response: z25.string(),
2278
+ jailbroken_response: z25.string(),
2279
+ goal_metadata: z25.record(z25.unknown()).optional(),
2280
+ custom_goal: z25.boolean().optional(),
2281
+ goal_type: z25.string().optional(),
2282
+ uuid: z25.string(),
2283
+ tsg_id: z25.string(),
2284
+ job_id: z25.string(),
2285
+ goal_to_show: z25.string().nullable().optional(),
2286
+ threat: z25.boolean().optional(),
2287
+ version: z25.number().int().nullable().optional(),
2288
+ extra_info: z25.record(z25.unknown()).nullable().optional()
2289
+ }).passthrough();
2290
+ var GoalListResponseSchema = z25.object({ pagination: RedTeamPaginationSchema, data: z25.array(GoalSchema) }).passthrough();
2291
+ var StreamIterationDataSchema = z25.object({
2292
+ uuid: z25.string(),
2293
+ tsg_id: z25.string(),
2294
+ job_id: z25.string(),
2295
+ stream_id: z25.string(),
2296
+ goal_id: z25.string(),
2297
+ iteration: z25.number().int(),
2298
+ prompt: z25.string(),
2299
+ techniques: z25.string(),
2300
+ improvement: z25.string(),
2301
+ prompts_objective: z25.string(),
2302
+ summary: z25.string(),
2303
+ output: z25.string().nullable().optional(),
2304
+ score: z25.number().int().nullable().optional(),
2305
+ judge_reasoning: z25.string().nullable().optional(),
2306
+ threat: z25.boolean().optional(),
2307
+ created_at: z25.string().nullable().optional(),
2308
+ updated_at: z25.string().nullable().optional(),
2309
+ extra_info: z25.record(z25.unknown()).nullable().optional(),
2310
+ version: z25.number().int().nullable().optional()
2311
+ }).passthrough();
2312
+ var StreamDetailResponseSchema = z25.object({
2313
+ uuid: z25.string(),
2314
+ tsg_id: z25.string(),
2315
+ job_id: z25.string(),
2316
+ target_id: z25.string(),
2317
+ goal_id: z25.string(),
2318
+ stream_idx: z25.number().int().optional(),
2319
+ iteration: z25.number().int().optional(),
2320
+ goal: z25.unknown().optional(),
2321
+ marked_safe: z25.boolean().optional(),
2322
+ stream_type: z25.string().nullable().optional(),
2323
+ threat: z25.boolean().optional(),
1974
2324
  first_threat_iteration: StreamIterationDataSchema.nullable().optional(),
1975
- created_at: z18.string().nullable().optional(),
1976
- updated_at: z18.string().nullable().optional(),
1977
- extra_info: z18.record(z18.unknown()).optional(),
1978
- version: z18.number().int().nullable().optional(),
1979
- iterations: z18.array(StreamIterationDataSchema).optional()
1980
- }).passthrough();
1981
- var StreamListResponseSchema = z18.object({ pagination: RedTeamPaginationSchema, data: z18.array(StreamDetailResponseSchema) }).passthrough();
1982
- var CustomAttackOutputSchema = z18.object({
1983
- uuid: z18.string(),
1984
- tsg_id: z18.string(),
1985
- custom_attack_id: z18.string(),
1986
- job_id: z18.string(),
1987
- target_id: z18.string(),
1988
- output: z18.string(),
1989
- threat: z18.boolean().nullable().optional(),
1990
- marked_safe: z18.boolean().nullable().optional()
1991
- }).passthrough();
1992
- var PropertyAssignmentSchema = z18.object({
1993
- name: z18.string(),
1994
- value: z18.string()
2325
+ created_at: z25.string().nullable().optional(),
2326
+ updated_at: z25.string().nullable().optional(),
2327
+ extra_info: z25.record(z25.unknown()).optional(),
2328
+ version: z25.number().int().nullable().optional(),
2329
+ iterations: z25.array(StreamIterationDataSchema).optional()
2330
+ }).passthrough();
2331
+ var StreamListResponseSchema = z25.object({ pagination: RedTeamPaginationSchema, data: z25.array(StreamDetailResponseSchema) }).passthrough();
2332
+ var CustomAttackOutputSchema = z25.object({
2333
+ uuid: z25.string(),
2334
+ tsg_id: z25.string(),
2335
+ custom_attack_id: z25.string(),
2336
+ job_id: z25.string(),
2337
+ target_id: z25.string(),
2338
+ output: z25.string(),
2339
+ threat: z25.boolean().nullable().optional(),
2340
+ marked_safe: z25.boolean().nullable().optional()
2341
+ }).passthrough();
2342
+ var PropertyAssignmentSchema = z25.object({
2343
+ name: z25.string(),
2344
+ value: z25.string()
1995
2345
  });
1996
- var PropertyValueStatisticSchema = z18.object({
1997
- value: z18.string(),
1998
- successful_attack_count: z18.number().int(),
1999
- total_attack_count: z18.number().int(),
2000
- success_rate: z18.number()
2346
+ var PropertyValueStatisticSchema = z25.object({
2347
+ value: z25.string(),
2348
+ successful_attack_count: z25.number().int(),
2349
+ total_attack_count: z25.number().int(),
2350
+ success_rate: z25.number()
2001
2351
  });
2002
- var PropertyStatisticSchema = z18.object({
2003
- property_name: z18.string(),
2004
- values: z18.array(PropertyValueStatisticSchema)
2352
+ var PropertyStatisticSchema = z25.object({
2353
+ property_name: z25.string(),
2354
+ values: z25.array(PropertyValueStatisticSchema)
2005
2355
  });
2006
- var PromptSetSummarySchema = z18.object({
2007
- prompt_set_id: z18.string(),
2008
- prompt_set_name: z18.string(),
2009
- total_prompts: z18.number().int(),
2010
- total_attacks: z18.number().int(),
2011
- total_threats: z18.number().int(),
2012
- failed_attacks: z18.number().int(),
2013
- threat_rate: z18.number(),
2014
- property_names: z18.array(z18.string()).optional(),
2015
- property_statistics: z18.array(PropertyStatisticSchema).optional()
2016
- }).passthrough();
2017
- var CustomAttackReportResponseSchema = z18.object({
2018
- total_prompts: z18.number().int(),
2019
- total_attacks: z18.number().int(),
2020
- total_threats: z18.number().int(),
2021
- failed_attacks: z18.number().int(),
2022
- score: z18.number(),
2023
- asr: z18.number(),
2024
- custom_attack_reports: z18.array(PromptSetSummarySchema).optional(),
2025
- property_statistics: z18.array(PropertyStatisticSchema).optional()
2026
- }).passthrough();
2027
- var PromptSetsReportResponseSchema = z18.object({
2028
- prompt_sets: z18.array(PromptSetSummarySchema),
2029
- total_prompt_sets: z18.number().int(),
2030
- applied_filters: z18.record(z18.unknown()).optional()
2031
- }).passthrough();
2032
- var PromptDetailResponseSchema = z18.object({
2033
- prompt_id: z18.string(),
2034
- prompt_text: z18.string(),
2035
- goal: z18.string().nullable().optional(),
2036
- user_defined_goal: z18.boolean().optional(),
2037
- properties: z18.array(PropertyAssignmentSchema).optional(),
2038
- attack_id: z18.string().nullable().optional(),
2039
- threat: z18.boolean().nullable().optional(),
2040
- attack_outputs: z18.array(CustomAttackOutputSchema).optional(),
2041
- asr: z18.number().nullable().optional(),
2042
- prompt_set_id: z18.string().nullable().optional(),
2043
- prompt_set_name: z18.string().nullable().optional()
2044
- }).passthrough();
2045
- var CustomAttacksListResponseSchema = z18.object({
2356
+ var PromptSetSummarySchema = z25.object({
2357
+ prompt_set_id: z25.string(),
2358
+ prompt_set_name: z25.string(),
2359
+ total_prompts: z25.number().int(),
2360
+ total_attacks: z25.number().int(),
2361
+ total_threats: z25.number().int(),
2362
+ failed_attacks: z25.number().int(),
2363
+ threat_rate: z25.number(),
2364
+ property_names: z25.array(z25.string()).optional(),
2365
+ property_statistics: z25.array(PropertyStatisticSchema).optional()
2366
+ }).passthrough();
2367
+ var CustomAttackReportResponseSchema = z25.object({
2368
+ total_prompts: z25.number().int(),
2369
+ total_attacks: z25.number().int(),
2370
+ total_threats: z25.number().int(),
2371
+ failed_attacks: z25.number().int(),
2372
+ score: z25.number(),
2373
+ asr: z25.number(),
2374
+ custom_attack_reports: z25.array(PromptSetSummarySchema).optional(),
2375
+ property_statistics: z25.array(PropertyStatisticSchema).optional()
2376
+ }).passthrough();
2377
+ var PromptSetsReportResponseSchema = z25.object({
2378
+ prompt_sets: z25.array(PromptSetSummarySchema),
2379
+ total_prompt_sets: z25.number().int(),
2380
+ applied_filters: z25.record(z25.unknown()).optional()
2381
+ }).passthrough();
2382
+ var PromptDetailResponseSchema = z25.object({
2383
+ prompt_id: z25.string(),
2384
+ prompt_text: z25.string(),
2385
+ goal: z25.string().nullable().optional(),
2386
+ user_defined_goal: z25.boolean().optional(),
2387
+ properties: z25.array(PropertyAssignmentSchema).optional(),
2388
+ attack_id: z25.string().nullable().optional(),
2389
+ threat: z25.boolean().nullable().optional(),
2390
+ attack_outputs: z25.array(CustomAttackOutputSchema).optional(),
2391
+ asr: z25.number().nullable().optional(),
2392
+ prompt_set_id: z25.string().nullable().optional(),
2393
+ prompt_set_name: z25.string().nullable().optional()
2394
+ }).passthrough();
2395
+ var CustomAttacksListResponseSchema = z25.object({
2046
2396
  pagination: RedTeamPaginationSchema,
2047
- data: z18.array(z18.unknown()),
2048
- total_attacks: z18.number().int(),
2049
- total_threats: z18.number().int()
2050
- }).passthrough();
2051
- var RiskLevelSchema = z18.object({
2052
- risk_rating: z18.string(),
2053
- total: z18.number().int(),
2054
- targets_by_type: z18.array(CountByNameSchema).optional()
2055
- }).passthrough();
2056
- var ScanStatisticsResponseSchema = z18.object({
2057
- total_scans: z18.number().int(),
2058
- targets_scanned: z18.number().int(),
2059
- targets_scanned_by_type: z18.array(CountByNameSchema).optional(),
2060
- scan_status: z18.array(CountByNameSchema).optional(),
2061
- risk_profile: z18.array(RiskLevelSchema).optional()
2062
- }).passthrough();
2063
- var ScoreTrendSeriesSchema = z18.object({
2064
- label: z18.string(),
2065
- data: z18.array(z18.number().nullable())
2397
+ data: z25.array(z25.unknown()),
2398
+ total_attacks: z25.number().int(),
2399
+ total_threats: z25.number().int()
2400
+ }).passthrough();
2401
+ var RiskLevelSchema = z25.object({
2402
+ risk_rating: z25.string(),
2403
+ total: z25.number().int(),
2404
+ targets_by_type: z25.array(CountByNameSchema).optional()
2405
+ }).passthrough();
2406
+ var ScanStatisticsResponseSchema = z25.object({
2407
+ total_scans: z25.number().int(),
2408
+ targets_scanned: z25.number().int(),
2409
+ targets_scanned_by_type: z25.array(CountByNameSchema).optional(),
2410
+ scan_status: z25.array(CountByNameSchema).optional(),
2411
+ risk_profile: z25.array(RiskLevelSchema).optional()
2412
+ }).passthrough();
2413
+ var ScoreTrendSeriesSchema = z25.object({
2414
+ label: z25.string(),
2415
+ data: z25.array(z25.number().nullable())
2066
2416
  });
2067
- var ScoreTrendResponseSchema = z18.object({
2068
- labels: z18.array(z18.string()),
2069
- series: z18.array(ScoreTrendSeriesSchema)
2417
+ var ScoreTrendResponseSchema = z25.object({
2418
+ labels: z25.array(z25.string()),
2419
+ series: z25.array(ScoreTrendSeriesSchema)
2070
2420
  });
2071
- var SentimentRequestSchema = z18.object({
2072
- job_id: z18.string(),
2073
- up_vote: z18.boolean().optional(),
2074
- down_vote: z18.boolean().optional()
2421
+ var SentimentRequestSchema = z25.object({
2422
+ job_id: z25.string(),
2423
+ up_vote: z25.boolean().optional(),
2424
+ down_vote: z25.boolean().optional()
2075
2425
  });
2076
- var SentimentResponseSchema = z18.object({
2077
- job_id: z18.string(),
2078
- up_vote: z18.boolean().optional(),
2079
- down_vote: z18.boolean().optional()
2080
- }).passthrough();
2081
- var QuotaDetailsSchema = z18.object({
2082
- allocated: z18.number().int(),
2083
- unlimited: z18.boolean(),
2084
- consumed: z18.number().int()
2426
+ var SentimentResponseSchema = z25.object({
2427
+ job_id: z25.string(),
2428
+ up_vote: z25.boolean().optional(),
2429
+ down_vote: z25.boolean().optional()
2430
+ }).passthrough();
2431
+ var QuotaDetailsSchema = z25.object({
2432
+ allocated: z25.number().int(),
2433
+ unlimited: z25.boolean(),
2434
+ consumed: z25.number().int()
2085
2435
  });
2086
- var QuotaSummarySchema = z18.object({
2436
+ var QuotaSummarySchema = z25.object({
2087
2437
  static: QuotaDetailsSchema,
2088
2438
  dynamic: QuotaDetailsSchema,
2089
2439
  custom: QuotaDetailsSchema
2090
2440
  });
2091
- var ErrorLogSchema = z18.object({
2092
- created_at: z18.string(),
2093
- updated_at: z18.string(),
2094
- job_id: z18.string().nullable().optional(),
2095
- target_id: z18.string().nullable().optional(),
2096
- target_version: z18.number().int().nullable().optional(),
2097
- attack_id: z18.string().nullable().optional(),
2098
- error_type: z18.string().nullable().optional(),
2099
- error_source: z18.string().nullable().optional(),
2100
- error_message: z18.string().nullable().optional(),
2101
- target_object: z18.record(z18.unknown()).nullable().optional(),
2102
- extra_info: z18.record(z18.unknown()).nullable().optional(),
2103
- version: z18.number().int().optional()
2104
- }).passthrough();
2105
- var ErrorLogListResponseSchema = z18.object({ pagination: RedTeamPaginationSchema, data: z18.array(ErrorLogSchema) }).passthrough();
2106
- var TargetCreateRequestSchema = z18.object({
2107
- name: z18.string(),
2108
- description: z18.unknown().optional(),
2109
- target_type: z18.unknown().optional(),
2110
- connection_type: z18.unknown().optional(),
2111
- api_endpoint_type: z18.unknown().optional(),
2112
- response_mode: z18.unknown().optional(),
2113
- connection_params: z18.unknown().optional(),
2114
- session_supported: z18.boolean().optional(),
2115
- target_metadata: z18.unknown().optional(),
2116
- target_background: z18.unknown().optional(),
2117
- additional_context: z18.unknown().optional(),
2118
- extra_info: z18.unknown().optional(),
2119
- network_broker_channel_uuid: z18.unknown().optional()
2120
- }).passthrough();
2121
- var TargetUpdateRequestSchema = z18.object({
2122
- name: z18.string(),
2123
- description: z18.unknown().optional(),
2124
- target_type: z18.unknown().optional(),
2125
- connection_type: z18.unknown().optional(),
2126
- api_endpoint_type: z18.unknown().optional(),
2127
- response_mode: z18.unknown().optional(),
2128
- connection_params: z18.unknown().optional(),
2129
- session_supported: z18.boolean().optional(),
2130
- target_metadata: z18.unknown().optional(),
2131
- target_background: z18.unknown().optional(),
2132
- additional_context: z18.unknown().optional(),
2133
- extra_info: z18.unknown().optional(),
2134
- network_broker_channel_uuid: z18.unknown().optional()
2135
- }).passthrough();
2136
- var TargetContextUpdateSchema = z18.object({
2137
- target_background: z18.unknown().optional(),
2138
- additional_context: z18.unknown().optional()
2139
- }).passthrough();
2140
- var TargetResponseSchema = z18.object({
2141
- uuid: z18.string(),
2142
- tsg_id: z18.string(),
2143
- name: z18.string(),
2144
- status: z18.unknown(),
2145
- active: z18.boolean(),
2146
- validated: z18.boolean(),
2147
- created_at: z18.string(),
2148
- updated_at: z18.string(),
2149
- description: z18.unknown().optional(),
2150
- target_type: z18.unknown().optional(),
2151
- connection_type: z18.unknown().optional(),
2152
- api_endpoint_type: z18.unknown().optional(),
2153
- response_mode: z18.unknown().optional(),
2154
- session_supported: z18.boolean().optional(),
2155
- extra_info: z18.unknown().optional(),
2156
- version: z18.unknown().optional(),
2157
- secret_version: z18.unknown().optional(),
2158
- created_by_user_id: z18.unknown().optional(),
2159
- updated_by_user_id: z18.unknown().optional(),
2160
- target_metadata: z18.unknown().optional(),
2161
- target_background: z18.unknown().optional(),
2162
- profiling_status: z18.unknown().optional(),
2163
- additional_context: z18.unknown().optional()
2164
- }).passthrough();
2165
- var TargetListItemSchema = z18.object({
2166
- uuid: z18.string(),
2167
- tsg_id: z18.string(),
2168
- name: z18.string(),
2169
- status: z18.unknown(),
2170
- active: z18.boolean(),
2171
- validated: z18.boolean(),
2172
- created_at: z18.string(),
2173
- updated_at: z18.string(),
2174
- description: z18.unknown().optional(),
2175
- target_type: z18.unknown().optional(),
2176
- connection_type: z18.unknown().optional(),
2177
- api_endpoint_type: z18.unknown().optional(),
2178
- response_mode: z18.unknown().optional(),
2179
- session_supported: z18.boolean().optional(),
2180
- extra_info: z18.unknown().optional(),
2181
- version: z18.unknown().optional(),
2182
- secret_version: z18.unknown().optional(),
2183
- created_by_user_id: z18.unknown().optional(),
2184
- updated_by_user_id: z18.unknown().optional()
2185
- }).passthrough();
2186
- var TargetListSchema = z18.object({ pagination: RedTeamPaginationSchema, data: z18.array(TargetListItemSchema).optional() }).passthrough();
2187
- var TargetProbeRequestSchema = z18.object({
2188
- name: z18.string(),
2189
- uuid: z18.unknown().optional(),
2190
- description: z18.unknown().optional(),
2191
- target_type: z18.unknown().optional(),
2192
- connection_type: z18.unknown().optional(),
2193
- api_endpoint_type: z18.unknown().optional(),
2194
- response_mode: z18.unknown().optional(),
2195
- connection_params: z18.unknown().optional(),
2196
- session_supported: z18.boolean().optional(),
2197
- target_metadata: z18.unknown().optional(),
2198
- target_background: z18.unknown().optional(),
2199
- additional_context: z18.unknown().optional(),
2200
- extra_info: z18.unknown().optional(),
2201
- network_broker_channel_uuid: z18.unknown().optional(),
2202
- probe_fields: z18.unknown().optional()
2203
- }).passthrough();
2204
- var TargetProfileResponseSchema = z18.object({
2205
- target_id: z18.string(),
2206
- target_version: z18.number().int(),
2207
- status: z18.string(),
2208
- profiling_status: z18.unknown().optional(),
2209
- target_background: z18.unknown().optional(),
2210
- additional_context: z18.unknown().optional(),
2211
- ai_generated_fields: z18.unknown().optional(),
2212
- other_details: z18.unknown().optional()
2213
- }).passthrough();
2214
- var BaseResponseSchema = z18.object({
2215
- message: z18.string(),
2216
- status: z18.number().int()
2441
+ var ErrorLogSchema = z25.object({
2442
+ created_at: z25.string(),
2443
+ updated_at: z25.string(),
2444
+ job_id: z25.string().nullable().optional(),
2445
+ target_id: z25.string().nullable().optional(),
2446
+ target_version: z25.number().int().nullable().optional(),
2447
+ attack_id: z25.string().nullable().optional(),
2448
+ error_type: z25.string().nullable().optional(),
2449
+ error_source: z25.string().nullable().optional(),
2450
+ error_message: z25.string().nullable().optional(),
2451
+ target_object: z25.record(z25.unknown()).nullable().optional(),
2452
+ extra_info: z25.record(z25.unknown()).nullable().optional(),
2453
+ version: z25.number().int().optional()
2454
+ }).passthrough();
2455
+ var ErrorLogListResponseSchema = z25.object({ pagination: RedTeamPaginationSchema, data: z25.array(ErrorLogSchema) }).passthrough();
2456
+ var TargetCreateRequestSchema = z25.object({
2457
+ name: z25.string(),
2458
+ description: z25.unknown().optional(),
2459
+ target_type: z25.unknown().optional(),
2460
+ connection_type: z25.unknown().optional(),
2461
+ api_endpoint_type: z25.unknown().optional(),
2462
+ response_mode: z25.unknown().optional(),
2463
+ connection_params: z25.unknown().optional(),
2464
+ session_supported: z25.boolean().optional(),
2465
+ target_metadata: z25.unknown().optional(),
2466
+ target_background: z25.unknown().optional(),
2467
+ additional_context: z25.unknown().optional(),
2468
+ extra_info: z25.unknown().optional(),
2469
+ network_broker_channel_uuid: z25.unknown().optional()
2470
+ }).passthrough();
2471
+ var TargetUpdateRequestSchema = z25.object({
2472
+ name: z25.string(),
2473
+ description: z25.unknown().optional(),
2474
+ target_type: z25.unknown().optional(),
2475
+ connection_type: z25.unknown().optional(),
2476
+ api_endpoint_type: z25.unknown().optional(),
2477
+ response_mode: z25.unknown().optional(),
2478
+ connection_params: z25.unknown().optional(),
2479
+ session_supported: z25.boolean().optional(),
2480
+ target_metadata: z25.unknown().optional(),
2481
+ target_background: z25.unknown().optional(),
2482
+ additional_context: z25.unknown().optional(),
2483
+ extra_info: z25.unknown().optional(),
2484
+ network_broker_channel_uuid: z25.unknown().optional()
2485
+ }).passthrough();
2486
+ var TargetContextUpdateSchema = z25.object({
2487
+ target_background: z25.unknown().optional(),
2488
+ additional_context: z25.unknown().optional()
2489
+ }).passthrough();
2490
+ var TargetResponseSchema = z25.object({
2491
+ uuid: z25.string(),
2492
+ tsg_id: z25.string(),
2493
+ name: z25.string(),
2494
+ status: z25.unknown(),
2495
+ active: z25.boolean(),
2496
+ validated: z25.boolean(),
2497
+ created_at: z25.string(),
2498
+ updated_at: z25.string(),
2499
+ description: z25.unknown().optional(),
2500
+ target_type: z25.unknown().optional(),
2501
+ connection_type: z25.unknown().optional(),
2502
+ api_endpoint_type: z25.unknown().optional(),
2503
+ response_mode: z25.unknown().optional(),
2504
+ session_supported: z25.boolean().optional(),
2505
+ extra_info: z25.unknown().optional(),
2506
+ version: z25.unknown().optional(),
2507
+ secret_version: z25.unknown().optional(),
2508
+ created_by_user_id: z25.unknown().optional(),
2509
+ updated_by_user_id: z25.unknown().optional(),
2510
+ target_metadata: z25.unknown().optional(),
2511
+ target_background: z25.unknown().optional(),
2512
+ profiling_status: z25.unknown().optional(),
2513
+ additional_context: z25.unknown().optional()
2514
+ }).passthrough();
2515
+ var TargetListItemSchema = z25.object({
2516
+ uuid: z25.string(),
2517
+ tsg_id: z25.string(),
2518
+ name: z25.string(),
2519
+ status: z25.unknown(),
2520
+ active: z25.boolean(),
2521
+ validated: z25.boolean(),
2522
+ created_at: z25.string(),
2523
+ updated_at: z25.string(),
2524
+ description: z25.unknown().optional(),
2525
+ target_type: z25.unknown().optional(),
2526
+ connection_type: z25.unknown().optional(),
2527
+ api_endpoint_type: z25.unknown().optional(),
2528
+ response_mode: z25.unknown().optional(),
2529
+ session_supported: z25.boolean().optional(),
2530
+ extra_info: z25.unknown().optional(),
2531
+ version: z25.unknown().optional(),
2532
+ secret_version: z25.unknown().optional(),
2533
+ created_by_user_id: z25.unknown().optional(),
2534
+ updated_by_user_id: z25.unknown().optional()
2535
+ }).passthrough();
2536
+ var TargetListSchema = z25.object({ pagination: RedTeamPaginationSchema, data: z25.array(TargetListItemSchema).optional() }).passthrough();
2537
+ var TargetProbeRequestSchema = z25.object({
2538
+ name: z25.string(),
2539
+ uuid: z25.unknown().optional(),
2540
+ description: z25.unknown().optional(),
2541
+ target_type: z25.unknown().optional(),
2542
+ connection_type: z25.unknown().optional(),
2543
+ api_endpoint_type: z25.unknown().optional(),
2544
+ response_mode: z25.unknown().optional(),
2545
+ connection_params: z25.unknown().optional(),
2546
+ session_supported: z25.boolean().optional(),
2547
+ target_metadata: z25.unknown().optional(),
2548
+ target_background: z25.unknown().optional(),
2549
+ additional_context: z25.unknown().optional(),
2550
+ extra_info: z25.unknown().optional(),
2551
+ network_broker_channel_uuid: z25.unknown().optional(),
2552
+ probe_fields: z25.unknown().optional()
2553
+ }).passthrough();
2554
+ var TargetProfileResponseSchema = z25.object({
2555
+ target_id: z25.string(),
2556
+ target_version: z25.number().int(),
2557
+ status: z25.string(),
2558
+ profiling_status: z25.unknown().optional(),
2559
+ target_background: z25.unknown().optional(),
2560
+ additional_context: z25.unknown().optional(),
2561
+ ai_generated_fields: z25.unknown().optional(),
2562
+ other_details: z25.unknown().optional()
2563
+ }).passthrough();
2564
+ var BaseResponseSchema = z25.object({
2565
+ message: z25.string(),
2566
+ status: z25.number().int()
2217
2567
  });
2218
- var PromptSetStatsSchema = z18.object({
2219
- total_prompts: z18.number().int(),
2220
- active_prompts: z18.number().int(),
2221
- inactive_prompts: z18.number().int(),
2222
- failed_prompts: z18.number().int().optional(),
2223
- validation_prompts: z18.number().int().optional()
2224
- }).passthrough();
2225
- var CustomPromptSetCreateRequestSchema = z18.object({
2226
- name: z18.string(),
2227
- description: z18.unknown().optional(),
2228
- property_names: z18.array(z18.string()).optional()
2568
+ var PromptSetStatsSchema = z25.object({
2569
+ total_prompts: z25.number().int(),
2570
+ active_prompts: z25.number().int(),
2571
+ inactive_prompts: z25.number().int(),
2572
+ failed_prompts: z25.number().int().optional(),
2573
+ validation_prompts: z25.number().int().optional()
2574
+ }).passthrough();
2575
+ var CustomPromptSetCreateRequestSchema = z25.object({
2576
+ name: z25.string(),
2577
+ description: z25.unknown().optional(),
2578
+ property_names: z25.array(z25.string()).optional()
2229
2579
  });
2230
- var CustomPromptSetUpdateRequestSchema = z18.object({
2231
- name: z18.unknown().optional(),
2232
- description: z18.unknown().optional(),
2233
- archive: z18.unknown().optional(),
2234
- property_names: z18.unknown().optional()
2235
- }).passthrough();
2236
- var CustomPromptSetArchiveRequestSchema = z18.object({ archive: z18.boolean() });
2237
- var CustomPromptSetResponseSchema = z18.object({
2238
- uuid: z18.string(),
2239
- name: z18.string(),
2240
- active: z18.boolean(),
2241
- archive: z18.boolean(),
2242
- status: z18.string(),
2243
- created_at: z18.string(),
2244
- updated_at: z18.string(),
2245
- description: z18.unknown().optional(),
2246
- property_names: z18.array(z18.string()).optional(),
2247
- properties: z18.array(z18.unknown()).optional(),
2248
- stats: z18.unknown().optional(),
2249
- extra_info: z18.unknown().optional(),
2250
- version: z18.unknown().optional(),
2251
- created_by_user_id: z18.unknown().optional(),
2252
- updated_by_user_id: z18.unknown().optional()
2253
- }).passthrough();
2254
- var CustomPromptSetListItemSchema = z18.object({
2255
- uuid: z18.string(),
2256
- name: z18.string(),
2257
- active: z18.boolean(),
2258
- archive: z18.boolean(),
2259
- status: z18.string(),
2260
- created_at: z18.string(),
2261
- updated_at: z18.string(),
2262
- description: z18.unknown().optional(),
2263
- property_names: z18.array(z18.string()).optional(),
2264
- stats: z18.unknown().optional(),
2265
- created_by_user_id: z18.unknown().optional()
2266
- }).passthrough();
2267
- var CustomPromptSetListSchema = z18.object({
2580
+ var CustomPromptSetUpdateRequestSchema = z25.object({
2581
+ name: z25.unknown().optional(),
2582
+ description: z25.unknown().optional(),
2583
+ archive: z25.unknown().optional(),
2584
+ property_names: z25.unknown().optional()
2585
+ }).passthrough();
2586
+ var CustomPromptSetArchiveRequestSchema = z25.object({ archive: z25.boolean() });
2587
+ var CustomPromptSetResponseSchema = z25.object({
2588
+ uuid: z25.string(),
2589
+ name: z25.string(),
2590
+ active: z25.boolean(),
2591
+ archive: z25.boolean(),
2592
+ status: z25.string(),
2593
+ created_at: z25.string(),
2594
+ updated_at: z25.string(),
2595
+ description: z25.unknown().optional(),
2596
+ property_names: z25.array(z25.string()).optional(),
2597
+ properties: z25.array(z25.unknown()).optional(),
2598
+ stats: z25.unknown().optional(),
2599
+ extra_info: z25.unknown().optional(),
2600
+ version: z25.unknown().optional(),
2601
+ created_by_user_id: z25.unknown().optional(),
2602
+ updated_by_user_id: z25.unknown().optional()
2603
+ }).passthrough();
2604
+ var CustomPromptSetListItemSchema = z25.object({
2605
+ uuid: z25.string(),
2606
+ name: z25.string(),
2607
+ active: z25.boolean(),
2608
+ archive: z25.boolean(),
2609
+ status: z25.string(),
2610
+ created_at: z25.string(),
2611
+ updated_at: z25.string(),
2612
+ description: z25.unknown().optional(),
2613
+ property_names: z25.array(z25.string()).optional(),
2614
+ stats: z25.unknown().optional(),
2615
+ created_by_user_id: z25.unknown().optional()
2616
+ }).passthrough();
2617
+ var CustomPromptSetListSchema = z25.object({
2268
2618
  pagination: RedTeamPaginationSchema,
2269
- data: z18.array(CustomPromptSetListItemSchema).optional()
2270
- }).passthrough();
2271
- var CustomPromptSetListActiveSchema = z18.object({ data: z18.array(CustomPromptSetListItemSchema).optional() }).passthrough();
2272
- var CustomPromptSetReferenceSchema = z18.object({
2273
- uuid: z18.string(),
2274
- name: z18.string(),
2275
- status: z18.string(),
2276
- active: z18.boolean(),
2277
- tsg_id: z18.string(),
2278
- created_at: z18.string(),
2279
- updated_at: z18.string(),
2280
- version: z18.unknown().optional()
2281
- }).passthrough();
2282
- var CustomPromptSetVersionInfoSchema = z18.object({
2283
- uuid: z18.string(),
2284
- status: z18.string(),
2285
- is_latest: z18.boolean(),
2286
- version: z18.string().nullable().optional(),
2619
+ data: z25.array(CustomPromptSetListItemSchema).optional()
2620
+ }).passthrough();
2621
+ var CustomPromptSetListActiveSchema = z25.object({ data: z25.array(CustomPromptSetListItemSchema).optional() }).passthrough();
2622
+ var CustomPromptSetReferenceSchema = z25.object({
2623
+ uuid: z25.string(),
2624
+ name: z25.string(),
2625
+ status: z25.string(),
2626
+ active: z25.boolean(),
2627
+ tsg_id: z25.string(),
2628
+ created_at: z25.string(),
2629
+ updated_at: z25.string(),
2630
+ version: z25.unknown().optional()
2631
+ }).passthrough();
2632
+ var CustomPromptSetVersionInfoSchema = z25.object({
2633
+ uuid: z25.string(),
2634
+ status: z25.string(),
2635
+ is_latest: z25.boolean(),
2636
+ version: z25.string().nullable().optional(),
2287
2637
  stats: PromptSetStatsSchema.nullable().optional(),
2288
- snapshot_created_at: z18.string().nullable().optional()
2638
+ snapshot_created_at: z25.string().nullable().optional()
2289
2639
  }).passthrough();
2290
- var CustomPromptCreateRequestSchema = z18.object({
2291
- prompt: z18.string(),
2292
- prompt_set_id: z18.string(),
2293
- goal: z18.unknown().optional(),
2294
- properties: z18.unknown().optional()
2640
+ var CustomPromptCreateRequestSchema = z25.object({
2641
+ prompt: z25.string(),
2642
+ prompt_set_id: z25.string(),
2643
+ goal: z25.unknown().optional(),
2644
+ properties: z25.unknown().optional()
2295
2645
  });
2296
- var CustomPromptUpdateRequestSchema = z18.object({
2297
- prompt: z18.unknown().optional(),
2298
- goal: z18.unknown().optional(),
2299
- properties: z18.unknown().optional()
2300
- }).passthrough();
2301
- var CustomPromptResponseSchema = z18.object({
2302
- uuid: z18.string(),
2303
- prompt: z18.string(),
2304
- user_defined_goal: z18.boolean(),
2305
- status: z18.string(),
2306
- active: z18.boolean(),
2307
- prompt_set_id: z18.string(),
2308
- created_at: z18.string(),
2309
- updated_at: z18.string(),
2310
- goal: z18.unknown().optional(),
2311
- properties: z18.unknown().optional(),
2312
- property_assignments: z18.array(z18.unknown()).optional(),
2313
- detector_category: z18.unknown().optional(),
2314
- severity: z18.unknown().optional(),
2315
- extra_info: z18.unknown().optional()
2316
- }).passthrough();
2317
- var CustomPromptListItemSchema = z18.object({
2318
- uuid: z18.string(),
2319
- prompt: z18.string(),
2320
- user_defined_goal: z18.boolean(),
2321
- status: z18.string(),
2322
- active: z18.boolean(),
2323
- created_at: z18.string(),
2324
- updated_at: z18.string(),
2325
- goal: z18.unknown().optional(),
2326
- properties: z18.unknown().optional()
2327
- }).passthrough();
2328
- var CustomPromptListSchema = z18.object({
2646
+ var CustomPromptUpdateRequestSchema = z25.object({
2647
+ prompt: z25.unknown().optional(),
2648
+ goal: z25.unknown().optional(),
2649
+ properties: z25.unknown().optional()
2650
+ }).passthrough();
2651
+ var CustomPromptResponseSchema = z25.object({
2652
+ uuid: z25.string(),
2653
+ prompt: z25.string(),
2654
+ user_defined_goal: z25.boolean(),
2655
+ status: z25.string(),
2656
+ active: z25.boolean(),
2657
+ prompt_set_id: z25.string(),
2658
+ created_at: z25.string(),
2659
+ updated_at: z25.string(),
2660
+ goal: z25.unknown().optional(),
2661
+ properties: z25.unknown().optional(),
2662
+ property_assignments: z25.array(z25.unknown()).optional(),
2663
+ detector_category: z25.unknown().optional(),
2664
+ severity: z25.unknown().optional(),
2665
+ extra_info: z25.unknown().optional()
2666
+ }).passthrough();
2667
+ var CustomPromptListItemSchema = z25.object({
2668
+ uuid: z25.string(),
2669
+ prompt: z25.string(),
2670
+ user_defined_goal: z25.boolean(),
2671
+ status: z25.string(),
2672
+ active: z25.boolean(),
2673
+ created_at: z25.string(),
2674
+ updated_at: z25.string(),
2675
+ goal: z25.unknown().optional(),
2676
+ properties: z25.unknown().optional()
2677
+ }).passthrough();
2678
+ var CustomPromptListSchema = z25.object({
2329
2679
  pagination: RedTeamPaginationSchema,
2330
- data: z18.array(CustomPromptListItemSchema).optional()
2680
+ data: z25.array(CustomPromptListItemSchema).optional()
2331
2681
  }).passthrough();
2332
- var PropertyNameCreateRequestSchema = z18.object({ name: z18.string() });
2333
- var PropertyValueCreateRequestSchema = z18.object({
2334
- property_name: z18.string(),
2335
- property_value: z18.string()
2682
+ var PropertyNameCreateRequestSchema = z25.object({ name: z25.string() });
2683
+ var PropertyValueCreateRequestSchema = z25.object({
2684
+ property_name: z25.string(),
2685
+ property_value: z25.string()
2336
2686
  });
2337
- var PropertyDefinitionSchema = z18.object({
2338
- property_name: z18.string(),
2339
- created_at: z18.string()
2687
+ var PropertyDefinitionSchema = z25.object({
2688
+ property_name: z25.string(),
2689
+ created_at: z25.string()
2340
2690
  });
2341
- var PropertyNamesListResponseSchema = z18.object({ data: z18.array(PropertyDefinitionSchema).optional() }).passthrough();
2342
- var PropertyValuesResponseSchema = z18.object({
2343
- name: z18.string(),
2344
- values: z18.array(z18.string()).optional()
2691
+ var PropertyNamesListResponseSchema = z25.object({ data: z25.array(PropertyDefinitionSchema).optional() }).passthrough();
2692
+ var PropertyValuesResponseSchema = z25.object({
2693
+ name: z25.string(),
2694
+ values: z25.array(z25.string()).optional()
2345
2695
  }).passthrough();
2346
- var PropertyValuesMultipleResponseSchema = z18.object({ data: z18.record(z18.array(z18.string())).optional() }).passthrough();
2347
- var DashboardOverviewResponseSchema = z18.object({
2348
- total_targets: z18.number().int(),
2349
- targets_by_type: z18.array(CountByNameSchema).optional()
2696
+ var PropertyValuesMultipleResponseSchema = z25.object({ data: z25.record(z25.array(z25.string())).optional() }).passthrough();
2697
+ var DashboardOverviewResponseSchema = z25.object({
2698
+ total_targets: z25.number().int(),
2699
+ targets_by_type: z25.array(CountByNameSchema).optional()
2350
2700
  }).passthrough();
2351
2701
 
2352
2702
  // src/models/oauth-token.ts
2353
- import { z as z19 } from "zod";
2354
- var OAuthTokenResponseSchema = z19.object({
2355
- access_token: z19.string(),
2356
- token_type: z19.string().optional(),
2357
- expires_in: z19.number(),
2358
- scope: z19.string().optional()
2359
- });
2703
+ import { z as z26 } from "zod";
2704
+ var OAuthTokenResponseSchema = z26.object({
2705
+ access_token: z26.string(),
2706
+ token_type: z26.string().optional(),
2707
+ expires_in: z26.number(),
2708
+ scope: z26.string().optional()
2709
+ }).passthrough();
2360
2710
 
2361
2711
  // src/management/oauth-client.ts
2362
2712
  var DEFAULT_TOKEN_BUFFER_MS = 3e4;
@@ -2524,8 +2874,327 @@ async function managementHttpRequest(opts) {
2524
2874
  return { status: response.status, data };
2525
2875
  }
2526
2876
 
2527
- // src/management/profiles.ts
2528
- var ProfilesClient = class {
2877
+ // src/management/profiles.ts
2878
+ var ProfilesClient = class {
2879
+ baseUrl;
2880
+ oauthClient;
2881
+ tsgId;
2882
+ numRetries;
2883
+ constructor(opts) {
2884
+ this.baseUrl = opts.baseUrl;
2885
+ this.oauthClient = opts.oauthClient;
2886
+ this.tsgId = opts.tsgId;
2887
+ this.numRetries = opts.numRetries;
2888
+ }
2889
+ /**
2890
+ * Create a new security profile.
2891
+ * @param request - Profile configuration.
2892
+ * @returns The created security profile.
2893
+ */
2894
+ async create(request) {
2895
+ const res = await managementHttpRequest({
2896
+ method: "POST",
2897
+ baseUrl: this.baseUrl,
2898
+ path: MGMT_PROFILE_PATH,
2899
+ body: request,
2900
+ oauthClient: this.oauthClient,
2901
+ numRetries: this.numRetries
2902
+ });
2903
+ return res.data;
2904
+ }
2905
+ /**
2906
+ * List security profiles for the TSG.
2907
+ * @param opts - Pagination options.
2908
+ * @returns Paginated list of security profiles.
2909
+ */
2910
+ async list(opts) {
2911
+ const params = {
2912
+ offset: String(opts?.offset ?? 0),
2913
+ limit: String(opts?.limit ?? 100)
2914
+ };
2915
+ const res = await managementHttpRequest({
2916
+ method: "GET",
2917
+ baseUrl: this.baseUrl,
2918
+ path: `${MGMT_PROFILES_TSG_PATH}/${this.tsgId}`,
2919
+ params,
2920
+ oauthClient: this.oauthClient,
2921
+ numRetries: this.numRetries
2922
+ });
2923
+ return res.data;
2924
+ }
2925
+ /**
2926
+ * Update an existing security profile.
2927
+ * @param profileId - UUID of the profile to update.
2928
+ * @param request - Updated profile configuration.
2929
+ * @returns The updated security profile.
2930
+ */
2931
+ async update(profileId, request) {
2932
+ if (!isValidUuid(profileId)) {
2933
+ throw new AISecSDKException(
2934
+ `Invalid profile_id: ${profileId}`,
2935
+ "AISEC_USER_REQUEST_PAYLOAD_ERROR" /* USER_REQUEST_PAYLOAD_ERROR */
2936
+ );
2937
+ }
2938
+ const res = await managementHttpRequest({
2939
+ method: "PUT",
2940
+ baseUrl: this.baseUrl,
2941
+ path: `${MGMT_PROFILE_PATH}/uuid/${profileId}`,
2942
+ body: request,
2943
+ oauthClient: this.oauthClient,
2944
+ numRetries: this.numRetries
2945
+ });
2946
+ return res.data;
2947
+ }
2948
+ /**
2949
+ * Delete a security profile.
2950
+ * @param profileId - UUID of the profile to delete.
2951
+ * @returns Deletion confirmation message.
2952
+ */
2953
+ async delete(profileId) {
2954
+ if (!isValidUuid(profileId)) {
2955
+ throw new AISecSDKException(
2956
+ `Invalid profile_id: ${profileId}`,
2957
+ "AISEC_USER_REQUEST_PAYLOAD_ERROR" /* USER_REQUEST_PAYLOAD_ERROR */
2958
+ );
2959
+ }
2960
+ const res = await managementHttpRequest({
2961
+ method: "DELETE",
2962
+ baseUrl: this.baseUrl,
2963
+ path: `${MGMT_PROFILE_PATH}/${profileId}`,
2964
+ oauthClient: this.oauthClient,
2965
+ numRetries: this.numRetries
2966
+ });
2967
+ return res.data;
2968
+ }
2969
+ /**
2970
+ * Force-delete a security profile, bypassing safety checks.
2971
+ * @param profileId - UUID of the profile to force-delete.
2972
+ * @param updatedBy - Email of the user performing the deletion.
2973
+ * @returns Deletion confirmation message.
2974
+ */
2975
+ async forceDelete(profileId, updatedBy) {
2976
+ if (!isValidUuid(profileId)) {
2977
+ throw new AISecSDKException(
2978
+ `Invalid profile_id: ${profileId}`,
2979
+ "AISEC_USER_REQUEST_PAYLOAD_ERROR" /* USER_REQUEST_PAYLOAD_ERROR */
2980
+ );
2981
+ }
2982
+ const res = await managementHttpRequest({
2983
+ method: "DELETE",
2984
+ baseUrl: this.baseUrl,
2985
+ path: `${MGMT_PROFILE_PATH}/${profileId}/force`,
2986
+ params: { updated_by: updatedBy },
2987
+ oauthClient: this.oauthClient,
2988
+ numRetries: this.numRetries
2989
+ });
2990
+ return res.data;
2991
+ }
2992
+ };
2993
+
2994
+ // src/management/topics.ts
2995
+ var TopicsClient = class {
2996
+ baseUrl;
2997
+ oauthClient;
2998
+ tsgId;
2999
+ numRetries;
3000
+ constructor(opts) {
3001
+ this.baseUrl = opts.baseUrl;
3002
+ this.oauthClient = opts.oauthClient;
3003
+ this.tsgId = opts.tsgId;
3004
+ this.numRetries = opts.numRetries;
3005
+ }
3006
+ /**
3007
+ * Create a new custom topic.
3008
+ * @param request - Topic definition with name, description, and examples.
3009
+ * @returns The created custom topic.
3010
+ */
3011
+ async create(request) {
3012
+ const res = await managementHttpRequest({
3013
+ method: "POST",
3014
+ baseUrl: this.baseUrl,
3015
+ path: MGMT_TOPIC_PATH,
3016
+ body: request,
3017
+ oauthClient: this.oauthClient,
3018
+ numRetries: this.numRetries
3019
+ });
3020
+ return res.data;
3021
+ }
3022
+ /**
3023
+ * List custom topics for the TSG.
3024
+ * @param opts - Pagination options.
3025
+ * @returns Paginated list of custom topics.
3026
+ */
3027
+ async list(opts) {
3028
+ const params = {
3029
+ offset: String(opts?.offset ?? 0),
3030
+ limit: String(opts?.limit ?? 100)
3031
+ };
3032
+ const res = await managementHttpRequest({
3033
+ method: "GET",
3034
+ baseUrl: this.baseUrl,
3035
+ path: `${MGMT_TOPICS_TSG_PATH}/${this.tsgId}`,
3036
+ params,
3037
+ oauthClient: this.oauthClient,
3038
+ numRetries: this.numRetries
3039
+ });
3040
+ return res.data;
3041
+ }
3042
+ /**
3043
+ * Update an existing custom topic.
3044
+ * @param topicId - UUID of the topic to update.
3045
+ * @param request - Updated topic definition.
3046
+ * @returns The updated custom topic.
3047
+ */
3048
+ async update(topicId, request) {
3049
+ if (!isValidUuid(topicId)) {
3050
+ throw new AISecSDKException(
3051
+ `Invalid topic_id: ${topicId}`,
3052
+ "AISEC_USER_REQUEST_PAYLOAD_ERROR" /* USER_REQUEST_PAYLOAD_ERROR */
3053
+ );
3054
+ }
3055
+ const res = await managementHttpRequest({
3056
+ method: "PUT",
3057
+ baseUrl: this.baseUrl,
3058
+ path: `${MGMT_TOPIC_PATH}/uuid/${topicId}`,
3059
+ body: request,
3060
+ oauthClient: this.oauthClient,
3061
+ numRetries: this.numRetries
3062
+ });
3063
+ return res.data;
3064
+ }
3065
+ /**
3066
+ * Delete a custom topic. Fails if topic is referenced by a profile.
3067
+ * @param topicId - UUID of the topic to delete.
3068
+ * @returns Deletion confirmation message.
3069
+ */
3070
+ async delete(topicId) {
3071
+ if (!isValidUuid(topicId)) {
3072
+ throw new AISecSDKException(
3073
+ `Invalid topic_id: ${topicId}`,
3074
+ "AISEC_USER_REQUEST_PAYLOAD_ERROR" /* USER_REQUEST_PAYLOAD_ERROR */
3075
+ );
3076
+ }
3077
+ const res = await managementHttpRequest({
3078
+ method: "DELETE",
3079
+ baseUrl: this.baseUrl,
3080
+ path: `${MGMT_TOPIC_PATH}/${topicId}`,
3081
+ oauthClient: this.oauthClient,
3082
+ numRetries: this.numRetries
3083
+ });
3084
+ return res.data;
3085
+ }
3086
+ /**
3087
+ * Force-delete a custom topic, removing it from any referencing profiles.
3088
+ * @param topicId - UUID of the topic to force-delete.
3089
+ * @param updatedBy - Email of the user performing the deletion.
3090
+ * @returns Deletion confirmation message.
3091
+ */
3092
+ async forceDelete(topicId, updatedBy) {
3093
+ if (!isValidUuid(topicId)) {
3094
+ throw new AISecSDKException(
3095
+ `Invalid topic_id: ${topicId}`,
3096
+ "AISEC_USER_REQUEST_PAYLOAD_ERROR" /* USER_REQUEST_PAYLOAD_ERROR */
3097
+ );
3098
+ }
3099
+ const params = updatedBy ? { updated_by: updatedBy } : void 0;
3100
+ const res = await managementHttpRequest({
3101
+ method: "DELETE",
3102
+ baseUrl: this.baseUrl,
3103
+ path: `${MGMT_TOPIC_FORCE_PATH}/${topicId}`,
3104
+ params,
3105
+ oauthClient: this.oauthClient,
3106
+ numRetries: this.numRetries
3107
+ });
3108
+ return res.data;
3109
+ }
3110
+ };
3111
+
3112
+ // src/management/api-keys.ts
3113
+ var ApiKeysClient = class {
3114
+ baseUrl;
3115
+ oauthClient;
3116
+ tsgId;
3117
+ numRetries;
3118
+ constructor(opts) {
3119
+ this.baseUrl = opts.baseUrl;
3120
+ this.oauthClient = opts.oauthClient;
3121
+ this.tsgId = opts.tsgId;
3122
+ this.numRetries = opts.numRetries;
3123
+ }
3124
+ /**
3125
+ * Create a new API key.
3126
+ * @param request - API key creation request.
3127
+ * @returns The created API key.
3128
+ */
3129
+ async create(request) {
3130
+ const res = await managementHttpRequest({
3131
+ method: "POST",
3132
+ baseUrl: this.baseUrl,
3133
+ path: MGMT_API_KEY_PATH,
3134
+ body: request,
3135
+ oauthClient: this.oauthClient,
3136
+ numRetries: this.numRetries
3137
+ });
3138
+ return res.data;
3139
+ }
3140
+ /**
3141
+ * List API keys for the TSG.
3142
+ * @param opts - Pagination options.
3143
+ * @returns Paginated list of API keys.
3144
+ */
3145
+ async list(opts) {
3146
+ const params = {
3147
+ offset: String(opts?.offset ?? 0),
3148
+ limit: String(opts?.limit ?? 100)
3149
+ };
3150
+ const res = await managementHttpRequest({
3151
+ method: "GET",
3152
+ baseUrl: this.baseUrl,
3153
+ path: `${MGMT_API_KEYS_TSG_PATH}/${this.tsgId}`,
3154
+ params,
3155
+ oauthClient: this.oauthClient,
3156
+ numRetries: this.numRetries
3157
+ });
3158
+ return res.data;
3159
+ }
3160
+ /**
3161
+ * Delete an API key by name.
3162
+ * @param apiKeyName - Name of the API key to delete.
3163
+ * @param updatedBy - Email of user performing the deletion.
3164
+ * @returns Deletion confirmation.
3165
+ */
3166
+ async delete(apiKeyName, updatedBy) {
3167
+ const res = await managementHttpRequest({
3168
+ method: "DELETE",
3169
+ baseUrl: this.baseUrl,
3170
+ path: `${MGMT_API_KEY_PATH}/delete/${encodeURIComponent(apiKeyName)}`,
3171
+ params: { updated_by: updatedBy },
3172
+ oauthClient: this.oauthClient,
3173
+ numRetries: this.numRetries
3174
+ });
3175
+ return res.data;
3176
+ }
3177
+ /**
3178
+ * Regenerate an API key.
3179
+ * @param apiKeyId - UUID of the API key to regenerate.
3180
+ * @param request - Regeneration request with rotation config.
3181
+ * @returns The regenerated API key.
3182
+ */
3183
+ async regenerate(apiKeyId, request) {
3184
+ const res = await managementHttpRequest({
3185
+ method: "POST",
3186
+ baseUrl: this.baseUrl,
3187
+ path: `${MGMT_API_KEY_PATH}/regenerate/${encodeURIComponent(apiKeyId)}`,
3188
+ body: request,
3189
+ oauthClient: this.oauthClient,
3190
+ numRetries: this.numRetries
3191
+ });
3192
+ return res.data;
3193
+ }
3194
+ };
3195
+
3196
+ // src/management/customer-apps.ts
3197
+ var CustomerAppsClient = class {
2529
3198
  baseUrl;
2530
3199
  oauthClient;
2531
3200
  tsgId;
@@ -2537,25 +3206,25 @@ var ProfilesClient = class {
2537
3206
  this.numRetries = opts.numRetries;
2538
3207
  }
2539
3208
  /**
2540
- * Create a new security profile.
2541
- * @param request - Profile configuration.
2542
- * @returns The created security profile.
3209
+ * Get a customer app by name.
3210
+ * @param appName - Name of the customer app.
3211
+ * @returns The customer app.
2543
3212
  */
2544
- async create(request) {
3213
+ async get(appName) {
2545
3214
  const res = await managementHttpRequest({
2546
- method: "POST",
3215
+ method: "GET",
2547
3216
  baseUrl: this.baseUrl,
2548
- path: MGMT_PROFILE_PATH,
2549
- body: request,
3217
+ path: MGMT_CUSTOMER_APP_PATH,
3218
+ params: { app_name: appName },
2550
3219
  oauthClient: this.oauthClient,
2551
3220
  numRetries: this.numRetries
2552
3221
  });
2553
3222
  return res.data;
2554
3223
  }
2555
3224
  /**
2556
- * List security profiles for the TSG.
3225
+ * List customer apps for the TSG.
2557
3226
  * @param opts - Pagination options.
2558
- * @returns Paginated list of security profiles.
3227
+ * @returns Paginated list of customer apps.
2559
3228
  */
2560
3229
  async list(opts) {
2561
3230
  const params = {
@@ -2565,7 +3234,7 @@ var ProfilesClient = class {
2565
3234
  const res = await managementHttpRequest({
2566
3235
  method: "GET",
2567
3236
  baseUrl: this.baseUrl,
2568
- path: `${MGMT_PROFILES_TSG_PATH}/${this.tsgId}`,
3237
+ path: `${MGMT_CUSTOMER_APPS_TSG_PATH}/${this.tsgId}`,
2569
3238
  params,
2570
3239
  oauthClient: this.oauthClient,
2571
3240
  numRetries: this.numRetries
@@ -2573,22 +3242,17 @@ var ProfilesClient = class {
2573
3242
  return res.data;
2574
3243
  }
2575
3244
  /**
2576
- * Update an existing security profile.
2577
- * @param profileId - UUID of the profile to update.
2578
- * @param request - Updated profile configuration.
2579
- * @returns The updated security profile.
3245
+ * Update a customer app.
3246
+ * @param customerAppId - UUID of the customer app to update.
3247
+ * @param request - Updated customer app data.
3248
+ * @returns The updated customer app.
2580
3249
  */
2581
- async update(profileId, request) {
2582
- if (!isValidUuid(profileId)) {
2583
- throw new AISecSDKException(
2584
- `Invalid profile_id: ${profileId}`,
2585
- "AISEC_USER_REQUEST_PAYLOAD_ERROR" /* USER_REQUEST_PAYLOAD_ERROR */
2586
- );
2587
- }
3250
+ async update(customerAppId, request) {
2588
3251
  const res = await managementHttpRequest({
2589
3252
  method: "PUT",
2590
3253
  baseUrl: this.baseUrl,
2591
- path: `${MGMT_PROFILE_PATH}/uuid/${profileId}`,
3254
+ path: MGMT_CUSTOMER_APP_PATH,
3255
+ params: { customer_app_id: customerAppId },
2592
3256
  body: request,
2593
3257
  oauthClient: this.oauthClient,
2594
3258
  numRetries: this.numRetries
@@ -2596,21 +3260,17 @@ var ProfilesClient = class {
2596
3260
  return res.data;
2597
3261
  }
2598
3262
  /**
2599
- * Delete a security profile.
2600
- * @param profileId - UUID of the profile to delete.
2601
- * @returns Deletion confirmation message.
3263
+ * Delete a customer app.
3264
+ * @param appName - Name of the customer app to delete.
3265
+ * @param updatedBy - Email of user performing the deletion.
3266
+ * @returns The deleted customer app.
2602
3267
  */
2603
- async delete(profileId) {
2604
- if (!isValidUuid(profileId)) {
2605
- throw new AISecSDKException(
2606
- `Invalid profile_id: ${profileId}`,
2607
- "AISEC_USER_REQUEST_PAYLOAD_ERROR" /* USER_REQUEST_PAYLOAD_ERROR */
2608
- );
2609
- }
3268
+ async delete(appName, updatedBy) {
2610
3269
  const res = await managementHttpRequest({
2611
3270
  method: "DELETE",
2612
3271
  baseUrl: this.baseUrl,
2613
- path: `${MGMT_PROFILE_PATH}/${profileId}`,
3272
+ path: MGMT_CUSTOMER_APP_PATH,
3273
+ params: { app_name: appName, updated_by: updatedBy },
2614
3274
  oauthClient: this.oauthClient,
2615
3275
  numRetries: this.numRetries
2616
3276
  });
@@ -2618,114 +3278,143 @@ var ProfilesClient = class {
2618
3278
  }
2619
3279
  };
2620
3280
 
2621
- // src/management/topics.ts
2622
- var TopicsClient = class {
3281
+ // src/management/dlp-profiles.ts
3282
+ var DlpProfilesClient = class {
2623
3283
  baseUrl;
2624
3284
  oauthClient;
2625
- tsgId;
2626
3285
  numRetries;
2627
3286
  constructor(opts) {
2628
3287
  this.baseUrl = opts.baseUrl;
2629
3288
  this.oauthClient = opts.oauthClient;
2630
- this.tsgId = opts.tsgId;
2631
3289
  this.numRetries = opts.numRetries;
2632
3290
  }
2633
3291
  /**
2634
- * Create a new custom topic.
2635
- * @param request - Topic definition with name, description, and examples.
2636
- * @returns The created custom topic.
3292
+ * List all DLP profiles for the TSG.
3293
+ * @returns List of DLP profiles.
2637
3294
  */
2638
- async create(request) {
3295
+ async list() {
2639
3296
  const res = await managementHttpRequest({
2640
- method: "POST",
3297
+ method: "GET",
2641
3298
  baseUrl: this.baseUrl,
2642
- path: MGMT_TOPIC_PATH,
2643
- body: request,
3299
+ path: MGMT_DLP_PROFILES_PATH,
2644
3300
  oauthClient: this.oauthClient,
2645
3301
  numRetries: this.numRetries
2646
3302
  });
2647
3303
  return res.data;
2648
3304
  }
3305
+ };
3306
+
3307
+ // src/management/deployment-profiles.ts
3308
+ var DeploymentProfilesClient = class {
3309
+ baseUrl;
3310
+ oauthClient;
3311
+ numRetries;
3312
+ constructor(opts) {
3313
+ this.baseUrl = opts.baseUrl;
3314
+ this.oauthClient = opts.oauthClient;
3315
+ this.numRetries = opts.numRetries;
3316
+ }
2649
3317
  /**
2650
- * List custom topics for the TSG.
2651
- * @param opts - Pagination options.
2652
- * @returns Paginated list of custom topics.
3318
+ * List deployment profiles for the TSG.
3319
+ * @param opts - Optional filter options.
3320
+ * @returns Deployment profiles response.
2653
3321
  */
2654
3322
  async list(opts) {
2655
- const params = {
2656
- offset: String(opts?.offset ?? 0),
2657
- limit: String(opts?.limit ?? 100)
2658
- };
3323
+ const params = {};
3324
+ if (opts?.unactivated !== void 0) params.unactivated = String(opts.unactivated);
2659
3325
  const res = await managementHttpRequest({
2660
3326
  method: "GET",
2661
3327
  baseUrl: this.baseUrl,
2662
- path: `${MGMT_TOPICS_TSG_PATH}/${this.tsgId}`,
2663
- params,
3328
+ path: MGMT_DEPLOYMENT_PROFILES_PATH,
3329
+ params: Object.keys(params).length > 0 ? params : void 0,
2664
3330
  oauthClient: this.oauthClient,
2665
3331
  numRetries: this.numRetries
2666
3332
  });
2667
3333
  return res.data;
2668
3334
  }
3335
+ };
3336
+
3337
+ // src/management/scan-logs.ts
3338
+ var ScanLogsClient = class {
3339
+ baseUrl;
3340
+ oauthClient;
3341
+ numRetries;
3342
+ constructor(opts) {
3343
+ this.baseUrl = opts.baseUrl;
3344
+ this.oauthClient = opts.oauthClient;
3345
+ this.numRetries = opts.numRetries;
3346
+ }
2669
3347
  /**
2670
- * Update an existing custom topic.
2671
- * @param topicId - UUID of the topic to update.
2672
- * @param request - Updated topic definition.
2673
- * @returns The updated custom topic.
3348
+ * Retrieve scan logs by time interval.
3349
+ * @param opts - Query options including time range, pagination, and filter.
3350
+ * @returns Paginated scan results.
2674
3351
  */
2675
- async update(topicId, request) {
2676
- if (!isValidUuid(topicId)) {
2677
- throw new AISecSDKException(
2678
- `Invalid topic_id: ${topicId}`,
2679
- "AISEC_USER_REQUEST_PAYLOAD_ERROR" /* USER_REQUEST_PAYLOAD_ERROR */
2680
- );
2681
- }
3352
+ async query(opts) {
3353
+ const params = {
3354
+ time_interval: String(opts.time_interval),
3355
+ time_unit: opts.time_unit,
3356
+ pageNumber: String(opts.pageNumber),
3357
+ pageSize: String(opts.pageSize),
3358
+ filter: opts.filter
3359
+ };
3360
+ const body = opts.page_token ? { page_token: opts.page_token } : void 0;
2682
3361
  const res = await managementHttpRequest({
2683
- method: "PUT",
3362
+ method: "POST",
2684
3363
  baseUrl: this.baseUrl,
2685
- path: `${MGMT_TOPIC_PATH}/uuid/${topicId}`,
2686
- body: request,
3364
+ path: MGMT_SCAN_LOGS_PATH,
3365
+ params,
3366
+ body,
2687
3367
  oauthClient: this.oauthClient,
2688
3368
  numRetries: this.numRetries
2689
3369
  });
2690
3370
  return res.data;
2691
3371
  }
3372
+ };
3373
+
3374
+ // src/management/oauth-management.ts
3375
+ var OAuthManagementClient = class {
3376
+ baseUrl;
3377
+ oauthClient;
3378
+ numRetries;
3379
+ constructor(opts) {
3380
+ this.baseUrl = opts.baseUrl;
3381
+ this.oauthClient = opts.oauthClient;
3382
+ this.numRetries = opts.numRetries;
3383
+ }
2692
3384
  /**
2693
- * Delete a custom topic. Fails if topic is referenced by a profile.
2694
- * @param topicId - UUID of the topic to delete.
2695
- * @returns Deletion confirmation message.
3385
+ * Invalidate an OAuth token.
3386
+ * @param token - The OAuth token to invalidate.
3387
+ * @param body - Client ID and customer app.
3388
+ * @returns Confirmation string.
2696
3389
  */
2697
- async delete(topicId) {
2698
- if (!isValidUuid(topicId)) {
2699
- throw new AISecSDKException(
2700
- `Invalid topic_id: ${topicId}`,
2701
- "AISEC_USER_REQUEST_PAYLOAD_ERROR" /* USER_REQUEST_PAYLOAD_ERROR */
2702
- );
2703
- }
3390
+ async invalidateToken(token, body) {
2704
3391
  const res = await managementHttpRequest({
2705
- method: "DELETE",
3392
+ method: "POST",
2706
3393
  baseUrl: this.baseUrl,
2707
- path: `${MGMT_TOPIC_PATH}/${topicId}`,
3394
+ path: MGMT_OAUTH_INVALIDATE_PATH,
3395
+ params: { token },
3396
+ body,
2708
3397
  oauthClient: this.oauthClient,
2709
3398
  numRetries: this.numRetries
2710
3399
  });
2711
3400
  return res.data;
2712
3401
  }
2713
3402
  /**
2714
- * Force-delete a custom topic, removing it from any referencing profiles.
2715
- * @param topicId - UUID of the topic to force-delete.
2716
- * @returns Deletion confirmation message.
3403
+ * Get an OAuth token for client credentials.
3404
+ * @param opts - Token request options.
3405
+ * @returns OAuth2 token response.
2717
3406
  */
2718
- async forceDelete(topicId) {
2719
- if (!isValidUuid(topicId)) {
2720
- throw new AISecSDKException(
2721
- `Invalid topic_id: ${topicId}`,
2722
- "AISEC_USER_REQUEST_PAYLOAD_ERROR" /* USER_REQUEST_PAYLOAD_ERROR */
2723
- );
2724
- }
3407
+ async getAccessToken(opts) {
3408
+ const params = {};
3409
+ if (opts.tokenTtlInterval !== void 0)
3410
+ params.tokenTtlInterval = String(opts.tokenTtlInterval);
3411
+ if (opts.tokenTtlUnit !== void 0) params.tokenTtlUnit = opts.tokenTtlUnit;
2725
3412
  const res = await managementHttpRequest({
2726
- method: "DELETE",
3413
+ method: "POST",
2727
3414
  baseUrl: this.baseUrl,
2728
- path: `${MGMT_TOPIC_FORCE_PATH}/${topicId}`,
3415
+ path: MGMT_OAUTH_TOKEN_PATH,
3416
+ params: Object.keys(params).length > 0 ? params : void 0,
3417
+ body: opts.body,
2729
3418
  oauthClient: this.oauthClient,
2730
3419
  numRetries: this.numRetries
2731
3420
  });
@@ -2737,6 +3426,12 @@ var TopicsClient = class {
2737
3426
  var ManagementClient = class {
2738
3427
  profiles;
2739
3428
  topics;
3429
+ apiKeys;
3430
+ customerApps;
3431
+ dlpProfiles;
3432
+ deploymentProfiles;
3433
+ scanLogs;
3434
+ oauth;
2740
3435
  constructor(opts = {}) {
2741
3436
  const clientId = opts.clientId ?? process.env[MGMT_CLIENT_ID];
2742
3437
  const clientSecret = opts.clientSecret ?? process.env[MGMT_CLIENT_SECRET];
@@ -2783,19 +3478,92 @@ var ManagementClient = class {
2783
3478
  tsgId,
2784
3479
  numRetries
2785
3480
  });
3481
+ this.apiKeys = new ApiKeysClient({
3482
+ baseUrl: apiEndpoint,
3483
+ oauthClient,
3484
+ tsgId,
3485
+ numRetries
3486
+ });
3487
+ this.customerApps = new CustomerAppsClient({
3488
+ baseUrl: apiEndpoint,
3489
+ oauthClient,
3490
+ tsgId,
3491
+ numRetries
3492
+ });
3493
+ this.dlpProfiles = new DlpProfilesClient({
3494
+ baseUrl: apiEndpoint,
3495
+ oauthClient,
3496
+ numRetries
3497
+ });
3498
+ this.deploymentProfiles = new DeploymentProfilesClient({
3499
+ baseUrl: apiEndpoint,
3500
+ oauthClient,
3501
+ numRetries
3502
+ });
3503
+ this.scanLogs = new ScanLogsClient({
3504
+ baseUrl: apiEndpoint,
3505
+ oauthClient,
3506
+ numRetries
3507
+ });
3508
+ this.oauth = new OAuthManagementClient({
3509
+ baseUrl: apiEndpoint,
3510
+ oauthClient,
3511
+ numRetries
3512
+ });
2786
3513
  }
2787
3514
  };
2788
3515
 
2789
3516
  // src/model-security/scans-client.ts
2790
- function buildListParams(opts) {
3517
+ function buildScanListParams(opts) {
2791
3518
  const params = {};
2792
3519
  if (opts?.skip !== void 0) params.skip = String(opts.skip);
2793
3520
  if (opts?.limit !== void 0) params.limit = String(opts.limit);
2794
3521
  if (opts?.sort_by !== void 0) params.sort_by = opts.sort_by;
2795
- if (opts?.sort_direction !== void 0) params.sort_direction = opts.sort_direction;
3522
+ if (opts?.sort_order !== void 0) params.sort_order = opts.sort_order;
3523
+ if (opts?.search_query !== void 0) params.search_query = opts.search_query;
3524
+ if (opts?.eval_outcomes !== void 0) params.eval_outcomes = opts.eval_outcomes;
3525
+ if (opts?.source_types !== void 0) params.source_types = opts.source_types;
3526
+ if (opts?.security_group_uuid !== void 0)
3527
+ params.security_group_uuid = opts.security_group_uuid;
3528
+ if (opts?.start_time !== void 0) params.start_time = opts.start_time;
3529
+ if (opts?.end_time !== void 0) params.end_time = opts.end_time;
3530
+ if (opts?.labels_query !== void 0) params.labels_query = opts.labels_query;
3531
+ return params;
3532
+ }
3533
+ function buildEvaluationListParams(opts) {
3534
+ const params = {};
3535
+ if (opts?.skip !== void 0) params.skip = String(opts.skip);
3536
+ if (opts?.limit !== void 0) params.limit = String(opts.limit);
3537
+ if (opts?.sort_field !== void 0) params.sort_field = opts.sort_field;
3538
+ if (opts?.sort_order !== void 0) params.sort_order = opts.sort_order;
3539
+ if (opts?.result !== void 0) params.result = opts.result;
3540
+ if (opts?.rule_instance_uuid !== void 0) params.rule_instance_uuid = opts.rule_instance_uuid;
3541
+ return params;
3542
+ }
3543
+ function buildFileListParams(opts) {
3544
+ const params = {};
3545
+ if (opts?.skip !== void 0) params.skip = String(opts.skip);
3546
+ if (opts?.limit !== void 0) params.limit = String(opts.limit);
3547
+ if (opts?.sort_field !== void 0) params.sort_field = opts.sort_field;
3548
+ if (opts?.sort_dir !== void 0) params.sort_dir = opts.sort_dir;
3549
+ if (opts?.type !== void 0) params.type = opts.type;
3550
+ if (opts?.result !== void 0) params.result = opts.result;
3551
+ if (opts?.query_path !== void 0) params.query_path = opts.query_path;
3552
+ return params;
3553
+ }
3554
+ function buildLabelListParams(opts) {
3555
+ const params = {};
3556
+ if (opts?.skip !== void 0) params.skip = String(opts.skip);
3557
+ if (opts?.limit !== void 0) params.limit = String(opts.limit);
2796
3558
  if (opts?.search !== void 0) params.search = opts.search;
2797
3559
  return params;
2798
3560
  }
3561
+ function buildViolationListParams(opts) {
3562
+ const params = {};
3563
+ if (opts?.skip !== void 0) params.skip = String(opts.skip);
3564
+ if (opts?.limit !== void 0) params.limit = String(opts.limit);
3565
+ return params;
3566
+ }
2799
3567
  var ModelSecurityScansClient = class {
2800
3568
  baseUrl;
2801
3569
  oauthClient;
@@ -2827,15 +3595,11 @@ var ModelSecurityScansClient = class {
2827
3595
  * @returns Paginated list of scans.
2828
3596
  */
2829
3597
  async list(opts) {
2830
- const params = buildListParams(opts);
2831
- if (opts?.eval_outcome !== void 0) params.eval_outcome = opts.eval_outcome;
2832
- if (opts?.source_type !== void 0) params.source_type = opts.source_type;
2833
- if (opts?.scan_origin !== void 0) params.scan_origin = opts.scan_origin;
2834
3598
  const res = await managementHttpRequest({
2835
3599
  method: "GET",
2836
3600
  baseUrl: this.baseUrl,
2837
3601
  path: MODEL_SEC_SCANS_PATH,
2838
- params,
3602
+ params: buildScanListParams(opts),
2839
3603
  oauthClient: this.oauthClient,
2840
3604
  numRetries: this.numRetries
2841
3605
  });
@@ -2865,7 +3629,7 @@ var ModelSecurityScansClient = class {
2865
3629
  /**
2866
3630
  * Get rule evaluations for a scan.
2867
3631
  * @param scanUuid - Scan UUID.
2868
- * @param opts - Pagination options.
3632
+ * @param opts - Pagination and filter options.
2869
3633
  * @returns Paginated list of rule evaluations.
2870
3634
  */
2871
3635
  async getEvaluations(scanUuid, opts) {
@@ -2879,7 +3643,7 @@ var ModelSecurityScansClient = class {
2879
3643
  method: "GET",
2880
3644
  baseUrl: this.baseUrl,
2881
3645
  path: `${MODEL_SEC_SCANS_PATH}/${scanUuid}/evaluations`,
2882
- params: buildListParams(opts),
3646
+ params: buildEvaluationListParams(opts),
2883
3647
  oauthClient: this.oauthClient,
2884
3648
  numRetries: this.numRetries
2885
3649
  });
@@ -2898,14 +3662,11 @@ var ModelSecurityScansClient = class {
2898
3662
  "AISEC_USER_REQUEST_PAYLOAD_ERROR" /* USER_REQUEST_PAYLOAD_ERROR */
2899
3663
  );
2900
3664
  }
2901
- const params = buildListParams(opts);
2902
- if (opts?.type !== void 0) params.type = opts.type;
2903
- if (opts?.result !== void 0) params.result = opts.result;
2904
3665
  const res = await managementHttpRequest({
2905
3666
  method: "GET",
2906
3667
  baseUrl: this.baseUrl,
2907
3668
  path: `${MODEL_SEC_SCANS_PATH}/${scanUuid}/files`,
2908
- params,
3669
+ params: buildFileListParams(opts),
2909
3670
  oauthClient: this.oauthClient,
2910
3671
  numRetries: this.numRetries
2911
3672
  });
@@ -2961,6 +3722,7 @@ var ModelSecurityScansClient = class {
2961
3722
  * Delete labels from a scan by key.
2962
3723
  * @param scanUuid - Scan UUID.
2963
3724
  * @param keys - Label keys to delete.
3725
+ * @returns Resolves when the labels are deleted.
2964
3726
  */
2965
3727
  async deleteLabels(scanUuid, keys) {
2966
3728
  if (!isValidUuid(scanUuid)) {
@@ -3000,7 +3762,7 @@ var ModelSecurityScansClient = class {
3000
3762
  method: "GET",
3001
3763
  baseUrl: this.baseUrl,
3002
3764
  path: `${MODEL_SEC_SCANS_PATH}/${scanUuid}/rule-violations`,
3003
- params: buildListParams(opts),
3765
+ params: buildViolationListParams(opts),
3004
3766
  oauthClient: this.oauthClient,
3005
3767
  numRetries: this.numRetries
3006
3768
  });
@@ -3016,7 +3778,7 @@ var ModelSecurityScansClient = class {
3016
3778
  method: "GET",
3017
3779
  baseUrl: this.baseUrl,
3018
3780
  path: `${MODEL_SEC_SCANS_PATH}/label-keys`,
3019
- params: buildListParams(opts),
3781
+ params: buildLabelListParams(opts),
3020
3782
  oauthClient: this.oauthClient,
3021
3783
  numRetries: this.numRetries
3022
3784
  });
@@ -3033,7 +3795,7 @@ var ModelSecurityScansClient = class {
3033
3795
  method: "GET",
3034
3796
  baseUrl: this.baseUrl,
3035
3797
  path: `${MODEL_SEC_SCANS_PATH}/label-keys/${encodeURIComponent(key)}/values`,
3036
- params: buildListParams(opts),
3798
+ params: buildLabelListParams(opts),
3037
3799
  oauthClient: this.oauthClient,
3038
3800
  numRetries: this.numRetries
3039
3801
  });
@@ -3428,12 +4190,10 @@ var ModelSecurityClient = class {
3428
4190
  };
3429
4191
 
3430
4192
  // src/red-team/scans-client.ts
3431
- function buildListParams2(opts) {
4193
+ function buildListParams(opts) {
3432
4194
  const params = {};
3433
4195
  if (opts?.skip !== void 0) params.skip = String(opts.skip);
3434
4196
  if (opts?.limit !== void 0) params.limit = String(opts.limit);
3435
- if (opts?.sort_by !== void 0) params.sort_by = opts.sort_by;
3436
- if (opts?.sort_direction !== void 0) params.sort_direction = opts.sort_direction;
3437
4197
  if (opts?.search !== void 0) params.search = opts.search;
3438
4198
  return params;
3439
4199
  }
@@ -3446,7 +4206,11 @@ var RedTeamScansClient = class {
3446
4206
  this.oauthClient = opts.oauthClient;
3447
4207
  this.numRetries = opts.numRetries;
3448
4208
  }
3449
- /** Create a new red team scan job. */
4209
+ /**
4210
+ * Create a new red team scan job.
4211
+ * @param request - Job creation request body.
4212
+ * @returns The created job response.
4213
+ */
3450
4214
  async create(request) {
3451
4215
  const res = await managementHttpRequest({
3452
4216
  method: "POST",
@@ -3460,7 +4224,7 @@ var RedTeamScansClient = class {
3460
4224
  }
3461
4225
  /** List red team scan jobs with optional filters. */
3462
4226
  async list(opts) {
3463
- const params = buildListParams2(opts);
4227
+ const params = buildListParams(opts);
3464
4228
  if (opts?.status !== void 0) params.status = opts.status;
3465
4229
  if (opts?.job_type !== void 0) params.job_type = opts.job_type;
3466
4230
  if (opts?.target_id !== void 0) params.target_id = opts.target_id;
@@ -3516,12 +4280,10 @@ var RedTeamScansClient = class {
3516
4280
  };
3517
4281
 
3518
4282
  // src/red-team/reports-client.ts
3519
- function buildListParams3(opts) {
4283
+ function buildListParams2(opts) {
3520
4284
  const params = {};
3521
4285
  if (opts?.skip !== void 0) params.skip = String(opts.skip);
3522
4286
  if (opts?.limit !== void 0) params.limit = String(opts.limit);
3523
- if (opts?.sort_by !== void 0) params.sort_by = opts.sort_by;
3524
- if (opts?.sort_direction !== void 0) params.sort_direction = opts.sort_direction;
3525
4287
  if (opts?.search !== void 0) params.search = opts.search;
3526
4288
  return params;
3527
4289
  }
@@ -3545,11 +4307,13 @@ var RedTeamReportsClient = class {
3545
4307
  /** List attacks for a static scan. */
3546
4308
  async listAttacks(jobId, opts) {
3547
4309
  validateJobId(jobId);
3548
- const params = buildListParams3(opts);
4310
+ const params = buildListParams2(opts);
3549
4311
  if (opts?.status !== void 0) params.status = opts.status;
3550
4312
  if (opts?.severity !== void 0) params.severity = opts.severity;
3551
4313
  if (opts?.category !== void 0) params.category = opts.category;
3552
4314
  if (opts?.sub_category !== void 0) params.sub_category = opts.sub_category;
4315
+ if (opts?.attack_type !== void 0) params.attack_type = opts.attack_type;
4316
+ if (opts?.threat !== void 0) params.threat = String(opts.threat);
3553
4317
  const res = await managementHttpRequest({
3554
4318
  method: "GET",
3555
4319
  baseUrl: this.baseUrl,
@@ -3674,8 +4438,10 @@ var RedTeamReportsClient = class {
3674
4438
  /** List goals for a dynamic scan. */
3675
4439
  async listGoals(jobId, opts) {
3676
4440
  validateJobId(jobId);
3677
- const params = buildListParams3(opts);
4441
+ const params = buildListParams2(opts);
3678
4442
  if (opts?.goal_type !== void 0) params.goal_type = opts.goal_type;
4443
+ if (opts?.status !== void 0) params.status = opts.status;
4444
+ if (opts?.count !== void 0) params.count = String(opts.count);
3679
4445
  const res = await managementHttpRequest({
3680
4446
  method: "GET",
3681
4447
  baseUrl: this.baseUrl,
@@ -3699,7 +4465,7 @@ var RedTeamReportsClient = class {
3699
4465
  method: "GET",
3700
4466
  baseUrl: this.baseUrl,
3701
4467
  path: `${RED_TEAM_REPORT_DYNAMIC_PATH}/${jobId}/goal/${goalId}/list-streams`,
3702
- params: buildListParams3(opts),
4468
+ params: buildListParams2(opts),
3703
4469
  oauthClient: this.oauthClient,
3704
4470
  numRetries: this.numRetries
3705
4471
  });
@@ -3728,8 +4494,7 @@ var RedTeamReportsClient = class {
3728
4494
  /** Download a report in the specified format. */
3729
4495
  async downloadReport(jobId, format) {
3730
4496
  validateJobId(jobId);
3731
- const params = {};
3732
- if (format !== void 0) params.file_format = format;
4497
+ const params = { file_format: format };
3733
4498
  const res = await managementHttpRequest({
3734
4499
  method: "GET",
3735
4500
  baseUrl: this.baseUrl,
@@ -3755,12 +4520,10 @@ var RedTeamReportsClient = class {
3755
4520
  };
3756
4521
 
3757
4522
  // src/red-team/custom-attack-reports-client.ts
3758
- function buildListParams4(opts) {
4523
+ function buildListParams3(opts) {
3759
4524
  const params = {};
3760
4525
  if (opts?.skip !== void 0) params.skip = String(opts.skip);
3761
4526
  if (opts?.limit !== void 0) params.limit = String(opts.limit);
3762
- if (opts?.sort_by !== void 0) params.sort_by = opts.sort_by;
3763
- if (opts?.sort_direction !== void 0) params.sort_direction = opts.sort_direction;
3764
4527
  if (opts?.search !== void 0) params.search = opts.search;
3765
4528
  return params;
3766
4529
  }
@@ -3811,11 +4574,13 @@ var RedTeamCustomAttackReportsClient = class {
3811
4574
  "AISEC_USER_REQUEST_PAYLOAD_ERROR" /* USER_REQUEST_PAYLOAD_ERROR */
3812
4575
  );
3813
4576
  }
4577
+ const params = buildListParams3(opts);
4578
+ if (opts?.is_threat !== void 0) params.is_threat = String(opts.is_threat);
3814
4579
  const res = await managementHttpRequest({
3815
4580
  method: "GET",
3816
4581
  baseUrl: this.baseUrl,
3817
4582
  path: `${RED_TEAM_CUSTOM_ATTACKS_REPORT_PATH}/report/${jobId}/prompt-set/${promptSetId}/prompts`,
3818
- params: buildListParams4(opts),
4583
+ params,
3819
4584
  oauthClient: this.oauthClient,
3820
4585
  numRetries: this.numRetries
3821
4586
  });
@@ -3842,11 +4607,15 @@ var RedTeamCustomAttackReportsClient = class {
3842
4607
  /** List custom attacks for a scan. */
3843
4608
  async listCustomAttacks(jobId, opts) {
3844
4609
  validateJobId2(jobId);
4610
+ const params = buildListParams3(opts);
4611
+ if (opts?.threat !== void 0) params.threat = String(opts.threat);
4612
+ if (opts?.prompt_set_id !== void 0) params.prompt_set_id = opts.prompt_set_id;
4613
+ if (opts?.property_value !== void 0) params.property_value = opts.property_value;
3845
4614
  const res = await managementHttpRequest({
3846
4615
  method: "GET",
3847
4616
  baseUrl: this.baseUrl,
3848
4617
  path: `${RED_TEAM_CUSTOM_ATTACKS_REPORT_PATH}/job/${jobId}/list-custom-attacks`,
3849
- params: buildListParams4(opts),
4618
+ params,
3850
4619
  oauthClient: this.oauthClient,
3851
4620
  numRetries: this.numRetries
3852
4621
  });
@@ -3885,12 +4654,10 @@ var RedTeamCustomAttackReportsClient = class {
3885
4654
  };
3886
4655
 
3887
4656
  // src/red-team/targets-client.ts
3888
- function buildListParams5(opts) {
4657
+ function buildListParams4(opts) {
3889
4658
  const params = {};
3890
4659
  if (opts?.skip !== void 0) params.skip = String(opts.skip);
3891
4660
  if (opts?.limit !== void 0) params.limit = String(opts.limit);
3892
- if (opts?.sort_by !== void 0) params.sort_by = opts.sort_by;
3893
- if (opts?.sort_direction !== void 0) params.sort_direction = opts.sort_direction;
3894
4661
  if (opts?.search !== void 0) params.search = opts.search;
3895
4662
  return params;
3896
4663
  }
@@ -3903,7 +4670,12 @@ var RedTeamTargetsClient = class {
3903
4670
  this.oauthClient = opts.oauthClient;
3904
4671
  this.numRetries = opts.numRetries;
3905
4672
  }
3906
- /** Create a new target. */
4673
+ /**
4674
+ * Create a new target.
4675
+ * @param request - Target creation request body.
4676
+ * @param opts - Optional operation options (e.g. validate connection).
4677
+ * @returns The created target response.
4678
+ */
3907
4679
  async create(request, opts) {
3908
4680
  const params = {};
3909
4681
  if (opts?.validate !== void 0) params.validate = String(opts.validate);
@@ -3920,10 +4692,9 @@ var RedTeamTargetsClient = class {
3920
4692
  }
3921
4693
  /** List targets with optional filters. */
3922
4694
  async list(opts) {
3923
- const params = buildListParams5(opts);
4695
+ const params = buildListParams4(opts);
3924
4696
  if (opts?.target_type !== void 0) params.target_type = opts.target_type;
3925
4697
  if (opts?.status !== void 0) params.status = opts.status;
3926
- if (opts?.active !== void 0) params.active = String(opts.active);
3927
4698
  const res = await managementHttpRequest({
3928
4699
  method: "GET",
3929
4700
  baseUrl: this.baseUrl,
@@ -4039,12 +4810,10 @@ var RedTeamTargetsClient = class {
4039
4810
  };
4040
4811
 
4041
4812
  // src/red-team/custom-attacks-client.ts
4042
- function buildListParams6(opts) {
4813
+ function buildListParams5(opts) {
4043
4814
  const params = {};
4044
4815
  if (opts?.skip !== void 0) params.skip = String(opts.skip);
4045
4816
  if (opts?.limit !== void 0) params.limit = String(opts.limit);
4046
- if (opts?.sort_by !== void 0) params.sort_by = opts.sort_by;
4047
- if (opts?.sort_direction !== void 0) params.sort_direction = opts.sort_direction;
4048
4817
  if (opts?.search !== void 0) params.search = opts.search;
4049
4818
  return params;
4050
4819
  }
@@ -4079,7 +4848,8 @@ var RedTeamCustomAttacksClient = class {
4079
4848
  }
4080
4849
  /** List custom prompt sets. */
4081
4850
  async listPromptSets(opts) {
4082
- const params = buildListParams6(opts);
4851
+ const params = buildListParams5(opts);
4852
+ if (opts?.status !== void 0) params.status = opts.status;
4083
4853
  if (opts?.active !== void 0) params.active = String(opts.active);
4084
4854
  if (opts?.archive !== void 0) params.archive = String(opts.archive);
4085
4855
  const res = await managementHttpRequest({
@@ -4222,7 +4992,7 @@ var RedTeamCustomAttacksClient = class {
4222
4992
  /** List prompts in a prompt set. */
4223
4993
  async listPrompts(promptSetUuid, opts) {
4224
4994
  validateUuid(promptSetUuid, "prompt set uuid");
4225
- const params = buildListParams6(opts);
4995
+ const params = buildListParams5(opts);
4226
4996
  if (opts?.active !== void 0) params.active = String(opts.active);
4227
4997
  const res = await managementHttpRequest({
4228
4998
  method: "GET",
@@ -4343,12 +5113,10 @@ var RedTeamCustomAttacksClient = class {
4343
5113
  };
4344
5114
 
4345
5115
  // src/red-team/client.ts
4346
- function buildListParams7(opts) {
5116
+ function buildListParams6(opts) {
4347
5117
  const params = {};
4348
5118
  if (opts?.skip !== void 0) params.skip = String(opts.skip);
4349
5119
  if (opts?.limit !== void 0) params.limit = String(opts.limit);
4350
- if (opts?.sort_by !== void 0) params.sort_by = opts.sort_by;
4351
- if (opts?.sort_direction !== void 0) params.sort_direction = opts.sort_direction;
4352
5120
  if (opts?.search !== void 0) params.search = opts.search;
4353
5121
  return params;
4354
5122
  }
@@ -4482,7 +5250,7 @@ var RedTeamClient = class {
4482
5250
  method: "GET",
4483
5251
  baseUrl: this.dataEndpoint,
4484
5252
  path: `${RED_TEAM_ERROR_LOG_PATH}/${jobId}`,
4485
- params: buildListParams7(opts),
5253
+ params: buildListParams6(opts),
4486
5254
  oauthClient: this.oauthClient,
4487
5255
  numRetries: this.numRetries
4488
5256
  });
@@ -4530,15 +5298,25 @@ var RedTeamClient = class {
4530
5298
  }
4531
5299
  };
4532
5300
  export {
5301
+ AIRS_ENDPOINTS,
4533
5302
  AISecSDKException,
4534
5303
  AI_SEC_API_ENDPOINT,
4535
5304
  AI_SEC_API_KEY,
4536
5305
  AI_SEC_API_TOKEN,
4537
5306
  ASYNC_SCAN_PATH,
4538
5307
  Action,
5308
+ AgentEntrySchema,
4539
5309
  AgentMetaSchema,
5310
+ AgentReportSchema,
4540
5311
  AiProfileSchema,
4541
5312
  ApiEndpointType,
5313
+ ApiKeyCreateRequestSchema,
5314
+ ApiKeyDPInfoSchema,
5315
+ ApiKeyDeleteResponseSchema,
5316
+ ApiKeyListResponseSchema,
5317
+ ApiKeyRegenerateRequestSchema,
5318
+ ApiKeySchema,
5319
+ ApiKeysClient,
4542
5320
  AsyncScanObjectSchema,
4543
5321
  AsyncScanResponseSchema,
4544
5322
  AttackDetailResponseSchema,
@@ -4557,11 +5335,17 @@ export {
4557
5335
  Category,
4558
5336
  CategoryModelSchema,
4559
5337
  CategoryReportSchema,
5338
+ CgReportSchema,
5339
+ ClientIdAndCustomerAppSchema,
5340
+ CmdEntrySchema,
5341
+ CmdInjectReportSchema,
4560
5342
  ComplianceReportSchema,
4561
5343
  ComplianceSubCategory,
4562
5344
  ComplianceTechniqueSchema,
4563
5345
  ConnectionParamsSchema,
4564
5346
  Content,
5347
+ ContentErrorSchema,
5348
+ ContentErrorType,
4565
5349
  CountByNameSchema,
4566
5350
  CountedQuotaEnum,
4567
5351
  CreateCustomTopicRequestSchema,
@@ -4586,6 +5370,10 @@ export {
4586
5370
  CustomPromptUpdateRequestSchema,
4587
5371
  CustomTopicListResponseSchema,
4588
5372
  CustomTopicSchema,
5373
+ CustomerAppListResponseSchema,
5374
+ CustomerAppSchema,
5375
+ CustomerAppWithKeysSchema,
5376
+ CustomerAppsClient,
4589
5377
  DEFAULT_ENDPOINT,
4590
5378
  DEFAULT_MGMT_ENDPOINT,
4591
5379
  DEFAULT_MODEL_SEC_DATA_ENDPOINT,
@@ -4598,11 +5386,21 @@ export {
4598
5386
  DashboardOverviewResponseSchema,
4599
5387
  DatabricksConnectionParamsSchema,
4600
5388
  DateRangeFilter,
5389
+ DbsEntrySchema,
5390
+ DbsReportSchema,
4601
5391
  DeleteProfileConflictSchema,
4602
5392
  DeleteProfileResponseSchema,
4603
5393
  DeleteTopicConflictSchema,
4604
5394
  DeleteTopicResponseSchema,
5395
+ DeploymentProfileEntrySchema,
5396
+ DeploymentProfilesClient,
5397
+ DeploymentProfilesResponseSchema,
5398
+ DetectionServiceName,
4605
5399
  DetectionServiceResultSchema,
5400
+ DlpDataProfileSchema2 as DlpDataProfileSchema,
5401
+ DlpPatternDetectionSchema,
5402
+ DlpProfileListResponseSchema,
5403
+ DlpProfilesClient,
4606
5404
  DlpReportSchema,
4607
5405
  DynamicJobMetadataSchema,
4608
5406
  DynamicJobReportSchema,
@@ -4612,6 +5410,7 @@ export {
4612
5410
  ErrorLogSchema,
4613
5411
  ErrorResponseSchema,
4614
5412
  ErrorSource,
5413
+ ErrorStatus,
4615
5414
  ErrorType,
4616
5415
  EvalOutcome,
4617
5416
  EvalSummarySchema,
@@ -4663,11 +5462,20 @@ export {
4663
5462
  MAX_SESSION_ID_STR_LENGTH,
4664
5463
  MAX_TOKEN_LENGTH,
4665
5464
  MAX_TRANSACTION_ID_STR_LENGTH,
5465
+ MGMT_API_KEYS_TSG_PATH,
5466
+ MGMT_API_KEY_PATH,
4666
5467
  MGMT_CLIENT_ID,
4667
5468
  MGMT_CLIENT_SECRET,
5469
+ MGMT_CUSTOMER_APPS_TSG_PATH,
5470
+ MGMT_CUSTOMER_APP_PATH,
5471
+ MGMT_DEPLOYMENT_PROFILES_PATH,
5472
+ MGMT_DLP_PROFILES_PATH,
4668
5473
  MGMT_ENDPOINT,
5474
+ MGMT_OAUTH_INVALIDATE_PATH,
5475
+ MGMT_OAUTH_TOKEN_PATH,
4669
5476
  MGMT_PROFILES_TSG_PATH,
4670
5477
  MGMT_PROFILE_PATH,
5478
+ MGMT_SCAN_LOGS_PATH,
4671
5479
  MGMT_TOKEN_ENDPOINT,
4672
5480
  MGMT_TOPICS_TSG_PATH,
4673
5481
  MGMT_TOPIC_FORCE_PATH,
@@ -4685,8 +5493,11 @@ export {
4685
5493
  MODEL_SEC_TOKEN_ENDPOINT,
4686
5494
  MODEL_SEC_TSG_ID,
4687
5495
  MODEL_SEC_VIOLATIONS_PATH,
5496
+ MalwareReportSchema,
4688
5497
  ManagementClient,
4689
5498
  MaskedDataSchema,
5499
+ McEntrySchema,
5500
+ McReportSchema,
4690
5501
  MetadataSchema,
4691
5502
  ModelScanIssueSchema,
4692
5503
  ModelScanStatus,
@@ -4705,8 +5516,13 @@ export {
4705
5516
  MultiTurnStatefulConfigSchema,
4706
5517
  MultiTurnStatelessConfigSchema,
4707
5518
  OAuthClient,
5519
+ OAuthManagementClient,
5520
+ Oauth2TokenSchema,
5521
+ OffsetSchema,
4708
5522
  OpenAIConnectionParamsSchema,
4709
5523
  PAYLOAD_HASH,
5524
+ PaginatedScanResultsSchema,
5525
+ PatternDetectionSchema,
4710
5526
  PolicySchema,
4711
5527
  PolicyType,
4712
5528
  PrerequisiteModelSchema,
@@ -4789,10 +5605,13 @@ export {
4789
5605
  ScanDetailsSchema,
4790
5606
  ScanIdResultSchema,
4791
5607
  ScanListSchema,
5608
+ ScanLogsClient,
4792
5609
  ScanOrigin,
4793
5610
  ScanRequestContentsInnerSchema,
4794
5611
  ScanRequestSchema,
4795
5612
  ScanResponseSchema,
5613
+ ScanResultEntrySchema,
5614
+ ScanResultForDashboardSchema,
4796
5615
  ScanStatisticsResponseSchema,
4797
5616
  ScanSummarySchema,
4798
5617
  Scanner,
@@ -4839,6 +5658,8 @@ export {
4839
5658
  TargetStatus,
4840
5659
  TargetType,
4841
5660
  TargetUpdateRequestSchema,
5661
+ TcReportSchema,
5662
+ TgReportSchema,
4842
5663
  ThreatCategory,
4843
5664
  ThreatScanReportSchema,
4844
5665
  ToolDetectedSchema,