update entity telegram
This commit is contained in:
@ -37,6 +37,7 @@ import { SummarizeLog } from "./entity/summarize_log";
|
|||||||
import { SummarizeLogStatus, SummarizeType } from "./types/summarize";
|
import { SummarizeLogStatus, SummarizeType } from "./types/summarize";
|
||||||
import { Goods } from "./entity/goods";
|
import { Goods } from "./entity/goods";
|
||||||
import { Supplier } from "./entity/supplier";
|
import { Supplier } from "./entity/supplier";
|
||||||
|
import { TelegramBody, TelegramResponseSend } from "./types/telegram";
|
||||||
|
|
||||||
export {
|
export {
|
||||||
User, //
|
User, //
|
||||||
@ -54,6 +55,8 @@ export {
|
|||||||
RoleList,
|
RoleList,
|
||||||
Status,
|
Status,
|
||||||
EmailBody,
|
EmailBody,
|
||||||
|
TelegramBody,
|
||||||
|
TelegramResponseSend,
|
||||||
Product,
|
Product,
|
||||||
Branch,
|
Branch,
|
||||||
Menu,
|
Menu,
|
||||||
|
|||||||
31
src/types/telegram.ts
Normal file
31
src/types/telegram.ts
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
export class TelegramBody {
|
||||||
|
to: string;
|
||||||
|
message: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface TelegramResponseSend {
|
||||||
|
ok: boolean
|
||||||
|
result: ResultResponseSend
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ResultResponseSend {
|
||||||
|
message_id: number
|
||||||
|
from: FromResponseSend
|
||||||
|
chat: ChatResponseSend
|
||||||
|
date: number
|
||||||
|
text: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface FromResponseSend {
|
||||||
|
id: number
|
||||||
|
is_bot: boolean
|
||||||
|
first_name: string
|
||||||
|
username: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ChatResponseSend {
|
||||||
|
id: number
|
||||||
|
title: string
|
||||||
|
type: string
|
||||||
|
all_members_are_administrators: boolean
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user