@hostwebhook/node-types 1.69.0 → 1.71.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/bucket-operations.d.ts +88 -0
- package/dist/bucket-operations.js +140 -0
- package/dist/calendar-toolkit.d.ts +1 -1
- package/dist/connections.d.ts +1 -1
- package/dist/connections.js +1 -0
- package/dist/discord-operations.d.ts +1 -1
- package/dist/discord-operations.js +4 -4
- package/dist/discord-toolkit.d.ts +1 -1
- package/dist/discord-toolkit.js +3 -3
- package/dist/dispatch.d.ts +1 -1
- package/dist/dispatch.js +1 -0
- package/dist/docs-toolkit.d.ts +1 -1
- package/dist/drive-toolkit.d.ts +1 -1
- package/dist/esm/bucket-operations.d.ts +88 -0
- package/dist/esm/bucket-operations.js +136 -0
- package/dist/esm/calendar-operations.d.ts +67 -0
- package/dist/esm/calendar-operations.js +176 -0
- package/dist/esm/calendar-toolkit.d.ts +50 -0
- package/dist/esm/calendar-toolkit.js +152 -0
- package/dist/esm/capacidad-de-credencial.d.ts +75 -0
- package/dist/esm/capacidad-de-credencial.js +68 -0
- package/dist/esm/connections.d.ts +17 -0
- package/dist/esm/connections.js +107 -0
- package/dist/esm/credentials.d.ts +144 -0
- package/dist/esm/credentials.js +199 -0
- package/dist/esm/discord-operations.d.ts +104 -0
- package/dist/esm/discord-operations.js +407 -0
- package/dist/esm/discord-toolkit.d.ts +64 -0
- package/dist/esm/discord-toolkit.js +260 -0
- package/dist/esm/dispatch.d.ts +16 -0
- package/dist/esm/dispatch.js +77 -0
- package/dist/esm/docs-operations.d.ts +99 -0
- package/dist/esm/docs-operations.js +127 -0
- package/dist/esm/docs-toolkit.d.ts +42 -0
- package/dist/esm/docs-toolkit.js +97 -0
- package/dist/esm/drive-operations.d.ts +103 -0
- package/dist/esm/drive-operations.js +319 -0
- package/dist/esm/drive-toolkit.d.ts +54 -0
- package/dist/esm/drive-toolkit.js +177 -0
- package/dist/esm/github-operations.d.ts +147 -0
- package/dist/esm/github-operations.js +551 -0
- package/dist/esm/gmail-operations.d.ts +190 -0
- package/dist/esm/gmail-operations.js +560 -0
- package/dist/esm/google-analytics-operations.d.ts +99 -0
- package/dist/esm/google-analytics-operations.js +222 -0
- package/dist/esm/google-contacts-operations.d.ts +93 -0
- package/dist/esm/google-contacts-operations.js +363 -0
- package/dist/esm/index.d.ts +68 -0
- package/dist/esm/index.js +51 -0
- package/dist/esm/jira-operations.d.ts +164 -0
- package/dist/esm/jira-operations.js +470 -0
- package/dist/esm/llm-models.d.ts +101 -0
- package/dist/esm/llm-models.js +230 -0
- package/dist/esm/mailchimp-operations.d.ts +56 -0
- package/dist/esm/mailchimp-operations.js +155 -0
- package/dist/esm/mongo-operations.d.ts +61 -0
- package/dist/esm/mongo-operations.js +120 -0
- package/dist/esm/notion-operations.d.ts +125 -0
- package/dist/esm/notion-operations.js +511 -0
- package/dist/esm/openrouter.d.ts +142 -0
- package/dist/esm/openrouter.js +99 -0
- package/dist/esm/package.json +4 -0
- package/dist/esm/postgres-operations.d.ts +60 -0
- package/dist/esm/postgres-operations.js +75 -0
- package/dist/esm/registry.d.ts +160 -0
- package/dist/esm/registry.js +885 -0
- package/dist/esm/sheets-operations.d.ts +78 -0
- package/dist/esm/sheets-operations.js +150 -0
- package/dist/esm/sheets-toolkit.d.ts +49 -0
- package/dist/esm/sheets-toolkit.js +127 -0
- package/dist/esm/shopify-operations.d.ts +95 -0
- package/dist/esm/shopify-operations.js +259 -0
- package/dist/esm/slack-operations.d.ts +81 -0
- package/dist/esm/slack-operations.js +244 -0
- package/dist/esm/slack-toolkit.d.ts +60 -0
- package/dist/esm/slack-toolkit.js +235 -0
- package/dist/esm/telegram-operations.d.ts +104 -0
- package/dist/esm/telegram-operations.js +351 -0
- package/dist/esm/telegram-toolkit.d.ts +52 -0
- package/dist/esm/telegram-toolkit.js +183 -0
- package/dist/esm/types.d.ts +149 -0
- package/dist/esm/types.js +8 -0
- package/dist/esm/ui.d.ts +13 -0
- package/dist/esm/ui.js +152 -0
- package/dist/esm/whatsapp-operations.d.ts +23 -0
- package/dist/esm/whatsapp-operations.js +36 -0
- package/dist/index.d.ts +68 -66
- package/dist/index.js +193 -187
- package/dist/openrouter.d.ts +1 -1
- package/dist/registry.d.ts +4 -4
- package/dist/registry.js +540 -210
- package/dist/sheets-toolkit.d.ts +1 -1
- package/dist/slack-operations.d.ts +1 -1
- package/dist/slack-operations.js +4 -4
- package/dist/slack-toolkit.d.ts +1 -1
- package/dist/slack-toolkit.js +3 -3
- package/dist/telegram-toolkit.d.ts +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/ui.d.ts +1 -1
- package/dist/ui.js +2 -0
- package/package.json +21 -3
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Drive AI Toolkit — las herramientas que un driveAction expone cuando
|
|
3
|
+
* `aiEnabled` está encendido.
|
|
4
|
+
*
|
|
5
|
+
* **Se escribe una sola vez**, como el de Sheets y el de Telegram. Antes vivía
|
|
6
|
+
* TRES veces, y las tres a mano:
|
|
7
|
+
*
|
|
8
|
+
* 1. `dashboard/components/drive-actions/drive-operations-schemas.ts`
|
|
9
|
+
* 2. `api/src/mcp-servers/toolkit-specs.ts`
|
|
10
|
+
* 3. la página de detalle, que pintaba las doce herramientas como doce
|
|
11
|
+
* `<li>` escritos a mano, con el número `12` también a mano en tres sitios
|
|
12
|
+
*
|
|
13
|
+
* La 1 y la 2 no habían derivado todavía (medido el 2026-08-10: cero
|
|
14
|
+
* diferencias, al contrario que Slack con 13 y WhatsApp con 4). Esto es lo que
|
|
15
|
+
* hace que sigan sin derivar.
|
|
16
|
+
*
|
|
17
|
+
* El ORDEN de este array importa: `AiToolkitPreview` pinta el encabezado de
|
|
18
|
+
* grupo sólo cuando cambia respecto a la fila anterior, así que las
|
|
19
|
+
* herramientas del mismo grupo tienen que ir seguidas. Los tres grupos son los
|
|
20
|
+
* que ya inventaba el JSX que sustituye.
|
|
21
|
+
*/
|
|
22
|
+
const p = (name, description, required = true, type = 'string') => ({ name, type, description, required });
|
|
23
|
+
const ENTRAN_Y_SALEN = 'Files in / out';
|
|
24
|
+
const DESCUBRIR = 'Discovery';
|
|
25
|
+
const MUTACIONES = 'Mutations (LLM confirms first)';
|
|
26
|
+
export const DRIVE_TOOLKIT_SPECS = [
|
|
27
|
+
/* ── Files in / out ─────────────────────────────────────────────────── */
|
|
28
|
+
{
|
|
29
|
+
operation: 'upload',
|
|
30
|
+
label: 'Upload file',
|
|
31
|
+
toolName: 'upload_to_drive',
|
|
32
|
+
group: ENTRAN_Y_SALEN,
|
|
33
|
+
description: 'Upload a file into Google Drive. TWO ways to hand it the bytes. (1) `contentBase64` — the file contents, base64. Use this one when YOU hold the file: an MCP client, an assistant with an attachment, anything outside a running flow. Nothing has to be online first. If the file does not fit in a single call, send it in chunks with partIndex/partTotal — see those parameters. (2) Leave `contentBase64` out and it takes the `_file` ref from the current event payload, put there by an upstream node (multipart ingress, File Transform, another Drive download). The payload route streams from R2, never holds the file in memory, and needs no chunking at any size.',
|
|
34
|
+
parameters: [
|
|
35
|
+
p('fileName', 'Optional with a payload _file (defaults to its originalName). REQUIRED with contentBase64 — there is no ref to inherit a name from.', false),
|
|
36
|
+
p('contentBase64', 'Optional. File contents, base64-encoded — or ONE chunk of them when using partIndex/partTotal. Raw base64; a `data:` URL prefix is stripped if you send one. Max 8 MB decoded in a single call, 1 MB per chunk.', false),
|
|
37
|
+
p('partTotal', 'Optional. How many chunks the file is split into. Set it to send a file that does not fit in one call: the limit is the size of each MESSAGE, not of the file, so chunking lifts it entirely. Leave it out for a normal one-call upload.', false),
|
|
38
|
+
p('partIndex', 'Which chunk this is, ZERO-BASED (0 to partTotal-1). Required whenever partTotal is set.', false),
|
|
39
|
+
p('uploadId', 'Ties the chunks together. Leave it out on the first chunk — the response gives you one — and pass that same value on every chunk after it. While chunks are missing the call answers 202 with how many arrived and which one is next; the last one uploads the file and returns normally.', false),
|
|
40
|
+
p('sourceField', 'Optional. Payload field path holding the _file ref. Defaults to "_file". Ignored when contentBase64 is set.', false),
|
|
41
|
+
p('parentFolderId', 'Optional. Drive folder ID to upload into. Empty = root.', false),
|
|
42
|
+
p('mimeType', 'Optional. Override the MIME type. Defaults to the _file ref mimeType, or application/octet-stream with contentBase64.', false),
|
|
43
|
+
],
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
operation: 'download',
|
|
47
|
+
label: 'Download file',
|
|
48
|
+
toolName: 'download_from_drive',
|
|
49
|
+
group: ENTRAN_Y_SALEN,
|
|
50
|
+
description: 'Download a Drive file to HostWebhook storage and return a `_file` ref the next pipeline node can consume (FileTransform, AI vision, HTTP body). Use the file ID from list_drive_files / search.',
|
|
51
|
+
parameters: [p('fileId', 'The Drive file ID to download.')],
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
operation: 'export',
|
|
55
|
+
label: 'Export Google doc',
|
|
56
|
+
toolName: 'export_drive_file',
|
|
57
|
+
group: ENTRAN_Y_SALEN,
|
|
58
|
+
description: 'Export a Google native document (Doc / Sheet / Slide / Drawing) to a downloadable format like PDF or DOCX, returning a `_file` ref the next pipeline node can consume. Does NOT work on regular files (those use download_from_drive).',
|
|
59
|
+
parameters: [
|
|
60
|
+
p('fileId', 'The Drive file ID (must be a Google native doc).'),
|
|
61
|
+
/* De las dos copias me quedo con la de la api, que es la que dice qué
|
|
62
|
+
formato de origen va a cada destino. La del dashboard se había quedado
|
|
63
|
+
sin esa parte. Es la única deriva que tenían Drive y, como estaba en la
|
|
64
|
+
descripción de un PARÁMETRO, ningún conteo la miraba. */
|
|
65
|
+
p('mimeType', 'Target MIME type. Common: "application/pdf" (Doc/Slide → PDF), "application/vnd.openxmlformats-officedocument.wordprocessingml.document" (Doc → DOCX), "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" (Sheet → XLSX), "text/plain", "text/csv".'),
|
|
66
|
+
],
|
|
67
|
+
},
|
|
68
|
+
/* ── Discovery ──────────────────────────────────────────────────────── */
|
|
69
|
+
{
|
|
70
|
+
operation: 'list',
|
|
71
|
+
label: 'List / search files',
|
|
72
|
+
toolName: 'list_drive_files',
|
|
73
|
+
group: DESCUBRIR,
|
|
74
|
+
description: "Search the user's Drive (or shared drive). Returns up to N matching files with id, name, mimeType, size, modifiedTime. Use this BEFORE any operation that needs a fileId — never invent IDs.",
|
|
75
|
+
parameters: [
|
|
76
|
+
p('query', 'Optional. Substring to match against file names.', false),
|
|
77
|
+
p('parentFolderId', 'Optional. Restrict search to a single folder.', false),
|
|
78
|
+
p('mimeType', 'Optional. Filter by MIME type (e.g. "application/pdf", "application/vnd.google-apps.folder").', false),
|
|
79
|
+
p('pageSize', 'Optional. Max results (default 50, max 100).', false, 'number'),
|
|
80
|
+
p('orderBy', 'Optional. Drive ordering string (default "modifiedTime desc").', false),
|
|
81
|
+
],
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
operation: 'get',
|
|
85
|
+
label: 'Get file metadata',
|
|
86
|
+
toolName: 'get_drive_file',
|
|
87
|
+
group: DESCUBRIR,
|
|
88
|
+
description: 'Read full metadata for one Drive file (name, mimeType, size, parents, owners, starred, trashed). Does NOT download the bytes — use download_from_drive for that.',
|
|
89
|
+
parameters: [p('fileId', 'The Drive file ID.')],
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
operation: 'getPermissions',
|
|
93
|
+
label: 'List file permissions',
|
|
94
|
+
toolName: 'get_drive_permissions',
|
|
95
|
+
group: DESCUBRIR,
|
|
96
|
+
description: 'List who has access to a Drive file (id, type, role, emailAddress/domain, displayName). Use to audit sharing before changing permissions.',
|
|
97
|
+
parameters: [p('fileId', 'The Drive file ID.')],
|
|
98
|
+
},
|
|
99
|
+
/* ── Mutations ──────────────────────────────────────────────────────── */
|
|
100
|
+
{
|
|
101
|
+
operation: 'copy',
|
|
102
|
+
label: 'Copy file',
|
|
103
|
+
toolName: 'copy_drive_file',
|
|
104
|
+
group: MUTACIONES,
|
|
105
|
+
description: 'Duplicate a Drive file. Optionally rename and/or move into a different folder in one step.',
|
|
106
|
+
parameters: [
|
|
107
|
+
p('fileId', 'The source Drive file ID.'),
|
|
108
|
+
p('newName', 'Optional. Name for the copy. Defaults to "Copy of <original>".', false),
|
|
109
|
+
p('parentFolderId', 'Optional. Folder ID to place the copy into. Defaults to the source folder.', false),
|
|
110
|
+
],
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
operation: 'move',
|
|
114
|
+
label: 'Move file',
|
|
115
|
+
toolName: 'move_drive_file',
|
|
116
|
+
group: MUTACIONES,
|
|
117
|
+
description: 'Move a Drive file to a different folder. The current parents are removed; the file is added to the new parent.',
|
|
118
|
+
parameters: [
|
|
119
|
+
p('fileId', 'The Drive file ID to move.'),
|
|
120
|
+
p('parentFolderId', 'Destination folder ID.'),
|
|
121
|
+
],
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
operation: 'update',
|
|
125
|
+
label: 'Update file metadata',
|
|
126
|
+
toolName: 'update_drive_file',
|
|
127
|
+
group: MUTACIONES,
|
|
128
|
+
description: 'Rename a Drive file or change its description / starred status. Use list_drive_files first to find the fileId.',
|
|
129
|
+
parameters: [
|
|
130
|
+
p('fileId', 'The Drive file ID.'),
|
|
131
|
+
p('name', 'Optional. New name.', false),
|
|
132
|
+
p('description', 'Optional. New description.', false),
|
|
133
|
+
p('starred', 'Optional. Star/unstar.', false, 'boolean'),
|
|
134
|
+
],
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
operation: 'createFolder',
|
|
138
|
+
label: 'Create folder',
|
|
139
|
+
toolName: 'create_drive_folder',
|
|
140
|
+
group: MUTACIONES,
|
|
141
|
+
description: 'Create a new folder in Drive. Use this BEFORE upload_to_drive when the user asks to put a file in a specific named folder that does not yet exist.',
|
|
142
|
+
parameters: [
|
|
143
|
+
p('name', 'Folder name.'),
|
|
144
|
+
p('parentFolderId', 'Optional. Parent folder ID. Empty = root.', false),
|
|
145
|
+
],
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
operation: 'delete',
|
|
149
|
+
label: 'Delete file (trash)',
|
|
150
|
+
toolName: 'delete_drive_file',
|
|
151
|
+
group: MUTACIONES,
|
|
152
|
+
description: 'Move a Drive file to trash (recoverable for 30 days). Set permanent=true ONLY when the user explicitly confirms a permanent delete — irreversible. ALWAYS confirm with the user before calling this with permanent=true.',
|
|
153
|
+
parameters: [
|
|
154
|
+
p('fileId', 'The Drive file ID to delete.'),
|
|
155
|
+
p('permanent', 'Optional. true = bypass trash and erase forever (irreversible). Default false.', false, 'boolean'),
|
|
156
|
+
],
|
|
157
|
+
destructive: true,
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
operation: 'share',
|
|
161
|
+
label: 'Share file',
|
|
162
|
+
toolName: 'share_drive_file',
|
|
163
|
+
group: MUTACIONES,
|
|
164
|
+
description: 'Grant a permission on a Drive file. CONFIRM with the user before calling this — sharing externally is sensitive. Public sharing (type="anyone") is especially dangerous; only use when the user explicitly says "make it public" or similar.',
|
|
165
|
+
parameters: [
|
|
166
|
+
p('fileId', 'The Drive file ID to share.'),
|
|
167
|
+
p('type', 'One of: "user" | "group" | "domain" | "anyone". Use "anyone" only with explicit user confirmation.'),
|
|
168
|
+
p('role', 'One of: "reader" | "commenter" | "writer".'),
|
|
169
|
+
p('emailAddress', 'Required when type=user|group.', false),
|
|
170
|
+
p('domain', 'Required when type=domain.', false),
|
|
171
|
+
p('sendNotificationEmail', 'Optional. true = email the recipient about the share.', false, 'boolean'),
|
|
172
|
+
],
|
|
173
|
+
destructive: true,
|
|
174
|
+
},
|
|
175
|
+
];
|
|
176
|
+
/** Índice por nombre de herramienta, para enrutar un `tools/call` sin recorrer. */
|
|
177
|
+
export const DRIVE_TOOLKIT_BY_TOOL_NAME = Object.fromEntries(DRIVE_TOOLKIT_SPECS.map((s) => [s.toolName, s]));
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GitHub operation enum — única fuente de verdad para la api, el dashboard y
|
|
3
|
+
* el Message Broker. Lo usan:
|
|
4
|
+
* - la entidad y el DTO de `githubAction` (api): campo `operation` + validación
|
|
5
|
+
* - la página de detalle del dashboard, que pinta el formulario desde los specs
|
|
6
|
+
* - specs de toolkit MCP, si algún día el nodo gana modo herramienta
|
|
7
|
+
*
|
|
8
|
+
* Mismo patrón que `notion-operations.ts` y `shopify-operations.ts`.
|
|
9
|
+
*
|
|
10
|
+
* ── Qué credencial hay debajo ──
|
|
11
|
+
*
|
|
12
|
+
* Dos tipos, y la diferencia se nota en UNA cosa que no es una operación:
|
|
13
|
+
* de dónde sale la lista de repositorios.
|
|
14
|
+
*
|
|
15
|
+
* - `github_app` — la instalación de la GitHub App. El camino principal.
|
|
16
|
+
* Los repos son los que abarca esa instalación.
|
|
17
|
+
* - `github_pat` — un fine-grained token pegado por el usuario. La salida
|
|
18
|
+
* de emergencia, detrás de "Use a personal access token instead".
|
|
19
|
+
* Los repos son los del usuario.
|
|
20
|
+
*
|
|
21
|
+
* Las 14 operaciones de abajo se ejecutan IGUAL con las dos. Lo que cambia es
|
|
22
|
+
* el listado que rellena el formulario, y eso vive en el controlador, no aquí.
|
|
23
|
+
*
|
|
24
|
+
* ── Por qué 14 y no la API entera ──
|
|
25
|
+
*
|
|
26
|
+
* Paridad con lo que la gente encadena en un flujo, no con los docs de GitHub.
|
|
27
|
+
* Abrir un issue, comentarlo, mover un PR, leer o escribir un archivo, disparar
|
|
28
|
+
* un workflow. Lo demás —releases, gists, administración de la organización,
|
|
29
|
+
* búsqueda de código— lo cubre el MCP oficial de GitHub dentro del AI Node, que
|
|
30
|
+
* ya existe y no hay que construir.
|
|
31
|
+
*
|
|
32
|
+
* Y la regla que dejó escrita Notion se respeta al pie: **ninguna operación
|
|
33
|
+
* declarada sin implementar**. El enum ES el contrato de la pantalla — una op
|
|
34
|
+
* declarada se pinta en el desplegable y luego revienta al ejecutarse. Entran
|
|
35
|
+
* cuando entre su código.
|
|
36
|
+
*
|
|
37
|
+
* ── Lo que NO es un parámetro, a propósito ──
|
|
38
|
+
*
|
|
39
|
+
* El `sha`. Actualizar un archivo y crear una rama lo necesitan, y GitHub no
|
|
40
|
+
* perdona uno equivocado. Pedírselo al usuario es pedirle que se equivoque: lo
|
|
41
|
+
* resuelve el nodo, desde la ruta del archivo o el nombre de la rama base. Es
|
|
42
|
+
* el mismo criterio por el que un id de Notion se elige de una lista en vez de
|
|
43
|
+
* teclearse.
|
|
44
|
+
*
|
|
45
|
+
* Tampoco son operaciones listar repos, ramas, etiquetas, asignables o
|
|
46
|
+
* workflows. Una operación existe para producir payload en una corrida; eso
|
|
47
|
+
* otro es para rellenar el formulario, y son endpoints del controlador — como
|
|
48
|
+
* Drive alimenta su `DriveFilePicker`.
|
|
49
|
+
*
|
|
50
|
+
* ── Límites de GitHub que condicionan el diseño ──
|
|
51
|
+
*
|
|
52
|
+
* - 5.000 peticiones/hora autenticadas. Suficiente salvo en bucles largos.
|
|
53
|
+
* - `searchIssues` NO comparte ese cubo: la API de búsqueda va por su cuenta,
|
|
54
|
+
* del orden de 30 por minuto. Por eso está marcada aparte más abajo.
|
|
55
|
+
* - Las escrituras tienen además un límite secundario por ráfaga, y GitHub
|
|
56
|
+
* responde con `Retry-After`. Se respeta con `common/rate-limiter.ts` y
|
|
57
|
+
* `common/retry-transient.ts`, que ya existen. No escribir otro backoff.
|
|
58
|
+
*/
|
|
59
|
+
export declare const GITHUB_OPERATIONS: readonly ["createIssue", "updateIssue", "getIssue", "commentIssue", "listIssues", "createPullRequest", "getPullRequest", "mergePullRequest", "listPullRequests", "getFile", "createOrUpdateFile", "createBranch", "dispatchWorkflow", "searchIssues"];
|
|
60
|
+
export type GithubOperation = (typeof GITHUB_OPERATIONS)[number];
|
|
61
|
+
/** Type guard — para validar entrada no fiable (DTOs, tool calls). */
|
|
62
|
+
export declare function isGithubOperation(value: unknown): value is GithubOperation;
|
|
63
|
+
/**
|
|
64
|
+
* Las operaciones que devuelven un ARRAY y por tanto obligan a marcar
|
|
65
|
+
* `_meta.iterable` en `getOutputPayload`.
|
|
66
|
+
*
|
|
67
|
+
* Está aquí y no sólo en la api porque el error de olvidarlo no falla al
|
|
68
|
+
* compilar: falla en producción, callado, con el nodo de abajo recibiendo el
|
|
69
|
+
* sobre entero en vez de un elemento, y el PayloadViewer pintando rutas con
|
|
70
|
+
* corchetes que nadie puede usar. Que la lista viva en el paquete permite que
|
|
71
|
+
* el test de la api la recorra en vez de repetirla a mano.
|
|
72
|
+
*/
|
|
73
|
+
export declare const GITHUB_ITERABLE_OPERATIONS: readonly GithubOperation[];
|
|
74
|
+
export type GithubParamType =
|
|
75
|
+
/** Selector vivo de repositorios que alcanza la credencial. Guarda
|
|
76
|
+
* `owner/repo`, que es como lo consumen todas las rutas. */
|
|
77
|
+
'githubRepo'
|
|
78
|
+
/** Selector vivo de ramas del repo elegido. Admite escribir una que aún no
|
|
79
|
+
* existe: `createBranch` la crea, y una plantilla puede resolverla. */
|
|
80
|
+
| 'githubBranch'
|
|
81
|
+
/** Etiquetas del repo elegido, selección múltiple. */
|
|
82
|
+
| 'githubLabels'
|
|
83
|
+
/** Usuarios asignables en el repo elegido, selección múltiple. */
|
|
84
|
+
| 'githubAssignees'
|
|
85
|
+
/** Workflows del repo que declaran `workflow_dispatch`. Los demás no se
|
|
86
|
+
* pueden disparar, así que no se ofrecen. */
|
|
87
|
+
| 'githubWorkflow'
|
|
88
|
+
/** Texto con autocompletado de `{{payload.*}}`. */
|
|
89
|
+
| 'template'
|
|
90
|
+
/** Área de texto larga, también con autocompletado. */
|
|
91
|
+
| 'textarea'
|
|
92
|
+
/** `<select>` normal; las etiquetas no son los valores, `options` obliga. */
|
|
93
|
+
| 'select' | 'number'
|
|
94
|
+
/**
|
|
95
|
+
* `<select>` de `''` / `'true'` / `'false'` que se guarda como BOOLEANO, o
|
|
96
|
+
* no se guarda si es `''`. "— sin tocar —" tiene que significar que la clave
|
|
97
|
+
* no viaja, no que viaja en `false`.
|
|
98
|
+
*/
|
|
99
|
+
| 'booleanSelect'
|
|
100
|
+
/** Área de texto para JSON crudo. */
|
|
101
|
+
| 'json';
|
|
102
|
+
export interface GithubParamSpec {
|
|
103
|
+
/** La clave de `operationConfig`. Es lo que lee la api, no un nombre de UI. */
|
|
104
|
+
name: string;
|
|
105
|
+
label: string;
|
|
106
|
+
type: GithubParamType;
|
|
107
|
+
required?: boolean;
|
|
108
|
+
/** Ayuda bajo el campo. Texto plano: el paquete no lleva React. */
|
|
109
|
+
description?: string;
|
|
110
|
+
placeholder?: string;
|
|
111
|
+
/** Prerrellenado cuando la config guardada no trae valor para esta clave. */
|
|
112
|
+
default?: string | number;
|
|
113
|
+
/** Obligatorio en `select` y `booleanSelect` — etiqueta y valor difieren. */
|
|
114
|
+
options?: ReadonlyArray<{
|
|
115
|
+
value: string;
|
|
116
|
+
label: string;
|
|
117
|
+
}>;
|
|
118
|
+
min?: number;
|
|
119
|
+
max?: number;
|
|
120
|
+
/** Se pinta en la pestaña "Advanced" en vez de en "Config". */
|
|
121
|
+
advanced?: boolean;
|
|
122
|
+
/** Sólo visible cuando un campo hermano vale uno de estos. */
|
|
123
|
+
showWhen?: {
|
|
124
|
+
field: string;
|
|
125
|
+
in: ReadonlyArray<string>;
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
export interface GithubOperationSpec {
|
|
129
|
+
/** Etiqueta de la fila en el desplegable de operación. */
|
|
130
|
+
label: string;
|
|
131
|
+
/** Sub-línea bajo la etiqueta. */
|
|
132
|
+
description: string;
|
|
133
|
+
/** Ruta a la que mapea, tal cual, para poder cotejarla con los docs. */
|
|
134
|
+
apiRoute: string;
|
|
135
|
+
/** Esquema de parámetros. El orden ES el orden en pantalla. */
|
|
136
|
+
params: GithubParamSpec[];
|
|
137
|
+
}
|
|
138
|
+
export declare const GITHUB_OPERATION_SPECS: Record<GithubOperation, GithubOperationSpec>;
|
|
139
|
+
/**
|
|
140
|
+
* Lo que se ofrece en el desplegable de operación.
|
|
141
|
+
*
|
|
142
|
+
* Hoy son todas. Existe como constante aparte —y no como alias de
|
|
143
|
+
* `GITHUB_OPERATIONS`— porque es exactamente el punto donde otros nodos han
|
|
144
|
+
* necesitado esconder una op sin sacarla del enum: retirarla del enum rompe
|
|
145
|
+
* las que ya estaban guardadas en la base de datos.
|
|
146
|
+
*/
|
|
147
|
+
export declare const GITHUB_DROPDOWN_OPERATIONS: readonly GithubOperation[];
|