Skip to content

Commit cceaf7f

Browse files
feat(api): api update
1 parent 20693b7 commit cceaf7f

File tree

10 files changed

+433
-323
lines changed

10 files changed

+433
-323
lines changed

.stats.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 1706
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5dcf8a8c8fa3f1d5fda7c04f0f8146e516083ec5f1a8495b839797a8aac9c4aa.yml
3-
openapi_spec_hash: 6d1e09f7607f81ac5765d40abfe04817
1+
configured_endpoints: 1704
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0f4e6e9773b2fbfeaac0948e1998c000989b6af64267345f75f4e450005e4f2c.yml
3+
openapi_spec_hash: db5d79dfe9e417edecc8d61792d72f06
44
config_hash: 67f412c990647f3cb598378fa22a9db5

api.md

+9-16
Original file line numberDiff line numberDiff line change
@@ -3868,27 +3868,22 @@ Types:
38683868
- <code><a href="./src/resources/rules/lists/lists.ts">Hostname</a></code>
38693869
- <code><a href="./src/resources/rules/lists/lists.ts">ListsList</a></code>
38703870
- <code><a href="./src/resources/rules/lists/lists.ts">Redirect</a></code>
3871+
- <code><a href="./src/resources/rules/lists/lists.ts">ListCreateResponse</a></code>
3872+
- <code><a href="./src/resources/rules/lists/lists.ts">ListUpdateResponse</a></code>
3873+
- <code><a href="./src/resources/rules/lists/lists.ts">ListListResponse</a></code>
38713874
- <code><a href="./src/resources/rules/lists/lists.ts">ListDeleteResponse</a></code>
3875+
- <code><a href="./src/resources/rules/lists/lists.ts">ListGetResponse</a></code>
38723876

38733877
Methods:
38743878

3875-
- <code title="post /accounts/{account_id}/rules/lists">client.rules.lists.<a href="./src/resources/rules/lists/lists.ts">create</a>({ ...params }) -> ListsList</code>
3876-
- <code title="put /accounts/{account_id}/rules/lists/{list_id}">client.rules.lists.<a href="./src/resources/rules/lists/lists.ts">update</a>(listId, { ...params }) -> ListsList</code>
3877-
- <code title="get /accounts/{account_id}/rules/lists">client.rules.lists.<a href="./src/resources/rules/lists/lists.ts">list</a>({ ...params }) -> ListsListsSinglePage</code>
3879+
- <code title="post /accounts/{account_id}/rules/lists">client.rules.lists.<a href="./src/resources/rules/lists/lists.ts">create</a>({ ...params }) -> ListCreateResponse</code>
3880+
- <code title="put /accounts/{account_id}/rules/lists/{list_id}">client.rules.lists.<a href="./src/resources/rules/lists/lists.ts">update</a>(listId, { ...params }) -> ListUpdateResponse</code>
3881+
- <code title="get /accounts/{account_id}/rules/lists">client.rules.lists.<a href="./src/resources/rules/lists/lists.ts">list</a>({ ...params }) -> ListListResponse</code>
38783882
- <code title="delete /accounts/{account_id}/rules/lists/{list_id}">client.rules.lists.<a href="./src/resources/rules/lists/lists.ts">delete</a>(listId, { ...params }) -> ListDeleteResponse</code>
3879-
- <code title="get /accounts/{account_id}/rules/lists/{list_id}">client.rules.lists.<a href="./src/resources/rules/lists/lists.ts">get</a>(listId, { ...params }) -> ListsList</code>
3883+
- <code title="get /accounts/{account_id}/rules/lists/{list_id}">client.rules.lists.<a href="./src/resources/rules/lists/lists.ts">get</a>(listId, { ...params }) -> ListGetResponse</code>
38803884

38813885
### BulkOperations
38823886

3883-
Types:
3884-
3885-
- <code><a href="./src/resources/rules/lists/bulk-operations.ts">OperationStatus</a></code>
3886-
- <code><a href="./src/resources/rules/lists/bulk-operations.ts">BulkOperationGetResponse</a></code>
3887-
3888-
Methods:
3889-
3890-
- <code title="get /accounts/{account_identifier}/rules/lists/bulk_operations/{operation_id}">client.rules.lists.bulkOperations.<a href="./src/resources/rules/lists/bulk-operations.ts">get</a>(accountIdentifier, operationId) -> BulkOperationGetResponse</code>
3891-
38923887
### Items
38933888

38943889
Types:
@@ -3899,15 +3894,13 @@ Types:
38993894
- <code><a href="./src/resources/rules/lists/items.ts">ItemUpdateResponse</a></code>
39003895
- <code><a href="./src/resources/rules/lists/items.ts">ItemListResponse</a></code>
39013896
- <code><a href="./src/resources/rules/lists/items.ts">ItemDeleteResponse</a></code>
3902-
- <code><a href="./src/resources/rules/lists/items.ts">ItemGetResponse</a></code>
39033897

39043898
Methods:
39053899

