Skip to content

Commit 6739415

Browse files
committed
Regenerate open api
1 parent bbce353 commit 6739415

File tree

7 files changed

+622
-632
lines changed

7 files changed

+622
-632
lines changed

src/gen/chat/ChannelApi.ts

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,10 @@ import {
44
ChannelStateResponse,
55
DeleteChannelResponse,
66
EventResponse,
7-
FileUploadRequest,
8-
FileUploadResponse,
97
GetDraftResponse,
108
GetManyMessagesResponse,
119
HideChannelRequest,
1210
HideChannelResponse,
13-
ImageUploadRequest,
14-
ImageUploadResponse,
1511
MarkReadRequest,
1612
MarkReadResponse,
1713
MarkUnreadRequest,
@@ -29,6 +25,10 @@ import {
2925
UpdateChannelResponse,
3026
UpdateMemberPartialRequest,
3127
UpdateMemberPartialResponse,
28+
UploadChannelFileRequest,
29+
UploadChannelFileResponse,
30+
UploadChannelRequest,
31+
UploadChannelResponse,
3232
} from '../models';
3333

3434
export class ChannelApi {
@@ -126,30 +126,32 @@ export class ChannelApi {
126126
return this.chatApi.sendEvent({ id: this.id, type: this.type, ...request });
127127
}
128128

129-
deleteFile(request?: { url?: string }): Promise<StreamResponse<Response>> {
129+
deleteChannelFile(request?: {
130+
url?: string;
131+
}): Promise<StreamResponse<Response>> {
130132
if (!this.id) {
131133
throw new Error(
132134
`Channel isn't yet created, call getOrCreateDistinctChannel() before this operation`,
133135
);
134136
}
135137

136-
return this.chatApi.deleteFile({
138+
return this.chatApi.deleteChannelFile({
137139
id: this.id,
138140
type: this.type,
139141
...request,
140142
});
141143
}
142144

143-
uploadFile(
144-
request?: FileUploadRequest,
145-
): Promise<StreamResponse<FileUploadResponse>> {
145+
uploadChannelFile(
146+
request?: UploadChannelFileRequest,
147+
): Promise<StreamResponse<UploadChannelFileResponse>> {
146148
if (!this.id) {
147149
throw new Error(
148150
`Channel isn't yet created, call getOrCreateDistinctChannel() before this operation`,
149151
);
150152
}
151153

152-
return this.chatApi.uploadFile({
154+
return this.chatApi.uploadChannelFile({
153155
id: this.id,
154156
type: this.type,
155157
...request,
@@ -172,30 +174,32 @@ export class ChannelApi {
172174
});
173175
}
174176

175-
deleteImage(request?: { url?: string }): Promise<StreamResponse<Response>> {
177+
deleteChannelImage(request?: {
178+
url?: string;
179+
}): Promise<StreamResponse<Response>> {
176180
if (!this.id) {
177181
throw new Error(
178182
`Channel isn't yet created, call getOrCreateDistinctChannel() before this operation`,
179183
);
180184
}
181185

182-
return this.chatApi.deleteImage({
186+
return this.chatApi.deleteChannelImage({
183187
id: this.id,
184188
type: this.type,
185189
...request,
186190
});
187191
}
188192

189-
uploadImage(
190-
request?: ImageUploadRequest,
191-
): Promise<StreamResponse<ImageUploadResponse>> {
193+
uploadChannelImage(
194+
request?: UploadChannelRequest,
195+
): Promise<StreamResponse<UploadChannelResponse>> {
192196
if (!this.id) {
193197
throw new Error(
194198
`Channel isn't yet created, call getOrCreateDistinctChannel() before this operation`,
195199
);
196200
}
197201

198-
return this.chatApi.uploadImage({
202+
return this.chatApi.uploadChannelImage({
199203
id: this.id,
200204
type: this.type,
201205
...request,

src/gen/chat/ChatApi.ts

Lines changed: 17 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ import {
2121
EventResponse,
2222
ExportChannelsRequest,
2323
ExportChannelsResponse,
24-
FileUploadRequest,
25-
FileUploadResponse,
2624
GetCampaignResponse,
2725
GetChannelTypeResponse,
2826
GetCommandResponse,
@@ -35,8 +33,6 @@ import {
3533
GetThreadResponse,
3634
HideChannelRequest,
3735
HideChannelResponse,
38-
ImageUploadRequest,
39-
ImageUploadResponse,
4036
ListChannelTypesResponse,
4137
ListCommandsResponse,
4238
MarkChannelsReadRequest,
@@ -113,6 +109,10 @@ import {
113109
UpdateReminderResponse,
114110
UpdateThreadPartialRequest,
115111
UpdateThreadPartialResponse,
112+
UploadChannelFileRequest,
113+
UploadChannelFileResponse,
114+
UploadChannelRequest,
115+
UploadChannelResponse,
116116
WrappedUnreadCountsResponse,
117117
} from '../models';
118118
import { decoders } from '../model-decoders/decoders';
@@ -511,7 +511,7 @@ export class ChatApi {
511511
return { ...response.body, metadata: response.metadata };
512512
}
513513

514-
async deleteFile(request: {
514+
async deleteChannelFile(request: {
515515
type: string;
516516
id: string;
517517
url?: string;
@@ -536,9 +536,9 @@ export class ChatApi {
536536
return { ...response.body, metadata: response.metadata };
537537
}
538538

539-
async uploadFile(
540-
request: FileUploadRequest & { type: string; id: string },
541-
): Promise<StreamResponse<FileUploadResponse>> {
539+
async uploadChannelFile(
540+
request: UploadChannelFileRequest & { type: string; id: string },
541+
): Promise<StreamResponse<UploadChannelFileResponse>> {
542542
const pathParams = {
543543
type: request?.type,
544544
id: request?.id,
@@ -549,7 +549,7 @@ export class ChatApi {
549549
};
550550

551551
const response = await this.apiClient.sendRequest<
552-
StreamResponse<FileUploadResponse>
552+
StreamResponse<UploadChannelFileResponse>
553553
>(
554554
'POST',
555555
'/api/v2/chat/channels/{type}/{id}/file',
@@ -559,7 +559,7 @@ export class ChatApi {
559559
'multipart/form-data',
560560
);
561561

562-
decoders.FileUploadResponse?.(response.body);
562+
decoders.UploadChannelFileResponse?.(response.body);
563563

564564
return { ...response.body, metadata: response.metadata };
565565
}
@@ -593,7 +593,7 @@ export class ChatApi {
593593
return { ...response.body, metadata: response.metadata };
594594
}
595595

596-
async deleteImage(request: {
596+
async deleteChannelImage(request: {
597597
type: string;
598598
id: string;
599599
url?: string;
@@ -618,9 +618,9 @@ export class ChatApi {
618618
return { ...response.body, metadata: response.metadata };
619619
}
620620

621-
async uploadImage(
622-
request: ImageUploadRequest & { type: string; id: string },
623-
): Promise<StreamResponse<ImageUploadResponse>> {
621+
async uploadChannelImage(
622+
request: UploadChannelRequest & { type: string; id: string },
623+
): Promise<StreamResponse<UploadChannelResponse>> {
624624
const pathParams = {
625625
type: request?.type,
626626
id: request?.id,
@@ -632,7 +632,7 @@ export class ChatApi {
632632
};
633633

634634
const response = await this.apiClient.sendRequest<
635-
StreamResponse<ImageUploadResponse>
635+
StreamResponse<UploadChannelResponse>
636636
>(
637637
'POST',
638638
'/api/v2/chat/channels/{type}/{id}/image',
@@ -642,7 +642,7 @@ export class ChatApi {
642642
'multipart/form-data',
643643
);
644644

645-
decoders.ImageUploadResponse?.(response.body);
645+
decoders.UploadChannelResponse?.(response.body);
646646

647647
return { ...response.body, metadata: response.metadata };
648648
}
@@ -915,6 +915,7 @@ export class ChatApi {
915915
blocklist: request?.blocklist,
916916
blocklist_behavior: request?.blocklist_behavior,
917917
connect_events: request?.connect_events,
918+
count_messages: request?.count_messages,
918919
custom_events: request?.custom_events,
919920
mark_messages_pending: request?.mark_messages_pending,
920921
message_retention: request?.message_retention,
@@ -1734,32 +1735,20 @@ export class ChatApi {
17341735
async getReplies(request: {
17351736
parent_id: string;
17361737
limit?: number;
1737-
offset?: number;
17381738
id_gte?: string;
17391739
id_gt?: string;
17401740
id_lte?: string;
17411741
id_lt?: string;
1742-
created_at_after_or_equal?: Date;
1743-
created_at_after?: Date;
1744-
created_at_before_or_equal?: Date;
1745-
created_at_before?: Date;
17461742
id_around?: string;
1747-
created_at_around?: Date;
17481743
sort?: SortParamRequest[];
17491744
}): Promise<StreamResponse<GetRepliesResponse>> {
17501745
const queryParams = {
17511746
limit: request?.limit,
1752-
offset: request?.offset,
17531747
id_gte: request?.id_gte,
17541748
id_gt: request?.id_gt,
17551749
id_lte: request?.id_lte,
17561750
id_lt: request?.id_lt,
1757-
created_at_after_or_equal: request?.created_at_after_or_equal,
1758-
created_at_after: request?.created_at_after,
1759-
created_at_before_or_equal: request?.created_at_before_or_equal,
1760-
created_at_before: request?.created_at_before,
17611751
id_around: request?.id_around,
1762-
created_at_around: request?.created_at_around,
17631752
sort: request?.sort,
17641753
};
17651754
const pathParams = {

src/gen/common/CommonApi.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,8 @@ export class CommonApi {
197197
const body = {
198198
name: request?.name,
199199
words: request?.words,
200+
is_leet_check_enabled: request?.is_leet_check_enabled,
201+
is_plural_check_enabled: request?.is_plural_check_enabled,
200202
team: request?.team,
201203
type: request?.type,
202204
};
@@ -267,6 +269,8 @@ export class CommonApi {
267269
name: request?.name,
268270
};
269271
const body = {
272+
is_leet_check_enabled: request?.is_leet_check_enabled,
273+
is_plural_check_enabled: request?.is_plural_check_enabled,
270274
team: request?.team,
271275
words: request?.words,
272276
};

src/gen/feeds/FeedsApi.ts

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ import {
6161
ListFeedViewsResponse,
6262
ListFeedVisibilitiesResponse,
6363
MarkActivityRequest,
64+
OwnCapabilitiesBatchRequest,
65+
OwnCapabilitiesBatchResponse,
6466
PinActivityRequest,
6567
PinActivityResponse,
6668
PollVoteResponse,
@@ -80,8 +82,6 @@ import {
8082
QueryFeedMembersResponse,
8183
QueryFeedsRequest,
8284
QueryFeedsResponse,
83-
QueryFeedsUsageStatsRequest,
84-
QueryFeedsUsageStatsResponse,
8585
QueryFollowsRequest,
8686
QueryFollowsResponse,
8787
QueryMembershipLevelsRequest,
@@ -1019,6 +1019,7 @@ export class FeedsApi {
10191019
const queryParams = {
10201020
include_soft_deleted: request?.include_soft_deleted,
10211021
};
1022+
10221023
const response = await this.apiClient.sendRequest<
10231024
StreamResponse<ListFeedGroupsResponse>
10241025
>('GET', '/api/v2/feeds/feed_groups', undefined, queryParams);
@@ -1720,6 +1721,31 @@ export class FeedsApi {
17201721
return { ...response.body, metadata: response.metadata };
17211722
}
17221723

1724+
async ownCapabilitiesBatch(
1725+
request: OwnCapabilitiesBatchRequest,
1726+
): Promise<StreamResponse<OwnCapabilitiesBatchResponse>> {
1727+
const body = {
1728+
feeds: request?.feeds,
1729+
user_id: request?.user_id,
1730+
user: request?.user,
1731+
};
1732+
1733+
const response = await this.apiClient.sendRequest<
1734+
StreamResponse<OwnCapabilitiesBatchResponse>
1735+
>(
1736+
'POST',
1737+
'/api/v2/feeds/feeds/own_capabilities/batch',
1738+
undefined,
1739+
undefined,
1740+
body,
1741+
'application/json',
1742+
);
1743+
1744+
decoders.OwnCapabilitiesBatchResponse?.(response.body);
1745+
1746+
return { ...response.body, metadata: response.metadata };
1747+
}
1748+
17231749
protected async _queryFeeds(
17241750
request?: QueryFeedsRequest,
17251751
): Promise<StreamResponse<QueryFeedsResponse>> {
@@ -2031,30 +2057,6 @@ export class FeedsApi {
20312057
return { ...response.body, metadata: response.metadata };
20322058
}
20332059

2034-
async queryFeedsUsageStats(
2035-
request?: QueryFeedsUsageStatsRequest,
2036-
): Promise<StreamResponse<QueryFeedsUsageStatsResponse>> {
2037-
const body = {
2038-
from: request?.from,
2039-
to: request?.to,
2040-
};
2041-
2042-
const response = await this.apiClient.sendRequest<
2043-
StreamResponse<QueryFeedsUsageStatsResponse>
2044-
>(
2045-
'POST',
2046-
'/api/v2/feeds/stats/usage',
2047-
undefined,
2048-
undefined,
2049-
body,
2050-
'application/json',
2051-
);
2052-
2053-
decoders.QueryFeedsUsageStatsResponse?.(response.body);
2054-
2055-
return { ...response.body, metadata: response.metadata };
2056-
}
2057-
20582060
async unfollowBatch(
20592061
request: UnfollowBatchRequest,
20602062
): Promise<StreamResponse<UnfollowBatchResponse>> {

0 commit comments

Comments
 (0)