examples to new tsrpc-cli

This commit is contained in:
King Wang
2021-10-07 15:30:02 +08:00
parent c21445548e
commit 69a90884d5
86 changed files with 652 additions and 1697 deletions

View File

@@ -0,0 +1 @@
../../../backend/src/shared

View File

@@ -1,12 +0,0 @@
{
"ver": "1.1.0",
"importer": "directory",
"imported": true,
"uuid": "ba5a8782-c57d-437b-9371-4441de673229",
"files": [],
"subMetas": {},
"userData": {
"compressionType": {},
"isRemoteBundle": {}
}
}

View File

@@ -1,4 +0,0 @@
export interface MsgChat {
content: string,
time: Date
}

View File

@@ -1,9 +0,0 @@
{
"ver": "4.0.22",
"importer": "typescript",
"imported": true,
"uuid": "bd48404c-a47a-4bbc-b177-19352bd570bf",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@@ -1,7 +0,0 @@
export interface ReqSend {
content: string
}
export interface ResSend {
time: Date
}

View File

@@ -1,9 +0,0 @@
{
"ver": "4.0.22",
"importer": "typescript",
"imported": true,
"uuid": "2a458e30-4c4a-4f1a-9aff-05ea0bdf0ab6",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@@ -1,75 +0,0 @@
import { ServiceProto } from 'tsrpc-proto';
import { MsgChat } from './MsgChat';
import { ReqSend, ResSend } from './PtlSend';
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"
}
}
]
}
}
};

View File

@@ -1,9 +0,0 @@
{
"ver": "4.0.22",
"importer": "typescript",
"imported": true,
"uuid": "56f77762-3150-4a83-ab4a-15025fd73ade",
"files": [],
"subMetas": {},
"userData": {}
}