Skip to content

Commit fc20862

Browse files
feat(api): api update
1 parent 4db27f6 commit fc20862

File tree

5 files changed

+46
-46
lines changed

5 files changed

+46
-46
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 1752
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ae6ffcbcc0856b0712d948732796e69c83954b184b053cd143d3ca2e4b1ce0da.yml
3-
openapi_spec_hash: cce02f17f85e5baa523a036fe2a044cd
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-79b67999c1748cd1df9ce78542f18e9b09c8c4cd3aafe5f194633754c74efda3.yml
3+
openapi_spec_hash: a9a2aa58b9449dd64c6a291cbe9981cc
44
config_hash: 284c4178d08f75d8c8b29f275948a8fd

src/cloudflare/types/shared/token_policy.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
from typing import Dict, List, Union, Optional
3+
from typing import Dict, List, Optional
44
from typing_extensions import Literal
55

66
from ..._models import BaseModel
@@ -35,5 +35,5 @@ class TokenPolicy(BaseModel):
3535
permission_groups: List[PermissionGroup]
3636
"""A set of permission groups that are specified to the policy."""
3737

38-
resources: Dict[str, Union[str, Dict[str, str]]]
38+
resources: Dict[str, Dict[str, str]]
3939
"""A list of resource names that the policy applies to."""

src/cloudflare/types/shared_params/token_policy.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from typing import Dict, Union, Iterable
5+
from typing import Dict, Iterable
66
from typing_extensions import Literal, Required, TypedDict
77

88
__all__ = ["TokenPolicy", "PermissionGroup", "PermissionGroupMeta"]
@@ -29,5 +29,5 @@ class TokenPolicy(TypedDict, total=False):
2929
permission_groups: Required[Iterable[PermissionGroup]]
3030
"""A set of permission groups that are specified to the policy."""
3131

32-
resources: Required[Dict[str, Union[str, Dict[str, str]]]]
32+
resources: Required[Dict[str, Dict[str, str]]]
3333
"""A list of resource names that the policy applies to."""

tests/api_resources/accounts/test_tokens.py

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def test_method_create(self, client: Cloudflare) -> None:
3737
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
3838
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
3939
],
40-
"resources": {"foo": "string"},
40+
"resources": {"foo": {"foo": "string"}},
4141
}
4242
],
4343
)
@@ -68,7 +68,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
6868
},
6969
},
7070
],
71-
"resources": {"foo": "string"},
71+
"resources": {"foo": {"foo": "string"}},
7272
}
7373
],
7474
condition={
@@ -95,7 +95,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None:
9595
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
9696
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
9797
],
98-
"resources": {"foo": "string"},
98+
"resources": {"foo": {"foo": "string"}},
9999
}
100100
],
101101
)
@@ -118,7 +118,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
118118
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
119119
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
120120
],
121-
"resources": {"foo": "string"},
121+
"resources": {"foo": {"foo": "string"}},
122122
}
123123
],
124124
) as response:
@@ -144,7 +144,7 @@ def test_path_params_create(self, client: Cloudflare) -> None:
144144
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
145145
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
146146
],
147-
"resources": {"foo": "string"},
147+
"resources": {"foo": {"foo": "string"}},
148148
}
149149
],
150150
)
@@ -163,7 +163,7 @@ def test_method_update(self, client: Cloudflare) -> None:
163163
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
164164
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
165165
],
166-
"resources": {"foo": "string"},
166+
"resources": {"foo": {"foo": "string"}},
167167
}
168168
],
169169
)
@@ -195,7 +195,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
195195
},
196196
},
197197
],
198-
"resources": {"foo": "string"},
198+
"resources": {"foo": {"foo": "string"}},
199199
}
200200
],
201201
condition={
@@ -224,7 +224,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None:
224224
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
225225
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
226226
],
227-
"resources": {"foo": "string"},
227+
"resources": {"foo": {"foo": "string"}},
228228
}
229229
],
230230
)
@@ -248,7 +248,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None:
248248
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
249249
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
250250
],
251-
"resources": {"foo": "string"},
251+
"resources": {"foo": {"foo": "string"}},
252252
}
253253
],
254254
) as response:
@@ -275,7 +275,7 @@ def test_path_params_update(self, client: Cloudflare) -> None:
275275
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
276276
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
277277
],
278-
"resources": {"foo": "string"},
278+
"resources": {"foo": {"foo": "string"}},
279279
}
280280
],
281281
)
@@ -292,7 +292,7 @@ def test_path_params_update(self, client: Cloudflare) -> None:
292292
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
293293
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
294294
],
295-
"resources": {"foo": "string"},
295+
"resources": {"foo": {"foo": "string"}},
296296
}
297297
],
298298
)
@@ -515,7 +515,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
515515
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
516516
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
517517
],
518-
"resources": {"foo": "string"},
518+
"resources": {"foo": {"foo": "string"}},
519519
}
520520
],
521521
)
@@ -546,7 +546,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
546546
},
547547
},
548548
],
549-
"resources": {"foo": "string"},
549+
"resources": {"foo": {"foo": "string"}},
550550
}
551551
],
552552
condition={
@@ -573,7 +573,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
573573
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
574574
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
575575
],
576-
"resources": {"foo": "string"},
576+
"resources": {"foo": {"foo": "string"}},
577577
}
578578
],
579579
)
@@ -596,7 +596,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) ->
596596
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
597597
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
598598
],
599-
"resources": {"foo": "string"},
599+
"resources": {"foo": {"foo": "string"}},
600600
}
601601
],
602602
) as response:
@@ -622,7 +622,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None:
622622
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
623623
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
624624
],
625-
"resources": {"foo": "string"},
625+
"resources": {"foo": {"foo": "string"}},
626626
}
627627
],
628628
)
@@ -641,7 +641,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None:
641641
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
642642
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
643643
],
644-
"resources": {"foo": "string"},
644+
"resources": {"foo": {"foo": "string"}},
645645
}
646646
],
647647
)
@@ -673,7 +673,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
673673
},
674674
},
675675
],
676-
"resources": {"foo": "string"},
676+
"resources": {"foo": {"foo": "string"}},
677677
}
678678
],
679679
condition={
@@ -702,7 +702,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
702702
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
703703
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
704704
],
705-
"resources": {"foo": "string"},
705+
"resources": {"foo": {"foo": "string"}},
706706
}
707707
],
708708
)
@@ -726,7 +726,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) ->
726726
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
727727
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
728728
],
729-
"resources": {"foo": "string"},
729+
"resources": {"foo": {"foo": "string"}},
730730
}
731731
],
732732
) as response:
@@ -753,7 +753,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None:
753753
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
754754
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
755755
],
756-
"resources": {"foo": "string"},
756+
"resources": {"foo": {"foo": "string"}},
757757
}
758758
],
759759
)
@@ -770,7 +770,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None:
770770
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
771771
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
772772
],
773-
"resources": {"foo": "string"},
773+
"resources": {"foo": {"foo": "string"}},
774774
}
775775
],
776776
)