39063900
- <code title="post /accounts/{account_id}/rules/lists/{list_id}/items">client.rules.lists.items.<a href="./src/resources/rules/lists/items.ts">create</a>(listId, [ ...body ]) -> ItemCreateResponse</code>
39073901
- <code title="put /accounts/{account_id}/rules/lists/{list_id}/items">client.rules.lists.items.<a href="./src/resources/rules/lists/items.ts">update</a>(listId, [ ...body ]) -> ItemUpdateResponse</code>
3908-
- <code title="get /accounts/{account_id}/rules/lists/{list_id}/items">client.rules.lists.items.<a href="./src/resources/rules/lists/items.ts">list</a>(listId, { ...params }) -> ItemListResponsesCursorPagination</code>
3902+
- <code title="get /accounts/{account_id}/rules/lists/{list_id}/items">client.rules.lists.items.<a href="./src/resources/rules/lists/items.ts">list</a>(listId, { ...params }) -> ItemListResponse</code>
39093903
- <code title="delete /accounts/{account_id}/rules/lists/{list_id}/items">client.rules.lists.items.<a href="./src/resources/rules/lists/items.ts">delete</a>(listId, { ...params }) -> ItemDeleteResponse</code>
3910-
- <code title="get /accounts/{account_identifier}/rules/lists/{list_id}/items/{item_id}">client.rules.lists.items.<a href="./src/resources/rules/lists/items.ts">get</a>(accountIdentifier, listId, itemId) -> ItemGetResponse</code>
39113904

39123905
# Stream
39133906

src/resources/rules/index.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
export {
4-
ListsListsSinglePage,
54
Lists,
65
type Hostname,
76
type ListsList,
87
type Redirect,
8+
type ListCreateResponse,
9+
type ListUpdateResponse,
10+
type ListListResponse,
911
type ListDeleteResponse,
12+
type ListGetResponse,
1013
type ListCreateParams,
1114
type ListUpdateParams,
1215
type ListListParams,
+1-56
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,5 @@
11
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
import { APIResource } from '../../../resource';
4-
import * as Core from '../../../core';
54

6-
export class BulkOperations extends APIResource {
7-
/**
8-
* Gets the current status of an asynchronous operation on a list.
9-
*
10-
* The `status` property can have one of the following values: `pending`,
11-
* `running`, `completed`, or `failed`. If the status is `failed`, the `error`
12-
* property will contain a message describing the error.
13-
*/
14-
get(
15-
accountIdentifier: string,
16-
operationId: string,
17-
options?: Core.RequestOptions,
18-
): Core.APIPromise<BulkOperationGetResponse> {
19-
return (
20-
this._client.get(
21-
`/accounts/${accountIdentifier}/rules/lists/bulk_operations/${operationId}`,
22-
options,
23-
) as Core.APIPromise<{ result: BulkOperationGetResponse }>
24-
)._thenUnwrap((obj) => obj.result);
25-
}
26-
}
27-
28-
/**
29-
* The current status of the asynchronous operation.
30-
*/
31-
export type OperationStatus = 'pending' | 'running' | 'completed' | 'failed';
32-
33-
export interface BulkOperationGetResponse {
34-
/**
35-
* The unique operation ID of the asynchronous action.
36-
*/
37-
id: string;
38-
39-
/**
40-
* The current status of the asynchronous operation.
41-
*/
42-
status: OperationStatus;
43-
44-
/**
45-
* The RFC 3339 timestamp of when the operation was completed.
46-
*/
47-
completed?: string;
48-
49-
/**
50-
* A message describing the error when the status is `failed`.
51-
*/
52-
error?: string;
53-
}
54-
55-
export declare namespace BulkOperations {
56-
export {
57-
type OperationStatus as OperationStatus,
58-
type BulkOperationGetResponse as BulkOperationGetResponse,
59-
};
60-
}
5+
export class BulkOperations extends APIResource {}

src/resources/rules/lists/index.ts

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,29 @@
11
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
export { BulkOperations, type OperationStatus, type BulkOperationGetResponse } from './bulk-operations';
3+
export { BulkOperations } from './bulk-operations';
44
export {
5-
ItemListResponsesCursorPagination,
65
Items,
76
type ListCursor,
87
type ListItem,
98
type ItemCreateResponse,
109
type ItemUpdateResponse,
1110
type ItemListResponse,
1211
type ItemDeleteResponse,
13-
type ItemGetResponse,
1412
type ItemCreateParams,
1513
type ItemUpdateParams,
1614
type ItemListParams,
1715
type ItemDeleteParams,
1816
} from './items';
1917
export {
20-
ListsListsSinglePage,
2118
Lists,
2219
type Hostname,
2320
type ListsList,
2421
type Redirect,
22+
type ListCreateResponse,
23+
type ListUpdateResponse,
24+
type ListListResponse,
2525
type ListDeleteResponse,
26+
type ListGetResponse,
2627
type ListCreateParams,
2728
type ListUpdateParams,
2829
type ListListParams,

0 commit comments

Comments
 (0)