parent
01874c4be7
commit
22af31a898
5
.changeset/neat-colts-build.md
Normal file
5
.changeset/neat-colts-build.md
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@atproto/api": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Update chat lexicons
|
31
lexicons/chat/bsky/convo/acceptConvo.json
Normal file
31
lexicons/chat/bsky/convo/acceptConvo.json
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
{
|
||||||
|
"lexicon": 1,
|
||||||
|
"id": "chat.bsky.convo.acceptConvo",
|
||||||
|
"defs": {
|
||||||
|
"main": {
|
||||||
|
"type": "procedure",
|
||||||
|
"input": {
|
||||||
|
"encoding": "application/json",
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"required": ["convoId"],
|
||||||
|
"properties": {
|
||||||
|
"convoId": { "type": "string" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"output": {
|
||||||
|
"encoding": "application/json",
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"rev": {
|
||||||
|
"description": "Rev when the convo was accepted. If not present, the convo was already accepted.",
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -90,7 +90,10 @@
|
|||||||
"refs": ["#messageView", "#deletedMessageView"]
|
"refs": ["#messageView", "#deletedMessageView"]
|
||||||
},
|
},
|
||||||
"muted": { "type": "boolean" },
|
"muted": { "type": "boolean" },
|
||||||
"opened": { "type": "boolean" },
|
"status": {
|
||||||
|
"type": "string",
|
||||||
|
"knownValues": ["request", "accepted"]
|
||||||
|
},
|
||||||
"unreadCount": { "type": "integer" }
|
"unreadCount": { "type": "integer" }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -102,6 +105,14 @@
|
|||||||
"convoId": { "type": "string" }
|
"convoId": { "type": "string" }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"logAcceptConvo": {
|
||||||
|
"type": "object",
|
||||||
|
"required": ["rev", "convoId"],
|
||||||
|
"properties": {
|
||||||
|
"rev": { "type": "string" },
|
||||||
|
"convoId": { "type": "string" }
|
||||||
|
}
|
||||||
|
},
|
||||||
"logLeaveConvo": {
|
"logLeaveConvo": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": ["rev", "convoId"],
|
"required": ["rev", "convoId"],
|
||||||
@ -110,6 +121,22 @@
|
|||||||
"convoId": { "type": "string" }
|
"convoId": { "type": "string" }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"logMuteConvo": {
|
||||||
|
"type": "object",
|
||||||
|
"required": ["rev", "convoId"],
|
||||||
|
"properties": {
|
||||||
|
"rev": { "type": "string" },
|
||||||
|
"convoId": { "type": "string" }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"logUnmuteConvo": {
|
||||||
|
"type": "object",
|
||||||
|
"required": ["rev", "convoId"],
|
||||||
|
"properties": {
|
||||||
|
"rev": { "type": "string" },
|
||||||
|
"convoId": { "type": "string" }
|
||||||
|
}
|
||||||
|
},
|
||||||
"logCreateMessage": {
|
"logCreateMessage": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": ["rev", "convoId", "message"],
|
"required": ["rev", "convoId", "message"],
|
||||||
@ -133,6 +160,18 @@
|
|||||||
"refs": ["#messageView", "#deletedMessageView"]
|
"refs": ["#messageView", "#deletedMessageView"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"logReadMessage": {
|
||||||
|
"type": "object",
|
||||||
|
"required": ["rev", "convoId", "message"],
|
||||||
|
"properties": {
|
||||||
|
"rev": { "type": "string" },
|
||||||
|
"convoId": { "type": "string" },
|
||||||
|
"message": {
|
||||||
|
"type": "union",
|
||||||
|
"refs": ["#messageView", "#deletedMessageView"]
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
41
lexicons/chat/bsky/convo/getConvoAvailability.json
Normal file
41
lexicons/chat/bsky/convo/getConvoAvailability.json
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
{
|
||||||
|
"lexicon": 1,
|
||||||
|
"id": "chat.bsky.convo.getConvoAvailability",
|
||||||
|
"defs": {
|
||||||
|
"main": {
|
||||||
|
"type": "query",
|
||||||
|
"description": "Get whether the requester and the other members can chat. If an existing convo is found for these members, it is returned.",
|
||||||
|
"parameters": {
|
||||||
|
"type": "params",
|
||||||
|
"required": ["members"],
|
||||||
|
"properties": {
|
||||||
|
"members": {
|
||||||
|
"type": "array",
|
||||||
|
"minLength": 1,
|
||||||
|
"maxLength": 10,
|
||||||
|
"items": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "did"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"output": {
|
||||||
|
"encoding": "application/json",
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"required": ["canChat"],
|
||||||
|
"properties": {
|
||||||
|
"canChat": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"convo": {
|
||||||
|
"type": "ref",
|
||||||
|
"ref": "chat.bsky.convo.defs#convoView"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -24,6 +24,7 @@
|
|||||||
"type": "union",
|
"type": "union",
|
||||||
"refs": [
|
"refs": [
|
||||||
"chat.bsky.convo.defs#logBeginConvo",
|
"chat.bsky.convo.defs#logBeginConvo",
|
||||||
|
"chat.bsky.convo.defs#logAcceptConvo",
|
||||||
"chat.bsky.convo.defs#logLeaveConvo",
|
"chat.bsky.convo.defs#logLeaveConvo",
|
||||||
"chat.bsky.convo.defs#logCreateMessage",
|
"chat.bsky.convo.defs#logCreateMessage",
|
||||||
"chat.bsky.convo.defs#logDeleteMessage"
|
"chat.bsky.convo.defs#logDeleteMessage"
|
||||||
|
@ -13,7 +13,15 @@
|
|||||||
"maximum": 100,
|
"maximum": 100,
|
||||||
"default": 50
|
"default": 50
|
||||||
},
|
},
|
||||||
"cursor": { "type": "string" }
|
"cursor": { "type": "string" },
|
||||||
|
"readState": {
|
||||||
|
"type": "string",
|
||||||
|
"knownValues": ["unread"]
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"type": "string",
|
||||||
|
"knownValues": ["request", "accepted"]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"output": {
|
"output": {
|
||||||
|
@ -182,9 +182,11 @@ import * as ChatBskyActorDeclaration from './types/chat/bsky/actor/declaration.j
|
|||||||
import * as ChatBskyActorDefs from './types/chat/bsky/actor/defs.js'
|
import * as ChatBskyActorDefs from './types/chat/bsky/actor/defs.js'
|
||||||
import * as ChatBskyActorDeleteAccount from './types/chat/bsky/actor/deleteAccount.js'
|
import * as ChatBskyActorDeleteAccount from './types/chat/bsky/actor/deleteAccount.js'
|
||||||
import * as ChatBskyActorExportAccountData from './types/chat/bsky/actor/exportAccountData.js'
|
import * as ChatBskyActorExportAccountData from './types/chat/bsky/actor/exportAccountData.js'
|
||||||
|
import * as ChatBskyConvoAcceptConvo from './types/chat/bsky/convo/acceptConvo.js'
|
||||||
import * as ChatBskyConvoDefs from './types/chat/bsky/convo/defs.js'
|
import * as ChatBskyConvoDefs from './types/chat/bsky/convo/defs.js'
|
||||||
import * as ChatBskyConvoDeleteMessageForSelf from './types/chat/bsky/convo/deleteMessageForSelf.js'
|
import * as ChatBskyConvoDeleteMessageForSelf from './types/chat/bsky/convo/deleteMessageForSelf.js'
|
||||||
import * as ChatBskyConvoGetConvo from './types/chat/bsky/convo/getConvo.js'
|
import * as ChatBskyConvoGetConvo from './types/chat/bsky/convo/getConvo.js'
|
||||||
|
import * as ChatBskyConvoGetConvoAvailability from './types/chat/bsky/convo/getConvoAvailability.js'
|
||||||
import * as ChatBskyConvoGetConvoForMembers from './types/chat/bsky/convo/getConvoForMembers.js'
|
import * as ChatBskyConvoGetConvoForMembers from './types/chat/bsky/convo/getConvoForMembers.js'
|
||||||
import * as ChatBskyConvoGetLog from './types/chat/bsky/convo/getLog.js'
|
import * as ChatBskyConvoGetLog from './types/chat/bsky/convo/getLog.js'
|
||||||
import * as ChatBskyConvoGetMessages from './types/chat/bsky/convo/getMessages.js'
|
import * as ChatBskyConvoGetMessages from './types/chat/bsky/convo/getMessages.js'
|
||||||
@ -413,9 +415,11 @@ export * as ChatBskyActorDeclaration from './types/chat/bsky/actor/declaration.j
|
|||||||
export * as ChatBskyActorDefs from './types/chat/bsky/actor/defs.js'
|
export * as ChatBskyActorDefs from './types/chat/bsky/actor/defs.js'
|
||||||
export * as ChatBskyActorDeleteAccount from './types/chat/bsky/actor/deleteAccount.js'
|
export * as ChatBskyActorDeleteAccount from './types/chat/bsky/actor/deleteAccount.js'
|
||||||
export * as ChatBskyActorExportAccountData from './types/chat/bsky/actor/exportAccountData.js'
|
export * as ChatBskyActorExportAccountData from './types/chat/bsky/actor/exportAccountData.js'
|
||||||
|
export * as ChatBskyConvoAcceptConvo from './types/chat/bsky/convo/acceptConvo.js'
|
||||||
export * as ChatBskyConvoDefs from './types/chat/bsky/convo/defs.js'
|
export * as ChatBskyConvoDefs from './types/chat/bsky/convo/defs.js'
|
||||||
export * as ChatBskyConvoDeleteMessageForSelf from './types/chat/bsky/convo/deleteMessageForSelf.js'
|
export * as ChatBskyConvoDeleteMessageForSelf from './types/chat/bsky/convo/deleteMessageForSelf.js'
|
||||||
export * as ChatBskyConvoGetConvo from './types/chat/bsky/convo/getConvo.js'
|
export * as ChatBskyConvoGetConvo from './types/chat/bsky/convo/getConvo.js'
|
||||||
|
export * as ChatBskyConvoGetConvoAvailability from './types/chat/bsky/convo/getConvoAvailability.js'
|
||||||
export * as ChatBskyConvoGetConvoForMembers from './types/chat/bsky/convo/getConvoForMembers.js'
|
export * as ChatBskyConvoGetConvoForMembers from './types/chat/bsky/convo/getConvoForMembers.js'
|
||||||
export * as ChatBskyConvoGetLog from './types/chat/bsky/convo/getLog.js'
|
export * as ChatBskyConvoGetLog from './types/chat/bsky/convo/getLog.js'
|
||||||
export * as ChatBskyConvoGetMessages from './types/chat/bsky/convo/getMessages.js'
|
export * as ChatBskyConvoGetMessages from './types/chat/bsky/convo/getMessages.js'
|
||||||
@ -3419,6 +3423,18 @@ export class ChatBskyConvoNS {
|
|||||||
this._client = client
|
this._client = client
|
||||||
}
|
}
|
||||||
|
|
||||||
|
acceptConvo(
|
||||||
|
data?: ChatBskyConvoAcceptConvo.InputSchema,
|
||||||
|
opts?: ChatBskyConvoAcceptConvo.CallOptions,
|
||||||
|
): Promise<ChatBskyConvoAcceptConvo.Response> {
|
||||||
|
return this._client.call(
|
||||||
|
'chat.bsky.convo.acceptConvo',
|
||||||
|
opts?.qp,
|
||||||
|
data,
|
||||||
|
opts,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
deleteMessageForSelf(
|
deleteMessageForSelf(
|
||||||
data?: ChatBskyConvoDeleteMessageForSelf.InputSchema,
|
data?: ChatBskyConvoDeleteMessageForSelf.InputSchema,
|
||||||
opts?: ChatBskyConvoDeleteMessageForSelf.CallOptions,
|
opts?: ChatBskyConvoDeleteMessageForSelf.CallOptions,
|
||||||
@ -3443,6 +3459,18 @@ export class ChatBskyConvoNS {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getConvoAvailability(
|
||||||
|
params?: ChatBskyConvoGetConvoAvailability.QueryParams,
|
||||||
|
opts?: ChatBskyConvoGetConvoAvailability.CallOptions,
|
||||||
|
): Promise<ChatBskyConvoGetConvoAvailability.Response> {
|
||||||
|
return this._client.call(
|
||||||
|
'chat.bsky.convo.getConvoAvailability',
|
||||||
|
params,
|
||||||
|
undefined,
|
||||||
|
opts,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
getConvoForMembers(
|
getConvoForMembers(
|
||||||
params?: ChatBskyConvoGetConvoForMembers.QueryParams,
|
params?: ChatBskyConvoGetConvoForMembers.QueryParams,
|
||||||
opts?: ChatBskyConvoGetConvoForMembers.CallOptions,
|
opts?: ChatBskyConvoGetConvoForMembers.CallOptions,
|
||||||
|
@ -10206,6 +10206,40 @@ export const schemaDict = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
ChatBskyConvoAcceptConvo: {
|
||||||
|
lexicon: 1,
|
||||||
|
id: 'chat.bsky.convo.acceptConvo',
|
||||||
|
defs: {
|
||||||
|
main: {
|
||||||
|
type: 'procedure',
|
||||||
|
input: {
|
||||||
|
encoding: 'application/json',
|
||||||
|
schema: {
|
||||||
|
type: 'object',
|
||||||
|
required: ['convoId'],
|
||||||
|
properties: {
|
||||||
|
convoId: {
|
||||||
|
type: 'string',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
output: {
|
||||||
|
encoding: 'application/json',
|
||||||
|
schema: {
|
||||||
|
type: 'object',
|
||||||
|
properties: {
|
||||||
|
rev: {
|
||||||
|
description:
|
||||||
|
'Rev when the convo was accepted. If not present, the convo was already accepted.',
|
||||||
|
type: 'string',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
ChatBskyConvoDefs: {
|
ChatBskyConvoDefs: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: 'chat.bsky.convo.defs',
|
id: 'chat.bsky.convo.defs',
|
||||||
@ -10343,8 +10377,9 @@ export const schemaDict = {
|
|||||||
muted: {
|
muted: {
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
},
|
},
|
||||||
opened: {
|
status: {
|
||||||
type: 'boolean',
|
type: 'string',
|
||||||
|
knownValues: ['request', 'accepted'],
|
||||||
},
|
},
|
||||||
unreadCount: {
|
unreadCount: {
|
||||||
type: 'integer',
|
type: 'integer',
|
||||||
@ -10363,6 +10398,18 @@ export const schemaDict = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
logAcceptConvo: {
|
||||||
|
type: 'object',
|
||||||
|
required: ['rev', 'convoId'],
|
||||||
|
properties: {
|
||||||
|
rev: {
|
||||||
|
type: 'string',
|
||||||
|
},
|
||||||
|
convoId: {
|
||||||
|
type: 'string',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
logLeaveConvo: {
|
logLeaveConvo: {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
required: ['rev', 'convoId'],
|
required: ['rev', 'convoId'],
|
||||||
@ -10375,6 +10422,30 @@ export const schemaDict = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
logMuteConvo: {
|
||||||
|
type: 'object',
|
||||||
|
required: ['rev', 'convoId'],
|
||||||
|
properties: {
|
||||||
|
rev: {
|
||||||
|
type: 'string',
|
||||||
|
},
|
||||||
|
convoId: {
|
||||||
|
type: 'string',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
logUnmuteConvo: {
|
||||||
|
type: 'object',
|
||||||
|
required: ['rev', 'convoId'],
|
||||||
|
properties: {
|
||||||
|
rev: {
|
||||||
|
type: 'string',
|
||||||
|
},
|
||||||
|
convoId: {
|
||||||
|
type: 'string',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
logCreateMessage: {
|
logCreateMessage: {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
required: ['rev', 'convoId', 'message'],
|
required: ['rev', 'convoId', 'message'],
|
||||||
@ -10413,6 +10484,25 @@ export const schemaDict = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
logReadMessage: {
|
||||||
|
type: 'object',
|
||||||
|
required: ['rev', 'convoId', 'message'],
|
||||||
|
properties: {
|
||||||
|
rev: {
|
||||||
|
type: 'string',
|
||||||
|
},
|
||||||
|
convoId: {
|
||||||
|
type: 'string',
|
||||||
|
},
|
||||||
|
message: {
|
||||||
|
type: 'union',
|
||||||
|
refs: [
|
||||||
|
'lex:chat.bsky.convo.defs#messageView',
|
||||||
|
'lex:chat.bsky.convo.defs#deletedMessageView',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
ChatBskyConvoDeleteMessageForSelf: {
|
ChatBskyConvoDeleteMessageForSelf: {
|
||||||
@ -10477,6 +10567,48 @@ export const schemaDict = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
ChatBskyConvoGetConvoAvailability: {
|
||||||
|
lexicon: 1,
|
||||||
|
id: 'chat.bsky.convo.getConvoAvailability',
|
||||||
|
defs: {
|
||||||
|
main: {
|
||||||
|
type: 'query',
|
||||||
|
description:
|
||||||
|
'Get whether the requester and the other members can chat. If an existing convo is found for these members, it is returned.',
|
||||||
|
parameters: {
|
||||||
|
type: 'params',
|
||||||
|
required: ['members'],
|
||||||
|
properties: {
|
||||||
|
members: {
|
||||||
|
type: 'array',
|
||||||
|
minLength: 1,
|
||||||
|
maxLength: 10,
|
||||||
|
items: {
|
||||||
|
type: 'string',
|
||||||
|
format: 'did',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
output: {
|
||||||
|
encoding: 'application/json',
|
||||||
|
schema: {
|
||||||
|
type: 'object',
|
||||||
|
required: ['canChat'],
|
||||||
|
properties: {
|
||||||
|
canChat: {
|
||||||
|
type: 'boolean',
|
||||||
|
},
|
||||||
|
convo: {
|
||||||
|
type: 'ref',
|
||||||
|
ref: 'lex:chat.bsky.convo.defs#convoView',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
ChatBskyConvoGetConvoForMembers: {
|
ChatBskyConvoGetConvoForMembers: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: 'chat.bsky.convo.getConvoForMembers',
|
id: 'chat.bsky.convo.getConvoForMembers',
|
||||||
@ -10544,6 +10676,7 @@ export const schemaDict = {
|
|||||||
type: 'union',
|
type: 'union',
|
||||||
refs: [
|
refs: [
|
||||||
'lex:chat.bsky.convo.defs#logBeginConvo',
|
'lex:chat.bsky.convo.defs#logBeginConvo',
|
||||||
|
'lex:chat.bsky.convo.defs#logAcceptConvo',
|
||||||
'lex:chat.bsky.convo.defs#logLeaveConvo',
|
'lex:chat.bsky.convo.defs#logLeaveConvo',
|
||||||
'lex:chat.bsky.convo.defs#logCreateMessage',
|
'lex:chat.bsky.convo.defs#logCreateMessage',
|
||||||
'lex:chat.bsky.convo.defs#logDeleteMessage',
|
'lex:chat.bsky.convo.defs#logDeleteMessage',
|
||||||
@ -10659,6 +10792,14 @@ export const schemaDict = {
|
|||||||
cursor: {
|
cursor: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
},
|
},
|
||||||
|
readState: {
|
||||||
|
type: 'string',
|
||||||
|
knownValues: ['unread'],
|
||||||
|
},
|
||||||
|
status: {
|
||||||
|
type: 'string',
|
||||||
|
knownValues: ['request', 'accepted'],
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
output: {
|
output: {
|
||||||
@ -14289,9 +14430,11 @@ export const ids = {
|
|||||||
ChatBskyActorDefs: 'chat.bsky.actor.defs',
|
ChatBskyActorDefs: 'chat.bsky.actor.defs',
|
||||||
ChatBskyActorDeleteAccount: 'chat.bsky.actor.deleteAccount',
|
ChatBskyActorDeleteAccount: 'chat.bsky.actor.deleteAccount',
|
||||||
ChatBskyActorExportAccountData: 'chat.bsky.actor.exportAccountData',
|
ChatBskyActorExportAccountData: 'chat.bsky.actor.exportAccountData',
|
||||||
|
ChatBskyConvoAcceptConvo: 'chat.bsky.convo.acceptConvo',
|
||||||
ChatBskyConvoDefs: 'chat.bsky.convo.defs',
|
ChatBskyConvoDefs: 'chat.bsky.convo.defs',
|
||||||
ChatBskyConvoDeleteMessageForSelf: 'chat.bsky.convo.deleteMessageForSelf',
|
ChatBskyConvoDeleteMessageForSelf: 'chat.bsky.convo.deleteMessageForSelf',
|
||||||
ChatBskyConvoGetConvo: 'chat.bsky.convo.getConvo',
|
ChatBskyConvoGetConvo: 'chat.bsky.convo.getConvo',
|
||||||
|
ChatBskyConvoGetConvoAvailability: 'chat.bsky.convo.getConvoAvailability',
|
||||||
ChatBskyConvoGetConvoForMembers: 'chat.bsky.convo.getConvoForMembers',
|
ChatBskyConvoGetConvoForMembers: 'chat.bsky.convo.getConvoForMembers',
|
||||||
ChatBskyConvoGetLog: 'chat.bsky.convo.getLog',
|
ChatBskyConvoGetLog: 'chat.bsky.convo.getLog',
|
||||||
ChatBskyConvoGetMessages: 'chat.bsky.convo.getMessages',
|
ChatBskyConvoGetMessages: 'chat.bsky.convo.getMessages',
|
||||||
|
40
packages/api/src/client/types/chat/bsky/convo/acceptConvo.ts
Normal file
40
packages/api/src/client/types/chat/bsky/convo/acceptConvo.ts
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
/**
|
||||||
|
* GENERATED CODE - DO NOT MODIFY
|
||||||
|
*/
|
||||||
|
import { HeadersMap, XRPCError } from '@atproto/xrpc'
|
||||||
|
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
||||||
|
import { CID } from 'multiformats/cid'
|
||||||
|
import { validate as _validate } from '../../../../lexicons'
|
||||||
|
import { $Typed, is$typed as _is$typed, OmitKey } from '../../../../util'
|
||||||
|
|
||||||
|
const is$typed = _is$typed,
|
||||||
|
validate = _validate
|
||||||
|
const id = 'chat.bsky.convo.acceptConvo'
|
||||||
|
|
||||||
|
export interface QueryParams {}
|
||||||
|
|
||||||
|
export interface InputSchema {
|
||||||
|
convoId: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface OutputSchema {
|
||||||
|
/** Rev when the convo was accepted. If not present, the convo was already accepted. */
|
||||||
|
rev?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface CallOptions {
|
||||||
|
signal?: AbortSignal
|
||||||
|
headers?: HeadersMap
|
||||||
|
qp?: QueryParams
|
||||||
|
encoding?: 'application/json'
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Response {
|
||||||
|
success: boolean
|
||||||
|
headers: HeadersMap
|
||||||
|
data: OutputSchema
|
||||||
|
}
|
||||||
|
|
||||||
|
export function toKnownErr(e: any) {
|
||||||
|
return e
|
||||||
|
}
|
@ -113,7 +113,7 @@ export interface ConvoView {
|
|||||||
| $Typed<DeletedMessageView>
|
| $Typed<DeletedMessageView>
|
||||||
| { $type: string }
|
| { $type: string }
|
||||||
muted: boolean
|
muted: boolean
|
||||||
opened?: boolean
|
status?: 'request' | 'accepted' | (string & {})
|
||||||
unreadCount: number
|
unreadCount: number
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -143,6 +143,22 @@ export function validateLogBeginConvo<V>(v: V) {
|
|||||||
return validate<LogBeginConvo & V>(v, id, hashLogBeginConvo)
|
return validate<LogBeginConvo & V>(v, id, hashLogBeginConvo)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface LogAcceptConvo {
|
||||||
|
$type?: 'chat.bsky.convo.defs#logAcceptConvo'
|
||||||
|
rev: string
|
||||||
|
convoId: string
|
||||||
|
}
|
||||||
|
|
||||||
|
const hashLogAcceptConvo = 'logAcceptConvo'
|
||||||
|
|
||||||
|
export function isLogAcceptConvo<V>(v: V) {
|
||||||
|
return is$typed(v, id, hashLogAcceptConvo)
|
||||||
|
}
|
||||||
|
|
||||||
|
export function validateLogAcceptConvo<V>(v: V) {
|
||||||
|
return validate<LogAcceptConvo & V>(v, id, hashLogAcceptConvo)
|
||||||
|
}
|
||||||
|
|
||||||
export interface LogLeaveConvo {
|
export interface LogLeaveConvo {
|
||||||
$type?: 'chat.bsky.convo.defs#logLeaveConvo'
|
$type?: 'chat.bsky.convo.defs#logLeaveConvo'
|
||||||
rev: string
|
rev: string
|
||||||
@ -159,6 +175,38 @@ export function validateLogLeaveConvo<V>(v: V) {
|
|||||||
return validate<LogLeaveConvo & V>(v, id, hashLogLeaveConvo)
|
return validate<LogLeaveConvo & V>(v, id, hashLogLeaveConvo)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface LogMuteConvo {
|
||||||
|
$type?: 'chat.bsky.convo.defs#logMuteConvo'
|
||||||
|
rev: string
|
||||||
|
convoId: string
|
||||||
|
}
|
||||||
|
|
||||||
|
const hashLogMuteConvo = 'logMuteConvo'
|
||||||
|
|
||||||
|
export function isLogMuteConvo<V>(v: V) {
|
||||||
|
return is$typed(v, id, hashLogMuteConvo)
|
||||||
|
}
|
||||||
|
|
||||||
|
export function validateLogMuteConvo<V>(v: V) {
|
||||||
|
return validate<LogMuteConvo & V>(v, id, hashLogMuteConvo)
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface LogUnmuteConvo {
|
||||||
|
$type?: 'chat.bsky.convo.defs#logUnmuteConvo'
|
||||||
|
rev: string
|
||||||
|
convoId: string
|
||||||
|
}
|
||||||
|
|
||||||
|
const hashLogUnmuteConvo = 'logUnmuteConvo'
|
||||||
|
|
||||||
|
export function isLogUnmuteConvo<V>(v: V) {
|
||||||
|
return is$typed(v, id, hashLogUnmuteConvo)
|
||||||
|
}
|
||||||
|
|
||||||
|
export function validateLogUnmuteConvo<V>(v: V) {
|
||||||
|
return validate<LogUnmuteConvo & V>(v, id, hashLogUnmuteConvo)
|
||||||
|
}
|
||||||
|
|
||||||
export interface LogCreateMessage {
|
export interface LogCreateMessage {
|
||||||
$type?: 'chat.bsky.convo.defs#logCreateMessage'
|
$type?: 'chat.bsky.convo.defs#logCreateMessage'
|
||||||
rev: string
|
rev: string
|
||||||
@ -192,3 +240,20 @@ export function isLogDeleteMessage<V>(v: V) {
|
|||||||
export function validateLogDeleteMessage<V>(v: V) {
|
export function validateLogDeleteMessage<V>(v: V) {
|
||||||
return validate<LogDeleteMessage & V>(v, id, hashLogDeleteMessage)
|
return validate<LogDeleteMessage & V>(v, id, hashLogDeleteMessage)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface LogReadMessage {
|
||||||
|
$type?: 'chat.bsky.convo.defs#logReadMessage'
|
||||||
|
rev: string
|
||||||
|
convoId: string
|
||||||
|
message: $Typed<MessageView> | $Typed<DeletedMessageView> | { $type: string }
|
||||||
|
}
|
||||||
|
|
||||||
|
const hashLogReadMessage = 'logReadMessage'
|
||||||
|
|
||||||
|
export function isLogReadMessage<V>(v: V) {
|
||||||
|
return is$typed(v, id, hashLogReadMessage)
|
||||||
|
}
|
||||||
|
|
||||||
|
export function validateLogReadMessage<V>(v: V) {
|
||||||
|
return validate<LogReadMessage & V>(v, id, hashLogReadMessage)
|
||||||
|
}
|
||||||
|
@ -0,0 +1,39 @@
|
|||||||
|
/**
|
||||||
|
* GENERATED CODE - DO NOT MODIFY
|
||||||
|
*/
|
||||||
|
import { HeadersMap, XRPCError } from '@atproto/xrpc'
|
||||||
|
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
||||||
|
import { CID } from 'multiformats/cid'
|
||||||
|
import { validate as _validate } from '../../../../lexicons'
|
||||||
|
import { $Typed, is$typed as _is$typed, OmitKey } from '../../../../util'
|
||||||
|
import type * as ChatBskyConvoDefs from './defs.js'
|
||||||
|
|
||||||
|
const is$typed = _is$typed,
|
||||||
|
validate = _validate
|
||||||
|
const id = 'chat.bsky.convo.getConvoAvailability'
|
||||||
|
|
||||||
|
export interface QueryParams {
|
||||||
|
members: string[]
|
||||||
|
}
|
||||||
|
|
||||||
|
export type InputSchema = undefined
|
||||||
|
|
||||||
|
export interface OutputSchema {
|
||||||
|
canChat: boolean
|
||||||
|
convo?: ChatBskyConvoDefs.ConvoView
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface CallOptions {
|
||||||
|
signal?: AbortSignal
|
||||||
|
headers?: HeadersMap
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Response {
|
||||||
|
success: boolean
|
||||||
|
headers: HeadersMap
|
||||||
|
data: OutputSchema
|
||||||
|
}
|
||||||
|
|
||||||
|
export function toKnownErr(e: any) {
|
||||||
|
return e
|
||||||
|
}
|
@ -22,6 +22,7 @@ export interface OutputSchema {
|
|||||||
cursor?: string
|
cursor?: string
|
||||||
logs: (
|
logs: (
|
||||||
| $Typed<ChatBskyConvoDefs.LogBeginConvo>
|
| $Typed<ChatBskyConvoDefs.LogBeginConvo>
|
||||||
|
| $Typed<ChatBskyConvoDefs.LogAcceptConvo>
|
||||||
| $Typed<ChatBskyConvoDefs.LogLeaveConvo>
|
| $Typed<ChatBskyConvoDefs.LogLeaveConvo>
|
||||||
| $Typed<ChatBskyConvoDefs.LogCreateMessage>
|
| $Typed<ChatBskyConvoDefs.LogCreateMessage>
|
||||||
| $Typed<ChatBskyConvoDefs.LogDeleteMessage>
|
| $Typed<ChatBskyConvoDefs.LogDeleteMessage>
|
||||||
|
@ -15,6 +15,8 @@ const id = 'chat.bsky.convo.listConvos'
|
|||||||
export interface QueryParams {
|
export interface QueryParams {
|
||||||
limit?: number
|
limit?: number
|
||||||
cursor?: string
|
cursor?: string
|
||||||
|
readState?: 'unread' | (string & {})
|
||||||
|
status?: 'request' | 'accepted' | (string & {})
|
||||||
}
|
}
|
||||||
|
|
||||||
export type InputSchema = undefined
|
export type InputSchema = undefined
|
||||||
|
@ -150,8 +150,10 @@ import * as AppBskyVideoGetUploadLimits from './types/app/bsky/video/getUploadLi
|
|||||||
import * as AppBskyVideoUploadVideo from './types/app/bsky/video/uploadVideo.js'
|
import * as AppBskyVideoUploadVideo from './types/app/bsky/video/uploadVideo.js'
|
||||||
import * as ChatBskyActorDeleteAccount from './types/chat/bsky/actor/deleteAccount.js'
|
import * as ChatBskyActorDeleteAccount from './types/chat/bsky/actor/deleteAccount.js'
|
||||||
import * as ChatBskyActorExportAccountData from './types/chat/bsky/actor/exportAccountData.js'
|
import * as ChatBskyActorExportAccountData from './types/chat/bsky/actor/exportAccountData.js'
|
||||||
|
import * as ChatBskyConvoAcceptConvo from './types/chat/bsky/convo/acceptConvo.js'
|
||||||
import * as ChatBskyConvoDeleteMessageForSelf from './types/chat/bsky/convo/deleteMessageForSelf.js'
|
import * as ChatBskyConvoDeleteMessageForSelf from './types/chat/bsky/convo/deleteMessageForSelf.js'
|
||||||
import * as ChatBskyConvoGetConvo from './types/chat/bsky/convo/getConvo.js'
|
import * as ChatBskyConvoGetConvo from './types/chat/bsky/convo/getConvo.js'
|
||||||
|
import * as ChatBskyConvoGetConvoAvailability from './types/chat/bsky/convo/getConvoAvailability.js'
|
||||||
import * as ChatBskyConvoGetConvoForMembers from './types/chat/bsky/convo/getConvoForMembers.js'
|
import * as ChatBskyConvoGetConvoForMembers from './types/chat/bsky/convo/getConvoForMembers.js'
|
||||||
import * as ChatBskyConvoGetLog from './types/chat/bsky/convo/getLog.js'
|
import * as ChatBskyConvoGetLog from './types/chat/bsky/convo/getLog.js'
|
||||||
import * as ChatBskyConvoGetMessages from './types/chat/bsky/convo/getMessages.js'
|
import * as ChatBskyConvoGetMessages from './types/chat/bsky/convo/getMessages.js'
|
||||||
@ -2025,6 +2027,17 @@ export class ChatBskyConvoNS {
|
|||||||
this._server = server
|
this._server = server
|
||||||
}
|
}
|
||||||
|
|
||||||
|
acceptConvo<AV extends AuthVerifier>(
|
||||||
|
cfg: ConfigOf<
|
||||||
|
AV,
|
||||||
|
ChatBskyConvoAcceptConvo.Handler<ExtractAuth<AV>>,
|
||||||
|
ChatBskyConvoAcceptConvo.HandlerReqCtx<ExtractAuth<AV>>
|
||||||
|
>,
|
||||||
|
) {
|
||||||
|
const nsid = 'chat.bsky.convo.acceptConvo' // @ts-ignore
|
||||||
|
return this._server.xrpc.method(nsid, cfg)
|
||||||
|
}
|
||||||
|
|
||||||
deleteMessageForSelf<AV extends AuthVerifier>(
|
deleteMessageForSelf<AV extends AuthVerifier>(
|
||||||
cfg: ConfigOf<
|
cfg: ConfigOf<
|
||||||
AV,
|
AV,
|
||||||
@ -2047,6 +2060,17 @@ export class ChatBskyConvoNS {
|
|||||||
return this._server.xrpc.method(nsid, cfg)
|
return this._server.xrpc.method(nsid, cfg)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getConvoAvailability<AV extends AuthVerifier>(
|
||||||
|
cfg: ConfigOf<
|
||||||
|
AV,
|
||||||
|
ChatBskyConvoGetConvoAvailability.Handler<ExtractAuth<AV>>,
|
||||||
|
ChatBskyConvoGetConvoAvailability.HandlerReqCtx<ExtractAuth<AV>>
|
||||||
|
>,
|
||||||
|
) {
|
||||||
|
const nsid = 'chat.bsky.convo.getConvoAvailability' // @ts-ignore
|
||||||
|
return this._server.xrpc.method(nsid, cfg)
|
||||||
|
}
|
||||||
|
|
||||||
getConvoForMembers<AV extends AuthVerifier>(
|
getConvoForMembers<AV extends AuthVerifier>(
|
||||||
cfg: ConfigOf<
|
cfg: ConfigOf<
|
||||||
AV,
|
AV,
|
||||||
|
@ -10206,6 +10206,40 @@ export const schemaDict = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
ChatBskyConvoAcceptConvo: {
|
||||||
|
lexicon: 1,
|
||||||
|
id: 'chat.bsky.convo.acceptConvo',
|
||||||
|
defs: {
|
||||||
|
main: {
|
||||||
|
type: 'procedure',
|
||||||
|
input: {
|
||||||
|
encoding: 'application/json',
|
||||||
|
schema: {
|
||||||
|
type: 'object',
|
||||||
|
required: ['convoId'],
|
||||||
|
properties: {
|
||||||
|
convoId: {
|
||||||
|
type: 'string',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
output: {
|
||||||
|
encoding: 'application/json',
|
||||||
|
schema: {
|
||||||
|
type: 'object',
|
||||||
|
properties: {
|
||||||
|
rev: {
|
||||||
|
description:
|
||||||
|
'Rev when the convo was accepted. If not present, the convo was already accepted.',
|
||||||
|
type: 'string',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
ChatBskyConvoDefs: {
|
ChatBskyConvoDefs: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: 'chat.bsky.convo.defs',
|
id: 'chat.bsky.convo.defs',
|
||||||
@ -10343,8 +10377,9 @@ export const schemaDict = {
|
|||||||
muted: {
|
muted: {
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
},
|
},
|
||||||
opened: {
|
status: {
|
||||||
type: 'boolean',
|
type: 'string',
|
||||||
|
knownValues: ['request', 'accepted'],
|
||||||
},
|
},
|
||||||
unreadCount: {
|
unreadCount: {
|
||||||
type: 'integer',
|
type: 'integer',
|
||||||
@ -10363,6 +10398,18 @@ export const schemaDict = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
logAcceptConvo: {
|
||||||
|
type: 'object',
|
||||||
|
required: ['rev', 'convoId'],
|
||||||
|
properties: {
|
||||||
|
rev: {
|
||||||
|
type: 'string',
|
||||||
|
},
|
||||||
|
convoId: {
|
||||||
|
type: 'string',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
logLeaveConvo: {
|
logLeaveConvo: {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
required: ['rev', 'convoId'],
|
required: ['rev', 'convoId'],
|
||||||
@ -10375,6 +10422,30 @@ export const schemaDict = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
logMuteConvo: {
|
||||||
|
type: 'object',
|
||||||
|
required: ['rev', 'convoId'],
|
||||||
|
properties: {
|
||||||
|
rev: {
|
||||||
|
type: 'string',
|
||||||
|
},
|
||||||
|
convoId: {
|
||||||
|
type: 'string',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
logUnmuteConvo: {
|
||||||
|
type: 'object',
|
||||||
|
required: ['rev', 'convoId'],
|
||||||
|
properties: {
|
||||||
|
rev: {
|
||||||
|
type: 'string',
|
||||||
|
},
|
||||||
|
convoId: {
|
||||||
|
type: 'string',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
logCreateMessage: {
|
logCreateMessage: {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
required: ['rev', 'convoId', 'message'],
|
required: ['rev', 'convoId', 'message'],
|
||||||
@ -10413,6 +10484,25 @@ export const schemaDict = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
logReadMessage: {
|
||||||
|
type: 'object',
|
||||||
|
required: ['rev', 'convoId', 'message'],
|
||||||
|
properties: {
|
||||||
|
rev: {
|
||||||
|
type: 'string',
|
||||||
|
},
|
||||||
|
convoId: {
|
||||||
|
type: 'string',
|
||||||
|
},
|
||||||
|
message: {
|
||||||
|
type: 'union',
|
||||||
|
refs: [
|
||||||
|
'lex:chat.bsky.convo.defs#messageView',
|
||||||
|
'lex:chat.bsky.convo.defs#deletedMessageView',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
ChatBskyConvoDeleteMessageForSelf: {
|
ChatBskyConvoDeleteMessageForSelf: {
|
||||||
@ -10477,6 +10567,48 @@ export const schemaDict = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
ChatBskyConvoGetConvoAvailability: {
|
||||||
|
lexicon: 1,
|
||||||
|
id: 'chat.bsky.convo.getConvoAvailability',
|
||||||
|
defs: {
|
||||||
|
main: {
|
||||||
|
type: 'query',
|
||||||
|
description:
|
||||||
|
'Get whether the requester and the other members can chat. If an existing convo is found for these members, it is returned.',
|
||||||
|
parameters: {
|
||||||
|
type: 'params',
|
||||||
|
required: ['members'],
|
||||||
|
properties: {
|
||||||
|
members: {
|
||||||
|
type: 'array',
|
||||||
|
minLength: 1,
|
||||||
|
maxLength: 10,
|
||||||
|
items: {
|
||||||
|
type: 'string',
|
||||||
|
format: 'did',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
output: {
|
||||||
|
encoding: 'application/json',
|
||||||
|
schema: {
|
||||||
|
type: 'object',
|
||||||
|
required: ['canChat'],
|
||||||
|
properties: {
|
||||||
|
canChat: {
|
||||||
|
type: 'boolean',
|
||||||
|
},
|
||||||
|
convo: {
|
||||||
|
type: 'ref',
|
||||||
|
ref: 'lex:chat.bsky.convo.defs#convoView',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
ChatBskyConvoGetConvoForMembers: {
|
ChatBskyConvoGetConvoForMembers: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: 'chat.bsky.convo.getConvoForMembers',
|
id: 'chat.bsky.convo.getConvoForMembers',
|
||||||
@ -10544,6 +10676,7 @@ export const schemaDict = {
|
|||||||
type: 'union',
|
type: 'union',
|
||||||
refs: [
|
refs: [
|
||||||
'lex:chat.bsky.convo.defs#logBeginConvo',
|
'lex:chat.bsky.convo.defs#logBeginConvo',
|
||||||
|
'lex:chat.bsky.convo.defs#logAcceptConvo',
|
||||||
'lex:chat.bsky.convo.defs#logLeaveConvo',
|
'lex:chat.bsky.convo.defs#logLeaveConvo',
|
||||||
'lex:chat.bsky.convo.defs#logCreateMessage',
|
'lex:chat.bsky.convo.defs#logCreateMessage',
|
||||||
'lex:chat.bsky.convo.defs#logDeleteMessage',
|
'lex:chat.bsky.convo.defs#logDeleteMessage',
|
||||||
@ -10659,6 +10792,14 @@ export const schemaDict = {
|
|||||||
cursor: {
|
cursor: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
},
|
},
|
||||||
|
readState: {
|
||||||
|
type: 'string',
|
||||||
|
knownValues: ['unread'],
|
||||||
|
},
|
||||||
|
status: {
|
||||||
|
type: 'string',
|
||||||
|
knownValues: ['request', 'accepted'],
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
output: {
|
output: {
|
||||||
@ -11244,9 +11385,11 @@ export const ids = {
|
|||||||
ChatBskyActorDefs: 'chat.bsky.actor.defs',
|
ChatBskyActorDefs: 'chat.bsky.actor.defs',
|
||||||
ChatBskyActorDeleteAccount: 'chat.bsky.actor.deleteAccount',
|
ChatBskyActorDeleteAccount: 'chat.bsky.actor.deleteAccount',
|
||||||
ChatBskyActorExportAccountData: 'chat.bsky.actor.exportAccountData',
|
ChatBskyActorExportAccountData: 'chat.bsky.actor.exportAccountData',
|
||||||
|
ChatBskyConvoAcceptConvo: 'chat.bsky.convo.acceptConvo',
|
||||||
ChatBskyConvoDefs: 'chat.bsky.convo.defs',
|
ChatBskyConvoDefs: 'chat.bsky.convo.defs',
|
||||||
ChatBskyConvoDeleteMessageForSelf: 'chat.bsky.convo.deleteMessageForSelf',
|
ChatBskyConvoDeleteMessageForSelf: 'chat.bsky.convo.deleteMessageForSelf',
|
||||||
ChatBskyConvoGetConvo: 'chat.bsky.convo.getConvo',
|
ChatBskyConvoGetConvo: 'chat.bsky.convo.getConvo',
|
||||||
|
ChatBskyConvoGetConvoAvailability: 'chat.bsky.convo.getConvoAvailability',
|
||||||
ChatBskyConvoGetConvoForMembers: 'chat.bsky.convo.getConvoForMembers',
|
ChatBskyConvoGetConvoForMembers: 'chat.bsky.convo.getConvoForMembers',
|
||||||
ChatBskyConvoGetLog: 'chat.bsky.convo.getLog',
|
ChatBskyConvoGetLog: 'chat.bsky.convo.getLog',
|
||||||
ChatBskyConvoGetMessages: 'chat.bsky.convo.getMessages',
|
ChatBskyConvoGetMessages: 'chat.bsky.convo.getMessages',
|
||||||
|
@ -0,0 +1,53 @@
|
|||||||
|
/**
|
||||||
|
* GENERATED CODE - DO NOT MODIFY
|
||||||
|
*/
|
||||||
|
import express from 'express'
|
||||||
|
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
||||||
|
import { CID } from 'multiformats/cid'
|
||||||
|
import { validate as _validate } from '../../../../lexicons'
|
||||||
|
import { $Typed, is$typed as _is$typed, OmitKey } from '../../../../util'
|
||||||
|
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
||||||
|
|
||||||
|
const is$typed = _is$typed,
|
||||||
|
validate = _validate
|
||||||
|
const id = 'chat.bsky.convo.acceptConvo'
|
||||||
|
|
||||||
|
export interface QueryParams {}
|
||||||
|
|
||||||
|
export interface InputSchema {
|
||||||
|
convoId: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface OutputSchema {
|
||||||
|
/** Rev when the convo was accepted. If not present, the convo was already accepted. */
|
||||||
|
rev?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface HandlerInput {
|
||||||
|
encoding: 'application/json'
|
||||||
|
body: InputSchema
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface HandlerSuccess {
|
||||||
|
encoding: 'application/json'
|
||||||
|
body: OutputSchema
|
||||||
|
headers?: { [key: string]: string }
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface HandlerError {
|
||||||
|
status: number
|
||||||
|
message?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
||||||
|
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||||
|
auth: HA
|
||||||
|
params: QueryParams
|
||||||
|
input: HandlerInput
|
||||||
|
req: express.Request
|
||||||
|
res: express.Response
|
||||||
|
resetRouteRateLimits: () => Promise<void>
|
||||||
|
}
|
||||||
|
export type Handler<HA extends HandlerAuth = never> = (
|
||||||
|
ctx: HandlerReqCtx<HA>,
|
||||||
|
) => Promise<HandlerOutput> | HandlerOutput
|
@ -113,7 +113,7 @@ export interface ConvoView {
|
|||||||
| $Typed<DeletedMessageView>
|
| $Typed<DeletedMessageView>
|
||||||
| { $type: string }
|
| { $type: string }
|
||||||
muted: boolean
|
muted: boolean
|
||||||
opened?: boolean
|
status?: 'request' | 'accepted' | (string & {})
|
||||||
unreadCount: number
|
unreadCount: number
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -143,6 +143,22 @@ export function validateLogBeginConvo<V>(v: V) {
|
|||||||
return validate<LogBeginConvo & V>(v, id, hashLogBeginConvo)
|
return validate<LogBeginConvo & V>(v, id, hashLogBeginConvo)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface LogAcceptConvo {
|
||||||
|
$type?: 'chat.bsky.convo.defs#logAcceptConvo'
|
||||||
|
rev: string
|
||||||
|
convoId: string
|
||||||
|
}
|
||||||
|
|
||||||
|
const hashLogAcceptConvo = 'logAcceptConvo'
|
||||||
|
|
||||||
|
export function isLogAcceptConvo<V>(v: V) {
|
||||||
|
return is$typed(v, id, hashLogAcceptConvo)
|
||||||
|
}
|
||||||
|
|
||||||
|
export function validateLogAcceptConvo<V>(v: V) {
|
||||||
|
return validate<LogAcceptConvo & V>(v, id, hashLogAcceptConvo)
|
||||||
|
}
|
||||||
|
|
||||||
export interface LogLeaveConvo {
|
export interface LogLeaveConvo {
|
||||||
$type?: 'chat.bsky.convo.defs#logLeaveConvo'
|
$type?: 'chat.bsky.convo.defs#logLeaveConvo'
|
||||||
rev: string
|
rev: string
|
||||||
@ -159,6 +175,38 @@ export function validateLogLeaveConvo<V>(v: V) {
|
|||||||
return validate<LogLeaveConvo & V>(v, id, hashLogLeaveConvo)
|
return validate<LogLeaveConvo & V>(v, id, hashLogLeaveConvo)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface LogMuteConvo {
|
||||||
|
$type?: 'chat.bsky.convo.defs#logMuteConvo'
|
||||||
|
rev: string
|
||||||
|
convoId: string
|
||||||
|
}
|
||||||
|
|
||||||
|
const hashLogMuteConvo = 'logMuteConvo'
|
||||||
|
|
||||||
|
export function isLogMuteConvo<V>(v: V) {
|
||||||
|
return is$typed(v, id, hashLogMuteConvo)
|
||||||
|
}
|
||||||
|
|
||||||
|
export function validateLogMuteConvo<V>(v: V) {
|
||||||
|
return validate<LogMuteConvo & V>(v, id, hashLogMuteConvo)
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface LogUnmuteConvo {
|
||||||
|
$type?: 'chat.bsky.convo.defs#logUnmuteConvo'
|
||||||
|
rev: string
|
||||||
|
convoId: string
|
||||||
|
}
|
||||||
|
|
||||||
|
const hashLogUnmuteConvo = 'logUnmuteConvo'
|
||||||
|
|
||||||
|
export function isLogUnmuteConvo<V>(v: V) {
|
||||||
|
return is$typed(v, id, hashLogUnmuteConvo)
|
||||||
|
}
|
||||||
|
|
||||||
|
export function validateLogUnmuteConvo<V>(v: V) {
|
||||||
|
return validate<LogUnmuteConvo & V>(v, id, hashLogUnmuteConvo)
|
||||||
|
}
|
||||||
|
|
||||||
export interface LogCreateMessage {
|
export interface LogCreateMessage {
|
||||||
$type?: 'chat.bsky.convo.defs#logCreateMessage'
|
$type?: 'chat.bsky.convo.defs#logCreateMessage'
|
||||||
rev: string
|
rev: string
|
||||||
@ -192,3 +240,20 @@ export function isLogDeleteMessage<V>(v: V) {
|
|||||||
export function validateLogDeleteMessage<V>(v: V) {
|
export function validateLogDeleteMessage<V>(v: V) {
|
||||||
return validate<LogDeleteMessage & V>(v, id, hashLogDeleteMessage)
|
return validate<LogDeleteMessage & V>(v, id, hashLogDeleteMessage)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface LogReadMessage {
|
||||||
|
$type?: 'chat.bsky.convo.defs#logReadMessage'
|
||||||
|
rev: string
|
||||||
|
convoId: string
|
||||||
|
message: $Typed<MessageView> | $Typed<DeletedMessageView> | { $type: string }
|
||||||
|
}
|
||||||
|
|
||||||
|
const hashLogReadMessage = 'logReadMessage'
|
||||||
|
|
||||||
|
export function isLogReadMessage<V>(v: V) {
|
||||||
|
return is$typed(v, id, hashLogReadMessage)
|
||||||
|
}
|
||||||
|
|
||||||
|
export function validateLogReadMessage<V>(v: V) {
|
||||||
|
return validate<LogReadMessage & V>(v, id, hashLogReadMessage)
|
||||||
|
}
|
||||||
|
@ -0,0 +1,51 @@
|
|||||||
|
/**
|
||||||
|
* GENERATED CODE - DO NOT MODIFY
|
||||||
|
*/
|
||||||
|
import express from 'express'
|
||||||
|
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
||||||
|
import { CID } from 'multiformats/cid'
|
||||||
|
import { validate as _validate } from '../../../../lexicons'
|
||||||
|
import { $Typed, is$typed as _is$typed, OmitKey } from '../../../../util'
|
||||||
|
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
||||||
|
import type * as ChatBskyConvoDefs from './defs.js'
|
||||||
|
|
||||||
|
const is$typed = _is$typed,
|
||||||
|
validate = _validate
|
||||||
|
const id = 'chat.bsky.convo.getConvoAvailability'
|
||||||
|
|
||||||
|
export interface QueryParams {
|
||||||
|
members: string[]
|
||||||
|
}
|
||||||
|
|
||||||
|
export type InputSchema = undefined
|
||||||
|
|
||||||
|
export interface OutputSchema {
|
||||||
|
canChat: boolean
|
||||||
|
convo?: ChatBskyConvoDefs.ConvoView
|
||||||
|
}
|
||||||
|
|
||||||
|
export type HandlerInput = undefined
|
||||||
|
|
||||||
|
export interface HandlerSuccess {
|
||||||
|
encoding: 'application/json'
|
||||||
|
body: OutputSchema
|
||||||
|
headers?: { [key: string]: string }
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface HandlerError {
|
||||||
|
status: number
|
||||||
|
message?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
||||||
|
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||||
|
auth: HA
|
||||||
|
params: QueryParams
|
||||||
|
input: HandlerInput
|
||||||
|
req: express.Request
|
||||||
|
res: express.Response
|
||||||
|
resetRouteRateLimits: () => Promise<void>
|
||||||
|
}
|
||||||
|
export type Handler<HA extends HandlerAuth = never> = (
|
||||||
|
ctx: HandlerReqCtx<HA>,
|
||||||
|
) => Promise<HandlerOutput> | HandlerOutput
|
@ -23,6 +23,7 @@ export interface OutputSchema {
|
|||||||
cursor?: string
|
cursor?: string
|
||||||
logs: (
|
logs: (
|
||||||
| $Typed<ChatBskyConvoDefs.LogBeginConvo>
|
| $Typed<ChatBskyConvoDefs.LogBeginConvo>
|
||||||
|
| $Typed<ChatBskyConvoDefs.LogAcceptConvo>
|
||||||
| $Typed<ChatBskyConvoDefs.LogLeaveConvo>
|
| $Typed<ChatBskyConvoDefs.LogLeaveConvo>
|
||||||
| $Typed<ChatBskyConvoDefs.LogCreateMessage>
|
| $Typed<ChatBskyConvoDefs.LogCreateMessage>
|
||||||
| $Typed<ChatBskyConvoDefs.LogDeleteMessage>
|
| $Typed<ChatBskyConvoDefs.LogDeleteMessage>
|
||||||
|
@ -16,6 +16,8 @@ const id = 'chat.bsky.convo.listConvos'
|
|||||||
export interface QueryParams {
|
export interface QueryParams {
|
||||||
limit: number
|
limit: number
|
||||||
cursor?: string
|
cursor?: string
|
||||||
|
readState?: 'unread' | (string & {})
|
||||||
|
status?: 'request' | 'accepted' | (string & {})
|
||||||
}
|
}
|
||||||
|
|
||||||
export type InputSchema = undefined
|
export type InputSchema = undefined
|
||||||
|
@ -150,8 +150,10 @@ import * as AppBskyVideoGetUploadLimits from './types/app/bsky/video/getUploadLi
|
|||||||
import * as AppBskyVideoUploadVideo from './types/app/bsky/video/uploadVideo.js'
|
import * as AppBskyVideoUploadVideo from './types/app/bsky/video/uploadVideo.js'
|
||||||
import * as ChatBskyActorDeleteAccount from './types/chat/bsky/actor/deleteAccount.js'
|
import * as ChatBskyActorDeleteAccount from './types/chat/bsky/actor/deleteAccount.js'
|
||||||
import * as ChatBskyActorExportAccountData from './types/chat/bsky/actor/exportAccountData.js'
|
import * as ChatBskyActorExportAccountData from './types/chat/bsky/actor/exportAccountData.js'
|
||||||
|
import * as ChatBskyConvoAcceptConvo from './types/chat/bsky/convo/acceptConvo.js'
|
||||||
import * as ChatBskyConvoDeleteMessageForSelf from './types/chat/bsky/convo/deleteMessageForSelf.js'
|
import * as ChatBskyConvoDeleteMessageForSelf from './types/chat/bsky/convo/deleteMessageForSelf.js'
|
||||||
import * as ChatBskyConvoGetConvo from './types/chat/bsky/convo/getConvo.js'
|
import * as ChatBskyConvoGetConvo from './types/chat/bsky/convo/getConvo.js'
|
||||||
|
import * as ChatBskyConvoGetConvoAvailability from './types/chat/bsky/convo/getConvoAvailability.js'
|
||||||
import * as ChatBskyConvoGetConvoForMembers from './types/chat/bsky/convo/getConvoForMembers.js'
|
import * as ChatBskyConvoGetConvoForMembers from './types/chat/bsky/convo/getConvoForMembers.js'
|
||||||
import * as ChatBskyConvoGetLog from './types/chat/bsky/convo/getLog.js'
|
import * as ChatBskyConvoGetLog from './types/chat/bsky/convo/getLog.js'
|
||||||
import * as ChatBskyConvoGetMessages from './types/chat/bsky/convo/getMessages.js'
|
import * as ChatBskyConvoGetMessages from './types/chat/bsky/convo/getMessages.js'
|
||||||
@ -2069,6 +2071,17 @@ export class ChatBskyConvoNS {
|
|||||||
this._server = server
|
this._server = server
|
||||||
}
|
}
|
||||||
|
|
||||||
|
acceptConvo<AV extends AuthVerifier>(
|
||||||
|
cfg: ConfigOf<
|
||||||
|
AV,
|
||||||
|
ChatBskyConvoAcceptConvo.Handler<ExtractAuth<AV>>,
|
||||||
|
ChatBskyConvoAcceptConvo.HandlerReqCtx<ExtractAuth<AV>>
|
||||||
|
>,
|
||||||
|
) {
|
||||||
|
const nsid = 'chat.bsky.convo.acceptConvo' // @ts-ignore
|
||||||
|
return this._server.xrpc.method(nsid, cfg)
|
||||||
|
}
|
||||||
|
|
||||||
deleteMessageForSelf<AV extends AuthVerifier>(
|
deleteMessageForSelf<AV extends AuthVerifier>(
|
||||||
cfg: ConfigOf<
|
cfg: ConfigOf<
|
||||||
AV,
|
AV,
|
||||||
@ -2091,6 +2104,17 @@ export class ChatBskyConvoNS {
|
|||||||
return this._server.xrpc.method(nsid, cfg)
|
return this._server.xrpc.method(nsid, cfg)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getConvoAvailability<AV extends AuthVerifier>(
|
||||||
|
cfg: ConfigOf<
|
||||||
|
AV,
|
||||||
|
ChatBskyConvoGetConvoAvailability.Handler<ExtractAuth<AV>>,
|
||||||
|
ChatBskyConvoGetConvoAvailability.HandlerReqCtx<ExtractAuth<AV>>
|
||||||
|
>,
|
||||||
|
) {
|
||||||
|
const nsid = 'chat.bsky.convo.getConvoAvailability' // @ts-ignore
|
||||||
|
return this._server.xrpc.method(nsid, cfg)
|
||||||
|
}
|
||||||
|
|
||||||
getConvoForMembers<AV extends AuthVerifier>(
|
getConvoForMembers<AV extends AuthVerifier>(
|
||||||
cfg: ConfigOf<
|
cfg: ConfigOf<
|
||||||
AV,
|
AV,
|
||||||
|
@ -10206,6 +10206,40 @@ export const schemaDict = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
ChatBskyConvoAcceptConvo: {
|
||||||
|
lexicon: 1,
|
||||||
|
id: 'chat.bsky.convo.acceptConvo',
|
||||||
|
defs: {
|
||||||
|
main: {
|
||||||
|
type: 'procedure',
|
||||||
|
input: {
|
||||||
|
encoding: 'application/json',
|
||||||
|
schema: {
|
||||||
|
type: 'object',
|
||||||
|
required: ['convoId'],
|
||||||
|
properties: {
|
||||||
|
convoId: {
|
||||||
|
type: 'string',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
output: {
|
||||||
|
encoding: 'application/json',
|
||||||
|
schema: {
|
||||||
|
type: 'object',
|
||||||
|
properties: {
|
||||||
|
rev: {
|
||||||
|
description:
|
||||||
|
'Rev when the convo was accepted. If not present, the convo was already accepted.',
|
||||||
|
type: 'string',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
ChatBskyConvoDefs: {
|
ChatBskyConvoDefs: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: 'chat.bsky.convo.defs',
|
id: 'chat.bsky.convo.defs',
|
||||||
@ -10343,8 +10377,9 @@ export const schemaDict = {
|
|||||||
muted: {
|
muted: {
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
},
|
},
|
||||||
opened: {
|
status: {
|
||||||
type: 'boolean',
|
type: 'string',
|
||||||
|
knownValues: ['request', 'accepted'],
|
||||||
},
|
},
|
||||||
unreadCount: {
|
unreadCount: {
|
||||||
type: 'integer',
|
type: 'integer',
|
||||||
@ -10363,6 +10398,18 @@ export const schemaDict = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
logAcceptConvo: {
|
||||||
|
type: 'object',
|
||||||
|
required: ['rev', 'convoId'],
|
||||||
|
properties: {
|
||||||
|
rev: {
|
||||||
|
type: 'string',
|
||||||
|
},
|
||||||
|
convoId: {
|
||||||
|
type: 'string',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
logLeaveConvo: {
|
logLeaveConvo: {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
required: ['rev', 'convoId'],
|
required: ['rev', 'convoId'],
|
||||||
@ -10375,6 +10422,30 @@ export const schemaDict = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
logMuteConvo: {
|
||||||
|
type: 'object',
|
||||||
|
required: ['rev', 'convoId'],
|
||||||
|
properties: {
|
||||||
|
rev: {
|
||||||
|
type: 'string',
|
||||||
|
},
|
||||||
|
convoId: {
|
||||||
|
type: 'string',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
logUnmuteConvo: {
|
||||||
|
type: 'object',
|
||||||
|
required: ['rev', 'convoId'],
|
||||||
|
properties: {
|
||||||
|
rev: {
|
||||||
|
type: 'string',
|
||||||
|
},
|
||||||
|
convoId: {
|
||||||
|
type: 'string',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
logCreateMessage: {
|
logCreateMessage: {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
required: ['rev', 'convoId', 'message'],
|
required: ['rev', 'convoId', 'message'],
|
||||||
@ -10413,6 +10484,25 @@ export const schemaDict = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
logReadMessage: {
|
||||||
|
type: 'object',
|
||||||
|
required: ['rev', 'convoId', 'message'],
|
||||||
|
properties: {
|
||||||
|
rev: {
|
||||||
|
type: 'string',
|
||||||
|
},
|
||||||
|
convoId: {
|
||||||
|
type: 'string',
|
||||||
|
},
|
||||||
|
message: {
|
||||||
|
type: 'union',
|
||||||
|
refs: [
|
||||||
|
'lex:chat.bsky.convo.defs#messageView',
|
||||||
|
'lex:chat.bsky.convo.defs#deletedMessageView',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
ChatBskyConvoDeleteMessageForSelf: {
|
ChatBskyConvoDeleteMessageForSelf: {
|
||||||
@ -10477,6 +10567,48 @@ export const schemaDict = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
ChatBskyConvoGetConvoAvailability: {
|
||||||
|
lexicon: 1,
|
||||||
|
id: 'chat.bsky.convo.getConvoAvailability',
|
||||||
|
defs: {
|
||||||
|
main: {
|
||||||
|
type: 'query',
|
||||||
|
description:
|
||||||
|
'Get whether the requester and the other members can chat. If an existing convo is found for these members, it is returned.',
|
||||||
|
parameters: {
|
||||||
|
type: 'params',
|
||||||
|
required: ['members'],
|
||||||
|
properties: {
|
||||||
|
members: {
|
||||||
|
type: 'array',
|
||||||
|
minLength: 1,
|
||||||
|
maxLength: 10,
|
||||||
|
items: {
|
||||||
|
type: 'string',
|
||||||
|
format: 'did',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
output: {
|
||||||
|
encoding: 'application/json',
|
||||||
|
schema: {
|
||||||
|
type: 'object',
|
||||||
|
required: ['canChat'],
|
||||||
|
properties: {
|
||||||
|
canChat: {
|
||||||
|
type: 'boolean',
|
||||||
|
},
|
||||||
|
convo: {
|
||||||
|
type: 'ref',
|
||||||
|
ref: 'lex:chat.bsky.convo.defs#convoView',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
ChatBskyConvoGetConvoForMembers: {
|
ChatBskyConvoGetConvoForMembers: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: 'chat.bsky.convo.getConvoForMembers',
|
id: 'chat.bsky.convo.getConvoForMembers',
|
||||||
@ -10544,6 +10676,7 @@ export const schemaDict = {
|
|||||||
type: 'union',
|
type: 'union',
|
||||||
refs: [
|
refs: [
|
||||||
'lex:chat.bsky.convo.defs#logBeginConvo',
|
'lex:chat.bsky.convo.defs#logBeginConvo',
|
||||||
|
'lex:chat.bsky.convo.defs#logAcceptConvo',
|
||||||
'lex:chat.bsky.convo.defs#logLeaveConvo',
|
'lex:chat.bsky.convo.defs#logLeaveConvo',
|
||||||
'lex:chat.bsky.convo.defs#logCreateMessage',
|
'lex:chat.bsky.convo.defs#logCreateMessage',
|
||||||
'lex:chat.bsky.convo.defs#logDeleteMessage',
|
'lex:chat.bsky.convo.defs#logDeleteMessage',
|
||||||
@ -10659,6 +10792,14 @@ export const schemaDict = {
|
|||||||
cursor: {
|
cursor: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
},
|
},
|
||||||
|
readState: {
|
||||||
|
type: 'string',
|
||||||
|
knownValues: ['unread'],
|
||||||
|
},
|
||||||
|
status: {
|
||||||
|
type: 'string',
|
||||||
|
knownValues: ['request', 'accepted'],
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
output: {
|
output: {
|
||||||
@ -14289,9 +14430,11 @@ export const ids = {
|
|||||||
ChatBskyActorDefs: 'chat.bsky.actor.defs',
|
ChatBskyActorDefs: 'chat.bsky.actor.defs',
|
||||||
ChatBskyActorDeleteAccount: 'chat.bsky.actor.deleteAccount',
|
ChatBskyActorDeleteAccount: 'chat.bsky.actor.deleteAccount',
|
||||||
ChatBskyActorExportAccountData: 'chat.bsky.actor.exportAccountData',
|
ChatBskyActorExportAccountData: 'chat.bsky.actor.exportAccountData',
|
||||||
|
ChatBskyConvoAcceptConvo: 'chat.bsky.convo.acceptConvo',
|
||||||
ChatBskyConvoDefs: 'chat.bsky.convo.defs',
|
ChatBskyConvoDefs: 'chat.bsky.convo.defs',
|
||||||
ChatBskyConvoDeleteMessageForSelf: 'chat.bsky.convo.deleteMessageForSelf',
|
ChatBskyConvoDeleteMessageForSelf: 'chat.bsky.convo.deleteMessageForSelf',
|
||||||
ChatBskyConvoGetConvo: 'chat.bsky.convo.getConvo',
|
ChatBskyConvoGetConvo: 'chat.bsky.convo.getConvo',
|
||||||
|
ChatBskyConvoGetConvoAvailability: 'chat.bsky.convo.getConvoAvailability',
|
||||||
ChatBskyConvoGetConvoForMembers: 'chat.bsky.convo.getConvoForMembers',
|
ChatBskyConvoGetConvoForMembers: 'chat.bsky.convo.getConvoForMembers',
|
||||||
ChatBskyConvoGetLog: 'chat.bsky.convo.getLog',
|
ChatBskyConvoGetLog: 'chat.bsky.convo.getLog',
|
||||||
ChatBskyConvoGetMessages: 'chat.bsky.convo.getMessages',
|
ChatBskyConvoGetMessages: 'chat.bsky.convo.getMessages',
|
||||||
|
@ -0,0 +1,53 @@
|
|||||||
|
/**
|
||||||
|
* GENERATED CODE - DO NOT MODIFY
|
||||||
|
*/
|
||||||
|
import express from 'express'
|
||||||
|
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
||||||
|
import { CID } from 'multiformats/cid'
|
||||||
|
import { validate as _validate } from '../../../../lexicons'
|
||||||
|
import { $Typed, is$typed as _is$typed, OmitKey } from '../../../../util'
|
||||||
|
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
||||||
|
|
||||||
|
const is$typed = _is$typed,
|
||||||
|
validate = _validate
|
||||||
|
const id = 'chat.bsky.convo.acceptConvo'
|
||||||
|
|
||||||
|
export interface QueryParams {}
|
||||||
|
|
||||||
|
export interface InputSchema {
|
||||||
|
convoId: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface OutputSchema {
|
||||||
|
/** Rev when the convo was accepted. If not present, the convo was already accepted. */
|
||||||
|
rev?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface HandlerInput {
|
||||||
|
encoding: 'application/json'
|
||||||
|
body: InputSchema
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface HandlerSuccess {
|
||||||
|
encoding: 'application/json'
|
||||||
|
body: OutputSchema
|
||||||
|
headers?: { [key: string]: string }
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface HandlerError {
|
||||||
|
status: number
|
||||||
|
message?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
||||||
|
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||||
|
auth: HA
|
||||||
|
params: QueryParams
|
||||||
|
input: HandlerInput
|
||||||
|
req: express.Request
|
||||||
|
res: express.Response
|
||||||
|
resetRouteRateLimits: () => Promise<void>
|
||||||
|
}
|
||||||
|
export type Handler<HA extends HandlerAuth = never> = (
|
||||||
|
ctx: HandlerReqCtx<HA>,
|
||||||
|
) => Promise<HandlerOutput> | HandlerOutput
|
@ -113,7 +113,7 @@ export interface ConvoView {
|
|||||||
| $Typed<DeletedMessageView>
|
| $Typed<DeletedMessageView>
|
||||||
| { $type: string }
|
| { $type: string }
|
||||||
muted: boolean
|
muted: boolean
|
||||||
opened?: boolean
|
status?: 'request' | 'accepted' | (string & {})
|
||||||
unreadCount: number
|
unreadCount: number
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -143,6 +143,22 @@ export function validateLogBeginConvo<V>(v: V) {
|
|||||||
return validate<LogBeginConvo & V>(v, id, hashLogBeginConvo)
|
return validate<LogBeginConvo & V>(v, id, hashLogBeginConvo)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface LogAcceptConvo {
|
||||||
|
$type?: 'chat.bsky.convo.defs#logAcceptConvo'
|
||||||
|
rev: string
|
||||||
|
convoId: string
|
||||||
|
}
|
||||||
|
|
||||||
|
const hashLogAcceptConvo = 'logAcceptConvo'
|
||||||
|
|
||||||
|
export function isLogAcceptConvo<V>(v: V) {
|
||||||
|
return is$typed(v, id, hashLogAcceptConvo)
|
||||||
|
}
|
||||||
|
|
||||||
|
export function validateLogAcceptConvo<V>(v: V) {
|
||||||
|
return validate<LogAcceptConvo & V>(v, id, hashLogAcceptConvo)
|
||||||
|
}
|
||||||
|
|
||||||
export interface LogLeaveConvo {
|
export interface LogLeaveConvo {
|
||||||
$type?: 'chat.bsky.convo.defs#logLeaveConvo'
|
$type?: 'chat.bsky.convo.defs#logLeaveConvo'
|
||||||
rev: string
|
rev: string
|
||||||
@ -159,6 +175,38 @@ export function validateLogLeaveConvo<V>(v: V) {
|
|||||||
return validate<LogLeaveConvo & V>(v, id, hashLogLeaveConvo)
|
return validate<LogLeaveConvo & V>(v, id, hashLogLeaveConvo)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface LogMuteConvo {
|
||||||
|
$type?: 'chat.bsky.convo.defs#logMuteConvo'
|
||||||
|
rev: string
|
||||||
|
convoId: string
|
||||||
|
}
|
||||||
|
|
||||||
|
const hashLogMuteConvo = 'logMuteConvo'
|
||||||
|
|
||||||
|
export function isLogMuteConvo<V>(v: V) {
|
||||||
|
return is$typed(v, id, hashLogMuteConvo)
|
||||||
|
}
|
||||||
|
|
||||||
|
export function validateLogMuteConvo<V>(v: V) {
|
||||||
|
return validate<LogMuteConvo & V>(v, id, hashLogMuteConvo)
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface LogUnmuteConvo {
|
||||||
|
$type?: 'chat.bsky.convo.defs#logUnmuteConvo'
|
||||||
|
rev: string
|
||||||
|
convoId: string
|
||||||
|
}
|
||||||
|
|
||||||
|
const hashLogUnmuteConvo = 'logUnmuteConvo'
|
||||||
|
|
||||||
|
export function isLogUnmuteConvo<V>(v: V) {
|
||||||
|
return is$typed(v, id, hashLogUnmuteConvo)
|
||||||
|
}
|
||||||
|
|
||||||
|
export function validateLogUnmuteConvo<V>(v: V) {
|
||||||
|
return validate<LogUnmuteConvo & V>(v, id, hashLogUnmuteConvo)
|
||||||
|
}
|
||||||
|
|
||||||
export interface LogCreateMessage {
|
export interface LogCreateMessage {
|
||||||
$type?: 'chat.bsky.convo.defs#logCreateMessage'
|
$type?: 'chat.bsky.convo.defs#logCreateMessage'
|
||||||
rev: string
|
rev: string
|
||||||
@ -192,3 +240,20 @@ export function isLogDeleteMessage<V>(v: V) {
|
|||||||
export function validateLogDeleteMessage<V>(v: V) {
|
export function validateLogDeleteMessage<V>(v: V) {
|
||||||
return validate<LogDeleteMessage & V>(v, id, hashLogDeleteMessage)
|
return validate<LogDeleteMessage & V>(v, id, hashLogDeleteMessage)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface LogReadMessage {
|
||||||
|
$type?: 'chat.bsky.convo.defs#logReadMessage'
|
||||||
|
rev: string
|
||||||
|
convoId: string
|
||||||
|
message: $Typed<MessageView> | $Typed<DeletedMessageView> | { $type: string }
|
||||||
|
}
|
||||||
|
|
||||||
|
const hashLogReadMessage = 'logReadMessage'
|
||||||
|
|
||||||
|
export function isLogReadMessage<V>(v: V) {
|
||||||
|
return is$typed(v, id, hashLogReadMessage)
|
||||||
|
}
|
||||||
|
|
||||||
|
export function validateLogReadMessage<V>(v: V) {
|
||||||
|
return validate<LogReadMessage & V>(v, id, hashLogReadMessage)
|
||||||
|
}
|
||||||
|
@ -0,0 +1,51 @@
|
|||||||
|
/**
|
||||||
|
* GENERATED CODE - DO NOT MODIFY
|
||||||
|
*/
|
||||||
|
import express from 'express'
|
||||||
|
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
||||||
|
import { CID } from 'multiformats/cid'
|
||||||
|
import { validate as _validate } from '../../../../lexicons'
|
||||||
|
import { $Typed, is$typed as _is$typed, OmitKey } from '../../../../util'
|
||||||
|
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
||||||
|
import type * as ChatBskyConvoDefs from './defs.js'
|
||||||
|
|
||||||
|
const is$typed = _is$typed,
|
||||||
|
validate = _validate
|
||||||
|
const id = 'chat.bsky.convo.getConvoAvailability'
|
||||||
|
|
||||||
|
export interface QueryParams {
|
||||||
|
members: string[]
|
||||||
|
}
|
||||||
|
|
||||||
|
export type InputSchema = undefined
|
||||||
|
|
||||||
|
export interface OutputSchema {
|
||||||
|
canChat: boolean
|
||||||
|
convo?: ChatBskyConvoDefs.ConvoView
|
||||||
|
}
|
||||||
|
|
||||||
|
export type HandlerInput = undefined
|
||||||
|
|
||||||
|
export interface HandlerSuccess {
|
||||||
|
encoding: 'application/json'
|
||||||
|
body: OutputSchema
|
||||||
|
headers?: { [key: string]: string }
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface HandlerError {
|
||||||
|
status: number
|
||||||
|
message?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
||||||
|
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||||
|
auth: HA
|
||||||
|
params: QueryParams
|
||||||
|
input: HandlerInput
|
||||||
|
req: express.Request
|
||||||
|
res: express.Response
|
||||||
|
resetRouteRateLimits: () => Promise<void>
|
||||||
|
}
|
||||||
|
export type Handler<HA extends HandlerAuth = never> = (
|
||||||
|
ctx: HandlerReqCtx<HA>,
|
||||||
|
) => Promise<HandlerOutput> | HandlerOutput
|
@ -23,6 +23,7 @@ export interface OutputSchema {
|
|||||||
cursor?: string
|
cursor?: string
|
||||||
logs: (
|
logs: (
|
||||||
| $Typed<ChatBskyConvoDefs.LogBeginConvo>
|
| $Typed<ChatBskyConvoDefs.LogBeginConvo>
|
||||||
|
| $Typed<ChatBskyConvoDefs.LogAcceptConvo>
|
||||||
| $Typed<ChatBskyConvoDefs.LogLeaveConvo>
|
| $Typed<ChatBskyConvoDefs.LogLeaveConvo>
|
||||||
| $Typed<ChatBskyConvoDefs.LogCreateMessage>
|
| $Typed<ChatBskyConvoDefs.LogCreateMessage>
|
||||||
| $Typed<ChatBskyConvoDefs.LogDeleteMessage>
|
| $Typed<ChatBskyConvoDefs.LogDeleteMessage>
|
||||||
|
@ -16,6 +16,8 @@ const id = 'chat.bsky.convo.listConvos'
|
|||||||
export interface QueryParams {
|
export interface QueryParams {
|
||||||
limit: number
|
limit: number
|
||||||
cursor?: string
|
cursor?: string
|
||||||
|
readState?: 'unread' | (string & {})
|
||||||
|
status?: 'request' | 'accepted' | (string & {})
|
||||||
}
|
}
|
||||||
|
|
||||||
export type InputSchema = undefined
|
export type InputSchema = undefined
|
||||||
|
@ -150,8 +150,10 @@ import * as AppBskyVideoGetUploadLimits from './types/app/bsky/video/getUploadLi
|
|||||||
import * as AppBskyVideoUploadVideo from './types/app/bsky/video/uploadVideo.js'
|
import * as AppBskyVideoUploadVideo from './types/app/bsky/video/uploadVideo.js'
|
||||||
import * as ChatBskyActorDeleteAccount from './types/chat/bsky/actor/deleteAccount.js'
|
import * as ChatBskyActorDeleteAccount from './types/chat/bsky/actor/deleteAccount.js'
|
||||||
import * as ChatBskyActorExportAccountData from './types/chat/bsky/actor/exportAccountData.js'
|
import * as ChatBskyActorExportAccountData from './types/chat/bsky/actor/exportAccountData.js'
|
||||||
|
import * as ChatBskyConvoAcceptConvo from './types/chat/bsky/convo/acceptConvo.js'
|
||||||
import * as ChatBskyConvoDeleteMessageForSelf from './types/chat/bsky/convo/deleteMessageForSelf.js'
|
import * as ChatBskyConvoDeleteMessageForSelf from './types/chat/bsky/convo/deleteMessageForSelf.js'
|
||||||
import * as ChatBskyConvoGetConvo from './types/chat/bsky/convo/getConvo.js'
|
import * as ChatBskyConvoGetConvo from './types/chat/bsky/convo/getConvo.js'
|
||||||
|
import * as ChatBskyConvoGetConvoAvailability from './types/chat/bsky/convo/getConvoAvailability.js'
|
||||||
import * as ChatBskyConvoGetConvoForMembers from './types/chat/bsky/convo/getConvoForMembers.js'
|
import * as ChatBskyConvoGetConvoForMembers from './types/chat/bsky/convo/getConvoForMembers.js'
|
||||||
import * as ChatBskyConvoGetLog from './types/chat/bsky/convo/getLog.js'
|
import * as ChatBskyConvoGetLog from './types/chat/bsky/convo/getLog.js'
|
||||||
import * as ChatBskyConvoGetMessages from './types/chat/bsky/convo/getMessages.js'
|
import * as ChatBskyConvoGetMessages from './types/chat/bsky/convo/getMessages.js'
|
||||||
@ -2069,6 +2071,17 @@ export class ChatBskyConvoNS {
|
|||||||
this._server = server
|
this._server = server
|
||||||
}
|
}
|
||||||
|
|
||||||
|
acceptConvo<AV extends AuthVerifier>(
|
||||||
|
cfg: ConfigOf<
|
||||||
|
AV,
|
||||||
|
ChatBskyConvoAcceptConvo.Handler<ExtractAuth<AV>>,
|
||||||
|
ChatBskyConvoAcceptConvo.HandlerReqCtx<ExtractAuth<AV>>
|
||||||
|
>,
|
||||||
|
) {
|
||||||
|
const nsid = 'chat.bsky.convo.acceptConvo' // @ts-ignore
|
||||||
|
return this._server.xrpc.method(nsid, cfg)
|
||||||
|
}
|
||||||
|
|
||||||
deleteMessageForSelf<AV extends AuthVerifier>(
|
deleteMessageForSelf<AV extends AuthVerifier>(
|
||||||
cfg: ConfigOf<
|
cfg: ConfigOf<
|
||||||
AV,
|
AV,
|
||||||
@ -2091,6 +2104,17 @@ export class ChatBskyConvoNS {
|
|||||||
return this._server.xrpc.method(nsid, cfg)
|
return this._server.xrpc.method(nsid, cfg)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getConvoAvailability<AV extends AuthVerifier>(
|
||||||
|
cfg: ConfigOf<
|
||||||
|
AV,
|
||||||
|
ChatBskyConvoGetConvoAvailability.Handler<ExtractAuth<AV>>,
|
||||||
|
ChatBskyConvoGetConvoAvailability.HandlerReqCtx<ExtractAuth<AV>>
|
||||||
|
>,
|
||||||
|
) {
|
||||||
|
const nsid = 'chat.bsky.convo.getConvoAvailability' // @ts-ignore
|
||||||
|
return this._server.xrpc.method(nsid, cfg)
|
||||||
|
}
|
||||||
|
|
||||||
getConvoForMembers<AV extends AuthVerifier>(
|
getConvoForMembers<AV extends AuthVerifier>(
|
||||||
cfg: ConfigOf<
|
cfg: ConfigOf<
|
||||||
AV,
|
AV,
|
||||||
|
@ -10206,6 +10206,40 @@ export const schemaDict = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
ChatBskyConvoAcceptConvo: {
|
||||||
|
lexicon: 1,
|
||||||
|
id: 'chat.bsky.convo.acceptConvo',
|
||||||
|
defs: {
|
||||||
|
main: {
|
||||||
|
type: 'procedure',
|
||||||
|
input: {
|
||||||
|
encoding: 'application/json',
|
||||||
|
schema: {
|
||||||
|
type: 'object',
|
||||||
|
required: ['convoId'],
|
||||||
|
properties: {
|
||||||
|
convoId: {
|
||||||
|
type: 'string',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
output: {
|
||||||
|
encoding: 'application/json',
|
||||||
|
schema: {
|
||||||
|
type: 'object',
|
||||||
|
properties: {
|
||||||
|
rev: {
|
||||||
|
description:
|
||||||
|
'Rev when the convo was accepted. If not present, the convo was already accepted.',
|
||||||
|
type: 'string',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
ChatBskyConvoDefs: {
|
ChatBskyConvoDefs: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: 'chat.bsky.convo.defs',
|
id: 'chat.bsky.convo.defs',
|
||||||
@ -10343,8 +10377,9 @@ export const schemaDict = {
|
|||||||
muted: {
|
muted: {
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
},
|
},
|
||||||
opened: {
|
status: {
|
||||||
type: 'boolean',
|
type: 'string',
|
||||||
|
knownValues: ['request', 'accepted'],
|
||||||
},
|
},
|
||||||
unreadCount: {
|
unreadCount: {
|
||||||
type: 'integer',
|
type: 'integer',
|
||||||
@ -10363,6 +10398,18 @@ export const schemaDict = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
logAcceptConvo: {
|
||||||
|
type: 'object',
|
||||||
|
required: ['rev', 'convoId'],
|
||||||
|
properties: {
|
||||||
|
rev: {
|
||||||
|
type: 'string',
|
||||||
|
},
|
||||||
|
convoId: {
|
||||||
|
type: 'string',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
logLeaveConvo: {
|
logLeaveConvo: {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
required: ['rev', 'convoId'],
|
required: ['rev', 'convoId'],
|
||||||
@ -10375,6 +10422,30 @@ export const schemaDict = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
logMuteConvo: {
|
||||||
|
type: 'object',
|
||||||
|
required: ['rev', 'convoId'],
|
||||||
|
properties: {
|
||||||
|
rev: {
|
||||||
|
type: 'string',
|
||||||
|
},
|
||||||
|
convoId: {
|
||||||
|
type: 'string',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
logUnmuteConvo: {
|
||||||
|
type: 'object',
|
||||||
|
required: ['rev', 'convoId'],
|
||||||
|
properties: {
|
||||||
|
rev: {
|
||||||
|
type: 'string',
|
||||||
|
},
|
||||||
|
convoId: {
|
||||||
|
type: 'string',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
logCreateMessage: {
|
logCreateMessage: {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
required: ['rev', 'convoId', 'message'],
|
required: ['rev', 'convoId', 'message'],
|
||||||
@ -10413,6 +10484,25 @@ export const schemaDict = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
logReadMessage: {
|
||||||
|
type: 'object',
|
||||||
|
required: ['rev', 'convoId', 'message'],
|
||||||
|
properties: {
|
||||||
|
rev: {
|
||||||
|
type: 'string',
|
||||||
|
},
|
||||||
|
convoId: {
|
||||||
|
type: 'string',
|
||||||
|
},
|
||||||
|
message: {
|
||||||
|
type: 'union',
|
||||||
|
refs: [
|
||||||
|
'lex:chat.bsky.convo.defs#messageView',
|
||||||
|
'lex:chat.bsky.convo.defs#deletedMessageView',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
ChatBskyConvoDeleteMessageForSelf: {
|
ChatBskyConvoDeleteMessageForSelf: {
|
||||||
@ -10477,6 +10567,48 @@ export const schemaDict = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
ChatBskyConvoGetConvoAvailability: {
|
||||||
|
lexicon: 1,
|
||||||
|
id: 'chat.bsky.convo.getConvoAvailability',
|
||||||
|
defs: {
|
||||||
|
main: {
|
||||||
|
type: 'query',
|
||||||
|
description:
|
||||||
|
'Get whether the requester and the other members can chat. If an existing convo is found for these members, it is returned.',
|
||||||
|
parameters: {
|
||||||
|
type: 'params',
|
||||||
|
required: ['members'],
|
||||||
|
properties: {
|
||||||
|
members: {
|
||||||
|
type: 'array',
|
||||||
|
minLength: 1,
|
||||||
|
maxLength: 10,
|
||||||
|
items: {
|
||||||
|
type: 'string',
|
||||||
|
format: 'did',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
output: {
|
||||||
|
encoding: 'application/json',
|
||||||
|
schema: {
|
||||||
|
type: 'object',
|
||||||
|
required: ['canChat'],
|
||||||
|
properties: {
|
||||||
|
canChat: {
|
||||||
|
type: 'boolean',
|
||||||
|
},
|
||||||
|
convo: {
|
||||||
|
type: 'ref',
|
||||||
|
ref: 'lex:chat.bsky.convo.defs#convoView',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
ChatBskyConvoGetConvoForMembers: {
|
ChatBskyConvoGetConvoForMembers: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: 'chat.bsky.convo.getConvoForMembers',
|
id: 'chat.bsky.convo.getConvoForMembers',
|
||||||
@ -10544,6 +10676,7 @@ export const schemaDict = {
|
|||||||
type: 'union',
|
type: 'union',
|
||||||
refs: [
|
refs: [
|
||||||
'lex:chat.bsky.convo.defs#logBeginConvo',
|
'lex:chat.bsky.convo.defs#logBeginConvo',
|
||||||
|
'lex:chat.bsky.convo.defs#logAcceptConvo',
|
||||||
'lex:chat.bsky.convo.defs#logLeaveConvo',
|
'lex:chat.bsky.convo.defs#logLeaveConvo',
|
||||||
'lex:chat.bsky.convo.defs#logCreateMessage',
|
'lex:chat.bsky.convo.defs#logCreateMessage',
|
||||||
'lex:chat.bsky.convo.defs#logDeleteMessage',
|
'lex:chat.bsky.convo.defs#logDeleteMessage',
|
||||||
@ -10659,6 +10792,14 @@ export const schemaDict = {
|
|||||||
cursor: {
|
cursor: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
},
|
},
|
||||||
|
readState: {
|
||||||
|
type: 'string',
|
||||||
|
knownValues: ['unread'],
|
||||||
|
},
|
||||||
|
status: {
|
||||||
|
type: 'string',
|
||||||
|
knownValues: ['request', 'accepted'],
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
output: {
|
output: {
|
||||||
@ -14289,9 +14430,11 @@ export const ids = {
|
|||||||
ChatBskyActorDefs: 'chat.bsky.actor.defs',
|
ChatBskyActorDefs: 'chat.bsky.actor.defs',
|
||||||
ChatBskyActorDeleteAccount: 'chat.bsky.actor.deleteAccount',
|
ChatBskyActorDeleteAccount: 'chat.bsky.actor.deleteAccount',
|
||||||
ChatBskyActorExportAccountData: 'chat.bsky.actor.exportAccountData',
|
ChatBskyActorExportAccountData: 'chat.bsky.actor.exportAccountData',
|
||||||
|
ChatBskyConvoAcceptConvo: 'chat.bsky.convo.acceptConvo',
|
||||||
ChatBskyConvoDefs: 'chat.bsky.convo.defs',
|
ChatBskyConvoDefs: 'chat.bsky.convo.defs',
|
||||||
ChatBskyConvoDeleteMessageForSelf: 'chat.bsky.convo.deleteMessageForSelf',
|
ChatBskyConvoDeleteMessageForSelf: 'chat.bsky.convo.deleteMessageForSelf',
|
||||||
ChatBskyConvoGetConvo: 'chat.bsky.convo.getConvo',
|
ChatBskyConvoGetConvo: 'chat.bsky.convo.getConvo',
|
||||||
|
ChatBskyConvoGetConvoAvailability: 'chat.bsky.convo.getConvoAvailability',
|
||||||
ChatBskyConvoGetConvoForMembers: 'chat.bsky.convo.getConvoForMembers',
|
ChatBskyConvoGetConvoForMembers: 'chat.bsky.convo.getConvoForMembers',
|
||||||
ChatBskyConvoGetLog: 'chat.bsky.convo.getLog',
|
ChatBskyConvoGetLog: 'chat.bsky.convo.getLog',
|
||||||
ChatBskyConvoGetMessages: 'chat.bsky.convo.getMessages',
|
ChatBskyConvoGetMessages: 'chat.bsky.convo.getMessages',
|
||||||
|
@ -0,0 +1,53 @@
|
|||||||
|
/**
|
||||||
|
* GENERATED CODE - DO NOT MODIFY
|
||||||
|
*/
|
||||||
|
import express from 'express'
|
||||||
|
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
||||||
|
import { CID } from 'multiformats/cid'
|
||||||
|
import { validate as _validate } from '../../../../lexicons'
|
||||||
|
import { $Typed, is$typed as _is$typed, OmitKey } from '../../../../util'
|
||||||
|
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
||||||
|
|
||||||
|
const is$typed = _is$typed,
|
||||||
|
validate = _validate
|
||||||
|
const id = 'chat.bsky.convo.acceptConvo'
|
||||||
|
|
||||||
|
export interface QueryParams {}
|
||||||
|
|
||||||
|
export interface InputSchema {
|
||||||
|
convoId: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface OutputSchema {
|
||||||
|
/** Rev when the convo was accepted. If not present, the convo was already accepted. */
|
||||||
|
rev?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface HandlerInput {
|
||||||
|
encoding: 'application/json'
|
||||||
|
body: InputSchema
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface HandlerSuccess {
|
||||||
|
encoding: 'application/json'
|
||||||
|
body: OutputSchema
|
||||||
|
headers?: { [key: string]: string }
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface HandlerError {
|
||||||
|
status: number
|
||||||
|
message?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
||||||
|
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||||
|
auth: HA
|
||||||
|
params: QueryParams
|
||||||
|
input: HandlerInput
|
||||||
|
req: express.Request
|
||||||
|
res: express.Response
|
||||||
|
resetRouteRateLimits: () => Promise<void>
|
||||||
|
}
|
||||||
|
export type Handler<HA extends HandlerAuth = never> = (
|
||||||
|
ctx: HandlerReqCtx<HA>,
|
||||||
|
) => Promise<HandlerOutput> | HandlerOutput
|
@ -113,7 +113,7 @@ export interface ConvoView {
|
|||||||
| $Typed<DeletedMessageView>
|
| $Typed<DeletedMessageView>
|
||||||
| { $type: string }
|
| { $type: string }
|
||||||
muted: boolean
|
muted: boolean
|
||||||
opened?: boolean
|
status?: 'request' | 'accepted' | (string & {})
|
||||||
unreadCount: number
|
unreadCount: number
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -143,6 +143,22 @@ export function validateLogBeginConvo<V>(v: V) {
|
|||||||
return validate<LogBeginConvo & V>(v, id, hashLogBeginConvo)
|
return validate<LogBeginConvo & V>(v, id, hashLogBeginConvo)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface LogAcceptConvo {
|
||||||
|
$type?: 'chat.bsky.convo.defs#logAcceptConvo'
|
||||||
|
rev: string
|
||||||
|
convoId: string
|
||||||
|
}
|
||||||
|
|
||||||
|
const hashLogAcceptConvo = 'logAcceptConvo'
|
||||||
|
|
||||||
|
export function isLogAcceptConvo<V>(v: V) {
|
||||||
|
return is$typed(v, id, hashLogAcceptConvo)
|
||||||
|
}
|
||||||
|
|
||||||
|
export function validateLogAcceptConvo<V>(v: V) {
|
||||||
|
return validate<LogAcceptConvo & V>(v, id, hashLogAcceptConvo)
|
||||||
|
}
|
||||||
|
|
||||||
export interface LogLeaveConvo {
|
export interface LogLeaveConvo {
|
||||||
$type?: 'chat.bsky.convo.defs#logLeaveConvo'
|
$type?: 'chat.bsky.convo.defs#logLeaveConvo'
|
||||||
rev: string
|
rev: string
|
||||||
@ -159,6 +175,38 @@ export function validateLogLeaveConvo<V>(v: V) {
|
|||||||
return validate<LogLeaveConvo & V>(v, id, hashLogLeaveConvo)
|
return validate<LogLeaveConvo & V>(v, id, hashLogLeaveConvo)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface LogMuteConvo {
|
||||||
|
$type?: 'chat.bsky.convo.defs#logMuteConvo'
|
||||||
|
rev: string
|
||||||
|
convoId: string
|
||||||
|
}
|
||||||
|
|
||||||
|
const hashLogMuteConvo = 'logMuteConvo'
|
||||||
|
|
||||||
|
export function isLogMuteConvo<V>(v: V) {
|
||||||
|
return is$typed(v, id, hashLogMuteConvo)
|
||||||
|
}
|
||||||
|
|
||||||
|
export function validateLogMuteConvo<V>(v: V) {
|
||||||
|
return validate<LogMuteConvo & V>(v, id, hashLogMuteConvo)
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface LogUnmuteConvo {
|
||||||
|
$type?: 'chat.bsky.convo.defs#logUnmuteConvo'
|
||||||
|
rev: string
|
||||||
|
convoId: string
|
||||||
|
}
|
||||||
|
|
||||||
|
const hashLogUnmuteConvo = 'logUnmuteConvo'
|
||||||
|
|
||||||
|
export function isLogUnmuteConvo<V>(v: V) {
|
||||||
|
return is$typed(v, id, hashLogUnmuteConvo)
|
||||||
|
}
|
||||||
|
|
||||||
|
export function validateLogUnmuteConvo<V>(v: V) {
|
||||||
|
return validate<LogUnmuteConvo & V>(v, id, hashLogUnmuteConvo)
|
||||||
|
}
|
||||||
|
|
||||||
export interface LogCreateMessage {
|
export interface LogCreateMessage {
|
||||||
$type?: 'chat.bsky.convo.defs#logCreateMessage'
|
$type?: 'chat.bsky.convo.defs#logCreateMessage'
|
||||||
rev: string
|
rev: string
|
||||||
@ -192,3 +240,20 @@ export function isLogDeleteMessage<V>(v: V) {
|
|||||||
export function validateLogDeleteMessage<V>(v: V) {
|
export function validateLogDeleteMessage<V>(v: V) {
|
||||||
return validate<LogDeleteMessage & V>(v, id, hashLogDeleteMessage)
|
return validate<LogDeleteMessage & V>(v, id, hashLogDeleteMessage)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface LogReadMessage {
|
||||||
|
$type?: 'chat.bsky.convo.defs#logReadMessage'
|
||||||
|
rev: string
|
||||||
|
convoId: string
|
||||||
|
message: $Typed<MessageView> | $Typed<DeletedMessageView> | { $type: string }
|
||||||
|
}
|
||||||
|
|
||||||
|
const hashLogReadMessage = 'logReadMessage'
|
||||||
|
|
||||||
|
export function isLogReadMessage<V>(v: V) {
|
||||||
|
return is$typed(v, id, hashLogReadMessage)
|
||||||
|
}
|
||||||
|
|
||||||
|
export function validateLogReadMessage<V>(v: V) {
|
||||||
|
return validate<LogReadMessage & V>(v, id, hashLogReadMessage)
|
||||||
|
}
|
||||||
|
@ -0,0 +1,51 @@
|
|||||||
|
/**
|
||||||
|
* GENERATED CODE - DO NOT MODIFY
|
||||||
|
*/
|
||||||
|
import express from 'express'
|
||||||
|
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
||||||
|
import { CID } from 'multiformats/cid'
|
||||||
|
import { validate as _validate } from '../../../../lexicons'
|
||||||
|
import { $Typed, is$typed as _is$typed, OmitKey } from '../../../../util'
|
||||||
|
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
||||||
|
import type * as ChatBskyConvoDefs from './defs.js'
|
||||||
|
|
||||||
|
const is$typed = _is$typed,
|
||||||
|
validate = _validate
|
||||||
|
const id = 'chat.bsky.convo.getConvoAvailability'
|
||||||
|
|
||||||
|
export interface QueryParams {
|
||||||
|
members: string[]
|
||||||
|
}
|
||||||
|
|
||||||
|
export type InputSchema = undefined
|
||||||
|
|
||||||
|
export interface OutputSchema {
|
||||||
|
canChat: boolean
|
||||||
|
convo?: ChatBskyConvoDefs.ConvoView
|
||||||
|
}
|
||||||
|
|
||||||
|
export type HandlerInput = undefined
|
||||||
|
|
||||||
|
export interface HandlerSuccess {
|
||||||
|
encoding: 'application/json'
|
||||||
|
body: OutputSchema
|
||||||
|
headers?: { [key: string]: string }
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface HandlerError {
|
||||||
|
status: number
|
||||||
|
message?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
||||||
|
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||||
|
auth: HA
|
||||||
|
params: QueryParams
|
||||||
|
input: HandlerInput
|
||||||
|
req: express.Request
|
||||||
|
res: express.Response
|
||||||
|
resetRouteRateLimits: () => Promise<void>
|
||||||
|
}
|
||||||
|
export type Handler<HA extends HandlerAuth = never> = (
|
||||||
|
ctx: HandlerReqCtx<HA>,
|
||||||
|
) => Promise<HandlerOutput> | HandlerOutput
|
@ -23,6 +23,7 @@ export interface OutputSchema {
|
|||||||
cursor?: string
|
cursor?: string
|
||||||
logs: (
|
logs: (
|
||||||
| $Typed<ChatBskyConvoDefs.LogBeginConvo>
|
| $Typed<ChatBskyConvoDefs.LogBeginConvo>
|
||||||
|
| $Typed<ChatBskyConvoDefs.LogAcceptConvo>
|
||||||
| $Typed<ChatBskyConvoDefs.LogLeaveConvo>
|
| $Typed<ChatBskyConvoDefs.LogLeaveConvo>
|
||||||
| $Typed<ChatBskyConvoDefs.LogCreateMessage>
|
| $Typed<ChatBskyConvoDefs.LogCreateMessage>
|
||||||
| $Typed<ChatBskyConvoDefs.LogDeleteMessage>
|
| $Typed<ChatBskyConvoDefs.LogDeleteMessage>
|
||||||
|
@ -16,6 +16,8 @@ const id = 'chat.bsky.convo.listConvos'
|
|||||||
export interface QueryParams {
|
export interface QueryParams {
|
||||||
limit: number
|
limit: number
|
||||||
cursor?: string
|
cursor?: string
|
||||||
|
readState?: 'unread' | (string & {})
|
||||||
|
status?: 'request' | 'accepted' | (string & {})
|
||||||
}
|
}
|
||||||
|
|
||||||
export type InputSchema = undefined
|
export type InputSchema = undefined
|
||||||
|
Loading…
x
Reference in New Issue
Block a user