refactor: rename contact with user

This commit is contained in:
Tristan Yang
2022-07-04 16:12:23 +08:00
parent 6083040e2b
commit 101dbdb5ee
76 changed files with 319 additions and 286 deletions
+2 -5
View File
@@ -1,9 +1,8 @@
import { ContentType } from "./message";
export interface ChannelMember {}
export interface Message {}
export type ContentType = "text/plain" | "text/markdown" | "vocechat/file" | "vocechat/archive";
export interface PinnedMessage {
mid: number;
content: string;
@@ -17,10 +16,10 @@ export interface PinnedMessage {
export interface Channel {
gid: number;
// icon: string; // todo: check
owner: number;
name: string;
description: string;
icon?: string;
members: number[];
is_public: boolean;
avatar_updated_at: number;
@@ -37,8 +36,6 @@ export interface CreateChannelDTO {
export interface UpdateChannelDTO {
operation: "add_member" | "remove_member";
members?: number[];
// type = 'group_changed'
gid: number; // todo check
name?: string;
description?: string;
+36
View File
@@ -1,3 +1,39 @@
export interface EntityId {
id: number;
}
export interface OG {
type: string;
title: string;
url: string;
images: [
{
type?: string;
url: string;
secure_url?: string;
width?: number;
height?: number;
alt?: string;
}
];
audios: [
{
type?: string;
url: string;
secure_url?: string;
}
];
videos: [
{
type?: string;
url: string;
secure_url?: string;
width: number;
height: number;
}
];
favicon_url?: string;
description?: string;
locale?: string;
locale_alternate?: [];
site_name?: string;
}
+1
View File
@@ -0,0 +1 @@
export type ContentType = "text/plain" | "text/markdown" | "vocechat/file" | "vocechat/archive";
+3 -1
View File
@@ -1,5 +1,6 @@
import { User } from "./auth";
import { Channel, ContentType } from "./channel";
import { Channel } from "./channel";
import { ContentType } from "./message";
export interface ReadyEvent {
type: "ready";
@@ -75,6 +76,7 @@ export interface RelatedGroupsEvent {
}
export interface NormalMessage {
mid: number;
type: "normal";
properties: {};
content_type: ContentType;