52 lines
1.1 KiB
TypeScript
52 lines
1.1 KiB
TypeScript
|
import { ServiceProto } from 'tsrpc-proto';
|
||
|
import { ReqTest, ResTest } from './PtlTest'
|
||
|
|
||
|
export interface ServiceType {
|
||
|
req: {
|
||
|
"Test": ReqTest
|
||
|
},
|
||
|
res: {
|
||
|
"Test": ResTest
|
||
|
},
|
||
|
msg: {
|
||
|
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export const serviceProto: ServiceProto<ServiceType> = {
|
||
|
"services": [
|
||
|
{
|
||
|
"id": 0,
|
||
|
"name": "Test",
|
||
|
"type": "api",
|
||
|
"req": "PtlTest/ReqTest",
|
||
|
"res": "PtlTest/ResTest"
|
||
|
}
|
||
|
],
|
||
|
"types": {
|
||
|
"PtlTest/ReqTest": {
|
||
|
"type": "Interface",
|
||
|
"properties": [
|
||
|
{
|
||
|
"id": 0,
|
||
|
"name": "name",
|
||
|
"type": {
|
||
|
"type": "String"
|
||
|
}
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"PtlTest/ResTest": {
|
||
|
"type": "Interface",
|
||
|
"properties": [
|
||
|
{
|
||
|
"id": 0,
|
||
|
"name": "reply",
|
||
|
"type": {
|
||
|
"type": "String"
|
||
|
}
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
}
|
||
|
};
|