Skip to content

feat: expose expirationDate on activate and floating checkout - #2

Merged
catsika merged 1 commit into
mainfrom
feat/expiration-date
Oct 26, 2026
Merged

catsika merged 1 commit into
mainfrom
feat/expiration-date

Conversation

@catsika

@catsika catsika commented Oct 26, 2026

Copy link
Copy Markdown
Member

What changed

  • ActivateKeyResponse and FloatingCheckoutResponse (src/types.ts) gain expirationDate?: string | null.
  • The SDK returns response.data as-is, so no mapping code needed changing. The field passes straight through.
  • Contract tests cover a date value, null, and an older server that omits the field (tests/contracts.test.cjs).
  • README: new "License Expiry" section with an example. CHANGELOG: entry under Unreleased.

Contract (already live in the API)

  • POST /key/activate success responses include expirationDate: an ISO 8601 string (e.g. "2027-03-01T00:00:00.000Z"), or null when the license never expires.
  • POST /key/checkout success responses include the same expirationDate (license expiry). This is separate from expiresAt, the floating seat lease.
  • The change only adds a field. Failure responses are unchanged.

The field is optional (?) rather than required, so code that builds these response types (mocks, fixtures, older self-hosted servers) still compiles. undefined means the server didn't send the field. null means the license never expires.

No version bump. package.json is still 1.5.0, so the owner can choose the release version.

Checks (Node 22.23.1, npm 10.9.8)

  • npm ci: ok
  • npm run lint: ok
  • npx tsc --noEmit and npm run build: ok
  • npm test: 8/8 pass (3 existing, 5 new)
  • npm run test:live: not run, because it needs live API secrets

Add optional expirationDate (ISO 8601 string, or null when the license
never expires) to ActivateKeyResponse and FloatingCheckoutResponse. On
checkout it is separate from expiresAt, the floating seat lease. Optional
so older servers that omit it still type-check.

Add contract tests for the date and null cases, document reading the
field in the README, and note it under Unreleased in the CHANGELOG.
@catsika
catsika merged commit 0ff9389 into main Oct 26, 2026
3 checks passed
@catsika
catsika deleted the feat/expiration-date branch October 26, 2026 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant