Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 0.7.2 (2026-11-19)

- SDK/CLI: `ContactsRunEventsParams.tail` (`discolike contacts run events --tail`) returns the newest page of a run's events instead of reading from `after`, so a finished or long run shows what happened last. Poll on with `after=next_cursor`. Omitted unless set; it needs an API release that knows the parameter.

## 0.7.1 (2026-11-19)

- SDK: `ContactsRunRequest.timezone` (an IANA zone such as `America/New_York`, omitted unless set) names the run's saved list in that zone instead of UTC. It needs an API release that knows the field.
Expand Down
4 changes: 2 additions & 2 deletions packages/discolike-cli/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ build-backend = "hatchling.build"

[project]
name = "discolike-cli"
version = "0.7.1"
version = "0.7.2"
description = "Official CLI for the DiscoLike API"
readme = "README.md"
license = "MIT"
license-files = ["LICENSE"]
requires-python = ">=3.11"
authors = [{ name = "DiscoLike", email = "[email protected]" }]
dependencies = [
"discolike==0.7.1",
"discolike==0.7.2",
"typer>=0.26.1,<0.28",
"rich>=13.0",
]
Expand Down
3 changes: 2 additions & 1 deletion packages/discolike-cli/src/discolike_cli/contacts_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,10 @@ def events_command(
run_id: str = typer.Argument(..., help="Run ID."),
after: int | None = typer.Option(None, help="Return events after this cursor."),
limit: int | None = typer.Option(None, help="Events per page (default 100, maximum 500)."),
tail: bool = typer.Option(False, "--tail", help="Return the newest page instead of reading from --after."),
) -> None:
"""Read company progress events and the next cursor."""
from discolike_cli.main import get_client

params = build_request(ContactsRunEventsParams, _merge_params(None, after=after, limit=limit))
params = build_request(ContactsRunEventsParams, _merge_params(None, after=after, limit=limit, tail=tail or None))
emit(get_client(ctx).contacts_run.events(run_id, params))
11 changes: 11 additions & 0 deletions packages/discolike-cli/tests/test_contacts_run_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,17 @@ def handler(request: httpx2.Request) -> httpx2.Response:
assert json.loads(result.stdout)["next_cursor"] == 5


def test_run_events_tail(install_build_client: Callable[[Handler], None]) -> None:
def handler(request: httpx2.Request) -> httpx2.Response:
assert dict(request.url.params) == {"tail": "true", "limit": "20"}
return httpx2.Response(200, json={"events": [], "next_cursor": 9})

install_build_client(handler)
result = runner.invoke(app, ["contacts", "run", "events", RUN_ID, "--tail", "--limit", "20"])
assert result.exit_code == 0, result.output
assert json.loads(result.stdout)["next_cursor"] == 9


@pytest.mark.parametrize("flag", ["--follow", "--email-cap-usd"])
def test_removed_wait_flags(flag: str) -> None:
assert runner.invoke(app, ["contacts", "run", "wait", RUN_ID, flag]).exit_code == 2
Expand Down
2 changes: 1 addition & 1 deletion packages/discolike/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ classifiers = [
]

[project.optional-dependencies]
cli = ["discolike-cli==0.7.1"]
cli = ["discolike-cli==0.7.2"]

[project.urls]
Homepage = "https://www.discolike.com"
Expand Down
1 change: 1 addition & 0 deletions packages/discolike/src/discolike/_contacts_run_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ class ContactsRunRequest(DiscolikeRequest):
class ContactsRunEventsParams(DiscolikeRequest):
after: int = Field(default=0, ge=0)
limit: int = Field(default=100, ge=1, le=500)
tail: bool = False


class ContactsRunListParams(DiscolikeRequest):
Expand Down
22 changes: 19 additions & 3 deletions packages/discolike/src/discolike/_generated/requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -1264,6 +1264,7 @@ class ContinueRunRequest(DiscolikeRequest):
class ContactsRunEventsParams(DiscolikeRequest):
after: Annotated[int | None, Field(ge=0, title="After")] = 0
limit: Annotated[int | None, Field(ge=1, le=500, title="Limit")] = 100
tail: Annotated[bool | None, Field(title="Tail")] = False


class DiscoGenProcessRequest(DiscolikeRequest):
Expand Down Expand Up @@ -3304,7 +3305,7 @@ class PromptCompanies(DiscolikeRequest):
icp_text: Annotated[
str | None,
Field(
description="Plain-language description of the companies you want.",
description="Describe the companies you want. Omit company criteria to search all companies by the titles in people.fit.",
min_length=3,
title="Icp Text",
),
Expand All @@ -3331,7 +3332,7 @@ class ContactsRunRequest(DiscolikeRequest):
max_companies: Annotated[
int | None,
Field(
description="Target companies delivering at least one validated contact.",
description="Target companies delivering at least one validated contact, or LinkedIn contact when include_linkedin_only is set.",
ge=1,
le=10000,
title="Max Companies",
Expand All @@ -3340,12 +3341,19 @@ class ContactsRunRequest(DiscolikeRequest):
per_company: Annotated[
int | None,
Field(
description="Maximum validated contacts per company.",
description="Maximum validated contacts per company, LinkedIn contacts included when include_linkedin_only is set.",
ge=1,
le=50,
title="Per Company",
),
] = 10
include_linkedin_only: Annotated[
bool | None,
Field(
description="Also deliver people whose email could not be verified, without an email and with their LinkedIn profile, at 1 record each. They count toward max_companies and per_company.",
title="Include Linkedin Only",
),
] = False
email_cap_usd: Annotated[
EmailCapUsd | str | None,
Field(description="Maximum delivery spend in USD.", title="Email Cap Usd"),
Expand All @@ -3356,3 +3364,11 @@ class ContactsRunRequest(DiscolikeRequest):
str | None,
Field(description="Idempotency key for starting a run.", title="Create Key"),
] = None
timezone: Annotated[
str | None,
Field(
description="IANA time zone, such as America/New_York, for the time in the run's default saved-list name. UTC when omitted.",
max_length=64,
title="Timezone",
),
] = None
2 changes: 1 addition & 1 deletion packages/discolike/src/discolike/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.7.1"
__version__ = "0.7.2"
2 changes: 1 addition & 1 deletion packages/discolike/tests/test_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@


def test_version() -> None:
assert discolike.__version__ == "0.7.1"
assert discolike.__version__ == "0.7.2"
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading