import { FetchRepositoryBase } from "../../../shared/index.js"; import { type LockReleaseOutcome, type TemplateLockInfo } from "../locks/lockOwnership.js"; import type { AccountTemplate, ListAccountTemplatesParams, ListAccountTemplatesResponse, SaveAccountTemplateRequest, SaveAccountTemplateResponse } from "./AccountTemplatesTypes.js"; export declare class AccountTemplatesRepository extends FetchRepositoryBase { /** * List all account-level (global) templates, body included. The list does * not take edit locks (`account_templates_controller.rb#index`). */ getAccountTemplates(params?: ListAccountTemplatesParams): Promise; /** * Get a single account template by ID. **Takes an edit lock** for the token * user (`#show` runs `lock_info`, which calls `create_lock!`): prefer * `findAccountTemplate`, which reads from the list without locking. */ getAccountTemplate(templateId: number): Promise; /** Finds an account template by id in the list, archived included, without locking. */ findAccountTemplate(templateId: number): Promise; /** * Save/update an account template body using multipart form-data. The * platform answers with the template and the lock the save took. */ saveAccountTemplate(templateId: number, data: SaveAccountTemplateRequest): Promise; /** * Saves the body and returns the template as read afterwards from the list. * The edit lock the save takes is released unless `keepLock` is set; the * id of a kept lock is returned. */ saveAccountTemplateAndRead(templateId: number, data: SaveAccountTemplateRequest, options?: { keepLock?: boolean | undefined; }): Promise<{ template: AccountTemplate; lockId: number | undefined; }>; /** * Releases the edit lock that a read or save left to the token user. The * owner is compared with the user of the token before `DELETE /locks/:id`, because * the platform deletes any user's lock without checking. */ releaseAccountTemplateLock(template: { lock_info?: TemplateLockInfo | null | undefined; }): Promise; /** Usuario del token, leĆ­do una vez por repositorio. */ private currentUserLookup; /** `GET /profile` o, ante un 404, `GET /admin_users/me`. */ private currentUserId; /** Libera un lock solo si es del usuario del token. */ private releaseOwnLockById; } //# sourceMappingURL=AccountTemplatesRepository.d.ts.map