diff --git a/src/gen/chat/ChatApi.ts b/src/gen/chat/ChatApi.ts index cd9cdca..dc8ced9 100644 --- a/src/gen/chat/ChatApi.ts +++ b/src/gen/chat/ChatApi.ts @@ -29,7 +29,6 @@ import { GetDraftResponse, GetManyMessagesResponse, GetMessageResponse, - GetPushTemplatesResponse, GetReactionsResponse, GetRepliesResponse, GetSegmentResponse, @@ -114,10 +113,6 @@ import { UpdateReminderResponse, UpdateThreadPartialRequest, UpdateThreadPartialResponse, - UpsertPushPreferencesRequest, - UpsertPushPreferencesResponse, - UpsertPushTemplateRequest, - UpsertPushTemplateResponse, WrappedUnreadCountsResponse, } from '../models'; import { decoders } from '../model-decoders/decoders'; @@ -1823,74 +1818,6 @@ export class ChatApi { return { ...response.body, metadata: response.metadata }; } - async updatePushNotificationPreferences( - request: UpsertPushPreferencesRequest, - ): Promise> { - const body = { - preferences: request?.preferences, - }; - - const response = await this.apiClient.sendRequest< - StreamResponse - >( - 'POST', - '/api/v2/chat/push_preferences', - undefined, - undefined, - body, - 'application/json', - ); - - decoders.UpsertPushPreferencesResponse?.(response.body); - - return { ...response.body, metadata: response.metadata }; - } - - async getPushTemplates(request: { - push_provider_type: string; - push_provider_name?: string; - }): Promise> { - const queryParams = { - push_provider_type: request?.push_provider_type, - push_provider_name: request?.push_provider_name, - }; - - const response = await this.apiClient.sendRequest< - StreamResponse - >('GET', '/api/v2/chat/push_templates', undefined, queryParams); - - decoders.GetPushTemplatesResponse?.(response.body); - - return { ...response.body, metadata: response.metadata }; - } - - async upsertPushTemplate( - request: UpsertPushTemplateRequest, - ): Promise> { - const body = { - event_type: request?.event_type, - push_provider_type: request?.push_provider_type, - enable_push: request?.enable_push, - push_provider_name: request?.push_provider_name, - template: request?.template, - }; - - const response = await this.apiClient.sendRequest< - StreamResponse - >( - 'POST', - '/api/v2/chat/push_templates', - undefined, - undefined, - body, - 'application/json', - ); - - decoders.UpsertPushTemplateResponse?.(response.body); - - return { ...response.body, metadata: response.metadata }; - } - async queryBannedUsers(request?: { payload?: QueryBannedUsersPayload; }): Promise> { diff --git a/src/gen/common/CommonApi.ts b/src/gen/common/CommonApi.ts index 15ecb35..075b207 100644 --- a/src/gen/common/CommonApi.ts +++ b/src/gen/common/CommonApi.ts @@ -42,6 +42,7 @@ import { GetCustomPermissionResponse, GetImportResponse, GetOGResponse, + GetPushTemplatesResponse, GetRateLimitsResponse, GetTaskResponse, ImageUploadRequest, @@ -83,8 +84,12 @@ import { UpdateUsersPartialRequest, UpdateUsersRequest, UpdateUsersResponse, + UpsertPushPreferencesRequest, + UpsertPushPreferencesResponse, UpsertPushProviderRequest, UpsertPushProviderResponse, + UpsertPushTemplateRequest, + UpsertPushTemplateResponse, } from '../models'; import { decoders } from '../model-decoders/decoders'; @@ -987,6 +992,29 @@ export class CommonApi { return { ...response.body, metadata: response.metadata }; } + async updatePushNotificationPreferences( + request: UpsertPushPreferencesRequest, + ): Promise> { + const body = { + preferences: request?.preferences, + }; + + const response = await this.apiClient.sendRequest< + StreamResponse + >( + 'POST', + '/api/v2/push_preferences', + undefined, + undefined, + body, + 'application/json', + ); + + decoders.UpsertPushPreferencesResponse?.(response.body); + + return { ...response.body, metadata: response.metadata }; + } + async listPushProviders(): Promise< StreamResponse > { @@ -1043,6 +1071,51 @@ export class CommonApi { return { ...response.body, metadata: response.metadata }; } + async getPushTemplates(request: { + push_provider_type: string; + push_provider_name?: string; + }): Promise> { + const queryParams = { + push_provider_type: request?.push_provider_type, + push_provider_name: request?.push_provider_name, + }; + + const response = await this.apiClient.sendRequest< + StreamResponse + >('GET', '/api/v2/push_templates', undefined, queryParams); + + decoders.GetPushTemplatesResponse?.(response.body); + + return { ...response.body, metadata: response.metadata }; + } + + async upsertPushTemplate( + request: UpsertPushTemplateRequest, + ): Promise> { + const body = { + event_type: request?.event_type, + push_provider_type: request?.push_provider_type, + enable_push: request?.enable_push, + push_provider_name: request?.push_provider_name, + template: request?.template, + }; + + const response = await this.apiClient.sendRequest< + StreamResponse + >( + 'POST', + '/api/v2/push_templates', + undefined, + undefined, + body, + 'application/json', + ); + + decoders.UpsertPushTemplateResponse?.(response.body); + + return { ...response.body, metadata: response.metadata }; + } + async getRateLimits(request?: { server_side?: boolean; android?: boolean; diff --git a/src/gen/model-decoders/decoders.ts b/src/gen/model-decoders/decoders.ts index c6467c7..be1f8aa 100644 --- a/src/gen/model-decoders/decoders.ts +++ b/src/gen/model-decoders/decoders.ts @@ -2687,6 +2687,8 @@ decoders.MessageReadEvent = (input?: Record) => { channel_last_message_at: { type: 'DatetimeType', isSingle: true }, + channel: { type: 'ChannelResponse', isSingle: true }, + thread: { type: 'ThreadResponse', isSingle: true }, user: { type: 'UserResponseCommonFields', isSingle: true }, diff --git a/src/gen/models/index.ts b/src/gen/models/index.ts index 9701086..baa79b5 100644 --- a/src/gen/models/index.ts +++ b/src/gen/models/index.ts @@ -2315,6 +2315,8 @@ export interface CallSessionParticipantLeftEvent { participant: CallParticipantResponse; type: string; + + reason?: string; } export interface CallSessionResponse { @@ -4507,8 +4509,6 @@ export interface DeleteFeedGroupResponse { } export interface DeleteFeedResponse { - delete_feed_task_id: string; - duration: string; task_id: string; @@ -5466,15 +5466,15 @@ export interface FeedsModerationTemplateConfig { } export interface FeedsPreferences { - comment?: string; + comment?: 'all' | 'none'; - comment_reaction?: string; + comment_reaction?: 'all' | 'none'; - follow?: string; + follow?: 'all' | 'none'; - mention?: string; + mention?: 'all' | 'none'; - reaction?: string; + reaction?: 'all' | 'none'; custom_activity_types?: Record; } @@ -7372,6 +7372,8 @@ export interface MessageReadEvent { team?: string; + channel?: ChannelResponse; + thread?: ThreadResponse; user?: UserResponseCommonFields; @@ -12818,7 +12820,7 @@ export interface UpsertPushPreferencesResponse { user_channel_preferences: Record< string, - Record + Record >; user_preferences: Record; diff --git a/src/gen/video/VideoApi.ts b/src/gen/video/VideoApi.ts index f33346b..597da1b 100644 --- a/src/gen/video/VideoApi.ts +++ b/src/gen/video/VideoApi.ts @@ -791,6 +791,7 @@ export class VideoApi { enable_transcription: request?.enable_transcription, external_storage: request?.external_storage, language: request?.language, + speech_segment_config: request?.speech_segment_config, }; const response = await this.apiClient.sendRequest<