@cdot65/prisma-airs-sdk 0.10.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1737 -1567
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +862 -17
- package/dist/index.d.ts +862 -17
- package/dist/index.js +1727 -1567
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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.11.0";
|
|
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,8 @@ 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 MGMT_DASHBOARD_APPLICATION_PATH = "/v1/mgmt/dashboard/v2/apps/application";
|
|
60
|
+
var MGMT_DASHBOARD_APPLICATION_VIOLATION_BREAKDOWN_PATH = "/v1/mgmt/dashboard/v2/apps/applicationviolationbreakdown";
|
|
59
61
|
var DEFAULT_DLP_ENDPOINT = "https://api.dlp.paloaltonetworks.com";
|
|
60
62
|
var DLP_DATA_FILTERING_PROFILES_PATH = "/v2/api/data-filtering-profiles";
|
|
61
63
|
var DLP_DATA_PATTERNS_PATH = "/v2/api/data-patterns";
|
|
@@ -1313,9 +1315,10 @@ var SecurityProfileListResponseSchema = z17.object({
|
|
|
1313
1315
|
ai_profiles: z17.array(SecurityProfileSchema),
|
|
1314
1316
|
next_offset: z17.number().optional()
|
|
1315
1317
|
}).passthrough();
|
|
1316
|
-
var DeleteProfileResponseSchema = z17.
|
|
1317
|
-
|
|
1318
|
-
}).passthrough()
|
|
1318
|
+
var DeleteProfileResponseSchema = z17.union([
|
|
1319
|
+
z17.string().transform((message) => ({ message })),
|
|
1320
|
+
z17.object({ message: z17.string() }).passthrough()
|
|
1321
|
+
]);
|
|
1319
1322
|
var DeleteProfileConflictSchema = z17.object({
|
|
1320
1323
|
message: z17.string(),
|
|
1321
1324
|
payload: z17.array(
|
|
@@ -1357,9 +1360,10 @@ var CustomTopicListResponseSchema = z18.object({
|
|
|
1357
1360
|
custom_topics: z18.array(CustomTopicSchema),
|
|
1358
1361
|
next_offset: z18.number().optional()
|
|
1359
1362
|
}).passthrough();
|
|
1360
|
-
var DeleteTopicResponseSchema = z18.
|
|
1361
|
-
|
|
1362
|
-
}).passthrough()
|
|
1363
|
+
var DeleteTopicResponseSchema = z18.union([
|
|
1364
|
+
z18.string().transform((message) => ({ message })),
|
|
1365
|
+
z18.object({ message: z18.string() }).passthrough()
|
|
1366
|
+
]);
|
|
1363
1367
|
var DeleteTopicConflictSchema = z18.object({
|
|
1364
1368
|
message: z18.string(),
|
|
1365
1369
|
payload: z18.array(
|
|
@@ -1422,9 +1426,10 @@ var ApiKeyListResponseSchema = z19.object({
|
|
|
1422
1426
|
api_keys: z19.array(ApiKeySchema).optional(),
|
|
1423
1427
|
next_offset: z19.number().optional()
|
|
1424
1428
|
}).passthrough();
|
|
1425
|
-
var ApiKeyDeleteResponseSchema = z19.
|
|
1426
|
-
|
|
1427
|
-
}).passthrough()
|
|
1429
|
+
var ApiKeyDeleteResponseSchema = z19.union([
|
|
1430
|
+
z19.string().transform((message) => ({ message })),
|
|
1431
|
+
z19.object({ message: z19.string().optional() }).passthrough()
|
|
1432
|
+
]);
|
|
1428
1433
|
|
|
1429
1434
|
// src/models/mgmt-customer-app.ts
|
|
1430
1435
|
import { z as z20 } from "zod";
|
|
@@ -1459,180 +1464,226 @@ var CustomerAppListResponseSchema = z20.object({
|
|
|
1459
1464
|
customer_apps: z20.array(CustomerAppWithKeysSchema).optional(),
|
|
1460
1465
|
next_offset: z20.number().optional()
|
|
1461
1466
|
}).passthrough();
|
|
1467
|
+
var CustomerAppDeleteResponseSchema = z20.union([
|
|
1468
|
+
z20.string().transform((message) => ({ message })),
|
|
1469
|
+
z20.object({ message: z20.string() }).passthrough()
|
|
1470
|
+
]);
|
|
1462
1471
|
|
|
1463
|
-
// src/models/mgmt-
|
|
1472
|
+
// src/models/mgmt-dashboard.ts
|
|
1464
1473
|
import { z as z21 } from "zod";
|
|
1465
|
-
var
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1474
|
+
var TokenStatsSchema = z21.object({
|
|
1475
|
+
average_daily_tokens: z21.number().nullable().optional(),
|
|
1476
|
+
average_daily_tokens_scale: z21.string().nullable().optional(),
|
|
1477
|
+
monthly_total_tokens: z21.number().nullable().optional(),
|
|
1478
|
+
monthly_total_tokens_scale: z21.string().nullable().optional()
|
|
1479
|
+
}).passthrough();
|
|
1480
|
+
var ViolationSeverityCountsSchema = z21.object({
|
|
1481
|
+
critical: z21.number().optional(),
|
|
1482
|
+
high: z21.number().optional(),
|
|
1483
|
+
medium: z21.number().optional(),
|
|
1484
|
+
low: z21.number().optional(),
|
|
1485
|
+
total: z21.number().optional()
|
|
1486
|
+
}).passthrough();
|
|
1487
|
+
var DashboardSessionStatsSchema = z21.object({
|
|
1488
|
+
total: z21.number().optional(),
|
|
1489
|
+
violating: z21.number().optional(),
|
|
1490
|
+
violation_breakdown: ViolationSeverityCountsSchema.optional(),
|
|
1491
|
+
last_session_id: z21.string().nullable().optional(),
|
|
1492
|
+
most_recent_session_time: z21.string().nullable().optional()
|
|
1493
|
+
}).passthrough();
|
|
1494
|
+
var DashboardApplicationSchema = z21.object({
|
|
1495
|
+
id: z21.string().nullable().optional(),
|
|
1496
|
+
name: z21.string().nullable().optional(),
|
|
1497
|
+
cloud: z21.string().nullable().optional(),
|
|
1498
|
+
source: z21.string().nullable().optional(),
|
|
1499
|
+
created_at: z21.string().nullable().optional(),
|
|
1500
|
+
updated_at: z21.string().nullable().optional(),
|
|
1501
|
+
profiles: z21.array(z21.string()).nullable().optional(),
|
|
1502
|
+
token_stats: TokenStatsSchema.nullable().optional(),
|
|
1503
|
+
session_stats: DashboardSessionStatsSchema.nullable().optional()
|
|
1504
|
+
}).passthrough();
|
|
1505
|
+
var DetectorViolationBreakdownEntrySchema = z21.object({
|
|
1506
|
+
detection_type: z21.string().optional(),
|
|
1507
|
+
violation_breakdown: ViolationSeverityCountsSchema.optional()
|
|
1508
|
+
}).passthrough();
|
|
1509
|
+
var DashboardApplicationViolationBreakdownSchema = z21.object({
|
|
1510
|
+
detection_type_violation_breakdown: z21.array(DetectorViolationBreakdownEntrySchema).optional(),
|
|
1511
|
+
total_violating: z21.number().optional()
|
|
1476
1512
|
}).passthrough();
|
|
1477
1513
|
|
|
1478
|
-
// src/models/mgmt-
|
|
1514
|
+
// src/models/mgmt-deployment-profile.ts
|
|
1479
1515
|
import { z as z22 } from "zod";
|
|
1480
|
-
var
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
var DlpProfileListResponseSchema = z22.object({
|
|
1492
|
-
dlp_profiles: z22.array(DlpDataProfileSchema).optional()
|
|
1516
|
+
var DeploymentProfileEntrySchema = z22.object({
|
|
1517
|
+
dp_name: z22.string(),
|
|
1518
|
+
auth_code: z22.string(),
|
|
1519
|
+
tsg_id: z22.string().optional(),
|
|
1520
|
+
status: z22.string().optional(),
|
|
1521
|
+
expiration_date: z22.string().optional(),
|
|
1522
|
+
ave_text_records: z22.number().optional()
|
|
1523
|
+
}).passthrough();
|
|
1524
|
+
var DeploymentProfilesResponseSchema = z22.object({
|
|
1525
|
+
deployment_profiles: z22.array(DeploymentProfileEntrySchema),
|
|
1526
|
+
status: z22.string()
|
|
1493
1527
|
}).passthrough();
|
|
1494
1528
|
|
|
1495
|
-
// src/models/mgmt-
|
|
1529
|
+
// src/models/mgmt-dlp-profile.ts
|
|
1496
1530
|
import { z as z23 } from "zod";
|
|
1497
|
-
var
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1531
|
+
var DlpDataProfileSchema = z23.object({
|
|
1532
|
+
name: z23.string(),
|
|
1533
|
+
uuid: z23.string(),
|
|
1534
|
+
id: z23.string().optional(),
|
|
1535
|
+
version: z23.string().optional(),
|
|
1536
|
+
rule1: z23.object({ action: z23.string().optional() }).passthrough().optional(),
|
|
1537
|
+
rule2: z23.object({ action: z23.string().optional() }).passthrough().optional(),
|
|
1538
|
+
"log-severity": z23.string().optional(),
|
|
1539
|
+
"non-file-based": z23.string().optional(),
|
|
1540
|
+
"file-based": z23.string().optional()
|
|
1541
|
+
}).passthrough();
|
|
1542
|
+
var DlpProfileListResponseSchema = z23.object({
|
|
1543
|
+
dlp_profiles: z23.array(DlpDataProfileSchema).optional()
|
|
1544
|
+
}).passthrough();
|
|
1545
|
+
|
|
1546
|
+
// src/models/mgmt-scan-log.ts
|
|
1547
|
+
import { z as z24 } from "zod";
|
|
1548
|
+
var ScanResultEntrySchema = z24.object({
|
|
1549
|
+
csp_id: z24.string(),
|
|
1550
|
+
tsg_id: z24.string(),
|
|
1551
|
+
scan_id: z24.string(),
|
|
1552
|
+
scan_sub_req_id: z24.number(),
|
|
1553
|
+
api_key_name: z24.string(),
|
|
1554
|
+
app_name: z24.string(),
|
|
1555
|
+
tokens: z24.number(),
|
|
1556
|
+
text_records: z24.number(),
|
|
1557
|
+
transaction_id: z24.string().optional(),
|
|
1558
|
+
profile_id: z24.string().optional(),
|
|
1559
|
+
profile_name: z24.string().optional(),
|
|
1560
|
+
model_name: z24.string().optional(),
|
|
1561
|
+
user: z24.string().optional(),
|
|
1562
|
+
environment: z24.string().optional(),
|
|
1563
|
+
cloud_provider: z24.string().optional(),
|
|
1564
|
+
agent_framework: z24.string().optional(),
|
|
1565
|
+
report_id: z24.string().optional(),
|
|
1566
|
+
received_ts: z24.string().optional(),
|
|
1567
|
+
completed_ts: z24.string().optional(),
|
|
1568
|
+
status: z24.string().optional(),
|
|
1569
|
+
verdict: z24.string().optional(),
|
|
1570
|
+
action: z24.string().optional(),
|
|
1571
|
+
is_prompt: z24.boolean().optional(),
|
|
1572
|
+
is_response: z24.boolean().optional(),
|
|
1573
|
+
pi_final_verdict: z24.string().optional(),
|
|
1574
|
+
uf_final_verdict: z24.string().optional(),
|
|
1575
|
+
dlp_final_verdict: z24.string().optional(),
|
|
1576
|
+
dbs_final_verdict: z24.string().optional(),
|
|
1577
|
+
tc_final_verdict: z24.string().optional(),
|
|
1578
|
+
mc_final_verdict: z24.string().optional(),
|
|
1579
|
+
agent_final_verdict: z24.string().optional(),
|
|
1580
|
+
cg_final_verdict: z24.string().optional(),
|
|
1581
|
+
tg_final_verdict: z24.string().optional(),
|
|
1582
|
+
prompt_pi_verdict: z24.string().optional(),
|
|
1583
|
+
prompt_uf_verdict: z24.string().optional(),
|
|
1584
|
+
prompt_dlp_verdict: z24.string().optional(),
|
|
1585
|
+
prompt_tc_verdict: z24.string().optional(),
|
|
1586
|
+
prompt_mc_verdict: z24.string().optional(),
|
|
1587
|
+
prompt_agent_verdict: z24.string().optional(),
|
|
1588
|
+
prompt_tg_verdict: z24.string().optional(),
|
|
1589
|
+
prompt_verdict: z24.string().optional(),
|
|
1590
|
+
prompt_pi_action: z24.string().optional(),
|
|
1591
|
+
prompt_uf_action: z24.string().optional(),
|
|
1592
|
+
prompt_dlp_action: z24.string().optional(),
|
|
1593
|
+
prompt_tc_action: z24.string().optional(),
|
|
1594
|
+
prompt_mc_action: z24.string().optional(),
|
|
1595
|
+
prompt_agent_action: z24.string().optional(),
|
|
1596
|
+
prompt_tg_action: z24.string().optional(),
|
|
1597
|
+
response_uf_verdict: z24.string().optional(),
|
|
1598
|
+
response_dlp_verdict: z24.string().optional(),
|
|
1599
|
+
response_dbs_verdict: z24.string().optional(),
|
|
1600
|
+
response_tc_verdict: z24.string().optional(),
|
|
1601
|
+
response_mc_verdict: z24.string().optional(),
|
|
1602
|
+
response_agent_verdict: z24.string().optional(),
|
|
1603
|
+
response_cg_verdict: z24.string().optional(),
|
|
1604
|
+
response_tg_verdict: z24.string().optional(),
|
|
1605
|
+
response_uf_action: z24.string().optional(),
|
|
1606
|
+
response_dlp_action: z24.string().optional(),
|
|
1607
|
+
response_dbs_action: z24.string().optional(),
|
|
1608
|
+
response_tc_action: z24.string().optional(),
|
|
1609
|
+
response_mc_action: z24.string().optional(),
|
|
1610
|
+
response_agent_action: z24.string().optional(),
|
|
1611
|
+
response_cg_action: z24.string().optional(),
|
|
1612
|
+
response_tg_action: z24.string().optional(),
|
|
1613
|
+
response_verdict: z24.string().optional(),
|
|
1614
|
+
detection_service_flags: z24.number().optional(),
|
|
1615
|
+
content_masked: z24.boolean().optional(),
|
|
1616
|
+
user_ip: z24.string().optional()
|
|
1617
|
+
}).passthrough();
|
|
1618
|
+
var ScanResultForDashboardSchema = z24.object({
|
|
1619
|
+
text_records_count: z24.number().optional(),
|
|
1620
|
+
api_calls_count: z24.number().optional(),
|
|
1621
|
+
threats_count: z24.number().optional(),
|
|
1622
|
+
all_transactions_count: z24.number().optional(),
|
|
1623
|
+
benign_transaction_count: z24.number().optional(),
|
|
1624
|
+
scan_result_entries: z24.array(ScanResultEntrySchema).optional()
|
|
1625
|
+
}).passthrough();
|
|
1626
|
+
var PaginatedScanResultsSchema = z24.object({
|
|
1576
1627
|
scan_result_for_dashboard: ScanResultForDashboardSchema.optional(),
|
|
1577
|
-
total_pages:
|
|
1578
|
-
page_number:
|
|
1579
|
-
page_size:
|
|
1580
|
-
page_token:
|
|
1581
|
-
revision:
|
|
1628
|
+
total_pages: z24.number().optional(),
|
|
1629
|
+
page_number: z24.number().optional(),
|
|
1630
|
+
page_size: z24.number().optional(),
|
|
1631
|
+
page_token: z24.string().optional(),
|
|
1632
|
+
revision: z24.number().optional()
|
|
1582
1633
|
}).passthrough();
|
|
1583
1634
|
|
|
1584
1635
|
// src/models/mgmt-oauth.ts
|
|
1585
|
-
import { z as
|
|
1586
|
-
var ClientIdAndCustomerAppSchema =
|
|
1587
|
-
client_id:
|
|
1588
|
-
customer_app:
|
|
1589
|
-
}).passthrough();
|
|
1590
|
-
var Oauth2TokenSchema =
|
|
1591
|
-
token_type:
|
|
1592
|
-
issued_at:
|
|
1593
|
-
client_id:
|
|
1594
|
-
access_token:
|
|
1595
|
-
expires_in:
|
|
1596
|
-
status:
|
|
1636
|
+
import { z as z25 } from "zod";
|
|
1637
|
+
var ClientIdAndCustomerAppSchema = z25.object({
|
|
1638
|
+
client_id: z25.string(),
|
|
1639
|
+
customer_app: z25.string()
|
|
1640
|
+
}).passthrough();
|
|
1641
|
+
var Oauth2TokenSchema = z25.object({
|
|
1642
|
+
token_type: z25.string().optional(),
|
|
1643
|
+
issued_at: z25.string().optional(),
|
|
1644
|
+
client_id: z25.string().optional(),
|
|
1645
|
+
access_token: z25.string(),
|
|
1646
|
+
expires_in: z25.string().optional(),
|
|
1647
|
+
status: z25.string().optional()
|
|
1597
1648
|
}).passthrough();
|
|
1598
1649
|
|
|
1599
1650
|
// src/models/dlp-audit.ts
|
|
1600
|
-
import { z as
|
|
1601
|
-
var AuditResponseSchema =
|
|
1602
|
-
created_at:
|
|
1603
|
-
created_by:
|
|
1604
|
-
updated_at:
|
|
1605
|
-
updated_by:
|
|
1651
|
+
import { z as z26 } from "zod";
|
|
1652
|
+
var AuditResponseSchema = z26.object({
|
|
1653
|
+
created_at: z26.union([z26.string(), z26.number()]).nullish(),
|
|
1654
|
+
created_by: z26.string().nullish(),
|
|
1655
|
+
updated_at: z26.union([z26.string(), z26.number()]).nullish(),
|
|
1656
|
+
updated_by: z26.string().nullish()
|
|
1606
1657
|
}).passthrough();
|
|
1607
1658
|
|
|
1608
1659
|
// src/models/dlp-page.ts
|
|
1609
|
-
import { z as
|
|
1610
|
-
var SortObjectSchema =
|
|
1611
|
-
empty:
|
|
1612
|
-
sorted:
|
|
1613
|
-
unsorted:
|
|
1614
|
-
}).passthrough();
|
|
1615
|
-
var PageableObjectSchema =
|
|
1616
|
-
offset:
|
|
1617
|
-
pageNumber:
|
|
1618
|
-
pageSize:
|
|
1619
|
-
paged:
|
|
1620
|
-
unpaged:
|
|
1660
|
+
import { z as z27 } from "zod";
|
|
1661
|
+
var SortObjectSchema = z27.object({
|
|
1662
|
+
empty: z27.boolean().optional(),
|
|
1663
|
+
sorted: z27.boolean().optional(),
|
|
1664
|
+
unsorted: z27.boolean().optional()
|
|
1665
|
+
}).passthrough();
|
|
1666
|
+
var PageableObjectSchema = z27.object({
|
|
1667
|
+
offset: z27.number().optional(),
|
|
1668
|
+
pageNumber: z27.number().optional(),
|
|
1669
|
+
pageSize: z27.number().optional(),
|
|
1670
|
+
paged: z27.boolean().optional(),
|
|
1671
|
+
unpaged: z27.boolean().optional(),
|
|
1621
1672
|
sort: SortObjectSchema.optional()
|
|
1622
1673
|
}).passthrough();
|
|
1623
1674
|
function pageSchema(itemSchema) {
|
|
1624
|
-
return
|
|
1625
|
-
content:
|
|
1626
|
-
empty:
|
|
1627
|
-
first:
|
|
1628
|
-
last:
|
|
1629
|
-
number:
|
|
1630
|
-
numberOfElements:
|
|
1675
|
+
return z27.object({
|
|
1676
|
+
content: z27.array(itemSchema),
|
|
1677
|
+
empty: z27.boolean().optional(),
|
|
1678
|
+
first: z27.boolean().optional(),
|
|
1679
|
+
last: z27.boolean().optional(),
|
|
1680
|
+
number: z27.number().optional(),
|
|
1681
|
+
numberOfElements: z27.number().optional(),
|
|
1631
1682
|
pageable: PageableObjectSchema.optional(),
|
|
1632
|
-
size:
|
|
1683
|
+
size: z27.number().optional(),
|
|
1633
1684
|
sort: SortObjectSchema.optional(),
|
|
1634
|
-
totalElements:
|
|
1635
|
-
totalPages:
|
|
1685
|
+
totalElements: z27.number().optional(),
|
|
1686
|
+
totalPages: z27.number().optional()
|
|
1636
1687
|
}).passthrough();
|
|
1637
1688
|
}
|
|
1638
1689
|
|
|
@@ -1642,9 +1693,9 @@ function jsonNullable(inner) {
|
|
|
1642
1693
|
}
|
|
1643
1694
|
|
|
1644
1695
|
// src/models/dlp-dictionary.ts
|
|
1645
|
-
import { z as
|
|
1646
|
-
var DictionaryTypeSchema =
|
|
1647
|
-
var DictionaryCategorySchema =
|
|
1696
|
+
import { z as z28 } from "zod";
|
|
1697
|
+
var DictionaryTypeSchema = z28.enum(["predefined", "custom"]);
|
|
1698
|
+
var DictionaryCategorySchema = z28.enum([
|
|
1648
1699
|
"Academic",
|
|
1649
1700
|
"Confidential",
|
|
1650
1701
|
"Employment",
|
|
@@ -1655,8 +1706,8 @@ var DictionaryCategorySchema = z27.enum([
|
|
|
1655
1706
|
"Marketing",
|
|
1656
1707
|
"Source Code"
|
|
1657
1708
|
]);
|
|
1658
|
-
var DictionaryClassificationSchema =
|
|
1659
|
-
var DictionaryDetectionTechniqueSchema =
|
|
1709
|
+
var DictionaryClassificationSchema = z28.enum(["pab", "endpoint"]);
|
|
1710
|
+
var DictionaryDetectionTechniqueSchema = z28.enum([
|
|
1660
1711
|
"edm",
|
|
1661
1712
|
"document_fingerprint",
|
|
1662
1713
|
"trainable_classifier",
|
|
@@ -1671,7 +1722,7 @@ var DictionaryDetectionTechniqueSchema = z27.enum([
|
|
|
1671
1722
|
"pab",
|
|
1672
1723
|
"document_classifier"
|
|
1673
1724
|
]);
|
|
1674
|
-
var DictionaryDetectionSubTechniqueSchema =
|
|
1725
|
+
var DictionaryDetectionSubTechniqueSchema = z28.enum([
|
|
1675
1726
|
"dnn",
|
|
1676
1727
|
"gamma",
|
|
1677
1728
|
"ml_gateway",
|
|
@@ -1681,59 +1732,59 @@ var DictionaryDetectionSubTechniqueSchema = z27.enum([
|
|
|
1681
1732
|
"compression",
|
|
1682
1733
|
"threshold"
|
|
1683
1734
|
]);
|
|
1684
|
-
var DictionaryMetaDataDTOSchema =
|
|
1685
|
-
number_of_keywords:
|
|
1686
|
-
original_file_name:
|
|
1687
|
-
original_file_size_in_byte:
|
|
1735
|
+
var DictionaryMetaDataDTOSchema = z28.object({
|
|
1736
|
+
number_of_keywords: z28.number().nullish(),
|
|
1737
|
+
original_file_name: z28.string().nullish(),
|
|
1738
|
+
original_file_size_in_byte: z28.number().nullish()
|
|
1688
1739
|
}).passthrough();
|
|
1689
|
-
var DictionaryTagsSchema =
|
|
1690
|
-
classification:
|
|
1740
|
+
var DictionaryTagsSchema = z28.object({
|
|
1741
|
+
classification: z28.array(DictionaryClassificationSchema).nullish()
|
|
1691
1742
|
}).passthrough();
|
|
1692
|
-
var ResourceModelExtensionSchema =
|
|
1693
|
-
key:
|
|
1694
|
-
value:
|
|
1743
|
+
var ResourceModelExtensionSchema = z28.object({
|
|
1744
|
+
key: z28.string().nullish(),
|
|
1745
|
+
value: z28.string().nullish()
|
|
1695
1746
|
}).passthrough();
|
|
1696
|
-
var DictionaryRequestSchema =
|
|
1747
|
+
var DictionaryRequestSchema = z28.object({
|
|
1697
1748
|
category: DictionaryCategorySchema,
|
|
1698
|
-
name:
|
|
1699
|
-
original_file_name:
|
|
1700
|
-
region_name:
|
|
1701
|
-
description:
|
|
1702
|
-
is_case_sensitive:
|
|
1749
|
+
name: z28.string(),
|
|
1750
|
+
original_file_name: z28.string(),
|
|
1751
|
+
region_name: z28.string(),
|
|
1752
|
+
description: z28.string().optional(),
|
|
1753
|
+
is_case_sensitive: z28.boolean().optional(),
|
|
1703
1754
|
type: DictionaryTypeSchema.optional()
|
|
1704
1755
|
}).passthrough();
|
|
1705
|
-
var DictionaryPatchRequestSchema =
|
|
1756
|
+
var DictionaryPatchRequestSchema = z28.object({
|
|
1706
1757
|
category: DictionaryCategorySchema,
|
|
1707
|
-
name:
|
|
1708
|
-
original_file_name:
|
|
1709
|
-
description: jsonNullable(
|
|
1710
|
-
is_case_sensitive: jsonNullable(
|
|
1711
|
-
region_name: jsonNullable(
|
|
1712
|
-
}).passthrough();
|
|
1713
|
-
var DictionaryResponseSchema =
|
|
1714
|
-
id:
|
|
1715
|
-
name:
|
|
1716
|
-
description:
|
|
1717
|
-
category:
|
|
1718
|
-
region_name:
|
|
1758
|
+
name: z28.string(),
|
|
1759
|
+
original_file_name: z28.string(),
|
|
1760
|
+
description: jsonNullable(z28.string()),
|
|
1761
|
+
is_case_sensitive: jsonNullable(z28.boolean()),
|
|
1762
|
+
region_name: jsonNullable(z28.string())
|
|
1763
|
+
}).passthrough();
|
|
1764
|
+
var DictionaryResponseSchema = z28.object({
|
|
1765
|
+
id: z28.string().nullish(),
|
|
1766
|
+
name: z28.string().nullish(),
|
|
1767
|
+
description: z28.string().nullish(),
|
|
1768
|
+
category: z28.string().nullish(),
|
|
1769
|
+
region_name: z28.string().nullish(),
|
|
1719
1770
|
type: DictionaryTypeSchema.nullish(),
|
|
1720
|
-
is_case_sensitive:
|
|
1721
|
-
is_parent_managed:
|
|
1771
|
+
is_case_sensitive: z28.boolean().nullish(),
|
|
1772
|
+
is_parent_managed: z28.boolean().nullish(),
|
|
1722
1773
|
detection_technique: DictionaryDetectionTechniqueSchema.nullish(),
|
|
1723
1774
|
detection_sub_technique: DictionaryDetectionSubTechniqueSchema.nullish(),
|
|
1724
1775
|
dictionary_metadata: DictionaryMetaDataDTOSchema.nullish(),
|
|
1725
1776
|
/** Keyword list — populated only when `keywords=true` is passed as a query parameter. */
|
|
1726
|
-
keywords:
|
|
1777
|
+
keywords: z28.array(z28.string()).nullish(),
|
|
1727
1778
|
tags: DictionaryTagsSchema.nullish(),
|
|
1728
|
-
attributes:
|
|
1779
|
+
attributes: z28.array(ResourceModelExtensionSchema).nullish(),
|
|
1729
1780
|
audit_metadata: AuditResponseSchema.nullish()
|
|
1730
1781
|
}).passthrough();
|
|
1731
1782
|
var PageDictionaryResponseSchema = pageSchema(DictionaryResponseSchema);
|
|
1732
1783
|
|
|
1733
1784
|
// src/models/dlp-data-pattern.ts
|
|
1734
|
-
import { z as
|
|
1735
|
-
var DataPatternTypeSchema =
|
|
1736
|
-
var DataPatternTechniqueSchema =
|
|
1785
|
+
import { z as z29 } from "zod";
|
|
1786
|
+
var DataPatternTypeSchema = z29.enum(["predefined", "custom", "file_property"]);
|
|
1787
|
+
var DataPatternTechniqueSchema = z29.enum([
|
|
1737
1788
|
"edm",
|
|
1738
1789
|
"document_fingerprint",
|
|
1739
1790
|
"trainable_classifier",
|
|
@@ -1748,75 +1799,75 @@ var DataPatternTechniqueSchema = z28.enum([
|
|
|
1748
1799
|
"pab",
|
|
1749
1800
|
"document_classifier"
|
|
1750
1801
|
]);
|
|
1751
|
-
var DataPatternConfidenceLevelSchema =
|
|
1752
|
-
var DataPatternLicenseTypeSchema =
|
|
1753
|
-
var DataPatternStatusSchema =
|
|
1802
|
+
var DataPatternConfidenceLevelSchema = z29.enum(["low", "medium", "high"]);
|
|
1803
|
+
var DataPatternLicenseTypeSchema = z29.enum(["standard", "enterprise", "essentials"]);
|
|
1804
|
+
var DataPatternStatusSchema = z29.enum([
|
|
1754
1805
|
"active",
|
|
1755
1806
|
"disabled",
|
|
1756
1807
|
"deleted",
|
|
1757
1808
|
"deprecated",
|
|
1758
1809
|
"silent"
|
|
1759
1810
|
]);
|
|
1760
|
-
var ComparisonOperatorTypeSchema =
|
|
1811
|
+
var ComparisonOperatorTypeSchema = z29.enum([
|
|
1761
1812
|
"less_than",
|
|
1762
1813
|
"less_than_or_equal_to",
|
|
1763
1814
|
"greater_than_or_equal_to",
|
|
1764
1815
|
"greater_than",
|
|
1765
1816
|
"equal_to"
|
|
1766
1817
|
]);
|
|
1767
|
-
var WeightedRegexSchema =
|
|
1768
|
-
regex:
|
|
1769
|
-
weight:
|
|
1818
|
+
var WeightedRegexSchema = z29.object({
|
|
1819
|
+
regex: z29.string().min(1),
|
|
1820
|
+
weight: z29.number()
|
|
1770
1821
|
}).passthrough();
|
|
1771
|
-
var MetadataCriterionSchema =
|
|
1822
|
+
var MetadataCriterionSchema = z29.object({
|
|
1772
1823
|
comparisonOperatorType: ComparisonOperatorTypeSchema.nullish(),
|
|
1773
|
-
name:
|
|
1774
|
-
type:
|
|
1775
|
-
value:
|
|
1824
|
+
name: z29.string().nullish(),
|
|
1825
|
+
type: z29.string().nullish(),
|
|
1826
|
+
value: z29.string().nullish()
|
|
1776
1827
|
}).passthrough();
|
|
1777
|
-
var DataPatternDetectionConfigSchema =
|
|
1828
|
+
var DataPatternDetectionConfigSchema = z29.object({
|
|
1778
1829
|
technique: DataPatternTechniqueSchema,
|
|
1779
|
-
supported_confidence_levels:
|
|
1830
|
+
supported_confidence_levels: z29.array(DataPatternConfidenceLevelSchema).nullish()
|
|
1780
1831
|
}).passthrough();
|
|
1781
|
-
var DataPatternMatchingRulesSchema =
|
|
1782
|
-
delimiter:
|
|
1832
|
+
var DataPatternMatchingRulesSchema = z29.object({
|
|
1833
|
+
delimiter: z29.string().nullish(),
|
|
1783
1834
|
/** Proximity window for keyword matching — spec bounds 2..1000 inclusive. */
|
|
1784
|
-
proximity_distance:
|
|
1785
|
-
proximity_keywords:
|
|
1786
|
-
regexes:
|
|
1787
|
-
metadata_criteria:
|
|
1788
|
-
}).passthrough();
|
|
1789
|
-
var DataPatternTagsSchema =
|
|
1790
|
-
classification:
|
|
1791
|
-
compliance:
|
|
1792
|
-
geography:
|
|
1793
|
-
}).passthrough();
|
|
1794
|
-
var DataPatternRequestSchema =
|
|
1795
|
-
name:
|
|
1835
|
+
proximity_distance: z29.number().int().min(2).max(1e3).nullish(),
|
|
1836
|
+
proximity_keywords: z29.array(z29.string()).nullish(),
|
|
1837
|
+
regexes: z29.array(WeightedRegexSchema).nullish(),
|
|
1838
|
+
metadata_criteria: z29.array(MetadataCriterionSchema).nullish()
|
|
1839
|
+
}).passthrough();
|
|
1840
|
+
var DataPatternTagsSchema = z29.object({
|
|
1841
|
+
classification: z29.array(z29.string()).nullish(),
|
|
1842
|
+
compliance: z29.array(z29.string()).nullish(),
|
|
1843
|
+
geography: z29.array(z29.string()).nullish()
|
|
1844
|
+
}).passthrough();
|
|
1845
|
+
var DataPatternRequestSchema = z29.object({
|
|
1846
|
+
name: z29.string().min(1).max(64),
|
|
1796
1847
|
type: DataPatternTypeSchema,
|
|
1797
1848
|
detection_config: DataPatternDetectionConfigSchema,
|
|
1798
|
-
description:
|
|
1849
|
+
description: z29.string().optional(),
|
|
1799
1850
|
matching_rules: DataPatternMatchingRulesSchema.optional(),
|
|
1800
1851
|
tags: DataPatternTagsSchema.optional()
|
|
1801
1852
|
}).passthrough();
|
|
1802
|
-
var DataPatternPatchRequestSchema =
|
|
1803
|
-
name:
|
|
1853
|
+
var DataPatternPatchRequestSchema = z29.object({
|
|
1854
|
+
name: z29.string().min(1).max(64),
|
|
1804
1855
|
type: DataPatternTypeSchema,
|
|
1805
1856
|
detection_config: DataPatternDetectionConfigSchema,
|
|
1806
|
-
description: jsonNullable(
|
|
1857
|
+
description: jsonNullable(z29.string()),
|
|
1807
1858
|
matching_rules: jsonNullable(DataPatternMatchingRulesSchema),
|
|
1808
1859
|
tags: jsonNullable(DataPatternTagsSchema)
|
|
1809
1860
|
}).passthrough();
|
|
1810
|
-
var DataPatternResponseSchema =
|
|
1811
|
-
id:
|
|
1812
|
-
name:
|
|
1813
|
-
description:
|
|
1814
|
-
tenant_id:
|
|
1861
|
+
var DataPatternResponseSchema = z29.object({
|
|
1862
|
+
id: z29.string().nullish(),
|
|
1863
|
+
name: z29.string().nullish(),
|
|
1864
|
+
description: z29.string().nullish(),
|
|
1865
|
+
tenant_id: z29.string().nullish(),
|
|
1815
1866
|
type: DataPatternTypeSchema.nullish(),
|
|
1816
1867
|
status: DataPatternStatusSchema.nullish(),
|
|
1817
1868
|
license_type: DataPatternLicenseTypeSchema.nullish(),
|
|
1818
|
-
is_parent_managed:
|
|
1819
|
-
version:
|
|
1869
|
+
is_parent_managed: z29.boolean().nullish(),
|
|
1870
|
+
version: z29.number().nullish(),
|
|
1820
1871
|
detection_config: DataPatternDetectionConfigSchema.nullish(),
|
|
1821
1872
|
matching_rules: DataPatternMatchingRulesSchema.nullish(),
|
|
1822
1873
|
tags: DataPatternTagsSchema.nullish(),
|
|
@@ -1825,9 +1876,9 @@ var DataPatternResponseSchema = z28.object({
|
|
|
1825
1876
|
var PageDataPatternResponseSchema = pageSchema(DataPatternResponseSchema);
|
|
1826
1877
|
|
|
1827
1878
|
// src/models/dlp-data-profile.ts
|
|
1828
|
-
import { z as
|
|
1829
|
-
var ExpressionOperatorTypeSchema =
|
|
1830
|
-
var RuleItemDetectionTechniqueSchema =
|
|
1879
|
+
import { z as z30 } from "zod";
|
|
1880
|
+
var ExpressionOperatorTypeSchema = z30.enum(["and", "or", "not", "and_not", "or_not"]);
|
|
1881
|
+
var RuleItemDetectionTechniqueSchema = z30.enum([
|
|
1831
1882
|
"edm",
|
|
1832
1883
|
"document_fingerprint",
|
|
1833
1884
|
"trainable_classifier",
|
|
@@ -1842,200 +1893,200 @@ var RuleItemDetectionTechniqueSchema = z29.enum([
|
|
|
1842
1893
|
"pab",
|
|
1843
1894
|
"document_classifier"
|
|
1844
1895
|
]);
|
|
1845
|
-
var RuleItemMatchTypeSchema =
|
|
1846
|
-
var RuleItemOccurrenceOperatorTypeSchema =
|
|
1896
|
+
var RuleItemMatchTypeSchema = z30.enum(["include", "exclude"]);
|
|
1897
|
+
var RuleItemOccurrenceOperatorTypeSchema = z30.enum([
|
|
1847
1898
|
"any",
|
|
1848
1899
|
"less_than_equal_to",
|
|
1849
1900
|
"more_than_equal_to",
|
|
1850
1901
|
"between"
|
|
1851
1902
|
]);
|
|
1852
|
-
var RuleItemConfidenceLevelSchema =
|
|
1853
|
-
var RuleItemEdmMatchCriteriaSchema =
|
|
1854
|
-
var DataProfileTypeSchema =
|
|
1855
|
-
var DataProfileStatusSchema =
|
|
1856
|
-
var DataProfileSubtypeSchema =
|
|
1857
|
-
var DetectionRuleItemSchema =
|
|
1903
|
+
var RuleItemConfidenceLevelSchema = z30.enum(["low", "medium", "high"]);
|
|
1904
|
+
var RuleItemEdmMatchCriteriaSchema = z30.enum(["any", "all"]);
|
|
1905
|
+
var DataProfileTypeSchema = z30.enum(["basic", "advanced"]);
|
|
1906
|
+
var DataProfileStatusSchema = z30.enum(["active", "disabled", "deleted"]);
|
|
1907
|
+
var DataProfileSubtypeSchema = z30.enum(["custom", "predefined"]);
|
|
1908
|
+
var DetectionRuleItemSchema = z30.object({
|
|
1858
1909
|
detection_technique: RuleItemDetectionTechniqueSchema,
|
|
1859
|
-
id:
|
|
1860
|
-
name:
|
|
1861
|
-
description:
|
|
1862
|
-
version:
|
|
1910
|
+
id: z30.string().nullish(),
|
|
1911
|
+
name: z30.string().nullish(),
|
|
1912
|
+
description: z30.string().nullish(),
|
|
1913
|
+
version: z30.number().int().nullish(),
|
|
1863
1914
|
match_type: RuleItemMatchTypeSchema.nullish(),
|
|
1864
|
-
by_unique_count:
|
|
1915
|
+
by_unique_count: z30.boolean().nullish(),
|
|
1865
1916
|
confidence_level: RuleItemConfidenceLevelSchema.nullish(),
|
|
1866
|
-
supported_confidence_levels:
|
|
1867
|
-
occurrence_count:
|
|
1868
|
-
occurrence_high:
|
|
1869
|
-
occurrence_low:
|
|
1917
|
+
supported_confidence_levels: z30.array(RuleItemConfidenceLevelSchema).nullish(),
|
|
1918
|
+
occurrence_count: z30.number().int().nullish(),
|
|
1919
|
+
occurrence_high: z30.number().int().nullish(),
|
|
1920
|
+
occurrence_low: z30.number().int().nullish(),
|
|
1870
1921
|
occurrence_operator_type: RuleItemOccurrenceOperatorTypeSchema.nullish(),
|
|
1871
1922
|
// dictionary + document-type fields
|
|
1872
|
-
score:
|
|
1873
|
-
score_high:
|
|
1874
|
-
score_low:
|
|
1923
|
+
score: z30.number().int().nullish(),
|
|
1924
|
+
score_high: z30.number().int().nullish(),
|
|
1925
|
+
score_low: z30.number().int().nullish(),
|
|
1875
1926
|
// edm fields
|
|
1876
|
-
edm_dataset_id:
|
|
1877
|
-
primary_fields:
|
|
1927
|
+
edm_dataset_id: z30.string().nullish(),
|
|
1928
|
+
primary_fields: z30.array(z30.string()).nullish(),
|
|
1878
1929
|
primary_match_criteria: RuleItemEdmMatchCriteriaSchema.nullish(),
|
|
1879
|
-
primary_match_any_count:
|
|
1880
|
-
secondary_fields:
|
|
1930
|
+
primary_match_any_count: z30.number().int().nullish(),
|
|
1931
|
+
secondary_fields: z30.array(z30.string()).nullish(),
|
|
1881
1932
|
secondary_match_criteria: RuleItemEdmMatchCriteriaSchema.nullish(),
|
|
1882
|
-
secondary_match_any_count:
|
|
1933
|
+
secondary_match_any_count: z30.number().int().nullish()
|
|
1883
1934
|
}).passthrough();
|
|
1884
|
-
var ExpressionTreeNodeSchema =
|
|
1885
|
-
() =>
|
|
1935
|
+
var ExpressionTreeNodeSchema = z30.lazy(
|
|
1936
|
+
() => z30.object({
|
|
1886
1937
|
operator_type: ExpressionOperatorTypeSchema.nullish(),
|
|
1887
1938
|
rule_item: DetectionRuleItemSchema.nullish(),
|
|
1888
|
-
sub_expressions:
|
|
1939
|
+
sub_expressions: z30.array(ExpressionTreeNodeSchema).nullish()
|
|
1889
1940
|
}).passthrough()
|
|
1890
1941
|
);
|
|
1891
|
-
var MultiProfileDataNodeSchema =
|
|
1892
|
-
data_profile_ids:
|
|
1942
|
+
var MultiProfileDataNodeSchema = z30.object({
|
|
1943
|
+
data_profile_ids: z30.array(z30.number()).nullish(),
|
|
1893
1944
|
operator_type: ExpressionOperatorTypeSchema.nullish()
|
|
1894
1945
|
}).passthrough();
|
|
1895
|
-
var DefaultTreeDetectionRuleSchema =
|
|
1896
|
-
rule_type:
|
|
1946
|
+
var DefaultTreeDetectionRuleSchema = z30.object({
|
|
1947
|
+
rule_type: z30.literal("expression_tree"),
|
|
1897
1948
|
expression_tree: ExpressionTreeNodeSchema.nullish()
|
|
1898
1949
|
}).passthrough();
|
|
1899
|
-
var MultiProfileDetectionRuleSchema =
|
|
1900
|
-
rule_type:
|
|
1950
|
+
var MultiProfileDetectionRuleSchema = z30.object({
|
|
1951
|
+
rule_type: z30.literal("multi_profile"),
|
|
1901
1952
|
multi_profile: MultiProfileDataNodeSchema.nullish()
|
|
1902
1953
|
}).passthrough();
|
|
1903
|
-
var DetectionRuleSchema =
|
|
1954
|
+
var DetectionRuleSchema = z30.discriminatedUnion("rule_type", [
|
|
1904
1955
|
DefaultTreeDetectionRuleSchema,
|
|
1905
1956
|
MultiProfileDetectionRuleSchema
|
|
1906
1957
|
]);
|
|
1907
|
-
var AdvancedDataProfileRequestSchema =
|
|
1908
|
-
name:
|
|
1909
|
-
detection_rules:
|
|
1910
|
-
description:
|
|
1911
|
-
is_granular_data_profile:
|
|
1958
|
+
var AdvancedDataProfileRequestSchema = z30.object({
|
|
1959
|
+
name: z30.string().min(1).max(64),
|
|
1960
|
+
detection_rules: z30.array(DetectionRuleSchema),
|
|
1961
|
+
description: z30.string().optional(),
|
|
1962
|
+
is_granular_data_profile: z30.boolean().optional()
|
|
1912
1963
|
}).passthrough();
|
|
1913
|
-
var DataProfilePatchRequestSchema =
|
|
1914
|
-
name:
|
|
1964
|
+
var DataProfilePatchRequestSchema = z30.object({
|
|
1965
|
+
name: z30.string(),
|
|
1915
1966
|
profile_type: DataProfileTypeSchema,
|
|
1916
|
-
description: jsonNullable(
|
|
1917
|
-
detection_rules: jsonNullable(
|
|
1967
|
+
description: jsonNullable(z30.string()),
|
|
1968
|
+
detection_rules: jsonNullable(z30.array(DetectionRuleSchema))
|
|
1918
1969
|
}).passthrough();
|
|
1919
|
-
var DataProfileResponseSchema =
|
|
1920
|
-
id:
|
|
1921
|
-
name:
|
|
1922
|
-
description:
|
|
1923
|
-
tenant_id:
|
|
1970
|
+
var DataProfileResponseSchema = z30.object({
|
|
1971
|
+
id: z30.string().nullish(),
|
|
1972
|
+
name: z30.string().nullish(),
|
|
1973
|
+
description: z30.string().nullish(),
|
|
1974
|
+
tenant_id: z30.string().nullish(),
|
|
1924
1975
|
type: DataProfileSubtypeSchema.nullish(),
|
|
1925
1976
|
profile_status: DataProfileStatusSchema.nullish(),
|
|
1926
1977
|
profile_type: DataProfileTypeSchema.nullish(),
|
|
1927
|
-
is_granular_data_profile:
|
|
1928
|
-
is_parent_managed:
|
|
1929
|
-
version:
|
|
1930
|
-
advance_data_patterns_rule_request:
|
|
1931
|
-
detection_rules:
|
|
1978
|
+
is_granular_data_profile: z30.boolean().nullish(),
|
|
1979
|
+
is_parent_managed: z30.boolean().nullish(),
|
|
1980
|
+
version: z30.number().int().nullish(),
|
|
1981
|
+
advance_data_patterns_rule_request: z30.array(z30.string()).nullish(),
|
|
1982
|
+
detection_rules: z30.array(DetectionRuleSchema).nullish(),
|
|
1932
1983
|
audit_metadata: AuditResponseSchema.nullish()
|
|
1933
1984
|
}).passthrough();
|
|
1934
1985
|
var PageDataProfileResponseSchema = pageSchema(DataProfileResponseSchema);
|
|
1935
1986
|
|
|
1936
1987
|
// src/models/dlp-data-filtering-profile.ts
|
|
1937
|
-
import { z as
|
|
1938
|
-
var AppExclusionSchema =
|
|
1939
|
-
app_id:
|
|
1940
|
-
app_name:
|
|
1941
|
-
type:
|
|
1988
|
+
import { z as z31 } from "zod";
|
|
1989
|
+
var AppExclusionSchema = z31.object({
|
|
1990
|
+
app_id: z31.string().nullish(),
|
|
1991
|
+
app_name: z31.string().nullish(),
|
|
1992
|
+
type: z31.string().nullish()
|
|
1942
1993
|
}).passthrough();
|
|
1943
|
-
var URLExclusionSchema =
|
|
1944
|
-
type:
|
|
1945
|
-
url_id:
|
|
1946
|
-
url_name:
|
|
1994
|
+
var URLExclusionSchema = z31.object({
|
|
1995
|
+
type: z31.string().nullish(),
|
|
1996
|
+
url_id: z31.string().nullish(),
|
|
1997
|
+
url_name: z31.string().nullish()
|
|
1947
1998
|
}).passthrough();
|
|
1948
|
-
var ExclusionsSchema =
|
|
1949
|
-
app_exclusion_list:
|
|
1950
|
-
url_exclusion_list:
|
|
1999
|
+
var ExclusionsSchema = z31.object({
|
|
2000
|
+
app_exclusion_list: z31.array(AppExclusionSchema).nullish(),
|
|
2001
|
+
url_exclusion_list: z31.array(URLExclusionSchema).nullish(),
|
|
1951
2002
|
/**
|
|
1952
2003
|
* Map of category-name → string-array. `additionalProperties: { type: array of string }`
|
|
1953
2004
|
* in the OpenAPI spec; modeled here as `z.record(z.array(z.string()))`.
|
|
1954
2005
|
*/
|
|
1955
|
-
exclusion_list:
|
|
2006
|
+
exclusion_list: z31.record(z31.array(z31.string())).nullish()
|
|
1956
2007
|
}).passthrough();
|
|
1957
|
-
var SourceAttributesSchema =
|
|
1958
|
-
match_any:
|
|
1959
|
-
user_group_ids:
|
|
1960
|
-
user_ids:
|
|
2008
|
+
var SourceAttributesSchema = z31.object({
|
|
2009
|
+
match_any: z31.boolean().nullish(),
|
|
2010
|
+
user_group_ids: z31.array(z31.string()).nullish(),
|
|
2011
|
+
user_ids: z31.array(z31.string()).nullish()
|
|
1961
2012
|
}).passthrough();
|
|
1962
|
-
var DestinationAttributesSchema =
|
|
1963
|
-
match_any:
|
|
1964
|
-
app_ids:
|
|
1965
|
-
url_patterns:
|
|
2013
|
+
var DestinationAttributesSchema = z31.object({
|
|
2014
|
+
match_any: z31.boolean().nullish(),
|
|
2015
|
+
app_ids: z31.array(z31.string()).nullish(),
|
|
2016
|
+
url_patterns: z31.array(z31.string()).nullish()
|
|
1966
2017
|
}).passthrough();
|
|
1967
|
-
var ExceptionRuleDTOSchema =
|
|
1968
|
-
id:
|
|
1969
|
-
action:
|
|
1970
|
-
log_severity:
|
|
2018
|
+
var ExceptionRuleDTOSchema = z31.object({
|
|
2019
|
+
id: z31.string().nullish(),
|
|
2020
|
+
action: z31.enum(["ALLOW", "ALERT", "BLOCK"]).nullish(),
|
|
2021
|
+
log_severity: z31.enum(["INFORMATIONAL", "LOW", "MEDIUM", "HIGH", "CRITICAL"]).nullish(),
|
|
1971
2022
|
/**
|
|
1972
2023
|
* `int64` per spec; declared as `z.number()` since JS numbers cover any realistic
|
|
1973
2024
|
* data_profile_id and the SDK never round-trips these unmodified.
|
|
1974
2025
|
*/
|
|
1975
|
-
data_profile_ids:
|
|
2026
|
+
data_profile_ids: z31.array(z31.number()).nullish(),
|
|
1976
2027
|
destination_attributes: DestinationAttributesSchema.nullish(),
|
|
1977
2028
|
source_attributes: SourceAttributesSchema.nullish()
|
|
1978
2029
|
}).passthrough();
|
|
1979
|
-
var DataFilteringRuleDTOSchema =
|
|
1980
|
-
action:
|
|
1981
|
-
response_page:
|
|
1982
|
-
show_rsp_page:
|
|
1983
|
-
}).passthrough();
|
|
1984
|
-
var DataFilteringDetailsSchema =
|
|
1985
|
-
action:
|
|
1986
|
-
dataProfileId:
|
|
1987
|
-
direction:
|
|
1988
|
-
euc_template_id:
|
|
1989
|
-
fileBased:
|
|
1990
|
-
fileTypes:
|
|
1991
|
-
is_end_user_coaching_enabled:
|
|
1992
|
-
logSeverity:
|
|
1993
|
-
nonFileBased:
|
|
1994
|
-
scanType:
|
|
1995
|
-
}).passthrough();
|
|
1996
|
-
var DataFilteringProfileRequestSchema =
|
|
1997
|
-
file_based:
|
|
1998
|
-
non_file_based:
|
|
1999
|
-
description:
|
|
2000
|
-
direction:
|
|
2001
|
-
log_severity:
|
|
2002
|
-
scan_type:
|
|
2030
|
+
var DataFilteringRuleDTOSchema = z31.object({
|
|
2031
|
+
action: z31.string().nullish(),
|
|
2032
|
+
response_page: z31.string().nullish(),
|
|
2033
|
+
show_rsp_page: z31.string().nullish()
|
|
2034
|
+
}).passthrough();
|
|
2035
|
+
var DataFilteringDetailsSchema = z31.object({
|
|
2036
|
+
action: z31.string().nullish(),
|
|
2037
|
+
dataProfileId: z31.number().nullish(),
|
|
2038
|
+
direction: z31.string().nullish(),
|
|
2039
|
+
euc_template_id: z31.string().nullish(),
|
|
2040
|
+
fileBased: z31.string().nullish(),
|
|
2041
|
+
fileTypes: z31.array(z31.string()).nullish(),
|
|
2042
|
+
is_end_user_coaching_enabled: z31.boolean().nullish(),
|
|
2043
|
+
logSeverity: z31.string().nullish(),
|
|
2044
|
+
nonFileBased: z31.string().nullish(),
|
|
2045
|
+
scanType: z31.string().nullish()
|
|
2046
|
+
}).passthrough();
|
|
2047
|
+
var DataFilteringProfileRequestSchema = z31.object({
|
|
2048
|
+
file_based: z31.boolean(),
|
|
2049
|
+
non_file_based: z31.boolean(),
|
|
2050
|
+
description: z31.string().optional(),
|
|
2051
|
+
direction: z31.enum(["BOTH", "UPLOAD", "DOWNLOAD"]).optional(),
|
|
2052
|
+
log_severity: z31.enum(["CRITICAL", "HIGH", "MEDIUM", "LOW", "INFORMATIONAL"]).optional(),
|
|
2053
|
+
scan_type: z31.enum(["include", "exclude"]).optional(),
|
|
2003
2054
|
/**
|
|
2004
2055
|
* `int64` per spec; declared as `z.number()`. JS will lose precision above 2^53 but
|
|
2005
2056
|
* real-world IDs stay well under that ceiling.
|
|
2006
2057
|
*/
|
|
2007
|
-
data_profile_id:
|
|
2008
|
-
euc_template_id:
|
|
2009
|
-
is_end_user_coaching_enabled:
|
|
2010
|
-
is_granular_profile:
|
|
2011
|
-
file_type:
|
|
2012
|
-
criteria_details:
|
|
2013
|
-
exception_rules:
|
|
2058
|
+
data_profile_id: z31.number().optional(),
|
|
2059
|
+
euc_template_id: z31.string().optional(),
|
|
2060
|
+
is_end_user_coaching_enabled: z31.boolean().optional(),
|
|
2061
|
+
is_granular_profile: z31.boolean().optional(),
|
|
2062
|
+
file_type: z31.array(z31.string()).optional(),
|
|
2063
|
+
criteria_details: z31.array(DataFilteringDetailsSchema).optional(),
|
|
2064
|
+
exception_rules: z31.array(ExceptionRuleDTOSchema).optional(),
|
|
2014
2065
|
exclusions: ExclusionsSchema.optional(),
|
|
2015
2066
|
rule1: DataFilteringRuleDTOSchema.optional(),
|
|
2016
2067
|
rule2: DataFilteringRuleDTOSchema.optional()
|
|
2017
2068
|
}).passthrough();
|
|
2018
|
-
var DataFilteringProfileResponseSchema =
|
|
2019
|
-
id:
|
|
2020
|
-
name:
|
|
2021
|
-
description:
|
|
2022
|
-
tenant_id:
|
|
2023
|
-
type:
|
|
2024
|
-
data_profile_id:
|
|
2025
|
-
direction:
|
|
2026
|
-
file_based:
|
|
2027
|
-
non_file_based:
|
|
2028
|
-
log_severity:
|
|
2029
|
-
scan_type:
|
|
2030
|
-
is_end_user_coaching_enabled:
|
|
2031
|
-
is_granular_profile:
|
|
2032
|
-
is_parent_managed:
|
|
2033
|
-
euc_template_id:
|
|
2034
|
-
version:
|
|
2035
|
-
file_type:
|
|
2069
|
+
var DataFilteringProfileResponseSchema = z31.object({
|
|
2070
|
+
id: z31.string().nullish(),
|
|
2071
|
+
name: z31.string().nullish(),
|
|
2072
|
+
description: z31.string().nullish(),
|
|
2073
|
+
tenant_id: z31.string().nullish(),
|
|
2074
|
+
type: z31.string().nullish(),
|
|
2075
|
+
data_profile_id: z31.number().nullish(),
|
|
2076
|
+
direction: z31.string().nullish(),
|
|
2077
|
+
file_based: z31.boolean().nullish(),
|
|
2078
|
+
non_file_based: z31.boolean().nullish(),
|
|
2079
|
+
log_severity: z31.string().nullish(),
|
|
2080
|
+
scan_type: z31.enum(["include", "exclude"]).nullish(),
|
|
2081
|
+
is_end_user_coaching_enabled: z31.boolean().nullish(),
|
|
2082
|
+
is_granular_profile: z31.boolean().nullish(),
|
|
2083
|
+
is_parent_managed: z31.boolean().nullish(),
|
|
2084
|
+
euc_template_id: z31.string().nullish(),
|
|
2085
|
+
version: z31.number().nullish(),
|
|
2086
|
+
file_type: z31.array(z31.string()).nullish(),
|
|
2036
2087
|
audit_metadata: AuditResponseSchema.nullish(),
|
|
2037
|
-
criteria_details:
|
|
2038
|
-
exception_rules:
|
|
2088
|
+
criteria_details: z31.array(DataFilteringDetailsSchema).nullish(),
|
|
2089
|
+
exception_rules: z31.array(ExceptionRuleDTOSchema).nullish(),
|
|
2039
2090
|
exclusions: ExclusionsSchema.nullish(),
|
|
2040
2091
|
rule1: DataFilteringRuleDTOSchema.nullish(),
|
|
2041
2092
|
rule2: DataFilteringRuleDTOSchema.nullish()
|
|
@@ -2174,240 +2225,240 @@ var RuleFieldValueKey = {
|
|
|
2174
2225
|
};
|
|
2175
2226
|
|
|
2176
2227
|
// src/models/model-security.ts
|
|
2177
|
-
import { z as
|
|
2178
|
-
var ModelSecurityPaginationSchema =
|
|
2179
|
-
total_items:
|
|
2228
|
+
import { z as z32 } from "zod";
|
|
2229
|
+
var ModelSecurityPaginationSchema = z32.object({
|
|
2230
|
+
total_items: z32.number().int().nullable().optional()
|
|
2180
2231
|
}).passthrough();
|
|
2181
|
-
var LabelSchema =
|
|
2182
|
-
key:
|
|
2183
|
-
value:
|
|
2232
|
+
var LabelSchema = z32.object({
|
|
2233
|
+
key: z32.string(),
|
|
2234
|
+
value: z32.string()
|
|
2184
2235
|
}).passthrough();
|
|
2185
|
-
var LabelsCreateRequestSchema =
|
|
2186
|
-
labels:
|
|
2236
|
+
var LabelsCreateRequestSchema = z32.object({
|
|
2237
|
+
labels: z32.array(LabelSchema)
|
|
2187
2238
|
}).passthrough();
|
|
2188
|
-
var LabelsResponseSchema =
|
|
2189
|
-
var LabelKeyListSchema =
|
|
2239
|
+
var LabelsResponseSchema = z32.object({}).passthrough();
|
|
2240
|
+
var LabelKeyListSchema = z32.object({
|
|
2190
2241
|
pagination: ModelSecurityPaginationSchema,
|
|
2191
|
-
keys:
|
|
2242
|
+
keys: z32.array(z32.string())
|
|
2192
2243
|
}).passthrough();
|
|
2193
|
-
var LabelValueListSchema =
|
|
2244
|
+
var LabelValueListSchema = z32.object({
|
|
2194
2245
|
pagination: ModelSecurityPaginationSchema,
|
|
2195
|
-
values:
|
|
2196
|
-
}).passthrough();
|
|
2197
|
-
var EvalSummarySchema =
|
|
2198
|
-
rules_failed:
|
|
2199
|
-
rules_passed:
|
|
2200
|
-
total_rules:
|
|
2201
|
-
}).passthrough();
|
|
2202
|
-
var ModelScanIssueSchema =
|
|
2203
|
-
description:
|
|
2204
|
-
source:
|
|
2205
|
-
threat:
|
|
2206
|
-
module:
|
|
2207
|
-
operator:
|
|
2208
|
-
}).passthrough();
|
|
2209
|
-
var FileScanDataSchema =
|
|
2210
|
-
file_path:
|
|
2211
|
-
modelscan_status:
|
|
2212
|
-
blob_id:
|
|
2213
|
-
error_message:
|
|
2214
|
-
formats:
|
|
2215
|
-
issues_detected:
|
|
2216
|
-
}).passthrough();
|
|
2217
|
-
var ScanDetailsSchema =
|
|
2218
|
-
scanner_version:
|
|
2219
|
-
time_started:
|
|
2220
|
-
files:
|
|
2221
|
-
total_files_scanned:
|
|
2222
|
-
total_files_skipped:
|
|
2223
|
-
model_formats:
|
|
2224
|
-
model_size_bytes:
|
|
2225
|
-
scan_duration_ms:
|
|
2226
|
-
error_code:
|
|
2227
|
-
error_message:
|
|
2228
|
-
}).passthrough();
|
|
2229
|
-
var ScanCreateRequestSchema =
|
|
2230
|
-
model_uri:
|
|
2231
|
-
security_group_uuid:
|
|
2232
|
-
scan_origin:
|
|
2233
|
-
allow_patterns:
|
|
2234
|
-
ignore_patterns:
|
|
2235
|
-
labels:
|
|
2236
|
-
model_author:
|
|
2237
|
-
model_name:
|
|
2238
|
-
model_version:
|
|
2246
|
+
values: z32.array(z32.string())
|
|
2247
|
+
}).passthrough();
|
|
2248
|
+
var EvalSummarySchema = z32.object({
|
|
2249
|
+
rules_failed: z32.number().int().optional().default(0),
|
|
2250
|
+
rules_passed: z32.number().int().optional().default(0),
|
|
2251
|
+
total_rules: z32.number().int().optional().default(0)
|
|
2252
|
+
}).passthrough();
|
|
2253
|
+
var ModelScanIssueSchema = z32.object({
|
|
2254
|
+
description: z32.string(),
|
|
2255
|
+
source: z32.string(),
|
|
2256
|
+
threat: z32.string().nullable().optional(),
|
|
2257
|
+
module: z32.string().nullable().optional(),
|
|
2258
|
+
operator: z32.string().nullable().optional()
|
|
2259
|
+
}).passthrough();
|
|
2260
|
+
var FileScanDataSchema = z32.object({
|
|
2261
|
+
file_path: z32.string(),
|
|
2262
|
+
modelscan_status: z32.string(),
|
|
2263
|
+
blob_id: z32.string(),
|
|
2264
|
+
error_message: z32.string().nullable().optional(),
|
|
2265
|
+
formats: z32.array(z32.string()).nullable().optional(),
|
|
2266
|
+
issues_detected: z32.array(ModelScanIssueSchema).nullable().optional()
|
|
2267
|
+
}).passthrough();
|
|
2268
|
+
var ScanDetailsSchema = z32.object({
|
|
2269
|
+
scanner_version: z32.string(),
|
|
2270
|
+
time_started: z32.string(),
|
|
2271
|
+
files: z32.array(FileScanDataSchema),
|
|
2272
|
+
total_files_scanned: z32.number().int(),
|
|
2273
|
+
total_files_skipped: z32.number().int(),
|
|
2274
|
+
model_formats: z32.array(z32.string()),
|
|
2275
|
+
model_size_bytes: z32.number().int(),
|
|
2276
|
+
scan_duration_ms: z32.number().int(),
|
|
2277
|
+
error_code: z32.string().nullable().optional(),
|
|
2278
|
+
error_message: z32.string().nullable().optional()
|
|
2279
|
+
}).passthrough();
|
|
2280
|
+
var ScanCreateRequestSchema = z32.object({
|
|
2281
|
+
model_uri: z32.string(),
|
|
2282
|
+
security_group_uuid: z32.string(),
|
|
2283
|
+
scan_origin: z32.string(),
|
|
2284
|
+
allow_patterns: z32.array(z32.string()).nullable().optional(),
|
|
2285
|
+
ignore_patterns: z32.array(z32.string()).nullable().optional(),
|
|
2286
|
+
labels: z32.array(LabelSchema).nullable().optional(),
|
|
2287
|
+
model_author: z32.string().nullable().optional(),
|
|
2288
|
+
model_name: z32.string().nullable().optional(),
|
|
2289
|
+
model_version: z32.string().nullable().optional(),
|
|
2239
2290
|
scan_details: ScanDetailsSchema.nullable().optional()
|
|
2240
2291
|
}).passthrough();
|
|
2241
|
-
var ScanBaseResponseSchema =
|
|
2242
|
-
uuid:
|
|
2243
|
-
tsg_id:
|
|
2244
|
-
created_at:
|
|
2245
|
-
updated_at:
|
|
2246
|
-
model_uri:
|
|
2247
|
-
owner:
|
|
2248
|
-
scan_origin:
|
|
2249
|
-
security_group_uuid:
|
|
2250
|
-
security_group_name:
|
|
2251
|
-
model_version_uuid:
|
|
2252
|
-
eval_outcome:
|
|
2253
|
-
source_type:
|
|
2254
|
-
created_by:
|
|
2255
|
-
enabled_rule_count_snapshot:
|
|
2256
|
-
error_code:
|
|
2257
|
-
error_message:
|
|
2292
|
+
var ScanBaseResponseSchema = z32.object({
|
|
2293
|
+
uuid: z32.string(),
|
|
2294
|
+
tsg_id: z32.string(),
|
|
2295
|
+
created_at: z32.string(),
|
|
2296
|
+
updated_at: z32.string(),
|
|
2297
|
+
model_uri: z32.string(),
|
|
2298
|
+
owner: z32.string(),
|
|
2299
|
+
scan_origin: z32.string(),
|
|
2300
|
+
security_group_uuid: z32.string(),
|
|
2301
|
+
security_group_name: z32.string(),
|
|
2302
|
+
model_version_uuid: z32.string(),
|
|
2303
|
+
eval_outcome: z32.string(),
|
|
2304
|
+
source_type: z32.string(),
|
|
2305
|
+
created_by: z32.string().nullable().optional(),
|
|
2306
|
+
enabled_rule_count_snapshot: z32.number().int().nullable().optional(),
|
|
2307
|
+
error_code: z32.string().nullable().optional(),
|
|
2308
|
+
error_message: z32.string().nullable().optional(),
|
|
2258
2309
|
eval_summary: EvalSummarySchema.nullable().optional(),
|
|
2259
|
-
labels:
|
|
2260
|
-
model_formats:
|
|
2261
|
-
scanner_version:
|
|
2262
|
-
time_started:
|
|
2263
|
-
total_files_scanned:
|
|
2264
|
-
total_files_skipped:
|
|
2265
|
-
}).passthrough();
|
|
2266
|
-
var ScanListSchema =
|
|
2310
|
+
labels: z32.array(LabelSchema).optional(),
|
|
2311
|
+
model_formats: z32.array(z32.string()).nullable().optional(),
|
|
2312
|
+
scanner_version: z32.string().nullable().optional(),
|
|
2313
|
+
time_started: z32.string().nullable().optional(),
|
|
2314
|
+
total_files_scanned: z32.number().int().nullable().optional(),
|
|
2315
|
+
total_files_skipped: z32.number().int().nullable().optional()
|
|
2316
|
+
}).passthrough();
|
|
2317
|
+
var ScanListSchema = z32.object({
|
|
2267
2318
|
pagination: ModelSecurityPaginationSchema,
|
|
2268
|
-
scans:
|
|
2269
|
-
}).passthrough();
|
|
2270
|
-
var FileResponseSchema =
|
|
2271
|
-
uuid:
|
|
2272
|
-
tsg_id:
|
|
2273
|
-
created_at:
|
|
2274
|
-
updated_at:
|
|
2275
|
-
path:
|
|
2276
|
-
parent_path:
|
|
2277
|
-
type:
|
|
2278
|
-
result:
|
|
2279
|
-
model_version_uuid:
|
|
2280
|
-
blob_id:
|
|
2281
|
-
formats:
|
|
2282
|
-
scan_uuid:
|
|
2283
|
-
}).passthrough();
|
|
2284
|
-
var FileListSchema =
|
|
2319
|
+
scans: z32.array(ScanBaseResponseSchema)
|
|
2320
|
+
}).passthrough();
|
|
2321
|
+
var FileResponseSchema = z32.object({
|
|
2322
|
+
uuid: z32.string(),
|
|
2323
|
+
tsg_id: z32.string(),
|
|
2324
|
+
created_at: z32.string(),
|
|
2325
|
+
updated_at: z32.string(),
|
|
2326
|
+
path: z32.string(),
|
|
2327
|
+
parent_path: z32.string(),
|
|
2328
|
+
type: z32.string(),
|
|
2329
|
+
result: z32.string(),
|
|
2330
|
+
model_version_uuid: z32.string(),
|
|
2331
|
+
blob_id: z32.string().nullable().optional(),
|
|
2332
|
+
formats: z32.array(z32.string()).nullable().optional(),
|
|
2333
|
+
scan_uuid: z32.string().nullable().optional()
|
|
2334
|
+
}).passthrough();
|
|
2335
|
+
var FileListSchema = z32.object({
|
|
2285
2336
|
pagination: ModelSecurityPaginationSchema,
|
|
2286
|
-
files:
|
|
2287
|
-
}).passthrough();
|
|
2288
|
-
var RuleEvaluationResponseSchema =
|
|
2289
|
-
uuid:
|
|
2290
|
-
tsg_id:
|
|
2291
|
-
created_at:
|
|
2292
|
-
updated_at:
|
|
2293
|
-
result:
|
|
2294
|
-
violation_count:
|
|
2295
|
-
rule_instance_uuid:
|
|
2296
|
-
scan_uuid:
|
|
2297
|
-
rule_name:
|
|
2298
|
-
rule_description:
|
|
2299
|
-
rule_instance_state:
|
|
2300
|
-
}).passthrough();
|
|
2301
|
-
var RuleEvaluationListSchema =
|
|
2337
|
+
files: z32.array(FileResponseSchema)
|
|
2338
|
+
}).passthrough();
|
|
2339
|
+
var RuleEvaluationResponseSchema = z32.object({
|
|
2340
|
+
uuid: z32.string(),
|
|
2341
|
+
tsg_id: z32.string(),
|
|
2342
|
+
created_at: z32.string(),
|
|
2343
|
+
updated_at: z32.string(),
|
|
2344
|
+
result: z32.string(),
|
|
2345
|
+
violation_count: z32.number().int(),
|
|
2346
|
+
rule_instance_uuid: z32.string(),
|
|
2347
|
+
scan_uuid: z32.string(),
|
|
2348
|
+
rule_name: z32.string(),
|
|
2349
|
+
rule_description: z32.string(),
|
|
2350
|
+
rule_instance_state: z32.string()
|
|
2351
|
+
}).passthrough();
|
|
2352
|
+
var RuleEvaluationListSchema = z32.object({
|
|
2302
2353
|
pagination: ModelSecurityPaginationSchema,
|
|
2303
|
-
evaluations:
|
|
2304
|
-
}).passthrough();
|
|
2305
|
-
var ViolationResponseSchema =
|
|
2306
|
-
uuid:
|
|
2307
|
-
tsg_id:
|
|
2308
|
-
created_at:
|
|
2309
|
-
updated_at:
|
|
2310
|
-
description:
|
|
2311
|
-
rule_instance_uuid:
|
|
2312
|
-
rule_name:
|
|
2313
|
-
rule_description:
|
|
2314
|
-
rule_instance_state:
|
|
2315
|
-
file:
|
|
2316
|
-
hash:
|
|
2317
|
-
module:
|
|
2318
|
-
operator:
|
|
2319
|
-
threat:
|
|
2320
|
-
threat_description:
|
|
2321
|
-
}).passthrough();
|
|
2322
|
-
var ViolationListSchema =
|
|
2354
|
+
evaluations: z32.array(RuleEvaluationResponseSchema)
|
|
2355
|
+
}).passthrough();
|
|
2356
|
+
var ViolationResponseSchema = z32.object({
|
|
2357
|
+
uuid: z32.string(),
|
|
2358
|
+
tsg_id: z32.string(),
|
|
2359
|
+
created_at: z32.string(),
|
|
2360
|
+
updated_at: z32.string(),
|
|
2361
|
+
description: z32.string(),
|
|
2362
|
+
rule_instance_uuid: z32.string(),
|
|
2363
|
+
rule_name: z32.string(),
|
|
2364
|
+
rule_description: z32.string(),
|
|
2365
|
+
rule_instance_state: z32.string(),
|
|
2366
|
+
file: z32.string().nullable().optional(),
|
|
2367
|
+
hash: z32.string().nullable().optional(),
|
|
2368
|
+
module: z32.string().nullable().optional(),
|
|
2369
|
+
operator: z32.string().nullable().optional(),
|
|
2370
|
+
threat: z32.string().nullable().optional(),
|
|
2371
|
+
threat_description: z32.string().nullable().optional()
|
|
2372
|
+
}).passthrough();
|
|
2373
|
+
var ViolationListSchema = z32.object({
|
|
2323
2374
|
pagination: ModelSecurityPaginationSchema,
|
|
2324
|
-
violations:
|
|
2325
|
-
}).passthrough();
|
|
2326
|
-
var RuleEditableFieldDropdownSchema =
|
|
2327
|
-
value:
|
|
2328
|
-
label:
|
|
2329
|
-
}).passthrough();
|
|
2330
|
-
var RuleEditableFieldSchema =
|
|
2331
|
-
attribute_name:
|
|
2332
|
-
type:
|
|
2333
|
-
display_name:
|
|
2334
|
-
display_type:
|
|
2335
|
-
description:
|
|
2336
|
-
dropdown_values:
|
|
2337
|
-
}).passthrough();
|
|
2338
|
-
var RuleRemediationSchema =
|
|
2339
|
-
description:
|
|
2340
|
-
steps:
|
|
2341
|
-
url:
|
|
2342
|
-
}).passthrough();
|
|
2343
|
-
var RuleConfigurationSchema =
|
|
2344
|
-
field_values:
|
|
2345
|
-
state:
|
|
2346
|
-
}).passthrough();
|
|
2347
|
-
var ModelSecurityRuleResponseSchema =
|
|
2348
|
-
uuid:
|
|
2349
|
-
name:
|
|
2350
|
-
description:
|
|
2351
|
-
rule_type:
|
|
2352
|
-
compatible_sources:
|
|
2353
|
-
default_state:
|
|
2375
|
+
violations: z32.array(ViolationResponseSchema)
|
|
2376
|
+
}).passthrough();
|
|
2377
|
+
var RuleEditableFieldDropdownSchema = z32.object({
|
|
2378
|
+
value: z32.string(),
|
|
2379
|
+
label: z32.string()
|
|
2380
|
+
}).passthrough();
|
|
2381
|
+
var RuleEditableFieldSchema = z32.object({
|
|
2382
|
+
attribute_name: z32.string(),
|
|
2383
|
+
type: z32.string(),
|
|
2384
|
+
display_name: z32.string(),
|
|
2385
|
+
display_type: z32.string(),
|
|
2386
|
+
description: z32.string().nullable().optional(),
|
|
2387
|
+
dropdown_values: z32.array(RuleEditableFieldDropdownSchema).nullable().optional()
|
|
2388
|
+
}).passthrough();
|
|
2389
|
+
var RuleRemediationSchema = z32.object({
|
|
2390
|
+
description: z32.string(),
|
|
2391
|
+
steps: z32.array(z32.string()),
|
|
2392
|
+
url: z32.string()
|
|
2393
|
+
}).passthrough();
|
|
2394
|
+
var RuleConfigurationSchema = z32.object({
|
|
2395
|
+
field_values: z32.record(z32.unknown()).optional(),
|
|
2396
|
+
state: z32.string().nullable().optional()
|
|
2397
|
+
}).passthrough();
|
|
2398
|
+
var ModelSecurityRuleResponseSchema = z32.object({
|
|
2399
|
+
uuid: z32.string(),
|
|
2400
|
+
name: z32.string(),
|
|
2401
|
+
description: z32.string(),
|
|
2402
|
+
rule_type: z32.string(),
|
|
2403
|
+
compatible_sources: z32.array(z32.string()),
|
|
2404
|
+
default_state: z32.string(),
|
|
2354
2405
|
remediation: RuleRemediationSchema,
|
|
2355
|
-
editable_fields:
|
|
2356
|
-
constant_values:
|
|
2357
|
-
default_values:
|
|
2406
|
+
editable_fields: z32.array(RuleEditableFieldSchema),
|
|
2407
|
+
constant_values: z32.record(z32.unknown()),
|
|
2408
|
+
default_values: z32.record(z32.unknown())
|
|
2358
2409
|
}).passthrough();
|
|
2359
|
-
var ListModelSecurityRulesResponseSchema =
|
|
2410
|
+
var ListModelSecurityRulesResponseSchema = z32.object({
|
|
2360
2411
|
pagination: ModelSecurityPaginationSchema,
|
|
2361
|
-
rules:
|
|
2362
|
-
}).passthrough();
|
|
2363
|
-
var ModelSecurityRuleInstanceResponseSchema =
|
|
2364
|
-
uuid:
|
|
2365
|
-
tsg_id:
|
|
2366
|
-
created_at:
|
|
2367
|
-
updated_at:
|
|
2368
|
-
security_group_uuid:
|
|
2369
|
-
security_rule_uuid:
|
|
2370
|
-
state:
|
|
2412
|
+
rules: z32.array(ModelSecurityRuleResponseSchema)
|
|
2413
|
+
}).passthrough();
|
|
2414
|
+
var ModelSecurityRuleInstanceResponseSchema = z32.object({
|
|
2415
|
+
uuid: z32.string(),
|
|
2416
|
+
tsg_id: z32.string(),
|
|
2417
|
+
created_at: z32.string(),
|
|
2418
|
+
updated_at: z32.string(),
|
|
2419
|
+
security_group_uuid: z32.string(),
|
|
2420
|
+
security_rule_uuid: z32.string(),
|
|
2421
|
+
state: z32.string(),
|
|
2371
2422
|
rule: ModelSecurityRuleResponseSchema,
|
|
2372
|
-
field_values:
|
|
2423
|
+
field_values: z32.record(z32.unknown()).optional()
|
|
2373
2424
|
}).passthrough();
|
|
2374
|
-
var ModelSecurityRuleInstanceUpdateRequestSchema =
|
|
2375
|
-
security_group_uuid:
|
|
2376
|
-
state:
|
|
2377
|
-
field_values:
|
|
2425
|
+
var ModelSecurityRuleInstanceUpdateRequestSchema = z32.object({
|
|
2426
|
+
security_group_uuid: z32.string(),
|
|
2427
|
+
state: z32.string().nullable().optional(),
|
|
2428
|
+
field_values: z32.record(z32.unknown()).nullable().optional()
|
|
2378
2429
|
}).passthrough();
|
|
2379
|
-
var ListModelSecurityRuleInstancesResponseSchema =
|
|
2430
|
+
var ListModelSecurityRuleInstancesResponseSchema = z32.object({
|
|
2380
2431
|
pagination: ModelSecurityPaginationSchema,
|
|
2381
|
-
rule_instances:
|
|
2382
|
-
}).passthrough();
|
|
2383
|
-
var ModelSecurityGroupCreateRequestSchema =
|
|
2384
|
-
name:
|
|
2385
|
-
source_type:
|
|
2386
|
-
description:
|
|
2387
|
-
rule_configurations:
|
|
2388
|
-
}).passthrough();
|
|
2389
|
-
var ModelSecurityGroupResponseSchema =
|
|
2390
|
-
uuid:
|
|
2391
|
-
tsg_id:
|
|
2392
|
-
created_at:
|
|
2393
|
-
updated_at:
|
|
2394
|
-
name:
|
|
2395
|
-
description:
|
|
2396
|
-
source_type:
|
|
2397
|
-
state:
|
|
2398
|
-
is_tombstone:
|
|
2399
|
-
}).passthrough();
|
|
2400
|
-
var ModelSecurityGroupUpdateRequestSchema =
|
|
2401
|
-
name:
|
|
2402
|
-
description:
|
|
2403
|
-
}).passthrough();
|
|
2404
|
-
var ListModelSecurityGroupsResponseSchema =
|
|
2432
|
+
rule_instances: z32.array(ModelSecurityRuleInstanceResponseSchema)
|
|
2433
|
+
}).passthrough();
|
|
2434
|
+
var ModelSecurityGroupCreateRequestSchema = z32.object({
|
|
2435
|
+
name: z32.string(),
|
|
2436
|
+
source_type: z32.string(),
|
|
2437
|
+
description: z32.string().optional().default(""),
|
|
2438
|
+
rule_configurations: z32.record(RuleConfigurationSchema).optional()
|
|
2439
|
+
}).passthrough();
|
|
2440
|
+
var ModelSecurityGroupResponseSchema = z32.object({
|
|
2441
|
+
uuid: z32.string(),
|
|
2442
|
+
tsg_id: z32.string(),
|
|
2443
|
+
created_at: z32.string(),
|
|
2444
|
+
updated_at: z32.string(),
|
|
2445
|
+
name: z32.string(),
|
|
2446
|
+
description: z32.string(),
|
|
2447
|
+
source_type: z32.string(),
|
|
2448
|
+
state: z32.string(),
|
|
2449
|
+
is_tombstone: z32.boolean()
|
|
2450
|
+
}).passthrough();
|
|
2451
|
+
var ModelSecurityGroupUpdateRequestSchema = z32.object({
|
|
2452
|
+
name: z32.string().nullable().optional(),
|
|
2453
|
+
description: z32.string().nullable().optional()
|
|
2454
|
+
}).passthrough();
|
|
2455
|
+
var ListModelSecurityGroupsResponseSchema = z32.object({
|
|
2405
2456
|
pagination: ModelSecurityPaginationSchema,
|
|
2406
|
-
security_groups:
|
|
2457
|
+
security_groups: z32.array(ModelSecurityGroupResponseSchema)
|
|
2407
2458
|
}).passthrough();
|
|
2408
|
-
var PyPIAuthResponseSchema =
|
|
2409
|
-
url:
|
|
2410
|
-
expires_at:
|
|
2459
|
+
var PyPIAuthResponseSchema = z32.object({
|
|
2460
|
+
url: z32.string(),
|
|
2461
|
+
expires_at: z32.string()
|
|
2411
2462
|
}).passthrough();
|
|
2412
2463
|
|
|
2413
2464
|
// src/models/red-team-enums.ts
|
|
@@ -2615,1013 +2666,1013 @@ var TargetType = {
|
|
|
2615
2666
|
};
|
|
2616
2667
|
|
|
2617
2668
|
// src/models/red-team.ts
|
|
2618
|
-
import { z as
|
|
2619
|
-
var RedTeamPaginationSchema =
|
|
2620
|
-
var CountByNameSchema =
|
|
2621
|
-
var ValidationErrorSchema =
|
|
2622
|
-
loc:
|
|
2623
|
-
msg:
|
|
2624
|
-
type:
|
|
2625
|
-
}).passthrough();
|
|
2626
|
-
var HTTPValidationErrorSchema =
|
|
2627
|
-
var TargetBackgroundSchema =
|
|
2628
|
-
industry:
|
|
2629
|
-
use_case:
|
|
2630
|
-
competitors:
|
|
2631
|
-
}).passthrough();
|
|
2632
|
-
var TargetAdditionalContextSchema =
|
|
2633
|
-
base_model:
|
|
2634
|
-
core_architecture:
|
|
2635
|
-
system_prompt:
|
|
2636
|
-
languages_supported:
|
|
2637
|
-
banned_keywords:
|
|
2638
|
-
tools_accessible:
|
|
2639
|
-
}).passthrough();
|
|
2640
|
-
var TargetMetadataSchema =
|
|
2641
|
-
multi_turn:
|
|
2642
|
-
multi_turn_error_message:
|
|
2643
|
-
rate_limit:
|
|
2644
|
-
rate_limit_enabled:
|
|
2645
|
-
rate_limit_error_code:
|
|
2646
|
-
rate_limit_error_json:
|
|
2647
|
-
rate_limit_error_message:
|
|
2648
|
-
content_filter_enabled:
|
|
2649
|
-
content_filter_error_code:
|
|
2650
|
-
content_filter_error_json:
|
|
2651
|
-
content_filter_error_message:
|
|
2652
|
-
probe_message:
|
|
2653
|
-
request_timeout:
|
|
2654
|
-
}).passthrough();
|
|
2655
|
-
var MultiTurnStatefulConfigSchema =
|
|
2656
|
-
type:
|
|
2657
|
-
response_id_field:
|
|
2658
|
-
request_id_field:
|
|
2659
|
-
}).passthrough();
|
|
2660
|
-
var MultiTurnStatelessConfigSchema =
|
|
2661
|
-
type:
|
|
2662
|
-
assistant_role:
|
|
2663
|
-
}).passthrough();
|
|
2664
|
-
var HeadersAuthConfigSchema =
|
|
2665
|
-
var BasicAuthAuthConfigSchema =
|
|
2666
|
-
basic_auth_location:
|
|
2667
|
-
basic_auth_header:
|
|
2668
|
-
}).passthrough();
|
|
2669
|
-
var OAuth2AuthConfigSchema =
|
|
2670
|
-
oauth2_token_url:
|
|
2671
|
-
oauth2_expiry_minutes:
|
|
2672
|
-
oauth2_headers:
|
|
2673
|
-
oauth2_body_params:
|
|
2674
|
-
oauth2_token_response_key:
|
|
2675
|
-
oauth2_inject_header:
|
|
2676
|
-
}).passthrough();
|
|
2677
|
-
var AuthConfigSchema =
|
|
2669
|
+
import { z as z33 } from "zod";
|
|
2670
|
+
var RedTeamPaginationSchema = z33.object({ total_items: z33.number().int().nullable().optional() }).passthrough();
|
|
2671
|
+
var CountByNameSchema = z33.object({ name: z33.string(), count: z33.number().int() }).passthrough();
|
|
2672
|
+
var ValidationErrorSchema = z33.object({
|
|
2673
|
+
loc: z33.array(z33.union([z33.string(), z33.number()])),
|
|
2674
|
+
msg: z33.string(),
|
|
2675
|
+
type: z33.string()
|
|
2676
|
+
}).passthrough();
|
|
2677
|
+
var HTTPValidationErrorSchema = z33.object({ detail: z33.array(ValidationErrorSchema).optional() }).passthrough();
|
|
2678
|
+
var TargetBackgroundSchema = z33.object({
|
|
2679
|
+
industry: z33.string().nullable().optional(),
|
|
2680
|
+
use_case: z33.string().nullable().optional(),
|
|
2681
|
+
competitors: z33.array(z33.string()).nullable().optional()
|
|
2682
|
+
}).passthrough();
|
|
2683
|
+
var TargetAdditionalContextSchema = z33.object({
|
|
2684
|
+
base_model: z33.string().nullable().optional(),
|
|
2685
|
+
core_architecture: z33.string().nullable().optional(),
|
|
2686
|
+
system_prompt: z33.string().nullable().optional(),
|
|
2687
|
+
languages_supported: z33.array(z33.string()).nullable().optional(),
|
|
2688
|
+
banned_keywords: z33.array(z33.string()).nullable().optional(),
|
|
2689
|
+
tools_accessible: z33.array(z33.string()).nullable().optional()
|
|
2690
|
+
}).passthrough();
|
|
2691
|
+
var TargetMetadataSchema = z33.object({
|
|
2692
|
+
multi_turn: z33.boolean().optional(),
|
|
2693
|
+
multi_turn_error_message: z33.string().nullable().optional(),
|
|
2694
|
+
rate_limit: z33.number().int().nullable().optional(),
|
|
2695
|
+
rate_limit_enabled: z33.boolean().optional(),
|
|
2696
|
+
rate_limit_error_code: z33.number().int().nullable().optional(),
|
|
2697
|
+
rate_limit_error_json: z33.record(z33.unknown()).nullable().optional(),
|
|
2698
|
+
rate_limit_error_message: z33.string().nullable().optional(),
|
|
2699
|
+
content_filter_enabled: z33.boolean().optional(),
|
|
2700
|
+
content_filter_error_code: z33.number().int().nullable().optional(),
|
|
2701
|
+
content_filter_error_json: z33.record(z33.unknown()).nullable().optional(),
|
|
2702
|
+
content_filter_error_message: z33.string().nullable().optional(),
|
|
2703
|
+
probe_message: z33.string().optional(),
|
|
2704
|
+
request_timeout: z33.number().optional()
|
|
2705
|
+
}).passthrough();
|
|
2706
|
+
var MultiTurnStatefulConfigSchema = z33.object({
|
|
2707
|
+
type: z33.string().default("stateful"),
|
|
2708
|
+
response_id_field: z33.string(),
|
|
2709
|
+
request_id_field: z33.string()
|
|
2710
|
+
}).passthrough();
|
|
2711
|
+
var MultiTurnStatelessConfigSchema = z33.object({
|
|
2712
|
+
type: z33.string().default("stateless"),
|
|
2713
|
+
assistant_role: z33.string().nullable().optional()
|
|
2714
|
+
}).passthrough();
|
|
2715
|
+
var HeadersAuthConfigSchema = z33.object({ auth_header: z33.record(z33.unknown()) }).passthrough();
|
|
2716
|
+
var BasicAuthAuthConfigSchema = z33.object({
|
|
2717
|
+
basic_auth_location: z33.string().default("HEADER"),
|
|
2718
|
+
basic_auth_header: z33.record(z33.unknown()).nullable().optional()
|
|
2719
|
+
}).passthrough();
|
|
2720
|
+
var OAuth2AuthConfigSchema = z33.object({
|
|
2721
|
+
oauth2_token_url: z33.string(),
|
|
2722
|
+
oauth2_expiry_minutes: z33.number().int().default(60),
|
|
2723
|
+
oauth2_headers: z33.record(z33.unknown()).optional(),
|
|
2724
|
+
oauth2_body_params: z33.record(z33.unknown()).optional(),
|
|
2725
|
+
oauth2_token_response_key: z33.string().default("access_token"),
|
|
2726
|
+
oauth2_inject_header: z33.record(z33.unknown())
|
|
2727
|
+
}).passthrough();
|
|
2728
|
+
var AuthConfigSchema = z33.union([
|
|
2678
2729
|
HeadersAuthConfigSchema,
|
|
2679
2730
|
BasicAuthAuthConfigSchema,
|
|
2680
2731
|
OAuth2AuthConfigSchema
|
|
2681
2732
|
]);
|
|
2682
|
-
var OpenAIConnectionParamsSchema =
|
|
2683
|
-
api_key:
|
|
2684
|
-
model_name:
|
|
2685
|
-
}).passthrough();
|
|
2686
|
-
var HuggingfaceConnectionParamsSchema =
|
|
2687
|
-
api_key:
|
|
2688
|
-
model_name:
|
|
2689
|
-
}).passthrough();
|
|
2690
|
-
var DatabricksConnectionParamsSchema =
|
|
2691
|
-
auth_type:
|
|
2692
|
-
workspace_url:
|
|
2693
|
-
model_name:
|
|
2694
|
-
access_token:
|
|
2695
|
-
client_id:
|
|
2696
|
-
secret:
|
|
2697
|
-
}).passthrough();
|
|
2698
|
-
var BedrockAccessConnectionParamsSchema =
|
|
2699
|
-
access_id:
|
|
2700
|
-
access_secret:
|
|
2701
|
-
region:
|
|
2702
|
-
model_id:
|
|
2703
|
-
session_token:
|
|
2704
|
-
}).passthrough();
|
|
2705
|
-
var RestConnectionParamsSchema =
|
|
2706
|
-
api_endpoint:
|
|
2707
|
-
request_headers:
|
|
2708
|
-
request_json:
|
|
2709
|
-
response_json:
|
|
2710
|
-
response_key:
|
|
2711
|
-
target_connection_config:
|
|
2712
|
-
curl:
|
|
2713
|
-
multi_turn_config:
|
|
2733
|
+
var OpenAIConnectionParamsSchema = z33.object({
|
|
2734
|
+
api_key: z33.string(),
|
|
2735
|
+
model_name: z33.string()
|
|
2736
|
+
}).passthrough();
|
|
2737
|
+
var HuggingfaceConnectionParamsSchema = z33.object({
|
|
2738
|
+
api_key: z33.string(),
|
|
2739
|
+
model_name: z33.string()
|
|
2740
|
+
}).passthrough();
|
|
2741
|
+
var DatabricksConnectionParamsSchema = z33.object({
|
|
2742
|
+
auth_type: z33.string(),
|
|
2743
|
+
workspace_url: z33.string(),
|
|
2744
|
+
model_name: z33.string(),
|
|
2745
|
+
access_token: z33.string().nullable().optional(),
|
|
2746
|
+
client_id: z33.string().nullable().optional(),
|
|
2747
|
+
secret: z33.string().nullable().optional()
|
|
2748
|
+
}).passthrough();
|
|
2749
|
+
var BedrockAccessConnectionParamsSchema = z33.object({
|
|
2750
|
+
access_id: z33.string(),
|
|
2751
|
+
access_secret: z33.string(),
|
|
2752
|
+
region: z33.string(),
|
|
2753
|
+
model_id: z33.string(),
|
|
2754
|
+
session_token: z33.string().nullable().optional()
|
|
2755
|
+
}).passthrough();
|
|
2756
|
+
var RestConnectionParamsSchema = z33.object({
|
|
2757
|
+
api_endpoint: z33.string().nullable().optional(),
|
|
2758
|
+
request_headers: z33.record(z33.unknown()).nullable().optional(),
|
|
2759
|
+
request_json: z33.record(z33.unknown()).nullable().optional(),
|
|
2760
|
+
response_json: z33.record(z33.unknown()).nullable().optional(),
|
|
2761
|
+
response_key: z33.string().nullable().optional(),
|
|
2762
|
+
target_connection_config: z33.unknown().nullable().optional(),
|
|
2763
|
+
curl: z33.string().nullable().optional(),
|
|
2764
|
+
multi_turn_config: z33.unknown().nullable().optional()
|
|
2714
2765
|
}).passthrough();
|
|
2715
2766
|
var StreamingConnectionParamsSchema = RestConnectionParamsSchema.extend({
|
|
2716
|
-
response_stop_key:
|
|
2717
|
-
response_stop_value:
|
|
2767
|
+
response_stop_key: z33.string(),
|
|
2768
|
+
response_stop_value: z33.string()
|
|
2718
2769
|
}).passthrough();
|
|
2719
2770
|
var WebSocketConnectionParamsSchema = RestConnectionParamsSchema.extend({
|
|
2720
|
-
ws_response_timeout:
|
|
2771
|
+
ws_response_timeout: z33.number().default(110)
|
|
2721
2772
|
}).passthrough();
|
|
2722
|
-
var ConnectionParamsSchema =
|
|
2773
|
+
var ConnectionParamsSchema = z33.union([
|
|
2723
2774
|
WebSocketConnectionParamsSchema,
|
|
2724
2775
|
StreamingConnectionParamsSchema,
|
|
2725
2776
|
RestConnectionParamsSchema
|
|
2726
2777
|
]);
|
|
2727
|
-
var TargetJobRequestSchema =
|
|
2728
|
-
uuid:
|
|
2729
|
-
version:
|
|
2730
|
-
}).passthrough();
|
|
2731
|
-
var JobTimeRecordSchema =
|
|
2732
|
-
queued_at:
|
|
2733
|
-
started_at:
|
|
2734
|
-
completed_at:
|
|
2735
|
-
time_taken:
|
|
2736
|
-
}).passthrough();
|
|
2737
|
-
var StaticJobMetadataSchema =
|
|
2738
|
-
categories:
|
|
2739
|
-
rate_limit_enabled:
|
|
2740
|
-
rate_limit:
|
|
2741
|
-
rate_limit_error_code:
|
|
2742
|
-
rate_limit_error_message:
|
|
2743
|
-
rate_limit_error_json:
|
|
2744
|
-
content_filter_enabled:
|
|
2745
|
-
content_filter_error_code:
|
|
2746
|
-
content_filter_error_message:
|
|
2747
|
-
content_filter_error_json:
|
|
2748
|
-
}).passthrough();
|
|
2749
|
-
var DynamicJobMetadataSchema =
|
|
2750
|
-
rate_limit_enabled:
|
|
2751
|
-
rate_limit:
|
|
2752
|
-
rate_limit_error_code:
|
|
2753
|
-
rate_limit_error_message:
|
|
2754
|
-
rate_limit_error_json:
|
|
2755
|
-
content_filter_enabled:
|
|
2756
|
-
content_filter_error_code:
|
|
2757
|
-
content_filter_error_message:
|
|
2758
|
-
content_filter_error_json:
|
|
2759
|
-
stream_breadth:
|
|
2760
|
-
stream_depth:
|
|
2761
|
-
max_tokens:
|
|
2762
|
-
context_size:
|
|
2763
|
-
attack_goals:
|
|
2764
|
-
base_model:
|
|
2765
|
-
use_case:
|
|
2766
|
-
system_prompt:
|
|
2767
|
-
}).passthrough();
|
|
2768
|
-
var CustomJobMetadataSchema =
|
|
2769
|
-
custom_prompt_sets:
|
|
2770
|
-
rate_limit_enabled:
|
|
2771
|
-
rate_limit:
|
|
2772
|
-
rate_limit_error_code:
|
|
2773
|
-
rate_limit_error_message:
|
|
2774
|
-
rate_limit_error_json:
|
|
2775
|
-
content_filter_enabled:
|
|
2776
|
-
content_filter_error_code:
|
|
2777
|
-
content_filter_error_message:
|
|
2778
|
-
content_filter_error_json:
|
|
2779
|
-
}).passthrough();
|
|
2780
|
-
var JobCreateRequestSchema =
|
|
2781
|
-
name:
|
|
2778
|
+
var TargetJobRequestSchema = z33.object({
|
|
2779
|
+
uuid: z33.string(),
|
|
2780
|
+
version: z33.number().int().nullable().optional()
|
|
2781
|
+
}).passthrough();
|
|
2782
|
+
var JobTimeRecordSchema = z33.object({
|
|
2783
|
+
queued_at: z33.string().nullable().optional(),
|
|
2784
|
+
started_at: z33.string().nullable().optional(),
|
|
2785
|
+
completed_at: z33.string().nullable().optional(),
|
|
2786
|
+
time_taken: z33.string().nullable().optional()
|
|
2787
|
+
}).passthrough();
|
|
2788
|
+
var StaticJobMetadataSchema = z33.object({
|
|
2789
|
+
categories: z33.record(z33.unknown()),
|
|
2790
|
+
rate_limit_enabled: z33.boolean().optional(),
|
|
2791
|
+
rate_limit: z33.number().int().nullable().optional(),
|
|
2792
|
+
rate_limit_error_code: z33.number().int().nullable().optional(),
|
|
2793
|
+
rate_limit_error_message: z33.string().nullable().optional(),
|
|
2794
|
+
rate_limit_error_json: z33.unknown().optional(),
|
|
2795
|
+
content_filter_enabled: z33.boolean().optional(),
|
|
2796
|
+
content_filter_error_code: z33.number().int().nullable().optional(),
|
|
2797
|
+
content_filter_error_message: z33.string().nullable().optional(),
|
|
2798
|
+
content_filter_error_json: z33.unknown().optional()
|
|
2799
|
+
}).passthrough();
|
|
2800
|
+
var DynamicJobMetadataSchema = z33.object({
|
|
2801
|
+
rate_limit_enabled: z33.boolean().optional(),
|
|
2802
|
+
rate_limit: z33.number().int().nullable().optional(),
|
|
2803
|
+
rate_limit_error_code: z33.number().int().nullable().optional(),
|
|
2804
|
+
rate_limit_error_message: z33.string().nullable().optional(),
|
|
2805
|
+
rate_limit_error_json: z33.unknown().optional(),
|
|
2806
|
+
content_filter_enabled: z33.boolean().optional(),
|
|
2807
|
+
content_filter_error_code: z33.number().int().nullable().optional(),
|
|
2808
|
+
content_filter_error_message: z33.string().nullable().optional(),
|
|
2809
|
+
content_filter_error_json: z33.unknown().optional(),
|
|
2810
|
+
stream_breadth: z33.number().int().optional(),
|
|
2811
|
+
stream_depth: z33.number().int().optional(),
|
|
2812
|
+
max_tokens: z33.number().int().optional(),
|
|
2813
|
+
context_size: z33.number().int().optional(),
|
|
2814
|
+
attack_goals: z33.array(z33.unknown()).optional(),
|
|
2815
|
+
base_model: z33.string().nullable().optional(),
|
|
2816
|
+
use_case: z33.string().nullable().optional(),
|
|
2817
|
+
system_prompt: z33.string().nullable().optional()
|
|
2818
|
+
}).passthrough();
|
|
2819
|
+
var CustomJobMetadataSchema = z33.object({
|
|
2820
|
+
custom_prompt_sets: z33.array(z33.unknown()),
|
|
2821
|
+
rate_limit_enabled: z33.boolean().optional(),
|
|
2822
|
+
rate_limit: z33.number().int().nullable().optional(),
|
|
2823
|
+
rate_limit_error_code: z33.number().int().nullable().optional(),
|
|
2824
|
+
rate_limit_error_message: z33.string().nullable().optional(),
|
|
2825
|
+
rate_limit_error_json: z33.unknown().optional(),
|
|
2826
|
+
content_filter_enabled: z33.boolean().optional(),
|
|
2827
|
+
content_filter_error_code: z33.number().int().nullable().optional(),
|
|
2828
|
+
content_filter_error_message: z33.string().nullable().optional(),
|
|
2829
|
+
content_filter_error_json: z33.unknown().optional()
|
|
2830
|
+
}).passthrough();
|
|
2831
|
+
var JobCreateRequestSchema = z33.object({
|
|
2832
|
+
name: z33.string(),
|
|
2782
2833
|
target: TargetJobRequestSchema,
|
|
2783
|
-
job_type:
|
|
2784
|
-
job_metadata:
|
|
2834
|
+
job_type: z33.string(),
|
|
2835
|
+
job_metadata: z33.union([
|
|
2785
2836
|
StaticJobMetadataSchema,
|
|
2786
2837
|
DynamicJobMetadataSchema,
|
|
2787
2838
|
CustomJobMetadataSchema
|
|
2788
2839
|
]),
|
|
2789
|
-
version:
|
|
2790
|
-
extra_info:
|
|
2791
|
-
}).passthrough();
|
|
2792
|
-
var StaticJobReportStatsSchema =
|
|
2793
|
-
output_completion_percentage:
|
|
2794
|
-
partial_report_unlocked:
|
|
2795
|
-
partial_report_unlocked_at:
|
|
2796
|
-
report_summary:
|
|
2797
|
-
}).passthrough();
|
|
2798
|
-
var DynamicJobReportStatsSchema =
|
|
2799
|
-
total_goals:
|
|
2800
|
-
total_streams:
|
|
2801
|
-
total_threats:
|
|
2802
|
-
goals_achieved:
|
|
2803
|
-
report_summary:
|
|
2804
|
-
}).passthrough();
|
|
2805
|
-
var TargetReferenceSchema =
|
|
2806
|
-
uuid:
|
|
2807
|
-
tsg_id:
|
|
2808
|
-
name:
|
|
2809
|
-
description:
|
|
2810
|
-
target_type:
|
|
2811
|
-
connection_type:
|
|
2812
|
-
api_endpoint_type:
|
|
2813
|
-
response_mode:
|
|
2814
|
-
session_supported:
|
|
2815
|
-
extra_info:
|
|
2816
|
-
status:
|
|
2817
|
-
active:
|
|
2818
|
-
validated:
|
|
2819
|
-
version:
|
|
2820
|
-
secret_version:
|
|
2821
|
-
created_by_user_id:
|
|
2822
|
-
updated_by_user_id:
|
|
2823
|
-
created_at:
|
|
2824
|
-
updated_at:
|
|
2840
|
+
version: z33.number().int().nullable().optional(),
|
|
2841
|
+
extra_info: z33.record(z33.unknown()).nullable().optional()
|
|
2842
|
+
}).passthrough();
|
|
2843
|
+
var StaticJobReportStatsSchema = z33.object({
|
|
2844
|
+
output_completion_percentage: z33.number(),
|
|
2845
|
+
partial_report_unlocked: z33.boolean().optional(),
|
|
2846
|
+
partial_report_unlocked_at: z33.string().nullable().optional(),
|
|
2847
|
+
report_summary: z33.string().nullable().optional()
|
|
2848
|
+
}).passthrough();
|
|
2849
|
+
var DynamicJobReportStatsSchema = z33.object({
|
|
2850
|
+
total_goals: z33.number().int().optional(),
|
|
2851
|
+
total_streams: z33.number().int().optional(),
|
|
2852
|
+
total_threats: z33.number().int().optional(),
|
|
2853
|
+
goals_achieved: z33.number().int().optional(),
|
|
2854
|
+
report_summary: z33.string().nullable().optional()
|
|
2855
|
+
}).passthrough();
|
|
2856
|
+
var TargetReferenceSchema = z33.object({
|
|
2857
|
+
uuid: z33.string(),
|
|
2858
|
+
tsg_id: z33.string(),
|
|
2859
|
+
name: z33.string(),
|
|
2860
|
+
description: z33.string().nullable().optional(),
|
|
2861
|
+
target_type: z33.string().nullable().optional(),
|
|
2862
|
+
connection_type: z33.string().nullable().optional(),
|
|
2863
|
+
api_endpoint_type: z33.string().nullable().optional(),
|
|
2864
|
+
response_mode: z33.string().nullable().optional(),
|
|
2865
|
+
session_supported: z33.boolean().optional(),
|
|
2866
|
+
extra_info: z33.record(z33.unknown()).nullable().optional(),
|
|
2867
|
+
status: z33.string(),
|
|
2868
|
+
active: z33.boolean(),
|
|
2869
|
+
validated: z33.boolean(),
|
|
2870
|
+
version: z33.number().int().nullable().optional(),
|
|
2871
|
+
secret_version: z33.string().nullable().optional(),
|
|
2872
|
+
created_by_user_id: z33.string().nullable().optional(),
|
|
2873
|
+
updated_by_user_id: z33.string().nullable().optional(),
|
|
2874
|
+
created_at: z33.string(),
|
|
2875
|
+
updated_at: z33.string(),
|
|
2825
2876
|
target_metadata: TargetMetadataSchema.optional(),
|
|
2826
2877
|
target_background: TargetBackgroundSchema.nullable().optional(),
|
|
2827
|
-
profiling_status:
|
|
2878
|
+
profiling_status: z33.string().nullable().optional(),
|
|
2828
2879
|
additional_context: TargetAdditionalContextSchema.nullable().optional(),
|
|
2829
|
-
auth_type:
|
|
2880
|
+
auth_type: z33.string().nullable().optional()
|
|
2830
2881
|
}).passthrough();
|
|
2831
|
-
var JobResponseSchema =
|
|
2832
|
-
uuid:
|
|
2833
|
-
tsg_id:
|
|
2834
|
-
name:
|
|
2882
|
+
var JobResponseSchema = z33.object({
|
|
2883
|
+
uuid: z33.string(),
|
|
2884
|
+
tsg_id: z33.string(),
|
|
2885
|
+
name: z33.string(),
|
|
2835
2886
|
target: TargetReferenceSchema,
|
|
2836
|
-
job_type:
|
|
2837
|
-
job_metadata:
|
|
2838
|
-
version:
|
|
2839
|
-
extra_info:
|
|
2840
|
-
target_id:
|
|
2841
|
-
target_type:
|
|
2842
|
-
total:
|
|
2843
|
-
completed:
|
|
2844
|
-
status:
|
|
2845
|
-
score:
|
|
2846
|
-
asr:
|
|
2887
|
+
job_type: z33.string(),
|
|
2888
|
+
job_metadata: z33.unknown(),
|
|
2889
|
+
version: z33.number().int().nullable().optional(),
|
|
2890
|
+
extra_info: z33.record(z33.unknown()).nullable().optional(),
|
|
2891
|
+
target_id: z33.string(),
|
|
2892
|
+
target_type: z33.string(),
|
|
2893
|
+
total: z33.number().int().nullable().optional(),
|
|
2894
|
+
completed: z33.number().int().nullable().optional(),
|
|
2895
|
+
status: z33.string().optional(),
|
|
2896
|
+
score: z33.number().nullable().optional(),
|
|
2897
|
+
asr: z33.number().nullable().optional(),
|
|
2847
2898
|
time_record: JobTimeRecordSchema.nullable().optional(),
|
|
2848
|
-
created_at:
|
|
2849
|
-
updated_at:
|
|
2850
|
-
created_by_user_id:
|
|
2851
|
-
report_stats:
|
|
2852
|
-
metering_quota_uuid:
|
|
2853
|
-
counted_towards_quota:
|
|
2854
|
-
invocation_id:
|
|
2855
|
-
}).passthrough();
|
|
2856
|
-
var JobListResponseSchema =
|
|
2899
|
+
created_at: z33.string().nullable().optional(),
|
|
2900
|
+
updated_at: z33.string().nullable().optional(),
|
|
2901
|
+
created_by_user_id: z33.string().nullable().optional(),
|
|
2902
|
+
report_stats: z33.unknown().optional(),
|
|
2903
|
+
metering_quota_uuid: z33.string().nullable().optional(),
|
|
2904
|
+
counted_towards_quota: z33.string().optional(),
|
|
2905
|
+
invocation_id: z33.string().nullable().optional()
|
|
2906
|
+
}).passthrough();
|
|
2907
|
+
var JobListResponseSchema = z33.object({
|
|
2857
2908
|
pagination: RedTeamPaginationSchema,
|
|
2858
|
-
data:
|
|
2859
|
-
}).passthrough();
|
|
2860
|
-
var JobAbortResponseSchema =
|
|
2861
|
-
job_id:
|
|
2862
|
-
message:
|
|
2863
|
-
}).passthrough();
|
|
2864
|
-
var PrerequisiteModelSchema =
|
|
2865
|
-
id:
|
|
2866
|
-
display_name:
|
|
2867
|
-
description:
|
|
2868
|
-
}).passthrough();
|
|
2869
|
-
var SubCategoryModelSchema =
|
|
2870
|
-
id:
|
|
2871
|
-
display_name:
|
|
2872
|
-
description:
|
|
2873
|
-
preselect:
|
|
2874
|
-
prerequisites:
|
|
2875
|
-
active:
|
|
2876
|
-
}).passthrough();
|
|
2877
|
-
var CategoryModelSchema =
|
|
2878
|
-
id:
|
|
2879
|
-
display_name:
|
|
2880
|
-
description:
|
|
2881
|
-
preselect:
|
|
2882
|
-
sub_categories:
|
|
2883
|
-
}).passthrough();
|
|
2884
|
-
var AttackOutputSchema =
|
|
2885
|
-
uuid:
|
|
2886
|
-
tsg_id:
|
|
2887
|
-
attack_id:
|
|
2888
|
-
job_id:
|
|
2889
|
-
target_id:
|
|
2890
|
-
output:
|
|
2891
|
-
threat:
|
|
2892
|
-
marked_safe:
|
|
2893
|
-
}).passthrough();
|
|
2894
|
-
var AttackMultiTurnOutputSchema =
|
|
2895
|
-
uuid:
|
|
2896
|
-
tsg_id:
|
|
2897
|
-
attack_id:
|
|
2898
|
-
job_id:
|
|
2899
|
-
target_id:
|
|
2900
|
-
output:
|
|
2901
|
-
prompt:
|
|
2902
|
-
turn:
|
|
2903
|
-
threat:
|
|
2904
|
-
marked_safe:
|
|
2905
|
-
generation:
|
|
2906
|
-
multi_turn:
|
|
2907
|
-
}).passthrough();
|
|
2908
|
-
var AttackListItemSchema =
|
|
2909
|
-
uuid:
|
|
2910
|
-
tsg_id:
|
|
2911
|
-
job_id:
|
|
2912
|
-
target_id:
|
|
2913
|
-
prompt:
|
|
2914
|
-
prompt_mapping_id:
|
|
2915
|
-
prompt_id:
|
|
2916
|
-
category:
|
|
2917
|
-
sub_category:
|
|
2918
|
-
category_display_name:
|
|
2919
|
-
sub_category_display_name:
|
|
2920
|
-
status:
|
|
2921
|
-
marked_safe:
|
|
2922
|
-
extra_info:
|
|
2923
|
-
threat:
|
|
2924
|
-
attack_type:
|
|
2925
|
-
multi_turn:
|
|
2926
|
-
asr:
|
|
2927
|
-
version:
|
|
2928
|
-
severity:
|
|
2929
|
-
}).passthrough();
|
|
2930
|
-
var AttackListResponseSchema =
|
|
2909
|
+
data: z33.array(JobResponseSchema)
|
|
2910
|
+
}).passthrough();
|
|
2911
|
+
var JobAbortResponseSchema = z33.object({
|
|
2912
|
+
job_id: z33.string(),
|
|
2913
|
+
message: z33.string()
|
|
2914
|
+
}).passthrough();
|
|
2915
|
+
var PrerequisiteModelSchema = z33.object({
|
|
2916
|
+
id: z33.string(),
|
|
2917
|
+
display_name: z33.string(),
|
|
2918
|
+
description: z33.string()
|
|
2919
|
+
}).passthrough();
|
|
2920
|
+
var SubCategoryModelSchema = z33.object({
|
|
2921
|
+
id: z33.string(),
|
|
2922
|
+
display_name: z33.string(),
|
|
2923
|
+
description: z33.string(),
|
|
2924
|
+
preselect: z33.boolean().optional(),
|
|
2925
|
+
prerequisites: z33.array(PrerequisiteModelSchema).nullable().optional(),
|
|
2926
|
+
active: z33.boolean().optional()
|
|
2927
|
+
}).passthrough();
|
|
2928
|
+
var CategoryModelSchema = z33.object({
|
|
2929
|
+
id: z33.string(),
|
|
2930
|
+
display_name: z33.string(),
|
|
2931
|
+
description: z33.string(),
|
|
2932
|
+
preselect: z33.boolean().optional(),
|
|
2933
|
+
sub_categories: z33.array(SubCategoryModelSchema)
|
|
2934
|
+
}).passthrough();
|
|
2935
|
+
var AttackOutputSchema = z33.object({
|
|
2936
|
+
uuid: z33.string(),
|
|
2937
|
+
tsg_id: z33.string(),
|
|
2938
|
+
attack_id: z33.string(),
|
|
2939
|
+
job_id: z33.string(),
|
|
2940
|
+
target_id: z33.string(),
|
|
2941
|
+
output: z33.string(),
|
|
2942
|
+
threat: z33.boolean().nullable().optional(),
|
|
2943
|
+
marked_safe: z33.boolean().nullable().optional()
|
|
2944
|
+
}).passthrough();
|
|
2945
|
+
var AttackMultiTurnOutputSchema = z33.object({
|
|
2946
|
+
uuid: z33.string(),
|
|
2947
|
+
tsg_id: z33.string(),
|
|
2948
|
+
attack_id: z33.string(),
|
|
2949
|
+
job_id: z33.string(),
|
|
2950
|
+
target_id: z33.string(),
|
|
2951
|
+
output: z33.string(),
|
|
2952
|
+
prompt: z33.string(),
|
|
2953
|
+
turn: z33.number().int(),
|
|
2954
|
+
threat: z33.boolean().nullable().optional(),
|
|
2955
|
+
marked_safe: z33.boolean().nullable().optional(),
|
|
2956
|
+
generation: z33.number().int().optional(),
|
|
2957
|
+
multi_turn: z33.boolean().optional()
|
|
2958
|
+
}).passthrough();
|
|
2959
|
+
var AttackListItemSchema = z33.object({
|
|
2960
|
+
uuid: z33.string(),
|
|
2961
|
+
tsg_id: z33.string(),
|
|
2962
|
+
job_id: z33.string(),
|
|
2963
|
+
target_id: z33.string(),
|
|
2964
|
+
prompt: z33.string(),
|
|
2965
|
+
prompt_mapping_id: z33.string(),
|
|
2966
|
+
prompt_id: z33.string(),
|
|
2967
|
+
category: z33.string(),
|
|
2968
|
+
sub_category: z33.string(),
|
|
2969
|
+
category_display_name: z33.string(),
|
|
2970
|
+
sub_category_display_name: z33.string(),
|
|
2971
|
+
status: z33.string().optional(),
|
|
2972
|
+
marked_safe: z33.boolean().nullable().optional(),
|
|
2973
|
+
extra_info: z33.record(z33.unknown()).optional(),
|
|
2974
|
+
threat: z33.boolean().nullable().optional(),
|
|
2975
|
+
attack_type: z33.string().optional(),
|
|
2976
|
+
multi_turn: z33.boolean().optional(),
|
|
2977
|
+
asr: z33.number().nullable().optional(),
|
|
2978
|
+
version: z33.number().int().nullable().optional(),
|
|
2979
|
+
severity: z33.string().optional()
|
|
2980
|
+
}).passthrough();
|
|
2981
|
+
var AttackListResponseSchema = z33.object({
|
|
2931
2982
|
pagination: RedTeamPaginationSchema,
|
|
2932
|
-
data:
|
|
2933
|
-
}).passthrough();
|
|
2934
|
-
var AttackDetailResponseSchema =
|
|
2935
|
-
uuid:
|
|
2936
|
-
tsg_id:
|
|
2937
|
-
job_id:
|
|
2938
|
-
target_id:
|
|
2939
|
-
prompt:
|
|
2940
|
-
prompt_mapping_id:
|
|
2941
|
-
prompt_id:
|
|
2942
|
-
category:
|
|
2943
|
-
sub_category:
|
|
2944
|
-
category_display_name:
|
|
2945
|
-
sub_category_display_name:
|
|
2946
|
-
compliance_frameworks:
|
|
2947
|
-
goal:
|
|
2948
|
-
status:
|
|
2949
|
-
marked_safe:
|
|
2950
|
-
extra_info:
|
|
2951
|
-
threat:
|
|
2952
|
-
attack_type:
|
|
2953
|
-
multi_turn:
|
|
2954
|
-
asr:
|
|
2955
|
-
version:
|
|
2956
|
-
severity:
|
|
2957
|
-
outputs:
|
|
2958
|
-
}).passthrough();
|
|
2959
|
-
var AttackMultiTurnDetailResponseSchema =
|
|
2960
|
-
uuid:
|
|
2961
|
-
tsg_id:
|
|
2962
|
-
job_id:
|
|
2963
|
-
target_id:
|
|
2964
|
-
prompt:
|
|
2965
|
-
prompt_mapping_id:
|
|
2966
|
-
prompt_id:
|
|
2967
|
-
category:
|
|
2968
|
-
sub_category:
|
|
2969
|
-
category_display_name:
|
|
2970
|
-
sub_category_display_name:
|
|
2971
|
-
compliance_frameworks:
|
|
2972
|
-
goal:
|
|
2973
|
-
status:
|
|
2974
|
-
marked_safe:
|
|
2975
|
-
extra_info:
|
|
2976
|
-
threat:
|
|
2977
|
-
attack_type:
|
|
2978
|
-
multi_turn:
|
|
2979
|
-
asr:
|
|
2980
|
-
version:
|
|
2981
|
-
severity:
|
|
2982
|
-
outputs:
|
|
2983
|
-
}).passthrough();
|
|
2984
|
-
var SubCategoryStatsSchema =
|
|
2985
|
-
id:
|
|
2986
|
-
display_name:
|
|
2987
|
-
description:
|
|
2988
|
-
preselect:
|
|
2989
|
-
prerequisites:
|
|
2990
|
-
active:
|
|
2991
|
-
successful:
|
|
2992
|
-
failed:
|
|
2993
|
-
total:
|
|
2994
|
-
}).passthrough();
|
|
2995
|
-
var CategoryReportSchema =
|
|
2996
|
-
id:
|
|
2997
|
-
display_name:
|
|
2998
|
-
description:
|
|
2999
|
-
preselect:
|
|
3000
|
-
sub_categories:
|
|
3001
|
-
asr:
|
|
3002
|
-
total_prompts:
|
|
3003
|
-
total_attacks:
|
|
3004
|
-
successful:
|
|
3005
|
-
failed:
|
|
3006
|
-
}).passthrough();
|
|
3007
|
-
var SeverityStatsSchema =
|
|
3008
|
-
severity:
|
|
3009
|
-
successful:
|
|
3010
|
-
failed:
|
|
3011
|
-
}).passthrough();
|
|
3012
|
-
var SeverityReportSchema =
|
|
3013
|
-
stats:
|
|
3014
|
-
successful:
|
|
3015
|
-
failed:
|
|
3016
|
-
total_attacks:
|
|
3017
|
-
}).passthrough();
|
|
3018
|
-
var ComplianceTechniqueSchema =
|
|
3019
|
-
id:
|
|
3020
|
-
display_name:
|
|
3021
|
-
compliance_id:
|
|
3022
|
-
description:
|
|
3023
|
-
link:
|
|
3024
|
-
version:
|
|
3025
|
-
active:
|
|
3026
|
-
successful:
|
|
3027
|
-
failed:
|
|
3028
|
-
total:
|
|
3029
|
-
}).passthrough();
|
|
3030
|
-
var ComplianceReportSchema =
|
|
3031
|
-
id:
|
|
3032
|
-
display_name:
|
|
3033
|
-
description:
|
|
3034
|
-
active:
|
|
3035
|
-
version:
|
|
3036
|
-
link:
|
|
3037
|
-
techniques:
|
|
3038
|
-
score:
|
|
3039
|
-
}).passthrough();
|
|
3040
|
-
var RuntimeSecurityPolicySchema =
|
|
3041
|
-
policy_id:
|
|
3042
|
-
display_name:
|
|
3043
|
-
config:
|
|
3044
|
-
}).passthrough();
|
|
3045
|
-
var StaticJobRemediationSchema =
|
|
3046
|
-
remediation:
|
|
3047
|
-
description:
|
|
3048
|
-
mapping_remediation_id:
|
|
3049
|
-
subcategories:
|
|
3050
|
-
effectiveness:
|
|
3051
|
-
ease_of_implementation:
|
|
3052
|
-
priority:
|
|
3053
|
-
resource_links:
|
|
3054
|
-
categories:
|
|
3055
|
-
}).passthrough();
|
|
3056
|
-
var StaticJobRemediationRecommendationSchema =
|
|
3057
|
-
runtime_security_policy_configuration:
|
|
3058
|
-
other_measures:
|
|
3059
|
-
}).passthrough();
|
|
3060
|
-
var StaticJobReportSchema =
|
|
2983
|
+
data: z33.array(AttackListItemSchema)
|
|
2984
|
+
}).passthrough();
|
|
2985
|
+
var AttackDetailResponseSchema = z33.object({
|
|
2986
|
+
uuid: z33.string(),
|
|
2987
|
+
tsg_id: z33.string(),
|
|
2988
|
+
job_id: z33.string(),
|
|
2989
|
+
target_id: z33.string(),
|
|
2990
|
+
prompt: z33.string(),
|
|
2991
|
+
prompt_mapping_id: z33.string(),
|
|
2992
|
+
prompt_id: z33.string(),
|
|
2993
|
+
category: z33.string(),
|
|
2994
|
+
sub_category: z33.string(),
|
|
2995
|
+
category_display_name: z33.string(),
|
|
2996
|
+
sub_category_display_name: z33.string(),
|
|
2997
|
+
compliance_frameworks: z33.array(z33.unknown()),
|
|
2998
|
+
goal: z33.string().nullable(),
|
|
2999
|
+
status: z33.string().optional(),
|
|
3000
|
+
marked_safe: z33.boolean().nullable().optional(),
|
|
3001
|
+
extra_info: z33.record(z33.unknown()).optional(),
|
|
3002
|
+
threat: z33.boolean().nullable().optional(),
|
|
3003
|
+
attack_type: z33.string().optional(),
|
|
3004
|
+
multi_turn: z33.boolean().optional(),
|
|
3005
|
+
asr: z33.number().nullable().optional(),
|
|
3006
|
+
version: z33.number().int().nullable().optional(),
|
|
3007
|
+
severity: z33.string().optional(),
|
|
3008
|
+
outputs: z33.array(AttackOutputSchema).optional()
|
|
3009
|
+
}).passthrough();
|
|
3010
|
+
var AttackMultiTurnDetailResponseSchema = z33.object({
|
|
3011
|
+
uuid: z33.string(),
|
|
3012
|
+
tsg_id: z33.string(),
|
|
3013
|
+
job_id: z33.string(),
|
|
3014
|
+
target_id: z33.string(),
|
|
3015
|
+
prompt: z33.string(),
|
|
3016
|
+
prompt_mapping_id: z33.string(),
|
|
3017
|
+
prompt_id: z33.string(),
|
|
3018
|
+
category: z33.string(),
|
|
3019
|
+
sub_category: z33.string(),
|
|
3020
|
+
category_display_name: z33.string(),
|
|
3021
|
+
sub_category_display_name: z33.string(),
|
|
3022
|
+
compliance_frameworks: z33.array(z33.unknown()),
|
|
3023
|
+
goal: z33.string().nullable(),
|
|
3024
|
+
status: z33.string().optional(),
|
|
3025
|
+
marked_safe: z33.boolean().nullable().optional(),
|
|
3026
|
+
extra_info: z33.record(z33.unknown()).optional(),
|
|
3027
|
+
threat: z33.boolean().nullable().optional(),
|
|
3028
|
+
attack_type: z33.string().optional(),
|
|
3029
|
+
multi_turn: z33.boolean().optional(),
|
|
3030
|
+
asr: z33.number().nullable().optional(),
|
|
3031
|
+
version: z33.number().int().nullable().optional(),
|
|
3032
|
+
severity: z33.string().optional(),
|
|
3033
|
+
outputs: z33.array(AttackMultiTurnOutputSchema).optional()
|
|
3034
|
+
}).passthrough();
|
|
3035
|
+
var SubCategoryStatsSchema = z33.object({
|
|
3036
|
+
id: z33.string(),
|
|
3037
|
+
display_name: z33.string(),
|
|
3038
|
+
description: z33.string(),
|
|
3039
|
+
preselect: z33.boolean().optional(),
|
|
3040
|
+
prerequisites: z33.array(PrerequisiteModelSchema).nullable().optional(),
|
|
3041
|
+
active: z33.boolean().optional(),
|
|
3042
|
+
successful: z33.number().int(),
|
|
3043
|
+
failed: z33.number().int(),
|
|
3044
|
+
total: z33.number().int().optional()
|
|
3045
|
+
}).passthrough();
|
|
3046
|
+
var CategoryReportSchema = z33.object({
|
|
3047
|
+
id: z33.string(),
|
|
3048
|
+
display_name: z33.string(),
|
|
3049
|
+
description: z33.string(),
|
|
3050
|
+
preselect: z33.boolean().optional(),
|
|
3051
|
+
sub_categories: z33.array(SubCategoryStatsSchema),
|
|
3052
|
+
asr: z33.number(),
|
|
3053
|
+
total_prompts: z33.number().int(),
|
|
3054
|
+
total_attacks: z33.number().int(),
|
|
3055
|
+
successful: z33.number().int(),
|
|
3056
|
+
failed: z33.number().int()
|
|
3057
|
+
}).passthrough();
|
|
3058
|
+
var SeverityStatsSchema = z33.object({
|
|
3059
|
+
severity: z33.string(),
|
|
3060
|
+
successful: z33.number().int().optional(),
|
|
3061
|
+
failed: z33.number().int().optional()
|
|
3062
|
+
}).passthrough();
|
|
3063
|
+
var SeverityReportSchema = z33.object({
|
|
3064
|
+
stats: z33.array(SeverityStatsSchema),
|
|
3065
|
+
successful: z33.number().int().optional(),
|
|
3066
|
+
failed: z33.number().int().optional(),
|
|
3067
|
+
total_attacks: z33.number().int().optional()
|
|
3068
|
+
}).passthrough();
|
|
3069
|
+
var ComplianceTechniqueSchema = z33.object({
|
|
3070
|
+
id: z33.string(),
|
|
3071
|
+
display_name: z33.string(),
|
|
3072
|
+
compliance_id: z33.string(),
|
|
3073
|
+
description: z33.string(),
|
|
3074
|
+
link: z33.string(),
|
|
3075
|
+
version: z33.string(),
|
|
3076
|
+
active: z33.boolean(),
|
|
3077
|
+
successful: z33.number().int().optional(),
|
|
3078
|
+
failed: z33.number().int().optional(),
|
|
3079
|
+
total: z33.number().int().optional()
|
|
3080
|
+
}).passthrough();
|
|
3081
|
+
var ComplianceReportSchema = z33.object({
|
|
3082
|
+
id: z33.string(),
|
|
3083
|
+
display_name: z33.string(),
|
|
3084
|
+
description: z33.string(),
|
|
3085
|
+
active: z33.boolean(),
|
|
3086
|
+
version: z33.string(),
|
|
3087
|
+
link: z33.string(),
|
|
3088
|
+
techniques: z33.array(ComplianceTechniqueSchema),
|
|
3089
|
+
score: z33.number().int().optional()
|
|
3090
|
+
}).passthrough();
|
|
3091
|
+
var RuntimeSecurityPolicySchema = z33.object({
|
|
3092
|
+
policy_id: z33.string(),
|
|
3093
|
+
display_name: z33.string(),
|
|
3094
|
+
config: z33.record(z33.unknown())
|
|
3095
|
+
}).passthrough();
|
|
3096
|
+
var StaticJobRemediationSchema = z33.object({
|
|
3097
|
+
remediation: z33.string(),
|
|
3098
|
+
description: z33.string(),
|
|
3099
|
+
mapping_remediation_id: z33.string().nullable().optional(),
|
|
3100
|
+
subcategories: z33.array(z33.string()).nullable().optional(),
|
|
3101
|
+
effectiveness: z33.number().int().optional(),
|
|
3102
|
+
ease_of_implementation: z33.number().int().optional(),
|
|
3103
|
+
priority: z33.number().int().optional(),
|
|
3104
|
+
resource_links: z33.array(z33.string()).optional(),
|
|
3105
|
+
categories: z33.array(z33.string()).nullable().optional()
|
|
3106
|
+
}).passthrough();
|
|
3107
|
+
var StaticJobRemediationRecommendationSchema = z33.object({
|
|
3108
|
+
runtime_security_policy_configuration: z33.array(RuntimeSecurityPolicySchema).nullable().optional(),
|
|
3109
|
+
other_measures: z33.array(StaticJobRemediationSchema).optional()
|
|
3110
|
+
}).passthrough();
|
|
3111
|
+
var StaticJobReportSchema = z33.object({
|
|
3061
3112
|
severity_report: SeverityReportSchema,
|
|
3062
|
-
asr:
|
|
3063
|
-
score:
|
|
3113
|
+
asr: z33.number().nullable().optional(),
|
|
3114
|
+
score: z33.number().nullable().optional(),
|
|
3064
3115
|
security_report: CategoryReportSchema.nullable().optional(),
|
|
3065
3116
|
safety_report: CategoryReportSchema.nullable().optional(),
|
|
3066
3117
|
brand_report: CategoryReportSchema.nullable().optional(),
|
|
3067
|
-
compliance_report:
|
|
3068
|
-
report_summary:
|
|
3118
|
+
compliance_report: z33.array(ComplianceReportSchema).nullable().optional(),
|
|
3119
|
+
report_summary: z33.string().nullable().optional(),
|
|
3069
3120
|
recommendations: StaticJobRemediationRecommendationSchema.nullable().optional()
|
|
3070
3121
|
}).passthrough();
|
|
3071
|
-
var DynamicJobReportSchema =
|
|
3072
|
-
total_goals:
|
|
3073
|
-
total_streams:
|
|
3074
|
-
total_threats:
|
|
3075
|
-
goals_achieved:
|
|
3076
|
-
report_summary:
|
|
3077
|
-
score:
|
|
3078
|
-
asr:
|
|
3079
|
-
}).passthrough();
|
|
3080
|
-
var RemediationDetailSchema =
|
|
3081
|
-
remediation:
|
|
3082
|
-
description:
|
|
3083
|
-
resource_links:
|
|
3084
|
-
priority_level:
|
|
3085
|
-
ease_of_implementation_level:
|
|
3086
|
-
effectiveness_level:
|
|
3087
|
-
}).passthrough();
|
|
3088
|
-
var RemediationResponseSchema =
|
|
3089
|
-
var RuntimeSecurityProfileResponseSchema =
|
|
3090
|
-
runtime_security_profile:
|
|
3091
|
-
}).passthrough();
|
|
3092
|
-
var GoalSchema =
|
|
3093
|
-
goal:
|
|
3094
|
-
safe_response:
|
|
3095
|
-
jailbroken_response:
|
|
3096
|
-
goal_metadata:
|
|
3097
|
-
custom_goal:
|
|
3098
|
-
goal_type:
|
|
3099
|
-
uuid:
|
|
3100
|
-
tsg_id:
|
|
3101
|
-
job_id:
|
|
3102
|
-
goal_to_show:
|
|
3103
|
-
threat:
|
|
3104
|
-
version:
|
|
3105
|
-
extra_info:
|
|
3106
|
-
}).passthrough();
|
|
3107
|
-
var GoalListResponseSchema =
|
|
3108
|
-
var StreamIterationDataSchema =
|
|
3109
|
-
uuid:
|
|
3110
|
-
tsg_id:
|
|
3111
|
-
job_id:
|
|
3112
|
-
stream_id:
|
|
3113
|
-
goal_id:
|
|
3114
|
-
iteration:
|
|
3115
|
-
prompt:
|
|
3116
|
-
techniques:
|
|
3117
|
-
improvement:
|
|
3118
|
-
prompts_objective:
|
|
3119
|
-
summary:
|
|
3120
|
-
output:
|
|
3121
|
-
score:
|
|
3122
|
-
judge_reasoning:
|
|
3123
|
-
threat:
|
|
3124
|
-
created_at:
|
|
3125
|
-
updated_at:
|
|
3126
|
-
extra_info:
|
|
3127
|
-
version:
|
|
3128
|
-
}).passthrough();
|
|
3129
|
-
var StreamDetailResponseSchema =
|
|
3130
|
-
uuid:
|
|
3131
|
-
tsg_id:
|
|
3132
|
-
job_id:
|
|
3133
|
-
target_id:
|
|
3134
|
-
goal_id:
|
|
3135
|
-
stream_idx:
|
|
3136
|
-
iteration:
|
|
3137
|
-
goal:
|
|
3138
|
-
marked_safe:
|
|
3139
|
-
stream_type:
|
|
3140
|
-
threat:
|
|
3122
|
+
var DynamicJobReportSchema = z33.object({
|
|
3123
|
+
total_goals: z33.number().int().optional(),
|
|
3124
|
+
total_streams: z33.number().int().optional(),
|
|
3125
|
+
total_threats: z33.number().int().optional(),
|
|
3126
|
+
goals_achieved: z33.number().int().optional(),
|
|
3127
|
+
report_summary: z33.string().nullable().optional(),
|
|
3128
|
+
score: z33.number().optional(),
|
|
3129
|
+
asr: z33.number().optional()
|
|
3130
|
+
}).passthrough();
|
|
3131
|
+
var RemediationDetailSchema = z33.object({
|
|
3132
|
+
remediation: z33.string(),
|
|
3133
|
+
description: z33.string(),
|
|
3134
|
+
resource_links: z33.array(z33.string()).optional(),
|
|
3135
|
+
priority_level: z33.string().optional(),
|
|
3136
|
+
ease_of_implementation_level: z33.string().optional(),
|
|
3137
|
+
effectiveness_level: z33.string().optional()
|
|
3138
|
+
}).passthrough();
|
|
3139
|
+
var RemediationResponseSchema = z33.object({ remediations: z33.array(RemediationDetailSchema).optional() }).passthrough();
|
|
3140
|
+
var RuntimeSecurityProfileResponseSchema = z33.object({
|
|
3141
|
+
runtime_security_profile: z33.array(RuntimeSecurityPolicySchema).nullable().optional()
|
|
3142
|
+
}).passthrough();
|
|
3143
|
+
var GoalSchema = z33.object({
|
|
3144
|
+
goal: z33.string(),
|
|
3145
|
+
safe_response: z33.string(),
|
|
3146
|
+
jailbroken_response: z33.string(),
|
|
3147
|
+
goal_metadata: z33.record(z33.unknown()).optional(),
|
|
3148
|
+
custom_goal: z33.boolean().optional(),
|
|
3149
|
+
goal_type: z33.string().optional(),
|
|
3150
|
+
uuid: z33.string(),
|
|
3151
|
+
tsg_id: z33.string(),
|
|
3152
|
+
job_id: z33.string(),
|
|
3153
|
+
goal_to_show: z33.string().nullable().optional(),
|
|
3154
|
+
threat: z33.boolean().optional(),
|
|
3155
|
+
version: z33.number().int().nullable().optional(),
|
|
3156
|
+
extra_info: z33.record(z33.unknown()).nullable().optional()
|
|
3157
|
+
}).passthrough();
|
|
3158
|
+
var GoalListResponseSchema = z33.object({ pagination: RedTeamPaginationSchema, data: z33.array(GoalSchema) }).passthrough();
|
|
3159
|
+
var StreamIterationDataSchema = z33.object({
|
|
3160
|
+
uuid: z33.string(),
|
|
3161
|
+
tsg_id: z33.string(),
|
|
3162
|
+
job_id: z33.string(),
|
|
3163
|
+
stream_id: z33.string(),
|
|
3164
|
+
goal_id: z33.string(),
|
|
3165
|
+
iteration: z33.number().int(),
|
|
3166
|
+
prompt: z33.string(),
|
|
3167
|
+
techniques: z33.string(),
|
|
3168
|
+
improvement: z33.string(),
|
|
3169
|
+
prompts_objective: z33.string(),
|
|
3170
|
+
summary: z33.string(),
|
|
3171
|
+
output: z33.string().nullable().optional(),
|
|
3172
|
+
score: z33.number().int().nullable().optional(),
|
|
3173
|
+
judge_reasoning: z33.string().nullable().optional(),
|
|
3174
|
+
threat: z33.boolean().optional(),
|
|
3175
|
+
created_at: z33.string().nullable().optional(),
|
|
3176
|
+
updated_at: z33.string().nullable().optional(),
|
|
3177
|
+
extra_info: z33.record(z33.unknown()).nullable().optional(),
|
|
3178
|
+
version: z33.number().int().nullable().optional()
|
|
3179
|
+
}).passthrough();
|
|
3180
|
+
var StreamDetailResponseSchema = z33.object({
|
|
3181
|
+
uuid: z33.string(),
|
|
3182
|
+
tsg_id: z33.string(),
|
|
3183
|
+
job_id: z33.string(),
|
|
3184
|
+
target_id: z33.string(),
|
|
3185
|
+
goal_id: z33.string(),
|
|
3186
|
+
stream_idx: z33.number().int().optional(),
|
|
3187
|
+
iteration: z33.number().int().optional(),
|
|
3188
|
+
goal: z33.unknown().optional(),
|
|
3189
|
+
marked_safe: z33.boolean().optional(),
|
|
3190
|
+
stream_type: z33.string().nullable().optional(),
|
|
3191
|
+
threat: z33.boolean().optional(),
|
|
3141
3192
|
first_threat_iteration: StreamIterationDataSchema.nullable().optional(),
|
|
3142
|
-
created_at:
|
|
3143
|
-
updated_at:
|
|
3144
|
-
extra_info:
|
|
3145
|
-
version:
|
|
3146
|
-
iterations:
|
|
3147
|
-
}).passthrough();
|
|
3148
|
-
var StreamListResponseSchema =
|
|
3149
|
-
var CustomAttackOutputSchema =
|
|
3150
|
-
uuid:
|
|
3151
|
-
tsg_id:
|
|
3152
|
-
custom_attack_id:
|
|
3153
|
-
job_id:
|
|
3154
|
-
target_id:
|
|
3155
|
-
output:
|
|
3156
|
-
threat:
|
|
3157
|
-
marked_safe:
|
|
3158
|
-
}).passthrough();
|
|
3159
|
-
var PropertyAssignmentSchema =
|
|
3160
|
-
name:
|
|
3161
|
-
value:
|
|
3162
|
-
}).passthrough();
|
|
3163
|
-
var PropertyValueStatisticSchema =
|
|
3164
|
-
value:
|
|
3165
|
-
successful_attack_count:
|
|
3166
|
-
total_attack_count:
|
|
3167
|
-
success_rate:
|
|
3168
|
-
}).passthrough();
|
|
3169
|
-
var PropertyStatisticSchema =
|
|
3170
|
-
property_name:
|
|
3171
|
-
values:
|
|
3172
|
-
}).passthrough();
|
|
3173
|
-
var PromptSetSummarySchema =
|
|
3174
|
-
prompt_set_id:
|
|
3175
|
-
prompt_set_name:
|
|
3176
|
-
total_prompts:
|
|
3177
|
-
total_attacks:
|
|
3178
|
-
total_threats:
|
|
3179
|
-
failed_attacks:
|
|
3180
|
-
threat_rate:
|
|
3181
|
-
property_names:
|
|
3182
|
-
property_statistics:
|
|
3183
|
-
}).passthrough();
|
|
3184
|
-
var CustomAttackReportResponseSchema =
|
|
3185
|
-
total_prompts:
|
|
3186
|
-
total_attacks:
|
|
3187
|
-
total_threats:
|
|
3188
|
-
failed_attacks:
|
|
3189
|
-
score:
|
|
3190
|
-
asr:
|
|
3191
|
-
custom_attack_reports:
|
|
3192
|
-
property_statistics:
|
|
3193
|
-
}).passthrough();
|
|
3194
|
-
var PromptSetsReportResponseSchema =
|
|
3195
|
-
prompt_sets:
|
|
3196
|
-
total_prompt_sets:
|
|
3197
|
-
applied_filters:
|
|
3198
|
-
}).passthrough();
|
|
3199
|
-
var PromptDetailResponseSchema =
|
|
3200
|
-
prompt_id:
|
|
3201
|
-
prompt_text:
|
|
3202
|
-
goal:
|
|
3203
|
-
user_defined_goal:
|
|
3204
|
-
properties:
|
|
3205
|
-
attack_id:
|
|
3206
|
-
threat:
|
|
3207
|
-
attack_outputs:
|
|
3208
|
-
asr:
|
|
3209
|
-
prompt_set_id:
|
|
3210
|
-
prompt_set_name:
|
|
3211
|
-
}).passthrough();
|
|
3212
|
-
var CustomAttacksListResponseSchema =
|
|
3193
|
+
created_at: z33.string().nullable().optional(),
|
|
3194
|
+
updated_at: z33.string().nullable().optional(),
|
|
3195
|
+
extra_info: z33.record(z33.unknown()).optional(),
|
|
3196
|
+
version: z33.number().int().nullable().optional(),
|
|
3197
|
+
iterations: z33.array(StreamIterationDataSchema).optional()
|
|
3198
|
+
}).passthrough();
|
|
3199
|
+
var StreamListResponseSchema = z33.object({ pagination: RedTeamPaginationSchema, data: z33.array(StreamDetailResponseSchema) }).passthrough();
|
|
3200
|
+
var CustomAttackOutputSchema = z33.object({
|
|
3201
|
+
uuid: z33.string(),
|
|
3202
|
+
tsg_id: z33.string(),
|
|
3203
|
+
custom_attack_id: z33.string(),
|
|
3204
|
+
job_id: z33.string(),
|
|
3205
|
+
target_id: z33.string(),
|
|
3206
|
+
output: z33.string(),
|
|
3207
|
+
threat: z33.boolean().nullable().optional(),
|
|
3208
|
+
marked_safe: z33.boolean().nullable().optional()
|
|
3209
|
+
}).passthrough();
|
|
3210
|
+
var PropertyAssignmentSchema = z33.object({
|
|
3211
|
+
name: z33.string(),
|
|
3212
|
+
value: z33.string()
|
|
3213
|
+
}).passthrough();
|
|
3214
|
+
var PropertyValueStatisticSchema = z33.object({
|
|
3215
|
+
value: z33.string(),
|
|
3216
|
+
successful_attack_count: z33.number().int(),
|
|
3217
|
+
total_attack_count: z33.number().int(),
|
|
3218
|
+
success_rate: z33.number()
|
|
3219
|
+
}).passthrough();
|
|
3220
|
+
var PropertyStatisticSchema = z33.object({
|
|
3221
|
+
property_name: z33.string(),
|
|
3222
|
+
values: z33.array(PropertyValueStatisticSchema)
|
|
3223
|
+
}).passthrough();
|
|
3224
|
+
var PromptSetSummarySchema = z33.object({
|
|
3225
|
+
prompt_set_id: z33.string(),
|
|
3226
|
+
prompt_set_name: z33.string(),
|
|
3227
|
+
total_prompts: z33.number().int(),
|
|
3228
|
+
total_attacks: z33.number().int(),
|
|
3229
|
+
total_threats: z33.number().int(),
|
|
3230
|
+
failed_attacks: z33.number().int(),
|
|
3231
|
+
threat_rate: z33.number(),
|
|
3232
|
+
property_names: z33.array(z33.string()).optional(),
|
|
3233
|
+
property_statistics: z33.array(PropertyStatisticSchema).optional()
|
|
3234
|
+
}).passthrough();
|
|
3235
|
+
var CustomAttackReportResponseSchema = z33.object({
|
|
3236
|
+
total_prompts: z33.number().int(),
|
|
3237
|
+
total_attacks: z33.number().int(),
|
|
3238
|
+
total_threats: z33.number().int(),
|
|
3239
|
+
failed_attacks: z33.number().int(),
|
|
3240
|
+
score: z33.number(),
|
|
3241
|
+
asr: z33.number(),
|
|
3242
|
+
custom_attack_reports: z33.array(PromptSetSummarySchema).optional(),
|
|
3243
|
+
property_statistics: z33.array(PropertyStatisticSchema).optional()
|
|
3244
|
+
}).passthrough();
|
|
3245
|
+
var PromptSetsReportResponseSchema = z33.object({
|
|
3246
|
+
prompt_sets: z33.array(PromptSetSummarySchema),
|
|
3247
|
+
total_prompt_sets: z33.number().int(),
|
|
3248
|
+
applied_filters: z33.record(z33.unknown()).optional()
|
|
3249
|
+
}).passthrough();
|
|
3250
|
+
var PromptDetailResponseSchema = z33.object({
|
|
3251
|
+
prompt_id: z33.string(),
|
|
3252
|
+
prompt_text: z33.string(),
|
|
3253
|
+
goal: z33.string().nullable().optional(),
|
|
3254
|
+
user_defined_goal: z33.boolean().optional(),
|
|
3255
|
+
properties: z33.array(PropertyAssignmentSchema).optional(),
|
|
3256
|
+
attack_id: z33.string().nullable().optional(),
|
|
3257
|
+
threat: z33.boolean().nullable().optional(),
|
|
3258
|
+
attack_outputs: z33.array(CustomAttackOutputSchema).optional(),
|
|
3259
|
+
asr: z33.number().nullable().optional(),
|
|
3260
|
+
prompt_set_id: z33.string().nullable().optional(),
|
|
3261
|
+
prompt_set_name: z33.string().nullable().optional()
|
|
3262
|
+
}).passthrough();
|
|
3263
|
+
var CustomAttacksListResponseSchema = z33.object({
|
|
3213
3264
|
pagination: RedTeamPaginationSchema,
|
|
3214
|
-
data:
|
|
3215
|
-
total_attacks:
|
|
3216
|
-
total_threats:
|
|
3217
|
-
}).passthrough();
|
|
3218
|
-
var RiskLevelSchema =
|
|
3219
|
-
risk_rating:
|
|
3220
|
-
total:
|
|
3221
|
-
targets_by_type:
|
|
3222
|
-
}).passthrough();
|
|
3223
|
-
var ScanStatisticsResponseSchema =
|
|
3224
|
-
total_scans:
|
|
3225
|
-
targets_scanned:
|
|
3226
|
-
targets_scanned_by_type:
|
|
3227
|
-
scan_status:
|
|
3228
|
-
risk_profile:
|
|
3229
|
-
}).passthrough();
|
|
3230
|
-
var ScoreTrendSeriesSchema =
|
|
3231
|
-
label:
|
|
3232
|
-
data:
|
|
3233
|
-
}).passthrough();
|
|
3234
|
-
var ScoreTrendResponseSchema =
|
|
3235
|
-
labels:
|
|
3236
|
-
series:
|
|
3237
|
-
}).passthrough();
|
|
3238
|
-
var SentimentRequestSchema =
|
|
3239
|
-
job_id:
|
|
3240
|
-
up_vote:
|
|
3241
|
-
down_vote:
|
|
3242
|
-
}).passthrough();
|
|
3243
|
-
var SentimentResponseSchema =
|
|
3244
|
-
job_id:
|
|
3245
|
-
up_vote:
|
|
3246
|
-
down_vote:
|
|
3247
|
-
}).passthrough();
|
|
3248
|
-
var QuotaDetailsSchema =
|
|
3249
|
-
allocated:
|
|
3250
|
-
unlimited:
|
|
3251
|
-
consumed:
|
|
3252
|
-
}).passthrough();
|
|
3253
|
-
var QuotaSummarySchema =
|
|
3265
|
+
data: z33.array(z33.unknown()),
|
|
3266
|
+
total_attacks: z33.number().int(),
|
|
3267
|
+
total_threats: z33.number().int()
|
|
3268
|
+
}).passthrough();
|
|
3269
|
+
var RiskLevelSchema = z33.object({
|
|
3270
|
+
risk_rating: z33.string(),
|
|
3271
|
+
total: z33.number().int(),
|
|
3272
|
+
targets_by_type: z33.array(CountByNameSchema).optional()
|
|
3273
|
+
}).passthrough();
|
|
3274
|
+
var ScanStatisticsResponseSchema = z33.object({
|
|
3275
|
+
total_scans: z33.number().int(),
|
|
3276
|
+
targets_scanned: z33.number().int(),
|
|
3277
|
+
targets_scanned_by_type: z33.array(CountByNameSchema).optional(),
|
|
3278
|
+
scan_status: z33.array(CountByNameSchema).optional(),
|
|
3279
|
+
risk_profile: z33.array(RiskLevelSchema).optional()
|
|
3280
|
+
}).passthrough();
|
|
3281
|
+
var ScoreTrendSeriesSchema = z33.object({
|
|
3282
|
+
label: z33.string(),
|
|
3283
|
+
data: z33.array(z33.number().nullable())
|
|
3284
|
+
}).passthrough();
|
|
3285
|
+
var ScoreTrendResponseSchema = z33.object({
|
|
3286
|
+
labels: z33.array(z33.string()),
|
|
3287
|
+
series: z33.array(ScoreTrendSeriesSchema)
|
|
3288
|
+
}).passthrough();
|
|
3289
|
+
var SentimentRequestSchema = z33.object({
|
|
3290
|
+
job_id: z33.string(),
|
|
3291
|
+
up_vote: z33.boolean().optional(),
|
|
3292
|
+
down_vote: z33.boolean().optional()
|
|
3293
|
+
}).passthrough();
|
|
3294
|
+
var SentimentResponseSchema = z33.object({
|
|
3295
|
+
job_id: z33.string(),
|
|
3296
|
+
up_vote: z33.boolean().optional(),
|
|
3297
|
+
down_vote: z33.boolean().optional()
|
|
3298
|
+
}).passthrough();
|
|
3299
|
+
var QuotaDetailsSchema = z33.object({
|
|
3300
|
+
allocated: z33.number().int(),
|
|
3301
|
+
unlimited: z33.boolean(),
|
|
3302
|
+
consumed: z33.number().int()
|
|
3303
|
+
}).passthrough();
|
|
3304
|
+
var QuotaSummarySchema = z33.object({
|
|
3254
3305
|
static: QuotaDetailsSchema,
|
|
3255
3306
|
dynamic: QuotaDetailsSchema,
|
|
3256
3307
|
custom: QuotaDetailsSchema
|
|
3257
3308
|
}).passthrough();
|
|
3258
|
-
var ErrorLogSchema =
|
|
3259
|
-
created_at:
|
|
3260
|
-
updated_at:
|
|
3261
|
-
job_id:
|
|
3262
|
-
target_id:
|
|
3263
|
-
target_version:
|
|
3264
|
-
attack_id:
|
|
3265
|
-
error_type:
|
|
3266
|
-
error_source:
|
|
3267
|
-
error_message:
|
|
3268
|
-
target_object:
|
|
3269
|
-
extra_info:
|
|
3270
|
-
version:
|
|
3271
|
-
}).passthrough();
|
|
3272
|
-
var ErrorLogListResponseSchema =
|
|
3309
|
+
var ErrorLogSchema = z33.object({
|
|
3310
|
+
created_at: z33.string(),
|
|
3311
|
+
updated_at: z33.string(),
|
|
3312
|
+
job_id: z33.string().nullable().optional(),
|
|
3313
|
+
target_id: z33.string().nullable().optional(),
|
|
3314
|
+
target_version: z33.number().int().nullable().optional(),
|
|
3315
|
+
attack_id: z33.string().nullable().optional(),
|
|
3316
|
+
error_type: z33.string().nullable().optional(),
|
|
3317
|
+
error_source: z33.string().nullable().optional(),
|
|
3318
|
+
error_message: z33.string().nullable().optional(),
|
|
3319
|
+
target_object: z33.record(z33.unknown()).nullable().optional(),
|
|
3320
|
+
extra_info: z33.record(z33.unknown()).nullable().optional(),
|
|
3321
|
+
version: z33.number().int().optional()
|
|
3322
|
+
}).passthrough();
|
|
3323
|
+
var ErrorLogListResponseSchema = z33.object({ pagination: RedTeamPaginationSchema, data: z33.array(ErrorLogSchema) }).passthrough();
|
|
3273
3324
|
var TargetRequestBaseFields = {
|
|
3274
|
-
name:
|
|
3275
|
-
description:
|
|
3276
|
-
target_type:
|
|
3277
|
-
connection_type:
|
|
3278
|
-
api_endpoint_type:
|
|
3279
|
-
response_mode:
|
|
3280
|
-
connection_params:
|
|
3281
|
-
session_supported:
|
|
3325
|
+
name: z33.string(),
|
|
3326
|
+
description: z33.string().nullable().optional(),
|
|
3327
|
+
target_type: z33.string().nullable().optional(),
|
|
3328
|
+
connection_type: z33.string().nullable().optional(),
|
|
3329
|
+
api_endpoint_type: z33.string().nullable().optional(),
|
|
3330
|
+
response_mode: z33.string().nullable().optional(),
|
|
3331
|
+
connection_params: z33.union([RestConnectionParamsSchema, StreamingConnectionParamsSchema]).nullable().optional(),
|
|
3332
|
+
session_supported: z33.boolean().optional(),
|
|
3282
3333
|
target_metadata: TargetMetadataSchema.optional(),
|
|
3283
3334
|
target_background: TargetBackgroundSchema.nullable().optional(),
|
|
3284
3335
|
additional_context: TargetAdditionalContextSchema.nullable().optional(),
|
|
3285
|
-
extra_info:
|
|
3286
|
-
network_broker_channel_uuid:
|
|
3336
|
+
extra_info: z33.record(z33.unknown()).nullable().optional(),
|
|
3337
|
+
network_broker_channel_uuid: z33.string().nullable().optional()
|
|
3287
3338
|
};
|
|
3288
|
-
var TargetCreateRequestSchema =
|
|
3289
|
-
var TargetUpdateRequestSchema =
|
|
3290
|
-
var TargetContextUpdateSchema =
|
|
3339
|
+
var TargetCreateRequestSchema = z33.object(TargetRequestBaseFields).strict();
|
|
3340
|
+
var TargetUpdateRequestSchema = z33.object(TargetRequestBaseFields).strict();
|
|
3341
|
+
var TargetContextUpdateSchema = z33.object({
|
|
3291
3342
|
target_background: TargetBackgroundSchema.nullable().optional(),
|
|
3292
3343
|
additional_context: TargetAdditionalContextSchema.nullable().optional()
|
|
3293
3344
|
}).passthrough();
|
|
3294
|
-
var TargetResponseSchema =
|
|
3295
|
-
uuid:
|
|
3296
|
-
tsg_id:
|
|
3297
|
-
name:
|
|
3298
|
-
status:
|
|
3299
|
-
active:
|
|
3300
|
-
validated:
|
|
3301
|
-
created_at:
|
|
3302
|
-
updated_at:
|
|
3303
|
-
description:
|
|
3304
|
-
target_type:
|
|
3305
|
-
connection_type:
|
|
3306
|
-
api_endpoint_type:
|
|
3307
|
-
response_mode:
|
|
3308
|
-
session_supported:
|
|
3309
|
-
extra_info:
|
|
3310
|
-
version:
|
|
3311
|
-
secret_version:
|
|
3312
|
-
created_by_user_id:
|
|
3313
|
-
updated_by_user_id:
|
|
3314
|
-
target_metadata:
|
|
3315
|
-
target_background:
|
|
3316
|
-
profiling_status:
|
|
3317
|
-
additional_context:
|
|
3318
|
-
auth_type:
|
|
3319
|
-
}).passthrough();
|
|
3320
|
-
var TargetListItemSchema =
|
|
3321
|
-
uuid:
|
|
3322
|
-
tsg_id:
|
|
3323
|
-
name:
|
|
3324
|
-
status:
|
|
3325
|
-
active:
|
|
3326
|
-
validated:
|
|
3327
|
-
created_at:
|
|
3328
|
-
updated_at:
|
|
3329
|
-
description:
|
|
3330
|
-
target_type:
|
|
3331
|
-
connection_type:
|
|
3332
|
-
api_endpoint_type:
|
|
3333
|
-
response_mode:
|
|
3334
|
-
session_supported:
|
|
3335
|
-
extra_info:
|
|
3336
|
-
version:
|
|
3337
|
-
secret_version:
|
|
3338
|
-
created_by_user_id:
|
|
3339
|
-
updated_by_user_id:
|
|
3340
|
-
auth_type:
|
|
3341
|
-
}).passthrough();
|
|
3342
|
-
var TargetListSchema =
|
|
3343
|
-
var TargetProbeRequestSchema =
|
|
3345
|
+
var TargetResponseSchema = z33.object({
|
|
3346
|
+
uuid: z33.string(),
|
|
3347
|
+
tsg_id: z33.string(),
|
|
3348
|
+
name: z33.string(),
|
|
3349
|
+
status: z33.unknown(),
|
|
3350
|
+
active: z33.boolean(),
|
|
3351
|
+
validated: z33.boolean(),
|
|
3352
|
+
created_at: z33.string(),
|
|
3353
|
+
updated_at: z33.string(),
|
|
3354
|
+
description: z33.unknown().optional(),
|
|
3355
|
+
target_type: z33.unknown().optional(),
|
|
3356
|
+
connection_type: z33.unknown().optional(),
|
|
3357
|
+
api_endpoint_type: z33.unknown().optional(),
|
|
3358
|
+
response_mode: z33.unknown().optional(),
|
|
3359
|
+
session_supported: z33.boolean().optional(),
|
|
3360
|
+
extra_info: z33.unknown().optional(),
|
|
3361
|
+
version: z33.unknown().optional(),
|
|
3362
|
+
secret_version: z33.unknown().optional(),
|
|
3363
|
+
created_by_user_id: z33.unknown().optional(),
|
|
3364
|
+
updated_by_user_id: z33.unknown().optional(),
|
|
3365
|
+
target_metadata: z33.unknown().optional(),
|
|
3366
|
+
target_background: z33.unknown().optional(),
|
|
3367
|
+
profiling_status: z33.unknown().optional(),
|
|
3368
|
+
additional_context: z33.unknown().optional(),
|
|
3369
|
+
auth_type: z33.string().nullable().optional()
|
|
3370
|
+
}).passthrough();
|
|
3371
|
+
var TargetListItemSchema = z33.object({
|
|
3372
|
+
uuid: z33.string(),
|
|
3373
|
+
tsg_id: z33.string(),
|
|
3374
|
+
name: z33.string(),
|
|
3375
|
+
status: z33.unknown(),
|
|
3376
|
+
active: z33.boolean(),
|
|
3377
|
+
validated: z33.boolean(),
|
|
3378
|
+
created_at: z33.string(),
|
|
3379
|
+
updated_at: z33.string(),
|
|
3380
|
+
description: z33.unknown().optional(),
|
|
3381
|
+
target_type: z33.unknown().optional(),
|
|
3382
|
+
connection_type: z33.unknown().optional(),
|
|
3383
|
+
api_endpoint_type: z33.unknown().optional(),
|
|
3384
|
+
response_mode: z33.unknown().optional(),
|
|
3385
|
+
session_supported: z33.boolean().optional(),
|
|
3386
|
+
extra_info: z33.unknown().optional(),
|
|
3387
|
+
version: z33.unknown().optional(),
|
|
3388
|
+
secret_version: z33.unknown().optional(),
|
|
3389
|
+
created_by_user_id: z33.unknown().optional(),
|
|
3390
|
+
updated_by_user_id: z33.unknown().optional(),
|
|
3391
|
+
auth_type: z33.string().nullable().optional()
|
|
3392
|
+
}).passthrough();
|
|
3393
|
+
var TargetListSchema = z33.object({ pagination: RedTeamPaginationSchema, data: z33.array(TargetListItemSchema).optional() }).passthrough();
|
|
3394
|
+
var TargetProbeRequestSchema = z33.object({
|
|
3344
3395
|
...TargetRequestBaseFields,
|
|
3345
|
-
uuid:
|
|
3346
|
-
probe_fields:
|
|
3396
|
+
uuid: z33.string().nullable().optional(),
|
|
3397
|
+
probe_fields: z33.array(z33.string()).nullable().optional()
|
|
3347
3398
|
}).strict();
|
|
3348
|
-
var TargetAuthValidationRequestSchema =
|
|
3349
|
-
auth_type:
|
|
3350
|
-
auth_config:
|
|
3351
|
-
target_id:
|
|
3352
|
-
network_broker_channel_uuid:
|
|
3353
|
-
}).passthrough();
|
|
3354
|
-
var TargetAuthValidationResponseSchema =
|
|
3355
|
-
validated:
|
|
3356
|
-
token_preview:
|
|
3357
|
-
expires_in:
|
|
3358
|
-
}).passthrough();
|
|
3359
|
-
var TargetProfileResponseSchema =
|
|
3360
|
-
target_id:
|
|
3361
|
-
target_version:
|
|
3362
|
-
status:
|
|
3363
|
-
profiling_status:
|
|
3364
|
-
target_background:
|
|
3365
|
-
additional_context:
|
|
3366
|
-
ai_generated_fields:
|
|
3367
|
-
other_details:
|
|
3368
|
-
}).passthrough();
|
|
3369
|
-
var TargetTemplateCollectionSchema =
|
|
3370
|
-
OPENAI:
|
|
3371
|
-
HUGGING_FACE:
|
|
3372
|
-
DATABRICKS:
|
|
3373
|
-
BEDROCK:
|
|
3374
|
-
REST:
|
|
3375
|
-
STREAMING:
|
|
3376
|
-
WEBSOCKET:
|
|
3377
|
-
}).passthrough();
|
|
3378
|
-
var BaseResponseSchema =
|
|
3379
|
-
message:
|
|
3380
|
-
status:
|
|
3381
|
-
}).passthrough();
|
|
3382
|
-
var PromptSetStatsSchema =
|
|
3383
|
-
total_prompts:
|
|
3384
|
-
active_prompts:
|
|
3385
|
-
inactive_prompts:
|
|
3386
|
-
failed_prompts:
|
|
3387
|
-
validation_prompts:
|
|
3388
|
-
}).passthrough();
|
|
3389
|
-
var CustomPromptSetCreateRequestSchema =
|
|
3390
|
-
name:
|
|
3391
|
-
description:
|
|
3392
|
-
property_names:
|
|
3393
|
-
}).passthrough();
|
|
3394
|
-
var CustomPromptSetUpdateRequestSchema =
|
|
3395
|
-
name:
|
|
3396
|
-
description:
|
|
3397
|
-
archive:
|
|
3398
|
-
property_names:
|
|
3399
|
-
}).passthrough();
|
|
3400
|
-
var CustomPromptSetArchiveRequestSchema =
|
|
3401
|
-
var CustomPromptSetResponseSchema =
|
|
3402
|
-
uuid:
|
|
3403
|
-
name:
|
|
3404
|
-
active:
|
|
3405
|
-
archive:
|
|
3406
|
-
status:
|
|
3407
|
-
created_at:
|
|
3408
|
-
updated_at:
|
|
3409
|
-
description:
|
|
3410
|
-
property_names:
|
|
3411
|
-
properties:
|
|
3412
|
-
stats:
|
|
3413
|
-
extra_info:
|
|
3414
|
-
version:
|
|
3415
|
-
created_by_user_id:
|
|
3416
|
-
updated_by_user_id:
|
|
3417
|
-
}).passthrough();
|
|
3418
|
-
var CustomPromptSetListItemSchema =
|
|
3419
|
-
uuid:
|
|
3420
|
-
name:
|
|
3421
|
-
active:
|
|
3422
|
-
archive:
|
|
3423
|
-
status:
|
|
3424
|
-
created_at:
|
|
3425
|
-
updated_at:
|
|
3426
|
-
description:
|
|
3427
|
-
property_names:
|
|
3428
|
-
stats:
|
|
3429
|
-
created_by_user_id:
|
|
3430
|
-
}).passthrough();
|
|
3431
|
-
var CustomPromptSetListSchema =
|
|
3399
|
+
var TargetAuthValidationRequestSchema = z33.object({
|
|
3400
|
+
auth_type: z33.string(),
|
|
3401
|
+
auth_config: z33.unknown(),
|
|
3402
|
+
target_id: z33.string().nullable().optional(),
|
|
3403
|
+
network_broker_channel_uuid: z33.string().nullable().optional()
|
|
3404
|
+
}).passthrough();
|
|
3405
|
+
var TargetAuthValidationResponseSchema = z33.object({
|
|
3406
|
+
validated: z33.boolean(),
|
|
3407
|
+
token_preview: z33.string().nullable().optional(),
|
|
3408
|
+
expires_in: z33.number().int().nullable().optional()
|
|
3409
|
+
}).passthrough();
|
|
3410
|
+
var TargetProfileResponseSchema = z33.object({
|
|
3411
|
+
target_id: z33.string(),
|
|
3412
|
+
target_version: z33.number().int(),
|
|
3413
|
+
status: z33.string(),
|
|
3414
|
+
profiling_status: z33.unknown().optional(),
|
|
3415
|
+
target_background: z33.unknown().optional(),
|
|
3416
|
+
additional_context: z33.unknown().optional(),
|
|
3417
|
+
ai_generated_fields: z33.unknown().optional(),
|
|
3418
|
+
other_details: z33.unknown().optional()
|
|
3419
|
+
}).passthrough();
|
|
3420
|
+
var TargetTemplateCollectionSchema = z33.object({
|
|
3421
|
+
OPENAI: z33.record(z33.unknown()),
|
|
3422
|
+
HUGGING_FACE: z33.record(z33.unknown()),
|
|
3423
|
+
DATABRICKS: z33.record(z33.unknown()),
|
|
3424
|
+
BEDROCK: z33.record(z33.unknown()),
|
|
3425
|
+
REST: z33.record(z33.unknown()),
|
|
3426
|
+
STREAMING: z33.record(z33.unknown()),
|
|
3427
|
+
WEBSOCKET: z33.record(z33.unknown())
|
|
3428
|
+
}).passthrough();
|
|
3429
|
+
var BaseResponseSchema = z33.object({
|
|
3430
|
+
message: z33.string(),
|
|
3431
|
+
status: z33.number().int()
|
|
3432
|
+
}).passthrough();
|
|
3433
|
+
var PromptSetStatsSchema = z33.object({
|
|
3434
|
+
total_prompts: z33.number().int(),
|
|
3435
|
+
active_prompts: z33.number().int(),
|
|
3436
|
+
inactive_prompts: z33.number().int(),
|
|
3437
|
+
failed_prompts: z33.number().int().optional(),
|
|
3438
|
+
validation_prompts: z33.number().int().optional()
|
|
3439
|
+
}).passthrough();
|
|
3440
|
+
var CustomPromptSetCreateRequestSchema = z33.object({
|
|
3441
|
+
name: z33.string(),
|
|
3442
|
+
description: z33.unknown().optional(),
|
|
3443
|
+
property_names: z33.array(z33.string()).optional()
|
|
3444
|
+
}).passthrough();
|
|
3445
|
+
var CustomPromptSetUpdateRequestSchema = z33.object({
|
|
3446
|
+
name: z33.unknown().optional(),
|
|
3447
|
+
description: z33.unknown().optional(),
|
|
3448
|
+
archive: z33.unknown().optional(),
|
|
3449
|
+
property_names: z33.unknown().optional()
|
|
3450
|
+
}).passthrough();
|
|
3451
|
+
var CustomPromptSetArchiveRequestSchema = z33.object({ archive: z33.boolean() }).passthrough();
|
|
3452
|
+
var CustomPromptSetResponseSchema = z33.object({
|
|
3453
|
+
uuid: z33.string(),
|
|
3454
|
+
name: z33.string(),
|
|
3455
|
+
active: z33.boolean(),
|
|
3456
|
+
archive: z33.boolean(),
|
|
3457
|
+
status: z33.string(),
|
|
3458
|
+
created_at: z33.string(),
|
|
3459
|
+
updated_at: z33.string(),
|
|
3460
|
+
description: z33.unknown().optional(),
|
|
3461
|
+
property_names: z33.array(z33.string()).optional(),
|
|
3462
|
+
properties: z33.array(z33.unknown()).optional(),
|
|
3463
|
+
stats: z33.unknown().optional(),
|
|
3464
|
+
extra_info: z33.unknown().optional(),
|
|
3465
|
+
version: z33.unknown().optional(),
|
|
3466
|
+
created_by_user_id: z33.unknown().optional(),
|
|
3467
|
+
updated_by_user_id: z33.unknown().optional()
|
|
3468
|
+
}).passthrough();
|
|
3469
|
+
var CustomPromptSetListItemSchema = z33.object({
|
|
3470
|
+
uuid: z33.string(),
|
|
3471
|
+
name: z33.string(),
|
|
3472
|
+
active: z33.boolean(),
|
|
3473
|
+
archive: z33.boolean(),
|
|
3474
|
+
status: z33.string(),
|
|
3475
|
+
created_at: z33.string(),
|
|
3476
|
+
updated_at: z33.string(),
|
|
3477
|
+
description: z33.unknown().optional(),
|
|
3478
|
+
property_names: z33.array(z33.string()).optional(),
|
|
3479
|
+
stats: z33.unknown().optional(),
|
|
3480
|
+
created_by_user_id: z33.unknown().optional()
|
|
3481
|
+
}).passthrough();
|
|
3482
|
+
var CustomPromptSetListSchema = z33.object({
|
|
3432
3483
|
pagination: RedTeamPaginationSchema,
|
|
3433
|
-
data:
|
|
3434
|
-
}).passthrough();
|
|
3435
|
-
var CustomPromptSetReferenceSchema =
|
|
3436
|
-
uuid:
|
|
3437
|
-
name:
|
|
3438
|
-
status:
|
|
3439
|
-
active:
|
|
3440
|
-
tsg_id:
|
|
3441
|
-
created_at:
|
|
3442
|
-
updated_at:
|
|
3443
|
-
version:
|
|
3444
|
-
}).passthrough();
|
|
3445
|
-
var CustomPromptSetListActiveSchema =
|
|
3446
|
-
var CustomPromptSetVersionInfoSchema =
|
|
3447
|
-
uuid:
|
|
3448
|
-
status:
|
|
3449
|
-
is_latest:
|
|
3450
|
-
version:
|
|
3484
|
+
data: z33.array(CustomPromptSetListItemSchema).optional()
|
|
3485
|
+
}).passthrough();
|
|
3486
|
+
var CustomPromptSetReferenceSchema = z33.object({
|
|
3487
|
+
uuid: z33.string(),
|
|
3488
|
+
name: z33.string(),
|
|
3489
|
+
status: z33.string(),
|
|
3490
|
+
active: z33.boolean(),
|
|
3491
|
+
tsg_id: z33.string(),
|
|
3492
|
+
created_at: z33.string(),
|
|
3493
|
+
updated_at: z33.string(),
|
|
3494
|
+
version: z33.unknown().optional()
|
|
3495
|
+
}).passthrough();
|
|
3496
|
+
var CustomPromptSetListActiveSchema = z33.object({ data: z33.array(CustomPromptSetReferenceSchema).optional() }).passthrough();
|
|
3497
|
+
var CustomPromptSetVersionInfoSchema = z33.object({
|
|
3498
|
+
uuid: z33.string(),
|
|
3499
|
+
status: z33.string(),
|
|
3500
|
+
is_latest: z33.boolean(),
|
|
3501
|
+
version: z33.string().nullable().optional(),
|
|
3451
3502
|
stats: PromptSetStatsSchema.nullable().optional(),
|
|
3452
|
-
snapshot_created_at:
|
|
3453
|
-
}).passthrough();
|
|
3454
|
-
var CustomPromptCreateRequestSchema =
|
|
3455
|
-
prompt:
|
|
3456
|
-
prompt_set_id:
|
|
3457
|
-
goal:
|
|
3458
|
-
properties:
|
|
3459
|
-
}).passthrough();
|
|
3460
|
-
var CustomPromptUpdateRequestSchema =
|
|
3461
|
-
prompt:
|
|
3462
|
-
goal:
|
|
3463
|
-
properties:
|
|
3464
|
-
}).passthrough();
|
|
3465
|
-
var CustomPromptResponseSchema =
|
|
3466
|
-
uuid:
|
|
3467
|
-
prompt:
|
|
3468
|
-
user_defined_goal:
|
|
3469
|
-
status:
|
|
3470
|
-
active:
|
|
3471
|
-
prompt_set_id:
|
|
3472
|
-
created_at:
|
|
3473
|
-
updated_at:
|
|
3474
|
-
goal:
|
|
3475
|
-
properties:
|
|
3476
|
-
property_assignments:
|
|
3477
|
-
detector_category:
|
|
3478
|
-
severity:
|
|
3479
|
-
extra_info:
|
|
3480
|
-
}).passthrough();
|
|
3481
|
-
var CustomPromptListItemSchema =
|
|
3482
|
-
uuid:
|
|
3483
|
-
prompt:
|
|
3484
|
-
user_defined_goal:
|
|
3485
|
-
status:
|
|
3486
|
-
active:
|
|
3487
|
-
created_at:
|
|
3488
|
-
updated_at:
|
|
3489
|
-
goal:
|
|
3490
|
-
properties:
|
|
3491
|
-
}).passthrough();
|
|
3492
|
-
var CustomPromptListSchema =
|
|
3503
|
+
snapshot_created_at: z33.string().nullable().optional()
|
|
3504
|
+
}).passthrough();
|
|
3505
|
+
var CustomPromptCreateRequestSchema = z33.object({
|
|
3506
|
+
prompt: z33.string(),
|
|
3507
|
+
prompt_set_id: z33.string(),
|
|
3508
|
+
goal: z33.unknown().optional(),
|
|
3509
|
+
properties: z33.unknown().optional()
|
|
3510
|
+
}).passthrough();
|
|
3511
|
+
var CustomPromptUpdateRequestSchema = z33.object({
|
|
3512
|
+
prompt: z33.unknown().optional(),
|
|
3513
|
+
goal: z33.unknown().optional(),
|
|
3514
|
+
properties: z33.unknown().optional()
|
|
3515
|
+
}).passthrough();
|
|
3516
|
+
var CustomPromptResponseSchema = z33.object({
|
|
3517
|
+
uuid: z33.string(),
|
|
3518
|
+
prompt: z33.string(),
|
|
3519
|
+
user_defined_goal: z33.boolean(),
|
|
3520
|
+
status: z33.string(),
|
|
3521
|
+
active: z33.boolean(),
|
|
3522
|
+
prompt_set_id: z33.string(),
|
|
3523
|
+
created_at: z33.string(),
|
|
3524
|
+
updated_at: z33.string(),
|
|
3525
|
+
goal: z33.unknown().optional(),
|
|
3526
|
+
properties: z33.unknown().optional(),
|
|
3527
|
+
property_assignments: z33.array(z33.unknown()).optional(),
|
|
3528
|
+
detector_category: z33.unknown().optional(),
|
|
3529
|
+
severity: z33.unknown().optional(),
|
|
3530
|
+
extra_info: z33.unknown().optional()
|
|
3531
|
+
}).passthrough();
|
|
3532
|
+
var CustomPromptListItemSchema = z33.object({
|
|
3533
|
+
uuid: z33.string(),
|
|
3534
|
+
prompt: z33.string(),
|
|
3535
|
+
user_defined_goal: z33.boolean(),
|
|
3536
|
+
status: z33.string(),
|
|
3537
|
+
active: z33.boolean(),
|
|
3538
|
+
created_at: z33.string(),
|
|
3539
|
+
updated_at: z33.string(),
|
|
3540
|
+
goal: z33.unknown().optional(),
|
|
3541
|
+
properties: z33.unknown().optional()
|
|
3542
|
+
}).passthrough();
|
|
3543
|
+
var CustomPromptListSchema = z33.object({
|
|
3493
3544
|
pagination: RedTeamPaginationSchema,
|
|
3494
|
-
data:
|
|
3495
|
-
}).passthrough();
|
|
3496
|
-
var PropertyNameCreateRequestSchema =
|
|
3497
|
-
var PropertyValueCreateRequestSchema =
|
|
3498
|
-
property_name:
|
|
3499
|
-
property_value:
|
|
3500
|
-
}).passthrough();
|
|
3501
|
-
var PropertyDefinitionSchema =
|
|
3502
|
-
property_name:
|
|
3503
|
-
created_at:
|
|
3504
|
-
}).passthrough();
|
|
3505
|
-
var PropertyNamesListResponseSchema =
|
|
3506
|
-
var PropertyValuesResponseSchema =
|
|
3507
|
-
name:
|
|
3508
|
-
values:
|
|
3509
|
-
}).passthrough();
|
|
3510
|
-
var PropertyValuesMultipleResponseSchema =
|
|
3511
|
-
var DashboardOverviewResponseSchema =
|
|
3512
|
-
total_targets:
|
|
3513
|
-
targets_by_type:
|
|
3514
|
-
}).passthrough();
|
|
3515
|
-
var EulaAcceptRequestSchema =
|
|
3516
|
-
eula_content:
|
|
3517
|
-
accepted_at:
|
|
3518
|
-
}).passthrough();
|
|
3519
|
-
var EulaContentResponseSchema =
|
|
3520
|
-
content:
|
|
3521
|
-
}).passthrough();
|
|
3522
|
-
var EulaResponseSchema =
|
|
3523
|
-
uuid:
|
|
3524
|
-
is_accepted:
|
|
3525
|
-
accepted_at:
|
|
3526
|
-
accepted_by_user_id:
|
|
3527
|
-
}).passthrough();
|
|
3528
|
-
var DeviceInstanceSchema =
|
|
3529
|
-
app_id:
|
|
3530
|
-
region:
|
|
3531
|
-
tenant_id:
|
|
3532
|
-
tsg_id:
|
|
3533
|
-
}).passthrough();
|
|
3534
|
-
var DeviceLicenseSchema =
|
|
3535
|
-
authorizationCode:
|
|
3536
|
-
expirationDate:
|
|
3537
|
-
licensePanDbIdentification:
|
|
3538
|
-
partNumber:
|
|
3539
|
-
serialNumber:
|
|
3540
|
-
subtypeName:
|
|
3541
|
-
registrationDate:
|
|
3542
|
-
}).passthrough();
|
|
3543
|
-
var DeviceSchema =
|
|
3544
|
-
serial_number:
|
|
3545
|
-
model:
|
|
3546
|
-
sku:
|
|
3547
|
-
device_type:
|
|
3548
|
-
device_name:
|
|
3549
|
-
tsg_id:
|
|
3550
|
-
support_account_id:
|
|
3551
|
-
asset_type:
|
|
3552
|
-
licenses:
|
|
3553
|
-
}).passthrough();
|
|
3554
|
-
var DeviceStatusSchema =
|
|
3555
|
-
status:
|
|
3556
|
-
error:
|
|
3557
|
-
serial_number:
|
|
3558
|
-
}).passthrough();
|
|
3559
|
-
var DeviceRequestSchema =
|
|
3545
|
+
data: z33.array(CustomPromptListItemSchema).optional()
|
|
3546
|
+
}).passthrough();
|
|
3547
|
+
var PropertyNameCreateRequestSchema = z33.object({ name: z33.string() }).passthrough();
|
|
3548
|
+
var PropertyValueCreateRequestSchema = z33.object({
|
|
3549
|
+
property_name: z33.string(),
|
|
3550
|
+
property_value: z33.string()
|
|
3551
|
+
}).passthrough();
|
|
3552
|
+
var PropertyDefinitionSchema = z33.object({
|
|
3553
|
+
property_name: z33.string(),
|
|
3554
|
+
created_at: z33.string()
|
|
3555
|
+
}).passthrough();
|
|
3556
|
+
var PropertyNamesListResponseSchema = z33.object({ data: z33.array(z33.string()).optional() }).passthrough();
|
|
3557
|
+
var PropertyValuesResponseSchema = z33.object({
|
|
3558
|
+
name: z33.string(),
|
|
3559
|
+
values: z33.array(z33.string()).optional()
|
|
3560
|
+
}).passthrough();
|
|
3561
|
+
var PropertyValuesMultipleResponseSchema = z33.object({ data: z33.record(z33.array(z33.string())).optional() }).passthrough();
|
|
3562
|
+
var DashboardOverviewResponseSchema = z33.object({
|
|
3563
|
+
total_targets: z33.number().int(),
|
|
3564
|
+
targets_by_type: z33.array(CountByNameSchema).optional()
|
|
3565
|
+
}).passthrough();
|
|
3566
|
+
var EulaAcceptRequestSchema = z33.object({
|
|
3567
|
+
eula_content: z33.string(),
|
|
3568
|
+
accepted_at: z33.string().nullable().optional()
|
|
3569
|
+
}).passthrough();
|
|
3570
|
+
var EulaContentResponseSchema = z33.object({
|
|
3571
|
+
content: z33.string()
|
|
3572
|
+
}).passthrough();
|
|
3573
|
+
var EulaResponseSchema = z33.object({
|
|
3574
|
+
uuid: z33.string().nullable().optional(),
|
|
3575
|
+
is_accepted: z33.boolean(),
|
|
3576
|
+
accepted_at: z33.string().nullable().optional(),
|
|
3577
|
+
accepted_by_user_id: z33.string().nullable().optional()
|
|
3578
|
+
}).passthrough();
|
|
3579
|
+
var DeviceInstanceSchema = z33.object({
|
|
3580
|
+
app_id: z33.string(),
|
|
3581
|
+
region: z33.string(),
|
|
3582
|
+
tenant_id: z33.string(),
|
|
3583
|
+
tsg_id: z33.string()
|
|
3584
|
+
}).passthrough();
|
|
3585
|
+
var DeviceLicenseSchema = z33.object({
|
|
3586
|
+
authorizationCode: z33.string().optional(),
|
|
3587
|
+
expirationDate: z33.string().optional(),
|
|
3588
|
+
licensePanDbIdentification: z33.string().optional(),
|
|
3589
|
+
partNumber: z33.string().optional(),
|
|
3590
|
+
serialNumber: z33.string().optional(),
|
|
3591
|
+
subtypeName: z33.string().optional(),
|
|
3592
|
+
registrationDate: z33.string().optional()
|
|
3593
|
+
}).passthrough();
|
|
3594
|
+
var DeviceSchema = z33.object({
|
|
3595
|
+
serial_number: z33.string(),
|
|
3596
|
+
model: z33.string().optional(),
|
|
3597
|
+
sku: z33.string().optional(),
|
|
3598
|
+
device_type: z33.string().optional(),
|
|
3599
|
+
device_name: z33.string().optional(),
|
|
3600
|
+
tsg_id: z33.string().optional(),
|
|
3601
|
+
support_account_id: z33.string().optional(),
|
|
3602
|
+
asset_type: z33.string().optional(),
|
|
3603
|
+
licenses: z33.array(DeviceLicenseSchema).optional()
|
|
3604
|
+
}).passthrough();
|
|
3605
|
+
var DeviceStatusSchema = z33.object({
|
|
3606
|
+
status: z33.string(),
|
|
3607
|
+
error: z33.string().optional(),
|
|
3608
|
+
serial_number: z33.string().optional()
|
|
3609
|
+
}).passthrough();
|
|
3610
|
+
var DeviceRequestSchema = z33.object({
|
|
3560
3611
|
instance: DeviceInstanceSchema,
|
|
3561
|
-
created_by:
|
|
3562
|
-
devices:
|
|
3563
|
-
}).passthrough();
|
|
3564
|
-
var DeviceResponseSchema =
|
|
3565
|
-
devices:
|
|
3566
|
-
status:
|
|
3567
|
-
}).passthrough();
|
|
3568
|
-
var DeploymentProfileAttributeSchema =
|
|
3569
|
-
quantity:
|
|
3570
|
-
unit_of_measure:
|
|
3571
|
-
}).passthrough();
|
|
3572
|
-
var DeploymentProfileRequestSchema =
|
|
3573
|
-
dAuthCode:
|
|
3574
|
-
deploymentProfileId:
|
|
3575
|
-
license_expiration:
|
|
3576
|
-
profileName:
|
|
3577
|
-
subType:
|
|
3578
|
-
subscriptions:
|
|
3579
|
-
type:
|
|
3580
|
-
aveTextRecord:
|
|
3581
|
-
attributes:
|
|
3582
|
-
}).passthrough();
|
|
3583
|
-
var InstanceExtraDetailsSchema =
|
|
3584
|
-
deployment_profiles:
|
|
3585
|
-
airs_shared_by_tsg:
|
|
3586
|
-
airs_unshared_dps:
|
|
3587
|
-
}).passthrough();
|
|
3588
|
-
var InstanceRequestSchema =
|
|
3589
|
-
tsg_id:
|
|
3590
|
-
tenant_id:
|
|
3591
|
-
app_id:
|
|
3592
|
-
region:
|
|
3593
|
-
support_account_id:
|
|
3594
|
-
support_account_name:
|
|
3595
|
-
created_by:
|
|
3596
|
-
internal:
|
|
3597
|
-
tenant_instance_name:
|
|
3612
|
+
created_by: z33.string().optional(),
|
|
3613
|
+
devices: z33.array(DeviceSchema).optional()
|
|
3614
|
+
}).passthrough();
|
|
3615
|
+
var DeviceResponseSchema = z33.object({
|
|
3616
|
+
devices: z33.array(DeviceStatusSchema).optional(),
|
|
3617
|
+
status: z33.string().optional()
|
|
3618
|
+
}).passthrough();
|
|
3619
|
+
var DeploymentProfileAttributeSchema = z33.object({
|
|
3620
|
+
quantity: z33.number().optional(),
|
|
3621
|
+
unit_of_measure: z33.string().optional()
|
|
3622
|
+
}).passthrough();
|
|
3623
|
+
var DeploymentProfileRequestSchema = z33.object({
|
|
3624
|
+
dAuthCode: z33.string().optional(),
|
|
3625
|
+
deploymentProfileId: z33.string().optional(),
|
|
3626
|
+
license_expiration: z33.string().optional(),
|
|
3627
|
+
profileName: z33.string().optional(),
|
|
3628
|
+
subType: z33.string().optional(),
|
|
3629
|
+
subscriptions: z33.string().optional(),
|
|
3630
|
+
type: z33.string().optional(),
|
|
3631
|
+
aveTextRecord: z33.number().default(0),
|
|
3632
|
+
attributes: z33.array(DeploymentProfileAttributeSchema).optional()
|
|
3633
|
+
}).passthrough();
|
|
3634
|
+
var InstanceExtraDetailsSchema = z33.object({
|
|
3635
|
+
deployment_profiles: z33.array(DeploymentProfileRequestSchema).optional(),
|
|
3636
|
+
airs_shared_by_tsg: z33.string().optional(),
|
|
3637
|
+
airs_unshared_dps: z33.string().optional()
|
|
3638
|
+
}).passthrough();
|
|
3639
|
+
var InstanceRequestSchema = z33.object({
|
|
3640
|
+
tsg_id: z33.string(),
|
|
3641
|
+
tenant_id: z33.string(),
|
|
3642
|
+
app_id: z33.string(),
|
|
3643
|
+
region: z33.string(),
|
|
3644
|
+
support_account_id: z33.string().optional(),
|
|
3645
|
+
support_account_name: z33.string().optional(),
|
|
3646
|
+
created_by: z33.string().optional(),
|
|
3647
|
+
internal: z33.boolean().optional(),
|
|
3648
|
+
tenant_instance_name: z33.string().optional(),
|
|
3598
3649
|
extra: InstanceExtraDetailsSchema.optional(),
|
|
3599
|
-
iam_controlled:
|
|
3600
|
-
platform_region:
|
|
3601
|
-
csp_tenant_id:
|
|
3602
|
-
tsg_instances:
|
|
3603
|
-
}).passthrough();
|
|
3604
|
-
var InstanceResponseSchema =
|
|
3605
|
-
tsg_id:
|
|
3606
|
-
tenant_id:
|
|
3607
|
-
app_id:
|
|
3608
|
-
is_success:
|
|
3609
|
-
}).passthrough();
|
|
3610
|
-
var InstanceGetResponseSchema =
|
|
3611
|
-
tsg_id:
|
|
3612
|
-
tenant_id:
|
|
3613
|
-
app_id:
|
|
3614
|
-
region:
|
|
3615
|
-
support_account_id:
|
|
3616
|
-
support_account_name:
|
|
3617
|
-
created_by:
|
|
3618
|
-
internal:
|
|
3619
|
-
tenant_instance_name:
|
|
3620
|
-
deployment_profiles:
|
|
3621
|
-
}).passthrough();
|
|
3622
|
-
var RegistryCredentialsSchema =
|
|
3623
|
-
token:
|
|
3624
|
-
expiry:
|
|
3650
|
+
iam_controlled: z33.boolean().optional(),
|
|
3651
|
+
platform_region: z33.string().optional(),
|
|
3652
|
+
csp_tenant_id: z33.string().optional(),
|
|
3653
|
+
tsg_instances: z33.unknown().optional()
|
|
3654
|
+
}).passthrough();
|
|
3655
|
+
var InstanceResponseSchema = z33.object({
|
|
3656
|
+
tsg_id: z33.string(),
|
|
3657
|
+
tenant_id: z33.string().optional(),
|
|
3658
|
+
app_id: z33.string().optional(),
|
|
3659
|
+
is_success: z33.boolean().optional()
|
|
3660
|
+
}).passthrough();
|
|
3661
|
+
var InstanceGetResponseSchema = z33.object({
|
|
3662
|
+
tsg_id: z33.string(),
|
|
3663
|
+
tenant_id: z33.string(),
|
|
3664
|
+
app_id: z33.string(),
|
|
3665
|
+
region: z33.string(),
|
|
3666
|
+
support_account_id: z33.string().optional(),
|
|
3667
|
+
support_account_name: z33.string().optional(),
|
|
3668
|
+
created_by: z33.string().optional(),
|
|
3669
|
+
internal: z33.boolean().optional(),
|
|
3670
|
+
tenant_instance_name: z33.string().optional(),
|
|
3671
|
+
deployment_profiles: z33.array(DeploymentProfileRequestSchema).optional()
|
|
3672
|
+
}).passthrough();
|
|
3673
|
+
var RegistryCredentialsSchema = z33.object({
|
|
3674
|
+
token: z33.string(),
|
|
3675
|
+
expiry: z33.string()
|
|
3625
3676
|
}).passthrough();
|
|
3626
3677
|
|
|
3627
3678
|
// src/http/auth/oauth.ts
|
|
@@ -3646,12 +3697,12 @@ var OAuthAuth = class {
|
|
|
3646
3697
|
};
|
|
3647
3698
|
|
|
3648
3699
|
// src/models/oauth-token.ts
|
|
3649
|
-
import { z as
|
|
3650
|
-
var OAuthTokenResponseSchema =
|
|
3651
|
-
access_token:
|
|
3652
|
-
token_type:
|
|
3653
|
-
expires_in:
|
|
3654
|
-
scope:
|
|
3700
|
+
import { z as z34 } from "zod";
|
|
3701
|
+
var OAuthTokenResponseSchema = z34.object({
|
|
3702
|
+
access_token: z34.string(),
|
|
3703
|
+
token_type: z34.string().optional(),
|
|
3704
|
+
expires_in: z34.number(),
|
|
3705
|
+
scope: z34.string().optional()
|
|
3655
3706
|
}).passthrough();
|
|
3656
3707
|
|
|
3657
3708
|
// src/management/oauth-client.ts
|
|
@@ -4485,15 +4536,14 @@ var CustomerAppsClient = class {
|
|
|
4485
4536
|
* Delete a customer app.
|
|
4486
4537
|
* @param appName - Name of the customer app to delete.
|
|
4487
4538
|
* @param updatedBy - Email of user performing the deletion.
|
|
4488
|
-
* @returns
|
|
4539
|
+
* @returns Deletion confirmation message.
|
|
4489
4540
|
* @example
|
|
4490
4541
|
* ```ts
|
|
4491
4542
|
* import { ManagementClient } from '@cdot65/prisma-airs-sdk';
|
|
4492
4543
|
* const mgmt = new ManagementClient(); // reads PANW_MGMT_* env vars
|
|
4493
4544
|
*
|
|
4494
|
-
* const
|
|
4495
|
-
* // app
|
|
4496
|
-
* // { tsg_id: '1234567890', app_name: 'myapp', cloud_provider: 'aws', environment: 'prod' }
|
|
4545
|
+
* const result = await mgmt.customerApps.delete('myapp', 'user@example.com');
|
|
4546
|
+
* // result => { message: 'customer app and associated keys successfully deleted' }
|
|
4497
4547
|
* ```
|
|
4498
4548
|
*/
|
|
4499
4549
|
async delete(appName, updatedBy) {
|
|
@@ -4502,7 +4552,7 @@ var CustomerAppsClient = class {
|
|
|
4502
4552
|
baseUrl: this.baseUrl,
|
|
4503
4553
|
path: MGMT_CUSTOMER_APP_PATH,
|
|
4504
4554
|
params: { app_name: appName, updated_by: updatedBy },
|
|
4505
|
-
responseSchema:
|
|
4555
|
+
responseSchema: CustomerAppDeleteResponseSchema,
|
|
4506
4556
|
auth: this.auth,
|
|
4507
4557
|
numRetries: this.numRetries
|
|
4508
4558
|
});
|
|
@@ -4637,7 +4687,7 @@ var ScanLogsClient = class {
|
|
|
4637
4687
|
};
|
|
4638
4688
|
|
|
4639
4689
|
// src/management/oauth-management.ts
|
|
4640
|
-
import { z as
|
|
4690
|
+
import { z as z35 } from "zod";
|
|
4641
4691
|
var OAuthManagementClient = class {
|
|
4642
4692
|
baseUrl;
|
|
4643
4693
|
auth;
|
|
@@ -4671,7 +4721,7 @@ var OAuthManagementClient = class {
|
|
|
4671
4721
|
path: MGMT_OAUTH_INVALIDATE_PATH,
|
|
4672
4722
|
params: { token },
|
|
4673
4723
|
body,
|
|
4674
|
-
responseSchema:
|
|
4724
|
+
responseSchema: z35.string(),
|
|
4675
4725
|
auth: this.auth,
|
|
4676
4726
|
numRetries: this.numRetries
|
|
4677
4727
|
});
|
|
@@ -4712,6 +4762,101 @@ var OAuthManagementClient = class {
|
|
|
4712
4762
|
}
|
|
4713
4763
|
};
|
|
4714
4764
|
|
|
4765
|
+
// src/management/dashboard.ts
|
|
4766
|
+
var DashboardClient = class {
|
|
4767
|
+
baseUrl;
|
|
4768
|
+
auth;
|
|
4769
|
+
numRetries;
|
|
4770
|
+
constructor(opts) {
|
|
4771
|
+
this.baseUrl = opts.baseUrl;
|
|
4772
|
+
this.auth = opts.auth;
|
|
4773
|
+
this.numRetries = opts.numRetries;
|
|
4774
|
+
}
|
|
4775
|
+
/**
|
|
4776
|
+
* Get per-application token consumption and session activity over the requested window.
|
|
4777
|
+
*
|
|
4778
|
+
* @param query - App identity and time window. `appId` and `appName` are both required.
|
|
4779
|
+
* @returns The application overview with `token_stats`, `session_stats`, attached profiles,
|
|
4780
|
+
* and monitoring metadata.
|
|
4781
|
+
* @example
|
|
4782
|
+
* ```ts
|
|
4783
|
+
* import { ManagementClient } from '@cdot65/prisma-airs-sdk';
|
|
4784
|
+
* const mgmt = new ManagementClient(); // reads PANW_MGMT_* env vars
|
|
4785
|
+
*
|
|
4786
|
+
* const overview = await mgmt.dashboard.application({
|
|
4787
|
+
* appId: 'd8dc4033-593b-45e7-9633-e0dfc130cc82',
|
|
4788
|
+
* appName: 'chatbot',
|
|
4789
|
+
* });
|
|
4790
|
+
* // overview =>
|
|
4791
|
+
* // { name: 'chatbot', cloud: 'other', source: 'api',
|
|
4792
|
+
* // token_stats: { average_daily_tokens: 744.233, average_daily_tokens_scale: 'K',
|
|
4793
|
+
* // monthly_total_tokens: 17.71, monthly_total_tokens_scale: 'M' },
|
|
4794
|
+
* // session_stats: { total: 56935, violating: 31136, ... },
|
|
4795
|
+
* // profiles: ['ms-tuned', 'golden-v2'] }
|
|
4796
|
+
* ```
|
|
4797
|
+
*/
|
|
4798
|
+
async application(query) {
|
|
4799
|
+
return request({
|
|
4800
|
+
method: "GET",
|
|
4801
|
+
baseUrl: this.baseUrl,
|
|
4802
|
+
path: MGMT_DASHBOARD_APPLICATION_PATH,
|
|
4803
|
+
params: {
|
|
4804
|
+
appid: query.appId,
|
|
4805
|
+
appname: query.appName,
|
|
4806
|
+
time_interval: String(query.timeInterval ?? 30),
|
|
4807
|
+
time_unit: query.timeUnit ?? "days"
|
|
4808
|
+
},
|
|
4809
|
+
responseSchema: DashboardApplicationSchema,
|
|
4810
|
+
auth: this.auth,
|
|
4811
|
+
numRetries: this.numRetries
|
|
4812
|
+
});
|
|
4813
|
+
}
|
|
4814
|
+
/**
|
|
4815
|
+
* Get per-detector violation severity counts for the application over the requested window.
|
|
4816
|
+
*
|
|
4817
|
+
* @param query - App identity and time window. `appId` and `appName` are both required.
|
|
4818
|
+
* @returns The detection-type breakdown (one entry per detector observed live:
|
|
4819
|
+
* `agent_security`, `contextual_grounding`, `dbs` (database security), `dlp`,
|
|
4820
|
+
* `malicious_code`, `pi` (prompt injection), `source_code`, `tc` (toxic content),
|
|
4821
|
+
* `topic_guardrails`, `uf` (URL filtering)) plus `total_violating`. Detector set may
|
|
4822
|
+
* evolve; `.passthrough()` schemas accept additions.
|
|
4823
|
+
* @example
|
|
4824
|
+
* ```ts
|
|
4825
|
+
* import { ManagementClient } from '@cdot65/prisma-airs-sdk';
|
|
4826
|
+
* const mgmt = new ManagementClient(); // reads PANW_MGMT_* env vars
|
|
4827
|
+
*
|
|
4828
|
+
* const breakdown = await mgmt.dashboard.applicationViolationBreakdown({
|
|
4829
|
+
* appId: 'd8dc4033-593b-45e7-9633-e0dfc130cc82',
|
|
4830
|
+
* appName: 'chatbot',
|
|
4831
|
+
* });
|
|
4832
|
+
* // breakdown =>
|
|
4833
|
+
* // { detection_type_violation_breakdown: [
|
|
4834
|
+
* // { detection_type: 'topic_guardrails',
|
|
4835
|
+
* // violation_breakdown: { critical: 0, high: 0, medium: 3, low: 0, total: 3 } },
|
|
4836
|
+
* // { detection_type: 'dlp',
|
|
4837
|
+
* // violation_breakdown: { critical: 0, high: 0, medium: 0, low: 0, total: 0 } },
|
|
4838
|
+
* // ... ],
|
|
4839
|
+
* // total_violating: 3 }
|
|
4840
|
+
* ```
|
|
4841
|
+
*/
|
|
4842
|
+
async applicationViolationBreakdown(query) {
|
|
4843
|
+
return request({
|
|
4844
|
+
method: "GET",
|
|
4845
|
+
baseUrl: this.baseUrl,
|
|
4846
|
+
path: MGMT_DASHBOARD_APPLICATION_VIOLATION_BREAKDOWN_PATH,
|
|
4847
|
+
params: {
|
|
4848
|
+
appid: query.appId,
|
|
4849
|
+
appname: query.appName,
|
|
4850
|
+
time_interval: String(query.timeInterval ?? 30),
|
|
4851
|
+
time_unit: query.timeUnit ?? "days"
|
|
4852
|
+
},
|
|
4853
|
+
responseSchema: DashboardApplicationViolationBreakdownSchema,
|
|
4854
|
+
auth: this.auth,
|
|
4855
|
+
numRetries: this.numRetries
|
|
4856
|
+
});
|
|
4857
|
+
}
|
|
4858
|
+
};
|
|
4859
|
+
|
|
4715
4860
|
// src/management/dlp/data-filtering-profiles.ts
|
|
4716
4861
|
var DataFilteringProfilesClient = class {
|
|
4717
4862
|
baseUrl;
|
|
@@ -5405,6 +5550,7 @@ var ManagementClient = class {
|
|
|
5405
5550
|
deploymentProfiles;
|
|
5406
5551
|
scanLogs;
|
|
5407
5552
|
oauth;
|
|
5553
|
+
dashboard;
|
|
5408
5554
|
dlp;
|
|
5409
5555
|
constructor(opts = {}) {
|
|
5410
5556
|
const apiEndpoint = opts.apiEndpoint ?? process.env[MGMT_ENDPOINT] ?? DEFAULT_MGMT_ENDPOINT;
|
|
@@ -5427,6 +5573,7 @@ var ManagementClient = class {
|
|
|
5427
5573
|
this.deploymentProfiles = new DeploymentProfilesClient({ baseUrl, auth, numRetries });
|
|
5428
5574
|
this.scanLogs = new ScanLogsClient({ baseUrl, auth, numRetries });
|
|
5429
5575
|
this.oauth = new OAuthManagementClient({ baseUrl, auth, numRetries });
|
|
5576
|
+
this.dashboard = new DashboardClient({ baseUrl, auth, numRetries });
|
|
5430
5577
|
this.dlp = new DlpNamespace({ baseUrl: dlpEndpoint, auth, numRetries });
|
|
5431
5578
|
}
|
|
5432
5579
|
};
|
|
@@ -6221,7 +6368,7 @@ var ModelSecurityClient = class {
|
|
|
6221
6368
|
};
|
|
6222
6369
|
|
|
6223
6370
|
// src/red-team/scans-client.ts
|
|
6224
|
-
import { z as
|
|
6371
|
+
import { z as z36 } from "zod";
|
|
6225
6372
|
var RedTeamScansClient = class {
|
|
6226
6373
|
baseUrl;
|
|
6227
6374
|
auth;
|
|
@@ -6358,7 +6505,7 @@ var RedTeamScansClient = class {
|
|
|
6358
6505
|
method: "GET",
|
|
6359
6506
|
baseUrl: this.baseUrl,
|
|
6360
6507
|
path: RED_TEAM_CATEGORIES_PATH,
|
|
6361
|
-
responseSchema:
|
|
6508
|
+
responseSchema: z36.array(CategoryModelSchema),
|
|
6362
6509
|
auth: this.auth,
|
|
6363
6510
|
numRetries: this.numRetries
|
|
6364
6511
|
});
|
|
@@ -6366,7 +6513,7 @@ var RedTeamScansClient = class {
|
|
|
6366
6513
|
};
|
|
6367
6514
|
|
|
6368
6515
|
// src/red-team/reports-client.ts
|
|
6369
|
-
import { z as
|
|
6516
|
+
import { z as z37 } from "zod";
|
|
6370
6517
|
var RedTeamReportsClient = class {
|
|
6371
6518
|
baseUrl;
|
|
6372
6519
|
auth;
|
|
@@ -6741,7 +6888,7 @@ var RedTeamReportsClient = class {
|
|
|
6741
6888
|
baseUrl: this.baseUrl,
|
|
6742
6889
|
path: `${RED_TEAM_REPORT_PATH}/${jobId}/download`,
|
|
6743
6890
|
params: { file_format: format },
|
|
6744
|
-
responseSchema:
|
|
6891
|
+
responseSchema: z37.unknown(),
|
|
6745
6892
|
auth: this.auth,
|
|
6746
6893
|
numRetries: this.numRetries
|
|
6747
6894
|
});
|
|
@@ -6765,7 +6912,7 @@ var RedTeamReportsClient = class {
|
|
|
6765
6912
|
method: "POST",
|
|
6766
6913
|
baseUrl: this.baseUrl,
|
|
6767
6914
|
path: `${RED_TEAM_REPORT_PATH}/${jobId}/generate-partial-report`,
|
|
6768
|
-
responseSchema:
|
|
6915
|
+
responseSchema: z37.unknown(),
|
|
6769
6916
|
auth: this.auth,
|
|
6770
6917
|
numRetries: this.numRetries
|
|
6771
6918
|
});
|
|
@@ -6773,7 +6920,7 @@ var RedTeamReportsClient = class {
|
|
|
6773
6920
|
};
|
|
6774
6921
|
|
|
6775
6922
|
// src/red-team/custom-attack-reports-client.ts
|
|
6776
|
-
import { z as
|
|
6923
|
+
import { z as z38 } from "zod";
|
|
6777
6924
|
var RedTeamCustomAttackReportsClient = class {
|
|
6778
6925
|
baseUrl;
|
|
6779
6926
|
auth;
|
|
@@ -6863,7 +7010,7 @@ var RedTeamCustomAttackReportsClient = class {
|
|
|
6863
7010
|
baseUrl: this.baseUrl,
|
|
6864
7011
|
path: `${RED_TEAM_CUSTOM_ATTACKS_REPORT_PATH}/report/${jobId}/prompt-set/${promptSetId}/prompts`,
|
|
6865
7012
|
params,
|
|
6866
|
-
responseSchema:
|
|
7013
|
+
responseSchema: z38.array(PromptDetailResponseSchema),
|
|
6867
7014
|
auth: this.auth,
|
|
6868
7015
|
numRetries: this.numRetries
|
|
6869
7016
|
});
|
|
@@ -6957,7 +7104,7 @@ var RedTeamCustomAttackReportsClient = class {
|
|
|
6957
7104
|
method: "GET",
|
|
6958
7105
|
baseUrl: this.baseUrl,
|
|
6959
7106
|
path: `${RED_TEAM_CUSTOM_ATTACKS_REPORT_PATH}/job/${jobId}/attack/${attackId}/list-outputs`,
|
|
6960
|
-
responseSchema:
|
|
7107
|
+
responseSchema: z38.array(CustomAttackOutputSchema),
|
|
6961
7108
|
auth: this.auth,
|
|
6962
7109
|
numRetries: this.numRetries
|
|
6963
7110
|
});
|
|
@@ -6982,7 +7129,7 @@ var RedTeamCustomAttackReportsClient = class {
|
|
|
6982
7129
|
method: "GET",
|
|
6983
7130
|
baseUrl: this.baseUrl,
|
|
6984
7131
|
path: `${RED_TEAM_CUSTOM_ATTACKS_REPORT_PATH}/job/${jobId}/property-stats`,
|
|
6985
|
-
responseSchema:
|
|
7132
|
+
responseSchema: z38.array(PropertyStatisticSchema),
|
|
6986
7133
|
auth: this.auth,
|
|
6987
7134
|
numRetries: this.numRetries
|
|
6988
7135
|
});
|
|
@@ -6990,7 +7137,7 @@ var RedTeamCustomAttackReportsClient = class {
|
|
|
6990
7137
|
};
|
|
6991
7138
|
|
|
6992
7139
|
// src/red-team/targets-client.ts
|
|
6993
|
-
import { z as
|
|
7140
|
+
import { z as z39 } from "zod";
|
|
6994
7141
|
var RedTeamTargetsClient = class {
|
|
6995
7142
|
baseUrl;
|
|
6996
7143
|
auth;
|
|
@@ -7147,7 +7294,8 @@ var RedTeamTargetsClient = class {
|
|
|
7147
7294
|
method: "DELETE",
|
|
7148
7295
|
baseUrl: this.baseUrl,
|
|
7149
7296
|
path: `${RED_TEAM_TARGET_PATH}/${uuid}`,
|
|
7150
|
-
responseSchema: BaseResponseSchema,
|
|
7297
|
+
responseSchema: BaseResponseSchema.optional(),
|
|
7298
|
+
allowEmptyBody: true,
|
|
7151
7299
|
auth: this.auth,
|
|
7152
7300
|
numRetries: this.numRetries
|
|
7153
7301
|
});
|
|
@@ -7282,7 +7430,7 @@ var RedTeamTargetsClient = class {
|
|
|
7282
7430
|
method: "GET",
|
|
7283
7431
|
baseUrl: this.baseUrl,
|
|
7284
7432
|
path: `${RED_TEAM_TEMPLATE_PATH}/target-metadata`,
|
|
7285
|
-
responseSchema:
|
|
7433
|
+
responseSchema: z39.record(z39.unknown()),
|
|
7286
7434
|
auth: this.auth,
|
|
7287
7435
|
numRetries: this.numRetries
|
|
7288
7436
|
});
|
|
@@ -7782,7 +7930,8 @@ var RedTeamCustomAttacksClient = class {
|
|
|
7782
7930
|
method: "DELETE",
|
|
7783
7931
|
baseUrl: this.baseUrl,
|
|
7784
7932
|
path: `${RED_TEAM_CUSTOM_ATTACK_PATH}/custom-prompt-set/${promptSetUuid}/custom-prompt/${promptUuid}`,
|
|
7785
|
-
responseSchema: BaseResponseSchema,
|
|
7933
|
+
responseSchema: BaseResponseSchema.optional(),
|
|
7934
|
+
allowEmptyBody: true,
|
|
7786
7935
|
auth: this.auth,
|
|
7787
7936
|
numRetries: this.numRetries
|
|
7788
7937
|
});
|
|
@@ -7833,7 +7982,8 @@ var RedTeamCustomAttacksClient = class {
|
|
|
7833
7982
|
baseUrl: this.baseUrl,
|
|
7834
7983
|
path: `${RED_TEAM_CUSTOM_ATTACK_PATH}/property-names`,
|
|
7835
7984
|
body,
|
|
7836
|
-
responseSchema: BaseResponseSchema,
|
|
7985
|
+
responseSchema: BaseResponseSchema.optional(),
|
|
7986
|
+
allowEmptyBody: true,
|
|
7837
7987
|
auth: this.auth,
|
|
7838
7988
|
numRetries: this.numRetries
|
|
7839
7989
|
});
|
|
@@ -8552,6 +8702,7 @@ export {
|
|
|
8552
8702
|
CustomPromptUpdateRequestSchema,
|
|
8553
8703
|
CustomTopicListResponseSchema,
|
|
8554
8704
|
CustomTopicSchema,
|
|
8705
|
+
CustomerAppDeleteResponseSchema,
|
|
8555
8706
|
CustomerAppListResponseSchema,
|
|
8556
8707
|
CustomerAppSchema,
|
|
8557
8708
|
CustomerAppWithKeysSchema,
|
|
@@ -8570,7 +8721,11 @@ export {
|
|
|
8570
8721
|
DLP_DICTIONARIES_PATH,
|
|
8571
8722
|
DSDetailResultSchema,
|
|
8572
8723
|
DSResultMetadataSchema,
|
|
8724
|
+
DashboardApplicationSchema,
|
|
8725
|
+
DashboardApplicationViolationBreakdownSchema,
|
|
8726
|
+
DashboardClient,
|
|
8573
8727
|
DashboardOverviewResponseSchema,
|
|
8728
|
+
DashboardSessionStatsSchema,
|
|
8574
8729
|
DataFilteringDetailsSchema,
|
|
8575
8730
|
DataFilteringProfileRequestSchema,
|
|
8576
8731
|
DataFilteringProfileResponseSchema,
|
|
@@ -8616,6 +8771,7 @@ export {
|
|
|
8616
8771
|
DetectionRuleSchema,
|
|
8617
8772
|
DetectionServiceName,
|
|
8618
8773
|
DetectionServiceResultSchema,
|
|
8774
|
+
DetectorViolationBreakdownEntrySchema,
|
|
8619
8775
|
DeviceInstanceSchema,
|
|
8620
8776
|
DeviceLicenseSchema,
|
|
8621
8777
|
DeviceRequestSchema,
|
|
@@ -8719,6 +8875,8 @@ export {
|
|
|
8719
8875
|
MGMT_CLIENT_SECRET,
|
|
8720
8876
|
MGMT_CUSTOMER_APPS_TSG_PATH,
|
|
8721
8877
|
MGMT_CUSTOMER_APP_PATH,
|
|
8878
|
+
MGMT_DASHBOARD_APPLICATION_PATH,
|
|
8879
|
+
MGMT_DASHBOARD_APPLICATION_VIOLATION_BREAKDOWN_PATH,
|
|
8722
8880
|
MGMT_DEPLOYMENT_PROFILES_PATH,
|
|
8723
8881
|
MGMT_DLP_PROFILES_PATH,
|
|
8724
8882
|
MGMT_ENDPOINT,
|
|
@@ -8947,6 +9105,7 @@ export {
|
|
|
8947
9105
|
TgReportSchema,
|
|
8948
9106
|
ThreatCategory,
|
|
8949
9107
|
ThreatScanReportSchema,
|
|
9108
|
+
TokenStatsSchema,
|
|
8950
9109
|
ToolDetectedSchema,
|
|
8951
9110
|
ToolDetectionDetailsSchema,
|
|
8952
9111
|
ToolDetectionEntrySchema,
|
|
@@ -8964,6 +9123,7 @@ export {
|
|
|
8964
9123
|
Verdict,
|
|
8965
9124
|
ViolationListSchema,
|
|
8966
9125
|
ViolationResponseSchema,
|
|
9126
|
+
ViolationSeverityCountsSchema,
|
|
8967
9127
|
WebSocketConnectionParamsSchema,
|
|
8968
9128
|
WeightedRegexSchema,
|
|
8969
9129
|
globalConfiguration,
|