import { CrowdinApi , PatchRequest , ResponseList , ResponseObject } from '../core' ; export class Distributions extends CrowdinApi { param projectId param limit param offset listDistributions ( projectId , limit ? , offset ? ) { const url = `${ this . url }/projects/${ projectId }/distributions` ; return this . getList ( url , limit , offset ) ; } param projectId param request createDistribution ( projectId , request ) { const url = `${ this . url }/projects/${ projectId }/distributions` ; return this . post ( url , request , this . defaultConfig ( ) ) ; } param projectId param hash getDistribution ( projectId , hash ) { const url = `${ this . url }/projects/${ projectId }/distributions/${ hash }` ; return this . get ( url , this . defaultConfig ( ) ) ; } param projectId param hash deleteDistribution ( projectId , hash ) { const url = `${ this . url }/projects/${ projectId }/distributions/${ hash }` ; return this . delete ( url , this . defaultConfig ( ) ) ; } param projectId param hash param request editDistribution ( projectId , hash , request ) { const url = `${ this . url }/projects/${ projectId }/distributions/${ hash }` ; return this . patch ( url , request , this . defaultConfig ( ) ) ; } param projectId param hash getDistributionRelease ( projectId , hash ) { const url = `${ this . url }/projects/${ projectId }/distributions/${ hash }/release` ; return this . get ( url , this . defaultConfig ( ) ) ; } param projectId param hash param request createDistributionRelease ( projectId , hash ) { const url = `${ this . url }/projects/${ projectId }/distributions/${ hash }/release` ; return this . post ( url , { } , this . defaultConfig ( ) ) ; } } export namespace DistributionsModel { export interface Distribution { hash : string ; name : string ; fileIds : number [ ] ; createdAt : string ; updatedAt : string ; } export interface CreateDistributionRequest { name : string ; fileIds : number [ ] ; } export interface DistributionRelease { status : string ; progress : number ; currentLanguageId : string ; currentFileId : number ; date : string ; } }