@connect-xlab/mcp-server 0.3.2 → 0.3.3

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.
@@ -23,7 +23,7 @@ export const createLinkInBioBlockTool = {
23
23
  "- kind=lab : autre Lab de l'owner (lab_group_id requis)\n" +
24
24
  "- kind=quiz : quiz du Lab (quiz_id requis). Le bloc reste masque sur la page publique tant que le quiz n'est pas publie et le plug-in Quiz active.\n" +
25
25
  "- kind=calendar : calendrier du Lab (calendar_event_id requis, ids via get_link_in_bio_catalog ou list_calendars). La reservation s'ouvre en fenetre sur la page publique. Masque si le calendrier est inactif ; un calendrier payant doit etre vendu dans une boutique Stripe active.\n" +
26
- "Les ids se trouvent via get_link_in_bio_catalog. Champs optionnels : subtitle, image_url. Position en fin de liste (utiliser reorder pour changer).",
26
+ "Les ids se trouvent via get_link_in_bio_catalog. Champs optionnels : subtitle, image_url, layout (forme du bloc : classic = petite image + bouton a droite, par defaut ; image = texte et bouton a contour a gauche, grande image a droite ; button = image + titre en haut, gros bouton pleine largeur en dessous), button_label (texte du bouton, 60 car. max ; vide = texte par defaut du type de bloc). Position en fin de liste (utiliser reorder pour changer).",
27
27
  inputSchema: {
28
28
  type: 'object',
29
29
  properties: {
@@ -31,6 +31,8 @@ export const createLinkInBioBlockTool = {
31
31
  kind: { type: 'string', enum: [...KINDS] },
32
32
  title: { type: 'string', maxLength: 200 },
33
33
  subtitle: { type: 'string', maxLength: 300 },
34
+ layout: { type: 'string', enum: ['classic', 'image', 'button'] },
35
+ button_label: { type: 'string', maxLength: 60 },
34
36
  url: { type: 'string', description: 'kind=external : URL du lien' },
35
37
  image_url: { type: 'string' },
36
38
  sellable_type: { type: 'string', enum: [...SELLABLE_TYPES] },
@@ -47,6 +49,8 @@ export const createLinkInBioBlockTool = {
47
49
  kind: z.enum(KINDS),
48
50
  title: z.string().max(200),
49
51
  subtitle: z.string().max(300).optional(),
52
+ layout: z.enum(['classic', 'image', 'button']).optional(),
53
+ button_label: z.string().max(60).optional(),
50
54
  url: z.string().optional(),
51
55
  image_url: z.string().optional(),
52
56
  sellable_type: z.enum(SELLABLE_TYPES).optional(),
@@ -6,10 +6,12 @@
6
6
  */
7
7
  import { z } from 'zod';
8
8
  import { http, formatApiError } from '../http.js';
9
+ /** Polices acceptees par le back (LinkInBioPage::FONTS). */
10
+ const LIB_FONTS = ['fredoka', 'nunito', 'inter', 'dm-sans', 'poppins', 'montserrat', 'outfit', 'space-grotesk', 'playfair', 'lora', 'bricolage', 'bebas', 'caveat'];
9
11
  const SOCIAL_KEYS = ['instagram', 'tiktok', 'youtube', 'x', 'linkedin', 'facebook', 'whatsapp', 'telegram'];
10
12
  export const updateLinkInBioTool = {
11
13
  name: 'update_link_in_bio',
12
- description: "Upsert (remplacement) de la page Link in Bio. Cree la page si absente. C'est un upsert COMPLET : tu dois TOUJOURS fournir slug, display_name, photo_layout et theme (fais get_link_in_bio d'abord pour recuperer les valeurs actuelles, puis renvoie-les avec tes modifs). Autres champs : bio, accent_color (#RRGGBB), desktop_layout (split/centered), avatar_url, banner_url, portrait_url, socials{instagram, tiktok, youtube, x, linkedin, facebook, whatsapp, telegram}. theme = light | dark | violet | yellow. photo_layout = avatar | banner | portrait. Les uploads d'images (avatar/banniere) se font via le front — ici on passe des URLs. Attention : changer le slug a un cooldown de 30 jours.",
14
+ description: "Upsert (remplacement) de la page Link in Bio. Cree la page si absente. C'est un upsert COMPLET : tu dois TOUJOURS fournir slug, display_name, photo_layout et theme (fais get_link_in_bio d'abord pour recuperer les valeurs actuelles, puis renvoie-les avec tes modifs). Autres champs : bio, accent_color (#RRGGBB), desktop_layout (split/centered), font_title / font_subtitle / font_body (polices de toute la page : titre = nom, sous-titres = titres des liens et boutons, texte = bio et descriptions ; null = police par defaut ; omis = inchange), avatar_url, banner_url, portrait_url, socials{instagram, tiktok, youtube, x, linkedin, facebook, whatsapp, telegram}. theme = light | dark | violet | yellow. photo_layout = avatar | banner | portrait. Les uploads d'images (avatar/banniere) se font via le front — ici on passe des URLs. Attention : changer le slug a un cooldown de 30 jours.",
13
15
  inputSchema: {
14
16
  type: 'object',
15
17
  properties: {
@@ -21,6 +23,9 @@ export const updateLinkInBioTool = {
21
23
  accent_color: { type: 'string', pattern: '^#[0-9A-Fa-f]{6}$' },
22
24
  photo_layout: { type: 'string', enum: ['avatar', 'banner', 'portrait'] },
23
25
  desktop_layout: { type: 'string', enum: ['split', 'centered'] },
26
+ font_title: { type: ['string', 'null'], enum: [...LIB_FONTS, null] },
27
+ font_subtitle: { type: ['string', 'null'], enum: [...LIB_FONTS, null] },
28
+ font_body: { type: ['string', 'null'], enum: [...LIB_FONTS, null] },
24
29
  avatar_url: { type: 'string' },
25
30
  banner_url: { type: 'string' },
26
31
  portrait_url: { type: 'string' },
@@ -42,6 +47,9 @@ export const updateLinkInBioTool = {
42
47
  accent_color: z.string().regex(/^#[0-9A-Fa-f]{6}$/).optional(),
43
48
  photo_layout: z.enum(['avatar', 'banner', 'portrait']),
44
49
  desktop_layout: z.enum(['split', 'centered']).optional(),
50
+ font_title: z.enum(LIB_FONTS).nullable().optional(),
51
+ font_subtitle: z.enum(LIB_FONTS).nullable().optional(),
52
+ font_body: z.enum(LIB_FONTS).nullable().optional(),
45
53
  avatar_url: z.string().optional(),
46
54
  banner_url: z.string().optional(),
47
55
  portrait_url: z.string().optional(),
@@ -7,7 +7,7 @@ import { z } from 'zod';
7
7
  import { http, formatApiError } from '../http.js';
8
8
  export const updateLinkInBioBlockTool = {
9
9
  name: 'update_link_in_bio_block',
10
- description: "Modifie un bloc existant (identifie par block_id, entier renvoye par get_link_in_bio ou create_link_in_bio_block). Seuls les champs fournis changent : title, subtitle, url (bloc externe), image_url, quiz_id (bloc quiz), calendar_event_id (bloc calendrier), lab_group_id (bloc Lab), is_active (afficher/masquer sans supprimer). Le type (kind) d'un bloc ne change pas.",
10
+ description: "Modifie un bloc existant (identifie par block_id, entier renvoye par get_link_in_bio ou create_link_in_bio_block). Seuls les champs fournis changent : title, subtitle, url (bloc externe), image_url, layout (forme du bloc : classic = petite image + bouton a droite, par defaut ; image = texte et bouton a contour a gauche, grande image a droite ; button = image + titre en haut, gros bouton pleine largeur en dessous), button_label (texte du bouton, 60 car. max ; vide = texte par defaut du type de bloc), quiz_id (bloc quiz), calendar_event_id (bloc calendrier), lab_group_id (bloc Lab), is_active (afficher/masquer sans supprimer). Le type (kind) d'un bloc ne change pas.",
11
11
  inputSchema: {
12
12
  type: 'object',
13
13
  properties: {
@@ -15,6 +15,8 @@ export const updateLinkInBioBlockTool = {
15
15
  block_id: { type: 'number', minimum: 1 },
16
16
  title: { type: 'string', maxLength: 200 },
17
17
  subtitle: { type: 'string', maxLength: 300 },
18
+ layout: { type: 'string', enum: ['classic', 'image', 'button'] },
19
+ button_label: { type: 'string', maxLength: 60 },
18
20
  url: { type: 'string' },
19
21
  image_url: { type: 'string' },
20
22
  quiz_id: { type: 'number', minimum: 1 },
@@ -30,6 +32,8 @@ export const updateLinkInBioBlockTool = {
30
32
  block_id: z.number().int().positive(),
31
33
  title: z.string().max(200).optional(),
32
34
  subtitle: z.string().max(300).optional(),
35
+ layout: z.enum(['classic', 'image', 'button']).optional(),
36
+ button_label: z.string().max(60).optional(),
33
37
  url: z.string().optional(),
34
38
  image_url: z.string().optional(),
35
39
  quiz_id: z.number().int().positive().optional(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@connect-xlab/mcp-server",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "Serveur MCP pour piloter ton Lab ConnectXLab depuis Claude Desktop / Cursor / n'importe quel client MCP.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",