[add] 新增Line登入

This commit is contained in:
建喵 2024-03-06 17:28:02 +08:00
parent 0d799db21c
commit c89cac38f8
4 changed files with 71 additions and 8 deletions

View File

@ -1,5 +1,7 @@
import { ILiffData } from "../define/interface";
export interface ReqLogin {
name: string
token: string
}
export type ResLogin = number
export type ResLogin = ILiffData

7
define/interface.ts Normal file
View File

@ -0,0 +1,7 @@
// Liff資料
export interface ILiffData {
userId: string;
displayName: string;
statusMessage: string;
pictureUrl: string;
}

View File

@ -1 +1,3 @@
export type MsgGoToGame = number
import { ILiffData } from "../define/interface";
export type MsgGoToGame = [number, [ILiffData, ILiffData]]

View File

@ -51,7 +51,7 @@ export interface ServiceType {
}
export const serviceProto: ServiceProto<ServiceType> = {
"version": 3,
"version": 6,
"services": [
{
"id": 0,
@ -114,8 +114,8 @@ export const serviceProto: ServiceProto<ServiceType> = {
"type": "Interface",
"properties": [
{
"id": 0,
"name": "name",
"id": 1,
"name": "token",
"type": {
"type": "String"
}
@ -123,7 +123,41 @@ export const serviceProto: ServiceProto<ServiceType> = {
]
},
"account/PtlLogin/ResLogin": {
"type": "Number"
"type": "Reference",
"target": "define/interface/ILiffData"
},
"define/interface/ILiffData": {
"type": "Interface",
"properties": [
{
"id": 0,
"name": "userId",
"type": {
"type": "String"
}
},
{
"id": 1,
"name": "displayName",
"type": {
"type": "String"
}
},
{
"id": 2,
"name": "statusMessage",
"type": {
"type": "String"
}
},
{
"id": 3,
"name": "pictureUrl",
"type": {
"type": "String"
}
}
]
},
"MsgChat/MsgChat": {
"type": "Interface",
@ -154,8 +188,26 @@ export const serviceProto: ServiceProto<ServiceType> = {
"type": "Number"
},
"room/MsgGoToGame/MsgGoToGame": {
"type": "Tuple",
"elementTypes": [
{
"type": "Number"
},
{
"type": "Tuple",
"elementTypes": [
{
"type": "Reference",
"target": "define/interface/ILiffData"
},
{
"type": "Reference",
"target": "define/interface/ILiffData"
}
]
}
]
},
"room/PtlChangeState/ReqChangeState": {
"type": "Interface",
"properties": [