@cdot65/prisma-airs-sdk 0.8.3 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/dist/index.cjs +2212 -1198
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13221 -1939
- package/dist/index.d.ts +13221 -1939
- package/dist/index.js +2139 -1197
- package/dist/index.js.map +1 -1
- package/package.json +6 -2
package/dist/index.js
CHANGED
|
@@ -29,7 +29,7 @@ var MAX_NUMBER_OF_BATCH_SCAN_OBJECTS = 5;
|
|
|
29
29
|
var MAX_CONNECTION_POOL_SIZE = 100;
|
|
30
30
|
var MAX_NUMBER_OF_RETRIES = 5;
|
|
31
31
|
var HTTP_FORCE_RETRY_STATUS_CODES = [500, 502, 503, 504];
|
|
32
|
-
var SDK_VERSION = "0.
|
|
32
|
+
var SDK_VERSION = "0.9.1";
|
|
33
33
|
var USER_AGENT = `PAN-AIRS/${SDK_VERSION}-typescript-sdk`;
|
|
34
34
|
var DEFAULT_MGMT_ENDPOINT = "https://api.sase.paloaltonetworks.com/aisec";
|
|
35
35
|
var DEFAULT_TOKEN_ENDPOINT = "https://auth.apps.paloaltonetworks.com/oauth2/access_token";
|
|
@@ -56,6 +56,11 @@ var MGMT_CUSTOMER_APP_PATH = "/v1/mgmt/customerapp";
|
|
|
56
56
|
var MGMT_CUSTOMER_APPS_TSG_PATH = "/v1/mgmt/customerapp/tsg";
|
|
57
57
|
var MGMT_OAUTH_INVALIDATE_PATH = "/v1/mgmt/oauth/invalidateToken";
|
|
58
58
|
var MGMT_OAUTH_TOKEN_PATH = "/v1/mgmt/oauth/client_credential/accesstoken";
|
|
59
|
+
var DEFAULT_DLP_ENDPOINT = "https://api.dlp.paloaltonetworks.com";
|
|
60
|
+
var DLP_DATA_FILTERING_PROFILES_PATH = "/v2/api/data-filtering-profiles";
|
|
61
|
+
var DLP_DATA_PATTERNS_PATH = "/v2/api/data-patterns";
|
|
62
|
+
var DLP_DICTIONARIES_PATH = "/v2/api/dictionaries";
|
|
63
|
+
var DLP_DATA_PROFILES_PATH = "/v2/api/data-profiles";
|
|
59
64
|
var DEFAULT_MODEL_SEC_DATA_ENDPOINT = "https://api.sase.paloaltonetworks.com/aims/data";
|
|
60
65
|
var DEFAULT_MODEL_SEC_MGMT_ENDPOINT = "https://api.sase.paloaltonetworks.com/aims/mgmt";
|
|
61
66
|
var MODEL_SEC_CLIENT_ID = "PANW_MODEL_SEC_CLIENT_ID";
|
|
@@ -319,16 +324,20 @@ async function request(spec) {
|
|
|
319
324
|
}
|
|
320
325
|
const headers = { "User-Agent": USER_AGENT };
|
|
321
326
|
let bodyText;
|
|
322
|
-
|
|
323
|
-
|
|
327
|
+
let bodyForFetch;
|
|
328
|
+
if (spec.formData !== void 0) {
|
|
329
|
+
bodyForFetch = spec.formData;
|
|
330
|
+
} else if (spec.body !== void 0) {
|
|
331
|
+
headers["Content-Type"] = spec.contentType ?? "application/json";
|
|
324
332
|
bodyText = JSON.stringify(spec.body);
|
|
333
|
+
bodyForFetch = bodyText;
|
|
325
334
|
}
|
|
326
335
|
const prepared = { method: spec.method, url, headers, bodyText };
|
|
327
336
|
const final = await spec.auth.prepare(prepared);
|
|
328
337
|
return fetch(final.url.toString(), {
|
|
329
338
|
method: final.method,
|
|
330
339
|
headers: final.headers,
|
|
331
|
-
body: final.bodyText
|
|
340
|
+
body: spec.formData !== void 0 ? bodyForFetch : final.bodyText
|
|
332
341
|
});
|
|
333
342
|
},
|
|
334
343
|
onRetryableFailure: async (res) => {
|
|
@@ -346,6 +355,9 @@ async function request(spec) {
|
|
|
346
355
|
if (!spec.responseSchema) {
|
|
347
356
|
return void 0;
|
|
348
357
|
}
|
|
358
|
+
if (spec.allowEmptyBody && !text) {
|
|
359
|
+
return void 0;
|
|
360
|
+
}
|
|
349
361
|
let parsed;
|
|
350
362
|
try {
|
|
351
363
|
parsed = text ? JSON.parse(text) : {};
|
|
@@ -621,13 +633,13 @@ import { z as z13 } from "zod";
|
|
|
621
633
|
// src/models/dlp-report.ts
|
|
622
634
|
import { z as z11 } from "zod";
|
|
623
635
|
var DlpReportSchema = z11.object({
|
|
624
|
-
dlp_report_id: z11.string().
|
|
625
|
-
dlp_profile_name: z11.string().
|
|
626
|
-
dlp_profile_id: z11.string().
|
|
627
|
-
dlp_profile_version: z11.number().
|
|
628
|
-
data_pattern_rule1_verdict: z11.string().
|
|
629
|
-
data_pattern_rule2_verdict: z11.string().
|
|
630
|
-
data_pattern_detection_offsets: z11.array(DlpPatternDetectionSchema).
|
|
636
|
+
dlp_report_id: z11.string().nullish(),
|
|
637
|
+
dlp_profile_name: z11.string().nullish(),
|
|
638
|
+
dlp_profile_id: z11.string().nullish(),
|
|
639
|
+
dlp_profile_version: z11.number().nullish(),
|
|
640
|
+
data_pattern_rule1_verdict: z11.string().nullish(),
|
|
641
|
+
data_pattern_rule2_verdict: z11.string().nullish(),
|
|
642
|
+
data_pattern_detection_offsets: z11.array(DlpPatternDetectionSchema).nullish()
|
|
631
643
|
}).passthrough();
|
|
632
644
|
|
|
633
645
|
// src/models/urlf-report.ts
|
|
@@ -1421,6 +1433,454 @@ var Oauth2TokenSchema = z24.object({
|
|
|
1421
1433
|
status: z24.string().optional()
|
|
1422
1434
|
}).passthrough();
|
|
1423
1435
|
|
|
1436
|
+
// src/models/dlp-audit.ts
|
|
1437
|
+
import { z as z25 } from "zod";
|
|
1438
|
+
var AuditResponseSchema = z25.object({
|
|
1439
|
+
created_at: z25.union([z25.string(), z25.number()]).nullish(),
|
|
1440
|
+
created_by: z25.string().nullish(),
|
|
1441
|
+
updated_at: z25.union([z25.string(), z25.number()]).nullish(),
|
|
1442
|
+
updated_by: z25.string().nullish()
|
|
1443
|
+
}).passthrough();
|
|
1444
|
+
|
|
1445
|
+
// src/models/dlp-page.ts
|
|
1446
|
+
import { z as z26 } from "zod";
|
|
1447
|
+
var SortObjectSchema = z26.object({
|
|
1448
|
+
empty: z26.boolean().optional(),
|
|
1449
|
+
sorted: z26.boolean().optional(),
|
|
1450
|
+
unsorted: z26.boolean().optional()
|
|
1451
|
+
}).passthrough();
|
|
1452
|
+
var PageableObjectSchema = z26.object({
|
|
1453
|
+
offset: z26.number().optional(),
|
|
1454
|
+
pageNumber: z26.number().optional(),
|
|
1455
|
+
pageSize: z26.number().optional(),
|
|
1456
|
+
paged: z26.boolean().optional(),
|
|
1457
|
+
unpaged: z26.boolean().optional(),
|
|
1458
|
+
sort: SortObjectSchema.optional()
|
|
1459
|
+
}).passthrough();
|
|
1460
|
+
function pageSchema(itemSchema) {
|
|
1461
|
+
return z26.object({
|
|
1462
|
+
content: z26.array(itemSchema),
|
|
1463
|
+
empty: z26.boolean().optional(),
|
|
1464
|
+
first: z26.boolean().optional(),
|
|
1465
|
+
last: z26.boolean().optional(),
|
|
1466
|
+
number: z26.number().optional(),
|
|
1467
|
+
numberOfElements: z26.number().optional(),
|
|
1468
|
+
pageable: PageableObjectSchema.optional(),
|
|
1469
|
+
size: z26.number().optional(),
|
|
1470
|
+
sort: SortObjectSchema.optional(),
|
|
1471
|
+
totalElements: z26.number().optional(),
|
|
1472
|
+
totalPages: z26.number().optional()
|
|
1473
|
+
}).passthrough();
|
|
1474
|
+
}
|
|
1475
|
+
|
|
1476
|
+
// src/models/dlp-json-nullable.ts
|
|
1477
|
+
function jsonNullable(inner) {
|
|
1478
|
+
return inner.nullable().optional();
|
|
1479
|
+
}
|
|
1480
|
+
|
|
1481
|
+
// src/models/dlp-dictionary.ts
|
|
1482
|
+
import { z as z27 } from "zod";
|
|
1483
|
+
var DictionaryTypeSchema = z27.enum(["predefined", "custom"]);
|
|
1484
|
+
var DictionaryCategorySchema = z27.enum([
|
|
1485
|
+
"Academic",
|
|
1486
|
+
"Confidential",
|
|
1487
|
+
"Employment",
|
|
1488
|
+
"Financial",
|
|
1489
|
+
"Government",
|
|
1490
|
+
"Healthcare",
|
|
1491
|
+
"Legal",
|
|
1492
|
+
"Marketing",
|
|
1493
|
+
"Source Code"
|
|
1494
|
+
]);
|
|
1495
|
+
var DictionaryClassificationSchema = z27.enum(["pab", "endpoint"]);
|
|
1496
|
+
var DictionaryDetectionTechniqueSchema = z27.enum([
|
|
1497
|
+
"edm",
|
|
1498
|
+
"document_fingerprint",
|
|
1499
|
+
"trainable_classifier",
|
|
1500
|
+
"ml_document",
|
|
1501
|
+
"regex",
|
|
1502
|
+
"weighted_regex",
|
|
1503
|
+
"ml",
|
|
1504
|
+
"titus_tag",
|
|
1505
|
+
"wildfire",
|
|
1506
|
+
"file_property",
|
|
1507
|
+
"dictionary",
|
|
1508
|
+
"pab",
|
|
1509
|
+
"document_classifier"
|
|
1510
|
+
]);
|
|
1511
|
+
var DictionaryDetectionSubTechniqueSchema = z27.enum([
|
|
1512
|
+
"dnn",
|
|
1513
|
+
"gamma",
|
|
1514
|
+
"ml_gateway",
|
|
1515
|
+
"encoding",
|
|
1516
|
+
"password_protected",
|
|
1517
|
+
"encryption",
|
|
1518
|
+
"compression",
|
|
1519
|
+
"threshold"
|
|
1520
|
+
]);
|
|
1521
|
+
var DictionaryMetaDataDTOSchema = z27.object({
|
|
1522
|
+
number_of_keywords: z27.number().optional(),
|
|
1523
|
+
original_file_name: z27.string().optional(),
|
|
1524
|
+
original_file_size_in_byte: z27.number().optional()
|
|
1525
|
+
}).passthrough();
|
|
1526
|
+
var DictionaryTagsSchema = z27.object({
|
|
1527
|
+
classification: z27.array(DictionaryClassificationSchema).optional()
|
|
1528
|
+
}).passthrough();
|
|
1529
|
+
var ResourceModelExtensionSchema = z27.object({
|
|
1530
|
+
key: z27.string().optional(),
|
|
1531
|
+
value: z27.string().optional()
|
|
1532
|
+
}).passthrough();
|
|
1533
|
+
var DictionaryRequestSchema = z27.object({
|
|
1534
|
+
category: DictionaryCategorySchema,
|
|
1535
|
+
name: z27.string(),
|
|
1536
|
+
original_file_name: z27.string(),
|
|
1537
|
+
region_name: z27.string(),
|
|
1538
|
+
description: z27.string().optional(),
|
|
1539
|
+
is_case_sensitive: z27.boolean().optional(),
|
|
1540
|
+
type: DictionaryTypeSchema.optional()
|
|
1541
|
+
}).passthrough();
|
|
1542
|
+
var DictionaryPatchRequestSchema = z27.object({
|
|
1543
|
+
category: DictionaryCategorySchema,
|
|
1544
|
+
name: z27.string(),
|
|
1545
|
+
original_file_name: z27.string(),
|
|
1546
|
+
description: jsonNullable(z27.string()),
|
|
1547
|
+
is_case_sensitive: jsonNullable(z27.boolean()),
|
|
1548
|
+
region_name: jsonNullable(z27.string())
|
|
1549
|
+
}).passthrough();
|
|
1550
|
+
var DictionaryResponseSchema = z27.object({
|
|
1551
|
+
id: z27.string().nullish(),
|
|
1552
|
+
name: z27.string().nullish(),
|
|
1553
|
+
description: z27.string().nullish(),
|
|
1554
|
+
category: z27.string().nullish(),
|
|
1555
|
+
region_name: z27.string().nullish(),
|
|
1556
|
+
type: DictionaryTypeSchema.nullish(),
|
|
1557
|
+
is_case_sensitive: z27.boolean().nullish(),
|
|
1558
|
+
is_parent_managed: z27.boolean().nullish(),
|
|
1559
|
+
detection_technique: DictionaryDetectionTechniqueSchema.nullish(),
|
|
1560
|
+
detection_sub_technique: DictionaryDetectionSubTechniqueSchema.nullish(),
|
|
1561
|
+
dictionary_metadata: DictionaryMetaDataDTOSchema.nullish(),
|
|
1562
|
+
/** Keyword list — populated only when `keywords=true` is passed as a query parameter. */
|
|
1563
|
+
keywords: z27.array(z27.string()).nullish(),
|
|
1564
|
+
tags: DictionaryTagsSchema.nullish(),
|
|
1565
|
+
attributes: z27.array(ResourceModelExtensionSchema).nullish(),
|
|
1566
|
+
audit_metadata: AuditResponseSchema.nullish()
|
|
1567
|
+
}).passthrough();
|
|
1568
|
+
var PageDictionaryResponseSchema = pageSchema(DictionaryResponseSchema);
|
|
1569
|
+
|
|
1570
|
+
// src/models/dlp-data-pattern.ts
|
|
1571
|
+
import { z as z28 } from "zod";
|
|
1572
|
+
var DataPatternTypeSchema = z28.enum(["predefined", "custom", "file_property"]);
|
|
1573
|
+
var DataPatternTechniqueSchema = z28.enum([
|
|
1574
|
+
"edm",
|
|
1575
|
+
"document_fingerprint",
|
|
1576
|
+
"trainable_classifier",
|
|
1577
|
+
"ml_document",
|
|
1578
|
+
"regex",
|
|
1579
|
+
"weighted_regex",
|
|
1580
|
+
"ml",
|
|
1581
|
+
"titus_tag",
|
|
1582
|
+
"wildfire",
|
|
1583
|
+
"file_property",
|
|
1584
|
+
"dictionary",
|
|
1585
|
+
"pab",
|
|
1586
|
+
"document_classifier"
|
|
1587
|
+
]);
|
|
1588
|
+
var DataPatternConfidenceLevelSchema = z28.enum(["low", "medium", "high"]);
|
|
1589
|
+
var DataPatternLicenseTypeSchema = z28.enum(["standard", "enterprise", "essentials"]);
|
|
1590
|
+
var DataPatternStatusSchema = z28.enum([
|
|
1591
|
+
"active",
|
|
1592
|
+
"disabled",
|
|
1593
|
+
"deleted",
|
|
1594
|
+
"deprecated",
|
|
1595
|
+
"silent"
|
|
1596
|
+
]);
|
|
1597
|
+
var ComparisonOperatorTypeSchema = z28.enum([
|
|
1598
|
+
"less_than",
|
|
1599
|
+
"less_than_or_equal_to",
|
|
1600
|
+
"greater_than_or_equal_to",
|
|
1601
|
+
"greater_than",
|
|
1602
|
+
"equal_to"
|
|
1603
|
+
]);
|
|
1604
|
+
var WeightedRegexSchema = z28.object({
|
|
1605
|
+
regex: z28.string().min(1),
|
|
1606
|
+
weight: z28.number()
|
|
1607
|
+
}).passthrough();
|
|
1608
|
+
var MetadataCriterionSchema = z28.object({
|
|
1609
|
+
comparisonOperatorType: ComparisonOperatorTypeSchema.optional(),
|
|
1610
|
+
name: z28.string().optional(),
|
|
1611
|
+
type: z28.string().optional(),
|
|
1612
|
+
value: z28.string().optional()
|
|
1613
|
+
}).passthrough();
|
|
1614
|
+
var DataPatternDetectionConfigSchema = z28.object({
|
|
1615
|
+
technique: DataPatternTechniqueSchema,
|
|
1616
|
+
supported_confidence_levels: z28.array(DataPatternConfidenceLevelSchema).optional()
|
|
1617
|
+
}).passthrough();
|
|
1618
|
+
var DataPatternMatchingRulesSchema = z28.object({
|
|
1619
|
+
delimiter: z28.string().optional(),
|
|
1620
|
+
/** Proximity window for keyword matching — spec bounds 2..1000 inclusive. */
|
|
1621
|
+
proximity_distance: z28.number().int().min(2).max(1e3).optional(),
|
|
1622
|
+
proximity_keywords: z28.array(z28.string()).optional(),
|
|
1623
|
+
regexes: z28.array(WeightedRegexSchema).optional(),
|
|
1624
|
+
metadata_criteria: z28.array(MetadataCriterionSchema).optional()
|
|
1625
|
+
}).passthrough();
|
|
1626
|
+
var DataPatternTagsSchema = z28.object({
|
|
1627
|
+
classification: z28.array(z28.string()).optional(),
|
|
1628
|
+
compliance: z28.array(z28.string()).optional(),
|
|
1629
|
+
geography: z28.array(z28.string()).optional()
|
|
1630
|
+
}).passthrough();
|
|
1631
|
+
var DataPatternRequestSchema = z28.object({
|
|
1632
|
+
name: z28.string().min(1).max(64),
|
|
1633
|
+
type: DataPatternTypeSchema,
|
|
1634
|
+
detection_config: DataPatternDetectionConfigSchema,
|
|
1635
|
+
description: z28.string().optional(),
|
|
1636
|
+
matching_rules: DataPatternMatchingRulesSchema.optional(),
|
|
1637
|
+
tags: DataPatternTagsSchema.optional()
|
|
1638
|
+
}).passthrough();
|
|
1639
|
+
var DataPatternPatchRequestSchema = z28.object({
|
|
1640
|
+
name: z28.string().min(1).max(64),
|
|
1641
|
+
type: DataPatternTypeSchema,
|
|
1642
|
+
detection_config: DataPatternDetectionConfigSchema,
|
|
1643
|
+
description: jsonNullable(z28.string()),
|
|
1644
|
+
matching_rules: jsonNullable(DataPatternMatchingRulesSchema),
|
|
1645
|
+
tags: jsonNullable(DataPatternTagsSchema)
|
|
1646
|
+
}).passthrough();
|
|
1647
|
+
var DataPatternResponseSchema = z28.object({
|
|
1648
|
+
id: z28.string().nullish(),
|
|
1649
|
+
name: z28.string().nullish(),
|
|
1650
|
+
description: z28.string().nullish(),
|
|
1651
|
+
tenant_id: z28.string().nullish(),
|
|
1652
|
+
type: DataPatternTypeSchema.nullish(),
|
|
1653
|
+
status: DataPatternStatusSchema.nullish(),
|
|
1654
|
+
license_type: DataPatternLicenseTypeSchema.nullish(),
|
|
1655
|
+
is_parent_managed: z28.boolean().nullish(),
|
|
1656
|
+
version: z28.number().nullish(),
|
|
1657
|
+
detection_config: DataPatternDetectionConfigSchema.nullish(),
|
|
1658
|
+
matching_rules: DataPatternMatchingRulesSchema.nullish(),
|
|
1659
|
+
tags: DataPatternTagsSchema.nullish(),
|
|
1660
|
+
audit_metadata: AuditResponseSchema.nullish()
|
|
1661
|
+
}).passthrough();
|
|
1662
|
+
var PageDataPatternResponseSchema = pageSchema(DataPatternResponseSchema);
|
|
1663
|
+
|
|
1664
|
+
// src/models/dlp-data-profile.ts
|
|
1665
|
+
import { z as z29 } from "zod";
|
|
1666
|
+
var ExpressionOperatorTypeSchema = z29.enum(["and", "or", "not", "and_not", "or_not"]);
|
|
1667
|
+
var RuleItemDetectionTechniqueSchema = z29.enum([
|
|
1668
|
+
"edm",
|
|
1669
|
+
"document_fingerprint",
|
|
1670
|
+
"trainable_classifier",
|
|
1671
|
+
"ml_document",
|
|
1672
|
+
"regex",
|
|
1673
|
+
"weighted_regex",
|
|
1674
|
+
"ml",
|
|
1675
|
+
"titus_tag",
|
|
1676
|
+
"wildfire",
|
|
1677
|
+
"file_property",
|
|
1678
|
+
"dictionary",
|
|
1679
|
+
"pab",
|
|
1680
|
+
"document_classifier"
|
|
1681
|
+
]);
|
|
1682
|
+
var RuleItemMatchTypeSchema = z29.enum(["include", "exclude"]);
|
|
1683
|
+
var RuleItemOccurrenceOperatorTypeSchema = z29.enum([
|
|
1684
|
+
"any",
|
|
1685
|
+
"less_than_equal_to",
|
|
1686
|
+
"more_than_equal_to",
|
|
1687
|
+
"between"
|
|
1688
|
+
]);
|
|
1689
|
+
var RuleItemConfidenceLevelSchema = z29.enum(["low", "medium", "high"]);
|
|
1690
|
+
var RuleItemEdmMatchCriteriaSchema = z29.enum(["any", "all"]);
|
|
1691
|
+
var DataProfileTypeSchema = z29.enum(["basic", "advanced"]);
|
|
1692
|
+
var DataProfileStatusSchema = z29.enum(["active", "disabled", "deleted"]);
|
|
1693
|
+
var DataProfileSubtypeSchema = z29.enum(["custom", "predefined"]);
|
|
1694
|
+
var DetectionRuleItemSchema = z29.object({
|
|
1695
|
+
detection_technique: RuleItemDetectionTechniqueSchema,
|
|
1696
|
+
id: z29.string().optional(),
|
|
1697
|
+
name: z29.string().optional(),
|
|
1698
|
+
description: z29.string().optional(),
|
|
1699
|
+
version: z29.number().int().optional(),
|
|
1700
|
+
match_type: RuleItemMatchTypeSchema.optional(),
|
|
1701
|
+
by_unique_count: z29.boolean().optional(),
|
|
1702
|
+
confidence_level: RuleItemConfidenceLevelSchema.optional(),
|
|
1703
|
+
supported_confidence_levels: z29.array(RuleItemConfidenceLevelSchema).optional(),
|
|
1704
|
+
occurrence_count: z29.number().int().optional(),
|
|
1705
|
+
occurrence_high: z29.number().int().optional(),
|
|
1706
|
+
occurrence_low: z29.number().int().optional(),
|
|
1707
|
+
occurrence_operator_type: RuleItemOccurrenceOperatorTypeSchema.optional(),
|
|
1708
|
+
// dictionary + document-type fields
|
|
1709
|
+
score: z29.number().int().optional(),
|
|
1710
|
+
score_high: z29.number().int().optional(),
|
|
1711
|
+
score_low: z29.number().int().optional(),
|
|
1712
|
+
// edm fields
|
|
1713
|
+
edm_dataset_id: z29.string().optional(),
|
|
1714
|
+
primary_fields: z29.array(z29.string()).optional(),
|
|
1715
|
+
primary_match_criteria: RuleItemEdmMatchCriteriaSchema.optional(),
|
|
1716
|
+
primary_match_any_count: z29.number().int().optional(),
|
|
1717
|
+
secondary_fields: z29.array(z29.string()).optional(),
|
|
1718
|
+
secondary_match_criteria: RuleItemEdmMatchCriteriaSchema.optional(),
|
|
1719
|
+
secondary_match_any_count: z29.number().int().optional()
|
|
1720
|
+
}).passthrough();
|
|
1721
|
+
var ExpressionTreeNodeSchema = z29.lazy(
|
|
1722
|
+
() => z29.object({
|
|
1723
|
+
operator_type: ExpressionOperatorTypeSchema.optional(),
|
|
1724
|
+
rule_item: DetectionRuleItemSchema.optional(),
|
|
1725
|
+
sub_expressions: z29.array(ExpressionTreeNodeSchema).optional()
|
|
1726
|
+
}).passthrough()
|
|
1727
|
+
);
|
|
1728
|
+
var MultiProfileDataNodeSchema = z29.object({
|
|
1729
|
+
data_profile_ids: z29.array(z29.number()).optional(),
|
|
1730
|
+
operator_type: ExpressionOperatorTypeSchema.optional()
|
|
1731
|
+
}).passthrough();
|
|
1732
|
+
var DefaultTreeDetectionRuleSchema = z29.object({
|
|
1733
|
+
rule_type: z29.literal("expression_tree"),
|
|
1734
|
+
expression_tree: ExpressionTreeNodeSchema.optional()
|
|
1735
|
+
}).passthrough();
|
|
1736
|
+
var MultiProfileDetectionRuleSchema = z29.object({
|
|
1737
|
+
rule_type: z29.literal("multi_profile"),
|
|
1738
|
+
multi_profile: MultiProfileDataNodeSchema.optional()
|
|
1739
|
+
}).passthrough();
|
|
1740
|
+
var DetectionRuleSchema = z29.discriminatedUnion("rule_type", [
|
|
1741
|
+
DefaultTreeDetectionRuleSchema,
|
|
1742
|
+
MultiProfileDetectionRuleSchema
|
|
1743
|
+
]);
|
|
1744
|
+
var AdvancedDataProfileRequestSchema = z29.object({
|
|
1745
|
+
name: z29.string().min(1).max(64),
|
|
1746
|
+
detection_rules: z29.array(DetectionRuleSchema),
|
|
1747
|
+
description: z29.string().optional(),
|
|
1748
|
+
is_granular_data_profile: z29.boolean().optional()
|
|
1749
|
+
}).passthrough();
|
|
1750
|
+
var DataProfilePatchRequestSchema = z29.object({
|
|
1751
|
+
name: z29.string(),
|
|
1752
|
+
profile_type: DataProfileTypeSchema,
|
|
1753
|
+
description: jsonNullable(z29.string()),
|
|
1754
|
+
detection_rules: jsonNullable(z29.array(DetectionRuleSchema))
|
|
1755
|
+
}).passthrough();
|
|
1756
|
+
var DataProfileResponseSchema = z29.object({
|
|
1757
|
+
id: z29.string().nullish(),
|
|
1758
|
+
name: z29.string().nullish(),
|
|
1759
|
+
description: z29.string().nullish(),
|
|
1760
|
+
tenant_id: z29.string().nullish(),
|
|
1761
|
+
type: DataProfileSubtypeSchema.nullish(),
|
|
1762
|
+
profile_status: DataProfileStatusSchema.nullish(),
|
|
1763
|
+
profile_type: DataProfileTypeSchema.nullish(),
|
|
1764
|
+
is_granular_data_profile: z29.boolean().nullish(),
|
|
1765
|
+
is_parent_managed: z29.boolean().nullish(),
|
|
1766
|
+
version: z29.number().int().nullish(),
|
|
1767
|
+
advance_data_patterns_rule_request: z29.array(z29.string()).nullish(),
|
|
1768
|
+
detection_rules: z29.array(DetectionRuleSchema).nullish(),
|
|
1769
|
+
audit_metadata: AuditResponseSchema.nullish()
|
|
1770
|
+
}).passthrough();
|
|
1771
|
+
var PageDataProfileResponseSchema = pageSchema(DataProfileResponseSchema);
|
|
1772
|
+
|
|
1773
|
+
// src/models/dlp-data-filtering-profile.ts
|
|
1774
|
+
import { z as z30 } from "zod";
|
|
1775
|
+
var AppExclusionSchema = z30.object({
|
|
1776
|
+
app_id: z30.string().optional(),
|
|
1777
|
+
app_name: z30.string().optional(),
|
|
1778
|
+
type: z30.string().optional()
|
|
1779
|
+
}).passthrough();
|
|
1780
|
+
var URLExclusionSchema = z30.object({
|
|
1781
|
+
type: z30.string().optional(),
|
|
1782
|
+
url_id: z30.string().optional(),
|
|
1783
|
+
url_name: z30.string().optional()
|
|
1784
|
+
}).passthrough();
|
|
1785
|
+
var ExclusionsSchema = z30.object({
|
|
1786
|
+
app_exclusion_list: z30.array(AppExclusionSchema).optional(),
|
|
1787
|
+
url_exclusion_list: z30.array(URLExclusionSchema).optional(),
|
|
1788
|
+
/**
|
|
1789
|
+
* Map of category-name → string-array. `additionalProperties: { type: array of string }`
|
|
1790
|
+
* in the OpenAPI spec; modeled here as `z.record(z.array(z.string()))`.
|
|
1791
|
+
*/
|
|
1792
|
+
exclusion_list: z30.record(z30.array(z30.string())).optional()
|
|
1793
|
+
}).passthrough();
|
|
1794
|
+
var SourceAttributesSchema = z30.object({
|
|
1795
|
+
match_any: z30.boolean().optional(),
|
|
1796
|
+
user_group_ids: z30.array(z30.string()).optional(),
|
|
1797
|
+
user_ids: z30.array(z30.string()).optional()
|
|
1798
|
+
}).passthrough();
|
|
1799
|
+
var DestinationAttributesSchema = z30.object({
|
|
1800
|
+
match_any: z30.boolean().optional(),
|
|
1801
|
+
app_ids: z30.array(z30.string()).optional(),
|
|
1802
|
+
url_patterns: z30.array(z30.string()).optional()
|
|
1803
|
+
}).passthrough();
|
|
1804
|
+
var ExceptionRuleDTOSchema = z30.object({
|
|
1805
|
+
id: z30.string().optional(),
|
|
1806
|
+
action: z30.enum(["ALLOW", "ALERT", "BLOCK"]).optional(),
|
|
1807
|
+
log_severity: z30.enum(["INFORMATIONAL", "LOW", "MEDIUM", "HIGH", "CRITICAL"]).optional(),
|
|
1808
|
+
/**
|
|
1809
|
+
* `int64` per spec; declared as `z.number()` since JS numbers cover any realistic
|
|
1810
|
+
* data_profile_id and the SDK never round-trips these unmodified.
|
|
1811
|
+
*/
|
|
1812
|
+
data_profile_ids: z30.array(z30.number()).optional(),
|
|
1813
|
+
destination_attributes: DestinationAttributesSchema.optional(),
|
|
1814
|
+
source_attributes: SourceAttributesSchema.optional()
|
|
1815
|
+
}).passthrough();
|
|
1816
|
+
var DataFilteringRuleDTOSchema = z30.object({
|
|
1817
|
+
action: z30.string().optional(),
|
|
1818
|
+
response_page: z30.string().optional(),
|
|
1819
|
+
show_rsp_page: z30.string().optional()
|
|
1820
|
+
}).passthrough();
|
|
1821
|
+
var DataFilteringDetailsSchema = z30.object({
|
|
1822
|
+
action: z30.string().optional(),
|
|
1823
|
+
dataProfileId: z30.number().optional(),
|
|
1824
|
+
direction: z30.string().optional(),
|
|
1825
|
+
euc_template_id: z30.string().optional(),
|
|
1826
|
+
fileBased: z30.string().optional(),
|
|
1827
|
+
fileTypes: z30.array(z30.string()).optional(),
|
|
1828
|
+
is_end_user_coaching_enabled: z30.boolean().optional(),
|
|
1829
|
+
logSeverity: z30.string().optional(),
|
|
1830
|
+
nonFileBased: z30.string().optional(),
|
|
1831
|
+
scanType: z30.string().optional()
|
|
1832
|
+
}).passthrough();
|
|
1833
|
+
var DataFilteringProfileRequestSchema = z30.object({
|
|
1834
|
+
file_based: z30.boolean(),
|
|
1835
|
+
non_file_based: z30.boolean(),
|
|
1836
|
+
description: z30.string().optional(),
|
|
1837
|
+
direction: z30.enum(["BOTH", "UPLOAD", "DOWNLOAD"]).optional(),
|
|
1838
|
+
log_severity: z30.enum(["CRITICAL", "HIGH", "MEDIUM", "LOW", "INFORMATIONAL"]).optional(),
|
|
1839
|
+
scan_type: z30.enum(["include", "exclude"]).optional(),
|
|
1840
|
+
/**
|
|
1841
|
+
* `int64` per spec; declared as `z.number()`. JS will lose precision above 2^53 but
|
|
1842
|
+
* real-world IDs stay well under that ceiling.
|
|
1843
|
+
*/
|
|
1844
|
+
data_profile_id: z30.number().optional(),
|
|
1845
|
+
euc_template_id: z30.string().optional(),
|
|
1846
|
+
is_end_user_coaching_enabled: z30.boolean().optional(),
|
|
1847
|
+
is_granular_profile: z30.boolean().optional(),
|
|
1848
|
+
file_type: z30.array(z30.string()).optional(),
|
|
1849
|
+
criteria_details: z30.array(DataFilteringDetailsSchema).optional(),
|
|
1850
|
+
exception_rules: z30.array(ExceptionRuleDTOSchema).optional(),
|
|
1851
|
+
exclusions: ExclusionsSchema.optional(),
|
|
1852
|
+
rule1: DataFilteringRuleDTOSchema.optional(),
|
|
1853
|
+
rule2: DataFilteringRuleDTOSchema.optional()
|
|
1854
|
+
}).passthrough();
|
|
1855
|
+
var DataFilteringProfileResponseSchema = z30.object({
|
|
1856
|
+
id: z30.string().nullish(),
|
|
1857
|
+
name: z30.string().nullish(),
|
|
1858
|
+
description: z30.string().nullish(),
|
|
1859
|
+
tenant_id: z30.string().nullish(),
|
|
1860
|
+
type: z30.string().nullish(),
|
|
1861
|
+
data_profile_id: z30.number().nullish(),
|
|
1862
|
+
direction: z30.string().nullish(),
|
|
1863
|
+
file_based: z30.boolean().nullish(),
|
|
1864
|
+
non_file_based: z30.boolean().nullish(),
|
|
1865
|
+
log_severity: z30.string().nullish(),
|
|
1866
|
+
scan_type: z30.enum(["include", "exclude"]).nullish(),
|
|
1867
|
+
is_end_user_coaching_enabled: z30.boolean().nullish(),
|
|
1868
|
+
is_granular_profile: z30.boolean().nullish(),
|
|
1869
|
+
is_parent_managed: z30.boolean().nullish(),
|
|
1870
|
+
euc_template_id: z30.string().nullish(),
|
|
1871
|
+
version: z30.number().nullish(),
|
|
1872
|
+
file_type: z30.array(z30.string()).nullish(),
|
|
1873
|
+
audit_metadata: AuditResponseSchema.nullish(),
|
|
1874
|
+
criteria_details: z30.array(DataFilteringDetailsSchema).nullish(),
|
|
1875
|
+
exception_rules: z30.array(ExceptionRuleDTOSchema).nullish(),
|
|
1876
|
+
exclusions: ExclusionsSchema.nullish(),
|
|
1877
|
+
rule1: DataFilteringRuleDTOSchema.nullish(),
|
|
1878
|
+
rule2: DataFilteringRuleDTOSchema.nullish()
|
|
1879
|
+
}).passthrough();
|
|
1880
|
+
var PageDataFilteringProfileResponseSchema = pageSchema(
|
|
1881
|
+
DataFilteringProfileResponseSchema
|
|
1882
|
+
);
|
|
1883
|
+
|
|
1424
1884
|
// src/models/model-security-enums.ts
|
|
1425
1885
|
var ErrorCodes = {
|
|
1426
1886
|
UNKNOWN_ERROR: "UNKNOWN_ERROR",
|
|
@@ -1551,240 +2011,240 @@ var RuleFieldValueKey = {
|
|
|
1551
2011
|
};
|
|
1552
2012
|
|
|
1553
2013
|
// src/models/model-security.ts
|
|
1554
|
-
import { z as
|
|
1555
|
-
var ModelSecurityPaginationSchema =
|
|
1556
|
-
total_items:
|
|
2014
|
+
import { z as z31 } from "zod";
|
|
2015
|
+
var ModelSecurityPaginationSchema = z31.object({
|
|
2016
|
+
total_items: z31.number().int().nullable().optional()
|
|
1557
2017
|
}).passthrough();
|
|
1558
|
-
var LabelSchema =
|
|
1559
|
-
key:
|
|
1560
|
-
value:
|
|
2018
|
+
var LabelSchema = z31.object({
|
|
2019
|
+
key: z31.string(),
|
|
2020
|
+
value: z31.string()
|
|
1561
2021
|
}).passthrough();
|
|
1562
|
-
var LabelsCreateRequestSchema =
|
|
1563
|
-
labels:
|
|
2022
|
+
var LabelsCreateRequestSchema = z31.object({
|
|
2023
|
+
labels: z31.array(LabelSchema)
|
|
1564
2024
|
}).passthrough();
|
|
1565
|
-
var LabelsResponseSchema =
|
|
1566
|
-
var LabelKeyListSchema =
|
|
2025
|
+
var LabelsResponseSchema = z31.object({}).passthrough();
|
|
2026
|
+
var LabelKeyListSchema = z31.object({
|
|
1567
2027
|
pagination: ModelSecurityPaginationSchema,
|
|
1568
|
-
keys:
|
|
2028
|
+
keys: z31.array(z31.string())
|
|
1569
2029
|
}).passthrough();
|
|
1570
|
-
var LabelValueListSchema =
|
|
2030
|
+
var LabelValueListSchema = z31.object({
|
|
1571
2031
|
pagination: ModelSecurityPaginationSchema,
|
|
1572
|
-
values:
|
|
1573
|
-
}).passthrough();
|
|
1574
|
-
var EvalSummarySchema =
|
|
1575
|
-
rules_failed:
|
|
1576
|
-
rules_passed:
|
|
1577
|
-
total_rules:
|
|
1578
|
-
}).passthrough();
|
|
1579
|
-
var ModelScanIssueSchema =
|
|
1580
|
-
description:
|
|
1581
|
-
source:
|
|
1582
|
-
threat:
|
|
1583
|
-
module:
|
|
1584
|
-
operator:
|
|
1585
|
-
}).passthrough();
|
|
1586
|
-
var FileScanDataSchema =
|
|
1587
|
-
file_path:
|
|
1588
|
-
modelscan_status:
|
|
1589
|
-
blob_id:
|
|
1590
|
-
error_message:
|
|
1591
|
-
formats:
|
|
1592
|
-
issues_detected:
|
|
1593
|
-
}).passthrough();
|
|
1594
|
-
var ScanDetailsSchema =
|
|
1595
|
-
scanner_version:
|
|
1596
|
-
time_started:
|
|
1597
|
-
files:
|
|
1598
|
-
total_files_scanned:
|
|
1599
|
-
total_files_skipped:
|
|
1600
|
-
model_formats:
|
|
1601
|
-
model_size_bytes:
|
|
1602
|
-
scan_duration_ms:
|
|
1603
|
-
error_code:
|
|
1604
|
-
error_message:
|
|
1605
|
-
}).passthrough();
|
|
1606
|
-
var ScanCreateRequestSchema =
|
|
1607
|
-
model_uri:
|
|
1608
|
-
security_group_uuid:
|
|
1609
|
-
scan_origin:
|
|
1610
|
-
allow_patterns:
|
|
1611
|
-
ignore_patterns:
|
|
1612
|
-
labels:
|
|
1613
|
-
model_author:
|
|
1614
|
-
model_name:
|
|
1615
|
-
model_version:
|
|
2032
|
+
values: z31.array(z31.string())
|
|
2033
|
+
}).passthrough();
|
|
2034
|
+
var EvalSummarySchema = z31.object({
|
|
2035
|
+
rules_failed: z31.number().int().optional().default(0),
|
|
2036
|
+
rules_passed: z31.number().int().optional().default(0),
|
|
2037
|
+
total_rules: z31.number().int().optional().default(0)
|
|
2038
|
+
}).passthrough();
|
|
2039
|
+
var ModelScanIssueSchema = z31.object({
|
|
2040
|
+
description: z31.string(),
|
|
2041
|
+
source: z31.string(),
|
|
2042
|
+
threat: z31.string().nullable().optional(),
|
|
2043
|
+
module: z31.string().nullable().optional(),
|
|
2044
|
+
operator: z31.string().nullable().optional()
|
|
2045
|
+
}).passthrough();
|
|
2046
|
+
var FileScanDataSchema = z31.object({
|
|
2047
|
+
file_path: z31.string(),
|
|
2048
|
+
modelscan_status: z31.string(),
|
|
2049
|
+
blob_id: z31.string(),
|
|
2050
|
+
error_message: z31.string().nullable().optional(),
|
|
2051
|
+
formats: z31.array(z31.string()).nullable().optional(),
|
|
2052
|
+
issues_detected: z31.array(ModelScanIssueSchema).nullable().optional()
|
|
2053
|
+
}).passthrough();
|
|
2054
|
+
var ScanDetailsSchema = z31.object({
|
|
2055
|
+
scanner_version: z31.string(),
|
|
2056
|
+
time_started: z31.string(),
|
|
2057
|
+
files: z31.array(FileScanDataSchema),
|
|
2058
|
+
total_files_scanned: z31.number().int(),
|
|
2059
|
+
total_files_skipped: z31.number().int(),
|
|
2060
|
+
model_formats: z31.array(z31.string()),
|
|
2061
|
+
model_size_bytes: z31.number().int(),
|
|
2062
|
+
scan_duration_ms: z31.number().int(),
|
|
2063
|
+
error_code: z31.string().nullable().optional(),
|
|
2064
|
+
error_message: z31.string().nullable().optional()
|
|
2065
|
+
}).passthrough();
|
|
2066
|
+
var ScanCreateRequestSchema = z31.object({
|
|
2067
|
+
model_uri: z31.string(),
|
|
2068
|
+
security_group_uuid: z31.string(),
|
|
2069
|
+
scan_origin: z31.string(),
|
|
2070
|
+
allow_patterns: z31.array(z31.string()).nullable().optional(),
|
|
2071
|
+
ignore_patterns: z31.array(z31.string()).nullable().optional(),
|
|
2072
|
+
labels: z31.array(LabelSchema).nullable().optional(),
|
|
2073
|
+
model_author: z31.string().nullable().optional(),
|
|
2074
|
+
model_name: z31.string().nullable().optional(),
|
|
2075
|
+
model_version: z31.string().nullable().optional(),
|
|
1616
2076
|
scan_details: ScanDetailsSchema.nullable().optional()
|
|
1617
2077
|
}).passthrough();
|
|
1618
|
-
var ScanBaseResponseSchema =
|
|
1619
|
-
uuid:
|
|
1620
|
-
tsg_id:
|
|
1621
|
-
created_at:
|
|
1622
|
-
updated_at:
|
|
1623
|
-
model_uri:
|
|
1624
|
-
owner:
|
|
1625
|
-
scan_origin:
|
|
1626
|
-
security_group_uuid:
|
|
1627
|
-
security_group_name:
|
|
1628
|
-
model_version_uuid:
|
|
1629
|
-
eval_outcome:
|
|
1630
|
-
source_type:
|
|
1631
|
-
created_by:
|
|
1632
|
-
enabled_rule_count_snapshot:
|
|
1633
|
-
error_code:
|
|
1634
|
-
error_message:
|
|
2078
|
+
var ScanBaseResponseSchema = z31.object({
|
|
2079
|
+
uuid: z31.string(),
|
|
2080
|
+
tsg_id: z31.string(),
|
|
2081
|
+
created_at: z31.string(),
|
|
2082
|
+
updated_at: z31.string(),
|
|
2083
|
+
model_uri: z31.string(),
|
|
2084
|
+
owner: z31.string(),
|
|
2085
|
+
scan_origin: z31.string(),
|
|
2086
|
+
security_group_uuid: z31.string(),
|
|
2087
|
+
security_group_name: z31.string(),
|
|
2088
|
+
model_version_uuid: z31.string(),
|
|
2089
|
+
eval_outcome: z31.string(),
|
|
2090
|
+
source_type: z31.string(),
|
|
2091
|
+
created_by: z31.string().nullable().optional(),
|
|
2092
|
+
enabled_rule_count_snapshot: z31.number().int().nullable().optional(),
|
|
2093
|
+
error_code: z31.string().nullable().optional(),
|
|
2094
|
+
error_message: z31.string().nullable().optional(),
|
|
1635
2095
|
eval_summary: EvalSummarySchema.nullable().optional(),
|
|
1636
|
-
labels:
|
|
1637
|
-
model_formats:
|
|
1638
|
-
scanner_version:
|
|
1639
|
-
time_started:
|
|
1640
|
-
total_files_scanned:
|
|
1641
|
-
total_files_skipped:
|
|
1642
|
-
}).passthrough();
|
|
1643
|
-
var ScanListSchema =
|
|
2096
|
+
labels: z31.array(LabelSchema).optional(),
|
|
2097
|
+
model_formats: z31.array(z31.string()).nullable().optional(),
|
|
2098
|
+
scanner_version: z31.string().nullable().optional(),
|
|
2099
|
+
time_started: z31.string().nullable().optional(),
|
|
2100
|
+
total_files_scanned: z31.number().int().nullable().optional(),
|
|
2101
|
+
total_files_skipped: z31.number().int().nullable().optional()
|
|
2102
|
+
}).passthrough();
|
|
2103
|
+
var ScanListSchema = z31.object({
|
|
1644
2104
|
pagination: ModelSecurityPaginationSchema,
|
|
1645
|
-
scans:
|
|
1646
|
-
}).passthrough();
|
|
1647
|
-
var FileResponseSchema =
|
|
1648
|
-
uuid:
|
|
1649
|
-
tsg_id:
|
|
1650
|
-
created_at:
|
|
1651
|
-
updated_at:
|
|
1652
|
-
path:
|
|
1653
|
-
parent_path:
|
|
1654
|
-
type:
|
|
1655
|
-
result:
|
|
1656
|
-
model_version_uuid:
|
|
1657
|
-
blob_id:
|
|
1658
|
-
formats:
|
|
1659
|
-
scan_uuid:
|
|
1660
|
-
}).passthrough();
|
|
1661
|
-
var FileListSchema =
|
|
2105
|
+
scans: z31.array(ScanBaseResponseSchema)
|
|
2106
|
+
}).passthrough();
|
|
2107
|
+
var FileResponseSchema = z31.object({
|
|
2108
|
+
uuid: z31.string(),
|
|
2109
|
+
tsg_id: z31.string(),
|
|
2110
|
+
created_at: z31.string(),
|
|
2111
|
+
updated_at: z31.string(),
|
|
2112
|
+
path: z31.string(),
|
|
2113
|
+
parent_path: z31.string(),
|
|
2114
|
+
type: z31.string(),
|
|
2115
|
+
result: z31.string(),
|
|
2116
|
+
model_version_uuid: z31.string(),
|
|
2117
|
+
blob_id: z31.string().nullable().optional(),
|
|
2118
|
+
formats: z31.array(z31.string()).nullable().optional(),
|
|
2119
|
+
scan_uuid: z31.string().nullable().optional()
|
|
2120
|
+
}).passthrough();
|
|
2121
|
+
var FileListSchema = z31.object({
|
|
1662
2122
|
pagination: ModelSecurityPaginationSchema,
|
|
1663
|
-
files:
|
|
1664
|
-
}).passthrough();
|
|
1665
|
-
var RuleEvaluationResponseSchema =
|
|
1666
|
-
uuid:
|
|
1667
|
-
tsg_id:
|
|
1668
|
-
created_at:
|
|
1669
|
-
updated_at:
|
|
1670
|
-
result:
|
|
1671
|
-
violation_count:
|
|
1672
|
-
rule_instance_uuid:
|
|
1673
|
-
scan_uuid:
|
|
1674
|
-
rule_name:
|
|
1675
|
-
rule_description:
|
|
1676
|
-
rule_instance_state:
|
|
1677
|
-
}).passthrough();
|
|
1678
|
-
var RuleEvaluationListSchema =
|
|
2123
|
+
files: z31.array(FileResponseSchema)
|
|
2124
|
+
}).passthrough();
|
|
2125
|
+
var RuleEvaluationResponseSchema = z31.object({
|
|
2126
|
+
uuid: z31.string(),
|
|
2127
|
+
tsg_id: z31.string(),
|
|
2128
|
+
created_at: z31.string(),
|
|
2129
|
+
updated_at: z31.string(),
|
|
2130
|
+
result: z31.string(),
|
|
2131
|
+
violation_count: z31.number().int(),
|
|
2132
|
+
rule_instance_uuid: z31.string(),
|
|
2133
|
+
scan_uuid: z31.string(),
|
|
2134
|
+
rule_name: z31.string(),
|
|
2135
|
+
rule_description: z31.string(),
|
|
2136
|
+
rule_instance_state: z31.string()
|
|
2137
|
+
}).passthrough();
|
|
2138
|
+
var RuleEvaluationListSchema = z31.object({
|
|
1679
2139
|
pagination: ModelSecurityPaginationSchema,
|
|
1680
|
-
evaluations:
|
|
1681
|
-
}).passthrough();
|
|
1682
|
-
var ViolationResponseSchema =
|
|
1683
|
-
uuid:
|
|
1684
|
-
tsg_id:
|
|
1685
|
-
created_at:
|
|
1686
|
-
updated_at:
|
|
1687
|
-
description:
|
|
1688
|
-
rule_instance_uuid:
|
|
1689
|
-
rule_name:
|
|
1690
|
-
rule_description:
|
|
1691
|
-
rule_instance_state:
|
|
1692
|
-
file:
|
|
1693
|
-
hash:
|
|
1694
|
-
module:
|
|
1695
|
-
operator:
|
|
1696
|
-
threat:
|
|
1697
|
-
threat_description:
|
|
1698
|
-
}).passthrough();
|
|
1699
|
-
var ViolationListSchema =
|
|
2140
|
+
evaluations: z31.array(RuleEvaluationResponseSchema)
|
|
2141
|
+
}).passthrough();
|
|
2142
|
+
var ViolationResponseSchema = z31.object({
|
|
2143
|
+
uuid: z31.string(),
|
|
2144
|
+
tsg_id: z31.string(),
|
|
2145
|
+
created_at: z31.string(),
|
|
2146
|
+
updated_at: z31.string(),
|
|
2147
|
+
description: z31.string(),
|
|
2148
|
+
rule_instance_uuid: z31.string(),
|
|
2149
|
+
rule_name: z31.string(),
|
|
2150
|
+
rule_description: z31.string(),
|
|
2151
|
+
rule_instance_state: z31.string(),
|
|
2152
|
+
file: z31.string().nullable().optional(),
|
|
2153
|
+
hash: z31.string().nullable().optional(),
|
|
2154
|
+
module: z31.string().nullable().optional(),
|
|
2155
|
+
operator: z31.string().nullable().optional(),
|
|
2156
|
+
threat: z31.string().nullable().optional(),
|
|
2157
|
+
threat_description: z31.string().nullable().optional()
|
|
2158
|
+
}).passthrough();
|
|
2159
|
+
var ViolationListSchema = z31.object({
|
|
1700
2160
|
pagination: ModelSecurityPaginationSchema,
|
|
1701
|
-
violations:
|
|
1702
|
-
}).passthrough();
|
|
1703
|
-
var RuleEditableFieldDropdownSchema =
|
|
1704
|
-
value:
|
|
1705
|
-
label:
|
|
1706
|
-
}).passthrough();
|
|
1707
|
-
var RuleEditableFieldSchema =
|
|
1708
|
-
attribute_name:
|
|
1709
|
-
type:
|
|
1710
|
-
display_name:
|
|
1711
|
-
display_type:
|
|
1712
|
-
description:
|
|
1713
|
-
dropdown_values:
|
|
1714
|
-
}).passthrough();
|
|
1715
|
-
var RuleRemediationSchema =
|
|
1716
|
-
description:
|
|
1717
|
-
steps:
|
|
1718
|
-
url:
|
|
1719
|
-
}).passthrough();
|
|
1720
|
-
var RuleConfigurationSchema =
|
|
1721
|
-
field_values:
|
|
1722
|
-
state:
|
|
1723
|
-
}).passthrough();
|
|
1724
|
-
var ModelSecurityRuleResponseSchema =
|
|
1725
|
-
uuid:
|
|
1726
|
-
name:
|
|
1727
|
-
description:
|
|
1728
|
-
rule_type:
|
|
1729
|
-
compatible_sources:
|
|
1730
|
-
default_state:
|
|
2161
|
+
violations: z31.array(ViolationResponseSchema)
|
|
2162
|
+
}).passthrough();
|
|
2163
|
+
var RuleEditableFieldDropdownSchema = z31.object({
|
|
2164
|
+
value: z31.string(),
|
|
2165
|
+
label: z31.string()
|
|
2166
|
+
}).passthrough();
|
|
2167
|
+
var RuleEditableFieldSchema = z31.object({
|
|
2168
|
+
attribute_name: z31.string(),
|
|
2169
|
+
type: z31.string(),
|
|
2170
|
+
display_name: z31.string(),
|
|
2171
|
+
display_type: z31.string(),
|
|
2172
|
+
description: z31.string().nullable().optional(),
|
|
2173
|
+
dropdown_values: z31.array(RuleEditableFieldDropdownSchema).nullable().optional()
|
|
2174
|
+
}).passthrough();
|
|
2175
|
+
var RuleRemediationSchema = z31.object({
|
|
2176
|
+
description: z31.string(),
|
|
2177
|
+
steps: z31.array(z31.string()),
|
|
2178
|
+
url: z31.string()
|
|
2179
|
+
}).passthrough();
|
|
2180
|
+
var RuleConfigurationSchema = z31.object({
|
|
2181
|
+
field_values: z31.record(z31.unknown()).optional(),
|
|
2182
|
+
state: z31.string().nullable().optional()
|
|
2183
|
+
}).passthrough();
|
|
2184
|
+
var ModelSecurityRuleResponseSchema = z31.object({
|
|
2185
|
+
uuid: z31.string(),
|
|
2186
|
+
name: z31.string(),
|
|
2187
|
+
description: z31.string(),
|
|
2188
|
+
rule_type: z31.string(),
|
|
2189
|
+
compatible_sources: z31.array(z31.string()),
|
|
2190
|
+
default_state: z31.string(),
|
|
1731
2191
|
remediation: RuleRemediationSchema,
|
|
1732
|
-
editable_fields:
|
|
1733
|
-
constant_values:
|
|
1734
|
-
default_values:
|
|
2192
|
+
editable_fields: z31.array(RuleEditableFieldSchema),
|
|
2193
|
+
constant_values: z31.record(z31.unknown()),
|
|
2194
|
+
default_values: z31.record(z31.unknown())
|
|
1735
2195
|
}).passthrough();
|
|
1736
|
-
var ListModelSecurityRulesResponseSchema =
|
|
2196
|
+
var ListModelSecurityRulesResponseSchema = z31.object({
|
|
1737
2197
|
pagination: ModelSecurityPaginationSchema,
|
|
1738
|
-
rules:
|
|
1739
|
-
}).passthrough();
|
|
1740
|
-
var ModelSecurityRuleInstanceResponseSchema =
|
|
1741
|
-
uuid:
|
|
1742
|
-
tsg_id:
|
|
1743
|
-
created_at:
|
|
1744
|
-
updated_at:
|
|
1745
|
-
security_group_uuid:
|
|
1746
|
-
security_rule_uuid:
|
|
1747
|
-
state:
|
|
2198
|
+
rules: z31.array(ModelSecurityRuleResponseSchema)
|
|
2199
|
+
}).passthrough();
|
|
2200
|
+
var ModelSecurityRuleInstanceResponseSchema = z31.object({
|
|
2201
|
+
uuid: z31.string(),
|
|
2202
|
+
tsg_id: z31.string(),
|
|
2203
|
+
created_at: z31.string(),
|
|
2204
|
+
updated_at: z31.string(),
|
|
2205
|
+
security_group_uuid: z31.string(),
|
|
2206
|
+
security_rule_uuid: z31.string(),
|
|
2207
|
+
state: z31.string(),
|
|
1748
2208
|
rule: ModelSecurityRuleResponseSchema,
|
|
1749
|
-
field_values:
|
|
2209
|
+
field_values: z31.record(z31.unknown()).optional()
|
|
1750
2210
|
}).passthrough();
|
|
1751
|
-
var ModelSecurityRuleInstanceUpdateRequestSchema =
|
|
1752
|
-
security_group_uuid:
|
|
1753
|
-
state:
|
|
1754
|
-
field_values:
|
|
2211
|
+
var ModelSecurityRuleInstanceUpdateRequestSchema = z31.object({
|
|
2212
|
+
security_group_uuid: z31.string(),
|
|
2213
|
+
state: z31.string().nullable().optional(),
|
|
2214
|
+
field_values: z31.record(z31.unknown()).nullable().optional()
|
|
1755
2215
|
}).passthrough();
|
|
1756
|
-
var ListModelSecurityRuleInstancesResponseSchema =
|
|
2216
|
+
var ListModelSecurityRuleInstancesResponseSchema = z31.object({
|
|
1757
2217
|
pagination: ModelSecurityPaginationSchema,
|
|
1758
|
-
rule_instances:
|
|
1759
|
-
}).passthrough();
|
|
1760
|
-
var ModelSecurityGroupCreateRequestSchema =
|
|
1761
|
-
name:
|
|
1762
|
-
source_type:
|
|
1763
|
-
description:
|
|
1764
|
-
rule_configurations:
|
|
1765
|
-
}).passthrough();
|
|
1766
|
-
var ModelSecurityGroupResponseSchema =
|
|
1767
|
-
uuid:
|
|
1768
|
-
tsg_id:
|
|
1769
|
-
created_at:
|
|
1770
|
-
updated_at:
|
|
1771
|
-
name:
|
|
1772
|
-
description:
|
|
1773
|
-
source_type:
|
|
1774
|
-
state:
|
|
1775
|
-
is_tombstone:
|
|
1776
|
-
}).passthrough();
|
|
1777
|
-
var ModelSecurityGroupUpdateRequestSchema =
|
|
1778
|
-
name:
|
|
1779
|
-
description:
|
|
1780
|
-
}).passthrough();
|
|
1781
|
-
var ListModelSecurityGroupsResponseSchema =
|
|
2218
|
+
rule_instances: z31.array(ModelSecurityRuleInstanceResponseSchema)
|
|
2219
|
+
}).passthrough();
|
|
2220
|
+
var ModelSecurityGroupCreateRequestSchema = z31.object({
|
|
2221
|
+
name: z31.string(),
|
|
2222
|
+
source_type: z31.string(),
|
|
2223
|
+
description: z31.string().optional().default(""),
|
|
2224
|
+
rule_configurations: z31.record(RuleConfigurationSchema).optional()
|
|
2225
|
+
}).passthrough();
|
|
2226
|
+
var ModelSecurityGroupResponseSchema = z31.object({
|
|
2227
|
+
uuid: z31.string(),
|
|
2228
|
+
tsg_id: z31.string(),
|
|
2229
|
+
created_at: z31.string(),
|
|
2230
|
+
updated_at: z31.string(),
|
|
2231
|
+
name: z31.string(),
|
|
2232
|
+
description: z31.string(),
|
|
2233
|
+
source_type: z31.string(),
|
|
2234
|
+
state: z31.string(),
|
|
2235
|
+
is_tombstone: z31.boolean()
|
|
2236
|
+
}).passthrough();
|
|
2237
|
+
var ModelSecurityGroupUpdateRequestSchema = z31.object({
|
|
2238
|
+
name: z31.string().nullable().optional(),
|
|
2239
|
+
description: z31.string().nullable().optional()
|
|
2240
|
+
}).passthrough();
|
|
2241
|
+
var ListModelSecurityGroupsResponseSchema = z31.object({
|
|
1782
2242
|
pagination: ModelSecurityPaginationSchema,
|
|
1783
|
-
security_groups:
|
|
2243
|
+
security_groups: z31.array(ModelSecurityGroupResponseSchema)
|
|
1784
2244
|
}).passthrough();
|
|
1785
|
-
var PyPIAuthResponseSchema =
|
|
1786
|
-
url:
|
|
1787
|
-
expires_at:
|
|
2245
|
+
var PyPIAuthResponseSchema = z31.object({
|
|
2246
|
+
url: z31.string(),
|
|
2247
|
+
expires_at: z31.string()
|
|
1788
2248
|
}).passthrough();
|
|
1789
2249
|
|
|
1790
2250
|
// src/models/red-team-enums.ts
|
|
@@ -1992,1013 +2452,1013 @@ var TargetType = {
|
|
|
1992
2452
|
};
|
|
1993
2453
|
|
|
1994
2454
|
// src/models/red-team.ts
|
|
1995
|
-
import { z as
|
|
1996
|
-
var RedTeamPaginationSchema =
|
|
1997
|
-
var CountByNameSchema =
|
|
1998
|
-
var ValidationErrorSchema =
|
|
1999
|
-
loc:
|
|
2000
|
-
msg:
|
|
2001
|
-
type:
|
|
2002
|
-
}).passthrough();
|
|
2003
|
-
var HTTPValidationErrorSchema =
|
|
2004
|
-
var TargetBackgroundSchema =
|
|
2005
|
-
industry:
|
|
2006
|
-
use_case:
|
|
2007
|
-
competitors:
|
|
2008
|
-
}).passthrough();
|
|
2009
|
-
var TargetAdditionalContextSchema =
|
|
2010
|
-
base_model:
|
|
2011
|
-
core_architecture:
|
|
2012
|
-
system_prompt:
|
|
2013
|
-
languages_supported:
|
|
2014
|
-
banned_keywords:
|
|
2015
|
-
tools_accessible:
|
|
2016
|
-
}).passthrough();
|
|
2017
|
-
var TargetMetadataSchema =
|
|
2018
|
-
multi_turn:
|
|
2019
|
-
multi_turn_error_message:
|
|
2020
|
-
rate_limit:
|
|
2021
|
-
rate_limit_enabled:
|
|
2022
|
-
rate_limit_error_code:
|
|
2023
|
-
rate_limit_error_json:
|
|
2024
|
-
rate_limit_error_message:
|
|
2025
|
-
content_filter_enabled:
|
|
2026
|
-
content_filter_error_code:
|
|
2027
|
-
content_filter_error_json:
|
|
2028
|
-
content_filter_error_message:
|
|
2029
|
-
probe_message:
|
|
2030
|
-
request_timeout:
|
|
2031
|
-
}).passthrough();
|
|
2032
|
-
var MultiTurnStatefulConfigSchema =
|
|
2033
|
-
type:
|
|
2034
|
-
response_id_field:
|
|
2035
|
-
request_id_field:
|
|
2036
|
-
}).passthrough();
|
|
2037
|
-
var MultiTurnStatelessConfigSchema =
|
|
2038
|
-
type:
|
|
2039
|
-
assistant_role:
|
|
2040
|
-
}).passthrough();
|
|
2041
|
-
var HeadersAuthConfigSchema =
|
|
2042
|
-
var BasicAuthAuthConfigSchema =
|
|
2043
|
-
basic_auth_location:
|
|
2044
|
-
basic_auth_header:
|
|
2045
|
-
}).passthrough();
|
|
2046
|
-
var OAuth2AuthConfigSchema =
|
|
2047
|
-
oauth2_token_url:
|
|
2048
|
-
oauth2_expiry_minutes:
|
|
2049
|
-
oauth2_headers:
|
|
2050
|
-
oauth2_body_params:
|
|
2051
|
-
oauth2_token_response_key:
|
|
2052
|
-
oauth2_inject_header:
|
|
2053
|
-
}).passthrough();
|
|
2054
|
-
var AuthConfigSchema =
|
|
2455
|
+
import { z as z32 } from "zod";
|
|
2456
|
+
var RedTeamPaginationSchema = z32.object({ total_items: z32.number().int().nullable().optional() }).passthrough();
|
|
2457
|
+
var CountByNameSchema = z32.object({ name: z32.string(), count: z32.number().int() }).passthrough();
|
|
2458
|
+
var ValidationErrorSchema = z32.object({
|
|
2459
|
+
loc: z32.array(z32.union([z32.string(), z32.number()])),
|
|
2460
|
+
msg: z32.string(),
|
|
2461
|
+
type: z32.string()
|
|
2462
|
+
}).passthrough();
|
|
2463
|
+
var HTTPValidationErrorSchema = z32.object({ detail: z32.array(ValidationErrorSchema).optional() }).passthrough();
|
|
2464
|
+
var TargetBackgroundSchema = z32.object({
|
|
2465
|
+
industry: z32.string().nullable().optional(),
|
|
2466
|
+
use_case: z32.string().nullable().optional(),
|
|
2467
|
+
competitors: z32.array(z32.string()).nullable().optional()
|
|
2468
|
+
}).passthrough();
|
|
2469
|
+
var TargetAdditionalContextSchema = z32.object({
|
|
2470
|
+
base_model: z32.string().nullable().optional(),
|
|
2471
|
+
core_architecture: z32.string().nullable().optional(),
|
|
2472
|
+
system_prompt: z32.string().nullable().optional(),
|
|
2473
|
+
languages_supported: z32.array(z32.string()).nullable().optional(),
|
|
2474
|
+
banned_keywords: z32.array(z32.string()).nullable().optional(),
|
|
2475
|
+
tools_accessible: z32.array(z32.string()).nullable().optional()
|
|
2476
|
+
}).passthrough();
|
|
2477
|
+
var TargetMetadataSchema = z32.object({
|
|
2478
|
+
multi_turn: z32.boolean().optional(),
|
|
2479
|
+
multi_turn_error_message: z32.string().nullable().optional(),
|
|
2480
|
+
rate_limit: z32.number().int().nullable().optional(),
|
|
2481
|
+
rate_limit_enabled: z32.boolean().optional(),
|
|
2482
|
+
rate_limit_error_code: z32.number().int().nullable().optional(),
|
|
2483
|
+
rate_limit_error_json: z32.record(z32.unknown()).nullable().optional(),
|
|
2484
|
+
rate_limit_error_message: z32.string().nullable().optional(),
|
|
2485
|
+
content_filter_enabled: z32.boolean().optional(),
|
|
2486
|
+
content_filter_error_code: z32.number().int().nullable().optional(),
|
|
2487
|
+
content_filter_error_json: z32.record(z32.unknown()).nullable().optional(),
|
|
2488
|
+
content_filter_error_message: z32.string().nullable().optional(),
|
|
2489
|
+
probe_message: z32.string().optional(),
|
|
2490
|
+
request_timeout: z32.number().optional()
|
|
2491
|
+
}).passthrough();
|
|
2492
|
+
var MultiTurnStatefulConfigSchema = z32.object({
|
|
2493
|
+
type: z32.string().default("stateful"),
|
|
2494
|
+
response_id_field: z32.string(),
|
|
2495
|
+
request_id_field: z32.string()
|
|
2496
|
+
}).passthrough();
|
|
2497
|
+
var MultiTurnStatelessConfigSchema = z32.object({
|
|
2498
|
+
type: z32.string().default("stateless"),
|
|
2499
|
+
assistant_role: z32.string().nullable().optional()
|
|
2500
|
+
}).passthrough();
|
|
2501
|
+
var HeadersAuthConfigSchema = z32.object({ auth_header: z32.record(z32.unknown()) }).passthrough();
|
|
2502
|
+
var BasicAuthAuthConfigSchema = z32.object({
|
|
2503
|
+
basic_auth_location: z32.string().default("HEADER"),
|
|
2504
|
+
basic_auth_header: z32.record(z32.unknown()).nullable().optional()
|
|
2505
|
+
}).passthrough();
|
|
2506
|
+
var OAuth2AuthConfigSchema = z32.object({
|
|
2507
|
+
oauth2_token_url: z32.string(),
|
|
2508
|
+
oauth2_expiry_minutes: z32.number().int().default(60),
|
|
2509
|
+
oauth2_headers: z32.record(z32.unknown()).optional(),
|
|
2510
|
+
oauth2_body_params: z32.record(z32.unknown()).optional(),
|
|
2511
|
+
oauth2_token_response_key: z32.string().default("access_token"),
|
|
2512
|
+
oauth2_inject_header: z32.record(z32.unknown())
|
|
2513
|
+
}).passthrough();
|
|
2514
|
+
var AuthConfigSchema = z32.union([
|
|
2055
2515
|
HeadersAuthConfigSchema,
|
|
2056
2516
|
BasicAuthAuthConfigSchema,
|
|
2057
2517
|
OAuth2AuthConfigSchema
|
|
2058
2518
|
]);
|
|
2059
|
-
var OpenAIConnectionParamsSchema =
|
|
2060
|
-
api_key:
|
|
2061
|
-
model_name:
|
|
2062
|
-
}).passthrough();
|
|
2063
|
-
var HuggingfaceConnectionParamsSchema =
|
|
2064
|
-
api_key:
|
|
2065
|
-
model_name:
|
|
2066
|
-
}).passthrough();
|
|
2067
|
-
var DatabricksConnectionParamsSchema =
|
|
2068
|
-
auth_type:
|
|
2069
|
-
workspace_url:
|
|
2070
|
-
model_name:
|
|
2071
|
-
access_token:
|
|
2072
|
-
client_id:
|
|
2073
|
-
secret:
|
|
2074
|
-
}).passthrough();
|
|
2075
|
-
var BedrockAccessConnectionParamsSchema =
|
|
2076
|
-
access_id:
|
|
2077
|
-
access_secret:
|
|
2078
|
-
region:
|
|
2079
|
-
model_id:
|
|
2080
|
-
session_token:
|
|
2081
|
-
}).passthrough();
|
|
2082
|
-
var RestConnectionParamsSchema =
|
|
2083
|
-
api_endpoint:
|
|
2084
|
-
request_headers:
|
|
2085
|
-
request_json:
|
|
2086
|
-
response_json:
|
|
2087
|
-
response_key:
|
|
2088
|
-
target_connection_config:
|
|
2089
|
-
curl:
|
|
2090
|
-
multi_turn_config:
|
|
2519
|
+
var OpenAIConnectionParamsSchema = z32.object({
|
|
2520
|
+
api_key: z32.string(),
|
|
2521
|
+
model_name: z32.string()
|
|
2522
|
+
}).passthrough();
|
|
2523
|
+
var HuggingfaceConnectionParamsSchema = z32.object({
|
|
2524
|
+
api_key: z32.string(),
|
|
2525
|
+
model_name: z32.string()
|
|
2526
|
+
}).passthrough();
|
|
2527
|
+
var DatabricksConnectionParamsSchema = z32.object({
|
|
2528
|
+
auth_type: z32.string(),
|
|
2529
|
+
workspace_url: z32.string(),
|
|
2530
|
+
model_name: z32.string(),
|
|
2531
|
+
access_token: z32.string().nullable().optional(),
|
|
2532
|
+
client_id: z32.string().nullable().optional(),
|
|
2533
|
+
secret: z32.string().nullable().optional()
|
|
2534
|
+
}).passthrough();
|
|
2535
|
+
var BedrockAccessConnectionParamsSchema = z32.object({
|
|
2536
|
+
access_id: z32.string(),
|
|
2537
|
+
access_secret: z32.string(),
|
|
2538
|
+
region: z32.string(),
|
|
2539
|
+
model_id: z32.string(),
|
|
2540
|
+
session_token: z32.string().nullable().optional()
|
|
2541
|
+
}).passthrough();
|
|
2542
|
+
var RestConnectionParamsSchema = z32.object({
|
|
2543
|
+
api_endpoint: z32.string().nullable().optional(),
|
|
2544
|
+
request_headers: z32.record(z32.unknown()).nullable().optional(),
|
|
2545
|
+
request_json: z32.record(z32.unknown()).nullable().optional(),
|
|
2546
|
+
response_json: z32.record(z32.unknown()).nullable().optional(),
|
|
2547
|
+
response_key: z32.string().nullable().optional(),
|
|
2548
|
+
target_connection_config: z32.unknown().nullable().optional(),
|
|
2549
|
+
curl: z32.string().nullable().optional(),
|
|
2550
|
+
multi_turn_config: z32.unknown().nullable().optional()
|
|
2091
2551
|
}).passthrough();
|
|
2092
2552
|
var StreamingConnectionParamsSchema = RestConnectionParamsSchema.extend({
|
|
2093
|
-
response_stop_key:
|
|
2094
|
-
response_stop_value:
|
|
2553
|
+
response_stop_key: z32.string(),
|
|
2554
|
+
response_stop_value: z32.string()
|
|
2095
2555
|
}).passthrough();
|
|
2096
2556
|
var WebSocketConnectionParamsSchema = RestConnectionParamsSchema.extend({
|
|
2097
|
-
ws_response_timeout:
|
|
2557
|
+
ws_response_timeout: z32.number().default(110)
|
|
2098
2558
|
}).passthrough();
|
|
2099
|
-
var ConnectionParamsSchema =
|
|
2559
|
+
var ConnectionParamsSchema = z32.union([
|
|
2100
2560
|
WebSocketConnectionParamsSchema,
|
|
2101
2561
|
StreamingConnectionParamsSchema,
|
|
2102
2562
|
RestConnectionParamsSchema
|
|
2103
2563
|
]);
|
|
2104
|
-
var TargetJobRequestSchema =
|
|
2105
|
-
uuid:
|
|
2106
|
-
version:
|
|
2107
|
-
}).passthrough();
|
|
2108
|
-
var JobTimeRecordSchema =
|
|
2109
|
-
queued_at:
|
|
2110
|
-
started_at:
|
|
2111
|
-
completed_at:
|
|
2112
|
-
time_taken:
|
|
2113
|
-
}).passthrough();
|
|
2114
|
-
var StaticJobMetadataSchema =
|
|
2115
|
-
categories:
|
|
2116
|
-
rate_limit_enabled:
|
|
2117
|
-
rate_limit:
|
|
2118
|
-
rate_limit_error_code:
|
|
2119
|
-
rate_limit_error_message:
|
|
2120
|
-
rate_limit_error_json:
|
|
2121
|
-
content_filter_enabled:
|
|
2122
|
-
content_filter_error_code:
|
|
2123
|
-
content_filter_error_message:
|
|
2124
|
-
content_filter_error_json:
|
|
2125
|
-
}).passthrough();
|
|
2126
|
-
var DynamicJobMetadataSchema =
|
|
2127
|
-
rate_limit_enabled:
|
|
2128
|
-
rate_limit:
|
|
2129
|
-
rate_limit_error_code:
|
|
2130
|
-
rate_limit_error_message:
|
|
2131
|
-
rate_limit_error_json:
|
|
2132
|
-
content_filter_enabled:
|
|
2133
|
-
content_filter_error_code:
|
|
2134
|
-
content_filter_error_message:
|
|
2135
|
-
content_filter_error_json:
|
|
2136
|
-
stream_breadth:
|
|
2137
|
-
stream_depth:
|
|
2138
|
-
max_tokens:
|
|
2139
|
-
context_size:
|
|
2140
|
-
attack_goals:
|
|
2141
|
-
base_model:
|
|
2142
|
-
use_case:
|
|
2143
|
-
system_prompt:
|
|
2144
|
-
}).passthrough();
|
|
2145
|
-
var CustomJobMetadataSchema =
|
|
2146
|
-
custom_prompt_sets:
|
|
2147
|
-
rate_limit_enabled:
|
|
2148
|
-
rate_limit:
|
|
2149
|
-
rate_limit_error_code:
|
|
2150
|
-
rate_limit_error_message:
|
|
2151
|
-
rate_limit_error_json:
|
|
2152
|
-
content_filter_enabled:
|
|
2153
|
-
content_filter_error_code:
|
|
2154
|
-
content_filter_error_message:
|
|
2155
|
-
content_filter_error_json:
|
|
2156
|
-
}).passthrough();
|
|
2157
|
-
var JobCreateRequestSchema =
|
|
2158
|
-
name:
|
|
2564
|
+
var TargetJobRequestSchema = z32.object({
|
|
2565
|
+
uuid: z32.string(),
|
|
2566
|
+
version: z32.number().int().nullable().optional()
|
|
2567
|
+
}).passthrough();
|
|
2568
|
+
var JobTimeRecordSchema = z32.object({
|
|
2569
|
+
queued_at: z32.string().nullable().optional(),
|
|
2570
|
+
started_at: z32.string().nullable().optional(),
|
|
2571
|
+
completed_at: z32.string().nullable().optional(),
|
|
2572
|
+
time_taken: z32.string().nullable().optional()
|
|
2573
|
+
}).passthrough();
|
|
2574
|
+
var StaticJobMetadataSchema = z32.object({
|
|
2575
|
+
categories: z32.record(z32.unknown()),
|
|
2576
|
+
rate_limit_enabled: z32.boolean().optional(),
|
|
2577
|
+
rate_limit: z32.number().int().nullable().optional(),
|
|
2578
|
+
rate_limit_error_code: z32.number().int().nullable().optional(),
|
|
2579
|
+
rate_limit_error_message: z32.string().nullable().optional(),
|
|
2580
|
+
rate_limit_error_json: z32.unknown().optional(),
|
|
2581
|
+
content_filter_enabled: z32.boolean().optional(),
|
|
2582
|
+
content_filter_error_code: z32.number().int().nullable().optional(),
|
|
2583
|
+
content_filter_error_message: z32.string().nullable().optional(),
|
|
2584
|
+
content_filter_error_json: z32.unknown().optional()
|
|
2585
|
+
}).passthrough();
|
|
2586
|
+
var DynamicJobMetadataSchema = z32.object({
|
|
2587
|
+
rate_limit_enabled: z32.boolean().optional(),
|
|
2588
|
+
rate_limit: z32.number().int().nullable().optional(),
|
|
2589
|
+
rate_limit_error_code: z32.number().int().nullable().optional(),
|
|
2590
|
+
rate_limit_error_message: z32.string().nullable().optional(),
|
|
2591
|
+
rate_limit_error_json: z32.unknown().optional(),
|
|
2592
|
+
content_filter_enabled: z32.boolean().optional(),
|
|
2593
|
+
content_filter_error_code: z32.number().int().nullable().optional(),
|
|
2594
|
+
content_filter_error_message: z32.string().nullable().optional(),
|
|
2595
|
+
content_filter_error_json: z32.unknown().optional(),
|
|
2596
|
+
stream_breadth: z32.number().int().optional(),
|
|
2597
|
+
stream_depth: z32.number().int().optional(),
|
|
2598
|
+
max_tokens: z32.number().int().optional(),
|
|
2599
|
+
context_size: z32.number().int().optional(),
|
|
2600
|
+
attack_goals: z32.array(z32.unknown()).optional(),
|
|
2601
|
+
base_model: z32.string().nullable().optional(),
|
|
2602
|
+
use_case: z32.string().nullable().optional(),
|
|
2603
|
+
system_prompt: z32.string().nullable().optional()
|
|
2604
|
+
}).passthrough();
|
|
2605
|
+
var CustomJobMetadataSchema = z32.object({
|
|
2606
|
+
custom_prompt_sets: z32.array(z32.unknown()),
|
|
2607
|
+
rate_limit_enabled: z32.boolean().optional(),
|
|
2608
|
+
rate_limit: z32.number().int().nullable().optional(),
|
|
2609
|
+
rate_limit_error_code: z32.number().int().nullable().optional(),
|
|
2610
|
+
rate_limit_error_message: z32.string().nullable().optional(),
|
|
2611
|
+
rate_limit_error_json: z32.unknown().optional(),
|
|
2612
|
+
content_filter_enabled: z32.boolean().optional(),
|
|
2613
|
+
content_filter_error_code: z32.number().int().nullable().optional(),
|
|
2614
|
+
content_filter_error_message: z32.string().nullable().optional(),
|
|
2615
|
+
content_filter_error_json: z32.unknown().optional()
|
|
2616
|
+
}).passthrough();
|
|
2617
|
+
var JobCreateRequestSchema = z32.object({
|
|
2618
|
+
name: z32.string(),
|
|
2159
2619
|
target: TargetJobRequestSchema,
|
|
2160
|
-
job_type:
|
|
2161
|
-
job_metadata:
|
|
2620
|
+
job_type: z32.string(),
|
|
2621
|
+
job_metadata: z32.union([
|
|
2162
2622
|
StaticJobMetadataSchema,
|
|
2163
2623
|
DynamicJobMetadataSchema,
|
|
2164
2624
|
CustomJobMetadataSchema
|
|
2165
2625
|
]),
|
|
2166
|
-
version:
|
|
2167
|
-
extra_info:
|
|
2168
|
-
}).passthrough();
|
|
2169
|
-
var StaticJobReportStatsSchema =
|
|
2170
|
-
output_completion_percentage:
|
|
2171
|
-
partial_report_unlocked:
|
|
2172
|
-
partial_report_unlocked_at:
|
|
2173
|
-
report_summary:
|
|
2174
|
-
}).passthrough();
|
|
2175
|
-
var DynamicJobReportStatsSchema =
|
|
2176
|
-
total_goals:
|
|
2177
|
-
total_streams:
|
|
2178
|
-
total_threats:
|
|
2179
|
-
goals_achieved:
|
|
2180
|
-
report_summary:
|
|
2181
|
-
}).passthrough();
|
|
2182
|
-
var TargetReferenceSchema =
|
|
2183
|
-
uuid:
|
|
2184
|
-
tsg_id:
|
|
2185
|
-
name:
|
|
2186
|
-
description:
|
|
2187
|
-
target_type:
|
|
2188
|
-
connection_type:
|
|
2189
|
-
api_endpoint_type:
|
|
2190
|
-
response_mode:
|
|
2191
|
-
session_supported:
|
|
2192
|
-
extra_info:
|
|
2193
|
-
status:
|
|
2194
|
-
active:
|
|
2195
|
-
validated:
|
|
2196
|
-
version:
|
|
2197
|
-
secret_version:
|
|
2198
|
-
created_by_user_id:
|
|
2199
|
-
updated_by_user_id:
|
|
2200
|
-
created_at:
|
|
2201
|
-
updated_at:
|
|
2626
|
+
version: z32.number().int().nullable().optional(),
|
|
2627
|
+
extra_info: z32.record(z32.unknown()).nullable().optional()
|
|
2628
|
+
}).passthrough();
|
|
2629
|
+
var StaticJobReportStatsSchema = z32.object({
|
|
2630
|
+
output_completion_percentage: z32.number(),
|
|
2631
|
+
partial_report_unlocked: z32.boolean().optional(),
|
|
2632
|
+
partial_report_unlocked_at: z32.string().nullable().optional(),
|
|
2633
|
+
report_summary: z32.string().nullable().optional()
|
|
2634
|
+
}).passthrough();
|
|
2635
|
+
var DynamicJobReportStatsSchema = z32.object({
|
|
2636
|
+
total_goals: z32.number().int().optional(),
|
|
2637
|
+
total_streams: z32.number().int().optional(),
|
|
2638
|
+
total_threats: z32.number().int().optional(),
|
|
2639
|
+
goals_achieved: z32.number().int().optional(),
|
|
2640
|
+
report_summary: z32.string().nullable().optional()
|
|
2641
|
+
}).passthrough();
|
|
2642
|
+
var TargetReferenceSchema = z32.object({
|
|
2643
|
+
uuid: z32.string(),
|
|
2644
|
+
tsg_id: z32.string(),
|
|
2645
|
+
name: z32.string(),
|
|
2646
|
+
description: z32.string().nullable().optional(),
|
|
2647
|
+
target_type: z32.string().nullable().optional(),
|
|
2648
|
+
connection_type: z32.string().nullable().optional(),
|
|
2649
|
+
api_endpoint_type: z32.string().nullable().optional(),
|
|
2650
|
+
response_mode: z32.string().nullable().optional(),
|
|
2651
|
+
session_supported: z32.boolean().optional(),
|
|
2652
|
+
extra_info: z32.record(z32.unknown()).nullable().optional(),
|
|
2653
|
+
status: z32.string(),
|
|
2654
|
+
active: z32.boolean(),
|
|
2655
|
+
validated: z32.boolean(),
|
|
2656
|
+
version: z32.number().int().nullable().optional(),
|
|
2657
|
+
secret_version: z32.string().nullable().optional(),
|
|
2658
|
+
created_by_user_id: z32.string().nullable().optional(),
|
|
2659
|
+
updated_by_user_id: z32.string().nullable().optional(),
|
|
2660
|
+
created_at: z32.string(),
|
|
2661
|
+
updated_at: z32.string(),
|
|
2202
2662
|
target_metadata: TargetMetadataSchema.optional(),
|
|
2203
2663
|
target_background: TargetBackgroundSchema.nullable().optional(),
|
|
2204
|
-
profiling_status:
|
|
2664
|
+
profiling_status: z32.string().nullable().optional(),
|
|
2205
2665
|
additional_context: TargetAdditionalContextSchema.nullable().optional(),
|
|
2206
|
-
auth_type:
|
|
2666
|
+
auth_type: z32.string().nullable().optional()
|
|
2207
2667
|
}).passthrough();
|
|
2208
|
-
var JobResponseSchema =
|
|
2209
|
-
uuid:
|
|
2210
|
-
tsg_id:
|
|
2211
|
-
name:
|
|
2668
|
+
var JobResponseSchema = z32.object({
|
|
2669
|
+
uuid: z32.string(),
|
|
2670
|
+
tsg_id: z32.string(),
|
|
2671
|
+
name: z32.string(),
|
|
2212
2672
|
target: TargetReferenceSchema,
|
|
2213
|
-
job_type:
|
|
2214
|
-
job_metadata:
|
|
2215
|
-
version:
|
|
2216
|
-
extra_info:
|
|
2217
|
-
target_id:
|
|
2218
|
-
target_type:
|
|
2219
|
-
total:
|
|
2220
|
-
completed:
|
|
2221
|
-
status:
|
|
2222
|
-
score:
|
|
2223
|
-
asr:
|
|
2673
|
+
job_type: z32.string(),
|
|
2674
|
+
job_metadata: z32.unknown(),
|
|
2675
|
+
version: z32.number().int().nullable().optional(),
|
|
2676
|
+
extra_info: z32.record(z32.unknown()).nullable().optional(),
|
|
2677
|
+
target_id: z32.string(),
|
|
2678
|
+
target_type: z32.string(),
|
|
2679
|
+
total: z32.number().int().nullable().optional(),
|
|
2680
|
+
completed: z32.number().int().nullable().optional(),
|
|
2681
|
+
status: z32.string().optional(),
|
|
2682
|
+
score: z32.number().nullable().optional(),
|
|
2683
|
+
asr: z32.number().nullable().optional(),
|
|
2224
2684
|
time_record: JobTimeRecordSchema.nullable().optional(),
|
|
2225
|
-
created_at:
|
|
2226
|
-
updated_at:
|
|
2227
|
-
created_by_user_id:
|
|
2228
|
-
report_stats:
|
|
2229
|
-
metering_quota_uuid:
|
|
2230
|
-
counted_towards_quota:
|
|
2231
|
-
invocation_id:
|
|
2232
|
-
}).passthrough();
|
|
2233
|
-
var JobListResponseSchema =
|
|
2685
|
+
created_at: z32.string().nullable().optional(),
|
|
2686
|
+
updated_at: z32.string().nullable().optional(),
|
|
2687
|
+
created_by_user_id: z32.string().nullable().optional(),
|
|
2688
|
+
report_stats: z32.unknown().optional(),
|
|
2689
|
+
metering_quota_uuid: z32.string().nullable().optional(),
|
|
2690
|
+
counted_towards_quota: z32.string().optional(),
|
|
2691
|
+
invocation_id: z32.string().nullable().optional()
|
|
2692
|
+
}).passthrough();
|
|
2693
|
+
var JobListResponseSchema = z32.object({
|
|
2234
2694
|
pagination: RedTeamPaginationSchema,
|
|
2235
|
-
data:
|
|
2236
|
-
}).passthrough();
|
|
2237
|
-
var JobAbortResponseSchema =
|
|
2238
|
-
job_id:
|
|
2239
|
-
message:
|
|
2240
|
-
}).passthrough();
|
|
2241
|
-
var PrerequisiteModelSchema =
|
|
2242
|
-
id:
|
|
2243
|
-
display_name:
|
|
2244
|
-
description:
|
|
2245
|
-
}).passthrough();
|
|
2246
|
-
var SubCategoryModelSchema =
|
|
2247
|
-
id:
|
|
2248
|
-
display_name:
|
|
2249
|
-
description:
|
|
2250
|
-
preselect:
|
|
2251
|
-
prerequisites:
|
|
2252
|
-
active:
|
|
2253
|
-
}).passthrough();
|
|
2254
|
-
var CategoryModelSchema =
|
|
2255
|
-
id:
|
|
2256
|
-
display_name:
|
|
2257
|
-
description:
|
|
2258
|
-
preselect:
|
|
2259
|
-
sub_categories:
|
|
2260
|
-
}).passthrough();
|
|
2261
|
-
var AttackOutputSchema =
|
|
2262
|
-
uuid:
|
|
2263
|
-
tsg_id:
|
|
2264
|
-
attack_id:
|
|
2265
|
-
job_id:
|
|
2266
|
-
target_id:
|
|
2267
|
-
output:
|
|
2268
|
-
threat:
|
|
2269
|
-
marked_safe:
|
|
2270
|
-
}).passthrough();
|
|
2271
|
-
var AttackMultiTurnOutputSchema =
|
|
2272
|
-
uuid:
|
|
2273
|
-
tsg_id:
|
|
2274
|
-
attack_id:
|
|
2275
|
-
job_id:
|
|
2276
|
-
target_id:
|
|
2277
|
-
output:
|
|
2278
|
-
prompt:
|
|
2279
|
-
turn:
|
|
2280
|
-
threat:
|
|
2281
|
-
marked_safe:
|
|
2282
|
-
generation:
|
|
2283
|
-
multi_turn:
|
|
2284
|
-
}).passthrough();
|
|
2285
|
-
var AttackListItemSchema =
|
|
2286
|
-
uuid:
|
|
2287
|
-
tsg_id:
|
|
2288
|
-
job_id:
|
|
2289
|
-
target_id:
|
|
2290
|
-
prompt:
|
|
2291
|
-
prompt_mapping_id:
|
|
2292
|
-
prompt_id:
|
|
2293
|
-
category:
|
|
2294
|
-
sub_category:
|
|
2295
|
-
category_display_name:
|
|
2296
|
-
sub_category_display_name:
|
|
2297
|
-
status:
|
|
2298
|
-
marked_safe:
|
|
2299
|
-
extra_info:
|
|
2300
|
-
threat:
|
|
2301
|
-
attack_type:
|
|
2302
|
-
multi_turn:
|
|
2303
|
-
asr:
|
|
2304
|
-
version:
|
|
2305
|
-
severity:
|
|
2306
|
-
}).passthrough();
|
|
2307
|
-
var AttackListResponseSchema =
|
|
2695
|
+
data: z32.array(JobResponseSchema)
|
|
2696
|
+
}).passthrough();
|
|
2697
|
+
var JobAbortResponseSchema = z32.object({
|
|
2698
|
+
job_id: z32.string(),
|
|
2699
|
+
message: z32.string()
|
|
2700
|
+
}).passthrough();
|
|
2701
|
+
var PrerequisiteModelSchema = z32.object({
|
|
2702
|
+
id: z32.string(),
|
|
2703
|
+
display_name: z32.string(),
|
|
2704
|
+
description: z32.string()
|
|
2705
|
+
}).passthrough();
|
|
2706
|
+
var SubCategoryModelSchema = z32.object({
|
|
2707
|
+
id: z32.string(),
|
|
2708
|
+
display_name: z32.string(),
|
|
2709
|
+
description: z32.string(),
|
|
2710
|
+
preselect: z32.boolean().optional(),
|
|
2711
|
+
prerequisites: z32.array(PrerequisiteModelSchema).nullable().optional(),
|
|
2712
|
+
active: z32.boolean().optional()
|
|
2713
|
+
}).passthrough();
|
|
2714
|
+
var CategoryModelSchema = z32.object({
|
|
2715
|
+
id: z32.string(),
|
|
2716
|
+
display_name: z32.string(),
|
|
2717
|
+
description: z32.string(),
|
|
2718
|
+
preselect: z32.boolean().optional(),
|
|
2719
|
+
sub_categories: z32.array(SubCategoryModelSchema)
|
|
2720
|
+
}).passthrough();
|
|
2721
|
+
var AttackOutputSchema = z32.object({
|
|
2722
|
+
uuid: z32.string(),
|
|
2723
|
+
tsg_id: z32.string(),
|
|
2724
|
+
attack_id: z32.string(),
|
|
2725
|
+
job_id: z32.string(),
|
|
2726
|
+
target_id: z32.string(),
|
|
2727
|
+
output: z32.string(),
|
|
2728
|
+
threat: z32.boolean().nullable().optional(),
|
|
2729
|
+
marked_safe: z32.boolean().nullable().optional()
|
|
2730
|
+
}).passthrough();
|
|
2731
|
+
var AttackMultiTurnOutputSchema = z32.object({
|
|
2732
|
+
uuid: z32.string(),
|
|
2733
|
+
tsg_id: z32.string(),
|
|
2734
|
+
attack_id: z32.string(),
|
|
2735
|
+
job_id: z32.string(),
|
|
2736
|
+
target_id: z32.string(),
|
|
2737
|
+
output: z32.string(),
|
|
2738
|
+
prompt: z32.string(),
|
|
2739
|
+
turn: z32.number().int(),
|
|
2740
|
+
threat: z32.boolean().nullable().optional(),
|
|
2741
|
+
marked_safe: z32.boolean().nullable().optional(),
|
|
2742
|
+
generation: z32.number().int().optional(),
|
|
2743
|
+
multi_turn: z32.boolean().optional()
|
|
2744
|
+
}).passthrough();
|
|
2745
|
+
var AttackListItemSchema = z32.object({
|
|
2746
|
+
uuid: z32.string(),
|
|
2747
|
+
tsg_id: z32.string(),
|
|
2748
|
+
job_id: z32.string(),
|
|
2749
|
+
target_id: z32.string(),
|
|
2750
|
+
prompt: z32.string(),
|
|
2751
|
+
prompt_mapping_id: z32.string(),
|
|
2752
|
+
prompt_id: z32.string(),
|
|
2753
|
+
category: z32.string(),
|
|
2754
|
+
sub_category: z32.string(),
|
|
2755
|
+
category_display_name: z32.string(),
|
|
2756
|
+
sub_category_display_name: z32.string(),
|
|
2757
|
+
status: z32.string().optional(),
|
|
2758
|
+
marked_safe: z32.boolean().nullable().optional(),
|
|
2759
|
+
extra_info: z32.record(z32.unknown()).optional(),
|
|
2760
|
+
threat: z32.boolean().nullable().optional(),
|
|
2761
|
+
attack_type: z32.string().optional(),
|
|
2762
|
+
multi_turn: z32.boolean().optional(),
|
|
2763
|
+
asr: z32.number().nullable().optional(),
|
|
2764
|
+
version: z32.number().int().nullable().optional(),
|
|
2765
|
+
severity: z32.string().optional()
|
|
2766
|
+
}).passthrough();
|
|
2767
|
+
var AttackListResponseSchema = z32.object({
|
|
2308
2768
|
pagination: RedTeamPaginationSchema,
|
|
2309
|
-
data:
|
|
2310
|
-
}).passthrough();
|
|
2311
|
-
var AttackDetailResponseSchema =
|
|
2312
|
-
uuid:
|
|
2313
|
-
tsg_id:
|
|
2314
|
-
job_id:
|
|
2315
|
-
target_id:
|
|
2316
|
-
prompt:
|
|
2317
|
-
prompt_mapping_id:
|
|
2318
|
-
prompt_id:
|
|
2319
|
-
category:
|
|
2320
|
-
sub_category:
|
|
2321
|
-
category_display_name:
|
|
2322
|
-
sub_category_display_name:
|
|
2323
|
-
compliance_frameworks:
|
|
2324
|
-
goal:
|
|
2325
|
-
status:
|
|
2326
|
-
marked_safe:
|
|
2327
|
-
extra_info:
|
|
2328
|
-
threat:
|
|
2329
|
-
attack_type:
|
|
2330
|
-
multi_turn:
|
|
2331
|
-
asr:
|
|
2332
|
-
version:
|
|
2333
|
-
severity:
|
|
2334
|
-
outputs:
|
|
2335
|
-
}).passthrough();
|
|
2336
|
-
var AttackMultiTurnDetailResponseSchema =
|
|
2337
|
-
uuid:
|
|
2338
|
-
tsg_id:
|
|
2339
|
-
job_id:
|
|
2340
|
-
target_id:
|
|
2341
|
-
prompt:
|
|
2342
|
-
prompt_mapping_id:
|
|
2343
|
-
prompt_id:
|
|
2344
|
-
category:
|
|
2345
|
-
sub_category:
|
|
2346
|
-
category_display_name:
|
|
2347
|
-
sub_category_display_name:
|
|
2348
|
-
compliance_frameworks:
|
|
2349
|
-
goal:
|
|
2350
|
-
status:
|
|
2351
|
-
marked_safe:
|
|
2352
|
-
extra_info:
|
|
2353
|
-
threat:
|
|
2354
|
-
attack_type:
|
|
2355
|
-
multi_turn:
|
|
2356
|
-
asr:
|
|
2357
|
-
version:
|
|
2358
|
-
severity:
|
|
2359
|
-
outputs:
|
|
2360
|
-
}).passthrough();
|
|
2361
|
-
var SubCategoryStatsSchema =
|
|
2362
|
-
id:
|
|
2363
|
-
display_name:
|
|
2364
|
-
description:
|
|
2365
|
-
preselect:
|
|
2366
|
-
prerequisites:
|
|
2367
|
-
active:
|
|
2368
|
-
successful:
|
|
2369
|
-
failed:
|
|
2370
|
-
total:
|
|
2371
|
-
}).passthrough();
|
|
2372
|
-
var CategoryReportSchema =
|
|
2373
|
-
id:
|
|
2374
|
-
display_name:
|
|
2375
|
-
description:
|
|
2376
|
-
preselect:
|
|
2377
|
-
sub_categories:
|
|
2378
|
-
asr:
|
|
2379
|
-
total_prompts:
|
|
2380
|
-
total_attacks:
|
|
2381
|
-
successful:
|
|
2382
|
-
failed:
|
|
2383
|
-
}).passthrough();
|
|
2384
|
-
var SeverityStatsSchema =
|
|
2385
|
-
severity:
|
|
2386
|
-
successful:
|
|
2387
|
-
failed:
|
|
2388
|
-
}).passthrough();
|
|
2389
|
-
var SeverityReportSchema =
|
|
2390
|
-
stats:
|
|
2391
|
-
successful:
|
|
2392
|
-
failed:
|
|
2393
|
-
total_attacks:
|
|
2394
|
-
}).passthrough();
|
|
2395
|
-
var ComplianceTechniqueSchema =
|
|
2396
|
-
id:
|
|
2397
|
-
display_name:
|
|
2398
|
-
compliance_id:
|
|
2399
|
-
description:
|
|
2400
|
-
link:
|
|
2401
|
-
version:
|
|
2402
|
-
active:
|
|
2403
|
-
successful:
|
|
2404
|
-
failed:
|
|
2405
|
-
total:
|
|
2406
|
-
}).passthrough();
|
|
2407
|
-
var ComplianceReportSchema =
|
|
2408
|
-
id:
|
|
2409
|
-
display_name:
|
|
2410
|
-
description:
|
|
2411
|
-
active:
|
|
2412
|
-
version:
|
|
2413
|
-
link:
|
|
2414
|
-
techniques:
|
|
2415
|
-
score:
|
|
2416
|
-
}).passthrough();
|
|
2417
|
-
var RuntimeSecurityPolicySchema =
|
|
2418
|
-
policy_id:
|
|
2419
|
-
display_name:
|
|
2420
|
-
config:
|
|
2421
|
-
}).passthrough();
|
|
2422
|
-
var StaticJobRemediationSchema =
|
|
2423
|
-
remediation:
|
|
2424
|
-
description:
|
|
2425
|
-
mapping_remediation_id:
|
|
2426
|
-
subcategories:
|
|
2427
|
-
effectiveness:
|
|
2428
|
-
ease_of_implementation:
|
|
2429
|
-
priority:
|
|
2430
|
-
resource_links:
|
|
2431
|
-
categories:
|
|
2432
|
-
}).passthrough();
|
|
2433
|
-
var StaticJobRemediationRecommendationSchema =
|
|
2434
|
-
runtime_security_policy_configuration:
|
|
2435
|
-
other_measures:
|
|
2436
|
-
}).passthrough();
|
|
2437
|
-
var StaticJobReportSchema =
|
|
2769
|
+
data: z32.array(AttackListItemSchema)
|
|
2770
|
+
}).passthrough();
|
|
2771
|
+
var AttackDetailResponseSchema = z32.object({
|
|
2772
|
+
uuid: z32.string(),
|
|
2773
|
+
tsg_id: z32.string(),
|
|
2774
|
+
job_id: z32.string(),
|
|
2775
|
+
target_id: z32.string(),
|
|
2776
|
+
prompt: z32.string(),
|
|
2777
|
+
prompt_mapping_id: z32.string(),
|
|
2778
|
+
prompt_id: z32.string(),
|
|
2779
|
+
category: z32.string(),
|
|
2780
|
+
sub_category: z32.string(),
|
|
2781
|
+
category_display_name: z32.string(),
|
|
2782
|
+
sub_category_display_name: z32.string(),
|
|
2783
|
+
compliance_frameworks: z32.array(z32.unknown()),
|
|
2784
|
+
goal: z32.string().nullable(),
|
|
2785
|
+
status: z32.string().optional(),
|
|
2786
|
+
marked_safe: z32.boolean().nullable().optional(),
|
|
2787
|
+
extra_info: z32.record(z32.unknown()).optional(),
|
|
2788
|
+
threat: z32.boolean().nullable().optional(),
|
|
2789
|
+
attack_type: z32.string().optional(),
|
|
2790
|
+
multi_turn: z32.boolean().optional(),
|
|
2791
|
+
asr: z32.number().nullable().optional(),
|
|
2792
|
+
version: z32.number().int().nullable().optional(),
|
|
2793
|
+
severity: z32.string().optional(),
|
|
2794
|
+
outputs: z32.array(AttackOutputSchema).optional()
|
|
2795
|
+
}).passthrough();
|
|
2796
|
+
var AttackMultiTurnDetailResponseSchema = z32.object({
|
|
2797
|
+
uuid: z32.string(),
|
|
2798
|
+
tsg_id: z32.string(),
|
|
2799
|
+
job_id: z32.string(),
|
|
2800
|
+
target_id: z32.string(),
|
|
2801
|
+
prompt: z32.string(),
|
|
2802
|
+
prompt_mapping_id: z32.string(),
|
|
2803
|
+
prompt_id: z32.string(),
|
|
2804
|
+
category: z32.string(),
|
|
2805
|
+
sub_category: z32.string(),
|
|
2806
|
+
category_display_name: z32.string(),
|
|
2807
|
+
sub_category_display_name: z32.string(),
|
|
2808
|
+
compliance_frameworks: z32.array(z32.unknown()),
|
|
2809
|
+
goal: z32.string().nullable(),
|
|
2810
|
+
status: z32.string().optional(),
|
|
2811
|
+
marked_safe: z32.boolean().nullable().optional(),
|
|
2812
|
+
extra_info: z32.record(z32.unknown()).optional(),
|
|
2813
|
+
threat: z32.boolean().nullable().optional(),
|
|
2814
|
+
attack_type: z32.string().optional(),
|
|
2815
|
+
multi_turn: z32.boolean().optional(),
|
|
2816
|
+
asr: z32.number().nullable().optional(),
|
|
2817
|
+
version: z32.number().int().nullable().optional(),
|
|
2818
|
+
severity: z32.string().optional(),
|
|
2819
|
+
outputs: z32.array(AttackMultiTurnOutputSchema).optional()
|
|
2820
|
+
}).passthrough();
|
|
2821
|
+
var SubCategoryStatsSchema = z32.object({
|
|
2822
|
+
id: z32.string(),
|
|
2823
|
+
display_name: z32.string(),
|
|
2824
|
+
description: z32.string(),
|
|
2825
|
+
preselect: z32.boolean().optional(),
|
|
2826
|
+
prerequisites: z32.array(PrerequisiteModelSchema).nullable().optional(),
|
|
2827
|
+
active: z32.boolean().optional(),
|
|
2828
|
+
successful: z32.number().int(),
|
|
2829
|
+
failed: z32.number().int(),
|
|
2830
|
+
total: z32.number().int().optional()
|
|
2831
|
+
}).passthrough();
|
|
2832
|
+
var CategoryReportSchema = z32.object({
|
|
2833
|
+
id: z32.string(),
|
|
2834
|
+
display_name: z32.string(),
|
|
2835
|
+
description: z32.string(),
|
|
2836
|
+
preselect: z32.boolean().optional(),
|
|
2837
|
+
sub_categories: z32.array(SubCategoryStatsSchema),
|
|
2838
|
+
asr: z32.number(),
|
|
2839
|
+
total_prompts: z32.number().int(),
|
|
2840
|
+
total_attacks: z32.number().int(),
|
|
2841
|
+
successful: z32.number().int(),
|
|
2842
|
+
failed: z32.number().int()
|
|
2843
|
+
}).passthrough();
|
|
2844
|
+
var SeverityStatsSchema = z32.object({
|
|
2845
|
+
severity: z32.string(),
|
|
2846
|
+
successful: z32.number().int().optional(),
|
|
2847
|
+
failed: z32.number().int().optional()
|
|
2848
|
+
}).passthrough();
|
|
2849
|
+
var SeverityReportSchema = z32.object({
|
|
2850
|
+
stats: z32.array(SeverityStatsSchema),
|
|
2851
|
+
successful: z32.number().int().optional(),
|
|
2852
|
+
failed: z32.number().int().optional(),
|
|
2853
|
+
total_attacks: z32.number().int().optional()
|
|
2854
|
+
}).passthrough();
|
|
2855
|
+
var ComplianceTechniqueSchema = z32.object({
|
|
2856
|
+
id: z32.string(),
|
|
2857
|
+
display_name: z32.string(),
|
|
2858
|
+
compliance_id: z32.string(),
|
|
2859
|
+
description: z32.string(),
|
|
2860
|
+
link: z32.string(),
|
|
2861
|
+
version: z32.string(),
|
|
2862
|
+
active: z32.boolean(),
|
|
2863
|
+
successful: z32.number().int().optional(),
|
|
2864
|
+
failed: z32.number().int().optional(),
|
|
2865
|
+
total: z32.number().int().optional()
|
|
2866
|
+
}).passthrough();
|
|
2867
|
+
var ComplianceReportSchema = z32.object({
|
|
2868
|
+
id: z32.string(),
|
|
2869
|
+
display_name: z32.string(),
|
|
2870
|
+
description: z32.string(),
|
|
2871
|
+
active: z32.boolean(),
|
|
2872
|
+
version: z32.string(),
|
|
2873
|
+
link: z32.string(),
|
|
2874
|
+
techniques: z32.array(ComplianceTechniqueSchema),
|
|
2875
|
+
score: z32.number().int().optional()
|
|
2876
|
+
}).passthrough();
|
|
2877
|
+
var RuntimeSecurityPolicySchema = z32.object({
|
|
2878
|
+
policy_id: z32.string(),
|
|
2879
|
+
display_name: z32.string(),
|
|
2880
|
+
config: z32.record(z32.unknown())
|
|
2881
|
+
}).passthrough();
|
|
2882
|
+
var StaticJobRemediationSchema = z32.object({
|
|
2883
|
+
remediation: z32.string(),
|
|
2884
|
+
description: z32.string(),
|
|
2885
|
+
mapping_remediation_id: z32.string().nullable().optional(),
|
|
2886
|
+
subcategories: z32.array(z32.string()).nullable().optional(),
|
|
2887
|
+
effectiveness: z32.number().int().optional(),
|
|
2888
|
+
ease_of_implementation: z32.number().int().optional(),
|
|
2889
|
+
priority: z32.number().int().optional(),
|
|
2890
|
+
resource_links: z32.array(z32.string()).optional(),
|
|
2891
|
+
categories: z32.array(z32.string()).nullable().optional()
|
|
2892
|
+
}).passthrough();
|
|
2893
|
+
var StaticJobRemediationRecommendationSchema = z32.object({
|
|
2894
|
+
runtime_security_policy_configuration: z32.array(RuntimeSecurityPolicySchema).nullable().optional(),
|
|
2895
|
+
other_measures: z32.array(StaticJobRemediationSchema).optional()
|
|
2896
|
+
}).passthrough();
|
|
2897
|
+
var StaticJobReportSchema = z32.object({
|
|
2438
2898
|
severity_report: SeverityReportSchema,
|
|
2439
|
-
asr:
|
|
2440
|
-
score:
|
|
2899
|
+
asr: z32.number().nullable().optional(),
|
|
2900
|
+
score: z32.number().nullable().optional(),
|
|
2441
2901
|
security_report: CategoryReportSchema.nullable().optional(),
|
|
2442
2902
|
safety_report: CategoryReportSchema.nullable().optional(),
|
|
2443
2903
|
brand_report: CategoryReportSchema.nullable().optional(),
|
|
2444
|
-
compliance_report:
|
|
2445
|
-
report_summary:
|
|
2904
|
+
compliance_report: z32.array(ComplianceReportSchema).nullable().optional(),
|
|
2905
|
+
report_summary: z32.string().nullable().optional(),
|
|
2446
2906
|
recommendations: StaticJobRemediationRecommendationSchema.nullable().optional()
|
|
2447
2907
|
}).passthrough();
|
|
2448
|
-
var DynamicJobReportSchema =
|
|
2449
|
-
total_goals:
|
|
2450
|
-
total_streams:
|
|
2451
|
-
total_threats:
|
|
2452
|
-
goals_achieved:
|
|
2453
|
-
report_summary:
|
|
2454
|
-
score:
|
|
2455
|
-
asr:
|
|
2456
|
-
}).passthrough();
|
|
2457
|
-
var RemediationDetailSchema =
|
|
2458
|
-
remediation:
|
|
2459
|
-
description:
|
|
2460
|
-
resource_links:
|
|
2461
|
-
priority_level:
|
|
2462
|
-
ease_of_implementation_level:
|
|
2463
|
-
effectiveness_level:
|
|
2464
|
-
}).passthrough();
|
|
2465
|
-
var RemediationResponseSchema =
|
|
2466
|
-
var RuntimeSecurityProfileResponseSchema =
|
|
2467
|
-
runtime_security_profile:
|
|
2468
|
-
}).passthrough();
|
|
2469
|
-
var GoalSchema =
|
|
2470
|
-
goal:
|
|
2471
|
-
safe_response:
|
|
2472
|
-
jailbroken_response:
|
|
2473
|
-
goal_metadata:
|
|
2474
|
-
custom_goal:
|
|
2475
|
-
goal_type:
|
|
2476
|
-
uuid:
|
|
2477
|
-
tsg_id:
|
|
2478
|
-
job_id:
|
|
2479
|
-
goal_to_show:
|
|
2480
|
-
threat:
|
|
2481
|
-
version:
|
|
2482
|
-
extra_info:
|
|
2483
|
-
}).passthrough();
|
|
2484
|
-
var GoalListResponseSchema =
|
|
2485
|
-
var StreamIterationDataSchema =
|
|
2486
|
-
uuid:
|
|
2487
|
-
tsg_id:
|
|
2488
|
-
job_id:
|
|
2489
|
-
stream_id:
|
|
2490
|
-
goal_id:
|
|
2491
|
-
iteration:
|
|
2492
|
-
prompt:
|
|
2493
|
-
techniques:
|
|
2494
|
-
improvement:
|
|
2495
|
-
prompts_objective:
|
|
2496
|
-
summary:
|
|
2497
|
-
output:
|
|
2498
|
-
score:
|
|
2499
|
-
judge_reasoning:
|
|
2500
|
-
threat:
|
|
2501
|
-
created_at:
|
|
2502
|
-
updated_at:
|
|
2503
|
-
extra_info:
|
|
2504
|
-
version:
|
|
2505
|
-
}).passthrough();
|
|
2506
|
-
var StreamDetailResponseSchema =
|
|
2507
|
-
uuid:
|
|
2508
|
-
tsg_id:
|
|
2509
|
-
job_id:
|
|
2510
|
-
target_id:
|
|
2511
|
-
goal_id:
|
|
2512
|
-
stream_idx:
|
|
2513
|
-
iteration:
|
|
2514
|
-
goal:
|
|
2515
|
-
marked_safe:
|
|
2516
|
-
stream_type:
|
|
2517
|
-
threat:
|
|
2908
|
+
var DynamicJobReportSchema = z32.object({
|
|
2909
|
+
total_goals: z32.number().int().optional(),
|
|
2910
|
+
total_streams: z32.number().int().optional(),
|
|
2911
|
+
total_threats: z32.number().int().optional(),
|
|
2912
|
+
goals_achieved: z32.number().int().optional(),
|
|
2913
|
+
report_summary: z32.string().nullable().optional(),
|
|
2914
|
+
score: z32.number().optional(),
|
|
2915
|
+
asr: z32.number().optional()
|
|
2916
|
+
}).passthrough();
|
|
2917
|
+
var RemediationDetailSchema = z32.object({
|
|
2918
|
+
remediation: z32.string(),
|
|
2919
|
+
description: z32.string(),
|
|
2920
|
+
resource_links: z32.array(z32.string()).optional(),
|
|
2921
|
+
priority_level: z32.string().optional(),
|
|
2922
|
+
ease_of_implementation_level: z32.string().optional(),
|
|
2923
|
+
effectiveness_level: z32.string().optional()
|
|
2924
|
+
}).passthrough();
|
|
2925
|
+
var RemediationResponseSchema = z32.object({ remediations: z32.array(RemediationDetailSchema).optional() }).passthrough();
|
|
2926
|
+
var RuntimeSecurityProfileResponseSchema = z32.object({
|
|
2927
|
+
runtime_security_profile: z32.array(RuntimeSecurityPolicySchema).nullable().optional()
|
|
2928
|
+
}).passthrough();
|
|
2929
|
+
var GoalSchema = z32.object({
|
|
2930
|
+
goal: z32.string(),
|
|
2931
|
+
safe_response: z32.string(),
|
|
2932
|
+
jailbroken_response: z32.string(),
|
|
2933
|
+
goal_metadata: z32.record(z32.unknown()).optional(),
|
|
2934
|
+
custom_goal: z32.boolean().optional(),
|
|
2935
|
+
goal_type: z32.string().optional(),
|
|
2936
|
+
uuid: z32.string(),
|
|
2937
|
+
tsg_id: z32.string(),
|
|
2938
|
+
job_id: z32.string(),
|
|
2939
|
+
goal_to_show: z32.string().nullable().optional(),
|
|
2940
|
+
threat: z32.boolean().optional(),
|
|
2941
|
+
version: z32.number().int().nullable().optional(),
|
|
2942
|
+
extra_info: z32.record(z32.unknown()).nullable().optional()
|
|
2943
|
+
}).passthrough();
|
|
2944
|
+
var GoalListResponseSchema = z32.object({ pagination: RedTeamPaginationSchema, data: z32.array(GoalSchema) }).passthrough();
|
|
2945
|
+
var StreamIterationDataSchema = z32.object({
|
|
2946
|
+
uuid: z32.string(),
|
|
2947
|
+
tsg_id: z32.string(),
|
|
2948
|
+
job_id: z32.string(),
|
|
2949
|
+
stream_id: z32.string(),
|
|
2950
|
+
goal_id: z32.string(),
|
|
2951
|
+
iteration: z32.number().int(),
|
|
2952
|
+
prompt: z32.string(),
|
|
2953
|
+
techniques: z32.string(),
|
|
2954
|
+
improvement: z32.string(),
|
|
2955
|
+
prompts_objective: z32.string(),
|
|
2956
|
+
summary: z32.string(),
|
|
2957
|
+
output: z32.string().nullable().optional(),
|
|
2958
|
+
score: z32.number().int().nullable().optional(),
|
|
2959
|
+
judge_reasoning: z32.string().nullable().optional(),
|
|
2960
|
+
threat: z32.boolean().optional(),
|
|
2961
|
+
created_at: z32.string().nullable().optional(),
|
|
2962
|
+
updated_at: z32.string().nullable().optional(),
|
|
2963
|
+
extra_info: z32.record(z32.unknown()).nullable().optional(),
|
|
2964
|
+
version: z32.number().int().nullable().optional()
|
|
2965
|
+
}).passthrough();
|
|
2966
|
+
var StreamDetailResponseSchema = z32.object({
|
|
2967
|
+
uuid: z32.string(),
|
|
2968
|
+
tsg_id: z32.string(),
|
|
2969
|
+
job_id: z32.string(),
|
|
2970
|
+
target_id: z32.string(),
|
|
2971
|
+
goal_id: z32.string(),
|
|
2972
|
+
stream_idx: z32.number().int().optional(),
|
|
2973
|
+
iteration: z32.number().int().optional(),
|
|
2974
|
+
goal: z32.unknown().optional(),
|
|
2975
|
+
marked_safe: z32.boolean().optional(),
|
|
2976
|
+
stream_type: z32.string().nullable().optional(),
|
|
2977
|
+
threat: z32.boolean().optional(),
|
|
2518
2978
|
first_threat_iteration: StreamIterationDataSchema.nullable().optional(),
|
|
2519
|
-
created_at:
|
|
2520
|
-
updated_at:
|
|
2521
|
-
extra_info:
|
|
2522
|
-
version:
|
|
2523
|
-
iterations:
|
|
2524
|
-
}).passthrough();
|
|
2525
|
-
var StreamListResponseSchema =
|
|
2526
|
-
var CustomAttackOutputSchema =
|
|
2527
|
-
uuid:
|
|
2528
|
-
tsg_id:
|
|
2529
|
-
custom_attack_id:
|
|
2530
|
-
job_id:
|
|
2531
|
-
target_id:
|
|
2532
|
-
output:
|
|
2533
|
-
threat:
|
|
2534
|
-
marked_safe:
|
|
2535
|
-
}).passthrough();
|
|
2536
|
-
var PropertyAssignmentSchema =
|
|
2537
|
-
name:
|
|
2538
|
-
value:
|
|
2539
|
-
}).passthrough();
|
|
2540
|
-
var PropertyValueStatisticSchema =
|
|
2541
|
-
value:
|
|
2542
|
-
successful_attack_count:
|
|
2543
|
-
total_attack_count:
|
|
2544
|
-
success_rate:
|
|
2545
|
-
}).passthrough();
|
|
2546
|
-
var PropertyStatisticSchema =
|
|
2547
|
-
property_name:
|
|
2548
|
-
values:
|
|
2549
|
-
}).passthrough();
|
|
2550
|
-
var PromptSetSummarySchema =
|
|
2551
|
-
prompt_set_id:
|
|
2552
|
-
prompt_set_name:
|
|
2553
|
-
total_prompts:
|
|
2554
|
-
total_attacks:
|
|
2555
|
-
total_threats:
|
|
2556
|
-
failed_attacks:
|
|
2557
|
-
threat_rate:
|
|
2558
|
-
property_names:
|
|
2559
|
-
property_statistics:
|
|
2560
|
-
}).passthrough();
|
|
2561
|
-
var CustomAttackReportResponseSchema =
|
|
2562
|
-
total_prompts:
|
|
2563
|
-
total_attacks:
|
|
2564
|
-
total_threats:
|
|
2565
|
-
failed_attacks:
|
|
2566
|
-
score:
|
|
2567
|
-
asr:
|
|
2568
|
-
custom_attack_reports:
|
|
2569
|
-
property_statistics:
|
|
2570
|
-
}).passthrough();
|
|
2571
|
-
var PromptSetsReportResponseSchema =
|
|
2572
|
-
prompt_sets:
|
|
2573
|
-
total_prompt_sets:
|
|
2574
|
-
applied_filters:
|
|
2575
|
-
}).passthrough();
|
|
2576
|
-
var PromptDetailResponseSchema =
|
|
2577
|
-
prompt_id:
|
|
2578
|
-
prompt_text:
|
|
2579
|
-
goal:
|
|
2580
|
-
user_defined_goal:
|
|
2581
|
-
properties:
|
|
2582
|
-
attack_id:
|
|
2583
|
-
threat:
|
|
2584
|
-
attack_outputs:
|
|
2585
|
-
asr:
|
|
2586
|
-
prompt_set_id:
|
|
2587
|
-
prompt_set_name:
|
|
2588
|
-
}).passthrough();
|
|
2589
|
-
var CustomAttacksListResponseSchema =
|
|
2979
|
+
created_at: z32.string().nullable().optional(),
|
|
2980
|
+
updated_at: z32.string().nullable().optional(),
|
|
2981
|
+
extra_info: z32.record(z32.unknown()).optional(),
|
|
2982
|
+
version: z32.number().int().nullable().optional(),
|
|
2983
|
+
iterations: z32.array(StreamIterationDataSchema).optional()
|
|
2984
|
+
}).passthrough();
|
|
2985
|
+
var StreamListResponseSchema = z32.object({ pagination: RedTeamPaginationSchema, data: z32.array(StreamDetailResponseSchema) }).passthrough();
|
|
2986
|
+
var CustomAttackOutputSchema = z32.object({
|
|
2987
|
+
uuid: z32.string(),
|
|
2988
|
+
tsg_id: z32.string(),
|
|
2989
|
+
custom_attack_id: z32.string(),
|
|
2990
|
+
job_id: z32.string(),
|
|
2991
|
+
target_id: z32.string(),
|
|
2992
|
+
output: z32.string(),
|
|
2993
|
+
threat: z32.boolean().nullable().optional(),
|
|
2994
|
+
marked_safe: z32.boolean().nullable().optional()
|
|
2995
|
+
}).passthrough();
|
|
2996
|
+
var PropertyAssignmentSchema = z32.object({
|
|
2997
|
+
name: z32.string(),
|
|
2998
|
+
value: z32.string()
|
|
2999
|
+
}).passthrough();
|
|
3000
|
+
var PropertyValueStatisticSchema = z32.object({
|
|
3001
|
+
value: z32.string(),
|
|
3002
|
+
successful_attack_count: z32.number().int(),
|
|
3003
|
+
total_attack_count: z32.number().int(),
|
|
3004
|
+
success_rate: z32.number()
|
|
3005
|
+
}).passthrough();
|
|
3006
|
+
var PropertyStatisticSchema = z32.object({
|
|
3007
|
+
property_name: z32.string(),
|
|
3008
|
+
values: z32.array(PropertyValueStatisticSchema)
|
|
3009
|
+
}).passthrough();
|
|
3010
|
+
var PromptSetSummarySchema = z32.object({
|
|
3011
|
+
prompt_set_id: z32.string(),
|
|
3012
|
+
prompt_set_name: z32.string(),
|
|
3013
|
+
total_prompts: z32.number().int(),
|
|
3014
|
+
total_attacks: z32.number().int(),
|
|
3015
|
+
total_threats: z32.number().int(),
|
|
3016
|
+
failed_attacks: z32.number().int(),
|
|
3017
|
+
threat_rate: z32.number(),
|
|
3018
|
+
property_names: z32.array(z32.string()).optional(),
|
|
3019
|
+
property_statistics: z32.array(PropertyStatisticSchema).optional()
|
|
3020
|
+
}).passthrough();
|
|
3021
|
+
var CustomAttackReportResponseSchema = z32.object({
|
|
3022
|
+
total_prompts: z32.number().int(),
|
|
3023
|
+
total_attacks: z32.number().int(),
|
|
3024
|
+
total_threats: z32.number().int(),
|
|
3025
|
+
failed_attacks: z32.number().int(),
|
|
3026
|
+
score: z32.number(),
|
|
3027
|
+
asr: z32.number(),
|
|
3028
|
+
custom_attack_reports: z32.array(PromptSetSummarySchema).optional(),
|
|
3029
|
+
property_statistics: z32.array(PropertyStatisticSchema).optional()
|
|
3030
|
+
}).passthrough();
|
|
3031
|
+
var PromptSetsReportResponseSchema = z32.object({
|
|
3032
|
+
prompt_sets: z32.array(PromptSetSummarySchema),
|
|
3033
|
+
total_prompt_sets: z32.number().int(),
|
|
3034
|
+
applied_filters: z32.record(z32.unknown()).optional()
|
|
3035
|
+
}).passthrough();
|
|
3036
|
+
var PromptDetailResponseSchema = z32.object({
|
|
3037
|
+
prompt_id: z32.string(),
|
|
3038
|
+
prompt_text: z32.string(),
|
|
3039
|
+
goal: z32.string().nullable().optional(),
|
|
3040
|
+
user_defined_goal: z32.boolean().optional(),
|
|
3041
|
+
properties: z32.array(PropertyAssignmentSchema).optional(),
|
|
3042
|
+
attack_id: z32.string().nullable().optional(),
|
|
3043
|
+
threat: z32.boolean().nullable().optional(),
|
|
3044
|
+
attack_outputs: z32.array(CustomAttackOutputSchema).optional(),
|
|
3045
|
+
asr: z32.number().nullable().optional(),
|
|
3046
|
+
prompt_set_id: z32.string().nullable().optional(),
|
|
3047
|
+
prompt_set_name: z32.string().nullable().optional()
|
|
3048
|
+
}).passthrough();
|
|
3049
|
+
var CustomAttacksListResponseSchema = z32.object({
|
|
2590
3050
|
pagination: RedTeamPaginationSchema,
|
|
2591
|
-
data:
|
|
2592
|
-
total_attacks:
|
|
2593
|
-
total_threats:
|
|
2594
|
-
}).passthrough();
|
|
2595
|
-
var RiskLevelSchema =
|
|
2596
|
-
risk_rating:
|
|
2597
|
-
total:
|
|
2598
|
-
targets_by_type:
|
|
2599
|
-
}).passthrough();
|
|
2600
|
-
var ScanStatisticsResponseSchema =
|
|
2601
|
-
total_scans:
|
|
2602
|
-
targets_scanned:
|
|
2603
|
-
targets_scanned_by_type:
|
|
2604
|
-
scan_status:
|
|
2605
|
-
risk_profile:
|
|
2606
|
-
}).passthrough();
|
|
2607
|
-
var ScoreTrendSeriesSchema =
|
|
2608
|
-
label:
|
|
2609
|
-
data:
|
|
2610
|
-
}).passthrough();
|
|
2611
|
-
var ScoreTrendResponseSchema =
|
|
2612
|
-
labels:
|
|
2613
|
-
series:
|
|
2614
|
-
}).passthrough();
|
|
2615
|
-
var SentimentRequestSchema =
|
|
2616
|
-
job_id:
|
|
2617
|
-
up_vote:
|
|
2618
|
-
down_vote:
|
|
2619
|
-
}).passthrough();
|
|
2620
|
-
var SentimentResponseSchema =
|
|
2621
|
-
job_id:
|
|
2622
|
-
up_vote:
|
|
2623
|
-
down_vote:
|
|
2624
|
-
}).passthrough();
|
|
2625
|
-
var QuotaDetailsSchema =
|
|
2626
|
-
allocated:
|
|
2627
|
-
unlimited:
|
|
2628
|
-
consumed:
|
|
2629
|
-
}).passthrough();
|
|
2630
|
-
var QuotaSummarySchema =
|
|
3051
|
+
data: z32.array(z32.unknown()),
|
|
3052
|
+
total_attacks: z32.number().int(),
|
|
3053
|
+
total_threats: z32.number().int()
|
|
3054
|
+
}).passthrough();
|
|
3055
|
+
var RiskLevelSchema = z32.object({
|
|
3056
|
+
risk_rating: z32.string(),
|
|
3057
|
+
total: z32.number().int(),
|
|
3058
|
+
targets_by_type: z32.array(CountByNameSchema).optional()
|
|
3059
|
+
}).passthrough();
|
|
3060
|
+
var ScanStatisticsResponseSchema = z32.object({
|
|
3061
|
+
total_scans: z32.number().int(),
|
|
3062
|
+
targets_scanned: z32.number().int(),
|
|
3063
|
+
targets_scanned_by_type: z32.array(CountByNameSchema).optional(),
|
|
3064
|
+
scan_status: z32.array(CountByNameSchema).optional(),
|
|
3065
|
+
risk_profile: z32.array(RiskLevelSchema).optional()
|
|
3066
|
+
}).passthrough();
|
|
3067
|
+
var ScoreTrendSeriesSchema = z32.object({
|
|
3068
|
+
label: z32.string(),
|
|
3069
|
+
data: z32.array(z32.number().nullable())
|
|
3070
|
+
}).passthrough();
|
|
3071
|
+
var ScoreTrendResponseSchema = z32.object({
|
|
3072
|
+
labels: z32.array(z32.string()),
|
|
3073
|
+
series: z32.array(ScoreTrendSeriesSchema)
|
|
3074
|
+
}).passthrough();
|
|
3075
|
+
var SentimentRequestSchema = z32.object({
|
|
3076
|
+
job_id: z32.string(),
|
|
3077
|
+
up_vote: z32.boolean().optional(),
|
|
3078
|
+
down_vote: z32.boolean().optional()
|
|
3079
|
+
}).passthrough();
|
|
3080
|
+
var SentimentResponseSchema = z32.object({
|
|
3081
|
+
job_id: z32.string(),
|
|
3082
|
+
up_vote: z32.boolean().optional(),
|
|
3083
|
+
down_vote: z32.boolean().optional()
|
|
3084
|
+
}).passthrough();
|
|
3085
|
+
var QuotaDetailsSchema = z32.object({
|
|
3086
|
+
allocated: z32.number().int(),
|
|
3087
|
+
unlimited: z32.boolean(),
|
|
3088
|
+
consumed: z32.number().int()
|
|
3089
|
+
}).passthrough();
|
|
3090
|
+
var QuotaSummarySchema = z32.object({
|
|
2631
3091
|
static: QuotaDetailsSchema,
|
|
2632
3092
|
dynamic: QuotaDetailsSchema,
|
|
2633
3093
|
custom: QuotaDetailsSchema
|
|
2634
3094
|
}).passthrough();
|
|
2635
|
-
var ErrorLogSchema =
|
|
2636
|
-
created_at:
|
|
2637
|
-
updated_at:
|
|
2638
|
-
job_id:
|
|
2639
|
-
target_id:
|
|
2640
|
-
target_version:
|
|
2641
|
-
attack_id:
|
|
2642
|
-
error_type:
|
|
2643
|
-
error_source:
|
|
2644
|
-
error_message:
|
|
2645
|
-
target_object:
|
|
2646
|
-
extra_info:
|
|
2647
|
-
version:
|
|
2648
|
-
}).passthrough();
|
|
2649
|
-
var ErrorLogListResponseSchema =
|
|
3095
|
+
var ErrorLogSchema = z32.object({
|
|
3096
|
+
created_at: z32.string(),
|
|
3097
|
+
updated_at: z32.string(),
|
|
3098
|
+
job_id: z32.string().nullable().optional(),
|
|
3099
|
+
target_id: z32.string().nullable().optional(),
|
|
3100
|
+
target_version: z32.number().int().nullable().optional(),
|
|
3101
|
+
attack_id: z32.string().nullable().optional(),
|
|
3102
|
+
error_type: z32.string().nullable().optional(),
|
|
3103
|
+
error_source: z32.string().nullable().optional(),
|
|
3104
|
+
error_message: z32.string().nullable().optional(),
|
|
3105
|
+
target_object: z32.record(z32.unknown()).nullable().optional(),
|
|
3106
|
+
extra_info: z32.record(z32.unknown()).nullable().optional(),
|
|
3107
|
+
version: z32.number().int().optional()
|
|
3108
|
+
}).passthrough();
|
|
3109
|
+
var ErrorLogListResponseSchema = z32.object({ pagination: RedTeamPaginationSchema, data: z32.array(ErrorLogSchema) }).passthrough();
|
|
2650
3110
|
var TargetRequestBaseFields = {
|
|
2651
|
-
name:
|
|
2652
|
-
description:
|
|
2653
|
-
target_type:
|
|
2654
|
-
connection_type:
|
|
2655
|
-
api_endpoint_type:
|
|
2656
|
-
response_mode:
|
|
2657
|
-
connection_params:
|
|
2658
|
-
session_supported:
|
|
3111
|
+
name: z32.string(),
|
|
3112
|
+
description: z32.string().nullable().optional(),
|
|
3113
|
+
target_type: z32.string().nullable().optional(),
|
|
3114
|
+
connection_type: z32.string().nullable().optional(),
|
|
3115
|
+
api_endpoint_type: z32.string().nullable().optional(),
|
|
3116
|
+
response_mode: z32.string().nullable().optional(),
|
|
3117
|
+
connection_params: z32.union([RestConnectionParamsSchema, StreamingConnectionParamsSchema]).nullable().optional(),
|
|
3118
|
+
session_supported: z32.boolean().optional(),
|
|
2659
3119
|
target_metadata: TargetMetadataSchema.optional(),
|
|
2660
3120
|
target_background: TargetBackgroundSchema.nullable().optional(),
|
|
2661
3121
|
additional_context: TargetAdditionalContextSchema.nullable().optional(),
|
|
2662
|
-
extra_info:
|
|
2663
|
-
network_broker_channel_uuid:
|
|
3122
|
+
extra_info: z32.record(z32.unknown()).nullable().optional(),
|
|
3123
|
+
network_broker_channel_uuid: z32.string().nullable().optional()
|
|
2664
3124
|
};
|
|
2665
|
-
var TargetCreateRequestSchema =
|
|
2666
|
-
var TargetUpdateRequestSchema =
|
|
2667
|
-
var TargetContextUpdateSchema =
|
|
3125
|
+
var TargetCreateRequestSchema = z32.object(TargetRequestBaseFields).strict();
|
|
3126
|
+
var TargetUpdateRequestSchema = z32.object(TargetRequestBaseFields).strict();
|
|
3127
|
+
var TargetContextUpdateSchema = z32.object({
|
|
2668
3128
|
target_background: TargetBackgroundSchema.nullable().optional(),
|
|
2669
3129
|
additional_context: TargetAdditionalContextSchema.nullable().optional()
|
|
2670
3130
|
}).passthrough();
|
|
2671
|
-
var TargetResponseSchema =
|
|
2672
|
-
uuid:
|
|
2673
|
-
tsg_id:
|
|
2674
|
-
name:
|
|
2675
|
-
status:
|
|
2676
|
-
active:
|
|
2677
|
-
validated:
|
|
2678
|
-
created_at:
|
|
2679
|
-
updated_at:
|
|
2680
|
-
description:
|
|
2681
|
-
target_type:
|
|
2682
|
-
connection_type:
|
|
2683
|
-
api_endpoint_type:
|
|
2684
|
-
response_mode:
|
|
2685
|
-
session_supported:
|
|
2686
|
-
extra_info:
|
|
2687
|
-
version:
|
|
2688
|
-
secret_version:
|
|
2689
|
-
created_by_user_id:
|
|
2690
|
-
updated_by_user_id:
|
|
2691
|
-
target_metadata:
|
|
2692
|
-
target_background:
|
|
2693
|
-
profiling_status:
|
|
2694
|
-
additional_context:
|
|
2695
|
-
auth_type:
|
|
2696
|
-
}).passthrough();
|
|
2697
|
-
var TargetListItemSchema =
|
|
2698
|
-
uuid:
|
|
2699
|
-
tsg_id:
|
|
2700
|
-
name:
|
|
2701
|
-
status:
|
|
2702
|
-
active:
|
|
2703
|
-
validated:
|
|
2704
|
-
created_at:
|
|
2705
|
-
updated_at:
|
|
2706
|
-
description:
|
|
2707
|
-
target_type:
|
|
2708
|
-
connection_type:
|
|
2709
|
-
api_endpoint_type:
|
|
2710
|
-
response_mode:
|
|
2711
|
-
session_supported:
|
|
2712
|
-
extra_info:
|
|
2713
|
-
version:
|
|
2714
|
-
secret_version:
|
|
2715
|
-
created_by_user_id:
|
|
2716
|
-
updated_by_user_id:
|
|
2717
|
-
auth_type:
|
|
2718
|
-
}).passthrough();
|
|
2719
|
-
var TargetListSchema =
|
|
2720
|
-
var TargetProbeRequestSchema =
|
|
3131
|
+
var TargetResponseSchema = z32.object({
|
|
3132
|
+
uuid: z32.string(),
|
|
3133
|
+
tsg_id: z32.string(),
|
|
3134
|
+
name: z32.string(),
|
|
3135
|
+
status: z32.unknown(),
|
|
3136
|
+
active: z32.boolean(),
|
|
3137
|
+
validated: z32.boolean(),
|
|
3138
|
+
created_at: z32.string(),
|
|
3139
|
+
updated_at: z32.string(),
|
|
3140
|
+
description: z32.unknown().optional(),
|
|
3141
|
+
target_type: z32.unknown().optional(),
|
|
3142
|
+
connection_type: z32.unknown().optional(),
|
|
3143
|
+
api_endpoint_type: z32.unknown().optional(),
|
|
3144
|
+
response_mode: z32.unknown().optional(),
|
|
3145
|
+
session_supported: z32.boolean().optional(),
|
|
3146
|
+
extra_info: z32.unknown().optional(),
|
|
3147
|
+
version: z32.unknown().optional(),
|
|
3148
|
+
secret_version: z32.unknown().optional(),
|
|
3149
|
+
created_by_user_id: z32.unknown().optional(),
|
|
3150
|
+
updated_by_user_id: z32.unknown().optional(),
|
|
3151
|
+
target_metadata: z32.unknown().optional(),
|
|
3152
|
+
target_background: z32.unknown().optional(),
|
|
3153
|
+
profiling_status: z32.unknown().optional(),
|
|
3154
|
+
additional_context: z32.unknown().optional(),
|
|
3155
|
+
auth_type: z32.string().nullable().optional()
|
|
3156
|
+
}).passthrough();
|
|
3157
|
+
var TargetListItemSchema = z32.object({
|
|
3158
|
+
uuid: z32.string(),
|
|
3159
|
+
tsg_id: z32.string(),
|
|
3160
|
+
name: z32.string(),
|
|
3161
|
+
status: z32.unknown(),
|
|
3162
|
+
active: z32.boolean(),
|
|
3163
|
+
validated: z32.boolean(),
|
|
3164
|
+
created_at: z32.string(),
|
|
3165
|
+
updated_at: z32.string(),
|
|
3166
|
+
description: z32.unknown().optional(),
|
|
3167
|
+
target_type: z32.unknown().optional(),
|
|
3168
|
+
connection_type: z32.unknown().optional(),
|
|
3169
|
+
api_endpoint_type: z32.unknown().optional(),
|
|
3170
|
+
response_mode: z32.unknown().optional(),
|
|
3171
|
+
session_supported: z32.boolean().optional(),
|
|
3172
|
+
extra_info: z32.unknown().optional(),
|
|
3173
|
+
version: z32.unknown().optional(),
|
|
3174
|
+
secret_version: z32.unknown().optional(),
|
|
3175
|
+
created_by_user_id: z32.unknown().optional(),
|
|
3176
|
+
updated_by_user_id: z32.unknown().optional(),
|
|
3177
|
+
auth_type: z32.string().nullable().optional()
|
|
3178
|
+
}).passthrough();
|
|
3179
|
+
var TargetListSchema = z32.object({ pagination: RedTeamPaginationSchema, data: z32.array(TargetListItemSchema).optional() }).passthrough();
|
|
3180
|
+
var TargetProbeRequestSchema = z32.object({
|
|
2721
3181
|
...TargetRequestBaseFields,
|
|
2722
|
-
uuid:
|
|
2723
|
-
probe_fields:
|
|
3182
|
+
uuid: z32.string().nullable().optional(),
|
|
3183
|
+
probe_fields: z32.array(z32.string()).nullable().optional()
|
|
2724
3184
|
}).strict();
|
|
2725
|
-
var TargetAuthValidationRequestSchema =
|
|
2726
|
-
auth_type:
|
|
2727
|
-
auth_config:
|
|
2728
|
-
target_id:
|
|
2729
|
-
network_broker_channel_uuid:
|
|
2730
|
-
}).passthrough();
|
|
2731
|
-
var TargetAuthValidationResponseSchema =
|
|
2732
|
-
validated:
|
|
2733
|
-
token_preview:
|
|
2734
|
-
expires_in:
|
|
2735
|
-
}).passthrough();
|
|
2736
|
-
var TargetProfileResponseSchema =
|
|
2737
|
-
target_id:
|
|
2738
|
-
target_version:
|
|
2739
|
-
status:
|
|
2740
|
-
profiling_status:
|
|
2741
|
-
target_background:
|
|
2742
|
-
additional_context:
|
|
2743
|
-
ai_generated_fields:
|
|
2744
|
-
other_details:
|
|
2745
|
-
}).passthrough();
|
|
2746
|
-
var TargetTemplateCollectionSchema =
|
|
2747
|
-
OPENAI:
|
|
2748
|
-
HUGGING_FACE:
|
|
2749
|
-
DATABRICKS:
|
|
2750
|
-
BEDROCK:
|
|
2751
|
-
REST:
|
|
2752
|
-
STREAMING:
|
|
2753
|
-
WEBSOCKET:
|
|
2754
|
-
}).passthrough();
|
|
2755
|
-
var BaseResponseSchema =
|
|
2756
|
-
message:
|
|
2757
|
-
status:
|
|
2758
|
-
}).passthrough();
|
|
2759
|
-
var PromptSetStatsSchema =
|
|
2760
|
-
total_prompts:
|
|
2761
|
-
active_prompts:
|
|
2762
|
-
inactive_prompts:
|
|
2763
|
-
failed_prompts:
|
|
2764
|
-
validation_prompts:
|
|
2765
|
-
}).passthrough();
|
|
2766
|
-
var CustomPromptSetCreateRequestSchema =
|
|
2767
|
-
name:
|
|
2768
|
-
description:
|
|
2769
|
-
property_names:
|
|
2770
|
-
}).passthrough();
|
|
2771
|
-
var CustomPromptSetUpdateRequestSchema =
|
|
2772
|
-
name:
|
|
2773
|
-
description:
|
|
2774
|
-
archive:
|
|
2775
|
-
property_names:
|
|
2776
|
-
}).passthrough();
|
|
2777
|
-
var CustomPromptSetArchiveRequestSchema =
|
|
2778
|
-
var CustomPromptSetResponseSchema =
|
|
2779
|
-
uuid:
|
|
2780
|
-
name:
|
|
2781
|
-
active:
|
|
2782
|
-
archive:
|
|
2783
|
-
status:
|
|
2784
|
-
created_at:
|
|
2785
|
-
updated_at:
|
|
2786
|
-
description:
|
|
2787
|
-
property_names:
|
|
2788
|
-
properties:
|
|
2789
|
-
stats:
|
|
2790
|
-
extra_info:
|
|
2791
|
-
version:
|
|
2792
|
-
created_by_user_id:
|
|
2793
|
-
updated_by_user_id:
|
|
2794
|
-
}).passthrough();
|
|
2795
|
-
var CustomPromptSetListItemSchema =
|
|
2796
|
-
uuid:
|
|
2797
|
-
name:
|
|
2798
|
-
active:
|
|
2799
|
-
archive:
|
|
2800
|
-
status:
|
|
2801
|
-
created_at:
|
|
2802
|
-
updated_at:
|
|
2803
|
-
description:
|
|
2804
|
-
property_names:
|
|
2805
|
-
stats:
|
|
2806
|
-
created_by_user_id:
|
|
2807
|
-
}).passthrough();
|
|
2808
|
-
var CustomPromptSetListSchema =
|
|
3185
|
+
var TargetAuthValidationRequestSchema = z32.object({
|
|
3186
|
+
auth_type: z32.string(),
|
|
3187
|
+
auth_config: z32.unknown(),
|
|
3188
|
+
target_id: z32.string().nullable().optional(),
|
|
3189
|
+
network_broker_channel_uuid: z32.string().nullable().optional()
|
|
3190
|
+
}).passthrough();
|
|
3191
|
+
var TargetAuthValidationResponseSchema = z32.object({
|
|
3192
|
+
validated: z32.boolean(),
|
|
3193
|
+
token_preview: z32.string().nullable().optional(),
|
|
3194
|
+
expires_in: z32.number().int().nullable().optional()
|
|
3195
|
+
}).passthrough();
|
|
3196
|
+
var TargetProfileResponseSchema = z32.object({
|
|
3197
|
+
target_id: z32.string(),
|
|
3198
|
+
target_version: z32.number().int(),
|
|
3199
|
+
status: z32.string(),
|
|
3200
|
+
profiling_status: z32.unknown().optional(),
|
|
3201
|
+
target_background: z32.unknown().optional(),
|
|
3202
|
+
additional_context: z32.unknown().optional(),
|
|
3203
|
+
ai_generated_fields: z32.unknown().optional(),
|
|
3204
|
+
other_details: z32.unknown().optional()
|
|
3205
|
+
}).passthrough();
|
|
3206
|
+
var TargetTemplateCollectionSchema = z32.object({
|
|
3207
|
+
OPENAI: z32.record(z32.unknown()),
|
|
3208
|
+
HUGGING_FACE: z32.record(z32.unknown()),
|
|
3209
|
+
DATABRICKS: z32.record(z32.unknown()),
|
|
3210
|
+
BEDROCK: z32.record(z32.unknown()),
|
|
3211
|
+
REST: z32.record(z32.unknown()),
|
|
3212
|
+
STREAMING: z32.record(z32.unknown()),
|
|
3213
|
+
WEBSOCKET: z32.record(z32.unknown())
|
|
3214
|
+
}).passthrough();
|
|
3215
|
+
var BaseResponseSchema = z32.object({
|
|
3216
|
+
message: z32.string(),
|
|
3217
|
+
status: z32.number().int()
|
|
3218
|
+
}).passthrough();
|
|
3219
|
+
var PromptSetStatsSchema = z32.object({
|
|
3220
|
+
total_prompts: z32.number().int(),
|
|
3221
|
+
active_prompts: z32.number().int(),
|
|
3222
|
+
inactive_prompts: z32.number().int(),
|
|
3223
|
+
failed_prompts: z32.number().int().optional(),
|
|
3224
|
+
validation_prompts: z32.number().int().optional()
|
|
3225
|
+
}).passthrough();
|
|
3226
|
+
var CustomPromptSetCreateRequestSchema = z32.object({
|
|
3227
|
+
name: z32.string(),
|
|
3228
|
+
description: z32.unknown().optional(),
|
|
3229
|
+
property_names: z32.array(z32.string()).optional()
|
|
3230
|
+
}).passthrough();
|
|
3231
|
+
var CustomPromptSetUpdateRequestSchema = z32.object({
|
|
3232
|
+
name: z32.unknown().optional(),
|
|
3233
|
+
description: z32.unknown().optional(),
|
|
3234
|
+
archive: z32.unknown().optional(),
|
|
3235
|
+
property_names: z32.unknown().optional()
|
|
3236
|
+
}).passthrough();
|
|
3237
|
+
var CustomPromptSetArchiveRequestSchema = z32.object({ archive: z32.boolean() }).passthrough();
|
|
3238
|
+
var CustomPromptSetResponseSchema = z32.object({
|
|
3239
|
+
uuid: z32.string(),
|
|
3240
|
+
name: z32.string(),
|
|
3241
|
+
active: z32.boolean(),
|
|
3242
|
+
archive: z32.boolean(),
|
|
3243
|
+
status: z32.string(),
|
|
3244
|
+
created_at: z32.string(),
|
|
3245
|
+
updated_at: z32.string(),
|
|
3246
|
+
description: z32.unknown().optional(),
|
|
3247
|
+
property_names: z32.array(z32.string()).optional(),
|
|
3248
|
+
properties: z32.array(z32.unknown()).optional(),
|
|
3249
|
+
stats: z32.unknown().optional(),
|
|
3250
|
+
extra_info: z32.unknown().optional(),
|
|
3251
|
+
version: z32.unknown().optional(),
|
|
3252
|
+
created_by_user_id: z32.unknown().optional(),
|
|
3253
|
+
updated_by_user_id: z32.unknown().optional()
|
|
3254
|
+
}).passthrough();
|
|
3255
|
+
var CustomPromptSetListItemSchema = z32.object({
|
|
3256
|
+
uuid: z32.string(),
|
|
3257
|
+
name: z32.string(),
|
|
3258
|
+
active: z32.boolean(),
|
|
3259
|
+
archive: z32.boolean(),
|
|
3260
|
+
status: z32.string(),
|
|
3261
|
+
created_at: z32.string(),
|
|
3262
|
+
updated_at: z32.string(),
|
|
3263
|
+
description: z32.unknown().optional(),
|
|
3264
|
+
property_names: z32.array(z32.string()).optional(),
|
|
3265
|
+
stats: z32.unknown().optional(),
|
|
3266
|
+
created_by_user_id: z32.unknown().optional()
|
|
3267
|
+
}).passthrough();
|
|
3268
|
+
var CustomPromptSetListSchema = z32.object({
|
|
2809
3269
|
pagination: RedTeamPaginationSchema,
|
|
2810
|
-
data:
|
|
2811
|
-
}).passthrough();
|
|
2812
|
-
var CustomPromptSetReferenceSchema =
|
|
2813
|
-
uuid:
|
|
2814
|
-
name:
|
|
2815
|
-
status:
|
|
2816
|
-
active:
|
|
2817
|
-
tsg_id:
|
|
2818
|
-
created_at:
|
|
2819
|
-
updated_at:
|
|
2820
|
-
version:
|
|
2821
|
-
}).passthrough();
|
|
2822
|
-
var CustomPromptSetListActiveSchema =
|
|
2823
|
-
var CustomPromptSetVersionInfoSchema =
|
|
2824
|
-
uuid:
|
|
2825
|
-
status:
|
|
2826
|
-
is_latest:
|
|
2827
|
-
version:
|
|
3270
|
+
data: z32.array(CustomPromptSetListItemSchema).optional()
|
|
3271
|
+
}).passthrough();
|
|
3272
|
+
var CustomPromptSetReferenceSchema = z32.object({
|
|
3273
|
+
uuid: z32.string(),
|
|
3274
|
+
name: z32.string(),
|
|
3275
|
+
status: z32.string(),
|
|
3276
|
+
active: z32.boolean(),
|
|
3277
|
+
tsg_id: z32.string(),
|
|
3278
|
+
created_at: z32.string(),
|
|
3279
|
+
updated_at: z32.string(),
|
|
3280
|
+
version: z32.unknown().optional()
|
|
3281
|
+
}).passthrough();
|
|
3282
|
+
var CustomPromptSetListActiveSchema = z32.object({ data: z32.array(CustomPromptSetReferenceSchema).optional() }).passthrough();
|
|
3283
|
+
var CustomPromptSetVersionInfoSchema = z32.object({
|
|
3284
|
+
uuid: z32.string(),
|
|
3285
|
+
status: z32.string(),
|
|
3286
|
+
is_latest: z32.boolean(),
|
|
3287
|
+
version: z32.string().nullable().optional(),
|
|
2828
3288
|
stats: PromptSetStatsSchema.nullable().optional(),
|
|
2829
|
-
snapshot_created_at:
|
|
2830
|
-
}).passthrough();
|
|
2831
|
-
var CustomPromptCreateRequestSchema =
|
|
2832
|
-
prompt:
|
|
2833
|
-
prompt_set_id:
|
|
2834
|
-
goal:
|
|
2835
|
-
properties:
|
|
2836
|
-
}).passthrough();
|
|
2837
|
-
var CustomPromptUpdateRequestSchema =
|
|
2838
|
-
prompt:
|
|
2839
|
-
goal:
|
|
2840
|
-
properties:
|
|
2841
|
-
}).passthrough();
|
|
2842
|
-
var CustomPromptResponseSchema =
|
|
2843
|
-
uuid:
|
|
2844
|
-
prompt:
|
|
2845
|
-
user_defined_goal:
|
|
2846
|
-
status:
|
|
2847
|
-
active:
|
|
2848
|
-
prompt_set_id:
|
|
2849
|
-
created_at:
|
|
2850
|
-
updated_at:
|
|
2851
|
-
goal:
|
|
2852
|
-
properties:
|
|
2853
|
-
property_assignments:
|
|
2854
|
-
detector_category:
|
|
2855
|
-
severity:
|
|
2856
|
-
extra_info:
|
|
2857
|
-
}).passthrough();
|
|
2858
|
-
var CustomPromptListItemSchema =
|
|
2859
|
-
uuid:
|
|
2860
|
-
prompt:
|
|
2861
|
-
user_defined_goal:
|
|
2862
|
-
status:
|
|
2863
|
-
active:
|
|
2864
|
-
created_at:
|
|
2865
|
-
updated_at:
|
|
2866
|
-
goal:
|
|
2867
|
-
properties:
|
|
2868
|
-
}).passthrough();
|
|
2869
|
-
var CustomPromptListSchema =
|
|
3289
|
+
snapshot_created_at: z32.string().nullable().optional()
|
|
3290
|
+
}).passthrough();
|
|
3291
|
+
var CustomPromptCreateRequestSchema = z32.object({
|
|
3292
|
+
prompt: z32.string(),
|
|
3293
|
+
prompt_set_id: z32.string(),
|
|
3294
|
+
goal: z32.unknown().optional(),
|
|
3295
|
+
properties: z32.unknown().optional()
|
|
3296
|
+
}).passthrough();
|
|
3297
|
+
var CustomPromptUpdateRequestSchema = z32.object({
|
|
3298
|
+
prompt: z32.unknown().optional(),
|
|
3299
|
+
goal: z32.unknown().optional(),
|
|
3300
|
+
properties: z32.unknown().optional()
|
|
3301
|
+
}).passthrough();
|
|
3302
|
+
var CustomPromptResponseSchema = z32.object({
|
|
3303
|
+
uuid: z32.string(),
|
|
3304
|
+
prompt: z32.string(),
|
|
3305
|
+
user_defined_goal: z32.boolean(),
|
|
3306
|
+
status: z32.string(),
|
|
3307
|
+
active: z32.boolean(),
|
|
3308
|
+
prompt_set_id: z32.string(),
|
|
3309
|
+
created_at: z32.string(),
|
|
3310
|
+
updated_at: z32.string(),
|
|
3311
|
+
goal: z32.unknown().optional(),
|
|
3312
|
+
properties: z32.unknown().optional(),
|
|
3313
|
+
property_assignments: z32.array(z32.unknown()).optional(),
|
|
3314
|
+
detector_category: z32.unknown().optional(),
|
|
3315
|
+
severity: z32.unknown().optional(),
|
|
3316
|
+
extra_info: z32.unknown().optional()
|
|
3317
|
+
}).passthrough();
|
|
3318
|
+
var CustomPromptListItemSchema = z32.object({
|
|
3319
|
+
uuid: z32.string(),
|
|
3320
|
+
prompt: z32.string(),
|
|
3321
|
+
user_defined_goal: z32.boolean(),
|
|
3322
|
+
status: z32.string(),
|
|
3323
|
+
active: z32.boolean(),
|
|
3324
|
+
created_at: z32.string(),
|
|
3325
|
+
updated_at: z32.string(),
|
|
3326
|
+
goal: z32.unknown().optional(),
|
|
3327
|
+
properties: z32.unknown().optional()
|
|
3328
|
+
}).passthrough();
|
|
3329
|
+
var CustomPromptListSchema = z32.object({
|
|
2870
3330
|
pagination: RedTeamPaginationSchema,
|
|
2871
|
-
data:
|
|
2872
|
-
}).passthrough();
|
|
2873
|
-
var PropertyNameCreateRequestSchema =
|
|
2874
|
-
var PropertyValueCreateRequestSchema =
|
|
2875
|
-
property_name:
|
|
2876
|
-
property_value:
|
|
2877
|
-
}).passthrough();
|
|
2878
|
-
var PropertyDefinitionSchema =
|
|
2879
|
-
property_name:
|
|
2880
|
-
created_at:
|
|
2881
|
-
}).passthrough();
|
|
2882
|
-
var PropertyNamesListResponseSchema =
|
|
2883
|
-
var PropertyValuesResponseSchema =
|
|
2884
|
-
name:
|
|
2885
|
-
values:
|
|
2886
|
-
}).passthrough();
|
|
2887
|
-
var PropertyValuesMultipleResponseSchema =
|
|
2888
|
-
var DashboardOverviewResponseSchema =
|
|
2889
|
-
total_targets:
|
|
2890
|
-
targets_by_type:
|
|
2891
|
-
}).passthrough();
|
|
2892
|
-
var EulaAcceptRequestSchema =
|
|
2893
|
-
eula_content:
|
|
2894
|
-
accepted_at:
|
|
2895
|
-
}).passthrough();
|
|
2896
|
-
var EulaContentResponseSchema =
|
|
2897
|
-
content:
|
|
2898
|
-
}).passthrough();
|
|
2899
|
-
var EulaResponseSchema =
|
|
2900
|
-
uuid:
|
|
2901
|
-
is_accepted:
|
|
2902
|
-
accepted_at:
|
|
2903
|
-
accepted_by_user_id:
|
|
2904
|
-
}).passthrough();
|
|
2905
|
-
var DeviceInstanceSchema =
|
|
2906
|
-
app_id:
|
|
2907
|
-
region:
|
|
2908
|
-
tenant_id:
|
|
2909
|
-
tsg_id:
|
|
2910
|
-
}).passthrough();
|
|
2911
|
-
var DeviceLicenseSchema =
|
|
2912
|
-
authorizationCode:
|
|
2913
|
-
expirationDate:
|
|
2914
|
-
licensePanDbIdentification:
|
|
2915
|
-
partNumber:
|
|
2916
|
-
serialNumber:
|
|
2917
|
-
subtypeName:
|
|
2918
|
-
registrationDate:
|
|
2919
|
-
}).passthrough();
|
|
2920
|
-
var DeviceSchema =
|
|
2921
|
-
serial_number:
|
|
2922
|
-
model:
|
|
2923
|
-
sku:
|
|
2924
|
-
device_type:
|
|
2925
|
-
device_name:
|
|
2926
|
-
tsg_id:
|
|
2927
|
-
support_account_id:
|
|
2928
|
-
asset_type:
|
|
2929
|
-
licenses:
|
|
2930
|
-
}).passthrough();
|
|
2931
|
-
var DeviceStatusSchema =
|
|
2932
|
-
status:
|
|
2933
|
-
error:
|
|
2934
|
-
serial_number:
|
|
2935
|
-
}).passthrough();
|
|
2936
|
-
var DeviceRequestSchema =
|
|
3331
|
+
data: z32.array(CustomPromptListItemSchema).optional()
|
|
3332
|
+
}).passthrough();
|
|
3333
|
+
var PropertyNameCreateRequestSchema = z32.object({ name: z32.string() }).passthrough();
|
|
3334
|
+
var PropertyValueCreateRequestSchema = z32.object({
|
|
3335
|
+
property_name: z32.string(),
|
|
3336
|
+
property_value: z32.string()
|
|
3337
|
+
}).passthrough();
|
|
3338
|
+
var PropertyDefinitionSchema = z32.object({
|
|
3339
|
+
property_name: z32.string(),
|
|
3340
|
+
created_at: z32.string()
|
|
3341
|
+
}).passthrough();
|
|
3342
|
+
var PropertyNamesListResponseSchema = z32.object({ data: z32.array(z32.string()).optional() }).passthrough();
|
|
3343
|
+
var PropertyValuesResponseSchema = z32.object({
|
|
3344
|
+
name: z32.string(),
|
|
3345
|
+
values: z32.array(z32.string()).optional()
|
|
3346
|
+
}).passthrough();
|
|
3347
|
+
var PropertyValuesMultipleResponseSchema = z32.object({ data: z32.record(z32.array(z32.string())).optional() }).passthrough();
|
|
3348
|
+
var DashboardOverviewResponseSchema = z32.object({
|
|
3349
|
+
total_targets: z32.number().int(),
|
|
3350
|
+
targets_by_type: z32.array(CountByNameSchema).optional()
|
|
3351
|
+
}).passthrough();
|
|
3352
|
+
var EulaAcceptRequestSchema = z32.object({
|
|
3353
|
+
eula_content: z32.string(),
|
|
3354
|
+
accepted_at: z32.string().nullable().optional()
|
|
3355
|
+
}).passthrough();
|
|
3356
|
+
var EulaContentResponseSchema = z32.object({
|
|
3357
|
+
content: z32.string()
|
|
3358
|
+
}).passthrough();
|
|
3359
|
+
var EulaResponseSchema = z32.object({
|
|
3360
|
+
uuid: z32.string().nullable().optional(),
|
|
3361
|
+
is_accepted: z32.boolean(),
|
|
3362
|
+
accepted_at: z32.string().nullable().optional(),
|
|
3363
|
+
accepted_by_user_id: z32.string().nullable().optional()
|
|
3364
|
+
}).passthrough();
|
|
3365
|
+
var DeviceInstanceSchema = z32.object({
|
|
3366
|
+
app_id: z32.string(),
|
|
3367
|
+
region: z32.string(),
|
|
3368
|
+
tenant_id: z32.string(),
|
|
3369
|
+
tsg_id: z32.string()
|
|
3370
|
+
}).passthrough();
|
|
3371
|
+
var DeviceLicenseSchema = z32.object({
|
|
3372
|
+
authorizationCode: z32.string().optional(),
|
|
3373
|
+
expirationDate: z32.string().optional(),
|
|
3374
|
+
licensePanDbIdentification: z32.string().optional(),
|
|
3375
|
+
partNumber: z32.string().optional(),
|
|
3376
|
+
serialNumber: z32.string().optional(),
|
|
3377
|
+
subtypeName: z32.string().optional(),
|
|
3378
|
+
registrationDate: z32.string().optional()
|
|
3379
|
+
}).passthrough();
|
|
3380
|
+
var DeviceSchema = z32.object({
|
|
3381
|
+
serial_number: z32.string(),
|
|
3382
|
+
model: z32.string().optional(),
|
|
3383
|
+
sku: z32.string().optional(),
|
|
3384
|
+
device_type: z32.string().optional(),
|
|
3385
|
+
device_name: z32.string().optional(),
|
|
3386
|
+
tsg_id: z32.string().optional(),
|
|
3387
|
+
support_account_id: z32.string().optional(),
|
|
3388
|
+
asset_type: z32.string().optional(),
|
|
3389
|
+
licenses: z32.array(DeviceLicenseSchema).optional()
|
|
3390
|
+
}).passthrough();
|
|
3391
|
+
var DeviceStatusSchema = z32.object({
|
|
3392
|
+
status: z32.string(),
|
|
3393
|
+
error: z32.string().optional(),
|
|
3394
|
+
serial_number: z32.string().optional()
|
|
3395
|
+
}).passthrough();
|
|
3396
|
+
var DeviceRequestSchema = z32.object({
|
|
2937
3397
|
instance: DeviceInstanceSchema,
|
|
2938
|
-
created_by:
|
|
2939
|
-
devices:
|
|
2940
|
-
}).passthrough();
|
|
2941
|
-
var DeviceResponseSchema =
|
|
2942
|
-
devices:
|
|
2943
|
-
status:
|
|
2944
|
-
}).passthrough();
|
|
2945
|
-
var DeploymentProfileAttributeSchema =
|
|
2946
|
-
quantity:
|
|
2947
|
-
unit_of_measure:
|
|
2948
|
-
}).passthrough();
|
|
2949
|
-
var DeploymentProfileRequestSchema =
|
|
2950
|
-
dAuthCode:
|
|
2951
|
-
deploymentProfileId:
|
|
2952
|
-
license_expiration:
|
|
2953
|
-
profileName:
|
|
2954
|
-
subType:
|
|
2955
|
-
subscriptions:
|
|
2956
|
-
type:
|
|
2957
|
-
aveTextRecord:
|
|
2958
|
-
attributes:
|
|
2959
|
-
}).passthrough();
|
|
2960
|
-
var InstanceExtraDetailsSchema =
|
|
2961
|
-
deployment_profiles:
|
|
2962
|
-
airs_shared_by_tsg:
|
|
2963
|
-
airs_unshared_dps:
|
|
2964
|
-
}).passthrough();
|
|
2965
|
-
var InstanceRequestSchema =
|
|
2966
|
-
tsg_id:
|
|
2967
|
-
tenant_id:
|
|
2968
|
-
app_id:
|
|
2969
|
-
region:
|
|
2970
|
-
support_account_id:
|
|
2971
|
-
support_account_name:
|
|
2972
|
-
created_by:
|
|
2973
|
-
internal:
|
|
2974
|
-
tenant_instance_name:
|
|
3398
|
+
created_by: z32.string().optional(),
|
|
3399
|
+
devices: z32.array(DeviceSchema).optional()
|
|
3400
|
+
}).passthrough();
|
|
3401
|
+
var DeviceResponseSchema = z32.object({
|
|
3402
|
+
devices: z32.array(DeviceStatusSchema).optional(),
|
|
3403
|
+
status: z32.string().optional()
|
|
3404
|
+
}).passthrough();
|
|
3405
|
+
var DeploymentProfileAttributeSchema = z32.object({
|
|
3406
|
+
quantity: z32.number().optional(),
|
|
3407
|
+
unit_of_measure: z32.string().optional()
|
|
3408
|
+
}).passthrough();
|
|
3409
|
+
var DeploymentProfileRequestSchema = z32.object({
|
|
3410
|
+
dAuthCode: z32.string().optional(),
|
|
3411
|
+
deploymentProfileId: z32.string().optional(),
|
|
3412
|
+
license_expiration: z32.string().optional(),
|
|
3413
|
+
profileName: z32.string().optional(),
|
|
3414
|
+
subType: z32.string().optional(),
|
|
3415
|
+
subscriptions: z32.string().optional(),
|
|
3416
|
+
type: z32.string().optional(),
|
|
3417
|
+
aveTextRecord: z32.number().default(0),
|
|
3418
|
+
attributes: z32.array(DeploymentProfileAttributeSchema).optional()
|
|
3419
|
+
}).passthrough();
|
|
3420
|
+
var InstanceExtraDetailsSchema = z32.object({
|
|
3421
|
+
deployment_profiles: z32.array(DeploymentProfileRequestSchema).optional(),
|
|
3422
|
+
airs_shared_by_tsg: z32.string().optional(),
|
|
3423
|
+
airs_unshared_dps: z32.string().optional()
|
|
3424
|
+
}).passthrough();
|
|
3425
|
+
var InstanceRequestSchema = z32.object({
|
|
3426
|
+
tsg_id: z32.string(),
|
|
3427
|
+
tenant_id: z32.string(),
|
|
3428
|
+
app_id: z32.string(),
|
|
3429
|
+
region: z32.string(),
|
|
3430
|
+
support_account_id: z32.string().optional(),
|
|
3431
|
+
support_account_name: z32.string().optional(),
|
|
3432
|
+
created_by: z32.string().optional(),
|
|
3433
|
+
internal: z32.boolean().optional(),
|
|
3434
|
+
tenant_instance_name: z32.string().optional(),
|
|
2975
3435
|
extra: InstanceExtraDetailsSchema.optional(),
|
|
2976
|
-
iam_controlled:
|
|
2977
|
-
platform_region:
|
|
2978
|
-
csp_tenant_id:
|
|
2979
|
-
tsg_instances:
|
|
2980
|
-
}).passthrough();
|
|
2981
|
-
var InstanceResponseSchema =
|
|
2982
|
-
tsg_id:
|
|
2983
|
-
tenant_id:
|
|
2984
|
-
app_id:
|
|
2985
|
-
is_success:
|
|
2986
|
-
}).passthrough();
|
|
2987
|
-
var InstanceGetResponseSchema =
|
|
2988
|
-
tsg_id:
|
|
2989
|
-
tenant_id:
|
|
2990
|
-
app_id:
|
|
2991
|
-
region:
|
|
2992
|
-
support_account_id:
|
|
2993
|
-
support_account_name:
|
|
2994
|
-
created_by:
|
|
2995
|
-
internal:
|
|
2996
|
-
tenant_instance_name:
|
|
2997
|
-
deployment_profiles:
|
|
2998
|
-
}).passthrough();
|
|
2999
|
-
var RegistryCredentialsSchema =
|
|
3000
|
-
token:
|
|
3001
|
-
expiry:
|
|
3436
|
+
iam_controlled: z32.boolean().optional(),
|
|
3437
|
+
platform_region: z32.string().optional(),
|
|
3438
|
+
csp_tenant_id: z32.string().optional(),
|
|
3439
|
+
tsg_instances: z32.unknown().optional()
|
|
3440
|
+
}).passthrough();
|
|
3441
|
+
var InstanceResponseSchema = z32.object({
|
|
3442
|
+
tsg_id: z32.string(),
|
|
3443
|
+
tenant_id: z32.string().optional(),
|
|
3444
|
+
app_id: z32.string().optional(),
|
|
3445
|
+
is_success: z32.boolean().optional()
|
|
3446
|
+
}).passthrough();
|
|
3447
|
+
var InstanceGetResponseSchema = z32.object({
|
|
3448
|
+
tsg_id: z32.string(),
|
|
3449
|
+
tenant_id: z32.string(),
|
|
3450
|
+
app_id: z32.string(),
|
|
3451
|
+
region: z32.string(),
|
|
3452
|
+
support_account_id: z32.string().optional(),
|
|
3453
|
+
support_account_name: z32.string().optional(),
|
|
3454
|
+
created_by: z32.string().optional(),
|
|
3455
|
+
internal: z32.boolean().optional(),
|
|
3456
|
+
tenant_instance_name: z32.string().optional(),
|
|
3457
|
+
deployment_profiles: z32.array(DeploymentProfileRequestSchema).optional()
|
|
3458
|
+
}).passthrough();
|
|
3459
|
+
var RegistryCredentialsSchema = z32.object({
|
|
3460
|
+
token: z32.string(),
|
|
3461
|
+
expiry: z32.string()
|
|
3002
3462
|
}).passthrough();
|
|
3003
3463
|
|
|
3004
3464
|
// src/http/auth/oauth.ts
|
|
@@ -3023,12 +3483,12 @@ var OAuthAuth = class {
|
|
|
3023
3483
|
};
|
|
3024
3484
|
|
|
3025
3485
|
// src/models/oauth-token.ts
|
|
3026
|
-
import { z as
|
|
3027
|
-
var OAuthTokenResponseSchema =
|
|
3028
|
-
access_token:
|
|
3029
|
-
token_type:
|
|
3030
|
-
expires_in:
|
|
3031
|
-
scope:
|
|
3486
|
+
import { z as z33 } from "zod";
|
|
3487
|
+
var OAuthTokenResponseSchema = z33.object({
|
|
3488
|
+
access_token: z33.string(),
|
|
3489
|
+
token_type: z33.string().optional(),
|
|
3490
|
+
expires_in: z33.number(),
|
|
3491
|
+
scope: z33.string().optional()
|
|
3032
3492
|
}).passthrough();
|
|
3033
3493
|
|
|
3034
3494
|
// src/management/oauth-client.ts
|
|
@@ -3712,7 +4172,7 @@ var ScanLogsClient = class {
|
|
|
3712
4172
|
};
|
|
3713
4173
|
|
|
3714
4174
|
// src/management/oauth-management.ts
|
|
3715
|
-
import { z as
|
|
4175
|
+
import { z as z34 } from "zod";
|
|
3716
4176
|
var OAuthManagementClient = class {
|
|
3717
4177
|
baseUrl;
|
|
3718
4178
|
auth;
|
|
@@ -3735,7 +4195,7 @@ var OAuthManagementClient = class {
|
|
|
3735
4195
|
path: MGMT_OAUTH_INVALIDATE_PATH,
|
|
3736
4196
|
params: { token },
|
|
3737
4197
|
body,
|
|
3738
|
-
responseSchema:
|
|
4198
|
+
responseSchema: z34.string(),
|
|
3739
4199
|
auth: this.auth,
|
|
3740
4200
|
numRetries: this.numRetries
|
|
3741
4201
|
});
|
|
@@ -3763,6 +4223,413 @@ var OAuthManagementClient = class {
|
|
|
3763
4223
|
}
|
|
3764
4224
|
};
|
|
3765
4225
|
|
|
4226
|
+
// src/management/dlp/data-filtering-profiles.ts
|
|
4227
|
+
var DataFilteringProfilesClient = class {
|
|
4228
|
+
baseUrl;
|
|
4229
|
+
auth;
|
|
4230
|
+
numRetries;
|
|
4231
|
+
constructor(opts) {
|
|
4232
|
+
this.baseUrl = opts.baseUrl;
|
|
4233
|
+
this.auth = opts.auth;
|
|
4234
|
+
this.numRetries = opts.numRetries;
|
|
4235
|
+
}
|
|
4236
|
+
/**
|
|
4237
|
+
* List data filtering profiles. Returns the Spring `Page<>` envelope verbatim so callers can
|
|
4238
|
+
* inspect `totalElements`, `pageable`, etc. without a second round-trip.
|
|
4239
|
+
*/
|
|
4240
|
+
async list(params = {}) {
|
|
4241
|
+
const queryParams = {};
|
|
4242
|
+
if (params.page !== void 0) queryParams.page = String(params.page);
|
|
4243
|
+
if (params.size !== void 0) queryParams.size = String(params.size);
|
|
4244
|
+
if (params.sort !== void 0) queryParams.sort = params.sort;
|
|
4245
|
+
if (params.status !== void 0) queryParams.status = params.status;
|
|
4246
|
+
if (params.name !== void 0) queryParams.name = params.name;
|
|
4247
|
+
return request({
|
|
4248
|
+
method: "GET",
|
|
4249
|
+
baseUrl: this.baseUrl,
|
|
4250
|
+
path: DLP_DATA_FILTERING_PROFILES_PATH,
|
|
4251
|
+
params: queryParams,
|
|
4252
|
+
responseSchema: PageDataFilteringProfileResponseSchema,
|
|
4253
|
+
auth: this.auth,
|
|
4254
|
+
numRetries: this.numRetries
|
|
4255
|
+
});
|
|
4256
|
+
}
|
|
4257
|
+
/** Get a single data filtering profile by resource ID. */
|
|
4258
|
+
async get(resourceId) {
|
|
4259
|
+
return request({
|
|
4260
|
+
method: "GET",
|
|
4261
|
+
baseUrl: this.baseUrl,
|
|
4262
|
+
path: `${DLP_DATA_FILTERING_PROFILES_PATH}/${encodeURIComponent(resourceId)}`,
|
|
4263
|
+
responseSchema: DataFilteringProfileResponseSchema,
|
|
4264
|
+
auth: this.auth,
|
|
4265
|
+
numRetries: this.numRetries
|
|
4266
|
+
});
|
|
4267
|
+
}
|
|
4268
|
+
/**
|
|
4269
|
+
* Full-replace (PUT) the profile at `resourceId`. Returns the updated resource as the API
|
|
4270
|
+
* echoes it back.
|
|
4271
|
+
*/
|
|
4272
|
+
async replace(resourceId, body) {
|
|
4273
|
+
return request({
|
|
4274
|
+
method: "PUT",
|
|
4275
|
+
baseUrl: this.baseUrl,
|
|
4276
|
+
path: `${DLP_DATA_FILTERING_PROFILES_PATH}/${encodeURIComponent(resourceId)}`,
|
|
4277
|
+
body,
|
|
4278
|
+
responseSchema: DataFilteringProfileResponseSchema,
|
|
4279
|
+
auth: this.auth,
|
|
4280
|
+
numRetries: this.numRetries
|
|
4281
|
+
});
|
|
4282
|
+
}
|
|
4283
|
+
};
|
|
4284
|
+
|
|
4285
|
+
// src/management/dlp/data-patterns.ts
|
|
4286
|
+
var DataPatternsClient = class {
|
|
4287
|
+
baseUrl;
|
|
4288
|
+
auth;
|
|
4289
|
+
numRetries;
|
|
4290
|
+
constructor(opts) {
|
|
4291
|
+
this.baseUrl = opts.baseUrl;
|
|
4292
|
+
this.auth = opts.auth;
|
|
4293
|
+
this.numRetries = opts.numRetries;
|
|
4294
|
+
}
|
|
4295
|
+
/**
|
|
4296
|
+
* List data patterns. Returns the Spring `Page<>` envelope verbatim so callers can inspect
|
|
4297
|
+
* `totalElements`, `pageable`, etc.
|
|
4298
|
+
*/
|
|
4299
|
+
async list(params = {}) {
|
|
4300
|
+
const queryParams = {};
|
|
4301
|
+
if (params.page !== void 0) queryParams.page = String(params.page);
|
|
4302
|
+
if (params.size !== void 0) queryParams.size = String(params.size);
|
|
4303
|
+
if (params.sort !== void 0) queryParams.sort = params.sort;
|
|
4304
|
+
return request({
|
|
4305
|
+
method: "GET",
|
|
4306
|
+
baseUrl: this.baseUrl,
|
|
4307
|
+
path: DLP_DATA_PATTERNS_PATH,
|
|
4308
|
+
params: queryParams,
|
|
4309
|
+
responseSchema: PageDataPatternResponseSchema,
|
|
4310
|
+
auth: this.auth,
|
|
4311
|
+
numRetries: this.numRetries
|
|
4312
|
+
});
|
|
4313
|
+
}
|
|
4314
|
+
/** Create a new custom data pattern. */
|
|
4315
|
+
async create(body) {
|
|
4316
|
+
return request({
|
|
4317
|
+
method: "POST",
|
|
4318
|
+
baseUrl: this.baseUrl,
|
|
4319
|
+
path: DLP_DATA_PATTERNS_PATH,
|
|
4320
|
+
body,
|
|
4321
|
+
responseSchema: DataPatternResponseSchema,
|
|
4322
|
+
auth: this.auth,
|
|
4323
|
+
numRetries: this.numRetries
|
|
4324
|
+
});
|
|
4325
|
+
}
|
|
4326
|
+
/** Get a single data pattern by resource ID. */
|
|
4327
|
+
async get(resourceId) {
|
|
4328
|
+
return request({
|
|
4329
|
+
method: "GET",
|
|
4330
|
+
baseUrl: this.baseUrl,
|
|
4331
|
+
path: `${DLP_DATA_PATTERNS_PATH}/${encodeURIComponent(resourceId)}`,
|
|
4332
|
+
responseSchema: DataPatternResponseSchema,
|
|
4333
|
+
auth: this.auth,
|
|
4334
|
+
numRetries: this.numRetries
|
|
4335
|
+
});
|
|
4336
|
+
}
|
|
4337
|
+
/**
|
|
4338
|
+
* Full-replace (PUT) the pattern at `resourceId`. Returns the updated resource as the API
|
|
4339
|
+
* echoes it back.
|
|
4340
|
+
*/
|
|
4341
|
+
async replace(resourceId, body) {
|
|
4342
|
+
return request({
|
|
4343
|
+
method: "PUT",
|
|
4344
|
+
baseUrl: this.baseUrl,
|
|
4345
|
+
path: `${DLP_DATA_PATTERNS_PATH}/${encodeURIComponent(resourceId)}`,
|
|
4346
|
+
body,
|
|
4347
|
+
responseSchema: DataPatternResponseSchema,
|
|
4348
|
+
auth: this.auth,
|
|
4349
|
+
numRetries: this.numRetries
|
|
4350
|
+
});
|
|
4351
|
+
}
|
|
4352
|
+
/**
|
|
4353
|
+
* Partial update via JSON Merge Patch (RFC 7396). Sent with
|
|
4354
|
+
* `Content-Type: application/merge-patch+json`. Fields set to `null` clear server-side;
|
|
4355
|
+
* omitted fields are left unchanged.
|
|
4356
|
+
*/
|
|
4357
|
+
async patch(resourceId, body) {
|
|
4358
|
+
return request({
|
|
4359
|
+
method: "PATCH",
|
|
4360
|
+
baseUrl: this.baseUrl,
|
|
4361
|
+
path: `${DLP_DATA_PATTERNS_PATH}/${encodeURIComponent(resourceId)}`,
|
|
4362
|
+
body,
|
|
4363
|
+
contentType: "application/merge-patch+json",
|
|
4364
|
+
responseSchema: DataPatternResponseSchema,
|
|
4365
|
+
auth: this.auth,
|
|
4366
|
+
numRetries: this.numRetries
|
|
4367
|
+
});
|
|
4368
|
+
}
|
|
4369
|
+
/** Soft-delete (archive) a data pattern. Resolves on the 204 No Content response. */
|
|
4370
|
+
async delete(resourceId) {
|
|
4371
|
+
await request({
|
|
4372
|
+
method: "DELETE",
|
|
4373
|
+
baseUrl: this.baseUrl,
|
|
4374
|
+
path: `${DLP_DATA_PATTERNS_PATH}/${encodeURIComponent(resourceId)}`,
|
|
4375
|
+
auth: this.auth,
|
|
4376
|
+
numRetries: this.numRetries
|
|
4377
|
+
});
|
|
4378
|
+
}
|
|
4379
|
+
};
|
|
4380
|
+
|
|
4381
|
+
// src/management/dlp/data-profiles.ts
|
|
4382
|
+
var DataProfilesClient = class {
|
|
4383
|
+
baseUrl;
|
|
4384
|
+
auth;
|
|
4385
|
+
numRetries;
|
|
4386
|
+
constructor(opts) {
|
|
4387
|
+
this.baseUrl = opts.baseUrl;
|
|
4388
|
+
this.auth = opts.auth;
|
|
4389
|
+
this.numRetries = opts.numRetries;
|
|
4390
|
+
}
|
|
4391
|
+
/**
|
|
4392
|
+
* List data profiles. Returns the Spring `Page<>` envelope verbatim so callers can inspect
|
|
4393
|
+
* `totalElements`, `pageable`, etc.
|
|
4394
|
+
*/
|
|
4395
|
+
async list(params = {}) {
|
|
4396
|
+
const queryParams = {};
|
|
4397
|
+
if (params.page !== void 0) queryParams.page = String(params.page);
|
|
4398
|
+
if (params.size !== void 0) queryParams.size = String(params.size);
|
|
4399
|
+
if (params.sort !== void 0) queryParams.sort = params.sort;
|
|
4400
|
+
return request({
|
|
4401
|
+
method: "GET",
|
|
4402
|
+
baseUrl: this.baseUrl,
|
|
4403
|
+
path: DLP_DATA_PROFILES_PATH,
|
|
4404
|
+
params: queryParams,
|
|
4405
|
+
responseSchema: PageDataProfileResponseSchema,
|
|
4406
|
+
auth: this.auth,
|
|
4407
|
+
numRetries: this.numRetries
|
|
4408
|
+
});
|
|
4409
|
+
}
|
|
4410
|
+
/** Create a new data profile. */
|
|
4411
|
+
async create(body) {
|
|
4412
|
+
return request({
|
|
4413
|
+
method: "POST",
|
|
4414
|
+
baseUrl: this.baseUrl,
|
|
4415
|
+
path: DLP_DATA_PROFILES_PATH,
|
|
4416
|
+
body,
|
|
4417
|
+
responseSchema: DataProfileResponseSchema,
|
|
4418
|
+
auth: this.auth,
|
|
4419
|
+
numRetries: this.numRetries
|
|
4420
|
+
});
|
|
4421
|
+
}
|
|
4422
|
+
/** Get a single data profile by resource ID. */
|
|
4423
|
+
async get(resourceId) {
|
|
4424
|
+
return request({
|
|
4425
|
+
method: "GET",
|
|
4426
|
+
baseUrl: this.baseUrl,
|
|
4427
|
+
path: `${DLP_DATA_PROFILES_PATH}/${encodeURIComponent(resourceId)}`,
|
|
4428
|
+
responseSchema: DataProfileResponseSchema,
|
|
4429
|
+
auth: this.auth,
|
|
4430
|
+
numRetries: this.numRetries
|
|
4431
|
+
});
|
|
4432
|
+
}
|
|
4433
|
+
/**
|
|
4434
|
+
* Full-replace (PUT) the profile at `resourceId`. Returns the updated resource as the API
|
|
4435
|
+
* echoes it back.
|
|
4436
|
+
*/
|
|
4437
|
+
async replace(resourceId, body) {
|
|
4438
|
+
return request({
|
|
4439
|
+
method: "PUT",
|
|
4440
|
+
baseUrl: this.baseUrl,
|
|
4441
|
+
path: `${DLP_DATA_PROFILES_PATH}/${encodeURIComponent(resourceId)}`,
|
|
4442
|
+
body,
|
|
4443
|
+
responseSchema: DataProfileResponseSchema,
|
|
4444
|
+
auth: this.auth,
|
|
4445
|
+
numRetries: this.numRetries
|
|
4446
|
+
});
|
|
4447
|
+
}
|
|
4448
|
+
/**
|
|
4449
|
+
* Partial update via JSON Merge Patch (RFC 7396). Sent with
|
|
4450
|
+
* `Content-Type: application/merge-patch+json`. Fields set to `null` clear server-side;
|
|
4451
|
+
* omitted fields are left unchanged.
|
|
4452
|
+
*/
|
|
4453
|
+
async patch(resourceId, body) {
|
|
4454
|
+
return request({
|
|
4455
|
+
method: "PATCH",
|
|
4456
|
+
baseUrl: this.baseUrl,
|
|
4457
|
+
path: `${DLP_DATA_PROFILES_PATH}/${encodeURIComponent(resourceId)}`,
|
|
4458
|
+
body,
|
|
4459
|
+
contentType: "application/merge-patch+json",
|
|
4460
|
+
responseSchema: DataProfileResponseSchema,
|
|
4461
|
+
auth: this.auth,
|
|
4462
|
+
numRetries: this.numRetries
|
|
4463
|
+
});
|
|
4464
|
+
}
|
|
4465
|
+
};
|
|
4466
|
+
|
|
4467
|
+
// src/management/dlp/dictionaries.ts
|
|
4468
|
+
function toBlob(file) {
|
|
4469
|
+
if (file instanceof Blob) return file;
|
|
4470
|
+
if (typeof file === "string") return new Blob([file], { type: "text/plain" });
|
|
4471
|
+
if (file instanceof Uint8Array) return new Blob([file]);
|
|
4472
|
+
return new Blob([file]);
|
|
4473
|
+
}
|
|
4474
|
+
function buildFormData(metadata, file) {
|
|
4475
|
+
const fd = new FormData();
|
|
4476
|
+
fd.append(
|
|
4477
|
+
"json",
|
|
4478
|
+
new Blob([JSON.stringify(metadata)], { type: "application/json" }),
|
|
4479
|
+
"metadata.json"
|
|
4480
|
+
);
|
|
4481
|
+
fd.append("file", toBlob(file), metadata.original_file_name);
|
|
4482
|
+
return fd;
|
|
4483
|
+
}
|
|
4484
|
+
var DictionariesClient = class {
|
|
4485
|
+
baseUrl;
|
|
4486
|
+
auth;
|
|
4487
|
+
numRetries;
|
|
4488
|
+
constructor(opts) {
|
|
4489
|
+
this.baseUrl = opts.baseUrl;
|
|
4490
|
+
this.auth = opts.auth;
|
|
4491
|
+
this.numRetries = opts.numRetries;
|
|
4492
|
+
}
|
|
4493
|
+
/** List dictionaries. Returns the Spring `Page<>` envelope verbatim. */
|
|
4494
|
+
async list(params = {}) {
|
|
4495
|
+
const queryParams = {};
|
|
4496
|
+
if (params.page !== void 0) queryParams.page = String(params.page);
|
|
4497
|
+
if (params.size !== void 0) queryParams.size = String(params.size);
|
|
4498
|
+
if (params.sort !== void 0) queryParams.sort = params.sort;
|
|
4499
|
+
if (params.keywords !== void 0) queryParams.keywords = String(params.keywords);
|
|
4500
|
+
return request({
|
|
4501
|
+
method: "GET",
|
|
4502
|
+
baseUrl: this.baseUrl,
|
|
4503
|
+
path: DLP_DICTIONARIES_PATH,
|
|
4504
|
+
params: queryParams,
|
|
4505
|
+
responseSchema: PageDictionaryResponseSchema,
|
|
4506
|
+
auth: this.auth,
|
|
4507
|
+
numRetries: this.numRetries
|
|
4508
|
+
});
|
|
4509
|
+
}
|
|
4510
|
+
/**
|
|
4511
|
+
* Create a dictionary by uploading a keyword file. Sends a multipart body — the SDK does
|
|
4512
|
+
* not set Content-Type so the runtime can write the correct boundary.
|
|
4513
|
+
*/
|
|
4514
|
+
async create({
|
|
4515
|
+
metadata,
|
|
4516
|
+
file,
|
|
4517
|
+
includeKeywords
|
|
4518
|
+
}) {
|
|
4519
|
+
const queryParams = {};
|
|
4520
|
+
if (includeKeywords !== void 0) queryParams.keywords = String(includeKeywords);
|
|
4521
|
+
return request({
|
|
4522
|
+
method: "POST",
|
|
4523
|
+
baseUrl: this.baseUrl,
|
|
4524
|
+
path: DLP_DICTIONARIES_PATH,
|
|
4525
|
+
params: queryParams,
|
|
4526
|
+
formData: buildFormData(metadata, file),
|
|
4527
|
+
responseSchema: DictionaryResponseSchema,
|
|
4528
|
+
auth: this.auth,
|
|
4529
|
+
numRetries: this.numRetries
|
|
4530
|
+
});
|
|
4531
|
+
}
|
|
4532
|
+
/** Get a single dictionary by resource ID, optionally including its keyword list. */
|
|
4533
|
+
async get(resourceId, params = {}) {
|
|
4534
|
+
const queryParams = {};
|
|
4535
|
+
if (params.includeKeywords !== void 0) queryParams.keywords = String(params.includeKeywords);
|
|
4536
|
+
return request({
|
|
4537
|
+
method: "GET",
|
|
4538
|
+
baseUrl: this.baseUrl,
|
|
4539
|
+
path: `${DLP_DICTIONARIES_PATH}/${encodeURIComponent(resourceId)}`,
|
|
4540
|
+
params: queryParams,
|
|
4541
|
+
responseSchema: DictionaryResponseSchema,
|
|
4542
|
+
auth: this.auth,
|
|
4543
|
+
numRetries: this.numRetries
|
|
4544
|
+
});
|
|
4545
|
+
}
|
|
4546
|
+
/**
|
|
4547
|
+
* Full-replace the dictionary at `resourceId` via multipart upload.
|
|
4548
|
+
*
|
|
4549
|
+
* The API may respond with either 200 + body or 204 + no body — both are normal. Returns
|
|
4550
|
+
* the parsed body on 200 and `undefined` on 204.
|
|
4551
|
+
*/
|
|
4552
|
+
async replace(resourceId, { metadata, file, includeKeywords }) {
|
|
4553
|
+
const queryParams = {};
|
|
4554
|
+
if (includeKeywords !== void 0) queryParams.keywords = String(includeKeywords);
|
|
4555
|
+
return request({
|
|
4556
|
+
method: "PUT",
|
|
4557
|
+
baseUrl: this.baseUrl,
|
|
4558
|
+
path: `${DLP_DICTIONARIES_PATH}/${encodeURIComponent(resourceId)}`,
|
|
4559
|
+
params: queryParams,
|
|
4560
|
+
formData: buildFormData(metadata, file),
|
|
4561
|
+
responseSchema: DictionaryResponseSchema.optional(),
|
|
4562
|
+
allowEmptyBody: true,
|
|
4563
|
+
auth: this.auth,
|
|
4564
|
+
numRetries: this.numRetries
|
|
4565
|
+
});
|
|
4566
|
+
}
|
|
4567
|
+
/**
|
|
4568
|
+
* Partial update via JSON Merge Patch (RFC 7396). Sent with
|
|
4569
|
+
* `Content-Type: application/merge-patch+json`.
|
|
4570
|
+
*/
|
|
4571
|
+
async patch(resourceId, body) {
|
|
4572
|
+
return request({
|
|
4573
|
+
method: "PATCH",
|
|
4574
|
+
baseUrl: this.baseUrl,
|
|
4575
|
+
path: `${DLP_DICTIONARIES_PATH}/${encodeURIComponent(resourceId)}`,
|
|
4576
|
+
body,
|
|
4577
|
+
contentType: "application/merge-patch+json",
|
|
4578
|
+
responseSchema: DictionaryResponseSchema,
|
|
4579
|
+
auth: this.auth,
|
|
4580
|
+
numRetries: this.numRetries
|
|
4581
|
+
});
|
|
4582
|
+
}
|
|
4583
|
+
/** Delete a dictionary. Resolves to `undefined` on the 204 No Content response. */
|
|
4584
|
+
async delete(resourceId) {
|
|
4585
|
+
await request({
|
|
4586
|
+
method: "DELETE",
|
|
4587
|
+
baseUrl: this.baseUrl,
|
|
4588
|
+
path: `${DLP_DICTIONARIES_PATH}/${encodeURIComponent(resourceId)}`,
|
|
4589
|
+
auth: this.auth,
|
|
4590
|
+
numRetries: this.numRetries
|
|
4591
|
+
});
|
|
4592
|
+
}
|
|
4593
|
+
};
|
|
4594
|
+
|
|
4595
|
+
// src/management/dlp/index.ts
|
|
4596
|
+
var DlpNamespace = class {
|
|
4597
|
+
baseUrl;
|
|
4598
|
+
/** @internal */
|
|
4599
|
+
auth;
|
|
4600
|
+
/** @internal */
|
|
4601
|
+
numRetries;
|
|
4602
|
+
dataFilteringProfiles;
|
|
4603
|
+
dataPatterns;
|
|
4604
|
+
dataProfiles;
|
|
4605
|
+
dictionaries;
|
|
4606
|
+
constructor(opts) {
|
|
4607
|
+
this.baseUrl = opts.baseUrl;
|
|
4608
|
+
this.auth = opts.auth;
|
|
4609
|
+
this.numRetries = opts.numRetries;
|
|
4610
|
+
this.dataFilteringProfiles = new DataFilteringProfilesClient({
|
|
4611
|
+
baseUrl: opts.baseUrl,
|
|
4612
|
+
auth: opts.auth,
|
|
4613
|
+
numRetries: opts.numRetries
|
|
4614
|
+
});
|
|
4615
|
+
this.dataPatterns = new DataPatternsClient({
|
|
4616
|
+
baseUrl: opts.baseUrl,
|
|
4617
|
+
auth: opts.auth,
|
|
4618
|
+
numRetries: opts.numRetries
|
|
4619
|
+
});
|
|
4620
|
+
this.dataProfiles = new DataProfilesClient({
|
|
4621
|
+
baseUrl: opts.baseUrl,
|
|
4622
|
+
auth: opts.auth,
|
|
4623
|
+
numRetries: opts.numRetries
|
|
4624
|
+
});
|
|
4625
|
+
this.dictionaries = new DictionariesClient({
|
|
4626
|
+
baseUrl: opts.baseUrl,
|
|
4627
|
+
auth: opts.auth,
|
|
4628
|
+
numRetries: opts.numRetries
|
|
4629
|
+
});
|
|
4630
|
+
}
|
|
4631
|
+
};
|
|
4632
|
+
|
|
3766
4633
|
// src/management/client.ts
|
|
3767
4634
|
var ManagementClient = class {
|
|
3768
4635
|
profiles;
|
|
@@ -3773,8 +4640,10 @@ var ManagementClient = class {
|
|
|
3773
4640
|
deploymentProfiles;
|
|
3774
4641
|
scanLogs;
|
|
3775
4642
|
oauth;
|
|
4643
|
+
dlp;
|
|
3776
4644
|
constructor(opts = {}) {
|
|
3777
4645
|
const apiEndpoint = opts.apiEndpoint ?? process.env[MGMT_ENDPOINT] ?? DEFAULT_MGMT_ENDPOINT;
|
|
4646
|
+
const dlpEndpoint = opts.dlpEndpoint ?? DEFAULT_DLP_ENDPOINT;
|
|
3778
4647
|
const { baseUrl, oauthClient, numRetries, tsgId } = resolveOAuthConfig({
|
|
3779
4648
|
clientId: opts.clientId,
|
|
3780
4649
|
clientSecret: opts.clientSecret,
|
|
@@ -3793,6 +4662,7 @@ var ManagementClient = class {
|
|
|
3793
4662
|
this.deploymentProfiles = new DeploymentProfilesClient({ baseUrl, auth, numRetries });
|
|
3794
4663
|
this.scanLogs = new ScanLogsClient({ baseUrl, auth, numRetries });
|
|
3795
4664
|
this.oauth = new OAuthManagementClient({ baseUrl, auth, numRetries });
|
|
4665
|
+
this.dlp = new DlpNamespace({ baseUrl: dlpEndpoint, auth, numRetries });
|
|
3796
4666
|
}
|
|
3797
4667
|
};
|
|
3798
4668
|
|
|
@@ -4336,7 +5206,7 @@ var ModelSecurityClient = class {
|
|
|
4336
5206
|
};
|
|
4337
5207
|
|
|
4338
5208
|
// src/red-team/scans-client.ts
|
|
4339
|
-
import { z as
|
|
5209
|
+
import { z as z35 } from "zod";
|
|
4340
5210
|
var RedTeamScansClient = class {
|
|
4341
5211
|
baseUrl;
|
|
4342
5212
|
auth;
|
|
@@ -4423,7 +5293,7 @@ var RedTeamScansClient = class {
|
|
|
4423
5293
|
method: "GET",
|
|
4424
5294
|
baseUrl: this.baseUrl,
|
|
4425
5295
|
path: RED_TEAM_CATEGORIES_PATH,
|
|
4426
|
-
responseSchema:
|
|
5296
|
+
responseSchema: z35.array(CategoryModelSchema),
|
|
4427
5297
|
auth: this.auth,
|
|
4428
5298
|
numRetries: this.numRetries
|
|
4429
5299
|
});
|
|
@@ -4431,7 +5301,7 @@ var RedTeamScansClient = class {
|
|
|
4431
5301
|
};
|
|
4432
5302
|
|
|
4433
5303
|
// src/red-team/reports-client.ts
|
|
4434
|
-
import { z as
|
|
5304
|
+
import { z as z36 } from "zod";
|
|
4435
5305
|
var RedTeamReportsClient = class {
|
|
4436
5306
|
baseUrl;
|
|
4437
5307
|
auth;
|
|
@@ -4678,7 +5548,7 @@ var RedTeamReportsClient = class {
|
|
|
4678
5548
|
baseUrl: this.baseUrl,
|
|
4679
5549
|
path: `${RED_TEAM_REPORT_PATH}/${jobId}/download`,
|
|
4680
5550
|
params: { file_format: format },
|
|
4681
|
-
responseSchema:
|
|
5551
|
+
responseSchema: z36.unknown(),
|
|
4682
5552
|
auth: this.auth,
|
|
4683
5553
|
numRetries: this.numRetries
|
|
4684
5554
|
});
|
|
@@ -4694,7 +5564,7 @@ var RedTeamReportsClient = class {
|
|
|
4694
5564
|
method: "POST",
|
|
4695
5565
|
baseUrl: this.baseUrl,
|
|
4696
5566
|
path: `${RED_TEAM_REPORT_PATH}/${jobId}/generate-partial-report`,
|
|
4697
|
-
responseSchema:
|
|
5567
|
+
responseSchema: z36.unknown(),
|
|
4698
5568
|
auth: this.auth,
|
|
4699
5569
|
numRetries: this.numRetries
|
|
4700
5570
|
});
|
|
@@ -4702,7 +5572,7 @@ var RedTeamReportsClient = class {
|
|
|
4702
5572
|
};
|
|
4703
5573
|
|
|
4704
5574
|
// src/red-team/custom-attack-reports-client.ts
|
|
4705
|
-
import { z as
|
|
5575
|
+
import { z as z37 } from "zod";
|
|
4706
5576
|
var RedTeamCustomAttackReportsClient = class {
|
|
4707
5577
|
baseUrl;
|
|
4708
5578
|
auth;
|
|
@@ -4761,7 +5631,7 @@ var RedTeamCustomAttackReportsClient = class {
|
|
|
4761
5631
|
baseUrl: this.baseUrl,
|
|
4762
5632
|
path: `${RED_TEAM_CUSTOM_ATTACKS_REPORT_PATH}/report/${jobId}/prompt-set/${promptSetId}/prompts`,
|
|
4763
5633
|
params,
|
|
4764
|
-
responseSchema:
|
|
5634
|
+
responseSchema: z37.array(PromptDetailResponseSchema),
|
|
4765
5635
|
auth: this.auth,
|
|
4766
5636
|
numRetries: this.numRetries
|
|
4767
5637
|
});
|
|
@@ -4819,7 +5689,7 @@ var RedTeamCustomAttackReportsClient = class {
|
|
|
4819
5689
|
method: "GET",
|
|
4820
5690
|
baseUrl: this.baseUrl,
|
|
4821
5691
|
path: `${RED_TEAM_CUSTOM_ATTACKS_REPORT_PATH}/job/${jobId}/attack/${attackId}/list-outputs`,
|
|
4822
|
-
responseSchema:
|
|
5692
|
+
responseSchema: z37.array(CustomAttackOutputSchema),
|
|
4823
5693
|
auth: this.auth,
|
|
4824
5694
|
numRetries: this.numRetries
|
|
4825
5695
|
});
|
|
@@ -4835,7 +5705,7 @@ var RedTeamCustomAttackReportsClient = class {
|
|
|
4835
5705
|
method: "GET",
|
|
4836
5706
|
baseUrl: this.baseUrl,
|
|
4837
5707
|
path: `${RED_TEAM_CUSTOM_ATTACKS_REPORT_PATH}/job/${jobId}/property-stats`,
|
|
4838
|
-
responseSchema:
|
|
5708
|
+
responseSchema: z37.array(PropertyStatisticSchema),
|
|
4839
5709
|
auth: this.auth,
|
|
4840
5710
|
numRetries: this.numRetries
|
|
4841
5711
|
});
|
|
@@ -4843,7 +5713,7 @@ var RedTeamCustomAttackReportsClient = class {
|
|
|
4843
5713
|
};
|
|
4844
5714
|
|
|
4845
5715
|
// src/red-team/targets-client.ts
|
|
4846
|
-
import { z as
|
|
5716
|
+
import { z as z38 } from "zod";
|
|
4847
5717
|
var RedTeamTargetsClient = class {
|
|
4848
5718
|
baseUrl;
|
|
4849
5719
|
auth;
|
|
@@ -5021,7 +5891,7 @@ var RedTeamTargetsClient = class {
|
|
|
5021
5891
|
method: "GET",
|
|
5022
5892
|
baseUrl: this.baseUrl,
|
|
5023
5893
|
path: `${RED_TEAM_TEMPLATE_PATH}/target-metadata`,
|
|
5024
|
-
responseSchema:
|
|
5894
|
+
responseSchema: z38.record(z38.unknown()),
|
|
5025
5895
|
auth: this.auth,
|
|
5026
5896
|
numRetries: this.numRetries
|
|
5027
5897
|
});
|
|
@@ -5818,6 +6688,7 @@ export {
|
|
|
5818
6688
|
AI_SEC_API_TOKEN,
|
|
5819
6689
|
ASYNC_SCAN_PATH,
|
|
5820
6690
|
Action,
|
|
6691
|
+
AdvancedDataProfileRequestSchema,
|
|
5821
6692
|
AgentEntrySchema,
|
|
5822
6693
|
AgentMetaSchema,
|
|
5823
6694
|
AgentProtectionItemSchema,
|
|
@@ -5832,6 +6703,7 @@ export {
|
|
|
5832
6703
|
ApiKeyRegenerateRequestSchema,
|
|
5833
6704
|
ApiKeySchema,
|
|
5834
6705
|
ApiKeysClient,
|
|
6706
|
+
AppExclusionSchema,
|
|
5835
6707
|
AsyncScanObjectSchema,
|
|
5836
6708
|
AsyncScanResponseSchema,
|
|
5837
6709
|
AttackDetailResponseSchema,
|
|
@@ -5842,6 +6714,7 @@ export {
|
|
|
5842
6714
|
AttackOutputSchema,
|
|
5843
6715
|
AttackStatus,
|
|
5844
6716
|
AttackType,
|
|
6717
|
+
AuditResponseSchema,
|
|
5845
6718
|
AuthConfigSchema,
|
|
5846
6719
|
AuthType,
|
|
5847
6720
|
BEARER,
|
|
@@ -5857,6 +6730,7 @@ export {
|
|
|
5857
6730
|
ClientIdAndCustomerAppSchema,
|
|
5858
6731
|
CmdEntrySchema,
|
|
5859
6732
|
CmdInjectReportSchema,
|
|
6733
|
+
ComparisonOperatorTypeSchema,
|
|
5860
6734
|
ComplianceReportSchema,
|
|
5861
6735
|
ComplianceSubCategory,
|
|
5862
6736
|
ComplianceTechniqueSchema,
|
|
@@ -5892,6 +6766,7 @@ export {
|
|
|
5892
6766
|
CustomerAppSchema,
|
|
5893
6767
|
CustomerAppWithKeysSchema,
|
|
5894
6768
|
CustomerAppsClient,
|
|
6769
|
+
DEFAULT_DLP_ENDPOINT,
|
|
5895
6770
|
DEFAULT_ENDPOINT,
|
|
5896
6771
|
DEFAULT_MGMT_ENDPOINT,
|
|
5897
6772
|
DEFAULT_MODEL_SEC_DATA_ENDPOINT,
|
|
@@ -5899,16 +6774,44 @@ export {
|
|
|
5899
6774
|
DEFAULT_RED_TEAM_DATA_ENDPOINT,
|
|
5900
6775
|
DEFAULT_RED_TEAM_MGMT_ENDPOINT,
|
|
5901
6776
|
DEFAULT_TOKEN_ENDPOINT,
|
|
6777
|
+
DLP_DATA_FILTERING_PROFILES_PATH,
|
|
6778
|
+
DLP_DATA_PATTERNS_PATH,
|
|
6779
|
+
DLP_DATA_PROFILES_PATH,
|
|
6780
|
+
DLP_DICTIONARIES_PATH,
|
|
5902
6781
|
DSDetailResultSchema,
|
|
5903
6782
|
DSResultMetadataSchema,
|
|
5904
6783
|
DashboardOverviewResponseSchema,
|
|
6784
|
+
DataFilteringDetailsSchema,
|
|
6785
|
+
DataFilteringProfileRequestSchema,
|
|
6786
|
+
DataFilteringProfileResponseSchema,
|
|
6787
|
+
DataFilteringProfilesClient,
|
|
6788
|
+
DataFilteringRuleDTOSchema,
|
|
5905
6789
|
DataLeakDetectionMemberSchema,
|
|
6790
|
+
DataPatternConfidenceLevelSchema,
|
|
6791
|
+
DataPatternDetectionConfigSchema,
|
|
6792
|
+
DataPatternLicenseTypeSchema,
|
|
6793
|
+
DataPatternMatchingRulesSchema,
|
|
6794
|
+
DataPatternPatchRequestSchema,
|
|
6795
|
+
DataPatternRequestSchema,
|
|
6796
|
+
DataPatternResponseSchema,
|
|
6797
|
+
DataPatternStatusSchema,
|
|
6798
|
+
DataPatternTagsSchema,
|
|
6799
|
+
DataPatternTechniqueSchema,
|
|
6800
|
+
DataPatternTypeSchema,
|
|
6801
|
+
DataPatternsClient,
|
|
6802
|
+
DataProfilePatchRequestSchema,
|
|
6803
|
+
DataProfileResponseSchema,
|
|
6804
|
+
DataProfileStatusSchema,
|
|
6805
|
+
DataProfileSubtypeSchema,
|
|
6806
|
+
DataProfileTypeSchema,
|
|
6807
|
+
DataProfilesClient,
|
|
5906
6808
|
DataProtectionSchema,
|
|
5907
6809
|
DatabaseSecurityItemSchema,
|
|
5908
6810
|
DatabricksConnectionParamsSchema,
|
|
5909
6811
|
DateRangeFilter,
|
|
5910
6812
|
DbsEntrySchema,
|
|
5911
6813
|
DbsReportSchema,
|
|
6814
|
+
DefaultTreeDetectionRuleSchema,
|
|
5912
6815
|
DeleteProfileConflictSchema,
|
|
5913
6816
|
DeleteProfileResponseSchema,
|
|
5914
6817
|
DeleteTopicConflictSchema,
|
|
@@ -5918,6 +6821,9 @@ export {
|
|
|
5918
6821
|
DeploymentProfileRequestSchema,
|
|
5919
6822
|
DeploymentProfilesClient,
|
|
5920
6823
|
DeploymentProfilesResponseSchema,
|
|
6824
|
+
DestinationAttributesSchema,
|
|
6825
|
+
DetectionRuleItemSchema,
|
|
6826
|
+
DetectionRuleSchema,
|
|
5921
6827
|
DetectionServiceName,
|
|
5922
6828
|
DetectionServiceResultSchema,
|
|
5923
6829
|
DeviceInstanceSchema,
|
|
@@ -5926,8 +6832,20 @@ export {
|
|
|
5926
6832
|
DeviceResponseSchema,
|
|
5927
6833
|
DeviceSchema,
|
|
5928
6834
|
DeviceStatusSchema,
|
|
6835
|
+
DictionariesClient,
|
|
6836
|
+
DictionaryCategorySchema,
|
|
6837
|
+
DictionaryClassificationSchema,
|
|
6838
|
+
DictionaryDetectionSubTechniqueSchema,
|
|
6839
|
+
DictionaryDetectionTechniqueSchema,
|
|
6840
|
+
DictionaryMetaDataDTOSchema,
|
|
6841
|
+
DictionaryPatchRequestSchema,
|
|
6842
|
+
DictionaryRequestSchema,
|
|
6843
|
+
DictionaryResponseSchema,
|
|
6844
|
+
DictionaryTagsSchema,
|
|
6845
|
+
DictionaryTypeSchema,
|
|
5929
6846
|
DlpDataProfilePolicySchema,
|
|
5930
6847
|
DlpDataProfileSchema,
|
|
6848
|
+
DlpNamespace,
|
|
5931
6849
|
DlpPatternDetectionSchema,
|
|
5932
6850
|
DlpProfileListResponseSchema,
|
|
5933
6851
|
DlpProfilesClient,
|
|
@@ -5948,6 +6866,10 @@ export {
|
|
|
5948
6866
|
EulaResponseSchema,
|
|
5949
6867
|
EvalOutcome,
|
|
5950
6868
|
EvalSummarySchema,
|
|
6869
|
+
ExceptionRuleDTOSchema,
|
|
6870
|
+
ExclusionsSchema,
|
|
6871
|
+
ExpressionOperatorTypeSchema,
|
|
6872
|
+
ExpressionTreeNodeSchema,
|
|
5951
6873
|
FileFormat,
|
|
5952
6874
|
FileListSchema,
|
|
5953
6875
|
FileResponseSchema,
|
|
@@ -6038,6 +6960,7 @@ export {
|
|
|
6038
6960
|
MaskedDataSchema,
|
|
6039
6961
|
McEntrySchema,
|
|
6040
6962
|
McReportSchema,
|
|
6963
|
+
MetadataCriterionSchema,
|
|
6041
6964
|
MetadataSchema,
|
|
6042
6965
|
ModelConfigurationSchema,
|
|
6043
6966
|
ModelProtectionItemSchema,
|
|
@@ -6055,6 +6978,8 @@ export {
|
|
|
6055
6978
|
ModelSecurityRuleResponseSchema,
|
|
6056
6979
|
ModelSecurityRulesClient,
|
|
6057
6980
|
ModelSecurityScansClient,
|
|
6981
|
+
MultiProfileDataNodeSchema,
|
|
6982
|
+
MultiProfileDetectionRuleSchema,
|
|
6058
6983
|
MultiTurnStatefulConfigSchema,
|
|
6059
6984
|
MultiTurnStatelessConfigSchema,
|
|
6060
6985
|
OAuth2AuthConfigSchema,
|
|
@@ -6064,6 +6989,11 @@ export {
|
|
|
6064
6989
|
OffsetSchema,
|
|
6065
6990
|
OpenAIConnectionParamsSchema,
|
|
6066
6991
|
PAYLOAD_HASH,
|
|
6992
|
+
PageDataFilteringProfileResponseSchema,
|
|
6993
|
+
PageDataPatternResponseSchema,
|
|
6994
|
+
PageDataProfileResponseSchema,
|
|
6995
|
+
PageDictionaryResponseSchema,
|
|
6996
|
+
PageableObjectSchema,
|
|
6067
6997
|
PaginatedScanResultsSchema,
|
|
6068
6998
|
PatternDetectionSchema,
|
|
6069
6999
|
PolicyAppProtectionSchema,
|
|
@@ -6129,6 +7059,7 @@ export {
|
|
|
6129
7059
|
RegistryCredentialsSchema,
|
|
6130
7060
|
RemediationDetailSchema,
|
|
6131
7061
|
RemediationResponseSchema,
|
|
7062
|
+
ResourceModelExtensionSchema,
|
|
6132
7063
|
ResponseDetectedSchema,
|
|
6133
7064
|
ResponseDetectionDetailsSchema,
|
|
6134
7065
|
ResponseMode,
|
|
@@ -6143,6 +7074,11 @@ export {
|
|
|
6143
7074
|
RuleEvaluationResponseSchema,
|
|
6144
7075
|
RuleEvaluationResult,
|
|
6145
7076
|
RuleFieldValueKey,
|
|
7077
|
+
RuleItemConfidenceLevelSchema,
|
|
7078
|
+
RuleItemDetectionTechniqueSchema,
|
|
7079
|
+
RuleItemEdmMatchCriteriaSchema,
|
|
7080
|
+
RuleItemMatchTypeSchema,
|
|
7081
|
+
RuleItemOccurrenceOperatorTypeSchema,
|
|
6146
7082
|
RuleRemediationSchema,
|
|
6147
7083
|
RuleState,
|
|
6148
7084
|
RuleType,
|
|
@@ -6181,6 +7117,8 @@ export {
|
|
|
6181
7117
|
SortByDateField,
|
|
6182
7118
|
SortByFileField,
|
|
6183
7119
|
SortDirection,
|
|
7120
|
+
SortObjectSchema,
|
|
7121
|
+
SourceAttributesSchema,
|
|
6184
7122
|
SourceType,
|
|
6185
7123
|
StaticJobMetadataSchema,
|
|
6186
7124
|
StaticJobRemediationRecommendationSchema,
|
|
@@ -6228,6 +7166,7 @@ export {
|
|
|
6228
7166
|
TopicArraySchema,
|
|
6229
7167
|
TopicObjectSchema,
|
|
6230
7168
|
TopicsClient,
|
|
7169
|
+
URLExclusionSchema,
|
|
6231
7170
|
USER_AGENT,
|
|
6232
7171
|
UrlCategorySchema,
|
|
6233
7172
|
UrlfEntrySchema,
|
|
@@ -6236,7 +7175,10 @@ export {
|
|
|
6236
7175
|
ViolationListSchema,
|
|
6237
7176
|
ViolationResponseSchema,
|
|
6238
7177
|
WebSocketConnectionParamsSchema,
|
|
7178
|
+
WeightedRegexSchema,
|
|
6239
7179
|
globalConfiguration,
|
|
6240
|
-
init
|
|
7180
|
+
init,
|
|
7181
|
+
jsonNullable,
|
|
7182
|
+
pageSchema
|
|
6241
7183
|
};
|
|
6242
7184
|
//# sourceMappingURL=index.js.map
|