apiModels.go 35 KB

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