cloudflare/cloudflare-typescript
Publicmirrored from https://github.com/cloudflare/cloudflare-typescriptAvailable
src/resources/ai-gateway/evaluation-types.ts
78lines · modecode
| 1 | // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. |
| 2 | |
| 3 | import { APIResource } from '../../resource'; |
| 4 | import * as Core from '../../core'; |
| 5 | |
| 6 | export class EvaluationTypes extends APIResource { |
| 7 | /** |
| 8 | * List Evaluators |
| 9 | */ |
| 10 | get( |
| 11 | params: EvaluationTypeGetParams, |
| 12 | options?: Core.RequestOptions, |
| 13 | ): Core.APIPromise<EvaluationTypeGetResponse> { |
| 14 | const { account_id, ...query } = params; |
| 15 | return ( |
| 16 | this._client.get(`/accounts/${account_id}/ai-gateway/evaluation-types`, { |
| 17 | query, |
| 18 | ...options, |
| 19 | }) as Core.APIPromise<{ result: EvaluationTypeGetResponse }> |
| 20 | )._thenUnwrap((obj) => obj.result); |
| 21 | } |
| 22 | } |
| 23 | |
| 24 | export type EvaluationTypeGetResponse = Array<EvaluationTypeGetResponse.EvaluationTypeGetResponseItem>; |
| 25 | |
| 26 | export namespace EvaluationTypeGetResponse { |
| 27 | export interface EvaluationTypeGetResponseItem { |
| 28 | id: string; |
| 29 | |
| 30 | created_at: string; |
| 31 | |
| 32 | description: string; |
| 33 | |
| 34 | enable: boolean; |
| 35 | |
| 36 | mandatory: boolean; |
| 37 | |
| 38 | modified_at: string; |
| 39 | |
| 40 | name: string; |
| 41 | |
| 42 | type: string; |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | export interface EvaluationTypeGetParams { |
| 47 | /** |
| 48 | * Path param: |
| 49 | */ |
| 50 | account_id: string; |
| 51 | |
| 52 | /** |
| 53 | * Query param: |
| 54 | */ |
| 55 | order_by?: string; |
| 56 | |
| 57 | /** |
| 58 | * Query param: |
| 59 | */ |
| 60 | order_by_direction?: 'asc' | 'desc'; |
| 61 | |
| 62 | /** |
| 63 | * Query param: |
| 64 | */ |
| 65 | page?: number; |
| 66 | |
| 67 | /** |
| 68 | * Query param: |
| 69 | */ |
| 70 | per_page?: number; |
| 71 | } |
| 72 | |
| 73 | export declare namespace EvaluationTypes { |
| 74 | export { |
| 75 | type EvaluationTypeGetResponse as EvaluationTypeGetResponse, |
| 76 | type EvaluationTypeGetParams as EvaluationTypeGetParams, |
| 77 | }; |
| 78 | } |
| 79 | |