Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 20 additions & 8 deletions src/courier/resources/bulk.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ def list_users(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> BulkListUsersResponse:
"""
Get Bulk Job Users
Returns the users ingested into a bulk job with paging, each carrying the status
Courier recorded for it and the id of the message it produced.

Args:
cursor: A unique identifier that allows for fetching the next set of users added to the
Expand Down Expand Up @@ -185,7 +186,9 @@ def retrieve_job(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> BulkRetrieveJobResponse:
"""
Get a bulk job
Returns a bulk job's message definition, its status — CREATED, PROCESSING,
COMPLETED, or ERROR — and running counts of users received, messages enqueued,
and failures. Poll it to follow a job through to completion.

Args:
extra_headers: Send extra headers
Expand Down Expand Up @@ -217,8 +220,11 @@ def run_job(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> None:
"""
Run a bulk job
"""Starts processing a bulk job, sending to every user ingested into it.

Returns
204 immediately; the job runs asynchronously, so poll the job to watch its
status and counts.

Args:
extra_headers: Send extra headers
Expand Down Expand Up @@ -359,7 +365,8 @@ async def list_users(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> BulkListUsersResponse:
"""
Get Bulk Job Users
Returns the users ingested into a bulk job with paging, each carrying the status
Courier recorded for it and the id of the message it produced.

Args:
cursor: A unique identifier that allows for fetching the next set of users added to the
Expand Down Expand Up @@ -399,7 +406,9 @@ async def retrieve_job(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> BulkRetrieveJobResponse:
"""
Get a bulk job
Returns a bulk job's message definition, its status — CREATED, PROCESSING,
COMPLETED, or ERROR — and running counts of users received, messages enqueued,
and failures. Poll it to follow a job through to completion.

Args:
extra_headers: Send extra headers
Expand Down Expand Up @@ -431,8 +440,11 @@ async def run_job(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> None:
"""
Run a bulk job
"""Starts processing a bulk job, sending to every user ingested into it.

Returns
204 immediately; the job runs asynchronously, so poll the job to watch its
status and counts.

Args:
extra_headers: Send extra headers
Expand Down