Skip to content

Commit 8c8ac04

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
feat(api): update via SDK Studio (#372)
1 parent 62735a6 commit 8c8ac04

File tree

11 files changed

+221
-137
lines changed

11 files changed

+221
-137
lines changed

.stats.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 1266
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ea285caeae39e684b320c55cf658a1ce9360e7737d2a13bbf9782459709ec55c.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1117455d139246587bb583bb4cb4c402c3757e6ab4ad31d325b6657ac6fa6a0b.yml

tests/api_resources/hyperdrive/test_configs.py

+24-24
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def test_method_create(self, client: Cloudflare) -> None:
3030
origin={
3131
"database": "postgres",
3232
"host": "database.example.com",
33-
"port": 0,
33+
"port": 5432,
3434
"scheme": "postgres",
3535
"user": "postgres",
3636
},
@@ -46,7 +46,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
4646
origin={
4747
"database": "postgres",
4848
"host": "database.example.com",
49-
"port": 0,
49+
"port": 5432,
5050
"scheme": "postgres",
5151
"user": "postgres",
5252
},
@@ -67,7 +67,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None:
6767
origin={
6868
"database": "postgres",
6969
"host": "database.example.com",
70-
"port": 0,
70+
"port": 5432,
7171
"scheme": "postgres",
7272
"user": "postgres",
7373
},
@@ -87,7 +87,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
8787
origin={
8888
"database": "postgres",
8989
"host": "database.example.com",
90-
"port": 0,
90+
"port": 5432,
9191
"scheme": "postgres",
9292
"user": "postgres",
9393
},
@@ -110,7 +110,7 @@ def test_path_params_create(self, client: Cloudflare) -> None:
110110
origin={
111111
"database": "postgres",
112112
"host": "database.example.com",
113-
"port": 0,
113+
"port": 5432,
114114
"scheme": "postgres",
115115
"user": "postgres",
116116
},
@@ -126,7 +126,7 @@ def test_method_update(self, client: Cloudflare) -> None:
126126
origin={
127127
"database": "postgres",
128128
"host": "database.example.com",
129-
"port": 0,
129+
"port": 5432,
130130
"scheme": "postgres",
131131
"user": "postgres",
132132
},
@@ -143,7 +143,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
143143
origin={
144144
"database": "postgres",
145145
"host": "database.example.com",
146-
"port": 0,
146+
"port": 5432,
147147
"scheme": "postgres",
148148
"user": "postgres",
149149
},
@@ -165,7 +165,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None:
165165
origin={
166166
"database": "postgres",
167167
"host": "database.example.com",
168-
"port": 0,
168+
"port": 5432,
169169
"scheme": "postgres",
170170
"user": "postgres",
171171
},
@@ -186,7 +186,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None:
186186
origin={
187187
"database": "postgres",
188188
"host": "database.example.com",
189-
"port": 0,
189+
"port": 5432,
190190
"scheme": "postgres",
191191
"user": "postgres",
192192
},
@@ -210,7 +210,7 @@ def test_path_params_update(self, client: Cloudflare) -> None:
210210
origin={
211211
"database": "postgres",
212212
"host": "database.example.com",
213-
"port": 0,
213+
"port": 5432,
214214
"scheme": "postgres",
215215
"user": "postgres",
216216
},
@@ -224,7 +224,7 @@ def test_path_params_update(self, client: Cloudflare) -> None:
224224
origin={
225225
"database": "postgres",
226226
"host": "database.example.com",
227-
"port": 0,
227+
"port": 5432,
228228
"scheme": "postgres",
229229
"user": "postgres",
230230
},
@@ -348,7 +348,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None:
348348
origin={
349349
"database": "postgres",
350350
"host": "database.example.com",
351-
"port": 0,
351+
"port": 5432,
352352
"scheme": "postgres",
353353
"user": "postgres",
354354
},
@@ -463,7 +463,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
463463
origin={
464464
"database": "postgres",
465465
"host": "database.example.com",
466-
"port": 0,
466+
"port": 5432,
467467
"scheme": "postgres",
468468
"user": "postgres",
469469
},
@@ -479,7 +479,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
479479
origin={
480480
"database": "postgres",
481481
"host": "database.example.com",
482-
"port": 0,
482+
"port": 5432,
483483
"scheme": "postgres",
484484
"user": "postgres",
485485
},
@@ -500,7 +500,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
500500
origin={
501501
"database": "postgres",
502502
"host": "database.example.com",
503-
"port": 0,
503+
"port": 5432,
504504
"scheme": "postgres",
505505
"user": "postgres",
506506
},
@@ -520,7 +520,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) ->
520520
origin={
521521
"database": "postgres",
522522
"host": "database.example.com",
523-
"port": 0,
523+
"port": 5432,
524524
"scheme": "postgres",
525525
"user": "postgres",
526526
},
@@ -543,7 +543,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None:
543543
origin={
544544
"database": "postgres",
545545
"host": "database.example.com",
546-
"port": 0,
546+
"port": 5432,
547547
"scheme": "postgres",
548548
"user": "postgres",
549549
},
@@ -559,7 +559,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None:
559559
origin={
560560
"database": "postgres",
561561
"host": "database.example.com",
562-
"port": 0,
562+
"port": 5432,
563563
"scheme": "postgres",
564564
"user": "postgres",
565565
},
@@ -576,7 +576,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
576576
origin={
577577
"database": "postgres",
578578
"host": "database.example.com",
579-
"port": 0,
579+
"port": 5432,
580580
"scheme": "postgres",
581581
"user": "postgres",
582582
},
@@ -598,7 +598,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
598598
origin={
599599
"database": "postgres",
600600
"host": "database.example.com",
601-
"port": 0,
601+
"port": 5432,
602602
"scheme": "postgres",
603603
"user": "postgres",
604604
},
@@ -619,7 +619,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) ->
619619
origin={
620620
"database": "postgres",
621621
"host": "database.example.com",
622-
"port": 0,
622+
"port": 5432,
623623
"scheme": "postgres",
624624
"user": "postgres",
625625
},
@@ -643,7 +643,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None:
643643
origin={
644644
"database": "postgres",
645645
"host": "database.example.com",
646-
"port": 0,
646+
"port": 5432,
647647
"scheme": "postgres",
648648
"user": "postgres",
649649
},
@@ -657,7 +657,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None:
657657
origin={
658658
"database": "postgres",
659659
"host": "database.example.com",
660-
"port": 0,
660+
"port": 5432,
661661
"scheme": "postgres",
662662
"user": "postgres",
663663
},
@@ -781,7 +781,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare)
781781
origin={
782782
"database": "postgres",
783783
"host": "database.example.com",
784-
"port": 0,
784+
"port": 5432,
785785
"scheme": "postgres",
786786
"user": "postgres",
787787
},

