@servicialo/mcp-server 0.3.0 → 0.4.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.
Files changed (49) hide show
  1. package/README.md +104 -48
  2. package/dist/index.js +12 -14
  3. package/dist/index.js.map +1 -1
  4. package/dist/tools/authenticated/{clients.d.ts → cerrar.d.ts} +75 -83
  5. package/dist/tools/authenticated/cerrar.d.ts.map +1 -0
  6. package/dist/tools/authenticated/cerrar.js +73 -0
  7. package/dist/tools/authenticated/cerrar.js.map +1 -0
  8. package/dist/tools/authenticated/comprometer.d.ts +204 -0
  9. package/dist/tools/authenticated/comprometer.d.ts.map +1 -0
  10. package/dist/tools/authenticated/comprometer.js +55 -0
  11. package/dist/tools/authenticated/comprometer.js.map +1 -0
  12. package/dist/tools/authenticated/delivery.d.ts +234 -0
  13. package/dist/tools/authenticated/delivery.d.ts.map +1 -0
  14. package/dist/tools/authenticated/delivery.js +53 -0
  15. package/dist/tools/authenticated/delivery.js.map +1 -0
  16. package/dist/tools/authenticated/{notifications.d.ts → entender.d.ts} +16 -12
  17. package/dist/tools/authenticated/entender.d.ts.map +1 -0
  18. package/dist/tools/authenticated/entender.js +25 -0
  19. package/dist/tools/authenticated/entender.js.map +1 -0
  20. package/dist/tools/authenticated/{scheduling.d.ts → lifecycle.d.ts} +25 -77
  21. package/dist/tools/authenticated/lifecycle.d.ts.map +1 -0
  22. package/dist/tools/authenticated/lifecycle.js +63 -0
  23. package/dist/tools/authenticated/lifecycle.js.map +1 -0
  24. package/dist/tools/schemas.d.ts +40 -0
  25. package/dist/tools/schemas.d.ts.map +1 -0
  26. package/dist/tools/schemas.js +14 -0
  27. package/dist/tools/schemas.js.map +1 -0
  28. package/package.json +2 -2
  29. package/dist/tools/authenticated/clients.d.ts.map +0 -1
  30. package/dist/tools/authenticated/clients.js +0 -64
  31. package/dist/tools/authenticated/clients.js.map +0 -1
  32. package/dist/tools/authenticated/notifications.d.ts.map +0 -1
  33. package/dist/tools/authenticated/notifications.js +0 -22
  34. package/dist/tools/authenticated/notifications.js.map +0 -1
  35. package/dist/tools/authenticated/payments.d.ts +0 -105
  36. package/dist/tools/authenticated/payments.d.ts.map +0 -1
  37. package/dist/tools/authenticated/payments.js +0 -70
  38. package/dist/tools/authenticated/payments.js.map +0 -1
  39. package/dist/tools/authenticated/payroll.d.ts +0 -106
  40. package/dist/tools/authenticated/payroll.d.ts.map +0 -1
  41. package/dist/tools/authenticated/payroll.js +0 -77
  42. package/dist/tools/authenticated/payroll.js.map +0 -1
  43. package/dist/tools/authenticated/providers.d.ts +0 -52
  44. package/dist/tools/authenticated/providers.d.ts.map +0 -1
  45. package/dist/tools/authenticated/providers.js +0 -37
  46. package/dist/tools/authenticated/providers.js.map +0 -1
  47. package/dist/tools/authenticated/scheduling.d.ts.map +0 -1
  48. package/dist/tools/authenticated/scheduling.js +0 -82
  49. package/dist/tools/authenticated/scheduling.js.map +0 -1
