@refinio/one.models
Preparing search index...
api/utils/types
ChatApiType
Type Alias ChatApiType
type
ChatApiType
=
{
getAllGroupTopics
:
()
=>
Promise
<
Topic
[]
>
;
getAllOneToOneTopics
:
()
=>
Promise
<
Topic
[]
>
;
getAllPossibleGroupTopicIds
:
()
=>
Promise
<
string
[]
>
;
getAllPossibleOneToOneTopicIds
:
()
=>
Promise
<
string
[]
>
;
getAllPossibleTopicIds
:
()
=>
Promise
<
string
[]
>
;
getAllTopics
:
()
=>
Promise
<
Topic
[]
>
;
getAndListenForMessages
:
(
topicId
:
string
,
onMessagesUpdate
:
(
messages
:
CachedChatMessage
[]
)
=>
Promise
<
void
>
,
onNewMessages
:
()
=>
Promise
<
void
>
,
onAttachmentUpdate
:
()
=>
Promise
<
void
>
,
options
:
{
batchSize
?:
number
;
ownerId
?:
SHA256IdHash
<
Person
>
}
,
)
=>
Promise
<
{
loadNextBatch
:
()
=>
void
;
shutdown
:
()
=>
void
}
>
;
getMessagesChannelIterator
:
(
topicId
:
string
,
ownerId
?:
SHA256IdHash
<
Person
>
,
)
=>
Promise
<
AsyncIterableIterator
<
RawChannelEntry
>
|
undefined
>
;
getTopic
:
(
topicId
:
string
)
=>
Promise
<
Topic
>
;
sendMessage
:
(
topicId
:
string
,
message
:
string
,
options
:
ChatApiSendMessageOptions
,
)
=>
Promise
<
void
>
;
}
Implemented by
default
Index
Properties
get
All
Group
Topics
get
All
One
To
One
Topics
get
All
Possible
Group
Topic
Ids
get
All
Possible
One
To
One
Topic
Ids
get
All
Possible
Topic
Ids
get
All
Topics
get
And
Listen
For
Messages
get
Messages
Channel
Iterator
get
Topic
send
Message
Properties
get
All
Group
Topics
getAllGroupTopics
:
()
=>
Promise
<
Topic
[]
>
get
All
One
To
One
Topics
getAllOneToOneTopics
:
()
=>
Promise
<
Topic
[]
>
get
All
Possible
Group
Topic
Ids
getAllPossibleGroupTopicIds
:
()
=>
Promise
<
string
[]
>
get
All
Possible
One
To
One
Topic
Ids
getAllPossibleOneToOneTopicIds
:
()
=>
Promise
<
string
[]
>
get
All
Possible
Topic
Ids
getAllPossibleTopicIds
:
()
=>
Promise
<
string
[]
>
get
All
Topics
getAllTopics
:
()
=>
Promise
<
Topic
[]
>
get
And
Listen
For
Messages
getAndListenForMessages
:
(
topicId
:
string
,
onMessagesUpdate
:
(
messages
:
CachedChatMessage
[]
)
=>
Promise
<
void
>
,
onNewMessages
:
()
=>
Promise
<
void
>
,
onAttachmentUpdate
:
()
=>
Promise
<
void
>
,
options
:
{
batchSize
?:
number
;
ownerId
?:
SHA256IdHash
<
Person
>
}
,
)
=>
Promise
<
{
loadNextBatch
:
()
=>
void
;
shutdown
:
()
=>
void
}
>
get
Messages
Channel
Iterator
getMessagesChannelIterator
:
(
topicId
:
string
,
ownerId
?:
SHA256IdHash
<
Person
>
,
)
=>
Promise
<
AsyncIterableIterator
<
RawChannelEntry
>
|
undefined
>
get
Topic
getTopic
:
(
topicId
:
string
)
=>
Promise
<
Topic
>
send
Message
sendMessage
:
(
topicId
:
string
,
message
:
string
,
options
:
ChatApiSendMessageOptions
,
)
=>
Promise
<
void
>
Settings
Member Visibility
Inherited
Theme
OS
Light
Dark
On This Page
Properties
get
All
Group
Topics
get
All
One
To
One
Topics
get
All
Possible
Group
Topic
Ids
get
All
Possible
One
To
One
Topic
Ids
get
All
Possible
Topic
Ids
get
All
Topics
get
And
Listen
For
Messages
get
Messages
Channel
Iterator
get
Topic
send
Message
@refinio/one.models
Loading...