From 25bb04b86c060f6c5bbd2c6d1c02272fe92377f5 Mon Sep 17 00:00:00 2001 From: Zita Szupera Date: Mon, 8 Sep 2025 15:56:31 +0200 Subject: [PATCH 1/3] feat: update to version 193.9.1 --- __tests__/devices-push.test.ts | 10 ++++ src/gen/chat/ChatApi.ts | 73 ------------------------------ src/gen/common/CommonApi.ts | 73 ++++++++++++++++++++++++++++++ src/gen/model-decoders/decoders.ts | 2 + src/gen/models/index.ts | 20 ++++---- src/gen/video/VideoApi.ts | 1 + 6 files changed, 98 insertions(+), 81 deletions(-) diff --git a/__tests__/devices-push.test.ts b/__tests__/devices-push.test.ts index 3a082c5..ac02957 100644 --- a/__tests__/devices-push.test.ts +++ b/__tests__/devices-push.test.ts @@ -69,6 +69,16 @@ describe('devices and push', () => { expect(response).toBeDefined(); }); + // Wait for backend deployment + it.skip(`list push templates`, async () => { + const response = await client.getPushTemplates({ + push_provider_type: 'firebase', + push_provider_name: 'firebase', + }); + + expect(response.templates).toBeDefined(); + }); + // TODO: can't test delete because we can't upsert // it('delete push provider', async () => { // const response = await client.deletePushProvider({name: pushProvider.push_provider!.name, type: DeletePushProviderTypeEnum.FIREBASE}); 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..541d9a6 100644 --- a/src/gen/models/index.ts +++ b/src/gen/models/index.ts @@ -1968,6 +1968,8 @@ export interface CallParticipant { role: string; + role: string; + user_session_id: string; custom: Record; @@ -2315,6 +2317,8 @@ export interface CallSessionParticipantLeftEvent { participant: CallParticipantResponse; type: string; + + reason?: string; } export interface CallSessionResponse { @@ -4507,8 +4511,6 @@ export interface DeleteFeedGroupResponse { } export interface DeleteFeedResponse { - delete_feed_task_id: string; - duration: string; task_id: string; @@ -5466,15 +5468,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 +7374,8 @@ export interface MessageReadEvent { team?: string; + channel?: ChannelResponse; + thread?: ThreadResponse; user?: UserResponseCommonFields; @@ -12818,7 +12822,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< From 252b824d4b660dc2d9c0fc77db9187081df3c4b5 Mon Sep 17 00:00:00 2001 From: Zita Szupera Date: Mon, 8 Sep 2025 16:00:31 +0200 Subject: [PATCH 2/3] fix lint issue --- src/gen/models/index.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/gen/models/index.ts b/src/gen/models/index.ts index 541d9a6..baa79b5 100644 --- a/src/gen/models/index.ts +++ b/src/gen/models/index.ts @@ -1968,8 +1968,6 @@ export interface CallParticipant { role: string; - role: string; - user_session_id: string; custom: Record; From 75f3485fabefa6c8a7e28b684f2f0db1e1cbd329 Mon Sep 17 00:00:00 2001 From: Zita Szupera Date: Mon, 8 Sep 2025 16:31:10 +0200 Subject: [PATCH 3/3] remove push config test as test app isn't on push v3 --- __tests__/devices-push.test.ts | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/__tests__/devices-push.test.ts b/__tests__/devices-push.test.ts index ac02957..3a082c5 100644 --- a/__tests__/devices-push.test.ts +++ b/__tests__/devices-push.test.ts @@ -69,16 +69,6 @@ describe('devices and push', () => { expect(response).toBeDefined(); }); - // Wait for backend deployment - it.skip(`list push templates`, async () => { - const response = await client.getPushTemplates({ - push_provider_type: 'firebase', - push_provider_name: 'firebase', - }); - - expect(response.templates).toBeDefined(); - }); - // TODO: can't test delete because we can't upsert // it('delete push provider', async () => { // const response = await client.deletePushProvider({name: pushProvider.push_provider!.name, type: DeletePushProviderTypeEnum.FIREBASE});