Skip to content

Commit 19b730b

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
feat(api): OpenAPI spec update via Stainless API (#751)
1 parent cb5aa05 commit 19b730b

22 files changed

+350
-313
lines changed

.stats.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 1321
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a18a8d7f1f80a39beb83a6541eb29dea4a69df37444aeb85493c94256c11d3a6.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7080386fb1d04dafc80523803a44e41bab56e2907c13694ced938d02a3abb9d5.yml

src/cloudflare/resources/zero_trust/dex/colos.py

+12-12
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ def list(
3939
self,
4040
*,
4141
account_id: str,
42-
time_end: str,
43-
time_start: str,
42+
from_: str,
43+
to: str,
4444
sort_by: Literal["fleet-status-usage", "application-tests-usage"] | NotGiven = NOT_GIVEN,
4545
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
4646
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -55,9 +55,9 @@ def list(
5555
are also returned and sorted alphabetically.
5656
5757
Args:
58-
time_end: End time for connection period in RFC3339 (ISO 8601) format.
58+
from_: Start time for connection period in RFC3339 (ISO 8601) format.
5959
60-
time_start: Start time for connection period in RFC3339 (ISO 8601) format.
60+
to: End time for connection period in RFC3339 (ISO 8601) format.
6161
6262
sort_by: Type of usage that colos should be sorted by. If unspecified, returns all
6363
Cloudflare colos sorted alphabetically.
@@ -82,8 +82,8 @@ def list(
8282
timeout=timeout,
8383
query=maybe_transform(
8484
{
85-
"time_end": time_end,
86-
"time_start": time_start,
85+
"from_": from_,
86+
"to": to,
8787
"sort_by": sort_by,
8888
},
8989
colo_list_params.ColoListParams,
@@ -106,8 +106,8 @@ def list(
106106
self,
107107
*,
108108
account_id: str,
109-
time_end: str,
110-
time_start: str,
109+
from_: str,
110+
to: str,
111111
sort_by: Literal["fleet-status-usage", "application-tests-usage"] | NotGiven = NOT_GIVEN,
112112
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
113113
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -122,9 +122,9 @@ def list(
122122
are also returned and sorted alphabetically.
123123
124124
Args:
125-
time_end: End time for connection period in RFC3339 (ISO 8601) format.
125+
from_: Start time for connection period in RFC3339 (ISO 8601) format.
126126
127-
time_start: Start time for connection period in RFC3339 (ISO 8601) format.
127+
to: End time for connection period in RFC3339 (ISO 8601) format.
128128
129129
sort_by: Type of usage that colos should be sorted by. If unspecified, returns all
130130
Cloudflare colos sorted alphabetically.
@@ -149,8 +149,8 @@ def list(
149149
timeout=timeout,
150150
query=maybe_transform(
151151
{
152-
"time_end": time_end,
153-
"time_start": time_start,
152+
"from_": from_,
153+
"to": to,
154154
"sort_by": sort_by,
155155
},
156156
colo_list_params.ColoListParams,

src/cloudflare/resources/zero_trust/dex/fleet_status/devices.py

+30-12
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,11 @@ def list(
4040
self,
4141
*,
4242
account_id: str,
43+
from_: str,
4344
page: float,
4445
per_page: float,
45-
time_end: str,
46-
time_start: str,
46+
source: Literal["last_seen", "hourly", "raw"],
47+
to: str,
4748
colo: str | NotGiven = NOT_GIVEN,
4849
device_id: str | NotGiven = NOT_GIVEN,
4950
mode: str | NotGiven = NOT_GIVEN,
@@ -63,13 +64,20 @@ def list(
6364
List details for devices using WARP
6465
6566
Args:
67+
from_: Timestamp in ISO format
68+
6669
page: Page number of paginated results
6770
6871
per_page: Number of items per page
6972
70-
time_end: Timestamp in ISO format
73+
source:
74+
Source:
75+
76+
- `hourly` - device details aggregated hourly, up to 7 days prior
77+
- `last_seen` - device details, up to 24 hours prior
78+
- `raw` - device details, up to 7 days prior
7179
72-
time_start: Timestamp in ISO format
80+
to: Timestamp in ISO format
7381
7482
colo: Cloudflare colo
7583
@@ -105,10 +113,11 @@ def list(
105113
timeout=timeout,
106114
query=maybe_transform(
107115
{
116+
"from_": from_,
108117
"page": page,
109118
"per_page": per_page,
110-
"time_end": time_end,
111-
"time_start": time_start,
119+
"source": source,
120+
"to": to,
112121
"colo": colo,
113122
"device_id": device_id,
114123
"mode": mode,
@@ -137,10 +146,11 @@ def list(
137146
self,
138147
*,
139148
account_id: str,
149+
from_: str,
140150
page: float,
141151
per_page: float,
142-
time_end: str,
143-
time_start: str,
152+
source: Literal["last_seen", "hourly", "raw"],
153+
to: str,
144154
colo: str | NotGiven = NOT_GIVEN,
145155
device_id: str | NotGiven = NOT_GIVEN,
146156
mode: str | NotGiven = NOT_GIVEN,
@@ -160,13 +170,20 @@ def list(
160170
List details for devices using WARP
161171
162172
Args:
173+
from_: Timestamp in ISO format
174+
163175
page: Page number of paginated results
164176
165177
per_page: Number of items per page
166178
167-
time_end: Timestamp in ISO format
179+
source:
180+
Source:
181+
182+
- `hourly` - device details aggregated hourly, up to 7 days prior
183+
- `last_seen` - device details, up to 24 hours prior
184+
- `raw` - device details, up to 7 days prior
168185
169-
time_start: Timestamp in ISO format
186+
to: Timestamp in ISO format
170187
171188
colo: Cloudflare colo
172189
@@ -202,10 +219,11 @@ def list(
202219
timeout=timeout,
203220
query=maybe_transform(
204221
{
222+
"from_": from_,
205223
"page": page,
206224
"per_page": per_page,
207-
"time_end": time_end,
208-
"time_start": time_start,
225+
"source": source,
226+
"to": to,
209227
"colo": colo,
210228
"device_id": device_id,
211229
"mode": mode,

src/cloudflare/resources/zero_trust/dex/fleet_status/fleet_status.py

+12-12
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ def over_time(
9595
self,
9696
*,
9797
account_id: str,
98-
time_end: str,
99-
time_start: str,
98+
from_: str,
99+
to: str,
100100
colo: str | NotGiven = NOT_GIVEN,
101101
device_id: str | NotGiven = NOT_GIVEN,
102102
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -110,9 +110,9 @@ def over_time(
110110
List details for devices using WARP, up to 7 days
111111
112112
Args:
113-
time_end: Timestamp in ISO format
113+
from_: Timestamp in ISO format
114114
115-
time_start: Timestamp in ISO format
115+
to: Timestamp in ISO format
116116
117117
colo: Cloudflare colo
118118
@@ -138,8 +138,8 @@ def over_time(
138138
timeout=timeout,
139139
query=maybe_transform(
140140
{
141-
"time_end": time_end,
142-
"time_start": time_start,
141+
"from_": from_,
142+
"to": to,
143143
"colo": colo,
144144
"device_id": device_id,
145145
},
@@ -210,8 +210,8 @@ async def over_time(
210210
self,
211211
*,
212212
account_id: str,
213-
time_end: str,
214-
time_start: str,
213+
from_: str,
214+
to: str,
215215
colo: str | NotGiven = NOT_GIVEN,
216216
device_id: str | NotGiven = NOT_GIVEN,
217217
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -225,9 +225,9 @@ async def over_time(
225225
List details for devices using WARP, up to 7 days
226226
227227
Args:
228-
time_end: Timestamp in ISO format
228+
from_: Timestamp in ISO format
229229
230-
time_start: Timestamp in ISO format
230+
to: Timestamp in ISO format
231231
232232
colo: Cloudflare colo
233233
@@ -253,8 +253,8 @@ async def over_time(
253253
timeout=timeout,
254254
query=await async_maybe_transform(
255255
{
256-
"time_end": time_end,
257-
"time_start": time_start,
256+
"from_": from_,
257+
"to": to,
258258
"colo": colo,
259259
"device_id": device_id,
260260
},

src/cloudflare/resources/zero_trust/dex/http_tests/http_tests.py

+14-14
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ def get(
5656
test_id: str,
5757
*,
5858
account_id: str,
59+
from_: str,
5960
interval: Literal["minute", "hour"],
60-
time_end: str,
61-
time_start: str,
61+
to: str,
6262
colo: str | NotGiven = NOT_GIVEN,
6363
device_id: List[str] | NotGiven = NOT_GIVEN,
6464
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -75,11 +75,11 @@ def get(
7575
Args:
7676
test_id: API Resource UUID tag.
7777
78-
interval: Time interval for aggregate time slots.
78+
from_: Start time for aggregate metrics in ISO ms
7979
80-
time_end: End time for aggregate metrics in ISO ms
80+
interval: Time interval for aggregate time slots.
8181
82-
time_start: Start time for aggregate metrics in ISO ms
82+
to: End time for aggregate metrics in ISO ms
8383
8484
colo: Optionally filter result stats to a Cloudflare colo. Cannot be used in
8585
combination with deviceId param.
@@ -108,9 +108,9 @@ def get(
108108
timeout=timeout,
109109
query=maybe_transform(
110110
{
111+
"from_": from_,
111112
"interval": interval,
112-
"time_end": time_end,
113-
"time_start": time_start,
113+
"to": to,
114114
"colo": colo,
115115
"device_id": device_id,
116116
},
@@ -140,9 +140,9 @@ async def get(
140140
test_id: str,
141141
*,
142142
account_id: str,
143+
from_: str,
143144
interval: Literal["minute", "hour"],
144-
time_end: str,
145-
time_start: str,
145+
to: str,
146146
colo: str | NotGiven = NOT_GIVEN,
147147
device_id: List[str] | NotGiven = NOT_GIVEN,
148148
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -159,11 +159,11 @@ async def get(
159159
Args:
160160
test_id: API Resource UUID tag.
161161
162-
interval: Time interval for aggregate time slots.
162+
from_: Start time for aggregate metrics in ISO ms
163163
164-
time_end: End time for aggregate metrics in ISO ms
164+
interval: Time interval for aggregate time slots.
165165
166-
time_start: Start time for aggregate metrics in ISO ms
166+
to: End time for aggregate metrics in ISO ms
167167
168168
colo: Optionally filter result stats to a Cloudflare colo. Cannot be used in
169169
combination with deviceId param.
@@ -192,9 +192,9 @@ async def get(
192192
timeout=timeout,
193193
query=await async_maybe_transform(
194194
{
195+
"from_": from_,
195196
"interval": interval,
196-
"time_end": time_end,
197-
"time_start": time_start,
197+
"to": to,
198198
"colo": colo,
199199
"device_id": device_id,
200200
},

src/cloudflare/resources/zero_trust/dex/http_tests/percentiles.py

+12-12
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ def get(
4343
test_id: str,
4444
*,
4545
account_id: str,
46-
time_end: str,
47-
time_start: str,
46+
from_: str,
47+
to: str,
4848
colo: str | NotGiven = NOT_GIVEN,
4949
device_id: List[str] | NotGiven = NOT_GIVEN,
5050
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -61,9 +61,9 @@ def get(
6161
Args:
6262
test_id: API Resource UUID tag.
6363
64-
time_end: End time for aggregate metrics in ISO format
64+
from_: Start time for aggregate metrics in ISO format
6565
66-
time_start: Start time for aggregate metrics in ISO format
66+
to: End time for aggregate metrics in ISO format
6767
6868
colo: Optionally filter result stats to a Cloudflare colo. Cannot be used in
6969
combination with deviceId param.
@@ -92,8 +92,8 @@ def get(
9292
timeout=timeout,
9393
query=maybe_transform(
9494
{
95-
"time_end": time_end,
96-
"time_start": time_start,
95+
"from_": from_,
96+
"to": to,
9797
"colo": colo,
9898
"device_id": device_id,
9999
},
@@ -119,8 +119,8 @@ async def get(
119119
test_id: str,
120120
*,
121121
account_id: str,
122-
time_end: str,
123-
time_start: str,
122+
from_: str,
123+
to: str,
124124
colo: str | NotGiven = NOT_GIVEN,
125125
device_id: List[str] | NotGiven = NOT_GIVEN,
126126
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -137,9 +137,9 @@ async def get(
137137
Args:
138138
test_id: API Resource UUID tag.
139139
140-
time_end: End time for aggregate metrics in ISO format
140+
from_: Start time for aggregate metrics in ISO format
141141
142-
time_start: Start time for aggregate metrics in ISO format
142+
to: End time for aggregate metrics in ISO format
143143
144144
colo: Optionally filter result stats to a Cloudflare colo. Cannot be used in
145145
combination with deviceId param.
@@ -168,8 +168,8 @@ async def get(
168168
timeout=timeout,
169169
query=await async_maybe_transform(
170170
{
171-
"time_end": time_end,
172-
"time_start": time_start,
171+
"from_": from_,
172+
"to": to,
173173
"colo": colo,
174174
"device_id": device_id,
175175
},

0 commit comments

Comments
 (0)