boondmanager-mcp-server 1.0.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/LICENSE +21 -0
- package/README.md +201 -0
- package/dist/constants.d.ts +32 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +35 -0
- package/dist/constants.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +47 -0
- package/dist/index.js.map +1 -0
- package/dist/schemas/index.d.ts +347 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/index.js +364 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/services/boond-client.d.ts +12 -0
- package/dist/services/boond-client.d.ts.map +1 -0
- package/dist/services/boond-client.js +123 -0
- package/dist/services/boond-client.js.map +1 -0
- package/dist/tools/absences.d.ts +3 -0
- package/dist/tools/absences.d.ts.map +1 -0
- package/dist/tools/absences.js +116 -0
- package/dist/tools/absences.js.map +1 -0
- package/dist/tools/actions.d.ts +3 -0
- package/dist/tools/actions.d.ts.map +1 -0
- package/dist/tools/actions.js +100 -0
- package/dist/tools/actions.js.map +1 -0
- package/dist/tools/advantages.d.ts +3 -0
- package/dist/tools/advantages.d.ts.map +1 -0
- package/dist/tools/advantages.js +47 -0
- package/dist/tools/advantages.js.map +1 -0
- package/dist/tools/application.d.ts +3 -0
- package/dist/tools/application.d.ts.map +1 -0
- package/dist/tools/application.js +60 -0
- package/dist/tools/application.js.map +1 -0
- package/dist/tools/candidates.d.ts +3 -0
- package/dist/tools/candidates.d.ts.map +1 -0
- package/dist/tools/candidates.js +90 -0
- package/dist/tools/candidates.js.map +1 -0
- package/dist/tools/companies.d.ts +3 -0
- package/dist/tools/companies.d.ts.map +1 -0
- package/dist/tools/companies.js +79 -0
- package/dist/tools/companies.js.map +1 -0
- package/dist/tools/contacts.d.ts +3 -0
- package/dist/tools/contacts.d.ts.map +1 -0
- package/dist/tools/contacts.js +85 -0
- package/dist/tools/contacts.js.map +1 -0
- package/dist/tools/crud-factory.d.ts +16 -0
- package/dist/tools/crud-factory.d.ts.map +1 -0
- package/dist/tools/crud-factory.js +146 -0
- package/dist/tools/crud-factory.js.map +1 -0
- package/dist/tools/deliveries.d.ts +3 -0
- package/dist/tools/deliveries.d.ts.map +1 -0
- package/dist/tools/deliveries.js +48 -0
- package/dist/tools/deliveries.js.map +1 -0
- package/dist/tools/expenses.d.ts +3 -0
- package/dist/tools/expenses.d.ts.map +1 -0
- package/dist/tools/expenses.js +119 -0
- package/dist/tools/expenses.js.map +1 -0
- package/dist/tools/index.d.ts +19 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +19 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/invoices.d.ts +3 -0
- package/dist/tools/invoices.d.ts.map +1 -0
- package/dist/tools/invoices.js +119 -0
- package/dist/tools/invoices.js.map +1 -0
- package/dist/tools/opportunities.d.ts +3 -0
- package/dist/tools/opportunities.d.ts.map +1 -0
- package/dist/tools/opportunities.js +88 -0
- package/dist/tools/opportunities.js.map +1 -0
- package/dist/tools/orders.d.ts +3 -0
- package/dist/tools/orders.d.ts.map +1 -0
- package/dist/tools/orders.js +118 -0
- package/dist/tools/orders.js.map +1 -0
- package/dist/tools/payments.d.ts +3 -0
- package/dist/tools/payments.d.ts.map +1 -0
- package/dist/tools/payments.js +48 -0
- package/dist/tools/payments.js.map +1 -0
- package/dist/tools/positionings.d.ts +3 -0
- package/dist/tools/positionings.d.ts.map +1 -0
- package/dist/tools/positionings.js +100 -0
- package/dist/tools/positionings.js.map +1 -0
- package/dist/tools/products.d.ts +3 -0
- package/dist/tools/products.d.ts.map +1 -0
- package/dist/tools/products.js +22 -0
- package/dist/tools/products.js.map +1 -0
- package/dist/tools/projects.d.ts +3 -0
- package/dist/tools/projects.d.ts.map +1 -0
- package/dist/tools/projects.js +101 -0
- package/dist/tools/projects.js.map +1 -0
- package/dist/tools/resources.d.ts +3 -0
- package/dist/tools/resources.d.ts.map +1 -0
- package/dist/tools/resources.js +112 -0
- package/dist/tools/resources.js.map +1 -0
- package/dist/tools/timesheets.d.ts +3 -0
- package/dist/tools/timesheets.d.ts.map +1 -0
- package/dist/tools/timesheets.js +116 -0
- package/dist/tools/timesheets.js.map +1 -0
- package/dist/types.d.ts +37 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -0
- package/package.json +55 -0
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { AbsenceSearchSchema, AbsenceCreateSchema, AbsenceUpdateSchema, IdSchema } from "../schemas/index.js";
|
|
2
|
+
import { apiRequest, buildSearchQuery, formatListResponse, formatDetailResponse } from "../services/boond-client.js";
|
|
3
|
+
import { buildJsonApiBody } from "./crud-factory.js";
|
|
4
|
+
export function registerAbsenceTools(server) {
|
|
5
|
+
// Search absences
|
|
6
|
+
server.registerTool("boond_absences_search", {
|
|
7
|
+
title: "Rechercher des absences",
|
|
8
|
+
description: `Recherche des absences (congés, RTT, maladie...) dans BoondManager avec filtres par ressource et période.
|
|
9
|
+
|
|
10
|
+
Args:
|
|
11
|
+
- keywords (string, optional): Termes de recherche
|
|
12
|
+
- resourceId (string, optional): Filtrer par ID ressource
|
|
13
|
+
- startDate, endDate (string, optional): Période (YYYY-MM-DD)
|
|
14
|
+
- page, pageSize: Pagination
|
|
15
|
+
|
|
16
|
+
Returns: Liste des absences correspondantes.`,
|
|
17
|
+
inputSchema: AbsenceSearchSchema,
|
|
18
|
+
annotations: {
|
|
19
|
+
readOnlyHint: true,
|
|
20
|
+
destructiveHint: false,
|
|
21
|
+
idempotentHint: true,
|
|
22
|
+
openWorldHint: true,
|
|
23
|
+
},
|
|
24
|
+
}, async (params) => {
|
|
25
|
+
const query = buildSearchQuery(params);
|
|
26
|
+
const response = await apiRequest("/absences", "GET", undefined, query);
|
|
27
|
+
return {
|
|
28
|
+
content: [{ type: "text", text: formatListResponse(response, "absence") }],
|
|
29
|
+
};
|
|
30
|
+
});
|
|
31
|
+
// Get absence details
|
|
32
|
+
server.registerTool("boond_absences_get", {
|
|
33
|
+
title: "Détails d'une absence",
|
|
34
|
+
description: `Récupère les informations détaillées d'une absence par son ID.`,
|
|
35
|
+
inputSchema: IdSchema,
|
|
36
|
+
annotations: {
|
|
37
|
+
readOnlyHint: true,
|
|
38
|
+
destructiveHint: false,
|
|
39
|
+
idempotentHint: true,
|
|
40
|
+
openWorldHint: false,
|
|
41
|
+
},
|
|
42
|
+
}, async (params) => {
|
|
43
|
+
const response = await apiRequest(`/absences/${params.id}`);
|
|
44
|
+
return {
|
|
45
|
+
content: [{ type: "text", text: formatDetailResponse(response) }],
|
|
46
|
+
};
|
|
47
|
+
});
|
|
48
|
+
// Create absence
|
|
49
|
+
server.registerTool("boond_absences_create", {
|
|
50
|
+
title: "Créer une absence",
|
|
51
|
+
description: `Crée une nouvelle demande d'absence dans BoondManager, liée à une ressource.`,
|
|
52
|
+
inputSchema: AbsenceCreateSchema,
|
|
53
|
+
annotations: {
|
|
54
|
+
readOnlyHint: false,
|
|
55
|
+
destructiveHint: false,
|
|
56
|
+
idempotentHint: false,
|
|
57
|
+
openWorldHint: false,
|
|
58
|
+
},
|
|
59
|
+
}, async (params) => {
|
|
60
|
+
const { resourceId, ...attrs } = params;
|
|
61
|
+
const body = buildJsonApiBody("absence", attrs);
|
|
62
|
+
if (resourceId) {
|
|
63
|
+
body.data.relationships = {
|
|
64
|
+
resource: { data: { id: resourceId, type: "resource" } },
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
const response = await apiRequest("/absences", "POST", body);
|
|
68
|
+
const entity = Array.isArray(response.data) ? response.data[0] : response.data;
|
|
69
|
+
return {
|
|
70
|
+
content: [{
|
|
71
|
+
type: "text",
|
|
72
|
+
text: `✅ Absence créée avec succès.\nID: ${entity?.id}\n\n${formatDetailResponse(response)}`,
|
|
73
|
+
}],
|
|
74
|
+
};
|
|
75
|
+
});
|
|
76
|
+
// Update absence
|
|
77
|
+
server.registerTool("boond_absences_update", {
|
|
78
|
+
title: "Modifier une absence",
|
|
79
|
+
description: `Met à jour une absence existante. Seuls les champs fournis sont modifiés.`,
|
|
80
|
+
inputSchema: AbsenceUpdateSchema,
|
|
81
|
+
annotations: {
|
|
82
|
+
readOnlyHint: false,
|
|
83
|
+
destructiveHint: false,
|
|
84
|
+
idempotentHint: true,
|
|
85
|
+
openWorldHint: false,
|
|
86
|
+
},
|
|
87
|
+
}, async (params) => {
|
|
88
|
+
const { id, ...attrs } = params;
|
|
89
|
+
const body = buildJsonApiBody("absence", attrs, id);
|
|
90
|
+
const response = await apiRequest(`/absences/${id}`, "PATCH", body);
|
|
91
|
+
return {
|
|
92
|
+
content: [{
|
|
93
|
+
type: "text",
|
|
94
|
+
text: `✅ Absence #${id} mise à jour.\n\n${formatDetailResponse(response)}`,
|
|
95
|
+
}],
|
|
96
|
+
};
|
|
97
|
+
});
|
|
98
|
+
// Delete absence
|
|
99
|
+
server.registerTool("boond_absences_delete", {
|
|
100
|
+
title: "Supprimer une absence",
|
|
101
|
+
description: `Supprime une absence de BoondManager. ⚠️ Action irréversible.`,
|
|
102
|
+
inputSchema: IdSchema,
|
|
103
|
+
annotations: {
|
|
104
|
+
readOnlyHint: false,
|
|
105
|
+
destructiveHint: true,
|
|
106
|
+
idempotentHint: false,
|
|
107
|
+
openWorldHint: false,
|
|
108
|
+
},
|
|
109
|
+
}, async (params) => {
|
|
110
|
+
await apiRequest(`/absences/${params.id}`, "DELETE");
|
|
111
|
+
return {
|
|
112
|
+
content: [{ type: "text", text: `🗑️ Absence #${params.id} supprimée.` }],
|
|
113
|
+
};
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
//# sourceMappingURL=absences.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"absences.js","sourceRoot":"","sources":["../../src/tools/absences.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,mBAAmB,EAA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AAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/tools/actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAKzE,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CA8G3D"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { ActionSearchSchema, ActionCreateSchema, IdSchema } from "../schemas/index.js";
|
|
2
|
+
import { apiRequest, buildSearchQuery, formatListResponse, formatDetailResponse } from "../services/boond-client.js";
|
|
3
|
+
import { buildJsonApiBody } from "./crud-factory.js";
|
|
4
|
+
export function registerActionTools(server) {
|
|
5
|
+
// Search actions
|
|
6
|
+
server.registerTool("boond_actions_search", {
|
|
7
|
+
title: "Rechercher des actions",
|
|
8
|
+
description: `Recherche des actions (appels, emails, RDV, notes) dans BoondManager avec filtres optionnels par candidat, ressource, contact ou société.
|
|
9
|
+
|
|
10
|
+
Args:
|
|
11
|
+
- keywords (string, optional): Termes de recherche
|
|
12
|
+
- candidateId, resourceId, contactId, companyId (string, optional): Filtrer par entité liée
|
|
13
|
+
- page, pageSize: Pagination
|
|
14
|
+
|
|
15
|
+
Returns: Liste des actions correspondantes.`,
|
|
16
|
+
inputSchema: ActionSearchSchema,
|
|
17
|
+
annotations: {
|
|
18
|
+
readOnlyHint: true,
|
|
19
|
+
destructiveHint: false,
|
|
20
|
+
idempotentHint: true,
|
|
21
|
+
openWorldHint: true,
|
|
22
|
+
},
|
|
23
|
+
}, async (params) => {
|
|
24
|
+
const query = buildSearchQuery(params);
|
|
25
|
+
const response = await apiRequest("/actions", "GET", undefined, query);
|
|
26
|
+
return {
|
|
27
|
+
content: [{ type: "text", text: formatListResponse(response, "action") }],
|
|
28
|
+
};
|
|
29
|
+
});
|
|
30
|
+
// Get action details
|
|
31
|
+
server.registerTool("boond_actions_get", {
|
|
32
|
+
title: "Détails d'une action",
|
|
33
|
+
description: `Récupère les détails d'une action par son ID.`,
|
|
34
|
+
inputSchema: IdSchema,
|
|
35
|
+
annotations: {
|
|
36
|
+
readOnlyHint: true,
|
|
37
|
+
destructiveHint: false,
|
|
38
|
+
idempotentHint: true,
|
|
39
|
+
openWorldHint: false,
|
|
40
|
+
},
|
|
41
|
+
}, async (params) => {
|
|
42
|
+
const response = await apiRequest(`/actions/${params.id}`);
|
|
43
|
+
return {
|
|
44
|
+
content: [{ type: "text", text: formatDetailResponse(response) }],
|
|
45
|
+
};
|
|
46
|
+
});
|
|
47
|
+
// Create action
|
|
48
|
+
server.registerTool("boond_actions_create", {
|
|
49
|
+
title: "Créer une action",
|
|
50
|
+
description: `Crée une nouvelle action (appel, email, RDV, note) dans BoondManager, optionnellement liée à un candidat, ressource, contact ou société.`,
|
|
51
|
+
inputSchema: ActionCreateSchema,
|
|
52
|
+
annotations: {
|
|
53
|
+
readOnlyHint: false,
|
|
54
|
+
destructiveHint: false,
|
|
55
|
+
idempotentHint: false,
|
|
56
|
+
openWorldHint: false,
|
|
57
|
+
},
|
|
58
|
+
}, async (params) => {
|
|
59
|
+
const { candidateId, resourceId, contactId, companyId, ...attrs } = params;
|
|
60
|
+
const body = buildJsonApiBody("action", attrs);
|
|
61
|
+
const relationships = {};
|
|
62
|
+
if (candidateId)
|
|
63
|
+
relationships.candidate = { data: { id: candidateId, type: "candidate" } };
|
|
64
|
+
if (resourceId)
|
|
65
|
+
relationships.resource = { data: { id: resourceId, type: "resource" } };
|
|
66
|
+
if (contactId)
|
|
67
|
+
relationships.contact = { data: { id: contactId, type: "contact" } };
|
|
68
|
+
if (companyId)
|
|
69
|
+
relationships.company = { data: { id: companyId, type: "company" } };
|
|
70
|
+
if (Object.keys(relationships).length > 0) {
|
|
71
|
+
body.data.relationships = relationships;
|
|
72
|
+
}
|
|
73
|
+
const response = await apiRequest("/actions", "POST", body);
|
|
74
|
+
const entity = Array.isArray(response.data) ? response.data[0] : response.data;
|
|
75
|
+
return {
|
|
76
|
+
content: [{
|
|
77
|
+
type: "text",
|
|
78
|
+
text: `✅ Action créée avec succès.\nID: ${entity?.id}\n\n${formatDetailResponse(response)}`,
|
|
79
|
+
}],
|
|
80
|
+
};
|
|
81
|
+
});
|
|
82
|
+
// Delete action
|
|
83
|
+
server.registerTool("boond_actions_delete", {
|
|
84
|
+
title: "Supprimer une action",
|
|
85
|
+
description: `Supprime une action de BoondManager. ⚠️ Action irréversible.`,
|
|
86
|
+
inputSchema: IdSchema,
|
|
87
|
+
annotations: {
|
|
88
|
+
readOnlyHint: false,
|
|
89
|
+
destructiveHint: true,
|
|
90
|
+
idempotentHint: false,
|
|
91
|
+
openWorldHint: false,
|
|
92
|
+
},
|
|
93
|
+
}, async (params) => {
|
|
94
|
+
await apiRequest(`/actions/${params.id}`, "DELETE");
|
|
95
|
+
return {
|
|
96
|
+
content: [{ type: "text", text: `🗑️ Action #${params.id} supprimée.` }],
|
|
97
|
+
};
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
//# sourceMappingURL=actions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions.js","sourceRoot":"","sources":["../../src/tools/actions.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACvF,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACrH,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAErD,MAAM,UAAU,mBAAmB,CAAC,MAAiB;IACnD,iBAAiB;IACjB,MAAM,CAAC,YAAY,CACjB,sBAAsB,EACtB;QACE,KAAK,EAAE,wBAAwB;QAC/B,WAAW,EAAE;;;;;;;4CAOyB;QACtC,WAAW,EAAE,kBAAkB;QAC/B,WAAW,EAAE;YACX,YAAY,EAAE,IA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R,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE,oCAAoC,MAAM,EAAE,EAAE,OAAO,oBAAoB,CAAC,QAAQ,CAAC,EAAE;iBAC5F,CAAC;SACH,CAAC;IACJ,CAAC,CACF,CAAC;IAEF,gBAAgB;IAChB,MAAM,CAAC,YAAY,CACjB,sBAAsB,EACtB;QACE,KAAK,EAAE,sBAAsB;QAC7B,WAAW,EAAE,8DAA8D;QAC3E,WAAW,EAAE,QAAQ;QACrB,WAAW,EAAE;YACX,YAAY,EAAE,KAAK;YACnB,eAAe,EAAE,IAAI;YACrB,cAAc,EAAE,KAAK;YACrB,aAAa,EAAE,KAAK;SACrB;KACF,EACD,KAAK,EAAE,MAAM,EAAE,EAAE;QACf,MAAM,UAAU,CAAC,YAAY,MAAM,CAAC,EAAE,EAAE,EAAE,QAAQ,CAAC,CAAC;QACpD,OAAO;YACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,eAAe,MAAM,CAAC,EAAE,aAAa,EAAE,CAAC;SAClF,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"advantages.d.ts","sourceRoot":"","sources":["../../src/tools/advantages.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAIzE,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAoD9D"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { AdvantageSearchSchema, IdSchema } from "../schemas/index.js";
|
|
2
|
+
import { apiRequest, buildSearchQuery, formatListResponse, formatDetailResponse } from "../services/boond-client.js";
|
|
3
|
+
export function registerAdvantageTools(server) {
|
|
4
|
+
// Search advantages
|
|
5
|
+
server.registerTool("boond_advantages_search", {
|
|
6
|
+
title: "Rechercher des avantages",
|
|
7
|
+
description: `Recherche des avantages (tickets restaurant, mutuelle, véhicule, primes...) dans BoondManager, avec filtre optionnel par ressource.
|
|
8
|
+
|
|
9
|
+
Args:
|
|
10
|
+
- keywords (string, optional): Termes de recherche
|
|
11
|
+
- resourceId (string, optional): Filtrer par ID ressource
|
|
12
|
+
- page, pageSize: Pagination
|
|
13
|
+
|
|
14
|
+
Returns: Liste des avantages correspondants.`,
|
|
15
|
+
inputSchema: AdvantageSearchSchema,
|
|
16
|
+
annotations: {
|
|
17
|
+
readOnlyHint: true,
|
|
18
|
+
destructiveHint: false,
|
|
19
|
+
idempotentHint: true,
|
|
20
|
+
openWorldHint: true,
|
|
21
|
+
},
|
|
22
|
+
}, async (params) => {
|
|
23
|
+
const query = buildSearchQuery(params);
|
|
24
|
+
const response = await apiRequest("/advantages", "GET", undefined, query);
|
|
25
|
+
return {
|
|
26
|
+
content: [{ type: "text", text: formatListResponse(response, "avantage") }],
|
|
27
|
+
};
|
|
28
|
+
});
|
|
29
|
+
// Get advantage details
|
|
30
|
+
server.registerTool("boond_advantages_get", {
|
|
31
|
+
title: "Détails d'un avantage",
|
|
32
|
+
description: `Récupère les informations détaillées d'un avantage par son ID.`,
|
|
33
|
+
inputSchema: IdSchema,
|
|
34
|
+
annotations: {
|
|
35
|
+
readOnlyHint: true,
|
|
36
|
+
destructiveHint: false,
|
|
37
|
+
idempotentHint: true,
|
|
38
|
+
openWorldHint: false,
|
|
39
|
+
},
|
|
40
|
+
}, async (params) => {
|
|
41
|
+
const response = await apiRequest(`/advantages/${params.id}`);
|
|
42
|
+
return {
|
|
43
|
+
content: [{ type: "text", text: formatDetailResponse(response) }],
|
|
44
|
+
};
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=advantages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"advantages.js","sourceRoot":"","sources":["../../src/tools/advantages.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACtE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AAC,EAAE,CAAC;SAC3E,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"application.d.ts","sourceRoot":"","sources":["../../src/tools/application.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAKzE,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAiEhE"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { DictionaryGetSchema } from "../schemas/index.js";
|
|
2
|
+
import { apiRequest, formatDetailResponse } from "../services/boond-client.js";
|
|
3
|
+
export function registerApplicationTools(server) {
|
|
4
|
+
// Get dictionary
|
|
5
|
+
server.registerTool("boond_application_dictionary", {
|
|
6
|
+
title: "Récupérer un dictionnaire BoondManager",
|
|
7
|
+
description: `Récupère un dictionnaire de référence de l'application BoondManager (types d'actions, types d'absences, états des entités, pays, devises, langues...).
|
|
8
|
+
|
|
9
|
+
Args:
|
|
10
|
+
- dictionaryType (string): Type de dictionnaire. Exemples :
|
|
11
|
+
- "typeOf/actions" : types d'actions
|
|
12
|
+
- "typeOf/absences" : types d'absences
|
|
13
|
+
- "typeOf/expenses" : types de frais
|
|
14
|
+
- "states/candidates" : états des candidats
|
|
15
|
+
- "states/resources" : états des ressources
|
|
16
|
+
- "states/opportunities" : états des opportunités
|
|
17
|
+
- "states/projects" : états des projets
|
|
18
|
+
- "states/invoices" : états des factures
|
|
19
|
+
- "states/orders" : états des bons de commande
|
|
20
|
+
- "countries" : liste des pays
|
|
21
|
+
- "currencies" : liste des devises
|
|
22
|
+
- "languages" : liste des langues
|
|
23
|
+
|
|
24
|
+
Returns: Données du dictionnaire (clé/valeur).`,
|
|
25
|
+
inputSchema: DictionaryGetSchema,
|
|
26
|
+
annotations: {
|
|
27
|
+
readOnlyHint: true,
|
|
28
|
+
destructiveHint: false,
|
|
29
|
+
idempotentHint: true,
|
|
30
|
+
openWorldHint: false,
|
|
31
|
+
},
|
|
32
|
+
}, async (params) => {
|
|
33
|
+
const response = await apiRequest(`/application/dictionaries/${params.dictionaryType}`);
|
|
34
|
+
const text = formatDetailResponse(response);
|
|
35
|
+
return {
|
|
36
|
+
content: [{ type: "text", text }],
|
|
37
|
+
};
|
|
38
|
+
});
|
|
39
|
+
// Get current user / application info
|
|
40
|
+
server.registerTool("boond_application_current_user", {
|
|
41
|
+
title: "Utilisateur courant BoondManager",
|
|
42
|
+
description: `Récupère les informations de l'utilisateur actuellement connecté à l'API BoondManager (profil, permissions, agence...).
|
|
43
|
+
|
|
44
|
+
Returns: Données JSON de l'utilisateur courant.`,
|
|
45
|
+
inputSchema: {},
|
|
46
|
+
annotations: {
|
|
47
|
+
readOnlyHint: true,
|
|
48
|
+
destructiveHint: false,
|
|
49
|
+
idempotentHint: true,
|
|
50
|
+
openWorldHint: false,
|
|
51
|
+
},
|
|
52
|
+
}, async () => {
|
|
53
|
+
const response = await apiRequest("/application/me");
|
|
54
|
+
const text = formatDetailResponse(response);
|
|
55
|
+
return {
|
|
56
|
+
content: [{ type: "text", text }],
|
|
57
|
+
};
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=application.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"application.js","sourceRoot":"","sources":["../../src/tools/application.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE1D,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAE/E,MAAM,UAAU,wBAAwB,CAAC,MAAiB;IACxD,iBAAiB;IACjB,MAAM,CAAC,YAAY,CACjB,8BAA8B,EAC9B;QACE,KAAK,EAAE,wCAAwC;QAC/C,WAAW,EAAE;;;;;;;;;;;;;;;;;+CAiB4B;QACzC,WAAW,EAAE,mBAAmB;QAChC,WAAW,EAAE;YACX,YAAY,EAAE,IAAI;YAClB,eAAe,EAAE,KAAK;YACtB,cAAc,EAAE,IAAI;YACpB,aAAa,EAAE,KAAK;SACrB;KACF,EACD,KAAK,EAAE,MAA0B,EAAE,EAAE;QACnC,MAAM,QAAQ,GAAG,MAAM,UAAU,CAAC,6BAA6B,MAAM,CAAC,cAAc,EAAE,CAAC,CAAC;QACxF,MAAM,IAAI,GAAG,oBAAoB,CAAC,QAAQ,CAAC,CAAC;QAC5C,OAAO;YACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,CAAC;SAC3C,CAAC;IACJ,CAAC,CACF,CAAC;IAEF,sCAAsC;IACtC,MAAM,CAAC,YAAY,CACjB,gCAAgC,EAChC;QACE,KAAK,EAAE,kCAAkC;QACzC,WAAW,EAAE;;gDAE6B;QAC1C,WAAW,EAAE,EAAE;QACf,WAAW,EAAE;YACX,YAAY,EAAE,IAAI;YAClB,eAAe,EAAE,KAAK;YACtB,cAAc,EAAE,IAAI;YACpB,aAAa,EAAE,KAAK;SACrB;KACF,EACD,KAAK,IAAI,EAAE;QACT,MAAM,QAAQ,GAAG,MAAM,UAAU,CAAC,iBAAiB,CAAC,CAAC;QACrD,MAAM,IAAI,GAAG,oBAAoB,CAAC,QAAQ,CAAC,CAAC;QAC5C,OAAO;YACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,CAAC;SAC3C,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"candidates.d.ts","sourceRoot":"","sources":["../../src/tools/candidates.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAiFzE,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAmC9D"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { CandidateCreateSchema, CandidateUpdateSchema, IdSchema } from "../schemas/index.js";
|
|
2
|
+
import { registerSearchTool, registerGetTool, registerCreateTool, registerUpdateTool, registerDeleteTool, buildJsonApiBody, } from "./crud-factory.js";
|
|
3
|
+
import { apiRequest, formatDetailResponse } from "../services/boond-client.js";
|
|
4
|
+
const OPTS = {
|
|
5
|
+
entityName: "candidat",
|
|
6
|
+
entityNamePlural: "candidats",
|
|
7
|
+
apiPath: "/candidates",
|
|
8
|
+
prefix: "boond_candidates",
|
|
9
|
+
};
|
|
10
|
+
const TAB_TOOL_ANNOTATIONS = {
|
|
11
|
+
readOnlyHint: true,
|
|
12
|
+
destructiveHint: false,
|
|
13
|
+
idempotentHint: true,
|
|
14
|
+
openWorldHint: false,
|
|
15
|
+
};
|
|
16
|
+
const CANDIDATE_TABS = [
|
|
17
|
+
{
|
|
18
|
+
name: "information",
|
|
19
|
+
tab: "information",
|
|
20
|
+
title: "Informations générales d'un candidat",
|
|
21
|
+
description: `Récupère les informations générales d'un candidat (coordonnées, adresse, état civil, photo, tags, source...).
|
|
22
|
+
|
|
23
|
+
Args:
|
|
24
|
+
- id (string): ID du candidat
|
|
25
|
+
|
|
26
|
+
Returns: Données personnelles et administratives du candidat.`,
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: "technical",
|
|
30
|
+
tab: "technical",
|
|
31
|
+
title: "Compétences techniques d'un candidat",
|
|
32
|
+
description: `Récupère le profil technique d'un candidat (compétences, expériences, formations, certifications, langues, CV...).
|
|
33
|
+
|
|
34
|
+
Args:
|
|
35
|
+
- id (string): ID du candidat
|
|
36
|
+
|
|
37
|
+
Returns: Données techniques et compétences du candidat.`,
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: "actions",
|
|
41
|
+
tab: "actions",
|
|
42
|
+
title: "Actions liées à un candidat",
|
|
43
|
+
description: `Récupère les actions (appels, emails, RDV, notes) associées à un candidat.
|
|
44
|
+
|
|
45
|
+
Args:
|
|
46
|
+
- id (string): ID du candidat
|
|
47
|
+
|
|
48
|
+
Returns: Liste des actions liées au candidat.`,
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: "documents",
|
|
52
|
+
tab: "documents",
|
|
53
|
+
title: "Documents d'un candidat",
|
|
54
|
+
description: `Récupère les documents attachés à un candidat (CV, lettres de motivation, certifications...).
|
|
55
|
+
|
|
56
|
+
Args:
|
|
57
|
+
- id (string): ID du candidat
|
|
58
|
+
|
|
59
|
+
Returns: Liste des documents du candidat.`,
|
|
60
|
+
},
|
|
61
|
+
];
|
|
62
|
+
export function registerCandidateTools(server) {
|
|
63
|
+
registerSearchTool(server, OPTS);
|
|
64
|
+
registerGetTool(server, OPTS);
|
|
65
|
+
registerCreateTool(server, OPTS, CandidateCreateSchema, (params) => {
|
|
66
|
+
const { ...attrs } = params;
|
|
67
|
+
return buildJsonApiBody("candidate", attrs);
|
|
68
|
+
});
|
|
69
|
+
registerUpdateTool(server, OPTS, CandidateUpdateSchema, (params) => {
|
|
70
|
+
const { id, ...attrs } = params;
|
|
71
|
+
return buildJsonApiBody("candidate", attrs, id);
|
|
72
|
+
});
|
|
73
|
+
registerDeleteTool(server, OPTS);
|
|
74
|
+
// Register one tool per candidate tab
|
|
75
|
+
for (const tab of CANDIDATE_TABS) {
|
|
76
|
+
server.registerTool(`boond_candidates_${tab.name}`, {
|
|
77
|
+
title: tab.title,
|
|
78
|
+
description: tab.description,
|
|
79
|
+
inputSchema: IdSchema,
|
|
80
|
+
annotations: TAB_TOOL_ANNOTATIONS,
|
|
81
|
+
}, async (params) => {
|
|
82
|
+
const response = await apiRequest(`/candidates/${params.id}/${tab.tab}`);
|
|
83
|
+
const text = formatDetailResponse(response);
|
|
84
|
+
return {
|
|
85
|
+
content: [{ type: "text", text }],
|
|
86
|
+
};
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=candidates.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"candidates.js","sourceRoot":"","sources":["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AE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAsEzE,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAmC5D"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { CompanyCreateSchema, CompanyUpdateSchema, IdSchema } from "../schemas/index.js";
|
|
2
|
+
import { registerSearchTool, registerGetTool, registerCreateTool, registerUpdateTool, registerDeleteTool, buildJsonApiBody, } from "./crud-factory.js";
|
|
3
|
+
import { apiRequest, formatDetailResponse } from "../services/boond-client.js";
|
|
4
|
+
const OPTS = {
|
|
5
|
+
entityName: "société",
|
|
6
|
+
entityNamePlural: "sociétés",
|
|
7
|
+
apiPath: "/companies",
|
|
8
|
+
prefix: "boond_companies",
|
|
9
|
+
};
|
|
10
|
+
const TAB_TOOL_ANNOTATIONS = {
|
|
11
|
+
readOnlyHint: true,
|
|
12
|
+
destructiveHint: false,
|
|
13
|
+
idempotentHint: true,
|
|
14
|
+
openWorldHint: false,
|
|
15
|
+
};
|
|
16
|
+
const COMPANY_TABS = [
|
|
17
|
+
{
|
|
18
|
+
name: "information",
|
|
19
|
+
tab: "information",
|
|
20
|
+
title: "Informations générales d'une société",
|
|
21
|
+
description: `Récupère les informations générales d'une société (coordonnées, SIRET, site web, secteur, taille, tags...).
|
|
22
|
+
|
|
23
|
+
Args:
|
|
24
|
+
- id (string): ID de la société
|
|
25
|
+
|
|
26
|
+
Returns: Données générales de la société.`,
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: "actions",
|
|
30
|
+
tab: "actions",
|
|
31
|
+
title: "Actions liées à une société",
|
|
32
|
+
description: `Récupère les actions (appels, emails, RDV, notes) associées à une société.
|
|
33
|
+
|
|
34
|
+
Args:
|
|
35
|
+
- id (string): ID de la société
|
|
36
|
+
|
|
37
|
+
Returns: Liste des actions liées à la société.`,
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: "documents",
|
|
41
|
+
tab: "documents",
|
|
42
|
+
title: "Documents d'une société",
|
|
43
|
+
description: `Récupère les documents attachés à une société (contrats cadre, accords, présentations...).
|
|
44
|
+
|
|
45
|
+
Args:
|
|
46
|
+
- id (string): ID de la société
|
|
47
|
+
|
|
48
|
+
Returns: Liste des documents de la société.`,
|
|
49
|
+
},
|
|
50
|
+
];
|
|
51
|
+
export function registerCompanyTools(server) {
|
|
52
|
+
registerSearchTool(server, OPTS);
|
|
53
|
+
registerGetTool(server, OPTS);
|
|
54
|
+
registerCreateTool(server, OPTS, CompanyCreateSchema, (params) => {
|
|
55
|
+
const { ...attrs } = params;
|
|
56
|
+
return buildJsonApiBody("company", attrs);
|
|
57
|
+
});
|
|
58
|
+
registerUpdateTool(server, OPTS, CompanyUpdateSchema, (params) => {
|
|
59
|
+
const { id, ...attrs } = params;
|
|
60
|
+
return buildJsonApiBody("company", attrs, id);
|
|
61
|
+
});
|
|
62
|
+
registerDeleteTool(server, OPTS);
|
|
63
|
+
// Register one tool per company tab
|
|
64
|
+
for (const tab of COMPANY_TABS) {
|
|
65
|
+
server.registerTool(`boond_companies_${tab.name}`, {
|
|
66
|
+
title: tab.title,
|
|
67
|
+
description: tab.description,
|
|
68
|
+
inputSchema: IdSchema,
|
|
69
|
+
annotations: TAB_TOOL_ANNOTATIONS,
|
|
70
|
+
}, async (params) => {
|
|
71
|
+
const response = await apiRequest(`/companies/${params.id}/${tab.tab}`);
|
|
72
|
+
const text = formatDetailResponse(response);
|
|
73
|
+
return {
|
|
74
|
+
content: [{ type: "text", text }],
|
|
75
|
+
};
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=companies.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"companies.js","sourceRoot":"","sources":["../../src/tools/companies.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEzF,OAAO,EACL,kBAAkB,EA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