feat: localize license states and restore revoked licenses
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 16:11:09 +08:00
parent f4b99e50cd
commit 09910db251
8 changed files with 141 additions and 6 deletions

View File

@@ -27,6 +27,7 @@ export async function setInstanceFrozen(instanceID:string,frozen:boolean,key:str
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 restoreLicense(id:number,idempotencyKey:string) { return api.post(`/licenses/${id}/restore`,{}, {headers:{'Idempotency-Key':idempotencyKey}}) }
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}}) }