cloudflare/cloudflare-typescript

Public

mirrored from https://github.com/cloudflare/cloudflare-typescriptAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
next

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

src/resources/ai-gateway/ai-gateway.ts

2022lines · modecode

1// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
3import { APIResource } from '../../resource';
4import * as Core from '../../core';
5import * as CustomProvidersAPI from './custom-providers';
6import {
7 CustomProviderCreateParams,
8 CustomProviderCreateResponse,
9 CustomProviderDeleteParams,
10 CustomProviderDeleteResponse,
11 CustomProviderGetParams,
12 CustomProviderGetResponse,
13 CustomProviderListParams,
14 CustomProviderListResponse,
15 CustomProviderListResponsesV4PagePaginationArray,
16 CustomProviders,
17} from './custom-providers';
18import * as DatasetsAPI from './datasets';
19import {
20 DatasetCreateParams,
21 DatasetCreateResponse,
22 DatasetDeleteParams,
23 DatasetDeleteResponse,
24 DatasetGetParams,
25 DatasetGetResponse,
26 DatasetListParams,
27 DatasetListResponse,
28 DatasetListResponsesV4PagePaginationArray,
29 DatasetUpdateParams,
30 DatasetUpdateResponse,
31 Datasets,
32} from './datasets';
33import * as DynamicRoutingAPI from './dynamic-routing';
34import {
35 DynamicRouting,
36 DynamicRoutingCreateDeploymentParams,
37 DynamicRoutingCreateDeploymentResponse,
38 DynamicRoutingCreateParams,
39 DynamicRoutingCreateResponse,
40 DynamicRoutingCreateVersionParams,
41 DynamicRoutingCreateVersionResponse,
42 DynamicRoutingDeleteParams,
43 DynamicRoutingDeleteResponse,
44 DynamicRoutingGetParams,
45 DynamicRoutingGetResponse,
46 DynamicRoutingGetVersionParams,
47 DynamicRoutingGetVersionResponse,
48 DynamicRoutingListDeploymentsParams,
49 DynamicRoutingListDeploymentsResponse,
50 DynamicRoutingListParams,
51 DynamicRoutingListResponse,
52 DynamicRoutingListVersionsParams,
53 DynamicRoutingListVersionsResponse,
54 DynamicRoutingUpdateParams,
55 DynamicRoutingUpdateResponse,
56} from './dynamic-routing';
57import * as EvaluationTypesAPI from './evaluation-types';
58import {
59 EvaluationTypeListParams,
60 EvaluationTypeListResponse,
61 EvaluationTypeListResponsesV4PagePaginationArray,
62 EvaluationTypes,
63} from './evaluation-types';
64import * as EvaluationsAPI from './evaluations';
65import {
66 EvaluationCreateParams,
67 EvaluationCreateResponse,
68 EvaluationDeleteParams,
69 EvaluationDeleteResponse,
70 EvaluationGetParams,
71 EvaluationGetResponse,
72 EvaluationListParams,
73 EvaluationListResponse,
74 EvaluationListResponsesV4PagePaginationArray,
75 Evaluations,
76} from './evaluations';
77import * as LogsAPI from './logs';
78import {
79 LogDeleteParams,
80 LogDeleteResponse,
81 LogEditParams,
82 LogEditResponse,
83 LogGetParams,
84 LogGetResponse,
85 LogListParams,
86 LogListResponse,
87 LogListResponsesV4PagePaginationArray,
88 LogRequestParams,
89 LogRequestResponse,
90 LogResponseParams,
91 LogResponseResponse,
92 Logs,
93} from './logs';
94import * as ProviderConfigsAPI from './provider-configs';
95import {
96 ProviderConfigCreateParams,
97 ProviderConfigCreateResponse,
98 ProviderConfigListParams,
99 ProviderConfigListResponse,
100 ProviderConfigListResponsesV4PagePaginationArray,
101 ProviderConfigs,
102} from './provider-configs';
103import * as URLsAPI from './urls';
104import { URLGetParams, URLGetResponse, URLs } from './urls';
105import * as BillingAPI from './billing/billing';
106import {
107 Billing,
108 BillingCreditBalanceParams,
109 BillingCreditBalanceResponse,
110 BillingInvoiceHistoryParams,
111 BillingInvoiceHistoryResponse,
112 BillingInvoicePreviewParams,
113 BillingInvoicePreviewResponse,
114 BillingUsageHistoryParams,
115 BillingUsageHistoryResponse,
116} from './billing/billing';
117import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../pagination';
118
119export class AIGateway extends APIResource {
120 evaluationTypes: EvaluationTypesAPI.EvaluationTypes = new EvaluationTypesAPI.EvaluationTypes(this._client);
121 customProviders: CustomProvidersAPI.CustomProviders = new CustomProvidersAPI.CustomProviders(this._client);
122 logs: LogsAPI.Logs = new LogsAPI.Logs(this._client);
123 datasets: DatasetsAPI.Datasets = new DatasetsAPI.Datasets(this._client);
124 evaluations: EvaluationsAPI.Evaluations = new EvaluationsAPI.Evaluations(this._client);
125 dynamicRouting: DynamicRoutingAPI.DynamicRouting = new DynamicRoutingAPI.DynamicRouting(this._client);
126 providerConfigs: ProviderConfigsAPI.ProviderConfigs = new ProviderConfigsAPI.ProviderConfigs(this._client);
127 urls: URLsAPI.URLs = new URLsAPI.URLs(this._client);
128 billing: BillingAPI.Billing = new BillingAPI.Billing(this._client);
129
130 /**
131 * Creates a new AI Gateway.
132 *
133 * @example
134 * ```ts
135 * const aiGateway = await client.aiGateway.create({
136 * account_id: '3ebbcb006d4d46d7bb6a8c7f14676cb0',
137 * id: 'my-gateway',
138 * cache_invalidate_on_update: true,
139 * cache_ttl: 0,
140 * collect_logs: true,
141 * rate_limiting_interval: 0,
142 * rate_limiting_limit: 0,
143 * });
144 * ```
145 */
146 create(
147 params: AIGatewayCreateParams,
148 options?: Core.RequestOptions,
149 ): Core.APIPromise<AIGatewayCreateResponse> {
150 const { account_id, ...body } = params;
151 return (
152 this._client.post(`/accounts/${account_id}/ai-gateway/gateways`, {
153 body,
154 ...options,
155 }) as Core.APIPromise<{ result: AIGatewayCreateResponse }>
156 )._thenUnwrap((obj) => obj.result);
157 }
158
159 /**
160 * Updates an existing AI Gateway dataset.
161 *
162 * @example
163 * ```ts
164 * const aiGateway = await client.aiGateway.update(
165 * 'my-gateway',
166 * {
167 * account_id: '3ebbcb006d4d46d7bb6a8c7f14676cb0',
168 * cache_invalidate_on_update: true,
169 * cache_ttl: 0,
170 * collect_logs: true,
171 * rate_limiting_interval: 0,
172 * rate_limiting_limit: 0,
173 * },
174 * );
175 * ```
176 */
177 update(
178 id: string,
179 params: AIGatewayUpdateParams,
180 options?: Core.RequestOptions,
181 ): Core.APIPromise<AIGatewayUpdateResponse> {
182 const { account_id, ...body } = params;
183 return (
184 this._client.put(`/accounts/${account_id}/ai-gateway/gateways/${id}`, {
185 body,
186 ...options,
187 }) as Core.APIPromise<{ result: AIGatewayUpdateResponse }>
188 )._thenUnwrap((obj) => obj.result);
189 }
190
191 /**
192 * Lists all AI Gateway evaluator types configured for the account.
193 *
194 * @example
195 * ```ts
196 * // Automatically fetches more pages as needed.
197 * for await (const aiGatewayListResponse of client.aiGateway.list(
198 * { account_id: '3ebbcb006d4d46d7bb6a8c7f14676cb0' },
199 * )) {
200 * // ...
201 * }
202 * ```
203 */
204 list(
205 params: AIGatewayListParams,
206 options?: Core.RequestOptions,
207 ): Core.PagePromise<AIGatewayListResponsesV4PagePaginationArray, AIGatewayListResponse> {
208 const { account_id, ...query } = params;
209 return this._client.getAPIList(
210 `/accounts/${account_id}/ai-gateway/gateways`,
211 AIGatewayListResponsesV4PagePaginationArray,
212 { query, ...options },
213 );
214 }
215
216 /**
217 * Deletes an AI Gateway dataset.
218 *
219 * @example
220 * ```ts
221 * const aiGateway = await client.aiGateway.delete(
222 * 'my-gateway',
223 * { account_id: '3ebbcb006d4d46d7bb6a8c7f14676cb0' },
224 * );
225 * ```
226 */
227 delete(
228 id: string,
229 params: AIGatewayDeleteParams,
230 options?: Core.RequestOptions,
231 ): Core.APIPromise<AIGatewayDeleteResponse> {
232 const { account_id } = params;
233 return (
234 this._client.delete(`/accounts/${account_id}/ai-gateway/gateways/${id}`, options) as Core.APIPromise<{
235 result: AIGatewayDeleteResponse;
236 }>
237 )._thenUnwrap((obj) => obj.result);
238 }
239
240 /**
241 * Retrieves details for a specific AI Gateway dataset.
242 *
243 * @example
244 * ```ts
245 * const aiGateway = await client.aiGateway.get('my-gateway', {
246 * account_id: '3ebbcb006d4d46d7bb6a8c7f14676cb0',
247 * });
248 * ```
249 */
250 get(
251 id: string,
252 params: AIGatewayGetParams,
253 options?: Core.RequestOptions,
254 ): Core.APIPromise<AIGatewayGetResponse> {
255 const { account_id } = params;
256 return (
257 this._client.get(`/accounts/${account_id}/ai-gateway/gateways/${id}`, options) as Core.APIPromise<{
258 result: AIGatewayGetResponse;
259 }>
260 )._thenUnwrap((obj) => obj.result);
261 }
262}
263
264export class AIGatewayListResponsesV4PagePaginationArray extends V4PagePaginationArray<AIGatewayListResponse> {}
265
266export interface AIGatewayCreateResponse {
267 /**
268 * gateway id
269 */
270 id: string;
271
272 cache_invalidate_on_update: boolean;
273
274 cache_ttl: number | null;
275
276 collect_logs: boolean;
277
278 created_at: string;
279
280 modified_at: string;
281
282 rate_limiting_interval: number | null;
283
284 rate_limiting_limit: number | null;
285
286 authentication?: boolean;
287
288 dlp?: AIGatewayCreateResponse.UnionMember0 | AIGatewayCreateResponse.UnionMember1;
289
290 guardrails?: AIGatewayCreateResponse.Guardrails | null;
291
292 is_default?: boolean;
293
294 log_management?: number | null;
295
296 log_management_strategy?: 'STOP_INSERTING' | 'DELETE_OLDEST' | null;
297
298 logpush?: boolean;
299
300 logpush_public_key?: string | null;
301
302 otel?: Array<AIGatewayCreateResponse.Otel> | null;
303
304 rate_limiting_technique?: 'fixed' | 'sliding' | null;
305
306 /**
307 * Backoff strategy for retry delays
308 */
309 retry_backoff?: 'constant' | 'linear' | 'exponential' | null;
310
311 /**
312 * Delay between retry attempts in milliseconds (0-5000)
313 */
314 retry_delay?: number | null;
315
316 /**
317 * Maximum number of retry attempts for failed requests (1-5)
318 */
319 retry_max_attempts?: number | null;
320
321 spend_limits?: AIGatewayCreateResponse.SpendLimits | null;
322
323 store_id?: string | null;
324
325 stripe?: AIGatewayCreateResponse.Stripe | null;
326
327 /**
328 * Controls how Workers AI inference calls routed through this gateway are billed.
329 * Only 'postpaid' is currently supported.
330 */
331 workers_ai_billing_mode?: 'postpaid';
332
333 zdr?: boolean;
334}
335
336export namespace AIGatewayCreateResponse {
337 export interface UnionMember0 {
338 action: 'BLOCK' | 'FLAG';
339
340 enabled: boolean;
341
342 profiles: Array<string>;
343 }
344
345 export interface UnionMember1 {
346 enabled: boolean;
347
348 policies: Array<UnionMember1.Policy>;
349 }
350
351 export namespace UnionMember1 {
352 export interface Policy {
353 id: string;
354
355 action: 'FLAG' | 'BLOCK';
356
357 check: Array<'REQUEST' | 'RESPONSE'>;
358
359 enabled: boolean;
360
361 profiles: Array<string>;
362 }
363 }
364
365 export interface Guardrails {
366 prompt: Guardrails.Prompt;
367
368 response: Guardrails.Response;
369 }
370
371 export namespace Guardrails {
372 export interface Prompt {
373 P1?: 'FLAG' | 'BLOCK';
374
375 S1?: 'FLAG' | 'BLOCK';
376
377 S10?: 'FLAG' | 'BLOCK';
378
379 S11?: 'FLAG' | 'BLOCK';
380
381 S12?: 'FLAG' | 'BLOCK';
382
383 S13?: 'FLAG' | 'BLOCK';
384
385 S2?: 'FLAG' | 'BLOCK';
386
387 S3?: 'FLAG' | 'BLOCK';
388
389 S4?: 'FLAG' | 'BLOCK';
390
391 S5?: 'FLAG' | 'BLOCK';
392
393 S6?: 'FLAG' | 'BLOCK';
394
395 S7?: 'FLAG' | 'BLOCK';
396
397 S8?: 'FLAG' | 'BLOCK';
398
399 S9?: 'FLAG' | 'BLOCK';
400 }
401
402 export interface Response {
403 P1?: 'FLAG' | 'BLOCK';
404
405 S1?: 'FLAG' | 'BLOCK';
406
407 S10?: 'FLAG' | 'BLOCK';
408
409 S11?: 'FLAG' | 'BLOCK';
410
411 S12?: 'FLAG' | 'BLOCK';
412
413 S13?: 'FLAG' | 'BLOCK';
414
415 S2?: 'FLAG' | 'BLOCK';
416
417 S3?: 'FLAG' | 'BLOCK';
418
419 S4?: 'FLAG' | 'BLOCK';
420
421 S5?: 'FLAG' | 'BLOCK';
422
423 S6?: 'FLAG' | 'BLOCK';
424
425 S7?: 'FLAG' | 'BLOCK';
426
427 S8?: 'FLAG' | 'BLOCK';
428
429 S9?: 'FLAG' | 'BLOCK';
430 }
431 }
432
433 export interface Otel {
434 headers: { [key: string]: string };
435
436 url: string;
437
438 authorization?: string;
439
440 content_type?: 'json' | 'protobuf';
441 }
442
443 export interface SpendLimits {
444 enabled?: boolean;
445
446 rules?: Array<SpendLimits.Rule>;
447 }
448
449 export namespace SpendLimits {
450 export interface Rule {
451 limit: number;
452
453 limitType: 'cost';
454
455 window: number;
456
457 id?: string;
458
459 enabled?: boolean;
460
461 metadata?: { [key: string]: Rule.Mode | Rule.UnionMember1 };
462
463 model?: Rule.Model;
464
465 provider?: Rule.Provider;
466
467 technique?: 'fixed' | 'sliding';
468 }
469
470 export namespace Rule {
471 export interface Mode {
472 mode: 'partition';
473 }
474
475 export interface UnionMember1 {
476 mode: 'filter';
477
478 values: Array<string>;
479 }
480
481 export interface Model {
482 mode: 'filter';
483
484 values: Array<string>;
485 }
486
487 export interface Provider {
488 mode: 'filter';
489
490 values: Array<string>;
491 }
492 }
493 }
494
495 export interface Stripe {
496 authorization: string;
497
498 usage_events: Array<Stripe.UsageEvent>;
499 }
500
501 export namespace Stripe {
502 export interface UsageEvent {
503 payload: string;
504 }
505 }
506}
507
508export interface AIGatewayUpdateResponse {
509 /**
510 * gateway id
511 */
512 id: string;
513
514 cache_invalidate_on_update: boolean;
515
516 cache_ttl: number | null;
517
518 collect_logs: boolean;
519
520 created_at: string;
521
522 modified_at: string;
523
524 rate_limiting_interval: number | null;
525
526 rate_limiting_limit: number | null;
527
528 authentication?: boolean;
529
530 dlp?: AIGatewayUpdateResponse.UnionMember0 | AIGatewayUpdateResponse.UnionMember1;
531
532 guardrails?: AIGatewayUpdateResponse.Guardrails | null;
533
534 is_default?: boolean;
535
536 log_management?: number | null;
537
538 log_management_strategy?: 'STOP_INSERTING' | 'DELETE_OLDEST' | null;
539
540 logpush?: boolean;
541
542 logpush_public_key?: string | null;
543
544 otel?: Array<AIGatewayUpdateResponse.Otel> | null;
545
546 rate_limiting_technique?: 'fixed' | 'sliding' | null;
547
548 /**
549 * Backoff strategy for retry delays
550 */
551 retry_backoff?: 'constant' | 'linear' | 'exponential' | null;
552
553 /**
554 * Delay between retry attempts in milliseconds (0-5000)
555 */
556 retry_delay?: number | null;
557
558 /**
559 * Maximum number of retry attempts for failed requests (1-5)
560 */
561 retry_max_attempts?: number | null;
562
563 spend_limits?: AIGatewayUpdateResponse.SpendLimits | null;
564
565 store_id?: string | null;
566
567 stripe?: AIGatewayUpdateResponse.Stripe | null;
568
569 /**
570 * Controls how Workers AI inference calls routed through this gateway are billed.
571 * Only 'postpaid' is currently supported.
572 */
573 workers_ai_billing_mode?: 'postpaid';
574
575 zdr?: boolean;
576}
577
578export namespace AIGatewayUpdateResponse {
579 export interface UnionMember0 {
580 action: 'BLOCK' | 'FLAG';
581
582 enabled: boolean;
583
584 profiles: Array<string>;
585 }
586
587 export interface UnionMember1 {
588 enabled: boolean;
589
590 policies: Array<UnionMember1.Policy>;
591 }
592
593 export namespace UnionMember1 {
594 export interface Policy {
595 id: string;
596
597 action: 'FLAG' | 'BLOCK';
598
599 check: Array<'REQUEST' | 'RESPONSE'>;
600
601 enabled: boolean;
602
603 profiles: Array<string>;
604 }
605 }
606
607 export interface Guardrails {
608 prompt: Guardrails.Prompt;
609
610 response: Guardrails.Response;
611 }
612
613 export namespace Guardrails {
614 export interface Prompt {
615 P1?: 'FLAG' | 'BLOCK';
616
617 S1?: 'FLAG' | 'BLOCK';
618
619 S10?: 'FLAG' | 'BLOCK';
620
621 S11?: 'FLAG' | 'BLOCK';
622
623 S12?: 'FLAG' | 'BLOCK';
624
625 S13?: 'FLAG' | 'BLOCK';
626
627 S2?: 'FLAG' | 'BLOCK';
628
629 S3?: 'FLAG' | 'BLOCK';
630
631 S4?: 'FLAG' | 'BLOCK';
632
633 S5?: 'FLAG' | 'BLOCK';
634
635 S6?: 'FLAG' | 'BLOCK';
636
637 S7?: 'FLAG' | 'BLOCK';
638
639 S8?: 'FLAG' | 'BLOCK';
640
641 S9?: 'FLAG' | 'BLOCK';
642 }
643
644 export interface Response {
645 P1?: 'FLAG' | 'BLOCK';
646
647 S1?: 'FLAG' | 'BLOCK';
648
649 S10?: 'FLAG' | 'BLOCK';
650
651 S11?: 'FLAG' | 'BLOCK';
652
653 S12?: 'FLAG' | 'BLOCK';
654
655 S13?: 'FLAG' | 'BLOCK';
656
657 S2?: 'FLAG' | 'BLOCK';
658
659 S3?: 'FLAG' | 'BLOCK';
660
661 S4?: 'FLAG' | 'BLOCK';
662
663 S5?: 'FLAG' | 'BLOCK';
664
665 S6?: 'FLAG' | 'BLOCK';
666
667 S7?: 'FLAG' | 'BLOCK';
668
669 S8?: 'FLAG' | 'BLOCK';
670
671 S9?: 'FLAG' | 'BLOCK';
672 }
673 }
674
675 export interface Otel {
676 headers: { [key: string]: string };
677
678 url: string;
679
680 authorization?: string;
681
682 content_type?: 'json' | 'protobuf';
683 }
684
685 export interface SpendLimits {
686 enabled?: boolean;
687
688 rules?: Array<SpendLimits.Rule>;
689 }
690
691 export namespace SpendLimits {
692 export interface Rule {
693 limit: number;
694
695 limitType: 'cost';
696
697 window: number;
698
699 id?: string;
700
701 enabled?: boolean;
702
703 metadata?: { [key: string]: Rule.Mode | Rule.UnionMember1 };
704
705 model?: Rule.Model;
706
707 provider?: Rule.Provider;
708
709 technique?: 'fixed' | 'sliding';
710 }
711
712 export namespace Rule {
713 export interface Mode {
714 mode: 'partition';
715 }
716
717 export interface UnionMember1 {
718 mode: 'filter';
719
720 values: Array<string>;
721 }
722
723 export interface Model {
724 mode: 'filter';
725
726 values: Array<string>;
727 }
728
729 export interface Provider {
730 mode: 'filter';
731
732 values: Array<string>;
733 }
734 }
735 }
736
737 export interface Stripe {
738 authorization: string;
739
740 usage_events: Array<Stripe.UsageEvent>;
741 }
742
743 export namespace Stripe {
744 export interface UsageEvent {
745 payload: string;
746 }
747 }
748}
749
750export interface AIGatewayListResponse {
751 /**
752 * gateway id
753 */
754 id: string;
755
756 cache_invalidate_on_update: boolean;
757
758 cache_ttl: number | null;
759
760 collect_logs: boolean;
761
762 created_at: string;
763
764 modified_at: string;
765
766 rate_limiting_interval: number | null;
767
768 rate_limiting_limit: number | null;
769
770 authentication?: boolean;
771
772 dlp?: AIGatewayListResponse.UnionMember0 | AIGatewayListResponse.UnionMember1;
773
774 guardrails?: AIGatewayListResponse.Guardrails | null;
775
776 is_default?: boolean;
777
778 log_management?: number | null;
779
780 log_management_strategy?: 'STOP_INSERTING' | 'DELETE_OLDEST' | null;
781
782 logpush?: boolean;
783
784 logpush_public_key?: string | null;
785
786 otel?: Array<AIGatewayListResponse.Otel> | null;
787
788 rate_limiting_technique?: 'fixed' | 'sliding' | null;
789
790 /**
791 * Backoff strategy for retry delays
792 */
793 retry_backoff?: 'constant' | 'linear' | 'exponential' | null;
794
795 /**
796 * Delay between retry attempts in milliseconds (0-5000)
797 */
798 retry_delay?: number | null;
799
800 /**
801 * Maximum number of retry attempts for failed requests (1-5)
802 */
803 retry_max_attempts?: number | null;
804
805 spend_limits?: AIGatewayListResponse.SpendLimits | null;
806
807 store_id?: string | null;
808
809 stripe?: AIGatewayListResponse.Stripe | null;
810
811 /**
812 * Controls how Workers AI inference calls routed through this gateway are billed.
813 * Only 'postpaid' is currently supported.
814 */
815 workers_ai_billing_mode?: 'postpaid';
816
817 zdr?: boolean;
818}
819
820export namespace AIGatewayListResponse {
821 export interface UnionMember0 {
822 action: 'BLOCK' | 'FLAG';
823
824 enabled: boolean;
825
826 profiles: Array<string>;
827 }
828
829 export interface UnionMember1 {
830 enabled: boolean;
831
832 policies: Array<UnionMember1.Policy>;
833 }
834
835 export namespace UnionMember1 {
836 export interface Policy {
837 id: string;
838
839 action: 'FLAG' | 'BLOCK';
840
841 check: Array<'REQUEST' | 'RESPONSE'>;
842
843 enabled: boolean;
844
845 profiles: Array<string>;
846 }
847 }
848
849 export interface Guardrails {
850 prompt: Guardrails.Prompt;
851
852 response: Guardrails.Response;
853 }
854
855 export namespace Guardrails {
856 export interface Prompt {
857 P1?: 'FLAG' | 'BLOCK';
858
859 S1?: 'FLAG' | 'BLOCK';
860
861 S10?: 'FLAG' | 'BLOCK';
862
863 S11?: 'FLAG' | 'BLOCK';
864
865 S12?: 'FLAG' | 'BLOCK';
866
867 S13?: 'FLAG' | 'BLOCK';
868
869 S2?: 'FLAG' | 'BLOCK';
870
871 S3?: 'FLAG' | 'BLOCK';
872
873 S4?: 'FLAG' | 'BLOCK';
874
875 S5?: 'FLAG' | 'BLOCK';
876
877 S6?: 'FLAG' | 'BLOCK';
878
879 S7?: 'FLAG' | 'BLOCK';
880
881 S8?: 'FLAG' | 'BLOCK';
882
883 S9?: 'FLAG' | 'BLOCK';
884 }
885
886 export interface Response {
887 P1?: 'FLAG' | 'BLOCK';
888
889 S1?: 'FLAG' | 'BLOCK';
890
891 S10?: 'FLAG' | 'BLOCK';
892
893 S11?: 'FLAG' | 'BLOCK';
894
895 S12?: 'FLAG' | 'BLOCK';
896
897 S13?: 'FLAG' | 'BLOCK';
898
899 S2?: 'FLAG' | 'BLOCK';
900
901 S3?: 'FLAG' | 'BLOCK';
902
903 S4?: 'FLAG' | 'BLOCK';
904
905 S5?: 'FLAG' | 'BLOCK';
906
907 S6?: 'FLAG' | 'BLOCK';
908
909 S7?: 'FLAG' | 'BLOCK';
910
911 S8?: 'FLAG' | 'BLOCK';
912
913 S9?: 'FLAG' | 'BLOCK';
914 }
915 }
916
917 export interface Otel {
918 headers: { [key: string]: string };
919
920 url: string;
921
922 authorization?: string;
923
924 content_type?: 'json' | 'protobuf';
925 }
926
927 export interface SpendLimits {
928 enabled?: boolean;
929
930 rules?: Array<SpendLimits.Rule>;
931 }
932
933 export namespace SpendLimits {
934 export interface Rule {
935 limit: number;
936
937 limitType: 'cost';
938
939 window: number;
940
941 id?: string;
942
943 enabled?: boolean;
944
945 metadata?: { [key: string]: Rule.Mode | Rule.UnionMember1 };
946
947 model?: Rule.Model;
948
949 provider?: Rule.Provider;
950
951 technique?: 'fixed' | 'sliding';
952 }
953
954 export namespace Rule {
955 export interface Mode {
956 mode: 'partition';
957 }
958
959 export interface UnionMember1 {
960 mode: 'filter';
961
962 values: Array<string>;
963 }
964
965 export interface Model {
966 mode: 'filter';
967
968 values: Array<string>;
969 }
970
971 export interface Provider {
972 mode: 'filter';
973
974 values: Array<string>;
975 }
976 }
977 }
978
979 export interface Stripe {
980 authorization: string;
981
982 usage_events: Array<Stripe.UsageEvent>;
983 }
984
985 export namespace Stripe {
986 export interface UsageEvent {
987 payload: string;
988 }
989 }
990}
991
992export interface AIGatewayDeleteResponse {
993 /**
994 * gateway id
995 */
996 id: string;
997
998 cache_invalidate_on_update: boolean;
999
1000 cache_ttl: number | null;
1001
1002 collect_logs: boolean;
1003
1004 created_at: string;
1005
1006 modified_at: string;
1007
1008 rate_limiting_interval: number | null;
1009
1010 rate_limiting_limit: number | null;
1011
1012 authentication?: boolean;
1013
1014 dlp?: AIGatewayDeleteResponse.UnionMember0 | AIGatewayDeleteResponse.UnionMember1;
1015
1016 guardrails?: AIGatewayDeleteResponse.Guardrails | null;
1017
1018 is_default?: boolean;
1019
1020 log_management?: number | null;
1021
1022 log_management_strategy?: 'STOP_INSERTING' | 'DELETE_OLDEST' | null;
1023
1024 logpush?: boolean;
1025
1026 logpush_public_key?: string | null;
1027
1028 otel?: Array<AIGatewayDeleteResponse.Otel> | null;
1029
1030 rate_limiting_technique?: 'fixed' | 'sliding' | null;
1031
1032 /**
1033 * Backoff strategy for retry delays
1034 */
1035 retry_backoff?: 'constant' | 'linear' | 'exponential' | null;
1036
1037 /**
1038 * Delay between retry attempts in milliseconds (0-5000)
1039 */
1040 retry_delay?: number | null;
1041
1042 /**
1043 * Maximum number of retry attempts for failed requests (1-5)
1044 */
1045 retry_max_attempts?: number | null;
1046
1047 spend_limits?: AIGatewayDeleteResponse.SpendLimits | null;
1048
1049 store_id?: string | null;
1050
1051 stripe?: AIGatewayDeleteResponse.Stripe | null;
1052
1053 /**
1054 * Controls how Workers AI inference calls routed through this gateway are billed.
1055 * Only 'postpaid' is currently supported.
1056 */
1057 workers_ai_billing_mode?: 'postpaid';
1058
1059 zdr?: boolean;
1060}
1061
1062export namespace AIGatewayDeleteResponse {
1063 export interface UnionMember0 {
1064 action: 'BLOCK' | 'FLAG';
1065
1066 enabled: boolean;
1067
1068 profiles: Array<string>;
1069 }
1070
1071 export interface UnionMember1 {
1072 enabled: boolean;
1073
1074 policies: Array<UnionMember1.Policy>;
1075 }
1076
1077 export namespace UnionMember1 {
1078 export interface Policy {
1079 id: string;
1080
1081 action: 'FLAG' | 'BLOCK';
1082
1083 check: Array<'REQUEST' | 'RESPONSE'>;
1084
1085 enabled: boolean;
1086
1087 profiles: Array<string>;
1088 }
1089 }
1090
1091 export interface Guardrails {
1092 prompt: Guardrails.Prompt;
1093
1094 response: Guardrails.Response;
1095 }
1096
1097 export namespace Guardrails {
1098 export interface Prompt {
1099 P1?: 'FLAG' | 'BLOCK';
1100
1101 S1?: 'FLAG' | 'BLOCK';
1102
1103 S10?: 'FLAG' | 'BLOCK';
1104
1105 S11?: 'FLAG' | 'BLOCK';
1106
1107 S12?: 'FLAG' | 'BLOCK';
1108
1109 S13?: 'FLAG' | 'BLOCK';
1110
1111 S2?: 'FLAG' | 'BLOCK';
1112
1113 S3?: 'FLAG' | 'BLOCK';
1114
1115 S4?: 'FLAG' | 'BLOCK';
1116
1117 S5?: 'FLAG' | 'BLOCK';
1118
1119 S6?: 'FLAG' | 'BLOCK';
1120
1121 S7?: 'FLAG' | 'BLOCK';
1122
1123 S8?: 'FLAG' | 'BLOCK';
1124
1125 S9?: 'FLAG' | 'BLOCK';
1126 }
1127
1128 export interface Response {
1129 P1?: 'FLAG' | 'BLOCK';
1130
1131 S1?: 'FLAG' | 'BLOCK';
1132
1133 S10?: 'FLAG' | 'BLOCK';
1134
1135 S11?: 'FLAG' | 'BLOCK';
1136
1137 S12?: 'FLAG' | 'BLOCK';
1138
1139 S13?: 'FLAG' | 'BLOCK';
1140
1141 S2?: 'FLAG' | 'BLOCK';
1142
1143 S3?: 'FLAG' | 'BLOCK';
1144
1145 S4?: 'FLAG' | 'BLOCK';
1146
1147 S5?: 'FLAG' | 'BLOCK';
1148
1149 S6?: 'FLAG' | 'BLOCK';
1150
1151 S7?: 'FLAG' | 'BLOCK';
1152
1153 S8?: 'FLAG' | 'BLOCK';
1154
1155 S9?: 'FLAG' | 'BLOCK';
1156 }
1157 }
1158
1159 export interface Otel {
1160 headers: { [key: string]: string };
1161
1162 url: string;
1163
1164 authorization?: string;
1165
1166 content_type?: 'json' | 'protobuf';
1167 }
1168
1169 export interface SpendLimits {
1170 enabled?: boolean;
1171
1172 rules?: Array<SpendLimits.Rule>;
1173 }
1174
1175 export namespace SpendLimits {
1176 export interface Rule {
1177 limit: number;
1178
1179 limitType: 'cost';
1180
1181 window: number;
1182
1183 id?: string;
1184
1185 enabled?: boolean;
1186
1187 metadata?: { [key: string]: Rule.Mode | Rule.UnionMember1 };
1188
1189 model?: Rule.Model;
1190
1191 provider?: Rule.Provider;
1192
1193 technique?: 'fixed' | 'sliding';
1194 }
1195
1196 export namespace Rule {
1197 export interface Mode {
1198 mode: 'partition';
1199 }
1200
1201 export interface UnionMember1 {
1202 mode: 'filter';
1203
1204 values: Array<string>;
1205 }
1206
1207 export interface Model {
1208 mode: 'filter';
1209
1210 values: Array<string>;
1211 }
1212
1213 export interface Provider {
1214 mode: 'filter';
1215
1216 values: Array<string>;
1217 }
1218 }
1219 }
1220
1221 export interface Stripe {
1222 authorization: string;
1223
1224 usage_events: Array<Stripe.UsageEvent>;
1225 }
1226
1227 export namespace Stripe {
1228 export interface UsageEvent {
1229 payload: string;
1230 }
1231 }
1232}
1233
1234export interface AIGatewayGetResponse {
1235 /**
1236 * gateway id
1237 */
1238 id: string;
1239
1240 cache_invalidate_on_update: boolean;
1241
1242 cache_ttl: number | null;
1243
1244 collect_logs: boolean;
1245
1246 created_at: string;
1247
1248 modified_at: string;
1249
1250 rate_limiting_interval: number | null;
1251
1252 rate_limiting_limit: number | null;
1253
1254 authentication?: boolean;
1255
1256 dlp?: AIGatewayGetResponse.UnionMember0 | AIGatewayGetResponse.UnionMember1;
1257
1258 guardrails?: AIGatewayGetResponse.Guardrails | null;
1259
1260 is_default?: boolean;
1261
1262 log_management?: number | null;
1263
1264 log_management_strategy?: 'STOP_INSERTING' | 'DELETE_OLDEST' | null;
1265
1266 logpush?: boolean;
1267
1268 logpush_public_key?: string | null;
1269
1270 otel?: Array<AIGatewayGetResponse.Otel> | null;
1271
1272 rate_limiting_technique?: 'fixed' | 'sliding' | null;
1273
1274 /**
1275 * Backoff strategy for retry delays
1276 */
1277 retry_backoff?: 'constant' | 'linear' | 'exponential' | null;
1278
1279 /**
1280 * Delay between retry attempts in milliseconds (0-5000)
1281 */
1282 retry_delay?: number | null;
1283
1284 /**
1285 * Maximum number of retry attempts for failed requests (1-5)
1286 */
1287 retry_max_attempts?: number | null;
1288
1289 spend_limits?: AIGatewayGetResponse.SpendLimits | null;
1290
1291 store_id?: string | null;
1292
1293 stripe?: AIGatewayGetResponse.Stripe | null;
1294
1295 /**
1296 * Controls how Workers AI inference calls routed through this gateway are billed.
1297 * Only 'postpaid' is currently supported.
1298 */
1299 workers_ai_billing_mode?: 'postpaid';
1300
1301 zdr?: boolean;
1302}
1303
1304export namespace AIGatewayGetResponse {
1305 export interface UnionMember0 {
1306 action: 'BLOCK' | 'FLAG';
1307
1308 enabled: boolean;
1309
1310 profiles: Array<string>;
1311 }
1312
1313 export interface UnionMember1 {
1314 enabled: boolean;
1315
1316 policies: Array<UnionMember1.Policy>;
1317 }
1318
1319 export namespace UnionMember1 {
1320 export interface Policy {
1321 id: string;
1322
1323 action: 'FLAG' | 'BLOCK';
1324
1325 check: Array<'REQUEST' | 'RESPONSE'>;
1326
1327 enabled: boolean;
1328
1329 profiles: Array<string>;
1330 }
1331 }
1332
1333 export interface Guardrails {
1334 prompt: Guardrails.Prompt;
1335
1336 response: Guardrails.Response;
1337 }
1338
1339 export namespace Guardrails {
1340 export interface Prompt {
1341 P1?: 'FLAG' | 'BLOCK';
1342
1343 S1?: 'FLAG' | 'BLOCK';
1344
1345 S10?: 'FLAG' | 'BLOCK';
1346
1347 S11?: 'FLAG' | 'BLOCK';
1348
1349 S12?: 'FLAG' | 'BLOCK';
1350
1351 S13?: 'FLAG' | 'BLOCK';
1352
1353 S2?: 'FLAG' | 'BLOCK';
1354
1355 S3?: 'FLAG' | 'BLOCK';
1356
1357 S4?: 'FLAG' | 'BLOCK';
1358
1359 S5?: 'FLAG' | 'BLOCK';
1360
1361 S6?: 'FLAG' | 'BLOCK';
1362
1363 S7?: 'FLAG' | 'BLOCK';
1364
1365 S8?: 'FLAG' | 'BLOCK';
1366
1367 S9?: 'FLAG' | 'BLOCK';
1368 }
1369
1370 export interface Response {
1371 P1?: 'FLAG' | 'BLOCK';
1372
1373 S1?: 'FLAG' | 'BLOCK';
1374
1375 S10?: 'FLAG' | 'BLOCK';
1376
1377 S11?: 'FLAG' | 'BLOCK';
1378
1379 S12?: 'FLAG' | 'BLOCK';
1380
1381 S13?: 'FLAG' | 'BLOCK';
1382
1383 S2?: 'FLAG' | 'BLOCK';
1384
1385 S3?: 'FLAG' | 'BLOCK';
1386
1387 S4?: 'FLAG' | 'BLOCK';
1388
1389 S5?: 'FLAG' | 'BLOCK';
1390
1391 S6?: 'FLAG' | 'BLOCK';
1392
1393 S7?: 'FLAG' | 'BLOCK';
1394
1395 S8?: 'FLAG' | 'BLOCK';
1396
1397 S9?: 'FLAG' | 'BLOCK';
1398 }
1399 }
1400
1401 export interface Otel {
1402 headers: { [key: string]: string };
1403
1404 url: string;
1405
1406 authorization?: string;
1407
1408 content_type?: 'json' | 'protobuf';
1409 }
1410
1411 export interface SpendLimits {
1412 enabled?: boolean;
1413
1414 rules?: Array<SpendLimits.Rule>;
1415 }
1416
1417 export namespace SpendLimits {
1418 export interface Rule {
1419 limit: number;
1420
1421 limitType: 'cost';
1422
1423 window: number;
1424
1425 id?: string;
1426
1427 enabled?: boolean;
1428
1429 metadata?: { [key: string]: Rule.Mode | Rule.UnionMember1 };
1430
1431 model?: Rule.Model;
1432
1433 provider?: Rule.Provider;
1434
1435 technique?: 'fixed' | 'sliding';
1436 }
1437
1438 export namespace Rule {
1439 export interface Mode {
1440 mode: 'partition';
1441 }
1442
1443 export interface UnionMember1 {
1444 mode: 'filter';
1445
1446 values: Array<string>;
1447 }
1448
1449 export interface Model {
1450 mode: 'filter';
1451
1452 values: Array<string>;
1453 }
1454
1455 export interface Provider {
1456 mode: 'filter';
1457
1458 values: Array<string>;
1459 }
1460 }
1461 }
1462
1463 export interface Stripe {
1464 authorization: string;
1465
1466 usage_events: Array<Stripe.UsageEvent>;
1467 }
1468
1469 export namespace Stripe {
1470 export interface UsageEvent {
1471 payload: string;
1472 }
1473 }
1474}
1475
1476export interface AIGatewayCreateParams {
1477 /**
1478 * Path param
1479 */
1480 account_id: string;
1481
1482 /**
1483 * Body param: gateway id
1484 */
1485 id: string;
1486
1487 /**
1488 * Body param
1489 */
1490 cache_invalidate_on_update: boolean;
1491
1492 /**
1493 * Body param
1494 */
1495 cache_ttl: number | null;
1496
1497 /**
1498 * Body param
1499 */
1500 collect_logs: boolean;
1501
1502 /**
1503 * Body param
1504 */
1505 rate_limiting_interval: number | null;
1506
1507 /**
1508 * Body param
1509 */
1510 rate_limiting_limit: number | null;
1511
1512 /**
1513 * Body param
1514 */
1515 authentication?: boolean;
1516
1517 /**
1518 * Body param
1519 */
1520 log_management?: number | null;
1521
1522 /**
1523 * Body param
1524 */
1525 log_management_strategy?: 'STOP_INSERTING' | 'DELETE_OLDEST' | null;
1526
1527 /**
1528 * Body param
1529 */
1530 logpush?: boolean;
1531
1532 /**
1533 * Body param
1534 */
1535 logpush_public_key?: string | null;
1536
1537 /**
1538 * Body param
1539 */
1540 rate_limiting_technique?: 'fixed' | 'sliding' | null;
1541
1542 /**
1543 * Body param: Backoff strategy for retry delays
1544 */
1545 retry_backoff?: 'constant' | 'linear' | 'exponential' | null;
1546
1547 /**
1548 * Body param: Delay between retry attempts in milliseconds (0-5000)
1549 */
1550 retry_delay?: number | null;
1551
1552 /**
1553 * Body param: Maximum number of retry attempts for failed requests (1-5)
1554 */
1555 retry_max_attempts?: number | null;
1556
1557 /**
1558 * Body param: Controls how Workers AI inference calls routed through this gateway
1559 * are billed. Only 'postpaid' is currently supported.
1560 */
1561 workers_ai_billing_mode?: 'postpaid';
1562
1563 /**
1564 * Body param
1565 */
1566 zdr?: boolean;
1567}
1568
1569export interface AIGatewayUpdateParams {
1570 /**
1571 * Path param
1572 */
1573 account_id: string;
1574
1575 /**
1576 * Body param
1577 */
1578 cache_invalidate_on_update: boolean;
1579
1580 /**
1581 * Body param
1582 */
1583 cache_ttl: number | null;
1584
1585 /**
1586 * Body param
1587 */
1588 collect_logs: boolean;
1589
1590 /**
1591 * Body param
1592 */
1593 rate_limiting_interval: number | null;
1594
1595 /**
1596 * Body param
1597 */
1598 rate_limiting_limit: number | null;
1599
1600 /**
1601 * Body param
1602 */
1603 authentication?: boolean;
1604
1605 /**
1606 * Body param
1607 */
1608 dlp?: AIGatewayUpdateParams.UnionMember0 | AIGatewayUpdateParams.UnionMember1;
1609
1610 /**
1611 * Body param
1612 */
1613 guardrails?: AIGatewayUpdateParams.Guardrails | null;
1614
1615 /**
1616 * Body param
1617 */
1618 log_management?: number | null;
1619
1620 /**
1621 * Body param
1622 */
1623 log_management_strategy?: 'STOP_INSERTING' | 'DELETE_OLDEST' | null;
1624
1625 /**
1626 * Body param
1627 */
1628 logpush?: boolean;
1629
1630 /**
1631 * Body param
1632 */
1633 logpush_public_key?: string | null;
1634
1635 /**
1636 * Body param
1637 */
1638 otel?: Array<AIGatewayUpdateParams.Otel> | null;
1639
1640 /**
1641 * Body param
1642 */
1643 rate_limiting_technique?: 'fixed' | 'sliding' | null;
1644
1645 /**
1646 * Body param: Backoff strategy for retry delays
1647 */
1648 retry_backoff?: 'constant' | 'linear' | 'exponential' | null;
1649
1650 /**
1651 * Body param: Delay between retry attempts in milliseconds (0-5000)
1652 */
1653 retry_delay?: number | null;
1654
1655 /**
1656 * Body param: Maximum number of retry attempts for failed requests (1-5)
1657 */
1658 retry_max_attempts?: number | null;
1659
1660 /**
1661 * Body param
1662 */
1663 spend_limits?: AIGatewayUpdateParams.SpendLimits | null;
1664
1665 /**
1666 * Body param
1667 */
1668 store_id?: string | null;
1669
1670 /**
1671 * Body param
1672 */
1673 stripe?: AIGatewayUpdateParams.Stripe | null;
1674
1675 /**
1676 * Body param: Controls how Workers AI inference calls routed through this gateway
1677 * are billed. Only 'postpaid' is currently supported.
1678 */
1679 workers_ai_billing_mode?: 'postpaid';
1680
1681 /**
1682 * Body param
1683 */
1684 zdr?: boolean;
1685}
1686
1687export namespace AIGatewayUpdateParams {
1688 export interface UnionMember0 {
1689 action: 'BLOCK' | 'FLAG';
1690
1691 enabled: boolean;
1692
1693 profiles: Array<string>;
1694 }
1695
1696 export interface UnionMember1 {
1697 enabled: boolean;
1698
1699 policies: Array<UnionMember1.Policy>;
1700 }
1701
1702 export namespace UnionMember1 {
1703 export interface Policy {
1704 id: string;
1705
1706 action: 'FLAG' | 'BLOCK';
1707
1708 check: Array<'REQUEST' | 'RESPONSE'>;
1709
1710 enabled: boolean;
1711
1712 profiles: Array<string>;
1713 }
1714 }
1715
1716 export interface Guardrails {
1717 prompt: Guardrails.Prompt;
1718
1719 response: Guardrails.Response;
1720 }
1721
1722 export namespace Guardrails {
1723 export interface Prompt {
1724 P1?: 'FLAG' | 'BLOCK';
1725
1726 S1?: 'FLAG' | 'BLOCK';
1727
1728 S10?: 'FLAG' | 'BLOCK';
1729
1730 S11?: 'FLAG' | 'BLOCK';
1731
1732 S12?: 'FLAG' | 'BLOCK';
1733
1734 S13?: 'FLAG' | 'BLOCK';
1735
1736 S2?: 'FLAG' | 'BLOCK';
1737
1738 S3?: 'FLAG' | 'BLOCK';
1739
1740 S4?: 'FLAG' | 'BLOCK';
1741
1742 S5?: 'FLAG' | 'BLOCK';
1743
1744 S6?: 'FLAG' | 'BLOCK';
1745
1746 S7?: 'FLAG' | 'BLOCK';
1747
1748 S8?: 'FLAG' | 'BLOCK';
1749
1750 S9?: 'FLAG' | 'BLOCK';
1751 }
1752
1753 export interface Response {
1754 P1?: 'FLAG' | 'BLOCK';
1755
1756 S1?: 'FLAG' | 'BLOCK';
1757
1758 S10?: 'FLAG' | 'BLOCK';
1759
1760 S11?: 'FLAG' | 'BLOCK';
1761
1762 S12?: 'FLAG' | 'BLOCK';
1763
1764 S13?: 'FLAG' | 'BLOCK';
1765
1766 S2?: 'FLAG' | 'BLOCK';
1767
1768 S3?: 'FLAG' | 'BLOCK';
1769
1770 S4?: 'FLAG' | 'BLOCK';
1771
1772 S5?: 'FLAG' | 'BLOCK';
1773
1774 S6?: 'FLAG' | 'BLOCK';
1775
1776 S7?: 'FLAG' | 'BLOCK';
1777
1778 S8?: 'FLAG' | 'BLOCK';
1779
1780 S9?: 'FLAG' | 'BLOCK';
1781 }
1782 }
1783
1784 export interface Otel {
1785 headers: { [key: string]: string };
1786
1787 url: string;
1788
1789 authorization?: string;
1790
1791 content_type?: 'json' | 'protobuf';
1792 }
1793
1794 export interface SpendLimits {
1795 enabled?: boolean;
1796
1797 rules?: Array<SpendLimits.Rule>;
1798 }
1799
1800 export namespace SpendLimits {
1801 export interface Rule {
1802 limit: number;
1803
1804 limitType: 'cost';
1805
1806 window: number;
1807
1808 id?: string;
1809
1810 enabled?: boolean;
1811
1812 metadata?: { [key: string]: Rule.Mode | Rule.UnionMember1 };
1813
1814 model?: Rule.Model;
1815
1816 provider?: Rule.Provider;
1817
1818 technique?: 'fixed' | 'sliding';
1819 }
1820
1821 export namespace Rule {
1822 export interface Mode {
1823 mode: 'partition';
1824 }
1825
1826 export interface UnionMember1 {
1827 mode: 'filter';
1828
1829 values: Array<string>;
1830 }
1831
1832 export interface Model {
1833 mode: 'filter';
1834
1835 values: Array<string>;
1836 }
1837
1838 export interface Provider {
1839 mode: 'filter';
1840
1841 values: Array<string>;
1842 }
1843 }
1844 }
1845
1846 export interface Stripe {
1847 authorization: string;
1848
1849 usage_events: Array<Stripe.UsageEvent>;
1850 }
1851
1852 export namespace Stripe {
1853 export interface UsageEvent {
1854 payload: string;
1855 }
1856 }
1857}
1858
1859export interface AIGatewayListParams extends V4PagePaginationArrayParams {
1860 /**
1861 * Path param
1862 */
1863 account_id: string;
1864
1865 /**
1866 * Query param: Search by id
1867 */
1868 search?: string;
1869}
1870
1871export interface AIGatewayDeleteParams {
1872 account_id: string;
1873}
1874
1875export interface AIGatewayGetParams {
1876 account_id: string;
1877}
1878
1879AIGateway.AIGatewayListResponsesV4PagePaginationArray = AIGatewayListResponsesV4PagePaginationArray;
1880AIGateway.EvaluationTypes = EvaluationTypes;
1881AIGateway.EvaluationTypeListResponsesV4PagePaginationArray = EvaluationTypeListResponsesV4PagePaginationArray;
1882AIGateway.CustomProviders = CustomProviders;
1883AIGateway.CustomProviderListResponsesV4PagePaginationArray = CustomProviderListResponsesV4PagePaginationArray;
1884AIGateway.Logs = Logs;
1885AIGateway.LogListResponsesV4PagePaginationArray = LogListResponsesV4PagePaginationArray;
1886AIGateway.Datasets = Datasets;
1887AIGateway.DatasetListResponsesV4PagePaginationArray = DatasetListResponsesV4PagePaginationArray;
1888AIGateway.Evaluations = Evaluations;
1889AIGateway.EvaluationListResponsesV4PagePaginationArray = EvaluationListResponsesV4PagePaginationArray;
1890AIGateway.DynamicRouting = DynamicRouting;
1891AIGateway.ProviderConfigs = ProviderConfigs;
1892AIGateway.ProviderConfigListResponsesV4PagePaginationArray = ProviderConfigListResponsesV4PagePaginationArray;
1893AIGateway.URLs = URLs;
1894AIGateway.Billing = Billing;
1895
1896export declare namespace AIGateway {
1897 export {
1898 type AIGatewayCreateResponse as AIGatewayCreateResponse,
1899 type AIGatewayUpdateResponse as AIGatewayUpdateResponse,
1900 type AIGatewayListResponse as AIGatewayListResponse,
1901 type AIGatewayDeleteResponse as AIGatewayDeleteResponse,
1902 type AIGatewayGetResponse as AIGatewayGetResponse,
1903 AIGatewayListResponsesV4PagePaginationArray as AIGatewayListResponsesV4PagePaginationArray,
1904 type AIGatewayCreateParams as AIGatewayCreateParams,
1905 type AIGatewayUpdateParams as AIGatewayUpdateParams,
1906 type AIGatewayListParams as AIGatewayListParams,
1907 type AIGatewayDeleteParams as AIGatewayDeleteParams,
1908 type AIGatewayGetParams as AIGatewayGetParams,
1909 };
1910
1911 export {
1912 EvaluationTypes as EvaluationTypes,
1913 type EvaluationTypeListResponse as EvaluationTypeListResponse,
1914 EvaluationTypeListResponsesV4PagePaginationArray as EvaluationTypeListResponsesV4PagePaginationArray,
1915 type EvaluationTypeListParams as EvaluationTypeListParams,
1916 };
1917
1918 export {
1919 CustomProviders as CustomProviders,
1920 type CustomProviderCreateResponse as CustomProviderCreateResponse,
1921 type CustomProviderListResponse as CustomProviderListResponse,
1922 type CustomProviderDeleteResponse as CustomProviderDeleteResponse,
1923 type CustomProviderGetResponse as CustomProviderGetResponse,
1924 CustomProviderListResponsesV4PagePaginationArray as CustomProviderListResponsesV4PagePaginationArray,
1925 type CustomProviderCreateParams as CustomProviderCreateParams,
1926 type CustomProviderListParams as CustomProviderListParams,
1927 type CustomProviderDeleteParams as CustomProviderDeleteParams,
1928 type CustomProviderGetParams as CustomProviderGetParams,
1929 };
1930
1931 export {
1932 Logs as Logs,
1933 type LogListResponse as LogListResponse,
1934 type LogDeleteResponse as LogDeleteResponse,
1935 type LogEditResponse as LogEditResponse,
1936 type LogGetResponse as LogGetResponse,
1937 type LogRequestResponse as LogRequestResponse,
1938 type LogResponseResponse as LogResponseResponse,
1939 LogListResponsesV4PagePaginationArray as LogListResponsesV4PagePaginationArray,
1940 type LogListParams as LogListParams,
1941 type LogDeleteParams as LogDeleteParams,
1942 type LogEditParams as LogEditParams,
1943 type LogGetParams as LogGetParams,
1944 type LogRequestParams as LogRequestParams,
1945 type LogResponseParams as LogResponseParams,
1946 };
1947
1948 export {
1949 Datasets as Datasets,
1950 type DatasetCreateResponse as DatasetCreateResponse,
1951 type DatasetUpdateResponse as DatasetUpdateResponse,
1952 type DatasetListResponse as DatasetListResponse,
1953 type DatasetDeleteResponse as DatasetDeleteResponse,
1954 type DatasetGetResponse as DatasetGetResponse,
1955 DatasetListResponsesV4PagePaginationArray as DatasetListResponsesV4PagePaginationArray,
1956 type DatasetCreateParams as DatasetCreateParams,
1957 type DatasetUpdateParams as DatasetUpdateParams,
1958 type DatasetListParams as DatasetListParams,
1959 type DatasetDeleteParams as DatasetDeleteParams,
1960 type DatasetGetParams as DatasetGetParams,
1961 };
1962
1963 export {
1964 Evaluations as Evaluations,
1965 type EvaluationCreateResponse as EvaluationCreateResponse,
1966 type EvaluationListResponse as EvaluationListResponse,
1967 type EvaluationDeleteResponse as EvaluationDeleteResponse,
1968 type EvaluationGetResponse as EvaluationGetResponse,
1969 EvaluationListResponsesV4PagePaginationArray as EvaluationListResponsesV4PagePaginationArray,
1970 type EvaluationCreateParams as EvaluationCreateParams,
1971 type EvaluationListParams as EvaluationListParams,
1972 type EvaluationDeleteParams as EvaluationDeleteParams,
1973 type EvaluationGetParams as EvaluationGetParams,
1974 };
1975
1976 export {
1977 DynamicRouting as DynamicRouting,
1978 type DynamicRoutingCreateResponse as DynamicRoutingCreateResponse,
1979 type DynamicRoutingUpdateResponse as DynamicRoutingUpdateResponse,
1980 type DynamicRoutingListResponse as DynamicRoutingListResponse,
1981 type DynamicRoutingDeleteResponse as DynamicRoutingDeleteResponse,
1982 type DynamicRoutingCreateDeploymentResponse as DynamicRoutingCreateDeploymentResponse,
1983 type DynamicRoutingCreateVersionResponse as DynamicRoutingCreateVersionResponse,
1984 type DynamicRoutingGetResponse as DynamicRoutingGetResponse,
1985 type DynamicRoutingGetVersionResponse as DynamicRoutingGetVersionResponse,
1986 type DynamicRoutingListDeploymentsResponse as DynamicRoutingListDeploymentsResponse,
1987 type DynamicRoutingListVersionsResponse as DynamicRoutingListVersionsResponse,
1988 type DynamicRoutingCreateParams as DynamicRoutingCreateParams,
1989 type DynamicRoutingUpdateParams as DynamicRoutingUpdateParams,
1990 type DynamicRoutingListParams as DynamicRoutingListParams,
1991 type DynamicRoutingDeleteParams as DynamicRoutingDeleteParams,
1992 type DynamicRoutingCreateDeploymentParams as DynamicRoutingCreateDeploymentParams,
1993 type DynamicRoutingCreateVersionParams as DynamicRoutingCreateVersionParams,
1994 type DynamicRoutingGetParams as DynamicRoutingGetParams,
1995 type DynamicRoutingGetVersionParams as DynamicRoutingGetVersionParams,
1996 type DynamicRoutingListDeploymentsParams as DynamicRoutingListDeploymentsParams,
1997 type DynamicRoutingListVersionsParams as DynamicRoutingListVersionsParams,
1998 };
1999
2000 export {
2001 ProviderConfigs as ProviderConfigs,
2002 type ProviderConfigCreateResponse as ProviderConfigCreateResponse,
2003 type ProviderConfigListResponse as ProviderConfigListResponse,
2004 ProviderConfigListResponsesV4PagePaginationArray as ProviderConfigListResponsesV4PagePaginationArray,
2005 type ProviderConfigCreateParams as ProviderConfigCreateParams,
2006 type ProviderConfigListParams as ProviderConfigListParams,
2007 };
2008
2009 export { URLs as URLs, type URLGetResponse as URLGetResponse, type URLGetParams as URLGetParams };
2010
2011 export {
2012 Billing as Billing,
2013 type BillingCreditBalanceResponse as BillingCreditBalanceResponse,
2014 type BillingInvoiceHistoryResponse as BillingInvoiceHistoryResponse,
2015 type BillingInvoicePreviewResponse as BillingInvoicePreviewResponse,
2016 type BillingUsageHistoryResponse as BillingUsageHistoryResponse,
2017 type BillingCreditBalanceParams as BillingCreditBalanceParams,
2018 type BillingInvoiceHistoryParams as BillingInvoiceHistoryParams,
2019 type BillingInvoicePreviewParams as BillingInvoicePreviewParams,
2020 type BillingUsageHistoryParams as BillingUsageHistoryParams,
2021 };
2022}