Skip to content
Open
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
1 change: 1 addition & 0 deletions src/gen/chat/ChannelApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export class ChannelApi {

delete(request?: {
hard_delete?: boolean;
skip_truncate?: boolean;
}): Promise<StreamResponse<DeleteChannelResponse>> {
if (!this.id) {
throw new Error(
Expand Down
5 changes: 5 additions & 0 deletions src/gen/chat/ChatApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,8 @@ export class ChatApi {
const body = {
operation: request?.operation,
filter: request?.filter,
hide_history_before: request?.hide_history_before,
synchronous: request?.synchronous,
custom_unset: request?.custom_unset,
members: request?.members,
custom_set: request?.custom_set,
Expand Down Expand Up @@ -419,6 +421,7 @@ export class ChatApi {
const body = {
cids: request?.cids,
hard_delete: request?.hard_delete,
skip_truncate: request?.skip_truncate,
};

const response = await this.apiClient.sendRequest<
Expand Down Expand Up @@ -551,9 +554,11 @@ export class ChatApi {
type: string;
id: string;
hard_delete?: boolean;
skip_truncate?: boolean;
}): Promise<StreamResponse<DeleteChannelResponse>> {
const queryParams = {
hard_delete: request?.hard_delete,
skip_truncate: request?.skip_truncate,
};
const pathParams = {
type: request?.type,
Expand Down
10 changes: 9 additions & 1 deletion src/gen/common/CommonApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1257,7 +1257,11 @@ export class CommonApi {
async getPollOption(request: {
poll_id: string;
option_id: string;
user_id?: string;
}): Promise<StreamResponse<PollOptionResponse>> {
const queryParams = {
user_id: request?.user_id,
};
const pathParams = {
poll_id: request?.poll_id,
option_id: request?.option_id,
Expand All @@ -1269,7 +1273,7 @@ export class CommonApi {
'GET',
'/api/v2/polls/{poll_id}/options/{option_id}',
pathParams,
undefined,
queryParams,
);

decoders['PollOptionResponse']?.(response.body);
Expand Down Expand Up @@ -1440,6 +1444,8 @@ export class CommonApi {
ios?: boolean;
web?: boolean;
unity?: boolean;
unity_desktop?: boolean;
unity_console?: boolean;
endpoints?: string;
}): Promise<StreamResponse<GetRateLimitsResponse>> {
const queryParams = {
Expand All @@ -1448,6 +1454,8 @@ export class CommonApi {
ios: request?.ios,
web: request?.web,
unity: request?.unity,
unity_desktop: request?.unity_desktop,
unity_console: request?.unity_console,
endpoints: request?.endpoints,
};

Expand Down
63 changes: 63 additions & 0 deletions src/gen/feeds/FeedsApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ import {
DeleteFeedViewResponse,
DeleteFeedsBatchRequest,
DeleteFeedsBatchResponse,
DeleteUserInterestsResponse,
ExportFeedUserDataResponse,
FollowBatchRequest,
FollowBatchResponse,
Expand Down Expand Up @@ -174,6 +175,8 @@ import {
UpsertActivitiesResponse,
UpsertCollectionsRequest,
UpsertCollectionsResponse,
UpsertUserInterestsRequest,
UpsertUserInterestsResponse,
} from '../models';
import { decoders } from '../model-decoders/decoders';

Expand Down Expand Up @@ -726,13 +729,15 @@ export class FeedsApi {
id: string;
comment_sort?: string;
comment_limit?: number;
skip_own_followings?: boolean;
user_id?: string;
language?: string;
translate_text?: boolean;
}): Promise<StreamResponse<GetActivityResponse>> {
const queryParams = {
comment_sort: request?.comment_sort,
comment_limit: request?.comment_limit,
skip_own_followings: request?.skip_own_followings,
user_id: request?.user_id,
language: request?.language,
translate_text: request?.translate_text,
Expand Down Expand Up @@ -1720,6 +1725,7 @@ export class FeedsApi {
activity_processors: request?.activity_processors,
activity_selectors: request?.activity_selectors,
activity_filter: request?.activity_filter,
activity_marks: request?.activity_marks,
activity_processing: request?.activity_processing,
aggregation: request?.aggregation,
custom: request?.custom,
Expand Down Expand Up @@ -2282,6 +2288,7 @@ export class FeedsApi {
activity_processors: request?.activity_processors,
activity_selectors: request?.activity_selectors,
activity_filter: request?.activity_filter,
activity_marks: request?.activity_marks,
activity_processing: request?.activity_processing,
aggregation: request?.aggregation,
custom: request?.custom,
Expand Down Expand Up @@ -2319,6 +2326,7 @@ export class FeedsApi {
activity_processors: request?.activity_processors,
activity_selectors: request?.activity_selectors,
activity_filter: request?.activity_filter,
activity_marks: request?.activity_marks,
activity_processing: request?.activity_processing,
aggregation: request?.aggregation,
custom: request?.custom,
Expand Down Expand Up @@ -2633,6 +2641,8 @@ export class FeedsApi {
ios?: boolean;
web?: boolean;
unity?: boolean;
unity_desktop?: boolean;
unity_console?: boolean;
server_side?: boolean;
}): Promise<StreamResponse<GetFeedsRateLimitsResponse>> {
const queryParams = {
Expand All @@ -2641,6 +2651,8 @@ export class FeedsApi {
ios: request?.ios,
web: request?.web,
unity: request?.unity,
unity_desktop: request?.unity_desktop,
unity_console: request?.unity_console,
server_side: request?.server_side,
};

Expand Down Expand Up @@ -3184,6 +3196,31 @@ export class FeedsApi {
return { ...response.body, metadata: response.metadata };
}

async deleteUserInterests(request: {
user_id: string;
tags: Array<string>;
}): Promise<StreamResponse<DeleteUserInterestsResponse>> {
const queryParams = {
tags: request?.tags,
};
const pathParams = {
user_id: request?.user_id,
};

const response = await this.apiClient.sendRequest<
StreamResponse<DeleteUserInterestsResponse>
>(
'DELETE',
'/api/v2/feeds/users/{user_id}/interests',
pathParams,
queryParams,
);

decoders['DeleteUserInterestsResponse']?.(response.body);

return { ...response.body, metadata: response.metadata };
}

async getUserInterests(request: {
user_id: string;
limit?: number;
Expand All @@ -3208,4 +3245,30 @@ export class FeedsApi {

return { ...response.body, metadata: response.metadata };
}

async upsertUserInterests(
request: UpsertUserInterestsRequest & { user_id: string },
): Promise<StreamResponse<UpsertUserInterestsResponse>> {
const pathParams = {
user_id: request?.user_id,
};
const body = {
interests: request?.interests,
};

const response = await this.apiClient.sendRequest<
StreamResponse<UpsertUserInterestsResponse>
>(
'PUT',
'/api/v2/feeds/users/{user_id}/interests',
pathParams,
undefined,
body,
'application/json',
);

decoders['UpsertUserInterestsResponse']?.(response.body);

return { ...response.body, metadata: response.metadata };
}
}
Loading