feat: delete never-activated licenses and bundle deployment verification keys
Some checks failed
Check / delivery-static (push) Has been cancelled
Check / api (push) Has been cancelled
Check / web (push) Has been cancelled

Co-Authored-By: Craft Agent <agents-noreply@craft.do>
This commit is contained in:
2026-10-12 14:31:15 +08:00
parent 03a3b9f6a9
commit f4b99e50cd
9 changed files with 221 additions and 12 deletions

View File

@@ -26,6 +26,7 @@ export type LicenseInstance = { online_state?:'online'|'offline'|'never_seen'|'u
export async function setInstanceFrozen(instanceID:string,frozen:boolean,key:string) { return api.post(`/instances/${instanceID}/freeze`,{frozen},{headers:{'Idempotency-Key':key}}) }
export async function listLicenseInstances(id:number) { return api.get<{data:LicenseInstance[]}>(`/licenses/${id}/instances`) }
export async function getLicense(id:number) { return api.get<{data:License}>(`/licenses/${id}`) }
export async function deleteLicense(id:number) { return api.delete(`/licenses/${id}`) }
export async function revokeLicense(id:number,idempotencyKey:string) { return api.post(`/licenses/${id}/revoke`,{}, {headers:{'Idempotency-Key':idempotencyKey}}) }
export async function renewLicense(id:number,expires_at:string,idempotencyKey:string) { return api.post(`/licenses/${id}/renew`,{expires_at},{headers:{'Idempotency-Key':idempotencyKey}}) }