-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathsafety.ts
27 lines (20 loc) · 851 Bytes
/
safety.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from '../resource';
import * as Core from '../core';
import * as Shared from './shared';
export class Safety extends APIResource {
runShield(body: SafetyRunShieldParams, options?: Core.RequestOptions): Core.APIPromise<RunShieldResponse> {
return this._client.post('/v1/safety/run-shield', { body, ...options });
}
}
export interface RunShieldResponse {
violation?: Shared.SafetyViolation;
}
export interface SafetyRunShieldParams {
messages: Array<Shared.Message>;
params: Record<string, boolean | number | string | Array<unknown> | unknown | null>;
shield_id: string;
}
export declare namespace Safety {
export { type RunShieldResponse as RunShieldResponse, type SafetyRunShieldParams as SafetyRunShieldParams };
}