cloudflare/cloudflare-typescript

Public

mirrored fromhttps://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/dynamic-routing.ts

2376lines · 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';
5
6export class DynamicRouting extends APIResource {
7 /**
8 * Create a new AI Gateway Dynamic Route.
9 *
10 * @example
11 * ```ts
12 * const dynamicRouting =
13 * await client.aiGateway.dynamicRouting.create('54442216', {
14 * account_id: '0d37909e38d3e99c29fa2cd343ac421a',
15 * elements: [
16 * {
17 * id: 'id',
18 * outputs: { next: { elementId: 'elementId' } },
19 * type: 'start',
20 * },
21 * ],
22 * name: 'name',
23 * });
24 * ```
25 */
26 create(
27 gatewayId: string,
28 params: DynamicRoutingCreateParams,
29 options?: Core.RequestOptions,
30 ): Core.APIPromise<DynamicRoutingCreateResponse> {
31 const { account_id, ...body } = params;
32 return (
33 this._client.post(`/accounts/${account_id}/ai-gateway/gateways/${gatewayId}/routes`, {
34 body,
35 ...options,
36 }) as Core.APIPromise<{ result: DynamicRoutingCreateResponse }>
37 )._thenUnwrap((obj) => obj.result);
38 }
39
40 /**
41 * Update an AI Gateway Dynamic Route.
42 *
43 * @example
44 * ```ts
45 * const dynamicRouting =
46 * await client.aiGateway.dynamicRouting.update(
47 * '54442216',
48 * '54442216',
49 * {
50 * account_id: '0d37909e38d3e99c29fa2cd343ac421a',
51 * name: 'Route Name',
52 * },
53 * );
54 * ```
55 */
56 update(
57 gatewayId: string,
58 id: string,
59 params: DynamicRoutingUpdateParams,
60 options?: Core.RequestOptions,
61 ): Core.APIPromise<DynamicRoutingUpdateResponse> {
62 const { account_id, ...body } = params;
63 return this._client.patch(`/accounts/${account_id}/ai-gateway/gateways/${gatewayId}/routes/${id}`, {
64 body,
65 ...options,
66 });
67 }
68
69 /**
70 * List all AI Gateway Dynamic Routes.
71 *
72 * @example
73 * ```ts
74 * const dynamicRoutings =
75 * await client.aiGateway.dynamicRouting.list('54442216', {
76 * account_id: '0d37909e38d3e99c29fa2cd343ac421a',
77 * });
78 * ```
79 */
80 list(
81 gatewayId: string,
82 params: DynamicRoutingListParams,
83 options?: Core.RequestOptions,
84 ): Core.APIPromise<DynamicRoutingListResponse> {
85 const { account_id, ...query } = params;
86 return this._client.get(`/accounts/${account_id}/ai-gateway/gateways/${gatewayId}/routes`, {
87 query,
88 ...options,
89 });
90 }
91
92 /**
93 * Delete an AI Gateway Dynamic Route.
94 *
95 * @example
96 * ```ts
97 * const dynamicRouting =
98 * await client.aiGateway.dynamicRouting.delete(
99 * '54442216',
100 * '54442216',
101 * { account_id: '0d37909e38d3e99c29fa2cd343ac421a' },
102 * );
103 * ```
104 */
105 delete(
106 gatewayId: string,
107 id: string,
108 params: DynamicRoutingDeleteParams,
109 options?: Core.RequestOptions,
110 ): Core.APIPromise<DynamicRoutingDeleteResponse> {
111 const { account_id } = params;
112 return (
113 this._client.delete(
114 `/accounts/${account_id}/ai-gateway/gateways/${gatewayId}/routes/${id}`,
115 options,
116 ) as Core.APIPromise<{ result: DynamicRoutingDeleteResponse }>
117 )._thenUnwrap((obj) => obj.result);
118 }
119
120 /**
121 * Create a new AI Gateway Dynamic Route Deployment.
122 *
123 * @example
124 * ```ts
125 * const response =
126 * await client.aiGateway.dynamicRouting.createDeployment(
127 * '54442216',
128 * '54442216',
129 * {
130 * account_id: '0d37909e38d3e99c29fa2cd343ac421a',
131 * version_id: '54442216',
132 * },
133 * );
134 * ```
135 */
136 createDeployment(
137 gatewayId: string,
138 id: string,
139 params: DynamicRoutingCreateDeploymentParams,
140 options?: Core.RequestOptions,
141 ): Core.APIPromise<DynamicRoutingCreateDeploymentResponse> {
142 const { account_id, ...body } = params;
143 return (
144 this._client.post(`/accounts/${account_id}/ai-gateway/gateways/${gatewayId}/routes/${id}/deployments`, {
145 body,
146 ...options,
147 }) as Core.APIPromise<{ result: DynamicRoutingCreateDeploymentResponse }>
148 )._thenUnwrap((obj) => obj.result);
149 }
150
151 /**
152 * Create a new AI Gateway Dynamic Route Version.
153 *
154 * @example
155 * ```ts
156 * const response =
157 * await client.aiGateway.dynamicRouting.createVersion(
158 * '54442216',
159 * '54442216',
160 * {
161 * account_id: '0d37909e38d3e99c29fa2cd343ac421a',
162 * elements: [
163 * {
164 * id: 'id',
165 * outputs: { next: { elementId: 'elementId' } },
166 * type: 'start',
167 * },
168 * ],
169 * },
170 * );
171 * ```
172 */
173 createVersion(
174 gatewayId: string,
175 id: string,
176 params: DynamicRoutingCreateVersionParams,
177 options?: Core.RequestOptions,
178 ): Core.APIPromise<DynamicRoutingCreateVersionResponse> {
179 const { account_id, ...body } = params;
180 return (
181 this._client.post(`/accounts/${account_id}/ai-gateway/gateways/${gatewayId}/routes/${id}/versions`, {
182 body,
183 ...options,
184 }) as Core.APIPromise<{ result: DynamicRoutingCreateVersionResponse }>
185 )._thenUnwrap((obj) => obj.result);
186 }
187
188 /**
189 * Get an AI Gateway Dynamic Route.
190 *
191 * @example
192 * ```ts
193 * const dynamicRouting =
194 * await client.aiGateway.dynamicRouting.get(
195 * '54442216',
196 * '54442216',
197 * { account_id: '0d37909e38d3e99c29fa2cd343ac421a' },
198 * );
199 * ```
200 */
201 get(
202 gatewayId: string,
203 id: string,
204 params: DynamicRoutingGetParams,
205 options?: Core.RequestOptions,
206 ): Core.APIPromise<DynamicRoutingGetResponse> {
207 const { account_id } = params;
208 return (
209 this._client.get(
210 `/accounts/${account_id}/ai-gateway/gateways/${gatewayId}/routes/${id}`,
211 options,
212 ) as Core.APIPromise<{ result: DynamicRoutingGetResponse }>
213 )._thenUnwrap((obj) => obj.result);
214 }
215
216 /**
217 * Get an AI Gateway Dynamic Route Version.
218 *
219 * @example
220 * ```ts
221 * const response =
222 * await client.aiGateway.dynamicRouting.getVersion(
223 * '54442216',
224 * '54442216',
225 * '54442216',
226 * { account_id: '0d37909e38d3e99c29fa2cd343ac421a' },
227 * );
228 * ```
229 */
230 getVersion(
231 gatewayId: string,
232 id: string,
233 versionId: string,
234 params: DynamicRoutingGetVersionParams,
235 options?: Core.RequestOptions,
236 ): Core.APIPromise<DynamicRoutingGetVersionResponse> {
237 const { account_id } = params;
238 return (
239 this._client.get(
240 `/accounts/${account_id}/ai-gateway/gateways/${gatewayId}/routes/${id}/versions/${versionId}`,
241 options,
242 ) as Core.APIPromise<{ result: DynamicRoutingGetVersionResponse }>
243 )._thenUnwrap((obj) => obj.result);
244 }
245
246 /**
247 * List all AI Gateway Dynamic Route Deployments.
248 *
249 * @example
250 * ```ts
251 * const response =
252 * await client.aiGateway.dynamicRouting.listDeployments(
253 * '54442216',
254 * '54442216',
255 * { account_id: '0d37909e38d3e99c29fa2cd343ac421a' },
256 * );
257 * ```
258 */
259 listDeployments(
260 gatewayId: string,
261 id: string,
262 params: DynamicRoutingListDeploymentsParams,
263 options?: Core.RequestOptions,
264 ): Core.APIPromise<DynamicRoutingListDeploymentsResponse> {
265 const { account_id } = params;
266 return this._client.get(
267 `/accounts/${account_id}/ai-gateway/gateways/${gatewayId}/routes/${id}/deployments`,
268 options,
269 );
270 }
271
272 /**
273 * List all AI Gateway Dynamic Route Versions.
274 *
275 * @example
276 * ```ts
277 * const response =
278 * await client.aiGateway.dynamicRouting.listVersions(
279 * '54442216',
280 * '54442216',
281 * { account_id: '0d37909e38d3e99c29fa2cd343ac421a' },
282 * );
283 * ```
284 */
285 listVersions(
286 gatewayId: string,
287 id: string,
288 params: DynamicRoutingListVersionsParams,
289 options?: Core.RequestOptions,
290 ): Core.APIPromise<DynamicRoutingListVersionsResponse> {
291 const { account_id } = params;
292 return this._client.get(
293 `/accounts/${account_id}/ai-gateway/gateways/${gatewayId}/routes/${id}/versions`,
294 options,
295 );
296 }
297}
298
299export interface DynamicRoutingCreateResponse {
300 id: string;
301
302 created_at: string;
303
304 deployment: DynamicRoutingCreateResponse.Deployment;
305
306 elements: Array<
307 | DynamicRoutingCreateResponse.UnionMember0
308 | DynamicRoutingCreateResponse.UnionMember1
309 | DynamicRoutingCreateResponse.UnionMember2
310 | DynamicRoutingCreateResponse.UnionMember3
311 | DynamicRoutingCreateResponse.UnionMember4
312 | DynamicRoutingCreateResponse.UnionMember5
313 >;
314
315 gateway_id: string;
316
317 modified_at: string;
318
319 name: string;
320
321 version: DynamicRoutingCreateResponse.Version;
322}
323
324export namespace DynamicRoutingCreateResponse {
325 export interface Deployment {
326 created_at: string;
327
328 deployment_id: string;
329
330 version_id: string;
331 }
332
333 export interface UnionMember0 {
334 id: string;
335
336 outputs: UnionMember0.Outputs;
337
338 type: 'start';
339 }
340
341 export namespace UnionMember0 {
342 export interface Outputs {
343 next: Outputs.Next;
344 }
345
346 export namespace Outputs {
347 export interface Next {
348 elementId: string;
349 }
350 }
351 }
352
353 export interface UnionMember1 {
354 id: string;
355
356 outputs: UnionMember1.Outputs;
357
358 properties: UnionMember1.Properties;
359
360 type: 'conditional';
361 }
362
363 export namespace UnionMember1 {
364 export interface Outputs {
365 false: Outputs.False;
366
367 true: Outputs.True;
368 }
369
370 export namespace Outputs {
371 export interface False {
372 elementId: string;
373 }
374
375 export interface True {
376 elementId: string;
377 }
378 }
379
380 export interface Properties {
381 conditions?: unknown;
382 }
383 }
384
385 export interface UnionMember2 {
386 id: string;
387
388 outputs: { [key: string]: UnionMember2.Outputs };
389
390 type: 'percentage';
391 }
392
393 export namespace UnionMember2 {
394 export interface Outputs {
395 elementId: string;
396 }
397 }
398
399 export interface UnionMember3 {
400 id: string;
401
402 outputs: UnionMember3.Outputs;
403
404 properties: UnionMember3.Properties;
405
406 type: 'rate';
407 }
408
409 export namespace UnionMember3 {
410 export interface Outputs {
411 fallback: Outputs.Fallback;
412
413 success: Outputs.Success;
414 }
415
416 export namespace Outputs {
417 export interface Fallback {
418 elementId: string;
419 }
420
421 export interface Success {
422 elementId: string;
423 }
424 }
425
426 export interface Properties {
427 key: string;
428
429 limit: number;
430
431 limitType: 'count' | 'cost';
432
433 window: number;
434 }
435 }
436
437 export interface UnionMember4 {
438 id: string;
439
440 outputs: UnionMember4.Outputs;
441
442 properties: UnionMember4.Properties;
443
444 type: 'model';
445 }
446
447 export namespace UnionMember4 {
448 export interface Outputs {
449 fallback: Outputs.Fallback;
450
451 success: Outputs.Success;
452 }
453
454 export namespace Outputs {
455 export interface Fallback {
456 elementId: string;
457 }
458
459 export interface Success {
460 elementId: string;
461 }
462 }
463
464 export interface Properties {
465 model: string;
466
467 provider: string;
468
469 retries: number;
470
471 timeout: number;
472 }
473 }
474
475 export interface UnionMember5 {
476 id: string;
477
478 outputs: { [key: string]: UnionMember5.Outputs };
479
480 type: 'end';
481 }
482
483 export namespace UnionMember5 {
484 export interface Outputs {
485 elementId: string;
486 }
487 }
488
489 export interface Version {
490 active: 'true' | 'false';
491
492 created_at: string;
493
494 data: string;
495
496 version_id: string;
497
498 is_valid?: boolean;
499 }
500}
501
502export interface DynamicRoutingUpdateResponse {
503 route: DynamicRoutingUpdateResponse.Route;
504
505 success: boolean;
506}
507
508export namespace DynamicRoutingUpdateResponse {
509 export interface Route {
510 id: string;
511
512 account_tag: string;
513
514 created_at: string;
515
516 deployment: Route.Deployment;
517
518 elements: Array<
519 | Route.UnionMember0
520 | Route.UnionMember1
521 | Route.UnionMember2
522 | Route.UnionMember3
523 | Route.UnionMember4
524 | Route.UnionMember5
525 >;
526
527 gateway_id: string;
528
529 modified_at: string;
530
531 name: string;
532
533 version: Route.Version;
534 }
535
536 export namespace Route {
537 export interface Deployment {
538 created_at: string;
539
540 deployment_id: string;
541
542 version_id: string;
543 }
544
545 export interface UnionMember0 {
546 id: string;
547
548 outputs: UnionMember0.Outputs;
549
550 type: 'start';
551 }
552
553 export namespace UnionMember0 {
554 export interface Outputs {
555 next: Outputs.Next;
556 }
557
558 export namespace Outputs {
559 export interface Next {
560 elementId: string;
561 }
562 }
563 }
564
565 export interface UnionMember1 {
566 id: string;
567
568 outputs: UnionMember1.Outputs;
569
570 properties: UnionMember1.Properties;
571
572 type: 'conditional';
573 }
574
575 export namespace UnionMember1 {
576 export interface Outputs {
577 false: Outputs.False;
578
579 true: Outputs.True;
580 }
581
582 export namespace Outputs {
583 export interface False {
584 elementId: string;
585 }
586
587 export interface True {
588 elementId: string;
589 }
590 }
591
592 export interface Properties {
593 conditions?: unknown;
594 }
595 }
596
597 export interface UnionMember2 {
598 id: string;
599
600 outputs: { [key: string]: UnionMember2.Outputs };
601
602 type: 'percentage';
603 }
604
605 export namespace UnionMember2 {
606 export interface Outputs {
607 elementId: string;
608 }
609 }
610
611 export interface UnionMember3 {
612 id: string;
613
614 outputs: UnionMember3.Outputs;
615
616 properties: UnionMember3.Properties;
617
618 type: 'rate';
619 }
620
621 export namespace UnionMember3 {
622 export interface Outputs {
623 fallback: Outputs.Fallback;
624
625 success: Outputs.Success;
626 }
627
628 export namespace Outputs {
629 export interface Fallback {
630 elementId: string;
631 }
632
633 export interface Success {
634 elementId: string;
635 }
636 }
637
638 export interface Properties {
639 key: string;
640
641 limit: number;
642
643 limitType: 'count' | 'cost';
644
645 window: number;
646 }
647 }
648
649 export interface UnionMember4 {
650 id: string;
651
652 outputs: UnionMember4.Outputs;
653
654 properties: UnionMember4.Properties;
655
656 type: 'model';
657 }
658
659 export namespace UnionMember4 {
660 export interface Outputs {
661 fallback: Outputs.Fallback;
662
663 success: Outputs.Success;
664 }
665
666 export namespace Outputs {
667 export interface Fallback {
668 elementId: string;
669 }
670
671 export interface Success {
672 elementId: string;
673 }
674 }
675
676 export interface Properties {
677 model: string;
678
679 provider: string;
680
681 retries: number;
682
683 timeout: number;
684 }
685 }
686
687 export interface UnionMember5 {
688 id: string;
689
690 outputs: { [key: string]: UnionMember5.Outputs };
691
692 type: 'end';
693 }
694
695 export namespace UnionMember5 {
696 export interface Outputs {
697 elementId: string;
698 }
699 }
700
701 export interface Version {
702 active: 'true' | 'false';
703
704 created_at: string;
705
706 data: string;
707
708 version_id: string;
709
710 is_valid?: boolean;
711 }
712 }
713}
714
715export interface DynamicRoutingListResponse {
716 data: DynamicRoutingListResponse.Data;
717
718 success: boolean;
719}
720
721export namespace DynamicRoutingListResponse {
722 export interface Data {
723 order_by: string;
724
725 order_by_direction: string;
726
727 page: number;
728
729 per_page: number;
730
731 routes: Array<Data.Route>;
732 }
733
734 export namespace Data {
735 export interface Route {
736 id: string;
737
738 account_tag: string;
739
740 created_at: string;
741
742 deployment: Route.Deployment;
743
744 elements: Array<
745 | Route.UnionMember0
746 | Route.UnionMember1
747 | Route.UnionMember2
748 | Route.UnionMember3
749 | Route.UnionMember4
750 | Route.UnionMember5
751 >;
752
753 gateway_id: string;
754
755 modified_at: string;
756
757 name: string;
758
759 version: Route.Version;
760 }
761
762 export namespace Route {
763 export interface Deployment {
764 created_at: string;
765
766 deployment_id: string;
767
768 version_id: string;
769 }
770
771 export interface UnionMember0 {
772 id: string;
773
774 outputs: UnionMember0.Outputs;
775
776 type: 'start';
777 }
778
779 export namespace UnionMember0 {
780 export interface Outputs {
781 next: Outputs.Next;
782 }
783
784 export namespace Outputs {
785 export interface Next {
786 elementId: string;
787 }
788 }
789 }
790
791 export interface UnionMember1 {
792 id: string;
793
794 outputs: UnionMember1.Outputs;
795
796 properties: UnionMember1.Properties;
797
798 type: 'conditional';
799 }
800
801 export namespace UnionMember1 {
802 export interface Outputs {
803 false: Outputs.False;
804
805 true: Outputs.True;
806 }
807
808 export namespace Outputs {
809 export interface False {
810 elementId: string;
811 }
812
813 export interface True {
814 elementId: string;
815 }
816 }
817
818 export interface Properties {
819 conditions?: unknown;
820 }
821 }
822
823 export interface UnionMember2 {
824 id: string;
825
826 outputs: { [key: string]: UnionMember2.Outputs };
827
828 type: 'percentage';
829 }
830
831 export namespace UnionMember2 {
832 export interface Outputs {
833 elementId: string;
834 }
835 }
836
837 export interface UnionMember3 {
838 id: string;
839
840 outputs: UnionMember3.Outputs;
841
842 properties: UnionMember3.Properties;
843
844 type: 'rate';
845 }
846
847 export namespace UnionMember3 {
848 export interface Outputs {
849 fallback: Outputs.Fallback;
850
851 success: Outputs.Success;
852 }
853
854 export namespace Outputs {
855 export interface Fallback {
856 elementId: string;
857 }
858
859 export interface Success {
860 elementId: string;
861 }
862 }
863
864 export interface Properties {
865 key: string;
866
867 limit: number;
868
869 limitType: 'count' | 'cost';
870
871 window: number;
872 }
873 }
874
875 export interface UnionMember4 {
876 id: string;
877
878 outputs: UnionMember4.Outputs;
879
880 properties: UnionMember4.Properties;
881
882 type: 'model';
883 }
884
885 export namespace UnionMember4 {
886 export interface Outputs {
887 fallback: Outputs.Fallback;
888
889 success: Outputs.Success;
890 }
891
892 export namespace Outputs {
893 export interface Fallback {
894 elementId: string;
895 }
896
897 export interface Success {
898 elementId: string;
899 }
900 }
901
902 export interface Properties {
903 model: string;
904
905 provider: string;
906
907 retries: number;
908
909 timeout: number;
910 }
911 }
912
913 export interface UnionMember5 {
914 id: string;
915
916 outputs: { [key: string]: UnionMember5.Outputs };
917
918 type: 'end';
919 }
920
921 export namespace UnionMember5 {
922 export interface Outputs {
923 elementId: string;
924 }
925 }
926
927 export interface Version {
928 active: 'true' | 'false';
929
930 created_at: string;
931
932 data: string;
933
934 version_id: string;
935
936 is_valid?: boolean;
937 }
938 }
939 }
940}
941
942export interface DynamicRoutingDeleteResponse {
943 id: string;
944
945 created_at: string;
946
947 elements: Array<
948 | DynamicRoutingDeleteResponse.UnionMember0
949 | DynamicRoutingDeleteResponse.UnionMember1
950 | DynamicRoutingDeleteResponse.UnionMember2
951 | DynamicRoutingDeleteResponse.UnionMember3
952 | DynamicRoutingDeleteResponse.UnionMember4
953 | DynamicRoutingDeleteResponse.UnionMember5
954 >;
955
956 gateway_id: string;
957
958 modified_at: string;
959
960 name: string;
961}
962
963export namespace DynamicRoutingDeleteResponse {
964 export interface UnionMember0 {
965 id: string;
966
967 outputs: UnionMember0.Outputs;
968
969 type: 'start';
970 }
971
972 export namespace UnionMember0 {
973 export interface Outputs {
974 next: Outputs.Next;
975 }
976
977 export namespace Outputs {
978 export interface Next {
979 elementId: string;
980 }
981 }
982 }
983
984 export interface UnionMember1 {
985 id: string;
986
987 outputs: UnionMember1.Outputs;
988
989 properties: UnionMember1.Properties;
990
991 type: 'conditional';
992 }
993
994 export namespace UnionMember1 {
995 export interface Outputs {
996 false: Outputs.False;
997
998 true: Outputs.True;
999 }
1000
1001 export namespace Outputs {
1002 export interface False {
1003 elementId: string;
1004 }
1005
1006 export interface True {
1007 elementId: string;
1008 }
1009 }
1010
1011 export interface Properties {
1012 conditions?: unknown;
1013 }
1014 }
1015
1016 export interface UnionMember2 {
1017 id: string;
1018
1019 outputs: { [key: string]: UnionMember2.Outputs };
1020
1021 type: 'percentage';
1022 }
1023
1024 export namespace UnionMember2 {
1025 export interface Outputs {
1026 elementId: string;
1027 }
1028 }
1029
1030 export interface UnionMember3 {
1031 id: string;
1032
1033 outputs: UnionMember3.Outputs;
1034
1035 properties: UnionMember3.Properties;
1036
1037 type: 'rate';
1038 }
1039
1040 export namespace UnionMember3 {
1041 export interface Outputs {
1042 fallback: Outputs.Fallback;
1043
1044 success: Outputs.Success;
1045 }
1046
1047 export namespace Outputs {
1048 export interface Fallback {
1049 elementId: string;
1050 }
1051
1052 export interface Success {
1053 elementId: string;
1054 }
1055 }
1056
1057 export interface Properties {
1058 key: string;
1059
1060 limit: number;
1061
1062 limitType: 'count' | 'cost';
1063
1064 window: number;
1065 }
1066 }
1067
1068 export interface UnionMember4 {
1069 id: string;
1070
1071 outputs: UnionMember4.Outputs;
1072
1073 properties: UnionMember4.Properties;
1074
1075 type: 'model';
1076 }
1077
1078 export namespace UnionMember4 {
1079 export interface Outputs {
1080 fallback: Outputs.Fallback;
1081
1082 success: Outputs.Success;
1083 }
1084
1085 export namespace Outputs {
1086 export interface Fallback {
1087 elementId: string;
1088 }
1089
1090 export interface Success {
1091 elementId: string;
1092 }
1093 }
1094
1095 export interface Properties {
1096 model: string;
1097
1098 provider: string;
1099
1100 retries: number;
1101
1102 timeout: number;
1103 }
1104 }
1105
1106 export interface UnionMember5 {
1107 id: string;
1108
1109 outputs: { [key: string]: UnionMember5.Outputs };
1110
1111 type: 'end';
1112 }
1113
1114 export namespace UnionMember5 {
1115 export interface Outputs {
1116 elementId: string;
1117 }
1118 }
1119}
1120
1121export interface DynamicRoutingCreateDeploymentResponse {
1122 id: string;
1123
1124 created_at: string;
1125
1126 elements: Array<
1127 | DynamicRoutingCreateDeploymentResponse.UnionMember0
1128 | DynamicRoutingCreateDeploymentResponse.UnionMember1
1129 | DynamicRoutingCreateDeploymentResponse.UnionMember2
1130 | DynamicRoutingCreateDeploymentResponse.UnionMember3
1131 | DynamicRoutingCreateDeploymentResponse.UnionMember4
1132 | DynamicRoutingCreateDeploymentResponse.UnionMember5
1133 >;
1134
1135 gateway_id: string;
1136
1137 modified_at: string;
1138
1139 name: string;
1140}
1141
1142export namespace DynamicRoutingCreateDeploymentResponse {
1143 export interface UnionMember0 {
1144 id: string;
1145
1146 outputs: UnionMember0.Outputs;
1147
1148 type: 'start';
1149 }
1150
1151 export namespace UnionMember0 {
1152 export interface Outputs {
1153 next: Outputs.Next;
1154 }
1155
1156 export namespace Outputs {
1157 export interface Next {
1158 elementId: string;
1159 }
1160 }
1161 }
1162
1163 export interface UnionMember1 {
1164 id: string;
1165
1166 outputs: UnionMember1.Outputs;
1167
1168 properties: UnionMember1.Properties;
1169
1170 type: 'conditional';
1171 }
1172
1173 export namespace UnionMember1 {
1174 export interface Outputs {
1175 false: Outputs.False;
1176
1177 true: Outputs.True;
1178 }
1179
1180 export namespace Outputs {
1181 export interface False {
1182 elementId: string;
1183 }
1184
1185 export interface True {
1186 elementId: string;
1187 }
1188 }
1189
1190 export interface Properties {
1191 conditions?: unknown;
1192 }
1193 }
1194
1195 export interface UnionMember2 {
1196 id: string;
1197
1198 outputs: { [key: string]: UnionMember2.Outputs };
1199
1200 type: 'percentage';
1201 }
1202
1203 export namespace UnionMember2 {
1204 export interface Outputs {
1205 elementId: string;
1206 }
1207 }
1208
1209 export interface UnionMember3 {
1210 id: string;
1211
1212 outputs: UnionMember3.Outputs;
1213
1214 properties: UnionMember3.Properties;
1215
1216 type: 'rate';
1217 }
1218
1219 export namespace UnionMember3 {
1220 export interface Outputs {
1221 fallback: Outputs.Fallback;
1222
1223 success: Outputs.Success;
1224 }
1225
1226 export namespace Outputs {
1227 export interface Fallback {
1228 elementId: string;
1229 }
1230
1231 export interface Success {
1232 elementId: string;
1233 }
1234 }
1235
1236 export interface Properties {
1237 key: string;
1238
1239 limit: number;
1240
1241 limitType: 'count' | 'cost';
1242
1243 window: number;
1244 }
1245 }
1246
1247 export interface UnionMember4 {
1248 id: string;
1249
1250 outputs: UnionMember4.Outputs;
1251
1252 properties: UnionMember4.Properties;
1253
1254 type: 'model';
1255 }
1256
1257 export namespace UnionMember4 {
1258 export interface Outputs {
1259 fallback: Outputs.Fallback;
1260
1261 success: Outputs.Success;
1262 }
1263
1264 export namespace Outputs {
1265 export interface Fallback {
1266 elementId: string;
1267 }
1268
1269 export interface Success {
1270 elementId: string;
1271 }
1272 }
1273
1274 export interface Properties {
1275 model: string;
1276
1277 provider: string;
1278
1279 retries: number;
1280
1281 timeout: number;
1282 }
1283 }
1284
1285 export interface UnionMember5 {
1286 id: string;
1287
1288 outputs: { [key: string]: UnionMember5.Outputs };
1289
1290 type: 'end';
1291 }
1292
1293 export namespace UnionMember5 {
1294 export interface Outputs {
1295 elementId: string;
1296 }
1297 }
1298}
1299
1300export interface DynamicRoutingCreateVersionResponse {
1301 id: string;
1302
1303 created_at: string;
1304
1305 elements: Array<
1306 | DynamicRoutingCreateVersionResponse.UnionMember0
1307 | DynamicRoutingCreateVersionResponse.UnionMember1
1308 | DynamicRoutingCreateVersionResponse.UnionMember2
1309 | DynamicRoutingCreateVersionResponse.UnionMember3
1310 | DynamicRoutingCreateVersionResponse.UnionMember4
1311 | DynamicRoutingCreateVersionResponse.UnionMember5
1312 >;
1313
1314 gateway_id: string;
1315
1316 modified_at: string;
1317
1318 name: string;
1319}
1320
1321export namespace DynamicRoutingCreateVersionResponse {
1322 export interface UnionMember0 {
1323 id: string;
1324
1325 outputs: UnionMember0.Outputs;
1326
1327 type: 'start';
1328 }
1329
1330 export namespace UnionMember0 {
1331 export interface Outputs {
1332 next: Outputs.Next;
1333 }
1334
1335 export namespace Outputs {
1336 export interface Next {
1337 elementId: string;
1338 }
1339 }
1340 }
1341
1342 export interface UnionMember1 {
1343 id: string;
1344
1345 outputs: UnionMember1.Outputs;
1346
1347 properties: UnionMember1.Properties;
1348
1349 type: 'conditional';
1350 }
1351
1352 export namespace UnionMember1 {
1353 export interface Outputs {
1354 false: Outputs.False;
1355
1356 true: Outputs.True;
1357 }
1358
1359 export namespace Outputs {
1360 export interface False {
1361 elementId: string;
1362 }
1363
1364 export interface True {
1365 elementId: string;
1366 }
1367 }
1368
1369 export interface Properties {
1370 conditions?: unknown;
1371 }
1372 }
1373
1374 export interface UnionMember2 {
1375 id: string;
1376
1377 outputs: { [key: string]: UnionMember2.Outputs };
1378
1379 type: 'percentage';
1380 }
1381
1382 export namespace UnionMember2 {
1383 export interface Outputs {
1384 elementId: string;
1385 }
1386 }
1387
1388 export interface UnionMember3 {
1389 id: string;
1390
1391 outputs: UnionMember3.Outputs;
1392
1393 properties: UnionMember3.Properties;
1394
1395 type: 'rate';
1396 }
1397
1398 export namespace UnionMember3 {
1399 export interface Outputs {
1400 fallback: Outputs.Fallback;
1401
1402 success: Outputs.Success;
1403 }
1404
1405 export namespace Outputs {
1406 export interface Fallback {
1407 elementId: string;
1408 }
1409
1410 export interface Success {
1411 elementId: string;
1412 }
1413 }
1414
1415 export interface Properties {
1416 key: string;
1417
1418 limit: number;
1419
1420 limitType: 'count' | 'cost';
1421
1422 window: number;
1423 }
1424 }
1425
1426 export interface UnionMember4 {
1427 id: string;
1428
1429 outputs: UnionMember4.Outputs;
1430
1431 properties: UnionMember4.Properties;
1432
1433 type: 'model';
1434 }
1435
1436 export namespace UnionMember4 {
1437 export interface Outputs {
1438 fallback: Outputs.Fallback;
1439
1440 success: Outputs.Success;
1441 }
1442
1443 export namespace Outputs {
1444 export interface Fallback {
1445 elementId: string;
1446 }
1447
1448 export interface Success {
1449 elementId: string;
1450 }
1451 }
1452
1453 export interface Properties {
1454 model: string;
1455
1456 provider: string;
1457
1458 retries: number;
1459
1460 timeout: number;
1461 }
1462 }
1463
1464 export interface UnionMember5 {
1465 id: string;
1466
1467 outputs: { [key: string]: UnionMember5.Outputs };
1468
1469 type: 'end';
1470 }
1471
1472 export namespace UnionMember5 {
1473 export interface Outputs {
1474 elementId: string;
1475 }
1476 }
1477}
1478
1479export interface DynamicRoutingGetResponse {
1480 id: string;
1481
1482 created_at: string;
1483
1484 deployment: DynamicRoutingGetResponse.Deployment;
1485
1486 elements: Array<
1487 | DynamicRoutingGetResponse.UnionMember0
1488 | DynamicRoutingGetResponse.UnionMember1
1489 | DynamicRoutingGetResponse.UnionMember2
1490 | DynamicRoutingGetResponse.UnionMember3
1491 | DynamicRoutingGetResponse.UnionMember4
1492 | DynamicRoutingGetResponse.UnionMember5
1493 >;
1494
1495 gateway_id: string;
1496
1497 modified_at: string;
1498
1499 name: string;
1500
1501 version: DynamicRoutingGetResponse.Version;
1502}
1503
1504export namespace DynamicRoutingGetResponse {
1505 export interface Deployment {
1506 created_at: string;
1507
1508 deployment_id: string;
1509
1510 version_id: string;
1511 }
1512
1513 export interface UnionMember0 {
1514 id: string;
1515
1516 outputs: UnionMember0.Outputs;
1517
1518 type: 'start';
1519 }
1520
1521 export namespace UnionMember0 {
1522 export interface Outputs {
1523 next: Outputs.Next;
1524 }
1525
1526 export namespace Outputs {
1527 export interface Next {
1528 elementId: string;
1529 }
1530 }
1531 }
1532
1533 export interface UnionMember1 {
1534 id: string;
1535
1536 outputs: UnionMember1.Outputs;
1537
1538 properties: UnionMember1.Properties;
1539
1540 type: 'conditional';
1541 }
1542
1543 export namespace UnionMember1 {
1544 export interface Outputs {
1545 false: Outputs.False;
1546
1547 true: Outputs.True;
1548 }
1549
1550 export namespace Outputs {
1551 export interface False {
1552 elementId: string;
1553 }
1554
1555 export interface True {
1556 elementId: string;
1557 }
1558 }
1559
1560 export interface Properties {
1561 conditions?: unknown;
1562 }
1563 }
1564
1565 export interface UnionMember2 {
1566 id: string;
1567
1568 outputs: { [key: string]: UnionMember2.Outputs };
1569
1570 type: 'percentage';
1571 }
1572
1573 export namespace UnionMember2 {
1574 export interface Outputs {
1575 elementId: string;
1576 }
1577 }
1578
1579 export interface UnionMember3 {
1580 id: string;
1581
1582 outputs: UnionMember3.Outputs;
1583
1584 properties: UnionMember3.Properties;
1585
1586 type: 'rate';
1587 }
1588
1589 export namespace UnionMember3 {
1590 export interface Outputs {
1591 fallback: Outputs.Fallback;
1592
1593 success: Outputs.Success;
1594 }
1595
1596 export namespace Outputs {
1597 export interface Fallback {
1598 elementId: string;
1599 }
1600
1601 export interface Success {
1602 elementId: string;
1603 }
1604 }
1605
1606 export interface Properties {
1607 key: string;
1608
1609 limit: number;
1610
1611 limitType: 'count' | 'cost';
1612
1613 window: number;
1614 }
1615 }
1616
1617 export interface UnionMember4 {
1618 id: string;
1619
1620 outputs: UnionMember4.Outputs;
1621
1622 properties: UnionMember4.Properties;
1623
1624 type: 'model';
1625 }
1626
1627 export namespace UnionMember4 {
1628 export interface Outputs {
1629 fallback: Outputs.Fallback;
1630
1631 success: Outputs.Success;
1632 }
1633
1634 export namespace Outputs {
1635 export interface Fallback {
1636 elementId: string;
1637 }
1638
1639 export interface Success {
1640 elementId: string;
1641 }
1642 }
1643
1644 export interface Properties {
1645 model: string;
1646
1647 provider: string;
1648
1649 retries: number;
1650
1651 timeout: number;
1652 }
1653 }
1654
1655 export interface UnionMember5 {
1656 id: string;
1657
1658 outputs: { [key: string]: UnionMember5.Outputs };
1659
1660 type: 'end';
1661 }
1662
1663 export namespace UnionMember5 {
1664 export interface Outputs {
1665 elementId: string;
1666 }
1667 }
1668
1669 export interface Version {
1670 active: 'true' | 'false';
1671
1672 created_at: string;
1673
1674 data: string;
1675
1676 version_id: string;
1677
1678 is_valid?: boolean;
1679 }
1680}
1681
1682export interface DynamicRoutingGetVersionResponse {
1683 id: string;
1684
1685 active: 'true' | 'false';
1686
1687 created_at: string;
1688
1689 data: string;
1690
1691 elements: Array<
1692 | DynamicRoutingGetVersionResponse.UnionMember0
1693 | DynamicRoutingGetVersionResponse.UnionMember1
1694 | DynamicRoutingGetVersionResponse.UnionMember2
1695 | DynamicRoutingGetVersionResponse.UnionMember3
1696 | DynamicRoutingGetVersionResponse.UnionMember4
1697 | DynamicRoutingGetVersionResponse.UnionMember5
1698 >;
1699
1700 gateway_id: string;
1701
1702 modified_at: string;
1703
1704 name: string;
1705
1706 version_id: string;
1707
1708 is_valid?: boolean;
1709}
1710
1711export namespace DynamicRoutingGetVersionResponse {
1712 export interface UnionMember0 {
1713 id: string;
1714
1715 outputs: UnionMember0.Outputs;
1716
1717 type: 'start';
1718 }
1719
1720 export namespace UnionMember0 {
1721 export interface Outputs {
1722 next: Outputs.Next;
1723 }
1724
1725 export namespace Outputs {
1726 export interface Next {
1727 elementId: string;
1728 }
1729 }
1730 }
1731
1732 export interface UnionMember1 {
1733 id: string;
1734
1735 outputs: UnionMember1.Outputs;
1736
1737 properties: UnionMember1.Properties;
1738
1739 type: 'conditional';
1740 }
1741
1742 export namespace UnionMember1 {
1743 export interface Outputs {
1744 false: Outputs.False;
1745
1746 true: Outputs.True;
1747 }
1748
1749 export namespace Outputs {
1750 export interface False {
1751 elementId: string;
1752 }
1753
1754 export interface True {
1755 elementId: string;
1756 }
1757 }
1758
1759 export interface Properties {
1760 conditions?: unknown;
1761 }
1762 }
1763
1764 export interface UnionMember2 {
1765 id: string;
1766
1767 outputs: { [key: string]: UnionMember2.Outputs };
1768
1769 type: 'percentage';
1770 }
1771
1772 export namespace UnionMember2 {
1773 export interface Outputs {
1774 elementId: string;
1775 }
1776 }
1777
1778 export interface UnionMember3 {
1779 id: string;
1780
1781 outputs: UnionMember3.Outputs;
1782
1783 properties: UnionMember3.Properties;
1784
1785 type: 'rate';
1786 }
1787
1788 export namespace UnionMember3 {
1789 export interface Outputs {
1790 fallback: Outputs.Fallback;
1791
1792 success: Outputs.Success;
1793 }
1794
1795 export namespace Outputs {
1796 export interface Fallback {
1797 elementId: string;
1798 }
1799
1800 export interface Success {
1801 elementId: string;
1802 }
1803 }
1804
1805 export interface Properties {
1806 key: string;
1807
1808 limit: number;
1809
1810 limitType: 'count' | 'cost';
1811
1812 window: number;
1813 }
1814 }
1815
1816 export interface UnionMember4 {
1817 id: string;
1818
1819 outputs: UnionMember4.Outputs;
1820
1821 properties: UnionMember4.Properties;
1822
1823 type: 'model';
1824 }
1825
1826 export namespace UnionMember4 {
1827 export interface Outputs {
1828 fallback: Outputs.Fallback;
1829
1830 success: Outputs.Success;
1831 }
1832
1833 export namespace Outputs {
1834 export interface Fallback {
1835 elementId: string;
1836 }
1837
1838 export interface Success {
1839 elementId: string;
1840 }
1841 }
1842
1843 export interface Properties {
1844 model: string;
1845
1846 provider: string;
1847
1848 retries: number;
1849
1850 timeout: number;
1851 }
1852 }
1853
1854 export interface UnionMember5 {
1855 id: string;
1856
1857 outputs: { [key: string]: UnionMember5.Outputs };
1858
1859 type: 'end';
1860 }
1861
1862 export namespace UnionMember5 {
1863 export interface Outputs {
1864 elementId: string;
1865 }
1866 }
1867}
1868
1869export interface DynamicRoutingListDeploymentsResponse {
1870 data: DynamicRoutingListDeploymentsResponse.Data;
1871
1872 success: boolean;
1873}
1874
1875export namespace DynamicRoutingListDeploymentsResponse {
1876 export interface Data {
1877 deployments: Array<Data.Deployment>;
1878
1879 order_by: string;
1880
1881 order_by_direction: string;
1882
1883 page: number;
1884
1885 per_page: number;
1886 }
1887
1888 export namespace Data {
1889 export interface Deployment {
1890 created_at: string;
1891
1892 deployment_id: string;
1893
1894 version_id: string;
1895 }
1896 }
1897}
1898
1899export interface DynamicRoutingListVersionsResponse {
1900 data: DynamicRoutingListVersionsResponse.Data;
1901
1902 success: boolean;
1903}
1904
1905export namespace DynamicRoutingListVersionsResponse {
1906 export interface Data {
1907 order_by: string;
1908
1909 order_by_direction: string;
1910
1911 page: number;
1912
1913 per_page: number;
1914
1915 versions: Array<Data.Version>;
1916 }
1917
1918 export namespace Data {
1919 export interface Version {
1920 active: 'true' | 'false';
1921
1922 created_at: string;
1923
1924 data: string;
1925
1926 version_id: string;
1927
1928 is_valid?: boolean;
1929 }
1930 }
1931}
1932
1933export interface DynamicRoutingCreateParams {
1934 /**
1935 * Path param
1936 */
1937 account_id: string;
1938
1939 /**
1940 * Body param
1941 */
1942 elements: Array<
1943 | DynamicRoutingCreateParams.UnionMember0
1944 | DynamicRoutingCreateParams.UnionMember1
1945 | DynamicRoutingCreateParams.UnionMember2
1946 | DynamicRoutingCreateParams.UnionMember3
1947 | DynamicRoutingCreateParams.UnionMember4
1948 | DynamicRoutingCreateParams.UnionMember5
1949 >;
1950
1951 /**
1952 * Body param
1953 */
1954 name: string;
1955}
1956
1957export namespace DynamicRoutingCreateParams {
1958 export interface UnionMember0 {
1959 id: string;
1960
1961 outputs: UnionMember0.Outputs;
1962
1963 type: 'start';
1964 }
1965
1966 export namespace UnionMember0 {
1967 export interface Outputs {
1968 next: Outputs.Next;
1969 }
1970
1971 export namespace Outputs {
1972 export interface Next {
1973 elementId: string;
1974 }
1975 }
1976 }
1977
1978 export interface UnionMember1 {
1979 id: string;
1980
1981 outputs: UnionMember1.Outputs;
1982
1983 properties: UnionMember1.Properties;
1984
1985 type: 'conditional';
1986 }
1987
1988 export namespace UnionMember1 {
1989 export interface Outputs {
1990 false: Outputs.False;
1991
1992 true: Outputs.True;
1993 }
1994
1995 export namespace Outputs {
1996 export interface False {
1997 elementId: string;
1998 }
1999
2000 export interface True {
2001 elementId: string;
2002 }
2003 }
2004
2005 export interface Properties {
2006 conditions?: unknown;
2007 }
2008 }
2009
2010 export interface UnionMember2 {
2011 id: string;
2012
2013 outputs: { [key: string]: UnionMember2.Outputs };
2014
2015 type: 'percentage';
2016 }
2017
2018 export namespace UnionMember2 {
2019 export interface Outputs {
2020 elementId: string;
2021 }
2022 }
2023
2024 export interface UnionMember3 {
2025 id: string;
2026
2027 outputs: UnionMember3.Outputs;
2028
2029 properties: UnionMember3.Properties;
2030
2031 type: 'rate';
2032 }
2033
2034 export namespace UnionMember3 {
2035 export interface Outputs {
2036 fallback: Outputs.Fallback;
2037
2038 success: Outputs.Success;
2039 }
2040
2041 export namespace Outputs {
2042 export interface Fallback {
2043 elementId: string;
2044 }
2045
2046 export interface Success {
2047 elementId: string;
2048 }
2049 }
2050
2051 export interface Properties {
2052 key: string;
2053
2054 limit: number;
2055
2056 limitType: 'count' | 'cost';
2057
2058 window: number;
2059 }
2060 }
2061
2062 export interface UnionMember4 {
2063 id: string;
2064
2065 outputs: UnionMember4.Outputs;
2066
2067 properties: UnionMember4.Properties;
2068
2069 type: 'model';
2070 }
2071
2072 export namespace UnionMember4 {
2073 export interface Outputs {
2074 fallback: Outputs.Fallback;
2075
2076 success: Outputs.Success;
2077 }
2078
2079 export namespace Outputs {
2080 export interface Fallback {
2081 elementId: string;
2082 }
2083
2084 export interface Success {
2085 elementId: string;
2086 }
2087 }
2088
2089 export interface Properties {
2090 model: string;
2091
2092 provider: string;
2093
2094 retries: number;
2095
2096 timeout: number;
2097 }
2098 }
2099
2100 export interface UnionMember5 {
2101 id: string;
2102
2103 outputs: { [key: string]: UnionMember5.Outputs };
2104
2105 type: 'end';
2106 }
2107
2108 export namespace UnionMember5 {
2109 export interface Outputs {
2110 elementId: string;
2111 }
2112 }
2113}
2114
2115export interface DynamicRoutingUpdateParams {
2116 /**
2117 * Path param
2118 */
2119 account_id: string;
2120
2121 /**
2122 * Body param
2123 */
2124 name: string;
2125}
2126
2127export interface DynamicRoutingListParams {
2128 /**
2129 * Path param
2130 */
2131 account_id: string;
2132
2133 /**
2134 * Query param: Page number
2135 */
2136 page?: number;
2137
2138 /**
2139 * Query param: Number of routes per page
2140 */
2141 per_page?: number;
2142}
2143
2144export interface DynamicRoutingDeleteParams {
2145 account_id: string;
2146}
2147
2148export interface DynamicRoutingCreateDeploymentParams {
2149 /**
2150 * Path param
2151 */
2152 account_id: string;
2153
2154 /**
2155 * Body param
2156 */
2157 version_id: string;
2158}
2159
2160export interface DynamicRoutingCreateVersionParams {
2161 /**
2162 * Path param
2163 */
2164 account_id: string;
2165
2166 /**
2167 * Body param
2168 */
2169 elements: Array<
2170 | DynamicRoutingCreateVersionParams.UnionMember0
2171 | DynamicRoutingCreateVersionParams.UnionMember1
2172 | DynamicRoutingCreateVersionParams.UnionMember2
2173 | DynamicRoutingCreateVersionParams.UnionMember3
2174 | DynamicRoutingCreateVersionParams.UnionMember4
2175 | DynamicRoutingCreateVersionParams.UnionMember5
2176 >;
2177}
2178
2179export namespace DynamicRoutingCreateVersionParams {
2180 export interface UnionMember0 {
2181 id: string;
2182
2183 outputs: UnionMember0.Outputs;
2184
2185 type: 'start';
2186 }
2187
2188 export namespace UnionMember0 {
2189 export interface Outputs {
2190 next: Outputs.Next;
2191 }
2192
2193 export namespace Outputs {
2194 export interface Next {
2195 elementId: string;
2196 }
2197 }
2198 }
2199
2200 export interface UnionMember1 {
2201 id: string;
2202
2203 outputs: UnionMember1.Outputs;
2204
2205 properties: UnionMember1.Properties;
2206
2207 type: 'conditional';
2208 }
2209
2210 export namespace UnionMember1 {
2211 export interface Outputs {
2212 false: Outputs.False;
2213
2214 true: Outputs.True;
2215 }
2216
2217 export namespace Outputs {
2218 export interface False {
2219 elementId: string;
2220 }
2221
2222 export interface True {
2223 elementId: string;
2224 }
2225 }
2226
2227 export interface Properties {
2228 conditions?: unknown;
2229 }
2230 }
2231
2232 export interface UnionMember2 {
2233 id: string;
2234
2235 outputs: { [key: string]: UnionMember2.Outputs };
2236
2237 type: 'percentage';
2238 }
2239
2240 export namespace UnionMember2 {
2241 export interface Outputs {
2242 elementId: string;
2243 }
2244 }
2245
2246 export interface UnionMember3 {
2247 id: string;
2248
2249 outputs: UnionMember3.Outputs;
2250
2251 properties: UnionMember3.Properties;
2252
2253 type: 'rate';
2254 }
2255
2256 export namespace UnionMember3 {
2257 export interface Outputs {
2258 fallback: Outputs.Fallback;
2259
2260 success: Outputs.Success;
2261 }
2262
2263 export namespace Outputs {
2264 export interface Fallback {
2265 elementId: string;
2266 }
2267
2268 export interface Success {
2269 elementId: string;
2270 }
2271 }
2272
2273 export interface Properties {
2274 key: string;
2275
2276 limit: number;
2277
2278 limitType: 'count' | 'cost';
2279
2280 window: number;
2281 }
2282 }
2283
2284 export interface UnionMember4 {
2285 id: string;
2286
2287 outputs: UnionMember4.Outputs;
2288
2289 properties: UnionMember4.Properties;
2290
2291 type: 'model';
2292 }
2293
2294 export namespace UnionMember4 {
2295 export interface Outputs {
2296 fallback: Outputs.Fallback;
2297
2298 success: Outputs.Success;
2299 }
2300
2301 export namespace Outputs {
2302 export interface Fallback {
2303 elementId: string;
2304 }
2305
2306 export interface Success {
2307 elementId: string;
2308 }
2309 }
2310
2311 export interface Properties {
2312 model: string;
2313
2314 provider: string;
2315
2316 retries: number;
2317
2318 timeout: number;
2319 }
2320 }
2321
2322 export interface UnionMember5 {
2323 id: string;
2324
2325 outputs: { [key: string]: UnionMember5.Outputs };
2326
2327 type: 'end';
2328 }
2329
2330 export namespace UnionMember5 {
2331 export interface Outputs {
2332 elementId: string;
2333 }
2334 }
2335}
2336
2337export interface DynamicRoutingGetParams {
2338 account_id: string;
2339}
2340
2341export interface DynamicRoutingGetVersionParams {
2342 account_id: string;
2343}
2344
2345export interface DynamicRoutingListDeploymentsParams {
2346 account_id: string;
2347}
2348
2349export interface DynamicRoutingListVersionsParams {
2350 account_id: string;
2351}
2352
2353export declare namespace DynamicRouting {
2354 export {
2355 type DynamicRoutingCreateResponse as DynamicRoutingCreateResponse,
2356 type DynamicRoutingUpdateResponse as DynamicRoutingUpdateResponse,
2357 type DynamicRoutingListResponse as DynamicRoutingListResponse,
2358 type DynamicRoutingDeleteResponse as DynamicRoutingDeleteResponse,
2359 type DynamicRoutingCreateDeploymentResponse as DynamicRoutingCreateDeploymentResponse,
2360 type DynamicRoutingCreateVersionResponse as DynamicRoutingCreateVersionResponse,
2361 type DynamicRoutingGetResponse as DynamicRoutingGetResponse,
2362 type DynamicRoutingGetVersionResponse as DynamicRoutingGetVersionResponse,
2363 type DynamicRoutingListDeploymentsResponse as DynamicRoutingListDeploymentsResponse,
2364 type DynamicRoutingListVersionsResponse as DynamicRoutingListVersionsResponse,
2365 type DynamicRoutingCreateParams as DynamicRoutingCreateParams,
2366 type DynamicRoutingUpdateParams as DynamicRoutingUpdateParams,
2367 type DynamicRoutingListParams as DynamicRoutingListParams,
2368 type DynamicRoutingDeleteParams as DynamicRoutingDeleteParams,
2369 type DynamicRoutingCreateDeploymentParams as DynamicRoutingCreateDeploymentParams,
2370 type DynamicRoutingCreateVersionParams as DynamicRoutingCreateVersionParams,
2371 type DynamicRoutingGetParams as DynamicRoutingGetParams,
2372 type DynamicRoutingGetVersionParams as DynamicRoutingGetVersionParams,
2373 type DynamicRoutingListDeploymentsParams as DynamicRoutingListDeploymentsParams,
2374 type DynamicRoutingListVersionsParams as DynamicRoutingListVersionsParams,
2375 };
2376}
2377