tests/api_resources/user/test_tokens.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def test_method_create(self, client: Cloudflare) -> None:
3636
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
3737
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
3838
],
39-
"resources": {"foo": "string"},
39+
"resources": {"foo": {"foo": "string"}},
4040
}
4141
],
4242
)
@@ -66,7 +66,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
6666
},
6767
},
6868
],
69-
"resources": {"foo": "string"},
69+
"resources": {"foo": {"foo": "string"}},
7070
}
7171
],
7272
condition={
@@ -92,7 +92,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None:
9292
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
9393
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
9494
],
95-
"resources": {"foo": "string"},
95+
"resources": {"foo": {"foo": "string"}},
9696
}
9797
],
9898
)
@@ -114,7 +114,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
114114
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
115115
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
116116
],
117-
"resources": {"foo": "string"},
117+
"resources": {"foo": {"foo": "string"}},
118118
}
119119
],
120120
) as response:
@@ -139,7 +139,7 @@ def test_method_update(self, client: Cloudflare) -> None:
139139
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
140140
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
141141
],
142-
"resources": {"foo": "string"},
142+
"resources": {"foo": {"foo": "string"}},
143143
}
144144
],
145145
)
@@ -170,7 +170,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
170170
},
171171
},
172172
],
173-
"resources": {"foo": "string"},
173+
"resources": {"foo": {"foo": "string"}},
174174
}
175175
],
176176
condition={
@@ -198,7 +198,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None:
198198
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
199199
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
200200
],
201-
"resources": {"foo": "string"},
201+
"resources": {"foo": {"foo": "string"}},
202202
}
203203
],
204204
)
@@ -221,7 +221,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None:
221221
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
222222
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
223223
],
224-
"resources": {"foo": "string"},
224+
"resources": {"foo": {"foo": "string"}},
225225
}
226226
],
227227
) as response:
@@ -247,7 +247,7 @@ def test_path_params_update(self, client: Cloudflare) -> None:
247247
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
248248
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
249249
],
250-
"resources": {"foo": "string"},
250+
"resources": {"foo": {"foo": "string"}},
251251
}
252252
],
253253
)
@@ -420,7 +420,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
420420
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
421421
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
422422
],
423-
"resources": {"foo": "string"},
423+
"resources": {"foo": {"foo": "string"}},
424424
}
425425
],
426426
)
@@ -450,7 +450,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
450450
},
451451
},
452452
],
453-
"resources": {"foo": "string"},
453+
"resources": {"foo": {"foo": "string"}},
454454
}
455455
],
456456
condition={
@@ -476,7 +476,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
476476
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
477477
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
478478
],
479-
"resources": {"foo": "string"},
479+
"resources": {"foo": {"foo": "string"}},
480480
}
481481
],
482482
)
@@ -498,7 +498,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) ->
498498
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
499499
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
500500
],
501-
"resources": {"foo": "string"},
501+
"resources": {"foo": {"foo": "string"}},
502502
}
503503
],
504504
) as response:
@@ -523,7 +523,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None:
523523
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
524524
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
525525
],
526-
"resources": {"foo": "string"},
526+
"resources": {"foo": {"foo": "string"}},
527527
}
528528
],
529529
)
@@ -554,7 +554,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
554554
},
555555
},
556556
],
557-
"resources": {"foo": "string"},
557+
"resources": {"foo": {"foo": "string"}},
558558
}
559559
],
560560
condition={
@@ -582,7 +582,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
582582
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
583583
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
584584
],
585-
"resources": {"foo": "string"},
585+
"resources": {"foo": {"foo": "string"}},
586586
}
587587
],
588588
)
@@ -605,7 +605,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) ->
605605
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
606606
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
607607
],
608-
"resources": {"foo": "string"},
608+
"resources": {"foo": {"foo": "string"}},
609609
}
610610
],
611611
) as response:
@@ -631,7 +631,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None:
631631
{"id": "c8fed203ed3043cba015a93ad1616f1f"},
632632
{"id": "82e64a83756745bbbb1c9c2701bf816b"},
633633
],
634-
"resources": {"foo": "string"},
634+
"resources": {"foo": {"foo": "string"}},
635635
}
636636
],
637637
)

0 commit comments

Comments
 (0)