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
5 changes: 5 additions & 0 deletions src/gen/chat/ChannelApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ export class ChannelApi {
messages_limit?: number;
members_limit?: number;
watchers_limit?: number;
messages_id_lt?: string;
messages_id_lte?: string;
messages_id_gt?: string;
messages_id_gte?: string;
messages_id_around?: string;
}): Promise<StreamResponse<ChannelStateResponse>> {
if (!this.id) {
throw new Error(
Expand Down
14 changes: 14 additions & 0 deletions src/gen/chat/ChatApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -566,12 +566,22 @@ export class ChatApi {
messages_limit?: number;
members_limit?: number;
watchers_limit?: number;
messages_id_lt?: string;
messages_id_lte?: string;
messages_id_gt?: string;
messages_id_gte?: string;
messages_id_around?: string;
}): Promise<StreamResponse<ChannelStateResponse>> {
const queryParams = {
state: request?.state,
messages_limit: request?.messages_limit,
members_limit: request?.members_limit,
watchers_limit: request?.watchers_limit,
messages_id_lt: request?.messages_id_lt,
messages_id_lte: request?.messages_id_lte,
messages_id_gt: request?.messages_id_gt,
messages_id_gte: request?.messages_id_gte,
messages_id_around: request?.messages_id_around,
};
const pathParams = {
type: request?.type,
Expand Down Expand Up @@ -925,6 +935,8 @@ export class ChatApi {
const body = {
message: request?.message,
force_moderation: request?.force_moderation,
include_channel_context: request?.include_channel_context,
include_mentioned_members: request?.include_mentioned_members,
keep_channel_hidden: request?.keep_channel_hidden,
pending: request?.pending,
skip_enrich_url: request?.skip_enrich_url,
Expand Down Expand Up @@ -1425,9 +1437,11 @@ export class ChatApi {
channels: request?.channels,
clear_deleted_message_text: request?.clear_deleted_message_text,
export_users: request?.export_users,
format: request?.format,
include_soft_deleted_channels: request?.include_soft_deleted_channels,
include_truncated_messages: request?.include_truncated_messages,
version: request?.version,
include_fields: request?.include_fields,
};

const response = await this.apiClient.sendRequest<
Expand Down
78 changes: 73 additions & 5 deletions src/gen/common/CommonApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ import {
GetBlockListResponse,
GetBlockedUsersResponse,
GetCustomPermissionResponse,
GetExternalStorageResponse,
GetImportResponse,
GetImportV2TaskResponse,
GetOGResponse,
Expand Down Expand Up @@ -104,12 +105,15 @@ import {
UpdateUsersPartialRequest,
UpdateUsersRequest,
UpdateUsersResponse,
UpsertExternalStorageRequest,
UpsertExternalStorageResponse,
UpsertPushPreferencesRequest,
UpsertPushPreferencesResponse,
UpsertPushProviderRequest,
UpsertPushProviderResponse,
UpsertPushTemplateRequest,
UpsertPushTemplateResponse,
ValidateExternalStorageResponse,
} from '../models';
import { decoders } from '../model-decoders/decoders';

Expand Down Expand Up @@ -150,6 +154,8 @@ export class CommonApi {
image_moderation_enabled: request?.image_moderation_enabled,
max_aggregated_activities_length:
request?.max_aggregated_activities_length,
member_custom_on_messages_enabled:
request?.member_custom_on_messages_enabled,
migrate_permissions_to_v2: request?.migrate_permissions_to_v2,
moderation_analytics_enabled: request?.moderation_analytics_enabled,
moderation_enabled: request?.moderation_enabled,
Expand Down Expand Up @@ -753,6 +759,72 @@ export class CommonApi {
return { ...response.body, metadata: response.metadata };
}

async deleteImporterExternalStorage(): Promise<
StreamResponse<DeleteExternalStorageResponse>
> {
const response = await this.apiClient.sendRequest<
StreamResponse<DeleteExternalStorageResponse>
>('DELETE', '/api/v2/imports/v2/external-storage', undefined, undefined);

decoders.DeleteExternalStorageResponse?.(response.body);

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

async getImporterExternalStorage(): Promise<
StreamResponse<GetExternalStorageResponse>
> {
const response = await this.apiClient.sendRequest<
StreamResponse<GetExternalStorageResponse>
>('GET', '/api/v2/imports/v2/external-storage', undefined, undefined);

decoders.GetExternalStorageResponse?.(response.body);

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

async upsertImporterExternalStorage(
request: UpsertExternalStorageRequest,
): Promise<StreamResponse<UpsertExternalStorageResponse>> {
const body = {
type: request?.type,
aws_s3: request?.aws_s3,
gcs: request?.gcs,
};

const response = await this.apiClient.sendRequest<
StreamResponse<UpsertExternalStorageResponse>
>(
'PUT',
'/api/v2/imports/v2/external-storage',
undefined,
undefined,
body,
'application/json',
);

decoders.UpsertExternalStorageResponse?.(response.body);

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

async validateImporterExternalStorage(): Promise<
StreamResponse<ValidateExternalStorageResponse>
> {
const response = await this.apiClient.sendRequest<
StreamResponse<ValidateExternalStorageResponse>
>(
'POST',
'/api/v2/imports/v2/external-storage/validate',
undefined,
undefined,
);

decoders.ValidateExternalStorageResponse?.(response.body);

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

async deleteImportV2Task(request: {
id: string;
}): Promise<StreamResponse<DeleteImportV2TaskResponse>> {
Expand Down Expand Up @@ -1104,11 +1176,7 @@ 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 @@ -1120,7 +1188,7 @@ export class CommonApi {
'GET',
'/api/v2/polls/{poll_id}/options/{option_id}',
pathParams,
queryParams,
undefined,
);

decoders.PollOptionResponse?.(response.body);
Expand Down
1 change: 1 addition & 0 deletions src/gen/feeds/FeedsApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ export class FeedsApi {
visibility_tag: request?.visibility_tag,
attachments: request?.attachments,
collection_refs: request?.collection_refs,
collections: request?.collections,
filter_tags: request?.filter_tags,
interest_tags: request?.interest_tags,
mentioned_user_ids: request?.mentioned_user_ids,
Expand Down
85 changes: 85 additions & 0 deletions src/gen/model-decoders/decoders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1372,6 +1372,13 @@ decoders.ChannelConfigWithInfo = (input?: Record<string, any>) => {
return decode(typeMappings, input);
};

decoders.ChannelContextResponse = (input?: Record<string, any>) => {
const typeMappings: TypeMapping = {
created_by: { type: 'UserResponse', isSingle: true },
};
return decode(typeMappings, input);
};

decoders.ChannelCreatedEvent = (input?: Record<string, any>) => {
const typeMappings: TypeMapping = {
created_at: { type: 'DatetimeType', isSingle: true },
Expand Down Expand Up @@ -1432,6 +1439,8 @@ decoders.ChannelMemberResponse = (input?: Record<string, any>) => {

deleted_at: { type: 'DatetimeType', isSingle: true },

future_channel_ban_expires: { type: 'DatetimeType', isSingle: true },

invite_accepted_at: { type: 'DatetimeType', isSingle: true },

invite_rejected_at: { type: 'DatetimeType', isSingle: true },
Expand Down Expand Up @@ -2920,6 +2929,15 @@ decoders.GetDraftResponse = (input?: Record<string, any>) => {
return decode(typeMappings, input);
};

decoders.GetExternalStorageResponse = (input?: Record<string, any>) => {
const typeMappings: TypeMapping = {
created_at: { type: 'DatetimeType', isSingle: true },

updated_at: { type: 'DatetimeType', isSingle: true },
};
return decode(typeMappings, input);
};

decoders.GetFeedGroupResponse = (input?: Record<string, any>) => {
const typeMappings: TypeMapping = {
feed_group: { type: 'FeedGroupResponse', isSingle: true },
Expand Down Expand Up @@ -3667,6 +3685,15 @@ decoders.MessageWithChannelResponse = (input?: Record<string, any>) => {
return decode(typeMappings, input);
};

decoders.ModerationAnalysisFailedEvent = (input?: Record<string, any>) => {
const typeMappings: TypeMapping = {
created_at: { type: 'DatetimeType', isSingle: true },

received_at: { type: 'DatetimeType', isSingle: true },
};
return decode(typeMappings, input);
};

decoders.ModerationCallResponse = (input?: Record<string, any>) => {
const typeMappings: TypeMapping = {
created_at: { type: 'DatetimeType', isSingle: true },
Expand Down Expand Up @@ -3983,6 +4010,62 @@ decoders.PinActivityResponse = (input?: Record<string, any>) => {
return decode(typeMappings, input);
};

decoders.PolicyTestResult = (input?: Record<string, any>) => {
const typeMappings: TypeMapping = {
created_at: { type: 'DatetimeType', isSingle: true },
};
return decode(typeMappings, input);
};

decoders.PolicyTestRun = (input?: Record<string, any>) => {
const typeMappings: TypeMapping = {
created_at: { type: 'DatetimeType', isSingle: true },

completed_at: { type: 'DatetimeType', isSingle: true },

config_updated_at: { type: 'DatetimeType', isSingle: true },

started_at: { type: 'DatetimeType', isSingle: true },
};
return decode(typeMappings, input);
};

decoders.PolicyTestRunResponse = (input?: Record<string, any>) => {
const typeMappings: TypeMapping = {
results: { type: 'PolicyTestResult', isSingle: false },

run: { type: 'PolicyTestRun', isSingle: true },
};
return decode(typeMappings, input);
};

decoders.PolicyTestSet = (input?: Record<string, any>) => {
const typeMappings: TypeMapping = {
created_at: { type: 'DatetimeType', isSingle: true },

updated_at: { type: 'DatetimeType', isSingle: true },

last_run: { type: 'PolicyTestRun', isSingle: true },
};
return decode(typeMappings, input);
};

decoders.PolicyTestSetListResponse = (input?: Record<string, any>) => {
const typeMappings: TypeMapping = {
sets: { type: 'PolicyTestSet', isSingle: false },
};
return decode(typeMappings, input);
};

decoders.PolicyTestSetResponse = (input?: Record<string, any>) => {
const typeMappings: TypeMapping = {
recent_runs: { type: 'PolicyTestRun', isSingle: false },

set: { type: 'PolicyTestSet', isSingle: true },
};
return decode(typeMappings, input);
};

decoders.PollResponse = (input?: Record<string, any>) => {
const typeMappings: TypeMapping = {
poll: { type: 'PollResponseData', isSingle: true },
Expand Down Expand Up @@ -4922,6 +5005,8 @@ decoders.SegmentTargetResponse = (input?: Record<string, any>) => {
decoders.SendMessageResponse = (input?: Record<string, any>) => {
const typeMappings: TypeMapping = {
message: { type: 'MessageResponse', isSingle: true },

channel_context: { type: 'ChannelContextResponse', isSingle: true },
};
return decode(typeMappings, input);
};
Expand Down
Loading
Loading