package/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  MCP server for the [Servicialo](https://servicialo.com) protocol. Connects AI agents to professional services via any Servicialo-compatible platform.
4
4
 
5
+ 20 tools organized by the 6 lifecycle phases of a service — not by database table.
6
+
5
7
  ## Two Modes of Operation
6
8
 
7
9
  ### Discovery Mode (no configuration)
@@ -10,9 +12,7 @@ MCP server for the [Servicialo](https://servicialo.com) protocol. Connects AI ag
10
12
  npx -y @servicialo/mcp-server
11
13
  ```
12
14
 
13
- No credentials needed. The server exposes 4 public tools for discovering organizations, services, and availability across any Servicialo-compatible platform.
14
-
15
- Useful for: agents that help users find and evaluate professional services.
15
+ No credentials needed. 4 public tools for discovering organizations, services, and availability.
16
16
 
17
17
  ### Authenticated Mode
18
18
 
@@ -20,9 +20,7 @@ Useful for: agents that help users find and evaluate professional services.
20
20
  SERVICIALO_API_KEY=your_key SERVICIALO_ORG_ID=your_org npx -y @servicialo/mcp-server
21
21
  ```
22
22
 
23
- Requires `SERVICIALO_API_KEY` and `SERVICIALO_ORG_ID` obtained from the Servicialo-compatible platform your organization uses (e.g., [Coordinalo](https://coordinalo.com)).
24
-
25
- Enables: scheduling, client management, payments, providers, payroll, and notifications — all 23 tools.
23
+ Requires `SERVICIALO_API_KEY` and `SERVICIALO_ORG_ID`. Enables all 20 tools across the full service lifecycle.
26
24
 
27
25
  ### Claude Desktop Configuration
28
26
 
@@ -49,78 +47,136 @@ Omit the `env` block entirely for discovery-only mode.
49
47
  |---|---|---|
50
48
  | `SERVICIALO_API_KEY` | No | Bearer token — enables authenticated mode |
51
49
  | `SERVICIALO_ORG_ID` | No | Organization slug — enables authenticated mode |
52
- | `SERVICIALO_BASE_URL` | No | API base URL (default: `https://coordinalo.com`) |
50
+ | `SERVICIALO_BASE_URL` | No | API base URL of the Servicialo-compatible platform |
53
51
 
54
- ## Public Tools (4) Always Available
52
+ ## Agent Flow (6 Lifecycle Phases)
55
53
 
56
- | Tool | Description |
57
- |---|---|
58
- | `registry.search` | Search Servicialo-compatible organizations by vertical and location |
59
- | `registry.get_organization` | Get public details of an organization (services, providers, booking) |
60
- | `scheduling.check_availability` | Check available slots without authentication |
61
- | `services.list` | List the public service catalog of an organization |
54
+ ```
55
+ 1. DESCUBRIR → registry.*, check_availability, services.list
56
+ 2. ENTENDER → service.get, contract.get
57
+ 3. COMPROMETER → clients.get_or_create, scheduling.book, scheduling.confirm
58
+ 4. GESTIONAR → lifecycle.get_state, lifecycle.transition, reschedule, cancel
59
+ 5. VERIFICAR → delivery.checkin, delivery.checkout, delivery.record_evidence
60
+ 6. CERRAR → documentation.create, payments.create_sale, record_payment, get_status
61
+ ```
62
62
 
63
- ## Authenticated Tools (19) Require Credentials
63
+ A well-designed agent follows this order. Each phase has its tools. The standard guarantees any agent can complete the full cycle with any compatible implementation.
64
64
 
65
- ### Scheduling (4)
65
+ ## Phase 1 — Descubrimiento (4 public tools)
66
66
 
67
67
  | Tool | Description |
68
68
  |---|---|
69
- | `scheduling.list_sessions` | List sessions filtered by date, provider, client, or status |
70
- | `scheduling.book` | Book a new session for a client with a provider |
71
- | `scheduling.reschedule` | Reschedule an existing session to a new datetime |
72
- | `scheduling.cancel` | Cancel a session |
69
+ | `registry.search` | Search organizations by vertical and location |
70
+ | `registry.get_organization` | Get public details of an organization |
71
+ | `scheduling.check_availability` | Check available slots without authentication |
72
+ | `services.list` | List the public service catalog |
73
73
 
74
- ### Clients (4)
74
+ ## Phase 2 — Entender (2 tools)
75
75
 
76
76
  | Tool | Description |
77
77
  |---|---|
78
- | `clients.list` | List clients with search and pagination |
79
- | `clients.get` | Get client details including history and pending payments |
80
- | `clients.create` | Create a new client |
81
- | `clients.history` | Get client activity history: past sessions, payments |
78
+ | `service.get` | Get the 9 dimensions of a service: what, who delivers, who receives, who requests, who pays, when, where, evidence, outcome |
79
+ | `contract.get` | Get the pre-agreed service contract: required evidence, cancellation policy, no-show policy, dispute terms |
82
80
 
83
- ### Payments (4)
81
+ ## Phase 3 — Comprometer (3 tools)
84
82
 
85
83
  | Tool | Description |
86
84
  |---|---|
87
- | `payments.list_sales` | List sales filtered by client, provider, service, or status |
88
- | `payments.create_sale` | Create a sale/charge for a client |
89
- | `payments.record_payment` | Record a payment received against a sale |
90
- | `payments.client_balance` | Get client account balance and session availability |
85
+ | `clients.get_or_create` | Find a client by email/phone or create if new. Single call to resolve client identity before booking |
86
+ | `scheduling.book` | Book a new session state "Solicitado". Requires contract.get first |
87
+ | `scheduling.confirm` | Confirm a booked session state "Confirmado" |
91
88
 
92
- ### Providers (3)
89
+ ## Phase 4 — Ciclo de Vida (4 tools)
93
90
 
94
91
  | Tool | Description |
95
92
  |---|---|
96
- | `providers.list` | List organization providers/professionals |
97
- | `providers.get` | Get provider details including services and commissions |
98
- | `providers.get_commission` | Get provider commission configuration |
93
+ | `lifecycle.get_state` | Get current lifecycle state, available transitions, and transition history |
94
+ | `lifecycle.transition` | Execute a state transition with evidence. Valid: requested→matched, matched→scheduled, scheduled→confirmed, confirmed→in_progress, in_progress→completed, completed→documented, documented→billed, billed→closed, any→cancelled |
95
+ | `scheduling.reschedule` | Exception flow: reschedule to new datetime. Contract rescheduling policy may apply |
96
+ | `scheduling.cancel` | Exception flow: cancel with contract cancellation policy applied |
99
97
 
100
- ### Payroll (5)
98
+ ## Phase 5 — Verificar Entrega (3 tools)
101
99
 
102
100
  | Tool | Description |
103
101
  |---|---|
104
- | `payroll.calculate` | Calculate salary settlement for a provider in a period |
105
- | `payroll.history` | Query payroll settlement history |
106
- | `payroll.settlement_detail` | Get monthly settlement breakdown (earnings and deductions) |
107
- | `payroll.vacations` | Query vacation requests |
108
- | `payroll.request_vacation` | Create a vacation request for a provider |
102
+ | `delivery.checkin` | Provider/client check-in with GPS + timestamp state "En Curso" |
103
+ | `delivery.checkout` | Check-out with GPS + timestamp → state "Completado". Duration auto-calculated |
104
+ | `delivery.record_evidence` | Record delivery evidence per vertical: GPS, signature, photo, document, duration, notes |
109
105
 
110
- ### Notifications (2)
106
+ ## Phase 6 — Cerrar (4 tools)
111
107
 
112
108
  | Tool | Description |
113
109
  |---|---|
114
- | `notifications.send_session_reminder` | Send a reminder notification for a session |
115
- | `notifications.send_payment_reminder` | Send a payment reminder for a pending sale |
110
+ | `documentation.create` | Generate service record (clinical note, inspection report, class minutes, etc.) → state "Documentado" |
111
+ | `payments.create_sale` | Create a sale/charge for the documented service → state "Facturado" |
112
+ | `payments.record_payment` | Record payment received. When fully paid → state "Cerrado" |
113
+ | `payments.get_status` | Get payment status for a sale or client account balance |
114
+
115
+ ## End-to-End Example
116
+
117
+ ```
118
+ registry.search({ vertical: "kinesiologia", location: "santiago" })
119
+ → find org "clinica-kinesia"
120
+
121
+ registry.get_organization({ org_slug: "clinica-kinesia" })
122
+ → list services, providers
116
123
 
117
- ## API Modules
124
+ scheduling.check_availability({ org_slug: "clinica-kinesia", date_from: "2026-03-01", date_to: "2026-03-07" })
125
+ → available slots
118
126
 
119
- The server connects to three platform modules:
127
+ service.get({ service_id: "srv_123" })
128
+ → 9 dimensions: duration 45min, location presencial, etc.
120
129
 
121
- - **Coordinalo** Scheduling and session management
122
- - **Relacionalo** Client CRM and relationship management
123
- - **Planificalo** Finance, payments, payroll, and provider management
130
+ contract.get({ service_id: "srv_123", org_id: "org_456" })
131
+ evidence: check_in + check_out + clinical_record
132
+ cancellation: 0% if >24h, 50% if 2-24h, 100% if <2h
133
+ → dispute window: 48 hours
134
+
135
+ clients.get_or_create({ email: "paciente@mail.com", name: "María", last_name: "López", actor: { type: "agent", id: "agent_1" } })
136
+ → client_id: "cli_789"
137
+
138
+ scheduling.book({ service_id: "srv_123", provider_id: "prov_111", client_id: "cli_789", starts_at: "2026-03-03T10:00:00", actor: { type: "agent", id: "agent_1" } })
139
+ → session_id: "ses_001", state: "requested"
140
+
141
+ scheduling.confirm({ session_id: "ses_001", actor: { type: "client", id: "cli_789" } })
142
+ → state: "confirmed"
143
+
144
+ delivery.checkin({ session_id: "ses_001", actor: { type: "provider", id: "prov_111" }, location: { lat: -33.45, lng: -70.66 } })
145
+ → state: "in_progress"
146
+
147
+ delivery.checkout({ session_id: "ses_001", actor: { type: "provider", id: "prov_111" }, location: { lat: -33.45, lng: -70.66 } })
148
+ → state: "completed", duration: 42min
149
+
150
+ delivery.record_evidence({ session_id: "ses_001", evidence_type: "document", data: { type: "clinical_record", signed_by: ["prov_111", "cli_789"] }, actor: { type: "provider", id: "prov_111" } })
151
+ → evidence recorded
152
+
153
+ documentation.create({ session_id: "ses_001", content: "Sesión de rehabilitación...", actor: { type: "provider", id: "prov_111" } })
154
+ → state: "documented"
155
+
156
+ payments.create_sale({ client_id: "cli_789", service_id: "srv_123", provider_id: "prov_111", unit_price: 35000 })
157
+ → sale_id: "sale_001", state: "billed"
158
+
159
+ payments.record_payment({ venta_id: "sale_001", amount: 35000, method: "transferencia" })
160
+ → state: "closed"
161
+ ```
162
+
163
+ ## Migration from v0.3
164
+
165
+ | Removed Tool | Replacement |
166
+ |---|---|
167
+ | `scheduling.list_sessions` | `lifecycle.get_state` |
168
+ | `clients.list` | `clients.get_or_create` |
169
+ | `clients.get` | `clients.get_or_create` |
170
+ | `clients.create` | `clients.get_or_create` |
171
+ | `clients.history` | `lifecycle.get_state` |
172
+ | `payments.list_sales` | `payments.get_status` |
173
+ | `payments.client_balance` | `payments.get_status` |
174
+ | `notifications.send_session_reminder` | `lifecycle.transition` |
175
+ | `notifications.send_payment_reminder` | `lifecycle.transition` |
176
+ | `providers.list` | Removed (not part of service lifecycle) |
177
+ | `providers.get` | Removed (not part of service lifecycle) |
178
+ | `providers.get_commission` | Removed (not part of service lifecycle) |
179
+ | `payroll.*` (5 tools) | Removed (not part of service lifecycle) |
124
180
 
125
181
  ## Development
126
182
 
package/dist/index.js CHANGED
@@ -7,13 +7,12 @@ import { detectMode } from './mode.js';
7
7
  import { registryTools } from './tools/public/registry.js';
8
8
  import { publicAvailabilityTools } from './tools/public/availability.js';
9
9
  import { publicServicesTools } from './tools/public/services.js';
10
- // --- Authenticated tools ---
11
- import { schedulingTools } from './tools/authenticated/scheduling.js';
12
- import { clientsTools } from './tools/authenticated/clients.js';
13
- import { paymentsTools } from './tools/authenticated/payments.js';
14
- import { notificationsTools } from './tools/authenticated/notifications.js';
15
- import { providersTools } from './tools/authenticated/providers.js';
16
- import { payrollTools } from './tools/authenticated/payroll.js';
10
+ // --- Authenticated tools (Phases 2–6) ---
11
+ import { entenderTools } from './tools/authenticated/entender.js';
12
+ import { comprometerTools } from './tools/authenticated/comprometer.js';
13
+ import { lifecycleTools } from './tools/authenticated/lifecycle.js';
14
+ import { deliveryTools } from './tools/authenticated/delivery.js';
15
+ import { cerrarTools } from './tools/authenticated/cerrar.js';
17
16
  // --- Detect mode ---
18
17
  const mode = detectMode();
19
18
  const BASE_URL = process.env.SERVICIALO_BASE_URL || 'https://coordinalo.com';
@@ -32,7 +31,7 @@ const apiClient = new CoordinaloClient({
32
31
  // --- Init MCP server ---
33
32
  const server = new McpServer({
34
33
  name: 'servicialo',
35
- version: '0.3.0',
34
+ version: '0.4.0',
36
35
  });
37
36
  // --- Public tools (always registered) ---
38
37
  const publicTools = {
@@ -42,12 +41,11 @@ const publicTools = {
42
41
  };
43
42
  // --- Authenticated tools (only in authenticated mode) ---
44
43
  const authenticatedTools = {
45
- ...schedulingTools,
46
- ...clientsTools,
47
- ...paymentsTools,
48
- ...notificationsTools,
49
- ...providersTools,
50
- ...payrollTools,
44
+ ...entenderTools,
45
+ ...comprometerTools,
46
+ ...lifecycleTools,
47
+ ...deliveryTools,
48
+ ...cerrarTools,
51
49
  };
52
50
  // --- Register tools ---
53
51
  function registerTools(tools) {
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAGvC,uBAAuB;AACvB,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEjE,8BAA8B;AAC9B,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAEhE,sBAAsB;AACtB,MAAM,IAAI,GAAG,UAAU,EAAE,CAAC;AAC1B,MAAM,QAAQ,GAAG,OAAO,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K,CAAC,CAAC;IACrC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -1,75 +1,13 @@
1
1
  import { z } from 'zod';
2
2
  import type { CoordinaloClient } from '../../client.js';
3
- declare const ActorSchema: z.ZodObject<{
4
- type: z.ZodEnum<["client", "provider", "organization", "agent"]>;
5
- id: z.ZodString;
6
- on_behalf_of: z.ZodOptional<z.ZodObject<{
7
- type: z.ZodString;
8
- id: z.ZodString;
9
- }, "strip", z.ZodTypeAny, {
10
- type: string;
11
- id: string;
12
- }, {
13
- type: string;
14
- id: string;
15
- }>>;
16
- }, "strip", z.ZodTypeAny, {
17
- type: "client" | "provider" | "organization" | "agent";
18
- id: string;
19
- on_behalf_of?: {
20
- type: string;
21
- id: string;
22
- } | undefined;
23
- }, {
24
- type: "client" | "provider" | "organization" | "agent";
25
- id: string;
26
- on_behalf_of?: {
27
- type: string;
28
- id: string;
29
- } | undefined;
30
- }>;
31
- export declare const clientsTools: {
32
- 'clients.list': {
3
+ import { ActorSchema } from '../schemas.js';
4
+ export declare const cerrarTools: {
5
+ 'documentation.create': {
33
6
  description: string;
34
7
  schema: z.ZodObject<{
35
- search: z.ZodOptional<z.ZodString>;
36
- limit: z.ZodDefault<z.ZodNumber>;
37
- page: z.ZodDefault<z.ZodNumber>;
38
- }, "strip", z.ZodTypeAny, {
39
- limit: number;
40
- page: number;
41
- search?: string | undefined;
42
- }, {
43
- limit?: number | undefined;
44
- page?: number | undefined;
45
- search?: string | undefined;
46
- }>;
47
- handler: (client: CoordinaloClient, args: {
48
- search?: string;
49
- limit?: number;
50
- page?: number;
51
- }) => Promise<unknown>;
52
- };
53
- 'clients.get': {
54
- description: string;
55
- schema: z.ZodObject<{
56
- client_id: z.ZodString;
57
- }, "strip", z.ZodTypeAny, {
58
- client_id: string;
59
- }, {
60
- client_id: string;
61
- }>;
62
- handler: (client: CoordinaloClient, args: {
63
- client_id: string;
64
- }) => Promise<unknown>;
65
- };
66
- 'clients.create': {
67
- description: string;
68
- schema: z.ZodObject<{
69
- name: z.ZodString;
70
- last_name: z.ZodString;
71
- email: z.ZodOptional<z.ZodString>;
72
- phone: z.ZodOptional<z.ZodString>;
8
+ session_id: z.ZodString;
9
+ content: z.ZodString;
10
+ template_id: z.ZodOptional<z.ZodString>;
73
11
  actor: z.ZodObject<{
74
12
  type: z.ZodEnum<["client", "provider", "organization", "agent"]>;
75
13
  id: z.ZodString;
@@ -107,10 +45,9 @@ export declare const clientsTools: {
107
45
  id: string;
108
46
  } | undefined;
109
47
  };
110
- name: string;
111
- last_name: string;
112
- email?: string | undefined;
113
- phone?: string | undefined;
48
+ session_id: string;
49
+ content: string;
50
+ template_id?: string | undefined;
114
51
  }, {
115
52
  actor: {
116
53
  type: "client" | "provider" | "organization" | "agent";
@@ -120,32 +57,87 @@ export declare const clientsTools: {
120
57
  id: string;
121
58
  } | undefined;
122
59
  };
123
- name: string;
124
- last_name: string;
125
- email?: string | undefined;
126
- phone?: string | undefined;
60
+ session_id: string;
61
+ content: string;
62
+ template_id?: string | undefined;
127
63
  }>;
128
64
  handler: (client: CoordinaloClient, args: {
129
- name: string;
130
- last_name: string;
131
- email?: string;
132
- phone?: string;
65
+ session_id: string;
66
+ content: string;
67
+ template_id?: string;
133
68
  actor: z.infer<typeof ActorSchema>;
134
69
  }) => Promise<unknown>;
135
70
  };
136
- 'clients.history': {
71
+ 'payments.create_sale': {
137
72
  description: string;
138
73
  schema: z.ZodObject<{
139
74
  client_id: z.ZodString;
75
+ service_id: z.ZodString;
76
+ provider_id: z.ZodString;
77
+ quantity: z.ZodDefault<z.ZodNumber>;
78
+ unit_price: z.ZodNumber;
140
79
  }, "strip", z.ZodTypeAny, {
80
+ service_id: string;
81
+ provider_id: string;
141
82
  client_id: string;
83
+ quantity: number;
84
+ unit_price: number;
142
85
  }, {
86
+ service_id: string;
87
+ provider_id: string;
143
88
  client_id: string;
89
+ unit_price: number;
90
+ quantity?: number | undefined;
144
91
  }>;
145
92
  handler: (client: CoordinaloClient, args: {
146
93
  client_id: string;
94
+ service_id: string;
95
+ provider_id: string;
96
+ quantity?: number;
97
+ unit_price: number;
98
+ }) => Promise<unknown>;
99
+ };
100
+ 'payments.record_payment': {
101
+ description: string;
102
+ schema: z.ZodObject<{
103
+ venta_id: z.ZodString;
104
+ amount: z.ZodNumber;
105
+ method: z.ZodEnum<["efectivo", "transferencia", "mercadopago", "tarjeta"]>;
106
+ reference: z.ZodOptional<z.ZodString>;
107
+ }, "strip", z.ZodTypeAny, {
108
+ method: "efectivo" | "transferencia" | "mercadopago" | "tarjeta";
109
+ venta_id: string;
110
+ amount: number;
111
+ reference?: string | undefined;
112
+ }, {
113
+ method: "efectivo" | "transferencia" | "mercadopago" | "tarjeta";
114
+ venta_id: string;
115
+ amount: number;
116
+ reference?: string | undefined;
117
+ }>;
118
+ handler: (client: CoordinaloClient, args: {
119
+ venta_id: string;
120
+ amount: number;
121
+ method: string;
122
+ reference?: string;
123
+ }) => Promise<unknown>;
124
+ };
125
+ 'payments.get_status': {
126
+ description: string;
127
+ schema: z.ZodObject<{
128
+ sale_id: z.ZodOptional<z.ZodString>;
129
+ client_id: z.ZodOptional<z.ZodString>;
130
+ }, "strip", z.ZodTypeAny, {
131
+ client_id?: string | undefined;
132
+ sale_id?: string | undefined;
133
+ }, {
134
+ client_id?: string | undefined;
135
+ sale_id?: string | undefined;
136
+ }>;
137
+ handler: (client: CoordinaloClient, args: {
138
+ sale_id?: string;
139
+ client_id?: string;
147
140
  }) => Promise<unknown>;
148
141
  };
149
142
  };
150
- export {};
151
- //# sourceMappingURL=clients.d.ts.map
143
+ //# sourceMappingURL=cerrar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cerrar.d.ts","sourceRoot":"","sources":["../../../src/tools/authenticated/cerrar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAUI,gBAAgB,QAAQ;YAAE,UAAU,EAAE,MAAM,CAAC;YAAC,OAAO,EAAE,MAAM,CAAC;YAAC,WAAW,CAAC,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAA;SAAE;;;;;;;;;;;;;;;;;;;;;;;0BAmBzH,gBAAgB,QAAQ;YAAE,SAAS,EAAE,MAAM,CAAC;YAAC,UAAU,EAAE,MAAM,CAAC;YAAC,WAAW,EAAE,MAAM,CAAC;YAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;YAAC,UAAU,EAAE,MAAM,CAAA;SAAE;;;;;;;;;;;;;;;;;;;;0BAoB7H,gBAAgB,QAAQ;YAAE,QAAQ,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,MAAM,CAAC;YAAC,SAAS,CAAC,EAAE,MAAM,CAAA;SAAE;;;;;;;;;;;;;;0BAiBhG,gBAAgB,QAAQ;YAAE,OAAO,CAAC,EAAE,MAAM,CAAC;YAAC,SAAS,CAAC,EAAE,MAAM,CAAA;SAAE;;CAU3F,CAAC"}
@@ -0,0 +1,73 @@
1
+ import { z } from 'zod';
2
+ import { ActorSchema } from '../schemas.js';
3
+ export const cerrarTools = {
4
+ 'documentation.create': {
5
+ description: '[Fase 6 — Cerrar] Genera el registro/documentación del servicio entregado (nota clínica, reporte de inspección, acta de clase, etc.). Mueve la sesión a "Documentado".',
6
+ schema: z.object({
7
+ session_id: z.string().describe('ID de la sesión'),
8
+ content: z.string().describe('Contenido del registro/documentación'),
9
+ template_id: z.string().optional().describe('ID de plantilla de documentación (si aplica)'),
10
+ actor: ActorSchema.describe('Quién genera la documentación (típicamente el proveedor)'),
11
+ }),
12
+ handler: async (client, args) => {
13
+ return client.post(`/coordinalo/sessions/${args.session_id}/documentation`, {
14
+ content: args.content,
15
+ templateId: args.template_id,
16
+ actor: args.actor,
17
+ });
18
+ },
19
+ },
20
+ 'payments.create_sale': {
21
+ description: '[Fase 6 — Cerrar] Crea una venta (cargo) asociada a un servicio documentado. Mueve la sesión a "Facturado". Debe llamarse después de documentation.create.',
22
+ schema: z.object({
23
+ client_id: z.string().describe('ID del cliente'),
24
+ service_id: z.string().describe('ID del servicio'),
25
+ provider_id: z.string().describe('ID del proveedor'),
26
+ quantity: z.number().default(1).describe('Cantidad de sesiones'),
27
+ unit_price: z.number().describe('Precio unitario'),
28
+ }),
29
+ handler: async (client, args) => {
30
+ return client.post('/planificalo/sales', {
31
+ clientId: args.client_id,
32
+ serviceId: args.service_id,
33
+ providerId: args.provider_id,
34
+ quantity: args.quantity ?? 1,
35
+ unitPrice: args.unit_price,
36
+ });
37
+ },
38
+ },
39
+ 'payments.record_payment': {
40
+ description: '[Fase 6 — Cerrar] Registra un cobro (pago recibido) contra una venta existente. Cuando el pago cubre el total, mueve la sesión a "Cerrado".',
41
+ schema: z.object({
42
+ venta_id: z.string().describe('ID de la venta'),
43
+ amount: z.number().describe('Monto cobrado'),
44
+ method: z.enum(['efectivo', 'transferencia', 'mercadopago', 'tarjeta']).describe('Método de pago'),
45
+ reference: z.string().optional().describe('Referencia o número de transacción'),
46
+ }),
47
+ handler: async (client, args) => {
48
+ return client.post('/planificalo/payments', {
49
+ ventaId: args.venta_id,
50
+ amount: args.amount,
51
+ paymentMethod: args.method,
52
+ reference: args.reference,
53
+ });
54
+ },
55
+ },
56
+ 'payments.get_status': {
57
+ description: '[Fase 6 — Cerrar] Consulta el estado de pago de una venta específica o el estado de cuenta de un cliente. Provee sale_id para una venta o client_id para el estado de cuenta completo.',
58
+ schema: z.object({
59
+ sale_id: z.string().optional().describe('ID de la venta (para consultar una venta específica)'),
60
+ client_id: z.string().optional().describe('ID del cliente (para consultar estado de cuenta)'),
61
+ }),
62
+ handler: async (client, args) => {
63
+ if (args.sale_id) {
64
+ return client.get(`/planificalo/sales/${args.sale_id}`);
65
+ }
66
+ if (args.client_id) {
67
+ return client.get(`/planificalo/clients/${args.client_id}/account-history`);
68
+ }
69
+ throw new Error('Debe proveer sale_id o client_id');
70
+ },
71
+ },
72
+ };
73
+ //# sourceMappingURL=cerrar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cerrar.js","sourceRoot":"","sources":["../../../src/tools/authenticated/cerrar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,sBAAsB,EAAE;QACtB,WAAW,EACT,wKAAwK;QAC1K,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;YACf,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iBAAiB,CAAC;YAClD,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,sCAAsC,CAAC;YACpE,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,8CAA8C,CAAC;YAC3F,KAAK,EAAE,WAAW,CAAC,QAAQ,CAAC,0DAA0D,CAAC;SACxF,CAAC;QACF,OAAO,EAAE,KAAK,EAAE,MAAwB,EAAE,IAAuG,EAAE,EAAE;YACnJ,OAAO,MAAM,CAAC,IAAI,CAAC,wBAAwB,IAAI,CAAC,UAAU,gBAAgB,EAAE;gBAC1E,OAAO,EAAE,IAAI,CAAC,OAAO;gBACrB,UAAU,EAAE,IAAI,CAAC,WAAW;gBAC5B,KAAK,EAAE,IAAI,CAAC,KAAK;aAClB,CAAC,CAAC;QACL,CAAC;KACF;IAED,sBAAsB,EAAE;QACtB,WAAW,EACT,4JA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