sass-cms-template-common 0.0.24 → 0.0.26
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/index.d.ts +62 -2
- package/dist/index.js +10 -9
- package/dist/index.js.map +1 -1
- package/dist/server.d.ts +58 -0
- package/dist/server.js +1 -1
- package/dist/{services-xDvlUc4t.js → services-ByTYzguw.js} +40 -1
- package/dist/services-ByTYzguw.js.map +1 -0
- package/package.json +1 -1
- package/dist/services-xDvlUc4t.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1033,6 +1033,17 @@ export declare class CmsCopilotServices {
|
|
|
1033
1033
|
* oportunidad: `save` | `like` | `dislike` | `assign` (permiso COPILOT_ACTION).
|
|
1034
1034
|
*/
|
|
1035
1035
|
executeAction: (input: CopilotActionInput) => Promise<CopilotActionResponse>;
|
|
1036
|
+
/**
|
|
1037
|
+
* POST /copilot/generate — genera la nota con IA (Kundera) a partir de una
|
|
1038
|
+
* oportunidad y la crea en el CMS, devolviendo su `fileName` (path VFS) para
|
|
1039
|
+
* abrir el editor de noticias. Llamada **síncrona** (10–40s) que consume cuota,
|
|
1040
|
+
* marca la oportunidad como `actioned` y exige los permisos `COPILOT_ACTION` e
|
|
1041
|
+
* `IA_NEWS_CREATE` (NAA-4863; contrato verificado contra la ficha del endpoint).
|
|
1042
|
+
* @param opportunityId - Id de la oportunidad a generar.
|
|
1043
|
+
* @param model - Modelo de IA opcional (ej. `gemini-2.5-flash`); si se omite,
|
|
1044
|
+
* usa el default del microservicio.
|
|
1045
|
+
*/
|
|
1046
|
+
generate: (opportunityId: string, model?: string) => Promise<CopilotGenerateResponse>;
|
|
1036
1047
|
/**
|
|
1037
1048
|
* POST /copilot/snooze — "recordar luego" de una oportunidad de la campanita
|
|
1038
1049
|
* (permiso COPILOT_VIEW). La oportunidad desaparece de la campanita para el
|
|
@@ -2982,6 +2993,53 @@ export declare interface CopilotActionResponse extends CmsResponse {
|
|
|
2982
2993
|
data?: CopilotActionData;
|
|
2983
2994
|
}
|
|
2984
2995
|
|
|
2996
|
+
/**
|
|
2997
|
+
* Artículo generado por IA (Kundera) que devuelve POST /copilot/generate. Cada
|
|
2998
|
+
* campo viene solo si tuvo valor. Hoy la nota se crea con `title` + `body_markdown`
|
|
2999
|
+
* (crudo); el resto (tags, imágenes) se devuelve para reuso del front pero NO se
|
|
3000
|
+
* escribe en la nota (ver ficha del endpoint, NAA-4863).
|
|
3001
|
+
*/
|
|
3002
|
+
export declare interface CopilotArticle {
|
|
3003
|
+
/** Título de la nota. */
|
|
3004
|
+
title?: string;
|
|
3005
|
+
/** Copete / bajada. */
|
|
3006
|
+
lead?: string;
|
|
3007
|
+
/** Cuerpo en Markdown (hoy se guarda crudo hasta que Kundera devuelva HTML). */
|
|
3008
|
+
body_markdown?: string;
|
|
3009
|
+
/** Resumen para SEO / meta description. */
|
|
3010
|
+
meta_description?: string;
|
|
3011
|
+
/** Tags sugeridos. */
|
|
3012
|
+
tags?: string[];
|
|
3013
|
+
/** Consulta sugerida para buscar la imagen de portada. */
|
|
3014
|
+
image_search_query?: string;
|
|
3015
|
+
/** Descripción de la imagen sugerida. */
|
|
3016
|
+
image_suggestion?: string;
|
|
3017
|
+
/** Advertencias editoriales de la IA. */
|
|
3018
|
+
warnings?: string[];
|
|
3019
|
+
}
|
|
3020
|
+
|
|
3021
|
+
/**
|
|
3022
|
+
* Cuerpo de la respuesta de POST /copilot/generate (NAA-4863).
|
|
3023
|
+
*
|
|
3024
|
+
* El endpoint genera el artículo con IA (Kundera) a partir de una oportunidad y
|
|
3025
|
+
* **crea la nota en el CMS** (misma lógica que `news/IAcreate/create`),
|
|
3026
|
+
* devolviendo el `fileName` (path VFS) para que el front abra el editor.
|
|
3027
|
+
*/
|
|
3028
|
+
export declare interface CopilotGenerateResponse extends CmsResponse {
|
|
3029
|
+
copilotEnabled?: boolean;
|
|
3030
|
+
opportunity_id?: string;
|
|
3031
|
+
/** Código de resultado devuelto por el microservicio (omitido si es nulo). */
|
|
3032
|
+
code?: string;
|
|
3033
|
+
/**
|
|
3034
|
+
* Path VFS de la nota recién creada. El front lo usa para abrir el editor de
|
|
3035
|
+
* noticias (`/new_post/{fileName}/edit/{idPublicación}`). Solo si la creación
|
|
3036
|
+
* fue exitosa.
|
|
3037
|
+
*/
|
|
3038
|
+
fileName?: string;
|
|
3039
|
+
/** Artículo generado por IA (título, cuerpo, tags, imágenes sugeridas…). */
|
|
3040
|
+
article?: CopilotArticle;
|
|
3041
|
+
}
|
|
3042
|
+
|
|
2985
3043
|
/** Filtros opcionales de POST /copilot/opportunities (passthrough al micro). */
|
|
2986
3044
|
export declare interface CopilotOpportunitiesFilters {
|
|
2987
3045
|
/** Filtro de estado de las oportunidades (p. ej. "open"). */
|
|
@@ -3342,7 +3400,7 @@ export declare type DropdownOption = {
|
|
|
3342
3400
|
|
|
3343
3401
|
export declare type EditorialOpportunityColors = typeof editorialOpportunityColors;
|
|
3344
3402
|
|
|
3345
|
-
export declare const editorialOpportunityColors: Record<"accent" | "text" | "topicBg" | "topicHoverBg" | "topicBorder" | "trending" | "listRowHover" | "assignBtnHover", string>;
|
|
3403
|
+
export declare const editorialOpportunityColors: Record<"accent" | "text" | "topicBg" | "topicHoverBg" | "topicBorder" | "trending" | "listRowHover" | "assignBtnHover" | "generateBtn" | "generateBtnHover", string>;
|
|
3346
3404
|
|
|
3347
3405
|
export declare const enMessages: {
|
|
3348
3406
|
readonly navigation: {
|
|
@@ -7038,6 +7096,8 @@ export declare const SelectStyles: {
|
|
|
7038
7096
|
export declare const shadows: {
|
|
7039
7097
|
/** Botones (CTA y blancos). */
|
|
7040
7098
|
readonly button: "0 1px 2px rgba(0, 0, 0, 0.10)";
|
|
7099
|
+
/** Botón con elevación apenas perceptible (píldoras compactas, split-pill). */
|
|
7100
|
+
readonly buttonSoft: "0 1px 2px rgba(0, 0, 0, 0.06)";
|
|
7041
7101
|
/** Menús con elevación M3 nivel 2 (perfil, selector de sitios). */
|
|
7042
7102
|
readonly menu: "0px 1px 3px 0px rgba(0, 0, 0, 0.30), 0px 4px 8px 3px rgba(0, 0, 0, 0.15)";
|
|
7043
7103
|
/** Paper suave y difuso (dropdowns genéricos). */
|
|
@@ -7204,7 +7264,7 @@ export declare const sizes: {
|
|
|
7204
7264
|
|
|
7205
7265
|
export declare type SourceColors = typeof sourceColors;
|
|
7206
7266
|
|
|
7207
|
-
export declare const sourceColors: Record<"rss" | "gtrends" | "sconsole" | "x", string>;
|
|
7267
|
+
export declare const sourceColors: Record<"rss" | "gtrends" | "sconsole" | "ga4" | "x", string>;
|
|
7208
7268
|
|
|
7209
7269
|
export declare type StateColors = typeof stateColors;
|
|
7210
7270
|
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as e, A as t, B as n, C as r, Ct as i, D as a, E as o, Et as s, F as c, G as l, H as u, I as d, J as f, K as p, L as m, M as h, N as g, O as _, P as v, Q as y, R as b, S as x, St as S, T as C, Tt as w, U as T, V as E, W as D, X as O, Y as ee, Z as te, _ as ne, _t as k, a as re, at as ie, b as ae, bt as oe, c as se, ct as ce, d as le, dt as ue, et as de, f as fe, ft as pe, g as me, gt as he, h as ge, ht as _e, i as ve, it as ye, j as be, k as xe, l as Se, lt as Ce, m as we, mt as Te, n as Ee, nt as De, o as Oe, ot as ke, p as Ae, pt as A, q as je, r as Me, rt as Ne, s as Pe, st as Fe, t as Ie, tt as Le, u as Re, ut as ze, v as Be, vt as j, w as Ve, wt as He, x as Ue, xt as M, y as We, yt as Ge, z as Ke } from "./services-
|
|
1
|
+
import { $ as e, A as t, B as n, C as r, Ct as i, D as a, E as o, Et as s, F as c, G as l, H as u, I as d, J as f, K as p, L as m, M as h, N as g, O as _, P as v, Q as y, R as b, S as x, St as S, T as C, Tt as w, U as T, V as E, W as D, X as O, Y as ee, Z as te, _ as ne, _t as k, a as re, at as ie, b as ae, bt as oe, c as se, ct as ce, d as le, dt as ue, et as de, f as fe, ft as pe, g as me, gt as he, h as ge, ht as _e, i as ve, it as ye, j as be, k as xe, l as Se, lt as Ce, m as we, mt as Te, n as Ee, nt as De, o as Oe, ot as ke, p as Ae, pt as A, q as je, r as Me, rt as Ne, s as Pe, st as Fe, t as Ie, tt as Le, u as Re, ut as ze, v as Be, vt as j, w as Ve, wt as He, x as Ue, xt as M, y as We, yt as Ge, z as Ke } from "./services-ByTYzguw.js";
|
|
2
2
|
import { ThemeProvider as qe, alpha as N, createTheme as Je, useColorScheme as Ye } from "@mui/material/styles";
|
|
3
3
|
import { Fragment as Xe, cloneElement as Ze, createContext as Qe, forwardRef as $e, isValidElement as et, useCallback as tt, useContext as nt, useEffect as P, useId as rt, useMemo as F, useRef as it, useState as I } from "react";
|
|
4
4
|
import { Fragment as L, jsx as R, jsxs as z } from "react/jsx-runtime";
|
|
@@ -4243,7 +4243,7 @@ var X = {
|
|
|
4243
4243
|
gap: .25,
|
|
4244
4244
|
fontSize: 11,
|
|
4245
4245
|
fontWeight: 700,
|
|
4246
|
-
color:
|
|
4246
|
+
color: A.primary
|
|
4247
4247
|
},
|
|
4248
4248
|
sxOpportunityTrendingIcon: { fontSize: 16 },
|
|
4249
4249
|
sxOpportunityTopicTitle: {
|
|
@@ -4488,12 +4488,12 @@ function Ji({ item: e, open: t, onToggle: n, onRemindLater: r, onSeeMore: i, see
|
|
|
4488
4488
|
component: a ? "a" : "div",
|
|
4489
4489
|
...f,
|
|
4490
4490
|
"data-testid": `link-opportunity-${y(c.id || c.code || "top")}`,
|
|
4491
|
-
sx: X.sxOpportunityTopic(
|
|
4491
|
+
sx: X.sxOpportunityTopic(!0, !!a),
|
|
4492
4492
|
children: [
|
|
4493
4493
|
/* @__PURE__ */ z(U, {
|
|
4494
4494
|
component: "div",
|
|
4495
4495
|
variant: "caption",
|
|
4496
|
-
sx: X.sxOpportunityMeta(
|
|
4496
|
+
sx: X.sxOpportunityMeta(!0),
|
|
4497
4497
|
children: [/* @__PURE__ */ z(B, {
|
|
4498
4498
|
component: "span",
|
|
4499
4499
|
sx: X.sxOpportunityTrending,
|
|
@@ -4528,12 +4528,12 @@ function Ji({ item: e, open: t, onToggle: n, onRemindLater: r, onSeeMore: i, see
|
|
|
4528
4528
|
component: a ? "a" : "div",
|
|
4529
4529
|
...f,
|
|
4530
4530
|
"data-testid": `link-opportunity-${y(t.id || t.code || String(n + 1))}`,
|
|
4531
|
-
sx: X.sxOpportunityTopic(
|
|
4531
|
+
sx: X.sxOpportunityTopic(!1, !!a),
|
|
4532
4532
|
children: [
|
|
4533
4533
|
/* @__PURE__ */ R(U, {
|
|
4534
4534
|
component: "div",
|
|
4535
4535
|
variant: "caption",
|
|
4536
|
-
sx: X.sxOpportunityMeta(
|
|
4536
|
+
sx: X.sxOpportunityMeta(!1),
|
|
4537
4537
|
children: /* @__PURE__ */ z("span", { children: [
|
|
4538
4538
|
t.matchPercent,
|
|
4539
4539
|
"% ",
|
|
@@ -6754,15 +6754,16 @@ var ho = {
|
|
|
6754
6754
|
},
|
|
6755
6755
|
sxIcon: {
|
|
6756
6756
|
color: A.actionIcon,
|
|
6757
|
+
opacity: .5,
|
|
6757
6758
|
mb: "2px",
|
|
6758
6759
|
"& .MuiSvgIcon-root": {
|
|
6759
|
-
fontSize:
|
|
6760
|
+
fontSize: 46,
|
|
6760
6761
|
color: A.actionIcon
|
|
6761
6762
|
}
|
|
6762
6763
|
},
|
|
6763
6764
|
sxTitle: {
|
|
6764
6765
|
fontFamily: j.googleSans,
|
|
6765
|
-
fontWeight:
|
|
6766
|
+
fontWeight: 500,
|
|
6766
6767
|
fontSize: 16,
|
|
6767
6768
|
color: A.textStrong
|
|
6768
6769
|
},
|
|
@@ -6770,7 +6771,7 @@ var ho = {
|
|
|
6770
6771
|
fontFamily: j.googleSans,
|
|
6771
6772
|
fontWeight: 400,
|
|
6772
6773
|
fontSize: 14,
|
|
6773
|
-
color: A.
|
|
6774
|
+
color: A.actionIcon
|
|
6774
6775
|
}
|
|
6775
6776
|
};
|
|
6776
6777
|
//#endregion
|