apiModels.go 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311
  1. package asign
  2. type APIRspData interface {
  3. interface{} | APIBankCard4Rsp | APIAddUserRsp | APICaptchaVerifyRsp | APIGetUserRsp
  4. }
  5. type APIRsp[T APIRspData] struct {
  6. Code int `json:"code"` // 响应码,100000表示成功,其他表示异常
  7. Msg string `json:"msg"` // 响应信息
  8. Data T // 响应数据
  9. }
  10. // APIPersonBankCard4Req 个人银行卡四要素认证入参
  11. type APIPersonBankCard4Req struct {
  12. RealName string `json:"realName" binding:"required"` // 真实姓名
  13. IdCardNo string `json:"idCardNo" binding:"required"` // 身份证号
  14. BankCard string `json:"bankCard" binding:"required"` // 银行卡号(仅限印有“银联”字样的银行卡)
  15. Mobile string `json:"mobile" binding:"required"` // 手机号码(限中国大陆11位手机号)
  16. }
  17. // APICompanyBankCard4Req 企业法人银行卡四要素认证入参
  18. type APICompanyBankCard4Req struct {
  19. CompanyName string `json:"companyName" binding:"required"` // 企业名称
  20. CreditCode string `json:"creditCode" binding:"required"` // 社会统一信用代码
  21. RealName string `json:"realName" binding:"required"` // 法人姓名
  22. IdCardNo string `json:"idCardNo" binding:"required"` // 法人身份证号
  23. BankCard string `json:"bankCard" binding:"required"` // 法人银行卡号(仅限印有“银联”字样的银行卡)
  24. Mobile string `json:"mobile" binding:"required"` // 法人手机号(限中国大陆11位手机号)
  25. }
  26. // APIBankCard4Rsp 银行卡四要素认证出参
  27. type APIBankCard4Rsp struct {
  28. Result int `json:"result"` // 认证结果 0.暂无结果/认证中 1.成功 2.失败
  29. SerialNo string `json:"serialNo"` // 认证流水号
  30. Type string `json:"type"` // 认证类型
  31. }
  32. type APICaptchaResendReq struct {
  33. SerialNo string `json:"serialNo" binding:"required"` // 认证流水号
  34. }
  35. // CaptchaVerifyReq 认证验证码校验入参
  36. type APICaptchaVerifyReq struct {
  37. SerialNo string `json:"serialNo" binding:"required"` // 认证流水号
  38. Captcha string `json:"captcha" binding:"required"` // 短信验证码
  39. }
  40. // CaptchaVerifyRsp 认证验证码校验出参
  41. type APICaptchaVerifyRsp struct {
  42. Result int `json:"result"` // 认证结果 0.暂无结果/认证中 1.成功 2.失败
  43. SerialNo string `json:"serialNo"` // 认证流水号
  44. Type string `json:"type"` // 认证类型
  45. }
  46. // APIGetUserReq 查询用户信息入参
  47. type APIGetUserReq struct {
  48. Account string `json:"account" structs:",omitempty"` // 用户唯一识别码
  49. CreditCode string `json:"creditCode" structs:",omitempty"` // 社会统一信用代码
  50. IdCard string `json:"idCard" structs:",omitempty"` // 证件号码
  51. }
  52. // APIGetUserRsp 查询用户信息出参
  53. type APIGetUserRsp struct {
  54. Account string `json:"account"` // 用户账号,用户唯一识别码
  55. Name string `json:"name"` // 个人用户姓名/企业法人姓名
  56. CompanyName string `json:"companyName"` // 企业名称
  57. IdCard string `json:"idCard"` // 个人用户证件号/企业法人身份证号
  58. Mobile string `json:"mobile"` // 用户手机号(签约短信通知手机号)
  59. Email string `json:"email"` // 用户邮箱号
  60. UserType int `json:"userType"` // 用户类型: 1:企业 2:个人
  61. CreditCode string `json:"creditCode"` // 社会统一信用代码
  62. BankCard string `json:"bankCard"` // 用户银行卡号
  63. PortVersion int `json:"portVersion"` // 用户添加时调用的接口版本: 0:历史接口 1:V2版本接口
  64. IdentifyType int `json:"identifyType"` // 认证类型
  65. AuthType int `json:"authType"` // 认证方式: 当portVersion=0 历史接口时 0:非强制认证 1:爱签平台强制认证 当portVersion=1 (V2)版本接口时 0:平台方自行认证 1:爱签平台认证
  66. CreateTime string `json:"createTime"` // 创建时间
  67. IdentifyTime string `json:"identifyTime"` // 认证时间
  68. }
  69. // AddPersonalUserReq 添加个人用户(V2)入参
  70. type APIAddPersonalUserReq struct {
  71. Account string `json:"account" binding:"required"` // 用户唯一识别码(请转入UserID)
  72. SerialNo string `json:"serialNo" structs:",omitempty"` // 实名认证流水号
  73. Name string `json:"name" structs:",omitempty"` // 用户姓名
  74. IdCard string `json:"idCard" structs:",omitempty"` // 个人身份证、台胞证、港澳通行证等证件号
  75. IdCardType int `json:"idCardType" structs:",omitempty"` // 证件类型 1:居民身份证 2:台湾居民来往内地通行证 3:港澳居民往来内地通行证 10:武装警察身份证 11:军人身份证 15:警察(警官)证 21:外国人永久居留证 23:护照
  76. Mobile string `json:"mobile" structs:",omitempty"` // 手机号码
  77. SignPwd string `json:"signPwd" structs:",omitempty"` // 签约密码(MTP2登录密码加密方式),如果为空将随机生成签约密码(当签约方式为“签约密码签约”时会使用到,可通过重置接口修改)
  78. IsSignPwdNotice int `json:"isSignPwdNotice" structs:",omitempty"` // 是否将签约密码以短信形式通知用户 0:不通知(默认) 1:通知
  79. IsNotice int `json:"isNotice" structs:",omitempty"` // 用户发起合同或需要签署时是否进行短信通知 0:否(默认) 1:是
  80. }
  81. // APIAddEnterpriseUserReq 添加企业用户(V2)入参
  82. type APIAddEnterpriseUserReq struct {
  83. Account string `json:"account" binding:"required"` // 用户唯一识别码(可用证件号、手机号等具有唯一属性的标识作为参数传递)
  84. SerialNo string `json:"serialNo" structs:",omitempty"` // 实名认证流水号(若您希望不传此值,由您自行完成认证。请联系商务人员开通权限)
  85. CompanyName string `json:"companyName" structs:",omitempty"` // 企业名称
  86. CreditCode string `json:"creditCode" structs:",omitempty"` // 企业证件号
  87. CreditType int `json:"creditType" structs:",omitempty"` // 企业证件类型, 不传默认为1; 1:统一社会信用代码 2:表示其他证件类型
  88. Name string `json:"name" structs:",omitempty"` // 企业法人姓名
  89. IdCard string `json:"idCard" structs:",omitempty"` // 法人身份证、台胞证、港澳通行证等证件号
  90. IdCardType int `json:"idCardType" structs:",omitempty"` // 证件类型, 不传默认为1; 1:居民身份证 2:台湾居民来往大陆通行证 3:港澳居民来往内地通行证等...
  91. Mobile string `json:"mobile" structs:",omitempty"` // 签约手机,该手机号将用于企业用户合同签署时短信验证,请确保真实有效
  92. ContactName string `json:"contactName" structs:",omitempty"` // 联系人姓名(与企业的法定代表人可以是同一个人)
  93. ContactIdCard string `json:"contactIdCard" structs:",omitempty"` // 联系人身份证号(与企业的法定代表人可以是同一个人)
  94. SignPwd string `json:"signPwd" structs:",omitempty"` // 签约密码明文,如果为空我方将随机生成签约密码(当签约方式为“签约密码签约”时会使用到,可通过重置接口修改)
  95. IsSignPwdNotice int `json:"isSignPwdNotice" structs:",omitempty"` // 是否将签约密码以短信形式通知用户: 0-不通知(默认), 1-通知
  96. IsNotice int `json:"isNotice" structs:",omitempty"` // 用户发起合同或需要签署时是否进行短信通知: 0-否(默认), 1-是
  97. }
  98. // APIAddUserRsp 添加用户(V2)出参(包括个人和企业)
  99. type APIAddUserRsp struct {
  100. SealNo string `json:"sealNo" binding:"required"` // 生成默认印章编号
  101. }
  102. // APITemplateListReq 查询模板列表入参
  103. type APITemplateListReq struct {
  104. Page int `json:"page"` // 页数(不传默认1)
  105. Rows int `json:"rows"` // 每页数据量(不传默认10)
  106. TemplateIdent string `json:"templateIdent"` // 模板编号
  107. }
  108. // APITemplateInfo 模板信息
  109. type APITemplateInfo struct {
  110. TemplateIdent string `json:"templateIdent"` // 模板编号
  111. TemplateName string `json:"templateName"` // 模板名称
  112. TemplateType int `json:"templateType"` // 模板类型:1:word 2:pdf 3:html
  113. Page int `json:"page"` // 模板页数
  114. Sponsor bool `json:"sponsor"` // 是否含发起方填写
  115. ReceiverFill bool `json:"receiverFill"` // 是否含接收方填写
  116. Param bool `json:"param"` // 是否含填充参数
  117. Sign bool `json:"sign"` // 是否含签约参数
  118. Status int `json:"status"` // 模板状态:0:删除 1:使用中 2:停用
  119. Url string `json:"url"` // 模板预览地址(有效时间30分钟)
  120. SyncUrl string `json:"syncUrl"` // 同步模板预览地址(有效时间30分钟)
  121. SyncStatus int `json:"syncStatus"` // 模板同步状态:0:未同步 1:已同步 2:同步过时【注】此字段逻辑不针对老数据,当旧的模板再次同步后进入此逻辑
  122. CreateTime string `json:"createTime"` // 创建时间
  123. ModifyTime string `json:"modifyTime"` // 更新时间
  124. }
  125. // APITemplateListRsp 查询模板列表出参
  126. type APITemplateListRsp struct {
  127. Total int `json:"total"` // 总模板数量
  128. PageNum int `json:"pageNum"` // 页码
  129. PageSize int `json:"pageSize"` // 每页数据量
  130. Size int `json:"size"` // 当页数据量
  131. Pages int `json:"pages"` // 总页数
  132. List []APITemplateInfo `json:"list"` // 模板列表
  133. }
  134. // APIFillData 单行文本、多行文本、日期、身份证类型参数填充。
  135. type APIFillData struct {
  136. DataKey string `json:"dataKey" binding:"required"` // 参数名称
  137. Value string `json:"value" binding:"required"` // 填充值
  138. }
  139. // APIComponentData 单选、复选、勾选、图片类型参数填充
  140. type APIComponentData struct {
  141. Type int `json:"type" binding:"required"` // 组件类型: 2:单选 3:勾选 9:复选 11:图片
  142. Keyword string `json:"keyword" binding:"required"` // 参数名称
  143. DefaultValue string `json:"defaultValue" structs:",omitempty"` // 当填充类型为勾选(type=3)时填写: Yes:选中 Off:不选中
  144. Options map[string]interface{} `json:"options" structs:",omitempty"` // 选项内容
  145. ImageByte []byte `json:"imageByte" structs:",omitempty"` // 图片资源
  146. }
  147. // APItableData 表格填充数据
  148. type APItableData struct {
  149. Keyword string `json:"keyword" binding:"required"` // 表名称
  150. RowValues []map[string]interface{} `json:"rowValues"` // 表格填充值
  151. }
  152. // APITemplate 合同模板
  153. type APITemplate struct {
  154. TemplateNo string `json:"templateNo" binding:"required"` // 合同模板编号
  155. ContractNo string `json:"contractNo" structs:",omitempty"` // 合同编号(此处可传已完成签署的合同编号,实现追加签章的场景)
  156. FillData APIFillData `json:"fillData" structs:",omitempty"` // 单行文本、多行文本、日期、身份证类型参数填充。
  157. ComponentData []APIComponentData `json:"componentData" structs:",omitempty"` // 单选、复选、勾选、图片类型参数填充
  158. TableDatas []APItableData `json:"tableDatas" structs:",omitempty"` // 表格填充数据
  159. }
  160. // APICreateContractReq 上传待签署文件入参
  161. //
  162. // 参数说明:https://preweb.asign.cn/platform/openDoc/docDetail?mid=createContract
  163. type APICreateContractReq struct {
  164. ContractNo string `json:"contractNo" binding:"required"` // 合同ID,合同唯一编号
  165. ContractName string `json:"contractName" binding:"required"` // 合同名称
  166. ValidityTime int `json:"validityTime" structs:",omitempty"` // 合同签署剩余天数(系统当前时间+该天数=在此日期之前可以签署合同日期),【注】与合同有效截止日期必传其一,【例】可传剩余天数:15
  167. ValidityDate string `json:"validityDate" structs:",omitempty"` // 合同有效截止日期(在此日期之前可以签署合同,格式要求:yyyyMMddHHmmss),【注】与合同有效天数必传其一,【例】传值“20231207190000” 为:2023年12月07日19时00分00秒
  168. SignOrder int `json:"signOrder" binding:"required"` // 签约方式 1:无序签约(默认) 2:顺序签约
  169. ReadSeconds int `json:"readSeconds" structs:",omitempty"` // 强制阅读时间(秒)
  170. ReadType int `json:"readType" structs:",omitempty"` // 强制阅读设置 1:倒计时读秒方式 2:必须滑动到文件最底部(有多个文件务必逐个阅读) 3:必须点击打开查看(有多个文件务必逐个打开查看)【注】当readType不传值,仅readSeconds传值时,倒计时读秒是针对整体合同(不强制每个文件逐个阅读)。当readType传值1时,readSeconds也传值时,倒计时(要求每个文件逐个阅读)。当readType传值2或3时,readSeconds也传值时,倒计时读秒是针对整体合同(不强制每个文件逐个阅读)。
  171. NeedAgree int `json:"needAgree" structs:",omitempty"` // 同意协议开关:(开启后表示必须同意协议才可签署合同) 1 - 开,0 - 关(默认)
  172. AutoExpand int `json:"autoExpand" structs:",omitempty"` // 多文件时,是否自动展开文件列表 1 - 展开, 0 - 不展开(默认)
  173. NotifyUrl string `json:"notifyUrl" structs:",omitempty"` // 合同签署完成后(合同状态 status=2)回调通知地址,响应【"ok"】表示接收回调成功。
  174. CallbackUrl string `json:"callbackUrl" structs:",omitempty"` // 合同拒签或过期后(合同状态 status=3/4)回调通知地址,响应【"ok"】表示接收回调成功。
  175. UserNotifyUrl string `json:"userNotifyUrl" structs:",omitempty"` // 某个用户签署完成(用户签署状态 signStatus=2,参考 查询合同信息接口)之后回调地址,响应【"ok"】表示接收回调成功。
  176. RedirectUrl string `json:"redirectUrl" structs:",omitempty"` // 合同签署完成后同步回调地址: redirectUrl 若不为空,可以跳转业务方自己的前端过渡页面,实现业务方自己的逻辑。redirectUrl 为空,签署成功后,会回调小程序或app的方法。具体调用方法参考如下。
  177. RefuseOn int `json:"refuseOn" structs:",omitempty"` // 合同签署页退回按钮开关: 1 - 开启,0 - 关闭(默认)
  178. AutoContinue int `json:"autoContinue" structs:",omitempty"` // 当前签署人签署完成自动跳转至下一签署人签署开关(仅对顺序签合同生效): 1 - 开启,0 - 关闭(默认)
  179. ViewFlg int `json:"viewFlg" structs:",omitempty"` // 合同签署完是否允许可以通过链接查看合同内容: 1:不允许查看 不传值:可以查看(默认)
  180. RedirectReturnUrl string `json:"redirectReturnUrl" structs:",omitempty"` // 合同发起页面返回按钮跳转url 若不为空,可以跳转业务方自己的前端页面。
  181. RedirectCompletedUrl string `json:"redirectCompletedUrl" structs:",omitempty"` // 合同发起页面完成后跳转url 若不为空,可以跳转业务方自己的前端过渡页面,实现业务方自己的逻辑。
  182. ContractFiles []interface{} `json:"contractFiles" structs:",omitempty"` // 合同附件(与合同模板必传其一)(支持多文件上传)
  183. Templates []APITemplate `json:"templates" structs:",omitempty"` // 合同模板列表(与合同附件必传其一)
  184. }
  185. // APICreateContractRsp 上传待签署文件出参
  186. type APICreateContractRsp struct {
  187. PreviewUrl string `json:"previewUrl"` // 合同预览链接(预览链接3小时内有效,过期后可通过查询合同信息接口重新获取)
  188. ContractFiles []interface{} `json:"contractFiles"` // 合同文件信息(文件名称,附件编号,页数)
  189. }
  190. // APISignStrategy 签章策略
  191. type APISignStrategy struct {
  192. AttachNo int `json:"attachNo" binding:"required"` // 附件编号 注:对应上传待签署文件接口(createContract)中,合同附件(contractFiles)或合同模板(templates)参数中的List排序序号(例如:1,2,3...)
  193. LocationMode int `json:"locationMode" binding:"required"` // 定位方式:2:坐标签章 3:关键字签章 4:模板坐标签章
  194. CanDrag int `json:"canDrag" structs:",omitempty"` // 签章位置是否可以拖动 1:可以, 其他值:不可以
  195. SignKey string `json:"signKey" structs:",omitempty"` // 关键字或签署区名称key(定位方式为关键字签章时此处需传定位关键字,定位方式为模板坐标签章时此处需传模板中设置的签署区名称)
  196. SignType int `json:"signType" structs:",omitempty"` // 印章类型:1:签名/签章(默认) 2:时间戳
  197. SignPage int `json:"signPage" structs:",omitempty"` // 签章页码(定位方式为坐标签章时必传)
  198. SignX float64 `json:"signX" structs:",omitempty"` // 签章位置与当前签约文件的左内边距与当前签约文件宽度的比例(精确到小数点后2位)(定位方式为坐标签章时必传)
  199. SignY float64 `json:"signY" structs:",omitempty"` // 签章位置与当前签约文件的上内边距与当前签约文件高度的比例(精确到小数点后2位)(定位方式为坐标签章时必传)
  200. OffsetX float64 `json:"offsetX" structs:",omitempty"` // 坐标偏移量(像素PX)
  201. OffsetY float64 `json:"offsetY" structs:",omitempty"` // 坐标偏移量(像素PX)
  202. }
  203. // APIReceiverFillStrategy 接收方模板填充策略
  204. type APIReceiverFillStrategy struct {
  205. AttachNo int `json:"attachNo" binding:"required"` // 附件编号(合同上传的附件序号:1,2,3…)
  206. Key string `json:"key" binding:"required"` // 参数名称
  207. Value string `json:"value" structs:",omitempty"` // ● 填充类型为单行、多行、身份证、日期时传null或空字符串则为页面填充,传值则为即时填充 ● 填充类型为勾选时,Yes:选中;Off:不选中 ● 填充类型为图片时,传base64字符串
  208. FillStage int `json:"fillStage" structs:",omitempty"` // 当填充类型为单选、复选、勾选、图片时,填充场景标记:2:即时填充(调用当前接口即刻填充,默认) 3:页面填充(用户签约时填充)
  209. Options []interface{} `json:"options" structs:",omitempty"` // 单、复选选项内容
  210. RowValues []interface{} `json:"rowValues" structs:",omitempty"` // 表格填充值
  211. }
  212. // APIAddSignerReq 添加签署方入参
  213. //
  214. // 参数说明:https://preweb.asign.cn/platform/openDoc/docDetail?mid=addSigner
  215. type APIAddSignerReq struct {
  216. ContractNo string `json:"contractNo" binding:"required"` // 合同唯一编码 (40位之内)
  217. Account string `json:"account" binding:"required"` // 用户唯一识别码
  218. SignType int `json:"signType" binding:"required"` // 签约方式:2:无感知签约(需要开通权限) 3:有感知签约
  219. SealNo string `json:"sealNo" structs:",omitempty"` // 印章编号【注】若不传值,则由当前主体的默认印章进行签署
  220. AuthSignAccount string `json:"authSignAccount" structs:",omitempty"` // 指定授权签约用户,该用户需要有印章编号【sealNo】的有效授权记录,如若不指定则印章的默认使用者进行签署,如无默认使用者,则由当前主体【account】进行签署
  221. NoticeMobile string `json:"noticeMobile" structs:",omitempty"` // 通知手机号(用于接收合同签署链接的通知短信)
  222. NoticeEmail string `json:"noticeEmail" structs:",omitempty"` // 通知邮箱号(用于接收合同签署链接的通知短信)
  223. SignOrder string `json:"signOrder" structs:",omitempty"` // 使用顺序签约时签约顺序编号(从1开始),无序签约都为1
  224. IsNotice int `json:"isNotice" structs:",omitempty"` // 是否接收合同签署链接的短信通知,优先级高于添加用户接口同名参数:0 - 否(默认),1 - 是
  225. ValidateType int `json:"validateType" structs:",omitempty"` // 签署方式指定:(从以下分类中指定一种) 1:短信验证码签约(支持企业和个人) 2:签约密码签约(支持企业和个人) 3:人脸识别签约(支持企业和个人) 4:手写签名(不推荐,仅限个人,需要开通权限) 5:宋体章签名(不推荐,仅限个人,需要开通权限) 6:手写识别签名+短信签约(仅限个人) 7:手写签名+短信签约(仅限个人) 8:手写签名+人脸识别签约(仅限个人) 9:手写识别签名+人脸识别签约(仅限个人) 10:手写签名 + 认证意愿合一(仅支持个人陌生用户) 11:手写签名识别 + 认证意愿合一(仅支持个人陌生用户) 12:宋体章 + 认证意愿合一(仅支持个人陌生用户) 13:视频双录核身签约(需要开通权限)
  226. FaceAuthMode int `json:"faceAuthMode" structs:",omitempty"` // 人脸识别方式:1:支付宝(不可在支付宝小程序中接入) 2:H5(默认) 4:微信小程序(支持在微信小程序内唤起人脸识别,需联系商务人员开启权限后使用) 5:支付宝小程序(支持在支付宝小程序内唤起人脸识别,需联系商务人员开启权限后使用) 【注】签署方式包含人脸(3,8,9)时,可指定人脸识别方式,不传默认为H5
  227. ValidateTypeList string `json:"validateTypeList" structs:",omitempty"` // 组合签署方式指定:(从以上分类中指定多种以逗号间隔,示例:1,2,3)。允许开发者可以自主控制展示几种签署方式,让签约用户选择。【注】 validateTypeList和validateType都有传值时,签署方式按照validateTypeList指定
  228. AutoSwitch int `json:"autoSwitch" structs:",omitempty"` // 自动切换签约方式:开发者可以自主控制手写内容识别和人脸刷脸识别多次不通过时,是否允许用户切换方式 1 - 仅手写识别允许切换(默认) 2 - 仅人脸识别允许切换 3 - 全部允许 0 - 全部不允许 【注】手写识别三次失败时,会允许用户切换成宋体印章。人脸识别三次不通过,允许切换为短信验证码方式。
  229. IsNoticeComplete int `json:"isNoticeComplete" structs:",omitempty"` // 合同签署完成后是否通知用户:1 - 是,0 - 否(默认)
  230. WaterMark int `json:"waterMark" structs:",omitempty"` // 是否在距底部10px中央位置添加日期水印: 1 - 是,0 - 否(默认)
  231. AutoSms int `json:"autoSms" structs:",omitempty"` // 是否自动触发验证码短信:(仅短信验证码方式签署时生效)1:是(默认) 0:否(需要用户手动点击“获取验证码”触发)
  232. CustomSignFlag int `json:"customSignFlag" structs:",omitempty"` // 签章位置策略:0(默认)- 由该接口的参数signStrategyList或signStrikeList指定 1 - 签署用户在签署时自行拖动签章位置 2 - 签署用户在签署时自行拖动签章位置和骑缝章位置
  233. IsIframe int `json:"isIframe" structs:",omitempty"` // 如果认证页面使用了iframe,且签约涉及人脸识别,则需传入此参数 1.是 0.否(默认) 接入方需要给iframe开启相机权限,方可正常使用实时检测人脸核身功能<iframe allow="camera;"></iframe>
  234. SignStrategyList []APISignStrategy `json:"signStrategyList" binding:"required"` // 签章策略
  235. SignStrikeList []interface{} `json:"signStrikeList" structs:",omitempty"` // 骑缝章策略
  236. ReceiverFillStrategyList []APIReceiverFillStrategy `json:"receiverFillStrategyList" structs:",omitempty"` // 接收方模板填充策略
  237. AuthConfig interface{} `json:"authConfig" structs:",omitempty"` // 添加陌生签署人认证参数配置
  238. }
  239. // APISignUserDetail 合同用户信息
  240. type APISignUserDetail struct {
  241. Account string `json:"account" binding:"required"` // 用户唯一识别码
  242. SignUrl string `json:"signUrl" binding:"required"` // 合同签署链接
  243. PwdSignUrl string `json:"pwdSignUrl" binding:"required"` // 密码签署链接
  244. SignOrder int `json:"signOrder" structs:",omitempty"` // 顺序签约的序号
  245. Name string `json:"name" binding:"required"` // 用户姓名
  246. IdCard string `json:"idCard" binding:"required"` // 用户身份证
  247. }
  248. // APIAddSignerRsp 添加签署方出参
  249. type APIAddSignerRsp struct {
  250. ContractNo string `json:"contractNo"` // 合同编号
  251. ContractName string `json:"contractName"` // 合同名称
  252. ValidityTime string `json:"validityTime"` // 合同有效期
  253. PreviewUrl string `json:"previewUrl"` // 合同预览链接
  254. SignUser []APISignUserDetail `json:"signUser"` // 合同用户信息
  255. }
  256. // APIContractStatusReq 查询合同状态入参
  257. type APIContractStatusReq struct {
  258. ContractNo string `json:"contractNo" binding:"required"` // 合同唯一编码
  259. }
  260. // APIContractStatusRsp 查询合同状态出参
  261. type APIContractStatusRsp struct {
  262. ContractNo string `json:"contractNo"` // 合同唯一编号
  263. ContractName string `json:"contractName"` // 合同名称
  264. Status int `json:"status"` // 合同状态:0:等待签约 1:签约中 2:已签约 3:过期 4:拒签 6:作废 -2:状态异常
  265. }
  266. // APIDownloadContractReq 下载合同入参
  267. type APIDownloadContractReq struct {
  268. ContractNo string `json:"contractNo" binding:"required"` // 合同唯一编码
  269. Outfile string `json:"outfile"` // 文件本地路径(下载的文件,写到本地,当文件数为1时,下载的文件类型是pdf,否则为zip)
  270. Force int `json:"force"` // 强制下载标识 0(默认):未签署完的无法下载 1:无论什么状态都强制下载
  271. DownloadFileType int `json:"downloadFileType"` // 下载文件类型,多附件下载:1:PDF文件 2:多个单张PNG文件,含PDF文件,单附件对应单张图片 3:分页PNG压缩文件,含PDF文件 4:合同单张图片,不含PDF文件 5:所有分页图片,不含PDF文件
  272. }
  273. // APIDownloadContractRsp 下载合同出参
  274. type APIDownloadContractRsp struct {
  275. FileName string `json:"fileName"` // 文件名
  276. Md5 string `json:"md5"` // 文件md5值
  277. FileType int `json:"fileType"` // 文件类型:0:PDF 1:ZIP
  278. Size int `json:"size"` // 文件大小
  279. Data string `json:"data"` // Base64字符串
  280. }