tests/api_resources/magic_transit/test_sites.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
3737
description="string",
3838
ha_mode=True,
3939
location={
40-
"lat": "string",
41-
"lon": "string",
40+
"lat": "37.6192",
41+
"lon": "122.3816",
4242
},
4343
secondary_connector_id="8d67040d3835dbcf46ce29da440dc482",
4444
)
@@ -99,8 +99,8 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
9999
connector_id="ac60d3d0435248289d446cedd870bcf4",
100100
description="string",
101101
location={
102-
"lat": "string",
103-
"lon": "string",
102+
"lat": "37.6192",
103+
"lon": "122.3816",
104104
},
105105
name="site_1",
106106
secondary_connector_id="8d67040d3835dbcf46ce29da440dc482",
@@ -328,8 +328,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
328328
description="string",
329329
ha_mode=True,
330330
location={
331-
"lat": "string",
332-
"lon": "string",
331+
"lat": "37.6192",
332+
"lon": "122.3816",
333333
},
334334
secondary_connector_id="8d67040d3835dbcf46ce29da440dc482",
335335
)
@@ -390,8 +390,8 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
390390
connector_id="ac60d3d0435248289d446cedd870bcf4",
391391
description="string",
392392
location={
393-
"lat": "string",
394-
"lon": "string",
393+
"lat": "37.6192",
394+
"lon": "122.3816",
395395
},
396396
name="site_1",
397397
secondary_connector_id="8d67040d3835dbcf46ce29da440dc482",

tests/api_resources/page_shield/test_connections.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None:
3737
export="csv",
3838
hosts="blog.cloudflare.com,www.example*,*cloudflare.com",
3939
order_by="first_seen_at",
40-
page="string",
40+
page="2",
4141
page_url="example.com/page,*/checkout,example.com/*,*checkout*",
4242
per_page=100,
4343
prioritize_malicious=True,
@@ -155,7 +155,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare)
155155
export="csv",
156156
hosts="blog.cloudflare.com,www.example*,*cloudflare.com",
157157
order_by="first_seen_at",
158-
page="string",
158+
page="2",
159159
page_url="example.com/page,*/checkout,example.com/*,*checkout*",
160160
per_page=100,
161161
prioritize_malicious=True,

