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: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Changelog

## Unreleased
## 0.6.1 (2026-10-19)

- SDK/CLI: discover's server-side default for `min_digital_footprint` drops from 50 to 25 when the field is omitted, so lists include more real companies with a thin web presence. Pass `min_digital_footprint=50` (CLI `--min-digital-footprint 50`) to keep the old floor. No SDK change; older versions get the new default too.
- SDK/CLI: the API now prices every billed request before it runs and refuses one the remaining balance cannot cover with a 403 whose `detail` is an object (`code: "INSUFFICIENT_BALANCE"`, `message`, `remaining_usd`, `max_affordable_records`, `requested_records`, `upgrade_url`). The SDK raises it as the new `InsufficientBalanceError`, a `PlanAccessError` subclass, so existing `except PlanAccessError` handlers still catch it; its message is the server's `message`, and `max_affordable_records`, `remaining_usd`, `requested_records` and `upgrade_url` are attributes, counted in the request's own size unit (records, or contacts, companies, domains, rows, queries or personas for requests sized by those; the message names it), so a caller can retry at `max_affordable_records`. Only a 403 carrying that code raises it. A request the API could not price answers 503 (`ServerError`), which the SDK retries automatically on GET calls. Any other object `detail` with a `message` now uses that message instead of the raw JSON. The CLI exits 3 with `"code": "insufficient_balance"` and adds `max_affordable_records` and `remaining_usd` to the error JSON. Older SDK versions raise a plain `PlanAccessError` whose message is the JSON body.
- SDK/CLI: `DiscoverParams.relevance` (`MAX_RELEVANCE`, `BALANCED` or `MAX_COVERAGE`) picks where a discover list stops by estimated ICP fit: `MAX_RELEVANCE` returns the tightest list, `MAX_COVERAGE` the longest, stopping where fit drops too low. Left unset it is not sent and the list has no automatic stop. The CLI's `discover` and `bulk companies` gain `--relevance`. It needs an API release that knows the field; an older API ignores it.
- SDK/CLI: `variance` on discover is deprecated; the API maps its old values onto `relevance`, which wins when both are sent. Use `relevance`. It is dropped from `DiscoverParams`, but passing it still sends it and raises a `DeprecationWarning`, and the SDK no longer checks its value. The CLI keeps `--variance` so existing scripts run, with help marking it deprecated.
- SDK (note for maintainers): `relevance`, and the removal of `variance`, were written into `discolike/_generated/requests.py` by hand ahead of the platform deploy, so `scripts/gen_requests.py --check` and `scripts/check_contract.py` report them until it lands. Regenerate once the production spec serves them.

## 0.6.0 (2026-10-12)

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.6.0"
version = "0.6.1"
description = "Official CLI for the DiscoLike API"
readme = "README.md"
license = "MIT"
license-files = ["LICENSE"]
requires-python = ">=3.11"
authors = [{ name = "DiscoLike", email = "support@discolike.com" }]
dependencies = [
"discolike==0.6.0",
"discolike==0.6.1",
"typer>=0.26.1,<0.28",
"rich>=13.0",
]
Expand Down
2 changes: 1 addition & 1 deletion packages/discolike/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ classifiers = [
]

[project.optional-dependencies]
cli = ["discolike-cli==0.6.0"]
cli = ["discolike-cli==0.6.1"]

[project.urls]
Homepage = "https://www.discolike.com"
Expand Down
6 changes: 3 additions & 3 deletions packages/discolike/src/discolike/_generated/requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -1759,7 +1759,7 @@ class DiscoverParams(DiscolikeRequest):
min_digital_footprint: Annotated[
int | None,
Field(
description="Minimum digital footprint score (0-800). Default 50.",
description="Minimum digital footprint score (0-800). Default 25.",
ge=0,
le=800,
title="Min Digital Footprint",
Expand Down Expand Up @@ -2099,7 +2099,7 @@ class DiscoverParams(DiscolikeRequest):
relevance: Annotated[
Literal["MAX_RELEVANCE", "BALANCED", "MAX_COVERAGE"] | None,
Field(
description="Where the list stops, by estimated ICP fit: MAX_RELEVANCE gives the tightest list, BALANCED the middle, MAX_COVERAGE the longest (stops where fit drops too low). Omit for no automatic stop.",
description="How far down the ranked list results go before the estimated ICP fit drops too low. Applies to lookalike searches (icp_text or domain). MAX_RELEVANCE stops earliest with the tightest fit, BALANCED goes further, MAX_COVERAGE serves the longest list. Omit for no automatic stop.",
title="Relevance",
),
] = None
Expand Down Expand Up @@ -2385,7 +2385,7 @@ class CountParams(DiscolikeRequest):
min_digital_footprint: Annotated[
int | None,
Field(
description="Minimum digital footprint score (0-800). Default 50.",
description="Minimum digital footprint score (0-800). Default 25.",
ge=0,
le=800,
title="Min Digital Footprint",
Expand Down
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.6.0"
__version__ = "0.6.1"
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.6.0"
assert discolike.__version__ == "0.6.1"
14 changes: 1 addition & 13 deletions scripts/gen_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,19 +100,7 @@
# Properties the SDK ships before the deployed spec has them. Merged in only while the spec
# lacks them, so each entry clears itself once the platform release lands -- generation prints
# the ones that have, to be deleted here.
PENDING_PROPERTIES: dict[str, dict[str, dict[str, Any]]] = {
"ProspectingMessageRequest": {
"question_seq": {
"anyOf": [{"minimum": 1, "type": "integer"}, {"type": "null"}],
"default": None,
"description": (
"The seq of the question message whose suggested reply this is; the reply answers that question "
"only, never a newer one."
),
"title": "Question Seq",
}
}
}
PENDING_PROPERTIES: dict[str, dict[str, dict[str, Any]]] = {}

# Properties generated from this schema rather than the spec's, whatever the spec says. The
# platform's sub-industry enum lists parent-qualified keys only; a bare label reaches it through
Expand Down
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