Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
chg(channels): use new cloud-storage service client (#3573)
teob3c8af44dc68
diff --git a/js/app/packages/channel/Channel/tests/create-target-message-controller.test.ts b/js/app/packages/channel/Channel/tests/create-target-message-controller.test.tsindex 3853db432f..be62c2dd6d 100644--- a/js/app/packages/channel/Channel/tests/create-target-message-controller.test.ts+++ b/js/app/packages/channel/Channel/tests/create-target-message-controller.test.ts@@ -1,10 +1,15 @@+import { queryClient } from '@queries/client';+import { createRoot, createSignal } from 'solid-js';+import { afterEach, describe, expect, it, vi } from 'vitest';++vi.mock('@service-storage/client', () => ({+ storageServiceClient: {},+}));+import {type ChannelMessagesData,getChannelMessagesQueryKey,} from '@queries/channel/channel-messages';-import { queryClient } from '@queries/client';-import { createRoot, createSignal } from 'solid-js';-import { afterEach, describe, expect, it } from 'vitest';import {createTargetMessageController,restoreDefaultChannelPaginationAfterTargetLoad,diff --git a/js/app/packages/queries/channel/channel-attachments.ts b/js/app/packages/queries/channel/channel-attachments.tsindex 3f48ee9bb3..d548cd4abd 100644--- a/js/app/packages/queries/channel/channel-attachments.ts+++ b/js/app/packages/queries/channel/channel-attachments.ts@@ -3,8 +3,8 @@ import {type ApiChannelAttachment,type ChannelAttachmentsPage,type ChannelAttachmentType,- commsServiceClient,-} from '@service-comms/client';+ storageServiceClient,+} from '@service-storage/client';import { type InfiniteData, useInfiniteQuery } from '@tanstack/solid-query';import { type Accessor, createMemo } from 'solid-js';import { queryClient } from '../client';@@ -34,7 +34,7 @@ export function channelAttachmentsQueryOptions(}) => {return await throwOnErr(async () =>- await commsServiceClient.getChannelAttachments({+ await storageServiceClient.getChannelAttachments({channel_id: channelId,limit: 100,cursor: pageParam,diff --git a/js/app/packages/queries/channel/channel-messages.ts b/js/app/packages/queries/channel/channel-messages.tsindex fc0cba0138..0c3e30daec 100644--- a/js/app/packages/queries/channel/channel-messages.ts+++ b/js/app/packages/queries/channel/channel-messages.ts@@ -3,8 +3,8 @@ import {type ApiChannelMessage,type ApiThreadReply,type ChannelMessagesPage,- commsServiceClient,-} from '@service-comms/client';+ storageServiceClient,+} from '@service-storage/client';import type { ApiCountedReaction } from '@service-storage/generated/schemas';import type { ApiMessageAttachment } from '@service-storage/generated/schemas/apiMessageAttachment';import {@@ -70,7 +70,7 @@ export function channelMessagesQueryOptions(}) => {return await throwOnErr(async () =>- await commsServiceClient.getChannelMessages({+ await storageServiceClient.getChannelMessages({channel_id: channelId,limit: pageParam ? 100 : 50,next_cursor: pageParam?.next_cursor ?? null,@@ -125,7 +125,7 @@ export function useChannelMessagesByIdsQuery(.queryKey,queryFn: async (): Promise<ApiChannelMessage[]> => {const page = await throwOnErr(() =>- commsServiceClient.postChannelMessages({+ storageServiceClient.postChannelMessages({channel_id: resolvedChannelId,filters: { message_ids: resolvedMessageIds },})diff --git a/js/app/packages/queries/channel/channel-participants.ts b/js/app/packages/queries/channel/channel-participants.tsindex a0a59931a7..439acc1d2c 100644--- a/js/app/packages/queries/channel/channel-participants.ts+++ b/js/app/packages/queries/channel/channel-participants.ts@@ -1,8 +1,8 @@import { throwOnErr } from '@core/util/result';import {type ApiChannelParticipant,- commsServiceClient,-} from '@service-comms/client';+ storageServiceClient,+} from '@service-storage/client';import { useQuery } from '@tanstack/solid-query';import type { Accessor } from 'solid-js';import { queryClient } from '../client';@@ -14,7 +14,7 @@ function channelParticipantsQueryOptions(channelId: string) {queryFn: async (): Promise<ApiChannelParticipant[]> => {return await throwOnErr(async () =>- await commsServiceClient.getChannelParticipants({+ await storageServiceClient.getChannelParticipants({channel_id: channelId,}));diff --git a/js/app/packages/queries/channel/get-or-create-dm.ts b/js/app/packages/queries/channel/get-or-create-dm.tsindex 0bc3d52bba..e83e09b27d 100644--- a/js/app/packages/queries/channel/get-or-create-dm.ts+++ b/js/app/packages/queries/channel/get-or-create-dm.ts@@ -1,10 +1,14 @@import { throwOnErr } from '@core/util/result';import { type MutationCallbacks, withCallbacks } from '@queries/utils';-import { commsServiceClient } from '@service-comms/client';-import type { GetOrCreateDmResponse } from '@service-comms/generated/models';+import {+ type GetOrCreateChannelResponse,+ storageServiceClient,+} from '@service-storage/client';import { useMutation } from '@tanstack/solid-query';import { invalidateListChannels } from './channels';+type GetOrCreateDmResponse = GetOrCreateChannelResponse;+type GetOrCreateDirectMessageParams = {recipient_id: string;};@@ -24,7 +28,7 @@ export function useGetOrCreateDirectMessageMutation(gcTime: 0,mutationFn: async (vars: GetOrCreateDirectMessageParams) => {return await throwOnErr(async () =>- commsServiceClient.getOrCreateDirectMessage({+ storageServiceClient.getOrCreateDirectMessage({recipient_id: vars.recipient_id,}));diff --git a/js/app/packages/queries/channel/message.ts b/js/app/packages/queries/channel/message.tsindex a7c0d2131e..32ba8691c8 100644--- a/js/app/packages/queries/channel/message.ts+++ b/js/app/packages/queries/channel/message.ts@@ -4,23 +4,23 @@ import { toast } from '@core/component/Toast/Toast';import type { DateValue } from '@core/util/date';import { throwOnErr } from '@core/util/result';import { type MutationCallbacks, withCallbacks } from '@queries/utils';-import {- type ApiChannelMessage,- type ApiThreadReply,- commsServiceClient,- type IdResponse,- type MessageResponse,-} from '@service-comms/client';import type {Attachment,ChannelMessage,CountedReaction,Message,- PostMessageRequest,} from '@service-comms/generated/models';-import type { NewAttachment } from '@service-comms/generated/models/newAttachment';-import type { SimpleMention } from '@service-comms/generated/models/simpleMention';+import {+ type ApiChannelMessage,+ type ApiThreadReply,+ type IdResponse,+ type MessageResponse,+ storageServiceClient,+} from '@service-storage/client';import type { ApiMessageAttachment } from '@service-storage/generated/schemas/apiMessageAttachment';+import type { NewChannelAttachment as NewAttachment } from '@service-storage/generated/schemas/newChannelAttachment';+import type { PostMessageRequest } from '@service-storage/generated/schemas/postMessageRequest';+import type { SimpleMention } from '@service-storage/generated/schemas/simpleMention';import { useMutation } from '@tanstack/solid-query';import { queryClient } from '../client';import { createMutationNonce, registerNonce } from '../nonce';@@ -422,7 +422,7 @@ export function useSendMessageMutation(// Use optimisticId as nonce - allows server to echo it back for correlationreturn await throwOnErr(async () =>- await commsServiceClient.postMessage({+ await storageServiceClient.postMessage({channel_id: vars.channelID,message: vars.message,nonce: vars.optimisticId,@@ -512,7 +512,7 @@ export function useDeleteMessageMutation(mutationFn: async (vars: DeleteMessageParams) => {await throwOnErr(async () =>- await commsServiceClient.deleteMessage({+ await storageServiceClient.deleteMessage({channel_id: vars.channelID,message_id: vars.messageID,nonce: deleteNonce.use(vars),@@ -588,7 +588,7 @@ export function usePatchMessageMutation(mutationFn: async (vars: PatchMessageParams) => {return await throwOnErr(async () =>- await commsServiceClient.patchMessage({+ await storageServiceClient.patchMessage({channel_id: vars.channelID,message_id: vars.messageID,content: vars.content,diff --git a/js/app/packages/queries/channel/participants.ts b/js/app/packages/queries/channel/participants.tsindex ec56eaf238..f02b9b7c74 100644--- a/js/app/packages/queries/channel/participants.ts+++ b/js/app/packages/queries/channel/participants.ts@@ -2,9 +2,9 @@ import { toast } from '@core/component/Toast/Toast';import { throwOnErr } from '@core/util/result';import { type MutationCallbacks, withCallbacks } from '@queries/utils';import {- commsServiceClient,type MessageResponse,-} from '@service-comms/client';+ storageServiceClient,+} from '@service-storage/client';import { useMutation } from '@tanstack/solid-query';import { queryClient } from '../client';import { softInvalidateChannelParticipants } from './channel-participants';@@ -180,7 +180,7 @@ export function useAddParticipantsMutation(mutationFn: async (vars: AddParticipantsParams) => {return await throwOnErr(async () =>- await commsServiceClient.addParticipantsToChanenl({+ await storageServiceClient.addParticipantsToChannel({channel_id: vars.channelId,participants: vars.participants,})@@ -229,7 +229,7 @@ export function useRemoveParticipantsMutation(mutationFn: async (vars: RemoveParticipantsParams) => {return await throwOnErr(async () =>- await commsServiceClient.removeParticipantsFromChannel({+ await storageServiceClient.removeParticipantsFromChannel({channel_id: vars.channelId,participants: vars.participants,})diff --git a/js/app/packages/queries/channel/reaction.ts b/js/app/packages/queries/channel/reaction.tsindex 827b3dbd44..530b1054c5 100644--- a/js/app/packages/queries/channel/reaction.ts+++ b/js/app/packages/queries/channel/reaction.ts@@ -2,13 +2,11 @@ import { toast } from '@core/component/Toast/Toast';import { throwOnErr } from '@core/util/result';import { type MutationCallbacks, withCallbacks } from '@queries/utils';import {- commsServiceClient,type MessageResponse,-} from '@service-comms/client';-import type {- CountedReaction,- PostReactionRequest,-} from '@service-comms/generated/models';+ storageServiceClient,+} from '@service-storage/client';+import type { ApiCountedReaction } from '@service-storage/generated/schemas/apiCountedReaction';+import type { PostReactionRequest } from '@service-storage/generated/schemas/postReactionRequest';import { useMutation } from '@tanstack/solid-query';import { queryClient } from '../client';import { createMutationNonce } from '../nonce';@@ -24,7 +22,7 @@ import {type WithChannelId<T> = T & { channelId: string };type WithUserId<T> = T & { userId: string };-type ReactionList = CountedReaction[];+type ReactionList = ApiCountedReaction[];type WithReactionState<T> = T & {currentReactions?: ReactionList;threadId?: string;@@ -239,7 +237,7 @@ export function useAddReactionMutation(mutationFn: async (vars: ReactionParams) => {return await throwOnErr(async () =>- await commsServiceClient.postReaction({+ await storageServiceClient.postReaction({channel_id: vars.channelId,message_id: vars.messageId,emoji: vars.emoji,@@ -309,7 +307,7 @@ export function useRemoveReactionMutation(mutationFn: async (vars: ReactionParams) => {return await throwOnErr(async () =>- await commsServiceClient.postReaction({+ await storageServiceClient.postReaction({channel_id: vars.channelId,message_id: vars.messageId,emoji: vars.emoji,diff --git a/js/app/packages/queries/channel/reconcile.ts b/js/app/packages/queries/channel/reconcile.tsindex eaa3f533bd..9d9f4b284b 100644--- a/js/app/packages/queries/channel/reconcile.ts+++ b/js/app/packages/queries/channel/reconcile.ts@@ -1,8 +1,11 @@-import type { ApiChannelMessage, ApiThreadReply } from '@service-comms/client';import type {Attachment as ApiAttachment,CountedReaction,} from '@service-comms/generated/models';+import type {+ ApiChannelMessage,+ ApiThreadReply,+} from '@service-storage/client';import type { ApiMessageAttachment } from '@service-storage/generated/schemas/apiMessageAttachment';import { queryClient } from '../client';import {diff --git a/js/app/packages/queries/channel/sync.ts b/js/app/packages/queries/channel/sync.tsindex feef1dc6f1..9d39ca78b7 100644--- a/js/app/packages/queries/channel/sync.ts+++ b/js/app/packages/queries/channel/sync.ts@@ -1,9 +1,9 @@-import type { ApiThreadReply } from '@service-comms/client';import type {Attachment as ApiAttachment,Message as ApiMessage,CountedReaction,} from '@service-comms/generated/models';+import type { ApiThreadReply } from '@service-storage/client';import { consumeNonce } from '../nonce';import { ChannelNonceKeys } from './keys';import {diff --git a/js/app/packages/queries/channel/tests/channel-attachments.test.ts b/js/app/packages/queries/channel/tests/channel-attachments.test.tsindex e9a58e15b3..0b69778c7d 100644--- a/js/app/packages/queries/channel/tests/channel-attachments.test.ts+++ b/js/app/packages/queries/channel/tests/channel-attachments.test.ts@@ -1,4 +1,4 @@-import { commsServiceClient } from '@service-comms/client';+import { storageServiceClient } from '@service-storage/client';import { ok } from 'neverthrow';import { afterEach, describe, expect, it, vi } from 'vitest';import {@@ -7,8 +7,8 @@ import {getChannelAttachmentsQueryKeyPrefix,} from '../channel-attachments';-vi.mock('@service-comms/client', () => ({- commsServiceClient: {+vi.mock('@service-storage/client', () => ({+ storageServiceClient: {getChannelAttachments: vi.fn(),},}));@@ -34,7 +34,7 @@ describe('channel attachment queries', () => {it('passes attachment type, cursor, and abort signal to the service client', async () => {const page = { items: [], next_cursor: null };- vi.mocked(commsServiceClient.getChannelAttachments).mockResolvedValue(+ vi.mocked(storageServiceClient.getChannelAttachments).mockResolvedValue(ok(page));const signal = new AbortController().signal;@@ -46,7 +46,7 @@ describe('channel attachment queries', () => {})).resolves.toBe(page);- expect(commsServiceClient.getChannelAttachments).toHaveBeenCalledWith({+ expect(storageServiceClient.getChannelAttachments).toHaveBeenCalledWith({channel_id: 'channel-1',limit: 100,cursor: 'cursor-1',diff --git a/js/app/packages/queries/channel/tests/channel-messages.test.ts b/js/app/packages/queries/channel/tests/channel-messages.test.tsindex e5424c554b..4fb7729654 100644--- a/js/app/packages/queries/channel/tests/channel-messages.test.ts+++ b/js/app/packages/queries/channel/tests/channel-messages.test.ts@@ -19,8 +19,8 @@ vi.mock('../../client', () => ({},}));-vi.mock('@service-comms/client', () => ({- commsServiceClient: {+vi.mock('@service-storage/client', () => ({+ storageServiceClient: {getChannelMessages: mocks.getChannelMessages,},}));diff --git a/js/app/packages/queries/channel/tests/channel-optimistic.test.ts b/js/app/packages/queries/channel/tests/channel-optimistic.test.tsindex 1fc9b5c7c8..536e141257 100644--- a/js/app/packages/queries/channel/tests/channel-optimistic.test.ts+++ b/js/app/packages/queries/channel/tests/channel-optimistic.test.ts@@ -2,7 +2,10 @@* @vitest-environment jsdom*/-import type { ApiChannelMessage, ApiThreadReply } from '@service-comms/client';+import type {+ ApiChannelMessage,+ ApiThreadReply,+} from '@service-storage/client';import { QueryClient } from '@tanstack/solid-query';import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';@@ -18,8 +21,8 @@ vi.mock('@core/component/Toast/Toast', () => ({toast: { failure: vi.fn(), success: vi.fn() },}));-vi.mock('@service-comms/client', () => ({- commsServiceClient: {},+vi.mock('@service-storage/client', () => ({+ storageServiceClient: {},}));vi.mock('@macro-entity', () => ({diff --git a/js/app/packages/queries/channel/tests/sync.test.ts b/js/app/packages/queries/channel/tests/sync.test.tsindex 1bd542c081..e952d04120 100644--- a/js/app/packages/queries/channel/tests/sync.test.ts+++ b/js/app/packages/queries/channel/tests/sync.test.ts@@ -2,8 +2,11 @@* @vitest-environment jsdom*/-import type { ApiChannelMessage, ApiThreadReply } from '@service-comms/client';import type { Attachment as ApiAttachment } from '@service-comms/generated/models';+import type {+ ApiChannelMessage,+ ApiThreadReply,+} from '@service-storage/client';import { QueryClient } from '@tanstack/solid-query';import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';@@ -15,6 +18,10 @@ vi.mock('../../client', () => ({},}));+vi.mock('@service-storage/client', () => ({+ storageServiceClient: {},+}));+import type { ChannelMessagesData } from '../channel-messages';import { getChannelMessagesQueryKey } from '../channel-messages';import { handleCommsAttachment, handleCommsReaction } from '../sync';diff --git a/js/app/packages/queries/channel/tests/typing.test.ts b/js/app/packages/queries/channel/tests/typing.test.tsindex 10149b70f4..ee57dd9e60 100644--- a/js/app/packages/queries/channel/tests/typing.test.ts+++ b/js/app/packages/queries/channel/tests/typing.test.ts@@ -1,7 +1,7 @@import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';-vi.mock('@service-comms/client', () => ({- commsServiceClient: {+vi.mock('@service-storage/client', () => ({+ storageServiceClient: {postTypingUpdate: vi.fn(),},}));diff --git a/js/app/packages/queries/channel/thread-preview.ts b/js/app/packages/queries/channel/thread-preview.tsindex 9f5b230154..0b4bd2668e 100644--- a/js/app/packages/queries/channel/thread-preview.ts+++ b/js/app/packages/queries/channel/thread-preview.ts@@ -1,4 +1,4 @@-import type { ApiThreadReply } from '@service-comms/client';+import type { ApiThreadReply } from '@service-storage/client';import type { ApiCountedReaction } from '@service-storage/generated/schemas';type ThreadPreviewState = {diff --git a/js/app/packages/queries/channel/thread-replies.ts b/js/app/packages/queries/channel/thread-replies.tsindex cf245b93d8..077eb8de07 100644--- a/js/app/packages/queries/channel/thread-replies.ts+++ b/js/app/packages/queries/channel/thread-replies.ts@@ -1,5 +1,8 @@import { throwOnErr } from '@core/util/result';-import { type ApiThreadReply, commsServiceClient } from '@service-comms/client';+import {+ type ApiThreadReply,+ storageServiceClient,+} from '@service-storage/client';import type { ApiCountedReaction } from '@service-storage/generated/schemas';import type { ApiMessageAttachment } from '@service-storage/generated/schemas/apiMessageAttachment';import { useQuery } from '@tanstack/solid-query';@@ -25,7 +28,7 @@ export function threadRepliesQueryOptions(queryFn: async (): Promise<Array<ApiThreadReply>> => {return await throwOnErr(async () =>- await commsServiceClient.getThreadReplies({+ await storageServiceClient.getThreadReplies({channel_id: channelId,message_id: messageId,})diff --git a/js/app/packages/queries/channel/types.ts b/js/app/packages/queries/channel/types.tsindex 8723321bfd..bbd1f4f1ea 100644--- a/js/app/packages/queries/channel/types.ts+++ b/js/app/packages/queries/channel/types.ts@@ -1,3 +1,5 @@-import type { ChannelParticipant as ApiChannelParticipant } from '@service-comms/generated/models';+import type { ApiChannelParticipant } from '@service-storage/client';-export type ChannelParticipant = ApiChannelParticipant;+export type ChannelParticipant = ApiChannelParticipant & {+ left_at?: string | null;+};diff --git a/js/app/packages/queries/channel/typing.ts b/js/app/packages/queries/channel/typing.tsindex 1564f1692b..e2fef58f5e 100644--- a/js/app/packages/queries/channel/typing.ts+++ b/js/app/packages/queries/channel/typing.ts@@ -1,4 +1,4 @@-import { commsServiceClient } from '@service-comms/client';+import { storageServiceClient } from '@service-storage/client';import { useMutation } from '@tanstack/solid-query';import { createSignal } from 'solid-js';@@ -221,7 +221,7 @@ export function usePostTypingUpdateMutation() {return useMutation(() => ({gcTime: 0,mutationFn: async (vars: PostTypingUpdateVars) => {- await commsServiceClient.postTypingUpdate({+ await storageServiceClient.postTypingUpdate({channel_id: vars.channelId,action: vars.action,thread_id: vars.threadId,diff --git a/js/app/packages/service-clients/service-storage/client.ts b/js/app/packages/service-clients/service-storage/client.tsindex 7d03d43976..5a36fc4a5d 100644--- a/js/app/packages/service-clients/service-storage/client.ts+++ b/js/app/packages/service-clients/service-storage/client.ts@@ -36,12 +36,22 @@ import type {View,ViewsResponse,} from './generated/schemas';+import type { AddParticipantsRequest } from './generated/schemas/addParticipantsRequest';import type { AddPinRequest } from './generated/schemas/addPinRequest';import type { AnchorResponse } from './generated/schemas/anchorResponse';+import type { ApiChannelAttachmentsPage } from './generated/schemas/apiChannelAttachmentsPage';+import type { ApiChannelMessagesPage } from './generated/schemas/apiChannelMessagesPage';+import type { ApiChannelParticipant } from './generated/schemas/apiChannelParticipant';+import type { ApiResolvedChannelMessage } from './generated/schemas/apiResolvedChannelMessage';+import type { ApiThreadReply } from './generated/schemas/apiThreadReply';+import type { ChannelMessageFilters } from './generated/schemas/channelMessageFilters';+import { ChannelType } from './generated/schemas/channelType';import {type CloudStorageItemType,CloudStorageItemType as CloudStorageItemTypeMap,} from './generated/schemas/cloudStorageItemType';+import type { CreateChannelRequest } from './generated/schemas/createChannelRequest';+import type { CreateChannelResponse } from './generated/schemas/createChannelResponse';import type { CreateCommentResponse } from './generated/schemas/createCommentResponse';import type { CreateDocument200 as CreateDocumentResponse } from './generated/schemas/createDocument200';import type { CreateDocumentRequest } from './generated/schemas/createDocumentRequest';@@ -66,13 +76,23 @@ import type { GetDocumentProcessingResultResponse } from './generated/schemas/geimport type { GetDocumentResponseData } from './generated/schemas/getDocumentResponseData';import type { GetDocumentSearchResponse } from './generated/schemas/getDocumentSearchResponse';import type { GetInstructionsDocumentResponse } from './generated/schemas/getInstructionsDocumentResponse';+import type { GetOrCreateChannelResponse } from './generated/schemas/getOrCreateChannelResponse';+import type { GetOrCreateDmRequest } from './generated/schemas/getOrCreateDmRequest';+import type { GetOrCreatePrivateRequest } from './generated/schemas/getOrCreatePrivateRequest';import type { GetPendingProjectsHandler200 } from './generated/schemas/getPendingProjectsHandler200';import type { GetProjectContentResponse } from './generated/schemas/getProjectContentResponse';import type { GetProjectResponse } from './generated/schemas/getProjectResponse';import type { Item } from './generated/schemas/item';import type { LocationResponseV3 } from './generated/schemas/locationResponseV3';+import type { PatchChannelRequest } from './generated/schemas/patchChannelRequest';+import type { PatchMessageRequest } from './generated/schemas/patchMessageRequest';import type { PinRequest } from './generated/schemas/pinRequest';+import type { PostMessageRequest } from './generated/schemas/postMessageRequest';+import type { PostMessageResponse } from './generated/schemas/postMessageResponse';+import type { PostReactionRequest } from './generated/schemas/postReactionRequest';+import type { PostTypingRequest } from './generated/schemas/postTypingRequest';import type { Project } from './generated/schemas/project';+import type { RemoveParticipantsRequest } from './generated/schemas/removeParticipantsRequest';import type { ReorderPinRequest } from './generated/schemas/reorderPinRequest';import type { SaveDocumentResponseData } from './generated/schemas/saveDocumentResponseData';import type { SharePermissionV2 } from './generated/schemas/sharePermissionV2';@@ -136,6 +156,29 @@ export type ItemType =export const DEFAULT_ITEM_TYPE: ItemType = 'document';+export type { ApiChannelAttachment } from './generated/schemas/apiChannelAttachment';+export type { ApiChannelAttachmentsPage as ChannelAttachmentsPage } from './generated/schemas/apiChannelAttachmentsPage';+export type { ApiChannelMessage } from './generated/schemas/apiChannelMessage';+export type { ApiChannelMessagesPage as ChannelMessagesPage } from './generated/schemas/apiChannelMessagesPage';+export type { ApiChannelParticipant } from './generated/schemas/apiChannelParticipant';+export type { ApiThreadReply } from './generated/schemas/apiThreadReply';+export type { GetOrCreateChannelResponse } from './generated/schemas/getOrCreateChannelResponse';++export type IdResponse = { id: string };+export type MessageResponse = { message: string };++type WithChannelId = { channel_id: string };+type WithMessageId = { message_id: string };+export type ChannelAttachmentType = 'static' | 'dss';++export const ChannelTypeEnum = {+ Public: ChannelType.public,+ Organization: ChannelType.organization,+ Private: ChannelType.private,+ DirectMessage: ChannelType.direct_message,+ Team: ChannelType.team,+} as const satisfies Record<string, ChannelType>;+const itemTypeSet = new Set(['document','chat',@@ -295,6 +338,294 @@ export const storageServiceClient = {});},+ async createChannel(args: CreateChannelRequest) {+ return (+ await dssFetch<CreateChannelResponse>(`/channels`, {+ method: 'POST',+ body: JSON.stringify(args),+ })+ ).map((result) => result);+ },++ async getOrCreateDirectMessage(args: GetOrCreateDmRequest) {+ const { recipient_id } = args;+ return (+ await dssFetch<GetOrCreateChannelResponse>(`/channels/get_or_create_dm`, {+ method: 'POST',+ body: JSON.stringify({ recipient_id }),+ })+ ).map((result) => result);+ },++ async getOrCreatePrivateChannel(args: GetOrCreatePrivateRequest) {+ const { recipients } = args;+ return (+ await dssFetch<GetOrCreateChannelResponse>(+ `/channels/get_or_create_private`,+ {+ method: 'POST',+ body: JSON.stringify({ recipients }),+ }+ )+ ).map((result) => result);+ },++ async patchChannel(args: WithChannelId & PatchChannelRequest) {+ const { channel_id, channel_name } = args;+ return (+ await dssFetch<MessageResponse>(`/channels/${channel_id}`, {+ method: 'PATCH',+ body: JSON.stringify({ channel_name }),+ })+ ).map((result) => result);+ },++ async deleteChannel(args: WithChannelId) {+ const { channel_id } = args;+ return (+ await dssFetch<MessageResponse>(`/channels/${channel_id}`, {+ method: 'DELETE',+ })+ ).map((result) => result);+ },++ async postMessage(+ args: WithChannelId & { message: PostMessageRequest; nonce?: string }+ ) {+ const { channel_id, message, nonce } = args;+ const uniqueMentions = Array.from(new Set(message.mentions));+ const sendMessage = { ...message, mentions: uniqueMentions, nonce };+ return (+ await dssFetch<PostMessageResponse>(`/channels/${channel_id}/message`, {+ method: 'POST',+ body: JSON.stringify(sendMessage),+ })+ ).map((result) => result);+ },++ async patchMessage(+ args: PatchMessageRequest &+ WithChannelId &+ WithMessageId & { nonce?: string }+ ) {+ const {+ channel_id,+ content,+ message_id,+ mentions,+ attachment_ids_to_delete,+ attachments_to_add,+ nonce,+ } = args;+ return (+ await dssFetch<MessageResponse>(+ `/channels/${channel_id}/message/${message_id}`,+ {+ method: 'PATCH',+ body: JSON.stringify({+ content,+ mentions,+ attachment_ids_to_delete,+ attachments_to_add,+ nonce,+ }),+ }+ )+ ).map((result) => result);+ },++ async deleteMessage(+ args: WithChannelId & WithMessageId & { nonce?: string }+ ) {+ const { channel_id, message_id, nonce } = args;+ const params = new URLSearchParams();+ if (nonce) params.append('nonce', nonce);+ const query = params.toString();+ return (+ await dssFetch<MessageResponse>(+ `/channels/${channel_id}/message/${message_id}${query ? `?${query}` : ''}`,+ {+ method: 'DELETE',+ }+ )+ ).map((result) => result);+ },++ async postReaction(+ args: PostReactionRequest & WithChannelId & { nonce?: string }+ ) {+ const { channel_id, action, emoji, message_id, nonce } = args;+ return (+ await dssFetch<MessageResponse>(`/channels/${channel_id}/reaction`, {+ method: 'POST',+ body: JSON.stringify({ action, emoji, message_id, nonce }),+ })+ ).map((result) => result);+ },++ async postTypingUpdate(+ args: PostTypingRequest & WithChannelId & { nonce?: string }+ ) {+ const { channel_id, action, thread_id, nonce } = args;+ return (+ await dssFetch<MessageResponse>(`/channels/${channel_id}/typing`, {+ method: 'POST',+ body: JSON.stringify({ action, thread_id, nonce }),+ })+ ).map((result) => result);+ },++ async addParticipantsToChanenl(args: AddParticipantsRequest & WithChannelId) {+ const { channel_id, participants } = args;+ return (+ await dssFetch<MessageResponse>(`/channels/${channel_id}/participants`, {+ method: 'POST',+ body: JSON.stringify({ participants }),+ })+ ).map((result) => result);+ },++ async addParticipantsToChannel(args: AddParticipantsRequest & WithChannelId) {+ const { channel_id, participants } = args;+ return (+ await dssFetch<MessageResponse>(`/channels/${channel_id}/participants`, {+ method: 'POST',+ body: JSON.stringify({ participants }),+ })+ ).map((result) => result);+ },++ async removeParticipantsFromChannel(+ args: RemoveParticipantsRequest & WithChannelId+ ) {+ const { channel_id, participants } = args;+ return (+ await dssFetch<MessageResponse>(`/channels/${channel_id}/participants`, {+ method: 'DELETE',+ body: JSON.stringify({ participants }),+ })+ ).map((result) => result);+ },++ async joinChannel(args: WithChannelId) {+ const { channel_id } = args;+ return (+ await dssFetch<MessageResponse>(`/channels/${channel_id}/join`, {+ method: 'POST',+ })+ ).map((result) => result);+ },++ async leaveChannel(args: WithChannelId) {+ const { channel_id } = args;+ return (+ await dssFetch<MessageResponse>(`/channels/${channel_id}/leave`, {+ method: 'POST',+ })+ ).map((result) => result);+ },++ async getChannelMessages(+ args: WithChannelId & {+ limit: number;+ next_cursor: string | null;+ previous_cursor: string | null;+ load_around_message_id: string | null;+ }+ ) {+ const {+ channel_id,+ limit,+ next_cursor,+ previous_cursor,+ load_around_message_id,+ } = args;+ const params = new URLSearchParams();+ params.append('limit', limit.toString());+ if (load_around_message_id) {+ params.append('load_around_message_id', load_around_message_id);+ } else if (next_cursor) {+ params.append('cursor', next_cursor);+ } else if (previous_cursor) {+ params.append('previous_cursor', previous_cursor);+ }+ return (+ await dssFetch<ApiChannelMessagesPage>(+ `/channels/${channel_id}/messages?${params.toString()}`,+ { method: 'GET' }+ )+ ).map((result) => result);+ },++ async postChannelMessages(+ args: WithChannelId & { filters: ChannelMessageFilters; limit?: number }+ ) {+ const { channel_id, filters, limit } = args;+ const params = new URLSearchParams();+ if (limit !== undefined) params.append('limit', limit.toString());+ const query = params.toString();+ return (+ await dssFetch<ApiChannelMessagesPage>(+ `/channels/${channel_id}/messages${query ? `?${query}` : ''}`,+ {+ method: 'POST',+ body: JSON.stringify(filters),+ }+ )+ ).map((result) => result);+ },++ async getThreadReplies(args: WithChannelId & WithMessageId) {+ const { channel_id, message_id } = args;+ return (+ await dssFetch<Array<ApiThreadReply>>(+ `/channels/${channel_id}/messages/${message_id}/replies`,+ { method: 'GET' }+ )+ ).map((result) => result);+ },++ async resolveChannelMessage(args: WithChannelId & WithMessageId) {+ const { channel_id, message_id } = args;+ return (+ await dssFetch<ApiResolvedChannelMessage>(+ `/channels/${channel_id}/messages/${message_id}/resolve`,+ { method: 'GET' }+ )+ ).map((result) => result);+ },++ async getChannelAttachments(+ args: WithChannelId & {+ limit: number;+ cursor: string | null;+ attachment_type?: ChannelAttachmentType;+ signal?: AbortSignal;+ }+ ) {+ const { channel_id, limit, cursor, attachment_type, signal } = args;+ const params = new URLSearchParams();+ params.append('limit', limit.toString());+ if (cursor) params.append('cursor', cursor);+ if (attachment_type) params.append('attachment_type', attachment_type);+ return (+ await dssFetch<ApiChannelAttachmentsPage>(+ `/channels/${channel_id}/attachments?${params.toString()}`,+ { method: 'GET', signal }+ )+ ).map((result) => result);+ },++ async getChannelParticipants(args: WithChannelId) {+ const { channel_id } = args;+ return (+ await dssFetch<ApiChannelParticipant[]>(+ `/channels/${channel_id}/participants`,+ { method: 'GET' }+ )+ ).map((result) => result);+ },+permissionsTokens: {// Uses SYNC_PERMISSION_TOKEN_DSS_HOST instead of dssFetch so that tokens are// always signed by the DSS whose JWT secret matches the sync service's secret.diff --git a/js/app/packages/service-clients/service-storage/generated/schemas/addParticipantsRequest.ts b/js/app/packages/service-clients/service-storage/generated/schemas/addParticipantsRequest.tsnew file mode 100644index 0000000000..83a1b63204--- /dev/null+++ b/js/app/packages/service-clients/service-storage/generated/schemas/addParticipantsRequest.ts@@ -0,0 +1,14 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */++/**+ * Request to add participants.+ */+export interface AddParticipantsRequest {+ /** User ids to add. */+ participants: string[];+}diff --git a/js/app/packages/service-clients/service-storage/generated/schemas/channelType.ts b/js/app/packages/service-clients/service-storage/generated/schemas/channelType.tsindex d67e2be711..d1c560ce7d 100644--- a/js/app/packages/service-clients/service-storage/generated/schemas/channelType.ts+++ b/js/app/packages/service-clients/service-storage/generated/schemas/channelType.ts@@ -5,6 +5,9 @@* OpenAPI spec version: 0.1.0*/+/**+ * Type of channel.+ */export type ChannelType = (typeof ChannelType)[keyof typeof ChannelType];// eslint-disable-next-line @typescript-eslint/no-redeclarediff --git a/js/app/packages/service-clients/service-storage/generated/schemas/createChannelRequest.ts b/js/app/packages/service-clients/service-storage/generated/schemas/createChannelRequest.tsnew file mode 100644index 0000000000..a8e3c64187--- /dev/null+++ b/js/app/packages/service-clients/service-storage/generated/schemas/createChannelRequest.ts@@ -0,0 +1,23 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */+import type { ChannelType } from './channelType';+import type { CreateChannelRequestName } from './createChannelRequestName';+import type { CreateChannelRequestTeamId } from './createChannelRequestTeamId';++/**+ * Request to create a channel.+ */+export interface CreateChannelRequest {+ /** Channel type. */+ channel_type: ChannelType;+ /** Optional channel name. */+ name?: CreateChannelRequestName;+ /** Participants to add, excluding the owner. */+ participants: string[];+ /** Team id for team channels. */+ team_id?: CreateChannelRequestTeamId;+}diff --git a/js/app/packages/service-clients/service-storage/generated/schemas/createChannelRequestName.ts b/js/app/packages/service-clients/service-storage/generated/schemas/createChannelRequestName.tsnew file mode 100644index 0000000000..e0264489c9--- /dev/null+++ b/js/app/packages/service-clients/service-storage/generated/schemas/createChannelRequestName.ts@@ -0,0 +1,11 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */++/**+ * Optional channel name.+ */+export type CreateChannelRequestName = string | null;diff --git a/js/app/packages/service-clients/service-storage/generated/schemas/createChannelRequestTeamId.ts b/js/app/packages/service-clients/service-storage/generated/schemas/createChannelRequestTeamId.tsnew file mode 100644index 0000000000..6782a6aeb3--- /dev/null+++ b/js/app/packages/service-clients/service-storage/generated/schemas/createChannelRequestTeamId.ts@@ -0,0 +1,11 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */++/**+ * Team id for team channels.+ */+export type CreateChannelRequestTeamId = string | null;diff --git a/js/app/packages/service-clients/service-storage/generated/schemas/createChannelResponse.ts b/js/app/packages/service-clients/service-storage/generated/schemas/createChannelResponse.tsnew file mode 100644index 0000000000..0b060fefa1--- /dev/null+++ b/js/app/packages/service-clients/service-storage/generated/schemas/createChannelResponse.ts@@ -0,0 +1,14 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */++/**+ * Response returned after creating a channel.+ */+export interface CreateChannelResponse {+ /** Created channel id. */+ id: string;+}diff --git a/js/app/packages/service-clients/service-storage/generated/schemas/deleteMessageParams.ts b/js/app/packages/service-clients/service-storage/generated/schemas/deleteMessageParams.tsnew file mode 100644index 0000000000..7685e1deb8--- /dev/null+++ b/js/app/packages/service-clients/service-storage/generated/schemas/deleteMessageParams.ts@@ -0,0 +1,13 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */++export type DeleteMessageParams = {+ /**+ * Optional optimistic-update nonce+ */+ nonce?: string;+};diff --git a/js/app/packages/service-clients/service-storage/generated/schemas/deleteMessageQuery.ts b/js/app/packages/service-clients/service-storage/generated/schemas/deleteMessageQuery.tsnew file mode 100644index 0000000000..3e28593956--- /dev/null+++ b/js/app/packages/service-clients/service-storage/generated/schemas/deleteMessageQuery.ts@@ -0,0 +1,15 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */+import type { DeleteMessageQueryNonce } from './deleteMessageQueryNonce';++/**+ * Query parameters for deleting a message.+ */+export interface DeleteMessageQuery {+ /** Optional optimistic-update nonce. */+ nonce?: DeleteMessageQueryNonce;+}diff --git a/js/app/packages/service-clients/service-storage/generated/schemas/deleteMessageQueryNonce.ts b/js/app/packages/service-clients/service-storage/generated/schemas/deleteMessageQueryNonce.tsnew file mode 100644index 0000000000..3d689794f0--- /dev/null+++ b/js/app/packages/service-clients/service-storage/generated/schemas/deleteMessageQueryNonce.ts@@ -0,0 +1,11 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */++/**+ * Optional optimistic-update nonce.+ */+export type DeleteMessageQueryNonce = string | null;diff --git a/js/app/packages/service-clients/service-storage/generated/schemas/getOrCreateAction.ts b/js/app/packages/service-clients/service-storage/generated/schemas/getOrCreateAction.tsnew file mode 100644index 0000000000..b05208f5a4--- /dev/null+++ b/js/app/packages/service-clients/service-storage/generated/schemas/getOrCreateAction.ts@@ -0,0 +1,18 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */++/**+ * Result of a get-or-create channel operation.+ */+export type GetOrCreateAction =+ (typeof GetOrCreateAction)[keyof typeof GetOrCreateAction];++// eslint-disable-next-line @typescript-eslint/no-redeclare+export const GetOrCreateAction = {+ get: 'get',+ create: 'create',+} as const;diff --git a/js/app/packages/service-clients/service-storage/generated/schemas/getOrCreateChannelResponse.ts b/js/app/packages/service-clients/service-storage/generated/schemas/getOrCreateChannelResponse.tsnew file mode 100644index 0000000000..52f7554570--- /dev/null+++ b/js/app/packages/service-clients/service-storage/generated/schemas/getOrCreateChannelResponse.ts@@ -0,0 +1,17 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */+import type { GetOrCreateAction } from './getOrCreateAction';++/**+ * Response for get-or-create channel operations.+ */+export interface GetOrCreateChannelResponse {+ /** Whether the channel was fetched or created. */+ action: GetOrCreateAction;+ /** Channel id. */+ channel_id: string;+}diff --git a/js/app/packages/service-clients/service-storage/generated/schemas/getOrCreateDmRequest.ts b/js/app/packages/service-clients/service-storage/generated/schemas/getOrCreateDmRequest.tsnew file mode 100644index 0000000000..b777deb903--- /dev/null+++ b/js/app/packages/service-clients/service-storage/generated/schemas/getOrCreateDmRequest.ts@@ -0,0 +1,14 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */++/**+ * Request to get or create a direct message channel.+ */+export interface GetOrCreateDmRequest {+ /** Recipient user id. */+ recipient_id: string;+}diff --git a/js/app/packages/service-clients/service-storage/generated/schemas/getOrCreatePrivateRequest.ts b/js/app/packages/service-clients/service-storage/generated/schemas/getOrCreatePrivateRequest.tsnew file mode 100644index 0000000000..2507d50b0a--- /dev/null+++ b/js/app/packages/service-clients/service-storage/generated/schemas/getOrCreatePrivateRequest.ts@@ -0,0 +1,14 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */++/**+ * Request to get or create a private channel.+ */+export interface GetOrCreatePrivateRequest {+ /** Recipient user ids. */+ recipients: string[];+}diff --git a/js/app/packages/service-clients/service-storage/generated/schemas/index.ts b/js/app/packages/service-clients/service-storage/generated/schemas/index.tsindex 1d36403e5f..cd44ae2c9f 100644--- a/js/app/packages/service-clients/service-storage/generated/schemas/index.ts+++ b/js/app/packages/service-clients/service-storage/generated/schemas/index.ts@@ -9,6 +9,7 @@ export * from './accessLevel';export * from './activity';export * from './activityOneOf';export * from './activityOneOfTwo';+export * from './addParticipantsRequest';export * from './addPinRequest';export * from './anchor';export * from './anchorId';@@ -161,6 +162,10 @@ export * from './createBulkDocumentResponse';export * from './createBulkDocumentResponseData';export * from './createBulkDocumentResponseDataDocumentMetadata';export * from './createBulkDocumentResponseDataPresignedUrl';+export * from './createChannelRequest';+export * from './createChannelRequestName';+export * from './createChannelRequestTeamId';+export * from './createChannelResponse';export * from './createCommentRequest';export * from './createCommentRequestAnchor';export * from './createCommentRequestMentions';@@ -226,6 +231,9 @@ export * from './deleteCommentRequest';export * from './deleteCommentRequestRemoveAnchorThreadOnly';export * from './deleteCommentResponse';export * from './deleteCommentResponseAnchor';+export * from './deleteMessageParams';+export * from './deleteMessageQuery';+export * from './deleteMessageQueryNonce';export * from './deleteProjectHandler200';export * from './deleteProjectHandler200DataOneOf';export * from './deleteThreadInfo';@@ -425,6 +433,10 @@ export * from './getDocumentUserAccessLevelResponse';export * from './getInstructionsDocumentResponse';export * from './getItemsSoupParams';export * from './getLocationHandlerParams';+export * from './getOrCreateAction';+export * from './getOrCreateChannelResponse';+export * from './getOrCreateDmRequest';+export * from './getOrCreatePrivateRequest';export * from './getPendingProjectsHandler200';export * from './getPendingProjectsHandler200DataOneOfItem';export * from './getPendingProjectsHandler200DataOneOfItemAllOf';@@ -468,6 +480,9 @@ export * from './locationResponseV3OneOfThree';export * from './locationResponseV3OneOfThreeType';export * from './locationResponseV3OneOfType';export * from './mentions';+export * from './newChannelAttachment';+export * from './newChannelAttachmentHeight';+export * from './newChannelAttachmentWidth';export * from './notificationFilters';export * from './notificationFiltersDone';export * from './notificationFiltersSeen';@@ -476,6 +491,14 @@ export * from './paramsExpand';export * from './paramsLimit';export * from './paramsSortMethod';export * from './participantRole';+export * from './patchChannelRequest';+export * from './patchChannelRequestChannelName';+export * from './patchMessageRequest';+export * from './patchMessageRequestAttachmentIdsToDelete';+export * from './patchMessageRequestAttachmentsToAdd';+export * from './patchMessageRequestContent';+export * from './patchMessageRequestMentions';+export * from './patchMessageRequestNonce';export * from './patchProjectRequestV2';export * from './patchProjectRequestV2Name';export * from './patchProjectRequestV2ProjectParentId';@@ -522,10 +545,20 @@ export * from './pinRequest';export * from './postChannelMessagesParams';export * from './postItemsSoupAstParams';export * from './postItemsSoupParams';+export * from './postMessageRequest';+export * from './postMessageRequestNonce';+export * from './postMessageRequestThreadId';+export * from './postMessageResponse';+export * from './postMessageResponseNonce';+export * from './postReactionRequest';+export * from './postReactionRequestNonce';export * from './postSoupAstRequest';export * from './postSoupAstRequestAllOf';export * from './postSoupRequest';export * from './postSoupRequestAllOf';+export * from './postTypingRequest';+export * from './postTypingRequestNonce';+export * from './postTypingRequestThreadId';export * from './preSaveDocumentRequest';export * from './preSaveDocumentResponse';export * from './preSaveDocumentResponseData';@@ -581,7 +614,9 @@ export * from './propertyValueOneOfSevenType';export * from './propertyValueOneOfThree';export * from './propertyValueOneOfThreeType';export * from './propertyValueOneOfType';+export * from './reactionAction';export * from './recentlyDeletedResponseData';+export * from './removeParticipantsRequest';export * from './reorderPinRequest';export * from './s3ObjectInfo';export * from './saveBomPart';@@ -620,6 +655,7 @@ export * from './sharePermissionV2';export * from './sharePermissionV2ChannelSharePermissions';export * from './sharePermissionV2PublicAccessLevel';export * from './shortIdResponse';+export * from './simpleMention';export * from './soupApiItem';export * from './soupApiItemAllOf';export * from './soupApiSort';@@ -715,6 +751,7 @@ export * from './transcriptSegmentRequestEndedAt';export * from './transcriptSegmentRequestStreamStartedAt';export * from './typedSuccessResponse';export * from './typedSuccessResponseDataOneOf';+export * from './typingAction';export * from './unthreadedPdfUuidRequest';export * from './unthreadedPdfUuidRequestOneOf';export * from './unthreadedPdfUuidRequestOneOfAttachmentType';diff --git a/js/app/packages/service-clients/service-storage/generated/schemas/newChannelAttachment.ts b/js/app/packages/service-clients/service-storage/generated/schemas/newChannelAttachment.tsnew file mode 100644index 0000000000..f5bb66b2f0--- /dev/null+++ b/js/app/packages/service-clients/service-storage/generated/schemas/newChannelAttachment.ts@@ -0,0 +1,22 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */+import type { NewChannelAttachmentHeight } from './newChannelAttachmentHeight';+import type { NewChannelAttachmentWidth } from './newChannelAttachmentWidth';++/**+ * New attachment to add to a channel message.+ */+export interface NewChannelAttachment {+ /** Attachment entity id. */+ entity_id: string;+ /** Attachment entity type. */+ entity_type: string;+ /** Optional rendered height. */+ height?: NewChannelAttachmentHeight;+ /** Optional rendered width. */+ width?: NewChannelAttachmentWidth;+}diff --git a/js/app/packages/service-clients/service-storage/generated/schemas/newChannelAttachmentHeight.ts b/js/app/packages/service-clients/service-storage/generated/schemas/newChannelAttachmentHeight.tsnew file mode 100644index 0000000000..3b03f14548--- /dev/null+++ b/js/app/packages/service-clients/service-storage/generated/schemas/newChannelAttachmentHeight.ts@@ -0,0 +1,11 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */++/**+ * Optional rendered height.+ */+export type NewChannelAttachmentHeight = number | null;diff --git a/js/app/packages/service-clients/service-storage/generated/schemas/newChannelAttachmentWidth.ts b/js/app/packages/service-clients/service-storage/generated/schemas/newChannelAttachmentWidth.tsnew file mode 100644index 0000000000..b21b06ff55--- /dev/null+++ b/js/app/packages/service-clients/service-storage/generated/schemas/newChannelAttachmentWidth.ts@@ -0,0 +1,11 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */++/**+ * Optional rendered width.+ */+export type NewChannelAttachmentWidth = number | null;diff --git a/js/app/packages/service-clients/service-storage/generated/schemas/patchChannelRequest.ts b/js/app/packages/service-clients/service-storage/generated/schemas/patchChannelRequest.tsnew file mode 100644index 0000000000..5b1d132e6e--- /dev/null+++ b/js/app/packages/service-clients/service-storage/generated/schemas/patchChannelRequest.ts@@ -0,0 +1,15 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */+import type { PatchChannelRequestChannelName } from './patchChannelRequestChannelName';++/**+ * Request to patch a channel.+ */+export interface PatchChannelRequest {+ /** New channel name. */+ channel_name?: PatchChannelRequestChannelName;+}diff --git a/js/app/packages/service-clients/service-storage/generated/schemas/patchChannelRequestChannelName.ts b/js/app/packages/service-clients/service-storage/generated/schemas/patchChannelRequestChannelName.tsnew file mode 100644index 0000000000..dc10d8e6be--- /dev/null+++ b/js/app/packages/service-clients/service-storage/generated/schemas/patchChannelRequestChannelName.ts@@ -0,0 +1,11 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */++/**+ * New channel name.+ */+export type PatchChannelRequestChannelName = string | null;diff --git a/js/app/packages/service-clients/service-storage/generated/schemas/patchMessageRequest.ts b/js/app/packages/service-clients/service-storage/generated/schemas/patchMessageRequest.tsnew file mode 100644index 0000000000..54c999d677--- /dev/null+++ b/js/app/packages/service-clients/service-storage/generated/schemas/patchMessageRequest.ts@@ -0,0 +1,27 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */+import type { PatchMessageRequestAttachmentIdsToDelete } from './patchMessageRequestAttachmentIdsToDelete';+import type { PatchMessageRequestAttachmentsToAdd } from './patchMessageRequestAttachmentsToAdd';+import type { PatchMessageRequestContent } from './patchMessageRequestContent';+import type { PatchMessageRequestMentions } from './patchMessageRequestMentions';+import type { PatchMessageRequestNonce } from './patchMessageRequestNonce';++/**+ * Request to patch a channel message.+ */+export interface PatchMessageRequest {+ /** Attachment ids to remove. */+ attachment_ids_to_delete?: PatchMessageRequestAttachmentIdsToDelete;+ /** Attachments to add. */+ attachments_to_add?: PatchMessageRequestAttachmentsToAdd;+ /** Optional replacement message body. */+ content?: PatchMessageRequestContent;+ /** Optional replacement mentions. */+ mentions?: PatchMessageRequestMentions;+ /** Optional optimistic-update nonce. */+ nonce?: PatchMessageRequestNonce;+}diff --git a/js/app/packages/service-clients/service-storage/generated/schemas/patchMessageRequestAttachmentIdsToDelete.ts b/js/app/packages/service-clients/service-storage/generated/schemas/patchMessageRequestAttachmentIdsToDelete.tsnew file mode 100644index 0000000000..53ccb03a5a--- /dev/null+++ b/js/app/packages/service-clients/service-storage/generated/schemas/patchMessageRequestAttachmentIdsToDelete.ts@@ -0,0 +1,11 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */++/**+ * Attachment ids to remove.+ */+export type PatchMessageRequestAttachmentIdsToDelete = string[] | null;diff --git a/js/app/packages/service-clients/service-storage/generated/schemas/patchMessageRequestAttachmentsToAdd.ts b/js/app/packages/service-clients/service-storage/generated/schemas/patchMessageRequestAttachmentsToAdd.tsnew file mode 100644index 0000000000..9ff0f4c8e8--- /dev/null+++ b/js/app/packages/service-clients/service-storage/generated/schemas/patchMessageRequestAttachmentsToAdd.ts@@ -0,0 +1,12 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */+import type { NewChannelAttachment } from './newChannelAttachment';++/**+ * Attachments to add.+ */+export type PatchMessageRequestAttachmentsToAdd = NewChannelAttachment[] | null;diff --git a/js/app/packages/service-clients/service-storage/generated/schemas/patchMessageRequestContent.ts b/js/app/packages/service-clients/service-storage/generated/schemas/patchMessageRequestContent.tsnew file mode 100644index 0000000000..9c597a9afb--- /dev/null+++ b/js/app/packages/service-clients/service-storage/generated/schemas/patchMessageRequestContent.ts@@ -0,0 +1,11 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */++/**+ * Optional replacement message body.+ */+export type PatchMessageRequestContent = string | null;diff --git a/js/app/packages/service-clients/service-storage/generated/schemas/patchMessageRequestMentions.ts b/js/app/packages/service-clients/service-storage/generated/schemas/patchMessageRequestMentions.tsnew file mode 100644index 0000000000..25a4e56855--- /dev/null+++ b/js/app/packages/service-clients/service-storage/generated/schemas/patchMessageRequestMentions.ts@@ -0,0 +1,12 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */+import type { SimpleMention } from './simpleMention';++/**+ * Optional replacement mentions.+ */+export type PatchMessageRequestMentions = SimpleMention[] | null;diff --git a/js/app/packages/service-clients/service-storage/generated/schemas/patchMessageRequestNonce.ts b/js/app/packages/service-clients/service-storage/generated/schemas/patchMessageRequestNonce.tsnew file mode 100644index 0000000000..fd9b7577c2--- /dev/null+++ b/js/app/packages/service-clients/service-storage/generated/schemas/patchMessageRequestNonce.ts@@ -0,0 +1,11 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */++/**+ * Optional optimistic-update nonce.+ */+export type PatchMessageRequestNonce = string | null;diff --git a/js/app/packages/service-clients/service-storage/generated/schemas/postMessageRequest.ts b/js/app/packages/service-clients/service-storage/generated/schemas/postMessageRequest.tsnew file mode 100644index 0000000000..72e79796f0--- /dev/null+++ b/js/app/packages/service-clients/service-storage/generated/schemas/postMessageRequest.ts@@ -0,0 +1,26 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */+import type { NewChannelAttachment } from './newChannelAttachment';+import type { PostMessageRequestNonce } from './postMessageRequestNonce';+import type { PostMessageRequestThreadId } from './postMessageRequestThreadId';+import type { SimpleMention } from './simpleMention';++/**+ * Request to send a channel message.+ */+export interface PostMessageRequest {+ /** Attachments to add after message creation. */+ attachments: NewChannelAttachment[];+ /** Message body. */+ content: string;+ /** Message mentions. */+ mentions: SimpleMention[];+ /** Optional optimistic-update nonce. */+ nonce?: PostMessageRequestNonce;+ /** Optional thread parent id. */+ thread_id?: PostMessageRequestThreadId;+}diff --git a/js/app/packages/service-clients/service-storage/generated/schemas/postMessageRequestNonce.ts b/js/app/packages/service-clients/service-storage/generated/schemas/postMessageRequestNonce.tsnew file mode 100644index 0000000000..c1202ed854--- /dev/null+++ b/js/app/packages/service-clients/service-storage/generated/schemas/postMessageRequestNonce.ts@@ -0,0 +1,11 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */++/**+ * Optional optimistic-update nonce.+ */+export type PostMessageRequestNonce = string | null;diff --git a/js/app/packages/service-clients/service-storage/generated/schemas/postMessageRequestThreadId.ts b/js/app/packages/service-clients/service-storage/generated/schemas/postMessageRequestThreadId.tsnew file mode 100644index 0000000000..c366c6790e--- /dev/null+++ b/js/app/packages/service-clients/service-storage/generated/schemas/postMessageRequestThreadId.ts@@ -0,0 +1,11 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */++/**+ * Optional thread parent id.+ */+export type PostMessageRequestThreadId = string | null;diff --git a/js/app/packages/service-clients/service-storage/generated/schemas/postMessageResponse.ts b/js/app/packages/service-clients/service-storage/generated/schemas/postMessageResponse.tsnew file mode 100644index 0000000000..5598bc027b--- /dev/null+++ b/js/app/packages/service-clients/service-storage/generated/schemas/postMessageResponse.ts@@ -0,0 +1,17 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */+import type { PostMessageResponseNonce } from './postMessageResponseNonce';++/**+ * Response returned after sending a message.+ */+export interface PostMessageResponse {+ /** Created message id. */+ id: string;+ /** Optional optimistic-update nonce. */+ nonce?: PostMessageResponseNonce;+}diff --git a/js/app/packages/service-clients/service-storage/generated/schemas/postMessageResponseNonce.ts b/js/app/packages/service-clients/service-storage/generated/schemas/postMessageResponseNonce.tsnew file mode 100644index 0000000000..f4c2e6f813--- /dev/null+++ b/js/app/packages/service-clients/service-storage/generated/schemas/postMessageResponseNonce.ts@@ -0,0 +1,11 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */++/**+ * Optional optimistic-update nonce.+ */+export type PostMessageResponseNonce = string | null;diff --git a/js/app/packages/service-clients/service-storage/generated/schemas/postReactionRequest.ts b/js/app/packages/service-clients/service-storage/generated/schemas/postReactionRequest.tsnew file mode 100644index 0000000000..e4c1098b97--- /dev/null+++ b/js/app/packages/service-clients/service-storage/generated/schemas/postReactionRequest.ts@@ -0,0 +1,23 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */++import type { PostReactionRequestNonce } from './postReactionRequestNonce';+import type { ReactionAction } from './reactionAction';++/**+ * Request to mutate a reaction.+ */+export interface PostReactionRequest {+ /** Reaction action. */+ action: ReactionAction;+ /** Reaction emoji. */+ emoji: string;+ /** Message id to react to. */+ message_id: string;+ /** Optional optimistic-update nonce. */+ nonce?: PostReactionRequestNonce;+}diff --git a/js/app/packages/service-clients/service-storage/generated/schemas/postReactionRequestNonce.ts b/js/app/packages/service-clients/service-storage/generated/schemas/postReactionRequestNonce.tsnew file mode 100644index 0000000000..e30f226c81--- /dev/null+++ b/js/app/packages/service-clients/service-storage/generated/schemas/postReactionRequestNonce.ts@@ -0,0 +1,11 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */++/**+ * Optional optimistic-update nonce.+ */+export type PostReactionRequestNonce = string | null;diff --git a/js/app/packages/service-clients/service-storage/generated/schemas/postTypingRequest.ts b/js/app/packages/service-clients/service-storage/generated/schemas/postTypingRequest.tsnew file mode 100644index 0000000000..ace6d416dc--- /dev/null+++ b/js/app/packages/service-clients/service-storage/generated/schemas/postTypingRequest.ts@@ -0,0 +1,22 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */++import type { PostTypingRequestNonce } from './postTypingRequestNonce';+import type { PostTypingRequestThreadId } from './postTypingRequestThreadId';+import type { TypingAction } from './typingAction';++/**+ * Request to emit a typing event.+ */+export interface PostTypingRequest {+ /** Typing action. */+ action: TypingAction;+ /** Optional optimistic-update nonce. */+ nonce?: PostTypingRequestNonce;+ /** Optional thread id. */+ thread_id?: PostTypingRequestThreadId;+}diff --git a/js/app/packages/service-clients/service-storage/generated/schemas/postTypingRequestNonce.ts b/js/app/packages/service-clients/service-storage/generated/schemas/postTypingRequestNonce.tsnew file mode 100644index 0000000000..065e85b13c--- /dev/null+++ b/js/app/packages/service-clients/service-storage/generated/schemas/postTypingRequestNonce.ts@@ -0,0 +1,11 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */++/**+ * Optional optimistic-update nonce.+ */+export type PostTypingRequestNonce = string | null;diff --git a/js/app/packages/service-clients/service-storage/generated/schemas/postTypingRequestThreadId.ts b/js/app/packages/service-clients/service-storage/generated/schemas/postTypingRequestThreadId.tsnew file mode 100644index 0000000000..6cd91df6f7--- /dev/null+++ b/js/app/packages/service-clients/service-storage/generated/schemas/postTypingRequestThreadId.ts@@ -0,0 +1,11 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */++/**+ * Optional thread id.+ */+export type PostTypingRequestThreadId = string | null;diff --git a/js/app/packages/service-clients/service-storage/generated/schemas/reactionAction.ts b/js/app/packages/service-clients/service-storage/generated/schemas/reactionAction.tsnew file mode 100644index 0000000000..ae6a9c5291--- /dev/null+++ b/js/app/packages/service-clients/service-storage/generated/schemas/reactionAction.ts@@ -0,0 +1,18 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */++/**+ * Reaction mutation action.+ */+export type ReactionAction =+ (typeof ReactionAction)[keyof typeof ReactionAction];++// eslint-disable-next-line @typescript-eslint/no-redeclare+export const ReactionAction = {+ Add: 'Add',+ Remove: 'Remove',+} as const;diff --git a/js/app/packages/service-clients/service-storage/generated/schemas/removeParticipantsRequest.ts b/js/app/packages/service-clients/service-storage/generated/schemas/removeParticipantsRequest.tsnew file mode 100644index 0000000000..2eba2a7918--- /dev/null+++ b/js/app/packages/service-clients/service-storage/generated/schemas/removeParticipantsRequest.ts@@ -0,0 +1,14 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */++/**+ * Request to remove participants.+ */+export interface RemoveParticipantsRequest {+ /** User ids to remove. */+ participants: string[];+}diff --git a/js/app/packages/service-clients/service-storage/generated/schemas/simpleMention.ts b/js/app/packages/service-clients/service-storage/generated/schemas/simpleMention.tsnew file mode 100644index 0000000000..1693d2588f--- /dev/null+++ b/js/app/packages/service-clients/service-storage/generated/schemas/simpleMention.ts@@ -0,0 +1,16 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */++/**+ * Simple entity mention attached to a message.+ */+export interface SimpleMention {+ /** Mentioned entity id. */+ entity_id: string;+ /** Mentioned entity type. */+ entity_type: string;+}diff --git a/js/app/packages/service-clients/service-storage/generated/schemas/typingAction.ts b/js/app/packages/service-clients/service-storage/generated/schemas/typingAction.tsnew file mode 100644index 0000000000..98a15f257d--- /dev/null+++ b/js/app/packages/service-clients/service-storage/generated/schemas/typingAction.ts@@ -0,0 +1,17 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */++/**+ * Typing indicator action.+ */+export type TypingAction = (typeof TypingAction)[keyof typeof TypingAction];++// eslint-disable-next-line @typescript-eslint/no-redeclare+export const TypingAction = {+ start: 'start',+ stop: 'stop',+} as const;diff --git a/js/app/packages/service-clients/service-storage/generated/zod.ts b/js/app/packages/service-clients/service-storage/generated/zod.tsindex 8a43770885..1674325ac3 100644--- a/js/app/packages/service-clients/service-storage/generated/zod.ts+++ b/js/app/packages/service-clients/service-storage/generated/zod.ts@@ -1244,6 +1244,84 @@ export const ingestTranscriptBody = zod}).describe('A transcript segment from LiveKit Inference STT.');+/**+ * @summary Handler for `POST /channels`.+ */+export const createChannelBody = zod+ .object({+ channel_type: zod+ .enum(['public', 'organization', 'private', 'direct_message', 'team'])+ .describe('Type of channel.'),+ name: zod.string().nullish().describe('Optional channel name.'),+ participants: zod+ .array(zod.string())+ .describe('Participants to add, excluding the owner.'),+ team_id: zod.uuid().nullish().describe('Team id for team channels.'),+ })+ .describe('Request to create a channel.');++export const createChannelResponse = zod+ .object({+ id: zod.string().describe('Created channel id.'),+ })+ .describe('Response returned after creating a channel.');++/**+ * @summary Handler for `POST /channels/get_or_create_dm`.+ */+export const getOrCreateDmBody = zod+ .object({+ recipient_id: zod.string().describe('Recipient user id.'),+ })+ .describe('Request to get or create a direct message channel.');++export const getOrCreateDmResponse = zod+ .object({+ action: zod+ .enum(['get', 'create'])+ .describe('Result of a get-or-create channel operation.'),+ channel_id: zod.string().describe('Channel id.'),+ })+ .describe('Response for get-or-create channel operations.');++/**+ * @summary Handler for `POST /channels/get_or_create_private`.+ */+export const getOrCreatePrivateBody = zod+ .object({+ recipients: zod.array(zod.string()).describe('Recipient user ids.'),+ })+ .describe('Request to get or create a private channel.');++export const getOrCreatePrivateResponse = zod+ .object({+ action: zod+ .enum(['get', 'create'])+ .describe('Result of a get-or-create channel operation.'),+ channel_id: zod.string().describe('Channel id.'),+ })+ .describe('Response for get-or-create channel operations.');++/**+ * @summary Handler for `DELETE /channels/{channel_id}`.+ */+export const deleteChannelParams = zod.object({+ channel_id: zod.uuid().describe('Channel ID'),+});++/**+ * @summary Handler for `PATCH /channels/{channel_id}`.+ */+export const patchChannelParams = zod.object({+ channel_id: zod.uuid().describe('Channel ID'),+});++export const patchChannelBody = zod+ .object({+ channel_name: zod.string().nullish().describe('New channel name.'),+ })+ .describe('Request to patch a channel.');+/*** @summary Handler for `GET /channels/{channel_id}/attachments`.*/@@ -1302,6 +1380,128 @@ export const getChannelAttachmentsResponse = zod}).describe('Paginated response of channel attachments.');+/**+ * @summary Handler for `POST /channels/{channel_id}/join`.+ */+export const joinChannelParams = zod.object({+ channel_id: zod.uuid().describe('Channel ID'),+});++/**+ * @summary Handler for `POST /channels/{channel_id}/leave`.+ */+export const leaveChannelParams = zod.object({+ channel_id: zod.uuid().describe('Channel ID'),+});++/**+ * @summary Handler for `POST /channels/{channel_id}/message`.+ */+export const postMessageParams = zod.object({+ channel_id: zod.uuid().describe('Channel ID'),+});++export const postMessageBody = zod+ .object({+ attachments: zod+ .array(+ zod+ .object({+ entity_id: zod.string().describe('Attachment entity id.'),+ entity_type: zod.string().describe('Attachment entity type.'),+ height: zod+ .number()+ .nullish()+ .describe('Optional rendered height.'),+ width: zod.number().nullish().describe('Optional rendered width.'),+ })+ .describe('New attachment to add to a channel message.')+ )+ .describe('Attachments to add after message creation.'),+ content: zod.string().describe('Message body.'),+ mentions: zod+ .array(+ zod+ .object({+ entity_id: zod.string().describe('Mentioned entity id.'),+ entity_type: zod.string().describe('Mentioned entity type.'),+ })+ .describe('Simple entity mention attached to a message.')+ )+ .describe('Message mentions.'),+ nonce: zod.string().nullish().describe('Optional optimistic-update nonce.'),+ thread_id: zod.uuid().nullish().describe('Optional thread parent id.'),+ })+ .describe('Request to send a channel message.');++export const postMessageResponse = zod+ .object({+ id: zod.string().describe('Created message id.'),+ nonce: zod.string().nullish().describe('Optional optimistic-update nonce.'),+ })+ .describe('Response returned after sending a message.');++/**+ * @summary Handler for `DELETE /channels/{channel_id}/message/{message_id}`.+ */+export const deleteMessageParams = zod.object({+ channel_id: zod.uuid().describe('Channel ID'),+ message_id: zod.uuid().describe('Message ID'),+});++export const deleteMessageQueryParams = zod.object({+ nonce: zod.string().optional().describe('Optional optimistic-update nonce'),+});++/**+ * @summary Handler for `PATCH /channels/{channel_id}/message/{message_id}`.+ */+export const patchMessageParams = zod.object({+ channel_id: zod.uuid().describe('Channel ID'),+ message_id: zod.uuid().describe('Message ID'),+});++export const patchMessageBody = zod+ .object({+ attachment_ids_to_delete: zod+ .array(zod.string())+ .nullish()+ .describe('Attachment ids to remove.'),+ attachments_to_add: zod+ .array(+ zod+ .object({+ entity_id: zod.string().describe('Attachment entity id.'),+ entity_type: zod.string().describe('Attachment entity type.'),+ height: zod+ .number()+ .nullish()+ .describe('Optional rendered height.'),+ width: zod.number().nullish().describe('Optional rendered width.'),+ })+ .describe('New attachment to add to a channel message.')+ )+ .nullish()+ .describe('Attachments to add.'),+ content: zod+ .string()+ .nullish()+ .describe('Optional replacement message body.'),+ mentions: zod+ .array(+ zod+ .object({+ entity_id: zod.string().describe('Mentioned entity id.'),+ entity_type: zod.string().describe('Mentioned entity type.'),+ })+ .describe('Simple entity mention attached to a message.')+ )+ .nullish()+ .describe('Optional replacement mentions.'),+ nonce: zod.string().nullish().describe('Optional optimistic-update nonce.'),+ })+ .describe('Request to patch a channel message.');+/*** @summary Handler for `GET /channels/{channel_id}/messages`.*/@@ -1796,6 +1996,63 @@ export const getChannelParticipantsResponse = zod.array(getChannelParticipantsResponseItem);+/**+ * @summary Handler for `POST /channels/{channel_id}/participants`.+ */+export const addParticipantsParams = zod.object({+ channel_id: zod.uuid().describe('Channel ID'),+});++export const addParticipantsBody = zod+ .object({+ participants: zod.array(zod.string()).describe('User ids to add.'),+ })+ .describe('Request to add participants.');++/**+ * @summary Handler for `DELETE /channels/{channel_id}/participants`.+ */+export const removeParticipantsParams = zod.object({+ channel_id: zod.uuid().describe('Channel ID'),+});++export const removeParticipantsBody = zod+ .object({+ participants: zod.array(zod.string()).describe('User ids to remove.'),+ })+ .describe('Request to remove participants.');++/**+ * @summary Handler for `POST /channels/{channel_id}/reaction`.+ */+export const postReactionParams = zod.object({+ channel_id: zod.uuid().describe('Channel ID'),+});++export const postReactionBody = zod+ .object({+ action: zod.enum(['Add', 'Remove']).describe('Reaction mutation action.'),+ emoji: zod.string().describe('Reaction emoji.'),+ message_id: zod.string().describe('Message id to react to.'),+ nonce: zod.string().nullish().describe('Optional optimistic-update nonce.'),+ })+ .describe('Request to mutate a reaction.');++/**+ * @summary Handler for `POST /channels/{channel_id}/typing`.+ */+export const postTypingParams = zod.object({+ channel_id: zod.uuid().describe('Channel ID'),+});++export const postTypingBody = zod+ .object({+ action: zod.enum(['start', 'stop']).describe('Typing indicator action.'),+ nonce: zod.string().nullish().describe('Optional optimistic-update nonce.'),+ thread_id: zod.string().nullish().describe('Optional thread id.'),+ })+ .describe('Request to emit a typing event.');+/*** @summary Toggle `email_sync` on a CRM company. `false` disables CRM emailsharing for the company and permanently removes its existing CRM@@ -5579,13 +5836,15 @@ export const getItemsSoupResponse = zod.object({data: zod.object({channel: zod.object({- channel_type: zod.enum([- 'public',- 'organization',- 'private',- 'direct_message',- 'team',- ]),+ channel_type: zod+ .enum([+ 'public',+ 'organization',+ 'private',+ 'direct_message',+ 'team',+ ])+ .describe('Type of channel.'),created_at: zod.iso.datetime({}),id: zod.uuid(),name: zod.string().nullish(),@@ -7280,13 +7539,15 @@ export const postItemsSoupResponse = zod.object({data: zod.object({channel: zod.object({- channel_type: zod.enum([- 'public',- 'organization',- 'private',- 'direct_message',- 'team',- ]),+ channel_type: zod+ .enum([+ 'public',+ 'organization',+ 'private',+ 'direct_message',+ 'team',+ ])+ .describe('Type of channel.'),created_at: zod.iso.datetime({}),id: zod.uuid(),name: zod.string().nullish(),@@ -8612,13 +8873,15 @@ export const postItemsSoupAstResponse = zod.object({data: zod.object({channel: zod.object({- channel_type: zod.enum([- 'public',- 'organization',- 'private',- 'direct_message',- 'team',- ]),+ channel_type: zod+ .enum([+ 'public',+ 'organization',+ 'private',+ 'direct_message',+ 'team',+ ])+ .describe('Type of channel.'),created_at: zod.iso.datetime({}),id: zod.uuid(),name: zod.string().nullish(),diff --git a/js/app/packages/service-clients/service-storage/openapi.json b/js/app/packages/service-clients/service-storage/openapi.jsonindex a8e6b02b16..1f3653f406 100644--- a/js/app/packages/service-clients/service-storage/openapi.json+++ b/js/app/packages/service-clients/service-storage/openapi.json@@ -1226,11 +1226,906 @@}}},+ "/channels": {+ "post": {+ "tags": ["channels"],+ "summary": "Handler for `POST /channels`.",+ "operationId": "create_channel",+ "requestBody": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/CreateChannelRequest"+ }+ }+ },+ "required": true+ },+ "responses": {+ "200": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/CreateChannelResponse"+ }+ }+ }+ },+ "400": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "401": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "404": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "500": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ }+ }+ }+ },+ "/channels/get_or_create_dm": {+ "post": {+ "tags": ["channels"],+ "summary": "Handler for `POST /channels/get_or_create_dm`.",+ "operationId": "get_or_create_dm",+ "requestBody": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/GetOrCreateDmRequest"+ }+ }+ },+ "required": true+ },+ "responses": {+ "200": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/GetOrCreateChannelResponse"+ }+ }+ }+ },+ "400": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "401": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "404": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "500": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ }+ }+ }+ },+ "/channels/get_or_create_private": {+ "post": {+ "tags": ["channels"],+ "summary": "Handler for `POST /channels/get_or_create_private`.",+ "operationId": "get_or_create_private",+ "requestBody": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/GetOrCreatePrivateRequest"+ }+ }+ },+ "required": true+ },+ "responses": {+ "200": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/GetOrCreateChannelResponse"+ }+ }+ }+ },+ "400": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "401": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "404": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "500": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ }+ }+ }+ },+ "/channels/{channel_id}": {+ "delete": {+ "tags": ["channels"],+ "summary": "Handler for `DELETE /channels/{channel_id}`.",+ "operationId": "delete_channel",+ "parameters": [+ {+ "name": "channel_id",+ "in": "path",+ "description": "Channel ID",+ "required": true,+ "schema": {+ "type": "string",+ "format": "uuid"+ }+ }+ ],+ "responses": {+ "200": {+ "description": "",+ "content": {+ "text/plain": {+ "schema": {+ "type": "string"+ }+ }+ }+ },+ "400": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "401": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "403": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "404": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "500": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ }+ }+ },+ "patch": {+ "tags": ["channels"],+ "summary": "Handler for `PATCH /channels/{channel_id}`.",+ "operationId": "patch_channel",+ "parameters": [+ {+ "name": "channel_id",+ "in": "path",+ "description": "Channel ID",+ "required": true,+ "schema": {+ "type": "string",+ "format": "uuid"+ }+ }+ ],+ "requestBody": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/PatchChannelRequest"+ }+ }+ },+ "required": true+ },+ "responses": {+ "200": {+ "description": "",+ "content": {+ "text/plain": {+ "schema": {+ "type": "string"+ }+ }+ }+ },+ "400": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "401": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "403": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "404": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "500": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ }+ }+ }+ },"/channels/{channel_id}/attachments": {"get": {"tags": ["channels::inbound::axum_router"],- "summary": "Handler for `GET /channels/{channel_id}/attachments`.",- "operationId": "get_channel_attachments",+ "summary": "Handler for `GET /channels/{channel_id}/attachments`.",+ "operationId": "get_channel_attachments",+ "parameters": [+ {+ "name": "channel_id",+ "in": "path",+ "description": "Channel ID",+ "required": true,+ "schema": {+ "type": "string",+ "format": "uuid"+ }+ },+ {+ "name": "limit",+ "in": "query",+ "description": "Page size (1-500, default 50)",+ "required": false,+ "schema": {+ "type": "integer",+ "format": "int32",+ "minimum": 0+ }+ },+ {+ "name": "cursor",+ "in": "query",+ "description": "Base64 encoded cursor value",+ "required": false,+ "schema": {+ "type": "string"+ }+ },+ {+ "name": "attachment_type",+ "in": "query",+ "description": "Filter by type: 'static' for images/videos, 'dss' for documents",+ "required": false,+ "schema": {+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ApiChannelAttachmentsPage"+ }+ }+ }+ },+ "401": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "404": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "500": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ }+ }+ }+ },+ "/channels/{channel_id}/join": {+ "post": {+ "tags": ["channels"],+ "summary": "Handler for `POST /channels/{channel_id}/join`.",+ "operationId": "join_channel",+ "parameters": [+ {+ "name": "channel_id",+ "in": "path",+ "description": "Channel ID",+ "required": true,+ "schema": {+ "type": "string",+ "format": "uuid"+ }+ }+ ],+ "responses": {+ "200": {+ "description": ""+ },+ "400": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "401": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "404": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "500": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ }+ }+ }+ },+ "/channels/{channel_id}/leave": {+ "post": {+ "tags": ["channels"],+ "summary": "Handler for `POST /channels/{channel_id}/leave`.",+ "operationId": "leave_channel",+ "parameters": [+ {+ "name": "channel_id",+ "in": "path",+ "description": "Channel ID",+ "required": true,+ "schema": {+ "type": "string",+ "format": "uuid"+ }+ }+ ],+ "responses": {+ "200": {+ "description": ""+ },+ "400": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "401": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "403": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "404": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "500": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ }+ }+ }+ },+ "/channels/{channel_id}/message": {+ "post": {+ "tags": ["channels"],+ "summary": "Handler for `POST /channels/{channel_id}/message`.",+ "operationId": "post_message",+ "parameters": [+ {+ "name": "channel_id",+ "in": "path",+ "description": "Channel ID",+ "required": true,+ "schema": {+ "type": "string",+ "format": "uuid"+ }+ }+ ],+ "requestBody": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/PostMessageRequest"+ }+ }+ },+ "required": true+ },+ "responses": {+ "200": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/PostMessageResponse"+ }+ }+ }+ },+ "400": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "401": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "403": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "404": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "500": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ }+ }+ }+ },+ "/channels/{channel_id}/message/{message_id}": {+ "delete": {+ "tags": ["channels"],+ "summary": "Handler for `DELETE /channels/{channel_id}/message/{message_id}`.",+ "operationId": "delete_message",+ "parameters": [+ {+ "name": "channel_id",+ "in": "path",+ "description": "Channel ID",+ "required": true,+ "schema": {+ "type": "string",+ "format": "uuid"+ }+ },+ {+ "name": "message_id",+ "in": "path",+ "description": "Message ID",+ "required": true,+ "schema": {+ "type": "string",+ "format": "uuid"+ }+ },+ {+ "name": "nonce",+ "in": "query",+ "description": "Optional optimistic-update nonce",+ "required": false,+ "schema": {+ "type": "string"+ }+ }+ ],+ "responses": {+ "200": {+ "description": "",+ "content": {+ "text/plain": {+ "schema": {+ "type": "string"+ }+ }+ }+ },+ "400": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "401": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "403": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "404": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "500": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ }+ }+ },+ "patch": {+ "tags": ["channels"],+ "summary": "Handler for `PATCH /channels/{channel_id}/message/{message_id}`.",+ "operationId": "patch_message",+ "parameters": [+ {+ "name": "channel_id",+ "in": "path",+ "description": "Channel ID",+ "required": true,+ "schema": {+ "type": "string",+ "format": "uuid"+ }+ },+ {+ "name": "message_id",+ "in": "path",+ "description": "Message ID",+ "required": true,+ "schema": {+ "type": "string",+ "format": "uuid"+ }+ }+ ],+ "requestBody": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/PatchMessageRequest"+ }+ }+ },+ "required": true+ },+ "responses": {+ "200": {+ "description": "",+ "content": {+ "text/plain": {+ "schema": {+ "type": "string"+ }+ }+ }+ },+ "400": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "401": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "403": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "404": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "500": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ }+ }+ }+ },+ "/channels/{channel_id}/messages": {+ "get": {+ "tags": ["channels::inbound::axum_router"],+ "summary": "Handler for `GET /channels/{channel_id}/messages`.",+ "operationId": "get_channel_messages","parameters": [{"name": "channel_id",@@ -1245,7 +2140,115 @@{"name": "limit","in": "query",- "description": "Page size (1-500, default 50)",+ "description": "Page size (1-100, default 50)",+ "required": false,+ "schema": {+ "type": "integer",+ "format": "int32",+ "minimum": 0+ }+ },+ {+ "name": "cursor",+ "in": "query",+ "description": "Base64 encoded cursor value for older messages",+ "required": false,+ "schema": {+ "type": "string"+ }+ },+ {+ "name": "previous_cursor",+ "in": "query",+ "description": "Base64 encoded cursor value for newer messages",+ "required": false,+ "schema": {+ "type": "string"+ }+ },+ {+ "name": "load_around_message_id",+ "in": "query",+ "description": "Return a centered window around this message ID",+ "required": false,+ "schema": {+ "type": "string",+ "format": "uuid"+ }+ }+ ],+ "responses": {+ "200": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ApiChannelMessagesPage"+ }+ }+ }+ },+ "400": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "401": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "404": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "500": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ }+ }+ },+ "post": {+ "tags": ["channels::inbound::axum_router"],+ "summary": "Handler for `POST /channels/{channel_id}/messages`.",+ "operationId": "post_channel_messages",+ "parameters": [+ {+ "name": "channel_id",+ "in": "path",+ "description": "Channel ID",+ "required": true,+ "schema": {+ "type": "string",+ "format": "uuid"+ }+ },+ {+ "name": "limit",+ "in": "query",+ "description": "Page size (1-100, default 50)","required": false,"schema": {"type": "integer",@@ -1254,21 +2257,122 @@}},{- "name": "cursor",- "in": "query",- "description": "Base64 encoded cursor value",- "required": false,+ "name": "cursor",+ "in": "query",+ "description": "Base64 encoded cursor value for older messages",+ "required": false,+ "schema": {+ "type": "string"+ }+ },+ {+ "name": "previous_cursor",+ "in": "query",+ "description": "Base64 encoded cursor value for newer messages",+ "required": false,+ "schema": {+ "type": "string"+ }+ },+ {+ "name": "load_around_message_id",+ "in": "query",+ "description": "Return a centered window around this message ID",+ "required": false,+ "schema": {+ "type": "string",+ "format": "uuid"+ }+ }+ ],+ "requestBody": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ChannelMessageFilters"+ }+ }+ },+ "required": true+ },+ "responses": {+ "200": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ApiChannelMessagesPage"+ }+ }+ }+ },+ "400": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "401": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "404": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "500": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ }+ }+ }+ },+ "/channels/{channel_id}/messages/{message_id}/replies": {+ "get": {+ "tags": ["channels::inbound::axum_router"],+ "summary": "Handler for `GET /channels/{channel_id}/messages/{message_id}/replies`.",+ "operationId": "get_thread_replies",+ "parameters": [+ {+ "name": "channel_id",+ "in": "path",+ "description": "Channel ID",+ "required": true,"schema": {- "type": "string"+ "type": "string",+ "format": "uuid"}},{- "name": "attachment_type",- "in": "query",- "description": "Filter by type: 'static' for images/videos, 'dss' for documents",- "required": false,+ "name": "message_id",+ "in": "path",+ "description": "Message ID (thread parent or reply id)",+ "required": true,"schema": {- "type": "string"+ "type": "string",+ "format": "uuid"}}],@@ -1278,7 +2382,10 @@"content": {"application/json": {"schema": {- "$ref": "#/components/schemas/ApiChannelAttachmentsPage"+ "type": "array",+ "items": {+ "$ref": "#/components/schemas/ApiThreadReply"+ }}}}@@ -1316,11 +2423,11 @@}}},- "/channels/{channel_id}/messages": {+ "/channels/{channel_id}/messages/{message_id}/resolve": {"get": {"tags": ["channels::inbound::axum_router"],- "summary": "Handler for `GET /channels/{channel_id}/messages`.",- "operationId": "get_channel_messages",+ "summary": "Handler for `GET /channels/{channel_id}/messages/{message_id}/resolve`.",+ "operationId": "resolve_channel_message","parameters": [{"name": "channel_id",@@ -1333,39 +2440,10 @@}},{- "name": "limit",- "in": "query",- "description": "Page size (1-100, default 50)",- "required": false,- "schema": {- "type": "integer",- "format": "int32",- "minimum": 0- }- },- {- "name": "cursor",- "in": "query",- "description": "Base64 encoded cursor value for older messages",- "required": false,- "schema": {- "type": "string"- }- },- {- "name": "previous_cursor",- "in": "query",- "description": "Base64 encoded cursor value for newer messages",- "required": false,- "schema": {- "type": "string"- }- },- {- "name": "load_around_message_id",- "in": "query",- "description": "Return a centered window around this message ID",- "required": false,+ "name": "message_id",+ "in": "path",+ "description": "Message ID to resolve",+ "required": true,"schema": {"type": "string","format": "uuid"@@ -1378,17 +2456,7 @@"content": {"application/json": {"schema": {- "$ref": "#/components/schemas/ApiChannelMessagesPage"- }- }- }- },- "400": {- "description": "",- "content": {- "application/json": {- "schema": {- "$ref": "#/components/schemas/ErrorResponse"+ "$ref": "#/components/schemas/ApiResolvedChannelMessage"}}}@@ -1424,11 +2492,13 @@}}}- },- "post": {+ }+ },+ "/channels/{channel_id}/participants": {+ "get": {"tags": ["channels::inbound::axum_router"],- "summary": "Handler for `POST /channels/{channel_id}/messages`.",- "operationId": "post_channel_messages",+ "summary": "Handler for `GET /channels/{channel_id}/participants`.",+ "operationId": "get_channel_participants","parameters": [{"name": "channel_id",@@ -1439,41 +2509,64 @@"type": "string","format": "uuid"}- },- {- "name": "limit",- "in": "query",- "description": "Page size (1-100, default 50)",- "required": false,- "schema": {- "type": "integer",- "format": "int32",- "minimum": 0+ }+ ],+ "responses": {+ "200": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "type": "array",+ "items": {+ "$ref": "#/components/schemas/ApiChannelParticipant"+ }+ }+ }}},- {- "name": "cursor",- "in": "query",- "description": "Base64 encoded cursor value for older messages",- "required": false,- "schema": {- "type": "string"+ "401": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }}},- {- "name": "previous_cursor",- "in": "query",- "description": "Base64 encoded cursor value for newer messages",- "required": false,- "schema": {- "type": "string"+ "404": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }}},+ "500": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ }+ }+ },+ "post": {+ "tags": ["channels"],+ "summary": "Handler for `POST /channels/{channel_id}/participants`.",+ "operationId": "add_participants",+ "parameters": [{- "name": "load_around_message_id",- "in": "query",- "description": "Return a centered window around this message ID",- "required": false,+ "name": "channel_id",+ "in": "path",+ "description": "Channel ID",+ "required": true,"schema": {"type": "string","format": "uuid"@@ -1484,7 +2577,7 @@"content": {"application/json": {"schema": {- "$ref": "#/components/schemas/ChannelMessageFilters"+ "$ref": "#/components/schemas/AddParticipantsRequest"}}},@@ -1492,16 +2585,19 @@},"responses": {"200": {+ "description": ""+ },+ "400": {"description": "","content": {"application/json": {"schema": {- "$ref": "#/components/schemas/ApiChannelMessagesPage"+ "$ref": "#/components/schemas/ErrorResponse"}}}},- "400": {+ "401": {"description": "","content": {"application/json": {@@ -1511,7 +2607,7 @@}}},- "401": {+ "403": {"description": "","content": {"application/json": {@@ -1542,13 +2638,11 @@}}}- }- },- "/channels/{channel_id}/messages/{message_id}/replies": {- "get": {- "tags": ["channels::inbound::axum_router"],- "summary": "Handler for `GET /channels/{channel_id}/messages/{message_id}/replies`.",- "operationId": "get_thread_replies",+ },+ "delete": {+ "tags": ["channels"],+ "summary": "Handler for `DELETE /channels/{channel_id}/participants`.",+ "operationId": "remove_participants","parameters": [{"name": "channel_id",@@ -1559,28 +2653,28 @@"type": "string","format": "uuid"}- },- {- "name": "message_id",- "in": "path",- "description": "Message ID (thread parent or reply id)",- "required": true,- "schema": {- "type": "string",- "format": "uuid"- }}],+ "requestBody": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/RemoveParticipantsRequest"+ }+ }+ },+ "required": true+ },"responses": {"200": {+ "description": ""+ },+ "400": {"description": "","content": {"application/json": {"schema": {- "type": "array",- "items": {- "$ref": "#/components/schemas/ApiThreadReply"- }+ "$ref": "#/components/schemas/ErrorResponse"}}}@@ -1595,6 +2689,16 @@}}},+ "403": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },"404": {"description": "","content": {@@ -1618,11 +2722,11 @@}}},- "/channels/{channel_id}/messages/{message_id}/resolve": {- "get": {- "tags": ["channels::inbound::axum_router"],- "summary": "Handler for `GET /channels/{channel_id}/messages/{message_id}/resolve`.",- "operationId": "resolve_channel_message",+ "/channels/{channel_id}/reaction": {+ "post": {+ "tags": ["channels"],+ "summary": "Handler for `POST /channels/{channel_id}/reaction`.",+ "operationId": "post_reaction","parameters": [{"name": "channel_id",@@ -1633,25 +2737,35 @@"type": "string","format": "uuid"}+ }+ ],+ "requestBody": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/PostReactionRequest"+ }+ }},- {- "name": "message_id",- "in": "path",- "description": "Message ID to resolve",- "required": true,- "schema": {- "type": "string",- "format": "uuid"+ "required": true+ },+ "responses": {+ "200": {+ "description": "",+ "content": {+ "text/plain": {+ "schema": {+ "type": "string"+ }+ }}- }- ],- "responses": {- "200": {+ },+ "400": {"description": "","content": {"application/json": {"schema": {- "$ref": "#/components/schemas/ApiResolvedChannelMessage"+ "$ref": "#/components/schemas/ErrorResponse"}}}@@ -1666,6 +2780,16 @@}}},+ "403": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },"404": {"description": "","content": {@@ -1689,11 +2813,11 @@}}},- "/channels/{channel_id}/participants": {- "get": {- "tags": ["channels::inbound::axum_router"],- "summary": "Handler for `GET /channels/{channel_id}/participants`.",- "operationId": "get_channel_participants",+ "/channels/{channel_id}/typing": {+ "post": {+ "tags": ["channels"],+ "summary": "Handler for `POST /channels/{channel_id}/typing`.",+ "operationId": "post_typing","parameters": [{"name": "channel_id",@@ -1706,16 +2830,33 @@}}],+ "requestBody": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/PostTypingRequest"+ }+ }+ },+ "required": true+ },"responses": {"200": {+ "description": "",+ "content": {+ "text/plain": {+ "schema": {+ "type": "string"+ }+ }+ }+ },+ "400": {"description": "","content": {"application/json": {"schema": {- "type": "array",- "items": {- "$ref": "#/components/schemas/ApiChannelParticipant"- }+ "$ref": "#/components/schemas/ErrorResponse"}}}@@ -1730,6 +2871,16 @@}}},+ "403": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },"404": {"description": "","content": {@@ -6116,6 +7267,20 @@}]},+ "AddParticipantsRequest": {+ "type": "object",+ "description": "Request to add participants.",+ "required": ["participants"],+ "properties": {+ "participants": {+ "type": "array",+ "items": {+ "type": "string"+ },+ "description": "User ids to add."+ }+ }+ },"AddPinRequest": {"type": "object","required": ["pinType", "pinIndex"],@@ -7468,6 +8633,7 @@},"ChannelType": {"type": "string",+ "description": "Type of channel.","enum": ["public", "organization", "private", "direct_message", "team"]},"ChannelWithParticipants": {@@ -7731,6 +8897,44 @@}}},+ "CreateChannelRequest": {+ "type": "object",+ "description": "Request to create a channel.",+ "required": ["channel_type", "participants"],+ "properties": {+ "channel_type": {+ "$ref": "#/components/schemas/ChannelType",+ "description": "Channel type."+ },+ "name": {+ "type": ["string", "null"],+ "description": "Optional channel name."+ },+ "participants": {+ "type": "array",+ "items": {+ "type": "string"+ },+ "description": "Participants to add, excluding the owner."+ },+ "team_id": {+ "type": ["string", "null"],+ "format": "uuid",+ "description": "Team id for team channels."+ }+ }+ },+ "CreateChannelResponse": {+ "type": "object",+ "description": "Response returned after creating a channel.",+ "required": ["id"],+ "properties": {+ "id": {+ "type": "string",+ "description": "Created channel id."+ }+ }+ },"CreateCommentRequest": {"type": "object","required": ["text"],@@ -8163,6 +9367,16 @@}}},+ "DeleteMessageQuery": {+ "type": "object",+ "description": "Query parameters for deleting a message.",+ "properties": {+ "nonce": {+ "type": ["string", "null"],+ "description": "Optional optimistic-update nonce."+ }+ }+ },"DeleteThreadInfo": {"type": "object","required": ["threadId", "deleted"],@@ -10215,6 +11429,51 @@}}},+ "GetOrCreateAction": {+ "type": "string",+ "description": "Result of a get-or-create channel operation.",+ "enum": ["get", "create"]+ },+ "GetOrCreateChannelResponse": {+ "type": "object",+ "description": "Response for get-or-create channel operations.",+ "required": ["channel_id", "action"],+ "properties": {+ "action": {+ "$ref": "#/components/schemas/GetOrCreateAction",+ "description": "Whether the channel was fetched or created."+ },+ "channel_id": {+ "type": "string",+ "description": "Channel id."+ }+ }+ },+ "GetOrCreateDmRequest": {+ "type": "object",+ "description": "Request to get or create a direct message channel.",+ "required": ["recipient_id"],+ "properties": {+ "recipient_id": {+ "type": "string",+ "description": "Recipient user id."+ }+ }+ },+ "GetOrCreatePrivateRequest": {+ "type": "object",+ "description": "Request to get or create a private channel.",+ "required": ["recipients"],+ "properties": {+ "recipients": {+ "type": "array",+ "items": {+ "type": "string"+ },+ "description": "Recipient user ids."+ }+ }+ },"GetPinsResponse": {"type": "object","required": ["error"],@@ -10623,6 +11882,31 @@}}},+ "NewChannelAttachment": {+ "type": "object",+ "description": "New attachment to add to a channel message.",+ "required": ["entity_type", "entity_id"],+ "properties": {+ "entity_id": {+ "type": "string",+ "description": "Attachment entity id."+ },+ "entity_type": {+ "type": "string",+ "description": "Attachment entity type."+ },+ "height": {+ "type": ["integer", "null"],+ "format": "int32",+ "description": "Optional rendered height."+ },+ "width": {+ "type": ["integer", "null"],+ "format": "int32",+ "description": "Optional rendered width."+ }+ }+ },"NotificationFilters": {"type": "object","description": "Notification state filters for channel message queries.",@@ -10668,6 +11952,51 @@"description": "The role a user has within a channel.","enum": ["owner", "admin", "member"]},+ "PatchChannelRequest": {+ "type": "object",+ "description": "Request to patch a channel.",+ "properties": {+ "channel_name": {+ "type": ["string", "null"],+ "description": "New channel name."+ }+ }+ },+ "PatchMessageRequest": {+ "type": "object",+ "description": "Request to patch a channel message.",+ "properties": {+ "attachment_ids_to_delete": {+ "type": ["array", "null"],+ "items": {+ "type": "string"+ },+ "description": "Attachment ids to remove."+ },+ "attachments_to_add": {+ "type": ["array", "null"],+ "items": {+ "$ref": "#/components/schemas/NewChannelAttachment"+ },+ "description": "Attachments to add."+ },+ "content": {+ "type": ["string", "null"],+ "description": "Optional replacement message body."+ },+ "mentions": {+ "type": ["array", "null"],+ "items": {+ "$ref": "#/components/schemas/SimpleMention"+ },+ "description": "Optional replacement mentions."+ },+ "nonce": {+ "type": ["string", "null"],+ "description": "Optional optimistic-update nonce."+ }+ }+ },"PatchProjectRequestV2": {"type": "object","properties": {@@ -11203,6 +12532,78 @@}}},+ "PostMessageRequest": {+ "type": "object",+ "description": "Request to send a channel message.",+ "required": ["content", "mentions", "attachments"],+ "properties": {+ "attachments": {+ "type": "array",+ "items": {+ "$ref": "#/components/schemas/NewChannelAttachment"+ },+ "description": "Attachments to add after message creation."+ },+ "content": {+ "type": "string",+ "description": "Message body."+ },+ "mentions": {+ "type": "array",+ "items": {+ "$ref": "#/components/schemas/SimpleMention"+ },+ "description": "Message mentions."+ },+ "nonce": {+ "type": ["string", "null"],+ "description": "Optional optimistic-update nonce."+ },+ "thread_id": {+ "type": ["string", "null"],+ "format": "uuid",+ "description": "Optional thread parent id."+ }+ }+ },+ "PostMessageResponse": {+ "type": "object",+ "description": "Response returned after sending a message.",+ "required": ["id"],+ "properties": {+ "id": {+ "type": "string",+ "description": "Created message id."+ },+ "nonce": {+ "type": ["string", "null"],+ "description": "Optional optimistic-update nonce."+ }+ }+ },+ "PostReactionRequest": {+ "type": "object",+ "description": "Request to mutate a reaction.",+ "required": ["emoji", "message_id", "action"],+ "properties": {+ "action": {+ "$ref": "#/components/schemas/ReactionAction",+ "description": "Reaction action."+ },+ "emoji": {+ "type": "string",+ "description": "Reaction emoji."+ },+ "message_id": {+ "type": "string",+ "description": "Message id to react to."+ },+ "nonce": {+ "type": ["string", "null"],+ "description": "Optional optimistic-update nonce."+ }+ }+ },"PostSoupAstRequest": {"allOf": [{@@ -11241,6 +12642,25 @@}]},+ "PostTypingRequest": {+ "type": "object",+ "description": "Request to emit a typing event.",+ "required": ["action"],+ "properties": {+ "action": {+ "$ref": "#/components/schemas/TypingAction",+ "description": "Typing action."+ },+ "nonce": {+ "type": ["string", "null"],+ "description": "Optional optimistic-update nonce."+ },+ "thread_id": {+ "type": ["string", "null"],+ "description": "Optional thread id."+ }+ }+ },"PreSaveDocumentRequest": {"type": "object","required": ["newBom"],@@ -11770,6 +13190,11 @@],"description": "Property value (service representation).\n\nRepresents the actual value stored for an entity property.\nThis is serialized to/from JSONB in the database."},+ "ReactionAction": {+ "type": "string",+ "description": "Reaction mutation action.",+ "enum": ["Add", "Remove"]+ },"RecentlyDeletedResponseData": {"type": "object","required": ["items"],@@ -11783,6 +13208,20 @@}}},+ "RemoveParticipantsRequest": {+ "type": "object",+ "description": "Request to remove participants.",+ "required": ["participants"],+ "properties": {+ "participants": {+ "type": "array",+ "items": {+ "type": "string"+ },+ "description": "User ids to remove."+ }+ }+ },"ReorderPinRequest": {"type": "object","required": ["pinnedItemId", "pinnedItemType", "pinIndex"],@@ -12118,6 +13557,21 @@}}},+ "SimpleMention": {+ "type": "object",+ "description": "Simple entity mention attached to a message.",+ "required": ["entity_type", "entity_id"],+ "properties": {+ "entity_id": {+ "type": "string",+ "description": "Mentioned entity id."+ },+ "entity_type": {+ "type": "string",+ "description": "Mentioned entity type."+ }+ }+ },"SoupApiItem": {"allOf": [{@@ -13008,6 +14462,11 @@}}},+ "TypingAction": {+ "type": "string",+ "description": "Typing indicator action.",+ "enum": ["start", "stop"]+ },"UnthreadedPdfUuidRequest": {"oneOf": [{diff --git a/rust/cloud-storage/channels/src/inbound/axum_router.rs b/rust/cloud-storage/channels/src/inbound/axum_router.rsindex 2e3fe569a9..f88c64b094 100644--- a/rust/cloud-storage/channels/src/inbound/axum_router.rs+++ b/rust/cloud-storage/channels/src/inbound/axum_router.rs@@ -281,6 +281,20 @@ where}/// Handler for `POST /channels`.+#[utoipa::path(+ post,+ tag = "channels",+ operation_id = "create_channel",+ path = "/channels",+ request_body = CreateChannelRequest,+ responses(+ (status = 200, body = CreateChannelResponse),+ (status = 400, body = ErrorResponse),+ (status = 401, body = ErrorResponse),+ (status = 404, body = ErrorResponse),+ (status = 500, body = ErrorResponse),+ )+)]#[tracing::instrument(err, skip_all)]pub async fn create_channel_handler<S: ChannelService, Svc: EntityAccessService>(State(state): State<ChannelsRouterState<S, Svc>>,@@ -296,6 +310,20 @@ pub async fn create_channel_handler<S: ChannelService, Svc: EntityAccessService>}/// Handler for `POST /channels/get_or_create_dm`.+#[utoipa::path(+ post,+ tag = "channels",+ operation_id = "get_or_create_dm",+ path = "/channels/get_or_create_dm",+ request_body = GetOrCreateDmRequest,+ responses(+ (status = 200, body = GetOrCreateChannelResponse),+ (status = 400, body = ErrorResponse),+ (status = 401, body = ErrorResponse),+ (status = 404, body = ErrorResponse),+ (status = 500, body = ErrorResponse),+ )+)]#[tracing::instrument(err, skip_all)]pub async fn get_or_create_dm_handler<S: ChannelService, Svc: EntityAccessService>(State(state): State<ChannelsRouterState<S, Svc>>,@@ -308,6 +336,20 @@ pub async fn get_or_create_dm_handler<S: ChannelService, Svc: EntityAccessServic}/// Handler for `POST /channels/get_or_create_private`.+#[utoipa::path(+ post,+ tag = "channels",+ operation_id = "get_or_create_private",+ path = "/channels/get_or_create_private",+ request_body = GetOrCreatePrivateRequest,+ responses(+ (status = 200, body = GetOrCreateChannelResponse),+ (status = 400, body = ErrorResponse),+ (status = 401, body = ErrorResponse),+ (status = 404, body = ErrorResponse),+ (status = 500, body = ErrorResponse),+ )+)]#[tracing::instrument(err, skip_all)]pub async fn get_or_create_private_handler<S: ChannelService, Svc: EntityAccessService>(State(state): State<ChannelsRouterState<S, Svc>>,@@ -320,6 +362,24 @@ pub async fn get_or_create_private_handler<S: ChannelService, Svc: EntityAccessS}/// Handler for `PATCH /channels/{channel_id}`.+#[utoipa::path(+ patch,+ tag = "channels",+ operation_id = "patch_channel",+ path = "/channels/{channel_id}",+ params(+ ("channel_id" = Uuid, Path, description = "Channel ID")+ ),+ request_body = PatchChannelRequest,+ responses(+ (status = 200, body = String),+ (status = 400, body = ErrorResponse),+ (status = 401, body = ErrorResponse),+ (status = 403, body = ErrorResponse),+ (status = 404, body = ErrorResponse),+ (status = 500, body = ErrorResponse),+ )+)]#[tracing::instrument(err, skip_all)]pub async fn patch_channel_handler<S: ChannelService, Svc: EntityAccessService>(State(state): State<ChannelsRouterState<S, Svc>>,@@ -333,6 +393,23 @@ pub async fn patch_channel_handler<S: ChannelService, Svc: EntityAccessService>(}/// Handler for `DELETE /channels/{channel_id}`.+#[utoipa::path(+ delete,+ tag = "channels",+ operation_id = "delete_channel",+ path = "/channels/{channel_id}",+ params(+ ("channel_id" = Uuid, Path, description = "Channel ID")+ ),+ responses(+ (status = 200, body = String),+ (status = 400, body = ErrorResponse),+ (status = 401, body = ErrorResponse),+ (status = 403, body = ErrorResponse),+ (status = 404, body = ErrorResponse),+ (status = 500, body = ErrorResponse),+ )+)]#[tracing::instrument(err, skip_all)]pub async fn delete_channel_handler<S: ChannelService, Svc: EntityAccessService>(State(state): State<ChannelsRouterState<S, Svc>>,@@ -345,6 +422,24 @@ pub async fn delete_channel_handler<S: ChannelService, Svc: EntityAccessService>}/// Handler for `POST /channels/{channel_id}/message`.+#[utoipa::path(+ post,+ tag = "channels",+ operation_id = "post_message",+ path = "/channels/{channel_id}/message",+ params(+ ("channel_id" = Uuid, Path, description = "Channel ID")+ ),+ request_body = PostMessageRequest,+ responses(+ (status = 200, body = PostMessageResponse),+ (status = 400, body = ErrorResponse),+ (status = 401, body = ErrorResponse),+ (status = 403, body = ErrorResponse),+ (status = 404, body = ErrorResponse),+ (status = 500, body = ErrorResponse),+ )+)]#[tracing::instrument(err, skip_all)]pub async fn post_message_handler<S: ChannelService, Svc: EntityAccessService>(State(state): State<ChannelsRouterState<S, Svc>>,@@ -358,6 +453,25 @@ pub async fn post_message_handler<S: ChannelService, Svc: EntityAccessService>(}/// Handler for `PATCH /channels/{channel_id}/message/{message_id}`.+#[utoipa::path(+ patch,+ tag = "channels",+ operation_id = "patch_message",+ path = "/channels/{channel_id}/message/{message_id}",+ params(+ ("channel_id" = Uuid, Path, description = "Channel ID"),+ ("message_id" = Uuid, Path, description = "Message ID")+ ),+ request_body = PatchMessageRequest,+ responses(+ (status = 200, body = String),+ (status = 400, body = ErrorResponse),+ (status = 401, body = ErrorResponse),+ (status = 403, body = ErrorResponse),+ (status = 404, body = ErrorResponse),+ (status = 500, body = ErrorResponse),+ )+)]#[tracing::instrument(err, skip_all)]pub async fn patch_message_handler<S: ChannelService, Svc: EntityAccessService>(State(state): State<ChannelsRouterState<S, Svc>>,@@ -375,6 +489,25 @@ pub async fn patch_message_handler<S: ChannelService, Svc: EntityAccessService>(}/// Handler for `DELETE /channels/{channel_id}/message/{message_id}`.+#[utoipa::path(+ delete,+ tag = "channels",+ operation_id = "delete_message",+ path = "/channels/{channel_id}/message/{message_id}",+ params(+ ("channel_id" = Uuid, Path, description = "Channel ID"),+ ("message_id" = Uuid, Path, description = "Message ID"),+ ("nonce" = Option<String>, Query, description = "Optional optimistic-update nonce")+ ),+ responses(+ (status = 200, body = String),+ (status = 400, body = ErrorResponse),+ (status = 401, body = ErrorResponse),+ (status = 403, body = ErrorResponse),+ (status = 404, body = ErrorResponse),+ (status = 500, body = ErrorResponse),+ )+)]#[tracing::instrument(err, skip_all)]pub async fn delete_message_handler<S: ChannelService, Svc: EntityAccessService>(State(state): State<ChannelsRouterState<S, Svc>>,@@ -392,6 +525,24 @@ pub async fn delete_message_handler<S: ChannelService, Svc: EntityAccessService>}/// Handler for `POST /channels/{channel_id}/reaction`.+#[utoipa::path(+ post,+ tag = "channels",+ operation_id = "post_reaction",+ path = "/channels/{channel_id}/reaction",+ params(+ ("channel_id" = Uuid, Path, description = "Channel ID")+ ),+ request_body = PostReactionRequest,+ responses(+ (status = 200, body = String),+ (status = 400, body = ErrorResponse),+ (status = 401, body = ErrorResponse),+ (status = 403, body = ErrorResponse),+ (status = 404, body = ErrorResponse),+ (status = 500, body = ErrorResponse),+ )+)]#[tracing::instrument(err, skip_all)]pub async fn post_reaction_handler<S: ChannelService, Svc: EntityAccessService>(State(state): State<ChannelsRouterState<S, Svc>>,@@ -405,6 +556,24 @@ pub async fn post_reaction_handler<S: ChannelService, Svc: EntityAccessService>(}/// Handler for `POST /channels/{channel_id}/typing`.+#[utoipa::path(+ post,+ tag = "channels",+ operation_id = "post_typing",+ path = "/channels/{channel_id}/typing",+ params(+ ("channel_id" = Uuid, Path, description = "Channel ID")+ ),+ request_body = PostTypingRequest,+ responses(+ (status = 200, body = String),+ (status = 400, body = ErrorResponse),+ (status = 401, body = ErrorResponse),+ (status = 403, body = ErrorResponse),+ (status = 404, body = ErrorResponse),+ (status = 500, body = ErrorResponse),+ )+)]#[tracing::instrument(err, skip_all)]pub async fn post_typing_handler<S: ChannelService, Svc: EntityAccessService>(State(state): State<ChannelsRouterState<S, Svc>>,@@ -418,6 +587,24 @@ pub async fn post_typing_handler<S: ChannelService, Svc: EntityAccessService>(}/// Handler for `POST /channels/{channel_id}/participants`.+#[utoipa::path(+ post,+ tag = "channels",+ operation_id = "add_participants",+ path = "/channels/{channel_id}/participants",+ params(+ ("channel_id" = Uuid, Path, description = "Channel ID")+ ),+ request_body = AddParticipantsRequest,+ responses(+ (status = 200),+ (status = 400, body = ErrorResponse),+ (status = 401, body = ErrorResponse),+ (status = 403, body = ErrorResponse),+ (status = 404, body = ErrorResponse),+ (status = 500, body = ErrorResponse),+ )+)]#[tracing::instrument(err, skip_all)]pub async fn add_participants_handler<S: ChannelService, Svc: EntityAccessService>(State(state): State<ChannelsRouterState<S, Svc>>,@@ -434,6 +621,24 @@ pub async fn add_participants_handler<S: ChannelService, Svc: EntityAccessServic}/// Handler for `DELETE /channels/{channel_id}/participants`.+#[utoipa::path(+ delete,+ tag = "channels",+ operation_id = "remove_participants",+ path = "/channels/{channel_id}/participants",+ params(+ ("channel_id" = Uuid, Path, description = "Channel ID")+ ),+ request_body = RemoveParticipantsRequest,+ responses(+ (status = 200),+ (status = 400, body = ErrorResponse),+ (status = 401, body = ErrorResponse),+ (status = 403, body = ErrorResponse),+ (status = 404, body = ErrorResponse),+ (status = 500, body = ErrorResponse),+ )+)]#[tracing::instrument(err, skip_all)]pub async fn remove_participants_handler<S: ChannelService, Svc: EntityAccessService>(State(state): State<ChannelsRouterState<S, Svc>>,@@ -446,6 +651,22 @@ pub async fn remove_participants_handler<S: ChannelService, Svc: EntityAccessSer}/// Handler for `POST /channels/{channel_id}/join`.+#[utoipa::path(+ post,+ tag = "channels",+ operation_id = "join_channel",+ path = "/channels/{channel_id}/join",+ params(+ ("channel_id" = Uuid, Path, description = "Channel ID")+ ),+ responses(+ (status = 200),+ (status = 400, body = ErrorResponse),+ (status = 401, body = ErrorResponse),+ (status = 404, body = ErrorResponse),+ (status = 500, body = ErrorResponse),+ )+)]#[tracing::instrument(err, skip_all)]pub async fn join_channel_handler<S: ChannelService, Svc: EntityAccessService>(State(state): State<ChannelsRouterState<S, Svc>>,@@ -459,6 +680,23 @@ pub async fn join_channel_handler<S: ChannelService, Svc: EntityAccessService>(}/// Handler for `POST /channels/{channel_id}/leave`.+#[utoipa::path(+ post,+ tag = "channels",+ operation_id = "leave_channel",+ path = "/channels/{channel_id}/leave",+ params(+ ("channel_id" = Uuid, Path, description = "Channel ID")+ ),+ responses(+ (status = 200),+ (status = 400, body = ErrorResponse),+ (status = 401, body = ErrorResponse),+ (status = 403, body = ErrorResponse),+ (status = 404, body = ErrorResponse),+ (status = 500, body = ErrorResponse),+ )+)]#[tracing::instrument(err, skip_all)]pub async fn leave_channel_handler<S: ChannelService, Svc: EntityAccessService>(State(state): State<ChannelsRouterState<S, Svc>>,diff --git a/rust/cloud-storage/document_storage_service/src/api/swagger.rs b/rust/cloud-storage/document_storage_service/src/api/swagger.rsindex a46d315c5d..a2ce349b11 100644--- a/rust/cloud-storage/document_storage_service/src/api/swagger.rs+++ b/rust/cloud-storage/document_storage_service/src/api/swagger.rs@@ -193,6 +193,20 @@ use utoipa::OpenApi;soup::inbound::axum_router::post_soup_ast_handler,// channels+ channels::inbound::axum_router::create_channel_handler,+ channels::inbound::axum_router::get_or_create_dm_handler,+ channels::inbound::axum_router::get_or_create_private_handler,+ channels::inbound::axum_router::patch_channel_handler,+ channels::inbound::axum_router::delete_channel_handler,+ channels::inbound::axum_router::post_message_handler,+ channels::inbound::axum_router::patch_message_handler,+ channels::inbound::axum_router::delete_message_handler,+ channels::inbound::axum_router::post_reaction_handler,+ channels::inbound::axum_router::post_typing_handler,+ channels::inbound::axum_router::add_participants_handler,+ channels::inbound::axum_router::remove_participants_handler,+ channels::inbound::axum_router::join_channel_handler,+ channels::inbound::axum_router::leave_channel_handler,channels::inbound::axum_router::get_channel_messages_handler,channels::inbound::axum_router::post_channel_messages_handler,channels::inbound::axum_router::get_thread_replies_handler,@@ -362,6 +376,26 @@ use utoipa::OpenApi;ApiChannelParticipant,ApiParticipantRole,ChannelMessageFilters,+ channels::domain::models::ChannelType,+ channels::domain::models::GetOrCreateAction,+ channels::domain::models::TypingAction,+ channels::domain::models::ReactionAction,+ channels::domain::models::NewChannelAttachment,+ channels::domain::models::SimpleMention,+ channels::domain::models::CreateChannelRequest,+ channels::domain::models::CreateChannelResponse,+ channels::domain::models::GetOrCreateDmRequest,+ channels::domain::models::GetOrCreatePrivateRequest,+ channels::domain::models::GetOrCreateChannelResponse,+ channels::domain::models::PatchChannelRequest,+ channels::domain::models::PostMessageRequest,+ channels::domain::models::PostMessageResponse,+ channels::domain::models::PatchMessageRequest,+ channels::domain::models::DeleteMessageQuery,+ channels::domain::models::PostReactionRequest,+ channels::domain::models::PostTypingRequest,+ channels::domain::models::AddParticipantsRequest,+ channels::domain::models::RemoveParticipantsRequest,// Callscall::domain::models::CallTokenResponse,