tests/api_resources/page_shield/test_scripts.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None:
3838
export="csv",
3939
hosts="blog.cloudflare.com,www.example*,*cloudflare.com",
4040
order_by="first_seen_at",
41-
page="string",
41+
page="2",
4242
page_url="example.com/page,*/checkout,example.com/*,*checkout*",
4343
per_page=100,
4444
prioritize_malicious=True,
@@ -157,7 +157,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare)
157157
export="csv",
158158
hosts="blog.cloudflare.com,www.example*,*cloudflare.com",
159159
order_by="first_seen_at",
160-
page="string",
160+
page="2",
161161
page_url="example.com/page,*/checkout,example.com/*,*checkout*",
162162
per_page=100,
163163
prioritize_malicious=True,

tests/api_resources/radar/annotations/test_outages.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def test_method_get(self, client: Cloudflare) -> None:
3131
@parametrize
3232
def test_method_get_with_all_params(self, client: Cloudflare) -> None:
3333
outage = client.radar.annotations.outages.get(
34-
asn=0,
34+
asn=174,
3535
date_end=parse_datetime("2023-09-01T11:41:33.782Z"),
3636
date_range="7d",
3737
date_start=parse_datetime("2023-09-01T11:41:33.782Z"),
@@ -118,7 +118,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
118118
@parametrize
119119
async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None:
120120
outage = await async_client.radar.annotations.outages.get(
121-
asn=0,
121+
asn=174,
122122
date_end=parse_datetime("2023-09-01T11:41:33.782Z"),
123123
date_range="7d",
124124
date_start=parse_datetime("2023-09-01T11:41:33.782Z"),

tests/api_resources/radar/bgp/test_routes.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def test_method_stats(self, client: Cloudflare) -> None:
112112
@parametrize
113113
def test_method_stats_with_all_params(self, client: Cloudflare) -> None:
114114
route = client.radar.bgp.routes.stats(
115-
asn=0,
115+
asn=174,
116116
format="JSON",
117117
location="US",
118118
)
@@ -150,7 +150,7 @@ def test_method_timeseries(self, client: Cloudflare) -> None:
150150
@parametrize
151151
def test_method_timeseries_with_all_params(self, client: Cloudflare) -> None:
152152
route = client.radar.bgp.routes.timeseries(
153-
asn=0,
153+
asn=174,
154154
date_end=parse_datetime("2023-09-01T11:41:33.782Z"),
155155
date_range="7d",
156156
date_start=parse_datetime("2023-09-01T11:41:33.782Z"),
@@ -275,7 +275,7 @@ async def test_method_stats(self, async_client: AsyncCloudflare) -> None:
275275
@parametrize
276276
async def test_method_stats_with_all_params(self, async_client: AsyncCloudflare) -> None:
277277
route = await async_client.radar.bgp.routes.stats(
278-
asn=0,
278+
asn=174,
279279
format="JSON",
280280
location="US",
281281
)
@@ -313,7 +313,7 @@ async def test_method_timeseries(self, async_client: AsyncCloudflare) -> None:
313313
@parametrize
314314
async def test_method_timeseries_with_all_params(self, async_client: AsyncCloudflare) -> None:
315315
route = await async_client.radar.bgp.routes.timeseries(
316-
asn=0,
316+
asn=174,
317317
date_end=parse_datetime("2023-09-01T11:41:33.782Z"),
318318
date_range="7d",
319319
date_start=parse_datetime("2023-09-01T11:41:33.782Z"),

tests/api_resources/radar/test_traffic_anomalies.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def test_method_get(self, client: Cloudflare) -> None:
2828
@parametrize
2929
def test_method_get_with_all_params(self, client: Cloudflare) -> None:
3030
traffic_anomaly = client.radar.traffic_anomalies.get(
31-
asn=0,
31+
asn=174,
3232
date_end=parse_datetime("2023-09-01T11:41:33.782Z"),
3333
date_range="7d",
3434
date_start=parse_datetime("2023-09-01T11:41:33.782Z"),
@@ -76,7 +76,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
7676
@parametrize
7777
async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None:
7878
traffic_anomaly = await async_client.radar.traffic_anomalies.get(
79-
asn=0,
79+
asn=174,
8080
date_end=parse_datetime("2023-09-01T11:41:33.782Z"),
8181
date_range="7d",
8282
date_start=parse_datetime("2023-09-01T11:41:33.782Z"),

0 commit comments

Comments
 (0)