diff --git a/src/lib/api/adapters/entity.adapter.ts b/src/lib/api/adapters/entity.adapter.ts index eea431c4..befcf6a6 100644 --- a/src/lib/api/adapters/entity.adapter.ts +++ b/src/lib/api/adapters/entity.adapter.ts @@ -548,6 +548,20 @@ export class EntityAdapter extends BaseAdapter { }) } + /** + * Updates an existing character record + * Requires editor role (>= 7) + */ + async updateCharacter(id: string, payload: Partial): Promise { + const result = await this.request(`/characters/${id}`, { + method: 'PATCH', + body: { character: payload } + }) + // Invalidate cache for this character + this.clearCache(`/characters/${id}`) + return result + } + /** * Triggers async image download for a character * Requires editor role (>= 7) @@ -637,6 +651,20 @@ export class EntityAdapter extends BaseAdapter { }) } + /** + * Updates an existing summon record + * Requires editor role (>= 7) + */ + async updateSummon(id: string, payload: Partial): Promise { + const result = await this.request(`/summons/${id}`, { + method: 'PATCH', + body: { summon: payload } + }) + // Invalidate cache for this summon + this.clearCache(`/summons/${id}`) + return result + } + /** * Triggers async image download for a summon * Requires editor role (>= 7) @@ -726,6 +754,20 @@ export class EntityAdapter extends BaseAdapter { }) } + /** + * Updates an existing weapon record + * Requires editor role (>= 7) + */ + async updateWeapon(id: string, payload: Partial): Promise { + const result = await this.request(`/weapons/${id}`, { + method: 'PATCH', + body: { weapon: payload } + }) + // Invalidate cache for this weapon + this.clearCache(`/weapons/${id}`) + return result + } + /** * Triggers async image download for a weapon * Requires editor role (>= 7)