@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.
- package/README.md +104 -48
- package/dist/index.js +12 -14
- package/dist/index.js.map +1 -1
- package/dist/tools/authenticated/{clients.d.ts → cerrar.d.ts} +75 -83
- package/dist/tools/authenticated/cerrar.d.ts.map +1 -0
- package/dist/tools/authenticated/cerrar.js +73 -0
- package/dist/tools/authenticated/cerrar.js.map +1 -0
- package/dist/tools/authenticated/comprometer.d.ts +204 -0
- package/dist/tools/authenticated/comprometer.d.ts.map +1 -0
- package/dist/tools/authenticated/comprometer.js +55 -0
- package/dist/tools/authenticated/comprometer.js.map +1 -0
- package/dist/tools/authenticated/delivery.d.ts +234 -0
- package/dist/tools/authenticated/delivery.d.ts.map +1 -0
- package/dist/tools/authenticated/delivery.js +53 -0
- package/dist/tools/authenticated/delivery.js.map +1 -0
- package/dist/tools/authenticated/{notifications.d.ts → entender.d.ts} +16 -12
- package/dist/tools/authenticated/entender.d.ts.map +1 -0
- package/dist/tools/authenticated/entender.js +25 -0
- package/dist/tools/authenticated/entender.js.map +1 -0
- package/dist/tools/authenticated/{scheduling.d.ts → lifecycle.d.ts} +25 -77
- package/dist/tools/authenticated/lifecycle.d.ts.map +1 -0
- package/dist/tools/authenticated/lifecycle.js +63 -0
- package/dist/tools/authenticated/lifecycle.js.map +1 -0
- package/dist/tools/schemas.d.ts +40 -0
- package/dist/tools/schemas.d.ts.map +1 -0
- package/dist/tools/schemas.js +14 -0
- package/dist/tools/schemas.js.map +1 -0
- package/package.json +2 -2
- package/dist/tools/authenticated/clients.d.ts.map +0 -1
- package/dist/tools/authenticated/clients.js +0 -64
- package/dist/tools/authenticated/clients.js.map +0 -1
- package/dist/tools/authenticated/notifications.d.ts.map +0 -1
- package/dist/tools/authenticated/notifications.js +0 -22
- package/dist/tools/authenticated/notifications.js.map +0 -1
- package/dist/tools/authenticated/payments.d.ts +0 -105
- package/dist/tools/authenticated/payments.d.ts.map +0 -1
- package/dist/tools/authenticated/payments.js +0 -70
- package/dist/tools/authenticated/payments.js.map +0 -1
- package/dist/tools/authenticated/payroll.d.ts +0 -106
- package/dist/tools/authenticated/payroll.d.ts.map +0 -1
- package/dist/tools/authenticated/payroll.js +0 -77
- package/dist/tools/authenticated/payroll.js.map +0 -1
- package/dist/tools/authenticated/providers.d.ts +0 -52
- package/dist/tools/authenticated/providers.d.ts.map +0 -1
- package/dist/tools/authenticated/providers.js +0 -37
- package/dist/tools/authenticated/providers.js.map +0 -1
- package/dist/tools/authenticated/scheduling.d.ts.map +0 -1
- package/dist/tools/authenticated/scheduling.js +0 -82
- package/dist/tools/authenticated/scheduling.js.map +0 -1
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { CoordinaloClient } from '../../client.js';
|
|
3
|
+
import { ActorSchema } from '../schemas.js';
|
|
4
|
+
export declare const comprometerTools: {
|
|
5
|
+
'clients.get_or_create': {
|
|
6
|
+
description: string;
|
|
7
|
+
schema: z.ZodObject<{
|
|
8
|
+
email: z.ZodOptional<z.ZodString>;
|
|
9
|
+
phone: z.ZodOptional<z.ZodString>;
|
|
10
|
+
name: z.ZodOptional<z.ZodString>;
|
|
11
|
+
last_name: z.ZodOptional<z.ZodString>;
|
|
12
|
+
actor: z.ZodObject<{
|
|
13
|
+
type: z.ZodEnum<["client", "provider", "organization", "agent"]>;
|
|
14
|
+
id: z.ZodString;
|
|
15
|
+
on_behalf_of: z.ZodOptional<z.ZodObject<{
|
|
16
|
+
type: z.ZodString;
|
|
17
|
+
id: z.ZodString;
|
|
18
|
+
}, "strip", z.ZodTypeAny, {
|
|
19
|
+
type: string;
|
|
20
|
+
id: string;
|
|
21
|
+
}, {
|
|
22
|
+
type: string;
|
|
23
|
+
id: string;
|
|
24
|
+
}>>;
|
|
25
|
+
}, "strip", z.ZodTypeAny, {
|
|
26
|
+
type: "client" | "provider" | "organization" | "agent";
|
|
27
|
+
id: string;
|
|
28
|
+
on_behalf_of?: {
|
|
29
|
+
type: string;
|
|
30
|
+
id: string;
|
|
31
|
+
} | undefined;
|
|
32
|
+
}, {
|
|
33
|
+
type: "client" | "provider" | "organization" | "agent";
|
|
34
|
+
id: string;
|
|
35
|
+
on_behalf_of?: {
|
|
36
|
+
type: string;
|
|
37
|
+
id: string;
|
|
38
|
+
} | undefined;
|
|
39
|
+
}>;
|
|
40
|
+
}, "strip", z.ZodTypeAny, {
|
|
41
|
+
actor: {
|
|
42
|
+
type: "client" | "provider" | "organization" | "agent";
|
|
43
|
+
id: string;
|
|
44
|
+
on_behalf_of?: {
|
|
45
|
+
type: string;
|
|
46
|
+
id: string;
|
|
47
|
+
} | undefined;
|
|
48
|
+
};
|
|
49
|
+
email?: string | undefined;
|
|
50
|
+
phone?: string | undefined;
|
|
51
|
+
name?: string | undefined;
|
|
52
|
+
last_name?: string | undefined;
|
|
53
|
+
}, {
|
|
54
|
+
actor: {
|
|
55
|
+
type: "client" | "provider" | "organization" | "agent";
|
|
56
|
+
id: string;
|
|
57
|
+
on_behalf_of?: {
|
|
58
|
+
type: string;
|
|
59
|
+
id: string;
|
|
60
|
+
} | undefined;
|
|
61
|
+
};
|
|
62
|
+
email?: string | undefined;
|
|
63
|
+
phone?: string | undefined;
|
|
64
|
+
name?: string | undefined;
|
|
65
|
+
last_name?: string | undefined;
|
|
66
|
+
}>;
|
|
67
|
+
handler: (client: CoordinaloClient, args: {
|
|
68
|
+
email?: string;
|
|
69
|
+
phone?: string;
|
|
70
|
+
name?: string;
|
|
71
|
+
last_name?: string;
|
|
72
|
+
actor: z.infer<typeof ActorSchema>;
|
|
73
|
+
}) => Promise<unknown>;
|
|
74
|
+
};
|
|
75
|
+
'scheduling.book': {
|
|
76
|
+
description: string;
|
|
77
|
+
schema: z.ZodObject<{
|
|
78
|
+
service_id: z.ZodString;
|
|
79
|
+
provider_id: z.ZodString;
|
|
80
|
+
client_id: z.ZodString;
|
|
81
|
+
starts_at: z.ZodString;
|
|
82
|
+
actor: z.ZodObject<{
|
|
83
|
+
type: z.ZodEnum<["client", "provider", "organization", "agent"]>;
|
|
84
|
+
id: z.ZodString;
|
|
85
|
+
on_behalf_of: z.ZodOptional<z.ZodObject<{
|
|
86
|
+
type: z.ZodString;
|
|
87
|
+
id: z.ZodString;
|
|
88
|
+
}, "strip", z.ZodTypeAny, {
|
|
89
|
+
type: string;
|
|
90
|
+
id: string;
|
|
91
|
+
}, {
|
|
92
|
+
type: string;
|
|
93
|
+
id: string;
|
|
94
|
+
}>>;
|
|
95
|
+
}, "strip", z.ZodTypeAny, {
|
|
96
|
+
type: "client" | "provider" | "organization" | "agent";
|
|
97
|
+
id: string;
|
|
98
|
+
on_behalf_of?: {
|
|
99
|
+
type: string;
|
|
100
|
+
id: string;
|
|
101
|
+
} | undefined;
|
|
102
|
+
}, {
|
|
103
|
+
type: "client" | "provider" | "organization" | "agent";
|
|
104
|
+
id: string;
|
|
105
|
+
on_behalf_of?: {
|
|
106
|
+
type: string;
|
|
107
|
+
id: string;
|
|
108
|
+
} | undefined;
|
|
109
|
+
}>;
|
|
110
|
+
}, "strip", z.ZodTypeAny, {
|
|
111
|
+
service_id: string;
|
|
112
|
+
provider_id: string;
|
|
113
|
+
actor: {
|
|
114
|
+
type: "client" | "provider" | "organization" | "agent";
|
|
115
|
+
id: string;
|
|
116
|
+
on_behalf_of?: {
|
|
117
|
+
type: string;
|
|
118
|
+
id: string;
|
|
119
|
+
} | undefined;
|
|
120
|
+
};
|
|
121
|
+
client_id: string;
|
|
122
|
+
starts_at: string;
|
|
123
|
+
}, {
|
|
124
|
+
service_id: string;
|
|
125
|
+
provider_id: string;
|
|
126
|
+
actor: {
|
|
127
|
+
type: "client" | "provider" | "organization" | "agent";
|
|
128
|
+
id: string;
|
|
129
|
+
on_behalf_of?: {
|
|
130
|
+
type: string;
|
|
131
|
+
id: string;
|
|
132
|
+
} | undefined;
|
|
133
|
+
};
|
|
134
|
+
client_id: string;
|
|
135
|
+
starts_at: string;
|
|
136
|
+
}>;
|
|
137
|
+
handler: (client: CoordinaloClient, args: {
|
|
138
|
+
service_id: string;
|
|
139
|
+
provider_id: string;
|
|
140
|
+
client_id: string;
|
|
141
|
+
starts_at: string;
|
|
142
|
+
actor: z.infer<typeof ActorSchema>;
|
|
143
|
+
}) => Promise<unknown>;
|
|
144
|
+
};
|
|
145
|
+
'scheduling.confirm': {
|
|
146
|
+
description: string;
|
|
147
|
+
schema: z.ZodObject<{
|
|
148
|
+
session_id: z.ZodString;
|
|
149
|
+
actor: z.ZodObject<{
|
|
150
|
+
type: z.ZodEnum<["client", "provider", "organization", "agent"]>;
|
|
151
|
+
id: z.ZodString;
|
|
152
|
+
on_behalf_of: z.ZodOptional<z.ZodObject<{
|
|
153
|
+
type: z.ZodString;
|
|
154
|
+
id: z.ZodString;
|
|
155
|
+
}, "strip", z.ZodTypeAny, {
|
|
156
|
+
type: string;
|
|
157
|
+
id: string;
|
|
158
|
+
}, {
|
|
159
|
+
type: string;
|
|
160
|
+
id: string;
|
|
161
|
+
}>>;
|
|
162
|
+
}, "strip", z.ZodTypeAny, {
|
|
163
|
+
type: "client" | "provider" | "organization" | "agent";
|
|
164
|
+
id: string;
|
|
165
|
+
on_behalf_of?: {
|
|
166
|
+
type: string;
|
|
167
|
+
id: string;
|
|
168
|
+
} | undefined;
|
|
169
|
+
}, {
|
|
170
|
+
type: "client" | "provider" | "organization" | "agent";
|
|
171
|
+
id: string;
|
|
172
|
+
on_behalf_of?: {
|
|
173
|
+
type: string;
|
|
174
|
+
id: string;
|
|
175
|
+
} | undefined;
|
|
176
|
+
}>;
|
|
177
|
+
}, "strip", z.ZodTypeAny, {
|
|
178
|
+
actor: {
|
|
179
|
+
type: "client" | "provider" | "organization" | "agent";
|
|
180
|
+
id: string;
|
|
181
|
+
on_behalf_of?: {
|
|
182
|
+
type: string;
|
|
183
|
+
id: string;
|
|
184
|
+
} | undefined;
|
|
185
|
+
};
|
|
186
|
+
session_id: string;
|
|
187
|
+
}, {
|
|
188
|
+
actor: {
|
|
189
|
+
type: "client" | "provider" | "organization" | "agent";
|
|
190
|
+
id: string;
|
|
191
|
+
on_behalf_of?: {
|
|
192
|
+
type: string;
|
|
193
|
+
id: string;
|
|
194
|
+
} | undefined;
|
|
195
|
+
};
|
|
196
|
+
session_id: string;
|
|
197
|
+
}>;
|
|
198
|
+
handler: (client: CoordinaloClient, args: {
|
|
199
|
+
session_id: string;
|
|
200
|
+
actor: z.infer<typeof ActorSchema>;
|
|
201
|
+
}) => Promise<unknown>;
|
|
202
|
+
};
|
|
203
|
+
};
|
|
204
|
+
//# sourceMappingURL=comprometer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"comprometer.d.ts","sourceRoot":"","sources":["../../../src/tools/authenticated/comprometer.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,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAWD,gBAAgB,QAAQ;YAAE,KAAK,CAAC,EAAE,MAAM,CAAC;YAAC,KAAK,CAAC,EAAE,MAAM,CAAC;YAAC,IAAI,CAAC,EAAE,MAAM,CAAC;YAAC,SAAS,CAAC,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAA;SAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAqBjI,gBAAgB,QAAQ;YAAE,UAAU,EAAE,MAAM,CAAC;YAAC,WAAW,EAAE,MAAM,CAAC;YAAC,SAAS,EAAE,MAAM,CAAC;YAAC,SAAS,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAA;SAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAkB7I,gBAAgB,QAAQ;YAAE,UAAU,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAA;SAAE;;CAM7G,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ActorSchema } from '../schemas.js';
|
|
3
|
+
export const comprometerTools = {
|
|
4
|
+
'clients.get_or_create': {
|
|
5
|
+
description: '[Fase 3 — Comprometer] Busca un cliente por email o teléfono. Si existe, retorna sus datos y resumen de historial. Si no existe, lo crea con los datos proporcionados. Una sola llamada para resolver la identidad del cliente antes de agendar.',
|
|
6
|
+
schema: z.object({
|
|
7
|
+
email: z.string().email().optional().describe('Email del cliente (buscará primero por email)'),
|
|
8
|
+
phone: z.string().optional().describe('Teléfono del cliente (buscará si no se provee email)'),
|
|
9
|
+
name: z.string().optional().describe('Nombre — requerido solo si el cliente no existe'),
|
|
10
|
+
last_name: z.string().optional().describe('Apellido — requerido solo si el cliente no existe'),
|
|
11
|
+
actor: ActorSchema.describe('Quién realiza la acción'),
|
|
12
|
+
}),
|
|
13
|
+
handler: async (client, args) => {
|
|
14
|
+
return client.post('/relacionalo/clients/upsert', {
|
|
15
|
+
email: args.email,
|
|
16
|
+
phone: args.phone,
|
|
17
|
+
name: args.name,
|
|
18
|
+
lastName: args.last_name,
|
|
19
|
+
actor: args.actor,
|
|
20
|
+
});
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
'scheduling.book': {
|
|
24
|
+
description: '[Fase 3 — Comprometer] Agenda una nueva sesión para un cliente con un proveedor. Crea la sesión en estado "Solicitado". Requiere haber llamado contract.get antes para conocer las reglas del servicio.',
|
|
25
|
+
schema: z.object({
|
|
26
|
+
service_id: z.string().describe('ID del servicio'),
|
|
27
|
+
provider_id: z.string().describe('ID del proveedor'),
|
|
28
|
+
client_id: z.string().describe('ID del cliente'),
|
|
29
|
+
starts_at: z.string().describe('Fecha y hora de inicio (ISO datetime)'),
|
|
30
|
+
actor: ActorSchema.describe('Quién realiza la acción'),
|
|
31
|
+
}),
|
|
32
|
+
handler: async (client, args) => {
|
|
33
|
+
return client.post('/coordinalo/sessions', {
|
|
34
|
+
serviceId: args.service_id,
|
|
35
|
+
providerId: args.provider_id,
|
|
36
|
+
clientId: args.client_id,
|
|
37
|
+
startTime: args.starts_at,
|
|
38
|
+
actor: args.actor,
|
|
39
|
+
});
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
'scheduling.confirm': {
|
|
43
|
+
description: '[Fase 3 — Comprometer] Confirma una sesión agendada, moviéndola a estado "Confirmado". Ambas partes (proveedor y cliente) deben confirmar antes de que el servicio pueda iniciar.',
|
|
44
|
+
schema: z.object({
|
|
45
|
+
session_id: z.string().describe('ID de la sesión a confirmar'),
|
|
46
|
+
actor: ActorSchema.describe('Quién confirma (client, provider, organization o agent)'),
|
|
47
|
+
}),
|
|
48
|
+
handler: async (client, args) => {
|
|
49
|
+
return client.post(`/coordinalo/sessions/${args.session_id}/confirm`, {
|
|
50
|
+
actor: args.actor,
|
|
51
|
+
});
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=comprometer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"comprometer.js","sourceRoot":"","sources":["../../../src/tools/authenticated/comprometer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,uBAAuB,EAAE;QACvB,WAAW,EACT,kPAAkP;QACpP,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;YACf,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,+CAA+C,CAAC;YAC9F,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,sDAAsD,CAAC;YAC7F,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,iDAAiD,CAAC;YACvF,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,mDAAmD,CAAC;YAC9F,KAAK,EAAE,WAAW,CAAC,QAAQ,CAAC,yBAAyB,CAAC;SACvD,CAAC;QACF,OAAO,EAAE,KAAK,EAAE,MAAwB,EAAE,IAA+G,EAAE,EAAE;YAC3J,OAAO,MAAM,CAAC,IAAI,CAAC,6BAA6B,EAAE;gBAChD,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,QAAQ,EAAE,IAAI,CAAC,SAAS;gBACxB,KAAK,EAAE,IAAI,CAAC,KAAK;aAClB,CAAC,CAAC;QACL,CAAC;KACF;IAED,iBAAiB,EAAE;QACjB,WAAW,EACT,yMAAyM;QAC3M,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;YACf,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iBAAiB,CAAC;YAClD,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,kBAAkB,CAAC;YACpD,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,gBAAgB,CAAC;YAChD,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,uCAAuC,CAAC;YACvE,KAAK,EAAE,WAAW,CAAC,QAAQ,CAAC,yBAAyB,CAAC;SACvD,CAAC;QACF,OAAO,EAAE,KAAK,EAAE,MAAwB,EAAE,IAA2H,EAAE,EAAE;YACvK,OAAO,MAAM,CAAC,IAAI,CAAC,sBAAsB,EAAE;gBACzC,SAAS,EAAE,IAAI,CAAC,UAAU;gBAC1B,UAAU,EAAE,IAAI,CAAC,WAAW;gBAC5B,QAAQ,EAAE,IAAI,CAAC,SAAS;gBACxB,SAAS,EAAE,IAAI,CAAC,SAAS;gBACzB,KAAK,EAAE,IAAI,CAAC,KAAK;aAClB,CAAC,CAAC;QACL,CAAC;KACF;IAED,oBAAoB,EAAE;QACpB,WAAW,EACT,mLAAmL;QACrL,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;YACf,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,6BAA6B,CAAC;YAC9D,KAAK,EAAE,WAAW,CAAC,QAAQ,CAAC,yDAAyD,CAAC;SACvF,CAAC;QACF,OAAO,EAAE,KAAK,EAAE,MAAwB,EAAE,IAAgE,EAAE,EAAE;YAC5G,OAAO,MAAM,CAAC,IAAI,CAAC,wBAAwB,IAAI,CAAC,UAAU,UAAU,EAAE;gBACpE,KAAK,EAAE,IAAI,CAAC,KAAK;aAClB,CAAC,CAAC;QACL,CAAC;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { CoordinaloClient } from '../../client.js';
|
|
3
|
+
import { ActorSchema, LocationSchema } from '../schemas.js';
|
|
4
|
+
export declare const deliveryTools: {
|
|
5
|
+
'delivery.checkin': {
|
|
6
|
+
description: string;
|
|
7
|
+
schema: z.ZodObject<{
|
|
8
|
+
session_id: z.ZodString;
|
|
9
|
+
actor: z.ZodObject<{
|
|
10
|
+
type: z.ZodEnum<["client", "provider", "organization", "agent"]>;
|
|
11
|
+
id: z.ZodString;
|
|
12
|
+
on_behalf_of: z.ZodOptional<z.ZodObject<{
|
|
13
|
+
type: z.ZodString;
|
|
14
|
+
id: z.ZodString;
|
|
15
|
+
}, "strip", z.ZodTypeAny, {
|
|
16
|
+
type: string;
|
|
17
|
+
id: string;
|
|
18
|
+
}, {
|
|
19
|
+
type: string;
|
|
20
|
+
id: string;
|
|
21
|
+
}>>;
|
|
22
|
+
}, "strip", z.ZodTypeAny, {
|
|
23
|
+
type: "client" | "provider" | "organization" | "agent";
|
|
24
|
+
id: string;
|
|
25
|
+
on_behalf_of?: {
|
|
26
|
+
type: string;
|
|
27
|
+
id: string;
|
|
28
|
+
} | undefined;
|
|
29
|
+
}, {
|
|
30
|
+
type: "client" | "provider" | "organization" | "agent";
|
|
31
|
+
id: string;
|
|
32
|
+
on_behalf_of?: {
|
|
33
|
+
type: string;
|
|
34
|
+
id: string;
|
|
35
|
+
} | undefined;
|
|
36
|
+
}>;
|
|
37
|
+
location: z.ZodOptional<z.ZodObject<{
|
|
38
|
+
lat: z.ZodNumber;
|
|
39
|
+
lng: z.ZodNumber;
|
|
40
|
+
}, "strip", z.ZodTypeAny, {
|
|
41
|
+
lat: number;
|
|
42
|
+
lng: number;
|
|
43
|
+
}, {
|
|
44
|
+
lat: number;
|
|
45
|
+
lng: number;
|
|
46
|
+
}>>;
|
|
47
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
48
|
+
}, "strip", z.ZodTypeAny, {
|
|
49
|
+
actor: {
|
|
50
|
+
type: "client" | "provider" | "organization" | "agent";
|
|
51
|
+
id: string;
|
|
52
|
+
on_behalf_of?: {
|
|
53
|
+
type: string;
|
|
54
|
+
id: string;
|
|
55
|
+
} | undefined;
|
|
56
|
+
};
|
|
57
|
+
session_id: string;
|
|
58
|
+
location?: {
|
|
59
|
+
lat: number;
|
|
60
|
+
lng: number;
|
|
61
|
+
} | undefined;
|
|
62
|
+
timestamp?: string | undefined;
|
|
63
|
+
}, {
|
|
64
|
+
actor: {
|
|
65
|
+
type: "client" | "provider" | "organization" | "agent";
|
|
66
|
+
id: string;
|
|
67
|
+
on_behalf_of?: {
|
|
68
|
+
type: string;
|
|
69
|
+
id: string;
|
|
70
|
+
} | undefined;
|
|
71
|
+
};
|
|
72
|
+
session_id: string;
|
|
73
|
+
location?: {
|
|
74
|
+
lat: number;
|
|
75
|
+
lng: number;
|
|
76
|
+
} | undefined;
|
|
77
|
+
timestamp?: string | undefined;
|
|
78
|
+
}>;
|
|
79
|
+
handler: (client: CoordinaloClient, args: {
|
|
80
|
+
session_id: string;
|
|
81
|
+
actor: z.infer<typeof ActorSchema>;
|
|
82
|
+
location?: z.infer<typeof LocationSchema>;
|
|
83
|
+
timestamp?: string;
|
|
84
|
+
}) => Promise<unknown>;
|
|
85
|
+
};
|
|
86
|
+
'delivery.checkout': {
|
|
87
|
+
description: string;
|
|
88
|
+
schema: z.ZodObject<{
|
|
89
|
+
session_id: z.ZodString;
|
|
90
|
+
actor: z.ZodObject<{
|
|
91
|
+
type: z.ZodEnum<["client", "provider", "organization", "agent"]>;
|
|
92
|
+
id: z.ZodString;
|
|
93
|
+
on_behalf_of: z.ZodOptional<z.ZodObject<{
|
|
94
|
+
type: z.ZodString;
|
|
95
|
+
id: z.ZodString;
|
|
96
|
+
}, "strip", z.ZodTypeAny, {
|
|
97
|
+
type: string;
|
|
98
|
+
id: string;
|
|
99
|
+
}, {
|
|
100
|
+
type: string;
|
|
101
|
+
id: string;
|
|
102
|
+
}>>;
|
|
103
|
+
}, "strip", z.ZodTypeAny, {
|
|
104
|
+
type: "client" | "provider" | "organization" | "agent";
|
|
105
|
+
id: string;
|
|
106
|
+
on_behalf_of?: {
|
|
107
|
+
type: string;
|
|
108
|
+
id: string;
|
|
109
|
+
} | undefined;
|
|
110
|
+
}, {
|
|
111
|
+
type: "client" | "provider" | "organization" | "agent";
|
|
112
|
+
id: string;
|
|
113
|
+
on_behalf_of?: {
|
|
114
|
+
type: string;
|
|
115
|
+
id: string;
|
|
116
|
+
} | undefined;
|
|
117
|
+
}>;
|
|
118
|
+
location: z.ZodOptional<z.ZodObject<{
|
|
119
|
+
lat: z.ZodNumber;
|
|
120
|
+
lng: z.ZodNumber;
|
|
121
|
+
}, "strip", z.ZodTypeAny, {
|
|
122
|
+
lat: number;
|
|
123
|
+
lng: number;
|
|
124
|
+
}, {
|
|
125
|
+
lat: number;
|
|
126
|
+
lng: number;
|
|
127
|
+
}>>;
|
|
128
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
129
|
+
}, "strip", z.ZodTypeAny, {
|
|
130
|
+
actor: {
|
|
131
|
+
type: "client" | "provider" | "organization" | "agent";
|
|
132
|
+
id: string;
|
|
133
|
+
on_behalf_of?: {
|
|
134
|
+
type: string;
|
|
135
|
+
id: string;
|
|
136
|
+
} | undefined;
|
|
137
|
+
};
|
|
138
|
+
session_id: string;
|
|
139
|
+
location?: {
|
|
140
|
+
lat: number;
|
|
141
|
+
lng: number;
|
|
142
|
+
} | undefined;
|
|
143
|
+
timestamp?: string | undefined;
|
|
144
|
+
}, {
|
|
145
|
+
actor: {
|
|
146
|
+
type: "client" | "provider" | "organization" | "agent";
|
|
147
|
+
id: string;
|
|
148
|
+
on_behalf_of?: {
|
|
149
|
+
type: string;
|
|
150
|
+
id: string;
|
|
151
|
+
} | undefined;
|
|
152
|
+
};
|
|
153
|
+
session_id: string;
|
|
154
|
+
location?: {
|
|
155
|
+
lat: number;
|
|
156
|
+
lng: number;
|
|
157
|
+
} | undefined;
|
|
158
|
+
timestamp?: string | undefined;
|
|
159
|
+
}>;
|
|
160
|
+
handler: (client: CoordinaloClient, args: {
|
|
161
|
+
session_id: string;
|
|
162
|
+
actor: z.infer<typeof ActorSchema>;
|
|
163
|
+
location?: z.infer<typeof LocationSchema>;
|
|
164
|
+
timestamp?: string;
|
|
165
|
+
}) => Promise<unknown>;
|
|
166
|
+
};
|
|
167
|
+
'delivery.record_evidence': {
|
|
168
|
+
description: string;
|
|
169
|
+
schema: z.ZodObject<{
|
|
170
|
+
session_id: z.ZodString;
|
|
171
|
+
evidence_type: z.ZodEnum<["gps", "signature", "photo", "document", "duration", "notes"]>;
|
|
172
|
+
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
173
|
+
actor: z.ZodObject<{
|
|
174
|
+
type: z.ZodEnum<["client", "provider", "organization", "agent"]>;
|
|
175
|
+
id: z.ZodString;
|
|
176
|
+
on_behalf_of: z.ZodOptional<z.ZodObject<{
|
|
177
|
+
type: z.ZodString;
|
|
178
|
+
id: z.ZodString;
|
|
179
|
+
}, "strip", z.ZodTypeAny, {
|
|
180
|
+
type: string;
|
|
181
|
+
id: string;
|
|
182
|
+
}, {
|
|
183
|
+
type: string;
|
|
184
|
+
id: string;
|
|
185
|
+
}>>;
|
|
186
|
+
}, "strip", z.ZodTypeAny, {
|
|
187
|
+
type: "client" | "provider" | "organization" | "agent";
|
|
188
|
+
id: string;
|
|
189
|
+
on_behalf_of?: {
|
|
190
|
+
type: string;
|
|
191
|
+
id: string;
|
|
192
|
+
} | undefined;
|
|
193
|
+
}, {
|
|
194
|
+
type: "client" | "provider" | "organization" | "agent";
|
|
195
|
+
id: string;
|
|
196
|
+
on_behalf_of?: {
|
|
197
|
+
type: string;
|
|
198
|
+
id: string;
|
|
199
|
+
} | undefined;
|
|
200
|
+
}>;
|
|
201
|
+
}, "strip", z.ZodTypeAny, {
|
|
202
|
+
actor: {
|
|
203
|
+
type: "client" | "provider" | "organization" | "agent";
|
|
204
|
+
id: string;
|
|
205
|
+
on_behalf_of?: {
|
|
206
|
+
type: string;
|
|
207
|
+
id: string;
|
|
208
|
+
} | undefined;
|
|
209
|
+
};
|
|
210
|
+
session_id: string;
|
|
211
|
+
evidence_type: "gps" | "signature" | "photo" | "document" | "duration" | "notes";
|
|
212
|
+
data: Record<string, unknown>;
|
|
213
|
+
}, {
|
|
214
|
+
actor: {
|
|
215
|
+
type: "client" | "provider" | "organization" | "agent";
|
|
216
|
+
id: string;
|
|
217
|
+
on_behalf_of?: {
|
|
218
|
+
type: string;
|
|
219
|
+
id: string;
|
|
220
|
+
} | undefined;
|
|
221
|
+
};
|
|
222
|
+
session_id: string;
|
|
223
|
+
evidence_type: "gps" | "signature" | "photo" | "document" | "duration" | "notes";
|
|
224
|
+
data: Record<string, unknown>;
|
|
225
|
+
}>;
|
|
226
|
+
handler: (client: CoordinaloClient, args: {
|
|
227
|
+
session_id: string;
|
|
228
|
+
evidence_type: string;
|
|
229
|
+
data: Record<string, unknown>;
|
|
230
|
+
actor: z.infer<typeof ActorSchema>;
|
|
231
|
+
}) => Promise<unknown>;
|
|
232
|
+
};
|
|
233
|
+
};
|
|
234
|
+
//# sourceMappingURL=delivery.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delivery.d.ts","sourceRoot":"","sources":["../../../src/tools/authenticated/delivery.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,cAAc,EAAE,MAAM,eAAe,CAAC;AAE5D,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAUE,gBAAgB,QAAQ;YAAE,UAAU,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;YAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;YAAC,SAAS,CAAC,EAAE,MAAM,CAAA;SAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAkBjJ,gBAAgB,QAAQ;YAAE,UAAU,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;YAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;YAAC,SAAS,CAAC,EAAE,MAAM,CAAA;SAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAkBjJ,gBAAgB,QAAQ;YAAE,UAAU,EAAE,MAAM,CAAC;YAAC,aAAa,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;YAAC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAA;SAAE;;CAQnK,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ActorSchema, LocationSchema } from '../schemas.js';
|
|
3
|
+
export const deliveryTools = {
|
|
4
|
+
'delivery.checkin': {
|
|
5
|
+
description: '[Fase 5 — Verificar entrega] Registra el check-in del proveedor o cliente, moviendo la sesión a "En Curso". Captura timestamp y ubicación GPS como evidencia de inicio de servicio.',
|
|
6
|
+
schema: z.object({
|
|
7
|
+
session_id: z.string().describe('ID de la sesión'),
|
|
8
|
+
actor: ActorSchema.describe('Quién hace check-in (provider o client)'),
|
|
9
|
+
location: LocationSchema.optional().describe('Ubicación GPS al momento del check-in'),
|
|
10
|
+
timestamp: z.string().optional().describe('ISO datetime del check-in (default: ahora)'),
|
|
11
|
+
}),
|
|
12
|
+
handler: async (client, args) => {
|
|
13
|
+
return client.post(`/coordinalo/sessions/${args.session_id}/checkin`, {
|
|
14
|
+
actor: args.actor,
|
|
15
|
+
location: args.location,
|
|
16
|
+
timestamp: args.timestamp,
|
|
17
|
+
});
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
'delivery.checkout': {
|
|
21
|
+
description: '[Fase 5 — Verificar entrega] Registra el check-out al finalizar el servicio, moviendo la sesión a "Completado". Captura timestamp y ubicación GPS. La duración real se calcula automáticamente.',
|
|
22
|
+
schema: z.object({
|
|
23
|
+
session_id: z.string().describe('ID de la sesión'),
|
|
24
|
+
actor: ActorSchema.describe('Quién hace check-out (provider o client)'),
|
|
25
|
+
location: LocationSchema.optional().describe('Ubicación GPS al momento del check-out'),
|
|
26
|
+
timestamp: z.string().optional().describe('ISO datetime del check-out (default: ahora)'),
|
|
27
|
+
}),
|
|
28
|
+
handler: async (client, args) => {
|
|
29
|
+
return client.post(`/coordinalo/sessions/${args.session_id}/checkout`, {
|
|
30
|
+
actor: args.actor,
|
|
31
|
+
location: args.location,
|
|
32
|
+
timestamp: args.timestamp,
|
|
33
|
+
});
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
'delivery.record_evidence': {
|
|
37
|
+
description: '[Fase 5 — Verificar entrega] Registra evidencia de entrega del servicio según los requisitos del contrato. Tipos: GPS, firma, foto, documento, duración, notas. Consultar contract.get para conocer la evidencia requerida por vertical.',
|
|
38
|
+
schema: z.object({
|
|
39
|
+
session_id: z.string().describe('ID de la sesión'),
|
|
40
|
+
evidence_type: z.enum(['gps', 'signature', 'photo', 'document', 'duration', 'notes']).describe('Tipo de evidencia'),
|
|
41
|
+
data: z.record(z.unknown()).describe('Payload de la evidencia (estructura varía por tipo)'),
|
|
42
|
+
actor: ActorSchema.describe('Quién registra la evidencia'),
|
|
43
|
+
}),
|
|
44
|
+
handler: async (client, args) => {
|
|
45
|
+
return client.post(`/coordinalo/sessions/${args.session_id}/evidence`, {
|
|
46
|
+
evidenceType: args.evidence_type,
|
|
47
|
+
data: args.data,
|
|
48
|
+
actor: args.actor,
|
|
49
|
+
});
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=delivery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delivery.js","sourceRoot":"","sources":["../../../src/tools/authenticated/delivery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE5D,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,kBAAkB,EAAE;QAClB,WAAW,EACT,qLAAqL;QACvL,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;YACf,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iBAAiB,CAAC;YAClD,KAAK,EAAE,WAAW,CAAC,QAAQ,CAAC,yCAAyC,CAAC;YACtE,QAAQ,EAAE,cAAc,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,uCAAuC,CAAC;YACrF,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,4CAA4C,CAAC;SACxF,CAAC;QACF,OAAO,EAAE,KAAK,EAAE,MAAwB,EAAE,IAA+H,EAAE,EAAE;YAC3K,OAAO,MAAM,CAAC,IAAI,CAAC,wBAAwB,IAAI,CAAC,UAAU,UAAU,EAAE;gBACpE,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ;gBACvB,SAAS,EAAE,IAAI,CAAC,SAAS;aAC1B,CAAC,CAAC;QACL,CAAC;KACF;IAED,mBAAmB,EAAE;QACnB,WAAW,EACT,iMAAiM;QACnM,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;YACf,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iBAAiB,CAAC;YAClD,KAAK,EAAE,WAAW,CAAC,QAAQ,CAAC,0CAA0C,CAAC;YACvE,QAAQ,EAAE,cAAc,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,wCAAwC,CAAC;YACtF,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,6CAA6C,CAAC;SACzF,CAAC;QACF,OAAO,EAAE,KAAK,EAAE,MAAwB,EAAE,IAA+H,EAAE,EAAE;YAC3K,OAAO,MAAM,CAAC,IAAI,CAAC,wBAAwB,IAAI,CAAC,UAAU,WAAW,EAAE;gBACrE,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ;gBACvB,SAAS,EAAE,IAAI,CAAC,SAAS;aAC1B,CAAC,CAAC;QACL,CAAC;KACF;IAED,0BAA0B,EAAE;QAC1B,WAAW,EACT,0OAA0O;QAC5O,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;YACf,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iBAAiB,CAAC;YAClD,aAAa,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,mBAAmB,CAAC;YACnH,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,CAAC,qDAAqD,CAAC;YAC3F,KAAK,EAAE,WAAW,CAAC,QAAQ,CAAC,6BAA6B,CAAC;SAC3D,CAAC;QACF,OAAO,EAAE,KAAK,EAAE,MAAwB,EAAE,IAAsH,EAAE,EAAE;YAClK,OAAO,MAAM,CAAC,IAAI,CAAC,wBAAwB,IAAI,CAAC,UAAU,WAAW,EAAE;gBACrE,YAAY,EAAE,IAAI,CAAC,aAAa;gBAChC,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,KAAK,EAAE,IAAI,CAAC,KAAK;aAClB,CAAC,CAAC;QACL,CAAC;KACF;CACF,CAAC"}
|
|
@@ -1,31 +1,35 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import type { CoordinaloClient } from '../../client.js';
|
|
3
|
-
export declare const
|
|
4
|
-
'
|
|
3
|
+
export declare const entenderTools: {
|
|
4
|
+
'service.get': {
|
|
5
5
|
description: string;
|
|
6
6
|
schema: z.ZodObject<{
|
|
7
|
-
|
|
7
|
+
service_id: z.ZodString;
|
|
8
8
|
}, "strip", z.ZodTypeAny, {
|
|
9
|
-
|
|
9
|
+
service_id: string;
|
|
10
10
|
}, {
|
|
11
|
-
|
|
11
|
+
service_id: string;
|
|
12
12
|
}>;
|
|
13
13
|
handler: (client: CoordinaloClient, args: {
|
|
14
|
-
|
|
14
|
+
service_id: string;
|
|
15
15
|
}) => Promise<unknown>;
|
|
16
16
|
};
|
|
17
|
-
'
|
|
17
|
+
'contract.get': {
|
|
18
18
|
description: string;
|
|
19
19
|
schema: z.ZodObject<{
|
|
20
|
-
|
|
20
|
+
service_id: z.ZodString;
|
|
21
|
+
org_id: z.ZodString;
|
|
21
22
|
}, "strip", z.ZodTypeAny, {
|
|
22
|
-
|
|
23
|
+
service_id: string;
|
|
24
|
+
org_id: string;
|
|
23
25
|
}, {
|
|
24
|
-
|
|
26
|
+
service_id: string;
|
|
27
|
+
org_id: string;
|
|
25
28
|
}>;
|
|
26
29
|
handler: (client: CoordinaloClient, args: {
|
|
27
|
-
|
|
30
|
+
service_id: string;
|
|
31
|
+
org_id: string;
|
|
28
32
|
}) => Promise<unknown>;
|
|
29
33
|
};
|
|
30
34
|
};
|
|
31
|
-
//# sourceMappingURL=
|
|
35
|
+
//# sourceMappingURL=entender.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entender.d.ts","sourceRoot":"","sources":["../../../src/tools/authenticated/entender.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAExD,eAAO,MAAM,aAAa;;;;;;;;;;0BAOE,gBAAgB,QAAQ;YAAE,UAAU,EAAE,MAAM,CAAA;SAAE;;;;;;;;;;;;;;0BAY9C,gBAAgB,QAAQ;YAAE,UAAU,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,MAAM,CAAA;SAAE;;CAMzF,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const entenderTools = {
|
|
3
|
+
'service.get': {
|
|
4
|
+
description: '[Fase 2 — Entender] Obtiene las 9 dimensiones de un servicio: qué se entrega, quién lo entrega, quién lo recibe, quién lo solicita, quién paga, cuándo, dónde, evidencia requerida y resultado esperado. Llama esto para entender completamente un servicio antes de comprometerse.',
|
|
5
|
+
schema: z.object({
|
|
6
|
+
service_id: z.string().describe('ID del servicio'),
|
|
7
|
+
}),
|
|
8
|
+
handler: async (client, args) => {
|
|
9
|
+
return client.get(`/coordinalo/services/${args.service_id}`);
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
'contract.get': {
|
|
13
|
+
description: '[Fase 2 — Entender] Obtiene el contrato de servicio pre-acordado. Define las reglas bajo las que opera el servicio: evidencia requerida, políticas de cancelación, inasistencia y arbitraje. DEBE llamarse antes de cualquier acción en Fase 3+.',
|
|
14
|
+
schema: z.object({
|
|
15
|
+
service_id: z.string().describe('ID del servicio'),
|
|
16
|
+
org_id: z.string().describe('ID de la organización'),
|
|
17
|
+
}),
|
|
18
|
+
handler: async (client, args) => {
|
|
19
|
+
return client.get(`/coordinalo/services/${args.service_id}/contract`, {
|
|
20
|
+
orgId: args.org_id,
|
|
21
|
+
});
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=entender.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entender.js","sourceRoot":"","sources":["../../../src/tools/authenticated/entender.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,aAAa,EAAE;QACb,WAAW,EACT,qRAAqR;QACvR,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;YACf,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iBAAiB,CAAC;SACnD,CAAC;QACF,OAAO,EAAE,KAAK,EAAE,MAAwB,EAAE,IAA4B,EAAE,EAAE;YACxE,OAAO,MAAM,CAAC,GAAG,CAAC,wBAAwB,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC;QAC/D,CAAC;KACF;IAED,cAAc,EAAE;QACd,WAAW,EACT,kPAAkP;QACpP,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;YACf,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iBAAiB,CAAC;YAClD,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,uBAAuB,CAAC;SACrD,CAAC;QACF,OAAO,EAAE,KAAK,EAAE,MAAwB,EAAE,IAA4C,EAAE,EAAE;YACxF,OAAO,MAAM,CAAC,GAAG,CAAC,wBAAwB,IAAI,CAAC,UAAU,WAAW,EAAE;gBACpE,KAAK,EAAE,IAAI,CAAC,MAAM;aACnB,CAAC,CAAC;QACL,CAAC;KACF;CACF,CAAC"}
|