@shadowob/shared
Advanced tools
| interface Message { | ||
| id: string; | ||
| content: string; | ||
| channelId: string; | ||
| authorId: string; | ||
| threadId: string | null; | ||
| replyToId: string | null; | ||
| isEdited: boolean; | ||
| isPinned: boolean; | ||
| createdAt: string; | ||
| updatedAt: string; | ||
| author?: { | ||
| id: string; | ||
| username: string; | ||
| displayName: string; | ||
| avatarUrl: string | null; | ||
| isBot: boolean; | ||
| }; | ||
| attachments?: Attachment[]; | ||
| reactions?: ReactionGroup[]; | ||
| metadata?: MessageMetadata | null; | ||
| } | ||
| type MessageMentionKind = 'user' | 'buddy' | 'app' | 'channel' | 'server' | 'here' | 'everyone'; | ||
| interface MessageMentionRange { | ||
| start: number; | ||
| end: number; | ||
| } | ||
| interface MessageMention { | ||
| kind: MessageMentionKind; | ||
| /** Canonical target id. For users this is userId, for channels channelId, for servers serverId. */ | ||
| targetId: string; | ||
| /** Canonical text persisted in message content, e.g. <@userId>, <#channelId>. */ | ||
| token: string; | ||
| /** Optional display text selected or typed by the sender before canonicalization. */ | ||
| sourceToken?: string; | ||
| /** Human-readable label used by renderers. */ | ||
| label: string; | ||
| /** Optional source range in content. Clients may omit it; servers may recompute later. */ | ||
| range?: MessageMentionRange; | ||
| serverId?: string; | ||
| serverSlug?: string | null; | ||
| serverName?: string | null; | ||
| channelId?: string; | ||
| channelName?: string | null; | ||
| appId?: string; | ||
| appKey?: string; | ||
| appName?: string | null; | ||
| iconUrl?: string | null; | ||
| userId?: string; | ||
| username?: string | null; | ||
| displayName?: string | null; | ||
| avatarUrl?: string | null; | ||
| isBot?: boolean; | ||
| isPrivate?: boolean; | ||
| } | ||
| interface MessageMetadata { | ||
| mentions?: MessageMention[]; | ||
| agentChain?: Record<string, unknown>; | ||
| interactive?: Record<string, unknown>; | ||
| interactiveResponse?: Record<string, unknown>; | ||
| interactiveState?: Record<string, unknown>; | ||
| /** Unified card protocol. New card-like message surfaces must use this field. */ | ||
| cards?: MessageCard[]; | ||
| /** | ||
| * @deprecated Compatibility-only commerce card array. | ||
| * New card-like protocols must use `cards`; do not use this field for new product decisions. | ||
| */ | ||
| commerceCards?: CommerceMessageCard[]; | ||
| /** | ||
| * @deprecated Compatibility-only paid-file delivery card array. | ||
| * New card-like protocols must use `cards`; do not use this field for new product decisions. | ||
| */ | ||
| paidFileCards?: PaidFileCard[]; | ||
| /** | ||
| * @deprecated Compatibility-only OAuth link card array. | ||
| * New card-like protocols must use `cards`; do not use this field for new product decisions. | ||
| */ | ||
| oauthLinkCards?: OAuthLinkCard[]; | ||
| [key: string]: unknown; | ||
| } | ||
| type MessageCardStatus = 'queued' | 'claimed' | 'running' | 'completed' | 'failed' | 'canceled' | 'transferred'; | ||
| interface MessageCardSource { | ||
| kind: 'user' | 'pat' | 'oauth' | 'agent' | 'system' | 'server_app' | 'buddy'; | ||
| id?: string; | ||
| label?: string; | ||
| userId?: string; | ||
| agentId?: string; | ||
| appId?: string; | ||
| serverId?: string; | ||
| channelId?: string; | ||
| command?: string; | ||
| resource?: { | ||
| kind: string; | ||
| id: string; | ||
| label?: string; | ||
| url?: string; | ||
| [key: string]: unknown; | ||
| }; | ||
| [key: string]: unknown; | ||
| } | ||
| interface MessageCardClaim { | ||
| id: string; | ||
| actor: MessageCardSource; | ||
| claimedAt: string; | ||
| expiresAt: string; | ||
| } | ||
| interface MessageCardCapability { | ||
| kind: 'task'; | ||
| scope: string[]; | ||
| issuedAt: string; | ||
| expiresAt: string; | ||
| claimId?: string; | ||
| binding?: { | ||
| messageId?: string; | ||
| cardId: string; | ||
| workspaceId?: string; | ||
| }; | ||
| } | ||
| interface TaskMessageCard { | ||
| id: string; | ||
| kind: 'task'; | ||
| version: number; | ||
| title: string; | ||
| body?: string; | ||
| status: MessageCardStatus; | ||
| priority?: 'low' | 'normal' | 'high' | 'urgent'; | ||
| assignee?: { | ||
| agentId?: string; | ||
| userId?: string; | ||
| label?: string; | ||
| [key: string]: unknown; | ||
| }; | ||
| source?: MessageCardSource; | ||
| claim?: MessageCardClaim; | ||
| capability?: MessageCardCapability; | ||
| progress?: Array<{ | ||
| at: string; | ||
| status: MessageCardStatus; | ||
| note?: string; | ||
| actor?: MessageCardSource; | ||
| [key: string]: unknown; | ||
| }>; | ||
| createdAt: string; | ||
| updatedAt?: string; | ||
| data?: Record<string, unknown> & { | ||
| task?: { | ||
| workspaceId?: string; | ||
| [key: string]: unknown; | ||
| }; | ||
| }; | ||
| [key: string]: unknown; | ||
| } | ||
| type GenericMessageCard = { | ||
| id?: string; | ||
| kind: string; | ||
| version?: number; | ||
| title?: string; | ||
| data?: Record<string, unknown>; | ||
| [key: string]: unknown; | ||
| }; | ||
| interface ServerAppMessageCard { | ||
| id?: string; | ||
| kind: 'server_app'; | ||
| version?: number; | ||
| appKey: string; | ||
| title: string; | ||
| description?: string; | ||
| label?: string; | ||
| action?: { | ||
| mode: 'open_app'; | ||
| path?: string; | ||
| }; | ||
| data?: Record<string, unknown>; | ||
| [key: string]: unknown; | ||
| } | ||
| type MessageCard = TaskMessageCard | ServerAppMessageCard | GenericMessageCard; | ||
| interface CommerceOfferCardInput { | ||
| id?: string; | ||
| kind: 'offer'; | ||
| offerId: string; | ||
| } | ||
| type CommerceMessageCard = CommerceProductCard | CommerceOfferCardInput; | ||
| interface CommerceProductCard { | ||
| id: string; | ||
| kind: 'offer' | 'product'; | ||
| offerId?: string; | ||
| shopId: string; | ||
| shopScope: { | ||
| kind: 'server' | 'user'; | ||
| id: string; | ||
| }; | ||
| productId: string; | ||
| skuId?: string; | ||
| snapshot: { | ||
| name: string; | ||
| summary?: string | null; | ||
| imageUrl?: string | null; | ||
| shopName?: string | null; | ||
| deliveryPromise?: string | null; | ||
| price: number; | ||
| currency: string; | ||
| productType: 'physical' | 'entitlement'; | ||
| billingMode?: 'one_time' | 'fixed_duration' | 'subscription'; | ||
| durationSeconds?: number | null; | ||
| resourceType?: string; | ||
| resourceId?: string; | ||
| capability?: string; | ||
| }; | ||
| purchase: { | ||
| mode: 'direct' | 'select_sku' | 'open_detail'; | ||
| }; | ||
| } | ||
| interface PaidFileCard { | ||
| id: string; | ||
| kind: 'paid_file'; | ||
| fileId: string; | ||
| entitlementId?: string | null; | ||
| deliverableId?: string; | ||
| snapshot: { | ||
| name: string; | ||
| summary?: string | null; | ||
| mime?: string | null; | ||
| sizeBytes?: number | null; | ||
| previewUrl?: string | null; | ||
| }; | ||
| action: { | ||
| mode: 'open_paid_file'; | ||
| }; | ||
| } | ||
| interface OAuthLinkCard { | ||
| id: string; | ||
| kind: 'oauth_link'; | ||
| appId: string; | ||
| clientId?: string | null; | ||
| title: string; | ||
| description?: string | null; | ||
| iconUrl?: string | null; | ||
| meta?: { | ||
| appName?: string | null; | ||
| avatarUrl?: string | null; | ||
| iconUrl?: string | null; | ||
| coverUrl?: string | null; | ||
| homepageUrl?: string | null; | ||
| origin?: string | null; | ||
| }; | ||
| url: string; | ||
| embedUrl?: string | null; | ||
| fallbackUrl?: string | null; | ||
| scopes?: string[]; | ||
| action: { | ||
| mode: 'open_iframe' | 'open_external'; | ||
| }; | ||
| } | ||
| type MentionSuggestionTrigger = '@' | '#'; | ||
| interface MentionSuggestion { | ||
| id: string; | ||
| kind: MessageMentionKind; | ||
| targetId: string; | ||
| token: string; | ||
| label: string; | ||
| description?: string | null; | ||
| serverId?: string; | ||
| serverSlug?: string | null; | ||
| serverName?: string | null; | ||
| channelId?: string; | ||
| channelName?: string | null; | ||
| appId?: string; | ||
| appKey?: string; | ||
| appName?: string | null; | ||
| iconUrl?: string | null; | ||
| userId?: string; | ||
| username?: string | null; | ||
| displayName?: string | null; | ||
| avatarUrl?: string | null; | ||
| isBot?: boolean; | ||
| isPrivate?: boolean; | ||
| } | ||
| interface Attachment { | ||
| id: string; | ||
| messageId: string; | ||
| filename: string; | ||
| url: string; | ||
| contentType: string; | ||
| size: number; | ||
| width: number | null; | ||
| height: number | null; | ||
| workspaceNodeId?: string | null; | ||
| kind?: 'file' | 'image' | 'voice'; | ||
| durationMs?: number | null; | ||
| audioCodec?: string | null; | ||
| audioContainer?: string | null; | ||
| waveformPeaks?: number[] | null; | ||
| waveformVersion?: number | null; | ||
| transcript?: { | ||
| id: string; | ||
| status: 'pending' | 'processing' | 'ready' | 'failed'; | ||
| text: string | null; | ||
| language: string | null; | ||
| source: 'client' | 'server' | 'runtime'; | ||
| provider?: string | null; | ||
| confidence?: number | null; | ||
| errorCode?: string | null; | ||
| updatedAt?: string; | ||
| } | null; | ||
| playback?: { | ||
| played: boolean; | ||
| completed: boolean; | ||
| lastPositionMs: number; | ||
| playedCount?: number; | ||
| } | null; | ||
| createdAt: string; | ||
| } | ||
| interface ReactionGroup { | ||
| emoji: string; | ||
| count: number; | ||
| userIds: string[]; | ||
| } | ||
| interface Thread { | ||
| id: string; | ||
| name: string; | ||
| channelId: string; | ||
| parentMessageId: string; | ||
| creatorId: string; | ||
| isArchived: boolean; | ||
| createdAt: string; | ||
| updatedAt: string; | ||
| } | ||
| interface SendMessageRequest { | ||
| content: string; | ||
| threadId?: string; | ||
| replyToId?: string; | ||
| mentions?: MessageMention[]; | ||
| metadata?: MessageMetadata; | ||
| } | ||
| interface UpdateMessageRequest { | ||
| content: string; | ||
| } | ||
| type NotificationType = 'mention' | 'reply' | 'dm' | 'system'; | ||
| interface Notification { | ||
| id: string; | ||
| userId: string; | ||
| type: NotificationType; | ||
| title: string; | ||
| body: string | null; | ||
| referenceId: string | null; | ||
| referenceType: string | null; | ||
| isRead: boolean; | ||
| createdAt: string; | ||
| } | ||
| export type { Attachment as A, CommerceMessageCard as C, GenericMessageCard as G, MentionSuggestion as M, Notification as N, OAuthLinkCard as O, PaidFileCard as P, ReactionGroup as R, SendMessageRequest as S, TaskMessageCard as T, UpdateMessageRequest as U, CommerceOfferCardInput as a, CommerceProductCard as b, MentionSuggestionTrigger as c, Message as d, MessageCard as e, MessageCardCapability as f, MessageCardClaim as g, MessageCardSource as h, MessageCardStatus as i, MessageMention as j, MessageMentionKind as k, MessageMentionRange as l, MessageMetadata as m, NotificationType as n, ServerAppMessageCard as o, Thread as p }; |
| interface Message { | ||
| id: string; | ||
| content: string; | ||
| channelId: string; | ||
| authorId: string; | ||
| threadId: string | null; | ||
| replyToId: string | null; | ||
| isEdited: boolean; | ||
| isPinned: boolean; | ||
| createdAt: string; | ||
| updatedAt: string; | ||
| author?: { | ||
| id: string; | ||
| username: string; | ||
| displayName: string; | ||
| avatarUrl: string | null; | ||
| isBot: boolean; | ||
| }; | ||
| attachments?: Attachment[]; | ||
| reactions?: ReactionGroup[]; | ||
| metadata?: MessageMetadata | null; | ||
| } | ||
| type MessageMentionKind = 'user' | 'buddy' | 'app' | 'channel' | 'server' | 'here' | 'everyone'; | ||
| interface MessageMentionRange { | ||
| start: number; | ||
| end: number; | ||
| } | ||
| interface MessageMention { | ||
| kind: MessageMentionKind; | ||
| /** Canonical target id. For users this is userId, for channels channelId, for servers serverId. */ | ||
| targetId: string; | ||
| /** Canonical text persisted in message content, e.g. <@userId>, <#channelId>. */ | ||
| token: string; | ||
| /** Optional display text selected or typed by the sender before canonicalization. */ | ||
| sourceToken?: string; | ||
| /** Human-readable label used by renderers. */ | ||
| label: string; | ||
| /** Optional source range in content. Clients may omit it; servers may recompute later. */ | ||
| range?: MessageMentionRange; | ||
| serverId?: string; | ||
| serverSlug?: string | null; | ||
| serverName?: string | null; | ||
| channelId?: string; | ||
| channelName?: string | null; | ||
| appId?: string; | ||
| appKey?: string; | ||
| appName?: string | null; | ||
| iconUrl?: string | null; | ||
| userId?: string; | ||
| username?: string | null; | ||
| displayName?: string | null; | ||
| avatarUrl?: string | null; | ||
| isBot?: boolean; | ||
| isPrivate?: boolean; | ||
| } | ||
| interface MessageMetadata { | ||
| mentions?: MessageMention[]; | ||
| agentChain?: Record<string, unknown>; | ||
| interactive?: Record<string, unknown>; | ||
| interactiveResponse?: Record<string, unknown>; | ||
| interactiveState?: Record<string, unknown>; | ||
| /** Unified card protocol. New card-like message surfaces must use this field. */ | ||
| cards?: MessageCard[]; | ||
| /** | ||
| * @deprecated Compatibility-only commerce card array. | ||
| * New card-like protocols must use `cards`; do not use this field for new product decisions. | ||
| */ | ||
| commerceCards?: CommerceMessageCard[]; | ||
| /** | ||
| * @deprecated Compatibility-only paid-file delivery card array. | ||
| * New card-like protocols must use `cards`; do not use this field for new product decisions. | ||
| */ | ||
| paidFileCards?: PaidFileCard[]; | ||
| /** | ||
| * @deprecated Compatibility-only OAuth link card array. | ||
| * New card-like protocols must use `cards`; do not use this field for new product decisions. | ||
| */ | ||
| oauthLinkCards?: OAuthLinkCard[]; | ||
| [key: string]: unknown; | ||
| } | ||
| type MessageCardStatus = 'queued' | 'claimed' | 'running' | 'completed' | 'failed' | 'canceled' | 'transferred'; | ||
| interface MessageCardSource { | ||
| kind: 'user' | 'pat' | 'oauth' | 'agent' | 'system' | 'server_app' | 'buddy'; | ||
| id?: string; | ||
| label?: string; | ||
| userId?: string; | ||
| agentId?: string; | ||
| appId?: string; | ||
| serverId?: string; | ||
| channelId?: string; | ||
| command?: string; | ||
| resource?: { | ||
| kind: string; | ||
| id: string; | ||
| label?: string; | ||
| url?: string; | ||
| [key: string]: unknown; | ||
| }; | ||
| [key: string]: unknown; | ||
| } | ||
| interface MessageCardClaim { | ||
| id: string; | ||
| actor: MessageCardSource; | ||
| claimedAt: string; | ||
| expiresAt: string; | ||
| } | ||
| interface MessageCardCapability { | ||
| kind: 'task'; | ||
| scope: string[]; | ||
| issuedAt: string; | ||
| expiresAt: string; | ||
| claimId?: string; | ||
| binding?: { | ||
| messageId?: string; | ||
| cardId: string; | ||
| workspaceId?: string; | ||
| }; | ||
| } | ||
| interface TaskMessageCard { | ||
| id: string; | ||
| kind: 'task'; | ||
| version: number; | ||
| title: string; | ||
| body?: string; | ||
| status: MessageCardStatus; | ||
| priority?: 'low' | 'normal' | 'high' | 'urgent'; | ||
| assignee?: { | ||
| agentId?: string; | ||
| userId?: string; | ||
| label?: string; | ||
| [key: string]: unknown; | ||
| }; | ||
| source?: MessageCardSource; | ||
| claim?: MessageCardClaim; | ||
| capability?: MessageCardCapability; | ||
| progress?: Array<{ | ||
| at: string; | ||
| status: MessageCardStatus; | ||
| note?: string; | ||
| actor?: MessageCardSource; | ||
| [key: string]: unknown; | ||
| }>; | ||
| createdAt: string; | ||
| updatedAt?: string; | ||
| data?: Record<string, unknown> & { | ||
| task?: { | ||
| workspaceId?: string; | ||
| [key: string]: unknown; | ||
| }; | ||
| }; | ||
| [key: string]: unknown; | ||
| } | ||
| type GenericMessageCard = { | ||
| id?: string; | ||
| kind: string; | ||
| version?: number; | ||
| title?: string; | ||
| data?: Record<string, unknown>; | ||
| [key: string]: unknown; | ||
| }; | ||
| interface ServerAppMessageCard { | ||
| id?: string; | ||
| kind: 'server_app'; | ||
| version?: number; | ||
| appKey: string; | ||
| title: string; | ||
| description?: string; | ||
| label?: string; | ||
| action?: { | ||
| mode: 'open_app'; | ||
| path?: string; | ||
| }; | ||
| data?: Record<string, unknown>; | ||
| [key: string]: unknown; | ||
| } | ||
| type MessageCard = TaskMessageCard | ServerAppMessageCard | GenericMessageCard; | ||
| interface CommerceOfferCardInput { | ||
| id?: string; | ||
| kind: 'offer'; | ||
| offerId: string; | ||
| } | ||
| type CommerceMessageCard = CommerceProductCard | CommerceOfferCardInput; | ||
| interface CommerceProductCard { | ||
| id: string; | ||
| kind: 'offer' | 'product'; | ||
| offerId?: string; | ||
| shopId: string; | ||
| shopScope: { | ||
| kind: 'server' | 'user'; | ||
| id: string; | ||
| }; | ||
| productId: string; | ||
| skuId?: string; | ||
| snapshot: { | ||
| name: string; | ||
| summary?: string | null; | ||
| imageUrl?: string | null; | ||
| shopName?: string | null; | ||
| deliveryPromise?: string | null; | ||
| price: number; | ||
| currency: string; | ||
| productType: 'physical' | 'entitlement'; | ||
| billingMode?: 'one_time' | 'fixed_duration' | 'subscription'; | ||
| durationSeconds?: number | null; | ||
| resourceType?: string; | ||
| resourceId?: string; | ||
| capability?: string; | ||
| }; | ||
| purchase: { | ||
| mode: 'direct' | 'select_sku' | 'open_detail'; | ||
| }; | ||
| } | ||
| interface PaidFileCard { | ||
| id: string; | ||
| kind: 'paid_file'; | ||
| fileId: string; | ||
| entitlementId?: string | null; | ||
| deliverableId?: string; | ||
| snapshot: { | ||
| name: string; | ||
| summary?: string | null; | ||
| mime?: string | null; | ||
| sizeBytes?: number | null; | ||
| previewUrl?: string | null; | ||
| }; | ||
| action: { | ||
| mode: 'open_paid_file'; | ||
| }; | ||
| } | ||
| interface OAuthLinkCard { | ||
| id: string; | ||
| kind: 'oauth_link'; | ||
| appId: string; | ||
| clientId?: string | null; | ||
| title: string; | ||
| description?: string | null; | ||
| iconUrl?: string | null; | ||
| meta?: { | ||
| appName?: string | null; | ||
| avatarUrl?: string | null; | ||
| iconUrl?: string | null; | ||
| coverUrl?: string | null; | ||
| homepageUrl?: string | null; | ||
| origin?: string | null; | ||
| }; | ||
| url: string; | ||
| embedUrl?: string | null; | ||
| fallbackUrl?: string | null; | ||
| scopes?: string[]; | ||
| action: { | ||
| mode: 'open_iframe' | 'open_external'; | ||
| }; | ||
| } | ||
| type MentionSuggestionTrigger = '@' | '#'; | ||
| interface MentionSuggestion { | ||
| id: string; | ||
| kind: MessageMentionKind; | ||
| targetId: string; | ||
| token: string; | ||
| label: string; | ||
| description?: string | null; | ||
| serverId?: string; | ||
| serverSlug?: string | null; | ||
| serverName?: string | null; | ||
| channelId?: string; | ||
| channelName?: string | null; | ||
| appId?: string; | ||
| appKey?: string; | ||
| appName?: string | null; | ||
| iconUrl?: string | null; | ||
| userId?: string; | ||
| username?: string | null; | ||
| displayName?: string | null; | ||
| avatarUrl?: string | null; | ||
| isBot?: boolean; | ||
| isPrivate?: boolean; | ||
| } | ||
| interface Attachment { | ||
| id: string; | ||
| messageId: string; | ||
| filename: string; | ||
| url: string; | ||
| contentType: string; | ||
| size: number; | ||
| width: number | null; | ||
| height: number | null; | ||
| workspaceNodeId?: string | null; | ||
| kind?: 'file' | 'image' | 'voice'; | ||
| durationMs?: number | null; | ||
| audioCodec?: string | null; | ||
| audioContainer?: string | null; | ||
| waveformPeaks?: number[] | null; | ||
| waveformVersion?: number | null; | ||
| transcript?: { | ||
| id: string; | ||
| status: 'pending' | 'processing' | 'ready' | 'failed'; | ||
| text: string | null; | ||
| language: string | null; | ||
| source: 'client' | 'server' | 'runtime'; | ||
| provider?: string | null; | ||
| confidence?: number | null; | ||
| errorCode?: string | null; | ||
| updatedAt?: string; | ||
| } | null; | ||
| playback?: { | ||
| played: boolean; | ||
| completed: boolean; | ||
| lastPositionMs: number; | ||
| playedCount?: number; | ||
| } | null; | ||
| createdAt: string; | ||
| } | ||
| interface ReactionGroup { | ||
| emoji: string; | ||
| count: number; | ||
| userIds: string[]; | ||
| } | ||
| interface Thread { | ||
| id: string; | ||
| name: string; | ||
| channelId: string; | ||
| parentMessageId: string; | ||
| creatorId: string; | ||
| isArchived: boolean; | ||
| createdAt: string; | ||
| updatedAt: string; | ||
| } | ||
| interface SendMessageRequest { | ||
| content: string; | ||
| threadId?: string; | ||
| replyToId?: string; | ||
| mentions?: MessageMention[]; | ||
| metadata?: MessageMetadata; | ||
| } | ||
| interface UpdateMessageRequest { | ||
| content: string; | ||
| } | ||
| type NotificationType = 'mention' | 'reply' | 'dm' | 'system'; | ||
| interface Notification { | ||
| id: string; | ||
| userId: string; | ||
| type: NotificationType; | ||
| title: string; | ||
| body: string | null; | ||
| referenceId: string | null; | ||
| referenceType: string | null; | ||
| isRead: boolean; | ||
| createdAt: string; | ||
| } | ||
| export type { Attachment as A, CommerceMessageCard as C, GenericMessageCard as G, MentionSuggestion as M, Notification as N, OAuthLinkCard as O, PaidFileCard as P, ReactionGroup as R, SendMessageRequest as S, TaskMessageCard as T, UpdateMessageRequest as U, CommerceOfferCardInput as a, CommerceProductCard as b, MentionSuggestionTrigger as c, Message as d, MessageCard as e, MessageCardCapability as f, MessageCardClaim as g, MessageCardSource as h, MessageCardStatus as i, MessageMention as j, MessageMentionKind as k, MessageMentionRange as l, MessageMetadata as m, NotificationType as n, ServerAppMessageCard as o, Thread as p }; |
+1
-1
| export { CLIENT_EVENTS, ClientEvent, LIMITS, SERVER_EVENTS, ServerEvent } from './constants/index.cjs'; | ||
| export { DEFAULT_HOMEPLAY_CATALOG, ShadowHomePlayCatalogItem, ShadowPlayAction, ShadowPlayAvailability, getDefaultHomePlay, getPlayBuddyEmail, getPlayBuddyUsername } from './play-catalog/index.cjs'; | ||
| export { Agent, AgentCapability, AgentInfo, AgentKernelType, AgentStatus, AuthResponse, BUDDY_INBOX_TOPIC_PREFIX, BuddyInboxAdmissionMode, BuddyInboxAdmissionPendingDelivery, BuddyInboxAdmissionPendingTask, BuddyInboxAdmissionPolicy, BuddyInboxAdmissionRule, BuddyInboxAdmissionSubjectKind, Channel, ChannelSortBy, ChannelSortDirection, ChannelSortOptions, ChannelType, CreateAgentRequest, CreateChannelRequest, CreateServerRequest, DEFAULT_BUDDY_INBOX_ADMISSION_POLICY, FriendEntry, FriendSource, Friendship, FriendshipStatus, LoginRequest, Member, MemberRole, RegisterRequest, Server, TASK_MESSAGE_CARD_STATUSES, TASK_MESSAGE_CARD_STATUS_TRANSITIONS, TERMINAL_TASK_MESSAGE_CARD_STATUSES, UpdateChannelRequest, UpdateServerRequest, User, UserMembership, UserMembershipTier, UserProfile, UserStatus, VoiceChannelCredentials, VoiceChannelJoinResult, VoiceChannelLeaveResult, VoiceChannelPolicy, VoiceChannelState, VoiceParticipant, buddyInboxAdmissionRuleKey, buddyInboxTopic, canTransitionTaskMessageCardStatus, isBuddyInboxTopic, isTerminalTaskMessageCardStatus, normalizeBuddyInboxAdmissionPendingDeliveries, normalizeBuddyInboxAdmissionPolicy, parseBuddyInboxAgentId } from './types/index.cjs'; | ||
| export { A as Attachment, C as CommerceMessageCard, a as CommerceOfferCardInput, b as CommerceProductCard, G as GenericMessageCard, M as MentionSuggestion, c as MentionSuggestionTrigger, d as Message, e as MessageCard, f as MessageCardCapability, g as MessageCardClaim, h as MessageCardSource, i as MessageCardStatus, j as MessageMention, k as MessageMentionKind, l as MessageMentionRange, m as MessageMetadata, N as Notification, n as NotificationType, O as OAuthLinkCard, P as PaidFileCard, R as ReactionGroup, S as SendMessageRequest, o as ServerAppMessageCard, T as TaskMessageCard, p as Thread, U as UpdateMessageRequest } from './message.types-D5IHsEOR.cjs'; | ||
| export { A as Attachment, C as CommerceMessageCard, a as CommerceOfferCardInput, b as CommerceProductCard, G as GenericMessageCard, M as MentionSuggestion, c as MentionSuggestionTrigger, d as Message, e as MessageCard, f as MessageCardCapability, g as MessageCardClaim, h as MessageCardSource, i as MessageCardStatus, j as MessageMention, k as MessageMentionKind, l as MessageMentionRange, m as MessageMetadata, N as Notification, n as NotificationType, O as OAuthLinkCard, P as PaidFileCard, R as ReactionGroup, S as SendMessageRequest, o as ServerAppMessageCard, T as TaskMessageCard, p as Thread, U as UpdateMessageRequest } from './message.types-vb6-TCZv.cjs'; | ||
| export { BgPattern, CAT_AVATAR_COUNT, CatConfig, CatDecoration, CatExpression, CatPattern, MessageMentionTextSegment, assignMentionRanges, buildMentionMarkdownLinks, canonicalMentionToken, canonicalizeMentionContent, escapeMarkdownLinkLabel, formatDate, generateInviteCode, generateRandomCatConfig, getAllCatAvatars, getCatAvatar, getCatAvatarByUserId, getCatSvgString, isCanonicalMentionToken, isValidEmail, mentionDisplayText, parseCanonicalMentionToken, renderCatSvg, segmentTextByMentions, slugify } from './utils/index.cjs'; |
+1
-1
| export { CLIENT_EVENTS, ClientEvent, LIMITS, SERVER_EVENTS, ServerEvent } from './constants/index.js'; | ||
| export { DEFAULT_HOMEPLAY_CATALOG, ShadowHomePlayCatalogItem, ShadowPlayAction, ShadowPlayAvailability, getDefaultHomePlay, getPlayBuddyEmail, getPlayBuddyUsername } from './play-catalog/index.js'; | ||
| export { Agent, AgentCapability, AgentInfo, AgentKernelType, AgentStatus, AuthResponse, BUDDY_INBOX_TOPIC_PREFIX, BuddyInboxAdmissionMode, BuddyInboxAdmissionPendingDelivery, BuddyInboxAdmissionPendingTask, BuddyInboxAdmissionPolicy, BuddyInboxAdmissionRule, BuddyInboxAdmissionSubjectKind, Channel, ChannelSortBy, ChannelSortDirection, ChannelSortOptions, ChannelType, CreateAgentRequest, CreateChannelRequest, CreateServerRequest, DEFAULT_BUDDY_INBOX_ADMISSION_POLICY, FriendEntry, FriendSource, Friendship, FriendshipStatus, LoginRequest, Member, MemberRole, RegisterRequest, Server, TASK_MESSAGE_CARD_STATUSES, TASK_MESSAGE_CARD_STATUS_TRANSITIONS, TERMINAL_TASK_MESSAGE_CARD_STATUSES, UpdateChannelRequest, UpdateServerRequest, User, UserMembership, UserMembershipTier, UserProfile, UserStatus, VoiceChannelCredentials, VoiceChannelJoinResult, VoiceChannelLeaveResult, VoiceChannelPolicy, VoiceChannelState, VoiceParticipant, buddyInboxAdmissionRuleKey, buddyInboxTopic, canTransitionTaskMessageCardStatus, isBuddyInboxTopic, isTerminalTaskMessageCardStatus, normalizeBuddyInboxAdmissionPendingDeliveries, normalizeBuddyInboxAdmissionPolicy, parseBuddyInboxAgentId } from './types/index.js'; | ||
| export { A as Attachment, C as CommerceMessageCard, a as CommerceOfferCardInput, b as CommerceProductCard, G as GenericMessageCard, M as MentionSuggestion, c as MentionSuggestionTrigger, d as Message, e as MessageCard, f as MessageCardCapability, g as MessageCardClaim, h as MessageCardSource, i as MessageCardStatus, j as MessageMention, k as MessageMentionKind, l as MessageMentionRange, m as MessageMetadata, N as Notification, n as NotificationType, O as OAuthLinkCard, P as PaidFileCard, R as ReactionGroup, S as SendMessageRequest, o as ServerAppMessageCard, T as TaskMessageCard, p as Thread, U as UpdateMessageRequest } from './message.types-D5IHsEOR.js'; | ||
| export { A as Attachment, C as CommerceMessageCard, a as CommerceOfferCardInput, b as CommerceProductCard, G as GenericMessageCard, M as MentionSuggestion, c as MentionSuggestionTrigger, d as Message, e as MessageCard, f as MessageCardCapability, g as MessageCardClaim, h as MessageCardSource, i as MessageCardStatus, j as MessageMention, k as MessageMentionKind, l as MessageMentionRange, m as MessageMetadata, N as Notification, n as NotificationType, O as OAuthLinkCard, P as PaidFileCard, R as ReactionGroup, S as SendMessageRequest, o as ServerAppMessageCard, T as TaskMessageCard, p as Thread, U as UpdateMessageRequest } from './message.types-vb6-TCZv.js'; | ||
| export { BgPattern, CAT_AVATAR_COUNT, CatConfig, CatDecoration, CatExpression, CatPattern, MessageMentionTextSegment, assignMentionRanges, buildMentionMarkdownLinks, canonicalMentionToken, canonicalizeMentionContent, escapeMarkdownLinkLabel, formatDate, generateInviteCode, generateRandomCatConfig, getAllCatAvatars, getCatAvatar, getCatAvatarByUserId, getCatSvgString, isCanonicalMentionToken, isValidEmail, mentionDisplayText, parseCanonicalMentionToken, renderCatSvg, segmentTextByMentions, slugify } from './utils/index.js'; |
@@ -1,3 +0,3 @@ | ||
| import { h as MessageCardSource, i as MessageCardStatus } from '../message.types-D5IHsEOR.cjs'; | ||
| export { A as Attachment, C as CommerceMessageCard, a as CommerceOfferCardInput, b as CommerceProductCard, G as GenericMessageCard, M as MentionSuggestion, c as MentionSuggestionTrigger, d as Message, e as MessageCard, f as MessageCardCapability, g as MessageCardClaim, j as MessageMention, k as MessageMentionKind, l as MessageMentionRange, m as MessageMetadata, N as Notification, n as NotificationType, O as OAuthLinkCard, P as PaidFileCard, R as ReactionGroup, S as SendMessageRequest, o as ServerAppMessageCard, T as TaskMessageCard, p as Thread, U as UpdateMessageRequest } from '../message.types-D5IHsEOR.cjs'; | ||
| import { h as MessageCardSource, i as MessageCardStatus } from '../message.types-vb6-TCZv.cjs'; | ||
| export { A as Attachment, C as CommerceMessageCard, a as CommerceOfferCardInput, b as CommerceProductCard, G as GenericMessageCard, M as MentionSuggestion, c as MentionSuggestionTrigger, d as Message, e as MessageCard, f as MessageCardCapability, g as MessageCardClaim, j as MessageMention, k as MessageMentionKind, l as MessageMentionRange, m as MessageMetadata, N as Notification, n as NotificationType, O as OAuthLinkCard, P as PaidFileCard, R as ReactionGroup, S as SendMessageRequest, o as ServerAppMessageCard, T as TaskMessageCard, p as Thread, U as UpdateMessageRequest } from '../message.types-vb6-TCZv.cjs'; | ||
@@ -4,0 +4,0 @@ type AgentStatus = 'running' | 'stopped' | 'error'; |
@@ -1,3 +0,3 @@ | ||
| import { h as MessageCardSource, i as MessageCardStatus } from '../message.types-D5IHsEOR.js'; | ||
| export { A as Attachment, C as CommerceMessageCard, a as CommerceOfferCardInput, b as CommerceProductCard, G as GenericMessageCard, M as MentionSuggestion, c as MentionSuggestionTrigger, d as Message, e as MessageCard, f as MessageCardCapability, g as MessageCardClaim, j as MessageMention, k as MessageMentionKind, l as MessageMentionRange, m as MessageMetadata, N as Notification, n as NotificationType, O as OAuthLinkCard, P as PaidFileCard, R as ReactionGroup, S as SendMessageRequest, o as ServerAppMessageCard, T as TaskMessageCard, p as Thread, U as UpdateMessageRequest } from '../message.types-D5IHsEOR.js'; | ||
| import { h as MessageCardSource, i as MessageCardStatus } from '../message.types-vb6-TCZv.js'; | ||
| export { A as Attachment, C as CommerceMessageCard, a as CommerceOfferCardInput, b as CommerceProductCard, G as GenericMessageCard, M as MentionSuggestion, c as MentionSuggestionTrigger, d as Message, e as MessageCard, f as MessageCardCapability, g as MessageCardClaim, j as MessageMention, k as MessageMentionKind, l as MessageMentionRange, m as MessageMetadata, N as Notification, n as NotificationType, O as OAuthLinkCard, P as PaidFileCard, R as ReactionGroup, S as SendMessageRequest, o as ServerAppMessageCard, T as TaskMessageCard, p as Thread, U as UpdateMessageRequest } from '../message.types-vb6-TCZv.js'; | ||
@@ -4,0 +4,0 @@ type AgentStatus = 'running' | 'stopped' | 'error'; |
@@ -1,2 +0,2 @@ | ||
| import { l as MessageMentionRange, j as MessageMention } from '../message.types-D5IHsEOR.cjs'; | ||
| import { l as MessageMentionRange, j as MessageMention } from '../message.types-vb6-TCZv.cjs'; | ||
@@ -3,0 +3,0 @@ type CatPattern = 'none' | 'tabby' | 'tuxedo' | 'siamese' | 'calico' | 'bicolor'; |
@@ -1,2 +0,2 @@ | ||
| import { l as MessageMentionRange, j as MessageMention } from '../message.types-D5IHsEOR.js'; | ||
| import { l as MessageMentionRange, j as MessageMention } from '../message.types-vb6-TCZv.js'; | ||
@@ -3,0 +3,0 @@ type CatPattern = 'none' | 'tabby' | 'tuxedo' | 'siamese' | 'calico' | 'bicolor'; |
+1
-1
| { | ||
| "name": "@shadowob/shared", | ||
| "version": "1.1.20", | ||
| "version": "1.1.21", | ||
| "type": "module", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
| interface Message { | ||
| id: string; | ||
| content: string; | ||
| channelId: string; | ||
| authorId: string; | ||
| threadId: string | null; | ||
| replyToId: string | null; | ||
| isEdited: boolean; | ||
| isPinned: boolean; | ||
| createdAt: string; | ||
| updatedAt: string; | ||
| author?: { | ||
| id: string; | ||
| username: string; | ||
| displayName: string; | ||
| avatarUrl: string | null; | ||
| isBot: boolean; | ||
| }; | ||
| attachments?: Attachment[]; | ||
| reactions?: ReactionGroup[]; | ||
| metadata?: MessageMetadata | null; | ||
| } | ||
| type MessageMentionKind = 'user' | 'buddy' | 'app' | 'channel' | 'server' | 'here' | 'everyone'; | ||
| interface MessageMentionRange { | ||
| start: number; | ||
| end: number; | ||
| } | ||
| interface MessageMention { | ||
| kind: MessageMentionKind; | ||
| /** Canonical target id. For users this is userId, for channels channelId, for servers serverId. */ | ||
| targetId: string; | ||
| /** Canonical text persisted in message content, e.g. <@userId>, <#channelId>. */ | ||
| token: string; | ||
| /** Optional display text selected or typed by the sender before canonicalization. */ | ||
| sourceToken?: string; | ||
| /** Human-readable label used by renderers. */ | ||
| label: string; | ||
| /** Optional source range in content. Clients may omit it; servers may recompute later. */ | ||
| range?: MessageMentionRange; | ||
| serverId?: string; | ||
| serverSlug?: string | null; | ||
| serverName?: string | null; | ||
| channelId?: string; | ||
| channelName?: string | null; | ||
| appId?: string; | ||
| appKey?: string; | ||
| appName?: string | null; | ||
| iconUrl?: string | null; | ||
| userId?: string; | ||
| username?: string | null; | ||
| displayName?: string | null; | ||
| avatarUrl?: string | null; | ||
| isBot?: boolean; | ||
| isPrivate?: boolean; | ||
| } | ||
| interface MessageMetadata { | ||
| mentions?: MessageMention[]; | ||
| agentChain?: Record<string, unknown>; | ||
| interactive?: Record<string, unknown>; | ||
| interactiveResponse?: Record<string, unknown>; | ||
| interactiveState?: Record<string, unknown>; | ||
| cards?: MessageCard[]; | ||
| commerceCards?: CommerceMessageCard[]; | ||
| paidFileCards?: PaidFileCard[]; | ||
| oauthLinkCards?: OAuthLinkCard[]; | ||
| [key: string]: unknown; | ||
| } | ||
| type MessageCardStatus = 'queued' | 'claimed' | 'running' | 'completed' | 'failed' | 'canceled' | 'transferred'; | ||
| interface MessageCardSource { | ||
| kind: 'user' | 'pat' | 'oauth' | 'agent' | 'system' | 'server_app' | 'buddy'; | ||
| id?: string; | ||
| label?: string; | ||
| userId?: string; | ||
| agentId?: string; | ||
| appId?: string; | ||
| serverId?: string; | ||
| channelId?: string; | ||
| command?: string; | ||
| resource?: { | ||
| kind: string; | ||
| id: string; | ||
| label?: string; | ||
| url?: string; | ||
| [key: string]: unknown; | ||
| }; | ||
| [key: string]: unknown; | ||
| } | ||
| interface MessageCardClaim { | ||
| id: string; | ||
| actor: MessageCardSource; | ||
| claimedAt: string; | ||
| expiresAt: string; | ||
| } | ||
| interface MessageCardCapability { | ||
| kind: 'task'; | ||
| scope: string[]; | ||
| issuedAt: string; | ||
| expiresAt: string; | ||
| claimId?: string; | ||
| binding?: { | ||
| messageId?: string; | ||
| cardId: string; | ||
| workspaceId?: string; | ||
| }; | ||
| } | ||
| interface TaskMessageCard { | ||
| id: string; | ||
| kind: 'task'; | ||
| version: number; | ||
| title: string; | ||
| body?: string; | ||
| status: MessageCardStatus; | ||
| priority?: 'low' | 'normal' | 'high' | 'urgent'; | ||
| assignee?: { | ||
| agentId?: string; | ||
| userId?: string; | ||
| label?: string; | ||
| [key: string]: unknown; | ||
| }; | ||
| source?: MessageCardSource; | ||
| claim?: MessageCardClaim; | ||
| capability?: MessageCardCapability; | ||
| progress?: Array<{ | ||
| at: string; | ||
| status: MessageCardStatus; | ||
| note?: string; | ||
| actor?: MessageCardSource; | ||
| [key: string]: unknown; | ||
| }>; | ||
| createdAt: string; | ||
| updatedAt?: string; | ||
| data?: Record<string, unknown> & { | ||
| task?: { | ||
| workspaceId?: string; | ||
| [key: string]: unknown; | ||
| }; | ||
| }; | ||
| [key: string]: unknown; | ||
| } | ||
| type GenericMessageCard = { | ||
| id?: string; | ||
| kind: string; | ||
| version?: number; | ||
| title?: string; | ||
| data?: Record<string, unknown>; | ||
| [key: string]: unknown; | ||
| }; | ||
| interface ServerAppMessageCard { | ||
| id?: string; | ||
| kind: 'server_app'; | ||
| version?: number; | ||
| appKey: string; | ||
| title: string; | ||
| description?: string; | ||
| label?: string; | ||
| action?: { | ||
| mode: 'open_app'; | ||
| path?: string; | ||
| }; | ||
| data?: Record<string, unknown>; | ||
| [key: string]: unknown; | ||
| } | ||
| type MessageCard = TaskMessageCard | ServerAppMessageCard | GenericMessageCard; | ||
| interface CommerceOfferCardInput { | ||
| id?: string; | ||
| kind: 'offer'; | ||
| offerId: string; | ||
| } | ||
| type CommerceMessageCard = CommerceProductCard | CommerceOfferCardInput; | ||
| interface CommerceProductCard { | ||
| id: string; | ||
| kind: 'offer' | 'product'; | ||
| offerId?: string; | ||
| shopId: string; | ||
| shopScope: { | ||
| kind: 'server' | 'user'; | ||
| id: string; | ||
| }; | ||
| productId: string; | ||
| skuId?: string; | ||
| snapshot: { | ||
| name: string; | ||
| summary?: string | null; | ||
| imageUrl?: string | null; | ||
| shopName?: string | null; | ||
| deliveryPromise?: string | null; | ||
| price: number; | ||
| currency: string; | ||
| productType: 'physical' | 'entitlement'; | ||
| billingMode?: 'one_time' | 'fixed_duration' | 'subscription'; | ||
| durationSeconds?: number | null; | ||
| resourceType?: string; | ||
| resourceId?: string; | ||
| capability?: string; | ||
| }; | ||
| purchase: { | ||
| mode: 'direct' | 'select_sku' | 'open_detail'; | ||
| }; | ||
| } | ||
| interface PaidFileCard { | ||
| id: string; | ||
| kind: 'paid_file'; | ||
| fileId: string; | ||
| entitlementId?: string | null; | ||
| deliverableId?: string; | ||
| snapshot: { | ||
| name: string; | ||
| summary?: string | null; | ||
| mime?: string | null; | ||
| sizeBytes?: number | null; | ||
| previewUrl?: string | null; | ||
| }; | ||
| action: { | ||
| mode: 'open_paid_file'; | ||
| }; | ||
| } | ||
| interface OAuthLinkCard { | ||
| id: string; | ||
| kind: 'oauth_link'; | ||
| appId: string; | ||
| clientId?: string | null; | ||
| title: string; | ||
| description?: string | null; | ||
| iconUrl?: string | null; | ||
| meta?: { | ||
| appName?: string | null; | ||
| avatarUrl?: string | null; | ||
| iconUrl?: string | null; | ||
| coverUrl?: string | null; | ||
| homepageUrl?: string | null; | ||
| origin?: string | null; | ||
| }; | ||
| url: string; | ||
| embedUrl?: string | null; | ||
| fallbackUrl?: string | null; | ||
| scopes?: string[]; | ||
| action: { | ||
| mode: 'open_iframe' | 'open_external'; | ||
| }; | ||
| } | ||
| type MentionSuggestionTrigger = '@' | '#'; | ||
| interface MentionSuggestion { | ||
| id: string; | ||
| kind: MessageMentionKind; | ||
| targetId: string; | ||
| token: string; | ||
| label: string; | ||
| description?: string | null; | ||
| serverId?: string; | ||
| serverSlug?: string | null; | ||
| serverName?: string | null; | ||
| channelId?: string; | ||
| channelName?: string | null; | ||
| appId?: string; | ||
| appKey?: string; | ||
| appName?: string | null; | ||
| iconUrl?: string | null; | ||
| userId?: string; | ||
| username?: string | null; | ||
| displayName?: string | null; | ||
| avatarUrl?: string | null; | ||
| isBot?: boolean; | ||
| isPrivate?: boolean; | ||
| } | ||
| interface Attachment { | ||
| id: string; | ||
| messageId: string; | ||
| filename: string; | ||
| url: string; | ||
| contentType: string; | ||
| size: number; | ||
| width: number | null; | ||
| height: number | null; | ||
| workspaceNodeId?: string | null; | ||
| kind?: 'file' | 'image' | 'voice'; | ||
| durationMs?: number | null; | ||
| audioCodec?: string | null; | ||
| audioContainer?: string | null; | ||
| waveformPeaks?: number[] | null; | ||
| waveformVersion?: number | null; | ||
| transcript?: { | ||
| id: string; | ||
| status: 'pending' | 'processing' | 'ready' | 'failed'; | ||
| text: string | null; | ||
| language: string | null; | ||
| source: 'client' | 'server' | 'runtime'; | ||
| provider?: string | null; | ||
| confidence?: number | null; | ||
| errorCode?: string | null; | ||
| updatedAt?: string; | ||
| } | null; | ||
| playback?: { | ||
| played: boolean; | ||
| completed: boolean; | ||
| lastPositionMs: number; | ||
| playedCount?: number; | ||
| } | null; | ||
| createdAt: string; | ||
| } | ||
| interface ReactionGroup { | ||
| emoji: string; | ||
| count: number; | ||
| userIds: string[]; | ||
| } | ||
| interface Thread { | ||
| id: string; | ||
| name: string; | ||
| channelId: string; | ||
| parentMessageId: string; | ||
| creatorId: string; | ||
| isArchived: boolean; | ||
| createdAt: string; | ||
| updatedAt: string; | ||
| } | ||
| interface SendMessageRequest { | ||
| content: string; | ||
| threadId?: string; | ||
| replyToId?: string; | ||
| mentions?: MessageMention[]; | ||
| metadata?: MessageMetadata; | ||
| } | ||
| interface UpdateMessageRequest { | ||
| content: string; | ||
| } | ||
| type NotificationType = 'mention' | 'reply' | 'dm' | 'system'; | ||
| interface Notification { | ||
| id: string; | ||
| userId: string; | ||
| type: NotificationType; | ||
| title: string; | ||
| body: string | null; | ||
| referenceId: string | null; | ||
| referenceType: string | null; | ||
| isRead: boolean; | ||
| createdAt: string; | ||
| } | ||
| export type { Attachment as A, CommerceMessageCard as C, GenericMessageCard as G, MentionSuggestion as M, Notification as N, OAuthLinkCard as O, PaidFileCard as P, ReactionGroup as R, SendMessageRequest as S, TaskMessageCard as T, UpdateMessageRequest as U, CommerceOfferCardInput as a, CommerceProductCard as b, MentionSuggestionTrigger as c, Message as d, MessageCard as e, MessageCardCapability as f, MessageCardClaim as g, MessageCardSource as h, MessageCardStatus as i, MessageMention as j, MessageMentionKind as k, MessageMentionRange as l, MessageMetadata as m, NotificationType as n, ServerAppMessageCard as o, Thread as p }; |
| interface Message { | ||
| id: string; | ||
| content: string; | ||
| channelId: string; | ||
| authorId: string; | ||
| threadId: string | null; | ||
| replyToId: string | null; | ||
| isEdited: boolean; | ||
| isPinned: boolean; | ||
| createdAt: string; | ||
| updatedAt: string; | ||
| author?: { | ||
| id: string; | ||
| username: string; | ||
| displayName: string; | ||
| avatarUrl: string | null; | ||
| isBot: boolean; | ||
| }; | ||
| attachments?: Attachment[]; | ||
| reactions?: ReactionGroup[]; | ||
| metadata?: MessageMetadata | null; | ||
| } | ||
| type MessageMentionKind = 'user' | 'buddy' | 'app' | 'channel' | 'server' | 'here' | 'everyone'; | ||
| interface MessageMentionRange { | ||
| start: number; | ||
| end: number; | ||
| } | ||
| interface MessageMention { | ||
| kind: MessageMentionKind; | ||
| /** Canonical target id. For users this is userId, for channels channelId, for servers serverId. */ | ||
| targetId: string; | ||
| /** Canonical text persisted in message content, e.g. <@userId>, <#channelId>. */ | ||
| token: string; | ||
| /** Optional display text selected or typed by the sender before canonicalization. */ | ||
| sourceToken?: string; | ||
| /** Human-readable label used by renderers. */ | ||
| label: string; | ||
| /** Optional source range in content. Clients may omit it; servers may recompute later. */ | ||
| range?: MessageMentionRange; | ||
| serverId?: string; | ||
| serverSlug?: string | null; | ||
| serverName?: string | null; | ||
| channelId?: string; | ||
| channelName?: string | null; | ||
| appId?: string; | ||
| appKey?: string; | ||
| appName?: string | null; | ||
| iconUrl?: string | null; | ||
| userId?: string; | ||
| username?: string | null; | ||
| displayName?: string | null; | ||
| avatarUrl?: string | null; | ||
| isBot?: boolean; | ||
| isPrivate?: boolean; | ||
| } | ||
| interface MessageMetadata { | ||
| mentions?: MessageMention[]; | ||
| agentChain?: Record<string, unknown>; | ||
| interactive?: Record<string, unknown>; | ||
| interactiveResponse?: Record<string, unknown>; | ||
| interactiveState?: Record<string, unknown>; | ||
| cards?: MessageCard[]; | ||
| commerceCards?: CommerceMessageCard[]; | ||
| paidFileCards?: PaidFileCard[]; | ||
| oauthLinkCards?: OAuthLinkCard[]; | ||
| [key: string]: unknown; | ||
| } | ||
| type MessageCardStatus = 'queued' | 'claimed' | 'running' | 'completed' | 'failed' | 'canceled' | 'transferred'; | ||
| interface MessageCardSource { | ||
| kind: 'user' | 'pat' | 'oauth' | 'agent' | 'system' | 'server_app' | 'buddy'; | ||
| id?: string; | ||
| label?: string; | ||
| userId?: string; | ||
| agentId?: string; | ||
| appId?: string; | ||
| serverId?: string; | ||
| channelId?: string; | ||
| command?: string; | ||
| resource?: { | ||
| kind: string; | ||
| id: string; | ||
| label?: string; | ||
| url?: string; | ||
| [key: string]: unknown; | ||
| }; | ||
| [key: string]: unknown; | ||
| } | ||
| interface MessageCardClaim { | ||
| id: string; | ||
| actor: MessageCardSource; | ||
| claimedAt: string; | ||
| expiresAt: string; | ||
| } | ||
| interface MessageCardCapability { | ||
| kind: 'task'; | ||
| scope: string[]; | ||
| issuedAt: string; | ||
| expiresAt: string; | ||
| claimId?: string; | ||
| binding?: { | ||
| messageId?: string; | ||
| cardId: string; | ||
| workspaceId?: string; | ||
| }; | ||
| } | ||
| interface TaskMessageCard { | ||
| id: string; | ||
| kind: 'task'; | ||
| version: number; | ||
| title: string; | ||
| body?: string; | ||
| status: MessageCardStatus; | ||
| priority?: 'low' | 'normal' | 'high' | 'urgent'; | ||
| assignee?: { | ||
| agentId?: string; | ||
| userId?: string; | ||
| label?: string; | ||
| [key: string]: unknown; | ||
| }; | ||
| source?: MessageCardSource; | ||
| claim?: MessageCardClaim; | ||
| capability?: MessageCardCapability; | ||
| progress?: Array<{ | ||
| at: string; | ||
| status: MessageCardStatus; | ||
| note?: string; | ||
| actor?: MessageCardSource; | ||
| [key: string]: unknown; | ||
| }>; | ||
| createdAt: string; | ||
| updatedAt?: string; | ||
| data?: Record<string, unknown> & { | ||
| task?: { | ||
| workspaceId?: string; | ||
| [key: string]: unknown; | ||
| }; | ||
| }; | ||
| [key: string]: unknown; | ||
| } | ||
| type GenericMessageCard = { | ||
| id?: string; | ||
| kind: string; | ||
| version?: number; | ||
| title?: string; | ||
| data?: Record<string, unknown>; | ||
| [key: string]: unknown; | ||
| }; | ||
| interface ServerAppMessageCard { | ||
| id?: string; | ||
| kind: 'server_app'; | ||
| version?: number; | ||
| appKey: string; | ||
| title: string; | ||
| description?: string; | ||
| label?: string; | ||
| action?: { | ||
| mode: 'open_app'; | ||
| path?: string; | ||
| }; | ||
| data?: Record<string, unknown>; | ||
| [key: string]: unknown; | ||
| } | ||
| type MessageCard = TaskMessageCard | ServerAppMessageCard | GenericMessageCard; | ||
| interface CommerceOfferCardInput { | ||
| id?: string; | ||
| kind: 'offer'; | ||
| offerId: string; | ||
| } | ||
| type CommerceMessageCard = CommerceProductCard | CommerceOfferCardInput; | ||
| interface CommerceProductCard { | ||
| id: string; | ||
| kind: 'offer' | 'product'; | ||
| offerId?: string; | ||
| shopId: string; | ||
| shopScope: { | ||
| kind: 'server' | 'user'; | ||
| id: string; | ||
| }; | ||
| productId: string; | ||
| skuId?: string; | ||
| snapshot: { | ||
| name: string; | ||
| summary?: string | null; | ||
| imageUrl?: string | null; | ||
| shopName?: string | null; | ||
| deliveryPromise?: string | null; | ||
| price: number; | ||
| currency: string; | ||
| productType: 'physical' | 'entitlement'; | ||
| billingMode?: 'one_time' | 'fixed_duration' | 'subscription'; | ||
| durationSeconds?: number | null; | ||
| resourceType?: string; | ||
| resourceId?: string; | ||
| capability?: string; | ||
| }; | ||
| purchase: { | ||
| mode: 'direct' | 'select_sku' | 'open_detail'; | ||
| }; | ||
| } | ||
| interface PaidFileCard { | ||
| id: string; | ||
| kind: 'paid_file'; | ||
| fileId: string; | ||
| entitlementId?: string | null; | ||
| deliverableId?: string; | ||
| snapshot: { | ||
| name: string; | ||
| summary?: string | null; | ||
| mime?: string | null; | ||
| sizeBytes?: number | null; | ||
| previewUrl?: string | null; | ||
| }; | ||
| action: { | ||
| mode: 'open_paid_file'; | ||
| }; | ||
| } | ||
| interface OAuthLinkCard { | ||
| id: string; | ||
| kind: 'oauth_link'; | ||
| appId: string; | ||
| clientId?: string | null; | ||
| title: string; | ||
| description?: string | null; | ||
| iconUrl?: string | null; | ||
| meta?: { | ||
| appName?: string | null; | ||
| avatarUrl?: string | null; | ||
| iconUrl?: string | null; | ||
| coverUrl?: string | null; | ||
| homepageUrl?: string | null; | ||
| origin?: string | null; | ||
| }; | ||
| url: string; | ||
| embedUrl?: string | null; | ||
| fallbackUrl?: string | null; | ||
| scopes?: string[]; | ||
| action: { | ||
| mode: 'open_iframe' | 'open_external'; | ||
| }; | ||
| } | ||
| type MentionSuggestionTrigger = '@' | '#'; | ||
| interface MentionSuggestion { | ||
| id: string; | ||
| kind: MessageMentionKind; | ||
| targetId: string; | ||
| token: string; | ||
| label: string; | ||
| description?: string | null; | ||
| serverId?: string; | ||
| serverSlug?: string | null; | ||
| serverName?: string | null; | ||
| channelId?: string; | ||
| channelName?: string | null; | ||
| appId?: string; | ||
| appKey?: string; | ||
| appName?: string | null; | ||
| iconUrl?: string | null; | ||
| userId?: string; | ||
| username?: string | null; | ||
| displayName?: string | null; | ||
| avatarUrl?: string | null; | ||
| isBot?: boolean; | ||
| isPrivate?: boolean; | ||
| } | ||
| interface Attachment { | ||
| id: string; | ||
| messageId: string; | ||
| filename: string; | ||
| url: string; | ||
| contentType: string; | ||
| size: number; | ||
| width: number | null; | ||
| height: number | null; | ||
| workspaceNodeId?: string | null; | ||
| kind?: 'file' | 'image' | 'voice'; | ||
| durationMs?: number | null; | ||
| audioCodec?: string | null; | ||
| audioContainer?: string | null; | ||
| waveformPeaks?: number[] | null; | ||
| waveformVersion?: number | null; | ||
| transcript?: { | ||
| id: string; | ||
| status: 'pending' | 'processing' | 'ready' | 'failed'; | ||
| text: string | null; | ||
| language: string | null; | ||
| source: 'client' | 'server' | 'runtime'; | ||
| provider?: string | null; | ||
| confidence?: number | null; | ||
| errorCode?: string | null; | ||
| updatedAt?: string; | ||
| } | null; | ||
| playback?: { | ||
| played: boolean; | ||
| completed: boolean; | ||
| lastPositionMs: number; | ||
| playedCount?: number; | ||
| } | null; | ||
| createdAt: string; | ||
| } | ||
| interface ReactionGroup { | ||
| emoji: string; | ||
| count: number; | ||
| userIds: string[]; | ||
| } | ||
| interface Thread { | ||
| id: string; | ||
| name: string; | ||
| channelId: string; | ||
| parentMessageId: string; | ||
| creatorId: string; | ||
| isArchived: boolean; | ||
| createdAt: string; | ||
| updatedAt: string; | ||
| } | ||
| interface SendMessageRequest { | ||
| content: string; | ||
| threadId?: string; | ||
| replyToId?: string; | ||
| mentions?: MessageMention[]; | ||
| metadata?: MessageMetadata; | ||
| } | ||
| interface UpdateMessageRequest { | ||
| content: string; | ||
| } | ||
| type NotificationType = 'mention' | 'reply' | 'dm' | 'system'; | ||
| interface Notification { | ||
| id: string; | ||
| userId: string; | ||
| type: NotificationType; | ||
| title: string; | ||
| body: string | null; | ||
| referenceId: string | null; | ||
| referenceType: string | null; | ||
| isRead: boolean; | ||
| createdAt: string; | ||
| } | ||
| export type { Attachment as A, CommerceMessageCard as C, GenericMessageCard as G, MentionSuggestion as M, Notification as N, OAuthLinkCard as O, PaidFileCard as P, ReactionGroup as R, SendMessageRequest as S, TaskMessageCard as T, UpdateMessageRequest as U, CommerceOfferCardInput as a, CommerceProductCard as b, MentionSuggestionTrigger as c, Message as d, MessageCard as e, MessageCardCapability as f, MessageCardClaim as g, MessageCardSource as h, MessageCardStatus as i, MessageMention as j, MessageMentionKind as k, MessageMentionRange as l, MessageMetadata as m, NotificationType as n, ServerAppMessageCard as o, Thread as p }; |
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
255666
0.49%4672
0.28%