@hostwebhook/node-types 1.64.0 → 1.66.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/connections.js +1 -0
- package/dist/discord-toolkit.d.ts +47 -0
- package/dist/discord-toolkit.js +235 -0
- package/dist/dispatch.js +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +20 -2
- package/dist/jira-operations.d.ts +164 -0
- package/dist/jira-operations.js +474 -0
- package/dist/registry.js +19 -0
- package/dist/slack-toolkit.d.ts +47 -0
- package/dist/slack-toolkit.js +218 -0
- package/dist/types.d.ts +1 -1
- package/dist/ui.js +2 -0
- package/package.json +1 -1
package/dist/connections.js
CHANGED
|
@@ -80,6 +80,7 @@ exports.NODE_CONNECTIONS = {
|
|
|
80
80
|
mailchimpAction: { acceptsInputFrom: ACTION_INPUTS, canOutputTo: PROCESSING_OUTPUTS },
|
|
81
81
|
shopifyAction: { acceptsInputFrom: ACTION_INPUTS, canOutputTo: PROCESSING_OUTPUTS },
|
|
82
82
|
githubAction: { acceptsInputFrom: ACTION_INPUTS, canOutputTo: PROCESSING_OUTPUTS },
|
|
83
|
+
jiraAction: { acceptsInputFrom: ACTION_INPUTS, canOutputTo: PROCESSING_OUTPUTS },
|
|
83
84
|
googleContactsAction: { acceptsInputFrom: ACTION_INPUTS, canOutputTo: PROCESSING_OUTPUTS },
|
|
84
85
|
googleAnalyticsAction: { acceptsInputFrom: ACTION_INPUTS, canOutputTo: PROCESSING_OUTPUTS },
|
|
85
86
|
notionAction: { acceptsInputFrom: ACTION_INPUTS, canOutputTo: PROCESSING_OUTPUTS },
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Discord AI Toolkit — las herramientas que un discordAction expone cuando
|
|
3
|
+
* `aiEnabled` está encendido.
|
|
4
|
+
*
|
|
5
|
+
* **Se escribe una sola vez.** Antes vivía dos veces: una copia en
|
|
6
|
+
* `dashboard/components/discord-actions/discord-operations-schemas.ts` y otra en
|
|
7
|
+
* `api/src/mcp-servers/toolkit-specs.ts`, las dos a mano y en repos distintos,
|
|
8
|
+
* así que ningún test podía compararlas. Es la octava y novena mudanza de esta
|
|
9
|
+
* serie; de las siete anteriores, la de Contacts salió de que una copia
|
|
10
|
+
* anunciara 15 herramientas y expusiera una.
|
|
11
|
+
*
|
|
12
|
+
* Y sí había deriva, medida al mudar: la descripción de `addReaction` decía en
|
|
13
|
+
* el dashboard «URL-encoding is handled.» y en la api «URL-encoding is handled —
|
|
14
|
+
* pass the raw form.». Gana la de la api, que es la que el servidor MCP sirve
|
|
15
|
+
* hoy a clientes externos y la que dice qué hacer. Las 17 operaciones, sus
|
|
16
|
+
* nombres de herramienta y sus parámetros coincidían exactamente.
|
|
17
|
+
*
|
|
18
|
+
* Targets Discord API v10. Los parámetros snowflake son `string` porque los ids
|
|
19
|
+
* de Discord se pasan de la precisión de Number (17-20 dígitos).
|
|
20
|
+
*
|
|
21
|
+
* La forma es la que ya consume `toolkitSpecToMcpTool` en la api, para que
|
|
22
|
+
* pueda usarse sin adaptador. Los textos van en inglés porque los lee el modelo
|
|
23
|
+
* y quien mire la lista de herramientas del servidor MCP.
|
|
24
|
+
*/
|
|
25
|
+
import type { DiscordOperation } from './discord-operations';
|
|
26
|
+
export interface DiscordToolkitParameter {
|
|
27
|
+
name: string;
|
|
28
|
+
type: 'string' | 'number' | 'boolean';
|
|
29
|
+
description: string;
|
|
30
|
+
required: boolean;
|
|
31
|
+
}
|
|
32
|
+
export interface DiscordToolkitSpec {
|
|
33
|
+
operation: DiscordOperation;
|
|
34
|
+
/** Etiqueta corta de la fila en la lista de herramientas. */
|
|
35
|
+
label: string;
|
|
36
|
+
/** Nombre con el que el LLM llama a la herramienta. */
|
|
37
|
+
toolName: string;
|
|
38
|
+
/** Descripción (más reglas de uso) que ve el LLM. */
|
|
39
|
+
description: string;
|
|
40
|
+
parameters: DiscordToolkitParameter[];
|
|
41
|
+
/** Operaciones irreversibles o que cambian privilegios. La capa MCP las
|
|
42
|
+
* bloquea cuando el nodo de IA lleva `requireConfirmationForDestructive`,
|
|
43
|
+
* salvo que la llamada traiga confirmación explícita. */
|
|
44
|
+
destructive?: boolean;
|
|
45
|
+
}
|
|
46
|
+
export declare const DISCORD_TOOLKIT_SPECS: DiscordToolkitSpec[];
|
|
47
|
+
export declare const DISCORD_TOOLKIT_BY_TOOL_NAME: Record<string, DiscordToolkitSpec>;
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Discord AI Toolkit — las herramientas que un discordAction expone cuando
|
|
4
|
+
* `aiEnabled` está encendido.
|
|
5
|
+
*
|
|
6
|
+
* **Se escribe una sola vez.** Antes vivía dos veces: una copia en
|
|
7
|
+
* `dashboard/components/discord-actions/discord-operations-schemas.ts` y otra en
|
|
8
|
+
* `api/src/mcp-servers/toolkit-specs.ts`, las dos a mano y en repos distintos,
|
|
9
|
+
* así que ningún test podía compararlas. Es la octava y novena mudanza de esta
|
|
10
|
+
* serie; de las siete anteriores, la de Contacts salió de que una copia
|
|
11
|
+
* anunciara 15 herramientas y expusiera una.
|
|
12
|
+
*
|
|
13
|
+
* Y sí había deriva, medida al mudar: la descripción de `addReaction` decía en
|
|
14
|
+
* el dashboard «URL-encoding is handled.» y en la api «URL-encoding is handled —
|
|
15
|
+
* pass the raw form.». Gana la de la api, que es la que el servidor MCP sirve
|
|
16
|
+
* hoy a clientes externos y la que dice qué hacer. Las 17 operaciones, sus
|
|
17
|
+
* nombres de herramienta y sus parámetros coincidían exactamente.
|
|
18
|
+
*
|
|
19
|
+
* Targets Discord API v10. Los parámetros snowflake son `string` porque los ids
|
|
20
|
+
* de Discord se pasan de la precisión de Number (17-20 dígitos).
|
|
21
|
+
*
|
|
22
|
+
* La forma es la que ya consume `toolkitSpecToMcpTool` en la api, para que
|
|
23
|
+
* pueda usarse sin adaptador. Los textos van en inglés porque los lee el modelo
|
|
24
|
+
* y quien mire la lista de herramientas del servidor MCP.
|
|
25
|
+
*/
|
|
26
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
exports.DISCORD_TOOLKIT_BY_TOOL_NAME = exports.DISCORD_TOOLKIT_SPECS = void 0;
|
|
28
|
+
const p = (name, description, required = true, type = 'string') => ({ name, type, description, required });
|
|
29
|
+
exports.DISCORD_TOOLKIT_SPECS = [
|
|
30
|
+
// ── Messages ───────────────────────────────────────────────────
|
|
31
|
+
{
|
|
32
|
+
operation: 'sendMessage',
|
|
33
|
+
label: 'Send message',
|
|
34
|
+
toolName: 'send_discord_message',
|
|
35
|
+
description: 'Post a message to a Discord channel or thread. ' +
|
|
36
|
+
'USAGE RULES: ' +
|
|
37
|
+
'(1) `channelId` is the snowflake of a channel the bot can see. Get it from the trigger payload, listChannels, or the user. Never invent one. ' +
|
|
38
|
+
'(2) For a quote-style reply pointing at a specific message, set `replyToMessageId`. ' +
|
|
39
|
+
"(3) To post INTO a thread instead of the parent channel, set `threadId` to the thread's snowflake. " +
|
|
40
|
+
'(4) Discord allows up to 2000 chars per message and supports markdown.',
|
|
41
|
+
parameters: [
|
|
42
|
+
p('channelId', 'Channel snowflake (or thread snowflake to post into a thread).'),
|
|
43
|
+
p('content', 'Message text. Markdown is supported. Max 2000 chars.'),
|
|
44
|
+
p('replyToMessageId', 'Snowflake of a message to quote-reply to.', false),
|
|
45
|
+
p('threadId', 'Thread snowflake to post into (overrides channelId for the actual destination).', false),
|
|
46
|
+
],
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
operation: 'editMessage',
|
|
50
|
+
label: 'Edit message',
|
|
51
|
+
toolName: 'edit_discord_message',
|
|
52
|
+
description: "Edit an existing Discord message. The bot can only edit messages it sent itself — editing someone else's message will fail with 403.",
|
|
53
|
+
parameters: [
|
|
54
|
+
p('channelId', 'Channel snowflake where the message lives.'),
|
|
55
|
+
p('messageId', 'Snowflake of the message to edit.'),
|
|
56
|
+
p('content', 'New message content. Markdown supported. Max 2000 chars.'),
|
|
57
|
+
],
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
operation: 'deleteMessage',
|
|
61
|
+
label: 'Delete message',
|
|
62
|
+
toolName: 'delete_discord_message',
|
|
63
|
+
description: "Permanently delete a Discord message. Irreversible. Deleting another user's message requires the bot to have Manage Messages permission. Always confirm with the user before calling this on user-authored messages.",
|
|
64
|
+
parameters: [
|
|
65
|
+
p('channelId', 'Channel snowflake where the message lives.'),
|
|
66
|
+
p('messageId', 'Snowflake of the message to delete.'),
|
|
67
|
+
],
|
|
68
|
+
destructive: true,
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
operation: 'getMessage',
|
|
72
|
+
label: 'Get message',
|
|
73
|
+
toolName: 'get_discord_message',
|
|
74
|
+
description: 'Fetch a single Discord message with its content, author, embeds, attachments, reactions, and pinned state. Use BEFORE editing or reacting to verify the message still exists.',
|
|
75
|
+
parameters: [
|
|
76
|
+
p('channelId', 'Channel snowflake where the message lives.'),
|
|
77
|
+
p('messageId', 'Snowflake of the message to fetch.'),
|
|
78
|
+
],
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
operation: 'addReaction',
|
|
82
|
+
label: 'Add reaction',
|
|
83
|
+
toolName: 'add_discord_reaction',
|
|
84
|
+
description: 'React to a message as the bot. ' +
|
|
85
|
+
'EMOJI FORMAT: ' +
|
|
86
|
+
'(1) Unicode emoji — pass the character itself (e.g. `🔥`, `👍`). ' +
|
|
87
|
+
'(2) Custom server emoji — pass `name:id` (e.g. `partyparrot:123456789012345678`). ' +
|
|
88
|
+
'URL-encoding is handled — pass the raw form. The bot must be in the server and have Add Reactions permission.',
|
|
89
|
+
parameters: [
|
|
90
|
+
p('channelId', 'Channel snowflake where the message lives.'),
|
|
91
|
+
p('messageId', 'Snowflake of the message to react to.'),
|
|
92
|
+
p('emoji', 'Unicode emoji or `name:id` for custom emoji.'),
|
|
93
|
+
],
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
operation: 'removeReaction',
|
|
97
|
+
label: 'Remove reaction',
|
|
98
|
+
toolName: 'remove_discord_reaction',
|
|
99
|
+
description: "Remove the bot's own reaction from a message. Same emoji format as add_discord_reaction. Cannot remove other users' reactions through this tool.",
|
|
100
|
+
parameters: [
|
|
101
|
+
p('channelId', 'Channel snowflake where the message lives.'),
|
|
102
|
+
p('messageId', 'Snowflake of the reacted message.'),
|
|
103
|
+
p('emoji', 'Unicode emoji or `name:id` for custom emoji.'),
|
|
104
|
+
],
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
operation: 'pinMessage',
|
|
108
|
+
label: 'Pin message',
|
|
109
|
+
toolName: 'pin_discord_message',
|
|
110
|
+
description: 'Pin a message in its channel. The bot must have Manage Messages permission. Each channel has a 50-pin limit; pinning a 51st message returns 403.',
|
|
111
|
+
parameters: [
|
|
112
|
+
p('channelId', 'Channel snowflake where the message lives.'),
|
|
113
|
+
p('messageId', 'Snowflake of the message to pin.'),
|
|
114
|
+
],
|
|
115
|
+
},
|
|
116
|
+
// ── Channels ───────────────────────────────────────────────────
|
|
117
|
+
{
|
|
118
|
+
operation: 'createChannel',
|
|
119
|
+
label: 'Create channel',
|
|
120
|
+
toolName: 'create_discord_channel',
|
|
121
|
+
description: 'Create a new channel in a Discord guild. The bot must have Manage Channels permission. ' +
|
|
122
|
+
'TYPES: `text` (default), `voice`, `forum`, `announcement`, `category`. ' +
|
|
123
|
+
"To put the new channel under a category, set `parentId` to the category's snowflake.",
|
|
124
|
+
parameters: [
|
|
125
|
+
p('guildId', 'Guild (server) snowflake.'),
|
|
126
|
+
p('name', 'Channel name. Lowercase / hyphens recommended for text channels.'),
|
|
127
|
+
p('type', 'Channel type: text, voice, forum, announcement, category.', false),
|
|
128
|
+
p('parentId', 'Snowflake of the parent category. Optional.', false),
|
|
129
|
+
p('topic', 'Channel description (text channels only).', false),
|
|
130
|
+
p('slowmode', 'Per-user message rate limit in seconds (0-21600).', false, 'number'),
|
|
131
|
+
p('nsfw', 'Mark channel as age-restricted.', false, 'boolean'),
|
|
132
|
+
],
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
operation: 'editChannel',
|
|
136
|
+
label: 'Edit channel',
|
|
137
|
+
toolName: 'edit_discord_channel',
|
|
138
|
+
description: 'Rename, change topic, slowmode, or move a channel under a different category. Pass only fields you want changed. Bot needs Manage Channels.',
|
|
139
|
+
parameters: [
|
|
140
|
+
p('channelId', 'Channel snowflake.'),
|
|
141
|
+
p('name', 'New channel name.', false),
|
|
142
|
+
p('topic', 'New channel description.', false),
|
|
143
|
+
p('slowmode', 'New slowmode in seconds (0-21600).', false, 'number'),
|
|
144
|
+
p('parentId', 'Move under a different category by snowflake.', false),
|
|
145
|
+
p('nsfw', 'Toggle age-restricted.', false, 'boolean'),
|
|
146
|
+
],
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
operation: 'deleteChannel',
|
|
150
|
+
label: 'Delete channel',
|
|
151
|
+
toolName: 'delete_discord_channel',
|
|
152
|
+
description: 'Permanently delete a Discord channel and ALL its messages. Irreversible. ALWAYS confirm with the user before calling — Discord does not provide a recovery window.',
|
|
153
|
+
parameters: [p('channelId', 'Channel snowflake to delete.')],
|
|
154
|
+
destructive: true,
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
operation: 'getChannel',
|
|
158
|
+
label: 'Get channel',
|
|
159
|
+
toolName: 'get_discord_channel',
|
|
160
|
+
description: "Fetch a Discord channel's full configuration: name, type, topic, parentId, NSFW flag, slowmode. Use to inspect before editing.",
|
|
161
|
+
parameters: [p('channelId', 'Channel snowflake to fetch.')],
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
operation: 'listChannels',
|
|
165
|
+
label: 'List channels',
|
|
166
|
+
toolName: 'list_discord_channels',
|
|
167
|
+
description: 'List every channel in a guild — text, voice, categories, threads, forums. Returns an iterable array. Use this to FIND a channel by name before posting.',
|
|
168
|
+
parameters: [p('guildId', 'Guild snowflake.')],
|
|
169
|
+
},
|
|
170
|
+
// ── Threads ────────────────────────────────────────────────────
|
|
171
|
+
{
|
|
172
|
+
operation: 'createThread',
|
|
173
|
+
label: 'Create thread',
|
|
174
|
+
toolName: 'create_discord_thread',
|
|
175
|
+
description: 'Create a thread in a channel. ' +
|
|
176
|
+
'TWO MODES: ' +
|
|
177
|
+
'(1) With `messageId` — spawns the thread off that message. Inherits its visibility. ' +
|
|
178
|
+
'(2) Without `messageId` — standalone thread. Pass `type: public|private|announcement`. Private threads require Manage Threads permission.',
|
|
179
|
+
parameters: [
|
|
180
|
+
p('channelId', 'Parent channel snowflake.'),
|
|
181
|
+
p('name', 'Thread name.'),
|
|
182
|
+
p('messageId', 'Optional anchor message snowflake. When set, thread spawns off it.', false),
|
|
183
|
+
p('type', 'Thread type: public, private, announcement (ignored when messageId is set).', false),
|
|
184
|
+
p('autoArchiveMinutes', 'Auto-archive after N minutes of inactivity (60 / 1440 / 4320 / 10080).', false, 'number'),
|
|
185
|
+
],
|
|
186
|
+
},
|
|
187
|
+
// ── DMs ────────────────────────────────────────────────────────
|
|
188
|
+
{
|
|
189
|
+
operation: 'sendDM',
|
|
190
|
+
label: 'Send DM',
|
|
191
|
+
toolName: 'send_discord_dm',
|
|
192
|
+
description: "Direct-message a user. The user must share at least one server with the bot AND have DMs from server members enabled. Discord will silently drop the DM if the user has DMs disabled — that is the user's privacy choice. Do not retry.",
|
|
193
|
+
parameters: [
|
|
194
|
+
p('userId', 'User snowflake.'),
|
|
195
|
+
p('content', 'DM content. Markdown supported. Max 2000 chars.'),
|
|
196
|
+
],
|
|
197
|
+
},
|
|
198
|
+
// ── Roles & members ────────────────────────────────────────────
|
|
199
|
+
{
|
|
200
|
+
operation: 'addRole',
|
|
201
|
+
label: 'Add role to member',
|
|
202
|
+
toolName: 'add_discord_role',
|
|
203
|
+
description: 'Grant a role to a guild member. ' +
|
|
204
|
+
'CRITICAL: the bot\'s OWN role must be ABOVE the role being granted in the server\'s role hierarchy. A 403 with "Missing Permissions" almost always means the bot needs to be moved up — tell the user to drag the bot role above the target role in Server Settings → Roles.',
|
|
205
|
+
parameters: [
|
|
206
|
+
p('guildId', 'Guild snowflake.'),
|
|
207
|
+
p('userId', 'Member snowflake.'),
|
|
208
|
+
p('roleId', 'Role snowflake to grant.'),
|
|
209
|
+
],
|
|
210
|
+
destructive: true,
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
operation: 'removeRole',
|
|
214
|
+
label: 'Remove role from member',
|
|
215
|
+
toolName: 'remove_discord_role',
|
|
216
|
+
description: "Remove a role from a guild member. Same hierarchy rule as add_discord_role — bot's role must be above the target role. Cannot remove the @everyone role.",
|
|
217
|
+
parameters: [
|
|
218
|
+
p('guildId', 'Guild snowflake.'),
|
|
219
|
+
p('userId', 'Member snowflake.'),
|
|
220
|
+
p('roleId', 'Role snowflake to remove.'),
|
|
221
|
+
],
|
|
222
|
+
destructive: true,
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
operation: 'getMember',
|
|
226
|
+
label: 'Get member',
|
|
227
|
+
toolName: 'get_discord_member',
|
|
228
|
+
description: 'Fetch a guild member: their server nickname, role IDs, joined-at timestamp, and the underlying user object. Use BEFORE addRole / removeRole to inspect current roles.',
|
|
229
|
+
parameters: [
|
|
230
|
+
p('guildId', 'Guild snowflake.'),
|
|
231
|
+
p('userId', 'Member snowflake.'),
|
|
232
|
+
],
|
|
233
|
+
},
|
|
234
|
+
];
|
|
235
|
+
exports.DISCORD_TOOLKIT_BY_TOOL_NAME = Object.fromEntries(exports.DISCORD_TOOLKIT_SPECS.map((s) => [s.toolName, s]));
|
package/dist/dispatch.js
CHANGED
|
@@ -55,6 +55,7 @@ exports.NODE_DISPATCH = {
|
|
|
55
55
|
mailchimpAction: { service: 'mailchimpActionsService', collection: 'mailchimpactions', hasFilters: true, outputFields: ['outputNodes'], customDispatch: true, pipelineDispatch: 'excluded' },
|
|
56
56
|
shopifyAction: { service: 'shopifyActionsService', collection: 'shopifyactions', hasFilters: true, outputFields: ['outputNodes'], customDispatch: true, pipelineDispatch: 'excluded' },
|
|
57
57
|
githubAction: { service: 'githubActionsService', collection: 'githubactions', hasFilters: true, outputFields: ['outputNodes'], customDispatch: true, pipelineDispatch: 'excluded' },
|
|
58
|
+
jiraAction: { service: 'jiraActionsService', collection: 'jiraactions', hasFilters: true, outputFields: ['outputNodes'], customDispatch: true, pipelineDispatch: 'excluded' },
|
|
58
59
|
slackAction: { service: 'slackActionsService', collection: 'slackactions', hasFilters: true, outputFields: ['outputNodes'], customDispatch: true, pipelineDispatch: 'excluded' },
|
|
59
60
|
googleContactsAction: { service: 'googleContactsActionsService', collection: 'googlecontactsactions', hasFilters: true, outputFields: ['outputNodes'], customDispatch: true, pipelineDispatch: 'excluded' },
|
|
60
61
|
googleAnalyticsAction: { service: 'googleAnalyticsActionsService', collection: 'googleanalyticsactions', hasFilters: true, outputFields: ['outputNodes'], customDispatch: true, pipelineDispatch: 'excluded' },
|
package/dist/index.d.ts
CHANGED
|
@@ -24,14 +24,20 @@ export { WHATSAPP_OPERATIONS, isWhatsAppOperation, } from './whatsapp-operations
|
|
|
24
24
|
export type { WhatsAppOperation } from './whatsapp-operations';
|
|
25
25
|
export { DISCORD_OPERATIONS, DISCORD_OPERATION_SPECS, isDiscordOperation, } from './discord-operations';
|
|
26
26
|
export type { DiscordOperation, DiscordParamSpec, DiscordOperationSpec, } from './discord-operations';
|
|
27
|
+
export { DISCORD_TOOLKIT_SPECS, DISCORD_TOOLKIT_BY_TOOL_NAME, } from './discord-toolkit';
|
|
28
|
+
export type { DiscordToolkitSpec, DiscordToolkitParameter, } from './discord-toolkit';
|
|
27
29
|
export { MAILCHIMP_OPERATIONS, MAILCHIMP_OPERATION_SPECS, MAILCHIMP_CONTACT_STATUSES, isMailchimpOperation, } from './mailchimp-operations';
|
|
28
30
|
export type { MailchimpOperation, MailchimpContactStatus, MailchimpParamSpec, MailchimpOperationSpec, } from './mailchimp-operations';
|
|
29
31
|
export { SHOPIFY_OPERATIONS, SHOPIFY_OPERATION_SPECS, SHOPIFY_TAGGABLE_RESOURCES, SHOPIFY_SEARCHABLE_RESOURCES, isShopifyOperation, } from './shopify-operations';
|
|
30
32
|
export type { ShopifyOperation, ShopifyTaggableResource, ShopifySearchableResource, ShopifyParamSpec, ShopifyOperationSpec, } from './shopify-operations';
|
|
31
33
|
export { GITHUB_OPERATIONS, GITHUB_OPERATION_SPECS, GITHUB_DROPDOWN_OPERATIONS, GITHUB_ITERABLE_OPERATIONS, isGithubOperation, } from './github-operations';
|
|
32
34
|
export type { GithubOperation, GithubParamType, GithubParamSpec, GithubOperationSpec, } from './github-operations';
|
|
35
|
+
export { JIRA_OPERATIONS, JIRA_OPERATION_SPECS, JIRA_DROPDOWN_OPERATIONS, JIRA_ITERABLE_OPERATIONS, isJiraOperation, } from './jira-operations';
|
|
36
|
+
export type { JiraOperation, JiraParamType, JiraParamSpec, JiraOperationSpec, } from './jira-operations';
|
|
33
37
|
export { SLACK_OPERATIONS, SLACK_OPERATION_SPECS, isSlackOperation, } from './slack-operations';
|
|
34
38
|
export type { SlackOperation, SlackParamSpec, SlackOperationSpec, } from './slack-operations';
|
|
39
|
+
export { SLACK_TOOLKIT_SPECS, SLACK_TOOLKIT_BY_TOOL_NAME, } from './slack-toolkit';
|
|
40
|
+
export type { SlackToolkitSpec, SlackToolkitParameter, } from './slack-toolkit';
|
|
35
41
|
export { SHEETS_OPERATIONS, SHEETS_OPERATION_SPECS, isSheetsOperation, } from './sheets-operations';
|
|
36
42
|
export type { SheetsOperation, SheetsParamSpec, SheetsOperationSpec, } from './sheets-operations';
|
|
37
43
|
export { SHEETS_TOOLKIT_SPECS, SHEETS_TOOLKIT_BY_TOOL_NAME, SHEETS_TOOLKIT_DEFAULTABLE, } from './sheets-toolkit';
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DRIVE_OPERATION_SPECS = exports.DRIVE_OPERATIONS = exports.GOOGLE_CALENDAR_TOOLKIT_BY_TOOL_NAME = exports.GOOGLE_CALENDAR_TOOLKIT_SPECS = exports.isGoogleCalendarOperation = exports.GOOGLE_CALENDAR_OPERATION_SPECS = exports.GOOGLE_CALENDAR_OPERATIONS = exports.isGmailOperation = exports.resolveGmailSendFields = exports.GMAIL_SEND_LEGACY_FIELDS = exports.NATIVE_EMAIL_TOOLKIT_BY_TOOL_NAME = exports.GMAIL_TOOLKIT_BY_TOOL_NAME = exports.NATIVE_EMAIL_TOOLKIT_SPECS = exports.GMAIL_SEND_AND_WAIT_TOOL_SPEC = exports.GMAIL_ALL_TOOLKIT_SPECS = exports.GMAIL_TOOLKIT_SPECS = exports.GMAIL_TOOLKIT_OPERATIONS = exports.GMAIL_DROPDOWN_OPERATIONS = exports.GMAIL_OPERATION_GROUPS = exports.GMAIL_OPERATION_SPECS = exports.GMAIL_OPERATIONS = exports.versionCatalogErrors = exports.fieldsLost = exports.fieldsLostBetween = exports.currentVersion = exports.versionSpec = exports.versionsOf = exports.isVersioned = exports.NODE_TYPE_TO_PREFIX = exports.PREFIX_TO_NODE_TYPE = exports.NODE_STATE_KEYS = exports.NODE_COLORS = exports.NODE_DETAIL_PATHS = exports.getNodeRegistryEntry = exports.NODE_REGISTRY = exports.getNodeDispatchConfig = exports.getAllNodeCollections = exports.NODE_DISPATCH = exports.resolveNodeId = exports.PREFIX_TO_TYPE = exports.NODE_UI = exports.ALL_NODE_TYPES = exports.isNodeType = exports.isTerminal = exports.canSendToNodes = exports.canReceiveFromNodes = exports.canReceiveFrom = exports.NODE_CONNECTIONS = exports.iterableMeta = exports.singleMeta = void 0;
|
|
4
|
-
exports.
|
|
5
|
-
exports.isCredentialType = exports.getCredentialType = exports.credentialTypeValues = exports.CREDENTIAL_TYPE_VALUES = exports.CREDENTIAL_TYPES = exports.getModelLabel = exports.getDefaultModel = exports.getModelsFor = exports.MODEL_CONTEXT_WINDOWS = exports.LLM_MODELS = exports.LLM_PROVIDERS = exports.DOCS_TOOLKIT_DEFAULTABLE = exports.DOCS_TOOLKIT_BY_TOOL_NAME = exports.DOCS_TOOLKIT_SPECS = exports.isDocsOperation = exports.DOCS_OPERATION_SPECS = exports.DOCS_OPERATIONS = exports.isMongoOperation = exports.MONGO_OPERATION_SPECS = exports.MONGO_OPERATIONS = exports.isPostgresOperation = exports.POSTGRES_OPERATION_SPECS = exports.POSTGRES_MODES = exports.POSTGRES_OPERATIONS = exports.isNotionOperation = void 0;
|
|
4
|
+
exports.GOOGLE_CONTACTS_OPERATION_GROUPS = exports.GOOGLE_CONTACTS_OPERATION_SPECS = exports.GOOGLE_CONTACTS_OPERATIONS_V2 = exports.GOOGLE_CONTACTS_OPERATIONS_V1 = exports.GOOGLE_CONTACTS_OPERATIONS = exports.SHEETS_TOOLKIT_DEFAULTABLE = exports.SHEETS_TOOLKIT_BY_TOOL_NAME = exports.SHEETS_TOOLKIT_SPECS = exports.isSheetsOperation = exports.SHEETS_OPERATION_SPECS = exports.SHEETS_OPERATIONS = exports.SLACK_TOOLKIT_BY_TOOL_NAME = exports.SLACK_TOOLKIT_SPECS = exports.isSlackOperation = exports.SLACK_OPERATION_SPECS = exports.SLACK_OPERATIONS = exports.isJiraOperation = exports.JIRA_ITERABLE_OPERATIONS = exports.JIRA_DROPDOWN_OPERATIONS = exports.JIRA_OPERATION_SPECS = exports.JIRA_OPERATIONS = exports.isGithubOperation = exports.GITHUB_ITERABLE_OPERATIONS = exports.GITHUB_DROPDOWN_OPERATIONS = exports.GITHUB_OPERATION_SPECS = exports.GITHUB_OPERATIONS = exports.isShopifyOperation = exports.SHOPIFY_SEARCHABLE_RESOURCES = exports.SHOPIFY_TAGGABLE_RESOURCES = exports.SHOPIFY_OPERATION_SPECS = exports.SHOPIFY_OPERATIONS = exports.isMailchimpOperation = exports.MAILCHIMP_CONTACT_STATUSES = exports.MAILCHIMP_OPERATION_SPECS = exports.MAILCHIMP_OPERATIONS = exports.DISCORD_TOOLKIT_BY_TOOL_NAME = exports.DISCORD_TOOLKIT_SPECS = exports.isDiscordOperation = exports.DISCORD_OPERATION_SPECS = exports.DISCORD_OPERATIONS = exports.isWhatsAppOperation = exports.WHATSAPP_OPERATIONS = exports.TELEGRAM_TOOLKIT_BY_TOOL_NAME = exports.TELEGRAM_TOOLKIT_SPECS = exports.isTelegramOperation = exports.TELEGRAM_OPERATION_SPECS = exports.TELEGRAM_OPERATIONS = exports.DRIVE_TOOLKIT_BY_TOOL_NAME = exports.DRIVE_TOOLKIT_SPECS = exports.isDriveOperation = void 0;
|
|
5
|
+
exports.isCredentialType = exports.getCredentialType = exports.credentialTypeValues = exports.CREDENTIAL_TYPE_VALUES = exports.CREDENTIAL_TYPES = exports.getModelLabel = exports.getDefaultModel = exports.getModelsFor = exports.MODEL_CONTEXT_WINDOWS = exports.LLM_MODELS = exports.LLM_PROVIDERS = exports.DOCS_TOOLKIT_DEFAULTABLE = exports.DOCS_TOOLKIT_BY_TOOL_NAME = exports.DOCS_TOOLKIT_SPECS = exports.isDocsOperation = exports.DOCS_OPERATION_SPECS = exports.DOCS_OPERATIONS = exports.isMongoOperation = exports.MONGO_OPERATION_SPECS = exports.MONGO_OPERATIONS = exports.isPostgresOperation = exports.POSTGRES_OPERATION_SPECS = exports.POSTGRES_MODES = exports.POSTGRES_OPERATIONS = exports.isNotionOperation = exports.NOTION_DROPDOWN_OPERATIONS = exports.NOTION_OPERATION_SPECS = exports.NOTION_OPERATIONS = exports.isGoogleAnalyticsOperation = exports.GOOGLE_ANALYTICS_DROPDOWN_OPERATIONS = exports.GOOGLE_ANALYTICS_OPERATION_SPECS = exports.GOOGLE_ANALYTICS_OPERATIONS = exports.isGoogleContactsOperation = exports.GOOGLE_CONTACTS_DEFAULT_PERSON_FIELDS = void 0;
|
|
6
6
|
var types_1 = require("./types");
|
|
7
7
|
Object.defineProperty(exports, "singleMeta", { enumerable: true, get: function () { return types_1.singleMeta; } });
|
|
8
8
|
Object.defineProperty(exports, "iterableMeta", { enumerable: true, get: function () { return types_1.iterableMeta; } });
|
|
@@ -87,6 +87,13 @@ var discord_operations_1 = require("./discord-operations");
|
|
|
87
87
|
Object.defineProperty(exports, "DISCORD_OPERATIONS", { enumerable: true, get: function () { return discord_operations_1.DISCORD_OPERATIONS; } });
|
|
88
88
|
Object.defineProperty(exports, "DISCORD_OPERATION_SPECS", { enumerable: true, get: function () { return discord_operations_1.DISCORD_OPERATION_SPECS; } });
|
|
89
89
|
Object.defineProperty(exports, "isDiscordOperation", { enumerable: true, get: function () { return discord_operations_1.isDiscordOperation; } });
|
|
90
|
+
/* Ojo con los dos nombres parecidos, que vienen de dos ficheros y NO son lo
|
|
91
|
+
mismo: `DiscordOperationSpec` (arriba) describe el FORMULARIO —qué control
|
|
92
|
+
pintar por campo— y `DiscordToolkitSpec` (abajo) describe la HERRAMIENTA que
|
|
93
|
+
ve el LLM. Es la misma pareja que ya tienen Telegram, Sheets y compañía. */
|
|
94
|
+
var discord_toolkit_1 = require("./discord-toolkit");
|
|
95
|
+
Object.defineProperty(exports, "DISCORD_TOOLKIT_SPECS", { enumerable: true, get: function () { return discord_toolkit_1.DISCORD_TOOLKIT_SPECS; } });
|
|
96
|
+
Object.defineProperty(exports, "DISCORD_TOOLKIT_BY_TOOL_NAME", { enumerable: true, get: function () { return discord_toolkit_1.DISCORD_TOOLKIT_BY_TOOL_NAME; } });
|
|
90
97
|
var mailchimp_operations_1 = require("./mailchimp-operations");
|
|
91
98
|
Object.defineProperty(exports, "MAILCHIMP_OPERATIONS", { enumerable: true, get: function () { return mailchimp_operations_1.MAILCHIMP_OPERATIONS; } });
|
|
92
99
|
Object.defineProperty(exports, "MAILCHIMP_OPERATION_SPECS", { enumerable: true, get: function () { return mailchimp_operations_1.MAILCHIMP_OPERATION_SPECS; } });
|
|
@@ -104,10 +111,21 @@ Object.defineProperty(exports, "GITHUB_OPERATION_SPECS", { enumerable: true, get
|
|
|
104
111
|
Object.defineProperty(exports, "GITHUB_DROPDOWN_OPERATIONS", { enumerable: true, get: function () { return github_operations_1.GITHUB_DROPDOWN_OPERATIONS; } });
|
|
105
112
|
Object.defineProperty(exports, "GITHUB_ITERABLE_OPERATIONS", { enumerable: true, get: function () { return github_operations_1.GITHUB_ITERABLE_OPERATIONS; } });
|
|
106
113
|
Object.defineProperty(exports, "isGithubOperation", { enumerable: true, get: function () { return github_operations_1.isGithubOperation; } });
|
|
114
|
+
var jira_operations_1 = require("./jira-operations");
|
|
115
|
+
Object.defineProperty(exports, "JIRA_OPERATIONS", { enumerable: true, get: function () { return jira_operations_1.JIRA_OPERATIONS; } });
|
|
116
|
+
Object.defineProperty(exports, "JIRA_OPERATION_SPECS", { enumerable: true, get: function () { return jira_operations_1.JIRA_OPERATION_SPECS; } });
|
|
117
|
+
Object.defineProperty(exports, "JIRA_DROPDOWN_OPERATIONS", { enumerable: true, get: function () { return jira_operations_1.JIRA_DROPDOWN_OPERATIONS; } });
|
|
118
|
+
Object.defineProperty(exports, "JIRA_ITERABLE_OPERATIONS", { enumerable: true, get: function () { return jira_operations_1.JIRA_ITERABLE_OPERATIONS; } });
|
|
119
|
+
Object.defineProperty(exports, "isJiraOperation", { enumerable: true, get: function () { return jira_operations_1.isJiraOperation; } });
|
|
107
120
|
var slack_operations_1 = require("./slack-operations");
|
|
108
121
|
Object.defineProperty(exports, "SLACK_OPERATIONS", { enumerable: true, get: function () { return slack_operations_1.SLACK_OPERATIONS; } });
|
|
109
122
|
Object.defineProperty(exports, "SLACK_OPERATION_SPECS", { enumerable: true, get: function () { return slack_operations_1.SLACK_OPERATION_SPECS; } });
|
|
110
123
|
Object.defineProperty(exports, "isSlackOperation", { enumerable: true, get: function () { return slack_operations_1.isSlackOperation; } });
|
|
124
|
+
/* Misma pareja que en Discord: `SlackOperationSpec` es el formulario,
|
|
125
|
+
`SlackToolkitSpec` es la herramienta que ve el LLM. */
|
|
126
|
+
var slack_toolkit_1 = require("./slack-toolkit");
|
|
127
|
+
Object.defineProperty(exports, "SLACK_TOOLKIT_SPECS", { enumerable: true, get: function () { return slack_toolkit_1.SLACK_TOOLKIT_SPECS; } });
|
|
128
|
+
Object.defineProperty(exports, "SLACK_TOOLKIT_BY_TOOL_NAME", { enumerable: true, get: function () { return slack_toolkit_1.SLACK_TOOLKIT_BY_TOOL_NAME; } });
|
|
111
129
|
var sheets_operations_1 = require("./sheets-operations");
|
|
112
130
|
Object.defineProperty(exports, "SHEETS_OPERATIONS", { enumerable: true, get: function () { return sheets_operations_1.SHEETS_OPERATIONS; } });
|
|
113
131
|
Object.defineProperty(exports, "SHEETS_OPERATION_SPECS", { enumerable: true, get: function () { return sheets_operations_1.SHEETS_OPERATION_SPECS; } });
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Las operaciones del nodo `jiraAction` — la lista que comparten la api, el
|
|
3
|
+
* dashboard y el broker.
|
|
4
|
+
*
|
|
5
|
+
* Mismo patrón que `github-operations.ts` y `shopify-operations.ts`.
|
|
6
|
+
*
|
|
7
|
+
* ── Contra qué está escrito ──
|
|
8
|
+
*
|
|
9
|
+
* Jira Cloud, **REST API v3**, servida en
|
|
10
|
+
* `https://api.atlassian.com/ex/jira/{cloudId}/rest/api/3/…`. El `cloudId` sale
|
|
11
|
+
* de la credencial `oauth2_atlassian`, que ya existe: la montó el trigger de
|
|
12
|
+
* Jira y aquí se reutiliza entera.
|
|
13
|
+
*
|
|
14
|
+
* El permiso que hace falta para escribir es **`write:jira-work`**. Se añadió a
|
|
15
|
+
* los de por defecto en api#384; toda credencial anterior a eso es de sólo
|
|
16
|
+
* lectura hasta que su dueño la reconecte, y el síntoma es un 403 al ejecutar,
|
|
17
|
+
* no un fallo al guardar.
|
|
18
|
+
*
|
|
19
|
+
* ── La decisión que ordena todo lo demás: ADF ──
|
|
20
|
+
*
|
|
21
|
+
* En la v3, `description` y el `body` de un comentario **no son texto**: son
|
|
22
|
+
* Atlassian Document Format, un árbol JSON de nodos tipados. Mandar una cadena
|
|
23
|
+
* da 400.
|
|
24
|
+
*
|
|
25
|
+
* La salida fácil sería escribir con la v2, que sí acepta texto plano y sigue
|
|
26
|
+
* soportada. No se hace, y el motivo está escrito en nuestro propio repositorio
|
|
27
|
+
* desde antes de este nodo: `jira-watch.service.ts` excluye `description` al
|
|
28
|
+
* hidratar campos y explica por qué — *"la REST devuelve ADF —un objeto— pero
|
|
29
|
+
* el webhook manda texto plano; mezclar formas rompería las plantillas de
|
|
30
|
+
* abajo, que esperan cadenas"*.
|
|
31
|
+
*
|
|
32
|
+
* O sea: si este nodo leyera con una versión y escribiera con otra,
|
|
33
|
+
* `{{payload.fields.description}}` significaría una cosa cuando el flujo lo
|
|
34
|
+
* dispara un trigger de Jira y otra cuando lo consulta este nodo. Por eso:
|
|
35
|
+
*
|
|
36
|
+
* - **Todo en v3**, para leer y para escribir.
|
|
37
|
+
* - Al escribir, el texto del usuario se envuelve en ADF.
|
|
38
|
+
* - Al leer, el ADF se aplana a texto, y el árbol original viaja en una clave
|
|
39
|
+
* hermana para quien lo necesite.
|
|
40
|
+
* - `bodyFormat` deja pegar ADF crudo a quien quiera tablas o paneles.
|
|
41
|
+
*
|
|
42
|
+
* ── La otra trampa: la búsqueda cambió de sitio ──
|
|
43
|
+
*
|
|
44
|
+
* `GET/POST /rest/api/3/search` está **deprecado**. El sustituto es
|
|
45
|
+
* `POST /rest/api/3/search/jql`, y no es un renombre: pagina con
|
|
46
|
+
* `nextPageToken` en vez de `startAt`, **no devuelve `total`** (para contar hay
|
|
47
|
+
* `/search/approximate-count`) y los campos hay que pedirlos explícitamente.
|
|
48
|
+
* Casi todo ejemplo que hay por internet usa el endpoint muerto.
|
|
49
|
+
*
|
|
50
|
+
* ── Lo que NO es una operación ──
|
|
51
|
+
*
|
|
52
|
+
* Listar proyectos, tipos de incidencia, transiciones, estados o usuarios
|
|
53
|
+
* asignables **no** son operaciones: son endpoints del controlador que alimentan
|
|
54
|
+
* los selectores, como Drive alimenta su selector de ficheros. Una operación
|
|
55
|
+
* existe para producir payload en una corrida; esto otro es para rellenar el
|
|
56
|
+
* formulario. Mezclarlos llena el desplegable de cosas que nadie quiere
|
|
57
|
+
* ejecutar.
|
|
58
|
+
*
|
|
59
|
+
* ── Decisiones propias de Jira ──
|
|
60
|
+
*
|
|
61
|
+
* - El proyecto y el tipo de incidencia se ELIGEN de una lista viva. Un
|
|
62
|
+
* `issuetype` se identifica por un id numérico que nadie sabe de memoria.
|
|
63
|
+
* - **Las transiciones no son una lista fija.** Dependen del flujo de trabajo
|
|
64
|
+
* Y del estado actual de la incidencia, así que el selector las pide para
|
|
65
|
+
* esa incidencia concreta. Ofrecer una lista global sería ofrecer
|
|
66
|
+
* transiciones que fallan al ejecutarse.
|
|
67
|
+
* - Los campos personalizados van en JSON crudo. Cada tipo tiene su forma
|
|
68
|
+
* (`select`, `date`, `relation`, usuario…) y fingir que caben en tres
|
|
69
|
+
* campos genéricos produce un 400 que no nombra el campo.
|
|
70
|
+
* - Ninguna operación declarada sin implementar: el enum ES el contrato de la
|
|
71
|
+
* pantalla, y una operación declarada se pinta en el desplegable y falla al
|
|
72
|
+
* ejecutarse.
|
|
73
|
+
*/
|
|
74
|
+
export declare const JIRA_OPERATIONS: readonly ["createIssue", "getIssue", "updateIssue", "deleteIssue", "assignIssue", "transitionIssue", "addComment", "getComments", "addAttachment", "addWorklog", "linkIssues", "searchIssues"];
|
|
75
|
+
export type JiraOperation = (typeof JIRA_OPERATIONS)[number];
|
|
76
|
+
/** Type guard — para validar entrada no fiable (DTOs, tool calls). */
|
|
77
|
+
export declare function isJiraOperation(value: unknown): value is JiraOperation;
|
|
78
|
+
/**
|
|
79
|
+
* Las operaciones que devuelven un ARRAY y por tanto obligan a marcar
|
|
80
|
+
* `_meta.iterable` en `getOutputPayload`.
|
|
81
|
+
*
|
|
82
|
+
* Vive aquí y no sólo en la api porque olvidarlo no falla al compilar: falla
|
|
83
|
+
* en producción, callado, con el nodo de abajo recibiendo el sobre entero en
|
|
84
|
+
* vez de un elemento y el PayloadViewer pintando rutas con corchetes que nadie
|
|
85
|
+
* puede usar.
|
|
86
|
+
*/
|
|
87
|
+
export declare const JIRA_ITERABLE_OPERATIONS: readonly JiraOperation[];
|
|
88
|
+
export type JiraParamType =
|
|
89
|
+
/** Selector vivo de proyectos que alcanza la credencial. Guarda la CLAVE
|
|
90
|
+
* (`ACME`), no el id: es lo que se lee en las URLs y en el JQL. */
|
|
91
|
+
'jiraProject'
|
|
92
|
+
/** Selector de tipos de incidencia del proyecto elegido. Guarda el id, que
|
|
93
|
+
* es lo que pide la API — el nombre no es único entre proyectos. */
|
|
94
|
+
| 'jiraIssueType'
|
|
95
|
+
/** La incidencia sobre la que se actúa. Se escribe o se resuelve de una
|
|
96
|
+
* plantilla: `{{payload.issueKey}}` es el caso del 90%. */
|
|
97
|
+
| 'jiraIssueKey'
|
|
98
|
+
/** Transiciones legales para la incidencia elegida. Depende del flujo de
|
|
99
|
+
* trabajo Y del estado actual, así que se piden en el momento. */
|
|
100
|
+
| 'jiraTransition'
|
|
101
|
+
/** Usuarios asignables en el proyecto elegido. Guarda el `accountId`. */
|
|
102
|
+
| 'jiraUser'
|
|
103
|
+
/** Tipos de enlace entre incidencias (`Blocks`, `Relates`…). */
|
|
104
|
+
| 'jiraLinkType'
|
|
105
|
+
/** Texto con autocompletado de `{{payload.*}}`. */
|
|
106
|
+
| 'template'
|
|
107
|
+
/** Área de texto larga, también con autocompletado. */
|
|
108
|
+
| 'textarea'
|
|
109
|
+
/** `<select>` normal; las etiquetas no son los valores, `options` obliga. */
|
|
110
|
+
| 'select' | 'number'
|
|
111
|
+
/**
|
|
112
|
+
* `<select>` de `''` / `'true'` / `'false'` que se guarda como BOOLEANO, o
|
|
113
|
+
* no se guarda si es `''`. "— sin tocar —" tiene que significar que la clave
|
|
114
|
+
* no viaja, no que viaja en `false`.
|
|
115
|
+
*/
|
|
116
|
+
| 'booleanSelect'
|
|
117
|
+
/** Área de texto para JSON crudo (campos personalizados, ADF). */
|
|
118
|
+
| 'json';
|
|
119
|
+
export interface JiraParamSpec {
|
|
120
|
+
/** La clave de `operationConfig`. Es lo que lee la api, no un nombre de UI. */
|
|
121
|
+
name: string;
|
|
122
|
+
label: string;
|
|
123
|
+
type: JiraParamType;
|
|
124
|
+
required?: boolean;
|
|
125
|
+
/** Ayuda bajo el campo. Texto plano: el paquete no lleva React. */
|
|
126
|
+
description?: string;
|
|
127
|
+
placeholder?: string;
|
|
128
|
+
/** Prerrellenado cuando la config guardada no trae valor para esta clave. */
|
|
129
|
+
default?: string | number;
|
|
130
|
+
/** Obligatorio en `select` y `booleanSelect` — etiqueta y valor difieren. */
|
|
131
|
+
options?: ReadonlyArray<{
|
|
132
|
+
value: string;
|
|
133
|
+
label: string;
|
|
134
|
+
}>;
|
|
135
|
+
min?: number;
|
|
136
|
+
max?: number;
|
|
137
|
+
/** Se pinta en la pestaña "Advanced" en vez de en "Config". */
|
|
138
|
+
advanced?: boolean;
|
|
139
|
+
/** Sólo visible cuando un campo hermano vale uno de estos. */
|
|
140
|
+
showWhen?: {
|
|
141
|
+
field: string;
|
|
142
|
+
in: ReadonlyArray<string>;
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
export interface JiraOperationSpec {
|
|
146
|
+
/** Etiqueta de la fila en el desplegable de operación. */
|
|
147
|
+
label: string;
|
|
148
|
+
/** Sub-línea bajo la etiqueta. */
|
|
149
|
+
description: string;
|
|
150
|
+
/** Ruta a la que mapea, tal cual, para poder cotejarla con los docs. */
|
|
151
|
+
apiRoute: string;
|
|
152
|
+
/** Esquema de parámetros. El orden ES el orden en pantalla. */
|
|
153
|
+
params: JiraParamSpec[];
|
|
154
|
+
}
|
|
155
|
+
export declare const JIRA_OPERATION_SPECS: Record<JiraOperation, JiraOperationSpec>;
|
|
156
|
+
/**
|
|
157
|
+
* Lo que se ofrece en el desplegable de operación.
|
|
158
|
+
*
|
|
159
|
+
* Hoy son todas. Existe como constante aparte —y no como alias de
|
|
160
|
+
* `JIRA_OPERATIONS`— porque es el punto donde otros nodos han necesitado
|
|
161
|
+
* esconder una operación sin sacarla del enum: retirarla del enum rompe las que
|
|
162
|
+
* ya estaban guardadas en la base de datos.
|
|
163
|
+
*/
|
|
164
|
+
export declare const JIRA_DROPDOWN_OPERATIONS: readonly JiraOperation[];
|