@slack/bolt 3.8.0 → 3.8.1
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/App.d.ts +212 -0
- package/dist/App.d.ts.map +1 -0
- package/dist/App.js +796 -0
- package/dist/App.js.map +1 -0
- package/dist/WorkflowStep.d.ts +106 -0
- package/dist/WorkflowStep.d.ts.map +1 -0
- package/dist/WorkflowStep.js +196 -0
- package/dist/WorkflowStep.js.map +1 -0
- package/dist/conversation-store.d.ts +31 -0
- package/dist/conversation-store.d.ts.map +1 -0
- package/dist/conversation-store.js +72 -0
- package/dist/conversation-store.js.map +1 -0
- package/dist/errors.d.ts +79 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +120 -0
- package/dist/errors.js.map +1 -0
- package/dist/helpers.d.ts +24 -0
- package/dist/helpers.d.ts.map +1 -0
- package/dist/helpers.js +100 -0
- package/dist/helpers.js.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +43 -0
- package/dist/index.js.map +1 -0
- package/dist/middleware/builtin.d.ts +52 -0
- package/dist/middleware/builtin.d.ts.map +1 -0
- package/dist/middleware/builtin.js +311 -0
- package/dist/middleware/builtin.js.map +1 -0
- package/dist/middleware/process.d.ts +5 -0
- package/dist/middleware/process.d.ts.map +1 -0
- package/dist/middleware/process.js +25 -0
- package/dist/middleware/process.js.map +1 -0
- package/dist/receivers/AwsLambdaReceiver.d.ts +53 -0
- package/dist/receivers/AwsLambdaReceiver.d.ts.map +1 -0
- package/dist/receivers/AwsLambdaReceiver.js +188 -0
- package/dist/receivers/AwsLambdaReceiver.js.map +1 -0
- package/dist/receivers/ExpressReceiver.d.ts +77 -0
- package/dist/receivers/ExpressReceiver.d.ts.map +1 -0
- package/dist/receivers/ExpressReceiver.js +445 -0
- package/dist/receivers/ExpressReceiver.js.map +1 -0
- package/dist/receivers/HTTPReceiver.d.ts +109 -0
- package/dist/receivers/HTTPReceiver.d.ts.map +1 -0
- package/dist/receivers/HTTPReceiver.js +501 -0
- package/dist/receivers/HTTPReceiver.js.map +1 -0
- package/dist/receivers/SocketModeReceiver.d.ts +61 -0
- package/dist/receivers/SocketModeReceiver.d.ts.map +1 -0
- package/dist/receivers/SocketModeReceiver.js +175 -0
- package/dist/receivers/SocketModeReceiver.js.map +1 -0
- package/dist/receivers/custom-routes.d.ts +14 -0
- package/dist/receivers/custom-routes.d.ts.map +1 -0
- package/dist/receivers/custom-routes.js +33 -0
- package/dist/receivers/custom-routes.js.map +1 -0
- package/dist/receivers/http-utils.d.ts +5 -0
- package/dist/receivers/http-utils.d.ts.map +1 -0
- package/dist/receivers/http-utils.js +35 -0
- package/dist/receivers/http-utils.js.map +1 -0
- package/dist/receivers/render-html-for-install-path.d.ts +3 -0
- package/dist/receivers/render-html-for-install-path.d.ts.map +1 -0
- package/dist/receivers/render-html-for-install-path.js +25 -0
- package/dist/receivers/render-html-for-install-path.js.map +1 -0
- package/dist/receivers/verify-redirect-opts.d.ts +7 -0
- package/dist/receivers/verify-redirect-opts.d.ts.map +1 -0
- package/dist/receivers/verify-redirect-opts.js +23 -0
- package/dist/receivers/verify-redirect-opts.js.map +1 -0
- package/dist/receivers/verify-request.d.ts +41 -0
- package/dist/receivers/verify-request.d.ts.map +1 -0
- package/dist/receivers/verify-request.js +98 -0
- package/dist/receivers/verify-request.js.map +1 -0
- package/dist/types/actions/block-action.d.ts +231 -0
- package/dist/types/actions/block-action.d.ts.map +1 -0
- package/dist/types/actions/block-action.js +3 -0
- package/dist/types/actions/block-action.js.map +1 -0
- package/dist/types/actions/dialog-action.d.ts +47 -0
- package/dist/types/actions/dialog-action.d.ts.map +1 -0
- package/dist/types/actions/dialog-action.js +3 -0
- package/dist/types/actions/dialog-action.js.map +1 -0
- package/dist/types/actions/index.d.ts +46 -0
- package/dist/types/actions/index.d.ts.map +1 -0
- package/dist/types/actions/index.js +17 -0
- package/dist/types/actions/index.js.map +1 -0
- package/dist/types/actions/interactive-message.d.ts +66 -0
- package/dist/types/actions/interactive-message.d.ts.map +1 -0
- package/dist/types/actions/interactive-message.js +3 -0
- package/dist/types/actions/interactive-message.js.map +1 -0
- package/dist/types/actions/workflow-step-edit.d.ts +49 -0
- package/dist/types/actions/workflow-step-edit.d.ts.map +1 -0
- package/dist/types/actions/workflow-step-edit.js +3 -0
- package/dist/types/actions/workflow-step-edit.js.map +1 -0
- package/dist/types/command/index.d.ts +36 -0
- package/dist/types/command/index.d.ts.map +1 -0
- package/dist/types/command/index.js +3 -0
- package/dist/types/command/index.js.map +1 -0
- package/dist/types/events/base-events.d.ts +699 -0
- package/dist/types/events/base-events.d.ts.map +1 -0
- package/dist/types/events/base-events.js +5 -0
- package/dist/types/events/base-events.js.map +1 -0
- package/dist/types/events/index.d.ts +63 -0
- package/dist/types/events/index.d.ts.map +1 -0
- package/dist/types/events/index.js +14 -0
- package/dist/types/events/index.js.map +1 -0
- package/dist/types/events/message-events.d.ts +312 -0
- package/dist/types/events/message-events.d.ts.map +1 -0
- package/dist/types/events/message-events.js +3 -0
- package/dist/types/events/message-events.js.map +1 -0
- package/dist/types/helpers.d.ts +17 -0
- package/dist/types/helpers.d.ts.map +1 -0
- package/dist/types/helpers.js +3 -0
- package/dist/types/helpers.js.map +1 -0
- package/dist/types/index.d.ts +10 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +22 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/middleware.d.ts +65 -0
- package/dist/types/middleware.d.ts.map +1 -0
- package/dist/types/middleware.js +14 -0
- package/dist/types/middleware.js.map +1 -0
- package/dist/types/options/index.d.ts +192 -0
- package/dist/types/options/index.d.ts.map +1 -0
- package/dist/types/options/index.js +3 -0
- package/dist/types/options/index.js.map +1 -0
- package/dist/types/receiver.d.ts +16 -0
- package/dist/types/receiver.d.ts.map +1 -0
- package/dist/types/receiver.js +3 -0
- package/dist/types/receiver.js.map +1 -0
- package/dist/types/shortcuts/global-shortcut.d.ts +29 -0
- package/dist/types/shortcuts/global-shortcut.d.ts.map +1 -0
- package/dist/types/shortcuts/global-shortcut.js +3 -0
- package/dist/types/shortcuts/global-shortcut.js.map +1 -0
- package/dist/types/shortcuts/index.d.ts +23 -0
- package/dist/types/shortcuts/index.d.ts.map +1 -0
- package/dist/types/shortcuts/index.js +16 -0
- package/dist/types/shortcuts/index.js.map +1 -0
- package/dist/types/shortcuts/message-shortcut.d.ts +43 -0
- package/dist/types/shortcuts/message-shortcut.d.ts.map +1 -0
- package/dist/types/shortcuts/message-shortcut.js +3 -0
- package/dist/types/shortcuts/message-shortcut.js.map +1 -0
- package/dist/types/utilities.d.ts +23 -0
- package/dist/types/utilities.d.ts.map +1 -0
- package/dist/types/utilities.js +3 -0
- package/dist/types/utilities.js.map +1 -0
- package/dist/types/view/index.d.ts +175 -0
- package/dist/types/view/index.d.ts.map +1 -0
- package/dist/types/view/index.js +3 -0
- package/dist/types/view/index.js.map +1 -0
- package/package.json +1 -1
- package/dist/package.json +0 -88
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
import { PlainTextElement, Confirmation, Option } from '@slack/types';
|
|
2
|
+
import { StringIndexed } from '../helpers';
|
|
3
|
+
import { ViewOutput, ViewStateValue } from '../view';
|
|
4
|
+
/**
|
|
5
|
+
* All known actions from in Slack's interactive elements
|
|
6
|
+
*
|
|
7
|
+
* This is a discriminated union. The discriminant is the `type` property.
|
|
8
|
+
*/
|
|
9
|
+
export declare type BlockElementAction = ButtonAction | UsersSelectAction | MultiUsersSelectAction | StaticSelectAction | MultiStaticSelectAction | ConversationsSelectAction | MultiConversationsSelectAction | ChannelsSelectAction | MultiChannelsSelectAction | ExternalSelectAction | MultiExternalSelectAction | OverflowAction | DatepickerAction | RadioButtonsAction | CheckboxesAction | PlainTextInputAction;
|
|
10
|
+
/**
|
|
11
|
+
* Any action from Slack's interactive elements
|
|
12
|
+
*
|
|
13
|
+
* This type is used to represent actions that aren't known ahead of time. Each of the known element actions also
|
|
14
|
+
* implement this interface.
|
|
15
|
+
*/
|
|
16
|
+
export interface BasicElementAction<T extends string = string> {
|
|
17
|
+
type: T;
|
|
18
|
+
block_id: string;
|
|
19
|
+
action_id: string;
|
|
20
|
+
action_ts: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* An action from a button element
|
|
24
|
+
*/
|
|
25
|
+
export interface ButtonAction extends BasicElementAction<'button'> {
|
|
26
|
+
value: string;
|
|
27
|
+
text: PlainTextElement;
|
|
28
|
+
url?: string;
|
|
29
|
+
confirm?: Confirmation;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* An action from a select menu with static options
|
|
33
|
+
*/
|
|
34
|
+
export interface StaticSelectAction extends BasicElementAction<'static_select'> {
|
|
35
|
+
selected_option: {
|
|
36
|
+
text: PlainTextElement;
|
|
37
|
+
value: string;
|
|
38
|
+
};
|
|
39
|
+
initial_option?: Option;
|
|
40
|
+
placeholder?: PlainTextElement;
|
|
41
|
+
confirm?: Confirmation;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* An action from a multi select menu with static options
|
|
45
|
+
*/
|
|
46
|
+
export interface MultiStaticSelectAction extends BasicElementAction<'multi_static_select'> {
|
|
47
|
+
selected_options: {
|
|
48
|
+
text: PlainTextElement;
|
|
49
|
+
value: string;
|
|
50
|
+
}[];
|
|
51
|
+
initial_options?: Option[];
|
|
52
|
+
placeholder?: PlainTextElement;
|
|
53
|
+
confirm?: Confirmation;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* An action from a select menu with user list
|
|
57
|
+
*/
|
|
58
|
+
export interface UsersSelectAction extends BasicElementAction<'users_select'> {
|
|
59
|
+
selected_user: string;
|
|
60
|
+
initial_user?: string;
|
|
61
|
+
placeholder?: PlainTextElement;
|
|
62
|
+
confirm?: Confirmation;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* An action from a multi select menu with user list
|
|
66
|
+
*/
|
|
67
|
+
export interface MultiUsersSelectAction extends BasicElementAction<'multi_users_select'> {
|
|
68
|
+
selected_users: string[];
|
|
69
|
+
initial_users?: string[];
|
|
70
|
+
placeholder?: PlainTextElement;
|
|
71
|
+
confirm?: Confirmation;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* An action from a select menu with conversations list
|
|
75
|
+
*/
|
|
76
|
+
export interface ConversationsSelectAction extends BasicElementAction<'conversations_select'> {
|
|
77
|
+
selected_conversation: string;
|
|
78
|
+
initial_conversation?: string;
|
|
79
|
+
placeholder?: PlainTextElement;
|
|
80
|
+
confirm?: Confirmation;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* An action from a multi select menu with conversations list
|
|
84
|
+
*/
|
|
85
|
+
export interface MultiConversationsSelectAction extends BasicElementAction<'multi_conversations_select'> {
|
|
86
|
+
selected_conversations: string[];
|
|
87
|
+
initial_conversations?: string[];
|
|
88
|
+
placeholder?: PlainTextElement;
|
|
89
|
+
confirm?: Confirmation;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* An action from a select menu with channels list
|
|
93
|
+
*/
|
|
94
|
+
export interface ChannelsSelectAction extends BasicElementAction<'channels_select'> {
|
|
95
|
+
selected_channel: string;
|
|
96
|
+
initial_channel?: string;
|
|
97
|
+
placeholder?: PlainTextElement;
|
|
98
|
+
confirm?: Confirmation;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* An action from a multi select menu with channels list
|
|
102
|
+
*/
|
|
103
|
+
export interface MultiChannelsSelectAction extends BasicElementAction<'multi_channels_select'> {
|
|
104
|
+
selected_channels: string[];
|
|
105
|
+
initial_channels?: string[];
|
|
106
|
+
placeholder?: PlainTextElement;
|
|
107
|
+
confirm?: Confirmation;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* An action from a select menu with external data source
|
|
111
|
+
*/
|
|
112
|
+
export interface ExternalSelectAction extends BasicElementAction<'external_select'> {
|
|
113
|
+
selected_option?: Option;
|
|
114
|
+
initial_option?: Option;
|
|
115
|
+
placeholder?: PlainTextElement;
|
|
116
|
+
min_query_length?: number;
|
|
117
|
+
confirm?: Confirmation;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* An action from a multi select menu with external data source
|
|
121
|
+
*/
|
|
122
|
+
export interface MultiExternalSelectAction extends BasicElementAction<'multi_external_select'> {
|
|
123
|
+
selected_options?: Option[];
|
|
124
|
+
initial_options?: Option[];
|
|
125
|
+
placeholder?: PlainTextElement;
|
|
126
|
+
min_query_length?: number;
|
|
127
|
+
confirm?: Confirmation;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* An action from an overflow menu element
|
|
131
|
+
*/
|
|
132
|
+
export interface OverflowAction extends BasicElementAction<'overflow'> {
|
|
133
|
+
selected_option: {
|
|
134
|
+
text: PlainTextElement;
|
|
135
|
+
value: string;
|
|
136
|
+
};
|
|
137
|
+
confirm?: Confirmation;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* An action from a date picker element
|
|
141
|
+
*/
|
|
142
|
+
export interface DatepickerAction extends BasicElementAction<'datepicker'> {
|
|
143
|
+
selected_date: string | null;
|
|
144
|
+
initial_date?: string;
|
|
145
|
+
placeholder?: PlainTextElement;
|
|
146
|
+
confirm?: Confirmation;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* An action from a radio button element
|
|
150
|
+
*/
|
|
151
|
+
export interface RadioButtonsAction extends BasicElementAction<'radio_buttons'> {
|
|
152
|
+
selected_option: Option | null;
|
|
153
|
+
initial_option?: Option;
|
|
154
|
+
confirm?: Confirmation;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* An action from a checkboxes element
|
|
158
|
+
*/
|
|
159
|
+
export interface CheckboxesAction extends BasicElementAction<'checkboxes'> {
|
|
160
|
+
selected_options: Option[];
|
|
161
|
+
initial_options?: Option[];
|
|
162
|
+
confirm?: Confirmation;
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* An action from a plain_text_input element (must use dispatch_action: true)
|
|
166
|
+
*/
|
|
167
|
+
export interface PlainTextInputAction extends BasicElementAction<'plain_text_input'> {
|
|
168
|
+
value: string;
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* A Slack Block Kit element action wrapped in the standard metadata.
|
|
172
|
+
*
|
|
173
|
+
* This describes the entire JSON-encoded body of a request from Slack's Block Kit interactive components.
|
|
174
|
+
*/
|
|
175
|
+
export interface BlockAction<ElementAction extends BasicElementAction = BlockElementAction> {
|
|
176
|
+
type: 'block_actions';
|
|
177
|
+
actions: ElementAction[];
|
|
178
|
+
team: {
|
|
179
|
+
id: string;
|
|
180
|
+
domain: string;
|
|
181
|
+
enterprise_id?: string;
|
|
182
|
+
enterprise_name?: string;
|
|
183
|
+
} | null;
|
|
184
|
+
user: {
|
|
185
|
+
id: string;
|
|
186
|
+
name: string;
|
|
187
|
+
team_id?: string;
|
|
188
|
+
};
|
|
189
|
+
channel?: {
|
|
190
|
+
id: string;
|
|
191
|
+
name: string;
|
|
192
|
+
};
|
|
193
|
+
message?: {
|
|
194
|
+
type: 'message';
|
|
195
|
+
user?: string;
|
|
196
|
+
ts: string;
|
|
197
|
+
text?: string;
|
|
198
|
+
[key: string]: any;
|
|
199
|
+
};
|
|
200
|
+
view?: ViewOutput;
|
|
201
|
+
state?: {
|
|
202
|
+
values: {
|
|
203
|
+
[blockId: string]: {
|
|
204
|
+
[actionId: string]: ViewStateValue;
|
|
205
|
+
};
|
|
206
|
+
};
|
|
207
|
+
};
|
|
208
|
+
token: string;
|
|
209
|
+
response_url: string;
|
|
210
|
+
trigger_id: string;
|
|
211
|
+
api_app_id: string;
|
|
212
|
+
container: StringIndexed;
|
|
213
|
+
app_unfurl?: any;
|
|
214
|
+
is_enterprise_install?: boolean;
|
|
215
|
+
enterprise?: {
|
|
216
|
+
id: string;
|
|
217
|
+
name: string;
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
export declare type BlockButtonAction = BlockAction<ButtonAction>;
|
|
221
|
+
export declare type BlockStaticSelectAction = BlockAction<StaticSelectAction>;
|
|
222
|
+
export declare type BlockUsersSelectAction = BlockAction<UsersSelectAction>;
|
|
223
|
+
export declare type BlockConversationsSelectAction = BlockAction<ConversationsSelectAction>;
|
|
224
|
+
export declare type BlockChannelsSelectAction = BlockAction<ChannelsSelectAction>;
|
|
225
|
+
export declare type BlockExternalSelectAction = BlockAction<ExternalSelectAction>;
|
|
226
|
+
export declare type BlockOverflowAction = BlockAction<OverflowAction>;
|
|
227
|
+
export declare type BlockDatepickerAction = BlockAction<DatepickerAction>;
|
|
228
|
+
export declare type BlockRadioButtonsAction = BlockAction<RadioButtonsAction>;
|
|
229
|
+
export declare type BlockCheckboxesAction = BlockAction<CheckboxesAction>;
|
|
230
|
+
export declare type BlockPlainTextInputAction = BlockAction<PlainTextInputAction>;
|
|
231
|
+
//# sourceMappingURL=block-action.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"block-action.d.ts","sourceRoot":"","sources":["../../../src/types/actions/block-action.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAErD;;;;GAIG;AACH,oBAAY,kBAAkB,GAC1B,YAAY,GACZ,iBAAiB,GACjB,sBAAsB,GACtB,kBAAkB,GAClB,uBAAuB,GACvB,yBAAyB,GACzB,8BAA8B,GAC9B,oBAAoB,GACpB,yBAAyB,GACzB,oBAAoB,GACpB,yBAAyB,GACzB,cAAc,GACd,gBAAgB,GAChB,kBAAkB,GAClB,gBAAgB,GAChB,oBAAoB,CAAC;AAEzB;;;;;GAKG;AACH,MAAM,WAAW,kBAAkB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM;IAC3D,IAAI,EAAE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;IAChC,UAAU,CAAC,EAAE;QACX,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;CACH;AAKD,oBAAY,iBAAiB,GAAG,WAAW,CAAC,YAAY,CAAC,CAAC;AAC1D,oBAAY,uBAAuB,GAAG,WAAW,CAAC,kBAAkB,CAAC,CAAC;AACtE,oBAAY,sBAAsB,GAAG,WAAW,CAAC,iBAAiB,CAAC,CAAC;AACpE,oBAAY,8BAA8B,GAAG,WAAW,CAAC,yBAAyB,CAAC,CAAC;AACpF,oBAAY,yBAAyB,GAAG,WAAW,CAAC,oBAAoB,CAAC,CAAC;AAC1E,oBAAY,yBAAyB,GAAG,WAAW,CAAC,oBAAoB,CAAC,CAAC;AAC1E,oBAAY,mBAAmB,GAAG,WAAW,CAAC,cAAc,CAAC,CAAC;AAC9D,oBAAY,qBAAqB,GAAG,WAAW,CAAC,gBAAgB,CAAC,CAAC;AAClE,oBAAY,uBAAuB,GAAG,WAAW,CAAC,kBAAkB,CAAC,CAAC;AACtE,oBAAY,qBAAqB,GAAG,WAAW,CAAC,gBAAgB,CAAC,CAAC;AAClE,oBAAY,yBAAyB,GAAG,WAAW,CAAC,oBAAoB,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"block-action.js","sourceRoot":"","sources":["../../../src/types/actions/block-action.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A Slack dialog submit action wrapped in the standard metadata.
|
|
3
|
+
*
|
|
4
|
+
* This describes the entire JSON-encoded body of a request from Slack dialogs.
|
|
5
|
+
*/
|
|
6
|
+
export interface DialogSubmitAction {
|
|
7
|
+
type: 'dialog_submission';
|
|
8
|
+
callback_id: string;
|
|
9
|
+
submission: {
|
|
10
|
+
[name: string]: string;
|
|
11
|
+
};
|
|
12
|
+
state: string;
|
|
13
|
+
team: {
|
|
14
|
+
id: string;
|
|
15
|
+
domain: string;
|
|
16
|
+
enterprise_id?: string;
|
|
17
|
+
enterprise_name?: string;
|
|
18
|
+
} | null;
|
|
19
|
+
user: {
|
|
20
|
+
id: string;
|
|
21
|
+
name: string;
|
|
22
|
+
team_id?: string;
|
|
23
|
+
};
|
|
24
|
+
channel: {
|
|
25
|
+
id: string;
|
|
26
|
+
name: string;
|
|
27
|
+
};
|
|
28
|
+
action_ts: string;
|
|
29
|
+
token: string;
|
|
30
|
+
response_url: string;
|
|
31
|
+
is_enterprise_install?: boolean;
|
|
32
|
+
enterprise?: {
|
|
33
|
+
id: string;
|
|
34
|
+
name: string;
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* A Slack dialog submission validation response. Use an object of this type to describe errors regarding inputs that
|
|
39
|
+
* were part of the submission.
|
|
40
|
+
*/
|
|
41
|
+
export interface DialogValidation {
|
|
42
|
+
errors: {
|
|
43
|
+
name: string;
|
|
44
|
+
error: string;
|
|
45
|
+
}[];
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=dialog-action.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialog-action.d.ts","sourceRoot":"","sources":["../../../src/types/actions/dialog-action.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,mBAAmB,CAAC;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE;QAAE,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE;QACJ,EAAE,EAAE,MAAM,CAAC;QACX,MAAM,EAAE,MAAM,CAAC;QACf,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,eAAe,CAAC,EAAE,MAAM,CAAC;KAC1B,GAAG,IAAI,CAAC;IACT,IAAI,EAAE;QACJ,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,OAAO,EAAE;QACP,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IAGrB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,UAAU,CAAC,EAAE;QACX,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;CACH;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE;QACN,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;KACf,EAAE,CAAC;CACL"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialog-action.js","sourceRoot":"","sources":["../../../src/types/actions/dialog-action.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { BlockAction } from './block-action';
|
|
2
|
+
import { InteractiveMessage } from './interactive-message';
|
|
3
|
+
import { WorkflowStepEdit } from './workflow-step-edit';
|
|
4
|
+
import { DialogSubmitAction, DialogValidation } from './dialog-action';
|
|
5
|
+
import { SayFn, SayArguments, RespondFn, AckFn } from '../utilities';
|
|
6
|
+
export * from './block-action';
|
|
7
|
+
export * from './interactive-message';
|
|
8
|
+
export * from './dialog-action';
|
|
9
|
+
export * from './workflow-step-edit';
|
|
10
|
+
/**
|
|
11
|
+
* All known actions from Slack's Block Kit interactive components, message actions, dialogs, and legacy interactive
|
|
12
|
+
* messages.
|
|
13
|
+
*
|
|
14
|
+
* TODO: BlockAction's default generic parameter (ElementAction) might be too specific to allow for this type to be used
|
|
15
|
+
* as a constraint on SlackActionMiddlewareArgs' Action generic parameter.
|
|
16
|
+
*
|
|
17
|
+
* If someone were to instantiate SlackActionMiddlewareArgs<BlockAction<SomeNewAction>>, would it work? We need it to
|
|
18
|
+
* work as long as SomeNewAction implements BasicElementAction.
|
|
19
|
+
*
|
|
20
|
+
* We don't want to substitute BlockAction with BlockAction<BasicElementAction> here because that means the completions
|
|
21
|
+
* offered when no generic parameter is bound would be limited to BasicElementAction rather than the union of known
|
|
22
|
+
* actions - ElementAction.
|
|
23
|
+
*/
|
|
24
|
+
export declare type SlackAction = BlockAction | InteractiveMessage | DialogSubmitAction | WorkflowStepEdit;
|
|
25
|
+
/**
|
|
26
|
+
* Arguments which listeners and middleware receive to process an action from Slack's Block Kit interactive components,
|
|
27
|
+
* message actions, dialogs, or legacy interactive messages.
|
|
28
|
+
*
|
|
29
|
+
* The type parameter `Action` represents the entire JSON-encoded request body from Slack. The generic type
|
|
30
|
+
* `BlockAction<ElementAction>` can be used to create a type for this parameter based on an element's action type. In
|
|
31
|
+
* this case `ElementAction` must extend `BasicElementAction`.
|
|
32
|
+
*/
|
|
33
|
+
export interface SlackActionMiddlewareArgs<Action extends SlackAction = SlackAction> {
|
|
34
|
+
payload: Action extends BlockAction<infer ElementAction> ? ElementAction : Action extends InteractiveMessage<infer InteractiveAction> ? InteractiveAction : Action;
|
|
35
|
+
action: this['payload'];
|
|
36
|
+
body: Action;
|
|
37
|
+
say: Action extends Exclude<SlackAction, DialogSubmitAction | WorkflowStepEdit> ? SayFn : never;
|
|
38
|
+
respond: RespondFn;
|
|
39
|
+
ack: ActionAckFn<Action>;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Type function which given an action `A` returns a corresponding type for the `ack()` function. The function is used
|
|
43
|
+
* to acknowledge the receipt (and possibly signal failure) of an action from a listener or middleware.
|
|
44
|
+
*/
|
|
45
|
+
declare type ActionAckFn<A extends SlackAction> = A extends InteractiveMessage ? AckFn<string | SayArguments> : A extends DialogSubmitAction ? AckFn<DialogValidation> : AckFn<void>;
|
|
46
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":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AAC,SAAS,kBAAkB,GAC1B,KAAK,CAAC,gBAAgB,CAAC,GACvB,KAAK,CAAC,IAAI,CAAC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./block-action"), exports);
|
|
14
|
+
__exportStar(require("./interactive-message"), exports);
|
|
15
|
+
__exportStar(require("./dialog-action"), exports);
|
|
16
|
+
__exportStar(require("./workflow-step-edit"), exports);
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/actions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAMA,iDAA+B;AAC/B,wDAAsC;AACtC,kDAAgC;AAChC,uDAAqC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* All actions which Slack delivers from legacy interactive messages. The full body of these actions are represented
|
|
3
|
+
* as [[InteractiveMessage]].
|
|
4
|
+
*/
|
|
5
|
+
export declare type InteractiveAction = ButtonClick | MenuSelect;
|
|
6
|
+
/**
|
|
7
|
+
* A button click action from a legacy interactive message.
|
|
8
|
+
*/
|
|
9
|
+
export interface ButtonClick {
|
|
10
|
+
type: 'button';
|
|
11
|
+
name: string;
|
|
12
|
+
value: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* A menu selection action from a legacy interactive message.
|
|
16
|
+
*/
|
|
17
|
+
export interface MenuSelect {
|
|
18
|
+
type: 'select';
|
|
19
|
+
name: string;
|
|
20
|
+
selected_options: {
|
|
21
|
+
value: string;
|
|
22
|
+
}[];
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* A Slack legacy interactive message action wrapped in the standard metadata.
|
|
26
|
+
*
|
|
27
|
+
* This describes the entire JSON-encoded body of a request from Slack's legacy interactive messages.
|
|
28
|
+
*/
|
|
29
|
+
export interface InteractiveMessage<Action extends InteractiveAction = InteractiveAction> {
|
|
30
|
+
type: 'interactive_message';
|
|
31
|
+
callback_id: string;
|
|
32
|
+
actions: Action[];
|
|
33
|
+
team: {
|
|
34
|
+
id: string;
|
|
35
|
+
domain: string;
|
|
36
|
+
enterprise_id?: string;
|
|
37
|
+
enterprise_name?: string;
|
|
38
|
+
} | null;
|
|
39
|
+
user: {
|
|
40
|
+
id: string;
|
|
41
|
+
name: string;
|
|
42
|
+
team_id?: string;
|
|
43
|
+
};
|
|
44
|
+
channel: {
|
|
45
|
+
id: string;
|
|
46
|
+
name: string;
|
|
47
|
+
};
|
|
48
|
+
action_ts: string;
|
|
49
|
+
attachment_id?: string;
|
|
50
|
+
token: string;
|
|
51
|
+
response_url: string;
|
|
52
|
+
trigger_id: string;
|
|
53
|
+
is_app_unfurl?: boolean;
|
|
54
|
+
message_ts?: string;
|
|
55
|
+
original_message?: {
|
|
56
|
+
[key: string]: string;
|
|
57
|
+
};
|
|
58
|
+
is_enterprise_install?: boolean;
|
|
59
|
+
enterprise?: {
|
|
60
|
+
id: string;
|
|
61
|
+
name: string;
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
export declare type InteractiveButtonClick = InteractiveMessage<ButtonClick>;
|
|
65
|
+
export declare type InteractiveMenuSelect = InteractiveMessage<MenuSelect>;
|
|
66
|
+
//# sourceMappingURL=interactive-message.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interactive-message.d.ts","sourceRoot":"","sources":["../../../src/types/actions/interactive-message.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,oBAAY,iBAAiB,GAAG,WAAW,GAAG,UAAU,CAAC;AAEzD;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB,EAAE;QAChB,KAAK,EAAE,MAAM,CAAC;KACf,EAAE,CAAC;CACL;AAED;;;;GAIG;AACH,MAAM,WAAW,kBAAkB,CAAC,MAAM,SAAS,iBAAiB,GAAG,iBAAiB;IACtF,IAAI,EAAE,qBAAqB,CAAC;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,IAAI,EAAE;QACJ,EAAE,EAAE,MAAM,CAAC;QACX,MAAM,EAAE,MAAM,CAAC;QACf,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,eAAe,CAAC,EAAE,MAAM,CAAC;KAC1B,GAAG,IAAI,CAAC;IACT,IAAI,EAAE;QACJ,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,OAAO,EAAE;QACP,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;IAGxB,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,gBAAgB,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAG7C,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,UAAU,CAAC,EAAE;QACX,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;CACH;AAKD,oBAAY,sBAAsB,GAAG,kBAAkB,CAAC,WAAW,CAAC,CAAC;AACrE,oBAAY,qBAAqB,GAAG,kBAAkB,CAAC,UAAU,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interactive-message.js","sourceRoot":"","sources":["../../../src/types/actions/interactive-message.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A Slack workflow step action wrapped in the standard metadata.
|
|
3
|
+
*
|
|
4
|
+
* This describes the entire JSON-encoded body of a request from Slack workflow step actions.
|
|
5
|
+
*/
|
|
6
|
+
export interface WorkflowStepEdit {
|
|
7
|
+
type: 'workflow_step_edit';
|
|
8
|
+
callback_id: string;
|
|
9
|
+
trigger_id: string;
|
|
10
|
+
user: {
|
|
11
|
+
id: string;
|
|
12
|
+
username: string;
|
|
13
|
+
team_id?: string;
|
|
14
|
+
};
|
|
15
|
+
team: {
|
|
16
|
+
id: string;
|
|
17
|
+
domain: string;
|
|
18
|
+
enterprise_id?: string;
|
|
19
|
+
enterprise_name?: string;
|
|
20
|
+
};
|
|
21
|
+
channel?: {
|
|
22
|
+
id?: string;
|
|
23
|
+
name?: string;
|
|
24
|
+
};
|
|
25
|
+
token: string;
|
|
26
|
+
action_ts: string;
|
|
27
|
+
workflow_step: {
|
|
28
|
+
workflow_id: string;
|
|
29
|
+
step_id: string;
|
|
30
|
+
inputs: {
|
|
31
|
+
[key: string]: {
|
|
32
|
+
value: any;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
outputs: {
|
|
36
|
+
name: string;
|
|
37
|
+
type: string;
|
|
38
|
+
label: string;
|
|
39
|
+
}[];
|
|
40
|
+
step_name?: string;
|
|
41
|
+
step_image_url?: string;
|
|
42
|
+
};
|
|
43
|
+
is_enterprise_install?: boolean;
|
|
44
|
+
enterprise?: {
|
|
45
|
+
id: string;
|
|
46
|
+
name: string;
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=workflow-step-edit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-step-edit.d.ts","sourceRoot":"","sources":["../../../src/types/actions/workflow-step-edit.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,oBAAoB,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE;QACJ,EAAE,EAAE,MAAM,CAAC;QACX,QAAQ,EAAE,MAAM,CAAC;QACjB,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,IAAI,EAAE;QACJ,EAAE,EAAE,MAAM,CAAC;QACX,MAAM,EAAE,MAAM,CAAC;QACf,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,eAAe,CAAC,EAAE,MAAM,CAAC;KAC1B,CAAC;IACF,OAAO,CAAC,EAAE;QACR,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IACF,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,EAAE;YACN,CAAC,GAAG,EAAE,MAAM,GAAG;gBAEb,KAAK,EAAE,GAAG,CAAC;aACZ,CAAC;SACH,CAAC;QACF,OAAO,EAAE;YACP,IAAI,EAAE,MAAM,CAAC;YACb,IAAI,EAAE,MAAM,CAAC;YACb,KAAK,EAAE,MAAM,CAAC;SACf,EAAE,CAAC;QACJ,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,cAAc,CAAC,EAAE,MAAM,CAAC;KACzB,CAAC;IAGF,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,UAAU,CAAC,EAAE;QACX,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;CACH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-step-edit.js","sourceRoot":"","sources":["../../../src/types/actions/workflow-step-edit.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { StringIndexed } from '../helpers';
|
|
2
|
+
import { SayFn, RespondFn, RespondArguments, AckFn } from '../utilities';
|
|
3
|
+
/**
|
|
4
|
+
* Arguments which listeners and middleware receive to process a slash command from Slack.
|
|
5
|
+
*/
|
|
6
|
+
export interface SlackCommandMiddlewareArgs {
|
|
7
|
+
payload: SlashCommand;
|
|
8
|
+
command: this['payload'];
|
|
9
|
+
body: this['payload'];
|
|
10
|
+
say: SayFn;
|
|
11
|
+
respond: RespondFn;
|
|
12
|
+
ack: AckFn<string | RespondArguments>;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* A Slack slash command
|
|
16
|
+
*
|
|
17
|
+
* This describes the entire URL-encoded body of a request from Slack's slash commands.
|
|
18
|
+
*/
|
|
19
|
+
export interface SlashCommand extends StringIndexed {
|
|
20
|
+
token: string;
|
|
21
|
+
command: string;
|
|
22
|
+
text: string;
|
|
23
|
+
response_url: string;
|
|
24
|
+
trigger_id: string;
|
|
25
|
+
user_id: string;
|
|
26
|
+
user_name: string;
|
|
27
|
+
team_id: string;
|
|
28
|
+
team_domain: string;
|
|
29
|
+
channel_id: string;
|
|
30
|
+
channel_name: string;
|
|
31
|
+
api_app_id: string;
|
|
32
|
+
enterprise_id?: string;
|
|
33
|
+
enterprise_name?: string;
|
|
34
|
+
is_enterprise_install?: string;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/command/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAEzE;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,OAAO,EAAE,YAAY,CAAC;IACtB,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;IACzB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;IACtB,GAAG,EAAE,KAAK,CAAC;IACX,OAAO,EAAE,SAAS,CAAC;IACnB,GAAG,EAAE,KAAK,CAAC,MAAM,GAAG,gBAAgB,CAAC,CAAC;CACvC;AAED;;;;GAIG;AACH,MAAM,WAAW,YAAa,SAAQ,aAAa;IACjD,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/command/index.ts"],"names":[],"mappings":""}
|