planvortex 0.24.0 → 0.26.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/README.md +8 -3
- package/dist/{chunk-L2DNKFA2.js → chunk-JAA666FR.js} +5 -3
- package/dist/chunk-JAA666FR.js.map +1 -0
- package/dist/{index-C91ZeTR-.d.cts → index-C5hlx3fK.d.cts} +222 -39
- package/dist/{index-C91ZeTR-.d.ts → index-C5hlx3fK.d.ts} +222 -39
- package/dist/index.cjs +34 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +49 -14
- package/dist/index.d.ts +49 -14
- package/dist/index.js +33 -5
- package/dist/index.js.map +1 -1
- package/dist/webhooks/index.cjs +14 -1
- package/dist/webhooks/index.cjs.map +1 -1
- package/dist/webhooks/index.d.cts +1 -1
- package/dist/webhooks/index.d.ts +1 -1
- package/dist/webhooks/index.js +11 -2
- package/dist/webhooks/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-L2DNKFA2.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -4,7 +4,7 @@ var path = require('path');
|
|
|
4
4
|
|
|
5
5
|
// src/version.ts
|
|
6
6
|
var PLANVORTEX_API_URL = "https://api.planvortex.com/v1.0.0";
|
|
7
|
-
var VERSION = "0.
|
|
7
|
+
var VERSION = "0.26.0";
|
|
8
8
|
|
|
9
9
|
// src/core/errors.ts
|
|
10
10
|
var PLANVORTEX_ERROR_RANGES = [
|
|
@@ -18,7 +18,9 @@ var PLANVORTEX_ERROR_RANGES = [
|
|
|
18
18
|
//716: la sesion de Bluesky la esta renovando otro proceso. Es temporal, y fuera de familia no
|
|
19
19
|
//habia forma de saber que la respuesta es reintentar.
|
|
20
20
|
{ from: 700, to: 716, family: "account" },
|
|
21
|
-
|
|
21
|
+
//811-812: la marca de IA de un fichero (fase 39 del servidor): desmarcar lo que genero el
|
|
22
|
+
//planificador y una declaracion que no es ni true ni false.
|
|
23
|
+
{ from: 800, to: 812, family: "file" },
|
|
22
24
|
//El techo sube con el catalogo del servidor, y subir tarde no da un error: da un consejo
|
|
23
25
|
//equivocado. Los codigos de Bluesky, Discord, Telegram y Threads (961-977) y los dos frenos
|
|
24
26
|
//de ritmo de la fase de publicaciones ilimitadas (978, 979) nacieron por encima de 960 y
|
|
@@ -3044,10 +3046,21 @@ var UploadsResource = class extends Resource {
|
|
|
3044
3046
|
* ```ts
|
|
3045
3047
|
* await pv.uploads.create(orgId, { file: "./hogaza.jpg" });
|
|
3046
3048
|
* await pv.uploads.create(orgId, { file: bytes, filename: "hogaza.jpg" });
|
|
3049
|
+
* // hecho con IA: TikTok lo recibe como `is_aigc`
|
|
3050
|
+
* await pv.uploads.create(orgId, { file: "./promo.mp4", ai_generated: true, ai_tool: "ElevenLabs" });
|
|
3047
3051
|
* ```
|
|
3052
|
+
*
|
|
3053
|
+
* Sin `ai_generated`, decide el fichero: si trae la marca de IA en sus metadatos, vuelve con
|
|
3054
|
+
* `ai_generated.source === "detected"` (ver {@link AiDeclaration}).
|
|
3048
3055
|
*/
|
|
3049
3056
|
async create(idOrganization, input, options = {}) {
|
|
3050
3057
|
const form = await buildUploadForm(input);
|
|
3058
|
+
if (input.ai_generated !== void 0) {
|
|
3059
|
+
form.append("ai_generated", String(input.ai_generated));
|
|
3060
|
+
}
|
|
3061
|
+
if (input.ai_tool) {
|
|
3062
|
+
form.append("ai_tool", input.ai_tool);
|
|
3063
|
+
}
|
|
3051
3064
|
return this.postOne(
|
|
3052
3065
|
`/organizations/${requireId(idOrganization, "idOrganization")}/uploads`,
|
|
3053
3066
|
"upload",
|
|
@@ -3077,7 +3090,14 @@ var UploadsResource = class extends Resource {
|
|
|
3077
3090
|
async get(idOrganization, idUpload, options = {}) {
|
|
3078
3091
|
return this.getOne(this.path(idOrganization, idUpload), "upload", void 0, options);
|
|
3079
3092
|
}
|
|
3080
|
-
/**
|
|
3093
|
+
/**
|
|
3094
|
+
* Cambia la portada de un vídeo o la marca de IA. Marcar o desmarcar recalcula también
|
|
3095
|
+
* `ai_generated.image` de las publicaciones que lo usan y aún no han salido.
|
|
3096
|
+
*
|
|
3097
|
+
* ```ts
|
|
3098
|
+
* await pv.uploads.update(orgId, uploadId, { ai_generated: true });
|
|
3099
|
+
* ```
|
|
3100
|
+
*/
|
|
3081
3101
|
async update(idOrganization, idUpload, body, options = {}) {
|
|
3082
3102
|
return this.putOne(this.path(idOrganization, idUpload), "upload", body, options);
|
|
3083
3103
|
}
|
|
@@ -3100,11 +3120,21 @@ var UploadsResource = class extends Resource {
|
|
|
3100
3120
|
* La respuesta es PARCIAL a propósito: mira `errors` aunque `uploads` traiga algo — de seis
|
|
3101
3121
|
* ficheros pueden entrar cuatro. Un `2204` significa que el proveedor no da los bytes: un
|
|
3102
3122
|
* documento nativo de Google no tiene fichero que descargar.
|
|
3123
|
+
*
|
|
3124
|
+
* `ai_generated` y `ai_tool` en `options` valen para toda la tanda; cada fichero puede traer
|
|
3125
|
+
* los suyos, que mandan.
|
|
3103
3126
|
*/
|
|
3104
3127
|
async import(idOrganization, idIntegration, files, options = {}) {
|
|
3128
|
+
const body = { id_integration: requireId(idIntegration, "idIntegration"), files };
|
|
3129
|
+
if (options.ai_generated !== void 0) {
|
|
3130
|
+
body.ai_generated = options.ai_generated;
|
|
3131
|
+
}
|
|
3132
|
+
if (options.ai_tool) {
|
|
3133
|
+
body.ai_tool = options.ai_tool;
|
|
3134
|
+
}
|
|
3105
3135
|
return this.httpPost(
|
|
3106
3136
|
`/organizations/${requireId(idOrganization, "idOrganization")}/uploads/import`,
|
|
3107
|
-
|
|
3137
|
+
body,
|
|
3108
3138
|
options
|
|
3109
3139
|
);
|
|
3110
3140
|
}
|