@cdot65/prisma-airs-sdk 0.6.11 → 0.7.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/README.md +6 -2
- package/dist/index.cjs +515 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2174 -118
- package/dist/index.d.ts +2174 -118
- package/dist/index.js +482 -12
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -51,9 +51,12 @@ __export(index_exports, {
|
|
|
51
51
|
AttackOutputSchema: () => AttackOutputSchema,
|
|
52
52
|
AttackStatus: () => AttackStatus,
|
|
53
53
|
AttackType: () => AttackType,
|
|
54
|
+
AuthConfigSchema: () => AuthConfigSchema,
|
|
54
55
|
AuthType: () => AuthType,
|
|
55
56
|
BEARER: () => BEARER,
|
|
56
57
|
BaseResponseSchema: () => BaseResponseSchema,
|
|
58
|
+
BasicAuthAuthConfigSchema: () => BasicAuthAuthConfigSchema,
|
|
59
|
+
BasicAuthLocation: () => BasicAuthLocation,
|
|
57
60
|
BedrockAccessConnectionParamsSchema: () => BedrockAccessConnectionParamsSchema,
|
|
58
61
|
BrandSubCategory: () => BrandSubCategory,
|
|
59
62
|
Category: () => Category,
|
|
@@ -119,11 +122,19 @@ __export(index_exports, {
|
|
|
119
122
|
DeleteProfileResponseSchema: () => DeleteProfileResponseSchema,
|
|
120
123
|
DeleteTopicConflictSchema: () => DeleteTopicConflictSchema,
|
|
121
124
|
DeleteTopicResponseSchema: () => DeleteTopicResponseSchema,
|
|
125
|
+
DeploymentProfileAttributeSchema: () => DeploymentProfileAttributeSchema,
|
|
122
126
|
DeploymentProfileEntrySchema: () => DeploymentProfileEntrySchema,
|
|
127
|
+
DeploymentProfileRequestSchema: () => DeploymentProfileRequestSchema,
|
|
123
128
|
DeploymentProfilesClient: () => DeploymentProfilesClient,
|
|
124
129
|
DeploymentProfilesResponseSchema: () => DeploymentProfilesResponseSchema,
|
|
125
130
|
DetectionServiceName: () => DetectionServiceName,
|
|
126
131
|
DetectionServiceResultSchema: () => DetectionServiceResultSchema,
|
|
132
|
+
DeviceInstanceSchema: () => DeviceInstanceSchema,
|
|
133
|
+
DeviceLicenseSchema: () => DeviceLicenseSchema,
|
|
134
|
+
DeviceRequestSchema: () => DeviceRequestSchema,
|
|
135
|
+
DeviceResponseSchema: () => DeviceResponseSchema,
|
|
136
|
+
DeviceSchema: () => DeviceSchema,
|
|
137
|
+
DeviceStatusSchema: () => DeviceStatusSchema,
|
|
127
138
|
DlpDataProfilePolicySchema: () => DlpDataProfilePolicySchema,
|
|
128
139
|
DlpDataProfileSchema: () => DlpDataProfileSchema,
|
|
129
140
|
DlpPatternDetectionSchema: () => DlpPatternDetectionSchema,
|
|
@@ -141,6 +152,9 @@ __export(index_exports, {
|
|
|
141
152
|
ErrorSource: () => ErrorSource,
|
|
142
153
|
ErrorStatus: () => ErrorStatus,
|
|
143
154
|
ErrorType: () => ErrorType,
|
|
155
|
+
EulaAcceptRequestSchema: () => EulaAcceptRequestSchema,
|
|
156
|
+
EulaContentResponseSchema: () => EulaContentResponseSchema,
|
|
157
|
+
EulaResponseSchema: () => EulaResponseSchema,
|
|
144
158
|
EvalOutcome: () => EvalOutcome,
|
|
145
159
|
EvalSummarySchema: () => EvalSummarySchema,
|
|
146
160
|
FileFormat: () => FileFormat,
|
|
@@ -158,8 +172,13 @@ __export(index_exports, {
|
|
|
158
172
|
HEADER_AUTH_TOKEN: () => HEADER_AUTH_TOKEN,
|
|
159
173
|
HTTPValidationErrorSchema: () => HTTPValidationErrorSchema,
|
|
160
174
|
HTTP_FORCE_RETRY_STATUS_CODES: () => HTTP_FORCE_RETRY_STATUS_CODES,
|
|
175
|
+
HeadersAuthConfigSchema: () => HeadersAuthConfigSchema,
|
|
161
176
|
HuggingfaceConnectionParamsSchema: () => HuggingfaceConnectionParamsSchema,
|
|
162
177
|
IODetectedSchema: () => IODetectedSchema,
|
|
178
|
+
InstanceExtraDetailsSchema: () => InstanceExtraDetailsSchema,
|
|
179
|
+
InstanceGetResponseSchema: () => InstanceGetResponseSchema,
|
|
180
|
+
InstanceRequestSchema: () => InstanceRequestSchema,
|
|
181
|
+
InstanceResponseSchema: () => InstanceResponseSchema,
|
|
163
182
|
JobAbortResponseSchema: () => JobAbortResponseSchema,
|
|
164
183
|
JobCreateRequestSchema: () => JobCreateRequestSchema,
|
|
165
184
|
JobListResponseSchema: () => JobListResponseSchema,
|
|
@@ -247,6 +266,7 @@ __export(index_exports, {
|
|
|
247
266
|
ModelSecurityScansClient: () => ModelSecurityScansClient,
|
|
248
267
|
MultiTurnStatefulConfigSchema: () => MultiTurnStatefulConfigSchema,
|
|
249
268
|
MultiTurnStatelessConfigSchema: () => MultiTurnStatelessConfigSchema,
|
|
269
|
+
OAuth2AuthConfigSchema: () => OAuth2AuthConfigSchema,
|
|
250
270
|
OAuthClient: () => OAuthClient,
|
|
251
271
|
OAuthManagementClient: () => OAuthManagementClient,
|
|
252
272
|
Oauth2TokenSchema: () => Oauth2TokenSchema,
|
|
@@ -288,15 +308,20 @@ __export(index_exports, {
|
|
|
288
308
|
RED_TEAM_DASHBOARD_PATH: () => RED_TEAM_DASHBOARD_PATH,
|
|
289
309
|
RED_TEAM_DATA_ENDPOINT: () => RED_TEAM_DATA_ENDPOINT,
|
|
290
310
|
RED_TEAM_ERROR_LOG_PATH: () => RED_TEAM_ERROR_LOG_PATH,
|
|
311
|
+
RED_TEAM_EULA_PATH: () => RED_TEAM_EULA_PATH,
|
|
312
|
+
RED_TEAM_INSTANCES_PATH: () => RED_TEAM_INSTANCES_PATH,
|
|
291
313
|
RED_TEAM_MGMT_DASHBOARD_PATH: () => RED_TEAM_MGMT_DASHBOARD_PATH,
|
|
292
314
|
RED_TEAM_MGMT_ENDPOINT: () => RED_TEAM_MGMT_ENDPOINT,
|
|
293
315
|
RED_TEAM_QUOTA_PATH: () => RED_TEAM_QUOTA_PATH,
|
|
316
|
+
RED_TEAM_REGISTRY_CREDENTIALS_PATH: () => RED_TEAM_REGISTRY_CREDENTIALS_PATH,
|
|
294
317
|
RED_TEAM_REPORT_DYNAMIC_PATH: () => RED_TEAM_REPORT_DYNAMIC_PATH,
|
|
295
318
|
RED_TEAM_REPORT_PATH: () => RED_TEAM_REPORT_PATH,
|
|
296
319
|
RED_TEAM_REPORT_STATIC_PATH: () => RED_TEAM_REPORT_STATIC_PATH,
|
|
297
320
|
RED_TEAM_SCAN_PATH: () => RED_TEAM_SCAN_PATH,
|
|
298
321
|
RED_TEAM_SENTIMENT_PATH: () => RED_TEAM_SENTIMENT_PATH,
|
|
299
322
|
RED_TEAM_TARGET_PATH: () => RED_TEAM_TARGET_PATH,
|
|
323
|
+
RED_TEAM_TARGET_VALIDATE_AUTH_PATH: () => RED_TEAM_TARGET_VALIDATE_AUTH_PATH,
|
|
324
|
+
RED_TEAM_TEMPLATE_PATH: () => RED_TEAM_TEMPLATE_PATH,
|
|
300
325
|
RED_TEAM_TOKEN_ENDPOINT: () => RED_TEAM_TOKEN_ENDPOINT,
|
|
301
326
|
RED_TEAM_TSG_ID: () => RED_TEAM_TSG_ID,
|
|
302
327
|
RedTeamCategory: () => RedTeamCategory,
|
|
@@ -304,10 +329,13 @@ __export(index_exports, {
|
|
|
304
329
|
RedTeamCustomAttackReportsClient: () => RedTeamCustomAttackReportsClient,
|
|
305
330
|
RedTeamCustomAttacksClient: () => RedTeamCustomAttacksClient,
|
|
306
331
|
RedTeamErrorType: () => RedTeamErrorType,
|
|
332
|
+
RedTeamEulaClient: () => RedTeamEulaClient,
|
|
333
|
+
RedTeamInstancesClient: () => RedTeamInstancesClient,
|
|
307
334
|
RedTeamPaginationSchema: () => RedTeamPaginationSchema,
|
|
308
335
|
RedTeamReportsClient: () => RedTeamReportsClient,
|
|
309
336
|
RedTeamScansClient: () => RedTeamScansClient,
|
|
310
337
|
RedTeamTargetsClient: () => RedTeamTargetsClient,
|
|
338
|
+
RegistryCredentialsSchema: () => RegistryCredentialsSchema,
|
|
311
339
|
RemediationDetailSchema: () => RemediationDetailSchema,
|
|
312
340
|
RemediationResponseSchema: () => RemediationResponseSchema,
|
|
313
341
|
ResponseDetectedSchema: () => ResponseDetectedSchema,
|
|
@@ -377,6 +405,9 @@ __export(index_exports, {
|
|
|
377
405
|
SubCategoryModelSchema: () => SubCategoryModelSchema,
|
|
378
406
|
SubCategoryStatsSchema: () => SubCategoryStatsSchema,
|
|
379
407
|
TargetAdditionalContextSchema: () => TargetAdditionalContextSchema,
|
|
408
|
+
TargetAuthType: () => TargetAuthType,
|
|
409
|
+
TargetAuthValidationRequestSchema: () => TargetAuthValidationRequestSchema,
|
|
410
|
+
TargetAuthValidationResponseSchema: () => TargetAuthValidationResponseSchema,
|
|
380
411
|
TargetBackgroundSchema: () => TargetBackgroundSchema,
|
|
381
412
|
TargetConnectionType: () => TargetConnectionType,
|
|
382
413
|
TargetContextUpdateSchema: () => TargetContextUpdateSchema,
|
|
@@ -390,6 +421,7 @@ __export(index_exports, {
|
|
|
390
421
|
TargetReferenceSchema: () => TargetReferenceSchema,
|
|
391
422
|
TargetResponseSchema: () => TargetResponseSchema,
|
|
392
423
|
TargetStatus: () => TargetStatus,
|
|
424
|
+
TargetTemplateCollectionSchema: () => TargetTemplateCollectionSchema,
|
|
393
425
|
TargetType: () => TargetType,
|
|
394
426
|
TargetUpdateRequestSchema: () => TargetUpdateRequestSchema,
|
|
395
427
|
TcReportSchema: () => TcReportSchema,
|
|
@@ -409,6 +441,7 @@ __export(index_exports, {
|
|
|
409
441
|
Verdict: () => Verdict,
|
|
410
442
|
ViolationListSchema: () => ViolationListSchema,
|
|
411
443
|
ViolationResponseSchema: () => ViolationResponseSchema,
|
|
444
|
+
WebSocketConnectionParamsSchema: () => WebSocketConnectionParamsSchema,
|
|
412
445
|
globalConfiguration: () => globalConfiguration,
|
|
413
446
|
init: () => init
|
|
414
447
|
});
|
|
@@ -445,7 +478,7 @@ var MAX_NUMBER_OF_BATCH_SCAN_OBJECTS = 5;
|
|
|
445
478
|
var MAX_CONNECTION_POOL_SIZE = 100;
|
|
446
479
|
var MAX_NUMBER_OF_RETRIES = 5;
|
|
447
480
|
var HTTP_FORCE_RETRY_STATUS_CODES = [500, 502, 503, 504];
|
|
448
|
-
var SDK_VERSION = "0.
|
|
481
|
+
var SDK_VERSION = "0.7.0";
|
|
449
482
|
var USER_AGENT = `PAN-AIRS/${SDK_VERSION}-typescript-sdk`;
|
|
450
483
|
var DEFAULT_MGMT_ENDPOINT = "https://api.sase.paloaltonetworks.com/aisec";
|
|
451
484
|
var DEFAULT_TOKEN_ENDPOINT = "https://auth.apps.paloaltonetworks.com/oauth2/access_token";
|
|
@@ -505,6 +538,11 @@ var RED_TEAM_QUOTA_PATH = "/v1/metering/quota";
|
|
|
505
538
|
var RED_TEAM_ERROR_LOG_PATH = "/v1/error-log/job";
|
|
506
539
|
var RED_TEAM_SENTIMENT_PATH = "/v1/sentiment";
|
|
507
540
|
var RED_TEAM_TARGET_PATH = "/v1/target";
|
|
541
|
+
var RED_TEAM_TARGET_VALIDATE_AUTH_PATH = "/v1/target/validate-auth";
|
|
542
|
+
var RED_TEAM_TEMPLATE_PATH = "/v1/template";
|
|
543
|
+
var RED_TEAM_EULA_PATH = "/v1/eula";
|
|
544
|
+
var RED_TEAM_INSTANCES_PATH = "/v1/instances";
|
|
545
|
+
var RED_TEAM_REGISTRY_CREDENTIALS_PATH = "/v1/registry-credentials";
|
|
508
546
|
var RED_TEAM_CUSTOM_ATTACK_PATH = "/v1/custom-attack";
|
|
509
547
|
var RED_TEAM_MGMT_DASHBOARD_PATH = "/v1/dashboard/overview";
|
|
510
548
|
|
|
@@ -2132,6 +2170,15 @@ var AuthType = {
|
|
|
2132
2170
|
OAUTH: "OAUTH",
|
|
2133
2171
|
ACCESS_TOKEN: "ACCESS_TOKEN"
|
|
2134
2172
|
};
|
|
2173
|
+
var TargetAuthType = {
|
|
2174
|
+
HEADERS: "HEADERS",
|
|
2175
|
+
BASIC_AUTH: "BASIC_AUTH",
|
|
2176
|
+
OAUTH2: "OAUTH2"
|
|
2177
|
+
};
|
|
2178
|
+
var BasicAuthLocation = {
|
|
2179
|
+
HEADER: "HEADER",
|
|
2180
|
+
PAYLOAD: "PAYLOAD"
|
|
2181
|
+
};
|
|
2135
2182
|
var BrandSubCategory = {
|
|
2136
2183
|
COMPETITOR_ENDORSEMENTS: "COMPETITOR_ENDORSEMENTS",
|
|
2137
2184
|
BRAND_TARNISHING_SELF_CRITICISM: "BRAND_TARNISHING_SELF_CRITICISM",
|
|
@@ -2234,7 +2281,8 @@ var RedTeamCategory = {
|
|
|
2234
2281
|
};
|
|
2235
2282
|
var ResponseMode = {
|
|
2236
2283
|
REST: "REST",
|
|
2237
|
-
STREAMING: "STREAMING"
|
|
2284
|
+
STREAMING: "STREAMING",
|
|
2285
|
+
WEBSOCKET: "WEBSOCKET"
|
|
2238
2286
|
};
|
|
2239
2287
|
var RiskRating = {
|
|
2240
2288
|
LOW: "LOW",
|
|
@@ -2287,7 +2335,8 @@ var TargetConnectionType = {
|
|
|
2287
2335
|
HUGGING_FACE: "HUGGING_FACE",
|
|
2288
2336
|
CUSTOM: "CUSTOM",
|
|
2289
2337
|
REST: "REST",
|
|
2290
|
-
STREAMING: "STREAMING"
|
|
2338
|
+
STREAMING: "STREAMING",
|
|
2339
|
+
WEBSOCKET: "WEBSOCKET"
|
|
2291
2340
|
};
|
|
2292
2341
|
var TargetStatus = {
|
|
2293
2342
|
DRAFT: "DRAFT",
|
|
@@ -2351,6 +2400,24 @@ var MultiTurnStatelessConfigSchema = import_zod25.z.object({
|
|
|
2351
2400
|
type: import_zod25.z.string().default("stateless"),
|
|
2352
2401
|
assistant_role: import_zod25.z.string().nullable().optional()
|
|
2353
2402
|
}).passthrough();
|
|
2403
|
+
var HeadersAuthConfigSchema = import_zod25.z.object({ auth_header: import_zod25.z.record(import_zod25.z.unknown()) }).passthrough();
|
|
2404
|
+
var BasicAuthAuthConfigSchema = import_zod25.z.object({
|
|
2405
|
+
basic_auth_location: import_zod25.z.string().default("HEADER"),
|
|
2406
|
+
basic_auth_header: import_zod25.z.record(import_zod25.z.unknown()).nullable().optional()
|
|
2407
|
+
}).passthrough();
|
|
2408
|
+
var OAuth2AuthConfigSchema = import_zod25.z.object({
|
|
2409
|
+
oauth2_token_url: import_zod25.z.string(),
|
|
2410
|
+
oauth2_expiry_minutes: import_zod25.z.number().int().default(60),
|
|
2411
|
+
oauth2_headers: import_zod25.z.record(import_zod25.z.unknown()).optional(),
|
|
2412
|
+
oauth2_body_params: import_zod25.z.record(import_zod25.z.unknown()).optional(),
|
|
2413
|
+
oauth2_token_response_key: import_zod25.z.string().default("access_token"),
|
|
2414
|
+
oauth2_inject_header: import_zod25.z.record(import_zod25.z.unknown())
|
|
2415
|
+
}).passthrough();
|
|
2416
|
+
var AuthConfigSchema = import_zod25.z.union([
|
|
2417
|
+
HeadersAuthConfigSchema,
|
|
2418
|
+
BasicAuthAuthConfigSchema,
|
|
2419
|
+
OAuth2AuthConfigSchema
|
|
2420
|
+
]);
|
|
2354
2421
|
var OpenAIConnectionParamsSchema = import_zod25.z.object({
|
|
2355
2422
|
api_key: import_zod25.z.string(),
|
|
2356
2423
|
model_name: import_zod25.z.string()
|
|
@@ -2388,7 +2455,11 @@ var StreamingConnectionParamsSchema = RestConnectionParamsSchema.extend({
|
|
|
2388
2455
|
response_stop_key: import_zod25.z.string(),
|
|
2389
2456
|
response_stop_value: import_zod25.z.string()
|
|
2390
2457
|
}).passthrough();
|
|
2458
|
+
var WebSocketConnectionParamsSchema = RestConnectionParamsSchema.extend({
|
|
2459
|
+
ws_response_timeout: import_zod25.z.number().default(110)
|
|
2460
|
+
}).passthrough();
|
|
2391
2461
|
var ConnectionParamsSchema = import_zod25.z.union([
|
|
2462
|
+
WebSocketConnectionParamsSchema,
|
|
2392
2463
|
StreamingConnectionParamsSchema,
|
|
2393
2464
|
RestConnectionParamsSchema
|
|
2394
2465
|
]);
|
|
@@ -2493,7 +2564,8 @@ var TargetReferenceSchema = import_zod25.z.object({
|
|
|
2493
2564
|
target_metadata: TargetMetadataSchema.optional(),
|
|
2494
2565
|
target_background: TargetBackgroundSchema.nullable().optional(),
|
|
2495
2566
|
profiling_status: import_zod25.z.string().nullable().optional(),
|
|
2496
|
-
additional_context: TargetAdditionalContextSchema.nullable().optional()
|
|
2567
|
+
additional_context: TargetAdditionalContextSchema.nullable().optional(),
|
|
2568
|
+
auth_type: import_zod25.z.string().nullable().optional()
|
|
2497
2569
|
}).passthrough();
|
|
2498
2570
|
var JobResponseSchema = import_zod25.z.object({
|
|
2499
2571
|
uuid: import_zod25.z.string(),
|
|
@@ -2950,7 +3022,9 @@ var TargetCreateRequestSchema = import_zod25.z.object({
|
|
|
2950
3022
|
target_background: import_zod25.z.unknown().optional(),
|
|
2951
3023
|
additional_context: import_zod25.z.unknown().optional(),
|
|
2952
3024
|
extra_info: import_zod25.z.unknown().optional(),
|
|
2953
|
-
network_broker_channel_uuid: import_zod25.z.unknown().optional()
|
|
3025
|
+
network_broker_channel_uuid: import_zod25.z.unknown().optional(),
|
|
3026
|
+
auth_type: import_zod25.z.string().nullable().optional(),
|
|
3027
|
+
auth_config: import_zod25.z.unknown().nullable().optional()
|
|
2954
3028
|
}).passthrough();
|
|
2955
3029
|
var TargetUpdateRequestSchema = import_zod25.z.object({
|
|
2956
3030
|
name: import_zod25.z.string(),
|
|
@@ -2965,7 +3039,9 @@ var TargetUpdateRequestSchema = import_zod25.z.object({
|
|
|
2965
3039
|
target_background: import_zod25.z.unknown().optional(),
|
|
2966
3040
|
additional_context: import_zod25.z.unknown().optional(),
|
|
2967
3041
|
extra_info: import_zod25.z.unknown().optional(),
|
|
2968
|
-
network_broker_channel_uuid: import_zod25.z.unknown().optional()
|
|
3042
|
+
network_broker_channel_uuid: import_zod25.z.unknown().optional(),
|
|
3043
|
+
auth_type: import_zod25.z.string().nullable().optional(),
|
|
3044
|
+
auth_config: import_zod25.z.unknown().nullable().optional()
|
|
2969
3045
|
}).passthrough();
|
|
2970
3046
|
var TargetContextUpdateSchema = import_zod25.z.object({
|
|
2971
3047
|
target_background: import_zod25.z.unknown().optional(),
|
|
@@ -2994,7 +3070,8 @@ var TargetResponseSchema = import_zod25.z.object({
|
|
|
2994
3070
|
target_metadata: import_zod25.z.unknown().optional(),
|
|
2995
3071
|
target_background: import_zod25.z.unknown().optional(),
|
|
2996
3072
|
profiling_status: import_zod25.z.unknown().optional(),
|
|
2997
|
-
additional_context: import_zod25.z.unknown().optional()
|
|
3073
|
+
additional_context: import_zod25.z.unknown().optional(),
|
|
3074
|
+
auth_type: import_zod25.z.string().nullable().optional()
|
|
2998
3075
|
}).passthrough();
|
|
2999
3076
|
var TargetListItemSchema = import_zod25.z.object({
|
|
3000
3077
|
uuid: import_zod25.z.string(),
|
|
@@ -3015,7 +3092,8 @@ var TargetListItemSchema = import_zod25.z.object({
|
|
|
3015
3092
|
version: import_zod25.z.unknown().optional(),
|
|
3016
3093
|
secret_version: import_zod25.z.unknown().optional(),
|
|
3017
3094
|
created_by_user_id: import_zod25.z.unknown().optional(),
|
|
3018
|
-
updated_by_user_id: import_zod25.z.unknown().optional()
|
|
3095
|
+
updated_by_user_id: import_zod25.z.unknown().optional(),
|
|
3096
|
+
auth_type: import_zod25.z.string().nullable().optional()
|
|
3019
3097
|
}).passthrough();
|
|
3020
3098
|
var TargetListSchema = import_zod25.z.object({ pagination: RedTeamPaginationSchema, data: import_zod25.z.array(TargetListItemSchema).optional() }).passthrough();
|
|
3021
3099
|
var TargetProbeRequestSchema = import_zod25.z.object({
|
|
@@ -3033,7 +3111,20 @@ var TargetProbeRequestSchema = import_zod25.z.object({
|
|
|
3033
3111
|
additional_context: import_zod25.z.unknown().optional(),
|
|
3034
3112
|
extra_info: import_zod25.z.unknown().optional(),
|
|
3035
3113
|
network_broker_channel_uuid: import_zod25.z.unknown().optional(),
|
|
3036
|
-
probe_fields: import_zod25.z.unknown().optional()
|
|
3114
|
+
probe_fields: import_zod25.z.unknown().optional(),
|
|
3115
|
+
auth_type: import_zod25.z.string().nullable().optional(),
|
|
3116
|
+
auth_config: import_zod25.z.unknown().nullable().optional()
|
|
3117
|
+
}).passthrough();
|
|
3118
|
+
var TargetAuthValidationRequestSchema = import_zod25.z.object({
|
|
3119
|
+
auth_type: import_zod25.z.string(),
|
|
3120
|
+
auth_config: import_zod25.z.unknown(),
|
|
3121
|
+
target_id: import_zod25.z.string().nullable().optional(),
|
|
3122
|
+
network_broker_channel_uuid: import_zod25.z.string().nullable().optional()
|
|
3123
|
+
}).passthrough();
|
|
3124
|
+
var TargetAuthValidationResponseSchema = import_zod25.z.object({
|
|
3125
|
+
validated: import_zod25.z.boolean(),
|
|
3126
|
+
token_preview: import_zod25.z.string().nullable().optional(),
|
|
3127
|
+
expires_in: import_zod25.z.number().int().nullable().optional()
|
|
3037
3128
|
}).passthrough();
|
|
3038
3129
|
var TargetProfileResponseSchema = import_zod25.z.object({
|
|
3039
3130
|
target_id: import_zod25.z.string(),
|
|
@@ -3045,6 +3136,15 @@ var TargetProfileResponseSchema = import_zod25.z.object({
|
|
|
3045
3136
|
ai_generated_fields: import_zod25.z.unknown().optional(),
|
|
3046
3137
|
other_details: import_zod25.z.unknown().optional()
|
|
3047
3138
|
}).passthrough();
|
|
3139
|
+
var TargetTemplateCollectionSchema = import_zod25.z.object({
|
|
3140
|
+
OPENAI: import_zod25.z.record(import_zod25.z.unknown()),
|
|
3141
|
+
HUGGING_FACE: import_zod25.z.record(import_zod25.z.unknown()),
|
|
3142
|
+
DATABRICKS: import_zod25.z.record(import_zod25.z.unknown()),
|
|
3143
|
+
BEDROCK: import_zod25.z.record(import_zod25.z.unknown()),
|
|
3144
|
+
REST: import_zod25.z.record(import_zod25.z.unknown()),
|
|
3145
|
+
STREAMING: import_zod25.z.record(import_zod25.z.unknown()),
|
|
3146
|
+
WEBSOCKET: import_zod25.z.record(import_zod25.z.unknown())
|
|
3147
|
+
}).passthrough();
|
|
3048
3148
|
var BaseResponseSchema = import_zod25.z.object({
|
|
3049
3149
|
message: import_zod25.z.string(),
|
|
3050
3150
|
status: import_zod25.z.number().int()
|
|
@@ -3102,7 +3202,6 @@ var CustomPromptSetListSchema = import_zod25.z.object({
|
|
|
3102
3202
|
pagination: RedTeamPaginationSchema,
|
|
3103
3203
|
data: import_zod25.z.array(CustomPromptSetListItemSchema).optional()
|
|
3104
3204
|
}).passthrough();
|
|
3105
|
-
var CustomPromptSetListActiveSchema = import_zod25.z.object({ data: import_zod25.z.array(CustomPromptSetListItemSchema).optional() }).passthrough();
|
|
3106
3205
|
var CustomPromptSetReferenceSchema = import_zod25.z.object({
|
|
3107
3206
|
uuid: import_zod25.z.string(),
|
|
3108
3207
|
name: import_zod25.z.string(),
|
|
@@ -3113,6 +3212,7 @@ var CustomPromptSetReferenceSchema = import_zod25.z.object({
|
|
|
3113
3212
|
updated_at: import_zod25.z.string(),
|
|
3114
3213
|
version: import_zod25.z.unknown().optional()
|
|
3115
3214
|
}).passthrough();
|
|
3215
|
+
var CustomPromptSetListActiveSchema = import_zod25.z.object({ data: import_zod25.z.array(CustomPromptSetReferenceSchema).optional() }).passthrough();
|
|
3116
3216
|
var CustomPromptSetVersionInfoSchema = import_zod25.z.object({
|
|
3117
3217
|
uuid: import_zod25.z.string(),
|
|
3118
3218
|
status: import_zod25.z.string(),
|
|
@@ -3172,7 +3272,7 @@ var PropertyDefinitionSchema = import_zod25.z.object({
|
|
|
3172
3272
|
property_name: import_zod25.z.string(),
|
|
3173
3273
|
created_at: import_zod25.z.string()
|
|
3174
3274
|
}).passthrough();
|
|
3175
|
-
var PropertyNamesListResponseSchema = import_zod25.z.object({ data: import_zod25.z.array(
|
|
3275
|
+
var PropertyNamesListResponseSchema = import_zod25.z.object({ data: import_zod25.z.array(import_zod25.z.string()).optional() }).passthrough();
|
|
3176
3276
|
var PropertyValuesResponseSchema = import_zod25.z.object({
|
|
3177
3277
|
name: import_zod25.z.string(),
|
|
3178
3278
|
values: import_zod25.z.array(import_zod25.z.string()).optional()
|
|
@@ -3182,6 +3282,117 @@ var DashboardOverviewResponseSchema = import_zod25.z.object({
|
|
|
3182
3282
|
total_targets: import_zod25.z.number().int(),
|
|
3183
3283
|
targets_by_type: import_zod25.z.array(CountByNameSchema).optional()
|
|
3184
3284
|
}).passthrough();
|
|
3285
|
+
var EulaAcceptRequestSchema = import_zod25.z.object({
|
|
3286
|
+
eula_content: import_zod25.z.string(),
|
|
3287
|
+
accepted_at: import_zod25.z.string().nullable().optional()
|
|
3288
|
+
}).passthrough();
|
|
3289
|
+
var EulaContentResponseSchema = import_zod25.z.object({
|
|
3290
|
+
content: import_zod25.z.string()
|
|
3291
|
+
}).passthrough();
|
|
3292
|
+
var EulaResponseSchema = import_zod25.z.object({
|
|
3293
|
+
uuid: import_zod25.z.string().nullable().optional(),
|
|
3294
|
+
is_accepted: import_zod25.z.boolean(),
|
|
3295
|
+
accepted_at: import_zod25.z.string().nullable().optional(),
|
|
3296
|
+
accepted_by_user_id: import_zod25.z.string().nullable().optional()
|
|
3297
|
+
}).passthrough();
|
|
3298
|
+
var DeviceInstanceSchema = import_zod25.z.object({
|
|
3299
|
+
app_id: import_zod25.z.string(),
|
|
3300
|
+
region: import_zod25.z.string(),
|
|
3301
|
+
tenant_id: import_zod25.z.string(),
|
|
3302
|
+
tsg_id: import_zod25.z.string()
|
|
3303
|
+
}).passthrough();
|
|
3304
|
+
var DeviceLicenseSchema = import_zod25.z.object({
|
|
3305
|
+
authorizationCode: import_zod25.z.string().optional(),
|
|
3306
|
+
expirationDate: import_zod25.z.string().optional(),
|
|
3307
|
+
licensePanDbIdentification: import_zod25.z.string().optional(),
|
|
3308
|
+
partNumber: import_zod25.z.string().optional(),
|
|
3309
|
+
serialNumber: import_zod25.z.string().optional(),
|
|
3310
|
+
subtypeName: import_zod25.z.string().optional(),
|
|
3311
|
+
registrationDate: import_zod25.z.string().optional()
|
|
3312
|
+
}).passthrough();
|
|
3313
|
+
var DeviceSchema = import_zod25.z.object({
|
|
3314
|
+
serial_number: import_zod25.z.string(),
|
|
3315
|
+
model: import_zod25.z.string().optional(),
|
|
3316
|
+
sku: import_zod25.z.string().optional(),
|
|
3317
|
+
device_type: import_zod25.z.string().optional(),
|
|
3318
|
+
device_name: import_zod25.z.string().optional(),
|
|
3319
|
+
tsg_id: import_zod25.z.string().optional(),
|
|
3320
|
+
support_account_id: import_zod25.z.string().optional(),
|
|
3321
|
+
asset_type: import_zod25.z.string().optional(),
|
|
3322
|
+
licenses: import_zod25.z.array(DeviceLicenseSchema).optional()
|
|
3323
|
+
}).passthrough();
|
|
3324
|
+
var DeviceStatusSchema = import_zod25.z.object({
|
|
3325
|
+
status: import_zod25.z.string(),
|
|
3326
|
+
error: import_zod25.z.string().optional(),
|
|
3327
|
+
serial_number: import_zod25.z.string().optional()
|
|
3328
|
+
}).passthrough();
|
|
3329
|
+
var DeviceRequestSchema = import_zod25.z.object({
|
|
3330
|
+
instance: DeviceInstanceSchema,
|
|
3331
|
+
created_by: import_zod25.z.string().optional(),
|
|
3332
|
+
devices: import_zod25.z.array(DeviceSchema).optional()
|
|
3333
|
+
}).passthrough();
|
|
3334
|
+
var DeviceResponseSchema = import_zod25.z.object({
|
|
3335
|
+
devices: import_zod25.z.array(DeviceStatusSchema).optional(),
|
|
3336
|
+
status: import_zod25.z.string().optional()
|
|
3337
|
+
}).passthrough();
|
|
3338
|
+
var DeploymentProfileAttributeSchema = import_zod25.z.object({
|
|
3339
|
+
quantity: import_zod25.z.number().optional(),
|
|
3340
|
+
unit_of_measure: import_zod25.z.string().optional()
|
|
3341
|
+
}).passthrough();
|
|
3342
|
+
var DeploymentProfileRequestSchema = import_zod25.z.object({
|
|
3343
|
+
dAuthCode: import_zod25.z.string().optional(),
|
|
3344
|
+
deploymentProfileId: import_zod25.z.string().optional(),
|
|
3345
|
+
license_expiration: import_zod25.z.string().optional(),
|
|
3346
|
+
profileName: import_zod25.z.string().optional(),
|
|
3347
|
+
subType: import_zod25.z.string().optional(),
|
|
3348
|
+
subscriptions: import_zod25.z.string().optional(),
|
|
3349
|
+
type: import_zod25.z.string().optional(),
|
|
3350
|
+
aveTextRecord: import_zod25.z.number().default(0),
|
|
3351
|
+
attributes: import_zod25.z.array(DeploymentProfileAttributeSchema).optional()
|
|
3352
|
+
}).passthrough();
|
|
3353
|
+
var InstanceExtraDetailsSchema = import_zod25.z.object({
|
|
3354
|
+
deployment_profiles: import_zod25.z.array(DeploymentProfileRequestSchema).optional(),
|
|
3355
|
+
airs_shared_by_tsg: import_zod25.z.string().optional(),
|
|
3356
|
+
airs_unshared_dps: import_zod25.z.string().optional()
|
|
3357
|
+
}).passthrough();
|
|
3358
|
+
var InstanceRequestSchema = import_zod25.z.object({
|
|
3359
|
+
tsg_id: import_zod25.z.string(),
|
|
3360
|
+
tenant_id: import_zod25.z.string(),
|
|
3361
|
+
app_id: import_zod25.z.string(),
|
|
3362
|
+
region: import_zod25.z.string(),
|
|
3363
|
+
support_account_id: import_zod25.z.string().optional(),
|
|
3364
|
+
support_account_name: import_zod25.z.string().optional(),
|
|
3365
|
+
created_by: import_zod25.z.string().optional(),
|
|
3366
|
+
internal: import_zod25.z.boolean().optional(),
|
|
3367
|
+
tenant_instance_name: import_zod25.z.string().optional(),
|
|
3368
|
+
extra: InstanceExtraDetailsSchema.optional(),
|
|
3369
|
+
iam_controlled: import_zod25.z.boolean().optional(),
|
|
3370
|
+
platform_region: import_zod25.z.string().optional(),
|
|
3371
|
+
csp_tenant_id: import_zod25.z.string().optional(),
|
|
3372
|
+
tsg_instances: import_zod25.z.unknown().optional()
|
|
3373
|
+
}).passthrough();
|
|
3374
|
+
var InstanceResponseSchema = import_zod25.z.object({
|
|
3375
|
+
tsg_id: import_zod25.z.string(),
|
|
3376
|
+
tenant_id: import_zod25.z.string().optional(),
|
|
3377
|
+
app_id: import_zod25.z.string().optional(),
|
|
3378
|
+
is_success: import_zod25.z.boolean().optional()
|
|
3379
|
+
}).passthrough();
|
|
3380
|
+
var InstanceGetResponseSchema = import_zod25.z.object({
|
|
3381
|
+
tsg_id: import_zod25.z.string(),
|
|
3382
|
+
tenant_id: import_zod25.z.string(),
|
|
3383
|
+
app_id: import_zod25.z.string(),
|
|
3384
|
+
region: import_zod25.z.string(),
|
|
3385
|
+
support_account_id: import_zod25.z.string().optional(),
|
|
3386
|
+
support_account_name: import_zod25.z.string().optional(),
|
|
3387
|
+
created_by: import_zod25.z.string().optional(),
|
|
3388
|
+
internal: import_zod25.z.boolean().optional(),
|
|
3389
|
+
tenant_instance_name: import_zod25.z.string().optional(),
|
|
3390
|
+
deployment_profiles: import_zod25.z.array(DeploymentProfileRequestSchema).optional()
|
|
3391
|
+
}).passthrough();
|
|
3392
|
+
var RegistryCredentialsSchema = import_zod25.z.object({
|
|
3393
|
+
token: import_zod25.z.string(),
|
|
3394
|
+
expiry: import_zod25.z.string()
|
|
3395
|
+
}).passthrough();
|
|
3185
3396
|
|
|
3186
3397
|
// src/models/oauth-token.ts
|
|
3187
3398
|
var import_zod26 = require("zod");
|
|
@@ -5444,6 +5655,50 @@ var RedTeamTargetsClient = class {
|
|
|
5444
5655
|
});
|
|
5445
5656
|
return res.data;
|
|
5446
5657
|
}
|
|
5658
|
+
/**
|
|
5659
|
+
* Validate target authentication credentials.
|
|
5660
|
+
* @param request - The auth validation request body.
|
|
5661
|
+
* @returns The auth validation response.
|
|
5662
|
+
*/
|
|
5663
|
+
async validateAuth(request) {
|
|
5664
|
+
const res = await managementHttpRequest({
|
|
5665
|
+
method: "POST",
|
|
5666
|
+
baseUrl: this.baseUrl,
|
|
5667
|
+
path: RED_TEAM_TARGET_VALIDATE_AUTH_PATH,
|
|
5668
|
+
body: request,
|
|
5669
|
+
oauthClient: this.oauthClient,
|
|
5670
|
+
numRetries: this.numRetries
|
|
5671
|
+
});
|
|
5672
|
+
return res.data;
|
|
5673
|
+
}
|
|
5674
|
+
/**
|
|
5675
|
+
* Get target metadata (field definitions for target configuration).
|
|
5676
|
+
* @returns The target metadata object.
|
|
5677
|
+
*/
|
|
5678
|
+
async getTargetMetadata() {
|
|
5679
|
+
const res = await managementHttpRequest({
|
|
5680
|
+
method: "GET",
|
|
5681
|
+
baseUrl: this.baseUrl,
|
|
5682
|
+
path: `${RED_TEAM_TEMPLATE_PATH}/target-metadata`,
|
|
5683
|
+
oauthClient: this.oauthClient,
|
|
5684
|
+
numRetries: this.numRetries
|
|
5685
|
+
});
|
|
5686
|
+
return res.data;
|
|
5687
|
+
}
|
|
5688
|
+
/**
|
|
5689
|
+
* Get target templates for all supported provider types.
|
|
5690
|
+
* @returns The collection of target templates keyed by provider.
|
|
5691
|
+
*/
|
|
5692
|
+
async getTargetTemplates() {
|
|
5693
|
+
const res = await managementHttpRequest({
|
|
5694
|
+
method: "GET",
|
|
5695
|
+
baseUrl: this.baseUrl,
|
|
5696
|
+
path: `${RED_TEAM_TEMPLATE_PATH}/target-templates`,
|
|
5697
|
+
oauthClient: this.oauthClient,
|
|
5698
|
+
numRetries: this.numRetries
|
|
5699
|
+
});
|
|
5700
|
+
return res.data;
|
|
5701
|
+
}
|
|
5447
5702
|
};
|
|
5448
5703
|
|
|
5449
5704
|
// src/red-team/custom-attacks-client.ts
|
|
@@ -5571,14 +5826,18 @@ var RedTeamCustomAttacksClient = class {
|
|
|
5571
5826
|
/**
|
|
5572
5827
|
* Get version information for a prompt set.
|
|
5573
5828
|
* @param uuid - The prompt set UUID.
|
|
5829
|
+
* @param opts - Optional query params (e.g. specific version ID).
|
|
5574
5830
|
* @returns The prompt set version info.
|
|
5575
5831
|
*/
|
|
5576
|
-
async getPromptSetVersionInfo(uuid) {
|
|
5832
|
+
async getPromptSetVersionInfo(uuid, opts) {
|
|
5577
5833
|
validateUuid(uuid, "prompt set uuid");
|
|
5834
|
+
const params = {};
|
|
5835
|
+
if (opts?.version !== void 0) params.version = opts.version;
|
|
5578
5836
|
const res = await managementHttpRequest({
|
|
5579
5837
|
method: "GET",
|
|
5580
5838
|
baseUrl: this.baseUrl,
|
|
5581
5839
|
path: `${RED_TEAM_CUSTOM_ATTACK_PATH}/custom-prompt-set/${uuid}/version-info`,
|
|
5840
|
+
params: Object.keys(params).length > 0 ? params : void 0,
|
|
5582
5841
|
oauthClient: this.oauthClient,
|
|
5583
5842
|
numRetries: this.numRetries
|
|
5584
5843
|
});
|
|
@@ -5674,6 +5933,7 @@ var RedTeamCustomAttacksClient = class {
|
|
|
5674
5933
|
async listPrompts(promptSetUuid, opts) {
|
|
5675
5934
|
validateUuid(promptSetUuid, "prompt set uuid");
|
|
5676
5935
|
const params = buildRedTeamListParams(opts);
|
|
5936
|
+
if (opts?.status !== void 0) params.status = opts.status;
|
|
5677
5937
|
if (opts?.active !== void 0) params.active = String(opts.active);
|
|
5678
5938
|
const res = await managementHttpRequest({
|
|
5679
5939
|
method: "GET",
|
|
@@ -5828,6 +6088,202 @@ var RedTeamCustomAttacksClient = class {
|
|
|
5828
6088
|
}
|
|
5829
6089
|
};
|
|
5830
6090
|
|
|
6091
|
+
// src/red-team/eula-client.ts
|
|
6092
|
+
var RedTeamEulaClient = class {
|
|
6093
|
+
baseUrl;
|
|
6094
|
+
oauthClient;
|
|
6095
|
+
numRetries;
|
|
6096
|
+
constructor(opts) {
|
|
6097
|
+
this.baseUrl = opts.baseUrl;
|
|
6098
|
+
this.oauthClient = opts.oauthClient;
|
|
6099
|
+
this.numRetries = opts.numRetries;
|
|
6100
|
+
}
|
|
6101
|
+
/**
|
|
6102
|
+
* Get the current EULA content.
|
|
6103
|
+
* @returns The EULA content response.
|
|
6104
|
+
*/
|
|
6105
|
+
async getContent() {
|
|
6106
|
+
const res = await managementHttpRequest({
|
|
6107
|
+
method: "GET",
|
|
6108
|
+
baseUrl: this.baseUrl,
|
|
6109
|
+
path: `${RED_TEAM_EULA_PATH}/content`,
|
|
6110
|
+
oauthClient: this.oauthClient,
|
|
6111
|
+
numRetries: this.numRetries
|
|
6112
|
+
});
|
|
6113
|
+
return res.data;
|
|
6114
|
+
}
|
|
6115
|
+
/**
|
|
6116
|
+
* Get the current EULA acceptance status.
|
|
6117
|
+
* @returns The EULA status response.
|
|
6118
|
+
*/
|
|
6119
|
+
async getStatus() {
|
|
6120
|
+
const res = await managementHttpRequest({
|
|
6121
|
+
method: "GET",
|
|
6122
|
+
baseUrl: this.baseUrl,
|
|
6123
|
+
path: `${RED_TEAM_EULA_PATH}/status`,
|
|
6124
|
+
oauthClient: this.oauthClient,
|
|
6125
|
+
numRetries: this.numRetries
|
|
6126
|
+
});
|
|
6127
|
+
return res.data;
|
|
6128
|
+
}
|
|
6129
|
+
/**
|
|
6130
|
+
* Accept the EULA.
|
|
6131
|
+
* @param request - The acceptance request body.
|
|
6132
|
+
* @returns The EULA response with acceptance status.
|
|
6133
|
+
*/
|
|
6134
|
+
async accept(request) {
|
|
6135
|
+
const res = await managementHttpRequest({
|
|
6136
|
+
method: "POST",
|
|
6137
|
+
baseUrl: this.baseUrl,
|
|
6138
|
+
path: `${RED_TEAM_EULA_PATH}/accept`,
|
|
6139
|
+
body: request,
|
|
6140
|
+
oauthClient: this.oauthClient,
|
|
6141
|
+
numRetries: this.numRetries
|
|
6142
|
+
});
|
|
6143
|
+
return res.data;
|
|
6144
|
+
}
|
|
6145
|
+
};
|
|
6146
|
+
|
|
6147
|
+
// src/red-team/instances-client.ts
|
|
6148
|
+
var RedTeamInstancesClient = class {
|
|
6149
|
+
baseUrl;
|
|
6150
|
+
oauthClient;
|
|
6151
|
+
numRetries;
|
|
6152
|
+
constructor(opts) {
|
|
6153
|
+
this.baseUrl = opts.baseUrl;
|
|
6154
|
+
this.oauthClient = opts.oauthClient;
|
|
6155
|
+
this.numRetries = opts.numRetries;
|
|
6156
|
+
}
|
|
6157
|
+
/**
|
|
6158
|
+
* Create a new tenant instance.
|
|
6159
|
+
* @param request - The instance creation request.
|
|
6160
|
+
* @returns The instance response.
|
|
6161
|
+
*/
|
|
6162
|
+
async createInstance(request) {
|
|
6163
|
+
const res = await managementHttpRequest({
|
|
6164
|
+
method: "POST",
|
|
6165
|
+
baseUrl: this.baseUrl,
|
|
6166
|
+
path: RED_TEAM_INSTANCES_PATH,
|
|
6167
|
+
body: request,
|
|
6168
|
+
oauthClient: this.oauthClient,
|
|
6169
|
+
numRetries: this.numRetries
|
|
6170
|
+
});
|
|
6171
|
+
return res.data;
|
|
6172
|
+
}
|
|
6173
|
+
/**
|
|
6174
|
+
* Get an existing tenant instance.
|
|
6175
|
+
* @param tenantId - The tenant ID.
|
|
6176
|
+
* @returns The instance details.
|
|
6177
|
+
*/
|
|
6178
|
+
async getInstance(tenantId) {
|
|
6179
|
+
const res = await managementHttpRequest({
|
|
6180
|
+
method: "GET",
|
|
6181
|
+
baseUrl: this.baseUrl,
|
|
6182
|
+
path: `${RED_TEAM_INSTANCES_PATH}/${tenantId}`,
|
|
6183
|
+
oauthClient: this.oauthClient,
|
|
6184
|
+
numRetries: this.numRetries
|
|
6185
|
+
});
|
|
6186
|
+
return res.data;
|
|
6187
|
+
}
|
|
6188
|
+
/**
|
|
6189
|
+
* Update an existing tenant instance.
|
|
6190
|
+
* @param tenantId - The tenant ID.
|
|
6191
|
+
* @param request - The instance update request.
|
|
6192
|
+
* @returns The instance response.
|
|
6193
|
+
*/
|
|
6194
|
+
async updateInstance(tenantId, request) {
|
|
6195
|
+
const res = await managementHttpRequest({
|
|
6196
|
+
method: "PUT",
|
|
6197
|
+
baseUrl: this.baseUrl,
|
|
6198
|
+
path: `${RED_TEAM_INSTANCES_PATH}/${tenantId}`,
|
|
6199
|
+
body: request,
|
|
6200
|
+
oauthClient: this.oauthClient,
|
|
6201
|
+
numRetries: this.numRetries
|
|
6202
|
+
});
|
|
6203
|
+
return res.data;
|
|
6204
|
+
}
|
|
6205
|
+
/**
|
|
6206
|
+
* Delete a tenant instance.
|
|
6207
|
+
* @param tenantId - The tenant ID.
|
|
6208
|
+
* @returns The instance response.
|
|
6209
|
+
*/
|
|
6210
|
+
async deleteInstance(tenantId) {
|
|
6211
|
+
const res = await managementHttpRequest({
|
|
6212
|
+
method: "DELETE",
|
|
6213
|
+
baseUrl: this.baseUrl,
|
|
6214
|
+
path: `${RED_TEAM_INSTANCES_PATH}/${tenantId}`,
|
|
6215
|
+
oauthClient: this.oauthClient,
|
|
6216
|
+
numRetries: this.numRetries
|
|
6217
|
+
});
|
|
6218
|
+
return res.data;
|
|
6219
|
+
}
|
|
6220
|
+
/**
|
|
6221
|
+
* Create devices for a tenant instance.
|
|
6222
|
+
* @param tenantId - The tenant ID.
|
|
6223
|
+
* @param request - The device creation request.
|
|
6224
|
+
* @returns The device response with statuses.
|
|
6225
|
+
*/
|
|
6226
|
+
async createDevices(tenantId, request) {
|
|
6227
|
+
const res = await managementHttpRequest({
|
|
6228
|
+
method: "POST",
|
|
6229
|
+
baseUrl: this.baseUrl,
|
|
6230
|
+
path: `${RED_TEAM_INSTANCES_PATH}/${tenantId}/devices`,
|
|
6231
|
+
body: request,
|
|
6232
|
+
oauthClient: this.oauthClient,
|
|
6233
|
+
numRetries: this.numRetries
|
|
6234
|
+
});
|
|
6235
|
+
return res.data;
|
|
6236
|
+
}
|
|
6237
|
+
/**
|
|
6238
|
+
* Update devices for a tenant instance.
|
|
6239
|
+
* @param tenantId - The tenant ID.
|
|
6240
|
+
* @param request - The device update request.
|
|
6241
|
+
* @returns The device response with statuses.
|
|
6242
|
+
*/
|
|
6243
|
+
async updateDevices(tenantId, request) {
|
|
6244
|
+
const res = await managementHttpRequest({
|
|
6245
|
+
method: "PATCH",
|
|
6246
|
+
baseUrl: this.baseUrl,
|
|
6247
|
+
path: `${RED_TEAM_INSTANCES_PATH}/${tenantId}/devices`,
|
|
6248
|
+
body: request,
|
|
6249
|
+
oauthClient: this.oauthClient,
|
|
6250
|
+
numRetries: this.numRetries
|
|
6251
|
+
});
|
|
6252
|
+
return res.data;
|
|
6253
|
+
}
|
|
6254
|
+
/**
|
|
6255
|
+
* Delete devices from a tenant instance.
|
|
6256
|
+
* @param tenantId - The tenant ID.
|
|
6257
|
+
* @param serialNumbers - Comma-separated serial numbers to delete.
|
|
6258
|
+
* @returns The device response with statuses.
|
|
6259
|
+
*/
|
|
6260
|
+
async deleteDevices(tenantId, serialNumbers) {
|
|
6261
|
+
const res = await managementHttpRequest({
|
|
6262
|
+
method: "DELETE",
|
|
6263
|
+
baseUrl: this.baseUrl,
|
|
6264
|
+
path: `${RED_TEAM_INSTANCES_PATH}/${tenantId}/devices`,
|
|
6265
|
+
params: { serial_numbers: serialNumbers },
|
|
6266
|
+
oauthClient: this.oauthClient,
|
|
6267
|
+
numRetries: this.numRetries
|
|
6268
|
+
});
|
|
6269
|
+
return res.data;
|
|
6270
|
+
}
|
|
6271
|
+
/**
|
|
6272
|
+
* Get or create registry credentials.
|
|
6273
|
+
* @returns The registry credentials with token and expiry.
|
|
6274
|
+
*/
|
|
6275
|
+
async getRegistryCredentials() {
|
|
6276
|
+
const res = await managementHttpRequest({
|
|
6277
|
+
method: "POST",
|
|
6278
|
+
baseUrl: this.baseUrl,
|
|
6279
|
+
path: RED_TEAM_REGISTRY_CREDENTIALS_PATH,
|
|
6280
|
+
oauthClient: this.oauthClient,
|
|
6281
|
+
numRetries: this.numRetries
|
|
6282
|
+
});
|
|
6283
|
+
return res.data;
|
|
6284
|
+
}
|
|
6285
|
+
};
|
|
6286
|
+
|
|
5831
6287
|
// src/red-team/client.ts
|
|
5832
6288
|
var RedTeamClient = class {
|
|
5833
6289
|
/** Data plane scan operations. */
|
|
@@ -5840,6 +6296,10 @@ var RedTeamClient = class {
|
|
|
5840
6296
|
targets;
|
|
5841
6297
|
/** Management plane custom attack/prompt set operations. */
|
|
5842
6298
|
customAttacks;
|
|
6299
|
+
/** Management plane EULA operations. */
|
|
6300
|
+
eula;
|
|
6301
|
+
/** Management plane instance/licensing operations. */
|
|
6302
|
+
instances;
|
|
5843
6303
|
dataEndpoint;
|
|
5844
6304
|
mgmtEndpoint;
|
|
5845
6305
|
oauthClient;
|
|
@@ -5886,6 +6346,16 @@ var RedTeamClient = class {
|
|
|
5886
6346
|
oauthClient,
|
|
5887
6347
|
numRetries
|
|
5888
6348
|
});
|
|
6349
|
+
this.eula = new RedTeamEulaClient({
|
|
6350
|
+
baseUrl: mgmtEndpoint,
|
|
6351
|
+
oauthClient,
|
|
6352
|
+
numRetries
|
|
6353
|
+
});
|
|
6354
|
+
this.instances = new RedTeamInstancesClient({
|
|
6355
|
+
baseUrl: mgmtEndpoint,
|
|
6356
|
+
oauthClient,
|
|
6357
|
+
numRetries
|
|
6358
|
+
});
|
|
5889
6359
|
}
|
|
5890
6360
|
// -----------------------------------------------------------------------
|
|
5891
6361
|
// Data plane convenience methods
|
|
@@ -6050,9 +6520,12 @@ var RedTeamClient = class {
|
|
|
6050
6520
|
AttackOutputSchema,
|
|
6051
6521
|
AttackStatus,
|
|
6052
6522
|
AttackType,
|
|
6523
|
+
AuthConfigSchema,
|
|
6053
6524
|
AuthType,
|
|
6054
6525
|
BEARER,
|
|
6055
6526
|
BaseResponseSchema,
|
|
6527
|
+
BasicAuthAuthConfigSchema,
|
|
6528
|
+
BasicAuthLocation,
|
|
6056
6529
|
BedrockAccessConnectionParamsSchema,
|
|
6057
6530
|
BrandSubCategory,
|
|
6058
6531
|
Category,
|
|
@@ -6118,11 +6591,19 @@ var RedTeamClient = class {
|
|
|
6118
6591
|
DeleteProfileResponseSchema,
|
|
6119
6592
|
DeleteTopicConflictSchema,
|
|
6120
6593
|
DeleteTopicResponseSchema,
|
|
6594
|
+
DeploymentProfileAttributeSchema,
|
|
6121
6595
|
DeploymentProfileEntrySchema,
|
|
6596
|
+
DeploymentProfileRequestSchema,
|
|
6122
6597
|
DeploymentProfilesClient,
|
|
6123
6598
|
DeploymentProfilesResponseSchema,
|
|
6124
6599
|
DetectionServiceName,
|
|
6125
6600
|
DetectionServiceResultSchema,
|
|
6601
|
+
DeviceInstanceSchema,
|
|
6602
|
+
DeviceLicenseSchema,
|
|
6603
|
+
DeviceRequestSchema,
|
|
6604
|
+
DeviceResponseSchema,
|
|
6605
|
+
DeviceSchema,
|
|
6606
|
+
DeviceStatusSchema,
|
|
6126
6607
|
DlpDataProfilePolicySchema,
|
|
6127
6608
|
DlpDataProfileSchema,
|
|
6128
6609
|
DlpPatternDetectionSchema,
|
|
@@ -6140,6 +6621,9 @@ var RedTeamClient = class {
|
|
|
6140
6621
|
ErrorSource,
|
|
6141
6622
|
ErrorStatus,
|
|
6142
6623
|
ErrorType,
|
|
6624
|
+
EulaAcceptRequestSchema,
|
|
6625
|
+
EulaContentResponseSchema,
|
|
6626
|
+
EulaResponseSchema,
|
|
6143
6627
|
EvalOutcome,
|
|
6144
6628
|
EvalSummarySchema,
|
|
6145
6629
|
FileFormat,
|
|
@@ -6157,8 +6641,13 @@ var RedTeamClient = class {
|
|
|
6157
6641
|
HEADER_AUTH_TOKEN,
|
|
6158
6642
|
HTTPValidationErrorSchema,
|
|
6159
6643
|
HTTP_FORCE_RETRY_STATUS_CODES,
|
|
6644
|
+
HeadersAuthConfigSchema,
|
|
6160
6645
|
HuggingfaceConnectionParamsSchema,
|
|
6161
6646
|
IODetectedSchema,
|
|
6647
|
+
InstanceExtraDetailsSchema,
|
|
6648
|
+
InstanceGetResponseSchema,
|
|
6649
|
+
InstanceRequestSchema,
|
|
6650
|
+
InstanceResponseSchema,
|
|
6162
6651
|
JobAbortResponseSchema,
|
|
6163
6652
|
JobCreateRequestSchema,
|
|
6164
6653
|
JobListResponseSchema,
|
|
@@ -6246,6 +6735,7 @@ var RedTeamClient = class {
|
|
|
6246
6735
|
ModelSecurityScansClient,
|
|
6247
6736
|
MultiTurnStatefulConfigSchema,
|
|
6248
6737
|
MultiTurnStatelessConfigSchema,
|
|
6738
|
+
OAuth2AuthConfigSchema,
|
|
6249
6739
|
OAuthClient,
|
|
6250
6740
|
OAuthManagementClient,
|
|
6251
6741
|
Oauth2TokenSchema,
|
|
@@ -6287,15 +6777,20 @@ var RedTeamClient = class {
|
|
|
6287
6777
|
RED_TEAM_DASHBOARD_PATH,
|
|
6288
6778
|
RED_TEAM_DATA_ENDPOINT,
|
|
6289
6779
|
RED_TEAM_ERROR_LOG_PATH,
|
|
6780
|
+
RED_TEAM_EULA_PATH,
|
|
6781
|
+
RED_TEAM_INSTANCES_PATH,
|
|
6290
6782
|
RED_TEAM_MGMT_DASHBOARD_PATH,
|
|
6291
6783
|
RED_TEAM_MGMT_ENDPOINT,
|
|
6292
6784
|
RED_TEAM_QUOTA_PATH,
|
|
6785
|
+
RED_TEAM_REGISTRY_CREDENTIALS_PATH,
|
|
6293
6786
|
RED_TEAM_REPORT_DYNAMIC_PATH,
|
|
6294
6787
|
RED_TEAM_REPORT_PATH,
|
|
6295
6788
|
RED_TEAM_REPORT_STATIC_PATH,
|
|
6296
6789
|
RED_TEAM_SCAN_PATH,
|
|
6297
6790
|
RED_TEAM_SENTIMENT_PATH,
|
|
6298
6791
|
RED_TEAM_TARGET_PATH,
|
|
6792
|
+
RED_TEAM_TARGET_VALIDATE_AUTH_PATH,
|
|
6793
|
+
RED_TEAM_TEMPLATE_PATH,
|
|
6299
6794
|
RED_TEAM_TOKEN_ENDPOINT,
|
|
6300
6795
|
RED_TEAM_TSG_ID,
|
|
6301
6796
|
RedTeamCategory,
|
|
@@ -6303,10 +6798,13 @@ var RedTeamClient = class {
|
|
|
6303
6798
|
RedTeamCustomAttackReportsClient,
|
|
6304
6799
|
RedTeamCustomAttacksClient,
|
|
6305
6800
|
RedTeamErrorType,
|
|
6801
|
+
RedTeamEulaClient,
|
|
6802
|
+
RedTeamInstancesClient,
|
|
6306
6803
|
RedTeamPaginationSchema,
|
|
6307
6804
|
RedTeamReportsClient,
|
|
6308
6805
|
RedTeamScansClient,
|
|
6309
6806
|
RedTeamTargetsClient,
|
|
6807
|
+
RegistryCredentialsSchema,
|
|
6310
6808
|
RemediationDetailSchema,
|
|
6311
6809
|
RemediationResponseSchema,
|
|
6312
6810
|
ResponseDetectedSchema,
|
|
@@ -6376,6 +6874,9 @@ var RedTeamClient = class {
|
|
|
6376
6874
|
SubCategoryModelSchema,
|
|
6377
6875
|
SubCategoryStatsSchema,
|
|
6378
6876
|
TargetAdditionalContextSchema,
|
|
6877
|
+
TargetAuthType,
|
|
6878
|
+
TargetAuthValidationRequestSchema,
|
|
6879
|
+
TargetAuthValidationResponseSchema,
|
|
6379
6880
|
TargetBackgroundSchema,
|
|
6380
6881
|
TargetConnectionType,
|
|
6381
6882
|
TargetContextUpdateSchema,
|
|
@@ -6389,6 +6890,7 @@ var RedTeamClient = class {
|
|
|
6389
6890
|
TargetReferenceSchema,
|
|
6390
6891
|
TargetResponseSchema,
|
|
6391
6892
|
TargetStatus,
|
|
6893
|
+
TargetTemplateCollectionSchema,
|
|
6392
6894
|
TargetType,
|
|
6393
6895
|
TargetUpdateRequestSchema,
|
|
6394
6896
|
TcReportSchema,
|
|
@@ -6408,6 +6910,7 @@ var RedTeamClient = class {
|
|
|
6408
6910
|
Verdict,
|
|
6409
6911
|
ViolationListSchema,
|
|
6410
6912
|
ViolationResponseSchema,
|
|
6913
|
+
WebSocketConnectionParamsSchema,
|
|
6411
6914
|
globalConfiguration,
|
|
6412
6915
|
init
|
|
6413
6916
|
});
|