Skip to content
Merged
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/ChatApi.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -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,
Expand Down
8 changes: 5 additions & 3 deletions src/gen/common/CommonApi.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -25,6 +25,7 @@ import {
CreateImportURLResponse,
CreateImportV2TaskRequest,
CreateImportV2TaskResponse,
CreatePermissionRequest,
CreatePollOptionRequest,
CreatePollRequest,
CreateRoleRequest,
Expand DownExpand Up@@ -917,15 +918,16 @@ export class CommonApi {
}

async createPermission(
request: PermissionRequest,
request: CreatePermissionRequest,
): Promise<StreamResponse<Response>> {
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<StreamResponse<Response>>(
Expand DownExpand Up@@ -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<StreamResponse<Response>>(
Expand Down
8 changes: 8 additions & 0 deletions src/gen/feeds/FeedApi.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,6 +5,7 @@ import {
ChangeFeedVisibilityRequest,
ChangeFeedVisibilityResponse,
DeleteFeedResponse,
GetFeedCountsResponse,
GetOrCreateFeedRequest,
GetOrCreateFeedResponse,
MarkActivityRequest,
Expand DownExpand Up@@ -107,6 +108,13 @@ export class FeedApi {
});
}

getFeedCounts(): Promise<StreamResponse<GetFeedCountsResponse>> {
return this.feedsApi.getFeedCounts({
feed_id: this.id,
feed_group_id: this.group,
});
}

updateFeedMembers(
request: UpdateFeedMembersRequest,
): Promise<StreamResponse<UpdateFeedMembersResponse>> {
Expand Down
24 changes: 24 additions & 0 deletions src/gen/feeds/FeedsApi.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -62,6 +62,7 @@ import {
GetCommentRepliesResponse,
GetCommentResponse,
GetCommentsResponse,
GetFeedCountsResponse,
GetFeedGroupResponse,
GetFeedViewResponse,
GetFeedVisibilityResponse,
Expand DownExpand Up@@ -1985,6 +1986,29 @@ export class FeedsApi {
return { ...response.body, metadata: response.metadata };
}

async getFeedCounts(request: {
feed_group_id: string;
feed_id: string;
}): Promise<StreamResponse<GetFeedCountsResponse>> {
const pathParams = {
feed_group_id: request?.feed_group_id,
feed_id: request?.feed_id,
};

const response = await this.apiClient.sendRequest<
StreamResponse<GetFeedCountsResponse>
>(
'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;
Expand Down
82 changes: 77 additions & 5 deletions src/gen/models/index.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -5419,6 +5419,8 @@ export interface ChannelConfig {

max_message_length: number;

message_retention: string;

mutes: boolean;

name: string;
Expand DownExpand Up@@ -5570,6 +5572,8 @@ export interface ChannelConfigWithInfo {

max_message_length: number;

message_retention: string;

mutes: boolean;

name: string;
Expand DownExpand Up@@ -6571,6 +6575,8 @@ export interface ChannelTypeConfig {

max_message_length: number;

message_retention: string;

mutes: boolean;

name: string;
Expand DownExpand Up@@ -7382,6 +7388,8 @@ export interface Classification {

severity?: string;

matched_contributors?: Array<string>;

subclassifications?: Array<Classification>;
}

Expand DownExpand Up@@ -8543,6 +8551,8 @@ export interface CreateChannelTypeResponse {

max_message_length: number;

message_retention: string;

mutes: boolean;

name: string;
Expand DownExpand Up@@ -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<string, any>;

/**
* 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
Expand DownExpand Up@@ -12973,6 +13020,8 @@ export interface GetChannelTypeResponse {

max_message_length: number;

message_retention: string;

mutes: boolean;

name: string;
Expand DownExpand Up@@ -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;

Expand DownExpand Up@@ -18472,6 +18540,11 @@ export interface PermissionRequest {
*/
name: string;

/**
* MongoDB style condition which decides whether or not the permission is granted
*/
condition: Record<string, any>;

/**
* Description of the permission
*/
Expand All@@ -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<string, any>;
}

export interface PermissionRequestEvent {
Expand DownExpand Up@@ -26612,6 +26680,8 @@ export interface UpdateChannelTypeRequest {

mark_messages_pending?: boolean;

message_retention?: string;

mutes?: boolean;

partition_size?: number;
Expand DownExpand Up@@ -26690,6 +26760,8 @@ export interface UpdateChannelTypeResponse {

max_message_length: number;

message_retention: string;

mutes: boolean;

name: string;
Expand Down