This commit is contained in:
建喵 2023-08-31 19:28:49 +08:00
parent 3aab251c77
commit 3afa608a37
3 changed files with 133 additions and 77 deletions

5
PtlAccountLogin.ts Normal file
View File

@ -0,0 +1,5 @@
export interface ReqAccountLogin {
name: string
}
export type ResAccountLogin = number

3
PtlLobbyList.ts Normal file
View File

@ -0,0 +1,3 @@
export type ReqLobbyList = null
export type ResLobbyList = any[]

View File

@ -1,12 +1,19 @@
import { ServiceProto } from 'tsrpc-proto';
import { MsgChat } from './MsgChat';
import { ReqAccountLogin, ResAccountLogin } from './PtlAccountLogin';
import { ReqLobbyList, ResLobbyList } from './PtlLobbyList';
import { ReqSend, ResSend } from './PtlSend';
// This is a demo service proto file (auto generated)
// Feel free to delete it
export interface ServiceType {
api: {
"AccountLogin": {
req: ReqAccountLogin,
res: ResAccountLogin
},
"LobbyList": {
req: ReqLobbyList,
res: ResLobbyList
},
"Send": {
req: ReqSend,
res: ResSend
@ -18,12 +25,23 @@ export interface ServiceType {
}
export const serviceProto: ServiceProto<ServiceType> = {
"version": 2,
"services": [
{
"id": 0,
"name": "Chat",
"type": "msg"
},
{
"id": 2,
"name": "AccountLogin",
"type": "api"
},
{
"id": 3,
"name": "LobbyList",
"type": "api"
},
{
"id": 1,
"name": "Send",
@ -50,6 +68,36 @@ export const serviceProto: ServiceProto<ServiceType> = {
}
]
},
"PtlAccountLogin/ReqAccountLogin": {
"type": "Interface",
"properties": [
{
"id": 0,
"name": "name",
"type": {
"type": "String"
}
}
]
},
"PtlAccountLogin/ResAccountLogin": {
"type": "Number"
},
"PtlLobbyList/ReqLobbyList": {
"type": "Interface",
"properties": [
{
"id": 0,
"name": "name",
"type": {
"type": "String"
}
}
]
},
"PtlLobbyList/ResLobbyList": {
"type": "Number"
},
"PtlSend/ReqSend": {
"type": "Interface",
"properties": [