Skip to content

Commit 03a296d

Browse files
author
stlc-bot
committed
fix(openapi): keep legacy batch inputs in the spec as deprecated (#2225)
feat(access-policies): limit which websites API requests can reach (#2213) feat(brand): support log-free brand and styleguide requests (#2231) Stainless-Generated-From: 4fe47e3adb2de5bc38669a12b7e98bff6bac1785
1 parent e1fc5b0 commit 03a296d

5 files changed

Lines changed: 127 additions & 6 deletions

File tree

‎src/context/dev/resources/brand.py‎

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ def retrieve(
181181
policies: SequenceNotStr[str] | Omit = omit,
182182
tags: SequenceNotStr[str] | Omit = omit,
183183
timeout_opts: brand_retrieve_params.BrandRetrieveByDomainRequestTimeoutOpts | Omit = omit,
184+
zdr: Literal["enabled", "disabled"] | Omit = omit,
184185
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
185186
# The extra values given here take precedence over values defined on the client or passed to this method.
186187
extra_headers: Headers | None = None,
@@ -210,6 +211,10 @@ def retrieve(
210211
211212
timeout_opts: Request deadline and what to return when it passes.
212213
214+
zdr: `enabled` disables request logs, usage logs, and traces. Brand data and hosted
215+
assets may still be stored. Returns 403 `ZDR_NOT_ENABLED` unless your
216+
organization has ZDR.
217+
213218
extra_headers: Send extra headers
214219
215220
extra_query: Add additional query parameters to the request
@@ -598,6 +603,7 @@ def retrieve(
598603
policies: SequenceNotStr[str] | Omit = omit,
599604
tags: SequenceNotStr[str] | Omit = omit,
600605
timeout_opts: brand_retrieve_params.BrandRetrieveByNameRequestTimeoutOpts | Omit = omit,
606+
zdr: Literal["enabled", "disabled"] | Omit = omit,
601607
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
602608
# The extra values given here take precedence over values defined on the client or passed to this method.
603609
extra_headers: Headers | None = None,
@@ -630,6 +636,10 @@ def retrieve(
630636
631637
timeout_opts: Request deadline and what to return when it passes.
632638
639+
zdr: `enabled` disables request logs, usage logs, and traces. Brand data and hosted
640+
assets may still be stored. Returns 403 `ZDR_NOT_ENABLED` unless your
641+
organization has ZDR.
642+
633643
extra_headers: Send extra headers
634644
635645
extra_query: Add additional query parameters to the request
@@ -776,6 +786,7 @@ def retrieve(
776786
policies: SequenceNotStr[str] | Omit = omit,
777787
tags: SequenceNotStr[str] | Omit = omit,
778788
timeout_opts: brand_retrieve_params.BrandRetrieveByEmailRequestTimeoutOpts | Omit = omit,
789+
zdr: Literal["enabled", "disabled"] | Omit = omit,
779790
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
780791
# The extra values given here take precedence over values defined on the client or passed to this method.
781792
extra_headers: Headers | None = None,
@@ -805,6 +816,10 @@ def retrieve(
805816
806817
timeout_opts: Request deadline and what to return when it passes.
807818
819+
zdr: `enabled` disables request logs, usage logs, and traces. Brand data and hosted
820+
assets may still be stored. Returns 403 `ZDR_NOT_ENABLED` unless your
821+
organization has ZDR.
822+
808823
extra_headers: Send extra headers
809824
810825
extra_query: Add additional query parameters to the request
@@ -1026,6 +1041,7 @@ def retrieve(
10261041
]
10271042
| Omit = omit,
10281043
timeout_opts: brand_retrieve_params.BrandRetrieveByTickerRequestTimeoutOpts | Omit = omit,
1044+
zdr: Literal["enabled", "disabled"] | Omit = omit,
10291045
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
10301046
# The extra values given here take precedence over values defined on the client or passed to this method.
10311047
extra_headers: Headers | None = None,
@@ -1057,6 +1073,10 @@ def retrieve(
10571073
10581074
timeout_opts: Request deadline and what to return when it passes.
10591075
1076+
zdr: `enabled` disables request logs, usage logs, and traces. Brand data and hosted
1077+
assets may still be stored. Returns 403 `ZDR_NOT_ENABLED` unless your
1078+
organization has ZDR.
1079+
10601080
extra_headers: Send extra headers
10611081
10621082
extra_query: Add additional query parameters to the request
@@ -1076,6 +1096,7 @@ def retrieve(
10761096
policies: SequenceNotStr[str] | Omit = omit,
10771097
tags: SequenceNotStr[str] | Omit = omit,
10781098
timeout_opts: brand_retrieve_params.BrandRetrieveByDirectURLRequestTimeoutOpts | Omit = omit,
1099+
zdr: Literal["enabled", "disabled"] | Omit = omit,
10791100
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
10801101
# The extra values given here take precedence over values defined on the client or passed to this method.
10811102
extra_headers: Headers | None = None,
@@ -1100,6 +1121,10 @@ def retrieve(
11001121
11011122
timeout_opts: Request deadline and what to return when it passes.
11021123
1124+
zdr: `enabled` disables request logs, usage logs, and traces. Brand data and hosted
1125+
assets may still be stored. Returns 403 `ZDR_NOT_ENABLED` unless your
1126+
organization has ZDR.
1127+
11031128
extra_headers: Send extra headers
11041129
11051130
extra_query: Add additional query parameters to the request
@@ -1491,6 +1516,7 @@ def retrieve(
14911516
policies: SequenceNotStr[str] | Omit = omit,
14921517
tags: SequenceNotStr[str] | Omit = omit,
14931518
timeout_opts: brand_retrieve_params.BrandRetrieveFromTransactionRequestTimeoutOpts | Omit = omit,
1519+
zdr: Literal["enabled", "disabled"] | Omit = omit,
14941520
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
14951521
# The extra values given here take precedence over values defined on the client or passed to this method.
14961522
extra_headers: Headers | None = None,
@@ -1530,6 +1556,10 @@ def retrieve(
15301556
15311557
timeout_opts: Request deadline and what to return when it passes.
15321558
1559+
zdr: `enabled` disables request logs, usage logs, and traces. Brand data and hosted
1560+
assets may still be stored. Returns 403 `ZDR_NOT_ENABLED` unless your
1561+
organization has ZDR.
1562+
15331563
extra_headers: Send extra headers
15341564
15351565
extra_query: Add additional query parameters to the request
@@ -1694,6 +1724,7 @@ def retrieve(
16941724
| brand_retrieve_params.BrandRetrieveByDirectURLRequestTimeoutOpts
16951725
| brand_retrieve_params.BrandRetrieveFromTransactionRequestTimeoutOpts
16961726
| Omit = omit,
1727+
zdr: Literal["enabled", "disabled"] | Omit = omit,
16971728
name: str | Omit = omit,
16981729
country_gl: Literal[
16991730
"af",
@@ -2039,6 +2070,7 @@ def retrieve(
20392070
"policies": policies,
20402071
"tags": tags,
20412072
"timeout_opts": timeout_opts,
2073+
"zdr": zdr,
20422074
"name": name,
20432075
"country_gl": country_gl,
20442076
"email": email,
@@ -2664,6 +2696,7 @@ async def retrieve(
26642696
policies: SequenceNotStr[str] | Omit = omit,
26652697
tags: SequenceNotStr[str] | Omit = omit,
26662698
timeout_opts: brand_retrieve_params.BrandRetrieveByDomainRequestTimeoutOpts | Omit = omit,
2699+
zdr: Literal["enabled", "disabled"] | Omit = omit,
26672700
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
26682701
# The extra values given here take precedence over values defined on the client or passed to this method.
26692702
extra_headers: Headers | None = None,
@@ -2693,6 +2726,10 @@ async def retrieve(
26932726
26942727
timeout_opts: Request deadline and what to return when it passes.
26952728
2729+
zdr: `enabled` disables request logs, usage logs, and traces. Brand data and hosted
2730+
assets may still be stored. Returns 403 `ZDR_NOT_ENABLED` unless your
2731+
organization has ZDR.
2732+
26962733
extra_headers: Send extra headers
26972734
26982735
extra_query: Add additional query parameters to the request
@@ -3081,6 +3118,7 @@ async def retrieve(
30813118
policies: SequenceNotStr[str] | Omit = omit,
30823119
tags: SequenceNotStr[str] | Omit = omit,
30833120
timeout_opts: brand_retrieve_params.BrandRetrieveByNameRequestTimeoutOpts | Omit = omit,
3121+
zdr: Literal["enabled", "disabled"] | Omit = omit,
30843122
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
30853123
# The extra values given here take precedence over values defined on the client or passed to this method.
30863124
extra_headers: Headers | None = None,
@@ -3113,6 +3151,10 @@ async def retrieve(
31133151
31143152
timeout_opts: Request deadline and what to return when it passes.
31153153
3154+
zdr: `enabled` disables request logs, usage logs, and traces. Brand data and hosted
3155+
assets may still be stored. Returns 403 `ZDR_NOT_ENABLED` unless your
3156+
organization has ZDR.
3157+
31163158
extra_headers: Send extra headers
31173159
31183160
extra_query: Add additional query parameters to the request
@@ -3259,6 +3301,7 @@ async def retrieve(
32593301
policies: SequenceNotStr[str] | Omit = omit,
32603302
tags: SequenceNotStr[str] | Omit = omit,
32613303
timeout_opts: brand_retrieve_params.BrandRetrieveByEmailRequestTimeoutOpts | Omit = omit,
3304+
zdr: Literal["enabled", "disabled"] | Omit = omit,
32623305
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
32633306
# The extra values given here take precedence over values defined on the client or passed to this method.
32643307
extra_headers: Headers | None = None,
@@ -3288,6 +3331,10 @@ async def retrieve(
32883331
32893332
timeout_opts: Request deadline and what to return when it passes.
32903333
3334+
zdr: `enabled` disables request logs, usage logs, and traces. Brand data and hosted
3335+
assets may still be stored. Returns 403 `ZDR_NOT_ENABLED` unless your
3336+
organization has ZDR.
3337+
32913338
extra_headers: Send extra headers
32923339
32933340
extra_query: Add additional query parameters to the request
@@ -3509,6 +3556,7 @@ async def retrieve(
35093556
]
35103557
| Omit = omit,
35113558
timeout_opts: brand_retrieve_params.BrandRetrieveByTickerRequestTimeoutOpts | Omit = omit,
3559+
zdr: Literal["enabled", "disabled"] | Omit = omit,
35123560
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
35133561
# The extra values given here take precedence over values defined on the client or passed to this method.
35143562
extra_headers: Headers | None = None,
@@ -3540,6 +3588,10 @@ async def retrieve(
35403588
35413589
timeout_opts: Request deadline and what to return when it passes.
35423590
3591+
zdr: `enabled` disables request logs, usage logs, and traces. Brand data and hosted
3592+
assets may still be stored. Returns 403 `ZDR_NOT_ENABLED` unless your
3593+
organization has ZDR.
3594+
35433595
extra_headers: Send extra headers
35443596
35453597
extra_query: Add additional query parameters to the request
@@ -3559,6 +3611,7 @@ async def retrieve(
35593611
policies: SequenceNotStr[str] | Omit = omit,
35603612
tags: SequenceNotStr[str] | Omit = omit,
35613613
timeout_opts: brand_retrieve_params.BrandRetrieveByDirectURLRequestTimeoutOpts | Omit = omit,
3614+
zdr: Literal["enabled", "disabled"] | Omit = omit,
35623615
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
35633616
# The extra values given here take precedence over values defined on the client or passed to this method.
35643617
extra_headers: Headers | None = None,
@@ -3583,6 +3636,10 @@ async def retrieve(
35833636
35843637
timeout_opts: Request deadline and what to return when it passes.
35853638
3639+
zdr: `enabled` disables request logs, usage logs, and traces. Brand data and hosted
3640+
assets may still be stored. Returns 403 `ZDR_NOT_ENABLED` unless your
3641+
organization has ZDR.
3642+
35863643
extra_headers: Send extra headers
35873644
35883645
extra_query: Add additional query parameters to the request
@@ -3974,6 +4031,7 @@ async def retrieve(
39744031
policies: SequenceNotStr[str] | Omit = omit,
39754032
tags: SequenceNotStr[str] | Omit = omit,
39764033
timeout_opts: brand_retrieve_params.BrandRetrieveFromTransactionRequestTimeoutOpts | Omit = omit,
4034+
zdr: Literal["enabled", "disabled"] | Omit = omit,
39774035
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
39784036
# The extra values given here take precedence over values defined on the client or passed to this method.
39794037
extra_headers: Headers | None = None,
@@ -4013,6 +4071,10 @@ async def retrieve(
40134071
40144072
timeout_opts: Request deadline and what to return when it passes.
40154073
4074+
zdr: `enabled` disables request logs, usage logs, and traces. Brand data and hosted
4075+
assets may still be stored. Returns 403 `ZDR_NOT_ENABLED` unless your
4076+
organization has ZDR.
4077+
40164078
extra_headers: Send extra headers
40174079
40184080
extra_query: Add additional query parameters to the request
@@ -4177,6 +4239,7 @@ async def retrieve(
41774239
| brand_retrieve_params.BrandRetrieveByDirectURLRequestTimeoutOpts
41784240
| brand_retrieve_params.BrandRetrieveFromTransactionRequestTimeoutOpts
41794241
| Omit = omit,
4242+
zdr: Literal["enabled", "disabled"] | Omit = omit,
41804243
name: str | Omit = omit,
41814244
country_gl: Literal[
41824245
"af",
@@ -4522,6 +4585,7 @@ async def retrieve(
45224585
"policies": policies,
45234586
"tags": tags,
45244587
"timeout_opts": timeout_opts,
4588+
"zdr": zdr,
45254589
"name": name,
45264590
"country_gl": country_gl,
45274591
"email": email,

‎src/context/dev/resources/web.py‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,9 @@ def extract_styleguide(
230230
231231
timeout_opts: Request deadline and what to return when it passes.
232232
233-
zdr: `enabled` turns on zero data retention. Returns 403 `ZDR_NOT_ENABLED` unless
234-
your organization has ZDR.
233+
zdr: `enabled` disables request logs, usage logs, and traces. Brand data and hosted
234+
assets may still be stored. Returns 403 `ZDR_NOT_ENABLED` unless your
235+
organization has ZDR.
235236
236237
extra_headers: Send extra headers
237238
@@ -1768,8 +1769,9 @@ async def extract_styleguide(
17681769
17691770
timeout_opts: Request deadline and what to return when it passes.
17701771
1771-
zdr: `enabled` turns on zero data retention. Returns 403 `ZDR_NOT_ENABLED` unless
1772-
your organization has ZDR.
1772+
zdr: `enabled` disables request logs, usage logs, and traces. Brand data and hosted
1773+
assets may still be stored. Returns 403 `ZDR_NOT_ENABLED` unless your
1774+
organization has ZDR.
17731775
17741776
extra_headers: Send extra headers
17751777

‎src/context/dev/types/brand_retrieve_params.py‎

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,13 @@ class BrandRetrieveByDomainRequest(TypedDict, total=False):
179179
timeout_opts: Annotated[BrandRetrieveByDomainRequestTimeoutOpts, PropertyInfo(alias="timeoutOpts")]
180180
"""Request deadline and what to return when it passes."""
181181

182+
zdr: Literal["enabled", "disabled"]
183+
"""`enabled` disables request logs, usage logs, and traces.
184+
185+
Brand data and hosted assets may still be stored. Returns 403 `ZDR_NOT_ENABLED`
186+
unless your organization has ZDR.
187+
"""
188+
182189

183190
class BrandRetrieveByDomainRequestTimeoutOpts(TypedDict, total=False):
184191
"""Request deadline and what to return when it passes."""
@@ -593,6 +600,13 @@ class BrandRetrieveByNameRequest(TypedDict, total=False):
593600
timeout_opts: Annotated[BrandRetrieveByNameRequestTimeoutOpts, PropertyInfo(alias="timeoutOpts")]
594601
"""Request deadline and what to return when it passes."""
595602

603+
zdr: Literal["enabled", "disabled"]
604+
"""`enabled` disables request logs, usage logs, and traces.
605+
606+
Brand data and hosted assets may still be stored. Returns 403 `ZDR_NOT_ENABLED`
607+
unless your organization has ZDR.
608+
"""
609+
596610

597611
class BrandRetrieveByNameRequestTimeoutOpts(TypedDict, total=False):
598612
"""Request deadline and what to return when it passes."""
@@ -761,6 +775,13 @@ class BrandRetrieveByEmailRequest(TypedDict, total=False):
761775
timeout_opts: Annotated[BrandRetrieveByEmailRequestTimeoutOpts, PropertyInfo(alias="timeoutOpts")]
762776
"""Request deadline and what to return when it passes."""
763777

778+
zdr: Literal["enabled", "disabled"]
779+
"""`enabled` disables request logs, usage logs, and traces.
780+
781+
Brand data and hosted assets may still be stored. Returns 403 `ZDR_NOT_ENABLED`
782+
unless your organization has ZDR.
783+
"""
784+
764785

765786
class BrandRetrieveByEmailRequestTimeoutOpts(TypedDict, total=False):
766787
"""Request deadline and what to return when it passes."""
@@ -1005,6 +1026,13 @@ class BrandRetrieveByTickerRequest(TypedDict, total=False):
10051026
timeout_opts: Annotated[BrandRetrieveByTickerRequestTimeoutOpts, PropertyInfo(alias="timeoutOpts")]
10061027
"""Request deadline and what to return when it passes."""
10071028

1029+
zdr: Literal["enabled", "disabled"]
1030+
"""`enabled` disables request logs, usage logs, and traces.
1031+
1032+
Brand data and hosted assets may still be stored. Returns 403 `ZDR_NOT_ENABLED`
1033+
unless your organization has ZDR.
1034+
"""
1035+
10081036

10091037
class BrandRetrieveByTickerRequestTimeoutOpts(TypedDict, total=False):
10101038
"""Request deadline and what to return when it passes."""
@@ -1039,6 +1067,13 @@ class BrandRetrieveByDirectURLRequest(TypedDict, total=False):
10391067
timeout_opts: Annotated[BrandRetrieveByDirectURLRequestTimeoutOpts, PropertyInfo(alias="timeoutOpts")]
10401068
"""Request deadline and what to return when it passes."""
10411069

1070+
zdr: Literal["enabled", "disabled"]
1071+
"""`enabled` disables request logs, usage logs, and traces.
1072+
1073+
Brand data and hosted assets may still be stored. Returns 403 `ZDR_NOT_ENABLED`
1074+
unless your organization has ZDR.
1075+
"""
1076+
10421077

10431078
class BrandRetrieveByDirectURLRequestTimeoutOpts(TypedDict, total=False):
10441079
"""Request deadline and what to return when it passes."""
@@ -1465,6 +1500,13 @@ class BrandRetrieveFromTransactionRequest(TypedDict, total=False):
14651500
timeout_opts: Annotated[BrandRetrieveFromTransactionRequestTimeoutOpts, PropertyInfo(alias="timeoutOpts")]
14661501
"""Request deadline and what to return when it passes."""
14671502

1503+
zdr: Literal["enabled", "disabled"]
1504+
"""`enabled` disables request logs, usage logs, and traces.
1505+
1506+
Brand data and hosted assets may still be stored. Returns 403 `ZDR_NOT_ENABLED`
1507+
unless your organization has ZDR.
1508+
"""
1509+
14681510

14691511
class BrandRetrieveFromTransactionRequestTimeoutOpts(TypedDict, total=False):
14701512
"""Request deadline and what to return when it passes."""

‎src/context/dev/types/web_extract_styleguide_params.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,10 @@ class WebExtractStyleguideParams(TypedDict, total=False):
4444
"""Request deadline and what to return when it passes."""
4545

4646
zdr: Literal["enabled", "disabled"]
47-
"""`enabled` turns on zero data retention.
47+
"""`enabled` disables request logs, usage logs, and traces.
4848
49-
Returns 403 `ZDR_NOT_ENABLED` unless your organization has ZDR.
49+
Brand data and hosted assets may still be stored. Returns 403 `ZDR_NOT_ENABLED`
50+
unless your organization has ZDR.
5051
"""
5152

5253

0 commit comments

Comments
 (0)