diff --git a/src/gen/chat/ChatApi.ts b/src/gen/chat/ChatApi.ts index 75593a7..22e1d79 100644 --- a/src/gen/chat/ChatApi.ts +++ b/src/gen/chat/ChatApi.ts @@ -1325,6 +1325,7 @@ export class ChatApi { custom_events: request?.custom_events, delivery_events: request?.delivery_events, mark_messages_pending: request?.mark_messages_pending, + message_retention: request?.message_retention, mutes: request?.mutes, partition_size: request?.partition_size, partition_ttl: request?.partition_ttl, diff --git a/src/gen/common/CommonApi.ts b/src/gen/common/CommonApi.ts index d938e41..8cb0c0d 100644 --- a/src/gen/common/CommonApi.ts +++ b/src/gen/common/CommonApi.ts @@ -25,6 +25,7 @@ import { CreateImportURLResponse, CreateImportV2TaskRequest, CreateImportV2TaskResponse, + CreatePermissionRequest, CreatePollOptionRequest, CreatePollRequest, CreateRoleRequest, @@ -917,15 +918,16 @@ export class CommonApi { } async createPermission( - request: PermissionRequest, + request: CreatePermissionRequest, ): Promise> { const body = { action: request?.action, + id: request?.id, name: request?.name, + condition: request?.condition, description: request?.description, owner: request?.owner, same_team: request?.same_team, - condition: request?.condition, }; const response = await this.apiClient.sendRequest>( @@ -986,10 +988,10 @@ export class CommonApi { const body = { action: request?.action, name: request?.name, + condition: request?.condition, description: request?.description, owner: request?.owner, same_team: request?.same_team, - condition: request?.condition, }; const response = await this.apiClient.sendRequest>( diff --git a/src/gen/feeds/FeedApi.ts b/src/gen/feeds/FeedApi.ts index b649afe..90e87c5 100644 --- a/src/gen/feeds/FeedApi.ts +++ b/src/gen/feeds/FeedApi.ts @@ -5,6 +5,7 @@ import { ChangeFeedVisibilityRequest, ChangeFeedVisibilityResponse, DeleteFeedResponse, + GetFeedCountsResponse, GetOrCreateFeedRequest, GetOrCreateFeedResponse, MarkActivityRequest, @@ -107,6 +108,13 @@ export class FeedApi { }); } + getFeedCounts(): Promise> { + return this.feedsApi.getFeedCounts({ + feed_id: this.id, + feed_group_id: this.group, + }); + } + updateFeedMembers( request: UpdateFeedMembersRequest, ): Promise> { diff --git a/src/gen/feeds/FeedsApi.ts b/src/gen/feeds/FeedsApi.ts index 83d5d26..06df479 100644 --- a/src/gen/feeds/FeedsApi.ts +++ b/src/gen/feeds/FeedsApi.ts @@ -62,6 +62,7 @@ import { GetCommentRepliesResponse, GetCommentResponse, GetCommentsResponse, + GetFeedCountsResponse, GetFeedGroupResponse, GetFeedViewResponse, GetFeedVisibilityResponse, @@ -1985,6 +1986,29 @@ export class FeedsApi { return { ...response.body, metadata: response.metadata }; } + async getFeedCounts(request: { + feed_group_id: string; + feed_id: string; + }): Promise> { + const pathParams = { + feed_group_id: request?.feed_group_id, + feed_id: request?.feed_id, + }; + + const response = await this.apiClient.sendRequest< + StreamResponse + >( + 'GET', + '/api/v2/feeds/feed_groups/{feed_group_id}/feeds/{feed_id}/counts', + pathParams, + undefined, + ); + + decoders['GetFeedCountsResponse']?.(response.body); + + return { ...response.body, metadata: response.metadata }; + } + async updateFeedMembers( request: UpdateFeedMembersRequest & { feed_group_id: string; diff --git a/src/gen/models/index.ts b/src/gen/models/index.ts index de4ae26..50c958f 100644 --- a/src/gen/models/index.ts +++ b/src/gen/models/index.ts @@ -5419,6 +5419,8 @@ export interface ChannelConfig { max_message_length: number; + message_retention: string; + mutes: boolean; name: string; @@ -5570,6 +5572,8 @@ export interface ChannelConfigWithInfo { max_message_length: number; + message_retention: string; + mutes: boolean; name: string; @@ -6571,6 +6575,8 @@ export interface ChannelTypeConfig { max_message_length: number; + message_retention: string; + mutes: boolean; name: string; @@ -7382,6 +7388,8 @@ export interface Classification { severity?: string; + matched_contributors?: Array; + subclassifications?: Array; } @@ -8543,6 +8551,8 @@ export interface CreateChannelTypeResponse { max_message_length: number; + message_retention: string; + mutes: boolean; name: string; @@ -8957,6 +8967,43 @@ export interface CreateMembershipLevelResponse { membership_level: MembershipLevelResponse; } +export interface CreatePermissionRequest { + /** + * Action name this permission is for (e.g. SendMessage) + */ + action: string; + + /** + * Unique permission ID + */ + id: string; + + /** + * Name of the permission + */ + name: string; + + /** + * MongoDB style condition which decides whether or not the permission is granted + */ + condition: Record; + + /** + * Description of the permission + */ + description?: string; + + /** + * Whether this permission applies to resource owner or not + */ + owner?: boolean; + + /** + * Whether this permission applies to teammates (multi-tenancy mode only) + */ + same_team?: boolean; +} + export interface CreatePolicyTestSetRequest { /** * Display name; unique within an app @@ -12973,6 +13020,8 @@ export interface GetChannelTypeResponse { max_message_length: number; + message_retention: string; + mutes: boolean; name: string; @@ -13188,6 +13237,25 @@ export interface GetExternalStorageResponse { gcs?: GetExternalStorageGCSResponse; } +export interface GetFeedCountsResponse { + /** + * Number of activities in the feed + */ + activity_count: number; + + /** + * Total number of comments on those activities, including nested replies + */ + comment_count: number; + + duration: string; + + /** + * Sum of activity_count and comment_count + */ + total_count: number; +} + export interface GetFeedGroupResponse { duration: string; @@ -18472,6 +18540,11 @@ export interface PermissionRequest { */ name: string; + /** + * MongoDB style condition which decides whether or not the permission is granted + */ + condition: Record; + /** * Description of the permission */ @@ -18486,11 +18559,6 @@ export interface PermissionRequest { * Whether this permission applies to teammates (multi-tenancy mode only) */ same_team?: boolean; - - /** - * MongoDB style condition which decides whether or not the permission is granted - */ - condition?: Record; } export interface PermissionRequestEvent { @@ -26612,6 +26680,8 @@ export interface UpdateChannelTypeRequest { mark_messages_pending?: boolean; + message_retention?: string; + mutes?: boolean; partition_size?: number; @@ -26690,6 +26760,8 @@ export interface UpdateChannelTypeResponse { max_message_length: number; + message_retention: string; + mutes: boolean; name: string;