import { CrowdinApi , PatchRequest , ResponseList , ResponseObject } from '../core' ; export class Screenshots extends CrowdinApi { param projectId param limit param offset listScreenshots ( projectId , limit ? , offset ? ) { const url = `${ this . url }/projects/${ projectId }/screenshots` ; return this . getList ( url , limit , offset ) ; } param projectId param request addScreenshot ( projectId , request ) { const url = `${ this . url }/projects/${ projectId }/screenshots` ; return this . post ( url , request , this . defaultConfig ( ) ) ; } param projectId param screenshotId getScreenshot ( projectId , screenshotId ) { const url = `${ this . url }/projects/${ projectId }/screenshots/${ screenshotId }` ; return this . get ( url , this . defaultConfig ( ) ) ; } param projectId param screenshotId param request updateScreenshot ( projectId , screenshotId , request ) { const url = `${ this . url }/projects/${ projectId }/screenshots/${ screenshotId }` ; return this . put ( url , request , this . defaultConfig ( ) ) ; } param projectId param screenshotId deleteScreenshot ( projectId , screenshotId ) { const url = `${ this . url }/projects/${ projectId }/screenshots/${ screenshotId }` ; return this . delete ( url , this . defaultConfig ( ) ) ; } param projectId param screenshotId param request editScreenshot ( projectId , screenshotId , request ) { const url = `${ this . url }/projects/${ projectId }/screenshots/${ screenshotId }` ; return this . patch ( url , request , this . defaultConfig ( ) ) ; } param projectId param screenshotId param limit param offset listScreenshotTags ( projectId , screenshotId , limit ? , offset ? ) { const url = `${ this . url }/projects/${ projectId }/screenshots/${ screenshotId }/tags` ; return this . getList ( url , limit , offset ) ; } param projectId param screenshotId param request replaceTags ( projectId , screenshotId , request ) { const url = `${ this . url }/projects/${ projectId }/screenshots/${ screenshotId }/tags` ; return this . put ( url , request , this . defaultConfig ( ) ) ; } param projectId param screenshotId param request addTag ( projectId , screenshotId , request ) { const url = `${ this . url }/projects/${ projectId }/screenshots/${ screenshotId }/tags` ; return this . post ( url , request , this . defaultConfig ( ) ) ; } param projectId param screenshotId clearTags ( projectId , screenshotId ) { const url = `${ this . url }/projects/${ projectId }/screenshots/${ screenshotId }/tags` ; return this . delete ( url , this . defaultConfig ( ) ) ; } param projectId param screenshotId param tagId getTag ( projectId , screenshotId , tagId ) { const url = `${ this . url }/projects/${ projectId }/screenshots/${ screenshotId }/tags/${ tagId }` ; return this . get ( url , this . defaultConfig ( ) ) ; } param projectId param screenshotId param tagId deleteTag ( projectId , screenshotId , tagId ) { const url = `${ this . url }/projects/${ projectId }/screenshots/${ screenshotId }/tags/${ tagId }` ; return this . delete ( url , this . defaultConfig ( ) ) ; } param projectId param screenshotId param tagId param request updateTag ( projectId , screenshotId , tagId , request ) { const url = `${ this . url }/projects/${ projectId }/screenshots/${ screenshotId }/tags/${ tagId }` ; return this . patch ( url , request , this . defaultConfig ( ) ) ; } } export namespace ScreenshotsModel { export interface Screenshot { id : number ; userId : number ; url : string ; name : string ; size : Size ; tagsCount : number ; tags : Tag [ ] ; createdAt : string ; updatedAt : string ; } export interface CreateScreenshotRequest { storageId : number ; name : string ; autoTag ? : boolean ; } export interface Tag { id : number ; screenshotId : number ; stringId : number ; position : Position ; createdAt : string ; } export interface AddTagRequest { stringId : number ; position ? : Position ; } export interface Size { width : number ; height : number ; } export interface Position { x : number ; y : number ; width : number ; height : number ; } }