@atproto/api 0.19.8 → 0.19.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/dist/client/index.d.ts +58 -0
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +241 -16
- package/dist/client/index.js.map +1 -1
- package/dist/client/lexicons.d.ts +7241 -4059
- package/dist/client/lexicons.d.ts.map +1 -1
- package/dist/client/lexicons.js +2053 -283
- package/dist/client/lexicons.js.map +1 -1
- package/dist/client/types/app/bsky/actor/defs.d.ts +1 -0
- package/dist/client/types/app/bsky/actor/defs.d.ts.map +1 -1
- package/dist/client/types/app/bsky/actor/defs.js.map +1 -1
- package/dist/client/types/app/bsky/embed/images.d.ts +1 -1
- package/dist/client/types/app/bsky/embed/images.d.ts.map +1 -1
- package/dist/client/types/app/bsky/embed/images.js.map +1 -1
- package/dist/client/types/chat/bsky/actor/declaration.d.ts +2 -0
- package/dist/client/types/chat/bsky/actor/declaration.d.ts.map +1 -1
- package/dist/client/types/chat/bsky/actor/declaration.js.map +1 -1
- package/dist/client/types/chat/bsky/actor/defs.d.ts +20 -0
- package/dist/client/types/chat/bsky/actor/defs.d.ts.map +1 -1
- package/dist/client/types/chat/bsky/actor/defs.js +18 -0
- package/dist/client/types/chat/bsky/actor/defs.js.map +1 -1
- package/dist/client/types/chat/bsky/convo/acceptConvo.d.ts +4 -1
- package/dist/client/types/chat/bsky/convo/acceptConvo.d.ts.map +1 -1
- package/dist/client/types/chat/bsky/convo/acceptConvo.js +15 -0
- package/dist/client/types/chat/bsky/convo/acceptConvo.js.map +1 -1
- package/dist/client/types/chat/bsky/convo/addReaction.d.ts +6 -0
- package/dist/client/types/chat/bsky/convo/addReaction.d.ts.map +1 -1
- package/dist/client/types/chat/bsky/convo/addReaction.js +17 -1
- package/dist/client/types/chat/bsky/convo/addReaction.js.map +1 -1
- package/dist/client/types/chat/bsky/convo/defs.d.ts +293 -3
- package/dist/client/types/chat/bsky/convo/defs.d.ts.map +1 -1
- package/dist/client/types/chat/bsky/convo/defs.js +288 -0
- package/dist/client/types/chat/bsky/convo/defs.js.map +1 -1
- package/dist/client/types/chat/bsky/convo/deleteMessageForSelf.d.ts +7 -1
- package/dist/client/types/chat/bsky/convo/deleteMessageForSelf.d.ts.map +1 -1
- package/dist/client/types/chat/bsky/convo/deleteMessageForSelf.js +23 -0
- package/dist/client/types/chat/bsky/convo/deleteMessageForSelf.js.map +1 -1
- package/dist/client/types/chat/bsky/convo/getConvo.d.ts +4 -1
- package/dist/client/types/chat/bsky/convo/getConvo.d.ts.map +1 -1
- package/dist/client/types/chat/bsky/convo/getConvo.js +15 -0
- package/dist/client/types/chat/bsky/convo/getConvo.js.map +1 -1
- package/dist/client/types/chat/bsky/convo/getConvoForMembers.d.ts +16 -1
- package/dist/client/types/chat/bsky/convo/getConvoForMembers.d.ts.map +1 -1
- package/dist/client/types/chat/bsky/convo/getConvoForMembers.js +47 -0
- package/dist/client/types/chat/bsky/convo/getConvoForMembers.js.map +1 -1
- package/dist/client/types/chat/bsky/convo/getConvoMembers.d.ts +29 -0
- package/dist/client/types/chat/bsky/convo/getConvoMembers.d.ts.map +1 -0
- package/dist/client/types/chat/bsky/convo/getConvoMembers.js +26 -0
- package/dist/client/types/chat/bsky/convo/getConvoMembers.js.map +1 -0
- package/dist/client/types/chat/bsky/convo/getLog.d.ts +1 -1
- package/dist/client/types/chat/bsky/convo/getLog.d.ts.map +1 -1
- package/dist/client/types/chat/bsky/convo/getLog.js.map +1 -1
- package/dist/client/types/chat/bsky/convo/getMessages.d.ts +5 -2
- package/dist/client/types/chat/bsky/convo/getMessages.d.ts.map +1 -1
- package/dist/client/types/chat/bsky/convo/getMessages.js +15 -0
- package/dist/client/types/chat/bsky/convo/getMessages.js.map +1 -1
- package/dist/client/types/chat/bsky/convo/leaveConvo.d.ts +7 -1
- package/dist/client/types/chat/bsky/convo/leaveConvo.d.ts.map +1 -1
- package/dist/client/types/chat/bsky/convo/leaveConvo.js +23 -0
- package/dist/client/types/chat/bsky/convo/leaveConvo.js.map +1 -1
- package/dist/client/types/chat/bsky/convo/listConvoRequests.d.ts +29 -0
- package/dist/client/types/chat/bsky/convo/listConvoRequests.d.ts.map +1 -0
- package/dist/client/types/chat/bsky/convo/listConvoRequests.js +11 -0
- package/dist/client/types/chat/bsky/convo/listConvoRequests.js.map +1 -0
- package/dist/client/types/chat/bsky/convo/listConvos.d.ts +3 -0
- package/dist/client/types/chat/bsky/convo/listConvos.d.ts.map +1 -1
- package/dist/client/types/chat/bsky/convo/listConvos.js.map +1 -1
- package/dist/client/types/chat/bsky/convo/lockConvo.d.ts +34 -0
- package/dist/client/types/chat/bsky/convo/lockConvo.d.ts.map +1 -0
- package/dist/client/types/chat/bsky/convo/lockConvo.js +42 -0
- package/dist/client/types/chat/bsky/convo/lockConvo.js.map +1 -0
- package/dist/client/types/chat/bsky/convo/muteConvo.d.ts +4 -1
- package/dist/client/types/chat/bsky/convo/muteConvo.d.ts.map +1 -1
- package/dist/client/types/chat/bsky/convo/muteConvo.js +15 -0
- package/dist/client/types/chat/bsky/convo/muteConvo.js.map +1 -1
- package/dist/client/types/chat/bsky/convo/removeReaction.d.ts +6 -0
- package/dist/client/types/chat/bsky/convo/removeReaction.d.ts.map +1 -1
- package/dist/client/types/chat/bsky/convo/removeReaction.js +17 -1
- package/dist/client/types/chat/bsky/convo/removeReaction.js.map +1 -1
- package/dist/client/types/chat/bsky/convo/sendMessage.d.ts +7 -1
- package/dist/client/types/chat/bsky/convo/sendMessage.d.ts.map +1 -1
- package/dist/client/types/chat/bsky/convo/sendMessage.js +23 -0
- package/dist/client/types/chat/bsky/convo/sendMessage.js.map +1 -1
- package/dist/client/types/chat/bsky/convo/sendMessageBatch.d.ts +7 -1
- package/dist/client/types/chat/bsky/convo/sendMessageBatch.d.ts.map +1 -1
- package/dist/client/types/chat/bsky/convo/sendMessageBatch.js +23 -0
- package/dist/client/types/chat/bsky/convo/sendMessageBatch.js.map +1 -1
- package/dist/client/types/chat/bsky/convo/unlockConvo.d.ts +31 -0
- package/dist/client/types/chat/bsky/convo/unlockConvo.d.ts.map +1 -0
- package/dist/client/types/chat/bsky/convo/unlockConvo.js +34 -0
- package/dist/client/types/chat/bsky/convo/unlockConvo.js.map +1 -0
- package/dist/client/types/chat/bsky/convo/unmuteConvo.d.ts +4 -1
- package/dist/client/types/chat/bsky/convo/unmuteConvo.d.ts.map +1 -1
- package/dist/client/types/chat/bsky/convo/unmuteConvo.js +15 -0
- package/dist/client/types/chat/bsky/convo/unmuteConvo.js.map +1 -1
- package/dist/client/types/chat/bsky/convo/updateRead.d.ts +4 -1
- package/dist/client/types/chat/bsky/convo/updateRead.d.ts.map +1 -1
- package/dist/client/types/chat/bsky/convo/updateRead.js +15 -0
- package/dist/client/types/chat/bsky/convo/updateRead.js.map +1 -1
- package/dist/client/types/chat/bsky/group/addMembers.d.ts +55 -0
- package/dist/client/types/chat/bsky/group/addMembers.d.ts.map +1 -0
- package/dist/client/types/chat/bsky/group/addMembers.js +90 -0
- package/dist/client/types/chat/bsky/group/addMembers.js.map +1 -0
- package/dist/client/types/chat/bsky/group/approveJoinRequest.d.ts +35 -0
- package/dist/client/types/chat/bsky/group/approveJoinRequest.d.ts.map +1 -0
- package/dist/client/types/chat/bsky/group/approveJoinRequest.js +42 -0
- package/dist/client/types/chat/bsky/group/approveJoinRequest.js.map +1 -0
- package/dist/client/types/chat/bsky/group/createGroup.d.ts +41 -0
- package/dist/client/types/chat/bsky/group/createGroup.d.ts.map +1 -0
- package/dist/client/types/chat/bsky/group/createGroup.js +58 -0
- package/dist/client/types/chat/bsky/group/createGroup.js.map +1 -0
- package/dist/client/types/chat/bsky/group/createJoinLink.d.ts +36 -0
- package/dist/client/types/chat/bsky/group/createJoinLink.d.ts.map +1 -0
- package/dist/client/types/chat/bsky/group/createJoinLink.js +42 -0
- package/dist/client/types/chat/bsky/group/createJoinLink.js.map +1 -0
- package/dist/client/types/chat/bsky/group/defs.d.ts +35 -0
- package/dist/client/types/chat/bsky/group/defs.d.ts.map +1 -0
- package/dist/client/types/chat/bsky/group/defs.js +34 -0
- package/dist/client/types/chat/bsky/group/defs.js.map +1 -0
- package/dist/client/types/chat/bsky/group/disableJoinLink.d.ts +34 -0
- package/dist/client/types/chat/bsky/group/disableJoinLink.d.ts.map +1 -0
- package/dist/client/types/chat/bsky/group/disableJoinLink.js +42 -0
- package/dist/client/types/chat/bsky/group/disableJoinLink.js.map +1 -0
- package/dist/client/types/chat/bsky/group/editGroup.d.ts +35 -0
- package/dist/client/types/chat/bsky/group/editGroup.d.ts.map +1 -0
- package/dist/client/types/chat/bsky/group/editGroup.js +42 -0
- package/dist/client/types/chat/bsky/group/editGroup.js.map +1 -0
- package/dist/client/types/chat/bsky/group/editJoinLink.d.ts +36 -0
- package/dist/client/types/chat/bsky/group/editJoinLink.d.ts.map +1 -0
- package/dist/client/types/chat/bsky/group/editJoinLink.js +42 -0
- package/dist/client/types/chat/bsky/group/editJoinLink.js.map +1 -0
- package/dist/client/types/chat/bsky/group/enableJoinLink.d.ts +37 -0
- package/dist/client/types/chat/bsky/group/enableJoinLink.d.ts.map +1 -0
- package/dist/client/types/chat/bsky/group/enableJoinLink.js +50 -0
- package/dist/client/types/chat/bsky/group/enableJoinLink.js.map +1 -0
- package/dist/client/types/chat/bsky/group/getGroupPublicInfo.d.ts +26 -0
- package/dist/client/types/chat/bsky/group/getGroupPublicInfo.d.ts.map +1 -0
- package/dist/client/types/chat/bsky/group/getGroupPublicInfo.js +26 -0
- package/dist/client/types/chat/bsky/group/getGroupPublicInfo.js.map +1 -0
- package/dist/client/types/chat/bsky/group/listJoinRequests.d.ts +32 -0
- package/dist/client/types/chat/bsky/group/listJoinRequests.d.ts.map +1 -0
- package/dist/client/types/chat/bsky/group/listJoinRequests.js +34 -0
- package/dist/client/types/chat/bsky/group/listJoinRequests.js.map +1 -0
- package/dist/client/types/chat/bsky/group/rejectJoinRequest.d.ts +30 -0
- package/dist/client/types/chat/bsky/group/rejectJoinRequest.d.ts.map +1 -0
- package/dist/client/types/chat/bsky/group/rejectJoinRequest.js +34 -0
- package/dist/client/types/chat/bsky/group/rejectJoinRequest.js.map +1 -0
- package/dist/client/types/chat/bsky/group/removeMembers.d.ts +32 -0
- package/dist/client/types/chat/bsky/group/removeMembers.d.ts.map +1 -0
- package/dist/client/types/chat/bsky/group/removeMembers.js +34 -0
- package/dist/client/types/chat/bsky/group/removeMembers.js.map +1 -0
- package/dist/client/types/chat/bsky/group/requestJoin.d.ts +44 -0
- package/dist/client/types/chat/bsky/group/requestJoin.d.ts.map +1 -0
- package/dist/client/types/chat/bsky/group/requestJoin.js +66 -0
- package/dist/client/types/chat/bsky/group/requestJoin.js.map +1 -0
- package/dist/client/types/chat/bsky/moderation/getMessageContext.d.ts +1 -1
- package/dist/client/types/chat/bsky/moderation/getMessageContext.d.ts.map +1 -1
- package/dist/client/types/chat/bsky/moderation/getMessageContext.js.map +1 -1
- package/dist/client/types/chat/bsky/moderation/subscribeModEvents.d.ts +15 -0
- package/dist/client/types/chat/bsky/moderation/subscribeModEvents.d.ts.map +1 -0
- package/dist/client/types/chat/bsky/moderation/subscribeModEvents.js +16 -0
- package/dist/client/types/chat/bsky/moderation/subscribeModEvents.js.map +1 -0
- package/package.json +3 -3
- package/src/client/index.ts +291 -51
- package/src/client/lexicons.ts +2151 -279
- package/src/client/types/app/bsky/actor/defs.ts +1 -0
- package/src/client/types/app/bsky/embed/images.ts +1 -1
- package/src/client/types/chat/bsky/actor/declaration.ts +2 -0
- package/src/client/types/chat/bsky/actor/defs.ts +39 -0
- package/src/client/types/chat/bsky/convo/acceptConvo.ts +10 -0
- package/src/client/types/chat/bsky/convo/addReaction.ts +14 -0
- package/src/client/types/chat/bsky/convo/defs.ts +654 -2
- package/src/client/types/chat/bsky/convo/deleteMessageForSelf.ts +18 -0
- package/src/client/types/chat/bsky/convo/getConvo.ts +10 -0
- package/src/client/types/chat/bsky/convo/getConvoForMembers.ts +39 -0
- package/src/client/types/chat/bsky/convo/getConvoMembers.ts +54 -0
- package/src/client/types/chat/bsky/convo/getLog.ts +17 -0
- package/src/client/types/chat/bsky/convo/getMessages.ts +11 -0
- package/src/client/types/chat/bsky/convo/leaveConvo.ts +17 -0
- package/src/client/types/chat/bsky/convo/listConvoRequests.ts +48 -0
- package/src/client/types/chat/bsky/convo/listConvos.ts +3 -0
- package/src/client/types/chat/bsky/convo/lockConvo.ts +68 -0
- package/src/client/types/chat/bsky/convo/muteConvo.ts +10 -0
- package/src/client/types/chat/bsky/convo/removeReaction.ts +14 -0
- package/src/client/types/chat/bsky/convo/sendMessage.ts +17 -0
- package/src/client/types/chat/bsky/convo/sendMessageBatch.ts +17 -0
- package/src/client/types/chat/bsky/convo/unlockConvo.ts +61 -0
- package/src/client/types/chat/bsky/convo/unmuteConvo.ts +10 -0
- package/src/client/types/chat/bsky/convo/updateRead.ts +10 -0
- package/src/client/types/chat/bsky/group/addMembers.ts +115 -0
- package/src/client/types/chat/bsky/group/approveJoinRequest.ts +69 -0
- package/src/client/types/chat/bsky/group/createGroup.ts +85 -0
- package/src/client/types/chat/bsky/group/createJoinLink.ts +71 -0
- package/src/client/types/chat/bsky/group/defs.ts +73 -0
- package/src/client/types/chat/bsky/group/disableJoinLink.ts +68 -0
- package/src/client/types/chat/bsky/group/editGroup.ts +69 -0
- package/src/client/types/chat/bsky/group/editJoinLink.ts +70 -0
- package/src/client/types/chat/bsky/group/enableJoinLink.ts +75 -0
- package/src/client/types/chat/bsky/group/getGroupPublicInfo.ts +51 -0
- package/src/client/types/chat/bsky/group/listJoinRequests.ts +61 -0
- package/src/client/types/chat/bsky/group/rejectJoinRequest.ts +59 -0
- package/src/client/types/chat/bsky/group/removeMembers.ts +62 -0
- package/src/client/types/chat/bsky/group/requestJoin.ts +90 -0
- package/src/client/types/chat/bsky/moderation/getMessageContext.ts +1 -0
- package/src/client/types/chat/bsky/moderation/subscribeModEvents.ts +38 -0
- package/tsconfig.build.tsbuildinfo +1 -1
|
@@ -12,11 +12,20 @@ import {
|
|
|
12
12
|
import type * as AppBskyRichtextFacet from '../../../app/bsky/richtext/facet.js'
|
|
13
13
|
import type * as AppBskyEmbedRecord from '../../../app/bsky/embed/record.js'
|
|
14
14
|
import type * as ChatBskyActorDefs from '../actor/defs.js'
|
|
15
|
+
import type * as ChatBskyGroupDefs from '../group/defs.js'
|
|
15
16
|
|
|
16
17
|
const is$typed = _is$typed,
|
|
17
18
|
validate = _validate
|
|
18
19
|
const id = 'chat.bsky.convo.defs'
|
|
19
20
|
|
|
21
|
+
export type ConvoKind = 'direct' | 'group' | (string & {})
|
|
22
|
+
export type ConvoLockStatus =
|
|
23
|
+
| 'unlocked'
|
|
24
|
+
| 'locked'
|
|
25
|
+
| 'locked-permanently'
|
|
26
|
+
| (string & {})
|
|
27
|
+
export type ConvoStatus = 'request' | 'accepted' | (string & {})
|
|
28
|
+
|
|
20
29
|
export interface MessageRef {
|
|
21
30
|
$type?: 'chat.bsky.convo.defs#messageRef'
|
|
22
31
|
did: string
|
|
@@ -76,6 +85,283 @@ export function validateMessageView<V>(v: V) {
|
|
|
76
85
|
return validate<MessageView & V>(v, id, hashMessageView)
|
|
77
86
|
}
|
|
78
87
|
|
|
88
|
+
/** [NOTE: This is under active development and should be considered unstable while this note is here]. */
|
|
89
|
+
export interface SystemMessageView {
|
|
90
|
+
$type?: 'chat.bsky.convo.defs#systemMessageView'
|
|
91
|
+
id: string
|
|
92
|
+
rev: string
|
|
93
|
+
sentAt: string
|
|
94
|
+
data:
|
|
95
|
+
| $Typed<SystemMessageDataAddMember>
|
|
96
|
+
| $Typed<SystemMessageDataRemoveMember>
|
|
97
|
+
| $Typed<SystemMessageDataMemberJoin>
|
|
98
|
+
| $Typed<SystemMessageDataMemberLeave>
|
|
99
|
+
| $Typed<SystemMessageDataLockConvo>
|
|
100
|
+
| $Typed<SystemMessageDataUnlockConvo>
|
|
101
|
+
| $Typed<SystemMessageDataLockConvoPermanently>
|
|
102
|
+
| $Typed<SystemMessageDataEditGroup>
|
|
103
|
+
| $Typed<SystemMessageDataCreateJoinLink>
|
|
104
|
+
| $Typed<SystemMessageDataEditJoinLink>
|
|
105
|
+
| $Typed<SystemMessageDataEnableJoinLink>
|
|
106
|
+
| $Typed<SystemMessageDataDisableJoinLink>
|
|
107
|
+
| { $type: string }
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
const hashSystemMessageView = 'systemMessageView'
|
|
111
|
+
|
|
112
|
+
export function isSystemMessageView<V>(v: V) {
|
|
113
|
+
return is$typed(v, id, hashSystemMessageView)
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export function validateSystemMessageView<V>(v: V) {
|
|
117
|
+
return validate<SystemMessageView & V>(v, id, hashSystemMessageView)
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/** [NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating a user was added to the group convo. */
|
|
121
|
+
export interface SystemMessageDataAddMember {
|
|
122
|
+
$type?: 'chat.bsky.convo.defs#systemMessageDataAddMember'
|
|
123
|
+
member: ChatBskyActorDefs.ProfileViewBasic
|
|
124
|
+
role: ChatBskyActorDefs.MemberRole
|
|
125
|
+
addedBy: ChatBskyActorDefs.ProfileViewBasic
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
const hashSystemMessageDataAddMember = 'systemMessageDataAddMember'
|
|
129
|
+
|
|
130
|
+
export function isSystemMessageDataAddMember<V>(v: V) {
|
|
131
|
+
return is$typed(v, id, hashSystemMessageDataAddMember)
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export function validateSystemMessageDataAddMember<V>(v: V) {
|
|
135
|
+
return validate<SystemMessageDataAddMember & V>(
|
|
136
|
+
v,
|
|
137
|
+
id,
|
|
138
|
+
hashSystemMessageDataAddMember,
|
|
139
|
+
)
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/** [NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating a user was removed from the group convo. */
|
|
143
|
+
export interface SystemMessageDataRemoveMember {
|
|
144
|
+
$type?: 'chat.bsky.convo.defs#systemMessageDataRemoveMember'
|
|
145
|
+
member: ChatBskyActorDefs.ProfileViewBasic
|
|
146
|
+
removedBy: ChatBskyActorDefs.ProfileViewBasic
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
const hashSystemMessageDataRemoveMember = 'systemMessageDataRemoveMember'
|
|
150
|
+
|
|
151
|
+
export function isSystemMessageDataRemoveMember<V>(v: V) {
|
|
152
|
+
return is$typed(v, id, hashSystemMessageDataRemoveMember)
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export function validateSystemMessageDataRemoveMember<V>(v: V) {
|
|
156
|
+
return validate<SystemMessageDataRemoveMember & V>(
|
|
157
|
+
v,
|
|
158
|
+
id,
|
|
159
|
+
hashSystemMessageDataRemoveMember,
|
|
160
|
+
)
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/** [NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating a user joined the group convo via join link. */
|
|
164
|
+
export interface SystemMessageDataMemberJoin {
|
|
165
|
+
$type?: 'chat.bsky.convo.defs#systemMessageDataMemberJoin'
|
|
166
|
+
member: ChatBskyActorDefs.ProfileViewBasic
|
|
167
|
+
role: ChatBskyActorDefs.MemberRole
|
|
168
|
+
approvedBy?: ChatBskyActorDefs.ProfileViewBasic
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
const hashSystemMessageDataMemberJoin = 'systemMessageDataMemberJoin'
|
|
172
|
+
|
|
173
|
+
export function isSystemMessageDataMemberJoin<V>(v: V) {
|
|
174
|
+
return is$typed(v, id, hashSystemMessageDataMemberJoin)
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export function validateSystemMessageDataMemberJoin<V>(v: V) {
|
|
178
|
+
return validate<SystemMessageDataMemberJoin & V>(
|
|
179
|
+
v,
|
|
180
|
+
id,
|
|
181
|
+
hashSystemMessageDataMemberJoin,
|
|
182
|
+
)
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/** [NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating a user voluntarily left the group convo. */
|
|
186
|
+
export interface SystemMessageDataMemberLeave {
|
|
187
|
+
$type?: 'chat.bsky.convo.defs#systemMessageDataMemberLeave'
|
|
188
|
+
member: ChatBskyActorDefs.ProfileViewBasic
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
const hashSystemMessageDataMemberLeave = 'systemMessageDataMemberLeave'
|
|
192
|
+
|
|
193
|
+
export function isSystemMessageDataMemberLeave<V>(v: V) {
|
|
194
|
+
return is$typed(v, id, hashSystemMessageDataMemberLeave)
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
export function validateSystemMessageDataMemberLeave<V>(v: V) {
|
|
198
|
+
return validate<SystemMessageDataMemberLeave & V>(
|
|
199
|
+
v,
|
|
200
|
+
id,
|
|
201
|
+
hashSystemMessageDataMemberLeave,
|
|
202
|
+
)
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/** [NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating the group convo was locked. */
|
|
206
|
+
export interface SystemMessageDataLockConvo {
|
|
207
|
+
$type?: 'chat.bsky.convo.defs#systemMessageDataLockConvo'
|
|
208
|
+
lockedBy: ChatBskyActorDefs.ProfileViewBasic
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
const hashSystemMessageDataLockConvo = 'systemMessageDataLockConvo'
|
|
212
|
+
|
|
213
|
+
export function isSystemMessageDataLockConvo<V>(v: V) {
|
|
214
|
+
return is$typed(v, id, hashSystemMessageDataLockConvo)
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
export function validateSystemMessageDataLockConvo<V>(v: V) {
|
|
218
|
+
return validate<SystemMessageDataLockConvo & V>(
|
|
219
|
+
v,
|
|
220
|
+
id,
|
|
221
|
+
hashSystemMessageDataLockConvo,
|
|
222
|
+
)
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/** [NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating the group convo was unlocked. */
|
|
226
|
+
export interface SystemMessageDataUnlockConvo {
|
|
227
|
+
$type?: 'chat.bsky.convo.defs#systemMessageDataUnlockConvo'
|
|
228
|
+
unlockedBy: ChatBskyActorDefs.ProfileViewBasic
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
const hashSystemMessageDataUnlockConvo = 'systemMessageDataUnlockConvo'
|
|
232
|
+
|
|
233
|
+
export function isSystemMessageDataUnlockConvo<V>(v: V) {
|
|
234
|
+
return is$typed(v, id, hashSystemMessageDataUnlockConvo)
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
export function validateSystemMessageDataUnlockConvo<V>(v: V) {
|
|
238
|
+
return validate<SystemMessageDataUnlockConvo & V>(
|
|
239
|
+
v,
|
|
240
|
+
id,
|
|
241
|
+
hashSystemMessageDataUnlockConvo,
|
|
242
|
+
)
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
/** [NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating the group convo was locked permanently. */
|
|
246
|
+
export interface SystemMessageDataLockConvoPermanently {
|
|
247
|
+
$type?: 'chat.bsky.convo.defs#systemMessageDataLockConvoPermanently'
|
|
248
|
+
lockedBy: ChatBskyActorDefs.ProfileViewBasic
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
const hashSystemMessageDataLockConvoPermanently =
|
|
252
|
+
'systemMessageDataLockConvoPermanently'
|
|
253
|
+
|
|
254
|
+
export function isSystemMessageDataLockConvoPermanently<V>(v: V) {
|
|
255
|
+
return is$typed(v, id, hashSystemMessageDataLockConvoPermanently)
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
export function validateSystemMessageDataLockConvoPermanently<V>(v: V) {
|
|
259
|
+
return validate<SystemMessageDataLockConvoPermanently & V>(
|
|
260
|
+
v,
|
|
261
|
+
id,
|
|
262
|
+
hashSystemMessageDataLockConvoPermanently,
|
|
263
|
+
)
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/** [NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating the group info was edited. */
|
|
267
|
+
export interface SystemMessageDataEditGroup {
|
|
268
|
+
$type?: 'chat.bsky.convo.defs#systemMessageDataEditGroup'
|
|
269
|
+
/** Group name that was replaced. */
|
|
270
|
+
oldName?: string
|
|
271
|
+
/** Group name that replaced the old. */
|
|
272
|
+
newName?: string
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
const hashSystemMessageDataEditGroup = 'systemMessageDataEditGroup'
|
|
276
|
+
|
|
277
|
+
export function isSystemMessageDataEditGroup<V>(v: V) {
|
|
278
|
+
return is$typed(v, id, hashSystemMessageDataEditGroup)
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
export function validateSystemMessageDataEditGroup<V>(v: V) {
|
|
282
|
+
return validate<SystemMessageDataEditGroup & V>(
|
|
283
|
+
v,
|
|
284
|
+
id,
|
|
285
|
+
hashSystemMessageDataEditGroup,
|
|
286
|
+
)
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
/** [NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating the group join link was created. */
|
|
290
|
+
export interface SystemMessageDataCreateJoinLink {
|
|
291
|
+
$type?: 'chat.bsky.convo.defs#systemMessageDataCreateJoinLink'
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
const hashSystemMessageDataCreateJoinLink = 'systemMessageDataCreateJoinLink'
|
|
295
|
+
|
|
296
|
+
export function isSystemMessageDataCreateJoinLink<V>(v: V) {
|
|
297
|
+
return is$typed(v, id, hashSystemMessageDataCreateJoinLink)
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
export function validateSystemMessageDataCreateJoinLink<V>(v: V) {
|
|
301
|
+
return validate<SystemMessageDataCreateJoinLink & V>(
|
|
302
|
+
v,
|
|
303
|
+
id,
|
|
304
|
+
hashSystemMessageDataCreateJoinLink,
|
|
305
|
+
)
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
/** [NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating the group join link was edited. */
|
|
309
|
+
export interface SystemMessageDataEditJoinLink {
|
|
310
|
+
$type?: 'chat.bsky.convo.defs#systemMessageDataEditJoinLink'
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
const hashSystemMessageDataEditJoinLink = 'systemMessageDataEditJoinLink'
|
|
314
|
+
|
|
315
|
+
export function isSystemMessageDataEditJoinLink<V>(v: V) {
|
|
316
|
+
return is$typed(v, id, hashSystemMessageDataEditJoinLink)
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
export function validateSystemMessageDataEditJoinLink<V>(v: V) {
|
|
320
|
+
return validate<SystemMessageDataEditJoinLink & V>(
|
|
321
|
+
v,
|
|
322
|
+
id,
|
|
323
|
+
hashSystemMessageDataEditJoinLink,
|
|
324
|
+
)
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
/** [NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating the group join link was enabled. */
|
|
328
|
+
export interface SystemMessageDataEnableJoinLink {
|
|
329
|
+
$type?: 'chat.bsky.convo.defs#systemMessageDataEnableJoinLink'
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
const hashSystemMessageDataEnableJoinLink = 'systemMessageDataEnableJoinLink'
|
|
333
|
+
|
|
334
|
+
export function isSystemMessageDataEnableJoinLink<V>(v: V) {
|
|
335
|
+
return is$typed(v, id, hashSystemMessageDataEnableJoinLink)
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
export function validateSystemMessageDataEnableJoinLink<V>(v: V) {
|
|
339
|
+
return validate<SystemMessageDataEnableJoinLink & V>(
|
|
340
|
+
v,
|
|
341
|
+
id,
|
|
342
|
+
hashSystemMessageDataEnableJoinLink,
|
|
343
|
+
)
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
/** [NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating the group join link was disabled. */
|
|
347
|
+
export interface SystemMessageDataDisableJoinLink {
|
|
348
|
+
$type?: 'chat.bsky.convo.defs#systemMessageDataDisableJoinLink'
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
const hashSystemMessageDataDisableJoinLink = 'systemMessageDataDisableJoinLink'
|
|
352
|
+
|
|
353
|
+
export function isSystemMessageDataDisableJoinLink<V>(v: V) {
|
|
354
|
+
return is$typed(v, id, hashSystemMessageDataDisableJoinLink)
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
export function validateSystemMessageDataDisableJoinLink<V>(v: V) {
|
|
358
|
+
return validate<SystemMessageDataDisableJoinLink & V>(
|
|
359
|
+
v,
|
|
360
|
+
id,
|
|
361
|
+
hashSystemMessageDataDisableJoinLink,
|
|
362
|
+
)
|
|
363
|
+
}
|
|
364
|
+
|
|
79
365
|
export interface DeletedMessageView {
|
|
80
366
|
$type?: 'chat.bsky.convo.defs#deletedMessageView'
|
|
81
367
|
id: string
|
|
@@ -161,15 +447,18 @@ export interface ConvoView {
|
|
|
161
447
|
$type?: 'chat.bsky.convo.defs#convoView'
|
|
162
448
|
id: string
|
|
163
449
|
rev: string
|
|
450
|
+
/** Members of this conversation. For direct convos, it will be an immutable list of the 2 members. For group convos, it will a list of important members (the first few members, the viewer, the member who invited the viewer, the member who sent the last message, the member who sent the last reaction), but will not contain the full list of members. Use chat.bsky.convo.getConvoMembers to list all members. */
|
|
164
451
|
members: ChatBskyActorDefs.ProfileViewBasic[]
|
|
165
452
|
lastMessage?:
|
|
166
453
|
| $Typed<MessageView>
|
|
167
454
|
| $Typed<DeletedMessageView>
|
|
455
|
+
| $Typed<SystemMessageView>
|
|
168
456
|
| { $type: string }
|
|
169
457
|
lastReaction?: $Typed<MessageAndReactionView> | { $type: string }
|
|
170
458
|
muted: boolean
|
|
171
|
-
status?:
|
|
459
|
+
status?: ConvoStatus
|
|
172
460
|
unreadCount: number
|
|
461
|
+
kind?: $Typed<DirectConvo> | $Typed<GroupConvo> | { $type: string }
|
|
173
462
|
}
|
|
174
463
|
|
|
175
464
|
const hashConvoView = 'convoView'
|
|
@@ -182,6 +471,43 @@ export function validateConvoView<V>(v: V) {
|
|
|
182
471
|
return validate<ConvoView & V>(v, id, hashConvoView)
|
|
183
472
|
}
|
|
184
473
|
|
|
474
|
+
/** [NOTE: This is under active development and should be considered unstable while this note is here]. */
|
|
475
|
+
export interface DirectConvo {
|
|
476
|
+
$type?: 'chat.bsky.convo.defs#directConvo'
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
const hashDirectConvo = 'directConvo'
|
|
480
|
+
|
|
481
|
+
export function isDirectConvo<V>(v: V) {
|
|
482
|
+
return is$typed(v, id, hashDirectConvo)
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
export function validateDirectConvo<V>(v: V) {
|
|
486
|
+
return validate<DirectConvo & V>(v, id, hashDirectConvo)
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
/** [NOTE: This is under active development and should be considered unstable while this note is here]. */
|
|
490
|
+
export interface GroupConvo {
|
|
491
|
+
$type?: 'chat.bsky.convo.defs#groupConvo'
|
|
492
|
+
/** The display name of the group conversation. */
|
|
493
|
+
name: string
|
|
494
|
+
/** The total number of members in the group conversation. */
|
|
495
|
+
memberCount: number
|
|
496
|
+
joinLink?: ChatBskyGroupDefs.JoinLinkView
|
|
497
|
+
lockStatus: ConvoLockStatus
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
const hashGroupConvo = 'groupConvo'
|
|
501
|
+
|
|
502
|
+
export function isGroupConvo<V>(v: V) {
|
|
503
|
+
return is$typed(v, id, hashGroupConvo)
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
export function validateGroupConvo<V>(v: V) {
|
|
507
|
+
return validate<GroupConvo & V>(v, id, hashGroupConvo)
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
/** Event indicating a convo containing the viewer was started. Can be direct or group. When a member is added to a group convo, they also get this event. */
|
|
185
511
|
export interface LogBeginConvo {
|
|
186
512
|
$type?: 'chat.bsky.convo.defs#logBeginConvo'
|
|
187
513
|
rev: string
|
|
@@ -198,6 +524,7 @@ export function validateLogBeginConvo<V>(v: V) {
|
|
|
198
524
|
return validate<LogBeginConvo & V>(v, id, hashLogBeginConvo)
|
|
199
525
|
}
|
|
200
526
|
|
|
527
|
+
/** Event indicating the viewer accepted a convo, and it can be moved out of the request inbox. Can be direct or group. */
|
|
201
528
|
export interface LogAcceptConvo {
|
|
202
529
|
$type?: 'chat.bsky.convo.defs#logAcceptConvo'
|
|
203
530
|
rev: string
|
|
@@ -214,6 +541,7 @@ export function validateLogAcceptConvo<V>(v: V) {
|
|
|
214
541
|
return validate<LogAcceptConvo & V>(v, id, hashLogAcceptConvo)
|
|
215
542
|
}
|
|
216
543
|
|
|
544
|
+
/** Event indicating the viewer left a convo. Can be direct or group. */
|
|
217
545
|
export interface LogLeaveConvo {
|
|
218
546
|
$type?: 'chat.bsky.convo.defs#logLeaveConvo'
|
|
219
547
|
rev: string
|
|
@@ -230,6 +558,7 @@ export function validateLogLeaveConvo<V>(v: V) {
|
|
|
230
558
|
return validate<LogLeaveConvo & V>(v, id, hashLogLeaveConvo)
|
|
231
559
|
}
|
|
232
560
|
|
|
561
|
+
/** Event indicating the viewer muted a convo. Can be direct or group. */
|
|
233
562
|
export interface LogMuteConvo {
|
|
234
563
|
$type?: 'chat.bsky.convo.defs#logMuteConvo'
|
|
235
564
|
rev: string
|
|
@@ -246,6 +575,7 @@ export function validateLogMuteConvo<V>(v: V) {
|
|
|
246
575
|
return validate<LogMuteConvo & V>(v, id, hashLogMuteConvo)
|
|
247
576
|
}
|
|
248
577
|
|
|
578
|
+
/** Event indicating the viewer unmuted a convo. Can be direct or group. */
|
|
249
579
|
export interface LogUnmuteConvo {
|
|
250
580
|
$type?: 'chat.bsky.convo.defs#logUnmuteConvo'
|
|
251
581
|
rev: string
|
|
@@ -262,6 +592,7 @@ export function validateLogUnmuteConvo<V>(v: V) {
|
|
|
262
592
|
return validate<LogUnmuteConvo & V>(v, id, hashLogUnmuteConvo)
|
|
263
593
|
}
|
|
264
594
|
|
|
595
|
+
/** Event indicating a user-originated message was created. Is not emitted for system messages. */
|
|
265
596
|
export interface LogCreateMessage {
|
|
266
597
|
$type?: 'chat.bsky.convo.defs#logCreateMessage'
|
|
267
598
|
rev: string
|
|
@@ -279,6 +610,7 @@ export function validateLogCreateMessage<V>(v: V) {
|
|
|
279
610
|
return validate<LogCreateMessage & V>(v, id, hashLogCreateMessage)
|
|
280
611
|
}
|
|
281
612
|
|
|
613
|
+
/** Event indicating a user-originated message was deleted. Is not emitted for system messages. */
|
|
282
614
|
export interface LogDeleteMessage {
|
|
283
615
|
$type?: 'chat.bsky.convo.defs#logDeleteMessage'
|
|
284
616
|
rev: string
|
|
@@ -296,11 +628,16 @@ export function validateLogDeleteMessage<V>(v: V) {
|
|
|
296
628
|
return validate<LogDeleteMessage & V>(v, id, hashLogDeleteMessage)
|
|
297
629
|
}
|
|
298
630
|
|
|
631
|
+
/** DEPRECATED: use logReadConvo instead. Event indicating a convo was read up to a certain message. */
|
|
299
632
|
export interface LogReadMessage {
|
|
300
633
|
$type?: 'chat.bsky.convo.defs#logReadMessage'
|
|
301
634
|
rev: string
|
|
302
635
|
convoId: string
|
|
303
|
-
message:
|
|
636
|
+
message:
|
|
637
|
+
| $Typed<MessageView>
|
|
638
|
+
| $Typed<DeletedMessageView>
|
|
639
|
+
| $Typed<SystemMessageView>
|
|
640
|
+
| { $type: string }
|
|
304
641
|
}
|
|
305
642
|
|
|
306
643
|
const hashLogReadMessage = 'logReadMessage'
|
|
@@ -313,6 +650,7 @@ export function validateLogReadMessage<V>(v: V) {
|
|
|
313
650
|
return validate<LogReadMessage & V>(v, id, hashLogReadMessage)
|
|
314
651
|
}
|
|
315
652
|
|
|
653
|
+
/** Event indicating a reaction was added to a message. */
|
|
316
654
|
export interface LogAddReaction {
|
|
317
655
|
$type?: 'chat.bsky.convo.defs#logAddReaction'
|
|
318
656
|
rev: string
|
|
@@ -331,6 +669,7 @@ export function validateLogAddReaction<V>(v: V) {
|
|
|
331
669
|
return validate<LogAddReaction & V>(v, id, hashLogAddReaction)
|
|
332
670
|
}
|
|
333
671
|
|
|
672
|
+
/** Event indicating a reaction was removed from a message. */
|
|
334
673
|
export interface LogRemoveReaction {
|
|
335
674
|
$type?: 'chat.bsky.convo.defs#logRemoveReaction'
|
|
336
675
|
rev: string
|
|
@@ -348,3 +687,316 @@ export function isLogRemoveReaction<V>(v: V) {
|
|
|
348
687
|
export function validateLogRemoveReaction<V>(v: V) {
|
|
349
688
|
return validate<LogRemoveReaction & V>(v, id, hashLogRemoveReaction)
|
|
350
689
|
}
|
|
690
|
+
|
|
691
|
+
/** [NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a convo was read up to a certain message. */
|
|
692
|
+
export interface LogReadConvo {
|
|
693
|
+
$type?: 'chat.bsky.convo.defs#logReadConvo'
|
|
694
|
+
rev: string
|
|
695
|
+
convoId: string
|
|
696
|
+
message:
|
|
697
|
+
| $Typed<MessageView>
|
|
698
|
+
| $Typed<DeletedMessageView>
|
|
699
|
+
| $Typed<SystemMessageView>
|
|
700
|
+
| { $type: string }
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
const hashLogReadConvo = 'logReadConvo'
|
|
704
|
+
|
|
705
|
+
export function isLogReadConvo<V>(v: V) {
|
|
706
|
+
return is$typed(v, id, hashLogReadConvo)
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
export function validateLogReadConvo<V>(v: V) {
|
|
710
|
+
return validate<LogReadConvo & V>(v, id, hashLogReadConvo)
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
/** [NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a member was added to a group convo. The member who was added gets a logBeginConvo (to create the convo) but also a logAddMember (to show the system message as the first message the user sees). */
|
|
714
|
+
export interface LogAddMember {
|
|
715
|
+
$type?: 'chat.bsky.convo.defs#logAddMember'
|
|
716
|
+
rev: string
|
|
717
|
+
convoId: string
|
|
718
|
+
message: SystemMessageView
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
const hashLogAddMember = 'logAddMember'
|
|
722
|
+
|
|
723
|
+
export function isLogAddMember<V>(v: V) {
|
|
724
|
+
return is$typed(v, id, hashLogAddMember)
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
export function validateLogAddMember<V>(v: V) {
|
|
728
|
+
return validate<LogAddMember & V>(v, id, hashLogAddMember)
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
/** [NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a member was removed from a group convo. The member who was removed gets a logLeaveConvo (to leave the convo) but not a logRemoveMember (because they already left, so can't see the system message). */
|
|
732
|
+
export interface LogRemoveMember {
|
|
733
|
+
$type?: 'chat.bsky.convo.defs#logRemoveMember'
|
|
734
|
+
rev: string
|
|
735
|
+
convoId: string
|
|
736
|
+
message: SystemMessageView
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
const hashLogRemoveMember = 'logRemoveMember'
|
|
740
|
+
|
|
741
|
+
export function isLogRemoveMember<V>(v: V) {
|
|
742
|
+
return is$typed(v, id, hashLogRemoveMember)
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
export function validateLogRemoveMember<V>(v: V) {
|
|
746
|
+
return validate<LogRemoveMember & V>(v, id, hashLogRemoveMember)
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
/** [NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a member joined a group convo via join link. The member who was added gets a logBeginConvo (to create the convo) but also a logMemberJoin (to show the system message as the first message the user sees). */
|
|
750
|
+
export interface LogMemberJoin {
|
|
751
|
+
$type?: 'chat.bsky.convo.defs#logMemberJoin'
|
|
752
|
+
rev: string
|
|
753
|
+
convoId: string
|
|
754
|
+
message: SystemMessageView
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
const hashLogMemberJoin = 'logMemberJoin'
|
|
758
|
+
|
|
759
|
+
export function isLogMemberJoin<V>(v: V) {
|
|
760
|
+
return is$typed(v, id, hashLogMemberJoin)
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
export function validateLogMemberJoin<V>(v: V) {
|
|
764
|
+
return validate<LogMemberJoin & V>(v, id, hashLogMemberJoin)
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
/** [NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a member voluntarily left a group convo. The member who was removed gets a logLeaveConvo (to leave the convo) but not a logMemberLeave (because they already left, so can't see the system message). */
|
|
768
|
+
export interface LogMemberLeave {
|
|
769
|
+
$type?: 'chat.bsky.convo.defs#logMemberLeave'
|
|
770
|
+
rev: string
|
|
771
|
+
convoId: string
|
|
772
|
+
message: SystemMessageView
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
const hashLogMemberLeave = 'logMemberLeave'
|
|
776
|
+
|
|
777
|
+
export function isLogMemberLeave<V>(v: V) {
|
|
778
|
+
return is$typed(v, id, hashLogMemberLeave)
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
export function validateLogMemberLeave<V>(v: V) {
|
|
782
|
+
return validate<LogMemberLeave & V>(v, id, hashLogMemberLeave)
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
/** [NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a group convo was locked. */
|
|
786
|
+
export interface LogLockConvo {
|
|
787
|
+
$type?: 'chat.bsky.convo.defs#logLockConvo'
|
|
788
|
+
rev: string
|
|
789
|
+
convoId: string
|
|
790
|
+
message: SystemMessageView
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
const hashLogLockConvo = 'logLockConvo'
|
|
794
|
+
|
|
795
|
+
export function isLogLockConvo<V>(v: V) {
|
|
796
|
+
return is$typed(v, id, hashLogLockConvo)
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
export function validateLogLockConvo<V>(v: V) {
|
|
800
|
+
return validate<LogLockConvo & V>(v, id, hashLogLockConvo)
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
/** [NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a group convo was unlocked. */
|
|
804
|
+
export interface LogUnlockConvo {
|
|
805
|
+
$type?: 'chat.bsky.convo.defs#logUnlockConvo'
|
|
806
|
+
rev: string
|
|
807
|
+
convoId: string
|
|
808
|
+
message: SystemMessageView
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
const hashLogUnlockConvo = 'logUnlockConvo'
|
|
812
|
+
|
|
813
|
+
export function isLogUnlockConvo<V>(v: V) {
|
|
814
|
+
return is$typed(v, id, hashLogUnlockConvo)
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
export function validateLogUnlockConvo<V>(v: V) {
|
|
818
|
+
return validate<LogUnlockConvo & V>(v, id, hashLogUnlockConvo)
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
/** [NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a group convo was locked permanently. */
|
|
822
|
+
export interface LogLockConvoPermanently {
|
|
823
|
+
$type?: 'chat.bsky.convo.defs#logLockConvoPermanently'
|
|
824
|
+
rev: string
|
|
825
|
+
convoId: string
|
|
826
|
+
message: SystemMessageView
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
const hashLogLockConvoPermanently = 'logLockConvoPermanently'
|
|
830
|
+
|
|
831
|
+
export function isLogLockConvoPermanently<V>(v: V) {
|
|
832
|
+
return is$typed(v, id, hashLogLockConvoPermanently)
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
export function validateLogLockConvoPermanently<V>(v: V) {
|
|
836
|
+
return validate<LogLockConvoPermanently & V>(
|
|
837
|
+
v,
|
|
838
|
+
id,
|
|
839
|
+
hashLogLockConvoPermanently,
|
|
840
|
+
)
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
/** [NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating info about group convo was edited. */
|
|
844
|
+
export interface LogEditGroup {
|
|
845
|
+
$type?: 'chat.bsky.convo.defs#logEditGroup'
|
|
846
|
+
rev: string
|
|
847
|
+
convoId: string
|
|
848
|
+
message: SystemMessageView
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
const hashLogEditGroup = 'logEditGroup'
|
|
852
|
+
|
|
853
|
+
export function isLogEditGroup<V>(v: V) {
|
|
854
|
+
return is$typed(v, id, hashLogEditGroup)
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
export function validateLogEditGroup<V>(v: V) {
|
|
858
|
+
return validate<LogEditGroup & V>(v, id, hashLogEditGroup)
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
/** [NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a join link was created for a group convo. */
|
|
862
|
+
export interface LogCreateJoinLink {
|
|
863
|
+
$type?: 'chat.bsky.convo.defs#logCreateJoinLink'
|
|
864
|
+
rev: string
|
|
865
|
+
convoId: string
|
|
866
|
+
message: SystemMessageView
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
const hashLogCreateJoinLink = 'logCreateJoinLink'
|
|
870
|
+
|
|
871
|
+
export function isLogCreateJoinLink<V>(v: V) {
|
|
872
|
+
return is$typed(v, id, hashLogCreateJoinLink)
|
|
873
|
+
}
|
|
874
|
+
|
|
875
|
+
export function validateLogCreateJoinLink<V>(v: V) {
|
|
876
|
+
return validate<LogCreateJoinLink & V>(v, id, hashLogCreateJoinLink)
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
/** [NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a settings about a join link for a group convo were edited. */
|
|
880
|
+
export interface LogEditJoinLink {
|
|
881
|
+
$type?: 'chat.bsky.convo.defs#logEditJoinLink'
|
|
882
|
+
rev: string
|
|
883
|
+
convoId: string
|
|
884
|
+
message: SystemMessageView
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
const hashLogEditJoinLink = 'logEditJoinLink'
|
|
888
|
+
|
|
889
|
+
export function isLogEditJoinLink<V>(v: V) {
|
|
890
|
+
return is$typed(v, id, hashLogEditJoinLink)
|
|
891
|
+
}
|
|
892
|
+
|
|
893
|
+
export function validateLogEditJoinLink<V>(v: V) {
|
|
894
|
+
return validate<LogEditJoinLink & V>(v, id, hashLogEditJoinLink)
|
|
895
|
+
}
|
|
896
|
+
|
|
897
|
+
/** [NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a join link was enabled for a group convo. */
|
|
898
|
+
export interface LogEnableJoinLink {
|
|
899
|
+
$type?: 'chat.bsky.convo.defs#logEnableJoinLink'
|
|
900
|
+
rev: string
|
|
901
|
+
convoId: string
|
|
902
|
+
message: SystemMessageView
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
const hashLogEnableJoinLink = 'logEnableJoinLink'
|
|
906
|
+
|
|
907
|
+
export function isLogEnableJoinLink<V>(v: V) {
|
|
908
|
+
return is$typed(v, id, hashLogEnableJoinLink)
|
|
909
|
+
}
|
|
910
|
+
|
|
911
|
+
export function validateLogEnableJoinLink<V>(v: V) {
|
|
912
|
+
return validate<LogEnableJoinLink & V>(v, id, hashLogEnableJoinLink)
|
|
913
|
+
}
|
|
914
|
+
|
|
915
|
+
/** [NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a join link was disabled for a group convo. */
|
|
916
|
+
export interface LogDisableJoinLink {
|
|
917
|
+
$type?: 'chat.bsky.convo.defs#logDisableJoinLink'
|
|
918
|
+
rev: string
|
|
919
|
+
convoId: string
|
|
920
|
+
message: SystemMessageView
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
const hashLogDisableJoinLink = 'logDisableJoinLink'
|
|
924
|
+
|
|
925
|
+
export function isLogDisableJoinLink<V>(v: V) {
|
|
926
|
+
return is$typed(v, id, hashLogDisableJoinLink)
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
export function validateLogDisableJoinLink<V>(v: V) {
|
|
930
|
+
return validate<LogDisableJoinLink & V>(v, id, hashLogDisableJoinLink)
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
/** [NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a join request was made to a group the viewer owns. Only the owner gets this. */
|
|
934
|
+
export interface LogIncomingJoinRequest {
|
|
935
|
+
$type?: 'chat.bsky.convo.defs#logIncomingJoinRequest'
|
|
936
|
+
rev: string
|
|
937
|
+
convoId: string
|
|
938
|
+
member: ChatBskyActorDefs.ProfileViewBasic
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
const hashLogIncomingJoinRequest = 'logIncomingJoinRequest'
|
|
942
|
+
|
|
943
|
+
export function isLogIncomingJoinRequest<V>(v: V) {
|
|
944
|
+
return is$typed(v, id, hashLogIncomingJoinRequest)
|
|
945
|
+
}
|
|
946
|
+
|
|
947
|
+
export function validateLogIncomingJoinRequest<V>(v: V) {
|
|
948
|
+
return validate<LogIncomingJoinRequest & V>(v, id, hashLogIncomingJoinRequest)
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
/** [NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a join request was approved by the viewer. Only the owner gets this. The approved member gets a logBeginConvo. */
|
|
952
|
+
export interface LogApproveJoinRequest {
|
|
953
|
+
$type?: 'chat.bsky.convo.defs#logApproveJoinRequest'
|
|
954
|
+
rev: string
|
|
955
|
+
convoId: string
|
|
956
|
+
member: ChatBskyActorDefs.ProfileViewBasic
|
|
957
|
+
}
|
|
958
|
+
|
|
959
|
+
const hashLogApproveJoinRequest = 'logApproveJoinRequest'
|
|
960
|
+
|
|
961
|
+
export function isLogApproveJoinRequest<V>(v: V) {
|
|
962
|
+
return is$typed(v, id, hashLogApproveJoinRequest)
|
|
963
|
+
}
|
|
964
|
+
|
|
965
|
+
export function validateLogApproveJoinRequest<V>(v: V) {
|
|
966
|
+
return validate<LogApproveJoinRequest & V>(v, id, hashLogApproveJoinRequest)
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
/** [NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a join request was rejected by the viewer. Only the owner gets this. */
|
|
970
|
+
export interface LogRejectJoinRequest {
|
|
971
|
+
$type?: 'chat.bsky.convo.defs#logRejectJoinRequest'
|
|
972
|
+
rev: string
|
|
973
|
+
convoId: string
|
|
974
|
+
member: ChatBskyActorDefs.ProfileViewBasic
|
|
975
|
+
}
|
|
976
|
+
|
|
977
|
+
const hashLogRejectJoinRequest = 'logRejectJoinRequest'
|
|
978
|
+
|
|
979
|
+
export function isLogRejectJoinRequest<V>(v: V) {
|
|
980
|
+
return is$typed(v, id, hashLogRejectJoinRequest)
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
export function validateLogRejectJoinRequest<V>(v: V) {
|
|
984
|
+
return validate<LogRejectJoinRequest & V>(v, id, hashLogRejectJoinRequest)
|
|
985
|
+
}
|
|
986
|
+
|
|
987
|
+
/** [NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a join request was made by the viewer. */
|
|
988
|
+
export interface LogOutgoingJoinRequest {
|
|
989
|
+
$type?: 'chat.bsky.convo.defs#logOutgoingJoinRequest'
|
|
990
|
+
rev: string
|
|
991
|
+
convoId: string
|
|
992
|
+
}
|
|
993
|
+
|
|
994
|
+
const hashLogOutgoingJoinRequest = 'logOutgoingJoinRequest'
|
|
995
|
+
|
|
996
|
+
export function isLogOutgoingJoinRequest<V>(v: V) {
|
|
997
|
+
return is$typed(v, id, hashLogOutgoingJoinRequest)
|
|
998
|
+
}
|
|
999
|
+
|
|
1000
|
+
export function validateLogOutgoingJoinRequest<V>(v: V) {
|
|
1001
|
+
return validate<LogOutgoingJoinRequest & V>(v, id, hashLogOutgoingJoinRequest)
|
|
1002
|
+
}
|