boondmanager-mcp-server 2.8.3 → 2.10.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 +5 -4
- package/dist/instructions.d.ts +21 -0
- package/dist/instructions.d.ts.map +1 -0
- package/dist/instructions.js +56 -0
- package/dist/instructions.js.map +1 -0
- package/dist/schemas/index.d.ts +15 -2
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +23 -6
- package/dist/schemas/index.js.map +1 -1
- package/dist/server.d.ts +7 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +35 -13
- package/dist/server.js.map +1 -1
- package/dist/services/boond-client.d.ts.map +1 -1
- package/dist/services/boond-client.js +214 -14
- package/dist/services/boond-client.js.map +1 -1
- package/dist/tools/absences.js +1 -1
- package/dist/tools/absences.js.map +1 -1
- package/dist/tools/actions.js +1 -1
- package/dist/tools/actions.js.map +1 -1
- package/dist/tools/advantages.js +1 -1
- package/dist/tools/advantages.js.map +1 -1
- package/dist/tools/candidates.d.ts.map +1 -1
- package/dist/tools/candidates.js +1 -4
- package/dist/tools/candidates.js.map +1 -1
- package/dist/tools/companies.d.ts.map +1 -1
- package/dist/tools/companies.js +1 -4
- package/dist/tools/companies.js.map +1 -1
- package/dist/tools/contacts.d.ts.map +1 -1
- package/dist/tools/contacts.js +1 -4
- package/dist/tools/contacts.js.map +1 -1
- package/dist/tools/crud-factory.d.ts +1 -1
- package/dist/tools/crud-factory.d.ts.map +1 -1
- package/dist/tools/crud-factory.js +6 -2
- package/dist/tools/crud-factory.js.map +1 -1
- package/dist/tools/deliveries.js +1 -1
- package/dist/tools/deliveries.js.map +1 -1
- package/dist/tools/invoices.js +2 -2
- package/dist/tools/invoices.js.map +1 -1
- package/dist/tools/notifications.js +1 -1
- package/dist/tools/notifications.js.map +1 -1
- package/dist/tools/opportunities.d.ts.map +1 -1
- package/dist/tools/opportunities.js +1 -4
- package/dist/tools/opportunities.js.map +1 -1
- package/dist/tools/payments.js +1 -1
- package/dist/tools/payments.js.map +1 -1
- package/dist/tools/planning-absences.js +1 -1
- package/dist/tools/planning-absences.js.map +1 -1
- package/dist/tools/positionings.js +1 -1
- package/dist/tools/positionings.js.map +1 -1
- package/dist/tools/projects.d.ts.map +1 -1
- package/dist/tools/projects.js +1 -4
- package/dist/tools/projects.js.map +1 -1
- package/dist/tools/provider-invoices.d.ts.map +1 -1
- package/dist/tools/provider-invoices.js +3 -2
- package/dist/tools/provider-invoices.js.map +1 -1
- package/dist/tools/purchases.d.ts.map +1 -1
- package/dist/tools/purchases.js +3 -2
- package/dist/tools/purchases.js.map +1 -1
- package/dist/tools/resources.d.ts.map +1 -1
- package/dist/tools/resources.js +1 -4
- package/dist/tools/resources.js.map +1 -1
- package/dist/tools/validations.js +1 -1
- package/dist/tools/validations.js.map +1 -1
- package/dist/transports/http.d.ts +57 -3
- package/dist/transports/http.d.ts.map +1 -1
- package/dist/transports/http.js +145 -9
- package/dist/transports/http.js.map +1 -1
- package/manifest.json +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -206,7 +206,7 @@ Exemples d'invocation des prompts ressources / competences / CV :
|
|
|
206
206
|
|
|
207
207
|
## Prerequis
|
|
208
208
|
|
|
209
|
-
- Node.js >=
|
|
209
|
+
- Node.js >= 22
|
|
210
210
|
- Un compte BoondManager avec acces API active
|
|
211
211
|
- L'option "Allow API Rest calls using BasicAuth authentication" activee dans la configuration BoondManager (si BasicAuth)
|
|
212
212
|
|
|
@@ -574,7 +574,7 @@ Le serveur supporte deux transports MCP, selectionnables via la variable d'envir
|
|
|
574
574
|
|
|
575
575
|
### Streamable HTTP (pour les gateways MCP)
|
|
576
576
|
|
|
577
|
-
Depuis la v1.4.0, le serveur peut etre expose en HTTP (
|
|
577
|
+
Depuis la v1.4.0, le serveur peut etre expose en HTTP (transport MCP Streamable HTTP) afin d'etre branche derriere une passerelle MCP ou deploye comme service. La revision de protocole negociee est celle du SDK installe (`2025-11-25`).
|
|
578
578
|
|
|
579
579
|
> **Authentification BoondManager : OAuth2 protected resource.** Le serveur HTTP **ne detient aucun secret** (ni `client_secret`, ni refresh token, ni stockage utilisateur). Chaque requete MCP doit porter `Authorization: Bearer <boond_access_token>` ; le serveur transmet le token tel quel a BoondManager. C'est le **client MCP** (Claude Desktop, Claude Code, gateway…) qui fait la danse OAuth contre BoondManager et qui gere le refresh. Procedure complete : [docs/oauth.md](docs/oauth.md).
|
|
580
580
|
|
|
@@ -608,6 +608,7 @@ npx boondmanager-mcp-server
|
|
|
608
608
|
| `MCP_HTTP_SESSION_TTL_MS` | `1800000` (30 min) | En mode stateful, duree d'inactivite au-dela de laquelle une session est fermee. |
|
|
609
609
|
| `MCP_HTTP_SESSION_SWEEP_INTERVAL_MS` | `300000` (5 min) | Frequence de balayage des sessions inactives. |
|
|
610
610
|
| `MCP_HTTP_ALLOWED_HOSTS` | _(auto)_ | Liste blanche du header `Host` (anti DNS rebinding, CVE-2025-66414). `*` pour desactiver explicitement. |
|
|
611
|
+
| `MCP_HTTP_ALLOWED_ORIGINS` | _(auto)_ | Liste blanche du header `Origin` (scheme + host + port) pour les clients navigateur ; un `Origin` hors liste recoit un `403` (exigence spec 2025-11-25). Defaut quand le serveur ecoute en loopback = **toute origine loopback, quel que soit le port** (`http`/`https` sur `localhost` / `127.0.0.1` / `[::1]`) plus l'origine de `MCP_HTTP_PUBLIC_URL` si elle est definie — MCP Inspector (`:6274`) ou un serveur de dev (`:5173`) fonctionnent sans configuration, et une origine distante recoit toujours un `403`. Validation desactivee sinon. Une liste explicite est en revanche comparee a l'identique (port compris). **Une requete sans `Origin` est toujours acceptee** (curl, gateways, clients MCP non-navigateur), et le document de decouverte `/.well-known/oauth-protected-resource` est exempte. `*` pour desactiver explicitement ; une valeur vide n'est pas une desactivation. |
|
|
611
612
|
|
|
612
613
|
**Variables OAuth2 — discovery (toutes optionnelles)**
|
|
613
614
|
|
|
@@ -841,13 +842,13 @@ npm run typecheck
|
|
|
841
842
|
|
|
842
843
|
### Stack technique
|
|
843
844
|
|
|
844
|
-
- **Runtime** : Node.js >=
|
|
845
|
+
- **Runtime** : Node.js >= 22 (ES2022)
|
|
845
846
|
- **Langage** : TypeScript 5.8+ (mode strict)
|
|
846
847
|
- **MCP SDK** : @modelcontextprotocol/sdk 1.12+
|
|
847
848
|
- **Validation** : Zod 4
|
|
848
849
|
- **Tests** : Vitest 4 + couverture V8
|
|
849
850
|
- **Lint** : ESLint 10 + typescript-eslint
|
|
850
|
-
- **Transports** : stdio (defaut) + Streamable HTTP (MCP 2025-
|
|
851
|
+
- **Transports** : stdio (defaut) + Streamable HTTP (spec MCP 2025-11-25)
|
|
851
852
|
|
|
852
853
|
## Ressources
|
|
853
854
|
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Server-level instructions advertised to the client in the `initialize`
|
|
3
|
+
* result (`ServerOptions.instructions`, MCP 2025-11-25).
|
|
4
|
+
*
|
|
5
|
+
* Scope: **cross-cutting rules only**. With ~180 tools, anything that applies
|
|
6
|
+
* to every search tool belongs here once instead of being duplicated in each
|
|
7
|
+
* description (which the model pays for in the tools[] list on every turn).
|
|
8
|
+
* Per-tool specifics stay in the tool descriptions and in `src/schemas/index.ts`.
|
|
9
|
+
*
|
|
10
|
+
* Rule of thumb when editing: a statement belongs here only if it is true of
|
|
11
|
+
* *every* tool it appears to cover. A filter that exists on six endpoints and
|
|
12
|
+
* not on the other thirty-two is a per-tool fact — stating it here as universal
|
|
13
|
+
* makes the model emit calls that either get a Zod rejection or, worse, come
|
|
14
|
+
* back empty and read as a real answer.
|
|
15
|
+
*
|
|
16
|
+
* Budget: capped and tested in `src/tools/descriptions.test.ts`
|
|
17
|
+
* (`MAX_SERVER_INSTRUCTIONS_LENGTH`) — these instructions compete with the
|
|
18
|
+
* tool catalogue for the same context window.
|
|
19
|
+
*/
|
|
20
|
+
export declare const SERVER_INSTRUCTIONS = "Acc\u00E8s aux donn\u00E9es ERP/CRM BoondManager (API JSON:API) : candidats, ressources (consultants), contacts, soci\u00E9t\u00E9s, opportunit\u00E9s, projets, CRA, factures, achats\u2026\n\n## Nommage des outils\n\n`boond_{domaine}_{op\u00E9ration}` \u2014 op\u00E9rations : `search`, `get`, `create`, `update`, `delete`. Les onglets d'une fiche sont des outils distincts : `boond_{domaine}_{onglet}` (ex. `boond_resources_technical_data`). Workflow habituel : un `search` pour obtenir l'id, puis `get` ou l'onglet voulu pour le d\u00E9tail.\n\n## Les filtres sont propres \u00E0 chaque endpoint\n\nLe sch\u00E9ma de chaque outil est la r\u00E9f\u00E9rence : **ne pas transposer un filtre d'un endpoint \u00E0 un autre**. Les sch\u00E9mas sont `.strict()`, donc un nom inconnu est rejet\u00E9 par une erreur de validation \u2014 mais ce rejet a deux causes possibles : mauvais nom de filtre, **ou** filtre non support\u00E9 par cet endpoint. Dans le second cas, ne pas r\u00E9essayer avec des variantes : reprendre la recherche avec les filtres que le sch\u00E9ma expose (souvent `keywords` seul), ou filtrer c\u00F4t\u00E9 client apr\u00E8s lecture.\n\n## P\u00E9rim\u00E8tre (les 6 recherches principales + `boond_reporting_*`)\n\nSur `resources`, `candidates`, `contacts`, `companies`, `opportunities`, `projects` et le reporting \u2014 pas sur les domaines de r\u00E9f\u00E9rence/administration :\n\n- \u00AB mes donn\u00E9es / mon \u00E9quipe / mon agence \u00BB \u2192 `perimeterDynamic` : `[\"data\"]` (mes donn\u00E9es), `[\"managers\"]` (mon N-1), `[\"agencies\"]`, `[\"poles\"]`, `[\"businessUnits\"]`\n- \u00AB l'\u00E9quipe de X \u00BB \u2192 `perimeterManagers: [<id de X>]`\n- p\u00E9rim\u00E8tre organisationnel explicite \u2192 `perimeterAgencies` / `perimeterPoles` / `perimeterBusinessUnits`, \u00E0 combiner avec `narrowPerimeter: true` pour un ET logique\n\n`mainManagers`, `agencies`, `poles`, `businessUnits` n'existent sur aucun endpoint.\n\n## Cibler une entit\u00E9 li\u00E9e\n\nVocabulaire des pr\u00E9fixes de `keywords` : `CSOC<id>` (soci\u00E9t\u00E9), `CCON<id>` (contact), `CAND<id>` (candidat), `COMP<id>` (ressource), `AO<id>` (opportunit\u00E9), `PRJ<id>` (projet), `MIS<id>` (mission), `PROD<id>` (produit), `CTR<id>` (contrat) \u2014 ex. `keywords: \"CSOC42\"`.\n\n**Chaque endpoint n'en accepte qu'un sous-ensemble, \u00E9num\u00E9r\u00E9 dans la description de l'outil.** `keywords` \u00E9tant du texte libre, un pr\u00E9fixe non support\u00E9 n'est pas rejet\u00E9 : il part en recherche plein texte et renvoie 0 r\u00E9sultat. Une page vide apr\u00E8s un pr\u00E9fixe hors liste ne veut donc pas dire \u00AB aucune entit\u00E9 li\u00E9e \u00BB \u2014 v\u00E9rifier la description de l'outil avant de conclure.\n\n`keywordsType` (recherches `resources`, `candidates`, `contacts`, `companies` uniquement) restreint `keywords` \u00E0 un champ ; les valeurs admises diff\u00E8rent par endpoint (`lastName`/`fullName`/`titleSkills`\u2026 sur les personnes, `name`/`phones`/`emails` sur les soci\u00E9t\u00E9s) \u2014 lire l'\u00E9num\u00E9ration du sch\u00E9ma. Sans lui, la recherche porte sur le champ par d\u00E9faut de l'endpoint (CV ou texte int\u00E9gral).\n\n## \u00C9conomie de contexte\n\n- `pageSize` : d\u00E9faut 30, maximum 500. `page` est plafonn\u00E9 \u00E0 100 : au-del\u00E0, affiner les filtres plut\u00F4t que paginer.\n- `fields: [\"title\", \"updateDate\", \u2026]` remplace le r\u00E9sum\u00E9 d'une ligne par les seuls attributs demand\u00E9s \u2014 \u00E0 utiliser d\u00E8s qu'une page de r\u00E9sultats est large. Disponible sur les outils de recherche, sauf `boond_timesheets_search` et `boond_reporting_*`.\n\n## \u00C9tats et types\n\nCes filtres attendent des identifiants **entiers** et leur nom est propre \u00E0 l'endpoint : `resourceStates`, `candidateStates`, `opportunityStates`, `projectStates`, `states` + `typesOf` (contacts), `states` seul (soci\u00E9t\u00E9s \u2014 il n'y a pas de filtre de type sur `/companies`). Pour les traduire en libell\u00E9s, lire les ressources `boond://dictionary/*` (states, typeOf, countries, currencies, languages) plut\u00F4t que d'appeler `boond_application_dictionary` : m\u00EAme contenu, sans consommer un appel d'outil.";
|
|
21
|
+
//# sourceMappingURL=instructions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instructions.d.ts","sourceRoot":"","sources":["../src/instructions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,mBAAmB,+oIAmCue,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Server-level instructions advertised to the client in the `initialize`
|
|
3
|
+
* result (`ServerOptions.instructions`, MCP 2025-11-25).
|
|
4
|
+
*
|
|
5
|
+
* Scope: **cross-cutting rules only**. With ~180 tools, anything that applies
|
|
6
|
+
* to every search tool belongs here once instead of being duplicated in each
|
|
7
|
+
* description (which the model pays for in the tools[] list on every turn).
|
|
8
|
+
* Per-tool specifics stay in the tool descriptions and in `src/schemas/index.ts`.
|
|
9
|
+
*
|
|
10
|
+
* Rule of thumb when editing: a statement belongs here only if it is true of
|
|
11
|
+
* *every* tool it appears to cover. A filter that exists on six endpoints and
|
|
12
|
+
* not on the other thirty-two is a per-tool fact — stating it here as universal
|
|
13
|
+
* makes the model emit calls that either get a Zod rejection or, worse, come
|
|
14
|
+
* back empty and read as a real answer.
|
|
15
|
+
*
|
|
16
|
+
* Budget: capped and tested in `src/tools/descriptions.test.ts`
|
|
17
|
+
* (`MAX_SERVER_INSTRUCTIONS_LENGTH`) — these instructions compete with the
|
|
18
|
+
* tool catalogue for the same context window.
|
|
19
|
+
*/
|
|
20
|
+
export const SERVER_INSTRUCTIONS = `Accès aux données ERP/CRM BoondManager (API JSON:API) : candidats, ressources (consultants), contacts, sociétés, opportunités, projets, CRA, factures, achats…
|
|
21
|
+
|
|
22
|
+
## Nommage des outils
|
|
23
|
+
|
|
24
|
+
\`boond_{domaine}_{opération}\` — opérations : \`search\`, \`get\`, \`create\`, \`update\`, \`delete\`. Les onglets d'une fiche sont des outils distincts : \`boond_{domaine}_{onglet}\` (ex. \`boond_resources_technical_data\`). Workflow habituel : un \`search\` pour obtenir l'id, puis \`get\` ou l'onglet voulu pour le détail.
|
|
25
|
+
|
|
26
|
+
## Les filtres sont propres à chaque endpoint
|
|
27
|
+
|
|
28
|
+
Le schéma de chaque outil est la référence : **ne pas transposer un filtre d'un endpoint à un autre**. Les schémas sont \`.strict()\`, donc un nom inconnu est rejeté par une erreur de validation — mais ce rejet a deux causes possibles : mauvais nom de filtre, **ou** filtre non supporté par cet endpoint. Dans le second cas, ne pas réessayer avec des variantes : reprendre la recherche avec les filtres que le schéma expose (souvent \`keywords\` seul), ou filtrer côté client après lecture.
|
|
29
|
+
|
|
30
|
+
## Périmètre (les 6 recherches principales + \`boond_reporting_*\`)
|
|
31
|
+
|
|
32
|
+
Sur \`resources\`, \`candidates\`, \`contacts\`, \`companies\`, \`opportunities\`, \`projects\` et le reporting — pas sur les domaines de référence/administration :
|
|
33
|
+
|
|
34
|
+
- « mes données / mon équipe / mon agence » → \`perimeterDynamic\` : \`["data"]\` (mes données), \`["managers"]\` (mon N-1), \`["agencies"]\`, \`["poles"]\`, \`["businessUnits"]\`
|
|
35
|
+
- « l'équipe de X » → \`perimeterManagers: [<id de X>]\`
|
|
36
|
+
- périmètre organisationnel explicite → \`perimeterAgencies\` / \`perimeterPoles\` / \`perimeterBusinessUnits\`, à combiner avec \`narrowPerimeter: true\` pour un ET logique
|
|
37
|
+
|
|
38
|
+
\`mainManagers\`, \`agencies\`, \`poles\`, \`businessUnits\` n'existent sur aucun endpoint.
|
|
39
|
+
|
|
40
|
+
## Cibler une entité liée
|
|
41
|
+
|
|
42
|
+
Vocabulaire des préfixes de \`keywords\` : \`CSOC<id>\` (société), \`CCON<id>\` (contact), \`CAND<id>\` (candidat), \`COMP<id>\` (ressource), \`AO<id>\` (opportunité), \`PRJ<id>\` (projet), \`MIS<id>\` (mission), \`PROD<id>\` (produit), \`CTR<id>\` (contrat) — ex. \`keywords: "CSOC42"\`.
|
|
43
|
+
|
|
44
|
+
**Chaque endpoint n'en accepte qu'un sous-ensemble, énuméré dans la description de l'outil.** \`keywords\` étant du texte libre, un préfixe non supporté n'est pas rejeté : il part en recherche plein texte et renvoie 0 résultat. Une page vide après un préfixe hors liste ne veut donc pas dire « aucune entité liée » — vérifier la description de l'outil avant de conclure.
|
|
45
|
+
|
|
46
|
+
\`keywordsType\` (recherches \`resources\`, \`candidates\`, \`contacts\`, \`companies\` uniquement) restreint \`keywords\` à un champ ; les valeurs admises diffèrent par endpoint (\`lastName\`/\`fullName\`/\`titleSkills\`… sur les personnes, \`name\`/\`phones\`/\`emails\` sur les sociétés) — lire l'énumération du schéma. Sans lui, la recherche porte sur le champ par défaut de l'endpoint (CV ou texte intégral).
|
|
47
|
+
|
|
48
|
+
## Économie de contexte
|
|
49
|
+
|
|
50
|
+
- \`pageSize\` : défaut 30, maximum 500. \`page\` est plafonné à 100 : au-delà, affiner les filtres plutôt que paginer.
|
|
51
|
+
- \`fields: ["title", "updateDate", …]\` remplace le résumé d'une ligne par les seuls attributs demandés — à utiliser dès qu'une page de résultats est large. Disponible sur les outils de recherche, sauf \`boond_timesheets_search\` et \`boond_reporting_*\`.
|
|
52
|
+
|
|
53
|
+
## États et types
|
|
54
|
+
|
|
55
|
+
Ces filtres attendent des identifiants **entiers** et leur nom est propre à l'endpoint : \`resourceStates\`, \`candidateStates\`, \`opportunityStates\`, \`projectStates\`, \`states\` + \`typesOf\` (contacts), \`states\` seul (sociétés — il n'y a pas de filtre de type sur \`/companies\`). Pour les traduire en libellés, lire les ressources \`boond://dictionary/*\` (states, typeOf, countries, currencies, languages) plutôt que d'appeler \`boond_application_dictionary\` : même contenu, sans consommer un appel d'outil.`;
|
|
56
|
+
//# sourceMappingURL=instructions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instructions.js","sourceRoot":"","sources":["../src/instructions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ugBAmCoe,CAAC"}
|
package/dist/schemas/index.d.ts
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
export declare const fieldsField: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2
3
|
export declare const SearchSchema: z.ZodObject<{
|
|
3
4
|
keywords: z.ZodOptional<z.ZodString>;
|
|
4
5
|
page: z.ZodDefault<z.ZodNumber>;
|
|
5
6
|
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
7
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
6
8
|
}, z.core.$strict>;
|
|
7
9
|
export declare const ResourceSearchSchema: z.ZodObject<{
|
|
8
10
|
keywords: z.ZodOptional<z.ZodString>;
|
|
9
11
|
keywordsType: z.ZodOptional<z.ZodEnum<{
|
|
12
|
+
reference: "reference";
|
|
10
13
|
firstName: "firstName";
|
|
11
14
|
lastName: "lastName";
|
|
12
15
|
title: "title";
|
|
@@ -16,7 +19,6 @@ export declare const ResourceSearchSchema: z.ZodObject<{
|
|
|
16
19
|
emails: "emails";
|
|
17
20
|
titleSkills: "titleSkills";
|
|
18
21
|
phones: "phones";
|
|
19
|
-
reference: "reference";
|
|
20
22
|
resume: "resume";
|
|
21
23
|
td: "td";
|
|
22
24
|
}>>;
|
|
@@ -69,6 +71,7 @@ export declare const ResourceSearchSchema: z.ZodObject<{
|
|
|
69
71
|
export declare const CandidateSearchSchema: z.ZodObject<{
|
|
70
72
|
keywords: z.ZodOptional<z.ZodString>;
|
|
71
73
|
keywordsType: z.ZodOptional<z.ZodEnum<{
|
|
74
|
+
reference: "reference";
|
|
72
75
|
firstName: "firstName";
|
|
73
76
|
lastName: "lastName";
|
|
74
77
|
title: "title";
|
|
@@ -78,7 +81,6 @@ export declare const CandidateSearchSchema: z.ZodObject<{
|
|
|
78
81
|
emails: "emails";
|
|
79
82
|
titleSkills: "titleSkills";
|
|
80
83
|
phones: "phones";
|
|
81
|
-
reference: "reference";
|
|
82
84
|
resume: "resume";
|
|
83
85
|
td: "td";
|
|
84
86
|
}>>;
|
|
@@ -516,6 +518,7 @@ export declare const ActionSearchSchema: z.ZodObject<{
|
|
|
516
518
|
companyId: z.ZodOptional<z.ZodString>;
|
|
517
519
|
page: z.ZodDefault<z.ZodNumber>;
|
|
518
520
|
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
521
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
519
522
|
}, z.core.$strict>;
|
|
520
523
|
export declare const ActionCreateSchema: z.ZodObject<{
|
|
521
524
|
typeOf: z.ZodUnion<readonly [z.ZodCoercedNumber<unknown>, z.ZodString]>;
|
|
@@ -607,6 +610,7 @@ export declare const InvoiceSearchSchema: z.ZodObject<{
|
|
|
607
610
|
period: z.ZodOptional<z.ZodString>;
|
|
608
611
|
page: z.ZodDefault<z.ZodNumber>;
|
|
609
612
|
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
613
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
610
614
|
}, z.core.$strict>;
|
|
611
615
|
export declare const OrderCreateSchema: z.ZodObject<{
|
|
612
616
|
reference: z.ZodOptional<z.ZodString>;
|
|
@@ -639,6 +643,7 @@ export declare const OrderSearchSchema: z.ZodObject<{
|
|
|
639
643
|
projectId: z.ZodOptional<z.ZodString>;
|
|
640
644
|
page: z.ZodDefault<z.ZodNumber>;
|
|
641
645
|
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
646
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
642
647
|
}, z.core.$strict>;
|
|
643
648
|
export declare const DeliverySearchSchema: z.ZodObject<{
|
|
644
649
|
keywords: z.ZodOptional<z.ZodString>;
|
|
@@ -648,6 +653,7 @@ export declare const DeliverySearchSchema: z.ZodObject<{
|
|
|
648
653
|
endDate: z.ZodOptional<z.ZodString>;
|
|
649
654
|
page: z.ZodDefault<z.ZodNumber>;
|
|
650
655
|
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
656
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
651
657
|
}, z.core.$strict>;
|
|
652
658
|
export declare const AbsenceCreateSchema: z.ZodObject<{
|
|
653
659
|
resourceId: z.ZodString;
|
|
@@ -674,6 +680,7 @@ export declare const AbsenceSearchSchema: z.ZodObject<{
|
|
|
674
680
|
endMonth: z.ZodOptional<z.ZodString>;
|
|
675
681
|
page: z.ZodDefault<z.ZodNumber>;
|
|
676
682
|
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
683
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
677
684
|
}, z.core.$strict>;
|
|
678
685
|
export declare const ExpenseCreateSchema: z.ZodObject<{
|
|
679
686
|
resourceId: z.ZodString;
|
|
@@ -703,6 +710,7 @@ export declare const ExpenseSearchSchema: z.ZodObject<{
|
|
|
703
710
|
endDate: z.ZodOptional<z.ZodString>;
|
|
704
711
|
page: z.ZodDefault<z.ZodNumber>;
|
|
705
712
|
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
713
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
706
714
|
}, z.core.$strict>;
|
|
707
715
|
export declare const ProductCreateSchema: z.ZodObject<{
|
|
708
716
|
name: z.ZodString;
|
|
@@ -741,6 +749,7 @@ export declare const PositioningSearchSchema: z.ZodObject<{
|
|
|
741
749
|
productId: z.ZodOptional<z.ZodString>;
|
|
742
750
|
page: z.ZodDefault<z.ZodNumber>;
|
|
743
751
|
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
752
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
744
753
|
}, z.core.$strict>;
|
|
745
754
|
export declare const PaymentSearchSchema: z.ZodObject<{
|
|
746
755
|
keywords: z.ZodOptional<z.ZodString>;
|
|
@@ -753,12 +762,14 @@ export declare const PaymentSearchSchema: z.ZodObject<{
|
|
|
753
762
|
endDate: z.ZodOptional<z.ZodString>;
|
|
754
763
|
page: z.ZodDefault<z.ZodNumber>;
|
|
755
764
|
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
765
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
756
766
|
}, z.core.$strict>;
|
|
757
767
|
export declare const AdvantageSearchSchema: z.ZodObject<{
|
|
758
768
|
keywords: z.ZodOptional<z.ZodString>;
|
|
759
769
|
resourceId: z.ZodOptional<z.ZodString>;
|
|
760
770
|
page: z.ZodDefault<z.ZodNumber>;
|
|
761
771
|
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
772
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
762
773
|
}, z.core.$strict>;
|
|
763
774
|
export declare const ValidationSearchSchema: z.ZodObject<{
|
|
764
775
|
startMonth: z.ZodString;
|
|
@@ -778,6 +789,7 @@ export declare const ValidationSearchSchema: z.ZodObject<{
|
|
|
778
789
|
validationAlerts: z.ZodOptional<z.ZodBoolean>;
|
|
779
790
|
page: z.ZodDefault<z.ZodNumber>;
|
|
780
791
|
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
792
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
781
793
|
}, z.core.$strict>;
|
|
782
794
|
export declare const NotificationSearchSchema: z.ZodObject<{
|
|
783
795
|
category: z.ZodEnum<{
|
|
@@ -792,6 +804,7 @@ export declare const NotificationSearchSchema: z.ZodObject<{
|
|
|
792
804
|
parentType: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
793
805
|
page: z.ZodDefault<z.ZodNumber>;
|
|
794
806
|
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
807
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
795
808
|
}, z.core.$strict>;
|
|
796
809
|
export declare const ReportingCompaniesSchema: z.ZodObject<{
|
|
797
810
|
startDate: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB,eAAO,MAAM,WAAW,wCAMrB,CAAC;AAGJ,eAAO,MAAM,YAAY;;;;;kBAmBd,CAAC;AAgFZ,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA4FtB,CAAC;AAIZ,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAwEvB,CAAC;AAIZ,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAmErB,CAAC;AAIZ,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAwCrB,CAAC;AAIZ,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAkDzB,CAAC;AAIZ,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAoCrB,CAAC;AAOZ,eAAO,MAAM,cAAc,aAA8E,CAAC;AAO1G,eAAO,MAAM,QAAQ;;kBAIV,CAAC;AAGZ,eAAO,MAAM,WAAW;;;kBAOb,CAAC;AASZ,eAAO,MAAM,UAAU,GAAI,QAAQ,MAAM,EAAE,iBAAiB,MAAM,gEAUW,CAAC;AAI9E,eAAO,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X_PAGE_SIZE, MAX_SEARCH_PAGE } from "../constants.js";
|
|
3
3
|
import { appendOverridesToDescription, resolveLabel } from "../config/dictionary-overrides.js";
|
|
4
|
+
// Client-side projection, shared by every search schema. Declared before
|
|
5
|
+
// `SearchSchema` because that schema embeds it (a `const` referenced during
|
|
6
|
+
// module init would otherwise hit the temporal dead zone).
|
|
7
|
+
//
|
|
8
|
+
// The description is deliberately terse: it is duplicated into ~32 tool
|
|
9
|
+
// schemas, so every character costs ~32 bytes of the `tools/list` payload.
|
|
10
|
+
export const fieldsField = z
|
|
11
|
+
.array(z.string())
|
|
12
|
+
.optional()
|
|
13
|
+
.describe("Projection : attributs à afficher par résultat (ex: ['title','updateDate']). " +
|
|
14
|
+
"Absent = résumé standard. Noms inconnus ignorés.");
|
|
4
15
|
// Common search schema
|
|
5
16
|
export const SearchSchema = z
|
|
6
17
|
.object({
|
|
@@ -19,6 +30,7 @@ export const SearchSchema = z
|
|
|
19
30
|
.max(MAX_PAGE_SIZE)
|
|
20
31
|
.default(DEFAULT_PAGE_SIZE)
|
|
21
32
|
.describe(`Nombre de résultats par page (max: ${MAX_PAGE_SIZE}, défaut: ${DEFAULT_PAGE_SIZE})`),
|
|
33
|
+
fields: fieldsField,
|
|
22
34
|
})
|
|
23
35
|
.strict();
|
|
24
36
|
// ---- Reusable filter field helpers ----
|
|
@@ -42,12 +54,6 @@ const pageSizeField = z
|
|
|
42
54
|
const sortField = z.string().optional().describe("Champ de tri (ex: lastName, firstName, updateDate)");
|
|
43
55
|
const orderField = z.enum(["asc", "desc"]).optional().describe("Ordre de tri (asc/desc)");
|
|
44
56
|
const intArray = (doc) => z.array(z.number().int()).optional().describe(doc);
|
|
45
|
-
const fieldsField = z
|
|
46
|
-
.array(z.string())
|
|
47
|
-
.optional()
|
|
48
|
-
.describe("Projection côté client : liste d'attributs JSON:API à afficher pour chaque résultat " +
|
|
49
|
-
"(ex: ['title', 'updateDate', 'numberOfActiveProjects']). Réduit fortement la taille de la réponse. " +
|
|
50
|
-
"Absent = résumé standard (nom, email, ville, statut...). Les noms inconnus sont ignorés.");
|
|
51
57
|
const strArray = (doc) => z.array(z.string()).optional().describe(doc);
|
|
52
58
|
// Shared `tools` (technologies/skills) filter. Centralised so every entity
|
|
53
59
|
// search exposes the same `#AND#` semantics to the model — previously the
|
|
@@ -775,6 +781,7 @@ export const ActionSearchSchema = z
|
|
|
775
781
|
companyId: z.string().optional().describe("Filtrer par ID société"),
|
|
776
782
|
page: z.number().int().min(1).max(MAX_SEARCH_PAGE).default(1).describe(`Numéro de page (max: ${MAX_SEARCH_PAGE})`),
|
|
777
783
|
pageSize: z.number().int().min(1).max(MAX_PAGE_SIZE).default(DEFAULT_PAGE_SIZE).describe("Résultats par page"),
|
|
784
|
+
fields: fieldsField,
|
|
778
785
|
})
|
|
779
786
|
.strict();
|
|
780
787
|
// POST /actions requires a polymorphic `dependsOn` relationship (the entity the
|
|
@@ -935,6 +942,7 @@ export const InvoiceSearchSchema = z
|
|
|
935
942
|
.describe("Type de période (created, updated, expectedPayment, performedPayment, period)"),
|
|
936
943
|
page: z.number().int().min(1).max(MAX_SEARCH_PAGE).default(1).describe(`Numéro de page (max: ${MAX_SEARCH_PAGE})`),
|
|
937
944
|
pageSize: z.number().int().min(1).max(MAX_PAGE_SIZE).default(DEFAULT_PAGE_SIZE).describe("Résultats par page"),
|
|
945
|
+
fields: fieldsField,
|
|
938
946
|
})
|
|
939
947
|
.strict();
|
|
940
948
|
// ---- Order schemas (Bons de commande) ----
|
|
@@ -974,6 +982,7 @@ export const OrderSearchSchema = z
|
|
|
974
982
|
projectId: z.string().optional().describe("Filtrer par ID projet"),
|
|
975
983
|
page: z.number().int().min(1).max(MAX_SEARCH_PAGE).default(1).describe(`Numéro de page (max: ${MAX_SEARCH_PAGE})`),
|
|
976
984
|
pageSize: z.number().int().min(1).max(MAX_PAGE_SIZE).default(DEFAULT_PAGE_SIZE).describe("Résultats par page"),
|
|
985
|
+
fields: fieldsField,
|
|
977
986
|
})
|
|
978
987
|
.strict();
|
|
979
988
|
// ---- Delivery schemas (Livraisons / CRA) ----
|
|
@@ -986,6 +995,7 @@ export const DeliverySearchSchema = z
|
|
|
986
995
|
endDate: z.string().optional().describe("Date de fin (YYYY-MM-DD)"),
|
|
987
996
|
page: z.number().int().min(1).max(MAX_SEARCH_PAGE).default(1).describe(`Numéro de page (max: ${MAX_SEARCH_PAGE})`),
|
|
988
997
|
pageSize: z.number().int().min(1).max(MAX_PAGE_SIZE).default(DEFAULT_PAGE_SIZE).describe("Résultats par page"),
|
|
998
|
+
fields: fieldsField,
|
|
989
999
|
})
|
|
990
1000
|
.strict();
|
|
991
1001
|
// ---- Absence schemas ----
|
|
@@ -1019,6 +1029,7 @@ export const AbsenceSearchSchema = z
|
|
|
1019
1029
|
endMonth: z.string().optional().describe("Mois de fin de période (YYYY-MM)"),
|
|
1020
1030
|
page: z.number().int().min(1).max(MAX_SEARCH_PAGE).default(1).describe(`Numéro de page (max: ${MAX_SEARCH_PAGE})`),
|
|
1021
1031
|
pageSize: z.number().int().min(1).max(MAX_PAGE_SIZE).default(DEFAULT_PAGE_SIZE).describe("Résultats par page"),
|
|
1032
|
+
fields: fieldsField,
|
|
1022
1033
|
})
|
|
1023
1034
|
.strict();
|
|
1024
1035
|
// ---- Expense schemas (Notes de frais) ----
|
|
@@ -1055,6 +1066,7 @@ export const ExpenseSearchSchema = z
|
|
|
1055
1066
|
endDate: z.string().optional().describe("Date de fin (YYYY-MM-DD)"),
|
|
1056
1067
|
page: z.number().int().min(1).max(MAX_SEARCH_PAGE).default(1).describe(`Numéro de page (max: ${MAX_SEARCH_PAGE})`),
|
|
1057
1068
|
pageSize: z.number().int().min(1).max(MAX_PAGE_SIZE).default(DEFAULT_PAGE_SIZE).describe("Résultats par page"),
|
|
1069
|
+
fields: fieldsField,
|
|
1058
1070
|
})
|
|
1059
1071
|
.strict();
|
|
1060
1072
|
// ---- Product schemas ----
|
|
@@ -1124,6 +1136,7 @@ export const PositioningSearchSchema = z
|
|
|
1124
1136
|
.describe("Filtrer par ID produit (envoyé à l'API comme référence keywords PROD<id>)"),
|
|
1125
1137
|
page: z.number().int().min(1).max(MAX_SEARCH_PAGE).default(1).describe(`Numéro de page (max: ${MAX_SEARCH_PAGE})`),
|
|
1126
1138
|
pageSize: z.number().int().min(1).max(MAX_PAGE_SIZE).default(DEFAULT_PAGE_SIZE).describe("Résultats par page"),
|
|
1139
|
+
fields: fieldsField,
|
|
1127
1140
|
})
|
|
1128
1141
|
.strict();
|
|
1129
1142
|
// ---- Payment schemas ----
|
|
@@ -1139,6 +1152,7 @@ export const PaymentSearchSchema = z
|
|
|
1139
1152
|
endDate: z.string().optional().describe("Date de fin (YYYY-MM-DD)"),
|
|
1140
1153
|
page: z.number().int().min(1).max(MAX_SEARCH_PAGE).default(1).describe(`Numéro de page (max: ${MAX_SEARCH_PAGE})`),
|
|
1141
1154
|
pageSize: z.number().int().min(1).max(MAX_PAGE_SIZE).default(DEFAULT_PAGE_SIZE).describe("Résultats par page"),
|
|
1155
|
+
fields: fieldsField,
|
|
1142
1156
|
})
|
|
1143
1157
|
.strict();
|
|
1144
1158
|
// ---- Advantage schemas ----
|
|
@@ -1148,6 +1162,7 @@ export const AdvantageSearchSchema = z
|
|
|
1148
1162
|
resourceId: z.string().optional().describe("Filtrer par ID ressource"),
|
|
1149
1163
|
page: z.number().int().min(1).max(MAX_SEARCH_PAGE).default(1).describe(`Numéro de page (max: ${MAX_SEARCH_PAGE})`),
|
|
1150
1164
|
pageSize: z.number().int().min(1).max(MAX_PAGE_SIZE).default(DEFAULT_PAGE_SIZE).describe("Résultats par page"),
|
|
1165
|
+
fields: fieldsField,
|
|
1151
1166
|
})
|
|
1152
1167
|
.strict();
|
|
1153
1168
|
// ---- Application schemas ----
|
|
@@ -1189,6 +1204,7 @@ export const ValidationSearchSchema = z
|
|
|
1189
1204
|
.max(MAX_PAGE_SIZE)
|
|
1190
1205
|
.default(DEFAULT_PAGE_SIZE)
|
|
1191
1206
|
.describe(`Nombre de résultats par page (max: ${MAX_PAGE_SIZE}, défaut: ${DEFAULT_PAGE_SIZE})`),
|
|
1207
|
+
fields: fieldsField,
|
|
1192
1208
|
})
|
|
1193
1209
|
.strict();
|
|
1194
1210
|
// ---- Notification schemas ----
|
|
@@ -1213,6 +1229,7 @@ export const NotificationSearchSchema = z
|
|
|
1213
1229
|
.max(MAX_PAGE_SIZE)
|
|
1214
1230
|
.default(DEFAULT_PAGE_SIZE)
|
|
1215
1231
|
.describe(`Nombre de résultats par page (max: ${MAX_PAGE_SIZE}, défaut: ${DEFAULT_PAGE_SIZE})`),
|
|
1232
|
+
fields: fieldsField,
|
|
1216
1233
|
})
|
|
1217
1234
|
.strict();
|
|
1218
1235
|
// ---- Reporting schemas ----
|