@cdot65/prisma-airs-sdk 0.6.2 → 0.6.4
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 +69 -54
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +21798 -6435
- package/dist/index.d.ts +21798 -6435
- package/dist/index.js +69 -54
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -430,7 +430,7 @@ var MAX_NUMBER_OF_BATCH_SCAN_OBJECTS = 5;
|
|
|
430
430
|
var MAX_CONNECTION_POOL_SIZE = 100;
|
|
431
431
|
var MAX_NUMBER_OF_RETRIES = 5;
|
|
432
432
|
var HTTP_FORCE_RETRY_STATUS_CODES = [500, 502, 503, 504];
|
|
433
|
-
var SDK_VERSION = "0.6.
|
|
433
|
+
var SDK_VERSION = "0.6.4";
|
|
434
434
|
var USER_AGENT = `PAN-AIRS/${SDK_VERSION}-typescript-sdk`;
|
|
435
435
|
var DEFAULT_MGMT_ENDPOINT = "https://api.sase.paloaltonetworks.com/aisec";
|
|
436
436
|
var DEFAULT_TOKEN_ENDPOINT = "https://auth.apps.paloaltonetworks.com/oauth2/access_token";
|
|
@@ -838,6 +838,11 @@ var Content = class _Content {
|
|
|
838
838
|
_codePrompt;
|
|
839
839
|
_codeResponse;
|
|
840
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
|
+
*/
|
|
841
846
|
constructor(opts) {
|
|
842
847
|
if (!opts.prompt && !opts.response && !opts.codePrompt && !opts.codeResponse && !opts.toolEvent) {
|
|
843
848
|
throw new AISecSDKException(
|
|
@@ -1005,7 +1010,7 @@ var import_zod = require("zod");
|
|
|
1005
1010
|
var AiProfileSchema = import_zod.z.object({
|
|
1006
1011
|
profile_id: import_zod.z.string().uuid().optional(),
|
|
1007
1012
|
profile_name: import_zod.z.string().max(MAX_AI_PROFILE_NAME_LENGTH).optional()
|
|
1008
|
-
}).refine((d) => d.profile_id || d.profile_name, {
|
|
1013
|
+
}).passthrough().refine((d) => d.profile_id || d.profile_name, {
|
|
1009
1014
|
message: "Either profile_id or profile_name must be provided"
|
|
1010
1015
|
});
|
|
1011
1016
|
|
|
@@ -1015,14 +1020,14 @@ var AgentMetaSchema = import_zod2.z.object({
|
|
|
1015
1020
|
agent_id: import_zod2.z.string().optional(),
|
|
1016
1021
|
agent_version: import_zod2.z.string().optional(),
|
|
1017
1022
|
agent_arn: import_zod2.z.string().optional()
|
|
1018
|
-
});
|
|
1023
|
+
}).passthrough();
|
|
1019
1024
|
var MetadataSchema = import_zod2.z.object({
|
|
1020
1025
|
app_name: import_zod2.z.string().optional(),
|
|
1021
1026
|
app_user: import_zod2.z.string().optional(),
|
|
1022
1027
|
ai_model: import_zod2.z.string().optional(),
|
|
1023
1028
|
user_ip: import_zod2.z.string().optional(),
|
|
1024
1029
|
agent_meta: AgentMetaSchema.optional()
|
|
1025
|
-
});
|
|
1030
|
+
}).passthrough();
|
|
1026
1031
|
|
|
1027
1032
|
// src/models/tool-event.ts
|
|
1028
1033
|
var import_zod3 = require("zod");
|
|
@@ -1031,12 +1036,12 @@ var ToolEventMetadataSchema = import_zod3.z.object({
|
|
|
1031
1036
|
method: import_zod3.z.string(),
|
|
1032
1037
|
server_name: import_zod3.z.string(),
|
|
1033
1038
|
tool_invoked: import_zod3.z.string().optional()
|
|
1034
|
-
});
|
|
1039
|
+
}).passthrough();
|
|
1035
1040
|
var ToolEventSchema = import_zod3.z.object({
|
|
1036
1041
|
metadata: ToolEventMetadataSchema.optional(),
|
|
1037
1042
|
input: import_zod3.z.string().optional(),
|
|
1038
1043
|
output: import_zod3.z.string().optional()
|
|
1039
|
-
});
|
|
1044
|
+
}).passthrough();
|
|
1040
1045
|
|
|
1041
1046
|
// src/models/scan-request.ts
|
|
1042
1047
|
var import_zod4 = require("zod");
|
|
@@ -1047,14 +1052,14 @@ var ScanRequestContentsInnerSchema = import_zod4.z.object({
|
|
|
1047
1052
|
code_response: import_zod4.z.string().optional(),
|
|
1048
1053
|
context: import_zod4.z.string().optional(),
|
|
1049
1054
|
tool_event: ToolEventSchema.optional()
|
|
1050
|
-
});
|
|
1055
|
+
}).passthrough();
|
|
1051
1056
|
var ScanRequestSchema = import_zod4.z.object({
|
|
1052
1057
|
tr_id: import_zod4.z.string().max(MAX_TRANSACTION_ID_STR_LENGTH).optional(),
|
|
1053
1058
|
session_id: import_zod4.z.string().max(MAX_SESSION_ID_STR_LENGTH).optional(),
|
|
1054
1059
|
ai_profile: AiProfileSchema,
|
|
1055
1060
|
metadata: MetadataSchema.optional(),
|
|
1056
1061
|
contents: import_zod4.z.array(ScanRequestContentsInnerSchema).min(1)
|
|
1057
|
-
});
|
|
1062
|
+
}).passthrough();
|
|
1058
1063
|
|
|
1059
1064
|
// src/models/scan-response.ts
|
|
1060
1065
|
var import_zod8 = require("zod");
|
|
@@ -1063,7 +1068,7 @@ var import_zod8 = require("zod");
|
|
|
1063
1068
|
var import_zod5 = require("zod");
|
|
1064
1069
|
var PromptDetectionDetailsSchema = import_zod5.z.object({
|
|
1065
1070
|
topic_guardrails_details: import_zod5.z.record(import_zod5.z.unknown()).optional()
|
|
1066
|
-
});
|
|
1071
|
+
}).passthrough();
|
|
1067
1072
|
var PromptDetectedSchema = import_zod5.z.object({
|
|
1068
1073
|
url_cats: import_zod5.z.boolean().optional(),
|
|
1069
1074
|
dlp: import_zod5.z.boolean().optional(),
|
|
@@ -1072,13 +1077,13 @@ var PromptDetectedSchema = import_zod5.z.object({
|
|
|
1072
1077
|
malicious_code: import_zod5.z.boolean().optional(),
|
|
1073
1078
|
agent: import_zod5.z.boolean().optional(),
|
|
1074
1079
|
topic_violation: import_zod5.z.boolean().optional()
|
|
1075
|
-
});
|
|
1080
|
+
}).passthrough();
|
|
1076
1081
|
|
|
1077
1082
|
// src/models/response-detected.ts
|
|
1078
1083
|
var import_zod6 = require("zod");
|
|
1079
1084
|
var ResponseDetectionDetailsSchema = import_zod6.z.object({
|
|
1080
1085
|
topic_guardrails_details: import_zod6.z.record(import_zod6.z.unknown()).optional()
|
|
1081
|
-
});
|
|
1086
|
+
}).passthrough();
|
|
1082
1087
|
var ResponseDetectedSchema = import_zod6.z.object({
|
|
1083
1088
|
url_cats: import_zod6.z.boolean().optional(),
|
|
1084
1089
|
dlp: import_zod6.z.boolean().optional(),
|
|
@@ -1088,7 +1093,7 @@ var ResponseDetectedSchema = import_zod6.z.object({
|
|
|
1088
1093
|
agent: import_zod6.z.boolean().optional(),
|
|
1089
1094
|
ungrounded: import_zod6.z.boolean().optional(),
|
|
1090
1095
|
topic_violation: import_zod6.z.boolean().optional()
|
|
1091
|
-
});
|
|
1096
|
+
}).passthrough();
|
|
1092
1097
|
|
|
1093
1098
|
// src/models/detection-reports.ts
|
|
1094
1099
|
var import_zod7 = require("zod");
|
|
@@ -1164,7 +1169,7 @@ var ContentErrorSchema = import_zod7.z.object({
|
|
|
1164
1169
|
var MaskedDataSchema = import_zod8.z.object({
|
|
1165
1170
|
data: import_zod8.z.string().optional(),
|
|
1166
1171
|
pattern_detections: import_zod8.z.array(PatternDetectionSchema).optional()
|
|
1167
|
-
});
|
|
1172
|
+
}).passthrough();
|
|
1168
1173
|
var IODetectedSchema = import_zod8.z.object({
|
|
1169
1174
|
url_cats: import_zod8.z.boolean().optional(),
|
|
1170
1175
|
dlp: import_zod8.z.boolean().optional(),
|
|
@@ -1182,7 +1187,7 @@ var ToolDetectedSchema = import_zod8.z.object({
|
|
|
1182
1187
|
summary: ScanSummarySchema.optional(),
|
|
1183
1188
|
input_detected: IODetectedSchema.optional(),
|
|
1184
1189
|
output_detected: IODetectedSchema.optional()
|
|
1185
|
-
});
|
|
1190
|
+
}).passthrough();
|
|
1186
1191
|
var ScanResponseSchema = import_zod8.z.object({
|
|
1187
1192
|
source: import_zod8.z.string().optional(),
|
|
1188
1193
|
report_id: import_zod8.z.string(),
|
|
@@ -1205,20 +1210,20 @@ var ScanResponseSchema = import_zod8.z.object({
|
|
|
1205
1210
|
tool_detected: ToolDetectedSchema.optional(),
|
|
1206
1211
|
created_at: import_zod8.z.string().optional(),
|
|
1207
1212
|
completed_at: import_zod8.z.string().optional()
|
|
1208
|
-
});
|
|
1213
|
+
}).passthrough();
|
|
1209
1214
|
|
|
1210
1215
|
// src/models/async-scan.ts
|
|
1211
1216
|
var import_zod9 = require("zod");
|
|
1212
1217
|
var AsyncScanObjectSchema = import_zod9.z.object({
|
|
1213
1218
|
req_id: import_zod9.z.number().int(),
|
|
1214
1219
|
scan_req: ScanRequestSchema
|
|
1215
|
-
});
|
|
1220
|
+
}).passthrough();
|
|
1216
1221
|
var AsyncScanResponseSchema = import_zod9.z.object({
|
|
1217
1222
|
received: import_zod9.z.string(),
|
|
1218
1223
|
scan_id: import_zod9.z.string(),
|
|
1219
1224
|
report_id: import_zod9.z.string().optional(),
|
|
1220
1225
|
source: import_zod9.z.string().optional()
|
|
1221
|
-
});
|
|
1226
|
+
}).passthrough();
|
|
1222
1227
|
|
|
1223
1228
|
// src/models/scan-id-result.ts
|
|
1224
1229
|
var import_zod10 = require("zod");
|
|
@@ -1228,7 +1233,7 @@ var ScanIdResultSchema = import_zod10.z.object({
|
|
|
1228
1233
|
status: import_zod10.z.string().optional(),
|
|
1229
1234
|
scan_id: import_zod10.z.string().optional(),
|
|
1230
1235
|
result: ScanResponseSchema.optional()
|
|
1231
|
-
});
|
|
1236
|
+
}).passthrough();
|
|
1232
1237
|
|
|
1233
1238
|
// src/models/threat-report.ts
|
|
1234
1239
|
var import_zod14 = require("zod");
|
|
@@ -1246,7 +1251,7 @@ var DlpReportSchema = import_zod11.z.object({
|
|
|
1246
1251
|
data_pattern_rule1_verdict: import_zod11.z.string().optional(),
|
|
1247
1252
|
data_pattern_rule2_verdict: import_zod11.z.string().optional(),
|
|
1248
1253
|
data_pattern_detection_offsets: import_zod11.z.array(DlpPatternDetectionSchema).optional()
|
|
1249
|
-
});
|
|
1254
|
+
}).passthrough();
|
|
1250
1255
|
|
|
1251
1256
|
// src/models/urlf-report.ts
|
|
1252
1257
|
var import_zod12 = require("zod");
|
|
@@ -1255,7 +1260,7 @@ var UrlfEntrySchema = import_zod12.z.object({
|
|
|
1255
1260
|
risk_level: import_zod12.z.string().optional(),
|
|
1256
1261
|
action: import_zod12.z.string().optional(),
|
|
1257
1262
|
categories: import_zod12.z.array(import_zod12.z.string()).optional()
|
|
1258
|
-
});
|
|
1263
|
+
}).passthrough();
|
|
1259
1264
|
|
|
1260
1265
|
// src/models/detection.ts
|
|
1261
1266
|
var DSDetailResultSchema = import_zod13.z.object({
|
|
@@ -1284,7 +1289,7 @@ var DetectionServiceResultSchema = import_zod13.z.object({
|
|
|
1284
1289
|
action: import_zod13.z.string().optional(),
|
|
1285
1290
|
metadata: DSResultMetadataSchema.optional(),
|
|
1286
1291
|
result_detail: DSDetailResultSchema.optional()
|
|
1287
|
-
});
|
|
1292
|
+
}).passthrough();
|
|
1288
1293
|
|
|
1289
1294
|
// src/models/threat-report.ts
|
|
1290
1295
|
var ThreatScanReportSchema = import_zod14.z.object({
|
|
@@ -1295,7 +1300,7 @@ var ThreatScanReportSchema = import_zod14.z.object({
|
|
|
1295
1300
|
transaction_id: import_zod14.z.string().optional(),
|
|
1296
1301
|
session_id: import_zod14.z.string().optional(),
|
|
1297
1302
|
detection_results: import_zod14.z.array(DetectionServiceResultSchema).optional()
|
|
1298
|
-
});
|
|
1303
|
+
}).passthrough();
|
|
1299
1304
|
|
|
1300
1305
|
// src/models/error-response.ts
|
|
1301
1306
|
var import_zod15 = require("zod");
|
|
@@ -1309,7 +1314,7 @@ var ErrorResponseSchema = import_zod15.z.object({
|
|
|
1309
1314
|
interval: import_zod15.z.number().optional(),
|
|
1310
1315
|
unit: import_zod15.z.string().optional()
|
|
1311
1316
|
}).optional()
|
|
1312
|
-
});
|
|
1317
|
+
}).passthrough();
|
|
1313
1318
|
|
|
1314
1319
|
// src/models/mgmt-security-profile.ts
|
|
1315
1320
|
var import_zod16 = require("zod");
|
|
@@ -1793,10 +1798,10 @@ var ModelSecurityPaginationSchema = import_zod24.z.object({
|
|
|
1793
1798
|
var LabelSchema = import_zod24.z.object({
|
|
1794
1799
|
key: import_zod24.z.string(),
|
|
1795
1800
|
value: import_zod24.z.string()
|
|
1796
|
-
});
|
|
1801
|
+
}).passthrough();
|
|
1797
1802
|
var LabelsCreateRequestSchema = import_zod24.z.object({
|
|
1798
1803
|
labels: import_zod24.z.array(LabelSchema)
|
|
1799
|
-
});
|
|
1804
|
+
}).passthrough();
|
|
1800
1805
|
var LabelsResponseSchema = import_zod24.z.object({}).passthrough();
|
|
1801
1806
|
var LabelKeyListSchema = import_zod24.z.object({
|
|
1802
1807
|
pagination: ModelSecurityPaginationSchema,
|
|
@@ -1837,7 +1842,7 @@ var ScanDetailsSchema = import_zod24.z.object({
|
|
|
1837
1842
|
scan_duration_ms: import_zod24.z.number().int(),
|
|
1838
1843
|
error_code: import_zod24.z.string().nullable().optional(),
|
|
1839
1844
|
error_message: import_zod24.z.string().nullable().optional()
|
|
1840
|
-
});
|
|
1845
|
+
}).passthrough();
|
|
1841
1846
|
var ScanCreateRequestSchema = import_zod24.z.object({
|
|
1842
1847
|
model_uri: import_zod24.z.string(),
|
|
1843
1848
|
security_group_uuid: import_zod24.z.string(),
|
|
@@ -1849,7 +1854,7 @@ var ScanCreateRequestSchema = import_zod24.z.object({
|
|
|
1849
1854
|
model_name: import_zod24.z.string().nullable().optional(),
|
|
1850
1855
|
model_version: import_zod24.z.string().nullable().optional(),
|
|
1851
1856
|
scan_details: ScanDetailsSchema.nullable().optional()
|
|
1852
|
-
});
|
|
1857
|
+
}).passthrough();
|
|
1853
1858
|
var ScanBaseResponseSchema = import_zod24.z.object({
|
|
1854
1859
|
uuid: import_zod24.z.string(),
|
|
1855
1860
|
tsg_id: import_zod24.z.string(),
|
|
@@ -1987,7 +1992,7 @@ var ModelSecurityRuleInstanceUpdateRequestSchema = import_zod24.z.object({
|
|
|
1987
1992
|
security_group_uuid: import_zod24.z.string(),
|
|
1988
1993
|
state: import_zod24.z.string().nullable().optional(),
|
|
1989
1994
|
field_values: import_zod24.z.record(import_zod24.z.unknown()).nullable().optional()
|
|
1990
|
-
});
|
|
1995
|
+
}).passthrough();
|
|
1991
1996
|
var ListModelSecurityRuleInstancesResponseSchema = import_zod24.z.object({
|
|
1992
1997
|
pagination: ModelSecurityPaginationSchema,
|
|
1993
1998
|
rule_instances: import_zod24.z.array(ModelSecurityRuleInstanceResponseSchema)
|
|
@@ -1997,7 +2002,7 @@ var ModelSecurityGroupCreateRequestSchema = import_zod24.z.object({
|
|
|
1997
2002
|
source_type: import_zod24.z.string(),
|
|
1998
2003
|
description: import_zod24.z.string().optional().default(""),
|
|
1999
2004
|
rule_configurations: import_zod24.z.record(RuleConfigurationSchema).optional()
|
|
2000
|
-
});
|
|
2005
|
+
}).passthrough();
|
|
2001
2006
|
var ModelSecurityGroupResponseSchema = import_zod24.z.object({
|
|
2002
2007
|
uuid: import_zod24.z.string(),
|
|
2003
2008
|
tsg_id: import_zod24.z.string(),
|
|
@@ -2012,7 +2017,7 @@ var ModelSecurityGroupResponseSchema = import_zod24.z.object({
|
|
|
2012
2017
|
var ModelSecurityGroupUpdateRequestSchema = import_zod24.z.object({
|
|
2013
2018
|
name: import_zod24.z.string().nullable().optional(),
|
|
2014
2019
|
description: import_zod24.z.string().nullable().optional()
|
|
2015
|
-
});
|
|
2020
|
+
}).passthrough();
|
|
2016
2021
|
var ListModelSecurityGroupsResponseSchema = import_zod24.z.object({
|
|
2017
2022
|
pagination: ModelSecurityPaginationSchema,
|
|
2018
2023
|
security_groups: import_zod24.z.array(ModelSecurityGroupResponseSchema)
|
|
@@ -2219,12 +2224,12 @@ var TargetType = {
|
|
|
2219
2224
|
// src/models/red-team.ts
|
|
2220
2225
|
var import_zod25 = require("zod");
|
|
2221
2226
|
var RedTeamPaginationSchema = import_zod25.z.object({ total_items: import_zod25.z.number().int().nullable().optional() }).passthrough();
|
|
2222
|
-
var CountByNameSchema = import_zod25.z.object({ name: import_zod25.z.string(), count: import_zod25.z.number().int() });
|
|
2227
|
+
var CountByNameSchema = import_zod25.z.object({ name: import_zod25.z.string(), count: import_zod25.z.number().int() }).passthrough();
|
|
2223
2228
|
var ValidationErrorSchema = import_zod25.z.object({
|
|
2224
2229
|
loc: import_zod25.z.array(import_zod25.z.union([import_zod25.z.string(), import_zod25.z.number()])),
|
|
2225
2230
|
msg: import_zod25.z.string(),
|
|
2226
2231
|
type: import_zod25.z.string()
|
|
2227
|
-
});
|
|
2232
|
+
}).passthrough();
|
|
2228
2233
|
var HTTPValidationErrorSchema = import_zod25.z.object({ detail: import_zod25.z.array(ValidationErrorSchema).optional() }).passthrough();
|
|
2229
2234
|
var TargetBackgroundSchema = import_zod25.z.object({
|
|
2230
2235
|
industry: import_zod25.z.string().nullable().optional(),
|
|
@@ -2307,7 +2312,7 @@ var ConnectionParamsSchema = import_zod25.z.union([
|
|
|
2307
2312
|
var TargetJobRequestSchema = import_zod25.z.object({
|
|
2308
2313
|
uuid: import_zod25.z.string(),
|
|
2309
2314
|
version: import_zod25.z.number().int().nullable().optional()
|
|
2310
|
-
});
|
|
2315
|
+
}).passthrough();
|
|
2311
2316
|
var JobTimeRecordSchema = import_zod25.z.object({
|
|
2312
2317
|
queued_at: import_zod25.z.string().nullable().optional(),
|
|
2313
2318
|
started_at: import_zod25.z.string().nullable().optional(),
|
|
@@ -2368,7 +2373,7 @@ var JobCreateRequestSchema = import_zod25.z.object({
|
|
|
2368
2373
|
]),
|
|
2369
2374
|
version: import_zod25.z.number().int().nullable().optional(),
|
|
2370
2375
|
extra_info: import_zod25.z.record(import_zod25.z.unknown()).nullable().optional()
|
|
2371
|
-
});
|
|
2376
|
+
}).passthrough();
|
|
2372
2377
|
var StaticJobReportStatsSchema = import_zod25.z.object({
|
|
2373
2378
|
output_completion_percentage: import_zod25.z.number(),
|
|
2374
2379
|
partial_report_unlocked: import_zod25.z.boolean().optional(),
|
|
@@ -2439,12 +2444,12 @@ var JobListResponseSchema = import_zod25.z.object({
|
|
|
2439
2444
|
var JobAbortResponseSchema = import_zod25.z.object({
|
|
2440
2445
|
job_id: import_zod25.z.string(),
|
|
2441
2446
|
message: import_zod25.z.string()
|
|
2442
|
-
});
|
|
2447
|
+
}).passthrough();
|
|
2443
2448
|
var PrerequisiteModelSchema = import_zod25.z.object({
|
|
2444
2449
|
id: import_zod25.z.string(),
|
|
2445
2450
|
display_name: import_zod25.z.string(),
|
|
2446
2451
|
description: import_zod25.z.string()
|
|
2447
|
-
});
|
|
2452
|
+
}).passthrough();
|
|
2448
2453
|
var SubCategoryModelSchema = import_zod25.z.object({
|
|
2449
2454
|
id: import_zod25.z.string(),
|
|
2450
2455
|
display_name: import_zod25.z.string(),
|
|
@@ -2738,17 +2743,17 @@ var CustomAttackOutputSchema = import_zod25.z.object({
|
|
|
2738
2743
|
var PropertyAssignmentSchema = import_zod25.z.object({
|
|
2739
2744
|
name: import_zod25.z.string(),
|
|
2740
2745
|
value: import_zod25.z.string()
|
|
2741
|
-
});
|
|
2746
|
+
}).passthrough();
|
|
2742
2747
|
var PropertyValueStatisticSchema = import_zod25.z.object({
|
|
2743
2748
|
value: import_zod25.z.string(),
|
|
2744
2749
|
successful_attack_count: import_zod25.z.number().int(),
|
|
2745
2750
|
total_attack_count: import_zod25.z.number().int(),
|
|
2746
2751
|
success_rate: import_zod25.z.number()
|
|
2747
|
-
});
|
|
2752
|
+
}).passthrough();
|
|
2748
2753
|
var PropertyStatisticSchema = import_zod25.z.object({
|
|
2749
2754
|
property_name: import_zod25.z.string(),
|
|
2750
2755
|
values: import_zod25.z.array(PropertyValueStatisticSchema)
|
|
2751
|
-
});
|
|
2756
|
+
}).passthrough();
|
|
2752
2757
|
var PromptSetSummarySchema = import_zod25.z.object({
|
|
2753
2758
|
prompt_set_id: import_zod25.z.string(),
|
|
2754
2759
|
prompt_set_name: import_zod25.z.string(),
|
|
@@ -2809,16 +2814,16 @@ var ScanStatisticsResponseSchema = import_zod25.z.object({
|
|
|
2809
2814
|
var ScoreTrendSeriesSchema = import_zod25.z.object({
|
|
2810
2815
|
label: import_zod25.z.string(),
|
|
2811
2816
|
data: import_zod25.z.array(import_zod25.z.number().nullable())
|
|
2812
|
-
});
|
|
2817
|
+
}).passthrough();
|
|
2813
2818
|
var ScoreTrendResponseSchema = import_zod25.z.object({
|
|
2814
2819
|
labels: import_zod25.z.array(import_zod25.z.string()),
|
|
2815
2820
|
series: import_zod25.z.array(ScoreTrendSeriesSchema)
|
|
2816
|
-
});
|
|
2821
|
+
}).passthrough();
|
|
2817
2822
|
var SentimentRequestSchema = import_zod25.z.object({
|
|
2818
2823
|
job_id: import_zod25.z.string(),
|
|
2819
2824
|
up_vote: import_zod25.z.boolean().optional(),
|
|
2820
2825
|
down_vote: import_zod25.z.boolean().optional()
|
|
2821
|
-
});
|
|
2826
|
+
}).passthrough();
|
|
2822
2827
|
var SentimentResponseSchema = import_zod25.z.object({
|
|
2823
2828
|
job_id: import_zod25.z.string(),
|
|
2824
2829
|
up_vote: import_zod25.z.boolean().optional(),
|
|
@@ -2828,12 +2833,12 @@ var QuotaDetailsSchema = import_zod25.z.object({
|
|
|
2828
2833
|
allocated: import_zod25.z.number().int(),
|
|
2829
2834
|
unlimited: import_zod25.z.boolean(),
|
|
2830
2835
|
consumed: import_zod25.z.number().int()
|
|
2831
|
-
});
|
|
2836
|
+
}).passthrough();
|
|
2832
2837
|
var QuotaSummarySchema = import_zod25.z.object({
|
|
2833
2838
|
static: QuotaDetailsSchema,
|
|
2834
2839
|
dynamic: QuotaDetailsSchema,
|
|
2835
2840
|
custom: QuotaDetailsSchema
|
|
2836
|
-
});
|
|
2841
|
+
}).passthrough();
|
|
2837
2842
|
var ErrorLogSchema = import_zod25.z.object({
|
|
2838
2843
|
created_at: import_zod25.z.string(),
|
|
2839
2844
|
updated_at: import_zod25.z.string(),
|
|
@@ -2960,7 +2965,7 @@ var TargetProfileResponseSchema = import_zod25.z.object({
|
|
|
2960
2965
|
var BaseResponseSchema = import_zod25.z.object({
|
|
2961
2966
|
message: import_zod25.z.string(),
|
|
2962
2967
|
status: import_zod25.z.number().int()
|
|
2963
|
-
});
|
|
2968
|
+
}).passthrough();
|
|
2964
2969
|
var PromptSetStatsSchema = import_zod25.z.object({
|
|
2965
2970
|
total_prompts: import_zod25.z.number().int(),
|
|
2966
2971
|
active_prompts: import_zod25.z.number().int(),
|
|
@@ -2972,14 +2977,14 @@ var CustomPromptSetCreateRequestSchema = import_zod25.z.object({
|
|
|
2972
2977
|
name: import_zod25.z.string(),
|
|
2973
2978
|
description: import_zod25.z.unknown().optional(),
|
|
2974
2979
|
property_names: import_zod25.z.array(import_zod25.z.string()).optional()
|
|
2975
|
-
});
|
|
2980
|
+
}).passthrough();
|
|
2976
2981
|
var CustomPromptSetUpdateRequestSchema = import_zod25.z.object({
|
|
2977
2982
|
name: import_zod25.z.unknown().optional(),
|
|
2978
2983
|
description: import_zod25.z.unknown().optional(),
|
|
2979
2984
|
archive: import_zod25.z.unknown().optional(),
|
|
2980
2985
|
property_names: import_zod25.z.unknown().optional()
|
|
2981
2986
|
}).passthrough();
|
|
2982
|
-
var CustomPromptSetArchiveRequestSchema = import_zod25.z.object({ archive: import_zod25.z.boolean() });
|
|
2987
|
+
var CustomPromptSetArchiveRequestSchema = import_zod25.z.object({ archive: import_zod25.z.boolean() }).passthrough();
|
|
2983
2988
|
var CustomPromptSetResponseSchema = import_zod25.z.object({
|
|
2984
2989
|
uuid: import_zod25.z.string(),
|
|
2985
2990
|
name: import_zod25.z.string(),
|
|
@@ -3038,7 +3043,7 @@ var CustomPromptCreateRequestSchema = import_zod25.z.object({
|
|
|
3038
3043
|
prompt_set_id: import_zod25.z.string(),
|
|
3039
3044
|
goal: import_zod25.z.unknown().optional(),
|
|
3040
3045
|
properties: import_zod25.z.unknown().optional()
|
|
3041
|
-
});
|
|
3046
|
+
}).passthrough();
|
|
3042
3047
|
var CustomPromptUpdateRequestSchema = import_zod25.z.object({
|
|
3043
3048
|
prompt: import_zod25.z.unknown().optional(),
|
|
3044
3049
|
goal: import_zod25.z.unknown().optional(),
|
|
@@ -3075,15 +3080,15 @@ var CustomPromptListSchema = import_zod25.z.object({
|
|
|
3075
3080
|
pagination: RedTeamPaginationSchema,
|
|
3076
3081
|
data: import_zod25.z.array(CustomPromptListItemSchema).optional()
|
|
3077
3082
|
}).passthrough();
|
|
3078
|
-
var PropertyNameCreateRequestSchema = import_zod25.z.object({ name: import_zod25.z.string() });
|
|
3083
|
+
var PropertyNameCreateRequestSchema = import_zod25.z.object({ name: import_zod25.z.string() }).passthrough();
|
|
3079
3084
|
var PropertyValueCreateRequestSchema = import_zod25.z.object({
|
|
3080
3085
|
property_name: import_zod25.z.string(),
|
|
3081
3086
|
property_value: import_zod25.z.string()
|
|
3082
|
-
});
|
|
3087
|
+
}).passthrough();
|
|
3083
3088
|
var PropertyDefinitionSchema = import_zod25.z.object({
|
|
3084
3089
|
property_name: import_zod25.z.string(),
|
|
3085
3090
|
created_at: import_zod25.z.string()
|
|
3086
|
-
});
|
|
3091
|
+
}).passthrough();
|
|
3087
3092
|
var PropertyNamesListResponseSchema = import_zod25.z.object({ data: import_zod25.z.array(PropertyDefinitionSchema).optional() }).passthrough();
|
|
3088
3093
|
var PropertyValuesResponseSchema = import_zod25.z.object({
|
|
3089
3094
|
name: import_zod25.z.string(),
|
|
@@ -3102,7 +3107,7 @@ var OAuthTokenResponseSchema = import_zod26.z.object({
|
|
|
3102
3107
|
token_type: import_zod26.z.string().optional(),
|
|
3103
3108
|
expires_in: import_zod26.z.number(),
|
|
3104
3109
|
scope: import_zod26.z.string().optional()
|
|
3105
|
-
});
|
|
3110
|
+
}).passthrough();
|
|
3106
3111
|
|
|
3107
3112
|
// src/management/oauth-client.ts
|
|
3108
3113
|
var DEFAULT_TOKEN_BUFFER_MS = 3e4;
|
|
@@ -4118,6 +4123,7 @@ var ModelSecurityScansClient = class {
|
|
|
4118
4123
|
* Delete labels from a scan by key.
|
|
4119
4124
|
* @param scanUuid - Scan UUID.
|
|
4120
4125
|
* @param keys - Label keys to delete.
|
|
4126
|
+
* @returns Resolves when the labels are deleted.
|
|
4121
4127
|
*/
|
|
4122
4128
|
async deleteLabels(scanUuid, keys) {
|
|
4123
4129
|
if (!isValidUuid(scanUuid)) {
|
|
@@ -4601,7 +4607,11 @@ var RedTeamScansClient = class {
|
|
|
4601
4607
|
this.oauthClient = opts.oauthClient;
|
|
4602
4608
|
this.numRetries = opts.numRetries;
|
|
4603
4609
|
}
|
|
4604
|
-
/**
|
|
4610
|
+
/**
|
|
4611
|
+
* Create a new red team scan job.
|
|
4612
|
+
* @param request - Job creation request body.
|
|
4613
|
+
* @returns The created job response.
|
|
4614
|
+
*/
|
|
4605
4615
|
async create(request) {
|
|
4606
4616
|
const res = await managementHttpRequest({
|
|
4607
4617
|
method: "POST",
|
|
@@ -5061,7 +5071,12 @@ var RedTeamTargetsClient = class {
|
|
|
5061
5071
|
this.oauthClient = opts.oauthClient;
|
|
5062
5072
|
this.numRetries = opts.numRetries;
|
|
5063
5073
|
}
|
|
5064
|
-
/**
|
|
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
|
+
*/
|
|
5065
5080
|
async create(request, opts) {
|
|
5066
5081
|
const params = {};
|
|
5067
5082
|
if (opts?.validate !== void 0) params.validate = String(opts.validate);
|