@shadowob/shared 1.1.1 → 1.1.3-dev.261
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-EMLX23LF.js → chunk-DMUZB4WV.js} +3 -4
- package/dist/{chunk-PXKHJSTK.js → chunk-E3UBH4AI.js} +193 -0
- package/dist/chunk-EXZEQO5X.js +429 -0
- package/dist/constants/index.cjs +3 -4
- package/dist/constants/index.d.cts +2 -3
- package/dist/constants/index.d.ts +2 -3
- package/dist/constants/index.js +1 -1
- package/dist/index.cjs +637 -4
- package/dist/index.d.cts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +32 -2
- package/dist/message.types-Cyp3tmIX.d.cts +207 -0
- package/dist/message.types-Cyp3tmIX.d.ts +207 -0
- package/dist/play-catalog/index.cjs +457 -0
- package/dist/play-catalog/index.d.cts +77 -0
- package/dist/play-catalog/index.d.ts +77 -0
- package/dist/play-catalog/index.js +14 -0
- package/dist/types/index.d.cts +23 -120
- package/dist/types/index.d.ts +23 -120
- package/dist/utils/index.cjs +202 -0
- package/dist/utils/index.d.cts +40 -1
- package/dist/utils/index.d.ts +40 -1
- package/dist/utils/index.js +19 -1
- package/package.json +15 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export { CLIENT_EVENTS, ClientEvent, LIMITS, SERVER_EVENTS, ServerEvent } from './constants/index.cjs';
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
2
|
+
export { DEFAULT_HOMEPLAY_CATALOG, SHADOW_PLAY_SERVER_TEMPLATE, ShadowHomePlayCatalogItem, ShadowPlayAction, ShadowPlayAvailability, ShadowPlayServerTemplate, getDefaultHomePlay, getPlayBuddyEmail, getPlayBuddyUsername } from './play-catalog/index.cjs';
|
|
3
|
+
export { Agent, AgentCapability, AgentInfo, AgentKernelType, AgentStatus, AuthResponse, Channel, ChannelSortBy, ChannelSortDirection, ChannelSortOptions, ChannelType, CreateAgentRequest, CreateChannelRequest, CreateServerRequest, FriendEntry, FriendSource, Friendship, FriendshipStatus, LoginRequest, Member, MemberRole, RegisterRequest, Server, UpdateChannelRequest, UpdateServerRequest, User, UserMembership, UserMembershipTier, UserProfile, UserStatus } from './types/index.cjs';
|
|
4
|
+
export { A as Attachment, C as CommerceMessageCard, a as CommerceOfferCardInput, b as CommerceProductCard, M as MentionSuggestion, c as MentionSuggestionTrigger, d as Message, e as MessageMention, f as MessageMentionKind, g as MessageMentionRange, h as MessageMetadata, N as Notification, i as NotificationType, O as OAuthLinkCard, P as PaidFileCard, R as ReactionGroup, S as SendMessageRequest, T as Thread, U as UpdateMessageRequest } from './message.types-Cyp3tmIX.cjs';
|
|
5
|
+
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';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export { CLIENT_EVENTS, ClientEvent, LIMITS, SERVER_EVENTS, ServerEvent } from './constants/index.js';
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
2
|
+
export { DEFAULT_HOMEPLAY_CATALOG, SHADOW_PLAY_SERVER_TEMPLATE, ShadowHomePlayCatalogItem, ShadowPlayAction, ShadowPlayAvailability, ShadowPlayServerTemplate, getDefaultHomePlay, getPlayBuddyEmail, getPlayBuddyUsername } from './play-catalog/index.js';
|
|
3
|
+
export { Agent, AgentCapability, AgentInfo, AgentKernelType, AgentStatus, AuthResponse, Channel, ChannelSortBy, ChannelSortDirection, ChannelSortOptions, ChannelType, CreateAgentRequest, CreateChannelRequest, CreateServerRequest, FriendEntry, FriendSource, Friendship, FriendshipStatus, LoginRequest, Member, MemberRole, RegisterRequest, Server, UpdateChannelRequest, UpdateServerRequest, User, UserMembership, UserMembershipTier, UserProfile, UserStatus } from './types/index.js';
|
|
4
|
+
export { A as Attachment, C as CommerceMessageCard, a as CommerceOfferCardInput, b as CommerceProductCard, M as MentionSuggestion, c as MentionSuggestionTrigger, d as Message, e as MessageMention, f as MessageMentionKind, g as MessageMentionRange, h as MessageMetadata, N as Notification, i as NotificationType, O as OAuthLinkCard, P as PaidFileCard, R as ReactionGroup, S as SendMessageRequest, T as Thread, U as UpdateMessageRequest } from './message.types-Cyp3tmIX.js';
|
|
5
|
+
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';
|
package/dist/index.js
CHANGED
|
@@ -2,10 +2,22 @@ import {
|
|
|
2
2
|
CLIENT_EVENTS,
|
|
3
3
|
LIMITS,
|
|
4
4
|
SERVER_EVENTS
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-DMUZB4WV.js";
|
|
6
6
|
import "./chunk-6H4LIJZC.js";
|
|
7
|
+
import {
|
|
8
|
+
DEFAULT_HOMEPLAY_CATALOG,
|
|
9
|
+
SHADOW_PLAY_SERVER_TEMPLATE,
|
|
10
|
+
getDefaultHomePlay,
|
|
11
|
+
getPlayBuddyEmail,
|
|
12
|
+
getPlayBuddyUsername
|
|
13
|
+
} from "./chunk-EXZEQO5X.js";
|
|
7
14
|
import {
|
|
8
15
|
CAT_AVATAR_COUNT,
|
|
16
|
+
assignMentionRanges,
|
|
17
|
+
buildMentionMarkdownLinks,
|
|
18
|
+
canonicalMentionToken,
|
|
19
|
+
canonicalizeMentionContent,
|
|
20
|
+
escapeMarkdownLinkLabel,
|
|
9
21
|
formatDate,
|
|
10
22
|
generateInviteCode,
|
|
11
23
|
generateRandomCatConfig,
|
|
@@ -13,15 +25,26 @@ import {
|
|
|
13
25
|
getCatAvatar,
|
|
14
26
|
getCatAvatarByUserId,
|
|
15
27
|
getCatSvgString,
|
|
28
|
+
isCanonicalMentionToken,
|
|
16
29
|
isValidEmail,
|
|
30
|
+
mentionDisplayText,
|
|
31
|
+
parseCanonicalMentionToken,
|
|
17
32
|
renderCatSvg,
|
|
33
|
+
segmentTextByMentions,
|
|
18
34
|
slugify
|
|
19
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-E3UBH4AI.js";
|
|
20
36
|
export {
|
|
21
37
|
CAT_AVATAR_COUNT,
|
|
22
38
|
CLIENT_EVENTS,
|
|
39
|
+
DEFAULT_HOMEPLAY_CATALOG,
|
|
23
40
|
LIMITS,
|
|
24
41
|
SERVER_EVENTS,
|
|
42
|
+
SHADOW_PLAY_SERVER_TEMPLATE,
|
|
43
|
+
assignMentionRanges,
|
|
44
|
+
buildMentionMarkdownLinks,
|
|
45
|
+
canonicalMentionToken,
|
|
46
|
+
canonicalizeMentionContent,
|
|
47
|
+
escapeMarkdownLinkLabel,
|
|
25
48
|
formatDate,
|
|
26
49
|
generateInviteCode,
|
|
27
50
|
generateRandomCatConfig,
|
|
@@ -29,7 +52,14 @@ export {
|
|
|
29
52
|
getCatAvatar,
|
|
30
53
|
getCatAvatarByUserId,
|
|
31
54
|
getCatSvgString,
|
|
55
|
+
getDefaultHomePlay,
|
|
56
|
+
getPlayBuddyEmail,
|
|
57
|
+
getPlayBuddyUsername,
|
|
58
|
+
isCanonicalMentionToken,
|
|
32
59
|
isValidEmail,
|
|
60
|
+
mentionDisplayText,
|
|
61
|
+
parseCanonicalMentionToken,
|
|
33
62
|
renderCatSvg,
|
|
63
|
+
segmentTextByMentions,
|
|
34
64
|
slugify
|
|
35
65
|
};
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
interface Message {
|
|
2
|
+
id: string;
|
|
3
|
+
content: string;
|
|
4
|
+
channelId: string;
|
|
5
|
+
authorId: string;
|
|
6
|
+
threadId: string | null;
|
|
7
|
+
replyToId: string | null;
|
|
8
|
+
isEdited: boolean;
|
|
9
|
+
isPinned: boolean;
|
|
10
|
+
createdAt: string;
|
|
11
|
+
updatedAt: string;
|
|
12
|
+
author?: {
|
|
13
|
+
id: string;
|
|
14
|
+
username: string;
|
|
15
|
+
displayName: string;
|
|
16
|
+
avatarUrl: string | null;
|
|
17
|
+
isBot: boolean;
|
|
18
|
+
};
|
|
19
|
+
attachments?: Attachment[];
|
|
20
|
+
reactions?: ReactionGroup[];
|
|
21
|
+
metadata?: MessageMetadata | null;
|
|
22
|
+
}
|
|
23
|
+
type MessageMentionKind = 'user' | 'buddy' | 'channel' | 'server' | 'here' | 'everyone';
|
|
24
|
+
interface MessageMentionRange {
|
|
25
|
+
start: number;
|
|
26
|
+
end: number;
|
|
27
|
+
}
|
|
28
|
+
interface MessageMention {
|
|
29
|
+
kind: MessageMentionKind;
|
|
30
|
+
/** Canonical target id. For users this is userId, for channels channelId, for servers serverId. */
|
|
31
|
+
targetId: string;
|
|
32
|
+
/** Canonical text persisted in message content, e.g. <@userId>, <#channelId>. */
|
|
33
|
+
token: string;
|
|
34
|
+
/** Optional display text selected or typed by the sender before canonicalization. */
|
|
35
|
+
sourceToken?: string;
|
|
36
|
+
/** Human-readable label used by renderers. */
|
|
37
|
+
label: string;
|
|
38
|
+
/** Optional source range in content. Clients may omit it; servers may recompute later. */
|
|
39
|
+
range?: MessageMentionRange;
|
|
40
|
+
serverId?: string;
|
|
41
|
+
serverSlug?: string | null;
|
|
42
|
+
serverName?: string | null;
|
|
43
|
+
channelId?: string;
|
|
44
|
+
channelName?: string | null;
|
|
45
|
+
userId?: string;
|
|
46
|
+
username?: string | null;
|
|
47
|
+
displayName?: string | null;
|
|
48
|
+
avatarUrl?: string | null;
|
|
49
|
+
isBot?: boolean;
|
|
50
|
+
isPrivate?: boolean;
|
|
51
|
+
}
|
|
52
|
+
interface MessageMetadata {
|
|
53
|
+
mentions?: MessageMention[];
|
|
54
|
+
agentChain?: Record<string, unknown>;
|
|
55
|
+
interactive?: Record<string, unknown>;
|
|
56
|
+
interactiveResponse?: Record<string, unknown>;
|
|
57
|
+
interactiveState?: Record<string, unknown>;
|
|
58
|
+
commerceCards?: CommerceMessageCard[];
|
|
59
|
+
paidFileCards?: PaidFileCard[];
|
|
60
|
+
oauthLinkCards?: OAuthLinkCard[];
|
|
61
|
+
[key: string]: unknown;
|
|
62
|
+
}
|
|
63
|
+
interface CommerceOfferCardInput {
|
|
64
|
+
id?: string;
|
|
65
|
+
kind: 'offer';
|
|
66
|
+
offerId: string;
|
|
67
|
+
}
|
|
68
|
+
type CommerceMessageCard = CommerceProductCard | CommerceOfferCardInput;
|
|
69
|
+
interface CommerceProductCard {
|
|
70
|
+
id: string;
|
|
71
|
+
kind: 'offer' | 'product';
|
|
72
|
+
offerId?: string;
|
|
73
|
+
shopId: string;
|
|
74
|
+
shopScope: {
|
|
75
|
+
kind: 'server' | 'user';
|
|
76
|
+
id: string;
|
|
77
|
+
};
|
|
78
|
+
productId: string;
|
|
79
|
+
skuId?: string;
|
|
80
|
+
snapshot: {
|
|
81
|
+
name: string;
|
|
82
|
+
summary?: string | null;
|
|
83
|
+
imageUrl?: string | null;
|
|
84
|
+
price: number;
|
|
85
|
+
currency: string;
|
|
86
|
+
productType: 'physical' | 'entitlement';
|
|
87
|
+
billingMode?: 'one_time' | 'fixed_duration' | 'subscription';
|
|
88
|
+
durationSeconds?: number | null;
|
|
89
|
+
resourceType?: string;
|
|
90
|
+
resourceId?: string;
|
|
91
|
+
capability?: string;
|
|
92
|
+
};
|
|
93
|
+
purchase: {
|
|
94
|
+
mode: 'direct' | 'select_sku' | 'open_detail';
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
interface PaidFileCard {
|
|
98
|
+
id: string;
|
|
99
|
+
kind: 'paid_file';
|
|
100
|
+
fileId: string;
|
|
101
|
+
entitlementId?: string | null;
|
|
102
|
+
deliverableId?: string;
|
|
103
|
+
snapshot: {
|
|
104
|
+
name: string;
|
|
105
|
+
summary?: string | null;
|
|
106
|
+
mime?: string | null;
|
|
107
|
+
sizeBytes?: number | null;
|
|
108
|
+
previewUrl?: string | null;
|
|
109
|
+
};
|
|
110
|
+
action: {
|
|
111
|
+
mode: 'open_paid_file';
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
interface OAuthLinkCard {
|
|
115
|
+
id: string;
|
|
116
|
+
kind: 'oauth_link';
|
|
117
|
+
appId: string;
|
|
118
|
+
clientId?: string | null;
|
|
119
|
+
title: string;
|
|
120
|
+
description?: string | null;
|
|
121
|
+
iconUrl?: string | null;
|
|
122
|
+
meta?: {
|
|
123
|
+
appName?: string | null;
|
|
124
|
+
avatarUrl?: string | null;
|
|
125
|
+
iconUrl?: string | null;
|
|
126
|
+
coverUrl?: string | null;
|
|
127
|
+
homepageUrl?: string | null;
|
|
128
|
+
origin?: string | null;
|
|
129
|
+
};
|
|
130
|
+
url: string;
|
|
131
|
+
embedUrl?: string | null;
|
|
132
|
+
fallbackUrl?: string | null;
|
|
133
|
+
scopes?: string[];
|
|
134
|
+
action: {
|
|
135
|
+
mode: 'open_iframe' | 'open_external';
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
type MentionSuggestionTrigger = '@' | '#';
|
|
139
|
+
interface MentionSuggestion {
|
|
140
|
+
id: string;
|
|
141
|
+
kind: MessageMentionKind;
|
|
142
|
+
targetId: string;
|
|
143
|
+
token: string;
|
|
144
|
+
label: string;
|
|
145
|
+
description?: string | null;
|
|
146
|
+
serverId?: string;
|
|
147
|
+
serverSlug?: string | null;
|
|
148
|
+
serverName?: string | null;
|
|
149
|
+
channelId?: string;
|
|
150
|
+
channelName?: string | null;
|
|
151
|
+
userId?: string;
|
|
152
|
+
username?: string | null;
|
|
153
|
+
displayName?: string | null;
|
|
154
|
+
avatarUrl?: string | null;
|
|
155
|
+
isBot?: boolean;
|
|
156
|
+
isPrivate?: boolean;
|
|
157
|
+
}
|
|
158
|
+
interface Attachment {
|
|
159
|
+
id: string;
|
|
160
|
+
messageId: string;
|
|
161
|
+
filename: string;
|
|
162
|
+
url: string;
|
|
163
|
+
contentType: string;
|
|
164
|
+
size: number;
|
|
165
|
+
width: number | null;
|
|
166
|
+
height: number | null;
|
|
167
|
+
createdAt: string;
|
|
168
|
+
}
|
|
169
|
+
interface ReactionGroup {
|
|
170
|
+
emoji: string;
|
|
171
|
+
count: number;
|
|
172
|
+
userIds: string[];
|
|
173
|
+
}
|
|
174
|
+
interface Thread {
|
|
175
|
+
id: string;
|
|
176
|
+
name: string;
|
|
177
|
+
channelId: string;
|
|
178
|
+
parentMessageId: string;
|
|
179
|
+
creatorId: string;
|
|
180
|
+
isArchived: boolean;
|
|
181
|
+
createdAt: string;
|
|
182
|
+
updatedAt: string;
|
|
183
|
+
}
|
|
184
|
+
interface SendMessageRequest {
|
|
185
|
+
content: string;
|
|
186
|
+
threadId?: string;
|
|
187
|
+
replyToId?: string;
|
|
188
|
+
mentions?: MessageMention[];
|
|
189
|
+
metadata?: MessageMetadata;
|
|
190
|
+
}
|
|
191
|
+
interface UpdateMessageRequest {
|
|
192
|
+
content: string;
|
|
193
|
+
}
|
|
194
|
+
type NotificationType = 'mention' | 'reply' | 'dm' | 'system';
|
|
195
|
+
interface Notification {
|
|
196
|
+
id: string;
|
|
197
|
+
userId: string;
|
|
198
|
+
type: NotificationType;
|
|
199
|
+
title: string;
|
|
200
|
+
body: string | null;
|
|
201
|
+
referenceId: string | null;
|
|
202
|
+
referenceType: string | null;
|
|
203
|
+
isRead: boolean;
|
|
204
|
+
createdAt: string;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
export type { Attachment as A, CommerceMessageCard as C, MentionSuggestion as M, Notification as N, OAuthLinkCard as O, PaidFileCard as P, ReactionGroup as R, SendMessageRequest as S, Thread as T, UpdateMessageRequest as U, CommerceOfferCardInput as a, CommerceProductCard as b, MentionSuggestionTrigger as c, Message as d, MessageMention as e, MessageMentionKind as f, MessageMentionRange as g, MessageMetadata as h, NotificationType as i };
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
interface Message {
|
|
2
|
+
id: string;
|
|
3
|
+
content: string;
|
|
4
|
+
channelId: string;
|
|
5
|
+
authorId: string;
|
|
6
|
+
threadId: string | null;
|
|
7
|
+
replyToId: string | null;
|
|
8
|
+
isEdited: boolean;
|
|
9
|
+
isPinned: boolean;
|
|
10
|
+
createdAt: string;
|
|
11
|
+
updatedAt: string;
|
|
12
|
+
author?: {
|
|
13
|
+
id: string;
|
|
14
|
+
username: string;
|
|
15
|
+
displayName: string;
|
|
16
|
+
avatarUrl: string | null;
|
|
17
|
+
isBot: boolean;
|
|
18
|
+
};
|
|
19
|
+
attachments?: Attachment[];
|
|
20
|
+
reactions?: ReactionGroup[];
|
|
21
|
+
metadata?: MessageMetadata | null;
|
|
22
|
+
}
|
|
23
|
+
type MessageMentionKind = 'user' | 'buddy' | 'channel' | 'server' | 'here' | 'everyone';
|
|
24
|
+
interface MessageMentionRange {
|
|
25
|
+
start: number;
|
|
26
|
+
end: number;
|
|
27
|
+
}
|
|
28
|
+
interface MessageMention {
|
|
29
|
+
kind: MessageMentionKind;
|
|
30
|
+
/** Canonical target id. For users this is userId, for channels channelId, for servers serverId. */
|
|
31
|
+
targetId: string;
|
|
32
|
+
/** Canonical text persisted in message content, e.g. <@userId>, <#channelId>. */
|
|
33
|
+
token: string;
|
|
34
|
+
/** Optional display text selected or typed by the sender before canonicalization. */
|
|
35
|
+
sourceToken?: string;
|
|
36
|
+
/** Human-readable label used by renderers. */
|
|
37
|
+
label: string;
|
|
38
|
+
/** Optional source range in content. Clients may omit it; servers may recompute later. */
|
|
39
|
+
range?: MessageMentionRange;
|
|
40
|
+
serverId?: string;
|
|
41
|
+
serverSlug?: string | null;
|
|
42
|
+
serverName?: string | null;
|
|
43
|
+
channelId?: string;
|
|
44
|
+
channelName?: string | null;
|
|
45
|
+
userId?: string;
|
|
46
|
+
username?: string | null;
|
|
47
|
+
displayName?: string | null;
|
|
48
|
+
avatarUrl?: string | null;
|
|
49
|
+
isBot?: boolean;
|
|
50
|
+
isPrivate?: boolean;
|
|
51
|
+
}
|
|
52
|
+
interface MessageMetadata {
|
|
53
|
+
mentions?: MessageMention[];
|
|
54
|
+
agentChain?: Record<string, unknown>;
|
|
55
|
+
interactive?: Record<string, unknown>;
|
|
56
|
+
interactiveResponse?: Record<string, unknown>;
|
|
57
|
+
interactiveState?: Record<string, unknown>;
|
|
58
|
+
commerceCards?: CommerceMessageCard[];
|
|
59
|
+
paidFileCards?: PaidFileCard[];
|
|
60
|
+
oauthLinkCards?: OAuthLinkCard[];
|
|
61
|
+
[key: string]: unknown;
|
|
62
|
+
}
|
|
63
|
+
interface CommerceOfferCardInput {
|
|
64
|
+
id?: string;
|
|
65
|
+
kind: 'offer';
|
|
66
|
+
offerId: string;
|
|
67
|
+
}
|
|
68
|
+
type CommerceMessageCard = CommerceProductCard | CommerceOfferCardInput;
|
|
69
|
+
interface CommerceProductCard {
|
|
70
|
+
id: string;
|
|
71
|
+
kind: 'offer' | 'product';
|
|
72
|
+
offerId?: string;
|
|
73
|
+
shopId: string;
|
|
74
|
+
shopScope: {
|
|
75
|
+
kind: 'server' | 'user';
|
|
76
|
+
id: string;
|
|
77
|
+
};
|
|
78
|
+
productId: string;
|
|
79
|
+
skuId?: string;
|
|
80
|
+
snapshot: {
|
|
81
|
+
name: string;
|
|
82
|
+
summary?: string | null;
|
|
83
|
+
imageUrl?: string | null;
|
|
84
|
+
price: number;
|
|
85
|
+
currency: string;
|
|
86
|
+
productType: 'physical' | 'entitlement';
|
|
87
|
+
billingMode?: 'one_time' | 'fixed_duration' | 'subscription';
|
|
88
|
+
durationSeconds?: number | null;
|
|
89
|
+
resourceType?: string;
|
|
90
|
+
resourceId?: string;
|
|
91
|
+
capability?: string;
|
|
92
|
+
};
|
|
93
|
+
purchase: {
|
|
94
|
+
mode: 'direct' | 'select_sku' | 'open_detail';
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
interface PaidFileCard {
|
|
98
|
+
id: string;
|
|
99
|
+
kind: 'paid_file';
|
|
100
|
+
fileId: string;
|
|
101
|
+
entitlementId?: string | null;
|
|
102
|
+
deliverableId?: string;
|
|
103
|
+
snapshot: {
|
|
104
|
+
name: string;
|
|
105
|
+
summary?: string | null;
|
|
106
|
+
mime?: string | null;
|
|
107
|
+
sizeBytes?: number | null;
|
|
108
|
+
previewUrl?: string | null;
|
|
109
|
+
};
|
|
110
|
+
action: {
|
|
111
|
+
mode: 'open_paid_file';
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
interface OAuthLinkCard {
|
|
115
|
+
id: string;
|
|
116
|
+
kind: 'oauth_link';
|
|
117
|
+
appId: string;
|
|
118
|
+
clientId?: string | null;
|
|
119
|
+
title: string;
|
|
120
|
+
description?: string | null;
|
|
121
|
+
iconUrl?: string | null;
|
|
122
|
+
meta?: {
|
|
123
|
+
appName?: string | null;
|
|
124
|
+
avatarUrl?: string | null;
|
|
125
|
+
iconUrl?: string | null;
|
|
126
|
+
coverUrl?: string | null;
|
|
127
|
+
homepageUrl?: string | null;
|
|
128
|
+
origin?: string | null;
|
|
129
|
+
};
|
|
130
|
+
url: string;
|
|
131
|
+
embedUrl?: string | null;
|
|
132
|
+
fallbackUrl?: string | null;
|
|
133
|
+
scopes?: string[];
|
|
134
|
+
action: {
|
|
135
|
+
mode: 'open_iframe' | 'open_external';
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
type MentionSuggestionTrigger = '@' | '#';
|
|
139
|
+
interface MentionSuggestion {
|
|
140
|
+
id: string;
|
|
141
|
+
kind: MessageMentionKind;
|
|
142
|
+
targetId: string;
|
|
143
|
+
token: string;
|
|
144
|
+
label: string;
|
|
145
|
+
description?: string | null;
|
|
146
|
+
serverId?: string;
|
|
147
|
+
serverSlug?: string | null;
|
|
148
|
+
serverName?: string | null;
|
|
149
|
+
channelId?: string;
|
|
150
|
+
channelName?: string | null;
|
|
151
|
+
userId?: string;
|
|
152
|
+
username?: string | null;
|
|
153
|
+
displayName?: string | null;
|
|
154
|
+
avatarUrl?: string | null;
|
|
155
|
+
isBot?: boolean;
|
|
156
|
+
isPrivate?: boolean;
|
|
157
|
+
}
|
|
158
|
+
interface Attachment {
|
|
159
|
+
id: string;
|
|
160
|
+
messageId: string;
|
|
161
|
+
filename: string;
|
|
162
|
+
url: string;
|
|
163
|
+
contentType: string;
|
|
164
|
+
size: number;
|
|
165
|
+
width: number | null;
|
|
166
|
+
height: number | null;
|
|
167
|
+
createdAt: string;
|
|
168
|
+
}
|
|
169
|
+
interface ReactionGroup {
|
|
170
|
+
emoji: string;
|
|
171
|
+
count: number;
|
|
172
|
+
userIds: string[];
|
|
173
|
+
}
|
|
174
|
+
interface Thread {
|
|
175
|
+
id: string;
|
|
176
|
+
name: string;
|
|
177
|
+
channelId: string;
|
|
178
|
+
parentMessageId: string;
|
|
179
|
+
creatorId: string;
|
|
180
|
+
isArchived: boolean;
|
|
181
|
+
createdAt: string;
|
|
182
|
+
updatedAt: string;
|
|
183
|
+
}
|
|
184
|
+
interface SendMessageRequest {
|
|
185
|
+
content: string;
|
|
186
|
+
threadId?: string;
|
|
187
|
+
replyToId?: string;
|
|
188
|
+
mentions?: MessageMention[];
|
|
189
|
+
metadata?: MessageMetadata;
|
|
190
|
+
}
|
|
191
|
+
interface UpdateMessageRequest {
|
|
192
|
+
content: string;
|
|
193
|
+
}
|
|
194
|
+
type NotificationType = 'mention' | 'reply' | 'dm' | 'system';
|
|
195
|
+
interface Notification {
|
|
196
|
+
id: string;
|
|
197
|
+
userId: string;
|
|
198
|
+
type: NotificationType;
|
|
199
|
+
title: string;
|
|
200
|
+
body: string | null;
|
|
201
|
+
referenceId: string | null;
|
|
202
|
+
referenceType: string | null;
|
|
203
|
+
isRead: boolean;
|
|
204
|
+
createdAt: string;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
export type { Attachment as A, CommerceMessageCard as C, MentionSuggestion as M, Notification as N, OAuthLinkCard as O, PaidFileCard as P, ReactionGroup as R, SendMessageRequest as S, Thread as T, UpdateMessageRequest as U, CommerceOfferCardInput as a, CommerceProductCard as b, MentionSuggestionTrigger as c, Message as d, MessageMention as e, MessageMentionKind as f, MessageMentionRange as g, MessageMetadata as h, NotificationType as i };
|