Skip to content

feat: deleteKey for DELETE /key - #5

Merged
catsika merged 3 commits into
mainfrom
feat/delete-key
Oct 26, 2026
Merged

catsika merged 3 commits into
mainfrom
feat/delete-key

Conversation

@catsika

@catsika catsika commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

What

Adds deleteKey({ productId, licenseKey }), which permanently deletes a license key. blockKey stays the reversible option.

Contract

DELETE /key with JSON body { productId, licenseKey }. The license key goes in the body, never the URL. 200 returns { message: "Key deleted", code: 0 }. An unknown key returns 404 { message: "Invalid license key", code: 1 }, which the SDK rejects as { message, code, status }. The DELETE helper now takes an optional body. deleteCustomer still uses query params and is unchanged.

Tests

  • Contract tests: method, path, JSON body, key not in the URL, auth header, 200 parsing, 404 rejection.
  • Live test: deletes the node-locked key after the workflow, then checks that getKey fails for it. The finally block now deletes both created keys instead of blocking them, so the shared test workspace stops filling up.

README and CHANGELOG (Unreleased) are updated. No version bump.

Adds deleteKey({ productId, licenseKey }), sending the license key in the
JSON body. The DELETE helper takes an optional body; deleteCustomer is
unchanged. The live test now deletes the keys it creates.
@catsika
catsika merged commit 134da07 into main Oct 26, 2026
3 checks passed
@catsika
catsika deleted the feat/delete-key branch October 26, 2026 03:14
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