Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(api): api update #2243

Merged
merged 1 commit into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 1462
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-85a9c91a0b30d5f8dd27f570e6767069bd325bed73a253642d051bb79033273b.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-df037996f4a1d35cf34bb8d9deeee63b60463bb6f8814caec9fa4c659073fb0d.yml
14 changes: 12 additions & 2 deletions src/resources/ai-gateway/logs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ export interface LogListParams extends V4PagePaginationArrayParams {
export namespace LogListParams {
export interface Filter {
key:
| 'id'
| 'created_at'
| 'request_content_type'
| 'response_content_type'
Expand All @@ -362,7 +363,11 @@ export namespace LogListParams {
| 'tokens_in'
| 'tokens_out'
| 'duration'
| 'feedback';
| 'feedback'
| 'event_id'
| 'request_type'
| 'metadata.key'
| 'metadata.value';

operator: 'eq' | 'neq' | 'contains' | 'lt' | 'gt';

Expand Down Expand Up @@ -411,6 +416,7 @@ export interface LogDeleteParams {
export namespace LogDeleteParams {
export interface Filter {
key:
| 'id'
| 'created_at'
| 'request_content_type'
| 'response_content_type'
Expand All @@ -424,7 +430,11 @@ export namespace LogDeleteParams {
| 'tokens_in'
| 'tokens_out'
| 'duration'
| 'feedback';
| 'feedback'
| 'event_id'
| 'request_type'
| 'metadata.key'
| 'metadata.value';

operator: 'eq' | 'neq' | 'contains' | 'lt' | 'gt';

Expand Down
4 changes: 2 additions & 2 deletions tests/api-resources/ai-gateway/logs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe('resource logs', () => {
direction: 'asc',
end_date: '2019-12-27T18:11:19.117Z',
feedback: 0,
filters: [{ key: 'created_at', operator: 'eq', value: ['string'] }],
filters: [{ key: 'id', operator: 'eq', value: ['string'] }],
max_cost: 0,
max_duration: 0,
max_tokens_in: 0,
Expand Down Expand Up @@ -73,7 +73,7 @@ describe('resource logs', () => {
test('delete: required and optional params', async () => {
const response = await client.aiGateway.logs.delete('my-gateway', {
account_id: '0d37909e38d3e99c29fa2cd343ac421a',
filters: [{ key: 'created_at', operator: 'eq', value: ['string'] }],
filters: [{ key: 'id', operator: 'eq', value: ['string'] }],
limit: 1,
order_by: 'created_at',
order_by_direction: 'asc',
Expand Down