78 lines
1.8 KiB
TypeScript
78 lines
1.8 KiB
TypeScript
import { ServiceProto } from 'tsrpc-proto';
|
|
import { MsgChat } from './MsgChat';
|
|
import { ReqSend, ResSend } from './PtlSend';
|
|
|
|
// This is a demo service proto file (auto generated)
|
|
// Feel free to delete it
|
|
|
|
export interface ServiceType {
|
|
api: {
|
|
"Send": {
|
|
req: ReqSend,
|
|
res: ResSend
|
|
}
|
|
},
|
|
msg: {
|
|
"Chat": MsgChat
|
|
}
|
|
}
|
|
|
|
export const serviceProto: ServiceProto<ServiceType> = {
|
|
"services": [
|
|
{
|
|
"id": 0,
|
|
"name": "Chat",
|
|
"type": "msg"
|
|
},
|
|
{
|
|
"id": 1,
|
|
"name": "Send",
|
|
"type": "api"
|
|
}
|
|
],
|
|
"types": {
|
|
"MsgChat/MsgChat": {
|
|
"type": "Interface",
|
|
"properties": [
|
|
{
|
|
"id": 0,
|
|
"name": "content",
|
|
"type": {
|
|
"type": "String"
|
|
}
|
|
},
|
|
{
|
|
"id": 1,
|
|
"name": "time",
|
|
"type": {
|
|
"type": "Date"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"PtlSend/ReqSend": {
|
|
"type": "Interface",
|
|
"properties": [
|
|
{
|
|
"id": 0,
|
|
"name": "content",
|
|
"type": {
|
|
"type": "String"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"PtlSend/ResSend": {
|
|
"type": "Interface",
|
|
"properties": [
|
|
{
|
|
"id": 0,
|
|
"name": "time",
|
|
"type": {
|
|
"type": "Date"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}; |