import { CrowdinApi , ResponseList , ResponseObject } from '../core' ; export class Workflows extends CrowdinApi { param groupId param limit param offset listWorkflowTemplates ( groupId ? , limit ? , offset ? ) ; listWorkflowTemplates ( groupIdOrRequest ? , limit ? , offset ? ) { let url = `${ this . url }/workflow-templates` ; let request ; if ( groupIdOrRequest && typeof groupIdOrRequest === 'object' ) { request = groupIdOrRequest ; } else { request = { groupId : groupIdOrRequest , limit , offset } ; } url = this . addQueryParam ( url , 'groupId' , request . groupId ) ; return this . getList ( url , request . limit , request . offset ) ; } param templateId getWorkflowTemplateInfo ( templateId ) { const url = `${ this . url }/workflow-templates/${ templateId }` ; return this . get ( url , this . defaultConfig ( ) ) ; } } export namespace WorkflowModel { export interface ListWorkflowTemplatesRequest { groupId ? : number ; limit ? : number ; offset ? : number ; } export interface Workflow { id : number ; title : string ; description : string ; groupId : number ; isDefault : boolean ; } }