@nkootstra/block-kit 0.3.4 → 0.4.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/dist/{index-D139DZfD.d.ts → index--GXgMjw3.d.ts} +36 -5
- package/dist/index.d.ts +1 -1
- package/dist/index.js +840 -191
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.css.map +1 -1
- package/dist/transport.d.ts +1 -1
- package/dist/web-api.d.ts +1 -1
- package/package.json +1 -1
|
@@ -63,6 +63,8 @@ interface PayloadIdentity {
|
|
|
63
63
|
token?: string;
|
|
64
64
|
triggerId?: string;
|
|
65
65
|
responseUrl?: string;
|
|
66
|
+
/** Whether the app is installed org-wide on an Enterprise Grid org (`is_enterprise_install`). */
|
|
67
|
+
isEnterpriseInstall?: boolean;
|
|
66
68
|
}
|
|
67
69
|
declare const DEFAULT_IDENTITY: {
|
|
68
70
|
team: PayloadTeam | null;
|
|
@@ -71,6 +73,7 @@ declare const DEFAULT_IDENTITY: {
|
|
|
71
73
|
token: string;
|
|
72
74
|
triggerId: string;
|
|
73
75
|
responseUrl: string;
|
|
76
|
+
isEnterpriseInstall: boolean;
|
|
74
77
|
};
|
|
75
78
|
type ResolvedIdentity = typeof DEFAULT_IDENTITY;
|
|
76
79
|
/** The `message` surface's container: the message the block_actions/actions came from. */
|
|
@@ -159,10 +162,18 @@ interface BuildBlockActionsPayloadOptions {
|
|
|
159
162
|
container: Container;
|
|
160
163
|
identity?: PayloadIdentity;
|
|
161
164
|
}
|
|
165
|
+
/** The Enterprise Grid org a payload came from, as Slack names it. */
|
|
166
|
+
interface PayloadEnterprise {
|
|
167
|
+
id: string;
|
|
168
|
+
name: string;
|
|
169
|
+
}
|
|
162
170
|
interface BlockActionsPayloadBase {
|
|
163
171
|
type: "block_actions";
|
|
164
172
|
actions: BlockAction[];
|
|
165
173
|
team: PayloadTeam | null;
|
|
174
|
+
/** The team's Enterprise Grid org, or `null` outside one. */
|
|
175
|
+
enterprise: PayloadEnterprise | null;
|
|
176
|
+
is_enterprise_install: boolean;
|
|
166
177
|
user: PayloadUser;
|
|
167
178
|
token?: string;
|
|
168
179
|
response_url?: string;
|
|
@@ -214,8 +225,6 @@ interface BuildViewSubmissionPayloadOptions {
|
|
|
214
225
|
}
|
|
215
226
|
/** Slack's `view_submission` payload, sent when the modal's Submit button is pressed. */
|
|
216
227
|
declare function buildViewSubmissionPayload({ view, state, identity, responseUrls }: BuildViewSubmissionPayloadOptions): {
|
|
217
|
-
type: "view_submission";
|
|
218
|
-
team: PayloadTeam | null;
|
|
219
228
|
user: {
|
|
220
229
|
id: string;
|
|
221
230
|
name: string;
|
|
@@ -265,6 +274,13 @@ declare function buildViewSubmissionPayload({ view, state, identity, responseUrl
|
|
|
265
274
|
channel_id: string;
|
|
266
275
|
response_url: string;
|
|
267
276
|
}[];
|
|
277
|
+
enterprise: {
|
|
278
|
+
id: string;
|
|
279
|
+
name: string;
|
|
280
|
+
} | null;
|
|
281
|
+
is_enterprise_install: boolean;
|
|
282
|
+
type: "view_submission";
|
|
283
|
+
team: PayloadTeam | null;
|
|
268
284
|
};
|
|
269
285
|
interface BuildViewClosedPayloadOptions {
|
|
270
286
|
view: ViewLike;
|
|
@@ -275,8 +291,6 @@ interface BuildViewClosedPayloadOptions {
|
|
|
275
291
|
}
|
|
276
292
|
/** Slack's `view_closed` payload, sent when the modal's close (X) button is pressed. */
|
|
277
293
|
declare function buildViewClosedPayload({ view, state, identity, isCleared }: BuildViewClosedPayloadOptions): {
|
|
278
|
-
type: "view_closed";
|
|
279
|
-
team: PayloadTeam | null;
|
|
280
294
|
user: {
|
|
281
295
|
id: string;
|
|
282
296
|
name: string;
|
|
@@ -320,6 +334,13 @@ declare function buildViewClosedPayload({ view, state, identity, isCleared }: Bu
|
|
|
320
334
|
external_id: string;
|
|
321
335
|
};
|
|
322
336
|
is_cleared: boolean;
|
|
337
|
+
enterprise: {
|
|
338
|
+
id: string;
|
|
339
|
+
name: string;
|
|
340
|
+
} | null;
|
|
341
|
+
is_enterprise_install: boolean;
|
|
342
|
+
type: "view_closed";
|
|
343
|
+
team: PayloadTeam | null;
|
|
323
344
|
};
|
|
324
345
|
/** The subset of `ack()` response actions a modal reacts to: validation errors, or view navigation. */
|
|
325
346
|
type ViewResponseAction = {
|
|
@@ -385,6 +406,11 @@ declare function buildBlockSuggestionPayload({ actionId, blockId, value, contain
|
|
|
385
406
|
name: string;
|
|
386
407
|
} | undefined;
|
|
387
408
|
message: Record<string, unknown>;
|
|
409
|
+
enterprise: {
|
|
410
|
+
id: string;
|
|
411
|
+
name: string;
|
|
412
|
+
} | null;
|
|
413
|
+
is_enterprise_install: boolean;
|
|
388
414
|
type: "block_suggestion";
|
|
389
415
|
user: PayloadUser;
|
|
390
416
|
api_app_id: string;
|
|
@@ -436,6 +462,11 @@ declare function buildBlockSuggestionPayload({ actionId, blockId, value, contain
|
|
|
436
462
|
previous_view_id: string | null;
|
|
437
463
|
external_id: string;
|
|
438
464
|
};
|
|
465
|
+
enterprise: {
|
|
466
|
+
id: string;
|
|
467
|
+
name: string;
|
|
468
|
+
} | null;
|
|
469
|
+
is_enterprise_install: boolean;
|
|
439
470
|
type: "block_suggestion";
|
|
440
471
|
user: PayloadUser;
|
|
441
472
|
api_app_id: string;
|
|
@@ -940,4 +971,4 @@ declare const VALIDATION_MESSAGES: {
|
|
|
940
971
|
declare function validateView(blocks: readonly Json[] | readonly unknown[], state: StateValues): Record<string, string>;
|
|
941
972
|
//#endregion
|
|
942
973
|
export { useLiveView as $, BlockAction as A, PayloadContext as B, SlackAttachment as C, Block as Ct, elementComponents as D, Json as Dt, SlackReaction as E, ElementProps as Et, EmojiOptions as F, Surface as G, StackedView as H, LinkProps as I, SurfaceScopeValue as J, SurfaceScope as K, MentionRef as L, BlockKitProvider as M, BlockKitProviderProps as N, Element as O, ElementState as P, useContainer as Q, MessageApi as R, MessageProps as S, blockComponents as St, SlackMessageLike as T, BlockProps as Tt, StateValues as U, Resolvers as V, SubmitResult as W, ViewsApi as X, UserProfile as Y, useBlockKit as Z, HomeTabView as _, ViewResponseAction as _t, Tooltip as a, BuildViewSubmissionPayloadOptions as at, Message as b, buildViewClosedPayload as bt, TextObject as c, MessageContainer as ct, ViewProps as d, PayloadTeam as dt, BlockActionsPayload as et, Modal as f, PayloadUser as ft, HomeTabProps as g, ViewLike as gt, HomeTab as h, ViewContainer as ht, UserMentionProps as i, BuildViewClosedPayloadOptions as it, BlockKitContextValue as j, ActionContext as k, AnyView as l, OptionsResponse as lt, ModalView as m, ViewBlockActionsPayload as mt, validateView as n, BuildBlockActionsPayloadOptions as nt, TooltipProps as o, Container as ot, ModalProps as p, SuggestionOption as pt, SurfaceScopeProps as q, UserMention as r, BuildBlockSuggestionPayloadOptions as rt, Text as s, MessageBlockActionsPayload as st, VALIDATION_MESSAGES as t, BlockSuggestionPayload as tt, View as u, PayloadIdentity as ut, Mrkdwn as v, buildBlockActionsPayload as vt, SlackAttachmentField as w, Blocks as wt, MessageApp as x, buildViewSubmissionPayload as xt, MrkdwnProps as y, buildBlockSuggestionPayload as yt, MessageUpdate as z };
|
|
943
|
-
//# sourceMappingURL=index
|
|
974
|
+
//# sourceMappingURL=index--GXgMjw3.d.ts.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
|
|
2
|
-
import { $ as useLiveView, A as BlockAction, B as PayloadContext, C as SlackAttachment, Ct as Block, D as elementComponents, Dt as Json, E as SlackReaction, Et as ElementProps, F as EmojiOptions, G as Surface, H as StackedView, I as LinkProps, J as SurfaceScopeValue, K as SurfaceScope, L as MentionRef, M as BlockKitProvider, N as BlockKitProviderProps, O as Element, P as ElementState, Q as useContainer, R as MessageApi, S as MessageProps, St as blockComponents, T as SlackMessageLike, Tt as BlockProps, U as StateValues, V as Resolvers, W as SubmitResult, X as ViewsApi, Y as UserProfile, Z as useBlockKit, _ as HomeTabView, _t as ViewResponseAction, a as Tooltip, at as BuildViewSubmissionPayloadOptions, b as Message, bt as buildViewClosedPayload, c as TextObject, ct as MessageContainer, d as ViewProps, dt as PayloadTeam, et as BlockActionsPayload, f as Modal, ft as PayloadUser, g as HomeTabProps, gt as ViewLike, h as HomeTab, ht as ViewContainer, i as UserMentionProps, it as BuildViewClosedPayloadOptions, j as BlockKitContextValue, k as ActionContext, l as AnyView, lt as OptionsResponse, m as ModalView, mt as ViewBlockActionsPayload, n as validateView, nt as BuildBlockActionsPayloadOptions, o as TooltipProps, ot as Container, p as ModalProps, pt as SuggestionOption, q as SurfaceScopeProps, r as UserMention, rt as BuildBlockSuggestionPayloadOptions, s as Text, st as MessageBlockActionsPayload, t as VALIDATION_MESSAGES, tt as BlockSuggestionPayload, u as View, ut as PayloadIdentity, v as Mrkdwn, vt as buildBlockActionsPayload, w as SlackAttachmentField, wt as Blocks, x as MessageApp, xt as buildViewSubmissionPayload, y as MrkdwnProps, yt as buildBlockSuggestionPayload, z as MessageUpdate } from "./index
|
|
2
|
+
import { $ as useLiveView, A as BlockAction, B as PayloadContext, C as SlackAttachment, Ct as Block, D as elementComponents, Dt as Json, E as SlackReaction, Et as ElementProps, F as EmojiOptions, G as Surface, H as StackedView, I as LinkProps, J as SurfaceScopeValue, K as SurfaceScope, L as MentionRef, M as BlockKitProvider, N as BlockKitProviderProps, O as Element, P as ElementState, Q as useContainer, R as MessageApi, S as MessageProps, St as blockComponents, T as SlackMessageLike, Tt as BlockProps, U as StateValues, V as Resolvers, W as SubmitResult, X as ViewsApi, Y as UserProfile, Z as useBlockKit, _ as HomeTabView, _t as ViewResponseAction, a as Tooltip, at as BuildViewSubmissionPayloadOptions, b as Message, bt as buildViewClosedPayload, c as TextObject, ct as MessageContainer, d as ViewProps, dt as PayloadTeam, et as BlockActionsPayload, f as Modal, ft as PayloadUser, g as HomeTabProps, gt as ViewLike, h as HomeTab, ht as ViewContainer, i as UserMentionProps, it as BuildViewClosedPayloadOptions, j as BlockKitContextValue, k as ActionContext, l as AnyView, lt as OptionsResponse, m as ModalView, mt as ViewBlockActionsPayload, n as validateView, nt as BuildBlockActionsPayloadOptions, o as TooltipProps, ot as Container, p as ModalProps, pt as SuggestionOption, q as SurfaceScopeProps, r as UserMention, rt as BuildBlockSuggestionPayloadOptions, s as Text, st as MessageBlockActionsPayload, t as VALIDATION_MESSAGES, tt as BlockSuggestionPayload, u as View, ut as PayloadIdentity, v as Mrkdwn, vt as buildBlockActionsPayload, w as SlackAttachmentField, wt as Blocks, x as MessageApp, xt as buildViewSubmissionPayload, y as MrkdwnProps, yt as buildBlockSuggestionPayload, z as MessageUpdate } from "./index--GXgMjw3.js";
|
|
3
3
|
export { type ActionContext, type AnyView, Block, type BlockAction, type BlockActionsPayload, type BlockKitContextValue, BlockKitProvider, type BlockKitProviderProps, type BlockProps, type BlockSuggestionPayload, Blocks, type BuildBlockActionsPayloadOptions, type BuildBlockSuggestionPayloadOptions, type BuildViewClosedPayloadOptions, type BuildViewSubmissionPayloadOptions, type Container, Element, type ElementProps, type ElementState, type EmojiOptions, HomeTab, type HomeTabProps, type HomeTabView, type Json, type LinkProps, type MentionRef, Message, type MessageApi, type MessageApp, type MessageBlockActionsPayload, type MessageContainer, type MessageProps, type MessageUpdate, Modal, type ModalProps, type ModalView, Mrkdwn, type MrkdwnProps, type OptionsResponse, type PayloadContext, type PayloadIdentity, type PayloadTeam, type PayloadUser, type Resolvers, type SlackAttachment, type SlackAttachmentField, type SlackMessageLike, type SlackReaction, type StackedView, type StateValues, type SubmitResult, type SuggestionOption, type Surface, SurfaceScope, type SurfaceScopeProps, type SurfaceScopeValue, Text, type TextObject, Tooltip, type TooltipProps, UserMention, type UserMentionProps, type UserProfile, VALIDATION_MESSAGES, View, type ViewBlockActionsPayload, type ViewContainer, type ViewLike, type ViewProps, type ViewResponseAction, type ViewsApi, blockComponents, buildBlockActionsPayload, buildBlockSuggestionPayload, buildViewClosedPayload, buildViewSubmissionPayload, elementComponents, useBlockKit, useContainer, useLiveView, validateView };
|