@hiver/connector-agent 4.16.1 → 4.17.1-slack-beta.0
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/README.md +9 -9
- package/app/omni-slack/SlackConnectModalIsland.d.ts +26 -0
- package/app/omni-slack/SlackConnectModalIsland.d.ts.map +1 -0
- package/app/omni-slack/index.d.ts +14 -0
- package/app/omni-slack/index.d.ts.map +1 -0
- package/app/omni-slack/provider.d.ts +15 -0
- package/app/omni-slack/provider.d.ts.map +1 -0
- package/constants/tracking-events.d.ts +8 -0
- package/constants/tracking-events.d.ts.map +1 -1
- package/features/email-logger/omni/components/LogEmailPill.d.ts.map +1 -1
- package/features/email-logger/omni/components/LogEmailPill.test.d.ts +2 -0
- package/features/email-logger/omni/components/LogEmailPill.test.d.ts.map +1 -0
- package/features/slack/api/channels.d.ts +15 -0
- package/features/slack/api/channels.d.ts.map +1 -0
- package/features/slack/api/conversations.d.ts +41 -0
- package/features/slack/api/conversations.d.ts.map +1 -0
- package/features/slack/api/effective-config.d.ts +21 -0
- package/features/slack/api/effective-config.d.ts.map +1 -0
- package/features/slack/api/index.d.ts +4 -0
- package/features/slack/api/index.d.ts.map +1 -0
- package/features/slack/api/linked-conv.d.ts +33 -0
- package/features/slack/api/linked-conv.d.ts.map +1 -0
- package/features/slack/api/members.d.ts +10 -0
- package/features/slack/api/members.d.ts.map +1 -0
- package/features/slack/api/messages.d.ts +10 -0
- package/features/slack/api/messages.d.ts.map +1 -0
- package/features/slack/api/normalise.d.ts +3 -0
- package/features/slack/api/normalise.d.ts.map +1 -0
- package/features/slack/api/users.d.ts +11 -0
- package/features/slack/api/users.d.ts.map +1 -0
- package/features/slack/avatar/SlackAvatar.d.ts +20 -0
- package/features/slack/avatar/SlackAvatar.d.ts.map +1 -0
- package/features/slack/avatar/cache.d.ts +10 -0
- package/features/slack/avatar/cache.d.ts.map +1 -0
- package/features/slack/avatar/index.d.ts +2 -0
- package/features/slack/avatar/index.d.ts.map +1 -0
- package/features/slack/components/AnimatedDots.d.ts +2 -0
- package/features/slack/components/AnimatedDots.d.ts.map +1 -0
- package/features/slack/components/HeroIllustration.d.ts +14 -0
- package/features/slack/components/HeroIllustration.d.ts.map +1 -0
- package/features/slack/components/LinkedConversationPanel/ChannelStateView.d.ts +21 -0
- package/features/slack/components/LinkedConversationPanel/ChannelStateView.d.ts.map +1 -0
- package/features/slack/components/LinkedConversationPanel/ChannelThreadGroup.d.ts +28 -0
- package/features/slack/components/LinkedConversationPanel/ChannelThreadGroup.d.ts.map +1 -0
- package/features/slack/components/LinkedConversationPanel/Composer.d.ts +50 -0
- package/features/slack/components/LinkedConversationPanel/Composer.d.ts.map +1 -0
- package/features/slack/components/LinkedConversationPanel/ConfirmDeleteModal.d.ts +24 -0
- package/features/slack/components/LinkedConversationPanel/ConfirmDeleteModal.d.ts.map +1 -0
- package/features/slack/components/LinkedConversationPanel/DeletedTombstone.d.ts +16 -0
- package/features/slack/components/LinkedConversationPanel/DeletedTombstone.d.ts.map +1 -0
- package/features/slack/components/LinkedConversationPanel/LoadOlderMessages.d.ts +16 -0
- package/features/slack/components/LinkedConversationPanel/LoadOlderMessages.d.ts.map +1 -0
- package/features/slack/components/LinkedConversationPanel/MentionPicker.d.ts +27 -0
- package/features/slack/components/LinkedConversationPanel/MentionPicker.d.ts.map +1 -0
- package/features/slack/components/LinkedConversationPanel/MessageItem.d.ts +31 -0
- package/features/slack/components/LinkedConversationPanel/MessageItem.d.ts.map +1 -0
- package/features/slack/components/LinkedConversationPanel/NotMemberTooltip.d.ts +5 -0
- package/features/slack/components/LinkedConversationPanel/NotMemberTooltip.d.ts.map +1 -0
- package/features/slack/components/LinkedConversationPanel/ReconnectSlackBanner.d.ts +15 -0
- package/features/slack/components/LinkedConversationPanel/ReconnectSlackBanner.d.ts.map +1 -0
- package/features/slack/components/LinkedConversationPanel/ThreadDetailView.d.ts +18 -0
- package/features/slack/components/LinkedConversationPanel/ThreadDetailView.d.ts.map +1 -0
- package/features/slack/components/LinkedConversationPanel/ThreadSkeleton.d.ts +3 -0
- package/features/slack/components/LinkedConversationPanel/ThreadSkeleton.d.ts.map +1 -0
- package/features/slack/components/LinkedConversationPanel/__tests__/MessageItem.test.d.ts +2 -0
- package/features/slack/components/LinkedConversationPanel/__tests__/MessageItem.test.d.ts.map +1 -0
- package/features/slack/components/LinkedConversationPanel/index.d.ts +27 -0
- package/features/slack/components/LinkedConversationPanel/index.d.ts.map +1 -0
- package/features/slack/components/LinkedConversationPanel/style.d.ts +114 -0
- package/features/slack/components/LinkedConversationPanel/style.d.ts.map +1 -0
- package/features/slack/components/ReauthIllustration.d.ts +15 -0
- package/features/slack/components/ReauthIllustration.d.ts.map +1 -0
- package/features/slack/components/SlackConnectModal.d.ts +29 -0
- package/features/slack/components/SlackConnectModal.d.ts.map +1 -0
- package/features/slack/components/SlackConversationTab.d.ts +10 -0
- package/features/slack/components/SlackConversationTab.d.ts.map +1 -0
- package/features/slack/components/SlackLogo.d.ts +11 -0
- package/features/slack/components/SlackLogo.d.ts.map +1 -0
- package/features/slack/components/SlackReauthScreen.d.ts +25 -0
- package/features/slack/components/SlackReauthScreen.d.ts.map +1 -0
- package/features/slack/components/StartModal/MemberSelect.d.ts +9 -0
- package/features/slack/components/StartModal/MemberSelect.d.ts.map +1 -0
- package/features/slack/components/StartModal/MentionTextarea.d.ts +20 -0
- package/features/slack/components/StartModal/MentionTextarea.d.ts.map +1 -0
- package/features/slack/components/StartModal/SelectField.d.ts +19 -0
- package/features/slack/components/StartModal/SelectField.d.ts.map +1 -0
- package/features/slack/components/StartModal/SlackChannelTab.d.ts +25 -0
- package/features/slack/components/StartModal/SlackChannelTab.d.ts.map +1 -0
- package/features/slack/components/StartModal/SlackThreadTab.d.ts +26 -0
- package/features/slack/components/StartModal/SlackThreadTab.d.ts.map +1 -0
- package/features/slack/components/StartModal/TabIcon.d.ts +16 -0
- package/features/slack/components/StartModal/TabIcon.d.ts.map +1 -0
- package/features/slack/components/StartModal/__tests__/MemberSelect.test.d.ts +2 -0
- package/features/slack/components/StartModal/__tests__/MemberSelect.test.d.ts.map +1 -0
- package/features/slack/components/StartModal/__tests__/MentionTextarea.test.d.ts +2 -0
- package/features/slack/components/StartModal/__tests__/MentionTextarea.test.d.ts.map +1 -0
- package/features/slack/components/StartModal/__tests__/SlackThreadTab.test.d.ts +2 -0
- package/features/slack/components/StartModal/__tests__/SlackThreadTab.test.d.ts.map +1 -0
- package/features/slack/components/StartModal/dropdownOmni.d.ts +121 -0
- package/features/slack/components/StartModal/dropdownOmni.d.ts.map +1 -0
- package/features/slack/components/StartModal/index.d.ts +27 -0
- package/features/slack/components/StartModal/index.d.ts.map +1 -0
- package/features/slack/components/StartModal/style.d.ts +39 -0
- package/features/slack/components/StartModal/style.d.ts.map +1 -0
- package/features/slack/components/figma-tokens.d.ts +94 -0
- package/features/slack/components/figma-tokens.d.ts.map +1 -0
- package/features/slack/components/style.d.ts +54 -0
- package/features/slack/components/style.d.ts.map +1 -0
- package/features/slack/constants/api.d.ts +13 -0
- package/features/slack/constants/api.d.ts.map +1 -0
- package/features/slack/context.d.ts +75 -0
- package/features/slack/context.d.ts.map +1 -0
- package/features/slack/hooks/__tests__/useOlderMessages.test.d.ts +2 -0
- package/features/slack/hooks/__tests__/useOlderMessages.test.d.ts.map +1 -0
- package/features/slack/hooks/useLeftChannelGuard.d.ts +5 -0
- package/features/slack/hooks/useLeftChannelGuard.d.ts.map +1 -0
- package/features/slack/hooks/useOlderMessages.d.ts +51 -0
- package/features/slack/hooks/useOlderMessages.d.ts.map +1 -0
- package/features/slack/hooks/useReauthStatusRefetch.d.ts +25 -0
- package/features/slack/hooks/useReauthStatusRefetch.d.ts.map +1 -0
- package/features/slack/hooks/useSlackTabLabel.d.ts +23 -0
- package/features/slack/hooks/useSlackTabLabel.d.ts.map +1 -0
- package/features/slack/messageType.d.ts +16 -0
- package/features/slack/messageType.d.ts.map +1 -0
- package/features/slack/types/wire.d.ts +217 -0
- package/features/slack/types/wire.d.ts.map +1 -0
- package/features/slack/utils/emoji.d.ts +7 -0
- package/features/slack/utils/emoji.d.ts.map +1 -0
- package/features/slack/utils/mentions.d.ts +18 -0
- package/features/slack/utils/mentions.d.ts.map +1 -0
- package/features/slack/utils/text.d.ts +7 -0
- package/features/slack/utils/text.d.ts.map +1 -0
- package/features/toast-message/ToastRoot.d.ts.map +1 -1
- package/index.d.ts +5 -0
- package/index.d.ts.map +1 -1
- package/index.es.js +19924 -13673
- package/index.umd.js +1051 -427
- package/main-dev.d.ts.map +1 -1
- package/package.json +1 -1
- package/testing/mocks/handlers/fetch-cards.d.ts +2 -2
- package/testing/mocks/handlers/slack.d.ts +36 -0
- package/testing/mocks/handlers/slack.d.ts.map +1 -0
- package/testing/mocks/handlers.d.ts.map +1 -1
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wire types for the Slack agent endpoints in custom-integrations.
|
|
3
|
+
*
|
|
4
|
+
* GET responses use camelCase keys; POST responses currently return
|
|
5
|
+
* `author` as a raw snake_case dict (known backend inconsistency —
|
|
6
|
+
* see plan-slack-m1-ui Backend status, 2026-06-09). The client
|
|
7
|
+
* normalises in api/index.ts so the UI layer only sees one shape.
|
|
8
|
+
*/
|
|
9
|
+
export interface SlackMessageAuthor {
|
|
10
|
+
externalUserId: string;
|
|
11
|
+
/** Backend leaves this null when the message author hasn't been
|
|
12
|
+
* enriched via users.info (e.g. fresh chat.postMessage responses).
|
|
13
|
+
* UI falls back to externalUserId for display. */
|
|
14
|
+
name: string | null;
|
|
15
|
+
avatarUrl?: string | null;
|
|
16
|
+
isSelf: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface SlackMessageAuthorRaw {
|
|
19
|
+
external_user_id: string;
|
|
20
|
+
name: string | null;
|
|
21
|
+
avatar_url?: string | null;
|
|
22
|
+
is_self: boolean;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* One aggregated emoji reaction on a message. The backend rolls up Slack's
|
|
26
|
+
* per-user `reaction_added` / `reaction_removed` events into a count and a
|
|
27
|
+
* per-viewer `includesSelf` flag (computed like author.isSelf, by comparing
|
|
28
|
+
* the reactors against the viewer's own Slack id). Display-only in M1 — no
|
|
29
|
+
* add/remove affordance.
|
|
30
|
+
*/
|
|
31
|
+
export interface SlackReaction {
|
|
32
|
+
/** Slack emoji shortcode WITHOUT the surrounding colons, e.g. "thumbsup",
|
|
33
|
+
* "+1", "tada". Rendered to a glyph via renderSlackEmoji(`:${emoji}:`);
|
|
34
|
+
* unknown/custom workspace shortcodes fall back to the raw `:name:`. */
|
|
35
|
+
emoji: string;
|
|
36
|
+
/** Number of users who reacted with this emoji (>= 1). */
|
|
37
|
+
count: number;
|
|
38
|
+
/** True when the current viewer is among the reactors — drives the
|
|
39
|
+
* highlighted pill state. */
|
|
40
|
+
includesSelf: boolean;
|
|
41
|
+
}
|
|
42
|
+
export interface SlackMessage {
|
|
43
|
+
externalMessageId: string;
|
|
44
|
+
externalThreadTs?: string;
|
|
45
|
+
channelId: string;
|
|
46
|
+
author: SlackMessageAuthor;
|
|
47
|
+
text: string;
|
|
48
|
+
postedAt: string;
|
|
49
|
+
editedAt?: string | null;
|
|
50
|
+
deletedAt?: string | null;
|
|
51
|
+
clientMsgId?: string;
|
|
52
|
+
/** Raw Slack message subtype (e.g. 'channel_join', 'channel_leave');
|
|
53
|
+
* null/undefined for ordinary user messages. The UI derives
|
|
54
|
+
* replyability (and any future type-specific rendering) from this —
|
|
55
|
+
* see isReplyable(). */
|
|
56
|
+
subtype?: string | null;
|
|
57
|
+
/** Inbound emoji reactions aggregated by the backend, newest-emoji-last
|
|
58
|
+
* (Slack's `reactions[]` order). Absent or empty when the message has no
|
|
59
|
+
* reactions. Display-only in M1. */
|
|
60
|
+
reactions?: SlackReaction[];
|
|
61
|
+
/** UI-only flag for an in-flight outbound send. Never on the wire —
|
|
62
|
+
* the optimistic row gets dropped when refetchQueries lands the
|
|
63
|
+
* server's canonical state. */
|
|
64
|
+
isPending?: boolean;
|
|
65
|
+
}
|
|
66
|
+
/** Whether a link points at a single Slack thread (UI-5) or a whole
|
|
67
|
+
* channel (B4). Channel mode renders every thread in the channel. */
|
|
68
|
+
export type SlackTargetKind = 'thread' | 'channel';
|
|
69
|
+
/** Channel-mode grouping (B4): one Slack thread — a root message plus
|
|
70
|
+
* its replies (oldest-first). Sourced from the backend's `threads[]`. */
|
|
71
|
+
export interface SlackThreadGroup {
|
|
72
|
+
rootTs: string;
|
|
73
|
+
root: SlackMessage;
|
|
74
|
+
replies: SlackMessage[];
|
|
75
|
+
replyCount: number;
|
|
76
|
+
/** Older-reply pagination cursor contract (see SlackOlderPage).
|
|
77
|
+
* isTrimmed: older replies exist beyond this page. nextCursor: oldest
|
|
78
|
+
* reply ts in this page (pass as the next before_ts), null when
|
|
79
|
+
* exhausted. pageSize: window size used. */
|
|
80
|
+
isTrimmed?: boolean;
|
|
81
|
+
nextCursor?: string | null;
|
|
82
|
+
pageSize?: number;
|
|
83
|
+
/** externalUserId → display name for the `<@id>` mentions in this thread's
|
|
84
|
+
* bodies, resolved by id server-side (so it covers users who aren't current
|
|
85
|
+
* channel members). Present on the get_thread drill-in. */
|
|
86
|
+
mentions?: Record<string, string>;
|
|
87
|
+
}
|
|
88
|
+
/** Why the current viewer can't post into the linked channel. Backend
|
|
89
|
+
* computes this per-request against the viewer's OWN Slack token:
|
|
90
|
+
* - 'not_in_channel' → public channel the viewer left; history is
|
|
91
|
+
* still readable, so we keep it visible and show
|
|
92
|
+
* a "not a member" banner over a disabled composer
|
|
93
|
+
* - 'no_access' → private channel the viewer isn't in (or can no
|
|
94
|
+
* longer resolve) → "You don't have access"
|
|
95
|
+
* - 'channel_unavailable' → channel archived/deleted → "no longer available"
|
|
96
|
+
* - 'slack_not_connected' → no active Slack auth for this viewer
|
|
97
|
+
* Null/undefined when the viewer can post. */
|
|
98
|
+
export type SlackPostBlockReason = 'not_in_channel' | 'no_access' | 'channel_unavailable' | 'slack_not_connected';
|
|
99
|
+
export interface ExternalConversation {
|
|
100
|
+
hiverConvId: string;
|
|
101
|
+
channelId: string;
|
|
102
|
+
channelName: string;
|
|
103
|
+
externalThreadTs?: string;
|
|
104
|
+
/** 'channel' → render `threads` grouped; 'thread' (default) → render
|
|
105
|
+
* the flat `messages` list with a pinned parent. */
|
|
106
|
+
targetKind?: SlackTargetKind;
|
|
107
|
+
messages: SlackMessage[];
|
|
108
|
+
/** Present in channel mode: one entry per Slack thread in the linked
|
|
109
|
+
* channel. Undefined in thread mode. */
|
|
110
|
+
threads?: SlackThreadGroup[];
|
|
111
|
+
isTrimmed?: boolean;
|
|
112
|
+
/** Oldest message ts in this page — pass back as before_ts to fetch the
|
|
113
|
+
* preceding page. Null/undefined when older history is exhausted. */
|
|
114
|
+
nextCursor?: string | null;
|
|
115
|
+
/** Window size the server used for this page (default 25, max 50). */
|
|
116
|
+
pageSize?: number;
|
|
117
|
+
/** Per-viewer composer hint (computed against the viewer's own Slack
|
|
118
|
+
* token). Defaults to true when the server omits it. */
|
|
119
|
+
viewerCanPost?: boolean;
|
|
120
|
+
/** Reason the composer is blocked when viewerCanPost is false. */
|
|
121
|
+
viewerPostBlockReason?: SlackPostBlockReason | null;
|
|
122
|
+
/** externalUserId → display name for every `<@id>` mentioned across this
|
|
123
|
+
* response's bodies, resolved by id server-side. Unlike the channel-members
|
|
124
|
+
* roster, this covers mentions of users who aren't current members
|
|
125
|
+
* (joined-then-left, or mentioned-but-never-joined). The panel merges it
|
|
126
|
+
* into its mention-render map so those tokens render as `@DisplayName`. */
|
|
127
|
+
mentions?: Record<string, string>;
|
|
128
|
+
}
|
|
129
|
+
/** Result of an imperative older-page fetch (NOT polled — fetched on
|
|
130
|
+
* demand when the agent scrolls to the top). `messages` carries the
|
|
131
|
+
* older thread replies (thread mode); `threads` carries older thread
|
|
132
|
+
* roots (channel mode). The render layer merges these with the live
|
|
133
|
+
* polled page-0 window, deduping by externalMessageId. */
|
|
134
|
+
export interface SlackOlderPage {
|
|
135
|
+
messages: SlackMessage[];
|
|
136
|
+
threads?: SlackThreadGroup[];
|
|
137
|
+
/** Oldest ts in this page; pass as the next before_ts. Null when the
|
|
138
|
+
* server reports no older history remains. */
|
|
139
|
+
nextCursor?: string | null;
|
|
140
|
+
/** Whether older history still exists beyond this page. */
|
|
141
|
+
isTrimmed: boolean;
|
|
142
|
+
/** Window size used by the server for this page. */
|
|
143
|
+
pageSize: number;
|
|
144
|
+
}
|
|
145
|
+
export interface MemberResolutionReport {
|
|
146
|
+
added: Array<{
|
|
147
|
+
email: string;
|
|
148
|
+
externalUserId: string;
|
|
149
|
+
}>;
|
|
150
|
+
notOnSlack: string[];
|
|
151
|
+
}
|
|
152
|
+
export interface StartExistingChannelRequest {
|
|
153
|
+
hiverConvId: string;
|
|
154
|
+
channelId: string;
|
|
155
|
+
messageText: string;
|
|
156
|
+
}
|
|
157
|
+
export interface StartNewChannelRequest {
|
|
158
|
+
hiverConvId: string;
|
|
159
|
+
channelName: string;
|
|
160
|
+
/** Backend wants a bool; UI state holds a UX-friendly enum and
|
|
161
|
+
* transforms at the API boundary (see StartModal). */
|
|
162
|
+
isPrivate: boolean;
|
|
163
|
+
memberEmails: string[];
|
|
164
|
+
messageText: string;
|
|
165
|
+
}
|
|
166
|
+
export interface StartResponse {
|
|
167
|
+
externalConversationId: string;
|
|
168
|
+
channelId: string;
|
|
169
|
+
externalThreadTs?: string;
|
|
170
|
+
postedMessage: SlackMessage;
|
|
171
|
+
memberResolutionReport?: MemberResolutionReport;
|
|
172
|
+
}
|
|
173
|
+
export interface PostMessageRequest {
|
|
174
|
+
hiverConvId: string;
|
|
175
|
+
text: string;
|
|
176
|
+
/** Channel mode (B4): root ts of the thread to reply into. Omit to
|
|
177
|
+
* post a new top-level message (a new thread) to the channel. */
|
|
178
|
+
externalThreadTs?: string;
|
|
179
|
+
}
|
|
180
|
+
export interface ChannelMember {
|
|
181
|
+
externalUserId: string;
|
|
182
|
+
name: string;
|
|
183
|
+
avatarUrl?: string;
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* A Slack workspace user — seeds the create-channel member picker (UI-4).
|
|
187
|
+
* Unlike ChannelMember (members of an already-linked channel), this carries
|
|
188
|
+
* `email` because the new-channel invite is keyed on email: the agent picks
|
|
189
|
+
* users here, but StartModal submits their emails as `memberEmails` and the
|
|
190
|
+
* backend resolves them via users.lookupByEmail. Sourced from Slack's
|
|
191
|
+
* users.list (user-token scopes users:read + users:read.email).
|
|
192
|
+
*/
|
|
193
|
+
export interface SlackUser {
|
|
194
|
+
externalUserId: string;
|
|
195
|
+
name: string;
|
|
196
|
+
email: string;
|
|
197
|
+
avatarUrl?: string;
|
|
198
|
+
}
|
|
199
|
+
export interface SlackChannel {
|
|
200
|
+
externalChannelId: string;
|
|
201
|
+
name: string;
|
|
202
|
+
isPrivate: boolean;
|
|
203
|
+
isMember: boolean;
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* GET /channels response. The backend serves the picker from a pre-warmed Redis
|
|
207
|
+
* channel directory; `warmState` tells us whether that directory is fully built:
|
|
208
|
+
* - 'warming': the list may be PARTIAL (a cold cache returns the agent's own
|
|
209
|
+
* channels instantly while the full workspace directory loads) — keep polling.
|
|
210
|
+
* - 'ready': the list is complete.
|
|
211
|
+
* - null/undefined: older backend (or the live fallback) — always complete.
|
|
212
|
+
*/
|
|
213
|
+
export interface SlackChannelsPage {
|
|
214
|
+
channels: SlackChannel[];
|
|
215
|
+
warmState?: 'warming' | 'ready' | null;
|
|
216
|
+
}
|
|
217
|
+
//# sourceMappingURL=wire.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wire.d.ts","sourceRoot":"","sources":["../../../../src/features/slack/types/wire.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,WAAW,kBAAkB;IACjC,cAAc,EAAE,MAAM,CAAC;IACvB;;uDAEmD;IACnD,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,SAAS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AAE,MAAM,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,SAAS,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,IAAI,CAAC;CACxC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Replace Slack `:shortcode:` tokens in a message with their unicode glyphs.
|
|
3
|
+
* Unknown / custom shortcodes are left untouched (no regression). Display-only:
|
|
4
|
+
* the stored/edited text keeps the original colon form for re-send.
|
|
5
|
+
*/
|
|
6
|
+
export declare const renderSlackEmoji: (text: string) => string;
|
|
7
|
+
//# sourceMappingURL=emoji.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emoji.d.ts","sourceRoot":"","sources":["../../../../src/features/slack/utils/emoji.ts"],"names":[],"mappings":"AAaA;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,SAAU,MAAM,KAAG,MAAwC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ChannelMember } from '../types/wire';
|
|
2
|
+
export interface MentionRef {
|
|
3
|
+
/** "@DisplayName" literal as it appears in the textarea. */
|
|
4
|
+
displayText: string;
|
|
5
|
+
externalUserId: string;
|
|
6
|
+
}
|
|
7
|
+
/** Substring (case-insensitive) filter for the @-mention dropdown. Shared by
|
|
8
|
+
* the picker (what it renders) and the composers (what Enter selects) so the
|
|
9
|
+
* two never drift. */
|
|
10
|
+
export declare const filterMembers: (members: ChannelMember[], query: string) => ChannelMember[];
|
|
11
|
+
/**
|
|
12
|
+
* Rewrite each tracked "@DisplayName" to Slack's `<@external_user_id>` mention
|
|
13
|
+
* syntax before sending, so the mentioned user is actually notified. Only
|
|
14
|
+
* mentions picked from the dropdown are converted — a hand-typed "@Sarah" is
|
|
15
|
+
* sent literally (no fake-mention guessing).
|
|
16
|
+
*/
|
|
17
|
+
export declare const toSlackMentions: (text: string, mentions: MentionRef[]) => string;
|
|
18
|
+
//# sourceMappingURL=mentions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mentions.d.ts","sourceRoot":"","sources":["../../../../src/features/slack/utils/mentions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAEjE,MAAM,WAAW,UAAU;IACzB,4DAA4D;IAC5D,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED;;uBAEuB;AACvB,eAAO,MAAM,aAAa,YAAa,aAAa,EAAE,SAAS,MAAM,KAAG,aAAa,EACV,CAAC;AAE5E;;;;;GAKG;AACH,eAAO,MAAM,eAAe,SAAU,MAAM,YAAY,UAAU,EAAE,KAAG,MAItE,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* True when `value` contains at least one visible glyph once invisible /
|
|
3
|
+
* zero-width characters and surrounding whitespace are stripped. Use this for
|
|
4
|
+
* "is the field empty?" / Send-enabled checks instead of `value.trim()`.
|
|
5
|
+
*/
|
|
6
|
+
export declare const hasVisibleContent: (value: string) => boolean;
|
|
7
|
+
//# sourceMappingURL=text.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../../../src/features/slack/utils/text.ts"],"names":[],"mappings":"AAaA;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,UAAW,MAAM,KAAG,OAAkE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToastRoot.d.ts","sourceRoot":"","sources":["../../../src/features/toast-message/ToastRoot.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAA8B,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ToastRoot.d.ts","sourceRoot":"","sources":["../../../src/features/toast-message/ToastRoot.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAA8B,MAAM,OAAO,CAAC;AA0BvD,eAAO,MAAM,kBAAkB,QAAO,IAIrC,CAAC;AAEF,UAAU,cAAc;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CA4CxC,CAAC"}
|
package/index.d.ts
CHANGED
|
@@ -9,6 +9,11 @@ export type { ISectionItems, IActionButtons, ISections, IMetaData, ITemplateUpda
|
|
|
9
9
|
export { EmailLogger, GmailLogObserver } from './app/email-logger';
|
|
10
10
|
export { OmniEmailLogger } from './app/omni-email-logger';
|
|
11
11
|
export type { OmniEmailLoggerProps } from './app/omni-email-logger';
|
|
12
|
+
export { OmniSlackTab } from './app/omni-slack';
|
|
13
|
+
export type { OmniSlackTabProps } from './app/omni-slack';
|
|
14
|
+
export { SlackConnectModalIsland } from './app/omni-slack/SlackConnectModalIsland';
|
|
15
|
+
export type { SlackConnectModalIslandProps } from './app/omni-slack/SlackConnectModalIsland';
|
|
16
|
+
export { useSlackTabLabel } from './features/slack/hooks/useSlackTabLabel';
|
|
12
17
|
export { fetchAppCfValues, fetchDeferredAppCfValues } from './api/appCustomField';
|
|
13
18
|
export type { AppCfValuesRequest, AppCfValuesResponse, AppFieldValue, AppFieldValueStatus } from './api/appCustomField';
|
|
14
19
|
export { useConnectorSelectedEmail } from './store/connectorEmailStore';
|
package/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,IAAI,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,yB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