@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.cjs +2241 -1367
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +24897 -2444
- package/dist/index.d.ts +24897 -2444
- package/dist/index.js +2188 -1367
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -20,15 +20,25 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/index.ts
|
|
21
21
|
var index_exports = {};
|
|
22
22
|
__export(index_exports, {
|
|
23
|
+
AIRS_ENDPOINTS: () => AIRS_ENDPOINTS,
|
|
23
24
|
AISecSDKException: () => AISecSDKException,
|
|
24
25
|
AI_SEC_API_ENDPOINT: () => AI_SEC_API_ENDPOINT,
|
|
25
26
|
AI_SEC_API_KEY: () => AI_SEC_API_KEY,
|
|
26
27
|
AI_SEC_API_TOKEN: () => AI_SEC_API_TOKEN,
|
|
27
28
|
ASYNC_SCAN_PATH: () => ASYNC_SCAN_PATH,
|
|
28
29
|
Action: () => Action,
|
|
30
|
+
AgentEntrySchema: () => AgentEntrySchema,
|
|
29
31
|
AgentMetaSchema: () => AgentMetaSchema,
|
|
32
|
+
AgentReportSchema: () => AgentReportSchema,
|
|
30
33
|
AiProfileSchema: () => AiProfileSchema,
|
|
31
34
|
ApiEndpointType: () => ApiEndpointType,
|
|
35
|
+
ApiKeyCreateRequestSchema: () => ApiKeyCreateRequestSchema,
|
|
36
|
+
ApiKeyDPInfoSchema: () => ApiKeyDPInfoSchema,
|
|
37
|
+
ApiKeyDeleteResponseSchema: () => ApiKeyDeleteResponseSchema,
|
|
38
|
+
ApiKeyListResponseSchema: () => ApiKeyListResponseSchema,
|
|
39
|
+
ApiKeyRegenerateRequestSchema: () => ApiKeyRegenerateRequestSchema,
|
|
40
|
+
ApiKeySchema: () => ApiKeySchema,
|
|
41
|
+
ApiKeysClient: () => ApiKeysClient,
|
|
32
42
|
AsyncScanObjectSchema: () => AsyncScanObjectSchema,
|
|
33
43
|
AsyncScanResponseSchema: () => AsyncScanResponseSchema,
|
|
34
44
|
AttackDetailResponseSchema: () => AttackDetailResponseSchema,
|
|
@@ -47,11 +57,17 @@ __export(index_exports, {
|
|
|
47
57
|
Category: () => Category,
|
|
48
58
|
CategoryModelSchema: () => CategoryModelSchema,
|
|
49
59
|
CategoryReportSchema: () => CategoryReportSchema,
|
|
60
|
+
CgReportSchema: () => CgReportSchema,
|
|
61
|
+
ClientIdAndCustomerAppSchema: () => ClientIdAndCustomerAppSchema,
|
|
62
|
+
CmdEntrySchema: () => CmdEntrySchema,
|
|
63
|
+
CmdInjectReportSchema: () => CmdInjectReportSchema,
|
|
50
64
|
ComplianceReportSchema: () => ComplianceReportSchema,
|
|
51
65
|
ComplianceSubCategory: () => ComplianceSubCategory,
|
|
52
66
|
ComplianceTechniqueSchema: () => ComplianceTechniqueSchema,
|
|
53
67
|
ConnectionParamsSchema: () => ConnectionParamsSchema,
|
|
54
68
|
Content: () => Content,
|
|
69
|
+
ContentErrorSchema: () => ContentErrorSchema,
|
|
70
|
+
ContentErrorType: () => ContentErrorType,
|
|
55
71
|
CountByNameSchema: () => CountByNameSchema,
|
|
56
72
|
CountedQuotaEnum: () => CountedQuotaEnum,
|
|
57
73
|
CreateCustomTopicRequestSchema: () => CreateCustomTopicRequestSchema,
|
|
@@ -76,6 +92,10 @@ __export(index_exports, {
|
|
|
76
92
|
CustomPromptUpdateRequestSchema: () => CustomPromptUpdateRequestSchema,
|
|
77
93
|
CustomTopicListResponseSchema: () => CustomTopicListResponseSchema,
|
|
78
94
|
CustomTopicSchema: () => CustomTopicSchema,
|
|
95
|
+
CustomerAppListResponseSchema: () => CustomerAppListResponseSchema,
|
|
96
|
+
CustomerAppSchema: () => CustomerAppSchema,
|
|
97
|
+
CustomerAppWithKeysSchema: () => CustomerAppWithKeysSchema,
|
|
98
|
+
CustomerAppsClient: () => CustomerAppsClient,
|
|
79
99
|
DEFAULT_ENDPOINT: () => DEFAULT_ENDPOINT,
|
|
80
100
|
DEFAULT_MGMT_ENDPOINT: () => DEFAULT_MGMT_ENDPOINT,
|
|
81
101
|
DEFAULT_MODEL_SEC_DATA_ENDPOINT: () => DEFAULT_MODEL_SEC_DATA_ENDPOINT,
|
|
@@ -88,11 +108,21 @@ __export(index_exports, {
|
|
|
88
108
|
DashboardOverviewResponseSchema: () => DashboardOverviewResponseSchema,
|
|
89
109
|
DatabricksConnectionParamsSchema: () => DatabricksConnectionParamsSchema,
|
|
90
110
|
DateRangeFilter: () => DateRangeFilter,
|
|
111
|
+
DbsEntrySchema: () => DbsEntrySchema,
|
|
112
|
+
DbsReportSchema: () => DbsReportSchema,
|
|
91
113
|
DeleteProfileConflictSchema: () => DeleteProfileConflictSchema,
|
|
92
114
|
DeleteProfileResponseSchema: () => DeleteProfileResponseSchema,
|
|
93
115
|
DeleteTopicConflictSchema: () => DeleteTopicConflictSchema,
|
|
94
116
|
DeleteTopicResponseSchema: () => DeleteTopicResponseSchema,
|
|
117
|
+
DeploymentProfileEntrySchema: () => DeploymentProfileEntrySchema,
|
|
118
|
+
DeploymentProfilesClient: () => DeploymentProfilesClient,
|
|
119
|
+
DeploymentProfilesResponseSchema: () => DeploymentProfilesResponseSchema,
|
|
120
|
+
DetectionServiceName: () => DetectionServiceName,
|
|
95
121
|
DetectionServiceResultSchema: () => DetectionServiceResultSchema,
|
|
122
|
+
DlpDataProfileSchema: () => DlpDataProfileSchema2,
|
|
123
|
+
DlpPatternDetectionSchema: () => DlpPatternDetectionSchema,
|
|
124
|
+
DlpProfileListResponseSchema: () => DlpProfileListResponseSchema,
|
|
125
|
+
DlpProfilesClient: () => DlpProfilesClient,
|
|
96
126
|
DlpReportSchema: () => DlpReportSchema,
|
|
97
127
|
DynamicJobMetadataSchema: () => DynamicJobMetadataSchema,
|
|
98
128
|
DynamicJobReportSchema: () => DynamicJobReportSchema,
|
|
@@ -102,6 +132,7 @@ __export(index_exports, {
|
|
|
102
132
|
ErrorLogSchema: () => ErrorLogSchema,
|
|
103
133
|
ErrorResponseSchema: () => ErrorResponseSchema,
|
|
104
134
|
ErrorSource: () => ErrorSource,
|
|
135
|
+
ErrorStatus: () => ErrorStatus,
|
|
105
136
|
ErrorType: () => ErrorType,
|
|
106
137
|
EvalOutcome: () => EvalOutcome,
|
|
107
138
|
EvalSummarySchema: () => EvalSummarySchema,
|
|
@@ -153,11 +184,20 @@ __export(index_exports, {
|
|
|
153
184
|
MAX_SESSION_ID_STR_LENGTH: () => MAX_SESSION_ID_STR_LENGTH,
|
|
154
185
|
MAX_TOKEN_LENGTH: () => MAX_TOKEN_LENGTH,
|
|
155
186
|
MAX_TRANSACTION_ID_STR_LENGTH: () => MAX_TRANSACTION_ID_STR_LENGTH,
|
|
187
|
+
MGMT_API_KEYS_TSG_PATH: () => MGMT_API_KEYS_TSG_PATH,
|
|
188
|
+
MGMT_API_KEY_PATH: () => MGMT_API_KEY_PATH,
|
|
156
189
|
MGMT_CLIENT_ID: () => MGMT_CLIENT_ID,
|
|
157
190
|
MGMT_CLIENT_SECRET: () => MGMT_CLIENT_SECRET,
|
|
191
|
+
MGMT_CUSTOMER_APPS_TSG_PATH: () => MGMT_CUSTOMER_APPS_TSG_PATH,
|
|
192
|
+
MGMT_CUSTOMER_APP_PATH: () => MGMT_CUSTOMER_APP_PATH,
|
|
193
|
+
MGMT_DEPLOYMENT_PROFILES_PATH: () => MGMT_DEPLOYMENT_PROFILES_PATH,
|
|
194
|
+
MGMT_DLP_PROFILES_PATH: () => MGMT_DLP_PROFILES_PATH,
|
|
158
195
|
MGMT_ENDPOINT: () => MGMT_ENDPOINT,
|
|
196
|
+
MGMT_OAUTH_INVALIDATE_PATH: () => MGMT_OAUTH_INVALIDATE_PATH,
|
|
197
|
+
MGMT_OAUTH_TOKEN_PATH: () => MGMT_OAUTH_TOKEN_PATH,
|
|
159
198
|
MGMT_PROFILES_TSG_PATH: () => MGMT_PROFILES_TSG_PATH,
|
|
160
199
|
MGMT_PROFILE_PATH: () => MGMT_PROFILE_PATH,
|
|
200
|
+
MGMT_SCAN_LOGS_PATH: () => MGMT_SCAN_LOGS_PATH,
|
|
161
201
|
MGMT_TOKEN_ENDPOINT: () => MGMT_TOKEN_ENDPOINT,
|
|
162
202
|
MGMT_TOPICS_TSG_PATH: () => MGMT_TOPICS_TSG_PATH,
|
|
163
203
|
MGMT_TOPIC_FORCE_PATH: () => MGMT_TOPIC_FORCE_PATH,
|
|
@@ -175,8 +215,11 @@ __export(index_exports, {
|
|
|
175
215
|
MODEL_SEC_TOKEN_ENDPOINT: () => MODEL_SEC_TOKEN_ENDPOINT,
|
|
176
216
|
MODEL_SEC_TSG_ID: () => MODEL_SEC_TSG_ID,
|
|
177
217
|
MODEL_SEC_VIOLATIONS_PATH: () => MODEL_SEC_VIOLATIONS_PATH,
|
|
218
|
+
MalwareReportSchema: () => MalwareReportSchema,
|
|
178
219
|
ManagementClient: () => ManagementClient,
|
|
179
220
|
MaskedDataSchema: () => MaskedDataSchema,
|
|
221
|
+
McEntrySchema: () => McEntrySchema,
|
|
222
|
+
McReportSchema: () => McReportSchema,
|
|
180
223
|
MetadataSchema: () => MetadataSchema,
|
|
181
224
|
ModelScanIssueSchema: () => ModelScanIssueSchema,
|
|
182
225
|
ModelScanStatus: () => ModelScanStatus,
|
|
@@ -195,8 +238,13 @@ __export(index_exports, {
|
|
|
195
238
|
MultiTurnStatefulConfigSchema: () => MultiTurnStatefulConfigSchema,
|
|
196
239
|
MultiTurnStatelessConfigSchema: () => MultiTurnStatelessConfigSchema,
|
|
197
240
|
OAuthClient: () => OAuthClient,
|
|
241
|
+
OAuthManagementClient: () => OAuthManagementClient,
|
|
242
|
+
Oauth2TokenSchema: () => Oauth2TokenSchema,
|
|
243
|
+
OffsetSchema: () => OffsetSchema,
|
|
198
244
|
OpenAIConnectionParamsSchema: () => OpenAIConnectionParamsSchema,
|
|
199
245
|
PAYLOAD_HASH: () => PAYLOAD_HASH,
|
|
246
|
+
PaginatedScanResultsSchema: () => PaginatedScanResultsSchema,
|
|
247
|
+
PatternDetectionSchema: () => PatternDetectionSchema,
|
|
200
248
|
PolicySchema: () => PolicySchema,
|
|
201
249
|
PolicyType: () => PolicyType,
|
|
202
250
|
PrerequisiteModelSchema: () => PrerequisiteModelSchema,
|
|
@@ -279,10 +327,13 @@ __export(index_exports, {
|
|
|
279
327
|
ScanDetailsSchema: () => ScanDetailsSchema,
|
|
280
328
|
ScanIdResultSchema: () => ScanIdResultSchema,
|
|
281
329
|
ScanListSchema: () => ScanListSchema,
|
|
330
|
+
ScanLogsClient: () => ScanLogsClient,
|
|
282
331
|
ScanOrigin: () => ScanOrigin,
|
|
283
332
|
ScanRequestContentsInnerSchema: () => ScanRequestContentsInnerSchema,
|
|
284
333
|
ScanRequestSchema: () => ScanRequestSchema,
|
|
285
334
|
ScanResponseSchema: () => ScanResponseSchema,
|
|
335
|
+
ScanResultEntrySchema: () => ScanResultEntrySchema,
|
|
336
|
+
ScanResultForDashboardSchema: () => ScanResultForDashboardSchema,
|
|
286
337
|
ScanStatisticsResponseSchema: () => ScanStatisticsResponseSchema,
|
|
287
338
|
ScanSummarySchema: () => ScanSummarySchema,
|
|
288
339
|
Scanner: () => Scanner,
|
|
@@ -329,6 +380,8 @@ __export(index_exports, {
|
|
|
329
380
|
TargetStatus: () => TargetStatus,
|
|
330
381
|
TargetType: () => TargetType,
|
|
331
382
|
TargetUpdateRequestSchema: () => TargetUpdateRequestSchema,
|
|
383
|
+
TcReportSchema: () => TcReportSchema,
|
|
384
|
+
TgReportSchema: () => TgReportSchema,
|
|
332
385
|
ThreatCategory: () => ThreatCategory,
|
|
333
386
|
ThreatScanReportSchema: () => ThreatScanReportSchema,
|
|
334
387
|
ToolDetectedSchema: () => ToolDetectedSchema,
|
|
@@ -352,6 +405,12 @@ var HEADER_AUTH_TOKEN = "Authorization";
|
|
|
352
405
|
var PAYLOAD_HASH = "x-payload-hash";
|
|
353
406
|
var BEARER = "Bearer ";
|
|
354
407
|
var DEFAULT_ENDPOINT = "https://service.api.aisecurity.paloaltonetworks.com";
|
|
408
|
+
var AIRS_ENDPOINTS = {
|
|
409
|
+
US: "https://service.api.aisecurity.paloaltonetworks.com",
|
|
410
|
+
EU: "https://service-de.api.aisecurity.paloaltonetworks.com",
|
|
411
|
+
INDIA: "https://service-in.api.aisecurity.paloaltonetworks.com",
|
|
412
|
+
SINGAPORE: "https://service-sg.api.aisecurity.paloaltonetworks.com"
|
|
413
|
+
};
|
|
355
414
|
var AI_SEC_API_KEY = "PANW_AI_SEC_API_KEY";
|
|
356
415
|
var AI_SEC_API_TOKEN = "PANW_AI_SEC_API_TOKEN";
|
|
357
416
|
var AI_SEC_API_ENDPOINT = "PANW_AI_SEC_API_ENDPOINT";
|
|
@@ -371,7 +430,7 @@ var MAX_NUMBER_OF_BATCH_SCAN_OBJECTS = 5;
|
|
|
371
430
|
var MAX_CONNECTION_POOL_SIZE = 100;
|
|
372
431
|
var MAX_NUMBER_OF_RETRIES = 5;
|
|
373
432
|
var HTTP_FORCE_RETRY_STATUS_CODES = [500, 502, 503, 504];
|
|
374
|
-
var SDK_VERSION = "0.6.
|
|
433
|
+
var SDK_VERSION = "0.6.3";
|
|
375
434
|
var USER_AGENT = `PAN-AIRS/${SDK_VERSION}-typescript-sdk`;
|
|
376
435
|
var DEFAULT_MGMT_ENDPOINT = "https://api.sase.paloaltonetworks.com/aisec";
|
|
377
436
|
var DEFAULT_TOKEN_ENDPOINT = "https://auth.apps.paloaltonetworks.com/oauth2/access_token";
|
|
@@ -389,6 +448,15 @@ var MGMT_PROFILES_TSG_PATH = "/v1/mgmt/profiles/tsg";
|
|
|
389
448
|
var MGMT_TOPIC_PATH = "/v1/mgmt/topic";
|
|
390
449
|
var MGMT_TOPICS_TSG_PATH = "/v1/mgmt/topics/tsg";
|
|
391
450
|
var MGMT_TOPIC_FORCE_PATH = "/v1/mgmt/topic/force";
|
|
451
|
+
var MGMT_API_KEY_PATH = "/v1/mgmt/apikey";
|
|
452
|
+
var MGMT_API_KEYS_TSG_PATH = "/v1/mgmt/apikeys/tsg";
|
|
453
|
+
var MGMT_DLP_PROFILES_PATH = "/v1/mgmt/dlpprofiles";
|
|
454
|
+
var MGMT_DEPLOYMENT_PROFILES_PATH = "/v1/mgmt/deploymentprofiles";
|
|
455
|
+
var MGMT_SCAN_LOGS_PATH = "/v1/mgmt/scanlogs";
|
|
456
|
+
var MGMT_CUSTOMER_APP_PATH = "/v1/mgmt/customerapp";
|
|
457
|
+
var MGMT_CUSTOMER_APPS_TSG_PATH = "/v1/mgmt/customerapp/tsg";
|
|
458
|
+
var MGMT_OAUTH_INVALIDATE_PATH = "/v1/mgmt/oauth/invalidateToken";
|
|
459
|
+
var MGMT_OAUTH_TOKEN_PATH = "/v1/mgmt/oauth/client_credential/accesstoken";
|
|
392
460
|
var DEFAULT_MODEL_SEC_DATA_ENDPOINT = "https://api.sase.paloaltonetworks.com/aims/data";
|
|
393
461
|
var DEFAULT_MODEL_SEC_MGMT_ENDPOINT = "https://api.sase.paloaltonetworks.com/aims/mgmt";
|
|
394
462
|
var MODEL_SEC_CLIENT_ID = "PANW_MODEL_SEC_CLIENT_ID";
|
|
@@ -770,6 +838,11 @@ var Content = class _Content {
|
|
|
770
838
|
_codePrompt;
|
|
771
839
|
_codeResponse;
|
|
772
840
|
_toolEvent;
|
|
841
|
+
/**
|
|
842
|
+
* Create a new Content instance.
|
|
843
|
+
* @param opts - Content fields; at least one of prompt, response, codePrompt, codeResponse, or toolEvent is required.
|
|
844
|
+
* @throws {AISecSDKException} If no content field is provided or a field exceeds its byte-length limit.
|
|
845
|
+
*/
|
|
773
846
|
constructor(opts) {
|
|
774
847
|
if (!opts.prompt && !opts.response && !opts.codePrompt && !opts.codeResponse && !opts.toolEvent) {
|
|
775
848
|
throw new AISecSDKException(
|
|
@@ -912,13 +985,32 @@ var Category = {
|
|
|
912
985
|
MALICIOUS: "malicious",
|
|
913
986
|
UNKNOWN: "unknown"
|
|
914
987
|
};
|
|
988
|
+
var DetectionServiceName = {
|
|
989
|
+
DLP: "dlp",
|
|
990
|
+
INJECTION: "injection",
|
|
991
|
+
URL_CATS: "url_cats",
|
|
992
|
+
TOXIC_CONTENT: "toxic_content",
|
|
993
|
+
MALICIOUS_CODE: "malicious_code",
|
|
994
|
+
AGENT: "agent",
|
|
995
|
+
TOPIC_VIOLATION: "topic_violation",
|
|
996
|
+
DB_SECURITY: "db_security",
|
|
997
|
+
UNGROUNDED: "ungrounded"
|
|
998
|
+
};
|
|
999
|
+
var ContentErrorType = {
|
|
1000
|
+
PROMPT: "prompt",
|
|
1001
|
+
RESPONSE: "response"
|
|
1002
|
+
};
|
|
1003
|
+
var ErrorStatus = {
|
|
1004
|
+
ERROR: "error",
|
|
1005
|
+
TIMEOUT: "timeout"
|
|
1006
|
+
};
|
|
915
1007
|
|
|
916
1008
|
// src/models/ai-profile.ts
|
|
917
1009
|
var import_zod = require("zod");
|
|
918
1010
|
var AiProfileSchema = import_zod.z.object({
|
|
919
1011
|
profile_id: import_zod.z.string().uuid().optional(),
|
|
920
1012
|
profile_name: import_zod.z.string().max(MAX_AI_PROFILE_NAME_LENGTH).optional()
|
|
921
|
-
}).refine((d) => d.profile_id || d.profile_name, {
|
|
1013
|
+
}).passthrough().refine((d) => d.profile_id || d.profile_name, {
|
|
922
1014
|
message: "Either profile_id or profile_name must be provided"
|
|
923
1015
|
});
|
|
924
1016
|
|
|
@@ -928,14 +1020,14 @@ var AgentMetaSchema = import_zod2.z.object({
|
|
|
928
1020
|
agent_id: import_zod2.z.string().optional(),
|
|
929
1021
|
agent_version: import_zod2.z.string().optional(),
|
|
930
1022
|
agent_arn: import_zod2.z.string().optional()
|
|
931
|
-
});
|
|
1023
|
+
}).passthrough();
|
|
932
1024
|
var MetadataSchema = import_zod2.z.object({
|
|
933
1025
|
app_name: import_zod2.z.string().optional(),
|
|
934
1026
|
app_user: import_zod2.z.string().optional(),
|
|
935
1027
|
ai_model: import_zod2.z.string().optional(),
|
|
936
1028
|
user_ip: import_zod2.z.string().optional(),
|
|
937
1029
|
agent_meta: AgentMetaSchema.optional()
|
|
938
|
-
});
|
|
1030
|
+
}).passthrough();
|
|
939
1031
|
|
|
940
1032
|
// src/models/tool-event.ts
|
|
941
1033
|
var import_zod3 = require("zod");
|
|
@@ -944,12 +1036,12 @@ var ToolEventMetadataSchema = import_zod3.z.object({
|
|
|
944
1036
|
method: import_zod3.z.string(),
|
|
945
1037
|
server_name: import_zod3.z.string(),
|
|
946
1038
|
tool_invoked: import_zod3.z.string().optional()
|
|
947
|
-
});
|
|
1039
|
+
}).passthrough();
|
|
948
1040
|
var ToolEventSchema = import_zod3.z.object({
|
|
949
1041
|
metadata: ToolEventMetadataSchema.optional(),
|
|
950
1042
|
input: import_zod3.z.string().optional(),
|
|
951
1043
|
output: import_zod3.z.string().optional()
|
|
952
|
-
});
|
|
1044
|
+
}).passthrough();
|
|
953
1045
|
|
|
954
1046
|
// src/models/scan-request.ts
|
|
955
1047
|
var import_zod4 = require("zod");
|
|
@@ -960,23 +1052,23 @@ var ScanRequestContentsInnerSchema = import_zod4.z.object({
|
|
|
960
1052
|
code_response: import_zod4.z.string().optional(),
|
|
961
1053
|
context: import_zod4.z.string().optional(),
|
|
962
1054
|
tool_event: ToolEventSchema.optional()
|
|
963
|
-
});
|
|
1055
|
+
}).passthrough();
|
|
964
1056
|
var ScanRequestSchema = import_zod4.z.object({
|
|
965
1057
|
tr_id: import_zod4.z.string().max(MAX_TRANSACTION_ID_STR_LENGTH).optional(),
|
|
966
1058
|
session_id: import_zod4.z.string().max(MAX_SESSION_ID_STR_LENGTH).optional(),
|
|
967
1059
|
ai_profile: AiProfileSchema,
|
|
968
1060
|
metadata: MetadataSchema.optional(),
|
|
969
1061
|
contents: import_zod4.z.array(ScanRequestContentsInnerSchema).min(1)
|
|
970
|
-
});
|
|
1062
|
+
}).passthrough();
|
|
971
1063
|
|
|
972
1064
|
// src/models/scan-response.ts
|
|
973
|
-
var
|
|
1065
|
+
var import_zod8 = require("zod");
|
|
974
1066
|
|
|
975
1067
|
// src/models/prompt-detected.ts
|
|
976
1068
|
var import_zod5 = require("zod");
|
|
977
1069
|
var PromptDetectionDetailsSchema = import_zod5.z.object({
|
|
978
1070
|
topic_guardrails_details: import_zod5.z.record(import_zod5.z.unknown()).optional()
|
|
979
|
-
});
|
|
1071
|
+
}).passthrough();
|
|
980
1072
|
var PromptDetectedSchema = import_zod5.z.object({
|
|
981
1073
|
url_cats: import_zod5.z.boolean().optional(),
|
|
982
1074
|
dlp: import_zod5.z.boolean().optional(),
|
|
@@ -985,13 +1077,13 @@ var PromptDetectedSchema = import_zod5.z.object({
|
|
|
985
1077
|
malicious_code: import_zod5.z.boolean().optional(),
|
|
986
1078
|
agent: import_zod5.z.boolean().optional(),
|
|
987
1079
|
topic_violation: import_zod5.z.boolean().optional()
|
|
988
|
-
});
|
|
1080
|
+
}).passthrough();
|
|
989
1081
|
|
|
990
1082
|
// src/models/response-detected.ts
|
|
991
1083
|
var import_zod6 = require("zod");
|
|
992
1084
|
var ResponseDetectionDetailsSchema = import_zod6.z.object({
|
|
993
1085
|
topic_guardrails_details: import_zod6.z.record(import_zod6.z.unknown()).optional()
|
|
994
|
-
});
|
|
1086
|
+
}).passthrough();
|
|
995
1087
|
var ResponseDetectedSchema = import_zod6.z.object({
|
|
996
1088
|
url_cats: import_zod6.z.boolean().optional(),
|
|
997
1089
|
dlp: import_zod6.z.boolean().optional(),
|
|
@@ -1001,41 +1093,114 @@ var ResponseDetectedSchema = import_zod6.z.object({
|
|
|
1001
1093
|
agent: import_zod6.z.boolean().optional(),
|
|
1002
1094
|
ungrounded: import_zod6.z.boolean().optional(),
|
|
1003
1095
|
topic_violation: import_zod6.z.boolean().optional()
|
|
1004
|
-
});
|
|
1096
|
+
}).passthrough();
|
|
1005
1097
|
|
|
1006
|
-
// src/models/
|
|
1007
|
-
var
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
injection: import_zod7.z.boolean().optional(),
|
|
1015
|
-
toxic_content: import_zod7.z.boolean().optional(),
|
|
1016
|
-
malicious_code: import_zod7.z.boolean().optional()
|
|
1017
|
-
}).passthrough();
|
|
1018
|
-
var ScanSummarySchema = import_zod7.z.object({
|
|
1098
|
+
// src/models/detection-reports.ts
|
|
1099
|
+
var import_zod7 = require("zod");
|
|
1100
|
+
var TcReportSchema = import_zod7.z.object({
|
|
1101
|
+
confidence: import_zod7.z.string().optional(),
|
|
1102
|
+
verdict: import_zod7.z.string().optional()
|
|
1103
|
+
}).passthrough();
|
|
1104
|
+
var DbsEntrySchema = import_zod7.z.object({
|
|
1105
|
+
sub_type: import_zod7.z.string().optional(),
|
|
1019
1106
|
verdict: import_zod7.z.string().optional(),
|
|
1020
1107
|
action: import_zod7.z.string().optional()
|
|
1021
1108
|
}).passthrough();
|
|
1022
|
-
var
|
|
1109
|
+
var DbsReportSchema = import_zod7.z.array(DbsEntrySchema);
|
|
1110
|
+
var McEntrySchema = import_zod7.z.object({
|
|
1111
|
+
file_type: import_zod7.z.string().optional(),
|
|
1112
|
+
code_sha256: import_zod7.z.string().optional()
|
|
1113
|
+
}).passthrough();
|
|
1114
|
+
var MalwareReportSchema = import_zod7.z.object({
|
|
1115
|
+
verdict: import_zod7.z.string().optional()
|
|
1116
|
+
}).passthrough();
|
|
1117
|
+
var CmdEntrySchema = import_zod7.z.object({
|
|
1118
|
+
code_block: import_zod7.z.string().optional(),
|
|
1119
|
+
verdict: import_zod7.z.string().optional()
|
|
1120
|
+
}).passthrough();
|
|
1121
|
+
var CmdInjectReportSchema = import_zod7.z.array(CmdEntrySchema);
|
|
1122
|
+
var McReportSchema = import_zod7.z.object({
|
|
1123
|
+
all_code_blocks: import_zod7.z.array(import_zod7.z.string()).optional(),
|
|
1124
|
+
code_analysis_by_type: import_zod7.z.array(McEntrySchema).optional(),
|
|
1023
1125
|
verdict: import_zod7.z.string().optional(),
|
|
1126
|
+
malware_script_report: MalwareReportSchema.optional(),
|
|
1127
|
+
command_injection_report: CmdInjectReportSchema.optional()
|
|
1128
|
+
}).passthrough();
|
|
1129
|
+
var AgentEntrySchema = import_zod7.z.object({
|
|
1130
|
+
category_type: import_zod7.z.string().optional(),
|
|
1131
|
+
verdict: import_zod7.z.string().optional()
|
|
1132
|
+
}).passthrough();
|
|
1133
|
+
var AgentReportSchema = import_zod7.z.object({
|
|
1134
|
+
model_verdict: import_zod7.z.string().optional(),
|
|
1135
|
+
agent_framework: import_zod7.z.string().optional(),
|
|
1136
|
+
agent_patterns: import_zod7.z.array(AgentEntrySchema).optional()
|
|
1137
|
+
}).passthrough();
|
|
1138
|
+
var TgReportSchema = import_zod7.z.object({
|
|
1139
|
+
allowed_topic_list: import_zod7.z.string().optional(),
|
|
1140
|
+
blocked_topic_list: import_zod7.z.string().optional(),
|
|
1141
|
+
allowedTopics: import_zod7.z.array(import_zod7.z.string()).optional(),
|
|
1142
|
+
blockedTopics: import_zod7.z.array(import_zod7.z.string()).optional()
|
|
1143
|
+
}).passthrough();
|
|
1144
|
+
var CgReportSchema = import_zod7.z.object({
|
|
1145
|
+
status: import_zod7.z.string().optional(),
|
|
1146
|
+
explanation: import_zod7.z.string().optional(),
|
|
1147
|
+
category: import_zod7.z.string().optional()
|
|
1148
|
+
}).passthrough();
|
|
1149
|
+
var OffsetSchema = import_zod7.z.array(import_zod7.z.array(import_zod7.z.number()));
|
|
1150
|
+
var DlpPatternDetectionSchema = import_zod7.z.object({
|
|
1151
|
+
data_pattern_id: import_zod7.z.string().optional(),
|
|
1152
|
+
version: import_zod7.z.number().optional(),
|
|
1153
|
+
name: import_zod7.z.string().optional(),
|
|
1154
|
+
high_confidence_detections: OffsetSchema.optional(),
|
|
1155
|
+
medium_confidence_detections: OffsetSchema.optional(),
|
|
1156
|
+
low_confidence_detections: OffsetSchema.optional()
|
|
1157
|
+
}).passthrough();
|
|
1158
|
+
var PatternDetectionSchema = import_zod7.z.object({
|
|
1159
|
+
pattern: import_zod7.z.string().optional(),
|
|
1160
|
+
locations: OffsetSchema.optional()
|
|
1161
|
+
}).passthrough();
|
|
1162
|
+
var ContentErrorSchema = import_zod7.z.object({
|
|
1163
|
+
content_type: import_zod7.z.string().optional(),
|
|
1164
|
+
feature: import_zod7.z.string().optional(),
|
|
1165
|
+
status: import_zod7.z.string().optional()
|
|
1166
|
+
}).passthrough();
|
|
1167
|
+
|
|
1168
|
+
// src/models/scan-response.ts
|
|
1169
|
+
var MaskedDataSchema = import_zod8.z.object({
|
|
1170
|
+
data: import_zod8.z.string().optional(),
|
|
1171
|
+
pattern_detections: import_zod8.z.array(PatternDetectionSchema).optional()
|
|
1172
|
+
}).passthrough();
|
|
1173
|
+
var IODetectedSchema = import_zod8.z.object({
|
|
1174
|
+
url_cats: import_zod8.z.boolean().optional(),
|
|
1175
|
+
dlp: import_zod8.z.boolean().optional(),
|
|
1176
|
+
injection: import_zod8.z.boolean().optional(),
|
|
1177
|
+
toxic_content: import_zod8.z.boolean().optional(),
|
|
1178
|
+
malicious_code: import_zod8.z.boolean().optional()
|
|
1179
|
+
}).passthrough();
|
|
1180
|
+
var ScanSummarySchema = import_zod8.z.object({
|
|
1181
|
+
verdict: import_zod8.z.string().optional(),
|
|
1182
|
+
action: import_zod8.z.string().optional()
|
|
1183
|
+
}).passthrough();
|
|
1184
|
+
var ToolDetectedSchema = import_zod8.z.object({
|
|
1185
|
+
verdict: import_zod8.z.string().optional(),
|
|
1024
1186
|
metadata: ToolEventMetadataSchema.optional(),
|
|
1025
1187
|
summary: ScanSummarySchema.optional(),
|
|
1026
1188
|
input_detected: IODetectedSchema.optional(),
|
|
1027
1189
|
output_detected: IODetectedSchema.optional()
|
|
1028
|
-
});
|
|
1029
|
-
var ScanResponseSchema =
|
|
1030
|
-
source:
|
|
1031
|
-
report_id:
|
|
1032
|
-
scan_id:
|
|
1033
|
-
tr_id:
|
|
1034
|
-
session_id:
|
|
1035
|
-
profile_id:
|
|
1036
|
-
profile_name:
|
|
1037
|
-
category:
|
|
1038
|
-
action:
|
|
1190
|
+
}).passthrough();
|
|
1191
|
+
var ScanResponseSchema = import_zod8.z.object({
|
|
1192
|
+
source: import_zod8.z.string().optional(),
|
|
1193
|
+
report_id: import_zod8.z.string(),
|
|
1194
|
+
scan_id: import_zod8.z.string(),
|
|
1195
|
+
tr_id: import_zod8.z.string().optional(),
|
|
1196
|
+
session_id: import_zod8.z.string().optional(),
|
|
1197
|
+
profile_id: import_zod8.z.string().optional(),
|
|
1198
|
+
profile_name: import_zod8.z.string().optional(),
|
|
1199
|
+
category: import_zod8.z.string(),
|
|
1200
|
+
action: import_zod8.z.string(),
|
|
1201
|
+
timeout: import_zod8.z.boolean().optional(),
|
|
1202
|
+
error: import_zod8.z.boolean().optional(),
|
|
1203
|
+
errors: import_zod8.z.array(ContentErrorSchema).optional(),
|
|
1039
1204
|
prompt_detected: PromptDetectedSchema.optional(),
|
|
1040
1205
|
response_detected: ResponseDetectedSchema.optional(),
|
|
1041
1206
|
prompt_masked_data: MaskedDataSchema.optional(),
|
|
@@ -1043,221 +1208,459 @@ var ScanResponseSchema = import_zod7.z.object({
|
|
|
1043
1208
|
prompt_detection_details: PromptDetectionDetailsSchema.optional(),
|
|
1044
1209
|
response_detection_details: ResponseDetectionDetailsSchema.optional(),
|
|
1045
1210
|
tool_detected: ToolDetectedSchema.optional(),
|
|
1046
|
-
created_at:
|
|
1047
|
-
completed_at:
|
|
1048
|
-
});
|
|
1211
|
+
created_at: import_zod8.z.string().optional(),
|
|
1212
|
+
completed_at: import_zod8.z.string().optional()
|
|
1213
|
+
}).passthrough();
|
|
1049
1214
|
|
|
1050
1215
|
// src/models/async-scan.ts
|
|
1051
|
-
var
|
|
1052
|
-
var AsyncScanObjectSchema =
|
|
1053
|
-
req_id:
|
|
1216
|
+
var import_zod9 = require("zod");
|
|
1217
|
+
var AsyncScanObjectSchema = import_zod9.z.object({
|
|
1218
|
+
req_id: import_zod9.z.number().int(),
|
|
1054
1219
|
scan_req: ScanRequestSchema
|
|
1055
|
-
});
|
|
1056
|
-
var AsyncScanResponseSchema =
|
|
1057
|
-
received:
|
|
1058
|
-
scan_id:
|
|
1059
|
-
report_id:
|
|
1060
|
-
source:
|
|
1061
|
-
});
|
|
1220
|
+
}).passthrough();
|
|
1221
|
+
var AsyncScanResponseSchema = import_zod9.z.object({
|
|
1222
|
+
received: import_zod9.z.string(),
|
|
1223
|
+
scan_id: import_zod9.z.string(),
|
|
1224
|
+
report_id: import_zod9.z.string().optional(),
|
|
1225
|
+
source: import_zod9.z.string().optional()
|
|
1226
|
+
}).passthrough();
|
|
1062
1227
|
|
|
1063
1228
|
// src/models/scan-id-result.ts
|
|
1064
|
-
var
|
|
1065
|
-
var ScanIdResultSchema =
|
|
1066
|
-
source:
|
|
1067
|
-
req_id:
|
|
1068
|
-
status:
|
|
1069
|
-
scan_id:
|
|
1229
|
+
var import_zod10 = require("zod");
|
|
1230
|
+
var ScanIdResultSchema = import_zod10.z.object({
|
|
1231
|
+
source: import_zod10.z.string().optional(),
|
|
1232
|
+
req_id: import_zod10.z.number().optional(),
|
|
1233
|
+
status: import_zod10.z.string().optional(),
|
|
1234
|
+
scan_id: import_zod10.z.string().optional(),
|
|
1070
1235
|
result: ScanResponseSchema.optional()
|
|
1071
|
-
});
|
|
1236
|
+
}).passthrough();
|
|
1072
1237
|
|
|
1073
1238
|
// src/models/threat-report.ts
|
|
1074
|
-
var
|
|
1239
|
+
var import_zod14 = require("zod");
|
|
1075
1240
|
|
|
1076
1241
|
// src/models/detection.ts
|
|
1077
|
-
var
|
|
1242
|
+
var import_zod13 = require("zod");
|
|
1078
1243
|
|
|
1079
1244
|
// src/models/dlp-report.ts
|
|
1080
|
-
var
|
|
1081
|
-
var DlpReportSchema =
|
|
1082
|
-
dlp_report_id:
|
|
1083
|
-
dlp_profile_name:
|
|
1084
|
-
dlp_profile_id:
|
|
1085
|
-
dlp_profile_version:
|
|
1086
|
-
data_pattern_rule1_verdict:
|
|
1087
|
-
data_pattern_rule2_verdict:
|
|
1088
|
-
|
|
1245
|
+
var import_zod11 = require("zod");
|
|
1246
|
+
var DlpReportSchema = import_zod11.z.object({
|
|
1247
|
+
dlp_report_id: import_zod11.z.string().optional(),
|
|
1248
|
+
dlp_profile_name: import_zod11.z.string().optional(),
|
|
1249
|
+
dlp_profile_id: import_zod11.z.string().optional(),
|
|
1250
|
+
dlp_profile_version: import_zod11.z.number().optional(),
|
|
1251
|
+
data_pattern_rule1_verdict: import_zod11.z.string().optional(),
|
|
1252
|
+
data_pattern_rule2_verdict: import_zod11.z.string().optional(),
|
|
1253
|
+
data_pattern_detection_offsets: import_zod11.z.array(DlpPatternDetectionSchema).optional()
|
|
1254
|
+
}).passthrough();
|
|
1089
1255
|
|
|
1090
1256
|
// src/models/urlf-report.ts
|
|
1091
|
-
var
|
|
1092
|
-
var UrlfEntrySchema =
|
|
1093
|
-
url:
|
|
1094
|
-
risk_level:
|
|
1095
|
-
|
|
1096
|
-
|
|
1257
|
+
var import_zod12 = require("zod");
|
|
1258
|
+
var UrlfEntrySchema = import_zod12.z.object({
|
|
1259
|
+
url: import_zod12.z.string().optional(),
|
|
1260
|
+
risk_level: import_zod12.z.string().optional(),
|
|
1261
|
+
action: import_zod12.z.string().optional(),
|
|
1262
|
+
categories: import_zod12.z.array(import_zod12.z.string()).optional()
|
|
1263
|
+
}).passthrough();
|
|
1097
1264
|
|
|
1098
1265
|
// src/models/detection.ts
|
|
1099
|
-
var DSDetailResultSchema =
|
|
1100
|
-
urlf_report:
|
|
1101
|
-
dlp_report: DlpReportSchema.optional()
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1266
|
+
var DSDetailResultSchema = import_zod13.z.object({
|
|
1267
|
+
urlf_report: import_zod13.z.array(UrlfEntrySchema).optional(),
|
|
1268
|
+
dlp_report: DlpReportSchema.optional(),
|
|
1269
|
+
dbs_report: DbsReportSchema.optional(),
|
|
1270
|
+
tc_report: TcReportSchema.optional(),
|
|
1271
|
+
mc_report: McReportSchema.optional(),
|
|
1272
|
+
agent_report: AgentReportSchema.optional(),
|
|
1273
|
+
topic_guardrails_report: TgReportSchema.optional(),
|
|
1274
|
+
cg_report: CgReportSchema.optional()
|
|
1275
|
+
}).passthrough();
|
|
1276
|
+
var DSResultMetadataSchema = import_zod13.z.object({
|
|
1277
|
+
score: import_zod13.z.number().optional(),
|
|
1278
|
+
confidence: import_zod13.z.string().optional(),
|
|
1279
|
+
ecosystem: import_zod13.z.string().optional(),
|
|
1280
|
+
method: import_zod13.z.string().optional(),
|
|
1281
|
+
server_name: import_zod13.z.string().optional(),
|
|
1282
|
+
tool_invoked: import_zod13.z.string().optional(),
|
|
1283
|
+
direction: import_zod13.z.string().optional()
|
|
1284
|
+
}).passthrough();
|
|
1285
|
+
var DetectionServiceResultSchema = import_zod13.z.object({
|
|
1286
|
+
data_type: import_zod13.z.string().optional(),
|
|
1287
|
+
detection_service: import_zod13.z.string().optional(),
|
|
1288
|
+
verdict: import_zod13.z.string().optional(),
|
|
1289
|
+
action: import_zod13.z.string().optional(),
|
|
1112
1290
|
metadata: DSResultMetadataSchema.optional(),
|
|
1113
1291
|
result_detail: DSDetailResultSchema.optional()
|
|
1114
|
-
});
|
|
1292
|
+
}).passthrough();
|
|
1115
1293
|
|
|
1116
1294
|
// src/models/threat-report.ts
|
|
1117
|
-
var ThreatScanReportSchema =
|
|
1118
|
-
source:
|
|
1119
|
-
report_id:
|
|
1120
|
-
scan_id:
|
|
1121
|
-
req_id:
|
|
1122
|
-
transaction_id:
|
|
1123
|
-
session_id:
|
|
1124
|
-
detection_results:
|
|
1125
|
-
});
|
|
1295
|
+
var ThreatScanReportSchema = import_zod14.z.object({
|
|
1296
|
+
source: import_zod14.z.string().optional(),
|
|
1297
|
+
report_id: import_zod14.z.string().optional(),
|
|
1298
|
+
scan_id: import_zod14.z.string().optional(),
|
|
1299
|
+
req_id: import_zod14.z.number().optional(),
|
|
1300
|
+
transaction_id: import_zod14.z.string().optional(),
|
|
1301
|
+
session_id: import_zod14.z.string().optional(),
|
|
1302
|
+
detection_results: import_zod14.z.array(DetectionServiceResultSchema).optional()
|
|
1303
|
+
}).passthrough();
|
|
1126
1304
|
|
|
1127
1305
|
// src/models/error-response.ts
|
|
1128
|
-
var
|
|
1129
|
-
var ErrorResponseSchema =
|
|
1130
|
-
status_code:
|
|
1131
|
-
message:
|
|
1132
|
-
error:
|
|
1133
|
-
message:
|
|
1306
|
+
var import_zod15 = require("zod");
|
|
1307
|
+
var ErrorResponseSchema = import_zod15.z.object({
|
|
1308
|
+
status_code: import_zod15.z.number().optional(),
|
|
1309
|
+
message: import_zod15.z.string().optional(),
|
|
1310
|
+
error: import_zod15.z.object({
|
|
1311
|
+
message: import_zod15.z.string().optional()
|
|
1134
1312
|
}).passthrough().optional(),
|
|
1135
|
-
retry_after:
|
|
1136
|
-
interval:
|
|
1137
|
-
unit:
|
|
1313
|
+
retry_after: import_zod15.z.object({
|
|
1314
|
+
interval: import_zod15.z.number().optional(),
|
|
1315
|
+
unit: import_zod15.z.string().optional()
|
|
1138
1316
|
}).optional()
|
|
1139
1317
|
});
|
|
1140
1318
|
|
|
1141
1319
|
// src/models/mgmt-security-profile.ts
|
|
1142
|
-
var
|
|
1143
|
-
var DlpDataProfileSchema =
|
|
1144
|
-
profile_name:
|
|
1145
|
-
active:
|
|
1320
|
+
var import_zod16 = require("zod");
|
|
1321
|
+
var DlpDataProfileSchema = import_zod16.z.object({
|
|
1322
|
+
profile_name: import_zod16.z.string(),
|
|
1323
|
+
active: import_zod16.z.boolean().optional()
|
|
1146
1324
|
}).passthrough();
|
|
1147
|
-
var DlpSchema =
|
|
1148
|
-
dlp_status:
|
|
1149
|
-
data_profiles:
|
|
1325
|
+
var DlpSchema = import_zod16.z.object({
|
|
1326
|
+
dlp_status: import_zod16.z.string().optional(),
|
|
1327
|
+
data_profiles: import_zod16.z.array(DlpDataProfileSchema).optional()
|
|
1150
1328
|
}).passthrough();
|
|
1151
|
-
var DataLeakDetectionSchema =
|
|
1152
|
-
"data-leak-detection-status":
|
|
1329
|
+
var DataLeakDetectionSchema = import_zod16.z.object({
|
|
1330
|
+
"data-leak-detection-status": import_zod16.z.string().optional(),
|
|
1153
1331
|
dlp: DlpSchema.optional()
|
|
1154
1332
|
}).passthrough();
|
|
1155
|
-
var AppProtectionSchema =
|
|
1156
|
-
"prompt-injection":
|
|
1157
|
-
"jailbreak-detection":
|
|
1333
|
+
var AppProtectionSchema = import_zod16.z.object({
|
|
1334
|
+
"prompt-injection": import_zod16.z.string().optional(),
|
|
1335
|
+
"jailbreak-detection": import_zod16.z.string().optional()
|
|
1158
1336
|
}).passthrough();
|
|
1159
|
-
var ModelProtectionSchema =
|
|
1160
|
-
"model-denial-of-service":
|
|
1337
|
+
var ModelProtectionSchema = import_zod16.z.object({
|
|
1338
|
+
"model-denial-of-service": import_zod16.z.string().optional()
|
|
1161
1339
|
}).passthrough();
|
|
1162
|
-
var AgentProtectionSchema =
|
|
1163
|
-
"malicious-agent-activity":
|
|
1340
|
+
var AgentProtectionSchema = import_zod16.z.object({
|
|
1341
|
+
"malicious-agent-activity": import_zod16.z.string().optional()
|
|
1164
1342
|
}).passthrough();
|
|
1165
|
-
var LatencySchema =
|
|
1166
|
-
status:
|
|
1167
|
-
max_latency_ms:
|
|
1343
|
+
var LatencySchema = import_zod16.z.object({
|
|
1344
|
+
status: import_zod16.z.string().optional(),
|
|
1345
|
+
max_latency_ms: import_zod16.z.number().optional()
|
|
1168
1346
|
}).passthrough();
|
|
1169
|
-
var ModelConfigurationSchema =
|
|
1347
|
+
var ModelConfigurationSchema = import_zod16.z.object({
|
|
1170
1348
|
latency: LatencySchema.optional()
|
|
1171
1349
|
}).passthrough();
|
|
1172
|
-
var PolicySchema =
|
|
1350
|
+
var PolicySchema = import_zod16.z.object({
|
|
1173
1351
|
"data-leak-detection": DataLeakDetectionSchema.optional(),
|
|
1174
1352
|
"app-protection": AppProtectionSchema.optional(),
|
|
1175
1353
|
"model-protection": ModelProtectionSchema.optional(),
|
|
1176
1354
|
"agent-protection": AgentProtectionSchema.optional(),
|
|
1177
1355
|
"model-configuration": ModelConfigurationSchema.optional()
|
|
1178
1356
|
}).passthrough();
|
|
1179
|
-
var SecurityProfileSchema =
|
|
1180
|
-
profile_id:
|
|
1181
|
-
profile_name:
|
|
1182
|
-
revision: import_zod15.z.number().optional(),
|
|
1183
|
-
active: import_zod15.z.boolean().optional(),
|
|
1184
|
-
policy: PolicySchema.optional(),
|
|
1185
|
-
created_by: import_zod15.z.string().optional(),
|
|
1186
|
-
updated_by: import_zod15.z.string().optional(),
|
|
1187
|
-
last_modified_ts: import_zod15.z.string().optional()
|
|
1188
|
-
}).passthrough();
|
|
1189
|
-
var CreateSecurityProfileRequestSchema = import_zod15.z.object({
|
|
1190
|
-
profile_id: import_zod15.z.string().optional(),
|
|
1191
|
-
profile_name: import_zod15.z.string(),
|
|
1192
|
-
revision: import_zod15.z.number().optional(),
|
|
1193
|
-
active: import_zod15.z.boolean().optional(),
|
|
1194
|
-
policy: PolicySchema.optional(),
|
|
1195
|
-
created_by: import_zod15.z.string().optional(),
|
|
1196
|
-
updated_by: import_zod15.z.string().optional(),
|
|
1197
|
-
last_modified_ts: import_zod15.z.string().optional()
|
|
1198
|
-
}).passthrough();
|
|
1199
|
-
var SecurityProfileListResponseSchema = import_zod15.z.object({
|
|
1200
|
-
ai_profiles: import_zod15.z.array(SecurityProfileSchema),
|
|
1201
|
-
next_offset: import_zod15.z.number().optional()
|
|
1202
|
-
}).passthrough();
|
|
1203
|
-
var DeleteProfileResponseSchema = import_zod15.z.object({
|
|
1204
|
-
message: import_zod15.z.string()
|
|
1205
|
-
}).passthrough();
|
|
1206
|
-
var DeleteProfileConflictSchema = import_zod15.z.object({
|
|
1207
|
-
message: import_zod15.z.string(),
|
|
1208
|
-
payload: import_zod15.z.array(
|
|
1209
|
-
import_zod15.z.object({
|
|
1210
|
-
policy_id: import_zod15.z.string(),
|
|
1211
|
-
policy_name: import_zod15.z.string(),
|
|
1212
|
-
priority: import_zod15.z.number()
|
|
1213
|
-
}).passthrough()
|
|
1214
|
-
)
|
|
1215
|
-
}).passthrough();
|
|
1216
|
-
|
|
1217
|
-
// src/models/mgmt-custom-topic.ts
|
|
1218
|
-
var import_zod16 = require("zod");
|
|
1219
|
-
var CustomTopicSchema = import_zod16.z.object({
|
|
1220
|
-
topic_id: import_zod16.z.string().optional(),
|
|
1221
|
-
topic_name: import_zod16.z.string(),
|
|
1357
|
+
var SecurityProfileSchema = import_zod16.z.object({
|
|
1358
|
+
profile_id: import_zod16.z.string().optional(),
|
|
1359
|
+
profile_name: import_zod16.z.string(),
|
|
1222
1360
|
revision: import_zod16.z.number().optional(),
|
|
1223
1361
|
active: import_zod16.z.boolean().optional(),
|
|
1224
|
-
|
|
1225
|
-
examples: import_zod16.z.array(import_zod16.z.string()).optional(),
|
|
1362
|
+
policy: PolicySchema.optional(),
|
|
1226
1363
|
created_by: import_zod16.z.string().optional(),
|
|
1227
1364
|
updated_by: import_zod16.z.string().optional(),
|
|
1228
|
-
last_modified_ts: import_zod16.z.string().optional()
|
|
1229
|
-
created_ts: import_zod16.z.string().optional()
|
|
1365
|
+
last_modified_ts: import_zod16.z.string().optional()
|
|
1230
1366
|
}).passthrough();
|
|
1231
|
-
var
|
|
1232
|
-
|
|
1233
|
-
|
|
1367
|
+
var CreateSecurityProfileRequestSchema = import_zod16.z.object({
|
|
1368
|
+
profile_id: import_zod16.z.string().optional(),
|
|
1369
|
+
profile_name: import_zod16.z.string(),
|
|
1234
1370
|
revision: import_zod16.z.number().optional(),
|
|
1235
1371
|
active: import_zod16.z.boolean().optional(),
|
|
1236
|
-
|
|
1237
|
-
examples: import_zod16.z.array(import_zod16.z.string()).optional(),
|
|
1372
|
+
policy: PolicySchema.optional(),
|
|
1238
1373
|
created_by: import_zod16.z.string().optional(),
|
|
1239
1374
|
updated_by: import_zod16.z.string().optional(),
|
|
1240
|
-
last_modified_ts: import_zod16.z.string().optional()
|
|
1241
|
-
created_ts: import_zod16.z.string().optional()
|
|
1375
|
+
last_modified_ts: import_zod16.z.string().optional()
|
|
1242
1376
|
}).passthrough();
|
|
1243
|
-
var
|
|
1244
|
-
|
|
1377
|
+
var SecurityProfileListResponseSchema = import_zod16.z.object({
|
|
1378
|
+
ai_profiles: import_zod16.z.array(SecurityProfileSchema),
|
|
1245
1379
|
next_offset: import_zod16.z.number().optional()
|
|
1246
1380
|
}).passthrough();
|
|
1247
|
-
var
|
|
1381
|
+
var DeleteProfileResponseSchema = import_zod16.z.object({
|
|
1248
1382
|
message: import_zod16.z.string()
|
|
1249
1383
|
}).passthrough();
|
|
1250
|
-
var
|
|
1384
|
+
var DeleteProfileConflictSchema = import_zod16.z.object({
|
|
1251
1385
|
message: import_zod16.z.string(),
|
|
1252
1386
|
payload: import_zod16.z.array(
|
|
1253
1387
|
import_zod16.z.object({
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1388
|
+
policy_id: import_zod16.z.string(),
|
|
1389
|
+
policy_name: import_zod16.z.string(),
|
|
1390
|
+
priority: import_zod16.z.number()
|
|
1391
|
+
}).passthrough()
|
|
1392
|
+
)
|
|
1393
|
+
}).passthrough();
|
|
1394
|
+
|
|
1395
|
+
// src/models/mgmt-custom-topic.ts
|
|
1396
|
+
var import_zod17 = require("zod");
|
|
1397
|
+
var CustomTopicSchema = import_zod17.z.object({
|
|
1398
|
+
topic_id: import_zod17.z.string().optional(),
|
|
1399
|
+
topic_name: import_zod17.z.string(),
|
|
1400
|
+
revision: import_zod17.z.number().optional(),
|
|
1401
|
+
active: import_zod17.z.boolean().optional(),
|
|
1402
|
+
description: import_zod17.z.string().optional(),
|
|
1403
|
+
examples: import_zod17.z.array(import_zod17.z.string()).optional(),
|
|
1404
|
+
created_by: import_zod17.z.string().optional(),
|
|
1405
|
+
updated_by: import_zod17.z.string().optional(),
|
|
1406
|
+
last_modified_ts: import_zod17.z.string().optional(),
|
|
1407
|
+
created_ts: import_zod17.z.string().optional()
|
|
1408
|
+
}).passthrough();
|
|
1409
|
+
var CreateCustomTopicRequestSchema = import_zod17.z.object({
|
|
1410
|
+
topic_id: import_zod17.z.string().optional(),
|
|
1411
|
+
topic_name: import_zod17.z.string(),
|
|
1412
|
+
revision: import_zod17.z.number().optional(),
|
|
1413
|
+
active: import_zod17.z.boolean().optional(),
|
|
1414
|
+
description: import_zod17.z.string().optional(),
|
|
1415
|
+
examples: import_zod17.z.array(import_zod17.z.string()).optional(),
|
|
1416
|
+
created_by: import_zod17.z.string().optional(),
|
|
1417
|
+
updated_by: import_zod17.z.string().optional(),
|
|
1418
|
+
last_modified_ts: import_zod17.z.string().optional(),
|
|
1419
|
+
created_ts: import_zod17.z.string().optional()
|
|
1420
|
+
}).passthrough();
|
|
1421
|
+
var CustomTopicListResponseSchema = import_zod17.z.object({
|
|
1422
|
+
custom_topics: import_zod17.z.array(CustomTopicSchema),
|
|
1423
|
+
next_offset: import_zod17.z.number().optional()
|
|
1424
|
+
}).passthrough();
|
|
1425
|
+
var DeleteTopicResponseSchema = import_zod17.z.object({
|
|
1426
|
+
message: import_zod17.z.string()
|
|
1427
|
+
}).passthrough();
|
|
1428
|
+
var DeleteTopicConflictSchema = import_zod17.z.object({
|
|
1429
|
+
message: import_zod17.z.string(),
|
|
1430
|
+
payload: import_zod17.z.array(
|
|
1431
|
+
import_zod17.z.object({
|
|
1432
|
+
profile_id: import_zod17.z.string(),
|
|
1433
|
+
profile_name: import_zod17.z.string(),
|
|
1434
|
+
revision: import_zod17.z.number()
|
|
1257
1435
|
}).passthrough()
|
|
1258
1436
|
)
|
|
1259
1437
|
}).passthrough();
|
|
1260
1438
|
|
|
1439
|
+
// src/models/mgmt-api-key.ts
|
|
1440
|
+
var import_zod18 = require("zod");
|
|
1441
|
+
var ApiKeySchema = import_zod18.z.object({
|
|
1442
|
+
api_key_id: import_zod18.z.string(),
|
|
1443
|
+
api_key_last8: import_zod18.z.string(),
|
|
1444
|
+
api_key_name: import_zod18.z.string().optional(),
|
|
1445
|
+
auth_code: import_zod18.z.string(),
|
|
1446
|
+
csp_id: import_zod18.z.string().optional(),
|
|
1447
|
+
tsg_id: import_zod18.z.string().optional(),
|
|
1448
|
+
expiration: import_zod18.z.string(),
|
|
1449
|
+
revoked: import_zod18.z.boolean(),
|
|
1450
|
+
revoke_reason: import_zod18.z.string().optional(),
|
|
1451
|
+
cust_app: import_zod18.z.string().optional(),
|
|
1452
|
+
cust_env: import_zod18.z.string().optional(),
|
|
1453
|
+
cust_ai_agent_framework: import_zod18.z.string().optional(),
|
|
1454
|
+
cust_cloud_provider: import_zod18.z.string().optional(),
|
|
1455
|
+
created_by: import_zod18.z.string().optional(),
|
|
1456
|
+
updated_by: import_zod18.z.string().optional(),
|
|
1457
|
+
last_modified_ts: import_zod18.z.string().optional(),
|
|
1458
|
+
rotation_time_interval: import_zod18.z.number().optional(),
|
|
1459
|
+
rotation_time_unit: import_zod18.z.string().optional(),
|
|
1460
|
+
dp_name: import_zod18.z.string().optional(),
|
|
1461
|
+
status: import_zod18.z.string().optional(),
|
|
1462
|
+
api_key: import_zod18.z.string().optional(),
|
|
1463
|
+
lic_expiration: import_zod18.z.string().optional(),
|
|
1464
|
+
avg_text_records: import_zod18.z.number().optional(),
|
|
1465
|
+
creation_ts: import_zod18.z.string().optional(),
|
|
1466
|
+
customer_appId: import_zod18.z.string().optional()
|
|
1467
|
+
}).passthrough();
|
|
1468
|
+
var ApiKeyCreateRequestSchema = import_zod18.z.object({
|
|
1469
|
+
dp_name: import_zod18.z.string().optional(),
|
|
1470
|
+
auth_code: import_zod18.z.string(),
|
|
1471
|
+
cust_app: import_zod18.z.string(),
|
|
1472
|
+
cust_env: import_zod18.z.string().optional(),
|
|
1473
|
+
cust_cloud_provider: import_zod18.z.string().optional(),
|
|
1474
|
+
cust_ai_agent_framework: import_zod18.z.string().optional(),
|
|
1475
|
+
revoked: import_zod18.z.boolean(),
|
|
1476
|
+
created_by: import_zod18.z.string(),
|
|
1477
|
+
api_key_name: import_zod18.z.string(),
|
|
1478
|
+
rotation_time_interval: import_zod18.z.number(),
|
|
1479
|
+
rotation_time_unit: import_zod18.z.string()
|
|
1480
|
+
});
|
|
1481
|
+
var ApiKeyRegenerateRequestSchema = import_zod18.z.object({
|
|
1482
|
+
rotation_time_interval: import_zod18.z.number(),
|
|
1483
|
+
rotation_time_unit: import_zod18.z.string(),
|
|
1484
|
+
updated_by: import_zod18.z.string().optional()
|
|
1485
|
+
});
|
|
1486
|
+
var ApiKeyListResponseSchema = import_zod18.z.object({
|
|
1487
|
+
api_keys: import_zod18.z.array(ApiKeySchema).optional(),
|
|
1488
|
+
next_offset: import_zod18.z.number().optional()
|
|
1489
|
+
}).passthrough();
|
|
1490
|
+
var ApiKeyDeleteResponseSchema = import_zod18.z.object({
|
|
1491
|
+
message: import_zod18.z.string().optional()
|
|
1492
|
+
}).passthrough();
|
|
1493
|
+
|
|
1494
|
+
// src/models/mgmt-customer-app.ts
|
|
1495
|
+
var import_zod19 = require("zod");
|
|
1496
|
+
var ApiKeyDPInfoSchema = import_zod19.z.object({
|
|
1497
|
+
api_key_name: import_zod19.z.string(),
|
|
1498
|
+
dp_name: import_zod19.z.string(),
|
|
1499
|
+
auth_code: import_zod19.z.string()
|
|
1500
|
+
}).passthrough();
|
|
1501
|
+
var CustomerAppSchema = import_zod19.z.object({
|
|
1502
|
+
customer_appId: import_zod19.z.string().optional(),
|
|
1503
|
+
tsg_id: import_zod19.z.string(),
|
|
1504
|
+
app_name: import_zod19.z.string(),
|
|
1505
|
+
model_name: import_zod19.z.string().optional(),
|
|
1506
|
+
cloud_provider: import_zod19.z.string(),
|
|
1507
|
+
environment: import_zod19.z.string(),
|
|
1508
|
+
status: import_zod19.z.string().optional(),
|
|
1509
|
+
created_by: import_zod19.z.string().optional(),
|
|
1510
|
+
updated_by: import_zod19.z.string().optional(),
|
|
1511
|
+
ai_agent_framework: import_zod19.z.string().optional()
|
|
1512
|
+
}).passthrough();
|
|
1513
|
+
var CustomerAppWithKeysSchema = import_zod19.z.object({
|
|
1514
|
+
customer_appId: import_zod19.z.string(),
|
|
1515
|
+
tsg_id: import_zod19.z.string(),
|
|
1516
|
+
app_name: import_zod19.z.string(),
|
|
1517
|
+
model_name: import_zod19.z.string().optional(),
|
|
1518
|
+
cloud_provider: import_zod19.z.string(),
|
|
1519
|
+
environment: import_zod19.z.string(),
|
|
1520
|
+
ai_agent_framework: import_zod19.z.string().optional(),
|
|
1521
|
+
api_keys_dp_info: import_zod19.z.array(ApiKeyDPInfoSchema).optional()
|
|
1522
|
+
}).passthrough();
|
|
1523
|
+
var CustomerAppListResponseSchema = import_zod19.z.object({
|
|
1524
|
+
customer_apps: import_zod19.z.array(CustomerAppWithKeysSchema).optional(),
|
|
1525
|
+
next_offset: import_zod19.z.number().optional()
|
|
1526
|
+
}).passthrough();
|
|
1527
|
+
|
|
1528
|
+
// src/models/mgmt-deployment-profile.ts
|
|
1529
|
+
var import_zod20 = require("zod");
|
|
1530
|
+
var DeploymentProfileEntrySchema = import_zod20.z.object({
|
|
1531
|
+
dp_name: import_zod20.z.string(),
|
|
1532
|
+
auth_code: import_zod20.z.string(),
|
|
1533
|
+
tsg_id: import_zod20.z.string().optional(),
|
|
1534
|
+
status: import_zod20.z.string().optional(),
|
|
1535
|
+
expiration_date: import_zod20.z.string().optional(),
|
|
1536
|
+
ave_text_records: import_zod20.z.number().optional()
|
|
1537
|
+
}).passthrough();
|
|
1538
|
+
var DeploymentProfilesResponseSchema = import_zod20.z.object({
|
|
1539
|
+
deployment_profiles: import_zod20.z.array(DeploymentProfileEntrySchema),
|
|
1540
|
+
status: import_zod20.z.string()
|
|
1541
|
+
}).passthrough();
|
|
1542
|
+
|
|
1543
|
+
// src/models/mgmt-dlp-profile.ts
|
|
1544
|
+
var import_zod21 = require("zod");
|
|
1545
|
+
var DlpDataProfileSchema2 = import_zod21.z.object({
|
|
1546
|
+
name: import_zod21.z.string(),
|
|
1547
|
+
uuid: import_zod21.z.string(),
|
|
1548
|
+
id: import_zod21.z.string().optional(),
|
|
1549
|
+
version: import_zod21.z.string().optional(),
|
|
1550
|
+
rule1: import_zod21.z.object({ action: import_zod21.z.string().optional() }).passthrough().optional(),
|
|
1551
|
+
rule2: import_zod21.z.object({ action: import_zod21.z.string().optional() }).passthrough().optional(),
|
|
1552
|
+
"log-severity": import_zod21.z.string().optional(),
|
|
1553
|
+
"non-file-based": import_zod21.z.string().optional(),
|
|
1554
|
+
"file-based": import_zod21.z.string().optional()
|
|
1555
|
+
}).passthrough();
|
|
1556
|
+
var DlpProfileListResponseSchema = import_zod21.z.object({
|
|
1557
|
+
dlp_profiles: import_zod21.z.array(DlpDataProfileSchema2).optional()
|
|
1558
|
+
}).passthrough();
|
|
1559
|
+
|
|
1560
|
+
// src/models/mgmt-scan-log.ts
|
|
1561
|
+
var import_zod22 = require("zod");
|
|
1562
|
+
var ScanResultEntrySchema = import_zod22.z.object({
|
|
1563
|
+
csp_id: import_zod22.z.string(),
|
|
1564
|
+
tsg_id: import_zod22.z.string(),
|
|
1565
|
+
scan_id: import_zod22.z.string(),
|
|
1566
|
+
scan_sub_req_id: import_zod22.z.number(),
|
|
1567
|
+
api_key_name: import_zod22.z.string(),
|
|
1568
|
+
app_name: import_zod22.z.string(),
|
|
1569
|
+
tokens: import_zod22.z.number(),
|
|
1570
|
+
text_records: import_zod22.z.number(),
|
|
1571
|
+
transaction_id: import_zod22.z.string().optional(),
|
|
1572
|
+
profile_id: import_zod22.z.string().optional(),
|
|
1573
|
+
profile_name: import_zod22.z.string().optional(),
|
|
1574
|
+
model_name: import_zod22.z.string().optional(),
|
|
1575
|
+
user: import_zod22.z.string().optional(),
|
|
1576
|
+
environment: import_zod22.z.string().optional(),
|
|
1577
|
+
cloud_provider: import_zod22.z.string().optional(),
|
|
1578
|
+
agent_framework: import_zod22.z.string().optional(),
|
|
1579
|
+
report_id: import_zod22.z.string().optional(),
|
|
1580
|
+
received_ts: import_zod22.z.string().optional(),
|
|
1581
|
+
completed_ts: import_zod22.z.string().optional(),
|
|
1582
|
+
status: import_zod22.z.string().optional(),
|
|
1583
|
+
verdict: import_zod22.z.string().optional(),
|
|
1584
|
+
action: import_zod22.z.string().optional(),
|
|
1585
|
+
is_prompt: import_zod22.z.boolean().optional(),
|
|
1586
|
+
is_response: import_zod22.z.boolean().optional(),
|
|
1587
|
+
pi_final_verdict: import_zod22.z.string().optional(),
|
|
1588
|
+
uf_final_verdict: import_zod22.z.string().optional(),
|
|
1589
|
+
dlp_final_verdict: import_zod22.z.string().optional(),
|
|
1590
|
+
dbs_final_verdict: import_zod22.z.string().optional(),
|
|
1591
|
+
tc_final_verdict: import_zod22.z.string().optional(),
|
|
1592
|
+
mc_final_verdict: import_zod22.z.string().optional(),
|
|
1593
|
+
agent_final_verdict: import_zod22.z.string().optional(),
|
|
1594
|
+
cg_final_verdict: import_zod22.z.string().optional(),
|
|
1595
|
+
tg_final_verdict: import_zod22.z.string().optional(),
|
|
1596
|
+
prompt_pi_verdict: import_zod22.z.string().optional(),
|
|
1597
|
+
prompt_uf_verdict: import_zod22.z.string().optional(),
|
|
1598
|
+
prompt_dlp_verdict: import_zod22.z.string().optional(),
|
|
1599
|
+
prompt_tc_verdict: import_zod22.z.string().optional(),
|
|
1600
|
+
prompt_mc_verdict: import_zod22.z.string().optional(),
|
|
1601
|
+
prompt_agent_verdict: import_zod22.z.string().optional(),
|
|
1602
|
+
prompt_tg_verdict: import_zod22.z.string().optional(),
|
|
1603
|
+
prompt_verdict: import_zod22.z.string().optional(),
|
|
1604
|
+
prompt_pi_action: import_zod22.z.string().optional(),
|
|
1605
|
+
prompt_uf_action: import_zod22.z.string().optional(),
|
|
1606
|
+
prompt_dlp_action: import_zod22.z.string().optional(),
|
|
1607
|
+
prompt_tc_action: import_zod22.z.string().optional(),
|
|
1608
|
+
prompt_mc_action: import_zod22.z.string().optional(),
|
|
1609
|
+
prompt_agent_action: import_zod22.z.string().optional(),
|
|
1610
|
+
prompt_tg_action: import_zod22.z.string().optional(),
|
|
1611
|
+
response_uf_verdict: import_zod22.z.string().optional(),
|
|
1612
|
+
response_dlp_verdict: import_zod22.z.string().optional(),
|
|
1613
|
+
response_dbs_verdict: import_zod22.z.string().optional(),
|
|
1614
|
+
response_tc_verdict: import_zod22.z.string().optional(),
|
|
1615
|
+
response_mc_verdict: import_zod22.z.string().optional(),
|
|
1616
|
+
response_agent_verdict: import_zod22.z.string().optional(),
|
|
1617
|
+
response_cg_verdict: import_zod22.z.string().optional(),
|
|
1618
|
+
response_tg_verdict: import_zod22.z.string().optional(),
|
|
1619
|
+
response_uf_action: import_zod22.z.string().optional(),
|
|
1620
|
+
response_dlp_action: import_zod22.z.string().optional(),
|
|
1621
|
+
response_dbs_action: import_zod22.z.string().optional(),
|
|
1622
|
+
response_tc_action: import_zod22.z.string().optional(),
|
|
1623
|
+
response_mc_action: import_zod22.z.string().optional(),
|
|
1624
|
+
response_agent_action: import_zod22.z.string().optional(),
|
|
1625
|
+
response_cg_action: import_zod22.z.string().optional(),
|
|
1626
|
+
response_tg_action: import_zod22.z.string().optional(),
|
|
1627
|
+
response_verdict: import_zod22.z.string().optional(),
|
|
1628
|
+
detection_service_flags: import_zod22.z.number().optional(),
|
|
1629
|
+
content_masked: import_zod22.z.boolean().optional(),
|
|
1630
|
+
user_ip: import_zod22.z.string().optional()
|
|
1631
|
+
}).passthrough();
|
|
1632
|
+
var ScanResultForDashboardSchema = import_zod22.z.object({
|
|
1633
|
+
text_records_count: import_zod22.z.number().optional(),
|
|
1634
|
+
api_calls_count: import_zod22.z.number().optional(),
|
|
1635
|
+
threats_count: import_zod22.z.number().optional(),
|
|
1636
|
+
all_transactions_count: import_zod22.z.number().optional(),
|
|
1637
|
+
benign_transaction_count: import_zod22.z.number().optional(),
|
|
1638
|
+
scan_result_entries: import_zod22.z.array(ScanResultEntrySchema).optional()
|
|
1639
|
+
}).passthrough();
|
|
1640
|
+
var PaginatedScanResultsSchema = import_zod22.z.object({
|
|
1641
|
+
scan_result_for_dashboard: ScanResultForDashboardSchema.optional(),
|
|
1642
|
+
total_pages: import_zod22.z.number().optional(),
|
|
1643
|
+
page_number: import_zod22.z.number().optional(),
|
|
1644
|
+
page_size: import_zod22.z.number().optional(),
|
|
1645
|
+
page_token: import_zod22.z.string().optional(),
|
|
1646
|
+
revision: import_zod22.z.number().optional()
|
|
1647
|
+
}).passthrough();
|
|
1648
|
+
|
|
1649
|
+
// src/models/mgmt-oauth.ts
|
|
1650
|
+
var import_zod23 = require("zod");
|
|
1651
|
+
var ClientIdAndCustomerAppSchema = import_zod23.z.object({
|
|
1652
|
+
client_id: import_zod23.z.string(),
|
|
1653
|
+
customer_app: import_zod23.z.string()
|
|
1654
|
+
});
|
|
1655
|
+
var Oauth2TokenSchema = import_zod23.z.object({
|
|
1656
|
+
token_type: import_zod23.z.string().optional(),
|
|
1657
|
+
issued_at: import_zod23.z.string().optional(),
|
|
1658
|
+
client_id: import_zod23.z.string().optional(),
|
|
1659
|
+
access_token: import_zod23.z.string(),
|
|
1660
|
+
expires_in: import_zod23.z.string().optional(),
|
|
1661
|
+
status: import_zod23.z.string().optional()
|
|
1662
|
+
}).passthrough();
|
|
1663
|
+
|
|
1261
1664
|
// src/models/model-security-enums.ts
|
|
1262
1665
|
var ErrorCodes = {
|
|
1263
1666
|
UNKNOWN_ERROR: "UNKNOWN_ERROR",
|
|
@@ -1388,240 +1791,240 @@ var RuleFieldValueKey = {
|
|
|
1388
1791
|
};
|
|
1389
1792
|
|
|
1390
1793
|
// src/models/model-security.ts
|
|
1391
|
-
var
|
|
1392
|
-
var ModelSecurityPaginationSchema =
|
|
1393
|
-
total_items:
|
|
1794
|
+
var import_zod24 = require("zod");
|
|
1795
|
+
var ModelSecurityPaginationSchema = import_zod24.z.object({
|
|
1796
|
+
total_items: import_zod24.z.number().int().nullable().optional()
|
|
1394
1797
|
}).passthrough();
|
|
1395
|
-
var LabelSchema =
|
|
1396
|
-
key:
|
|
1397
|
-
value:
|
|
1798
|
+
var LabelSchema = import_zod24.z.object({
|
|
1799
|
+
key: import_zod24.z.string(),
|
|
1800
|
+
value: import_zod24.z.string()
|
|
1398
1801
|
});
|
|
1399
|
-
var LabelsCreateRequestSchema =
|
|
1400
|
-
labels:
|
|
1802
|
+
var LabelsCreateRequestSchema = import_zod24.z.object({
|
|
1803
|
+
labels: import_zod24.z.array(LabelSchema)
|
|
1401
1804
|
});
|
|
1402
|
-
var LabelsResponseSchema =
|
|
1403
|
-
var LabelKeyListSchema =
|
|
1805
|
+
var LabelsResponseSchema = import_zod24.z.object({}).passthrough();
|
|
1806
|
+
var LabelKeyListSchema = import_zod24.z.object({
|
|
1404
1807
|
pagination: ModelSecurityPaginationSchema,
|
|
1405
|
-
keys:
|
|
1808
|
+
keys: import_zod24.z.array(import_zod24.z.string())
|
|
1406
1809
|
}).passthrough();
|
|
1407
|
-
var LabelValueListSchema =
|
|
1810
|
+
var LabelValueListSchema = import_zod24.z.object({
|
|
1408
1811
|
pagination: ModelSecurityPaginationSchema,
|
|
1409
|
-
values:
|
|
1410
|
-
}).passthrough();
|
|
1411
|
-
var EvalSummarySchema =
|
|
1412
|
-
rules_failed:
|
|
1413
|
-
rules_passed:
|
|
1414
|
-
total_rules:
|
|
1415
|
-
}).passthrough();
|
|
1416
|
-
var ModelScanIssueSchema =
|
|
1417
|
-
description:
|
|
1418
|
-
source:
|
|
1419
|
-
threat:
|
|
1420
|
-
module:
|
|
1421
|
-
operator:
|
|
1422
|
-
}).passthrough();
|
|
1423
|
-
var FileScanDataSchema =
|
|
1424
|
-
file_path:
|
|
1425
|
-
modelscan_status:
|
|
1426
|
-
blob_id:
|
|
1427
|
-
error_message:
|
|
1428
|
-
formats:
|
|
1429
|
-
issues_detected:
|
|
1430
|
-
}).passthrough();
|
|
1431
|
-
var ScanDetailsSchema =
|
|
1432
|
-
scanner_version:
|
|
1433
|
-
time_started:
|
|
1434
|
-
files:
|
|
1435
|
-
total_files_scanned:
|
|
1436
|
-
total_files_skipped:
|
|
1437
|
-
model_formats:
|
|
1438
|
-
model_size_bytes:
|
|
1439
|
-
scan_duration_ms:
|
|
1440
|
-
error_code:
|
|
1441
|
-
error_message:
|
|
1812
|
+
values: import_zod24.z.array(import_zod24.z.string())
|
|
1813
|
+
}).passthrough();
|
|
1814
|
+
var EvalSummarySchema = import_zod24.z.object({
|
|
1815
|
+
rules_failed: import_zod24.z.number().int().optional().default(0),
|
|
1816
|
+
rules_passed: import_zod24.z.number().int().optional().default(0),
|
|
1817
|
+
total_rules: import_zod24.z.number().int().optional().default(0)
|
|
1818
|
+
}).passthrough();
|
|
1819
|
+
var ModelScanIssueSchema = import_zod24.z.object({
|
|
1820
|
+
description: import_zod24.z.string(),
|
|
1821
|
+
source: import_zod24.z.string(),
|
|
1822
|
+
threat: import_zod24.z.string().nullable().optional(),
|
|
1823
|
+
module: import_zod24.z.string().nullable().optional(),
|
|
1824
|
+
operator: import_zod24.z.string().nullable().optional()
|
|
1825
|
+
}).passthrough();
|
|
1826
|
+
var FileScanDataSchema = import_zod24.z.object({
|
|
1827
|
+
file_path: import_zod24.z.string(),
|
|
1828
|
+
modelscan_status: import_zod24.z.string(),
|
|
1829
|
+
blob_id: import_zod24.z.string(),
|
|
1830
|
+
error_message: import_zod24.z.string().nullable().optional(),
|
|
1831
|
+
formats: import_zod24.z.array(import_zod24.z.string()).nullable().optional(),
|
|
1832
|
+
issues_detected: import_zod24.z.array(ModelScanIssueSchema).nullable().optional()
|
|
1833
|
+
}).passthrough();
|
|
1834
|
+
var ScanDetailsSchema = import_zod24.z.object({
|
|
1835
|
+
scanner_version: import_zod24.z.string(),
|
|
1836
|
+
time_started: import_zod24.z.string(),
|
|
1837
|
+
files: import_zod24.z.array(FileScanDataSchema),
|
|
1838
|
+
total_files_scanned: import_zod24.z.number().int(),
|
|
1839
|
+
total_files_skipped: import_zod24.z.number().int(),
|
|
1840
|
+
model_formats: import_zod24.z.array(import_zod24.z.string()),
|
|
1841
|
+
model_size_bytes: import_zod24.z.number().int(),
|
|
1842
|
+
scan_duration_ms: import_zod24.z.number().int(),
|
|
1843
|
+
error_code: import_zod24.z.string().nullable().optional(),
|
|
1844
|
+
error_message: import_zod24.z.string().nullable().optional()
|
|
1442
1845
|
});
|
|
1443
|
-
var ScanCreateRequestSchema =
|
|
1444
|
-
model_uri:
|
|
1445
|
-
security_group_uuid:
|
|
1446
|
-
scan_origin:
|
|
1447
|
-
allow_patterns:
|
|
1448
|
-
ignore_patterns:
|
|
1449
|
-
labels:
|
|
1450
|
-
model_author:
|
|
1451
|
-
model_name:
|
|
1452
|
-
model_version:
|
|
1846
|
+
var ScanCreateRequestSchema = import_zod24.z.object({
|
|
1847
|
+
model_uri: import_zod24.z.string(),
|
|
1848
|
+
security_group_uuid: import_zod24.z.string(),
|
|
1849
|
+
scan_origin: import_zod24.z.string(),
|
|
1850
|
+
allow_patterns: import_zod24.z.array(import_zod24.z.string()).nullable().optional(),
|
|
1851
|
+
ignore_patterns: import_zod24.z.array(import_zod24.z.string()).nullable().optional(),
|
|
1852
|
+
labels: import_zod24.z.array(LabelSchema).nullable().optional(),
|
|
1853
|
+
model_author: import_zod24.z.string().nullable().optional(),
|
|
1854
|
+
model_name: import_zod24.z.string().nullable().optional(),
|
|
1855
|
+
model_version: import_zod24.z.string().nullable().optional(),
|
|
1453
1856
|
scan_details: ScanDetailsSchema.nullable().optional()
|
|
1454
1857
|
});
|
|
1455
|
-
var ScanBaseResponseSchema =
|
|
1456
|
-
uuid:
|
|
1457
|
-
tsg_id:
|
|
1458
|
-
created_at:
|
|
1459
|
-
updated_at:
|
|
1460
|
-
model_uri:
|
|
1461
|
-
owner:
|
|
1462
|
-
scan_origin:
|
|
1463
|
-
security_group_uuid:
|
|
1464
|
-
security_group_name:
|
|
1465
|
-
model_version_uuid:
|
|
1466
|
-
eval_outcome:
|
|
1467
|
-
source_type:
|
|
1468
|
-
created_by:
|
|
1469
|
-
enabled_rule_count_snapshot:
|
|
1470
|
-
error_code:
|
|
1471
|
-
error_message:
|
|
1858
|
+
var ScanBaseResponseSchema = import_zod24.z.object({
|
|
1859
|
+
uuid: import_zod24.z.string(),
|
|
1860
|
+
tsg_id: import_zod24.z.string(),
|
|
1861
|
+
created_at: import_zod24.z.string(),
|
|
1862
|
+
updated_at: import_zod24.z.string(),
|
|
1863
|
+
model_uri: import_zod24.z.string(),
|
|
1864
|
+
owner: import_zod24.z.string(),
|
|
1865
|
+
scan_origin: import_zod24.z.string(),
|
|
1866
|
+
security_group_uuid: import_zod24.z.string(),
|
|
1867
|
+
security_group_name: import_zod24.z.string(),
|
|
1868
|
+
model_version_uuid: import_zod24.z.string(),
|
|
1869
|
+
eval_outcome: import_zod24.z.string(),
|
|
1870
|
+
source_type: import_zod24.z.string(),
|
|
1871
|
+
created_by: import_zod24.z.string().nullable().optional(),
|
|
1872
|
+
enabled_rule_count_snapshot: import_zod24.z.number().int().nullable().optional(),
|
|
1873
|
+
error_code: import_zod24.z.string().nullable().optional(),
|
|
1874
|
+
error_message: import_zod24.z.string().nullable().optional(),
|
|
1472
1875
|
eval_summary: EvalSummarySchema.nullable().optional(),
|
|
1473
|
-
labels:
|
|
1474
|
-
model_formats:
|
|
1475
|
-
scanner_version:
|
|
1476
|
-
time_started:
|
|
1477
|
-
total_files_scanned:
|
|
1478
|
-
total_files_skipped:
|
|
1479
|
-
}).passthrough();
|
|
1480
|
-
var ScanListSchema =
|
|
1876
|
+
labels: import_zod24.z.array(LabelSchema).optional(),
|
|
1877
|
+
model_formats: import_zod24.z.array(import_zod24.z.string()).nullable().optional(),
|
|
1878
|
+
scanner_version: import_zod24.z.string().nullable().optional(),
|
|
1879
|
+
time_started: import_zod24.z.string().nullable().optional(),
|
|
1880
|
+
total_files_scanned: import_zod24.z.number().int().nullable().optional(),
|
|
1881
|
+
total_files_skipped: import_zod24.z.number().int().nullable().optional()
|
|
1882
|
+
}).passthrough();
|
|
1883
|
+
var ScanListSchema = import_zod24.z.object({
|
|
1481
1884
|
pagination: ModelSecurityPaginationSchema,
|
|
1482
|
-
scans:
|
|
1483
|
-
}).passthrough();
|
|
1484
|
-
var FileResponseSchema =
|
|
1485
|
-
uuid:
|
|
1486
|
-
tsg_id:
|
|
1487
|
-
created_at:
|
|
1488
|
-
updated_at:
|
|
1489
|
-
path:
|
|
1490
|
-
parent_path:
|
|
1491
|
-
type:
|
|
1492
|
-
result:
|
|
1493
|
-
model_version_uuid:
|
|
1494
|
-
blob_id:
|
|
1495
|
-
formats:
|
|
1496
|
-
scan_uuid:
|
|
1497
|
-
}).passthrough();
|
|
1498
|
-
var FileListSchema =
|
|
1885
|
+
scans: import_zod24.z.array(ScanBaseResponseSchema)
|
|
1886
|
+
}).passthrough();
|
|
1887
|
+
var FileResponseSchema = import_zod24.z.object({
|
|
1888
|
+
uuid: import_zod24.z.string(),
|
|
1889
|
+
tsg_id: import_zod24.z.string(),
|
|
1890
|
+
created_at: import_zod24.z.string(),
|
|
1891
|
+
updated_at: import_zod24.z.string(),
|
|
1892
|
+
path: import_zod24.z.string(),
|
|
1893
|
+
parent_path: import_zod24.z.string(),
|
|
1894
|
+
type: import_zod24.z.string(),
|
|
1895
|
+
result: import_zod24.z.string(),
|
|
1896
|
+
model_version_uuid: import_zod24.z.string(),
|
|
1897
|
+
blob_id: import_zod24.z.string().nullable().optional(),
|
|
1898
|
+
formats: import_zod24.z.array(import_zod24.z.string()).nullable().optional(),
|
|
1899
|
+
scan_uuid: import_zod24.z.string().nullable().optional()
|
|
1900
|
+
}).passthrough();
|
|
1901
|
+
var FileListSchema = import_zod24.z.object({
|
|
1499
1902
|
pagination: ModelSecurityPaginationSchema,
|
|
1500
|
-
files:
|
|
1501
|
-
}).passthrough();
|
|
1502
|
-
var RuleEvaluationResponseSchema =
|
|
1503
|
-
uuid:
|
|
1504
|
-
tsg_id:
|
|
1505
|
-
created_at:
|
|
1506
|
-
updated_at:
|
|
1507
|
-
result:
|
|
1508
|
-
violation_count:
|
|
1509
|
-
rule_instance_uuid:
|
|
1510
|
-
scan_uuid:
|
|
1511
|
-
rule_name:
|
|
1512
|
-
rule_description:
|
|
1513
|
-
rule_instance_state:
|
|
1514
|
-
}).passthrough();
|
|
1515
|
-
var RuleEvaluationListSchema =
|
|
1903
|
+
files: import_zod24.z.array(FileResponseSchema)
|
|
1904
|
+
}).passthrough();
|
|
1905
|
+
var RuleEvaluationResponseSchema = import_zod24.z.object({
|
|
1906
|
+
uuid: import_zod24.z.string(),
|
|
1907
|
+
tsg_id: import_zod24.z.string(),
|
|
1908
|
+
created_at: import_zod24.z.string(),
|
|
1909
|
+
updated_at: import_zod24.z.string(),
|
|
1910
|
+
result: import_zod24.z.string(),
|
|
1911
|
+
violation_count: import_zod24.z.number().int(),
|
|
1912
|
+
rule_instance_uuid: import_zod24.z.string(),
|
|
1913
|
+
scan_uuid: import_zod24.z.string(),
|
|
1914
|
+
rule_name: import_zod24.z.string(),
|
|
1915
|
+
rule_description: import_zod24.z.string(),
|
|
1916
|
+
rule_instance_state: import_zod24.z.string()
|
|
1917
|
+
}).passthrough();
|
|
1918
|
+
var RuleEvaluationListSchema = import_zod24.z.object({
|
|
1516
1919
|
pagination: ModelSecurityPaginationSchema,
|
|
1517
|
-
evaluations:
|
|
1518
|
-
}).passthrough();
|
|
1519
|
-
var ViolationResponseSchema =
|
|
1520
|
-
uuid:
|
|
1521
|
-
tsg_id:
|
|
1522
|
-
created_at:
|
|
1523
|
-
updated_at:
|
|
1524
|
-
description:
|
|
1525
|
-
rule_instance_uuid:
|
|
1526
|
-
rule_name:
|
|
1527
|
-
rule_description:
|
|
1528
|
-
rule_instance_state:
|
|
1529
|
-
file:
|
|
1530
|
-
hash:
|
|
1531
|
-
module:
|
|
1532
|
-
operator:
|
|
1533
|
-
threat:
|
|
1534
|
-
threat_description:
|
|
1535
|
-
}).passthrough();
|
|
1536
|
-
var ViolationListSchema =
|
|
1920
|
+
evaluations: import_zod24.z.array(RuleEvaluationResponseSchema)
|
|
1921
|
+
}).passthrough();
|
|
1922
|
+
var ViolationResponseSchema = import_zod24.z.object({
|
|
1923
|
+
uuid: import_zod24.z.string(),
|
|
1924
|
+
tsg_id: import_zod24.z.string(),
|
|
1925
|
+
created_at: import_zod24.z.string(),
|
|
1926
|
+
updated_at: import_zod24.z.string(),
|
|
1927
|
+
description: import_zod24.z.string(),
|
|
1928
|
+
rule_instance_uuid: import_zod24.z.string(),
|
|
1929
|
+
rule_name: import_zod24.z.string(),
|
|
1930
|
+
rule_description: import_zod24.z.string(),
|
|
1931
|
+
rule_instance_state: import_zod24.z.string(),
|
|
1932
|
+
file: import_zod24.z.string().nullable().optional(),
|
|
1933
|
+
hash: import_zod24.z.string().nullable().optional(),
|
|
1934
|
+
module: import_zod24.z.string().nullable().optional(),
|
|
1935
|
+
operator: import_zod24.z.string().nullable().optional(),
|
|
1936
|
+
threat: import_zod24.z.string().nullable().optional(),
|
|
1937
|
+
threat_description: import_zod24.z.string().nullable().optional()
|
|
1938
|
+
}).passthrough();
|
|
1939
|
+
var ViolationListSchema = import_zod24.z.object({
|
|
1537
1940
|
pagination: ModelSecurityPaginationSchema,
|
|
1538
|
-
violations:
|
|
1539
|
-
}).passthrough();
|
|
1540
|
-
var RuleEditableFieldDropdownSchema =
|
|
1541
|
-
value:
|
|
1542
|
-
label:
|
|
1543
|
-
}).passthrough();
|
|
1544
|
-
var RuleEditableFieldSchema =
|
|
1545
|
-
attribute_name:
|
|
1546
|
-
type:
|
|
1547
|
-
display_name:
|
|
1548
|
-
display_type:
|
|
1549
|
-
description:
|
|
1550
|
-
dropdown_values:
|
|
1551
|
-
}).passthrough();
|
|
1552
|
-
var RuleRemediationSchema =
|
|
1553
|
-
description:
|
|
1554
|
-
steps:
|
|
1555
|
-
url:
|
|
1556
|
-
}).passthrough();
|
|
1557
|
-
var RuleConfigurationSchema =
|
|
1558
|
-
field_values:
|
|
1559
|
-
state:
|
|
1560
|
-
}).passthrough();
|
|
1561
|
-
var ModelSecurityRuleResponseSchema =
|
|
1562
|
-
uuid:
|
|
1563
|
-
name:
|
|
1564
|
-
description:
|
|
1565
|
-
rule_type:
|
|
1566
|
-
compatible_sources:
|
|
1567
|
-
default_state:
|
|
1941
|
+
violations: import_zod24.z.array(ViolationResponseSchema)
|
|
1942
|
+
}).passthrough();
|
|
1943
|
+
var RuleEditableFieldDropdownSchema = import_zod24.z.object({
|
|
1944
|
+
value: import_zod24.z.string(),
|
|
1945
|
+
label: import_zod24.z.string()
|
|
1946
|
+
}).passthrough();
|
|
1947
|
+
var RuleEditableFieldSchema = import_zod24.z.object({
|
|
1948
|
+
attribute_name: import_zod24.z.string(),
|
|
1949
|
+
type: import_zod24.z.string(),
|
|
1950
|
+
display_name: import_zod24.z.string(),
|
|
1951
|
+
display_type: import_zod24.z.string(),
|
|
1952
|
+
description: import_zod24.z.string().nullable().optional(),
|
|
1953
|
+
dropdown_values: import_zod24.z.array(RuleEditableFieldDropdownSchema).nullable().optional()
|
|
1954
|
+
}).passthrough();
|
|
1955
|
+
var RuleRemediationSchema = import_zod24.z.object({
|
|
1956
|
+
description: import_zod24.z.string(),
|
|
1957
|
+
steps: import_zod24.z.array(import_zod24.z.string()),
|
|
1958
|
+
url: import_zod24.z.string()
|
|
1959
|
+
}).passthrough();
|
|
1960
|
+
var RuleConfigurationSchema = import_zod24.z.object({
|
|
1961
|
+
field_values: import_zod24.z.record(import_zod24.z.unknown()).optional(),
|
|
1962
|
+
state: import_zod24.z.string().nullable().optional()
|
|
1963
|
+
}).passthrough();
|
|
1964
|
+
var ModelSecurityRuleResponseSchema = import_zod24.z.object({
|
|
1965
|
+
uuid: import_zod24.z.string(),
|
|
1966
|
+
name: import_zod24.z.string(),
|
|
1967
|
+
description: import_zod24.z.string(),
|
|
1968
|
+
rule_type: import_zod24.z.string(),
|
|
1969
|
+
compatible_sources: import_zod24.z.array(import_zod24.z.string()),
|
|
1970
|
+
default_state: import_zod24.z.string(),
|
|
1568
1971
|
remediation: RuleRemediationSchema,
|
|
1569
|
-
editable_fields:
|
|
1570
|
-
constant_values:
|
|
1571
|
-
default_values:
|
|
1972
|
+
editable_fields: import_zod24.z.array(RuleEditableFieldSchema),
|
|
1973
|
+
constant_values: import_zod24.z.record(import_zod24.z.unknown()),
|
|
1974
|
+
default_values: import_zod24.z.record(import_zod24.z.unknown())
|
|
1572
1975
|
}).passthrough();
|
|
1573
|
-
var ListModelSecurityRulesResponseSchema =
|
|
1976
|
+
var ListModelSecurityRulesResponseSchema = import_zod24.z.object({
|
|
1574
1977
|
pagination: ModelSecurityPaginationSchema,
|
|
1575
|
-
rules:
|
|
1576
|
-
}).passthrough();
|
|
1577
|
-
var ModelSecurityRuleInstanceResponseSchema =
|
|
1578
|
-
uuid:
|
|
1579
|
-
tsg_id:
|
|
1580
|
-
created_at:
|
|
1581
|
-
updated_at:
|
|
1582
|
-
security_group_uuid:
|
|
1583
|
-
security_rule_uuid:
|
|
1584
|
-
state:
|
|
1978
|
+
rules: import_zod24.z.array(ModelSecurityRuleResponseSchema)
|
|
1979
|
+
}).passthrough();
|
|
1980
|
+
var ModelSecurityRuleInstanceResponseSchema = import_zod24.z.object({
|
|
1981
|
+
uuid: import_zod24.z.string(),
|
|
1982
|
+
tsg_id: import_zod24.z.string(),
|
|
1983
|
+
created_at: import_zod24.z.string(),
|
|
1984
|
+
updated_at: import_zod24.z.string(),
|
|
1985
|
+
security_group_uuid: import_zod24.z.string(),
|
|
1986
|
+
security_rule_uuid: import_zod24.z.string(),
|
|
1987
|
+
state: import_zod24.z.string(),
|
|
1585
1988
|
rule: ModelSecurityRuleResponseSchema,
|
|
1586
|
-
field_values:
|
|
1989
|
+
field_values: import_zod24.z.record(import_zod24.z.unknown()).optional()
|
|
1587
1990
|
}).passthrough();
|
|
1588
|
-
var ModelSecurityRuleInstanceUpdateRequestSchema =
|
|
1589
|
-
security_group_uuid:
|
|
1590
|
-
state:
|
|
1591
|
-
field_values:
|
|
1991
|
+
var ModelSecurityRuleInstanceUpdateRequestSchema = import_zod24.z.object({
|
|
1992
|
+
security_group_uuid: import_zod24.z.string(),
|
|
1993
|
+
state: import_zod24.z.string().nullable().optional(),
|
|
1994
|
+
field_values: import_zod24.z.record(import_zod24.z.unknown()).nullable().optional()
|
|
1592
1995
|
});
|
|
1593
|
-
var ListModelSecurityRuleInstancesResponseSchema =
|
|
1996
|
+
var ListModelSecurityRuleInstancesResponseSchema = import_zod24.z.object({
|
|
1594
1997
|
pagination: ModelSecurityPaginationSchema,
|
|
1595
|
-
rule_instances:
|
|
1998
|
+
rule_instances: import_zod24.z.array(ModelSecurityRuleInstanceResponseSchema)
|
|
1596
1999
|
}).passthrough();
|
|
1597
|
-
var ModelSecurityGroupCreateRequestSchema =
|
|
1598
|
-
name:
|
|
1599
|
-
source_type:
|
|
1600
|
-
description:
|
|
1601
|
-
rule_configurations:
|
|
2000
|
+
var ModelSecurityGroupCreateRequestSchema = import_zod24.z.object({
|
|
2001
|
+
name: import_zod24.z.string(),
|
|
2002
|
+
source_type: import_zod24.z.string(),
|
|
2003
|
+
description: import_zod24.z.string().optional().default(""),
|
|
2004
|
+
rule_configurations: import_zod24.z.record(RuleConfigurationSchema).optional()
|
|
1602
2005
|
});
|
|
1603
|
-
var ModelSecurityGroupResponseSchema =
|
|
1604
|
-
uuid:
|
|
1605
|
-
tsg_id:
|
|
1606
|
-
created_at:
|
|
1607
|
-
updated_at:
|
|
1608
|
-
name:
|
|
1609
|
-
description:
|
|
1610
|
-
source_type:
|
|
1611
|
-
state:
|
|
1612
|
-
is_tombstone:
|
|
1613
|
-
}).passthrough();
|
|
1614
|
-
var ModelSecurityGroupUpdateRequestSchema =
|
|
1615
|
-
name:
|
|
1616
|
-
description:
|
|
2006
|
+
var ModelSecurityGroupResponseSchema = import_zod24.z.object({
|
|
2007
|
+
uuid: import_zod24.z.string(),
|
|
2008
|
+
tsg_id: import_zod24.z.string(),
|
|
2009
|
+
created_at: import_zod24.z.string(),
|
|
2010
|
+
updated_at: import_zod24.z.string(),
|
|
2011
|
+
name: import_zod24.z.string(),
|
|
2012
|
+
description: import_zod24.z.string(),
|
|
2013
|
+
source_type: import_zod24.z.string(),
|
|
2014
|
+
state: import_zod24.z.string(),
|
|
2015
|
+
is_tombstone: import_zod24.z.boolean()
|
|
2016
|
+
}).passthrough();
|
|
2017
|
+
var ModelSecurityGroupUpdateRequestSchema = import_zod24.z.object({
|
|
2018
|
+
name: import_zod24.z.string().nullable().optional(),
|
|
2019
|
+
description: import_zod24.z.string().nullable().optional()
|
|
1617
2020
|
});
|
|
1618
|
-
var ListModelSecurityGroupsResponseSchema =
|
|
2021
|
+
var ListModelSecurityGroupsResponseSchema = import_zod24.z.object({
|
|
1619
2022
|
pagination: ModelSecurityPaginationSchema,
|
|
1620
|
-
security_groups:
|
|
2023
|
+
security_groups: import_zod24.z.array(ModelSecurityGroupResponseSchema)
|
|
1621
2024
|
}).passthrough();
|
|
1622
|
-
var PyPIAuthResponseSchema =
|
|
1623
|
-
url:
|
|
1624
|
-
expires_at:
|
|
2025
|
+
var PyPIAuthResponseSchema = import_zod24.z.object({
|
|
2026
|
+
url: import_zod24.z.string(),
|
|
2027
|
+
expires_at: import_zod24.z.string()
|
|
1625
2028
|
}).passthrough();
|
|
1626
2029
|
|
|
1627
2030
|
// src/models/red-team-enums.ts
|
|
@@ -1819,892 +2222,892 @@ var TargetType = {
|
|
|
1819
2222
|
};
|
|
1820
2223
|
|
|
1821
2224
|
// src/models/red-team.ts
|
|
1822
|
-
var
|
|
1823
|
-
var RedTeamPaginationSchema =
|
|
1824
|
-
var CountByNameSchema =
|
|
1825
|
-
var ValidationErrorSchema =
|
|
1826
|
-
loc:
|
|
1827
|
-
msg:
|
|
1828
|
-
type:
|
|
2225
|
+
var import_zod25 = require("zod");
|
|
2226
|
+
var RedTeamPaginationSchema = import_zod25.z.object({ total_items: import_zod25.z.number().int().nullable().optional() }).passthrough();
|
|
2227
|
+
var CountByNameSchema = import_zod25.z.object({ name: import_zod25.z.string(), count: import_zod25.z.number().int() });
|
|
2228
|
+
var ValidationErrorSchema = import_zod25.z.object({
|
|
2229
|
+
loc: import_zod25.z.array(import_zod25.z.union([import_zod25.z.string(), import_zod25.z.number()])),
|
|
2230
|
+
msg: import_zod25.z.string(),
|
|
2231
|
+
type: import_zod25.z.string()
|
|
1829
2232
|
});
|
|
1830
|
-
var HTTPValidationErrorSchema =
|
|
1831
|
-
var TargetBackgroundSchema =
|
|
1832
|
-
industry:
|
|
1833
|
-
use_case:
|
|
1834
|
-
competitors:
|
|
1835
|
-
}).passthrough();
|
|
1836
|
-
var TargetAdditionalContextSchema =
|
|
1837
|
-
base_model:
|
|
1838
|
-
core_architecture:
|
|
1839
|
-
system_prompt:
|
|
1840
|
-
languages_supported:
|
|
1841
|
-
banned_keywords:
|
|
1842
|
-
tools_accessible:
|
|
1843
|
-
}).passthrough();
|
|
1844
|
-
var TargetMetadataSchema =
|
|
1845
|
-
multi_turn:
|
|
1846
|
-
multi_turn_error_message:
|
|
1847
|
-
rate_limit:
|
|
1848
|
-
rate_limit_enabled:
|
|
1849
|
-
rate_limit_error_code:
|
|
1850
|
-
rate_limit_error_json:
|
|
1851
|
-
rate_limit_error_message:
|
|
1852
|
-
content_filter_enabled:
|
|
1853
|
-
content_filter_error_code:
|
|
1854
|
-
content_filter_error_json:
|
|
1855
|
-
content_filter_error_message:
|
|
1856
|
-
probe_message:
|
|
1857
|
-
request_timeout:
|
|
1858
|
-
}).passthrough();
|
|
1859
|
-
var MultiTurnStatefulConfigSchema =
|
|
1860
|
-
type:
|
|
1861
|
-
response_id_field:
|
|
1862
|
-
request_id_field:
|
|
1863
|
-
}).passthrough();
|
|
1864
|
-
var MultiTurnStatelessConfigSchema =
|
|
1865
|
-
type:
|
|
1866
|
-
assistant_role:
|
|
1867
|
-
}).passthrough();
|
|
1868
|
-
var OpenAIConnectionParamsSchema =
|
|
1869
|
-
api_key:
|
|
1870
|
-
model_name:
|
|
1871
|
-
}).passthrough();
|
|
1872
|
-
var HuggingfaceConnectionParamsSchema =
|
|
1873
|
-
api_key:
|
|
1874
|
-
model_name:
|
|
1875
|
-
}).passthrough();
|
|
1876
|
-
var DatabricksConnectionParamsSchema =
|
|
1877
|
-
auth_type:
|
|
1878
|
-
workspace_url:
|
|
1879
|
-
model_name:
|
|
1880
|
-
access_token:
|
|
1881
|
-
client_id:
|
|
1882
|
-
secret:
|
|
1883
|
-
}).passthrough();
|
|
1884
|
-
var BedrockAccessConnectionParamsSchema =
|
|
1885
|
-
access_id:
|
|
1886
|
-
access_secret:
|
|
1887
|
-
region:
|
|
1888
|
-
model_id:
|
|
1889
|
-
session_token:
|
|
1890
|
-
}).passthrough();
|
|
1891
|
-
var RestConnectionParamsSchema =
|
|
1892
|
-
api_endpoint:
|
|
1893
|
-
request_headers:
|
|
1894
|
-
request_json:
|
|
1895
|
-
response_json:
|
|
1896
|
-
response_key:
|
|
1897
|
-
target_connection_config:
|
|
1898
|
-
curl:
|
|
1899
|
-
multi_turn_config:
|
|
2233
|
+
var HTTPValidationErrorSchema = import_zod25.z.object({ detail: import_zod25.z.array(ValidationErrorSchema).optional() }).passthrough();
|
|
2234
|
+
var TargetBackgroundSchema = import_zod25.z.object({
|
|
2235
|
+
industry: import_zod25.z.string().nullable().optional(),
|
|
2236
|
+
use_case: import_zod25.z.string().nullable().optional(),
|
|
2237
|
+
competitors: import_zod25.z.array(import_zod25.z.string()).nullable().optional()
|
|
2238
|
+
}).passthrough();
|
|
2239
|
+
var TargetAdditionalContextSchema = import_zod25.z.object({
|
|
2240
|
+
base_model: import_zod25.z.string().nullable().optional(),
|
|
2241
|
+
core_architecture: import_zod25.z.string().nullable().optional(),
|
|
2242
|
+
system_prompt: import_zod25.z.string().nullable().optional(),
|
|
2243
|
+
languages_supported: import_zod25.z.array(import_zod25.z.string()).nullable().optional(),
|
|
2244
|
+
banned_keywords: import_zod25.z.array(import_zod25.z.string()).nullable().optional(),
|
|
2245
|
+
tools_accessible: import_zod25.z.array(import_zod25.z.string()).nullable().optional()
|
|
2246
|
+
}).passthrough();
|
|
2247
|
+
var TargetMetadataSchema = import_zod25.z.object({
|
|
2248
|
+
multi_turn: import_zod25.z.boolean().optional(),
|
|
2249
|
+
multi_turn_error_message: import_zod25.z.string().nullable().optional(),
|
|
2250
|
+
rate_limit: import_zod25.z.number().int().nullable().optional(),
|
|
2251
|
+
rate_limit_enabled: import_zod25.z.boolean().optional(),
|
|
2252
|
+
rate_limit_error_code: import_zod25.z.number().int().nullable().optional(),
|
|
2253
|
+
rate_limit_error_json: import_zod25.z.record(import_zod25.z.unknown()).nullable().optional(),
|
|
2254
|
+
rate_limit_error_message: import_zod25.z.string().nullable().optional(),
|
|
2255
|
+
content_filter_enabled: import_zod25.z.boolean().optional(),
|
|
2256
|
+
content_filter_error_code: import_zod25.z.number().int().nullable().optional(),
|
|
2257
|
+
content_filter_error_json: import_zod25.z.record(import_zod25.z.unknown()).nullable().optional(),
|
|
2258
|
+
content_filter_error_message: import_zod25.z.string().nullable().optional(),
|
|
2259
|
+
probe_message: import_zod25.z.string().optional(),
|
|
2260
|
+
request_timeout: import_zod25.z.number().optional()
|
|
2261
|
+
}).passthrough();
|
|
2262
|
+
var MultiTurnStatefulConfigSchema = import_zod25.z.object({
|
|
2263
|
+
type: import_zod25.z.string().default("stateful"),
|
|
2264
|
+
response_id_field: import_zod25.z.string(),
|
|
2265
|
+
request_id_field: import_zod25.z.string()
|
|
2266
|
+
}).passthrough();
|
|
2267
|
+
var MultiTurnStatelessConfigSchema = import_zod25.z.object({
|
|
2268
|
+
type: import_zod25.z.string().default("stateless"),
|
|
2269
|
+
assistant_role: import_zod25.z.string().nullable().optional()
|
|
2270
|
+
}).passthrough();
|
|
2271
|
+
var OpenAIConnectionParamsSchema = import_zod25.z.object({
|
|
2272
|
+
api_key: import_zod25.z.string(),
|
|
2273
|
+
model_name: import_zod25.z.string()
|
|
2274
|
+
}).passthrough();
|
|
2275
|
+
var HuggingfaceConnectionParamsSchema = import_zod25.z.object({
|
|
2276
|
+
api_key: import_zod25.z.string(),
|
|
2277
|
+
model_name: import_zod25.z.string()
|
|
2278
|
+
}).passthrough();
|
|
2279
|
+
var DatabricksConnectionParamsSchema = import_zod25.z.object({
|
|
2280
|
+
auth_type: import_zod25.z.string(),
|
|
2281
|
+
workspace_url: import_zod25.z.string(),
|
|
2282
|
+
model_name: import_zod25.z.string(),
|
|
2283
|
+
access_token: import_zod25.z.string().nullable().optional(),
|
|
2284
|
+
client_id: import_zod25.z.string().nullable().optional(),
|
|
2285
|
+
secret: import_zod25.z.string().nullable().optional()
|
|
2286
|
+
}).passthrough();
|
|
2287
|
+
var BedrockAccessConnectionParamsSchema = import_zod25.z.object({
|
|
2288
|
+
access_id: import_zod25.z.string(),
|
|
2289
|
+
access_secret: import_zod25.z.string(),
|
|
2290
|
+
region: import_zod25.z.string(),
|
|
2291
|
+
model_id: import_zod25.z.string(),
|
|
2292
|
+
session_token: import_zod25.z.string().nullable().optional()
|
|
2293
|
+
}).passthrough();
|
|
2294
|
+
var RestConnectionParamsSchema = import_zod25.z.object({
|
|
2295
|
+
api_endpoint: import_zod25.z.string().nullable().optional(),
|
|
2296
|
+
request_headers: import_zod25.z.record(import_zod25.z.unknown()).nullable().optional(),
|
|
2297
|
+
request_json: import_zod25.z.record(import_zod25.z.unknown()).nullable().optional(),
|
|
2298
|
+
response_json: import_zod25.z.record(import_zod25.z.unknown()).nullable().optional(),
|
|
2299
|
+
response_key: import_zod25.z.string().nullable().optional(),
|
|
2300
|
+
target_connection_config: import_zod25.z.unknown().nullable().optional(),
|
|
2301
|
+
curl: import_zod25.z.string().nullable().optional(),
|
|
2302
|
+
multi_turn_config: import_zod25.z.unknown().nullable().optional()
|
|
1900
2303
|
}).passthrough();
|
|
1901
2304
|
var StreamingConnectionParamsSchema = RestConnectionParamsSchema.extend({
|
|
1902
|
-
response_stop_key:
|
|
1903
|
-
response_stop_value:
|
|
2305
|
+
response_stop_key: import_zod25.z.string(),
|
|
2306
|
+
response_stop_value: import_zod25.z.string()
|
|
1904
2307
|
}).passthrough();
|
|
1905
|
-
var ConnectionParamsSchema =
|
|
2308
|
+
var ConnectionParamsSchema = import_zod25.z.union([
|
|
1906
2309
|
StreamingConnectionParamsSchema,
|
|
1907
2310
|
RestConnectionParamsSchema
|
|
1908
2311
|
]);
|
|
1909
|
-
var TargetJobRequestSchema =
|
|
1910
|
-
uuid:
|
|
1911
|
-
version:
|
|
2312
|
+
var TargetJobRequestSchema = import_zod25.z.object({
|
|
2313
|
+
uuid: import_zod25.z.string(),
|
|
2314
|
+
version: import_zod25.z.number().int().nullable().optional()
|
|
1912
2315
|
});
|
|
1913
|
-
var JobTimeRecordSchema =
|
|
1914
|
-
queued_at:
|
|
1915
|
-
started_at:
|
|
1916
|
-
completed_at:
|
|
1917
|
-
time_taken:
|
|
1918
|
-
}).passthrough();
|
|
1919
|
-
var StaticJobMetadataSchema =
|
|
1920
|
-
categories:
|
|
1921
|
-
rate_limit_enabled:
|
|
1922
|
-
rate_limit:
|
|
1923
|
-
rate_limit_error_code:
|
|
1924
|
-
rate_limit_error_message:
|
|
1925
|
-
rate_limit_error_json:
|
|
1926
|
-
content_filter_enabled:
|
|
1927
|
-
content_filter_error_code:
|
|
1928
|
-
content_filter_error_message:
|
|
1929
|
-
content_filter_error_json:
|
|
1930
|
-
}).passthrough();
|
|
1931
|
-
var DynamicJobMetadataSchema =
|
|
1932
|
-
rate_limit_enabled:
|
|
1933
|
-
rate_limit:
|
|
1934
|
-
rate_limit_error_code:
|
|
1935
|
-
rate_limit_error_message:
|
|
1936
|
-
rate_limit_error_json:
|
|
1937
|
-
content_filter_enabled:
|
|
1938
|
-
content_filter_error_code:
|
|
1939
|
-
content_filter_error_message:
|
|
1940
|
-
content_filter_error_json:
|
|
1941
|
-
stream_breadth:
|
|
1942
|
-
stream_depth:
|
|
1943
|
-
max_tokens:
|
|
1944
|
-
context_size:
|
|
1945
|
-
attack_goals:
|
|
1946
|
-
base_model:
|
|
1947
|
-
use_case:
|
|
1948
|
-
system_prompt:
|
|
1949
|
-
}).passthrough();
|
|
1950
|
-
var CustomJobMetadataSchema =
|
|
1951
|
-
custom_prompt_sets:
|
|
1952
|
-
rate_limit_enabled:
|
|
1953
|
-
rate_limit:
|
|
1954
|
-
rate_limit_error_code:
|
|
1955
|
-
rate_limit_error_message:
|
|
1956
|
-
rate_limit_error_json:
|
|
1957
|
-
content_filter_enabled:
|
|
1958
|
-
content_filter_error_code:
|
|
1959
|
-
content_filter_error_message:
|
|
1960
|
-
content_filter_error_json:
|
|
1961
|
-
}).passthrough();
|
|
1962
|
-
var JobCreateRequestSchema =
|
|
1963
|
-
name:
|
|
2316
|
+
var JobTimeRecordSchema = import_zod25.z.object({
|
|
2317
|
+
queued_at: import_zod25.z.string().nullable().optional(),
|
|
2318
|
+
started_at: import_zod25.z.string().nullable().optional(),
|
|
2319
|
+
completed_at: import_zod25.z.string().nullable().optional(),
|
|
2320
|
+
time_taken: import_zod25.z.string().nullable().optional()
|
|
2321
|
+
}).passthrough();
|
|
2322
|
+
var StaticJobMetadataSchema = import_zod25.z.object({
|
|
2323
|
+
categories: import_zod25.z.record(import_zod25.z.unknown()),
|
|
2324
|
+
rate_limit_enabled: import_zod25.z.boolean().optional(),
|
|
2325
|
+
rate_limit: import_zod25.z.number().int().nullable().optional(),
|
|
2326
|
+
rate_limit_error_code: import_zod25.z.number().int().nullable().optional(),
|
|
2327
|
+
rate_limit_error_message: import_zod25.z.string().nullable().optional(),
|
|
2328
|
+
rate_limit_error_json: import_zod25.z.unknown().optional(),
|
|
2329
|
+
content_filter_enabled: import_zod25.z.boolean().optional(),
|
|
2330
|
+
content_filter_error_code: import_zod25.z.number().int().nullable().optional(),
|
|
2331
|
+
content_filter_error_message: import_zod25.z.string().nullable().optional(),
|
|
2332
|
+
content_filter_error_json: import_zod25.z.unknown().optional()
|
|
2333
|
+
}).passthrough();
|
|
2334
|
+
var DynamicJobMetadataSchema = import_zod25.z.object({
|
|
2335
|
+
rate_limit_enabled: import_zod25.z.boolean().optional(),
|
|
2336
|
+
rate_limit: import_zod25.z.number().int().nullable().optional(),
|
|
2337
|
+
rate_limit_error_code: import_zod25.z.number().int().nullable().optional(),
|
|
2338
|
+
rate_limit_error_message: import_zod25.z.string().nullable().optional(),
|
|
2339
|
+
rate_limit_error_json: import_zod25.z.unknown().optional(),
|
|
2340
|
+
content_filter_enabled: import_zod25.z.boolean().optional(),
|
|
2341
|
+
content_filter_error_code: import_zod25.z.number().int().nullable().optional(),
|
|
2342
|
+
content_filter_error_message: import_zod25.z.string().nullable().optional(),
|
|
2343
|
+
content_filter_error_json: import_zod25.z.unknown().optional(),
|
|
2344
|
+
stream_breadth: import_zod25.z.number().int().optional(),
|
|
2345
|
+
stream_depth: import_zod25.z.number().int().optional(),
|
|
2346
|
+
max_tokens: import_zod25.z.number().int().optional(),
|
|
2347
|
+
context_size: import_zod25.z.number().int().optional(),
|
|
2348
|
+
attack_goals: import_zod25.z.array(import_zod25.z.unknown()).optional(),
|
|
2349
|
+
base_model: import_zod25.z.string().nullable().optional(),
|
|
2350
|
+
use_case: import_zod25.z.string().nullable().optional(),
|
|
2351
|
+
system_prompt: import_zod25.z.string().nullable().optional()
|
|
2352
|
+
}).passthrough();
|
|
2353
|
+
var CustomJobMetadataSchema = import_zod25.z.object({
|
|
2354
|
+
custom_prompt_sets: import_zod25.z.array(import_zod25.z.unknown()),
|
|
2355
|
+
rate_limit_enabled: import_zod25.z.boolean().optional(),
|
|
2356
|
+
rate_limit: import_zod25.z.number().int().nullable().optional(),
|
|
2357
|
+
rate_limit_error_code: import_zod25.z.number().int().nullable().optional(),
|
|
2358
|
+
rate_limit_error_message: import_zod25.z.string().nullable().optional(),
|
|
2359
|
+
rate_limit_error_json: import_zod25.z.unknown().optional(),
|
|
2360
|
+
content_filter_enabled: import_zod25.z.boolean().optional(),
|
|
2361
|
+
content_filter_error_code: import_zod25.z.number().int().nullable().optional(),
|
|
2362
|
+
content_filter_error_message: import_zod25.z.string().nullable().optional(),
|
|
2363
|
+
content_filter_error_json: import_zod25.z.unknown().optional()
|
|
2364
|
+
}).passthrough();
|
|
2365
|
+
var JobCreateRequestSchema = import_zod25.z.object({
|
|
2366
|
+
name: import_zod25.z.string(),
|
|
1964
2367
|
target: TargetJobRequestSchema,
|
|
1965
|
-
job_type:
|
|
1966
|
-
job_metadata:
|
|
2368
|
+
job_type: import_zod25.z.string(),
|
|
2369
|
+
job_metadata: import_zod25.z.union([
|
|
1967
2370
|
StaticJobMetadataSchema,
|
|
1968
2371
|
DynamicJobMetadataSchema,
|
|
1969
2372
|
CustomJobMetadataSchema
|
|
1970
2373
|
]),
|
|
1971
|
-
version:
|
|
1972
|
-
extra_info:
|
|
2374
|
+
version: import_zod25.z.number().int().nullable().optional(),
|
|
2375
|
+
extra_info: import_zod25.z.record(import_zod25.z.unknown()).nullable().optional()
|
|
1973
2376
|
});
|
|
1974
|
-
var StaticJobReportStatsSchema =
|
|
1975
|
-
output_completion_percentage:
|
|
1976
|
-
partial_report_unlocked:
|
|
1977
|
-
partial_report_unlocked_at:
|
|
1978
|
-
report_summary:
|
|
1979
|
-
}).passthrough();
|
|
1980
|
-
var DynamicJobReportStatsSchema =
|
|
1981
|
-
total_goals:
|
|
1982
|
-
total_streams:
|
|
1983
|
-
total_threats:
|
|
1984
|
-
goals_achieved:
|
|
1985
|
-
report_summary:
|
|
1986
|
-
}).passthrough();
|
|
1987
|
-
var TargetReferenceSchema =
|
|
1988
|
-
uuid:
|
|
1989
|
-
tsg_id:
|
|
1990
|
-
name:
|
|
1991
|
-
description:
|
|
1992
|
-
target_type:
|
|
1993
|
-
connection_type:
|
|
1994
|
-
api_endpoint_type:
|
|
1995
|
-
response_mode:
|
|
1996
|
-
session_supported:
|
|
1997
|
-
extra_info:
|
|
1998
|
-
status:
|
|
1999
|
-
active:
|
|
2000
|
-
validated:
|
|
2001
|
-
version:
|
|
2002
|
-
secret_version:
|
|
2003
|
-
created_by_user_id:
|
|
2004
|
-
updated_by_user_id:
|
|
2005
|
-
created_at:
|
|
2006
|
-
updated_at:
|
|
2377
|
+
var StaticJobReportStatsSchema = import_zod25.z.object({
|
|
2378
|
+
output_completion_percentage: import_zod25.z.number(),
|
|
2379
|
+
partial_report_unlocked: import_zod25.z.boolean().optional(),
|
|
2380
|
+
partial_report_unlocked_at: import_zod25.z.string().nullable().optional(),
|
|
2381
|
+
report_summary: import_zod25.z.string().nullable().optional()
|
|
2382
|
+
}).passthrough();
|
|
2383
|
+
var DynamicJobReportStatsSchema = import_zod25.z.object({
|
|
2384
|
+
total_goals: import_zod25.z.number().int().optional(),
|
|
2385
|
+
total_streams: import_zod25.z.number().int().optional(),
|
|
2386
|
+
total_threats: import_zod25.z.number().int().optional(),
|
|
2387
|
+
goals_achieved: import_zod25.z.number().int().optional(),
|
|
2388
|
+
report_summary: import_zod25.z.string().nullable().optional()
|
|
2389
|
+
}).passthrough();
|
|
2390
|
+
var TargetReferenceSchema = import_zod25.z.object({
|
|
2391
|
+
uuid: import_zod25.z.string(),
|
|
2392
|
+
tsg_id: import_zod25.z.string(),
|
|
2393
|
+
name: import_zod25.z.string(),
|
|
2394
|
+
description: import_zod25.z.string().nullable().optional(),
|
|
2395
|
+
target_type: import_zod25.z.string().nullable().optional(),
|
|
2396
|
+
connection_type: import_zod25.z.string().nullable().optional(),
|
|
2397
|
+
api_endpoint_type: import_zod25.z.string().nullable().optional(),
|
|
2398
|
+
response_mode: import_zod25.z.string().nullable().optional(),
|
|
2399
|
+
session_supported: import_zod25.z.boolean().optional(),
|
|
2400
|
+
extra_info: import_zod25.z.record(import_zod25.z.unknown()).nullable().optional(),
|
|
2401
|
+
status: import_zod25.z.string(),
|
|
2402
|
+
active: import_zod25.z.boolean(),
|
|
2403
|
+
validated: import_zod25.z.boolean(),
|
|
2404
|
+
version: import_zod25.z.number().int().nullable().optional(),
|
|
2405
|
+
secret_version: import_zod25.z.string().nullable().optional(),
|
|
2406
|
+
created_by_user_id: import_zod25.z.string().nullable().optional(),
|
|
2407
|
+
updated_by_user_id: import_zod25.z.string().nullable().optional(),
|
|
2408
|
+
created_at: import_zod25.z.string(),
|
|
2409
|
+
updated_at: import_zod25.z.string(),
|
|
2007
2410
|
target_metadata: TargetMetadataSchema.optional(),
|
|
2008
2411
|
target_background: TargetBackgroundSchema.nullable().optional(),
|
|
2009
|
-
profiling_status:
|
|
2412
|
+
profiling_status: import_zod25.z.string().nullable().optional(),
|
|
2010
2413
|
additional_context: TargetAdditionalContextSchema.nullable().optional()
|
|
2011
2414
|
}).passthrough();
|
|
2012
|
-
var JobResponseSchema =
|
|
2013
|
-
uuid:
|
|
2014
|
-
tsg_id:
|
|
2015
|
-
name:
|
|
2415
|
+
var JobResponseSchema = import_zod25.z.object({
|
|
2416
|
+
uuid: import_zod25.z.string(),
|
|
2417
|
+
tsg_id: import_zod25.z.string(),
|
|
2418
|
+
name: import_zod25.z.string(),
|
|
2016
2419
|
target: TargetReferenceSchema,
|
|
2017
|
-
job_type:
|
|
2018
|
-
job_metadata:
|
|
2019
|
-
version:
|
|
2020
|
-
extra_info:
|
|
2021
|
-
target_id:
|
|
2022
|
-
target_type:
|
|
2023
|
-
total:
|
|
2024
|
-
completed:
|
|
2025
|
-
status:
|
|
2026
|
-
score:
|
|
2027
|
-
asr:
|
|
2420
|
+
job_type: import_zod25.z.string(),
|
|
2421
|
+
job_metadata: import_zod25.z.unknown(),
|
|
2422
|
+
version: import_zod25.z.number().int().nullable().optional(),
|
|
2423
|
+
extra_info: import_zod25.z.record(import_zod25.z.unknown()).nullable().optional(),
|
|
2424
|
+
target_id: import_zod25.z.string(),
|
|
2425
|
+
target_type: import_zod25.z.string(),
|
|
2426
|
+
total: import_zod25.z.number().int().nullable().optional(),
|
|
2427
|
+
completed: import_zod25.z.number().int().nullable().optional(),
|
|
2428
|
+
status: import_zod25.z.string().optional(),
|
|
2429
|
+
score: import_zod25.z.number().nullable().optional(),
|
|
2430
|
+
asr: import_zod25.z.number().nullable().optional(),
|
|
2028
2431
|
time_record: JobTimeRecordSchema.nullable().optional(),
|
|
2029
|
-
created_at:
|
|
2030
|
-
updated_at:
|
|
2031
|
-
created_by_user_id:
|
|
2032
|
-
report_stats:
|
|
2033
|
-
metering_quota_uuid:
|
|
2034
|
-
counted_towards_quota:
|
|
2035
|
-
invocation_id:
|
|
2036
|
-
}).passthrough();
|
|
2037
|
-
var JobListResponseSchema =
|
|
2432
|
+
created_at: import_zod25.z.string().nullable().optional(),
|
|
2433
|
+
updated_at: import_zod25.z.string().nullable().optional(),
|
|
2434
|
+
created_by_user_id: import_zod25.z.string().nullable().optional(),
|
|
2435
|
+
report_stats: import_zod25.z.unknown().optional(),
|
|
2436
|
+
metering_quota_uuid: import_zod25.z.string().nullable().optional(),
|
|
2437
|
+
counted_towards_quota: import_zod25.z.string().optional(),
|
|
2438
|
+
invocation_id: import_zod25.z.string().nullable().optional()
|
|
2439
|
+
}).passthrough();
|
|
2440
|
+
var JobListResponseSchema = import_zod25.z.object({
|
|
2038
2441
|
pagination: RedTeamPaginationSchema,
|
|
2039
|
-
data:
|
|
2442
|
+
data: import_zod25.z.array(JobResponseSchema)
|
|
2040
2443
|
}).passthrough();
|
|
2041
|
-
var JobAbortResponseSchema =
|
|
2042
|
-
job_id:
|
|
2043
|
-
message:
|
|
2444
|
+
var JobAbortResponseSchema = import_zod25.z.object({
|
|
2445
|
+
job_id: import_zod25.z.string(),
|
|
2446
|
+
message: import_zod25.z.string()
|
|
2044
2447
|
});
|
|
2045
|
-
var PrerequisiteModelSchema =
|
|
2046
|
-
id:
|
|
2047
|
-
display_name:
|
|
2048
|
-
description:
|
|
2448
|
+
var PrerequisiteModelSchema = import_zod25.z.object({
|
|
2449
|
+
id: import_zod25.z.string(),
|
|
2450
|
+
display_name: import_zod25.z.string(),
|
|
2451
|
+
description: import_zod25.z.string()
|
|
2049
2452
|
});
|
|
2050
|
-
var SubCategoryModelSchema =
|
|
2051
|
-
id:
|
|
2052
|
-
display_name:
|
|
2053
|
-
description:
|
|
2054
|
-
preselect:
|
|
2055
|
-
prerequisites:
|
|
2056
|
-
active:
|
|
2057
|
-
}).passthrough();
|
|
2058
|
-
var CategoryModelSchema =
|
|
2059
|
-
id:
|
|
2060
|
-
display_name:
|
|
2061
|
-
description:
|
|
2062
|
-
preselect:
|
|
2063
|
-
sub_categories:
|
|
2064
|
-
}).passthrough();
|
|
2065
|
-
var AttackOutputSchema =
|
|
2066
|
-
uuid:
|
|
2067
|
-
tsg_id:
|
|
2068
|
-
attack_id:
|
|
2069
|
-
job_id:
|
|
2070
|
-
target_id:
|
|
2071
|
-
output:
|
|
2072
|
-
threat:
|
|
2073
|
-
marked_safe:
|
|
2074
|
-
}).passthrough();
|
|
2075
|
-
var AttackMultiTurnOutputSchema =
|
|
2076
|
-
uuid:
|
|
2077
|
-
tsg_id:
|
|
2078
|
-
attack_id:
|
|
2079
|
-
job_id:
|
|
2080
|
-
target_id:
|
|
2081
|
-
output:
|
|
2082
|
-
prompt:
|
|
2083
|
-
turn:
|
|
2084
|
-
threat:
|
|
2085
|
-
marked_safe:
|
|
2086
|
-
generation:
|
|
2087
|
-
multi_turn:
|
|
2088
|
-
}).passthrough();
|
|
2089
|
-
var AttackListItemSchema =
|
|
2090
|
-
uuid:
|
|
2091
|
-
tsg_id:
|
|
2092
|
-
job_id:
|
|
2093
|
-
target_id:
|
|
2094
|
-
prompt:
|
|
2095
|
-
prompt_mapping_id:
|
|
2096
|
-
prompt_id:
|
|
2097
|
-
category:
|
|
2098
|
-
sub_category:
|
|
2099
|
-
category_display_name:
|
|
2100
|
-
sub_category_display_name:
|
|
2101
|
-
status:
|
|
2102
|
-
marked_safe:
|
|
2103
|
-
extra_info:
|
|
2104
|
-
threat:
|
|
2105
|
-
attack_type:
|
|
2106
|
-
multi_turn:
|
|
2107
|
-
asr:
|
|
2108
|
-
version:
|
|
2109
|
-
severity:
|
|
2110
|
-
}).passthrough();
|
|
2111
|
-
var AttackListResponseSchema =
|
|
2453
|
+
var SubCategoryModelSchema = import_zod25.z.object({
|
|
2454
|
+
id: import_zod25.z.string(),
|
|
2455
|
+
display_name: import_zod25.z.string(),
|
|
2456
|
+
description: import_zod25.z.string(),
|
|
2457
|
+
preselect: import_zod25.z.boolean().optional(),
|
|
2458
|
+
prerequisites: import_zod25.z.array(PrerequisiteModelSchema).nullable().optional(),
|
|
2459
|
+
active: import_zod25.z.boolean().optional()
|
|
2460
|
+
}).passthrough();
|
|
2461
|
+
var CategoryModelSchema = import_zod25.z.object({
|
|
2462
|
+
id: import_zod25.z.string(),
|
|
2463
|
+
display_name: import_zod25.z.string(),
|
|
2464
|
+
description: import_zod25.z.string(),
|
|
2465
|
+
preselect: import_zod25.z.boolean().optional(),
|
|
2466
|
+
sub_categories: import_zod25.z.array(SubCategoryModelSchema)
|
|
2467
|
+
}).passthrough();
|
|
2468
|
+
var AttackOutputSchema = import_zod25.z.object({
|
|
2469
|
+
uuid: import_zod25.z.string(),
|
|
2470
|
+
tsg_id: import_zod25.z.string(),
|
|
2471
|
+
attack_id: import_zod25.z.string(),
|
|
2472
|
+
job_id: import_zod25.z.string(),
|
|
2473
|
+
target_id: import_zod25.z.string(),
|
|
2474
|
+
output: import_zod25.z.string(),
|
|
2475
|
+
threat: import_zod25.z.boolean().nullable().optional(),
|
|
2476
|
+
marked_safe: import_zod25.z.boolean().nullable().optional()
|
|
2477
|
+
}).passthrough();
|
|
2478
|
+
var AttackMultiTurnOutputSchema = import_zod25.z.object({
|
|
2479
|
+
uuid: import_zod25.z.string(),
|
|
2480
|
+
tsg_id: import_zod25.z.string(),
|
|
2481
|
+
attack_id: import_zod25.z.string(),
|
|
2482
|
+
job_id: import_zod25.z.string(),
|
|
2483
|
+
target_id: import_zod25.z.string(),
|
|
2484
|
+
output: import_zod25.z.string(),
|
|
2485
|
+
prompt: import_zod25.z.string(),
|
|
2486
|
+
turn: import_zod25.z.number().int(),
|
|
2487
|
+
threat: import_zod25.z.boolean().nullable().optional(),
|
|
2488
|
+
marked_safe: import_zod25.z.boolean().nullable().optional(),
|
|
2489
|
+
generation: import_zod25.z.number().int().optional(),
|
|
2490
|
+
multi_turn: import_zod25.z.boolean().optional()
|
|
2491
|
+
}).passthrough();
|
|
2492
|
+
var AttackListItemSchema = import_zod25.z.object({
|
|
2493
|
+
uuid: import_zod25.z.string(),
|
|
2494
|
+
tsg_id: import_zod25.z.string(),
|
|
2495
|
+
job_id: import_zod25.z.string(),
|
|
2496
|
+
target_id: import_zod25.z.string(),
|
|
2497
|
+
prompt: import_zod25.z.string(),
|
|
2498
|
+
prompt_mapping_id: import_zod25.z.string(),
|
|
2499
|
+
prompt_id: import_zod25.z.string(),
|
|
2500
|
+
category: import_zod25.z.string(),
|
|
2501
|
+
sub_category: import_zod25.z.string(),
|
|
2502
|
+
category_display_name: import_zod25.z.string(),
|
|
2503
|
+
sub_category_display_name: import_zod25.z.string(),
|
|
2504
|
+
status: import_zod25.z.string().optional(),
|
|
2505
|
+
marked_safe: import_zod25.z.boolean().nullable().optional(),
|
|
2506
|
+
extra_info: import_zod25.z.record(import_zod25.z.unknown()).optional(),
|
|
2507
|
+
threat: import_zod25.z.boolean().nullable().optional(),
|
|
2508
|
+
attack_type: import_zod25.z.string().optional(),
|
|
2509
|
+
multi_turn: import_zod25.z.boolean().optional(),
|
|
2510
|
+
asr: import_zod25.z.number().nullable().optional(),
|
|
2511
|
+
version: import_zod25.z.number().int().nullable().optional(),
|
|
2512
|
+
severity: import_zod25.z.string().optional()
|
|
2513
|
+
}).passthrough();
|
|
2514
|
+
var AttackListResponseSchema = import_zod25.z.object({
|
|
2112
2515
|
pagination: RedTeamPaginationSchema,
|
|
2113
|
-
data:
|
|
2114
|
-
}).passthrough();
|
|
2115
|
-
var AttackDetailResponseSchema =
|
|
2116
|
-
uuid:
|
|
2117
|
-
tsg_id:
|
|
2118
|
-
job_id:
|
|
2119
|
-
target_id:
|
|
2120
|
-
prompt:
|
|
2121
|
-
prompt_mapping_id:
|
|
2122
|
-
prompt_id:
|
|
2123
|
-
category:
|
|
2124
|
-
sub_category:
|
|
2125
|
-
category_display_name:
|
|
2126
|
-
sub_category_display_name:
|
|
2127
|
-
compliance_frameworks:
|
|
2128
|
-
goal:
|
|
2129
|
-
status:
|
|
2130
|
-
marked_safe:
|
|
2131
|
-
extra_info:
|
|
2132
|
-
threat:
|
|
2133
|
-
attack_type:
|
|
2134
|
-
multi_turn:
|
|
2135
|
-
asr:
|
|
2136
|
-
version:
|
|
2137
|
-
severity:
|
|
2138
|
-
outputs:
|
|
2139
|
-
}).passthrough();
|
|
2140
|
-
var AttackMultiTurnDetailResponseSchema =
|
|
2141
|
-
uuid:
|
|
2142
|
-
tsg_id:
|
|
2143
|
-
job_id:
|
|
2144
|
-
target_id:
|
|
2145
|
-
prompt:
|
|
2146
|
-
prompt_mapping_id:
|
|
2147
|
-
prompt_id:
|
|
2148
|
-
category:
|
|
2149
|
-
sub_category:
|
|
2150
|
-
category_display_name:
|
|
2151
|
-
sub_category_display_name:
|
|
2152
|
-
compliance_frameworks:
|
|
2153
|
-
goal:
|
|
2154
|
-
status:
|
|
2155
|
-
marked_safe:
|
|
2156
|
-
extra_info:
|
|
2157
|
-
threat:
|
|
2158
|
-
attack_type:
|
|
2159
|
-
multi_turn:
|
|
2160
|
-
asr:
|
|
2161
|
-
version:
|
|
2162
|
-
severity:
|
|
2163
|
-
outputs:
|
|
2164
|
-
}).passthrough();
|
|
2165
|
-
var SubCategoryStatsSchema =
|
|
2166
|
-
id:
|
|
2167
|
-
display_name:
|
|
2168
|
-
description:
|
|
2169
|
-
preselect:
|
|
2170
|
-
prerequisites:
|
|
2171
|
-
active:
|
|
2172
|
-
successful:
|
|
2173
|
-
failed:
|
|
2174
|
-
total:
|
|
2175
|
-
}).passthrough();
|
|
2176
|
-
var CategoryReportSchema =
|
|
2177
|
-
id:
|
|
2178
|
-
display_name:
|
|
2179
|
-
description:
|
|
2180
|
-
preselect:
|
|
2181
|
-
sub_categories:
|
|
2182
|
-
asr:
|
|
2183
|
-
total_prompts:
|
|
2184
|
-
total_attacks:
|
|
2185
|
-
successful:
|
|
2186
|
-
failed:
|
|
2187
|
-
}).passthrough();
|
|
2188
|
-
var SeverityStatsSchema =
|
|
2189
|
-
severity:
|
|
2190
|
-
successful:
|
|
2191
|
-
failed:
|
|
2192
|
-
}).passthrough();
|
|
2193
|
-
var SeverityReportSchema =
|
|
2194
|
-
stats:
|
|
2195
|
-
successful:
|
|
2196
|
-
failed:
|
|
2197
|
-
total_attacks:
|
|
2198
|
-
}).passthrough();
|
|
2199
|
-
var ComplianceTechniqueSchema =
|
|
2200
|
-
id:
|
|
2201
|
-
display_name:
|
|
2202
|
-
compliance_id:
|
|
2203
|
-
description:
|
|
2204
|
-
link:
|
|
2205
|
-
version:
|
|
2206
|
-
active:
|
|
2207
|
-
successful:
|
|
2208
|
-
failed:
|
|
2209
|
-
total:
|
|
2210
|
-
}).passthrough();
|
|
2211
|
-
var ComplianceReportSchema =
|
|
2212
|
-
id:
|
|
2213
|
-
display_name:
|
|
2214
|
-
description:
|
|
2215
|
-
active:
|
|
2216
|
-
version:
|
|
2217
|
-
link:
|
|
2218
|
-
techniques:
|
|
2219
|
-
score:
|
|
2220
|
-
}).passthrough();
|
|
2221
|
-
var RuntimeSecurityPolicySchema =
|
|
2222
|
-
policy_id:
|
|
2223
|
-
display_name:
|
|
2224
|
-
config:
|
|
2225
|
-
}).passthrough();
|
|
2226
|
-
var StaticJobRemediationSchema =
|
|
2227
|
-
remediation:
|
|
2228
|
-
description:
|
|
2229
|
-
mapping_remediation_id:
|
|
2230
|
-
subcategories:
|
|
2231
|
-
effectiveness:
|
|
2232
|
-
ease_of_implementation:
|
|
2233
|
-
priority:
|
|
2234
|
-
resource_links:
|
|
2235
|
-
categories:
|
|
2236
|
-
}).passthrough();
|
|
2237
|
-
var StaticJobRemediationRecommendationSchema =
|
|
2238
|
-
runtime_security_policy_configuration:
|
|
2239
|
-
other_measures:
|
|
2240
|
-
}).passthrough();
|
|
2241
|
-
var StaticJobReportSchema =
|
|
2516
|
+
data: import_zod25.z.array(AttackListItemSchema)
|
|
2517
|
+
}).passthrough();
|
|
2518
|
+
var AttackDetailResponseSchema = import_zod25.z.object({
|
|
2519
|
+
uuid: import_zod25.z.string(),
|
|
2520
|
+
tsg_id: import_zod25.z.string(),
|
|
2521
|
+
job_id: import_zod25.z.string(),
|
|
2522
|
+
target_id: import_zod25.z.string(),
|
|
2523
|
+
prompt: import_zod25.z.string(),
|
|
2524
|
+
prompt_mapping_id: import_zod25.z.string(),
|
|
2525
|
+
prompt_id: import_zod25.z.string(),
|
|
2526
|
+
category: import_zod25.z.string(),
|
|
2527
|
+
sub_category: import_zod25.z.string(),
|
|
2528
|
+
category_display_name: import_zod25.z.string(),
|
|
2529
|
+
sub_category_display_name: import_zod25.z.string(),
|
|
2530
|
+
compliance_frameworks: import_zod25.z.array(import_zod25.z.unknown()),
|
|
2531
|
+
goal: import_zod25.z.string().nullable(),
|
|
2532
|
+
status: import_zod25.z.string().optional(),
|
|
2533
|
+
marked_safe: import_zod25.z.boolean().nullable().optional(),
|
|
2534
|
+
extra_info: import_zod25.z.record(import_zod25.z.unknown()).optional(),
|
|
2535
|
+
threat: import_zod25.z.boolean().nullable().optional(),
|
|
2536
|
+
attack_type: import_zod25.z.string().optional(),
|
|
2537
|
+
multi_turn: import_zod25.z.boolean().optional(),
|
|
2538
|
+
asr: import_zod25.z.number().nullable().optional(),
|
|
2539
|
+
version: import_zod25.z.number().int().nullable().optional(),
|
|
2540
|
+
severity: import_zod25.z.string().optional(),
|
|
2541
|
+
outputs: import_zod25.z.array(AttackOutputSchema).optional()
|
|
2542
|
+
}).passthrough();
|
|
2543
|
+
var AttackMultiTurnDetailResponseSchema = import_zod25.z.object({
|
|
2544
|
+
uuid: import_zod25.z.string(),
|
|
2545
|
+
tsg_id: import_zod25.z.string(),
|
|
2546
|
+
job_id: import_zod25.z.string(),
|
|
2547
|
+
target_id: import_zod25.z.string(),
|
|
2548
|
+
prompt: import_zod25.z.string(),
|
|
2549
|
+
prompt_mapping_id: import_zod25.z.string(),
|
|
2550
|
+
prompt_id: import_zod25.z.string(),
|
|
2551
|
+
category: import_zod25.z.string(),
|
|
2552
|
+
sub_category: import_zod25.z.string(),
|
|
2553
|
+
category_display_name: import_zod25.z.string(),
|
|
2554
|
+
sub_category_display_name: import_zod25.z.string(),
|
|
2555
|
+
compliance_frameworks: import_zod25.z.array(import_zod25.z.unknown()),
|
|
2556
|
+
goal: import_zod25.z.string().nullable(),
|
|
2557
|
+
status: import_zod25.z.string().optional(),
|
|
2558
|
+
marked_safe: import_zod25.z.boolean().nullable().optional(),
|
|
2559
|
+
extra_info: import_zod25.z.record(import_zod25.z.unknown()).optional(),
|
|
2560
|
+
threat: import_zod25.z.boolean().nullable().optional(),
|
|
2561
|
+
attack_type: import_zod25.z.string().optional(),
|
|
2562
|
+
multi_turn: import_zod25.z.boolean().optional(),
|
|
2563
|
+
asr: import_zod25.z.number().nullable().optional(),
|
|
2564
|
+
version: import_zod25.z.number().int().nullable().optional(),
|
|
2565
|
+
severity: import_zod25.z.string().optional(),
|
|
2566
|
+
outputs: import_zod25.z.array(AttackMultiTurnOutputSchema).optional()
|
|
2567
|
+
}).passthrough();
|
|
2568
|
+
var SubCategoryStatsSchema = import_zod25.z.object({
|
|
2569
|
+
id: import_zod25.z.string(),
|
|
2570
|
+
display_name: import_zod25.z.string(),
|
|
2571
|
+
description: import_zod25.z.string(),
|
|
2572
|
+
preselect: import_zod25.z.boolean().optional(),
|
|
2573
|
+
prerequisites: import_zod25.z.array(PrerequisiteModelSchema).nullable().optional(),
|
|
2574
|
+
active: import_zod25.z.boolean().optional(),
|
|
2575
|
+
successful: import_zod25.z.number().int(),
|
|
2576
|
+
failed: import_zod25.z.number().int(),
|
|
2577
|
+
total: import_zod25.z.number().int().optional()
|
|
2578
|
+
}).passthrough();
|
|
2579
|
+
var CategoryReportSchema = import_zod25.z.object({
|
|
2580
|
+
id: import_zod25.z.string(),
|
|
2581
|
+
display_name: import_zod25.z.string(),
|
|
2582
|
+
description: import_zod25.z.string(),
|
|
2583
|
+
preselect: import_zod25.z.boolean().optional(),
|
|
2584
|
+
sub_categories: import_zod25.z.array(SubCategoryStatsSchema),
|
|
2585
|
+
asr: import_zod25.z.number(),
|
|
2586
|
+
total_prompts: import_zod25.z.number().int(),
|
|
2587
|
+
total_attacks: import_zod25.z.number().int(),
|
|
2588
|
+
successful: import_zod25.z.number().int(),
|
|
2589
|
+
failed: import_zod25.z.number().int()
|
|
2590
|
+
}).passthrough();
|
|
2591
|
+
var SeverityStatsSchema = import_zod25.z.object({
|
|
2592
|
+
severity: import_zod25.z.string(),
|
|
2593
|
+
successful: import_zod25.z.number().int().optional(),
|
|
2594
|
+
failed: import_zod25.z.number().int().optional()
|
|
2595
|
+
}).passthrough();
|
|
2596
|
+
var SeverityReportSchema = import_zod25.z.object({
|
|
2597
|
+
stats: import_zod25.z.array(SeverityStatsSchema),
|
|
2598
|
+
successful: import_zod25.z.number().int().optional(),
|
|
2599
|
+
failed: import_zod25.z.number().int().optional(),
|
|
2600
|
+
total_attacks: import_zod25.z.number().int().optional()
|
|
2601
|
+
}).passthrough();
|
|
2602
|
+
var ComplianceTechniqueSchema = import_zod25.z.object({
|
|
2603
|
+
id: import_zod25.z.string(),
|
|
2604
|
+
display_name: import_zod25.z.string(),
|
|
2605
|
+
compliance_id: import_zod25.z.string(),
|
|
2606
|
+
description: import_zod25.z.string(),
|
|
2607
|
+
link: import_zod25.z.string(),
|
|
2608
|
+
version: import_zod25.z.string(),
|
|
2609
|
+
active: import_zod25.z.boolean(),
|
|
2610
|
+
successful: import_zod25.z.number().int().optional(),
|
|
2611
|
+
failed: import_zod25.z.number().int().optional(),
|
|
2612
|
+
total: import_zod25.z.number().int().optional()
|
|
2613
|
+
}).passthrough();
|
|
2614
|
+
var ComplianceReportSchema = import_zod25.z.object({
|
|
2615
|
+
id: import_zod25.z.string(),
|
|
2616
|
+
display_name: import_zod25.z.string(),
|
|
2617
|
+
description: import_zod25.z.string(),
|
|
2618
|
+
active: import_zod25.z.boolean(),
|
|
2619
|
+
version: import_zod25.z.string(),
|
|
2620
|
+
link: import_zod25.z.string(),
|
|
2621
|
+
techniques: import_zod25.z.array(ComplianceTechniqueSchema),
|
|
2622
|
+
score: import_zod25.z.number().int().optional()
|
|
2623
|
+
}).passthrough();
|
|
2624
|
+
var RuntimeSecurityPolicySchema = import_zod25.z.object({
|
|
2625
|
+
policy_id: import_zod25.z.string(),
|
|
2626
|
+
display_name: import_zod25.z.string(),
|
|
2627
|
+
config: import_zod25.z.record(import_zod25.z.unknown())
|
|
2628
|
+
}).passthrough();
|
|
2629
|
+
var StaticJobRemediationSchema = import_zod25.z.object({
|
|
2630
|
+
remediation: import_zod25.z.string(),
|
|
2631
|
+
description: import_zod25.z.string(),
|
|
2632
|
+
mapping_remediation_id: import_zod25.z.string().nullable().optional(),
|
|
2633
|
+
subcategories: import_zod25.z.array(import_zod25.z.string()).nullable().optional(),
|
|
2634
|
+
effectiveness: import_zod25.z.number().int().optional(),
|
|
2635
|
+
ease_of_implementation: import_zod25.z.number().int().optional(),
|
|
2636
|
+
priority: import_zod25.z.number().int().optional(),
|
|
2637
|
+
resource_links: import_zod25.z.array(import_zod25.z.string()).optional(),
|
|
2638
|
+
categories: import_zod25.z.array(import_zod25.z.string()).nullable().optional()
|
|
2639
|
+
}).passthrough();
|
|
2640
|
+
var StaticJobRemediationRecommendationSchema = import_zod25.z.object({
|
|
2641
|
+
runtime_security_policy_configuration: import_zod25.z.array(RuntimeSecurityPolicySchema).nullable().optional(),
|
|
2642
|
+
other_measures: import_zod25.z.array(StaticJobRemediationSchema).optional()
|
|
2643
|
+
}).passthrough();
|
|
2644
|
+
var StaticJobReportSchema = import_zod25.z.object({
|
|
2242
2645
|
severity_report: SeverityReportSchema,
|
|
2243
|
-
asr:
|
|
2244
|
-
score:
|
|
2646
|
+
asr: import_zod25.z.number().nullable().optional(),
|
|
2647
|
+
score: import_zod25.z.number().nullable().optional(),
|
|
2245
2648
|
security_report: CategoryReportSchema.nullable().optional(),
|
|
2246
2649
|
safety_report: CategoryReportSchema.nullable().optional(),
|
|
2247
2650
|
brand_report: CategoryReportSchema.nullable().optional(),
|
|
2248
|
-
compliance_report:
|
|
2249
|
-
report_summary:
|
|
2651
|
+
compliance_report: import_zod25.z.array(ComplianceReportSchema).nullable().optional(),
|
|
2652
|
+
report_summary: import_zod25.z.string().nullable().optional(),
|
|
2250
2653
|
recommendations: StaticJobRemediationRecommendationSchema.nullable().optional()
|
|
2251
2654
|
}).passthrough();
|
|
2252
|
-
var DynamicJobReportSchema =
|
|
2253
|
-
total_goals:
|
|
2254
|
-
total_streams:
|
|
2255
|
-
total_threats:
|
|
2256
|
-
goals_achieved:
|
|
2257
|
-
report_summary:
|
|
2258
|
-
score:
|
|
2259
|
-
asr:
|
|
2260
|
-
}).passthrough();
|
|
2261
|
-
var RemediationDetailSchema =
|
|
2262
|
-
remediation:
|
|
2263
|
-
description:
|
|
2264
|
-
resource_links:
|
|
2265
|
-
priority_level:
|
|
2266
|
-
ease_of_implementation_level:
|
|
2267
|
-
effectiveness_level:
|
|
2268
|
-
}).passthrough();
|
|
2269
|
-
var RemediationResponseSchema =
|
|
2270
|
-
var RuntimeSecurityProfileResponseSchema =
|
|
2271
|
-
runtime_security_profile:
|
|
2272
|
-
}).passthrough();
|
|
2273
|
-
var GoalSchema =
|
|
2274
|
-
goal:
|
|
2275
|
-
safe_response:
|
|
2276
|
-
jailbroken_response:
|
|
2277
|
-
goal_metadata:
|
|
2278
|
-
custom_goal:
|
|
2279
|
-
goal_type:
|
|
2280
|
-
uuid:
|
|
2281
|
-
tsg_id:
|
|
2282
|
-
job_id:
|
|
2283
|
-
goal_to_show:
|
|
2284
|
-
threat:
|
|
2285
|
-
version:
|
|
2286
|
-
extra_info:
|
|
2287
|
-
}).passthrough();
|
|
2288
|
-
var GoalListResponseSchema =
|
|
2289
|
-
var StreamIterationDataSchema =
|
|
2290
|
-
uuid:
|
|
2291
|
-
tsg_id:
|
|
2292
|
-
job_id:
|
|
2293
|
-
stream_id:
|
|
2294
|
-
goal_id:
|
|
2295
|
-
iteration:
|
|
2296
|
-
prompt:
|
|
2297
|
-
techniques:
|
|
2298
|
-
improvement:
|
|
2299
|
-
prompts_objective:
|
|
2300
|
-
summary:
|
|
2301
|
-
output:
|
|
2302
|
-
score:
|
|
2303
|
-
judge_reasoning:
|
|
2304
|
-
threat:
|
|
2305
|
-
created_at:
|
|
2306
|
-
updated_at:
|
|
2307
|
-
extra_info:
|
|
2308
|
-
version:
|
|
2309
|
-
}).passthrough();
|
|
2310
|
-
var StreamDetailResponseSchema =
|
|
2311
|
-
uuid:
|
|
2312
|
-
tsg_id:
|
|
2313
|
-
job_id:
|
|
2314
|
-
target_id:
|
|
2315
|
-
goal_id:
|
|
2316
|
-
stream_idx:
|
|
2317
|
-
iteration:
|
|
2318
|
-
goal:
|
|
2319
|
-
marked_safe:
|
|
2320
|
-
stream_type:
|
|
2321
|
-
threat:
|
|
2655
|
+
var DynamicJobReportSchema = import_zod25.z.object({
|
|
2656
|
+
total_goals: import_zod25.z.number().int().optional(),
|
|
2657
|
+
total_streams: import_zod25.z.number().int().optional(),
|
|
2658
|
+
total_threats: import_zod25.z.number().int().optional(),
|
|
2659
|
+
goals_achieved: import_zod25.z.number().int().optional(),
|
|
2660
|
+
report_summary: import_zod25.z.string().nullable().optional(),
|
|
2661
|
+
score: import_zod25.z.number().optional(),
|
|
2662
|
+
asr: import_zod25.z.number().optional()
|
|
2663
|
+
}).passthrough();
|
|
2664
|
+
var RemediationDetailSchema = import_zod25.z.object({
|
|
2665
|
+
remediation: import_zod25.z.string(),
|
|
2666
|
+
description: import_zod25.z.string(),
|
|
2667
|
+
resource_links: import_zod25.z.array(import_zod25.z.string()).optional(),
|
|
2668
|
+
priority_level: import_zod25.z.string().optional(),
|
|
2669
|
+
ease_of_implementation_level: import_zod25.z.string().optional(),
|
|
2670
|
+
effectiveness_level: import_zod25.z.string().optional()
|
|
2671
|
+
}).passthrough();
|
|
2672
|
+
var RemediationResponseSchema = import_zod25.z.object({ remediations: import_zod25.z.array(RemediationDetailSchema).optional() }).passthrough();
|
|
2673
|
+
var RuntimeSecurityProfileResponseSchema = import_zod25.z.object({
|
|
2674
|
+
runtime_security_profile: import_zod25.z.array(RuntimeSecurityPolicySchema).nullable().optional()
|
|
2675
|
+
}).passthrough();
|
|
2676
|
+
var GoalSchema = import_zod25.z.object({
|
|
2677
|
+
goal: import_zod25.z.string(),
|
|
2678
|
+
safe_response: import_zod25.z.string(),
|
|
2679
|
+
jailbroken_response: import_zod25.z.string(),
|
|
2680
|
+
goal_metadata: import_zod25.z.record(import_zod25.z.unknown()).optional(),
|
|
2681
|
+
custom_goal: import_zod25.z.boolean().optional(),
|
|
2682
|
+
goal_type: import_zod25.z.string().optional(),
|
|
2683
|
+
uuid: import_zod25.z.string(),
|
|
2684
|
+
tsg_id: import_zod25.z.string(),
|
|
2685
|
+
job_id: import_zod25.z.string(),
|
|
2686
|
+
goal_to_show: import_zod25.z.string().nullable().optional(),
|
|
2687
|
+
threat: import_zod25.z.boolean().optional(),
|
|
2688
|
+
version: import_zod25.z.number().int().nullable().optional(),
|
|
2689
|
+
extra_info: import_zod25.z.record(import_zod25.z.unknown()).nullable().optional()
|
|
2690
|
+
}).passthrough();
|
|
2691
|
+
var GoalListResponseSchema = import_zod25.z.object({ pagination: RedTeamPaginationSchema, data: import_zod25.z.array(GoalSchema) }).passthrough();
|
|
2692
|
+
var StreamIterationDataSchema = import_zod25.z.object({
|
|
2693
|
+
uuid: import_zod25.z.string(),
|
|
2694
|
+
tsg_id: import_zod25.z.string(),
|
|
2695
|
+
job_id: import_zod25.z.string(),
|
|
2696
|
+
stream_id: import_zod25.z.string(),
|
|
2697
|
+
goal_id: import_zod25.z.string(),
|
|
2698
|
+
iteration: import_zod25.z.number().int(),
|
|
2699
|
+
prompt: import_zod25.z.string(),
|
|
2700
|
+
techniques: import_zod25.z.string(),
|
|
2701
|
+
improvement: import_zod25.z.string(),
|
|
2702
|
+
prompts_objective: import_zod25.z.string(),
|
|
2703
|
+
summary: import_zod25.z.string(),
|
|
2704
|
+
output: import_zod25.z.string().nullable().optional(),
|
|
2705
|
+
score: import_zod25.z.number().int().nullable().optional(),
|
|
2706
|
+
judge_reasoning: import_zod25.z.string().nullable().optional(),
|
|
2707
|
+
threat: import_zod25.z.boolean().optional(),
|
|
2708
|
+
created_at: import_zod25.z.string().nullable().optional(),
|
|
2709
|
+
updated_at: import_zod25.z.string().nullable().optional(),
|
|
2710
|
+
extra_info: import_zod25.z.record(import_zod25.z.unknown()).nullable().optional(),
|
|
2711
|
+
version: import_zod25.z.number().int().nullable().optional()
|
|
2712
|
+
}).passthrough();
|
|
2713
|
+
var StreamDetailResponseSchema = import_zod25.z.object({
|
|
2714
|
+
uuid: import_zod25.z.string(),
|
|
2715
|
+
tsg_id: import_zod25.z.string(),
|
|
2716
|
+
job_id: import_zod25.z.string(),
|
|
2717
|
+
target_id: import_zod25.z.string(),
|
|
2718
|
+
goal_id: import_zod25.z.string(),
|
|
2719
|
+
stream_idx: import_zod25.z.number().int().optional(),
|
|
2720
|
+
iteration: import_zod25.z.number().int().optional(),
|
|
2721
|
+
goal: import_zod25.z.unknown().optional(),
|
|
2722
|
+
marked_safe: import_zod25.z.boolean().optional(),
|
|
2723
|
+
stream_type: import_zod25.z.string().nullable().optional(),
|
|
2724
|
+
threat: import_zod25.z.boolean().optional(),
|
|
2322
2725
|
first_threat_iteration: StreamIterationDataSchema.nullable().optional(),
|
|
2323
|
-
created_at:
|
|
2324
|
-
updated_at:
|
|
2325
|
-
extra_info:
|
|
2326
|
-
version:
|
|
2327
|
-
iterations:
|
|
2328
|
-
}).passthrough();
|
|
2329
|
-
var StreamListResponseSchema =
|
|
2330
|
-
var CustomAttackOutputSchema =
|
|
2331
|
-
uuid:
|
|
2332
|
-
tsg_id:
|
|
2333
|
-
custom_attack_id:
|
|
2334
|
-
job_id:
|
|
2335
|
-
target_id:
|
|
2336
|
-
output:
|
|
2337
|
-
threat:
|
|
2338
|
-
marked_safe:
|
|
2339
|
-
}).passthrough();
|
|
2340
|
-
var PropertyAssignmentSchema =
|
|
2341
|
-
name:
|
|
2342
|
-
value:
|
|
2726
|
+
created_at: import_zod25.z.string().nullable().optional(),
|
|
2727
|
+
updated_at: import_zod25.z.string().nullable().optional(),
|
|
2728
|
+
extra_info: import_zod25.z.record(import_zod25.z.unknown()).optional(),
|
|
2729
|
+
version: import_zod25.z.number().int().nullable().optional(),
|
|
2730
|
+
iterations: import_zod25.z.array(StreamIterationDataSchema).optional()
|
|
2731
|
+
}).passthrough();
|
|
2732
|
+
var StreamListResponseSchema = import_zod25.z.object({ pagination: RedTeamPaginationSchema, data: import_zod25.z.array(StreamDetailResponseSchema) }).passthrough();
|
|
2733
|
+
var CustomAttackOutputSchema = import_zod25.z.object({
|
|
2734
|
+
uuid: import_zod25.z.string(),
|
|
2735
|
+
tsg_id: import_zod25.z.string(),
|
|
2736
|
+
custom_attack_id: import_zod25.z.string(),
|
|
2737
|
+
job_id: import_zod25.z.string(),
|
|
2738
|
+
target_id: import_zod25.z.string(),
|
|
2739
|
+
output: import_zod25.z.string(),
|
|
2740
|
+
threat: import_zod25.z.boolean().nullable().optional(),
|
|
2741
|
+
marked_safe: import_zod25.z.boolean().nullable().optional()
|
|
2742
|
+
}).passthrough();
|
|
2743
|
+
var PropertyAssignmentSchema = import_zod25.z.object({
|
|
2744
|
+
name: import_zod25.z.string(),
|
|
2745
|
+
value: import_zod25.z.string()
|
|
2343
2746
|
});
|
|
2344
|
-
var PropertyValueStatisticSchema =
|
|
2345
|
-
value:
|
|
2346
|
-
successful_attack_count:
|
|
2347
|
-
total_attack_count:
|
|
2348
|
-
success_rate:
|
|
2747
|
+
var PropertyValueStatisticSchema = import_zod25.z.object({
|
|
2748
|
+
value: import_zod25.z.string(),
|
|
2749
|
+
successful_attack_count: import_zod25.z.number().int(),
|
|
2750
|
+
total_attack_count: import_zod25.z.number().int(),
|
|
2751
|
+
success_rate: import_zod25.z.number()
|
|
2349
2752
|
});
|
|
2350
|
-
var PropertyStatisticSchema =
|
|
2351
|
-
property_name:
|
|
2352
|
-
values:
|
|
2753
|
+
var PropertyStatisticSchema = import_zod25.z.object({
|
|
2754
|
+
property_name: import_zod25.z.string(),
|
|
2755
|
+
values: import_zod25.z.array(PropertyValueStatisticSchema)
|
|
2353
2756
|
});
|
|
2354
|
-
var PromptSetSummarySchema =
|
|
2355
|
-
prompt_set_id:
|
|
2356
|
-
prompt_set_name:
|
|
2357
|
-
total_prompts:
|
|
2358
|
-
total_attacks:
|
|
2359
|
-
total_threats:
|
|
2360
|
-
failed_attacks:
|
|
2361
|
-
threat_rate:
|
|
2362
|
-
property_names:
|
|
2363
|
-
property_statistics:
|
|
2364
|
-
}).passthrough();
|
|
2365
|
-
var CustomAttackReportResponseSchema =
|
|
2366
|
-
total_prompts:
|
|
2367
|
-
total_attacks:
|
|
2368
|
-
total_threats:
|
|
2369
|
-
failed_attacks:
|
|
2370
|
-
score:
|
|
2371
|
-
asr:
|
|
2372
|
-
custom_attack_reports:
|
|
2373
|
-
property_statistics:
|
|
2374
|
-
}).passthrough();
|
|
2375
|
-
var PromptSetsReportResponseSchema =
|
|
2376
|
-
prompt_sets:
|
|
2377
|
-
total_prompt_sets:
|
|
2378
|
-
applied_filters:
|
|
2379
|
-
}).passthrough();
|
|
2380
|
-
var PromptDetailResponseSchema =
|
|
2381
|
-
prompt_id:
|
|
2382
|
-
prompt_text:
|
|
2383
|
-
goal:
|
|
2384
|
-
user_defined_goal:
|
|
2385
|
-
properties:
|
|
2386
|
-
attack_id:
|
|
2387
|
-
threat:
|
|
2388
|
-
attack_outputs:
|
|
2389
|
-
asr:
|
|
2390
|
-
prompt_set_id:
|
|
2391
|
-
prompt_set_name:
|
|
2392
|
-
}).passthrough();
|
|
2393
|
-
var CustomAttacksListResponseSchema =
|
|
2757
|
+
var PromptSetSummarySchema = import_zod25.z.object({
|
|
2758
|
+
prompt_set_id: import_zod25.z.string(),
|
|
2759
|
+
prompt_set_name: import_zod25.z.string(),
|
|
2760
|
+
total_prompts: import_zod25.z.number().int(),
|
|
2761
|
+
total_attacks: import_zod25.z.number().int(),
|
|
2762
|
+
total_threats: import_zod25.z.number().int(),
|
|
2763
|
+
failed_attacks: import_zod25.z.number().int(),
|
|
2764
|
+
threat_rate: import_zod25.z.number(),
|
|
2765
|
+
property_names: import_zod25.z.array(import_zod25.z.string()).optional(),
|
|
2766
|
+
property_statistics: import_zod25.z.array(PropertyStatisticSchema).optional()
|
|
2767
|
+
}).passthrough();
|
|
2768
|
+
var CustomAttackReportResponseSchema = import_zod25.z.object({
|
|
2769
|
+
total_prompts: import_zod25.z.number().int(),
|
|
2770
|
+
total_attacks: import_zod25.z.number().int(),
|
|
2771
|
+
total_threats: import_zod25.z.number().int(),
|
|
2772
|
+
failed_attacks: import_zod25.z.number().int(),
|
|
2773
|
+
score: import_zod25.z.number(),
|
|
2774
|
+
asr: import_zod25.z.number(),
|
|
2775
|
+
custom_attack_reports: import_zod25.z.array(PromptSetSummarySchema).optional(),
|
|
2776
|
+
property_statistics: import_zod25.z.array(PropertyStatisticSchema).optional()
|
|
2777
|
+
}).passthrough();
|
|
2778
|
+
var PromptSetsReportResponseSchema = import_zod25.z.object({
|
|
2779
|
+
prompt_sets: import_zod25.z.array(PromptSetSummarySchema),
|
|
2780
|
+
total_prompt_sets: import_zod25.z.number().int(),
|
|
2781
|
+
applied_filters: import_zod25.z.record(import_zod25.z.unknown()).optional()
|
|
2782
|
+
}).passthrough();
|
|
2783
|
+
var PromptDetailResponseSchema = import_zod25.z.object({
|
|
2784
|
+
prompt_id: import_zod25.z.string(),
|
|
2785
|
+
prompt_text: import_zod25.z.string(),
|
|
2786
|
+
goal: import_zod25.z.string().nullable().optional(),
|
|
2787
|
+
user_defined_goal: import_zod25.z.boolean().optional(),
|
|
2788
|
+
properties: import_zod25.z.array(PropertyAssignmentSchema).optional(),
|
|
2789
|
+
attack_id: import_zod25.z.string().nullable().optional(),
|
|
2790
|
+
threat: import_zod25.z.boolean().nullable().optional(),
|
|
2791
|
+
attack_outputs: import_zod25.z.array(CustomAttackOutputSchema).optional(),
|
|
2792
|
+
asr: import_zod25.z.number().nullable().optional(),
|
|
2793
|
+
prompt_set_id: import_zod25.z.string().nullable().optional(),
|
|
2794
|
+
prompt_set_name: import_zod25.z.string().nullable().optional()
|
|
2795
|
+
}).passthrough();
|
|
2796
|
+
var CustomAttacksListResponseSchema = import_zod25.z.object({
|
|
2394
2797
|
pagination: RedTeamPaginationSchema,
|
|
2395
|
-
data:
|
|
2396
|
-
total_attacks:
|
|
2397
|
-
total_threats:
|
|
2398
|
-
}).passthrough();
|
|
2399
|
-
var RiskLevelSchema =
|
|
2400
|
-
risk_rating:
|
|
2401
|
-
total:
|
|
2402
|
-
targets_by_type:
|
|
2403
|
-
}).passthrough();
|
|
2404
|
-
var ScanStatisticsResponseSchema =
|
|
2405
|
-
total_scans:
|
|
2406
|
-
targets_scanned:
|
|
2407
|
-
targets_scanned_by_type:
|
|
2408
|
-
scan_status:
|
|
2409
|
-
risk_profile:
|
|
2410
|
-
}).passthrough();
|
|
2411
|
-
var ScoreTrendSeriesSchema =
|
|
2412
|
-
label:
|
|
2413
|
-
data:
|
|
2798
|
+
data: import_zod25.z.array(import_zod25.z.unknown()),
|
|
2799
|
+
total_attacks: import_zod25.z.number().int(),
|
|
2800
|
+
total_threats: import_zod25.z.number().int()
|
|
2801
|
+
}).passthrough();
|
|
2802
|
+
var RiskLevelSchema = import_zod25.z.object({
|
|
2803
|
+
risk_rating: import_zod25.z.string(),
|
|
2804
|
+
total: import_zod25.z.number().int(),
|
|
2805
|
+
targets_by_type: import_zod25.z.array(CountByNameSchema).optional()
|
|
2806
|
+
}).passthrough();
|
|
2807
|
+
var ScanStatisticsResponseSchema = import_zod25.z.object({
|
|
2808
|
+
total_scans: import_zod25.z.number().int(),
|
|
2809
|
+
targets_scanned: import_zod25.z.number().int(),
|
|
2810
|
+
targets_scanned_by_type: import_zod25.z.array(CountByNameSchema).optional(),
|
|
2811
|
+
scan_status: import_zod25.z.array(CountByNameSchema).optional(),
|
|
2812
|
+
risk_profile: import_zod25.z.array(RiskLevelSchema).optional()
|
|
2813
|
+
}).passthrough();
|
|
2814
|
+
var ScoreTrendSeriesSchema = import_zod25.z.object({
|
|
2815
|
+
label: import_zod25.z.string(),
|
|
2816
|
+
data: import_zod25.z.array(import_zod25.z.number().nullable())
|
|
2414
2817
|
});
|
|
2415
|
-
var ScoreTrendResponseSchema =
|
|
2416
|
-
labels:
|
|
2417
|
-
series:
|
|
2818
|
+
var ScoreTrendResponseSchema = import_zod25.z.object({
|
|
2819
|
+
labels: import_zod25.z.array(import_zod25.z.string()),
|
|
2820
|
+
series: import_zod25.z.array(ScoreTrendSeriesSchema)
|
|
2418
2821
|
});
|
|
2419
|
-
var SentimentRequestSchema =
|
|
2420
|
-
job_id:
|
|
2421
|
-
up_vote:
|
|
2422
|
-
down_vote:
|
|
2822
|
+
var SentimentRequestSchema = import_zod25.z.object({
|
|
2823
|
+
job_id: import_zod25.z.string(),
|
|
2824
|
+
up_vote: import_zod25.z.boolean().optional(),
|
|
2825
|
+
down_vote: import_zod25.z.boolean().optional()
|
|
2423
2826
|
});
|
|
2424
|
-
var SentimentResponseSchema =
|
|
2425
|
-
job_id:
|
|
2426
|
-
up_vote:
|
|
2427
|
-
down_vote:
|
|
2428
|
-
}).passthrough();
|
|
2429
|
-
var QuotaDetailsSchema =
|
|
2430
|
-
allocated:
|
|
2431
|
-
unlimited:
|
|
2432
|
-
consumed:
|
|
2827
|
+
var SentimentResponseSchema = import_zod25.z.object({
|
|
2828
|
+
job_id: import_zod25.z.string(),
|
|
2829
|
+
up_vote: import_zod25.z.boolean().optional(),
|
|
2830
|
+
down_vote: import_zod25.z.boolean().optional()
|
|
2831
|
+
}).passthrough();
|
|
2832
|
+
var QuotaDetailsSchema = import_zod25.z.object({
|
|
2833
|
+
allocated: import_zod25.z.number().int(),
|
|
2834
|
+
unlimited: import_zod25.z.boolean(),
|
|
2835
|
+
consumed: import_zod25.z.number().int()
|
|
2433
2836
|
});
|
|
2434
|
-
var QuotaSummarySchema =
|
|
2837
|
+
var QuotaSummarySchema = import_zod25.z.object({
|
|
2435
2838
|
static: QuotaDetailsSchema,
|
|
2436
2839
|
dynamic: QuotaDetailsSchema,
|
|
2437
2840
|
custom: QuotaDetailsSchema
|
|
2438
2841
|
});
|
|
2439
|
-
var ErrorLogSchema =
|
|
2440
|
-
created_at:
|
|
2441
|
-
updated_at:
|
|
2442
|
-
job_id:
|
|
2443
|
-
target_id:
|
|
2444
|
-
target_version:
|
|
2445
|
-
attack_id:
|
|
2446
|
-
error_type:
|
|
2447
|
-
error_source:
|
|
2448
|
-
error_message:
|
|
2449
|
-
target_object:
|
|
2450
|
-
extra_info:
|
|
2451
|
-
version:
|
|
2452
|
-
}).passthrough();
|
|
2453
|
-
var ErrorLogListResponseSchema =
|
|
2454
|
-
var TargetCreateRequestSchema =
|
|
2455
|
-
name:
|
|
2456
|
-
description:
|
|
2457
|
-
target_type:
|
|
2458
|
-
connection_type:
|
|
2459
|
-
api_endpoint_type:
|
|
2460
|
-
response_mode:
|
|
2461
|
-
connection_params:
|
|
2462
|
-
session_supported:
|
|
2463
|
-
target_metadata:
|
|
2464
|
-
target_background:
|
|
2465
|
-
additional_context:
|
|
2466
|
-
extra_info:
|
|
2467
|
-
network_broker_channel_uuid:
|
|
2468
|
-
}).passthrough();
|
|
2469
|
-
var TargetUpdateRequestSchema =
|
|
2470
|
-
name:
|
|
2471
|
-
description:
|
|
2472
|
-
target_type:
|
|
2473
|
-
connection_type:
|
|
2474
|
-
api_endpoint_type:
|
|
2475
|
-
response_mode:
|
|
2476
|
-
connection_params:
|
|
2477
|
-
session_supported:
|
|
2478
|
-
target_metadata:
|
|
2479
|
-
target_background:
|
|
2480
|
-
additional_context:
|
|
2481
|
-
extra_info:
|
|
2482
|
-
network_broker_channel_uuid:
|
|
2483
|
-
}).passthrough();
|
|
2484
|
-
var TargetContextUpdateSchema =
|
|
2485
|
-
target_background:
|
|
2486
|
-
additional_context:
|
|
2487
|
-
}).passthrough();
|
|
2488
|
-
var TargetResponseSchema =
|
|
2489
|
-
uuid:
|
|
2490
|
-
tsg_id:
|
|
2491
|
-
name:
|
|
2492
|
-
status:
|
|
2493
|
-
active:
|
|
2494
|
-
validated:
|
|
2495
|
-
created_at:
|
|
2496
|
-
updated_at:
|
|
2497
|
-
description:
|
|
2498
|
-
target_type:
|
|
2499
|
-
connection_type:
|
|
2500
|
-
api_endpoint_type:
|
|
2501
|
-
response_mode:
|
|
2502
|
-
session_supported:
|
|
2503
|
-
extra_info:
|
|
2504
|
-
version:
|
|
2505
|
-
secret_version:
|
|
2506
|
-
created_by_user_id:
|
|
2507
|
-
updated_by_user_id:
|
|
2508
|
-
target_metadata:
|
|
2509
|
-
target_background:
|
|
2510
|
-
profiling_status:
|
|
2511
|
-
additional_context:
|
|
2512
|
-
}).passthrough();
|
|
2513
|
-
var TargetListItemSchema =
|
|
2514
|
-
uuid:
|
|
2515
|
-
tsg_id:
|
|
2516
|
-
name:
|
|
2517
|
-
status:
|
|
2518
|
-
active:
|
|
2519
|
-
validated:
|
|
2520
|
-
created_at:
|
|
2521
|
-
updated_at:
|
|
2522
|
-
description:
|
|
2523
|
-
target_type:
|
|
2524
|
-
connection_type:
|
|
2525
|
-
api_endpoint_type:
|
|
2526
|
-
response_mode:
|
|
2527
|
-
session_supported:
|
|
2528
|
-
extra_info:
|
|
2529
|
-
version:
|
|
2530
|
-
secret_version:
|
|
2531
|
-
created_by_user_id:
|
|
2532
|
-
updated_by_user_id:
|
|
2533
|
-
}).passthrough();
|
|
2534
|
-
var TargetListSchema =
|
|
2535
|
-
var TargetProbeRequestSchema =
|
|
2536
|
-
name:
|
|
2537
|
-
uuid:
|
|
2538
|
-
description:
|
|
2539
|
-
target_type:
|
|
2540
|
-
connection_type:
|
|
2541
|
-
api_endpoint_type:
|
|
2542
|
-
response_mode:
|
|
2543
|
-
connection_params:
|
|
2544
|
-
session_supported:
|
|
2545
|
-
target_metadata:
|
|
2546
|
-
target_background:
|
|
2547
|
-
additional_context:
|
|
2548
|
-
extra_info:
|
|
2549
|
-
network_broker_channel_uuid:
|
|
2550
|
-
probe_fields:
|
|
2551
|
-
}).passthrough();
|
|
2552
|
-
var TargetProfileResponseSchema =
|
|
2553
|
-
target_id:
|
|
2554
|
-
target_version:
|
|
2555
|
-
status:
|
|
2556
|
-
profiling_status:
|
|
2557
|
-
target_background:
|
|
2558
|
-
additional_context:
|
|
2559
|
-
ai_generated_fields:
|
|
2560
|
-
other_details:
|
|
2561
|
-
}).passthrough();
|
|
2562
|
-
var BaseResponseSchema =
|
|
2563
|
-
message:
|
|
2564
|
-
status:
|
|
2842
|
+
var ErrorLogSchema = import_zod25.z.object({
|
|
2843
|
+
created_at: import_zod25.z.string(),
|
|
2844
|
+
updated_at: import_zod25.z.string(),
|
|
2845
|
+
job_id: import_zod25.z.string().nullable().optional(),
|
|
2846
|
+
target_id: import_zod25.z.string().nullable().optional(),
|
|
2847
|
+
target_version: import_zod25.z.number().int().nullable().optional(),
|
|
2848
|
+
attack_id: import_zod25.z.string().nullable().optional(),
|
|
2849
|
+
error_type: import_zod25.z.string().nullable().optional(),
|
|
2850
|
+
error_source: import_zod25.z.string().nullable().optional(),
|
|
2851
|
+
error_message: import_zod25.z.string().nullable().optional(),
|
|
2852
|
+
target_object: import_zod25.z.record(import_zod25.z.unknown()).nullable().optional(),
|
|
2853
|
+
extra_info: import_zod25.z.record(import_zod25.z.unknown()).nullable().optional(),
|
|
2854
|
+
version: import_zod25.z.number().int().optional()
|
|
2855
|
+
}).passthrough();
|
|
2856
|
+
var ErrorLogListResponseSchema = import_zod25.z.object({ pagination: RedTeamPaginationSchema, data: import_zod25.z.array(ErrorLogSchema) }).passthrough();
|
|
2857
|
+
var TargetCreateRequestSchema = import_zod25.z.object({
|
|
2858
|
+
name: import_zod25.z.string(),
|
|
2859
|
+
description: import_zod25.z.unknown().optional(),
|
|
2860
|
+
target_type: import_zod25.z.unknown().optional(),
|
|
2861
|
+
connection_type: import_zod25.z.unknown().optional(),
|
|
2862
|
+
api_endpoint_type: import_zod25.z.unknown().optional(),
|
|
2863
|
+
response_mode: import_zod25.z.unknown().optional(),
|
|
2864
|
+
connection_params: import_zod25.z.unknown().optional(),
|
|
2865
|
+
session_supported: import_zod25.z.boolean().optional(),
|
|
2866
|
+
target_metadata: import_zod25.z.unknown().optional(),
|
|
2867
|
+
target_background: import_zod25.z.unknown().optional(),
|
|
2868
|
+
additional_context: import_zod25.z.unknown().optional(),
|
|
2869
|
+
extra_info: import_zod25.z.unknown().optional(),
|
|
2870
|
+
network_broker_channel_uuid: import_zod25.z.unknown().optional()
|
|
2871
|
+
}).passthrough();
|
|
2872
|
+
var TargetUpdateRequestSchema = import_zod25.z.object({
|
|
2873
|
+
name: import_zod25.z.string(),
|
|
2874
|
+
description: import_zod25.z.unknown().optional(),
|
|
2875
|
+
target_type: import_zod25.z.unknown().optional(),
|
|
2876
|
+
connection_type: import_zod25.z.unknown().optional(),
|
|
2877
|
+
api_endpoint_type: import_zod25.z.unknown().optional(),
|
|
2878
|
+
response_mode: import_zod25.z.unknown().optional(),
|
|
2879
|
+
connection_params: import_zod25.z.unknown().optional(),
|
|
2880
|
+
session_supported: import_zod25.z.boolean().optional(),
|
|
2881
|
+
target_metadata: import_zod25.z.unknown().optional(),
|
|
2882
|
+
target_background: import_zod25.z.unknown().optional(),
|
|
2883
|
+
additional_context: import_zod25.z.unknown().optional(),
|
|
2884
|
+
extra_info: import_zod25.z.unknown().optional(),
|
|
2885
|
+
network_broker_channel_uuid: import_zod25.z.unknown().optional()
|
|
2886
|
+
}).passthrough();
|
|
2887
|
+
var TargetContextUpdateSchema = import_zod25.z.object({
|
|
2888
|
+
target_background: import_zod25.z.unknown().optional(),
|
|
2889
|
+
additional_context: import_zod25.z.unknown().optional()
|
|
2890
|
+
}).passthrough();
|
|
2891
|
+
var TargetResponseSchema = import_zod25.z.object({
|
|
2892
|
+
uuid: import_zod25.z.string(),
|
|
2893
|
+
tsg_id: import_zod25.z.string(),
|
|
2894
|
+
name: import_zod25.z.string(),
|
|
2895
|
+
status: import_zod25.z.unknown(),
|
|
2896
|
+
active: import_zod25.z.boolean(),
|
|
2897
|
+
validated: import_zod25.z.boolean(),
|
|
2898
|
+
created_at: import_zod25.z.string(),
|
|
2899
|
+
updated_at: import_zod25.z.string(),
|
|
2900
|
+
description: import_zod25.z.unknown().optional(),
|
|
2901
|
+
target_type: import_zod25.z.unknown().optional(),
|
|
2902
|
+
connection_type: import_zod25.z.unknown().optional(),
|
|
2903
|
+
api_endpoint_type: import_zod25.z.unknown().optional(),
|
|
2904
|
+
response_mode: import_zod25.z.unknown().optional(),
|
|
2905
|
+
session_supported: import_zod25.z.boolean().optional(),
|
|
2906
|
+
extra_info: import_zod25.z.unknown().optional(),
|
|
2907
|
+
version: import_zod25.z.unknown().optional(),
|
|
2908
|
+
secret_version: import_zod25.z.unknown().optional(),
|
|
2909
|
+
created_by_user_id: import_zod25.z.unknown().optional(),
|
|
2910
|
+
updated_by_user_id: import_zod25.z.unknown().optional(),
|
|
2911
|
+
target_metadata: import_zod25.z.unknown().optional(),
|
|
2912
|
+
target_background: import_zod25.z.unknown().optional(),
|
|
2913
|
+
profiling_status: import_zod25.z.unknown().optional(),
|
|
2914
|
+
additional_context: import_zod25.z.unknown().optional()
|
|
2915
|
+
}).passthrough();
|
|
2916
|
+
var TargetListItemSchema = import_zod25.z.object({
|
|
2917
|
+
uuid: import_zod25.z.string(),
|
|
2918
|
+
tsg_id: import_zod25.z.string(),
|
|
2919
|
+
name: import_zod25.z.string(),
|
|
2920
|
+
status: import_zod25.z.unknown(),
|
|
2921
|
+
active: import_zod25.z.boolean(),
|
|
2922
|
+
validated: import_zod25.z.boolean(),
|
|
2923
|
+
created_at: import_zod25.z.string(),
|
|
2924
|
+
updated_at: import_zod25.z.string(),
|
|
2925
|
+
description: import_zod25.z.unknown().optional(),
|
|
2926
|
+
target_type: import_zod25.z.unknown().optional(),
|
|
2927
|
+
connection_type: import_zod25.z.unknown().optional(),
|
|
2928
|
+
api_endpoint_type: import_zod25.z.unknown().optional(),
|
|
2929
|
+
response_mode: import_zod25.z.unknown().optional(),
|
|
2930
|
+
session_supported: import_zod25.z.boolean().optional(),
|
|
2931
|
+
extra_info: import_zod25.z.unknown().optional(),
|
|
2932
|
+
version: import_zod25.z.unknown().optional(),
|
|
2933
|
+
secret_version: import_zod25.z.unknown().optional(),
|
|
2934
|
+
created_by_user_id: import_zod25.z.unknown().optional(),
|
|
2935
|
+
updated_by_user_id: import_zod25.z.unknown().optional()
|
|
2936
|
+
}).passthrough();
|
|
2937
|
+
var TargetListSchema = import_zod25.z.object({ pagination: RedTeamPaginationSchema, data: import_zod25.z.array(TargetListItemSchema).optional() }).passthrough();
|
|
2938
|
+
var TargetProbeRequestSchema = import_zod25.z.object({
|
|
2939
|
+
name: import_zod25.z.string(),
|
|
2940
|
+
uuid: import_zod25.z.unknown().optional(),
|
|
2941
|
+
description: import_zod25.z.unknown().optional(),
|
|
2942
|
+
target_type: import_zod25.z.unknown().optional(),
|
|
2943
|
+
connection_type: import_zod25.z.unknown().optional(),
|
|
2944
|
+
api_endpoint_type: import_zod25.z.unknown().optional(),
|
|
2945
|
+
response_mode: import_zod25.z.unknown().optional(),
|
|
2946
|
+
connection_params: import_zod25.z.unknown().optional(),
|
|
2947
|
+
session_supported: import_zod25.z.boolean().optional(),
|
|
2948
|
+
target_metadata: import_zod25.z.unknown().optional(),
|
|
2949
|
+
target_background: import_zod25.z.unknown().optional(),
|
|
2950
|
+
additional_context: import_zod25.z.unknown().optional(),
|
|
2951
|
+
extra_info: import_zod25.z.unknown().optional(),
|
|
2952
|
+
network_broker_channel_uuid: import_zod25.z.unknown().optional(),
|
|
2953
|
+
probe_fields: import_zod25.z.unknown().optional()
|
|
2954
|
+
}).passthrough();
|
|
2955
|
+
var TargetProfileResponseSchema = import_zod25.z.object({
|
|
2956
|
+
target_id: import_zod25.z.string(),
|
|
2957
|
+
target_version: import_zod25.z.number().int(),
|
|
2958
|
+
status: import_zod25.z.string(),
|
|
2959
|
+
profiling_status: import_zod25.z.unknown().optional(),
|
|
2960
|
+
target_background: import_zod25.z.unknown().optional(),
|
|
2961
|
+
additional_context: import_zod25.z.unknown().optional(),
|
|
2962
|
+
ai_generated_fields: import_zod25.z.unknown().optional(),
|
|
2963
|
+
other_details: import_zod25.z.unknown().optional()
|
|
2964
|
+
}).passthrough();
|
|
2965
|
+
var BaseResponseSchema = import_zod25.z.object({
|
|
2966
|
+
message: import_zod25.z.string(),
|
|
2967
|
+
status: import_zod25.z.number().int()
|
|
2565
2968
|
});
|
|
2566
|
-
var PromptSetStatsSchema =
|
|
2567
|
-
total_prompts:
|
|
2568
|
-
active_prompts:
|
|
2569
|
-
inactive_prompts:
|
|
2570
|
-
failed_prompts:
|
|
2571
|
-
validation_prompts:
|
|
2572
|
-
}).passthrough();
|
|
2573
|
-
var CustomPromptSetCreateRequestSchema =
|
|
2574
|
-
name:
|
|
2575
|
-
description:
|
|
2576
|
-
property_names:
|
|
2969
|
+
var PromptSetStatsSchema = import_zod25.z.object({
|
|
2970
|
+
total_prompts: import_zod25.z.number().int(),
|
|
2971
|
+
active_prompts: import_zod25.z.number().int(),
|
|
2972
|
+
inactive_prompts: import_zod25.z.number().int(),
|
|
2973
|
+
failed_prompts: import_zod25.z.number().int().optional(),
|
|
2974
|
+
validation_prompts: import_zod25.z.number().int().optional()
|
|
2975
|
+
}).passthrough();
|
|
2976
|
+
var CustomPromptSetCreateRequestSchema = import_zod25.z.object({
|
|
2977
|
+
name: import_zod25.z.string(),
|
|
2978
|
+
description: import_zod25.z.unknown().optional(),
|
|
2979
|
+
property_names: import_zod25.z.array(import_zod25.z.string()).optional()
|
|
2577
2980
|
});
|
|
2578
|
-
var CustomPromptSetUpdateRequestSchema =
|
|
2579
|
-
name:
|
|
2580
|
-
description:
|
|
2581
|
-
archive:
|
|
2582
|
-
property_names:
|
|
2583
|
-
}).passthrough();
|
|
2584
|
-
var CustomPromptSetArchiveRequestSchema =
|
|
2585
|
-
var CustomPromptSetResponseSchema =
|
|
2586
|
-
uuid:
|
|
2587
|
-
name:
|
|
2588
|
-
active:
|
|
2589
|
-
archive:
|
|
2590
|
-
status:
|
|
2591
|
-
created_at:
|
|
2592
|
-
updated_at:
|
|
2593
|
-
description:
|
|
2594
|
-
property_names:
|
|
2595
|
-
properties:
|
|
2596
|
-
stats:
|
|
2597
|
-
extra_info:
|
|
2598
|
-
version:
|
|
2599
|
-
created_by_user_id:
|
|
2600
|
-
updated_by_user_id:
|
|
2601
|
-
}).passthrough();
|
|
2602
|
-
var CustomPromptSetListItemSchema =
|
|
2603
|
-
uuid:
|
|
2604
|
-
name:
|
|
2605
|
-
active:
|
|
2606
|
-
archive:
|
|
2607
|
-
status:
|
|
2608
|
-
created_at:
|
|
2609
|
-
updated_at:
|
|
2610
|
-
description:
|
|
2611
|
-
property_names:
|
|
2612
|
-
stats:
|
|
2613
|
-
created_by_user_id:
|
|
2614
|
-
}).passthrough();
|
|
2615
|
-
var CustomPromptSetListSchema =
|
|
2981
|
+
var CustomPromptSetUpdateRequestSchema = import_zod25.z.object({
|
|
2982
|
+
name: import_zod25.z.unknown().optional(),
|
|
2983
|
+
description: import_zod25.z.unknown().optional(),
|
|
2984
|
+
archive: import_zod25.z.unknown().optional(),
|
|
2985
|
+
property_names: import_zod25.z.unknown().optional()
|
|
2986
|
+
}).passthrough();
|
|
2987
|
+
var CustomPromptSetArchiveRequestSchema = import_zod25.z.object({ archive: import_zod25.z.boolean() });
|
|
2988
|
+
var CustomPromptSetResponseSchema = import_zod25.z.object({
|
|
2989
|
+
uuid: import_zod25.z.string(),
|
|
2990
|
+
name: import_zod25.z.string(),
|
|
2991
|
+
active: import_zod25.z.boolean(),
|
|
2992
|
+
archive: import_zod25.z.boolean(),
|
|
2993
|
+
status: import_zod25.z.string(),
|
|
2994
|
+
created_at: import_zod25.z.string(),
|
|
2995
|
+
updated_at: import_zod25.z.string(),
|
|
2996
|
+
description: import_zod25.z.unknown().optional(),
|
|
2997
|
+
property_names: import_zod25.z.array(import_zod25.z.string()).optional(),
|
|
2998
|
+
properties: import_zod25.z.array(import_zod25.z.unknown()).optional(),
|
|
2999
|
+
stats: import_zod25.z.unknown().optional(),
|
|
3000
|
+
extra_info: import_zod25.z.unknown().optional(),
|
|
3001
|
+
version: import_zod25.z.unknown().optional(),
|
|
3002
|
+
created_by_user_id: import_zod25.z.unknown().optional(),
|
|
3003
|
+
updated_by_user_id: import_zod25.z.unknown().optional()
|
|
3004
|
+
}).passthrough();
|
|
3005
|
+
var CustomPromptSetListItemSchema = import_zod25.z.object({
|
|
3006
|
+
uuid: import_zod25.z.string(),
|
|
3007
|
+
name: import_zod25.z.string(),
|
|
3008
|
+
active: import_zod25.z.boolean(),
|
|
3009
|
+
archive: import_zod25.z.boolean(),
|
|
3010
|
+
status: import_zod25.z.string(),
|
|
3011
|
+
created_at: import_zod25.z.string(),
|
|
3012
|
+
updated_at: import_zod25.z.string(),
|
|
3013
|
+
description: import_zod25.z.unknown().optional(),
|
|
3014
|
+
property_names: import_zod25.z.array(import_zod25.z.string()).optional(),
|
|
3015
|
+
stats: import_zod25.z.unknown().optional(),
|
|
3016
|
+
created_by_user_id: import_zod25.z.unknown().optional()
|
|
3017
|
+
}).passthrough();
|
|
3018
|
+
var CustomPromptSetListSchema = import_zod25.z.object({
|
|
2616
3019
|
pagination: RedTeamPaginationSchema,
|
|
2617
|
-
data:
|
|
2618
|
-
}).passthrough();
|
|
2619
|
-
var CustomPromptSetListActiveSchema =
|
|
2620
|
-
var CustomPromptSetReferenceSchema =
|
|
2621
|
-
uuid:
|
|
2622
|
-
name:
|
|
2623
|
-
status:
|
|
2624
|
-
active:
|
|
2625
|
-
tsg_id:
|
|
2626
|
-
created_at:
|
|
2627
|
-
updated_at:
|
|
2628
|
-
version:
|
|
2629
|
-
}).passthrough();
|
|
2630
|
-
var CustomPromptSetVersionInfoSchema =
|
|
2631
|
-
uuid:
|
|
2632
|
-
status:
|
|
2633
|
-
is_latest:
|
|
2634
|
-
version:
|
|
3020
|
+
data: import_zod25.z.array(CustomPromptSetListItemSchema).optional()
|
|
3021
|
+
}).passthrough();
|
|
3022
|
+
var CustomPromptSetListActiveSchema = import_zod25.z.object({ data: import_zod25.z.array(CustomPromptSetListItemSchema).optional() }).passthrough();
|
|
3023
|
+
var CustomPromptSetReferenceSchema = import_zod25.z.object({
|
|
3024
|
+
uuid: import_zod25.z.string(),
|
|
3025
|
+
name: import_zod25.z.string(),
|
|
3026
|
+
status: import_zod25.z.string(),
|
|
3027
|
+
active: import_zod25.z.boolean(),
|
|
3028
|
+
tsg_id: import_zod25.z.string(),
|
|
3029
|
+
created_at: import_zod25.z.string(),
|
|
3030
|
+
updated_at: import_zod25.z.string(),
|
|
3031
|
+
version: import_zod25.z.unknown().optional()
|
|
3032
|
+
}).passthrough();
|
|
3033
|
+
var CustomPromptSetVersionInfoSchema = import_zod25.z.object({
|
|
3034
|
+
uuid: import_zod25.z.string(),
|
|
3035
|
+
status: import_zod25.z.string(),
|
|
3036
|
+
is_latest: import_zod25.z.boolean(),
|
|
3037
|
+
version: import_zod25.z.string().nullable().optional(),
|
|
2635
3038
|
stats: PromptSetStatsSchema.nullable().optional(),
|
|
2636
|
-
snapshot_created_at:
|
|
3039
|
+
snapshot_created_at: import_zod25.z.string().nullable().optional()
|
|
2637
3040
|
}).passthrough();
|
|
2638
|
-
var CustomPromptCreateRequestSchema =
|
|
2639
|
-
prompt:
|
|
2640
|
-
prompt_set_id:
|
|
2641
|
-
goal:
|
|
2642
|
-
properties:
|
|
3041
|
+
var CustomPromptCreateRequestSchema = import_zod25.z.object({
|
|
3042
|
+
prompt: import_zod25.z.string(),
|
|
3043
|
+
prompt_set_id: import_zod25.z.string(),
|
|
3044
|
+
goal: import_zod25.z.unknown().optional(),
|
|
3045
|
+
properties: import_zod25.z.unknown().optional()
|
|
2643
3046
|
});
|
|
2644
|
-
var CustomPromptUpdateRequestSchema =
|
|
2645
|
-
prompt:
|
|
2646
|
-
goal:
|
|
2647
|
-
properties:
|
|
2648
|
-
}).passthrough();
|
|
2649
|
-
var CustomPromptResponseSchema =
|
|
2650
|
-
uuid:
|
|
2651
|
-
prompt:
|
|
2652
|
-
user_defined_goal:
|
|
2653
|
-
status:
|
|
2654
|
-
active:
|
|
2655
|
-
prompt_set_id:
|
|
2656
|
-
created_at:
|
|
2657
|
-
updated_at:
|
|
2658
|
-
goal:
|
|
2659
|
-
properties:
|
|
2660
|
-
property_assignments:
|
|
2661
|
-
detector_category:
|
|
2662
|
-
severity:
|
|
2663
|
-
extra_info:
|
|
2664
|
-
}).passthrough();
|
|
2665
|
-
var CustomPromptListItemSchema =
|
|
2666
|
-
uuid:
|
|
2667
|
-
prompt:
|
|
2668
|
-
user_defined_goal:
|
|
2669
|
-
status:
|
|
2670
|
-
active:
|
|
2671
|
-
created_at:
|
|
2672
|
-
updated_at:
|
|
2673
|
-
goal:
|
|
2674
|
-
properties:
|
|
2675
|
-
}).passthrough();
|
|
2676
|
-
var CustomPromptListSchema =
|
|
3047
|
+
var CustomPromptUpdateRequestSchema = import_zod25.z.object({
|
|
3048
|
+
prompt: import_zod25.z.unknown().optional(),
|
|
3049
|
+
goal: import_zod25.z.unknown().optional(),
|
|
3050
|
+
properties: import_zod25.z.unknown().optional()
|
|
3051
|
+
}).passthrough();
|
|
3052
|
+
var CustomPromptResponseSchema = import_zod25.z.object({
|
|
3053
|
+
uuid: import_zod25.z.string(),
|
|
3054
|
+
prompt: import_zod25.z.string(),
|
|
3055
|
+
user_defined_goal: import_zod25.z.boolean(),
|
|
3056
|
+
status: import_zod25.z.string(),
|
|
3057
|
+
active: import_zod25.z.boolean(),
|
|
3058
|
+
prompt_set_id: import_zod25.z.string(),
|
|
3059
|
+
created_at: import_zod25.z.string(),
|
|
3060
|
+
updated_at: import_zod25.z.string(),
|
|
3061
|
+
goal: import_zod25.z.unknown().optional(),
|
|
3062
|
+
properties: import_zod25.z.unknown().optional(),
|
|
3063
|
+
property_assignments: import_zod25.z.array(import_zod25.z.unknown()).optional(),
|
|
3064
|
+
detector_category: import_zod25.z.unknown().optional(),
|
|
3065
|
+
severity: import_zod25.z.unknown().optional(),
|
|
3066
|
+
extra_info: import_zod25.z.unknown().optional()
|
|
3067
|
+
}).passthrough();
|
|
3068
|
+
var CustomPromptListItemSchema = import_zod25.z.object({
|
|
3069
|
+
uuid: import_zod25.z.string(),
|
|
3070
|
+
prompt: import_zod25.z.string(),
|
|
3071
|
+
user_defined_goal: import_zod25.z.boolean(),
|
|
3072
|
+
status: import_zod25.z.string(),
|
|
3073
|
+
active: import_zod25.z.boolean(),
|
|
3074
|
+
created_at: import_zod25.z.string(),
|
|
3075
|
+
updated_at: import_zod25.z.string(),
|
|
3076
|
+
goal: import_zod25.z.unknown().optional(),
|
|
3077
|
+
properties: import_zod25.z.unknown().optional()
|
|
3078
|
+
}).passthrough();
|
|
3079
|
+
var CustomPromptListSchema = import_zod25.z.object({
|
|
2677
3080
|
pagination: RedTeamPaginationSchema,
|
|
2678
|
-
data:
|
|
3081
|
+
data: import_zod25.z.array(CustomPromptListItemSchema).optional()
|
|
2679
3082
|
}).passthrough();
|
|
2680
|
-
var PropertyNameCreateRequestSchema =
|
|
2681
|
-
var PropertyValueCreateRequestSchema =
|
|
2682
|
-
property_name:
|
|
2683
|
-
property_value:
|
|
3083
|
+
var PropertyNameCreateRequestSchema = import_zod25.z.object({ name: import_zod25.z.string() });
|
|
3084
|
+
var PropertyValueCreateRequestSchema = import_zod25.z.object({
|
|
3085
|
+
property_name: import_zod25.z.string(),
|
|
3086
|
+
property_value: import_zod25.z.string()
|
|
2684
3087
|
});
|
|
2685
|
-
var PropertyDefinitionSchema =
|
|
2686
|
-
property_name:
|
|
2687
|
-
created_at:
|
|
3088
|
+
var PropertyDefinitionSchema = import_zod25.z.object({
|
|
3089
|
+
property_name: import_zod25.z.string(),
|
|
3090
|
+
created_at: import_zod25.z.string()
|
|
2688
3091
|
});
|
|
2689
|
-
var PropertyNamesListResponseSchema =
|
|
2690
|
-
var PropertyValuesResponseSchema =
|
|
2691
|
-
name:
|
|
2692
|
-
values:
|
|
3092
|
+
var PropertyNamesListResponseSchema = import_zod25.z.object({ data: import_zod25.z.array(PropertyDefinitionSchema).optional() }).passthrough();
|
|
3093
|
+
var PropertyValuesResponseSchema = import_zod25.z.object({
|
|
3094
|
+
name: import_zod25.z.string(),
|
|
3095
|
+
values: import_zod25.z.array(import_zod25.z.string()).optional()
|
|
2693
3096
|
}).passthrough();
|
|
2694
|
-
var PropertyValuesMultipleResponseSchema =
|
|
2695
|
-
var DashboardOverviewResponseSchema =
|
|
2696
|
-
total_targets:
|
|
2697
|
-
targets_by_type:
|
|
3097
|
+
var PropertyValuesMultipleResponseSchema = import_zod25.z.object({ data: import_zod25.z.record(import_zod25.z.array(import_zod25.z.string())).optional() }).passthrough();
|
|
3098
|
+
var DashboardOverviewResponseSchema = import_zod25.z.object({
|
|
3099
|
+
total_targets: import_zod25.z.number().int(),
|
|
3100
|
+
targets_by_type: import_zod25.z.array(CountByNameSchema).optional()
|
|
2698
3101
|
}).passthrough();
|
|
2699
3102
|
|
|
2700
3103
|
// src/models/oauth-token.ts
|
|
2701
|
-
var
|
|
2702
|
-
var OAuthTokenResponseSchema =
|
|
2703
|
-
access_token:
|
|
2704
|
-
token_type:
|
|
2705
|
-
expires_in:
|
|
2706
|
-
scope:
|
|
2707
|
-
});
|
|
3104
|
+
var import_zod26 = require("zod");
|
|
3105
|
+
var OAuthTokenResponseSchema = import_zod26.z.object({
|
|
3106
|
+
access_token: import_zod26.z.string(),
|
|
3107
|
+
token_type: import_zod26.z.string().optional(),
|
|
3108
|
+
expires_in: import_zod26.z.number(),
|
|
3109
|
+
scope: import_zod26.z.string().optional()
|
|
3110
|
+
}).passthrough();
|
|
2708
3111
|
|
|
2709
3112
|
// src/management/oauth-client.ts
|
|
2710
3113
|
var DEFAULT_TOKEN_BUFFER_MS = 3e4;
|
|
@@ -2872,8 +3275,327 @@ async function managementHttpRequest(opts) {
|
|
|
2872
3275
|
return { status: response.status, data };
|
|
2873
3276
|
}
|
|
2874
3277
|
|
|
2875
|
-
// src/management/profiles.ts
|
|
2876
|
-
var ProfilesClient = class {
|
|
3278
|
+
// src/management/profiles.ts
|
|
3279
|
+
var ProfilesClient = class {
|
|
3280
|
+
baseUrl;
|
|
3281
|
+
oauthClient;
|
|
3282
|
+
tsgId;
|
|
3283
|
+
numRetries;
|
|
3284
|
+
constructor(opts) {
|
|
3285
|
+
this.baseUrl = opts.baseUrl;
|
|
3286
|
+
this.oauthClient = opts.oauthClient;
|
|
3287
|
+
this.tsgId = opts.tsgId;
|
|
3288
|
+
this.numRetries = opts.numRetries;
|
|
3289
|
+
}
|
|
3290
|
+
/**
|
|
3291
|
+
* Create a new security profile.
|
|
3292
|
+
* @param request - Profile configuration.
|
|
3293
|
+
* @returns The created security profile.
|
|
3294
|
+
*/
|
|
3295
|
+
async create(request) {
|
|
3296
|
+
const res = await managementHttpRequest({
|
|
3297
|
+
method: "POST",
|
|
3298
|
+
baseUrl: this.baseUrl,
|
|
3299
|
+
path: MGMT_PROFILE_PATH,
|
|
3300
|
+
body: request,
|
|
3301
|
+
oauthClient: this.oauthClient,
|
|
3302
|
+
numRetries: this.numRetries
|
|
3303
|
+
});
|
|
3304
|
+
return res.data;
|
|
3305
|
+
}
|
|
3306
|
+
/**
|
|
3307
|
+
* List security profiles for the TSG.
|
|
3308
|
+
* @param opts - Pagination options.
|
|
3309
|
+
* @returns Paginated list of security profiles.
|
|
3310
|
+
*/
|
|
3311
|
+
async list(opts) {
|
|
3312
|
+
const params = {
|
|
3313
|
+
offset: String(opts?.offset ?? 0),
|
|
3314
|
+
limit: String(opts?.limit ?? 100)
|
|
3315
|
+
};
|
|
3316
|
+
const res = await managementHttpRequest({
|
|
3317
|
+
method: "GET",
|
|
3318
|
+
baseUrl: this.baseUrl,
|
|
3319
|
+
path: `${MGMT_PROFILES_TSG_PATH}/${this.tsgId}`,
|
|
3320
|
+
params,
|
|
3321
|
+
oauthClient: this.oauthClient,
|
|
3322
|
+
numRetries: this.numRetries
|
|
3323
|
+
});
|
|
3324
|
+
return res.data;
|
|
3325
|
+
}
|
|
3326
|
+
/**
|
|
3327
|
+
* Update an existing security profile.
|
|
3328
|
+
* @param profileId - UUID of the profile to update.
|
|
3329
|
+
* @param request - Updated profile configuration.
|
|
3330
|
+
* @returns The updated security profile.
|
|
3331
|
+
*/
|
|
3332
|
+
async update(profileId, request) {
|
|
3333
|
+
if (!isValidUuid(profileId)) {
|
|
3334
|
+
throw new AISecSDKException(
|
|
3335
|
+
`Invalid profile_id: ${profileId}`,
|
|
3336
|
+
"AISEC_USER_REQUEST_PAYLOAD_ERROR" /* USER_REQUEST_PAYLOAD_ERROR */
|
|
3337
|
+
);
|
|
3338
|
+
}
|
|
3339
|
+
const res = await managementHttpRequest({
|
|
3340
|
+
method: "PUT",
|
|
3341
|
+
baseUrl: this.baseUrl,
|
|
3342
|
+
path: `${MGMT_PROFILE_PATH}/uuid/${profileId}`,
|
|
3343
|
+
body: request,
|
|
3344
|
+
oauthClient: this.oauthClient,
|
|
3345
|
+
numRetries: this.numRetries
|
|
3346
|
+
});
|
|
3347
|
+
return res.data;
|
|
3348
|
+
}
|
|
3349
|
+
/**
|
|
3350
|
+
* Delete a security profile.
|
|
3351
|
+
* @param profileId - UUID of the profile to delete.
|
|
3352
|
+
* @returns Deletion confirmation message.
|
|
3353
|
+
*/
|
|
3354
|
+
async delete(profileId) {
|
|
3355
|
+
if (!isValidUuid(profileId)) {
|
|
3356
|
+
throw new AISecSDKException(
|
|
3357
|
+
`Invalid profile_id: ${profileId}`,
|
|
3358
|
+
"AISEC_USER_REQUEST_PAYLOAD_ERROR" /* USER_REQUEST_PAYLOAD_ERROR */
|
|
3359
|
+
);
|
|
3360
|
+
}
|
|
3361
|
+
const res = await managementHttpRequest({
|
|
3362
|
+
method: "DELETE",
|
|
3363
|
+
baseUrl: this.baseUrl,
|
|
3364
|
+
path: `${MGMT_PROFILE_PATH}/${profileId}`,
|
|
3365
|
+
oauthClient: this.oauthClient,
|
|
3366
|
+
numRetries: this.numRetries
|
|
3367
|
+
});
|
|
3368
|
+
return res.data;
|
|
3369
|
+
}
|
|
3370
|
+
/**
|
|
3371
|
+
* Force-delete a security profile, bypassing safety checks.
|
|
3372
|
+
* @param profileId - UUID of the profile to force-delete.
|
|
3373
|
+
* @param updatedBy - Email of the user performing the deletion.
|
|
3374
|
+
* @returns Deletion confirmation message.
|
|
3375
|
+
*/
|
|
3376
|
+
async forceDelete(profileId, updatedBy) {
|
|
3377
|
+
if (!isValidUuid(profileId)) {
|
|
3378
|
+
throw new AISecSDKException(
|
|
3379
|
+
`Invalid profile_id: ${profileId}`,
|
|
3380
|
+
"AISEC_USER_REQUEST_PAYLOAD_ERROR" /* USER_REQUEST_PAYLOAD_ERROR */
|
|
3381
|
+
);
|
|
3382
|
+
}
|
|
3383
|
+
const res = await managementHttpRequest({
|
|
3384
|
+
method: "DELETE",
|
|
3385
|
+
baseUrl: this.baseUrl,
|
|
3386
|
+
path: `${MGMT_PROFILE_PATH}/${profileId}/force`,
|
|
3387
|
+
params: { updated_by: updatedBy },
|
|
3388
|
+
oauthClient: this.oauthClient,
|
|
3389
|
+
numRetries: this.numRetries
|
|
3390
|
+
});
|
|
3391
|
+
return res.data;
|
|
3392
|
+
}
|
|
3393
|
+
};
|
|
3394
|
+
|
|
3395
|
+
// src/management/topics.ts
|
|
3396
|
+
var TopicsClient = class {
|
|
3397
|
+
baseUrl;
|
|
3398
|
+
oauthClient;
|
|
3399
|
+
tsgId;
|
|
3400
|
+
numRetries;
|
|
3401
|
+
constructor(opts) {
|
|
3402
|
+
this.baseUrl = opts.baseUrl;
|
|
3403
|
+
this.oauthClient = opts.oauthClient;
|
|
3404
|
+
this.tsgId = opts.tsgId;
|
|
3405
|
+
this.numRetries = opts.numRetries;
|
|
3406
|
+
}
|
|
3407
|
+
/**
|
|
3408
|
+
* Create a new custom topic.
|
|
3409
|
+
* @param request - Topic definition with name, description, and examples.
|
|
3410
|
+
* @returns The created custom topic.
|
|
3411
|
+
*/
|
|
3412
|
+
async create(request) {
|
|
3413
|
+
const res = await managementHttpRequest({
|
|
3414
|
+
method: "POST",
|
|
3415
|
+
baseUrl: this.baseUrl,
|
|
3416
|
+
path: MGMT_TOPIC_PATH,
|
|
3417
|
+
body: request,
|
|
3418
|
+
oauthClient: this.oauthClient,
|
|
3419
|
+
numRetries: this.numRetries
|
|
3420
|
+
});
|
|
3421
|
+
return res.data;
|
|
3422
|
+
}
|
|
3423
|
+
/**
|
|
3424
|
+
* List custom topics for the TSG.
|
|
3425
|
+
* @param opts - Pagination options.
|
|
3426
|
+
* @returns Paginated list of custom topics.
|
|
3427
|
+
*/
|
|
3428
|
+
async list(opts) {
|
|
3429
|
+
const params = {
|
|
3430
|
+
offset: String(opts?.offset ?? 0),
|
|
3431
|
+
limit: String(opts?.limit ?? 100)
|
|
3432
|
+
};
|
|
3433
|
+
const res = await managementHttpRequest({
|
|
3434
|
+
method: "GET",
|
|
3435
|
+
baseUrl: this.baseUrl,
|
|
3436
|
+
path: `${MGMT_TOPICS_TSG_PATH}/${this.tsgId}`,
|
|
3437
|
+
params,
|
|
3438
|
+
oauthClient: this.oauthClient,
|
|
3439
|
+
numRetries: this.numRetries
|
|
3440
|
+
});
|
|
3441
|
+
return res.data;
|
|
3442
|
+
}
|
|
3443
|
+
/**
|
|
3444
|
+
* Update an existing custom topic.
|
|
3445
|
+
* @param topicId - UUID of the topic to update.
|
|
3446
|
+
* @param request - Updated topic definition.
|
|
3447
|
+
* @returns The updated custom topic.
|
|
3448
|
+
*/
|
|
3449
|
+
async update(topicId, request) {
|
|
3450
|
+
if (!isValidUuid(topicId)) {
|
|
3451
|
+
throw new AISecSDKException(
|
|
3452
|
+
`Invalid topic_id: ${topicId}`,
|
|
3453
|
+
"AISEC_USER_REQUEST_PAYLOAD_ERROR" /* USER_REQUEST_PAYLOAD_ERROR */
|
|
3454
|
+
);
|
|
3455
|
+
}
|
|
3456
|
+
const res = await managementHttpRequest({
|
|
3457
|
+
method: "PUT",
|
|
3458
|
+
baseUrl: this.baseUrl,
|
|
3459
|
+
path: `${MGMT_TOPIC_PATH}/uuid/${topicId}`,
|
|
3460
|
+
body: request,
|
|
3461
|
+
oauthClient: this.oauthClient,
|
|
3462
|
+
numRetries: this.numRetries
|
|
3463
|
+
});
|
|
3464
|
+
return res.data;
|
|
3465
|
+
}
|
|
3466
|
+
/**
|
|
3467
|
+
* Delete a custom topic. Fails if topic is referenced by a profile.
|
|
3468
|
+
* @param topicId - UUID of the topic to delete.
|
|
3469
|
+
* @returns Deletion confirmation message.
|
|
3470
|
+
*/
|
|
3471
|
+
async delete(topicId) {
|
|
3472
|
+
if (!isValidUuid(topicId)) {
|
|
3473
|
+
throw new AISecSDKException(
|
|
3474
|
+
`Invalid topic_id: ${topicId}`,
|
|
3475
|
+
"AISEC_USER_REQUEST_PAYLOAD_ERROR" /* USER_REQUEST_PAYLOAD_ERROR */
|
|
3476
|
+
);
|
|
3477
|
+
}
|
|
3478
|
+
const res = await managementHttpRequest({
|
|
3479
|
+
method: "DELETE",
|
|
3480
|
+
baseUrl: this.baseUrl,
|
|
3481
|
+
path: `${MGMT_TOPIC_PATH}/${topicId}`,
|
|
3482
|
+
oauthClient: this.oauthClient,
|
|
3483
|
+
numRetries: this.numRetries
|
|
3484
|
+
});
|
|
3485
|
+
return res.data;
|
|
3486
|
+
}
|
|
3487
|
+
/**
|
|
3488
|
+
* Force-delete a custom topic, removing it from any referencing profiles.
|
|
3489
|
+
* @param topicId - UUID of the topic to force-delete.
|
|
3490
|
+
* @param updatedBy - Email of the user performing the deletion.
|
|
3491
|
+
* @returns Deletion confirmation message.
|
|
3492
|
+
*/
|
|
3493
|
+
async forceDelete(topicId, updatedBy) {
|
|
3494
|
+
if (!isValidUuid(topicId)) {
|
|
3495
|
+
throw new AISecSDKException(
|
|
3496
|
+
`Invalid topic_id: ${topicId}`,
|
|
3497
|
+
"AISEC_USER_REQUEST_PAYLOAD_ERROR" /* USER_REQUEST_PAYLOAD_ERROR */
|
|
3498
|
+
);
|
|
3499
|
+
}
|
|
3500
|
+
const params = updatedBy ? { updated_by: updatedBy } : void 0;
|
|
3501
|
+
const res = await managementHttpRequest({
|
|
3502
|
+
method: "DELETE",
|
|
3503
|
+
baseUrl: this.baseUrl,
|
|
3504
|
+
path: `${MGMT_TOPIC_FORCE_PATH}/${topicId}`,
|
|
3505
|
+
params,
|
|
3506
|
+
oauthClient: this.oauthClient,
|
|
3507
|
+
numRetries: this.numRetries
|
|
3508
|
+
});
|
|
3509
|
+
return res.data;
|
|
3510
|
+
}
|
|
3511
|
+
};
|
|
3512
|
+
|
|
3513
|
+
// src/management/api-keys.ts
|
|
3514
|
+
var ApiKeysClient = class {
|
|
3515
|
+
baseUrl;
|
|
3516
|
+
oauthClient;
|
|
3517
|
+
tsgId;
|
|
3518
|
+
numRetries;
|
|
3519
|
+
constructor(opts) {
|
|
3520
|
+
this.baseUrl = opts.baseUrl;
|
|
3521
|
+
this.oauthClient = opts.oauthClient;
|
|
3522
|
+
this.tsgId = opts.tsgId;
|
|
3523
|
+
this.numRetries = opts.numRetries;
|
|
3524
|
+
}
|
|
3525
|
+
/**
|
|
3526
|
+
* Create a new API key.
|
|
3527
|
+
* @param request - API key creation request.
|
|
3528
|
+
* @returns The created API key.
|
|
3529
|
+
*/
|
|
3530
|
+
async create(request) {
|
|
3531
|
+
const res = await managementHttpRequest({
|
|
3532
|
+
method: "POST",
|
|
3533
|
+
baseUrl: this.baseUrl,
|
|
3534
|
+
path: MGMT_API_KEY_PATH,
|
|
3535
|
+
body: request,
|
|
3536
|
+
oauthClient: this.oauthClient,
|
|
3537
|
+
numRetries: this.numRetries
|
|
3538
|
+
});
|
|
3539
|
+
return res.data;
|
|
3540
|
+
}
|
|
3541
|
+
/**
|
|
3542
|
+
* List API keys for the TSG.
|
|
3543
|
+
* @param opts - Pagination options.
|
|
3544
|
+
* @returns Paginated list of API keys.
|
|
3545
|
+
*/
|
|
3546
|
+
async list(opts) {
|
|
3547
|
+
const params = {
|
|
3548
|
+
offset: String(opts?.offset ?? 0),
|
|
3549
|
+
limit: String(opts?.limit ?? 100)
|
|
3550
|
+
};
|
|
3551
|
+
const res = await managementHttpRequest({
|
|
3552
|
+
method: "GET",
|
|
3553
|
+
baseUrl: this.baseUrl,
|
|
3554
|
+
path: `${MGMT_API_KEYS_TSG_PATH}/${this.tsgId}`,
|
|
3555
|
+
params,
|
|
3556
|
+
oauthClient: this.oauthClient,
|
|
3557
|
+
numRetries: this.numRetries
|
|
3558
|
+
});
|
|
3559
|
+
return res.data;
|
|
3560
|
+
}
|
|
3561
|
+
/**
|
|
3562
|
+
* Delete an API key by name.
|
|
3563
|
+
* @param apiKeyName - Name of the API key to delete.
|
|
3564
|
+
* @param updatedBy - Email of user performing the deletion.
|
|
3565
|
+
* @returns Deletion confirmation.
|
|
3566
|
+
*/
|
|
3567
|
+
async delete(apiKeyName, updatedBy) {
|
|
3568
|
+
const res = await managementHttpRequest({
|
|
3569
|
+
method: "DELETE",
|
|
3570
|
+
baseUrl: this.baseUrl,
|
|
3571
|
+
path: `${MGMT_API_KEY_PATH}/delete/${encodeURIComponent(apiKeyName)}`,
|
|
3572
|
+
params: { updated_by: updatedBy },
|
|
3573
|
+
oauthClient: this.oauthClient,
|
|
3574
|
+
numRetries: this.numRetries
|
|
3575
|
+
});
|
|
3576
|
+
return res.data;
|
|
3577
|
+
}
|
|
3578
|
+
/**
|
|
3579
|
+
* Regenerate an API key.
|
|
3580
|
+
* @param apiKeyId - UUID of the API key to regenerate.
|
|
3581
|
+
* @param request - Regeneration request with rotation config.
|
|
3582
|
+
* @returns The regenerated API key.
|
|
3583
|
+
*/
|
|
3584
|
+
async regenerate(apiKeyId, request) {
|
|
3585
|
+
const res = await managementHttpRequest({
|
|
3586
|
+
method: "POST",
|
|
3587
|
+
baseUrl: this.baseUrl,
|
|
3588
|
+
path: `${MGMT_API_KEY_PATH}/regenerate/${encodeURIComponent(apiKeyId)}`,
|
|
3589
|
+
body: request,
|
|
3590
|
+
oauthClient: this.oauthClient,
|
|
3591
|
+
numRetries: this.numRetries
|
|
3592
|
+
});
|
|
3593
|
+
return res.data;
|
|
3594
|
+
}
|
|
3595
|
+
};
|
|
3596
|
+
|
|
3597
|
+
// src/management/customer-apps.ts
|
|
3598
|
+
var CustomerAppsClient = class {
|
|
2877
3599
|
baseUrl;
|
|
2878
3600
|
oauthClient;
|
|
2879
3601
|
tsgId;
|
|
@@ -2885,25 +3607,25 @@ var ProfilesClient = class {
|
|
|
2885
3607
|
this.numRetries = opts.numRetries;
|
|
2886
3608
|
}
|
|
2887
3609
|
/**
|
|
2888
|
-
*
|
|
2889
|
-
* @param
|
|
2890
|
-
* @returns The
|
|
3610
|
+
* Get a customer app by name.
|
|
3611
|
+
* @param appName - Name of the customer app.
|
|
3612
|
+
* @returns The customer app.
|
|
2891
3613
|
*/
|
|
2892
|
-
async
|
|
3614
|
+
async get(appName) {
|
|
2893
3615
|
const res = await managementHttpRequest({
|
|
2894
|
-
method: "
|
|
3616
|
+
method: "GET",
|
|
2895
3617
|
baseUrl: this.baseUrl,
|
|
2896
|
-
path:
|
|
2897
|
-
|
|
3618
|
+
path: MGMT_CUSTOMER_APP_PATH,
|
|
3619
|
+
params: { app_name: appName },
|
|
2898
3620
|
oauthClient: this.oauthClient,
|
|
2899
3621
|
numRetries: this.numRetries
|
|
2900
3622
|
});
|
|
2901
3623
|
return res.data;
|
|
2902
3624
|
}
|
|
2903
3625
|
/**
|
|
2904
|
-
* List
|
|
3626
|
+
* List customer apps for the TSG.
|
|
2905
3627
|
* @param opts - Pagination options.
|
|
2906
|
-
* @returns Paginated list of
|
|
3628
|
+
* @returns Paginated list of customer apps.
|
|
2907
3629
|
*/
|
|
2908
3630
|
async list(opts) {
|
|
2909
3631
|
const params = {
|
|
@@ -2913,7 +3635,7 @@ var ProfilesClient = class {
|
|
|
2913
3635
|
const res = await managementHttpRequest({
|
|
2914
3636
|
method: "GET",
|
|
2915
3637
|
baseUrl: this.baseUrl,
|
|
2916
|
-
path: `${
|
|
3638
|
+
path: `${MGMT_CUSTOMER_APPS_TSG_PATH}/${this.tsgId}`,
|
|
2917
3639
|
params,
|
|
2918
3640
|
oauthClient: this.oauthClient,
|
|
2919
3641
|
numRetries: this.numRetries
|
|
@@ -2921,22 +3643,17 @@ var ProfilesClient = class {
|
|
|
2921
3643
|
return res.data;
|
|
2922
3644
|
}
|
|
2923
3645
|
/**
|
|
2924
|
-
* Update
|
|
2925
|
-
* @param
|
|
2926
|
-
* @param request - Updated
|
|
2927
|
-
* @returns The updated
|
|
3646
|
+
* Update a customer app.
|
|
3647
|
+
* @param customerAppId - UUID of the customer app to update.
|
|
3648
|
+
* @param request - Updated customer app data.
|
|
3649
|
+
* @returns The updated customer app.
|
|
2928
3650
|
*/
|
|
2929
|
-
async update(
|
|
2930
|
-
if (!isValidUuid(profileId)) {
|
|
2931
|
-
throw new AISecSDKException(
|
|
2932
|
-
`Invalid profile_id: ${profileId}`,
|
|
2933
|
-
"AISEC_USER_REQUEST_PAYLOAD_ERROR" /* USER_REQUEST_PAYLOAD_ERROR */
|
|
2934
|
-
);
|
|
2935
|
-
}
|
|
3651
|
+
async update(customerAppId, request) {
|
|
2936
3652
|
const res = await managementHttpRequest({
|
|
2937
3653
|
method: "PUT",
|
|
2938
3654
|
baseUrl: this.baseUrl,
|
|
2939
|
-
path:
|
|
3655
|
+
path: MGMT_CUSTOMER_APP_PATH,
|
|
3656
|
+
params: { customer_app_id: customerAppId },
|
|
2940
3657
|
body: request,
|
|
2941
3658
|
oauthClient: this.oauthClient,
|
|
2942
3659
|
numRetries: this.numRetries
|
|
@@ -2944,21 +3661,17 @@ var ProfilesClient = class {
|
|
|
2944
3661
|
return res.data;
|
|
2945
3662
|
}
|
|
2946
3663
|
/**
|
|
2947
|
-
* Delete a
|
|
2948
|
-
* @param
|
|
2949
|
-
* @
|
|
3664
|
+
* Delete a customer app.
|
|
3665
|
+
* @param appName - Name of the customer app to delete.
|
|
3666
|
+
* @param updatedBy - Email of user performing the deletion.
|
|
3667
|
+
* @returns The deleted customer app.
|
|
2950
3668
|
*/
|
|
2951
|
-
async delete(
|
|
2952
|
-
if (!isValidUuid(profileId)) {
|
|
2953
|
-
throw new AISecSDKException(
|
|
2954
|
-
`Invalid profile_id: ${profileId}`,
|
|
2955
|
-
"AISEC_USER_REQUEST_PAYLOAD_ERROR" /* USER_REQUEST_PAYLOAD_ERROR */
|
|
2956
|
-
);
|
|
2957
|
-
}
|
|
3669
|
+
async delete(appName, updatedBy) {
|
|
2958
3670
|
const res = await managementHttpRequest({
|
|
2959
3671
|
method: "DELETE",
|
|
2960
3672
|
baseUrl: this.baseUrl,
|
|
2961
|
-
path:
|
|
3673
|
+
path: MGMT_CUSTOMER_APP_PATH,
|
|
3674
|
+
params: { app_name: appName, updated_by: updatedBy },
|
|
2962
3675
|
oauthClient: this.oauthClient,
|
|
2963
3676
|
numRetries: this.numRetries
|
|
2964
3677
|
});
|
|
@@ -2966,114 +3679,143 @@ var ProfilesClient = class {
|
|
|
2966
3679
|
}
|
|
2967
3680
|
};
|
|
2968
3681
|
|
|
2969
|
-
// src/management/
|
|
2970
|
-
var
|
|
3682
|
+
// src/management/dlp-profiles.ts
|
|
3683
|
+
var DlpProfilesClient = class {
|
|
2971
3684
|
baseUrl;
|
|
2972
3685
|
oauthClient;
|
|
2973
|
-
tsgId;
|
|
2974
3686
|
numRetries;
|
|
2975
3687
|
constructor(opts) {
|
|
2976
3688
|
this.baseUrl = opts.baseUrl;
|
|
2977
3689
|
this.oauthClient = opts.oauthClient;
|
|
2978
|
-
this.tsgId = opts.tsgId;
|
|
2979
3690
|
this.numRetries = opts.numRetries;
|
|
2980
3691
|
}
|
|
2981
3692
|
/**
|
|
2982
|
-
*
|
|
2983
|
-
* @
|
|
2984
|
-
* @returns The created custom topic.
|
|
3693
|
+
* List all DLP profiles for the TSG.
|
|
3694
|
+
* @returns List of DLP profiles.
|
|
2985
3695
|
*/
|
|
2986
|
-
async
|
|
3696
|
+
async list() {
|
|
2987
3697
|
const res = await managementHttpRequest({
|
|
2988
|
-
method: "
|
|
3698
|
+
method: "GET",
|
|
2989
3699
|
baseUrl: this.baseUrl,
|
|
2990
|
-
path:
|
|
2991
|
-
body: request,
|
|
3700
|
+
path: MGMT_DLP_PROFILES_PATH,
|
|
2992
3701
|
oauthClient: this.oauthClient,
|
|
2993
3702
|
numRetries: this.numRetries
|
|
2994
3703
|
});
|
|
2995
3704
|
return res.data;
|
|
2996
3705
|
}
|
|
3706
|
+
};
|
|
3707
|
+
|
|
3708
|
+
// src/management/deployment-profiles.ts
|
|
3709
|
+
var DeploymentProfilesClient = class {
|
|
3710
|
+
baseUrl;
|
|
3711
|
+
oauthClient;
|
|
3712
|
+
numRetries;
|
|
3713
|
+
constructor(opts) {
|
|
3714
|
+
this.baseUrl = opts.baseUrl;
|
|
3715
|
+
this.oauthClient = opts.oauthClient;
|
|
3716
|
+
this.numRetries = opts.numRetries;
|
|
3717
|
+
}
|
|
2997
3718
|
/**
|
|
2998
|
-
* List
|
|
2999
|
-
* @param opts -
|
|
3000
|
-
* @returns
|
|
3719
|
+
* List deployment profiles for the TSG.
|
|
3720
|
+
* @param opts - Optional filter options.
|
|
3721
|
+
* @returns Deployment profiles response.
|
|
3001
3722
|
*/
|
|
3002
3723
|
async list(opts) {
|
|
3003
|
-
const params = {
|
|
3004
|
-
|
|
3005
|
-
limit: String(opts?.limit ?? 100)
|
|
3006
|
-
};
|
|
3724
|
+
const params = {};
|
|
3725
|
+
if (opts?.unactivated !== void 0) params.unactivated = String(opts.unactivated);
|
|
3007
3726
|
const res = await managementHttpRequest({
|
|
3008
3727
|
method: "GET",
|
|
3009
3728
|
baseUrl: this.baseUrl,
|
|
3010
|
-
path:
|
|
3011
|
-
params,
|
|
3729
|
+
path: MGMT_DEPLOYMENT_PROFILES_PATH,
|
|
3730
|
+
params: Object.keys(params).length > 0 ? params : void 0,
|
|
3012
3731
|
oauthClient: this.oauthClient,
|
|
3013
3732
|
numRetries: this.numRetries
|
|
3014
3733
|
});
|
|
3015
3734
|
return res.data;
|
|
3016
3735
|
}
|
|
3736
|
+
};
|
|
3737
|
+
|
|
3738
|
+
// src/management/scan-logs.ts
|
|
3739
|
+
var ScanLogsClient = class {
|
|
3740
|
+
baseUrl;
|
|
3741
|
+
oauthClient;
|
|
3742
|
+
numRetries;
|
|
3743
|
+
constructor(opts) {
|
|
3744
|
+
this.baseUrl = opts.baseUrl;
|
|
3745
|
+
this.oauthClient = opts.oauthClient;
|
|
3746
|
+
this.numRetries = opts.numRetries;
|
|
3747
|
+
}
|
|
3017
3748
|
/**
|
|
3018
|
-
*
|
|
3019
|
-
* @param
|
|
3020
|
-
* @
|
|
3021
|
-
* @returns The updated custom topic.
|
|
3749
|
+
* Retrieve scan logs by time interval.
|
|
3750
|
+
* @param opts - Query options including time range, pagination, and filter.
|
|
3751
|
+
* @returns Paginated scan results.
|
|
3022
3752
|
*/
|
|
3023
|
-
async
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
)
|
|
3029
|
-
|
|
3753
|
+
async query(opts) {
|
|
3754
|
+
const params = {
|
|
3755
|
+
time_interval: String(opts.time_interval),
|
|
3756
|
+
time_unit: opts.time_unit,
|
|
3757
|
+
pageNumber: String(opts.pageNumber),
|
|
3758
|
+
pageSize: String(opts.pageSize),
|
|
3759
|
+
filter: opts.filter
|
|
3760
|
+
};
|
|
3761
|
+
const body = opts.page_token ? { page_token: opts.page_token } : void 0;
|
|
3030
3762
|
const res = await managementHttpRequest({
|
|
3031
|
-
method: "
|
|
3763
|
+
method: "POST",
|
|
3032
3764
|
baseUrl: this.baseUrl,
|
|
3033
|
-
path:
|
|
3034
|
-
|
|
3765
|
+
path: MGMT_SCAN_LOGS_PATH,
|
|
3766
|
+
params,
|
|
3767
|
+
body,
|
|
3035
3768
|
oauthClient: this.oauthClient,
|
|
3036
3769
|
numRetries: this.numRetries
|
|
3037
3770
|
});
|
|
3038
3771
|
return res.data;
|
|
3039
3772
|
}
|
|
3773
|
+
};
|
|
3774
|
+
|
|
3775
|
+
// src/management/oauth-management.ts
|
|
3776
|
+
var OAuthManagementClient = class {
|
|
3777
|
+
baseUrl;
|
|
3778
|
+
oauthClient;
|
|
3779
|
+
numRetries;
|
|
3780
|
+
constructor(opts) {
|
|
3781
|
+
this.baseUrl = opts.baseUrl;
|
|
3782
|
+
this.oauthClient = opts.oauthClient;
|
|
3783
|
+
this.numRetries = opts.numRetries;
|
|
3784
|
+
}
|
|
3040
3785
|
/**
|
|
3041
|
-
*
|
|
3042
|
-
* @param
|
|
3043
|
-
* @
|
|
3786
|
+
* Invalidate an OAuth token.
|
|
3787
|
+
* @param token - The OAuth token to invalidate.
|
|
3788
|
+
* @param body - Client ID and customer app.
|
|
3789
|
+
* @returns Confirmation string.
|
|
3044
3790
|
*/
|
|
3045
|
-
async
|
|
3046
|
-
if (!isValidUuid(topicId)) {
|
|
3047
|
-
throw new AISecSDKException(
|
|
3048
|
-
`Invalid topic_id: ${topicId}`,
|
|
3049
|
-
"AISEC_USER_REQUEST_PAYLOAD_ERROR" /* USER_REQUEST_PAYLOAD_ERROR */
|
|
3050
|
-
);
|
|
3051
|
-
}
|
|
3791
|
+
async invalidateToken(token, body) {
|
|
3052
3792
|
const res = await managementHttpRequest({
|
|
3053
|
-
method: "
|
|
3793
|
+
method: "POST",
|
|
3054
3794
|
baseUrl: this.baseUrl,
|
|
3055
|
-
path:
|
|
3795
|
+
path: MGMT_OAUTH_INVALIDATE_PATH,
|
|
3796
|
+
params: { token },
|
|
3797
|
+
body,
|
|
3056
3798
|
oauthClient: this.oauthClient,
|
|
3057
3799
|
numRetries: this.numRetries
|
|
3058
3800
|
});
|
|
3059
3801
|
return res.data;
|
|
3060
3802
|
}
|
|
3061
3803
|
/**
|
|
3062
|
-
*
|
|
3063
|
-
* @param
|
|
3064
|
-
* @returns
|
|
3804
|
+
* Get an OAuth token for client credentials.
|
|
3805
|
+
* @param opts - Token request options.
|
|
3806
|
+
* @returns OAuth2 token response.
|
|
3065
3807
|
*/
|
|
3066
|
-
async
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
);
|
|
3072
|
-
}
|
|
3808
|
+
async getAccessToken(opts) {
|
|
3809
|
+
const params = {};
|
|
3810
|
+
if (opts.tokenTtlInterval !== void 0)
|
|
3811
|
+
params.tokenTtlInterval = String(opts.tokenTtlInterval);
|
|
3812
|
+
if (opts.tokenTtlUnit !== void 0) params.tokenTtlUnit = opts.tokenTtlUnit;
|
|
3073
3813
|
const res = await managementHttpRequest({
|
|
3074
|
-
method: "
|
|
3814
|
+
method: "POST",
|
|
3075
3815
|
baseUrl: this.baseUrl,
|
|
3076
|
-
path:
|
|
3816
|
+
path: MGMT_OAUTH_TOKEN_PATH,
|
|
3817
|
+
params: Object.keys(params).length > 0 ? params : void 0,
|
|
3818
|
+
body: opts.body,
|
|
3077
3819
|
oauthClient: this.oauthClient,
|
|
3078
3820
|
numRetries: this.numRetries
|
|
3079
3821
|
});
|
|
@@ -3085,6 +3827,12 @@ var TopicsClient = class {
|
|
|
3085
3827
|
var ManagementClient = class {
|
|
3086
3828
|
profiles;
|
|
3087
3829
|
topics;
|
|
3830
|
+
apiKeys;
|
|
3831
|
+
customerApps;
|
|
3832
|
+
dlpProfiles;
|
|
3833
|
+
deploymentProfiles;
|
|
3834
|
+
scanLogs;
|
|
3835
|
+
oauth;
|
|
3088
3836
|
constructor(opts = {}) {
|
|
3089
3837
|
const clientId = opts.clientId ?? process.env[MGMT_CLIENT_ID];
|
|
3090
3838
|
const clientSecret = opts.clientSecret ?? process.env[MGMT_CLIENT_SECRET];
|
|
@@ -3131,19 +3879,92 @@ var ManagementClient = class {
|
|
|
3131
3879
|
tsgId,
|
|
3132
3880
|
numRetries
|
|
3133
3881
|
});
|
|
3882
|
+
this.apiKeys = new ApiKeysClient({
|
|
3883
|
+
baseUrl: apiEndpoint,
|
|
3884
|
+
oauthClient,
|
|
3885
|
+
tsgId,
|
|
3886
|
+
numRetries
|
|
3887
|
+
});
|
|
3888
|
+
this.customerApps = new CustomerAppsClient({
|
|
3889
|
+
baseUrl: apiEndpoint,
|
|
3890
|
+
oauthClient,
|
|
3891
|
+
tsgId,
|
|
3892
|
+
numRetries
|
|
3893
|
+
});
|
|
3894
|
+
this.dlpProfiles = new DlpProfilesClient({
|
|
3895
|
+
baseUrl: apiEndpoint,
|
|
3896
|
+
oauthClient,
|
|
3897
|
+
numRetries
|
|
3898
|
+
});
|
|
3899
|
+
this.deploymentProfiles = new DeploymentProfilesClient({
|
|
3900
|
+
baseUrl: apiEndpoint,
|
|
3901
|
+
oauthClient,
|
|
3902
|
+
numRetries
|
|
3903
|
+
});
|
|
3904
|
+
this.scanLogs = new ScanLogsClient({
|
|
3905
|
+
baseUrl: apiEndpoint,
|
|
3906
|
+
oauthClient,
|
|
3907
|
+
numRetries
|
|
3908
|
+
});
|
|
3909
|
+
this.oauth = new OAuthManagementClient({
|
|
3910
|
+
baseUrl: apiEndpoint,
|
|
3911
|
+
oauthClient,
|
|
3912
|
+
numRetries
|
|
3913
|
+
});
|
|
3134
3914
|
}
|
|
3135
3915
|
};
|
|
3136
3916
|
|
|
3137
3917
|
// src/model-security/scans-client.ts
|
|
3138
|
-
function
|
|
3918
|
+
function buildScanListParams(opts) {
|
|
3139
3919
|
const params = {};
|
|
3140
3920
|
if (opts?.skip !== void 0) params.skip = String(opts.skip);
|
|
3141
3921
|
if (opts?.limit !== void 0) params.limit = String(opts.limit);
|
|
3142
3922
|
if (opts?.sort_by !== void 0) params.sort_by = opts.sort_by;
|
|
3143
|
-
if (opts?.
|
|
3923
|
+
if (opts?.sort_order !== void 0) params.sort_order = opts.sort_order;
|
|
3924
|
+
if (opts?.search_query !== void 0) params.search_query = opts.search_query;
|
|
3925
|
+
if (opts?.eval_outcomes !== void 0) params.eval_outcomes = opts.eval_outcomes;
|
|
3926
|
+
if (opts?.source_types !== void 0) params.source_types = opts.source_types;
|
|
3927
|
+
if (opts?.security_group_uuid !== void 0)
|
|
3928
|
+
params.security_group_uuid = opts.security_group_uuid;
|
|
3929
|
+
if (opts?.start_time !== void 0) params.start_time = opts.start_time;
|
|
3930
|
+
if (opts?.end_time !== void 0) params.end_time = opts.end_time;
|
|
3931
|
+
if (opts?.labels_query !== void 0) params.labels_query = opts.labels_query;
|
|
3932
|
+
return params;
|
|
3933
|
+
}
|
|
3934
|
+
function buildEvaluationListParams(opts) {
|
|
3935
|
+
const params = {};
|
|
3936
|
+
if (opts?.skip !== void 0) params.skip = String(opts.skip);
|
|
3937
|
+
if (opts?.limit !== void 0) params.limit = String(opts.limit);
|
|
3938
|
+
if (opts?.sort_field !== void 0) params.sort_field = opts.sort_field;
|
|
3939
|
+
if (opts?.sort_order !== void 0) params.sort_order = opts.sort_order;
|
|
3940
|
+
if (opts?.result !== void 0) params.result = opts.result;
|
|
3941
|
+
if (opts?.rule_instance_uuid !== void 0) params.rule_instance_uuid = opts.rule_instance_uuid;
|
|
3942
|
+
return params;
|
|
3943
|
+
}
|
|
3944
|
+
function buildFileListParams(opts) {
|
|
3945
|
+
const params = {};
|
|
3946
|
+
if (opts?.skip !== void 0) params.skip = String(opts.skip);
|
|
3947
|
+
if (opts?.limit !== void 0) params.limit = String(opts.limit);
|
|
3948
|
+
if (opts?.sort_field !== void 0) params.sort_field = opts.sort_field;
|
|
3949
|
+
if (opts?.sort_dir !== void 0) params.sort_dir = opts.sort_dir;
|
|
3950
|
+
if (opts?.type !== void 0) params.type = opts.type;
|
|
3951
|
+
if (opts?.result !== void 0) params.result = opts.result;
|
|
3952
|
+
if (opts?.query_path !== void 0) params.query_path = opts.query_path;
|
|
3953
|
+
return params;
|
|
3954
|
+
}
|
|
3955
|
+
function buildLabelListParams(opts) {
|
|
3956
|
+
const params = {};
|
|
3957
|
+
if (opts?.skip !== void 0) params.skip = String(opts.skip);
|
|
3958
|
+
if (opts?.limit !== void 0) params.limit = String(opts.limit);
|
|
3144
3959
|
if (opts?.search !== void 0) params.search = opts.search;
|
|
3145
3960
|
return params;
|
|
3146
3961
|
}
|
|
3962
|
+
function buildViolationListParams(opts) {
|
|
3963
|
+
const params = {};
|
|
3964
|
+
if (opts?.skip !== void 0) params.skip = String(opts.skip);
|
|
3965
|
+
if (opts?.limit !== void 0) params.limit = String(opts.limit);
|
|
3966
|
+
return params;
|
|
3967
|
+
}
|
|
3147
3968
|
var ModelSecurityScansClient = class {
|
|
3148
3969
|
baseUrl;
|
|
3149
3970
|
oauthClient;
|
|
@@ -3175,15 +3996,11 @@ var ModelSecurityScansClient = class {
|
|
|
3175
3996
|
* @returns Paginated list of scans.
|
|
3176
3997
|
*/
|
|
3177
3998
|
async list(opts) {
|
|
3178
|
-
const params = buildListParams(opts);
|
|
3179
|
-
if (opts?.eval_outcome !== void 0) params.eval_outcome = opts.eval_outcome;
|
|
3180
|
-
if (opts?.source_type !== void 0) params.source_type = opts.source_type;
|
|
3181
|
-
if (opts?.scan_origin !== void 0) params.scan_origin = opts.scan_origin;
|
|
3182
3999
|
const res = await managementHttpRequest({
|
|
3183
4000
|
method: "GET",
|
|
3184
4001
|
baseUrl: this.baseUrl,
|
|
3185
4002
|
path: MODEL_SEC_SCANS_PATH,
|
|
3186
|
-
params,
|
|
4003
|
+
params: buildScanListParams(opts),
|
|
3187
4004
|
oauthClient: this.oauthClient,
|
|
3188
4005
|
numRetries: this.numRetries
|
|
3189
4006
|
});
|
|
@@ -3213,7 +4030,7 @@ var ModelSecurityScansClient = class {
|
|
|
3213
4030
|
/**
|
|
3214
4031
|
* Get rule evaluations for a scan.
|
|
3215
4032
|
* @param scanUuid - Scan UUID.
|
|
3216
|
-
* @param opts - Pagination options.
|
|
4033
|
+
* @param opts - Pagination and filter options.
|
|
3217
4034
|
* @returns Paginated list of rule evaluations.
|
|
3218
4035
|
*/
|
|
3219
4036
|
async getEvaluations(scanUuid, opts) {
|
|
@@ -3227,7 +4044,7 @@ var ModelSecurityScansClient = class {
|
|
|
3227
4044
|
method: "GET",
|
|
3228
4045
|
baseUrl: this.baseUrl,
|
|
3229
4046
|
path: `${MODEL_SEC_SCANS_PATH}/${scanUuid}/evaluations`,
|
|
3230
|
-
params:
|
|
4047
|
+
params: buildEvaluationListParams(opts),
|
|
3231
4048
|
oauthClient: this.oauthClient,
|
|
3232
4049
|
numRetries: this.numRetries
|
|
3233
4050
|
});
|
|
@@ -3246,14 +4063,11 @@ var ModelSecurityScansClient = class {
|
|
|
3246
4063
|
"AISEC_USER_REQUEST_PAYLOAD_ERROR" /* USER_REQUEST_PAYLOAD_ERROR */
|
|
3247
4064
|
);
|
|
3248
4065
|
}
|
|
3249
|
-
const params = buildListParams(opts);
|
|
3250
|
-
if (opts?.type !== void 0) params.type = opts.type;
|
|
3251
|
-
if (opts?.result !== void 0) params.result = opts.result;
|
|
3252
4066
|
const res = await managementHttpRequest({
|
|
3253
4067
|
method: "GET",
|
|
3254
4068
|
baseUrl: this.baseUrl,
|
|
3255
4069
|
path: `${MODEL_SEC_SCANS_PATH}/${scanUuid}/files`,
|
|
3256
|
-
params,
|
|
4070
|
+
params: buildFileListParams(opts),
|
|
3257
4071
|
oauthClient: this.oauthClient,
|
|
3258
4072
|
numRetries: this.numRetries
|
|
3259
4073
|
});
|
|
@@ -3309,6 +4123,7 @@ var ModelSecurityScansClient = class {
|
|
|
3309
4123
|
* Delete labels from a scan by key.
|
|
3310
4124
|
* @param scanUuid - Scan UUID.
|
|
3311
4125
|
* @param keys - Label keys to delete.
|
|
4126
|
+
* @returns Resolves when the labels are deleted.
|
|
3312
4127
|
*/
|
|
3313
4128
|
async deleteLabels(scanUuid, keys) {
|
|
3314
4129
|
if (!isValidUuid(scanUuid)) {
|
|
@@ -3348,7 +4163,7 @@ var ModelSecurityScansClient = class {
|
|
|
3348
4163
|
method: "GET",
|
|
3349
4164
|
baseUrl: this.baseUrl,
|
|
3350
4165
|
path: `${MODEL_SEC_SCANS_PATH}/${scanUuid}/rule-violations`,
|
|
3351
|
-
params:
|
|
4166
|
+
params: buildViolationListParams(opts),
|
|
3352
4167
|
oauthClient: this.oauthClient,
|
|
3353
4168
|
numRetries: this.numRetries
|
|
3354
4169
|
});
|
|
@@ -3364,7 +4179,7 @@ var ModelSecurityScansClient = class {
|
|
|
3364
4179
|
method: "GET",
|
|
3365
4180
|
baseUrl: this.baseUrl,
|
|
3366
4181
|
path: `${MODEL_SEC_SCANS_PATH}/label-keys`,
|
|
3367
|
-
params:
|
|
4182
|
+
params: buildLabelListParams(opts),
|
|
3368
4183
|
oauthClient: this.oauthClient,
|
|
3369
4184
|
numRetries: this.numRetries
|
|
3370
4185
|
});
|
|
@@ -3381,7 +4196,7 @@ var ModelSecurityScansClient = class {
|
|
|
3381
4196
|
method: "GET",
|
|
3382
4197
|
baseUrl: this.baseUrl,
|
|
3383
4198
|
path: `${MODEL_SEC_SCANS_PATH}/label-keys/${encodeURIComponent(key)}/values`,
|
|
3384
|
-
params:
|
|
4199
|
+
params: buildLabelListParams(opts),
|
|
3385
4200
|
oauthClient: this.oauthClient,
|
|
3386
4201
|
numRetries: this.numRetries
|
|
3387
4202
|
});
|
|
@@ -3776,12 +4591,10 @@ var ModelSecurityClient = class {
|
|
|
3776
4591
|
};
|
|
3777
4592
|
|
|
3778
4593
|
// src/red-team/scans-client.ts
|
|
3779
|
-
function
|
|
4594
|
+
function buildListParams(opts) {
|
|
3780
4595
|
const params = {};
|
|
3781
4596
|
if (opts?.skip !== void 0) params.skip = String(opts.skip);
|
|
3782
4597
|
if (opts?.limit !== void 0) params.limit = String(opts.limit);
|
|
3783
|
-
if (opts?.sort_by !== void 0) params.sort_by = opts.sort_by;
|
|
3784
|
-
if (opts?.sort_direction !== void 0) params.sort_direction = opts.sort_direction;
|
|
3785
4598
|
if (opts?.search !== void 0) params.search = opts.search;
|
|
3786
4599
|
return params;
|
|
3787
4600
|
}
|
|
@@ -3794,7 +4607,11 @@ var RedTeamScansClient = class {
|
|
|
3794
4607
|
this.oauthClient = opts.oauthClient;
|
|
3795
4608
|
this.numRetries = opts.numRetries;
|
|
3796
4609
|
}
|
|
3797
|
-
/**
|
|
4610
|
+
/**
|
|
4611
|
+
* Create a new red team scan job.
|
|
4612
|
+
* @param request - Job creation request body.
|
|
4613
|
+
* @returns The created job response.
|
|
4614
|
+
*/
|
|
3798
4615
|
async create(request) {
|
|
3799
4616
|
const res = await managementHttpRequest({
|
|
3800
4617
|
method: "POST",
|
|
@@ -3808,7 +4625,7 @@ var RedTeamScansClient = class {
|
|
|
3808
4625
|
}
|
|
3809
4626
|
/** List red team scan jobs with optional filters. */
|
|
3810
4627
|
async list(opts) {
|
|
3811
|
-
const params =
|
|
4628
|
+
const params = buildListParams(opts);
|
|
3812
4629
|
if (opts?.status !== void 0) params.status = opts.status;
|
|
3813
4630
|
if (opts?.job_type !== void 0) params.job_type = opts.job_type;
|
|
3814
4631
|
if (opts?.target_id !== void 0) params.target_id = opts.target_id;
|
|
@@ -3864,12 +4681,10 @@ var RedTeamScansClient = class {
|
|
|
3864
4681
|
};
|
|
3865
4682
|
|
|
3866
4683
|
// src/red-team/reports-client.ts
|
|
3867
|
-
function
|
|
4684
|
+
function buildListParams2(opts) {
|
|
3868
4685
|
const params = {};
|
|
3869
4686
|
if (opts?.skip !== void 0) params.skip = String(opts.skip);
|
|
3870
4687
|
if (opts?.limit !== void 0) params.limit = String(opts.limit);
|
|
3871
|
-
if (opts?.sort_by !== void 0) params.sort_by = opts.sort_by;
|
|
3872
|
-
if (opts?.sort_direction !== void 0) params.sort_direction = opts.sort_direction;
|
|
3873
4688
|
if (opts?.search !== void 0) params.search = opts.search;
|
|
3874
4689
|
return params;
|
|
3875
4690
|
}
|
|
@@ -3893,11 +4708,13 @@ var RedTeamReportsClient = class {
|
|
|
3893
4708
|
/** List attacks for a static scan. */
|
|
3894
4709
|
async listAttacks(jobId, opts) {
|
|
3895
4710
|
validateJobId(jobId);
|
|
3896
|
-
const params =
|
|
4711
|
+
const params = buildListParams2(opts);
|
|
3897
4712
|
if (opts?.status !== void 0) params.status = opts.status;
|
|
3898
4713
|
if (opts?.severity !== void 0) params.severity = opts.severity;
|
|
3899
4714
|
if (opts?.category !== void 0) params.category = opts.category;
|
|
3900
4715
|
if (opts?.sub_category !== void 0) params.sub_category = opts.sub_category;
|
|
4716
|
+
if (opts?.attack_type !== void 0) params.attack_type = opts.attack_type;
|
|
4717
|
+
if (opts?.threat !== void 0) params.threat = String(opts.threat);
|
|
3901
4718
|
const res = await managementHttpRequest({
|
|
3902
4719
|
method: "GET",
|
|
3903
4720
|
baseUrl: this.baseUrl,
|
|
@@ -4022,8 +4839,10 @@ var RedTeamReportsClient = class {
|
|
|
4022
4839
|
/** List goals for a dynamic scan. */
|
|
4023
4840
|
async listGoals(jobId, opts) {
|
|
4024
4841
|
validateJobId(jobId);
|
|
4025
|
-
const params =
|
|
4842
|
+
const params = buildListParams2(opts);
|
|
4026
4843
|
if (opts?.goal_type !== void 0) params.goal_type = opts.goal_type;
|
|
4844
|
+
if (opts?.status !== void 0) params.status = opts.status;
|
|
4845
|
+
if (opts?.count !== void 0) params.count = String(opts.count);
|
|
4027
4846
|
const res = await managementHttpRequest({
|
|
4028
4847
|
method: "GET",
|
|
4029
4848
|
baseUrl: this.baseUrl,
|
|
@@ -4047,7 +4866,7 @@ var RedTeamReportsClient = class {
|
|
|
4047
4866
|
method: "GET",
|
|
4048
4867
|
baseUrl: this.baseUrl,
|
|
4049
4868
|
path: `${RED_TEAM_REPORT_DYNAMIC_PATH}/${jobId}/goal/${goalId}/list-streams`,
|
|
4050
|
-
params:
|
|
4869
|
+
params: buildListParams2(opts),
|
|
4051
4870
|
oauthClient: this.oauthClient,
|
|
4052
4871
|
numRetries: this.numRetries
|
|
4053
4872
|
});
|
|
@@ -4076,8 +4895,7 @@ var RedTeamReportsClient = class {
|
|
|
4076
4895
|
/** Download a report in the specified format. */
|
|
4077
4896
|
async downloadReport(jobId, format) {
|
|
4078
4897
|
validateJobId(jobId);
|
|
4079
|
-
const params = {};
|
|
4080
|
-
if (format !== void 0) params.file_format = format;
|
|
4898
|
+
const params = { file_format: format };
|
|
4081
4899
|
const res = await managementHttpRequest({
|
|
4082
4900
|
method: "GET",
|
|
4083
4901
|
baseUrl: this.baseUrl,
|
|
@@ -4103,12 +4921,10 @@ var RedTeamReportsClient = class {
|
|
|
4103
4921
|
};
|
|
4104
4922
|
|
|
4105
4923
|
// src/red-team/custom-attack-reports-client.ts
|
|
4106
|
-
function
|
|
4924
|
+
function buildListParams3(opts) {
|
|
4107
4925
|
const params = {};
|
|
4108
4926
|
if (opts?.skip !== void 0) params.skip = String(opts.skip);
|
|
4109
4927
|
if (opts?.limit !== void 0) params.limit = String(opts.limit);
|
|
4110
|
-
if (opts?.sort_by !== void 0) params.sort_by = opts.sort_by;
|
|
4111
|
-
if (opts?.sort_direction !== void 0) params.sort_direction = opts.sort_direction;
|
|
4112
4928
|
if (opts?.search !== void 0) params.search = opts.search;
|
|
4113
4929
|
return params;
|
|
4114
4930
|
}
|
|
@@ -4159,11 +4975,13 @@ var RedTeamCustomAttackReportsClient = class {
|
|
|
4159
4975
|
"AISEC_USER_REQUEST_PAYLOAD_ERROR" /* USER_REQUEST_PAYLOAD_ERROR */
|
|
4160
4976
|
);
|
|
4161
4977
|
}
|
|
4978
|
+
const params = buildListParams3(opts);
|
|
4979
|
+
if (opts?.is_threat !== void 0) params.is_threat = String(opts.is_threat);
|
|
4162
4980
|
const res = await managementHttpRequest({
|
|
4163
4981
|
method: "GET",
|
|
4164
4982
|
baseUrl: this.baseUrl,
|
|
4165
4983
|
path: `${RED_TEAM_CUSTOM_ATTACKS_REPORT_PATH}/report/${jobId}/prompt-set/${promptSetId}/prompts`,
|
|
4166
|
-
params
|
|
4984
|
+
params,
|
|
4167
4985
|
oauthClient: this.oauthClient,
|
|
4168
4986
|
numRetries: this.numRetries
|
|
4169
4987
|
});
|
|
@@ -4190,11 +5008,15 @@ var RedTeamCustomAttackReportsClient = class {
|
|
|
4190
5008
|
/** List custom attacks for a scan. */
|
|
4191
5009
|
async listCustomAttacks(jobId, opts) {
|
|
4192
5010
|
validateJobId2(jobId);
|
|
5011
|
+
const params = buildListParams3(opts);
|
|
5012
|
+
if (opts?.threat !== void 0) params.threat = String(opts.threat);
|
|
5013
|
+
if (opts?.prompt_set_id !== void 0) params.prompt_set_id = opts.prompt_set_id;
|
|
5014
|
+
if (opts?.property_value !== void 0) params.property_value = opts.property_value;
|
|
4193
5015
|
const res = await managementHttpRequest({
|
|
4194
5016
|
method: "GET",
|
|
4195
5017
|
baseUrl: this.baseUrl,
|
|
4196
5018
|
path: `${RED_TEAM_CUSTOM_ATTACKS_REPORT_PATH}/job/${jobId}/list-custom-attacks`,
|
|
4197
|
-
params
|
|
5019
|
+
params,
|
|
4198
5020
|
oauthClient: this.oauthClient,
|
|
4199
5021
|
numRetries: this.numRetries
|
|
4200
5022
|
});
|
|
@@ -4233,12 +5055,10 @@ var RedTeamCustomAttackReportsClient = class {
|
|
|
4233
5055
|
};
|
|
4234
5056
|
|
|
4235
5057
|
// src/red-team/targets-client.ts
|
|
4236
|
-
function
|
|
5058
|
+
function buildListParams4(opts) {
|
|
4237
5059
|
const params = {};
|
|
4238
5060
|
if (opts?.skip !== void 0) params.skip = String(opts.skip);
|
|
4239
5061
|
if (opts?.limit !== void 0) params.limit = String(opts.limit);
|
|
4240
|
-
if (opts?.sort_by !== void 0) params.sort_by = opts.sort_by;
|
|
4241
|
-
if (opts?.sort_direction !== void 0) params.sort_direction = opts.sort_direction;
|
|
4242
5062
|
if (opts?.search !== void 0) params.search = opts.search;
|
|
4243
5063
|
return params;
|
|
4244
5064
|
}
|
|
@@ -4251,7 +5071,12 @@ var RedTeamTargetsClient = class {
|
|
|
4251
5071
|
this.oauthClient = opts.oauthClient;
|
|
4252
5072
|
this.numRetries = opts.numRetries;
|
|
4253
5073
|
}
|
|
4254
|
-
/**
|
|
5074
|
+
/**
|
|
5075
|
+
* Create a new target.
|
|
5076
|
+
* @param request - Target creation request body.
|
|
5077
|
+
* @param opts - Optional operation options (e.g. validate connection).
|
|
5078
|
+
* @returns The created target response.
|
|
5079
|
+
*/
|
|
4255
5080
|
async create(request, opts) {
|
|
4256
5081
|
const params = {};
|
|
4257
5082
|
if (opts?.validate !== void 0) params.validate = String(opts.validate);
|
|
@@ -4268,10 +5093,9 @@ var RedTeamTargetsClient = class {
|
|
|
4268
5093
|
}
|
|
4269
5094
|
/** List targets with optional filters. */
|
|
4270
5095
|
async list(opts) {
|
|
4271
|
-
const params =
|
|
5096
|
+
const params = buildListParams4(opts);
|
|
4272
5097
|
if (opts?.target_type !== void 0) params.target_type = opts.target_type;
|
|
4273
5098
|
if (opts?.status !== void 0) params.status = opts.status;
|
|
4274
|
-
if (opts?.active !== void 0) params.active = String(opts.active);
|
|
4275
5099
|
const res = await managementHttpRequest({
|
|
4276
5100
|
method: "GET",
|
|
4277
5101
|
baseUrl: this.baseUrl,
|
|
@@ -4387,12 +5211,10 @@ var RedTeamTargetsClient = class {
|
|
|
4387
5211
|
};
|
|
4388
5212
|
|
|
4389
5213
|
// src/red-team/custom-attacks-client.ts
|
|
4390
|
-
function
|
|
5214
|
+
function buildListParams5(opts) {
|
|
4391
5215
|
const params = {};
|
|
4392
5216
|
if (opts?.skip !== void 0) params.skip = String(opts.skip);
|
|
4393
5217
|
if (opts?.limit !== void 0) params.limit = String(opts.limit);
|
|
4394
|
-
if (opts?.sort_by !== void 0) params.sort_by = opts.sort_by;
|
|
4395
|
-
if (opts?.sort_direction !== void 0) params.sort_direction = opts.sort_direction;
|
|
4396
5218
|
if (opts?.search !== void 0) params.search = opts.search;
|
|
4397
5219
|
return params;
|
|
4398
5220
|
}
|
|
@@ -4427,7 +5249,8 @@ var RedTeamCustomAttacksClient = class {
|
|
|
4427
5249
|
}
|
|
4428
5250
|
/** List custom prompt sets. */
|
|
4429
5251
|
async listPromptSets(opts) {
|
|
4430
|
-
const params =
|
|
5252
|
+
const params = buildListParams5(opts);
|
|
5253
|
+
if (opts?.status !== void 0) params.status = opts.status;
|
|
4431
5254
|
if (opts?.active !== void 0) params.active = String(opts.active);
|
|
4432
5255
|
if (opts?.archive !== void 0) params.archive = String(opts.archive);
|
|
4433
5256
|
const res = await managementHttpRequest({
|
|
@@ -4570,7 +5393,7 @@ var RedTeamCustomAttacksClient = class {
|
|
|
4570
5393
|
/** List prompts in a prompt set. */
|
|
4571
5394
|
async listPrompts(promptSetUuid, opts) {
|
|
4572
5395
|
validateUuid(promptSetUuid, "prompt set uuid");
|
|
4573
|
-
const params =
|
|
5396
|
+
const params = buildListParams5(opts);
|
|
4574
5397
|
if (opts?.active !== void 0) params.active = String(opts.active);
|
|
4575
5398
|
const res = await managementHttpRequest({
|
|
4576
5399
|
method: "GET",
|
|
@@ -4691,12 +5514,10 @@ var RedTeamCustomAttacksClient = class {
|
|
|
4691
5514
|
};
|
|
4692
5515
|
|
|
4693
5516
|
// src/red-team/client.ts
|
|
4694
|
-
function
|
|
5517
|
+
function buildListParams6(opts) {
|
|
4695
5518
|
const params = {};
|
|
4696
5519
|
if (opts?.skip !== void 0) params.skip = String(opts.skip);
|
|
4697
5520
|
if (opts?.limit !== void 0) params.limit = String(opts.limit);
|
|
4698
|
-
if (opts?.sort_by !== void 0) params.sort_by = opts.sort_by;
|
|
4699
|
-
if (opts?.sort_direction !== void 0) params.sort_direction = opts.sort_direction;
|
|
4700
5521
|
if (opts?.search !== void 0) params.search = opts.search;
|
|
4701
5522
|
return params;
|
|
4702
5523
|
}
|
|
@@ -4830,7 +5651,7 @@ var RedTeamClient = class {
|
|
|
4830
5651
|
method: "GET",
|
|
4831
5652
|
baseUrl: this.dataEndpoint,
|
|
4832
5653
|
path: `${RED_TEAM_ERROR_LOG_PATH}/${jobId}`,
|
|
4833
|
-
params:
|
|
5654
|
+
params: buildListParams6(opts),
|
|
4834
5655
|
oauthClient: this.oauthClient,
|
|
4835
5656
|
numRetries: this.numRetries
|
|
4836
5657
|
});
|
|
@@ -4879,15 +5700,25 @@ var RedTeamClient = class {
|
|
|
4879
5700
|
};
|
|
4880
5701
|
// Annotate the CommonJS export names for ESM import in node:
|
|
4881
5702
|
0 && (module.exports = {
|
|
5703
|
+
AIRS_ENDPOINTS,
|
|
4882
5704
|
AISecSDKException,
|
|
4883
5705
|
AI_SEC_API_ENDPOINT,
|
|
4884
5706
|
AI_SEC_API_KEY,
|
|
4885
5707
|
AI_SEC_API_TOKEN,
|
|
4886
5708
|
ASYNC_SCAN_PATH,
|
|
4887
5709
|
Action,
|
|
5710
|
+
AgentEntrySchema,
|
|
4888
5711
|
AgentMetaSchema,
|
|
5712
|
+
AgentReportSchema,
|
|
4889
5713
|
AiProfileSchema,
|
|
4890
5714
|
ApiEndpointType,
|
|
5715
|
+
ApiKeyCreateRequestSchema,
|
|
5716
|
+
ApiKeyDPInfoSchema,
|
|
5717
|
+
ApiKeyDeleteResponseSchema,
|
|
5718
|
+
ApiKeyListResponseSchema,
|
|
5719
|
+
ApiKeyRegenerateRequestSchema,
|
|
5720
|
+
ApiKeySchema,
|
|
5721
|
+
ApiKeysClient,
|
|
4891
5722
|
AsyncScanObjectSchema,
|
|
4892
5723
|
AsyncScanResponseSchema,
|
|
4893
5724
|
AttackDetailResponseSchema,
|
|
@@ -4906,11 +5737,17 @@ var RedTeamClient = class {
|
|
|
4906
5737
|
Category,
|
|
4907
5738
|
CategoryModelSchema,
|
|
4908
5739
|
CategoryReportSchema,
|
|
5740
|
+
CgReportSchema,
|
|
5741
|
+
ClientIdAndCustomerAppSchema,
|
|
5742
|
+
CmdEntrySchema,
|
|
5743
|
+
CmdInjectReportSchema,
|
|
4909
5744
|
ComplianceReportSchema,
|
|
4910
5745
|
ComplianceSubCategory,
|
|
4911
5746
|
ComplianceTechniqueSchema,
|
|
4912
5747
|
ConnectionParamsSchema,
|
|
4913
5748
|
Content,
|
|
5749
|
+
ContentErrorSchema,
|
|
5750
|
+
ContentErrorType,
|
|
4914
5751
|
CountByNameSchema,
|
|
4915
5752
|
CountedQuotaEnum,
|
|
4916
5753
|
CreateCustomTopicRequestSchema,
|
|
@@ -4935,6 +5772,10 @@ var RedTeamClient = class {
|
|
|
4935
5772
|
CustomPromptUpdateRequestSchema,
|
|
4936
5773
|
CustomTopicListResponseSchema,
|
|
4937
5774
|
CustomTopicSchema,
|
|
5775
|
+
CustomerAppListResponseSchema,
|
|
5776
|
+
CustomerAppSchema,
|
|
5777
|
+
CustomerAppWithKeysSchema,
|
|
5778
|
+
CustomerAppsClient,
|
|
4938
5779
|
DEFAULT_ENDPOINT,
|
|
4939
5780
|
DEFAULT_MGMT_ENDPOINT,
|
|
4940
5781
|
DEFAULT_MODEL_SEC_DATA_ENDPOINT,
|
|
@@ -4947,11 +5788,21 @@ var RedTeamClient = class {
|
|
|
4947
5788
|
DashboardOverviewResponseSchema,
|
|
4948
5789
|
DatabricksConnectionParamsSchema,
|
|
4949
5790
|
DateRangeFilter,
|
|
5791
|
+
DbsEntrySchema,
|
|
5792
|
+
DbsReportSchema,
|
|
4950
5793
|
DeleteProfileConflictSchema,
|
|
4951
5794
|
DeleteProfileResponseSchema,
|
|
4952
5795
|
DeleteTopicConflictSchema,
|
|
4953
5796
|
DeleteTopicResponseSchema,
|
|
5797
|
+
DeploymentProfileEntrySchema,
|
|
5798
|
+
DeploymentProfilesClient,
|
|
5799
|
+
DeploymentProfilesResponseSchema,
|
|
5800
|
+
DetectionServiceName,
|
|
4954
5801
|
DetectionServiceResultSchema,
|
|
5802
|
+
DlpDataProfileSchema,
|
|
5803
|
+
DlpPatternDetectionSchema,
|
|
5804
|
+
DlpProfileListResponseSchema,
|
|
5805
|
+
DlpProfilesClient,
|
|
4955
5806
|
DlpReportSchema,
|
|
4956
5807
|
DynamicJobMetadataSchema,
|
|
4957
5808
|
DynamicJobReportSchema,
|
|
@@ -4961,6 +5812,7 @@ var RedTeamClient = class {
|
|
|
4961
5812
|
ErrorLogSchema,
|
|
4962
5813
|
ErrorResponseSchema,
|
|
4963
5814
|
ErrorSource,
|
|
5815
|
+
ErrorStatus,
|
|
4964
5816
|
ErrorType,
|
|
4965
5817
|
EvalOutcome,
|
|
4966
5818
|
EvalSummarySchema,
|
|
@@ -5012,11 +5864,20 @@ var RedTeamClient = class {
|
|
|
5012
5864
|
MAX_SESSION_ID_STR_LENGTH,
|
|
5013
5865
|
MAX_TOKEN_LENGTH,
|
|
5014
5866
|
MAX_TRANSACTION_ID_STR_LENGTH,
|
|
5867
|
+
MGMT_API_KEYS_TSG_PATH,
|
|
5868
|
+
MGMT_API_KEY_PATH,
|
|
5015
5869
|
MGMT_CLIENT_ID,
|
|
5016
5870
|
MGMT_CLIENT_SECRET,
|
|
5871
|
+
MGMT_CUSTOMER_APPS_TSG_PATH,
|
|
5872
|
+
MGMT_CUSTOMER_APP_PATH,
|
|
5873
|
+
MGMT_DEPLOYMENT_PROFILES_PATH,
|
|
5874
|
+
MGMT_DLP_PROFILES_PATH,
|
|
5017
5875
|
MGMT_ENDPOINT,
|
|
5876
|
+
MGMT_OAUTH_INVALIDATE_PATH,
|
|
5877
|
+
MGMT_OAUTH_TOKEN_PATH,
|
|
5018
5878
|
MGMT_PROFILES_TSG_PATH,
|
|
5019
5879
|
MGMT_PROFILE_PATH,
|
|
5880
|
+
MGMT_SCAN_LOGS_PATH,
|
|
5020
5881
|
MGMT_TOKEN_ENDPOINT,
|
|
5021
5882
|
MGMT_TOPICS_TSG_PATH,
|
|
5022
5883
|
MGMT_TOPIC_FORCE_PATH,
|
|
@@ -5034,8 +5895,11 @@ var RedTeamClient = class {
|
|
|
5034
5895
|
MODEL_SEC_TOKEN_ENDPOINT,
|
|
5035
5896
|
MODEL_SEC_TSG_ID,
|
|
5036
5897
|
MODEL_SEC_VIOLATIONS_PATH,
|
|
5898
|
+
MalwareReportSchema,
|
|
5037
5899
|
ManagementClient,
|
|
5038
5900
|
MaskedDataSchema,
|
|
5901
|
+
McEntrySchema,
|
|
5902
|
+
McReportSchema,
|
|
5039
5903
|
MetadataSchema,
|
|
5040
5904
|
ModelScanIssueSchema,
|
|
5041
5905
|
ModelScanStatus,
|
|
@@ -5054,8 +5918,13 @@ var RedTeamClient = class {
|
|
|
5054
5918
|
MultiTurnStatefulConfigSchema,
|
|
5055
5919
|
MultiTurnStatelessConfigSchema,
|
|
5056
5920
|
OAuthClient,
|
|
5921
|
+
OAuthManagementClient,
|
|
5922
|
+
Oauth2TokenSchema,
|
|
5923
|
+
OffsetSchema,
|
|
5057
5924
|
OpenAIConnectionParamsSchema,
|
|
5058
5925
|
PAYLOAD_HASH,
|
|
5926
|
+
PaginatedScanResultsSchema,
|
|
5927
|
+
PatternDetectionSchema,
|
|
5059
5928
|
PolicySchema,
|
|
5060
5929
|
PolicyType,
|
|
5061
5930
|
PrerequisiteModelSchema,
|
|
@@ -5138,10 +6007,13 @@ var RedTeamClient = class {
|
|
|
5138
6007
|
ScanDetailsSchema,
|
|
5139
6008
|
ScanIdResultSchema,
|
|
5140
6009
|
ScanListSchema,
|
|
6010
|
+
ScanLogsClient,
|
|
5141
6011
|
ScanOrigin,
|
|
5142
6012
|
ScanRequestContentsInnerSchema,
|
|
5143
6013
|
ScanRequestSchema,
|
|
5144
6014
|
ScanResponseSchema,
|
|
6015
|
+
ScanResultEntrySchema,
|
|
6016
|
+
ScanResultForDashboardSchema,
|
|
5145
6017
|
ScanStatisticsResponseSchema,
|
|
5146
6018
|
ScanSummarySchema,
|
|
5147
6019
|
Scanner,
|
|
@@ -5188,6 +6060,8 @@ var RedTeamClient = class {
|
|
|
5188
6060
|
TargetStatus,
|
|
5189
6061
|
TargetType,
|
|
5190
6062
|
TargetUpdateRequestSchema,
|
|
6063
|
+
TcReportSchema,
|
|
6064
|
+
TgReportSchema,
|
|
5191
6065
|
ThreatCategory,
|
|
5192
6066
|
ThreatScanReportSchema,
|
|
5193
6067
|
ToolDetectedSchema,
|