Skip to content

Commit 8b485b3

Browse files
author
stlc-bot
committed
feat(webhooks): simplify delivery APIs
Stainless-Generated-From: 7121f4a
1 parent 3b219e5 commit 8b485b3

73 files changed

Lines changed: 777 additions & 706 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎api.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ Types:
183183
from context.dev.types.webhooks import (
184184
Attempt,
185185
Delivery,
186+
DeliverySummary,
186187
DeliveryRetrieveResponse,
187188
DeliveryListResponse,
188189
DeliveryListAttemptsResponse,
@@ -193,7 +194,7 @@ from context.dev.types.webhooks import (
193194
Methods:
194195

195196
- <code title="get /webhooks/deliveries/{delivery_id}">client.webhooks.deliveries.<a href="./src/context/dev/resources/webhooks/deliveries.py">retrieve</a>(delivery_id, \*\*<a href="src/context/dev/types/webhooks/delivery_retrieve_params.py">params</a>) -> <a href="./src/context/dev/types/webhooks/delivery_retrieve_response.py">DeliveryRetrieveResponse</a></code>
196-
- <code title="get /webhooks/deliveries">client.webhooks.deliveries.<a href="./src/context/dev/resources/webhooks/deliveries.py">list</a>(\*\*<a href="src/context/dev/types/webhooks/delivery_list_params.py">params</a>) -> <a href="./src/context/dev/types/webhooks/delivery_list_response.py">DeliveryListResponse</a></code>
197+
- <code title="post /webhooks/deliveries">client.webhooks.deliveries.<a href="./src/context/dev/resources/webhooks/deliveries.py">list</a>(\*\*<a href="src/context/dev/types/webhooks/delivery_list_params.py">params</a>) -> <a href="./src/context/dev/types/webhooks/delivery_list_response.py">DeliveryListResponse</a></code>
197198
- <code title="get /webhooks/deliveries/{delivery_id}/attempts">client.webhooks.deliveries.<a href="./src/context/dev/resources/webhooks/deliveries.py">list_attempts</a>(delivery_id, \*\*<a href="src/context/dev/types/webhooks/delivery_list_attempts_params.py">params</a>) -> <a href="./src/context/dev/types/webhooks/delivery_list_attempts_response.py">DeliveryListAttemptsResponse</a></code>
198199
- <code title="post /webhooks/deliveries/{delivery_id}/retry">client.webhooks.deliveries.<a href="./src/context/dev/resources/webhooks/deliveries.py">retry</a>(delivery_id, \*\*<a href="src/context/dev/types/webhooks/delivery_retry_params.py">params</a>) -> <a href="./src/context/dev/types/webhooks/delivery_retry_response.py">DeliveryRetryResponse</a></code>
199200

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

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1235,9 +1235,8 @@ def retrieve_simplified(
12351235
are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1
12361236
year.
12371237
1238-
tags: Optional comma-separated caller-defined tags for tracking this request. Tags are
1239-
recorded on the request's usage log and can be used to filter usage on the
1240-
dashboard usage page. Up to 20 tags, each 1-50 characters.
1238+
tags: Comma-separated tags for tracking request usage. Up to 20 tags, each 1-50
1239+
characters.
12411240
12421241
theme: Optional theme preference used when selecting brand assets.
12431242
@@ -1302,9 +1301,8 @@ def search(
13021301
query_by: Fields to match the search term against, as a comma-separated list or repeated
13031302
parameter: 'name', 'domain', or both. Defaults to both.
13041303
1305-
tags: Optional comma-separated caller-defined tags for tracking this request. Tags are
1306-
recorded on the request's usage log and can be used to filter usage on the
1307-
dashboard usage page. Up to 20 tags, each 1-50 characters.
1304+
tags: Comma-separated tags for tracking request usage. Up to 20 tags, each 1-50
1305+
characters.
13081306
13091307
typo_tolerance: Maximum number of typos tolerated when matching, from 0 to 2. Defaults to 0 (no
13101308
typo tolerance).
@@ -2548,9 +2546,8 @@ async def retrieve_simplified(
25482546
are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1
25492547
year.
25502548
2551-
tags: Optional comma-separated caller-defined tags for tracking this request. Tags are
2552-
recorded on the request's usage log and can be used to filter usage on the
2553-
dashboard usage page. Up to 20 tags, each 1-50 characters.
2549+
tags: Comma-separated tags for tracking request usage. Up to 20 tags, each 1-50
2550+
characters.
25542551
25552552
theme: Optional theme preference used when selecting brand assets.
25562553
@@ -2615,9 +2612,8 @@ async def search(
26152612
query_by: Fields to match the search term against, as a comma-separated list or repeated
26162613
parameter: 'name', 'domain', or both. Defaults to both.
26172614
2618-
tags: Optional comma-separated caller-defined tags for tracking this request. Tags are
2619-
recorded on the request's usage log and can be used to filter usage on the
2620-
dashboard usage page. Up to 20 tags, each 1-50 characters.
2615+
tags: Comma-separated tags for tracking request usage. Up to 20 tags, each 1-50
2616+
characters.
26212617
26222618
typo_tolerance: Maximum number of typos tolerated when matching, from 0 to 2. Defaults to 0 (no
26232619
typo tolerance).

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

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,8 @@ def retrieve_naics(
7272
7373
min_results: Minimum number of NAICS codes to return. Must be at least 1. Defaults to 1.
7474
75-
tags: Optional comma-separated caller-defined tags for tracking this request. Tags are
76-
recorded on the request's usage log and can be used to filter usage on the
77-
dashboard usage page. Up to 20 tags, each 1-50 characters.
75+
tags: Comma-separated tags for tracking request usage. Up to 20 tags, each 1-50
76+
characters.
7877
7978
timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
8079
than this value, it will be aborted with a 408 status code. Maximum allowed
@@ -139,9 +138,8 @@ def retrieve_sic(
139138
140139
min_results: Minimum number of SIC codes to return. Must be at least 1. Defaults to 1.
141140
142-
tags: Optional comma-separated caller-defined tags for tracking this request. Tags are
143-
recorded on the request's usage log and can be used to filter usage on the
144-
dashboard usage page. Up to 20 tags, each 1-50 characters.
141+
tags: Comma-separated tags for tracking request usage. Up to 20 tags, each 1-50
142+
characters.
145143
146144
timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
147145
than this value, it will be aborted with a 408 status code. Maximum allowed
@@ -230,9 +228,8 @@ async def retrieve_naics(
230228
231229
min_results: Minimum number of NAICS codes to return. Must be at least 1. Defaults to 1.
232230
233-
tags: Optional comma-separated caller-defined tags for tracking this request. Tags are
234-
recorded on the request's usage log and can be used to filter usage on the
235-
dashboard usage page. Up to 20 tags, each 1-50 characters.
231+
tags: Comma-separated tags for tracking request usage. Up to 20 tags, each 1-50
232+
characters.
236233
237234
timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
238235
than this value, it will be aborted with a 408 status code. Maximum allowed
@@ -297,9 +294,8 @@ async def retrieve_sic(
297294
298295
min_results: Minimum number of SIC codes to return. Must be at least 1. Defaults to 1.
299296
300-
tags: Optional comma-separated caller-defined tags for tracking this request. Tags are
301-
recorded on the request's usage log and can be used to filter usage on the
302-
dashboard usage page. Up to 20 tags, each 1-50 characters.
297+
tags: Comma-separated tags for tracking request usage. Up to 20 tags, each 1-50
298+
characters.
303299
304300
timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
305301
than this value, it will be aborted with a 408 status code. Maximum allowed

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,8 @@ def handle(
174174
175175
shorten_base64_images: Shorten base64-encoded image data in the Markdown output
176176
177-
tags: Optional comma-separated caller-defined tags for tracking this request. Tags are
178-
recorded on the request's usage log and can be used to filter usage on the
179-
dashboard usage page. Up to 20 tags, each 1-50 characters.
177+
tags: Comma-separated tags for tracking request usage. Up to 20 tags, each 1-50
178+
characters.
180179
181180
use_main_content_only: Extract only the main content from HTML-like inputs
182181
@@ -359,9 +358,8 @@ async def handle(
359358
360359
shorten_base64_images: Shorten base64-encoded image data in the Markdown output
361360
362-
tags: Optional comma-separated caller-defined tags for tracking this request. Tags are
363-
recorded on the request's usage log and can be used to filter usage on the
364-
dashboard usage page. Up to 20 tags, each 1-50 characters.
361+
tags: Comma-separated tags for tracking request usage. Up to 20 tags, each 1-50
362+
characters.
365363
366364
use_main_content_only: Extract only the main content from HTML-like inputs
367365

0 commit comments

Comments
 (0)