Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 35 additions & 2 deletions src/gen/chat/ChannelApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
EventResponse,
GetDraftResponse,
GetManyMessagesResponse,
GetPinnedMessagesResponse,
HideChannelRequest,
HideChannelResponse,
MarkReadRequest,
Expand All @@ -17,6 +18,7 @@ import {
SendMessageResponse,
ShowChannelRequest,
ShowChannelResponse,
SortParamRequest,
TruncateChannelRequest,
TruncateChannelResponse,
UpdateChannelPartialRequest,
Expand Down Expand Up @@ -64,6 +66,7 @@ export class ChannelApi {
messages_id_gt?: string;
messages_id_gte?: string;
messages_id_around?: string;
user_id?: string;
}): Promise<StreamResponse<ChannelStateResponse>> {
if (!this.id) {
throw new Error(
Expand Down Expand Up @@ -263,8 +266,8 @@ export class ChannelApi {
}

getManyMessages(request: {
ids: string[];
member_custom_include?: string[];
ids: Array<string>;
member_custom_include?: Array<string>;
}): Promise<StreamResponse<GetManyMessagesResponse>> {
if (!this.id) {
throw new Error(
Expand All @@ -279,6 +282,36 @@ export class ChannelApi {
});
}

getPinnedMessages(request?: {
limit?: number;
offset?: number;
id_gte?: string;
id_gt?: string;
id_lte?: string;
id_lt?: string;
pinned_at_after_or_equal?: Date;
pinned_at_after?: Date;
pinned_at_before_or_equal?: Date;
pinned_at_before?: Date;
id_around?: string;
pinned_at_around?: Date;
user_id?: string;
sort?: Array<SortParamRequest>;
member_custom_include?: Array<string>;
}): Promise<StreamResponse<GetPinnedMessagesResponse>> {
if (!this.id) {
throw new Error(
`Channel isn't yet created, call getOrCreateDistinctChannel() before this operation`,
);
}

return this.chatApi.getPinnedMessages({
id: this.id,
type: this.type,
...request,
});
}

getOrCreate(
request?: ChannelGetOrCreateRequest,
): Promise<StreamResponse<ChannelStateResponse>> {
Expand Down
Loading