@cdot65/prisma-airs-sdk 0.6.3 → 0.6.5
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 +382 -145
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5017 -3316
- package/dist/index.d.ts +5017 -3316
- package/dist/index.js +382 -145
- 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.6.
|
|
32
|
+
var SDK_VERSION = "0.6.5";
|
|
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";
|
|
@@ -194,7 +194,8 @@ function sleep(ms) {
|
|
|
194
194
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
195
195
|
}
|
|
196
196
|
function backoffDelay(attempt) {
|
|
197
|
-
|
|
197
|
+
const maxDelay = Math.pow(2, attempt) * 1e3;
|
|
198
|
+
return Math.floor(Math.random() * (maxDelay + 1));
|
|
198
199
|
}
|
|
199
200
|
function isRetryableStatus(status) {
|
|
200
201
|
return HTTP_FORCE_RETRY_STATUS_CODES.includes(status);
|
|
@@ -522,7 +523,10 @@ var Content = class _Content {
|
|
|
522
523
|
set toolEvent(value) {
|
|
523
524
|
this._toolEvent = value;
|
|
524
525
|
}
|
|
525
|
-
/**
|
|
526
|
+
/**
|
|
527
|
+
* Total byte length of all text content fields.
|
|
528
|
+
* @returns Combined byte length of all text content fields.
|
|
529
|
+
*/
|
|
526
530
|
get length() {
|
|
527
531
|
let total = 0;
|
|
528
532
|
if (this._prompt) total += Buffer.byteLength(this._prompt);
|
|
@@ -532,7 +536,10 @@ var Content = class _Content {
|
|
|
532
536
|
if (this._codeResponse) total += Buffer.byteLength(this._codeResponse);
|
|
533
537
|
return total;
|
|
534
538
|
}
|
|
535
|
-
/**
|
|
539
|
+
/**
|
|
540
|
+
* Serialize to the API request format.
|
|
541
|
+
* @returns The content as a scan request contents inner object.
|
|
542
|
+
*/
|
|
536
543
|
toJSON() {
|
|
537
544
|
const obj = {};
|
|
538
545
|
if (this._prompt !== void 0) obj.prompt = this._prompt;
|
|
@@ -912,8 +919,8 @@ var ErrorResponseSchema = z15.object({
|
|
|
912
919
|
retry_after: z15.object({
|
|
913
920
|
interval: z15.number().optional(),
|
|
914
921
|
unit: z15.string().optional()
|
|
915
|
-
}).optional()
|
|
916
|
-
});
|
|
922
|
+
}).passthrough().optional()
|
|
923
|
+
}).passthrough();
|
|
917
924
|
|
|
918
925
|
// src/models/mgmt-security-profile.ts
|
|
919
926
|
import { z as z16 } from "zod";
|
|
@@ -1076,12 +1083,12 @@ var ApiKeyCreateRequestSchema = z18.object({
|
|
|
1076
1083
|
api_key_name: z18.string(),
|
|
1077
1084
|
rotation_time_interval: z18.number(),
|
|
1078
1085
|
rotation_time_unit: z18.string()
|
|
1079
|
-
});
|
|
1086
|
+
}).passthrough();
|
|
1080
1087
|
var ApiKeyRegenerateRequestSchema = z18.object({
|
|
1081
1088
|
rotation_time_interval: z18.number(),
|
|
1082
1089
|
rotation_time_unit: z18.string(),
|
|
1083
1090
|
updated_by: z18.string().optional()
|
|
1084
|
-
});
|
|
1091
|
+
}).passthrough();
|
|
1085
1092
|
var ApiKeyListResponseSchema = z18.object({
|
|
1086
1093
|
api_keys: z18.array(ApiKeySchema).optional(),
|
|
1087
1094
|
next_offset: z18.number().optional()
|
|
@@ -1250,7 +1257,7 @@ import { z as z23 } from "zod";
|
|
|
1250
1257
|
var ClientIdAndCustomerAppSchema = z23.object({
|
|
1251
1258
|
client_id: z23.string(),
|
|
1252
1259
|
customer_app: z23.string()
|
|
1253
|
-
});
|
|
1260
|
+
}).passthrough();
|
|
1254
1261
|
var Oauth2TokenSchema = z23.object({
|
|
1255
1262
|
token_type: z23.string().optional(),
|
|
1256
1263
|
issued_at: z23.string().optional(),
|
|
@@ -1397,10 +1404,10 @@ var ModelSecurityPaginationSchema = z24.object({
|
|
|
1397
1404
|
var LabelSchema = z24.object({
|
|
1398
1405
|
key: z24.string(),
|
|
1399
1406
|
value: z24.string()
|
|
1400
|
-
});
|
|
1407
|
+
}).passthrough();
|
|
1401
1408
|
var LabelsCreateRequestSchema = z24.object({
|
|
1402
1409
|
labels: z24.array(LabelSchema)
|
|
1403
|
-
});
|
|
1410
|
+
}).passthrough();
|
|
1404
1411
|
var LabelsResponseSchema = z24.object({}).passthrough();
|
|
1405
1412
|
var LabelKeyListSchema = z24.object({
|
|
1406
1413
|
pagination: ModelSecurityPaginationSchema,
|
|
@@ -1441,7 +1448,7 @@ var ScanDetailsSchema = z24.object({
|
|
|
1441
1448
|
scan_duration_ms: z24.number().int(),
|
|
1442
1449
|
error_code: z24.string().nullable().optional(),
|
|
1443
1450
|
error_message: z24.string().nullable().optional()
|
|
1444
|
-
});
|
|
1451
|
+
}).passthrough();
|
|
1445
1452
|
var ScanCreateRequestSchema = z24.object({
|
|
1446
1453
|
model_uri: z24.string(),
|
|
1447
1454
|
security_group_uuid: z24.string(),
|
|
@@ -1453,7 +1460,7 @@ var ScanCreateRequestSchema = z24.object({
|
|
|
1453
1460
|
model_name: z24.string().nullable().optional(),
|
|
1454
1461
|
model_version: z24.string().nullable().optional(),
|
|
1455
1462
|
scan_details: ScanDetailsSchema.nullable().optional()
|
|
1456
|
-
});
|
|
1463
|
+
}).passthrough();
|
|
1457
1464
|
var ScanBaseResponseSchema = z24.object({
|
|
1458
1465
|
uuid: z24.string(),
|
|
1459
1466
|
tsg_id: z24.string(),
|
|
@@ -1591,7 +1598,7 @@ var ModelSecurityRuleInstanceUpdateRequestSchema = z24.object({
|
|
|
1591
1598
|
security_group_uuid: z24.string(),
|
|
1592
1599
|
state: z24.string().nullable().optional(),
|
|
1593
1600
|
field_values: z24.record(z24.unknown()).nullable().optional()
|
|
1594
|
-
});
|
|
1601
|
+
}).passthrough();
|
|
1595
1602
|
var ListModelSecurityRuleInstancesResponseSchema = z24.object({
|
|
1596
1603
|
pagination: ModelSecurityPaginationSchema,
|
|
1597
1604
|
rule_instances: z24.array(ModelSecurityRuleInstanceResponseSchema)
|
|
@@ -1601,7 +1608,7 @@ var ModelSecurityGroupCreateRequestSchema = z24.object({
|
|
|
1601
1608
|
source_type: z24.string(),
|
|
1602
1609
|
description: z24.string().optional().default(""),
|
|
1603
1610
|
rule_configurations: z24.record(RuleConfigurationSchema).optional()
|
|
1604
|
-
});
|
|
1611
|
+
}).passthrough();
|
|
1605
1612
|
var ModelSecurityGroupResponseSchema = z24.object({
|
|
1606
1613
|
uuid: z24.string(),
|
|
1607
1614
|
tsg_id: z24.string(),
|
|
@@ -1616,7 +1623,7 @@ var ModelSecurityGroupResponseSchema = z24.object({
|
|
|
1616
1623
|
var ModelSecurityGroupUpdateRequestSchema = z24.object({
|
|
1617
1624
|
name: z24.string().nullable().optional(),
|
|
1618
1625
|
description: z24.string().nullable().optional()
|
|
1619
|
-
});
|
|
1626
|
+
}).passthrough();
|
|
1620
1627
|
var ListModelSecurityGroupsResponseSchema = z24.object({
|
|
1621
1628
|
pagination: ModelSecurityPaginationSchema,
|
|
1622
1629
|
security_groups: z24.array(ModelSecurityGroupResponseSchema)
|
|
@@ -1823,12 +1830,12 @@ var TargetType = {
|
|
|
1823
1830
|
// src/models/red-team.ts
|
|
1824
1831
|
import { z as z25 } from "zod";
|
|
1825
1832
|
var RedTeamPaginationSchema = z25.object({ total_items: z25.number().int().nullable().optional() }).passthrough();
|
|
1826
|
-
var CountByNameSchema = z25.object({ name: z25.string(), count: z25.number().int() });
|
|
1833
|
+
var CountByNameSchema = z25.object({ name: z25.string(), count: z25.number().int() }).passthrough();
|
|
1827
1834
|
var ValidationErrorSchema = z25.object({
|
|
1828
1835
|
loc: z25.array(z25.union([z25.string(), z25.number()])),
|
|
1829
1836
|
msg: z25.string(),
|
|
1830
1837
|
type: z25.string()
|
|
1831
|
-
});
|
|
1838
|
+
}).passthrough();
|
|
1832
1839
|
var HTTPValidationErrorSchema = z25.object({ detail: z25.array(ValidationErrorSchema).optional() }).passthrough();
|
|
1833
1840
|
var TargetBackgroundSchema = z25.object({
|
|
1834
1841
|
industry: z25.string().nullable().optional(),
|
|
@@ -1911,7 +1918,7 @@ var ConnectionParamsSchema = z25.union([
|
|
|
1911
1918
|
var TargetJobRequestSchema = z25.object({
|
|
1912
1919
|
uuid: z25.string(),
|
|
1913
1920
|
version: z25.number().int().nullable().optional()
|
|
1914
|
-
});
|
|
1921
|
+
}).passthrough();
|
|
1915
1922
|
var JobTimeRecordSchema = z25.object({
|
|
1916
1923
|
queued_at: z25.string().nullable().optional(),
|
|
1917
1924
|
started_at: z25.string().nullable().optional(),
|
|
@@ -1972,7 +1979,7 @@ var JobCreateRequestSchema = z25.object({
|
|
|
1972
1979
|
]),
|
|
1973
1980
|
version: z25.number().int().nullable().optional(),
|
|
1974
1981
|
extra_info: z25.record(z25.unknown()).nullable().optional()
|
|
1975
|
-
});
|
|
1982
|
+
}).passthrough();
|
|
1976
1983
|
var StaticJobReportStatsSchema = z25.object({
|
|
1977
1984
|
output_completion_percentage: z25.number(),
|
|
1978
1985
|
partial_report_unlocked: z25.boolean().optional(),
|
|
@@ -2043,12 +2050,12 @@ var JobListResponseSchema = z25.object({
|
|
|
2043
2050
|
var JobAbortResponseSchema = z25.object({
|
|
2044
2051
|
job_id: z25.string(),
|
|
2045
2052
|
message: z25.string()
|
|
2046
|
-
});
|
|
2053
|
+
}).passthrough();
|
|
2047
2054
|
var PrerequisiteModelSchema = z25.object({
|
|
2048
2055
|
id: z25.string(),
|
|
2049
2056
|
display_name: z25.string(),
|
|
2050
2057
|
description: z25.string()
|
|
2051
|
-
});
|
|
2058
|
+
}).passthrough();
|
|
2052
2059
|
var SubCategoryModelSchema = z25.object({
|
|
2053
2060
|
id: z25.string(),
|
|
2054
2061
|
display_name: z25.string(),
|
|
@@ -2342,17 +2349,17 @@ var CustomAttackOutputSchema = z25.object({
|
|
|
2342
2349
|
var PropertyAssignmentSchema = z25.object({
|
|
2343
2350
|
name: z25.string(),
|
|
2344
2351
|
value: z25.string()
|
|
2345
|
-
});
|
|
2352
|
+
}).passthrough();
|
|
2346
2353
|
var PropertyValueStatisticSchema = z25.object({
|
|
2347
2354
|
value: z25.string(),
|
|
2348
2355
|
successful_attack_count: z25.number().int(),
|
|
2349
2356
|
total_attack_count: z25.number().int(),
|
|
2350
2357
|
success_rate: z25.number()
|
|
2351
|
-
});
|
|
2358
|
+
}).passthrough();
|
|
2352
2359
|
var PropertyStatisticSchema = z25.object({
|
|
2353
2360
|
property_name: z25.string(),
|
|
2354
2361
|
values: z25.array(PropertyValueStatisticSchema)
|
|
2355
|
-
});
|
|
2362
|
+
}).passthrough();
|
|
2356
2363
|
var PromptSetSummarySchema = z25.object({
|
|
2357
2364
|
prompt_set_id: z25.string(),
|
|
2358
2365
|
prompt_set_name: z25.string(),
|
|
@@ -2413,16 +2420,16 @@ var ScanStatisticsResponseSchema = z25.object({
|
|
|
2413
2420
|
var ScoreTrendSeriesSchema = z25.object({
|
|
2414
2421
|
label: z25.string(),
|
|
2415
2422
|
data: z25.array(z25.number().nullable())
|
|
2416
|
-
});
|
|
2423
|
+
}).passthrough();
|
|
2417
2424
|
var ScoreTrendResponseSchema = z25.object({
|
|
2418
2425
|
labels: z25.array(z25.string()),
|
|
2419
2426
|
series: z25.array(ScoreTrendSeriesSchema)
|
|
2420
|
-
});
|
|
2427
|
+
}).passthrough();
|
|
2421
2428
|
var SentimentRequestSchema = z25.object({
|
|
2422
2429
|
job_id: z25.string(),
|
|
2423
2430
|
up_vote: z25.boolean().optional(),
|
|
2424
2431
|
down_vote: z25.boolean().optional()
|
|
2425
|
-
});
|
|
2432
|
+
}).passthrough();
|
|
2426
2433
|
var SentimentResponseSchema = z25.object({
|
|
2427
2434
|
job_id: z25.string(),
|
|
2428
2435
|
up_vote: z25.boolean().optional(),
|
|
@@ -2432,12 +2439,12 @@ var QuotaDetailsSchema = z25.object({
|
|
|
2432
2439
|
allocated: z25.number().int(),
|
|
2433
2440
|
unlimited: z25.boolean(),
|
|
2434
2441
|
consumed: z25.number().int()
|
|
2435
|
-
});
|
|
2442
|
+
}).passthrough();
|
|
2436
2443
|
var QuotaSummarySchema = z25.object({
|
|
2437
2444
|
static: QuotaDetailsSchema,
|
|
2438
2445
|
dynamic: QuotaDetailsSchema,
|
|
2439
2446
|
custom: QuotaDetailsSchema
|
|
2440
|
-
});
|
|
2447
|
+
}).passthrough();
|
|
2441
2448
|
var ErrorLogSchema = z25.object({
|
|
2442
2449
|
created_at: z25.string(),
|
|
2443
2450
|
updated_at: z25.string(),
|
|
@@ -2564,7 +2571,7 @@ var TargetProfileResponseSchema = z25.object({
|
|
|
2564
2571
|
var BaseResponseSchema = z25.object({
|
|
2565
2572
|
message: z25.string(),
|
|
2566
2573
|
status: z25.number().int()
|
|
2567
|
-
});
|
|
2574
|
+
}).passthrough();
|
|
2568
2575
|
var PromptSetStatsSchema = z25.object({
|
|
2569
2576
|
total_prompts: z25.number().int(),
|
|
2570
2577
|
active_prompts: z25.number().int(),
|
|
@@ -2576,14 +2583,14 @@ var CustomPromptSetCreateRequestSchema = z25.object({
|
|
|
2576
2583
|
name: z25.string(),
|
|
2577
2584
|
description: z25.unknown().optional(),
|
|
2578
2585
|
property_names: z25.array(z25.string()).optional()
|
|
2579
|
-
});
|
|
2586
|
+
}).passthrough();
|
|
2580
2587
|
var CustomPromptSetUpdateRequestSchema = z25.object({
|
|
2581
2588
|
name: z25.unknown().optional(),
|
|
2582
2589
|
description: z25.unknown().optional(),
|
|
2583
2590
|
archive: z25.unknown().optional(),
|
|
2584
2591
|
property_names: z25.unknown().optional()
|
|
2585
2592
|
}).passthrough();
|
|
2586
|
-
var CustomPromptSetArchiveRequestSchema = z25.object({ archive: z25.boolean() });
|
|
2593
|
+
var CustomPromptSetArchiveRequestSchema = z25.object({ archive: z25.boolean() }).passthrough();
|
|
2587
2594
|
var CustomPromptSetResponseSchema = z25.object({
|
|
2588
2595
|
uuid: z25.string(),
|
|
2589
2596
|
name: z25.string(),
|
|
@@ -2642,7 +2649,7 @@ var CustomPromptCreateRequestSchema = z25.object({
|
|
|
2642
2649
|
prompt_set_id: z25.string(),
|
|
2643
2650
|
goal: z25.unknown().optional(),
|
|
2644
2651
|
properties: z25.unknown().optional()
|
|
2645
|
-
});
|
|
2652
|
+
}).passthrough();
|
|
2646
2653
|
var CustomPromptUpdateRequestSchema = z25.object({
|
|
2647
2654
|
prompt: z25.unknown().optional(),
|
|
2648
2655
|
goal: z25.unknown().optional(),
|
|
@@ -2679,15 +2686,15 @@ var CustomPromptListSchema = z25.object({
|
|
|
2679
2686
|
pagination: RedTeamPaginationSchema,
|
|
2680
2687
|
data: z25.array(CustomPromptListItemSchema).optional()
|
|
2681
2688
|
}).passthrough();
|
|
2682
|
-
var PropertyNameCreateRequestSchema = z25.object({ name: z25.string() });
|
|
2689
|
+
var PropertyNameCreateRequestSchema = z25.object({ name: z25.string() }).passthrough();
|
|
2683
2690
|
var PropertyValueCreateRequestSchema = z25.object({
|
|
2684
2691
|
property_name: z25.string(),
|
|
2685
2692
|
property_value: z25.string()
|
|
2686
|
-
});
|
|
2693
|
+
}).passthrough();
|
|
2687
2694
|
var PropertyDefinitionSchema = z25.object({
|
|
2688
2695
|
property_name: z25.string(),
|
|
2689
2696
|
created_at: z25.string()
|
|
2690
|
-
});
|
|
2697
|
+
}).passthrough();
|
|
2691
2698
|
var PropertyNamesListResponseSchema = z25.object({ data: z25.array(PropertyDefinitionSchema).optional() }).passthrough();
|
|
2692
2699
|
var PropertyValuesResponseSchema = z25.object({
|
|
2693
2700
|
name: z25.string(),
|
|
@@ -2744,12 +2751,18 @@ var OAuthClient = class {
|
|
|
2744
2751
|
});
|
|
2745
2752
|
return this.pendingFetch;
|
|
2746
2753
|
}
|
|
2747
|
-
/**
|
|
2754
|
+
/**
|
|
2755
|
+
* Clear the cached token, forcing a fresh fetch on next call.
|
|
2756
|
+
* @returns Nothing.
|
|
2757
|
+
*/
|
|
2748
2758
|
clearToken() {
|
|
2749
2759
|
this.accessToken = null;
|
|
2750
2760
|
this.expiresAt = 0;
|
|
2751
2761
|
}
|
|
2752
|
-
/**
|
|
2762
|
+
/**
|
|
2763
|
+
* Check if the current token has passed its expiry time. Returns true if no token exists.
|
|
2764
|
+
* @returns Whether the token is expired.
|
|
2765
|
+
*/
|
|
2753
2766
|
isTokenExpired() {
|
|
2754
2767
|
if (!this.accessToken) return true;
|
|
2755
2768
|
return Date.now() >= this.expiresAt;
|
|
@@ -2758,6 +2771,7 @@ var OAuthClient = class {
|
|
|
2758
2771
|
* Check if the token is within the pre-expiry buffer window.
|
|
2759
2772
|
* Returns true if no token exists.
|
|
2760
2773
|
* @param bufferMs - Custom buffer in ms. Defaults to the configured `tokenBufferMs`.
|
|
2774
|
+
* @returns Whether the token is expiring soon.
|
|
2761
2775
|
*/
|
|
2762
2776
|
isTokenExpiringSoon(bufferMs) {
|
|
2763
2777
|
if (!this.accessToken) return true;
|
|
@@ -3953,6 +3967,7 @@ var ModelSecurityGroupsClient = class {
|
|
|
3953
3967
|
/**
|
|
3954
3968
|
* Delete a security group.
|
|
3955
3969
|
* @param uuid - Security group UUID.
|
|
3970
|
+
* @returns Resolves when the security group is deleted.
|
|
3956
3971
|
*/
|
|
3957
3972
|
async delete(uuid) {
|
|
3958
3973
|
if (!isValidUuid(uuid)) {
|
|
@@ -4189,14 +4204,16 @@ var ModelSecurityClient = class {
|
|
|
4189
4204
|
}
|
|
4190
4205
|
};
|
|
4191
4206
|
|
|
4192
|
-
// src/red-team/
|
|
4193
|
-
function
|
|
4207
|
+
// src/red-team/list-params.ts
|
|
4208
|
+
function buildRedTeamListParams(opts) {
|
|
4194
4209
|
const params = {};
|
|
4195
4210
|
if (opts?.skip !== void 0) params.skip = String(opts.skip);
|
|
4196
4211
|
if (opts?.limit !== void 0) params.limit = String(opts.limit);
|
|
4197
4212
|
if (opts?.search !== void 0) params.search = opts.search;
|
|
4198
4213
|
return params;
|
|
4199
4214
|
}
|
|
4215
|
+
|
|
4216
|
+
// src/red-team/scans-client.ts
|
|
4200
4217
|
var RedTeamScansClient = class {
|
|
4201
4218
|
baseUrl;
|
|
4202
4219
|
oauthClient;
|
|
@@ -4222,9 +4239,13 @@ var RedTeamScansClient = class {
|
|
|
4222
4239
|
});
|
|
4223
4240
|
return res.data;
|
|
4224
4241
|
}
|
|
4225
|
-
/**
|
|
4242
|
+
/**
|
|
4243
|
+
* List red team scan jobs with optional filters.
|
|
4244
|
+
* @param opts - Optional pagination, search, and filter options.
|
|
4245
|
+
* @returns The paginated list of scan jobs.
|
|
4246
|
+
*/
|
|
4226
4247
|
async list(opts) {
|
|
4227
|
-
const params =
|
|
4248
|
+
const params = buildRedTeamListParams(opts);
|
|
4228
4249
|
if (opts?.status !== void 0) params.status = opts.status;
|
|
4229
4250
|
if (opts?.job_type !== void 0) params.job_type = opts.job_type;
|
|
4230
4251
|
if (opts?.target_id !== void 0) params.target_id = opts.target_id;
|
|
@@ -4238,7 +4259,11 @@ var RedTeamScansClient = class {
|
|
|
4238
4259
|
});
|
|
4239
4260
|
return res.data;
|
|
4240
4261
|
}
|
|
4241
|
-
/**
|
|
4262
|
+
/**
|
|
4263
|
+
* Get a single scan job by ID.
|
|
4264
|
+
* @param jobId - The job UUID.
|
|
4265
|
+
* @returns The job response.
|
|
4266
|
+
*/
|
|
4242
4267
|
async get(jobId) {
|
|
4243
4268
|
if (!isValidUuid(jobId)) {
|
|
4244
4269
|
throw new AISecSDKException(`Invalid job id: ${jobId}`, "AISEC_USER_REQUEST_PAYLOAD_ERROR" /* USER_REQUEST_PAYLOAD_ERROR */);
|
|
@@ -4252,7 +4277,11 @@ var RedTeamScansClient = class {
|
|
|
4252
4277
|
});
|
|
4253
4278
|
return res.data;
|
|
4254
4279
|
}
|
|
4255
|
-
/**
|
|
4280
|
+
/**
|
|
4281
|
+
* Abort a running scan job.
|
|
4282
|
+
* @param jobId - The job UUID.
|
|
4283
|
+
* @returns The abort response.
|
|
4284
|
+
*/
|
|
4256
4285
|
async abort(jobId) {
|
|
4257
4286
|
if (!isValidUuid(jobId)) {
|
|
4258
4287
|
throw new AISecSDKException(`Invalid job id: ${jobId}`, "AISEC_USER_REQUEST_PAYLOAD_ERROR" /* USER_REQUEST_PAYLOAD_ERROR */);
|
|
@@ -4266,7 +4295,10 @@ var RedTeamScansClient = class {
|
|
|
4266
4295
|
});
|
|
4267
4296
|
return res.data;
|
|
4268
4297
|
}
|
|
4269
|
-
/**
|
|
4298
|
+
/**
|
|
4299
|
+
* Get all categories with subcategories.
|
|
4300
|
+
* @returns The list of category models.
|
|
4301
|
+
*/
|
|
4270
4302
|
async getCategories() {
|
|
4271
4303
|
const res = await managementHttpRequest({
|
|
4272
4304
|
method: "GET",
|
|
@@ -4280,13 +4312,6 @@ var RedTeamScansClient = class {
|
|
|
4280
4312
|
};
|
|
4281
4313
|
|
|
4282
4314
|
// src/red-team/reports-client.ts
|
|
4283
|
-
function buildListParams2(opts) {
|
|
4284
|
-
const params = {};
|
|
4285
|
-
if (opts?.skip !== void 0) params.skip = String(opts.skip);
|
|
4286
|
-
if (opts?.limit !== void 0) params.limit = String(opts.limit);
|
|
4287
|
-
if (opts?.search !== void 0) params.search = opts.search;
|
|
4288
|
-
return params;
|
|
4289
|
-
}
|
|
4290
4315
|
function validateJobId(jobId) {
|
|
4291
4316
|
if (!isValidUuid(jobId)) {
|
|
4292
4317
|
throw new AISecSDKException(`Invalid job id: ${jobId}`, "AISEC_USER_REQUEST_PAYLOAD_ERROR" /* USER_REQUEST_PAYLOAD_ERROR */);
|
|
@@ -4304,10 +4329,15 @@ var RedTeamReportsClient = class {
|
|
|
4304
4329
|
// -----------------------------------------------------------------------
|
|
4305
4330
|
// Static (attack library) report endpoints
|
|
4306
4331
|
// -----------------------------------------------------------------------
|
|
4307
|
-
/**
|
|
4332
|
+
/**
|
|
4333
|
+
* List attacks for a static scan.
|
|
4334
|
+
* @param jobId - The job UUID.
|
|
4335
|
+
* @param opts - Optional pagination, search, and filter options.
|
|
4336
|
+
* @returns The paginated list of attacks.
|
|
4337
|
+
*/
|
|
4308
4338
|
async listAttacks(jobId, opts) {
|
|
4309
4339
|
validateJobId(jobId);
|
|
4310
|
-
const params =
|
|
4340
|
+
const params = buildRedTeamListParams(opts);
|
|
4311
4341
|
if (opts?.status !== void 0) params.status = opts.status;
|
|
4312
4342
|
if (opts?.severity !== void 0) params.severity = opts.severity;
|
|
4313
4343
|
if (opts?.category !== void 0) params.category = opts.category;
|
|
@@ -4324,7 +4354,12 @@ var RedTeamReportsClient = class {
|
|
|
4324
4354
|
});
|
|
4325
4355
|
return res.data;
|
|
4326
4356
|
}
|
|
4327
|
-
/**
|
|
4357
|
+
/**
|
|
4358
|
+
* Get attack details for a static scan.
|
|
4359
|
+
* @param jobId - The job UUID.
|
|
4360
|
+
* @param attackId - The attack UUID.
|
|
4361
|
+
* @returns The attack detail response.
|
|
4362
|
+
*/
|
|
4328
4363
|
async getAttackDetail(jobId, attackId) {
|
|
4329
4364
|
validateJobId(jobId);
|
|
4330
4365
|
if (!isValidUuid(attackId)) {
|
|
@@ -4342,7 +4377,12 @@ var RedTeamReportsClient = class {
|
|
|
4342
4377
|
});
|
|
4343
4378
|
return res.data;
|
|
4344
4379
|
}
|
|
4345
|
-
/**
|
|
4380
|
+
/**
|
|
4381
|
+
* Get multi-turn attack details for a static scan.
|
|
4382
|
+
* @param jobId - The job UUID.
|
|
4383
|
+
* @param attackId - The attack UUID.
|
|
4384
|
+
* @returns The multi-turn attack detail response.
|
|
4385
|
+
*/
|
|
4346
4386
|
async getMultiTurnAttackDetail(jobId, attackId) {
|
|
4347
4387
|
validateJobId(jobId);
|
|
4348
4388
|
if (!isValidUuid(attackId)) {
|
|
@@ -4360,7 +4400,11 @@ var RedTeamReportsClient = class {
|
|
|
4360
4400
|
});
|
|
4361
4401
|
return res.data;
|
|
4362
4402
|
}
|
|
4363
|
-
/**
|
|
4403
|
+
/**
|
|
4404
|
+
* Get the attack library report for a static scan.
|
|
4405
|
+
* @param jobId - The job UUID.
|
|
4406
|
+
* @returns The static job report.
|
|
4407
|
+
*/
|
|
4364
4408
|
async getStaticReport(jobId) {
|
|
4365
4409
|
validateJobId(jobId);
|
|
4366
4410
|
const res = await managementHttpRequest({
|
|
@@ -4372,7 +4416,11 @@ var RedTeamReportsClient = class {
|
|
|
4372
4416
|
});
|
|
4373
4417
|
return res.data;
|
|
4374
4418
|
}
|
|
4375
|
-
/**
|
|
4419
|
+
/**
|
|
4420
|
+
* Get remediation recommendations for a static scan.
|
|
4421
|
+
* @param jobId - The job UUID.
|
|
4422
|
+
* @returns The remediation response.
|
|
4423
|
+
*/
|
|
4376
4424
|
async getStaticRemediation(jobId) {
|
|
4377
4425
|
validateJobId(jobId);
|
|
4378
4426
|
const res = await managementHttpRequest({
|
|
@@ -4384,7 +4432,11 @@ var RedTeamReportsClient = class {
|
|
|
4384
4432
|
});
|
|
4385
4433
|
return res.data;
|
|
4386
4434
|
}
|
|
4387
|
-
/**
|
|
4435
|
+
/**
|
|
4436
|
+
* Get runtime security profile config for a static scan.
|
|
4437
|
+
* @param jobId - The job UUID.
|
|
4438
|
+
* @returns The runtime security profile response.
|
|
4439
|
+
*/
|
|
4388
4440
|
async getStaticRuntimePolicy(jobId) {
|
|
4389
4441
|
validateJobId(jobId);
|
|
4390
4442
|
const res = await managementHttpRequest({
|
|
@@ -4399,7 +4451,11 @@ var RedTeamReportsClient = class {
|
|
|
4399
4451
|
// -----------------------------------------------------------------------
|
|
4400
4452
|
// Dynamic (agent) report endpoints
|
|
4401
4453
|
// -----------------------------------------------------------------------
|
|
4402
|
-
/**
|
|
4454
|
+
/**
|
|
4455
|
+
* Get the agent scan report for a dynamic scan.
|
|
4456
|
+
* @param jobId - The job UUID.
|
|
4457
|
+
* @returns The dynamic job report.
|
|
4458
|
+
*/
|
|
4403
4459
|
async getDynamicReport(jobId) {
|
|
4404
4460
|
validateJobId(jobId);
|
|
4405
4461
|
const res = await managementHttpRequest({
|
|
@@ -4411,7 +4467,11 @@ var RedTeamReportsClient = class {
|
|
|
4411
4467
|
});
|
|
4412
4468
|
return res.data;
|
|
4413
4469
|
}
|
|
4414
|
-
/**
|
|
4470
|
+
/**
|
|
4471
|
+
* Get remediation recommendations for a dynamic scan.
|
|
4472
|
+
* @param jobId - The job UUID.
|
|
4473
|
+
* @returns The remediation response.
|
|
4474
|
+
*/
|
|
4415
4475
|
async getDynamicRemediation(jobId) {
|
|
4416
4476
|
validateJobId(jobId);
|
|
4417
4477
|
const res = await managementHttpRequest({
|
|
@@ -4423,7 +4483,11 @@ var RedTeamReportsClient = class {
|
|
|
4423
4483
|
});
|
|
4424
4484
|
return res.data;
|
|
4425
4485
|
}
|
|
4426
|
-
/**
|
|
4486
|
+
/**
|
|
4487
|
+
* Get runtime security profile config for a dynamic scan.
|
|
4488
|
+
* @param jobId - The job UUID.
|
|
4489
|
+
* @returns The runtime security profile response.
|
|
4490
|
+
*/
|
|
4427
4491
|
async getDynamicRuntimePolicy(jobId) {
|
|
4428
4492
|
validateJobId(jobId);
|
|
4429
4493
|
const res = await managementHttpRequest({
|
|
@@ -4435,10 +4499,15 @@ var RedTeamReportsClient = class {
|
|
|
4435
4499
|
});
|
|
4436
4500
|
return res.data;
|
|
4437
4501
|
}
|
|
4438
|
-
/**
|
|
4502
|
+
/**
|
|
4503
|
+
* List goals for a dynamic scan.
|
|
4504
|
+
* @param jobId - The job UUID.
|
|
4505
|
+
* @param opts - Optional pagination, search, and filter options.
|
|
4506
|
+
* @returns The paginated list of goals.
|
|
4507
|
+
*/
|
|
4439
4508
|
async listGoals(jobId, opts) {
|
|
4440
4509
|
validateJobId(jobId);
|
|
4441
|
-
const params =
|
|
4510
|
+
const params = buildRedTeamListParams(opts);
|
|
4442
4511
|
if (opts?.goal_type !== void 0) params.goal_type = opts.goal_type;
|
|
4443
4512
|
if (opts?.status !== void 0) params.status = opts.status;
|
|
4444
4513
|
if (opts?.count !== void 0) params.count = String(opts.count);
|
|
@@ -4452,7 +4521,13 @@ var RedTeamReportsClient = class {
|
|
|
4452
4521
|
});
|
|
4453
4522
|
return res.data;
|
|
4454
4523
|
}
|
|
4455
|
-
/**
|
|
4524
|
+
/**
|
|
4525
|
+
* List streams for a goal in a dynamic scan.
|
|
4526
|
+
* @param jobId - The job UUID.
|
|
4527
|
+
* @param goalId - The goal UUID.
|
|
4528
|
+
* @param opts - Optional pagination and search options.
|
|
4529
|
+
* @returns The paginated list of streams.
|
|
4530
|
+
*/
|
|
4456
4531
|
async listGoalStreams(jobId, goalId, opts) {
|
|
4457
4532
|
validateJobId(jobId);
|
|
4458
4533
|
if (!isValidUuid(goalId)) {
|
|
@@ -4465,7 +4540,7 @@ var RedTeamReportsClient = class {
|
|
|
4465
4540
|
method: "GET",
|
|
4466
4541
|
baseUrl: this.baseUrl,
|
|
4467
4542
|
path: `${RED_TEAM_REPORT_DYNAMIC_PATH}/${jobId}/goal/${goalId}/list-streams`,
|
|
4468
|
-
params:
|
|
4543
|
+
params: buildRedTeamListParams(opts),
|
|
4469
4544
|
oauthClient: this.oauthClient,
|
|
4470
4545
|
numRetries: this.numRetries
|
|
4471
4546
|
});
|
|
@@ -4474,7 +4549,11 @@ var RedTeamReportsClient = class {
|
|
|
4474
4549
|
// -----------------------------------------------------------------------
|
|
4475
4550
|
// Common report endpoints
|
|
4476
4551
|
// -----------------------------------------------------------------------
|
|
4477
|
-
/**
|
|
4552
|
+
/**
|
|
4553
|
+
* Get stream details by stream ID.
|
|
4554
|
+
* @param streamId - The stream UUID.
|
|
4555
|
+
* @returns The stream detail response.
|
|
4556
|
+
*/
|
|
4478
4557
|
async getStreamDetail(streamId) {
|
|
4479
4558
|
if (!isValidUuid(streamId)) {
|
|
4480
4559
|
throw new AISecSDKException(
|
|
@@ -4491,7 +4570,12 @@ var RedTeamReportsClient = class {
|
|
|
4491
4570
|
});
|
|
4492
4571
|
return res.data;
|
|
4493
4572
|
}
|
|
4494
|
-
/**
|
|
4573
|
+
/**
|
|
4574
|
+
* Download a report in the specified format.
|
|
4575
|
+
* @param jobId - The job UUID.
|
|
4576
|
+
* @param format - The file format (e.g. "pdf", "csv").
|
|
4577
|
+
* @returns The downloaded report data.
|
|
4578
|
+
*/
|
|
4495
4579
|
async downloadReport(jobId, format) {
|
|
4496
4580
|
validateJobId(jobId);
|
|
4497
4581
|
const params = { file_format: format };
|
|
@@ -4505,7 +4589,11 @@ var RedTeamReportsClient = class {
|
|
|
4505
4589
|
});
|
|
4506
4590
|
return res.data;
|
|
4507
4591
|
}
|
|
4508
|
-
/**
|
|
4592
|
+
/**
|
|
4593
|
+
* Generate a partial report for a running scan.
|
|
4594
|
+
* @param jobId - The job UUID.
|
|
4595
|
+
* @returns The partial report data.
|
|
4596
|
+
*/
|
|
4509
4597
|
async generatePartialReport(jobId) {
|
|
4510
4598
|
validateJobId(jobId);
|
|
4511
4599
|
const res = await managementHttpRequest({
|
|
@@ -4520,13 +4608,6 @@ var RedTeamReportsClient = class {
|
|
|
4520
4608
|
};
|
|
4521
4609
|
|
|
4522
4610
|
// src/red-team/custom-attack-reports-client.ts
|
|
4523
|
-
function buildListParams3(opts) {
|
|
4524
|
-
const params = {};
|
|
4525
|
-
if (opts?.skip !== void 0) params.skip = String(opts.skip);
|
|
4526
|
-
if (opts?.limit !== void 0) params.limit = String(opts.limit);
|
|
4527
|
-
if (opts?.search !== void 0) params.search = opts.search;
|
|
4528
|
-
return params;
|
|
4529
|
-
}
|
|
4530
4611
|
function validateJobId2(jobId) {
|
|
4531
4612
|
if (!isValidUuid(jobId)) {
|
|
4532
4613
|
throw new AISecSDKException(`Invalid job id: ${jobId}`, "AISEC_USER_REQUEST_PAYLOAD_ERROR" /* USER_REQUEST_PAYLOAD_ERROR */);
|
|
@@ -4541,7 +4622,11 @@ var RedTeamCustomAttackReportsClient = class {
|
|
|
4541
4622
|
this.oauthClient = opts.oauthClient;
|
|
4542
4623
|
this.numRetries = opts.numRetries;
|
|
4543
4624
|
}
|
|
4544
|
-
/**
|
|
4625
|
+
/**
|
|
4626
|
+
* Get custom attack report for a scan.
|
|
4627
|
+
* @param jobId - The job UUID.
|
|
4628
|
+
* @returns The custom attack report response.
|
|
4629
|
+
*/
|
|
4545
4630
|
async getReport(jobId) {
|
|
4546
4631
|
validateJobId2(jobId);
|
|
4547
4632
|
const res = await managementHttpRequest({
|
|
@@ -4553,7 +4638,11 @@ var RedTeamCustomAttackReportsClient = class {
|
|
|
4553
4638
|
});
|
|
4554
4639
|
return res.data;
|
|
4555
4640
|
}
|
|
4556
|
-
/**
|
|
4641
|
+
/**
|
|
4642
|
+
* Get prompt sets for a custom attack scan.
|
|
4643
|
+
* @param jobId - The job UUID.
|
|
4644
|
+
* @returns The prompt sets report response.
|
|
4645
|
+
*/
|
|
4557
4646
|
async getPromptSets(jobId) {
|
|
4558
4647
|
validateJobId2(jobId);
|
|
4559
4648
|
const res = await managementHttpRequest({
|
|
@@ -4565,7 +4654,13 @@ var RedTeamCustomAttackReportsClient = class {
|
|
|
4565
4654
|
});
|
|
4566
4655
|
return res.data;
|
|
4567
4656
|
}
|
|
4568
|
-
/**
|
|
4657
|
+
/**
|
|
4658
|
+
* Get prompts for a specific prompt set in a scan.
|
|
4659
|
+
* @param jobId - The job UUID.
|
|
4660
|
+
* @param promptSetId - The prompt set UUID.
|
|
4661
|
+
* @param opts - Optional pagination, search, and filter options.
|
|
4662
|
+
* @returns The list of prompt detail responses.
|
|
4663
|
+
*/
|
|
4569
4664
|
async getPromptsBySet(jobId, promptSetId, opts) {
|
|
4570
4665
|
validateJobId2(jobId);
|
|
4571
4666
|
if (!isValidUuid(promptSetId)) {
|
|
@@ -4574,7 +4669,7 @@ var RedTeamCustomAttackReportsClient = class {
|
|
|
4574
4669
|
"AISEC_USER_REQUEST_PAYLOAD_ERROR" /* USER_REQUEST_PAYLOAD_ERROR */
|
|
4575
4670
|
);
|
|
4576
4671
|
}
|
|
4577
|
-
const params =
|
|
4672
|
+
const params = buildRedTeamListParams(opts);
|
|
4578
4673
|
if (opts?.is_threat !== void 0) params.is_threat = String(opts.is_threat);
|
|
4579
4674
|
const res = await managementHttpRequest({
|
|
4580
4675
|
method: "GET",
|
|
@@ -4586,7 +4681,12 @@ var RedTeamCustomAttackReportsClient = class {
|
|
|
4586
4681
|
});
|
|
4587
4682
|
return res.data;
|
|
4588
4683
|
}
|
|
4589
|
-
/**
|
|
4684
|
+
/**
|
|
4685
|
+
* Get details for a specific prompt.
|
|
4686
|
+
* @param jobId - The job UUID.
|
|
4687
|
+
* @param promptId - The prompt UUID.
|
|
4688
|
+
* @returns The prompt detail response.
|
|
4689
|
+
*/
|
|
4590
4690
|
async getPromptDetail(jobId, promptId) {
|
|
4591
4691
|
validateJobId2(jobId);
|
|
4592
4692
|
if (!isValidUuid(promptId)) {
|
|
@@ -4604,10 +4704,15 @@ var RedTeamCustomAttackReportsClient = class {
|
|
|
4604
4704
|
});
|
|
4605
4705
|
return res.data;
|
|
4606
4706
|
}
|
|
4607
|
-
/**
|
|
4707
|
+
/**
|
|
4708
|
+
* List custom attacks for a scan.
|
|
4709
|
+
* @param jobId - The job UUID.
|
|
4710
|
+
* @param opts - Optional pagination, search, and filter options.
|
|
4711
|
+
* @returns The paginated list of custom attacks.
|
|
4712
|
+
*/
|
|
4608
4713
|
async listCustomAttacks(jobId, opts) {
|
|
4609
4714
|
validateJobId2(jobId);
|
|
4610
|
-
const params =
|
|
4715
|
+
const params = buildRedTeamListParams(opts);
|
|
4611
4716
|
if (opts?.threat !== void 0) params.threat = String(opts.threat);
|
|
4612
4717
|
if (opts?.prompt_set_id !== void 0) params.prompt_set_id = opts.prompt_set_id;
|
|
4613
4718
|
if (opts?.property_value !== void 0) params.property_value = opts.property_value;
|
|
@@ -4621,7 +4726,12 @@ var RedTeamCustomAttackReportsClient = class {
|
|
|
4621
4726
|
});
|
|
4622
4727
|
return res.data;
|
|
4623
4728
|
}
|
|
4624
|
-
/**
|
|
4729
|
+
/**
|
|
4730
|
+
* Get attack outputs for a custom attack.
|
|
4731
|
+
* @param jobId - The job UUID.
|
|
4732
|
+
* @param attackId - The attack UUID.
|
|
4733
|
+
* @returns The list of attack outputs.
|
|
4734
|
+
*/
|
|
4625
4735
|
async getAttackOutputs(jobId, attackId) {
|
|
4626
4736
|
validateJobId2(jobId);
|
|
4627
4737
|
if (!isValidUuid(attackId)) {
|
|
@@ -4639,7 +4749,11 @@ var RedTeamCustomAttackReportsClient = class {
|
|
|
4639
4749
|
});
|
|
4640
4750
|
return res.data;
|
|
4641
4751
|
}
|
|
4642
|
-
/**
|
|
4752
|
+
/**
|
|
4753
|
+
* Get property statistics for a custom attack scan.
|
|
4754
|
+
* @param jobId - The job UUID.
|
|
4755
|
+
* @returns The list of property statistics.
|
|
4756
|
+
*/
|
|
4643
4757
|
async getPropertyStats(jobId) {
|
|
4644
4758
|
validateJobId2(jobId);
|
|
4645
4759
|
const res = await managementHttpRequest({
|
|
@@ -4654,13 +4768,6 @@ var RedTeamCustomAttackReportsClient = class {
|
|
|
4654
4768
|
};
|
|
4655
4769
|
|
|
4656
4770
|
// src/red-team/targets-client.ts
|
|
4657
|
-
function buildListParams4(opts) {
|
|
4658
|
-
const params = {};
|
|
4659
|
-
if (opts?.skip !== void 0) params.skip = String(opts.skip);
|
|
4660
|
-
if (opts?.limit !== void 0) params.limit = String(opts.limit);
|
|
4661
|
-
if (opts?.search !== void 0) params.search = opts.search;
|
|
4662
|
-
return params;
|
|
4663
|
-
}
|
|
4664
4771
|
var RedTeamTargetsClient = class {
|
|
4665
4772
|
baseUrl;
|
|
4666
4773
|
oauthClient;
|
|
@@ -4690,9 +4797,13 @@ var RedTeamTargetsClient = class {
|
|
|
4690
4797
|
});
|
|
4691
4798
|
return res.data;
|
|
4692
4799
|
}
|
|
4693
|
-
/**
|
|
4800
|
+
/**
|
|
4801
|
+
* List targets with optional filters.
|
|
4802
|
+
* @param opts - Optional pagination, search, and filter options.
|
|
4803
|
+
* @returns The paginated list of targets.
|
|
4804
|
+
*/
|
|
4694
4805
|
async list(opts) {
|
|
4695
|
-
const params =
|
|
4806
|
+
const params = buildRedTeamListParams(opts);
|
|
4696
4807
|
if (opts?.target_type !== void 0) params.target_type = opts.target_type;
|
|
4697
4808
|
if (opts?.status !== void 0) params.status = opts.status;
|
|
4698
4809
|
const res = await managementHttpRequest({
|
|
@@ -4705,7 +4816,11 @@ var RedTeamTargetsClient = class {
|
|
|
4705
4816
|
});
|
|
4706
4817
|
return res.data;
|
|
4707
4818
|
}
|
|
4708
|
-
/**
|
|
4819
|
+
/**
|
|
4820
|
+
* Get a target by UUID.
|
|
4821
|
+
* @param uuid - The target UUID.
|
|
4822
|
+
* @returns The target response.
|
|
4823
|
+
*/
|
|
4709
4824
|
async get(uuid) {
|
|
4710
4825
|
if (!isValidUuid(uuid)) {
|
|
4711
4826
|
throw new AISecSDKException(
|
|
@@ -4722,7 +4837,13 @@ var RedTeamTargetsClient = class {
|
|
|
4722
4837
|
});
|
|
4723
4838
|
return res.data;
|
|
4724
4839
|
}
|
|
4725
|
-
/**
|
|
4840
|
+
/**
|
|
4841
|
+
* Update a target.
|
|
4842
|
+
* @param uuid - The target UUID.
|
|
4843
|
+
* @param request - Target update request body.
|
|
4844
|
+
* @param opts - Optional operation options (e.g. validate connection).
|
|
4845
|
+
* @returns The updated target response.
|
|
4846
|
+
*/
|
|
4726
4847
|
async update(uuid, request, opts) {
|
|
4727
4848
|
if (!isValidUuid(uuid)) {
|
|
4728
4849
|
throw new AISecSDKException(
|
|
@@ -4743,7 +4864,11 @@ var RedTeamTargetsClient = class {
|
|
|
4743
4864
|
});
|
|
4744
4865
|
return res.data;
|
|
4745
4866
|
}
|
|
4746
|
-
/**
|
|
4867
|
+
/**
|
|
4868
|
+
* Delete a target.
|
|
4869
|
+
* @param uuid - The target UUID.
|
|
4870
|
+
* @returns The delete response.
|
|
4871
|
+
*/
|
|
4747
4872
|
async delete(uuid) {
|
|
4748
4873
|
if (!isValidUuid(uuid)) {
|
|
4749
4874
|
throw new AISecSDKException(
|
|
@@ -4760,7 +4885,11 @@ var RedTeamTargetsClient = class {
|
|
|
4760
4885
|
});
|
|
4761
4886
|
return res.data;
|
|
4762
4887
|
}
|
|
4763
|
-
/**
|
|
4888
|
+
/**
|
|
4889
|
+
* Run profiling probes on a target.
|
|
4890
|
+
* @param request - The probe request body.
|
|
4891
|
+
* @returns The target response after probing.
|
|
4892
|
+
*/
|
|
4764
4893
|
async probe(request) {
|
|
4765
4894
|
const res = await managementHttpRequest({
|
|
4766
4895
|
method: "POST",
|
|
@@ -4772,7 +4901,11 @@ var RedTeamTargetsClient = class {
|
|
|
4772
4901
|
});
|
|
4773
4902
|
return res.data;
|
|
4774
4903
|
}
|
|
4775
|
-
/**
|
|
4904
|
+
/**
|
|
4905
|
+
* Get profiling results for a target.
|
|
4906
|
+
* @param uuid - The target UUID.
|
|
4907
|
+
* @returns The target profile response.
|
|
4908
|
+
*/
|
|
4776
4909
|
async getProfile(uuid) {
|
|
4777
4910
|
if (!isValidUuid(uuid)) {
|
|
4778
4911
|
throw new AISecSDKException(
|
|
@@ -4789,7 +4922,12 @@ var RedTeamTargetsClient = class {
|
|
|
4789
4922
|
});
|
|
4790
4923
|
return res.data;
|
|
4791
4924
|
}
|
|
4792
|
-
/**
|
|
4925
|
+
/**
|
|
4926
|
+
* Update a target profile (background + additional context).
|
|
4927
|
+
* @param uuid - The target UUID.
|
|
4928
|
+
* @param request - The context update request body.
|
|
4929
|
+
* @returns The updated target response.
|
|
4930
|
+
*/
|
|
4793
4931
|
async updateProfile(uuid, request) {
|
|
4794
4932
|
if (!isValidUuid(uuid)) {
|
|
4795
4933
|
throw new AISecSDKException(
|
|
@@ -4810,13 +4948,6 @@ var RedTeamTargetsClient = class {
|
|
|
4810
4948
|
};
|
|
4811
4949
|
|
|
4812
4950
|
// src/red-team/custom-attacks-client.ts
|
|
4813
|
-
function buildListParams5(opts) {
|
|
4814
|
-
const params = {};
|
|
4815
|
-
if (opts?.skip !== void 0) params.skip = String(opts.skip);
|
|
4816
|
-
if (opts?.limit !== void 0) params.limit = String(opts.limit);
|
|
4817
|
-
if (opts?.search !== void 0) params.search = opts.search;
|
|
4818
|
-
return params;
|
|
4819
|
-
}
|
|
4820
4951
|
function validateUuid(uuid, label) {
|
|
4821
4952
|
if (!isValidUuid(uuid)) {
|
|
4822
4953
|
throw new AISecSDKException(`Invalid ${label}: ${uuid}`, "AISEC_USER_REQUEST_PAYLOAD_ERROR" /* USER_REQUEST_PAYLOAD_ERROR */);
|
|
@@ -4834,7 +4965,11 @@ var RedTeamCustomAttacksClient = class {
|
|
|
4834
4965
|
// -----------------------------------------------------------------------
|
|
4835
4966
|
// Prompt Set operations
|
|
4836
4967
|
// -----------------------------------------------------------------------
|
|
4837
|
-
/**
|
|
4968
|
+
/**
|
|
4969
|
+
* Create a new custom prompt set.
|
|
4970
|
+
* @param request - Prompt set creation request body.
|
|
4971
|
+
* @returns The created prompt set response.
|
|
4972
|
+
*/
|
|
4838
4973
|
async createPromptSet(request) {
|
|
4839
4974
|
const res = await managementHttpRequest({
|
|
4840
4975
|
method: "POST",
|
|
@@ -4846,9 +4981,13 @@ var RedTeamCustomAttacksClient = class {
|
|
|
4846
4981
|
});
|
|
4847
4982
|
return res.data;
|
|
4848
4983
|
}
|
|
4849
|
-
/**
|
|
4984
|
+
/**
|
|
4985
|
+
* List custom prompt sets.
|
|
4986
|
+
* @param opts - Optional pagination, search, and filter options.
|
|
4987
|
+
* @returns The paginated list of prompt sets.
|
|
4988
|
+
*/
|
|
4850
4989
|
async listPromptSets(opts) {
|
|
4851
|
-
const params =
|
|
4990
|
+
const params = buildRedTeamListParams(opts);
|
|
4852
4991
|
if (opts?.status !== void 0) params.status = opts.status;
|
|
4853
4992
|
if (opts?.active !== void 0) params.active = String(opts.active);
|
|
4854
4993
|
if (opts?.archive !== void 0) params.archive = String(opts.archive);
|
|
@@ -4862,7 +5001,11 @@ var RedTeamCustomAttacksClient = class {
|
|
|
4862
5001
|
});
|
|
4863
5002
|
return res.data;
|
|
4864
5003
|
}
|
|
4865
|
-
/**
|
|
5004
|
+
/**
|
|
5005
|
+
* Get a prompt set by UUID.
|
|
5006
|
+
* @param uuid - The prompt set UUID.
|
|
5007
|
+
* @returns The prompt set response.
|
|
5008
|
+
*/
|
|
4866
5009
|
async getPromptSet(uuid) {
|
|
4867
5010
|
validateUuid(uuid, "prompt set uuid");
|
|
4868
5011
|
const res = await managementHttpRequest({
|
|
@@ -4874,7 +5017,12 @@ var RedTeamCustomAttacksClient = class {
|
|
|
4874
5017
|
});
|
|
4875
5018
|
return res.data;
|
|
4876
5019
|
}
|
|
4877
|
-
/**
|
|
5020
|
+
/**
|
|
5021
|
+
* Update a prompt set.
|
|
5022
|
+
* @param uuid - The prompt set UUID.
|
|
5023
|
+
* @param request - Prompt set update request body.
|
|
5024
|
+
* @returns The updated prompt set response.
|
|
5025
|
+
*/
|
|
4878
5026
|
async updatePromptSet(uuid, request) {
|
|
4879
5027
|
validateUuid(uuid, "prompt set uuid");
|
|
4880
5028
|
const res = await managementHttpRequest({
|
|
@@ -4887,7 +5035,12 @@ var RedTeamCustomAttacksClient = class {
|
|
|
4887
5035
|
});
|
|
4888
5036
|
return res.data;
|
|
4889
5037
|
}
|
|
4890
|
-
/**
|
|
5038
|
+
/**
|
|
5039
|
+
* Archive or unarchive a prompt set.
|
|
5040
|
+
* @param uuid - The prompt set UUID.
|
|
5041
|
+
* @param request - Archive request body.
|
|
5042
|
+
* @returns The updated prompt set response.
|
|
5043
|
+
*/
|
|
4891
5044
|
async archivePromptSet(uuid, request) {
|
|
4892
5045
|
validateUuid(uuid, "prompt set uuid");
|
|
4893
5046
|
const res = await managementHttpRequest({
|
|
@@ -4900,7 +5053,11 @@ var RedTeamCustomAttacksClient = class {
|
|
|
4900
5053
|
});
|
|
4901
5054
|
return res.data;
|
|
4902
5055
|
}
|
|
4903
|
-
/**
|
|
5056
|
+
/**
|
|
5057
|
+
* Resolve a prompt set reference for data plane consumption.
|
|
5058
|
+
* @param uuid - The prompt set UUID.
|
|
5059
|
+
* @returns The prompt set reference.
|
|
5060
|
+
*/
|
|
4904
5061
|
async getPromptSetReference(uuid) {
|
|
4905
5062
|
validateUuid(uuid, "prompt set uuid");
|
|
4906
5063
|
const res = await managementHttpRequest({
|
|
@@ -4912,7 +5069,11 @@ var RedTeamCustomAttacksClient = class {
|
|
|
4912
5069
|
});
|
|
4913
5070
|
return res.data;
|
|
4914
5071
|
}
|
|
4915
|
-
/**
|
|
5072
|
+
/**
|
|
5073
|
+
* Get version information for a prompt set.
|
|
5074
|
+
* @param uuid - The prompt set UUID.
|
|
5075
|
+
* @returns The prompt set version info.
|
|
5076
|
+
*/
|
|
4916
5077
|
async getPromptSetVersionInfo(uuid) {
|
|
4917
5078
|
validateUuid(uuid, "prompt set uuid");
|
|
4918
5079
|
const res = await managementHttpRequest({
|
|
@@ -4924,7 +5085,10 @@ var RedTeamCustomAttacksClient = class {
|
|
|
4924
5085
|
});
|
|
4925
5086
|
return res.data;
|
|
4926
5087
|
}
|
|
4927
|
-
/**
|
|
5088
|
+
/**
|
|
5089
|
+
* List active prompt sets (for data plane).
|
|
5090
|
+
* @returns The list of active prompt sets.
|
|
5091
|
+
*/
|
|
4928
5092
|
async listActivePromptSets() {
|
|
4929
5093
|
const res = await managementHttpRequest({
|
|
4930
5094
|
method: "GET",
|
|
@@ -4935,7 +5099,11 @@ var RedTeamCustomAttacksClient = class {
|
|
|
4935
5099
|
});
|
|
4936
5100
|
return res.data;
|
|
4937
5101
|
}
|
|
4938
|
-
/**
|
|
5102
|
+
/**
|
|
5103
|
+
* Download CSV template for a prompt set.
|
|
5104
|
+
* @param uuid - The prompt set UUID.
|
|
5105
|
+
* @returns The CSV template data.
|
|
5106
|
+
*/
|
|
4939
5107
|
async downloadTemplate(uuid) {
|
|
4940
5108
|
validateUuid(uuid, "prompt set uuid");
|
|
4941
5109
|
const res = await managementHttpRequest({
|
|
@@ -4947,7 +5115,12 @@ var RedTeamCustomAttacksClient = class {
|
|
|
4947
5115
|
});
|
|
4948
5116
|
return res.data;
|
|
4949
5117
|
}
|
|
4950
|
-
/**
|
|
5118
|
+
/**
|
|
5119
|
+
* Upload a CSV file of custom prompts for a prompt set.
|
|
5120
|
+
* @param promptSetUuid - The prompt set UUID.
|
|
5121
|
+
* @param file - The CSV file blob.
|
|
5122
|
+
* @returns The upload response.
|
|
5123
|
+
*/
|
|
4951
5124
|
async uploadPromptsCsv(promptSetUuid, file) {
|
|
4952
5125
|
validateUuid(promptSetUuid, "prompt set uuid");
|
|
4953
5126
|
const token = await this.oauthClient.getToken();
|
|
@@ -4977,7 +5150,11 @@ var RedTeamCustomAttacksClient = class {
|
|
|
4977
5150
|
// -----------------------------------------------------------------------
|
|
4978
5151
|
// Prompt operations
|
|
4979
5152
|
// -----------------------------------------------------------------------
|
|
4980
|
-
/**
|
|
5153
|
+
/**
|
|
5154
|
+
* Create a new custom prompt.
|
|
5155
|
+
* @param request - Prompt creation request body.
|
|
5156
|
+
* @returns The created prompt response.
|
|
5157
|
+
*/
|
|
4981
5158
|
async createPrompt(request) {
|
|
4982
5159
|
const res = await managementHttpRequest({
|
|
4983
5160
|
method: "POST",
|
|
@@ -4989,10 +5166,15 @@ var RedTeamCustomAttacksClient = class {
|
|
|
4989
5166
|
});
|
|
4990
5167
|
return res.data;
|
|
4991
5168
|
}
|
|
4992
|
-
/**
|
|
5169
|
+
/**
|
|
5170
|
+
* List prompts in a prompt set.
|
|
5171
|
+
* @param promptSetUuid - The prompt set UUID.
|
|
5172
|
+
* @param opts - Optional pagination, search, and filter options.
|
|
5173
|
+
* @returns The paginated list of prompts.
|
|
5174
|
+
*/
|
|
4993
5175
|
async listPrompts(promptSetUuid, opts) {
|
|
4994
5176
|
validateUuid(promptSetUuid, "prompt set uuid");
|
|
4995
|
-
const params =
|
|
5177
|
+
const params = buildRedTeamListParams(opts);
|
|
4996
5178
|
if (opts?.active !== void 0) params.active = String(opts.active);
|
|
4997
5179
|
const res = await managementHttpRequest({
|
|
4998
5180
|
method: "GET",
|
|
@@ -5004,7 +5186,12 @@ var RedTeamCustomAttacksClient = class {
|
|
|
5004
5186
|
});
|
|
5005
5187
|
return res.data;
|
|
5006
5188
|
}
|
|
5007
|
-
/**
|
|
5189
|
+
/**
|
|
5190
|
+
* Get a prompt by UUID.
|
|
5191
|
+
* @param promptSetUuid - The prompt set UUID.
|
|
5192
|
+
* @param promptUuid - The prompt UUID.
|
|
5193
|
+
* @returns The prompt response.
|
|
5194
|
+
*/
|
|
5008
5195
|
async getPrompt(promptSetUuid, promptUuid) {
|
|
5009
5196
|
validateUuid(promptSetUuid, "prompt set uuid");
|
|
5010
5197
|
validateUuid(promptUuid, "prompt uuid");
|
|
@@ -5017,7 +5204,13 @@ var RedTeamCustomAttacksClient = class {
|
|
|
5017
5204
|
});
|
|
5018
5205
|
return res.data;
|
|
5019
5206
|
}
|
|
5020
|
-
/**
|
|
5207
|
+
/**
|
|
5208
|
+
* Update a prompt.
|
|
5209
|
+
* @param promptSetUuid - The prompt set UUID.
|
|
5210
|
+
* @param promptUuid - The prompt UUID.
|
|
5211
|
+
* @param request - Prompt update request body.
|
|
5212
|
+
* @returns The updated prompt response.
|
|
5213
|
+
*/
|
|
5021
5214
|
async updatePrompt(promptSetUuid, promptUuid, request) {
|
|
5022
5215
|
validateUuid(promptSetUuid, "prompt set uuid");
|
|
5023
5216
|
validateUuid(promptUuid, "prompt uuid");
|
|
@@ -5031,7 +5224,12 @@ var RedTeamCustomAttacksClient = class {
|
|
|
5031
5224
|
});
|
|
5032
5225
|
return res.data;
|
|
5033
5226
|
}
|
|
5034
|
-
/**
|
|
5227
|
+
/**
|
|
5228
|
+
* Delete a prompt.
|
|
5229
|
+
* @param promptSetUuid - The prompt set UUID.
|
|
5230
|
+
* @param promptUuid - The prompt UUID.
|
|
5231
|
+
* @returns The delete response.
|
|
5232
|
+
*/
|
|
5035
5233
|
async deletePrompt(promptSetUuid, promptUuid) {
|
|
5036
5234
|
validateUuid(promptSetUuid, "prompt set uuid");
|
|
5037
5235
|
validateUuid(promptUuid, "prompt uuid");
|
|
@@ -5047,7 +5245,10 @@ var RedTeamCustomAttacksClient = class {
|
|
|
5047
5245
|
// -----------------------------------------------------------------------
|
|
5048
5246
|
// Property operations
|
|
5049
5247
|
// -----------------------------------------------------------------------
|
|
5050
|
-
/**
|
|
5248
|
+
/**
|
|
5249
|
+
* Get all property names.
|
|
5250
|
+
* @returns The list of property names.
|
|
5251
|
+
*/
|
|
5051
5252
|
async getPropertyNames() {
|
|
5052
5253
|
const res = await managementHttpRequest({
|
|
5053
5254
|
method: "GET",
|
|
@@ -5058,7 +5259,11 @@ var RedTeamCustomAttacksClient = class {
|
|
|
5058
5259
|
});
|
|
5059
5260
|
return res.data;
|
|
5060
5261
|
}
|
|
5061
|
-
/**
|
|
5262
|
+
/**
|
|
5263
|
+
* Create a new property name.
|
|
5264
|
+
* @param request - Property name creation request body.
|
|
5265
|
+
* @returns The creation response.
|
|
5266
|
+
*/
|
|
5062
5267
|
async createPropertyName(request) {
|
|
5063
5268
|
const res = await managementHttpRequest({
|
|
5064
5269
|
method: "POST",
|
|
@@ -5070,7 +5275,11 @@ var RedTeamCustomAttacksClient = class {
|
|
|
5070
5275
|
});
|
|
5071
5276
|
return res.data;
|
|
5072
5277
|
}
|
|
5073
|
-
/**
|
|
5278
|
+
/**
|
|
5279
|
+
* Get values for a property name.
|
|
5280
|
+
* @param propertyName - The property name to look up.
|
|
5281
|
+
* @returns The property values response.
|
|
5282
|
+
*/
|
|
5074
5283
|
async getPropertyValues(propertyName) {
|
|
5075
5284
|
const res = await managementHttpRequest({
|
|
5076
5285
|
method: "GET",
|
|
@@ -5081,7 +5290,11 @@ var RedTeamCustomAttacksClient = class {
|
|
|
5081
5290
|
});
|
|
5082
5291
|
return res.data;
|
|
5083
5292
|
}
|
|
5084
|
-
/**
|
|
5293
|
+
/**
|
|
5294
|
+
* Get values for multiple property names.
|
|
5295
|
+
* @param propertyNames - Array of property names to look up.
|
|
5296
|
+
* @returns The property values for all requested names.
|
|
5297
|
+
*/
|
|
5085
5298
|
async getPropertyValuesMultiple(propertyNames) {
|
|
5086
5299
|
const url = new URL(`https://placeholder${RED_TEAM_CUSTOM_ATTACK_PATH}/property-values`);
|
|
5087
5300
|
for (const name of propertyNames) {
|
|
@@ -5098,7 +5311,11 @@ var RedTeamCustomAttacksClient = class {
|
|
|
5098
5311
|
});
|
|
5099
5312
|
return res.data;
|
|
5100
5313
|
}
|
|
5101
|
-
/**
|
|
5314
|
+
/**
|
|
5315
|
+
* Create a property value.
|
|
5316
|
+
* @param request - Property value creation request body.
|
|
5317
|
+
* @returns The creation response.
|
|
5318
|
+
*/
|
|
5102
5319
|
async createPropertyValue(request) {
|
|
5103
5320
|
const res = await managementHttpRequest({
|
|
5104
5321
|
method: "POST",
|
|
@@ -5113,13 +5330,6 @@ var RedTeamCustomAttacksClient = class {
|
|
|
5113
5330
|
};
|
|
5114
5331
|
|
|
5115
5332
|
// src/red-team/client.ts
|
|
5116
|
-
function buildListParams6(opts) {
|
|
5117
|
-
const params = {};
|
|
5118
|
-
if (opts?.skip !== void 0) params.skip = String(opts.skip);
|
|
5119
|
-
if (opts?.limit !== void 0) params.limit = String(opts.limit);
|
|
5120
|
-
if (opts?.search !== void 0) params.search = opts.search;
|
|
5121
|
-
return params;
|
|
5122
|
-
}
|
|
5123
5333
|
var RedTeamClient = class {
|
|
5124
5334
|
/** Data plane scan operations. */
|
|
5125
5335
|
scans;
|
|
@@ -5197,7 +5407,11 @@ var RedTeamClient = class {
|
|
|
5197
5407
|
// -----------------------------------------------------------------------
|
|
5198
5408
|
// Data plane convenience methods
|
|
5199
5409
|
// -----------------------------------------------------------------------
|
|
5200
|
-
/**
|
|
5410
|
+
/**
|
|
5411
|
+
* Get scan statistics and risk profile (data plane dashboard).
|
|
5412
|
+
* @param params - Optional date range and target ID filters.
|
|
5413
|
+
* @returns The scan statistics response.
|
|
5414
|
+
*/
|
|
5201
5415
|
async getScanStatistics(params) {
|
|
5202
5416
|
const p = {};
|
|
5203
5417
|
if (params?.date_range !== void 0) p.date_range = params.date_range;
|
|
@@ -5212,7 +5426,11 @@ var RedTeamClient = class {
|
|
|
5212
5426
|
});
|
|
5213
5427
|
return res.data;
|
|
5214
5428
|
}
|
|
5215
|
-
/**
|
|
5429
|
+
/**
|
|
5430
|
+
* Get score trend for a target (data plane dashboard).
|
|
5431
|
+
* @param targetId - The target UUID.
|
|
5432
|
+
* @returns The score trend response.
|
|
5433
|
+
*/
|
|
5216
5434
|
async getScoreTrend(targetId) {
|
|
5217
5435
|
if (!isValidUuid(targetId)) {
|
|
5218
5436
|
throw new AISecSDKException(
|
|
@@ -5230,7 +5448,10 @@ var RedTeamClient = class {
|
|
|
5230
5448
|
});
|
|
5231
5449
|
return res.data;
|
|
5232
5450
|
}
|
|
5233
|
-
/**
|
|
5451
|
+
/**
|
|
5452
|
+
* Get quota summary.
|
|
5453
|
+
* @returns The quota summary.
|
|
5454
|
+
*/
|
|
5234
5455
|
async getQuota() {
|
|
5235
5456
|
const res = await managementHttpRequest({
|
|
5236
5457
|
method: "POST",
|
|
@@ -5241,7 +5462,12 @@ var RedTeamClient = class {
|
|
|
5241
5462
|
});
|
|
5242
5463
|
return res.data;
|
|
5243
5464
|
}
|
|
5244
|
-
/**
|
|
5465
|
+
/**
|
|
5466
|
+
* List error logs for a scan job.
|
|
5467
|
+
* @param jobId - The job UUID.
|
|
5468
|
+
* @param opts - Optional pagination and search options.
|
|
5469
|
+
* @returns The paginated list of error logs.
|
|
5470
|
+
*/
|
|
5245
5471
|
async getErrorLogs(jobId, opts) {
|
|
5246
5472
|
if (!isValidUuid(jobId)) {
|
|
5247
5473
|
throw new AISecSDKException(`Invalid job id: ${jobId}`, "AISEC_USER_REQUEST_PAYLOAD_ERROR" /* USER_REQUEST_PAYLOAD_ERROR */);
|
|
@@ -5250,13 +5476,17 @@ var RedTeamClient = class {
|
|
|
5250
5476
|
method: "GET",
|
|
5251
5477
|
baseUrl: this.dataEndpoint,
|
|
5252
5478
|
path: `${RED_TEAM_ERROR_LOG_PATH}/${jobId}`,
|
|
5253
|
-
params:
|
|
5479
|
+
params: buildRedTeamListParams(opts),
|
|
5254
5480
|
oauthClient: this.oauthClient,
|
|
5255
5481
|
numRetries: this.numRetries
|
|
5256
5482
|
});
|
|
5257
5483
|
return res.data;
|
|
5258
5484
|
}
|
|
5259
|
-
/**
|
|
5485
|
+
/**
|
|
5486
|
+
* Update sentiment for a scan report.
|
|
5487
|
+
* @param request - The sentiment request body.
|
|
5488
|
+
* @returns The sentiment response.
|
|
5489
|
+
*/
|
|
5260
5490
|
async updateSentiment(request) {
|
|
5261
5491
|
const res = await managementHttpRequest({
|
|
5262
5492
|
method: "POST",
|
|
@@ -5268,7 +5498,11 @@ var RedTeamClient = class {
|
|
|
5268
5498
|
});
|
|
5269
5499
|
return res.data;
|
|
5270
5500
|
}
|
|
5271
|
-
/**
|
|
5501
|
+
/**
|
|
5502
|
+
* Get sentiment for a scan report.
|
|
5503
|
+
* @param jobId - The job UUID.
|
|
5504
|
+
* @returns The sentiment response.
|
|
5505
|
+
*/
|
|
5272
5506
|
async getSentiment(jobId) {
|
|
5273
5507
|
if (!isValidUuid(jobId)) {
|
|
5274
5508
|
throw new AISecSDKException(`Invalid job id: ${jobId}`, "AISEC_USER_REQUEST_PAYLOAD_ERROR" /* USER_REQUEST_PAYLOAD_ERROR */);
|
|
@@ -5285,7 +5519,10 @@ var RedTeamClient = class {
|
|
|
5285
5519
|
// -----------------------------------------------------------------------
|
|
5286
5520
|
// Management plane convenience methods
|
|
5287
5521
|
// -----------------------------------------------------------------------
|
|
5288
|
-
/**
|
|
5522
|
+
/**
|
|
5523
|
+
* Get management dashboard overview.
|
|
5524
|
+
* @returns The dashboard overview response.
|
|
5525
|
+
*/
|
|
5289
5526
|
async getDashboardOverview() {
|
|
5290
5527
|
const res = await managementHttpRequest({
|
|
5291
5528
|
method: "GET",
|