@hostwebhook/node-types 1.60.0 → 1.62.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/credentials.js +22 -0
- package/dist/drive-toolkit.js +8 -4
- package/package.json +1 -1
package/dist/credentials.js
CHANGED
|
@@ -74,6 +74,28 @@ exports.CREDENTIAL_TYPES = [
|
|
|
74
74
|
// autorización al pulsar Submit; la revisión de 5-10 días es para salir en
|
|
75
75
|
// su galería, o sea para que te encuentren, no para que funcione.
|
|
76
76
|
{ type: 'notion_oauth' },
|
|
77
|
+
// El OAuth de HostWebhook contra Mailchimp.
|
|
78
|
+
//
|
|
79
|
+
// Faltaba, y el síntoma no señalaba aquí. La api ya tenía el flujo entero
|
|
80
|
+
// —`mailchimp-oauth.service.ts`, su controlador, su DTO y sus presets— y el
|
|
81
|
+
// usuario autorizaba bien; lo que moría era el `create` de la credencial:
|
|
82
|
+
//
|
|
83
|
+
// ERROR [CredentialsController] Mailchimp OAuth callback failed:
|
|
84
|
+
// Credential validation failed: type: `mailchimp_oauth2` is not a valid
|
|
85
|
+
// enum value for path `type`.
|
|
86
|
+
//
|
|
87
|
+
// Porque de esta lista salen las DOS validaciones que ve ese documento: el
|
|
88
|
+
// `enum` de Mongoose en `credential.entity.ts` y el `@IsIn` del DTO. La api
|
|
89
|
+
// declaraba el string por su cuenta (`MAILCHIMP_CREDENTIAL_TYPE`) sin
|
|
90
|
+
// anotarlo `: CredentialType`, así que TypeScript lo dio por bueno y sólo
|
|
91
|
+
// reventó en producción, contra un cliente que no podía conectar su cuenta.
|
|
92
|
+
//
|
|
93
|
+
// Lleva `_oauth2` y no `_oauth` —al revés que `notion_oauth`— porque ése es
|
|
94
|
+
// el string que la api ya guarda y que el dashboard ya filtra en
|
|
95
|
+
// `components/triggers/registry.tsx` (`scopeFilter: "mailchimp_oauth2"`).
|
|
96
|
+
// Renombrarlo ahora rompería las credenciales que hayan llegado a existir:
|
|
97
|
+
// el `type` es la clave por la que los nodos las referencian.
|
|
98
|
+
{ type: 'mailchimp_oauth2' },
|
|
77
99
|
];
|
|
78
100
|
/**
|
|
79
101
|
* Plain string array — what the Mongoose `enum` field and the
|
package/dist/drive-toolkit.js
CHANGED
|
@@ -33,12 +33,16 @@ exports.DRIVE_TOOLKIT_SPECS = [
|
|
|
33
33
|
label: 'Upload file',
|
|
34
34
|
toolName: 'upload_to_drive',
|
|
35
35
|
group: ENTRAN_Y_SALEN,
|
|
36
|
-
description: 'Upload a file
|
|
36
|
+
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.',
|
|
37
37
|
parameters: [
|
|
38
|
-
p('fileName', 'Optional
|
|
39
|
-
p('
|
|
38
|
+
p('fileName', 'Optional with a payload _file (defaults to its originalName). REQUIRED with contentBase64 — there is no ref to inherit a name from.', false),
|
|
39
|
+
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),
|
|
40
|
+
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),
|
|
41
|
+
p('partIndex', 'Which chunk this is, ZERO-BASED (0 to partTotal-1). Required whenever partTotal is set.', false),
|
|
42
|
+
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),
|
|
43
|
+
p('sourceField', 'Optional. Payload field path holding the _file ref. Defaults to "_file". Ignored when contentBase64 is set.', false),
|
|
40
44
|
p('parentFolderId', 'Optional. Drive folder ID to upload into. Empty = root.', false),
|
|
41
|
-
p('mimeType', 'Optional. Override the MIME type. Defaults to the _file ref mimeType.', false),
|
|
45
|
+
p('mimeType', 'Optional. Override the MIME type. Defaults to the _file ref mimeType, or application/octet-stream with contentBase64.', false),
|
|
42
46
|
],
|
|
43
47
|
},
|
|
44
48
|
{
|
package/package.json
CHANGED