Skip to content

Commit f28f0d7

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
feat(api): OpenAPI spec update via Stainless API (#471)
1 parent 08332a0 commit f28f0d7

File tree

10 files changed

+49
-608
lines changed

10 files changed

+49
-608
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
configured_endpoints: 1275
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e0f14b3972aa9a5ae69697fce41ee4de0f7c39ead64f2b6c27434037717a30e5.yml
1+
configured_endpoints: 1269
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-66b404214530cc73c44f34f297dad6bc8da0645b63e61d9d4fcbeb301e127e65.yml

api.md

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6426,28 +6426,4 @@ Methods:
64266426

64276427
# AIGateway
64286428

6429-
Types:
6430-
6431-
- <code><a href="./src/resources/ai-gateway/ai-gateway.ts">AIGatewayCreateResponse</a></code>
6432-
- <code><a href="./src/resources/ai-gateway/ai-gateway.ts">AIGatewayUpdateResponse</a></code>
6433-
- <code><a href="./src/resources/ai-gateway/ai-gateway.ts">AIGatewayListResponse</a></code>
6434-
- <code><a href="./src/resources/ai-gateway/ai-gateway.ts">AIGatewayDeleteResponse</a></code>
6435-
- <code><a href="./src/resources/ai-gateway/ai-gateway.ts">AIGatewayGetResponse</a></code>
6436-
6437-
Methods:
6438-
6439-
- <code title="post /accounts/{account_tag}/ai-gateway/gateways">client.aiGateway.<a href="./src/resources/ai-gateway/ai-gateway.ts">create</a>(accountTag, { ...params }) -> AIGatewayCreateResponse</code>
6440-
- <code title="put /accounts/{account_tag}/ai-gateway/gateways/{id}">client.aiGateway.<a href="./src/resources/ai-gateway/ai-gateway.ts">update</a>(accountTag, id, { ...params }) -> AIGatewayUpdateResponse</code>
6441-
- <code title="get /accounts/{account_tag}/ai-gateway/gateways">client.aiGateway.<a href="./src/resources/ai-gateway/ai-gateway.ts">list</a>(accountTag, { ...params }) -> AIGatewayListResponsesV4PagePaginationArray</code>
6442-
- <code title="delete /accounts/{account_tag}/ai-gateway/gateways/{id}">client.aiGateway.<a href="./src/resources/ai-gateway/ai-gateway.ts">delete</a>(accountTag, id) -> AIGatewayDeleteResponse</code>
6443-
- <code title="get /accounts/{account_tag}/ai-gateway/gateways/{id}">client.aiGateway.<a href="./src/resources/ai-gateway/ai-gateway.ts">get</a>(accountTag, id) -> AIGatewayGetResponse</code>
6444-
64456429
## Logs
6446-
6447-
Types:
6448-
6449-
- <code><a href="./src/resources/ai-gateway/logs.ts">LogGetResponse</a></code>
6450-
6451-
Methods:
6452-
6453-
- <code title="get /accounts/{account_tag}/ai-gateway/gateways/{id}/logs">client.aiGateway.logs.<a href="./src/resources/ai-gateway/logs.ts">get</a>(accountTag, id, { ...params }) -> LogGetResponse</code>
Lines changed: 0 additions & 264 deletions
Original file line numberDiff line numberDiff line change
@@ -1,276 +1,12 @@
11
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
import * as Core from 'cloudflare/core';
43
import { APIResource } from 'cloudflare/resource';
5-
import { isRequestOptions } from 'cloudflare/core';
64
import * as LogsAPI from 'cloudflare/resources/ai-gateway/logs';
7-
import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination';
85

96
export class AIGateway extends APIResource {
107
logs: LogsAPI.Logs = new LogsAPI.Logs(this._client);
11-
12-
/**
13-
* Create a new Gateway
14-
*/
15-
create(
16-
accountTag: string,
17-
body: AIGatewayCreateParams,
18-
options?: Core.RequestOptions,
19-
): Core.APIPromise<AIGatewayCreateResponse> {
20-
return (
21-
this._client.post(`/accounts/${accountTag}/ai-gateway/gateways`, {
22-
body,
23-
...options,
24-
}) as Core.APIPromise<{ result: AIGatewayCreateResponse }>
25-
)._thenUnwrap((obj) => obj.result);
26-
}
27-
28-
/**
29-
* Update a Gateway
30-
*/
31-
update(
32-
accountTag: string,
33-
id: string,
34-
body: AIGatewayUpdateParams,
35-
options?: Core.RequestOptions,
36-
): Core.APIPromise<AIGatewayUpdateResponse> {
37-
return (
38-
this._client.put(`/accounts/${accountTag}/ai-gateway/gateways/${id}`, {
39-
body,
40-
...options,
41-
}) as Core.APIPromise<{ result: AIGatewayUpdateResponse }>
42-
)._thenUnwrap((obj) => obj.result);
43-
}
44-
45-
/**
46-
* List Gateway's
47-
*/
48-
list(
49-
accountTag: string,
50-
query?: AIGatewayListParams,
51-
options?: Core.RequestOptions,
52-
): Core.PagePromise<AIGatewayListResponsesV4PagePaginationArray, AIGatewayListResponse>;
53-
list(
54-
accountTag: string,
55-
options?: Core.RequestOptions,
56-
): Core.PagePromise<AIGatewayListResponsesV4PagePaginationArray, AIGatewayListResponse>;
57-
list(
58-
accountTag: string,
59-
query: AIGatewayListParams | Core.RequestOptions = {},
60-
options?: Core.RequestOptions,
61-
): Core.PagePromise<AIGatewayListResponsesV4PagePaginationArray, AIGatewayListResponse> {
62-
if (isRequestOptions(query)) {
63-
return this.list(accountTag, {}, query);
64-
}
65-
return this._client.getAPIList(
66-
`/accounts/${accountTag}/ai-gateway/gateways`,
67-
AIGatewayListResponsesV4PagePaginationArray,
68-
{ query, ...options },
69-
);
70-
}
71-
72-
/**
73-
* Delete a Gateway
74-
*/
75-
delete(
76-
accountTag: string,
77-
id: string,
78-
options?: Core.RequestOptions,
79-
): Core.APIPromise<AIGatewayDeleteResponse> {
80-
return (
81-
this._client.delete(`/accounts/${accountTag}/ai-gateway/gateways/${id}`, options) as Core.APIPromise<{
82-
result: AIGatewayDeleteResponse;
83-
}>
84-
)._thenUnwrap((obj) => obj.result);
85-
}
86-
87-
/**
88-
* Fetch a Gateway
89-
*/
90-
get(accountTag: string, id: string, options?: Core.RequestOptions): Core.APIPromise<AIGatewayGetResponse> {
91-
return (
92-
this._client.get(`/accounts/${accountTag}/ai-gateway/gateways/${id}`, options) as Core.APIPromise<{
93-
result: AIGatewayGetResponse;
94-
}>
95-
)._thenUnwrap((obj) => obj.result);
96-
}
97-
}
98-
99-
export class AIGatewayListResponsesV4PagePaginationArray extends V4PagePaginationArray<AIGatewayListResponse> {}
100-
101-
export interface AIGatewayCreateResponse {
102-
task: AIGatewayCreateResponse.Task;
103-
}
104-
105-
export namespace AIGatewayCreateResponse {
106-
export interface Task {
107-
id: string;
108-
109-
cache_invalidate_on_update: boolean;
110-
111-
cache_ttl: number;
112-
113-
collect_logs: boolean;
114-
115-
created_at: string;
116-
117-
modified_at: string;
118-
119-
name: string;
120-
121-
slug: string;
122-
123-
rate_limiting_interval?: number;
124-
125-
rate_limiting_limit?: number;
126-
127-
rate_limiting_technique?: string;
128-
}
129-
}
130-
131-
export interface AIGatewayUpdateResponse {
132-
id: string;
133-
134-
cache_invalidate_on_update: boolean;
135-
136-
cache_ttl: number;
137-
138-
collect_logs: boolean;
139-
140-
created_at: string;
141-
142-
modified_at: string;
143-
144-
name: string;
145-
146-
slug: string;
147-
148-
rate_limiting_interval?: number;
149-
150-
rate_limiting_limit?: number;
151-
152-
rate_limiting_technique?: string;
153-
}
154-
155-
export interface AIGatewayListResponse {
156-
id: string;
157-
158-
cache_invalidate_on_update: boolean;
159-
160-
cache_ttl: number;
161-
162-
collect_logs: boolean;
163-
164-
created_at: string;
165-
166-
modified_at: string;
167-
168-
name: string;
169-
170-
slug: string;
171-
172-
rate_limiting_interval?: number;
173-
174-
rate_limiting_limit?: number;
175-
176-
rate_limiting_technique?: string;
177-
}
178-
179-
export interface AIGatewayDeleteResponse {
180-
id: string;
181-
182-
cache_invalidate_on_update: boolean;
183-
184-
cache_ttl: number;
185-
186-
collect_logs: boolean;
187-
188-
created_at: string;
189-
190-
modified_at: string;
191-
192-
name: string;
193-
194-
slug: string;
195-
196-
rate_limiting_interval?: number;
197-
198-
rate_limiting_limit?: number;
199-
200-
rate_limiting_technique?: string;
201-
}
202-
203-
export interface AIGatewayGetResponse {
204-
id: string;
205-
206-
cache_invalidate_on_update: boolean;
207-
208-
cache_ttl: number;
209-
210-
collect_logs: boolean;
211-
212-
created_at: string;
213-
214-
modified_at: string;
215-
216-
name: string;
217-
218-
slug: string;
219-
220-
rate_limiting_interval?: number;
221-
222-
rate_limiting_limit?: number;
223-
224-
rate_limiting_technique?: string;
225-
}
226-
227-
export interface AIGatewayCreateParams {
228-
cache_invalidate_on_update: boolean;
229-
230-
cache_ttl: number;
231-
232-
collect_logs: boolean;
233-
234-
name: string;
235-
236-
slug: string;
237-
238-
rate_limiting_interval?: number;
239-
240-
rate_limiting_limit?: number;
241-
242-
rate_limiting_technique?: string;
243-
}
244-
245-
export interface AIGatewayUpdateParams {
246-
cache_invalidate_on_update: boolean;
247-
248-
cache_ttl: number;
249-
250-
collect_logs: boolean;
251-
252-
name: string;
253-
254-
slug: string;
255-
256-
rate_limiting_interval?: number;
257-
258-
rate_limiting_limit?: number;
259-
260-
rate_limiting_technique?: string;
261-
}
262-
263-
export interface AIGatewayListParams extends V4PagePaginationArrayParams {
264-
id?: string;
265-
266-
/**
267-
* Order By Column Name
268-
*/
269-
order_by?: string;
2708
}
2719

27210
export namespace AIGateway {
27311
export import Logs = LogsAPI.Logs;
274-
export import LogGetResponse = LogsAPI.LogGetResponse;
275-
export import LogGetParams = LogsAPI.LogGetParams;
27612
}

src/resources/ai-gateway/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
export { AIGateway } from './ai-gateway';
4-
export { LogGetResponse, LogGetParams, Logs } from './logs';
4+
export { Logs } from './logs';

0 commit comments

Comments
 (0)