Skip to content

Commit d5f887e

Browse files
committed
feat: 🎸 channel type and channel live data
1 parent 7cdf1f0 commit d5f887e

3 files changed

Lines changed: 15 additions & 2 deletions

File tree

‎src/mods/types.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {
1212
PostType,
1313
TapType,
1414
sayableTypes,
15+
ChannelType,
1516

1617
CHAT_EVENT_DICT,
1718
PUPPET_EVENT_DICT,
@@ -32,6 +33,7 @@ export {
3233
PostType as Post,
3334
TapType as Tap,
3435
sayableTypes as Sayable,
36+
ChannelType as Channel,
3537
/**
3638
* Huan(202201): `DirtyType as Payload` will be removed after Dec 31, 2023
3739
* @deprecated: use Dirty instead of Payload

‎src/schemas/channel.ts‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,13 @@ export interface ChannelPayload {
77
nickname: string,
88
thumbUrl: string,
99
url: string,
10+
objectId?: string,
11+
objectNonceId?: string,
12+
}
13+
14+
export enum ChannelType {
15+
Unknown = 0,
16+
Photo = 2,
17+
Video = 4,
18+
Live = 9,
1019
}

‎src/schemas/mod.ts‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,9 @@ import type {
9292
ChatEventName,
9393
} from './puppet.js'
9494

95-
import type {
96-
ChannelPayload,
95+
import {
96+
type ChannelPayload,
97+
ChannelType,
9798
} from './channel.js'
9899

99100
import {
@@ -125,6 +126,7 @@ export {
125126
sayableTypes,
126127
ScanStatus,
127128
TapType,
129+
ChannelType,
128130
type ChatEventName,
129131
type ContactPayload,
130132
type ContactQueryFilter,

0 commit comments

Comments
 (0)