import * as _$$$MsClient from "cn.keytop.midend.microservice.Client"; 

/**
 * 使用示例：
 * import * as demo1Client from 'cn.keytop.stc.Demo1Client'
 * 
 * const demo1Client = new demo1Client.Demo1Client()
 *  demo1Client.fun1('aaa','bbb','ccc')
 * .catch(error => {console.log(error)})
 * .then(value => {console.log(value)})
 *
 *
 * @author 微服务平台自动生成
 * @desc [测试]接口定义
 * @date 2020-05-13 09:25:01
 **/
export class Demo1Client {
  private pid: string = 'cn.keytop.stc.Demo1';
  private version: string = '1.0';
  private authType: _$$$MsClient.AuthType = _$$$MsClient.AuthType.BASE;
  private serviceClient: _$$$MsClient.ServiceClient;

  constructor(serviceClientConfig:_$$$MsClient.ServiceClientConfig = new _$$$MsClient.ServiceClientConfig() ) {
     this.serviceClient = new _$$$MsClient.ServiceClientImpl(serviceClientConfig)
   }

  async addUser(sysUser: AddUser$Models.SysUser): Promise<AddUser$Models.OpResult> {
      let sid = `${this.pid}.addUser` 
      let tags = '' 
      let header = {'pid':`${this.pid}`} 
      let paramMap = {} 
      paramMap = { ...sysUser      } 
      return await this.serviceClient.call(_$$$MsClient.HttpMethodType.POST,sid, this.version, tags, header, paramMap, {}, this.authType,_$$$MsClient.RequestBodyType.WWW_FORM) 
  }

  async importUser(postFile: ImportUser$Models.PostFile): Promise<ImportUser$Models.OpResult> {
      let sid = `${this.pid}.importUser` 
      let tags = '' 
      let header = {'pid':`${this.pid}`} 
      let paramMap = {} 
      paramMap = { 'postFile': postFile      } 
      return await this.serviceClient.get(sid, this.version, tags, header, paramMap, this.authType) 
  }

  async pay5(jsonParam: Pay5$Models.JsonParam): Promise<any> {
      let sid = `${this.pid}.pay5` 
      let tags = '' 
      let header = {'pid':`${this.pid}`} 
      let paramMap = {} 
      paramMap = { ...jsonParam      } 
      return await this.serviceClient.call(_$$$MsClient.HttpMethodType.POST,sid, this.version, tags, header, paramMap, {}, this.authType,_$$$MsClient.RequestBodyType.WWW_FORM) 
  }

}

export namespace AddUser$Models { 
   export class ShippingAddress {
        province?: string
        city?: string
        county?: string
        address?: string

   }

   export class SysUser {
        name?: string
        age?: number
        sex?: number
        birthday?: Date
        enable?: boolean
        roleList?: Array<string>
        shippingAddress?: ShippingAddress

   }

   export class Data {
        name?: string
        age?: number
        sex?: number
        birthday?: Date
        enable?: boolean
        roleList?: Array<string>
        shippingAddress?: ShippingAddress

   }

   export class OpResult {
        code?: string
        message?: string
        data?: Data

   }

}

export namespace ImportUser$Models { 
   export class PostFile {
        file?: any
        files?: Array<any>
        fileType?: string

   }

   export class ShippingAddress {
        province?: string
        city?: string
        county?: string
        address?: string

   }

   export class Data {
        name?: string
        age?: number
        sex?: number
        birthday?: Date
        enable?: boolean
        roleList?: Array<string>
        shippingAddress?: ShippingAddress

   }

   export class OpResult {
        code?: string
        message?: string
        data?: Data

   }

}

export namespace Pay5$Models { 
   export class JsonParam {
        name?: string
        addr?: string
        sex?: string
        cc?: string

   }

}

