Commit 9043604a authored by zhangke's avatar zhangke

chain-service

parent 1bb33f72
- [ ] app-service - jqy - [ ] app-service - jqy
- [x] auth-service - zk - [x] auth-service - zk
- [ ] chain-service - zk - [x] chain-service - zk
- [ ] cloud-service - zk - [ ] cloud-service - zk
- [x] commodity-service - gxk - [x] commodity-service - gxk
- [x] common-service - gxk - [x] common-service - gxk
......
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
@Serializable()
export class ChainAddress extends Model<ChainAddress> {
/**
* 获取账户下的地址列表
* @param payload
*/
static async get(payload: ChainAddressGetReq) {
return await api.get<HttpResponse>('/services/chain-service/address', { params: payload })
}
/**
* 生成一个地址
* @param payload
*/
static async post(payload: ChainAddressPostReq) {
return await api.post<HttpResponse>('/services/chain-service/address', { data: payload })
}
/**
* 修改地址信息
* @param payload
*/
static async put(payload: ChainAddressPutReq) {
return await api.put<HttpResponse>('/services/chain-service/address', { data: payload })
}
/**
* 删除地址
* @param payload
*/
static async delete(payload: ChainAddressDeleteReq) {
return await api.delete<HttpResponse>(`/services/chain-service/address/${payload.aid}`)
}
}
@Serializable()
export class ChainAddressGetReq extends Model<ChainAddressGetReq> {
@JsonProperty() pageNum: number
@JsonProperty() pageSize: number
}
@Serializable()
export class ChainAddressPostReq extends Model<ChainAddressPostReq> {
@JsonProperty() name: string
@JsonProperty() note: string
@JsonProperty() privKey?: string
}
@Serializable()
export class ChainAddressPutReq extends Model<ChainAddressPutReq> {
@JsonProperty() aid: string
@JsonProperty() name: string
@JsonProperty() note: string
}
@Serializable()
export class ChainAddressDeleteReq extends Model<ChainAddressDeleteReq> {
@JsonProperty() aid: string
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
@Serializable()
export class ChainAddressCheckName extends Model<ChainAddressCheckName> {
/**
* 校验地址名称是否唯一
* @param payload
*/
static async get(payload: ChainAddressCheckNameGetReq) {
return await api.get<HttpResponse>('/services/chain-service/address/check-name', { params: payload })
}
}
@Serializable()
export class ChainAddressCheckNameGetReq extends Model<ChainAddressCheckNameGetReq> {
@JsonProperty() name: string
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
@Serializable()
export class ChainAddressExport extends Model<ChainAddressExport> {
/**
* 导出地址
* @param payload
*/
static async get(payload: ChainAddressExportGetReq) {
return await api.get<HttpResponse>('/services/chain-service/address/export', { params: payload })
}
}
@Serializable()
export class ChainAddressExportGetReq extends Model<ChainAddressExportGetReq> {
@JsonProperty() phone: string
@JsonProperty() verifyCode: number
@JsonProperty() addrId: number
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
@Serializable()
export class ChainAddressImport extends Model<ChainAddressImport> {
/**
* 导入地址
* @param payload
*/
static async post(payload: ChainAddressImportPostReq) {
return await api.post<HttpResponse>('/services/chain-service/address/import', { data: payload })
}
}
@Serializable()
export class ChainAddressImportPostReq extends Model<ChainAddressImportPostReq> {
@JsonProperty() addrName: string
@JsonProperty() mnemonic: string
@JsonProperty() privateKey: string
@JsonProperty() tag: number
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
@Serializable()
export class ChainAddressPrivate extends Model<ChainAddressPrivate> {
/**
* 查看地址私钥
* @param payload
*/
static async get(payload: ChainAddressPrivateGetReq) {
return await api.get<HttpResponse>('/services/chain-service/address/private', { params: payload })
}
}
@Serializable()
export class ChainAddressPrivateGetReq extends Model<ChainAddressPrivateGetReq> {
@JsonProperty() id: string
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
import { ChainTypeEnum } from '@shared/models/chain-service/enums/ChainTypeEnum'
@Serializable()
export class ChainChainId extends Model<ChainChainId> {
@JsonProperty() chain_type: ChainTypeEnum
/**
* 查看指定的的链信息
* @param payload
*/
static async get(payload: ChainChainIdGetReq) {
return await api.get<HttpResponse>(`/services/chain-service/${payload.chain_type}/${payload.chain_id}`)
}
}
@Serializable()
export class ChainChainIdGetReq extends ChainChainId {
@JsonProperty() chain_id: string
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
import { ChainTypeEnum } from '@shared/models/chain-service/enums/ChainTypeEnum'
@Serializable()
export class ChainChainIdNode extends Model<ChainChainIdNode> {
@JsonProperty() chain_type: ChainTypeEnum
/**
* 获取节点列表
* @param payload
*/
static async get(payload: ChainChainIdNodeGetReq) {
return await api.get<HttpResponse>(`/services/chain-service/${payload.chain_type}/${payload.chain_id}/node`, {
params: payload,
})
}
}
@Serializable()
export class ChainChainIdNodeGetReq extends ChainChainIdNode {
@JsonProperty() chain_id: string
@JsonProperty() pageNum: number
@JsonProperty() pageSize: number
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
import { ChainTypeEnum } from '@shared/models/chain-service/enums/ChainTypeEnum'
@Serializable()
export class ChainChainIdNodeIdNode extends Model<ChainChainIdNodeIdNode> {
@JsonProperty() chain_type: ChainTypeEnum
/**
* 删除节点
* @param payload
*/
static async delete(payload: ChainChainIdNodeIdNodeDeleteReq) {
return await api.delete<HttpResponse>(
`/services/chain-service/${payload.chain_type}/${payload.chain_id}/node/${payload.node_id}`,
)
}
}
@Serializable()
export class ChainChainIdNodeIdNodeDeleteReq extends ChainChainIdNodeIdNode {
@JsonProperty() chain_id: string
@JsonProperty() node_id: string
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
@Serializable()
export class ChainChangeOrder extends Model<ChainChangeOrder> {
/**
* 初始化变更订单(服务器规格变更)
* @param payload
*/
static async post(payload: ChainChangeOrderPostReq) {
return await api.post<HttpResponse>('/services/chain-service/chain/change/order', { data: payload })
}
}
@Serializable()
export class ChainChangeOrderPostReq extends Model<ChainChangeOrderPostReq> {
@JsonProperty() nodeId: string
@JsonProperty() profileRef: number
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
import { ChainTypeEnum } from '@shared/models/chain-service/enums/ChainTypeEnum'
@Serializable()
export class ChainCheckLicenseNum extends Model<ChainCheckLicenseNum> {
@JsonProperty() chain_type: ChainTypeEnum
/**
* 校验License中的链相关限制
* @param payload
*/
static async get(payload: ChainCheckLicenseNumGetReq) {
return await api.get<HttpResponse>(`/services/chain-service/${payload.chain_type}/check-license-num`, {
params: payload,
})
}
}
@Serializable()
export class ChainCheckLicenseNumGetReq extends ChainCheckLicenseNum {
@JsonProperty() chain_id: string
@JsonProperty() nodeSize?: number
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
import { ChainTypeEnum } from '@shared/models/chain-service/enums/ChainTypeEnum'
@Serializable()
export class ChainCheckName extends Model<ChainCheckName> {
@JsonProperty() chain_type: ChainTypeEnum
/**
* 校验校验链参数是否唯一
* @param payload
*/
static async get(payload: ChainCheckNameGetReq) {
return await api.get<HttpResponse>(`/services/chain-service/${payload.chain_type}/check-name`, { params: payload })
}
}
@Serializable()
export class ChainCheckNameGetReq extends ChainCheckName {
@JsonProperty() name: string
@JsonProperty() title: string
@JsonProperty() mainChainId?: string
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
import { ChainTypeEnum } from '@shared/models/chain-service/enums/ChainTypeEnum'
@Serializable()
export class ChainDeleteChainIdPurge extends Model<ChainDeleteChainIdPurge> {
@JsonProperty() chain_type: ChainTypeEnum
/**
* 删除指定链
* @param payload
*/
static async delete(payload: ChainDeleteChainIdPurgeDeleteReq) {
return await api.delete<HttpResponse>(
`/services/chain-service/chain/delete/${payload.chain_type}/${payload.chain_id}/${payload.purge}`,
)
}
}
@Serializable()
export class ChainDeleteChainIdPurgeDeleteReq extends ChainDeleteChainIdPurge {
@JsonProperty() chain_id: string
@JsonProperty() purge: string
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
@Serializable()
export class ChainDeploy extends Model<ChainDeploy> {
/**
* 部署指定链,指定节点
* @param payload
*/
static async put(payload: ChainDeployPutReq) {
return await api.put<HttpResponse>('/services/chain-service/deploy', { data: payload })
}
}
@Serializable()
export class ChainDeployPutReq extends Model<ChainDeployPutReq> {
@JsonProperty() chainId: string
@JsonProperty() nodes: string[]
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
@Serializable()
export class ChainDeployExplorerChainId extends Model<ChainDeployExplorerChainId> {
/**
* 部署指定链的浏览器
* @param payload
*/
static async put(payload: ChainDeployExplorerChainIdPutReq) {
return await api.put<HttpResponse>('/services/chain-service/deploy/explorer/{chain_id}', { data: payload })
}
}
@Serializable()
export class ChainDeployExplorerChainIdPutReq extends Model<ChainDeployExplorerChainIdPutReq> {
@JsonProperty() chain_id: string
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
@Serializable()
export class ChainExistContractChainId extends Model<ChainExistContractChainId> {
/**
* 链是否部署合约
* @param payload
*/
static async get(payload: ChainExistContractChainIdGetReq) {
return await api.get<HttpResponse>(`/services/chain-service/chain/exist-contract/${payload.chain_id}`)
}
}
@Serializable()
export class ChainExistContractChainIdGetReq extends Model<ChainExistContractChainIdGetReq> {
@JsonProperty() chain_id: string
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
@Serializable()
export class ChainExplorerInfoChainId extends Model<ChainExplorerInfoChainId> {
/**
* 查询指定浏览器节点
* @param payload
*/
static async get(payload: ChainExplorerInfoChainIdGetReq) {
return await api.get<HttpResponse>(`/services/chain-service/explorer/info/${payload.chain_id}`)
}
}
@Serializable()
export class ChainExplorerInfoChainIdGetReq extends Model<ChainExplorerInfoChainIdGetReq> {
@JsonProperty() chain_id: string
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
@Serializable()
export class ChainImportDeploy extends Model<ChainImportDeploy> {
/**
* 链导入时,部署指定链的监控客户端
* @param payload
*/
static async put(payload: ChainImportDeployPutReq) {
return await api.put<HttpResponse>('/services/chain-service/import/deploy', { data: payload })
}
}
@Serializable()
export class ChainImportDeployPutReq extends Model<ChainImportDeployPutReq> {
@JsonProperty() chainId: string
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
import { ChainTypeEnum } from '@shared/models/chain-service/enums/ChainTypeEnum'
@Serializable()
export class ChainManageLogType extends Model<ChainManageLogType> {
@JsonProperty() chain_type: ChainTypeEnum
/**
* 根据当前登录类型查询链列表
* @param payload
*/
static async get(payload: ChainManageLogTypeGetReq) {
return await api.get<HttpResponse>(`/services/chain-service/${payload.chain_type}/manage/login-type`)
}
}
@Serializable()
export class ChainManageLogTypeGetReq extends ChainManageLogType {}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
@Serializable()
export class ChainNodeBindIp extends Model<ChainNodeBindIp> {
/**
* 节点绑定Ip地址
* @param payload
*/
static async put(payload: ChainNodeBindIpPutReq) {
return await api.put<HttpResponse>('/services/chain-service/node/bind-ip', { data: payload })
}
}
@Serializable()
export class ChainNodeBindIpPutReq extends Model<ChainNodeBindIpPutReq> {
@JsonProperty() nodeId: string
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
@Serializable()
export class ChainNodeProfileInfoNodeId extends Model<ChainNodeProfileInfoNodeId> {
/**
* 云节点获取规格信息
* @param payload
*/
static async get(payload: ChainNodeProfileInfoNodeIdGetReq) {
return await api.get<HttpResponse>(`/services/chain-service/node/profile/info/${payload.nodeId}`, {
params: payload,
})
}
}
@Serializable()
export class ChainNodeProfileInfoNodeIdGetReq extends Model<ChainNodeProfileInfoNodeIdGetReq> {
@JsonProperty() nodeId: string
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
@Serializable()
export class ChainNodeRole extends Model<ChainNodeRole> {
/**
* 转换节点类型
* @param payload
*/
static async put(payload: ChainNodeRolePutReq) {
return await api.put<HttpResponse>('/services/chain-service/node-role', { data: payload })
}
}
@Serializable()
export class ChainNodeRolePutReq extends Model<ChainNodeRolePutReq> {
@JsonProperty() chain_id: string
@JsonProperty() node_id: string
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
@Serializable()
export class ChainNodeUnBindIpNodeIp extends Model<ChainNodeUnBindIpNodeIp> {
/**
* 节点解绑Ip地址
* @param payload
*/
static async delete(payload: ChainNodeUnBindIpNodeIpDeleteReq) {
return await api.delete<HttpResponse>(`/services/chain-service/node/un-bind-ip/${payload.nodeId}`)
}
}
@Serializable()
export class ChainNodeUnBindIpNodeIpDeleteReq extends Model<ChainNodeUnBindIpNodeIpDeleteReq> {
@JsonProperty() nodeId: string
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
@Serializable()
export class ChainNodeUserExists extends Model<ChainNodeUserExists> {
/**
* 获取用户是否有修改节点的权限
* @param payload
*/
static async get(payload: ChainNodeUserExistsGetReq) {
return await api.get<HttpResponse>('/services/chain-service/node/user/exists', { params: payload })
}
}
@Serializable()
export class ChainNodeUserExistsGetReq extends Model<ChainNodeUserExistsGetReq> {
@JsonProperty() nodeId: string
@JsonProperty() userId: string
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
import { ChainTypeEnum } from '@shared/models/chain-service/enums/ChainTypeEnum'
@Serializable()
export class ChainPage extends Model<ChainPage> {
@JsonProperty() chain_type: ChainTypeEnum
/**
* 查询所有当前链
* @param payload
*/
static async get(payload: ChainPageGetReq) {
return await api.get<HttpResponse>(`/services/chain-service/${payload.chain_type}/page`, { params: payload })
}
}
@Serializable()
export class ChainPageGetReq extends ChainPage {
@JsonProperty() fedName: string
@JsonProperty() pageNum: number
@JsonProperty() pageSize: number
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
import { ChainTypeEnum } from '@shared/models/chain-service/enums/ChainTypeEnum'
@Serializable()
export class ChainRedoChainId extends Model<ChainRedoChainId> {
@JsonProperty() chain_type: ChainTypeEnum
/**
* 链重试
* @param payload
*/
static async put(payload: ChainRedoChainIdPutReq) {
return await api.put<HttpResponse>(`/services/chain-service/redo/${payload.chain_type}/${payload.chain_id}`)
}
}
@Serializable()
export class ChainRedoChainIdPutReq extends ChainRedoChainId {
@JsonProperty() chain_id: string
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
import { ChainTypeEnum } from '@shared/models/chain-service/enums/ChainTypeEnum'
@Serializable()
export class ChainRedoChainIdNodeId extends Model<ChainRedoChainIdNodeId> {
@JsonProperty() chain_type: ChainTypeEnum
/**
* 节点重试
* @param payload
*/
static async put(payload: ChainRedoChainIdNodeIdPutReq) {
return await api.put<HttpResponse>(
`/services/chain-service/redo/${payload.chain_type}/${payload.chain_id}/${payload.node_id}`,
)
}
}
@Serializable()
export class ChainRedoChainIdNodeIdPutReq extends ChainRedoChainIdNodeId {
@JsonProperty() chain_id: string
@JsonProperty() node_id: string
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
@Serializable()
export class ChainSshKey extends Model<ChainSshKey> {
/**
* 密钥列表查询
* @param payload
*/
static async get(payload: ChainSshKeyGetReq) {
return await api.get<HttpResponse>('/services/chain-service/ssh-key', { params: payload })
}
/**
* 生成私钥
* @param payload
*/
static async post(payload: ChainSshKeyPostReq) {
return await api.post<HttpResponse>('/services/chain-service/ssh-key', { data: payload })
}
}
@Serializable()
export class ChainSshKeyGetReq extends Model<ChainSshKeyGetReq> {
@JsonProperty() pageNum: number
@JsonProperty() pageSize: number
}
@Serializable()
export class ChainSshKeyPostReq extends Model<ChainSshKeyPostReq> {
@JsonProperty() name: string
}
import { Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
@Serializable()
export class ChainSshKeyDefault extends Model<ChainSshKeyDefault> {
/**
* 导出系统公钥
*/
static async get() {
return await api.get<HttpResponse>('/services/chain-service/ssh-key/default-ssh-key')
}
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
@Serializable()
export class ChainSshKeyId extends Model<ChainSshKeyId> {
@JsonProperty() id: string
/**
* 导出公钥
* @param payload
*/
static async get(payload: ChainSshKeyIdGetReq) {
return await api.get<HttpResponse>(`/services/chain-service/ssh-key/${payload.id}`)
}
/**
* 删除私钥
* @param payload
*/
static async delete(payload: ChainSshKeyIdDeleteReq) {
return await api.delete<HttpResponse>(`/services/chain-service/ssh-key/${payload.id}`)
}
}
@Serializable()
export class ChainSshKeyIdGetReq extends ChainSshKeyId {}
@Serializable()
export class ChainSshKeyIdDeleteReq extends ChainSshKeyId {}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
@Serializable()
export class ChainSshKeyImport extends Model<ChainSshKeyImport> {
/**
* 导入私钥
* @param payload
*/
static async post(payload: ChainSshKeyImportPostReq) {
return await api.post<HttpResponse>('/services/chain-service/ssh-key/import', { data: payload })
}
}
@Serializable()
export class ChainSshKeyImportPostReq extends Model<ChainSshKeyImportPostReq> {
@JsonProperty() name: string
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
@Serializable()
export class ChainSshKeyPrivkeyId extends Model<ChainSshKeyPrivkeyId> {
/**
* 导出私钥
* @param payload
*/
static async get(payload) {
return await api.get<HttpResponse>(`/services/chain-service/ssh-key/decrypted-priv-key/${payload.id}`, {
params: payload,
})
}
}
@Serializable()
export class ChainSshKeyPrivkeyIdGetReq extends Model<ChainSshKeyPrivkeyIdGetReq> {
@JsonProperty() id: number
@JsonProperty() phone: string
@JsonProperty() verifyCode: string
}
import { JsonProperty, Serializable } from 'typescript-json-serializer'
import { api } from '@shared/http/axios'
import { HttpResponse } from '@shared/http/HttpResponse'
import { Model } from '@shared/models/Model'
@Serializable()
export class ChainVersion extends Model<ChainVersion> {
/**
* 获取版本列表
* @param payload
*/
static async get(payload: ChainVersionGetReq) {
return await api.get<HttpResponse>('/services/chain-service/chain-version', { params: payload })
}
/**
* 更新版本信息
* @param payload
*/
static async put(payload: ChainVersionPutReq) {
return await api.put<HttpResponse>('/services/chain-service/chain-version', { data: payload })
}
/**
* 删除版本信息
* @param payload
*/
static async delete(payload: ChainVersionDeleteReq) {
return await api.delete<HttpResponse>('/services/chain-service/chain-version', { data: payload })
}
}
@Serializable()
export class ChainVersionGetReq extends Model<ChainVersionGetReq> {
@JsonProperty() pageNum: number
@JsonProperty() pageSize: number
}
@Serializable()
export class ChainVersionPutReq extends Model<ChainVersionPutReq> {
@JsonProperty() chainUrl: string
@JsonProperty() content: string
@JsonProperty() createTime: number
@JsonProperty() externalChainUrl: string
@JsonProperty() id: number
@JsonProperty() operator: string
@JsonProperty() packageName: string
@JsonProperty() status: number
@JsonProperty() updateTime: string
@JsonProperty() version: string
}
@Serializable()
export class ChainVersionDeleteReq extends Model<ChainVersionDeleteReq> {
@JsonProperty() chainUrl: string
@JsonProperty() content: string
@JsonProperty() createTime: number
@JsonProperty() externalChainUrl: string
@JsonProperty() id: number
@JsonProperty() operator: string
@JsonProperty() packageName: string
@JsonProperty() status: number
@JsonProperty() updateTime: string
@JsonProperty() version: string
}
export enum ChainTypeEnum {
'consortium',
'para',
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment