@mjquinlan2000/practicepanther-mcp 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/server.js CHANGED
@@ -1061,86 +1061,1480 @@ var usersGetUsers = (options) => (options?.client ?? client).get({
1061
1061
  ...options
1062
1062
  });
1063
1063
 
1064
- // src/schemas.ts
1065
- import { readFileSync } from "fs";
1066
- import { dirname, join } from "path";
1067
- import { fileURLToPath } from "url";
1068
- import { z } from "zod";
1069
- var __dirname = dirname(fileURLToPath(import.meta.url));
1070
- var spec = JSON.parse(
1071
- readFileSync(join(__dirname, "..", "openapi.json"), "utf8")
1072
- );
1073
- var defs = spec.components.schemas;
1074
- var cache = /* @__PURE__ */ new Map();
1075
- function buildProp(prop) {
1076
- if (prop.$ref) {
1077
- const name = prop.$ref.split("/").pop();
1078
- if (name) return buildSchema(name);
1079
- }
1080
- if (prop.type === "array" && prop.items) {
1081
- return z.array(buildProp(prop.items));
1082
- }
1083
- if (prop.type === "integer" || prop.type === "number") return z.number();
1084
- if (prop.type === "boolean") return z.boolean();
1085
- return z.string();
1086
- }
1087
- function buildSchema(name) {
1088
- const cached = cache.get(name);
1089
- if (cached) return cached;
1090
- const def = defs[name];
1091
- const shape = {};
1092
- for (const [key, prop] of Object.entries(def?.properties ?? {})) {
1093
- shape[key] = buildProp(prop).nullable().optional();
1094
- }
1095
- const schema = z.looseObject(shape);
1096
- cache.set(name, schema);
1097
- return schema;
1098
- }
1099
- for (const name of Object.keys(defs)) buildSchema(name);
1100
- function get(name) {
1101
- const s = cache.get(name);
1102
- if (!s) throw new Error(`Schema ${name} not found`);
1103
- return s;
1104
- }
1105
- var AccountSchema = get("Account");
1106
- var AccountReferenceSchema = get("AccountReference");
1107
- var ActivityReferenceSchema = get("ActivityReference");
1108
- var BankAccountSchema = get("BankAccount");
1109
- var CallLogSchema = get("CallLog");
1110
- var ContactSchema = get("Contact");
1111
- var ContactReferenceSchema = get("ContactReference");
1112
- var CustomFieldSchema = get("CustomField");
1113
- var CustomFieldRefSchema = get("CustomFieldRef");
1114
- var CustomFieldValueSchema = get("CustomFieldValue");
1115
- var EmailSchema = get("Email");
1116
- var EmailAddressSchema = get("EmailAddress");
1117
- var EventSchema = get("Event");
1118
- var ExpenseCategorySchema = get("ExpenseCategory");
1119
- var ExpenseSchema = get("Expense");
1120
- var FileSchema = get("File");
1121
- var FileReferenceSchema = get("FileReference");
1122
- var FlatFeeSchema = get("FlatFee");
1123
- var InvoiceSchema = get("Invoice");
1124
- var InvoiceLineItemSchema = get("InvoiceLineItem");
1125
- var ItemSchema = get("Item");
1126
- var ItemReferenceSchema = get("ItemReference");
1127
- var MatterSchema = get("Matter");
1128
- var MatterReferenceSchema = get("MatterReference");
1129
- var MessageSchema = get("Message");
1130
- var NoteSchema = get("Note");
1131
- var PaymentSchema = get("Payment");
1132
- var PaymentDetailSchema = get("Payment_Detail");
1133
- var RelationshipSchema = get("Relationship");
1134
- var TagSchema = get("Tag");
1135
- var TaskSchema = get("Task");
1136
- var TimeEntrySchema = get("TimeEntry");
1137
- var UserSchema = get("User");
1138
- var UserReferenceSchema = get("UserReference");
1139
- function listOf(schema) {
1140
- return z.looseObject({ items: z.array(schema) });
1141
- }
1064
+ // src/client/zod.gen.ts
1065
+ import * as z from "zod";
1066
+ var zUserReference = z.looseObject({
1067
+ id: z.string().nullable(),
1068
+ display_name: z.string().nullish(),
1069
+ email_address: z.string().nullish()
1070
+ });
1071
+ var zCustomFieldRef = z.looseObject({
1072
+ id: z.string().nullable(),
1073
+ label: z.string().nullish(),
1074
+ value_type: z.union([z.enum([
1075
+ "TextBox",
1076
+ "Date",
1077
+ "DateTime",
1078
+ "Number",
1079
+ "Currency",
1080
+ "TextEditor",
1081
+ "DropDownList",
1082
+ "Checkbox",
1083
+ "Contact"
1084
+ ]), z.string()]).optional()
1085
+ });
1086
+ var zAccountReference = z.looseObject({
1087
+ id: z.string().nullable(),
1088
+ display_name: z.string().nullish()
1089
+ });
1090
+ var zContactReference = z.looseObject({
1091
+ account_ref: zAccountReference.nullish(),
1092
+ id: z.string().nullable(),
1093
+ display_name: z.string().nullish()
1094
+ });
1095
+ var zCustomFieldValue = z.looseObject({
1096
+ custom_field_ref: zCustomFieldRef.nullable(),
1097
+ value_boolean: z.boolean().nullish(),
1098
+ contact_ref: zContactReference.nullish(),
1099
+ value_date_time: z.string().nullish(),
1100
+ value_number: z.number().nullish(),
1101
+ value_string: z.string().nullish()
1102
+ });
1103
+ var zContact = z.looseObject({
1104
+ id: z.string().nullish(),
1105
+ account_ref: zAccountReference.nullish(),
1106
+ is_primary_contact: z.boolean().readonly().nullish(),
1107
+ display_name: z.string().readonly().nullish(),
1108
+ first_name: z.string().nullish(),
1109
+ middle_name: z.string().nullish(),
1110
+ last_name: z.string().nullish(),
1111
+ phone_mobile: z.string().nullish(),
1112
+ phone_home: z.string().nullish(),
1113
+ phone_fax: z.string().nullish(),
1114
+ phone_work: z.string().nullish(),
1115
+ email: z.string().nullish(),
1116
+ notes: z.string().nullish(),
1117
+ custom_field_values: z.array(zCustomFieldValue).nullish(),
1118
+ status: z.union([z.enum(["Active", "Archived"]), z.string()]).optional()
1119
+ });
1120
+ var zAccount = z.looseObject({
1121
+ id: z.string().nullish(),
1122
+ display_name: z.string().readonly().nullish(),
1123
+ number: z.number().nullish(),
1124
+ company_name: z.string().nullish(),
1125
+ address_street_1: z.string().nullish(),
1126
+ address_street_2: z.string().nullish(),
1127
+ address_city: z.string().nullish(),
1128
+ address_state: z.string().nullish(),
1129
+ address_country: z.string().nullish(),
1130
+ address_zip_code: z.string().nullish(),
1131
+ tags: z.array(z.string()).nullish(),
1132
+ company_custom_field_values: z.array(zCustomFieldValue).nullish(),
1133
+ assigned_to_users: z.array(zUserReference).nullish(),
1134
+ created_at: z.string().readonly().nullish(),
1135
+ updated_at: z.string().readonly().nullish(),
1136
+ notes: z.string().nullish(),
1137
+ primary_contact: zContact.nullish(),
1138
+ other_contacts: z.array(zContact).nullish()
1139
+ });
1140
+ var zBankAccount = z.looseObject({
1141
+ id: z.string().nullable(),
1142
+ type: z.union([z.enum([
1143
+ "Operating",
1144
+ "Trust",
1145
+ "CreditCard"
1146
+ ]), z.string()]).optional(),
1147
+ name: z.string().nullish()
1148
+ });
1149
+ var zMatter = z.looseObject({
1150
+ id: z.string().nullish(),
1151
+ account_ref: zAccountReference.nullish(),
1152
+ number: z.number().nullish(),
1153
+ display_name: z.string().readonly().nullish(),
1154
+ name: z.string().nullable(),
1155
+ notes: z.string().nullish(),
1156
+ rate: z.string().nullish(),
1157
+ open_date: z.string().nullish(),
1158
+ close_date: z.string().nullish(),
1159
+ statute_of_limitation_date: z.string().nullish(),
1160
+ tags: z.array(z.string()).nullish(),
1161
+ status: z.union([z.enum([
1162
+ "Closed",
1163
+ "Pending",
1164
+ "Open",
1165
+ "Archived"
1166
+ ]), z.string()]),
1167
+ assigned_to_users: z.array(zUserReference).nullish(),
1168
+ custom_field_values: z.array(zCustomFieldValue).nullish(),
1169
+ created_at: z.string().readonly().nullish(),
1170
+ updated_at: z.string().readonly().nullish()
1171
+ });
1172
+ var zMatterReference = z.looseObject({
1173
+ id: z.string().nullable(),
1174
+ display_name: z.string().nullish()
1175
+ });
1176
+ var zCallLog = z.looseObject({
1177
+ id: z.string().nullish(),
1178
+ account_ref: zAccountReference.nullish(),
1179
+ matter_ref: zMatterReference.nullish(),
1180
+ subject: z.string().nullable(),
1181
+ duration: z.number().nullish(),
1182
+ notes: z.string().nullish(),
1183
+ date: z.string().nullish(),
1184
+ call_direction: z.union([z.enum(["Inbound", "Outbound"]), z.string()]).optional(),
1185
+ assigned_to_users: z.array(zUserReference).nullish(),
1186
+ tags: z.array(z.string()).nullish(),
1187
+ created_at: z.string().readonly().nullish(),
1188
+ updated_at: z.string().readonly().nullish()
1189
+ });
1190
+ var zCustomField = z.looseObject({
1191
+ id: z.string().nullish(),
1192
+ label: z.string().nullable(),
1193
+ value_type: z.union([z.enum([
1194
+ "TextBox",
1195
+ "Date",
1196
+ "DateTime",
1197
+ "Number",
1198
+ "Currency",
1199
+ "TextEditor",
1200
+ "DropDownList",
1201
+ "Checkbox",
1202
+ "Contact"
1203
+ ]), z.string()]),
1204
+ dropdown_list_values: z.string().nullish(),
1205
+ help_text: z.string().nullish(),
1206
+ tooltip: z.string().nullish()
1207
+ });
1208
+ var zEmailAddress = z.looseObject({
1209
+ address: z.string().nullable(),
1210
+ display_name: z.string().nullish()
1211
+ });
1212
+ var zFileReference = z.looseObject({
1213
+ id: z.string().nullish(),
1214
+ file_name: z.string().nullish()
1215
+ });
1216
+ var zEmail = z.looseObject({
1217
+ id: z.string().nullish(),
1218
+ subject: z.string().nullable(),
1219
+ cc: z.array(zEmailAddress).nullish(),
1220
+ to: z.array(zEmailAddress).nullish(),
1221
+ from: zEmailAddress.nullish(),
1222
+ body_text: z.string().nullable(),
1223
+ body_html: z.string().nullish(),
1224
+ external_message_id: z.string().nullish(),
1225
+ external_thread_id: z.string().nullish(),
1226
+ account_ref: zAccountReference.nullish(),
1227
+ matter_ref: zMatterReference.nullish(),
1228
+ date: z.string().nullish(),
1229
+ tags: z.array(z.string()).nullish(),
1230
+ attachments: z.array(zFileReference).readonly().nullish(),
1231
+ created_at: z.string().readonly().nullish(),
1232
+ updated_at: z.string().readonly().nullish()
1233
+ });
1234
+ var zEvent = z.looseObject({
1235
+ id: z.string().nullish(),
1236
+ account_ref: zAccountReference.nullish(),
1237
+ matter_ref: zMatterReference.nullish(),
1238
+ subject: z.string().nullable(),
1239
+ location: z.string().nullish(),
1240
+ notes: z.string().nullish(),
1241
+ is_all_day: z.boolean().nullable(),
1242
+ start_date_time: z.string().nullable(),
1243
+ end_date_time: z.string().nullable(),
1244
+ tags: z.array(z.string()).nullish(),
1245
+ assigned_to_users: z.array(zUserReference).nullish(),
1246
+ assigned_to_contacts: z.array(zContactReference).nullish(),
1247
+ created_at: z.string().nullish(),
1248
+ updated_at: z.string().nullish()
1249
+ });
1250
+ var zExpenseCategory = z.looseObject({
1251
+ id: z.string().nullish(),
1252
+ name: z.string().nullish(),
1253
+ created_at: z.string().nullish(),
1254
+ updated_at: z.string().readonly().nullish()
1255
+ });
1256
+ var zExpense = z.looseObject({
1257
+ id: z.string().nullish(),
1258
+ is_billable: z.boolean().nullish(),
1259
+ is_billed: z.boolean().nullish(),
1260
+ date: z.string().nullish(),
1261
+ qty: z.number().nullable(),
1262
+ price: z.number().nullable(),
1263
+ amount: z.number().nullish(),
1264
+ description: z.string().nullish(),
1265
+ private_notes: z.string().nullish(),
1266
+ account_ref: zAccountReference.nullish(),
1267
+ matter_ref: zMatterReference.nullable(),
1268
+ billed_by_user_ref: zUserReference.nullish(),
1269
+ expense_category_ref: zExpenseCategory.nullish(),
1270
+ created_at: z.string().nullish(),
1271
+ updated_at: z.string().nullish()
1272
+ });
1273
+ var zActivityReference = z.looseObject({
1274
+ id: z.string().nullish(),
1275
+ subject: z.string().nullish()
1276
+ });
1277
+ var zFile = z.looseObject({
1278
+ id: z.string().nullish(),
1279
+ account_ref: zAccountReference.nullish(),
1280
+ matter_ref: zMatterReference.nullish(),
1281
+ activity_ref: zActivityReference.nullish(),
1282
+ description: z.string().nullish(),
1283
+ file_name: z.string().nullable(),
1284
+ size: z.number().readonly().nullish(),
1285
+ content_type: z.string().readonly().nullish(),
1286
+ created_at: z.string().readonly().nullish(),
1287
+ updated_at: z.string().readonly().nullish()
1288
+ });
1289
+ var zItemReference = z.looseObject({
1290
+ id: z.string().nullable(),
1291
+ name: z.string().nullish()
1292
+ });
1293
+ var zFlatFee = z.looseObject({
1294
+ id: z.string().nullish(),
1295
+ is_billable: z.boolean().nullish(),
1296
+ is_billed: z.boolean().nullish(),
1297
+ date: z.string().nullable(),
1298
+ qty: z.number().nullable(),
1299
+ price: z.number().nullish(),
1300
+ description: z.string().nullish(),
1301
+ private_notes: z.string().nullish(),
1302
+ account_ref: zAccountReference.nullish(),
1303
+ matter_ref: zMatterReference.nullable(),
1304
+ billed_by_user_ref: zUserReference.nullable(),
1305
+ item_ref: zItemReference.nullable(),
1306
+ created_at: z.string().readonly().nullish(),
1307
+ updated_at: z.string().readonly().nullish()
1308
+ });
1309
+ var zInvoiceLineItem = z.looseObject({
1310
+ quantity: z.number().nullish(),
1311
+ rate: z.number().nullish(),
1312
+ discount: z.number().nullish(),
1313
+ subtotal: z.number().nullish(),
1314
+ tax1_name: z.string().nullish(),
1315
+ tax1_rate: z.string().nullish(),
1316
+ tax1_amount: z.number().nullish(),
1317
+ tax2_name: z.string().nullish(),
1318
+ tax2_rate: z.string().nullish(),
1319
+ tax2_amount: z.number().nullish(),
1320
+ total: z.number().nullish(),
1321
+ date: z.string().nullish(),
1322
+ billed_by: z.string().nullish(),
1323
+ item_name: z.string().nullish(),
1324
+ item_description: z.string().nullish()
1325
+ });
1326
+ var zInvoice = z.looseObject({
1327
+ account_ref: zAccountReference.nullish(),
1328
+ matter_ref: zMatterReference.nullish(),
1329
+ id: z.string().nullish(),
1330
+ issue_date: z.string().nullish(),
1331
+ due_date: z.string().nullish(),
1332
+ items_time_entries: z.array(zInvoiceLineItem).nullish(),
1333
+ items_expenses: z.array(zInvoiceLineItem).nullish(),
1334
+ items_flat_fees: z.array(zInvoiceLineItem).nullish(),
1335
+ subtotal: z.number().nullish(),
1336
+ tax: z.number().nullish(),
1337
+ discount: z.number().nullish(),
1338
+ total: z.number().nullish(),
1339
+ total_paid: z.number().nullish(),
1340
+ total_outstanding: z.number().nullish(),
1341
+ invoice_type: z.union([z.enum([
1342
+ "Sale",
1343
+ "Refund",
1344
+ "Credit"
1345
+ ]), z.string()]).optional(),
1346
+ created_at: z.string().readonly().nullish(),
1347
+ updated_at: z.string().readonly().nullish()
1348
+ });
1349
+ var zItem = z.looseObject({
1350
+ id: z.string().nullish(),
1351
+ name: z.string().nullish(),
1352
+ code: z.string().nullish(),
1353
+ description: z.string().nullish(),
1354
+ rate: z.number().nullable(),
1355
+ created_at: z.string().readonly().nullish(),
1356
+ updated_at: z.string().readonly().nullish()
1357
+ });
1358
+ var zMessage = z.looseObject({
1359
+ id: z.string().nullish(),
1360
+ sender: zUserReference.nullish(),
1361
+ contact_id: z.string().nullish(),
1362
+ contact: zContactReference.nullish(),
1363
+ created_at: z.string().readonly().nullish(),
1364
+ updated_at: z.string().readonly().nullish(),
1365
+ type: z.union([z.enum(["Text", "Secure"]), z.string()]).optional(),
1366
+ matter_id: z.string().nullish(),
1367
+ account_id: z.string().nullish(),
1368
+ subject: z.string().nullish(),
1369
+ body: z.string().nullish(),
1370
+ sent_date: z.string().nullish(),
1371
+ conversation_id: z.string().nullish(),
1372
+ external_conversation_id: z.string().nullish(),
1373
+ firm_text_phone_number: z.string().nullish(),
1374
+ firm_location_name: z.string().nullish(),
1375
+ user_name: z.string().nullish(),
1376
+ user_email: z.string().nullish(),
1377
+ sent_by_contact: z.boolean().nullish()
1378
+ });
1379
+ var zNote = z.looseObject({
1380
+ id: z.string().nullish(),
1381
+ account_ref: zAccountReference.nullish(),
1382
+ matter_ref: zMatterReference.nullish(),
1383
+ subject: z.string().nullable(),
1384
+ note: z.string().nullish(),
1385
+ assigned_to_users: z.array(zUserReference).nullish(),
1386
+ date: z.string().nullish(),
1387
+ tags: z.array(z.string()).nullish(),
1388
+ created_at: z.string().nullish(),
1389
+ updated_at: z.string().nullish()
1390
+ });
1391
+ var zPaymentDetail = z.looseObject({
1392
+ refundedAmount: z.number().nullish(),
1393
+ id: z.string().nullish(),
1394
+ account_ref: zAccountReference.nullable(),
1395
+ matter_ref: zMatterReference.nullish(),
1396
+ number: z.number().nullish(),
1397
+ date: z.string().nullable(),
1398
+ total_amount: z.number().nullable(),
1399
+ unapplied_amount: z.number().nullish(),
1400
+ notes: z.string().nullish(),
1401
+ payee: z.string().nullish(),
1402
+ to_print: z.boolean().nullish(),
1403
+ check_number: z.number().nullish(),
1404
+ bank_account: zBankAccount.nullable(),
1405
+ created_at: z.string().readonly().nullish(),
1406
+ updated_at: z.string().readonly().nullish(),
1407
+ status: z.union([z.enum([
1408
+ "Pending",
1409
+ "Failed",
1410
+ "Success",
1411
+ "Refunded",
1412
+ "RefundPending",
1413
+ "Canceled"
1414
+ ]), z.string()]).optional()
1415
+ });
1416
+ var zPayment = z.looseObject({
1417
+ id: z.string().nullish(),
1418
+ account_ref: zAccountReference.nullable(),
1419
+ matter_ref: zMatterReference.nullish(),
1420
+ number: z.number().nullish(),
1421
+ date: z.string().nullable(),
1422
+ total_amount: z.number().nullable(),
1423
+ unapplied_amount: z.number().nullish(),
1424
+ notes: z.string().nullish(),
1425
+ payee: z.string().nullish(),
1426
+ to_print: z.boolean().nullish(),
1427
+ check_number: z.number().nullish(),
1428
+ bank_account: zBankAccount.nullable(),
1429
+ created_at: z.string().readonly().nullish(),
1430
+ updated_at: z.string().readonly().nullish(),
1431
+ status: z.union([z.enum([
1432
+ "Pending",
1433
+ "Failed",
1434
+ "Success",
1435
+ "Refunded",
1436
+ "RefundPending",
1437
+ "Canceled"
1438
+ ]), z.string()]).optional()
1439
+ });
1440
+ var zRelationship = z.looseObject({
1441
+ id: z.string().nullish(),
1442
+ contact_ref: zContactReference.nullable(),
1443
+ matter_ref: zMatterReference.nullable(),
1444
+ name: z.string().nullable(),
1445
+ notes: z.string().nullish()
1446
+ });
1447
+ var zTag = z.looseObject({
1448
+ created_at: z.string().nullish(),
1449
+ name: z.string().nullish()
1450
+ });
1451
+ var zTask = z.looseObject({
1452
+ id: z.string().nullish(),
1453
+ account_ref: zAccountReference.nullish(),
1454
+ matter_ref: zMatterReference.nullish(),
1455
+ subject: z.string().nullable(),
1456
+ notes: z.string().nullish(),
1457
+ priority: z.union([z.enum([
1458
+ "Low",
1459
+ "Medium",
1460
+ "High"
1461
+ ]), z.string()]).optional(),
1462
+ status: z.union([z.enum([
1463
+ "NotCompleted",
1464
+ "InProgress",
1465
+ "Completed",
1466
+ "Conditional"
1467
+ ]), z.string()]).optional(),
1468
+ due_date: z.string().nullish(),
1469
+ assigned_to_users: z.array(zUserReference).nullish(),
1470
+ assigned_to_contacts: z.array(zContactReference).nullish(),
1471
+ tags: z.array(z.string()).nullish(),
1472
+ created_at: z.string().nullish(),
1473
+ updated_at: z.string().nullish()
1474
+ });
1475
+ var zTimeEntry = z.looseObject({
1476
+ id: z.string().nullish(),
1477
+ is_billable: z.boolean().nullish(),
1478
+ is_billed: z.boolean().nullish(),
1479
+ date: z.string().nullable(),
1480
+ hours: z.number().nullable(),
1481
+ rate: z.number().nullish(),
1482
+ description: z.string().nullish(),
1483
+ private_notes: z.string().nullish(),
1484
+ account_ref: zAccountReference.nullish(),
1485
+ matter_ref: zMatterReference.nullable(),
1486
+ billed_by_user_ref: zUserReference.nullable(),
1487
+ item_ref: zItemReference.nullish(),
1488
+ created_at: z.string().readonly().nullish(),
1489
+ updated_at: z.string().readonly().nullish()
1490
+ });
1491
+ var zUser = z.looseObject({
1492
+ id: z.string().nullish(),
1493
+ is_active: z.boolean().nullish(),
1494
+ display_name: z.string().nullish(),
1495
+ first_name: z.string().nullish(),
1496
+ last_name: z.string().nullish(),
1497
+ middle_name: z.string().nullish(),
1498
+ email: z.string().nullish(),
1499
+ created_at: z.string().readonly().nullish(),
1500
+ updated_at: z.string().readonly().nullish()
1501
+ });
1502
+ var zContactWritable = z.looseObject({
1503
+ id: z.string().nullish(),
1504
+ account_ref: zAccountReference.nullish(),
1505
+ first_name: z.string().nullish(),
1506
+ middle_name: z.string().nullish(),
1507
+ last_name: z.string().nullish(),
1508
+ phone_mobile: z.string().nullish(),
1509
+ phone_home: z.string().nullish(),
1510
+ phone_fax: z.string().nullish(),
1511
+ phone_work: z.string().nullish(),
1512
+ email: z.string().nullish(),
1513
+ notes: z.string().nullish(),
1514
+ custom_field_values: z.array(zCustomFieldValue).nullish()
1515
+ });
1516
+ var zAccountWritable = z.looseObject({
1517
+ id: z.string().nullish(),
1518
+ number: z.number().nullish(),
1519
+ company_name: z.string().nullish(),
1520
+ address_street_1: z.string().nullish(),
1521
+ address_street_2: z.string().nullish(),
1522
+ address_city: z.string().nullish(),
1523
+ address_state: z.string().nullish(),
1524
+ address_country: z.string().nullish(),
1525
+ address_zip_code: z.string().nullish(),
1526
+ tags: z.array(z.string()).nullish(),
1527
+ company_custom_field_values: z.array(zCustomFieldValue).nullish(),
1528
+ assigned_to_users: z.array(zUserReference).nullish(),
1529
+ notes: z.string().nullish(),
1530
+ primary_contact: zContactWritable.nullish(),
1531
+ other_contacts: z.array(zContactWritable).nullish()
1532
+ });
1533
+ var zMatterWritable = z.looseObject({
1534
+ id: z.string().nullish(),
1535
+ account_ref: zAccountReference.nullish(),
1536
+ number: z.number().nullish(),
1537
+ name: z.string().nullable(),
1538
+ notes: z.string().nullish(),
1539
+ rate: z.string().nullish(),
1540
+ open_date: z.string().nullish(),
1541
+ close_date: z.string().nullish(),
1542
+ statute_of_limitation_date: z.string().nullish(),
1543
+ tags: z.array(z.string()).nullish(),
1544
+ status: z.union([z.enum([
1545
+ "Closed",
1546
+ "Pending",
1547
+ "Open",
1548
+ "Archived"
1549
+ ]), z.string()]),
1550
+ assigned_to_users: z.array(zUserReference).nullish(),
1551
+ custom_field_values: z.array(zCustomFieldValue).nullish()
1552
+ });
1553
+ var zCallLogWritable = z.looseObject({
1554
+ id: z.string().nullish(),
1555
+ account_ref: zAccountReference.nullish(),
1556
+ matter_ref: zMatterReference.nullish(),
1557
+ subject: z.string().nullable(),
1558
+ duration: z.number().nullish(),
1559
+ notes: z.string().nullish(),
1560
+ date: z.string().nullish(),
1561
+ call_direction: z.union([z.enum(["Inbound", "Outbound"]), z.string()]).optional(),
1562
+ assigned_to_users: z.array(zUserReference).nullish(),
1563
+ tags: z.array(z.string()).nullish()
1564
+ });
1565
+ var zEmailWritable = z.looseObject({
1566
+ id: z.string().nullish(),
1567
+ subject: z.string().nullable(),
1568
+ cc: z.array(zEmailAddress).nullish(),
1569
+ to: z.array(zEmailAddress).nullish(),
1570
+ from: zEmailAddress.nullish(),
1571
+ body_text: z.string().nullable(),
1572
+ body_html: z.string().nullish(),
1573
+ external_message_id: z.string().nullish(),
1574
+ external_thread_id: z.string().nullish(),
1575
+ account_ref: zAccountReference.nullish(),
1576
+ matter_ref: zMatterReference.nullish(),
1577
+ date: z.string().nullish(),
1578
+ tags: z.array(z.string()).nullish()
1579
+ });
1580
+ var zExpenseCategoryWritable = z.looseObject({
1581
+ id: z.string().nullish(),
1582
+ name: z.string().nullish(),
1583
+ created_at: z.string().nullish()
1584
+ });
1585
+ var zExpenseWritable = z.looseObject({
1586
+ id: z.string().nullish(),
1587
+ is_billable: z.boolean().nullish(),
1588
+ is_billed: z.boolean().nullish(),
1589
+ date: z.string().nullish(),
1590
+ qty: z.number().nullable(),
1591
+ price: z.number().nullable(),
1592
+ amount: z.number().nullish(),
1593
+ description: z.string().nullish(),
1594
+ private_notes: z.string().nullish(),
1595
+ account_ref: zAccountReference.nullish(),
1596
+ matter_ref: zMatterReference.nullable(),
1597
+ billed_by_user_ref: zUserReference.nullish(),
1598
+ expense_category_ref: zExpenseCategoryWritable.nullish(),
1599
+ created_at: z.string().nullish(),
1600
+ updated_at: z.string().nullish()
1601
+ });
1602
+ var zFileWritable = z.looseObject({
1603
+ id: z.string().nullish(),
1604
+ account_ref: zAccountReference.nullish(),
1605
+ matter_ref: zMatterReference.nullish(),
1606
+ activity_ref: zActivityReference.nullish(),
1607
+ description: z.string().nullish(),
1608
+ file_name: z.string().nullable()
1609
+ });
1610
+ var zFlatFeeWritable = z.looseObject({
1611
+ id: z.string().nullish(),
1612
+ is_billable: z.boolean().nullish(),
1613
+ is_billed: z.boolean().nullish(),
1614
+ date: z.string().nullable(),
1615
+ qty: z.number().nullable(),
1616
+ price: z.number().nullish(),
1617
+ description: z.string().nullish(),
1618
+ private_notes: z.string().nullish(),
1619
+ account_ref: zAccountReference.nullish(),
1620
+ matter_ref: zMatterReference.nullable(),
1621
+ billed_by_user_ref: zUserReference.nullable(),
1622
+ item_ref: zItemReference.nullable()
1623
+ });
1624
+ var zInvoiceWritable = z.looseObject({
1625
+ account_ref: zAccountReference.nullish(),
1626
+ matter_ref: zMatterReference.nullish(),
1627
+ id: z.string().nullish(),
1628
+ issue_date: z.string().nullish(),
1629
+ due_date: z.string().nullish(),
1630
+ items_time_entries: z.array(zInvoiceLineItem).nullish(),
1631
+ items_expenses: z.array(zInvoiceLineItem).nullish(),
1632
+ items_flat_fees: z.array(zInvoiceLineItem).nullish(),
1633
+ subtotal: z.number().nullish(),
1634
+ tax: z.number().nullish(),
1635
+ discount: z.number().nullish(),
1636
+ total: z.number().nullish(),
1637
+ total_paid: z.number().nullish(),
1638
+ total_outstanding: z.number().nullish(),
1639
+ invoice_type: z.union([z.enum([
1640
+ "Sale",
1641
+ "Refund",
1642
+ "Credit"
1643
+ ]), z.string()]).optional()
1644
+ });
1645
+ var zItemWritable = z.looseObject({
1646
+ id: z.string().nullish(),
1647
+ name: z.string().nullish(),
1648
+ code: z.string().nullish(),
1649
+ description: z.string().nullish(),
1650
+ rate: z.number().nullable()
1651
+ });
1652
+ var zMessageWritable = z.looseObject({
1653
+ id: z.string().nullish(),
1654
+ sender: zUserReference.nullish(),
1655
+ contact_id: z.string().nullish(),
1656
+ contact: zContactReference.nullish(),
1657
+ type: z.union([z.enum(["Text", "Secure"]), z.string()]).optional(),
1658
+ matter_id: z.string().nullish(),
1659
+ account_id: z.string().nullish(),
1660
+ subject: z.string().nullish(),
1661
+ body: z.string().nullish(),
1662
+ sent_date: z.string().nullish(),
1663
+ conversation_id: z.string().nullish(),
1664
+ external_conversation_id: z.string().nullish(),
1665
+ firm_text_phone_number: z.string().nullish(),
1666
+ firm_location_name: z.string().nullish(),
1667
+ user_name: z.string().nullish(),
1668
+ user_email: z.string().nullish(),
1669
+ sent_by_contact: z.boolean().nullish()
1670
+ });
1671
+ var zPaymentDetailWritable = z.looseObject({
1672
+ refundedAmount: z.number().nullish(),
1673
+ id: z.string().nullish(),
1674
+ account_ref: zAccountReference.nullable(),
1675
+ matter_ref: zMatterReference.nullish(),
1676
+ number: z.number().nullish(),
1677
+ date: z.string().nullable(),
1678
+ total_amount: z.number().nullable(),
1679
+ unapplied_amount: z.number().nullish(),
1680
+ notes: z.string().nullish(),
1681
+ payee: z.string().nullish(),
1682
+ to_print: z.boolean().nullish(),
1683
+ check_number: z.number().nullish(),
1684
+ bank_account: zBankAccount.nullable(),
1685
+ status: z.union([z.enum([
1686
+ "Pending",
1687
+ "Failed",
1688
+ "Success",
1689
+ "Refunded",
1690
+ "RefundPending",
1691
+ "Canceled"
1692
+ ]), z.string()]).optional()
1693
+ });
1694
+ var zPaymentWritable = z.looseObject({
1695
+ id: z.string().nullish(),
1696
+ account_ref: zAccountReference.nullable(),
1697
+ matter_ref: zMatterReference.nullish(),
1698
+ number: z.number().nullish(),
1699
+ date: z.string().nullable(),
1700
+ total_amount: z.number().nullable(),
1701
+ unapplied_amount: z.number().nullish(),
1702
+ notes: z.string().nullish(),
1703
+ payee: z.string().nullish(),
1704
+ to_print: z.boolean().nullish(),
1705
+ check_number: z.number().nullish(),
1706
+ bank_account: zBankAccount.nullable(),
1707
+ status: z.union([z.enum([
1708
+ "Pending",
1709
+ "Failed",
1710
+ "Success",
1711
+ "Refunded",
1712
+ "RefundPending",
1713
+ "Canceled"
1714
+ ]), z.string()]).optional()
1715
+ });
1716
+ var zTimeEntryWritable = z.looseObject({
1717
+ id: z.string().nullish(),
1718
+ is_billable: z.boolean().nullish(),
1719
+ is_billed: z.boolean().nullish(),
1720
+ date: z.string().nullable(),
1721
+ hours: z.number().nullable(),
1722
+ rate: z.number().nullish(),
1723
+ description: z.string().nullish(),
1724
+ private_notes: z.string().nullish(),
1725
+ account_ref: zAccountReference.nullish(),
1726
+ matter_ref: zMatterReference.nullable(),
1727
+ billed_by_user_ref: zUserReference.nullable(),
1728
+ item_ref: zItemReference.nullish()
1729
+ });
1730
+ var zUserWritable = z.looseObject({
1731
+ id: z.string().nullish(),
1732
+ is_active: z.boolean().nullish(),
1733
+ display_name: z.string().nullish(),
1734
+ first_name: z.string().nullish(),
1735
+ last_name: z.string().nullish(),
1736
+ middle_name: z.string().nullish(),
1737
+ email: z.string().nullish()
1738
+ });
1739
+ var zNote2 = zNote;
1740
+ var zTimeEntry2 = zTimeEntryWritable;
1741
+ var zExpenseCategory2 = zExpenseCategoryWritable;
1742
+ var zBankAccount2 = zBankAccount;
1743
+ var zMessage2 = zMessageWritable;
1744
+ var zEmail2 = zEmailWritable;
1745
+ var zItem2 = zItemWritable;
1746
+ var zRelationship2 = zRelationship;
1747
+ var zExpense2 = zExpenseWritable;
1748
+ var zAccount2 = zAccountWritable;
1749
+ var zCallLog2 = zCallLogWritable;
1750
+ var zEvent2 = zEvent;
1751
+ var zFlatFee2 = zFlatFeeWritable;
1752
+ var zMatter2 = zMatterWritable;
1753
+ var zTask2 = zTask;
1754
+ var zAccountsGetAccountData = z.looseObject({
1755
+ body: z.never().optional(),
1756
+ path: z.looseObject({
1757
+ id: z.string()
1758
+ }),
1759
+ query: z.never().optional()
1760
+ });
1761
+ var zAccountsDeleteData = z.looseObject({
1762
+ body: z.never().optional(),
1763
+ path: z.never().optional(),
1764
+ query: z.looseObject({
1765
+ id: z.string()
1766
+ })
1767
+ });
1768
+ var zAccountsGetAccountsData = z.looseObject({
1769
+ body: z.never().optional(),
1770
+ path: z.never().optional(),
1771
+ query: z.looseObject({
1772
+ assigned_to_user_id: z.string().optional(),
1773
+ created_since: z.string().optional(),
1774
+ updated_since: z.string().optional(),
1775
+ search_text: z.string().optional(),
1776
+ account_tag: z.string().optional(),
1777
+ apiConsumer: z.union([z.enum(["Unknown", "Zapier"]), z.string()]).optional()
1778
+ }).optional()
1779
+ });
1780
+ var zAccountsPostAccountData = z.looseObject({
1781
+ body: zAccount2,
1782
+ path: z.never().optional(),
1783
+ query: z.never().optional()
1784
+ });
1785
+ var zAccountsPutAccountData = z.looseObject({
1786
+ body: zAccount2,
1787
+ path: z.never().optional(),
1788
+ query: z.looseObject({
1789
+ id: z.string()
1790
+ })
1791
+ });
1792
+ var zBankAccountsGetBankAccountData = z.looseObject({
1793
+ body: z.never().optional(),
1794
+ path: z.looseObject({
1795
+ id: z.string()
1796
+ }),
1797
+ query: z.never().optional()
1798
+ });
1799
+ var zBankAccountsDeleteData = z.looseObject({
1800
+ body: z.never().optional(),
1801
+ path: z.never().optional(),
1802
+ query: z.looseObject({
1803
+ id: z.string()
1804
+ })
1805
+ });
1806
+ var zBankAccountsGetBankAccountsData = z.looseObject({
1807
+ body: z.never().optional(),
1808
+ path: z.never().optional(),
1809
+ query: z.looseObject({
1810
+ created_since: z.string().optional(),
1811
+ updated_since: z.string().optional()
1812
+ }).optional()
1813
+ });
1814
+ var zBankAccountsPostBankAccountData = z.looseObject({
1815
+ body: zBankAccount2,
1816
+ path: z.never().optional(),
1817
+ query: z.never().optional()
1818
+ });
1819
+ var zBankAccountsPutBankAccountData = z.looseObject({
1820
+ body: zBankAccount2,
1821
+ path: z.never().optional(),
1822
+ query: z.looseObject({
1823
+ id: z.string()
1824
+ })
1825
+ });
1826
+ var zCallLogsGetCallLogData = z.looseObject({
1827
+ body: z.never().optional(),
1828
+ path: z.looseObject({
1829
+ id: z.string()
1830
+ }),
1831
+ query: z.never().optional()
1832
+ });
1833
+ var zCallLogsDeleteData = z.looseObject({
1834
+ body: z.never().optional(),
1835
+ path: z.never().optional(),
1836
+ query: z.looseObject({
1837
+ id: z.string()
1838
+ })
1839
+ });
1840
+ var zCallLogsGetCallLogsData = z.looseObject({
1841
+ body: z.never().optional(),
1842
+ path: z.never().optional(),
1843
+ query: z.looseObject({
1844
+ assigned_to_user_id: z.string().optional(),
1845
+ account_id: z.string().optional(),
1846
+ matter_id: z.string().optional(),
1847
+ created_since: z.string().optional(),
1848
+ updated_since: z.string().optional(),
1849
+ date_from: z.string().optional(),
1850
+ date_to: z.string().optional(),
1851
+ activity_tag: z.string().optional()
1852
+ }).optional()
1853
+ });
1854
+ var zCallLogsPostCallLogData = z.looseObject({
1855
+ body: zCallLog2,
1856
+ path: z.never().optional(),
1857
+ query: z.never().optional()
1858
+ });
1859
+ var zCallLogsPutCallLogData = z.looseObject({
1860
+ body: zCallLog2,
1861
+ path: z.never().optional(),
1862
+ query: z.looseObject({
1863
+ id: z.string()
1864
+ })
1865
+ });
1866
+ var zContactsGetContactData = z.looseObject({
1867
+ body: z.never().optional(),
1868
+ path: z.looseObject({
1869
+ id: z.string()
1870
+ }),
1871
+ query: z.never().optional()
1872
+ });
1873
+ var zContactsGetContactsData = z.looseObject({
1874
+ body: z.never().optional(),
1875
+ path: z.never().optional(),
1876
+ query: z.looseObject({
1877
+ assigned_to_user_id: z.string().optional(),
1878
+ account_id: z.string().optional(),
1879
+ status: z.union([z.enum(["Active", "Archived"]), z.string()]).optional(),
1880
+ created_since: z.string().optional(),
1881
+ updated_since: z.string().optional(),
1882
+ search_text: z.string().optional(),
1883
+ account_tag: z.string().optional(),
1884
+ company_name: z.string().optional()
1885
+ }).optional()
1886
+ });
1887
+ var zCustomFieldsGetCustomFieldsForAccountData = z.looseObject({
1888
+ body: z.never().optional(),
1889
+ path: z.never().optional(),
1890
+ query: z.looseObject({
1891
+ created_since: z.string().optional(),
1892
+ updated_since: z.string().optional()
1893
+ }).optional()
1894
+ });
1895
+ var zCustomFieldsGetCustomFieldsForMatterData = z.looseObject({
1896
+ body: z.never().optional(),
1897
+ path: z.never().optional(),
1898
+ query: z.looseObject({
1899
+ created_since: z.string().optional(),
1900
+ updated_since: z.string().optional()
1901
+ }).optional()
1902
+ });
1903
+ var zCustomFieldsGetCustomFieldsForContactData = z.looseObject({
1904
+ body: z.never().optional(),
1905
+ path: z.never().optional(),
1906
+ query: z.looseObject({
1907
+ created_since: z.string().optional(),
1908
+ updated_since: z.string().optional()
1909
+ }).optional()
1910
+ });
1911
+ var zCustomFieldsGetCustomFieldData = z.looseObject({
1912
+ body: z.never().optional(),
1913
+ path: z.looseObject({
1914
+ id: z.string()
1915
+ }),
1916
+ query: z.never().optional()
1917
+ });
1918
+ var zEmailsGetEmailData = z.looseObject({
1919
+ body: z.never().optional(),
1920
+ path: z.looseObject({
1921
+ id: z.string()
1922
+ }),
1923
+ query: z.never().optional()
1924
+ });
1925
+ var zEmailsDeleteData = z.looseObject({
1926
+ body: z.never().optional(),
1927
+ path: z.never().optional(),
1928
+ query: z.looseObject({
1929
+ id: z.string()
1930
+ })
1931
+ });
1932
+ var zEmailsGetEmailsData = z.looseObject({
1933
+ body: z.never().optional(),
1934
+ path: z.never().optional(),
1935
+ query: z.looseObject({
1936
+ assigned_to_user_id: z.string().optional(),
1937
+ account_id: z.string().optional(),
1938
+ matter_id: z.string().optional(),
1939
+ created_since: z.string().optional(),
1940
+ updated_since: z.string().optional(),
1941
+ activity_tag: z.string().optional(),
1942
+ external_message_id: z.string().optional()
1943
+ }).optional()
1944
+ });
1945
+ var zEmailsPostEmailData = z.looseObject({
1946
+ body: zEmail2,
1947
+ path: z.never().optional(),
1948
+ query: z.never().optional()
1949
+ });
1950
+ var zEmailsPutAccountData = z.looseObject({
1951
+ body: zEmail2,
1952
+ path: z.never().optional(),
1953
+ query: z.looseObject({
1954
+ id: z.string()
1955
+ })
1956
+ });
1957
+ var zEventsGetEventData = z.looseObject({
1958
+ body: z.never().optional(),
1959
+ path: z.looseObject({
1960
+ id: z.string()
1961
+ }),
1962
+ query: z.never().optional()
1963
+ });
1964
+ var zEventsDeleteData = z.looseObject({
1965
+ body: z.never().optional(),
1966
+ path: z.never().optional(),
1967
+ query: z.looseObject({
1968
+ id: z.string()
1969
+ })
1970
+ });
1971
+ var zEventsGetEventsData = z.looseObject({
1972
+ body: z.never().optional(),
1973
+ path: z.never().optional(),
1974
+ query: z.looseObject({
1975
+ assigned_to_user_id: z.string().optional(),
1976
+ account_id: z.string().optional(),
1977
+ matter_id: z.string().optional(),
1978
+ created_since: z.string().optional(),
1979
+ updated_since: z.string().optional(),
1980
+ date_from: z.string().optional(),
1981
+ date_to: z.string().optional(),
1982
+ activity_tag: z.string().optional()
1983
+ }).optional()
1984
+ });
1985
+ var zEventsPostAccountData = z.looseObject({
1986
+ body: zEvent2,
1987
+ path: z.never().optional(),
1988
+ query: z.never().optional()
1989
+ });
1990
+ var zEventsPutAccountData = z.looseObject({
1991
+ body: zEvent2,
1992
+ path: z.never().optional(),
1993
+ query: z.looseObject({
1994
+ id: z.string()
1995
+ })
1996
+ });
1997
+ var zExpenseCategoriesGetExpenseCategoryData = z.looseObject({
1998
+ body: z.never().optional(),
1999
+ path: z.looseObject({
2000
+ id: z.string()
2001
+ }),
2002
+ query: z.never().optional()
2003
+ });
2004
+ var zExpenseCategoriesDeleteData = z.looseObject({
2005
+ body: z.never().optional(),
2006
+ path: z.never().optional(),
2007
+ query: z.looseObject({
2008
+ id: z.string()
2009
+ })
2010
+ });
2011
+ var zExpenseCategoriesGetExpenseCategoriesData = z.looseObject({
2012
+ body: z.never().optional(),
2013
+ path: z.never().optional(),
2014
+ query: z.looseObject({
2015
+ created_since: z.string().optional(),
2016
+ updated_since: z.string().optional()
2017
+ }).optional()
2018
+ });
2019
+ var zExpenseCategoriesPostExpenseCategoryData = z.looseObject({
2020
+ body: zExpenseCategory2,
2021
+ path: z.never().optional(),
2022
+ query: z.never().optional()
2023
+ });
2024
+ var zExpenseCategoriesPutExpenseCategoryData = z.looseObject({
2025
+ body: zExpenseCategory2,
2026
+ path: z.never().optional(),
2027
+ query: z.looseObject({
2028
+ id: z.string()
2029
+ })
2030
+ });
2031
+ var zExpensesGetExpenseData = z.looseObject({
2032
+ body: z.never().optional(),
2033
+ path: z.looseObject({
2034
+ id: z.string()
2035
+ }),
2036
+ query: z.never().optional()
2037
+ });
2038
+ var zExpensesDeleteData = z.looseObject({
2039
+ body: z.never().optional(),
2040
+ path: z.never().optional(),
2041
+ query: z.looseObject({
2042
+ id: z.string()
2043
+ })
2044
+ });
2045
+ var zExpensesGetExpensessData = z.looseObject({
2046
+ body: z.never().optional(),
2047
+ path: z.never().optional(),
2048
+ query: z.looseObject({
2049
+ account_id: z.string().optional(),
2050
+ matter_id: z.string().optional(),
2051
+ billed_by_user_id: z.string().optional(),
2052
+ expense_category_id: z.string().optional(),
2053
+ created_since: z.string().optional(),
2054
+ updated_since: z.string().optional(),
2055
+ date_from: z.string().optional(),
2056
+ date_to: z.string().optional()
2057
+ }).optional()
2058
+ });
2059
+ var zExpensesPostAccountData = z.looseObject({
2060
+ body: zExpense2,
2061
+ path: z.never().optional(),
2062
+ query: z.never().optional()
2063
+ });
2064
+ var zExpensesPutAccountData = z.looseObject({
2065
+ body: zExpense2,
2066
+ path: z.never().optional(),
2067
+ query: z.looseObject({
2068
+ id: z.string()
2069
+ })
2070
+ });
2071
+ var zFilesGetFileData = z.looseObject({
2072
+ body: z.never().optional(),
2073
+ path: z.looseObject({
2074
+ id: z.string()
2075
+ }),
2076
+ query: z.never().optional()
2077
+ });
2078
+ var zFilesDownloadFileData = z.looseObject({
2079
+ body: z.never().optional(),
2080
+ path: z.looseObject({
2081
+ id: z.string()
2082
+ }),
2083
+ query: z.never().optional()
2084
+ });
2085
+ var zFilesPostFileToBoxData = z.looseObject({
2086
+ body: z.never().optional(),
2087
+ path: z.never().optional(),
2088
+ query: z.never().optional()
2089
+ });
2090
+ var zFilesPostFileToBoxResponse = z.record(z.string(), z.unknown());
2091
+ var zFilesDeleteData = z.looseObject({
2092
+ body: z.never().optional(),
2093
+ path: z.never().optional(),
2094
+ query: z.looseObject({
2095
+ id: z.string()
2096
+ })
2097
+ });
2098
+ var zFilesGetFilesData = z.looseObject({
2099
+ body: z.never().optional(),
2100
+ path: z.never().optional(),
2101
+ query: z.looseObject({
2102
+ created_since: z.string().optional(),
2103
+ updated_since: z.string().optional(),
2104
+ search_text: z.string().optional(),
2105
+ account_id: z.string().optional(),
2106
+ matter_id: z.string().optional(),
2107
+ activity_id: z.string().optional(),
2108
+ created_by_user_id: z.string().optional()
2109
+ }).optional()
2110
+ });
2111
+ var zFilesPostFileData = z.looseObject({
2112
+ body: z.never().optional(),
2113
+ path: z.never().optional(),
2114
+ query: z.never().optional()
2115
+ });
2116
+ var zFilesPutFileData = z.looseObject({
2117
+ body: zFileWritable,
2118
+ path: z.never().optional(),
2119
+ query: z.looseObject({
2120
+ id: z.string()
2121
+ })
2122
+ });
2123
+ var zFlatFeesGetFlatFeeData = z.looseObject({
2124
+ body: z.never().optional(),
2125
+ path: z.looseObject({
2126
+ id: z.string()
2127
+ }),
2128
+ query: z.never().optional()
2129
+ });
2130
+ var zFlatFeesDeleteData = z.looseObject({
2131
+ body: z.never().optional(),
2132
+ path: z.never().optional(),
2133
+ query: z.looseObject({
2134
+ id: z.string()
2135
+ })
2136
+ });
2137
+ var zFlatFeesGetFlatFeesData = z.looseObject({
2138
+ body: z.never().optional(),
2139
+ path: z.never().optional(),
2140
+ query: z.looseObject({
2141
+ account_id: z.string().optional(),
2142
+ matter_id: z.string().optional(),
2143
+ user_id: z.string().optional(),
2144
+ item_id: z.string().optional(),
2145
+ created_since: z.string().optional(),
2146
+ updated_since: z.string().optional(),
2147
+ date_from: z.string().optional(),
2148
+ date_to: z.string().optional()
2149
+ }).optional()
2150
+ });
2151
+ var zFlatFeesPostAccountData = z.looseObject({
2152
+ body: zFlatFee2,
2153
+ path: z.never().optional(),
2154
+ query: z.never().optional()
2155
+ });
2156
+ var zFlatFeesPutAccountData = z.looseObject({
2157
+ body: zFlatFee2,
2158
+ path: z.never().optional(),
2159
+ query: z.looseObject({
2160
+ id: z.string()
2161
+ })
2162
+ });
2163
+ var zInvoicesGetInvoiceData = z.looseObject({
2164
+ body: z.never().optional(),
2165
+ path: z.looseObject({
2166
+ id: z.string()
2167
+ }),
2168
+ query: z.never().optional()
2169
+ });
2170
+ var zInvoicesDeleteData = z.looseObject({
2171
+ body: z.never().optional(),
2172
+ path: z.never().optional(),
2173
+ query: z.looseObject({
2174
+ id: z.string()
2175
+ })
2176
+ });
2177
+ var zInvoicesGetInvoicesData = z.looseObject({
2178
+ body: z.never().optional(),
2179
+ path: z.never().optional(),
2180
+ query: z.looseObject({
2181
+ account_id: z.string().optional(),
2182
+ matter_id: z.string().optional(),
2183
+ created_since: z.string().optional(),
2184
+ updated_since: z.string().optional(),
2185
+ date_from: z.string().optional(),
2186
+ date_to: z.string().optional()
2187
+ }).optional()
2188
+ });
2189
+ var zItemsGetItemData = z.looseObject({
2190
+ body: z.never().optional(),
2191
+ path: z.looseObject({
2192
+ id: z.string()
2193
+ }),
2194
+ query: z.never().optional()
2195
+ });
2196
+ var zItemsDeleteData = z.looseObject({
2197
+ body: z.never().optional(),
2198
+ path: z.never().optional(),
2199
+ query: z.looseObject({
2200
+ id: z.string()
2201
+ })
2202
+ });
2203
+ var zItemsGetItemsData = z.looseObject({
2204
+ body: z.never().optional(),
2205
+ path: z.never().optional(),
2206
+ query: z.looseObject({
2207
+ created_since: z.string().optional(),
2208
+ updated_since: z.string().optional()
2209
+ }).optional()
2210
+ });
2211
+ var zItemsPostItemData = z.looseObject({
2212
+ body: zItem2,
2213
+ path: z.never().optional(),
2214
+ query: z.never().optional()
2215
+ });
2216
+ var zItemsPutItemData = z.looseObject({
2217
+ body: zItem2,
2218
+ path: z.never().optional(),
2219
+ query: z.looseObject({
2220
+ id: z.string()
2221
+ })
2222
+ });
2223
+ var zMattersGetMatterData = z.looseObject({
2224
+ body: z.never().optional(),
2225
+ path: z.looseObject({
2226
+ id: z.string()
2227
+ }),
2228
+ query: z.never().optional()
2229
+ });
2230
+ var zMattersDeleteData = z.looseObject({
2231
+ body: z.never().optional(),
2232
+ path: z.never().optional(),
2233
+ query: z.looseObject({
2234
+ id: z.string()
2235
+ })
2236
+ });
2237
+ var zMattersGetMattersData = z.looseObject({
2238
+ body: z.never().optional(),
2239
+ path: z.never().optional(),
2240
+ query: z.looseObject({
2241
+ assigned_to_user_id: z.string().optional(),
2242
+ account_id: z.string().optional(),
2243
+ status: z.union([z.enum([
2244
+ "Closed",
2245
+ "Pending",
2246
+ "Open",
2247
+ "Archived"
2248
+ ]), z.string()]).optional(),
2249
+ created_since: z.string().optional(),
2250
+ updated_since: z.string().optional(),
2251
+ search_text: z.string().optional(),
2252
+ account_tag: z.string().optional(),
2253
+ matter_tag: z.string().optional()
2254
+ }).optional()
2255
+ });
2256
+ var zMattersPostAccountData = z.looseObject({
2257
+ body: zMatter2,
2258
+ path: z.never().optional(),
2259
+ query: z.never().optional()
2260
+ });
2261
+ var zMattersPutAccountData = z.looseObject({
2262
+ body: zMatter2,
2263
+ path: z.never().optional(),
2264
+ query: z.looseObject({
2265
+ id: z.string()
2266
+ })
2267
+ });
2268
+ var zMessagesDeleteData = z.looseObject({
2269
+ body: z.never().optional(),
2270
+ path: z.never().optional(),
2271
+ query: z.looseObject({
2272
+ id: z.string()
2273
+ })
2274
+ });
2275
+ var zMessagesGetMessagesAsyncData = z.looseObject({
2276
+ body: z.never().optional(),
2277
+ path: z.never().optional(),
2278
+ query: z.never().optional()
2279
+ });
2280
+ var zMessagesPostMessageData = z.looseObject({
2281
+ body: zMessage2,
2282
+ path: z.never().optional(),
2283
+ query: z.never().optional()
2284
+ });
2285
+ var zMessagesPutMessageData = z.looseObject({
2286
+ body: zMessage2,
2287
+ path: z.never().optional(),
2288
+ query: z.looseObject({
2289
+ id: z.string()
2290
+ })
2291
+ });
2292
+ var zNotesGetNoteData = z.looseObject({
2293
+ body: z.never().optional(),
2294
+ path: z.looseObject({
2295
+ id: z.string()
2296
+ }),
2297
+ query: z.never().optional()
2298
+ });
2299
+ var zNotesDeleteData = z.looseObject({
2300
+ body: z.never().optional(),
2301
+ path: z.never().optional(),
2302
+ query: z.looseObject({
2303
+ id: z.string()
2304
+ })
2305
+ });
2306
+ var zNotesGetNotesData = z.looseObject({
2307
+ body: z.never().optional(),
2308
+ path: z.never().optional(),
2309
+ query: z.looseObject({
2310
+ assigned_to_user_id: z.string().optional(),
2311
+ account_id: z.string().optional(),
2312
+ matter_id: z.string().optional(),
2313
+ created_since: z.string().optional(),
2314
+ updated_since: z.string().optional(),
2315
+ date_from: z.string().optional(),
2316
+ date_to: z.string().optional(),
2317
+ activity_tag: z.string().optional()
2318
+ }).optional()
2319
+ });
2320
+ var zNotesPostNoteData = z.looseObject({
2321
+ body: zNote2,
2322
+ path: z.never().optional(),
2323
+ query: z.never().optional()
2324
+ });
2325
+ var zNotesPutNoteData = z.looseObject({
2326
+ body: zNote2,
2327
+ path: z.never().optional(),
2328
+ query: z.looseObject({
2329
+ id: z.string()
2330
+ })
2331
+ });
2332
+ var zPaymentsGetPaymentData = z.looseObject({
2333
+ body: z.never().optional(),
2334
+ path: z.looseObject({
2335
+ id: z.string()
2336
+ }),
2337
+ query: z.never().optional()
2338
+ });
2339
+ var zPaymentsDeleteData = z.looseObject({
2340
+ body: z.never().optional(),
2341
+ path: z.never().optional(),
2342
+ query: z.looseObject({
2343
+ id: z.string()
2344
+ })
2345
+ });
2346
+ var zPaymentsGetPaymentsData = z.looseObject({
2347
+ body: z.never().optional(),
2348
+ path: z.never().optional(),
2349
+ query: z.looseObject({
2350
+ account_id: z.string().optional(),
2351
+ matter_id: z.string().optional(),
2352
+ bank_account_id: z.string().optional(),
2353
+ bank_account_type: z.union([z.enum([
2354
+ "Operating",
2355
+ "Trust",
2356
+ "CreditCard"
2357
+ ]), z.string()]).optional(),
2358
+ created_since: z.string().optional(),
2359
+ updated_since: z.string().optional(),
2360
+ date_from: z.string().optional(),
2361
+ date_to: z.string().optional()
2362
+ }).optional()
2363
+ });
2364
+ var zRelationshipsGetRelationshipData = z.looseObject({
2365
+ body: z.never().optional(),
2366
+ path: z.looseObject({
2367
+ id: z.string()
2368
+ }),
2369
+ query: z.never().optional()
2370
+ });
2371
+ var zRelationshipsDeleteData = z.looseObject({
2372
+ body: z.never().optional(),
2373
+ path: z.never().optional(),
2374
+ query: z.looseObject({
2375
+ id: z.string()
2376
+ })
2377
+ });
2378
+ var zRelationshipsGetRelationshipsData = z.looseObject({
2379
+ body: z.never().optional(),
2380
+ path: z.never().optional(),
2381
+ query: z.looseObject({
2382
+ contact_id: z.string().optional(),
2383
+ matter_id: z.string().optional(),
2384
+ account_id: z.string().optional(),
2385
+ created_since: z.string().optional(),
2386
+ updated_since: z.string().optional()
2387
+ }).optional()
2388
+ });
2389
+ var zRelationshipsPostAccountData = z.looseObject({
2390
+ body: zRelationship2,
2391
+ path: z.never().optional(),
2392
+ query: z.never().optional()
2393
+ });
2394
+ var zRelationshipsPutRelationshipData = z.looseObject({
2395
+ body: zRelationship2,
2396
+ path: z.never().optional(),
2397
+ query: z.looseObject({
2398
+ id: z.string()
2399
+ })
2400
+ });
2401
+ var zTagsGetTagsForAccountsData = z.looseObject({
2402
+ body: z.never().optional(),
2403
+ path: z.never().optional(),
2404
+ query: z.never().optional()
2405
+ });
2406
+ var zTagsGetTagsForAccountsResponse = z.array(zTag);
2407
+ var zTagsGetTagsForProjectsData = z.looseObject({
2408
+ body: z.never().optional(),
2409
+ path: z.never().optional(),
2410
+ query: z.never().optional()
2411
+ });
2412
+ var zTagsGetTagsForProjectsResponse = z.array(zTag);
2413
+ var zTagsGetTagsForActivitiesData = z.looseObject({
2414
+ body: z.never().optional(),
2415
+ path: z.never().optional(),
2416
+ query: z.never().optional()
2417
+ });
2418
+ var zTagsGetTagsForActivitiesResponse = z.array(zTag);
2419
+ var zTasksGetTaskData = z.looseObject({
2420
+ body: z.never().optional(),
2421
+ path: z.looseObject({
2422
+ id: z.string()
2423
+ }),
2424
+ query: z.never().optional()
2425
+ });
2426
+ var zTasksDeleteData = z.looseObject({
2427
+ body: z.never().optional(),
2428
+ path: z.never().optional(),
2429
+ query: z.looseObject({
2430
+ id: z.string()
2431
+ })
2432
+ });
2433
+ var zTasksGetTasksData = z.looseObject({
2434
+ body: z.never().optional(),
2435
+ path: z.never().optional(),
2436
+ query: z.looseObject({
2437
+ assigned_to_user_id: z.string().optional(),
2438
+ account_id: z.string().optional(),
2439
+ matter_id: z.string().optional(),
2440
+ created_since: z.string().optional(),
2441
+ updated_since: z.string().optional(),
2442
+ status: z.union([z.enum([
2443
+ "NotCompleted",
2444
+ "InProgress",
2445
+ "Completed",
2446
+ "Conditional"
2447
+ ]), z.string()]).optional(),
2448
+ due_date_from: z.string().optional(),
2449
+ due_date_to: z.string().optional(),
2450
+ activity_tag: z.string().optional()
2451
+ }).optional()
2452
+ });
2453
+ var zTasksPostAccountData = z.looseObject({
2454
+ body: zTask2,
2455
+ path: z.never().optional(),
2456
+ query: z.never().optional()
2457
+ });
2458
+ var zTasksPutAccountData = z.looseObject({
2459
+ body: zTask2,
2460
+ path: z.never().optional(),
2461
+ query: z.looseObject({
2462
+ id: z.string()
2463
+ })
2464
+ });
2465
+ var zTimeEntriesGetTimeEntryData = z.looseObject({
2466
+ body: z.never().optional(),
2467
+ path: z.looseObject({
2468
+ id: z.string()
2469
+ }),
2470
+ query: z.never().optional()
2471
+ });
2472
+ var zTimeEntriesDeleteData = z.looseObject({
2473
+ body: z.never().optional(),
2474
+ path: z.never().optional(),
2475
+ query: z.looseObject({
2476
+ id: z.string()
2477
+ })
2478
+ });
2479
+ var zTimeEntriesGetTimeEntrysData = z.looseObject({
2480
+ body: z.never().optional(),
2481
+ path: z.never().optional(),
2482
+ query: z.looseObject({
2483
+ account_id: z.string().optional(),
2484
+ matter_id: z.string().optional(),
2485
+ user_id: z.string().optional(),
2486
+ item_id: z.string().optional(),
2487
+ created_since: z.string().optional(),
2488
+ updated_since: z.string().optional(),
2489
+ date_from: z.string().optional(),
2490
+ date_to: z.string().optional()
2491
+ }).optional()
2492
+ });
2493
+ var zTimeEntriesPostAccountData = z.looseObject({
2494
+ body: zTimeEntry2,
2495
+ path: z.never().optional(),
2496
+ query: z.never().optional()
2497
+ });
2498
+ var zTimeEntriesPutAccountData = z.looseObject({
2499
+ body: zTimeEntry2,
2500
+ path: z.never().optional(),
2501
+ query: z.looseObject({
2502
+ id: z.string()
2503
+ })
2504
+ });
2505
+ var zUsersMeData = z.looseObject({
2506
+ body: z.never().optional(),
2507
+ path: z.never().optional(),
2508
+ query: z.never().optional()
2509
+ });
2510
+ var zUsersGetUserData = z.looseObject({
2511
+ body: z.never().optional(),
2512
+ path: z.looseObject({
2513
+ id: z.string()
2514
+ }),
2515
+ query: z.never().optional()
2516
+ });
2517
+ var zUsersDeleteData = z.looseObject({
2518
+ body: z.never().optional(),
2519
+ path: z.never().optional(),
2520
+ query: z.looseObject({
2521
+ id: z.string()
2522
+ })
2523
+ });
2524
+ var zUsersGetUsersData = z.looseObject({
2525
+ body: z.never().optional(),
2526
+ path: z.never().optional(),
2527
+ query: z.looseObject({
2528
+ created_since: z.string().optional(),
2529
+ updated_since: z.string().optional(),
2530
+ email_address: z.string().optional()
2531
+ }).optional()
2532
+ });
1142
2533
 
1143
2534
  // src/server.ts
2535
+ function listOf(schema) {
2536
+ return z2.looseObject({ items: z2.array(schema) });
2537
+ }
1144
2538
  var server = new McpServer(
1145
2539
  {
1146
2540
  name: "practicepanther",
@@ -1175,14 +2569,14 @@ var tools = [
1175
2569
  name: "get_account",
1176
2570
  description: "Get a single account (company or individual) by ID. Returns contacts, tags, custom fields, and assigned users.",
1177
2571
  sdkFn: accountsGetAccount,
1178
- schema: AccountSchema,
2572
+ schema: zAccount,
1179
2573
  pathParams: { id: "Account ID" }
1180
2574
  },
1181
2575
  {
1182
2576
  name: "list_accounts",
1183
2577
  description: "List accounts with optional filters. An account represents one or more contacts (e.g. a company).",
1184
2578
  sdkFn: accountsGetAccounts,
1185
- schema: AccountSchema,
2579
+ schema: zAccount,
1186
2580
  isList: true,
1187
2581
  queryParams: {
1188
2582
  assigned_to_user_id: z2.string().optional().describe("Filter by assigned user ID"),
@@ -1197,14 +2591,14 @@ var tools = [
1197
2591
  name: "get_bank_account",
1198
2592
  description: "Get a single bank account (operating, trust, or credit card) by ID.",
1199
2593
  sdkFn: bankAccountsGetBankAccount,
1200
- schema: BankAccountSchema,
2594
+ schema: zBankAccount,
1201
2595
  pathParams: { id: "Bank Account ID" }
1202
2596
  },
1203
2597
  {
1204
2598
  name: "list_bank_accounts",
1205
2599
  description: "List all bank accounts.",
1206
2600
  sdkFn: bankAccountsGetBankAccounts,
1207
- schema: BankAccountSchema,
2601
+ schema: zBankAccount,
1208
2602
  isList: true,
1209
2603
  queryParams: {
1210
2604
  created_since: z2.string().optional().describe("ISO date \u2014 return records created after this date"),
@@ -1216,14 +2610,14 @@ var tools = [
1216
2610
  name: "get_call_log",
1217
2611
  description: "Get a single call log entry by ID.",
1218
2612
  sdkFn: callLogsGetCallLog,
1219
- schema: CallLogSchema,
2613
+ schema: zCallLog,
1220
2614
  pathParams: { id: "Call Log ID" }
1221
2615
  },
1222
2616
  {
1223
2617
  name: "list_call_logs",
1224
2618
  description: "List call log entries with optional filters by account, matter, user, date range, or tag.",
1225
2619
  sdkFn: callLogsGetCallLogs,
1226
- schema: CallLogSchema,
2620
+ schema: zCallLog,
1227
2621
  isList: true,
1228
2622
  queryParams: {
1229
2623
  assigned_to_user_id: z2.string().optional().describe("Filter by assigned user ID"),
@@ -1241,14 +2635,14 @@ var tools = [
1241
2635
  name: "get_contact",
1242
2636
  description: "Get a single contact by ID. Each account can have multiple contacts; one is the primary.",
1243
2637
  sdkFn: contactsGetContact,
1244
- schema: ContactSchema,
2638
+ schema: zContact,
1245
2639
  pathParams: { id: "Contact ID" }
1246
2640
  },
1247
2641
  {
1248
2642
  name: "list_contacts",
1249
2643
  description: "List contacts with optional filters by account, status, user, search text, or company.",
1250
2644
  sdkFn: contactsGetContacts,
1251
- schema: ContactSchema,
2645
+ schema: zContact,
1252
2646
  isList: true,
1253
2647
  queryParams: {
1254
2648
  assigned_to_user_id: z2.string().optional().describe("Filter by assigned user ID"),
@@ -1266,14 +2660,14 @@ var tools = [
1266
2660
  name: "get_custom_field",
1267
2661
  description: "Get a single custom field definition by ID.",
1268
2662
  sdkFn: customFieldsGetCustomField,
1269
- schema: CustomFieldSchema,
2663
+ schema: zCustomField,
1270
2664
  pathParams: { id: "Custom Field ID" }
1271
2665
  },
1272
2666
  {
1273
2667
  name: "list_custom_fields_for_company",
1274
2668
  description: "List custom field definitions for companies (accounts).",
1275
2669
  sdkFn: customFieldsGetCustomFieldsForAccount,
1276
- schema: CustomFieldSchema,
2670
+ schema: zCustomField,
1277
2671
  isList: true,
1278
2672
  queryParams: {
1279
2673
  created_since: z2.string().optional().describe("ISO date \u2014 return records created after this date"),
@@ -1284,7 +2678,7 @@ var tools = [
1284
2678
  name: "list_custom_fields_for_matter",
1285
2679
  description: "List custom field definitions for matters.",
1286
2680
  sdkFn: customFieldsGetCustomFieldsForMatter,
1287
- schema: CustomFieldSchema,
2681
+ schema: zCustomField,
1288
2682
  isList: true,
1289
2683
  queryParams: {
1290
2684
  created_since: z2.string().optional().describe("ISO date \u2014 return records created after this date"),
@@ -1295,7 +2689,7 @@ var tools = [
1295
2689
  name: "list_custom_fields_for_contact",
1296
2690
  description: "List custom field definitions for contacts.",
1297
2691
  sdkFn: customFieldsGetCustomFieldsForContact,
1298
- schema: CustomFieldSchema,
2692
+ schema: zCustomField,
1299
2693
  isList: true,
1300
2694
  queryParams: {
1301
2695
  created_since: z2.string().optional().describe("ISO date \u2014 return records created after this date"),
@@ -1307,14 +2701,14 @@ var tools = [
1307
2701
  name: "get_email",
1308
2702
  description: "Get a single email by ID. Returns full HTML body when fetched individually.",
1309
2703
  sdkFn: emailsGetEmail,
1310
- schema: EmailSchema,
2704
+ schema: zEmail,
1311
2705
  pathParams: { id: "Email ID" }
1312
2706
  },
1313
2707
  {
1314
2708
  name: "list_emails",
1315
2709
  description: "List emails with optional filters by account, matter, user, tag, or external message ID.",
1316
2710
  sdkFn: emailsGetEmails,
1317
- schema: EmailSchema,
2711
+ schema: zEmail,
1318
2712
  isList: true,
1319
2713
  queryParams: {
1320
2714
  assigned_to_user_id: z2.string().optional().describe("Filter by assigned user ID"),
@@ -1331,14 +2725,14 @@ var tools = [
1331
2725
  name: "get_event",
1332
2726
  description: "Get a single calendar event by ID.",
1333
2727
  sdkFn: eventsGetEvent,
1334
- schema: EventSchema,
2728
+ schema: zEvent,
1335
2729
  pathParams: { id: "Event ID" }
1336
2730
  },
1337
2731
  {
1338
2732
  name: "list_events",
1339
2733
  description: "List calendar events with optional filters by account, matter, user, date range, or tag.",
1340
2734
  sdkFn: eventsGetEvents,
1341
- schema: EventSchema,
2735
+ schema: zEvent,
1342
2736
  isList: true,
1343
2737
  queryParams: {
1344
2738
  assigned_to_user_id: z2.string().optional().describe("Filter by assigned user ID"),
@@ -1356,14 +2750,14 @@ var tools = [
1356
2750
  name: "get_expense_category",
1357
2751
  description: "Get a single expense category by ID.",
1358
2752
  sdkFn: expenseCategoriesGetExpenseCategory,
1359
- schema: ExpenseCategorySchema,
2753
+ schema: zExpenseCategory,
1360
2754
  pathParams: { id: "Expense Category ID" }
1361
2755
  },
1362
2756
  {
1363
2757
  name: "list_expense_categories",
1364
2758
  description: "List all expense categories.",
1365
2759
  sdkFn: expenseCategoriesGetExpenseCategories,
1366
- schema: ExpenseCategorySchema,
2760
+ schema: zExpenseCategory,
1367
2761
  isList: true,
1368
2762
  queryParams: {
1369
2763
  created_since: z2.string().optional().describe("ISO date \u2014 return records created after this date"),
@@ -1375,14 +2769,14 @@ var tools = [
1375
2769
  name: "get_expense",
1376
2770
  description: "Get a single expense by ID. Includes billable status, amount, and category.",
1377
2771
  sdkFn: expensesGetExpense,
1378
- schema: ExpenseSchema,
2772
+ schema: zExpense,
1379
2773
  pathParams: { id: "Expense ID" }
1380
2774
  },
1381
2775
  {
1382
2776
  name: "list_expenses",
1383
2777
  description: "List expenses with optional filters by account, matter, billing user, category, or date range.",
1384
2778
  sdkFn: expensesGetExpensess,
1385
- schema: ExpenseSchema,
2779
+ schema: zExpense,
1386
2780
  isList: true,
1387
2781
  queryParams: {
1388
2782
  account_id: z2.string().optional().describe("Filter by account ID"),
@@ -1400,7 +2794,7 @@ var tools = [
1400
2794
  name: "get_file",
1401
2795
  description: "Get file metadata by ID (name, size, content type).",
1402
2796
  sdkFn: filesGetFile,
1403
- schema: FileSchema,
2797
+ schema: zFile,
1404
2798
  pathParams: { id: "File ID" }
1405
2799
  },
1406
2800
  {
@@ -1414,7 +2808,7 @@ var tools = [
1414
2808
  name: "list_files",
1415
2809
  description: "List files with optional filters by account, matter, activity, creator, or search text.",
1416
2810
  sdkFn: filesGetFiles,
1417
- schema: FileSchema,
2811
+ schema: zFile,
1418
2812
  isList: true,
1419
2813
  queryParams: {
1420
2814
  created_since: z2.string().optional().describe("ISO date \u2014 return records created after this date"),
@@ -1431,14 +2825,14 @@ var tools = [
1431
2825
  name: "get_flat_fee",
1432
2826
  description: "Get a single flat fee entry by ID.",
1433
2827
  sdkFn: flatFeesGetFlatFee,
1434
- schema: FlatFeeSchema,
2828
+ schema: zFlatFee,
1435
2829
  pathParams: { id: "Flat Fee ID" }
1436
2830
  },
1437
2831
  {
1438
2832
  name: "list_flat_fees",
1439
2833
  description: "List flat fees with optional filters by account, matter, user, item, or date range.",
1440
2834
  sdkFn: flatFeesGetFlatFees,
1441
- schema: FlatFeeSchema,
2835
+ schema: zFlatFee,
1442
2836
  isList: true,
1443
2837
  queryParams: {
1444
2838
  account_id: z2.string().optional().describe("Filter by account ID"),
@@ -1456,14 +2850,14 @@ var tools = [
1456
2850
  name: "get_invoice",
1457
2851
  description: "Get a single invoice by ID with line items (time entries, expenses, flat fees).",
1458
2852
  sdkFn: invoicesGetInvoice,
1459
- schema: InvoiceSchema,
2853
+ schema: zInvoice,
1460
2854
  pathParams: { id: "Invoice ID" }
1461
2855
  },
1462
2856
  {
1463
2857
  name: "list_invoices",
1464
2858
  description: "List invoices with optional filters by account, matter, or date range.",
1465
2859
  sdkFn: invoicesGetInvoices,
1466
- schema: InvoiceSchema,
2860
+ schema: zInvoice,
1467
2861
  isList: true,
1468
2862
  queryParams: {
1469
2863
  account_id: z2.string().optional().describe("Filter by account ID"),
@@ -1479,14 +2873,14 @@ var tools = [
1479
2873
  name: "get_item",
1480
2874
  description: "Get a single billing item/service by ID.",
1481
2875
  sdkFn: itemsGetItem,
1482
- schema: ItemSchema,
2876
+ schema: zItem,
1483
2877
  pathParams: { id: "Item ID" }
1484
2878
  },
1485
2879
  {
1486
2880
  name: "list_items",
1487
2881
  description: "List all billing items/services.",
1488
2882
  sdkFn: itemsGetItems,
1489
- schema: ItemSchema,
2883
+ schema: zItem,
1490
2884
  isList: true,
1491
2885
  queryParams: {
1492
2886
  created_since: z2.string().optional().describe("ISO date \u2014 return records created after this date"),
@@ -1498,14 +2892,14 @@ var tools = [
1498
2892
  name: "get_matter",
1499
2893
  description: "Get a single matter (case/project) by ID. Returns status, assigned users, tags, and custom fields.",
1500
2894
  sdkFn: mattersGetMatter,
1501
- schema: MatterSchema,
2895
+ schema: zMatter,
1502
2896
  pathParams: { id: "Matter ID" }
1503
2897
  },
1504
2898
  {
1505
2899
  name: "list_matters",
1506
2900
  description: "List matters with optional filters by account, status (Open/Closed/Pending/Archived), user, search text, or tags.",
1507
2901
  sdkFn: mattersGetMatters,
1508
- schema: MatterSchema,
2902
+ schema: zMatter,
1509
2903
  isList: true,
1510
2904
  queryParams: {
1511
2905
  assigned_to_user_id: z2.string().optional().describe("Filter by assigned user ID"),
@@ -1523,7 +2917,7 @@ var tools = [
1523
2917
  name: "list_messages",
1524
2918
  description: "List all messages.",
1525
2919
  sdkFn: messagesGetMessagesAsync,
1526
- schema: MessageSchema,
2920
+ schema: zMessage,
1527
2921
  isList: true
1528
2922
  },
1529
2923
  // ── Notes ──
@@ -1531,14 +2925,14 @@ var tools = [
1531
2925
  name: "get_note",
1532
2926
  description: "Get a single note by ID.",
1533
2927
  sdkFn: notesGetNote,
1534
- schema: NoteSchema,
2928
+ schema: zNote,
1535
2929
  pathParams: { id: "Note ID" }
1536
2930
  },
1537
2931
  {
1538
2932
  name: "list_notes",
1539
2933
  description: "List notes with optional filters by account, matter, user, date range, or tag.",
1540
2934
  sdkFn: notesGetNotes,
1541
- schema: NoteSchema,
2935
+ schema: zNote,
1542
2936
  isList: true,
1543
2937
  queryParams: {
1544
2938
  assigned_to_user_id: z2.string().optional().describe("Filter by assigned user ID"),
@@ -1556,14 +2950,14 @@ var tools = [
1556
2950
  name: "get_payment",
1557
2951
  description: "Get a single payment by ID with full details including status.",
1558
2952
  sdkFn: paymentsGetPayment,
1559
- schema: PaymentDetailSchema,
2953
+ schema: zPaymentDetail,
1560
2954
  pathParams: { id: "Payment ID" }
1561
2955
  },
1562
2956
  {
1563
2957
  name: "list_payments",
1564
2958
  description: "List payments with optional filters by account, matter, bank account, type, or date range.",
1565
2959
  sdkFn: paymentsGetPayments,
1566
- schema: PaymentSchema,
2960
+ schema: zPayment,
1567
2961
  isList: true,
1568
2962
  queryParams: {
1569
2963
  account_id: z2.string().optional().describe("Filter by account ID"),
@@ -1581,14 +2975,14 @@ var tools = [
1581
2975
  name: "get_relationship",
1582
2976
  description: "Get a single matter-contact relationship by ID.",
1583
2977
  sdkFn: relationshipsGetRelationship,
1584
- schema: RelationshipSchema,
2978
+ schema: zRelationship,
1585
2979
  pathParams: { id: "Relationship ID" }
1586
2980
  },
1587
2981
  {
1588
2982
  name: "list_relationships",
1589
2983
  description: "List relationships between contacts and matters with optional filters.",
1590
2984
  sdkFn: relationshipsGetRelationships,
1591
- schema: RelationshipSchema,
2985
+ schema: zRelationship,
1592
2986
  isList: true,
1593
2987
  queryParams: {
1594
2988
  contact_id: z2.string().optional().describe("Filter by contact ID"),
@@ -1603,21 +2997,21 @@ var tools = [
1603
2997
  name: "list_account_tags",
1604
2998
  description: "List all tags available for accounts.",
1605
2999
  sdkFn: tagsGetTagsForAccounts,
1606
- schema: TagSchema,
3000
+ schema: zTag,
1607
3001
  isList: true
1608
3002
  },
1609
3003
  {
1610
3004
  name: "list_matter_tags",
1611
3005
  description: "List all tags available for matters.",
1612
3006
  sdkFn: tagsGetTagsForProjects,
1613
- schema: TagSchema,
3007
+ schema: zTag,
1614
3008
  isList: true
1615
3009
  },
1616
3010
  {
1617
3011
  name: "list_activity_tags",
1618
3012
  description: "List all tags available for activities (call logs, events, notes, etc.).",
1619
3013
  sdkFn: tagsGetTagsForActivities,
1620
- schema: TagSchema,
3014
+ schema: zTag,
1621
3015
  isList: true
1622
3016
  },
1623
3017
  // ── Tasks ──
@@ -1625,14 +3019,14 @@ var tools = [
1625
3019
  name: "get_task",
1626
3020
  description: "Get a single task by ID.",
1627
3021
  sdkFn: tasksGetTask,
1628
- schema: TaskSchema,
3022
+ schema: zTask,
1629
3023
  pathParams: { id: "Task ID" }
1630
3024
  },
1631
3025
  {
1632
3026
  name: "list_tasks",
1633
3027
  description: "List tasks with optional filters by account, matter, user, status, due date range, or tag.",
1634
3028
  sdkFn: tasksGetTasks,
1635
- schema: TaskSchema,
3029
+ schema: zTask,
1636
3030
  isList: true,
1637
3031
  queryParams: {
1638
3032
  assigned_to_user_id: z2.string().optional().describe("Filter by assigned user ID"),
@@ -1651,14 +3045,14 @@ var tools = [
1651
3045
  name: "get_time_entry",
1652
3046
  description: "Get a single time entry by ID. Hours are decimal (e.g. 1.5 = 1h30m).",
1653
3047
  sdkFn: timeEntriesGetTimeEntry,
1654
- schema: TimeEntrySchema,
3048
+ schema: zTimeEntry,
1655
3049
  pathParams: { id: "Time Entry ID" }
1656
3050
  },
1657
3051
  {
1658
3052
  name: "list_time_entries",
1659
3053
  description: "List time entries with optional filters by account, matter, user, item, or date range.",
1660
3054
  sdkFn: timeEntriesGetTimeEntrys,
1661
- schema: TimeEntrySchema,
3055
+ schema: zTimeEntry,
1662
3056
  isList: true,
1663
3057
  queryParams: {
1664
3058
  account_id: z2.string().optional().describe("Filter by account ID"),
@@ -1676,20 +3070,20 @@ var tools = [
1676
3070
  name: "get_me",
1677
3071
  description: "Get the currently authenticated user's profile.",
1678
3072
  sdkFn: usersMe,
1679
- schema: UserSchema
3073
+ schema: zUser
1680
3074
  },
1681
3075
  {
1682
3076
  name: "get_user",
1683
3077
  description: "Get a single user by ID.",
1684
3078
  sdkFn: usersGetUser,
1685
- schema: UserSchema,
3079
+ schema: zUser,
1686
3080
  pathParams: { id: "User ID" }
1687
3081
  },
1688
3082
  {
1689
3083
  name: "list_users",
1690
3084
  description: "List users with optional filters by creation date, update date, or email address.",
1691
3085
  sdkFn: usersGetUsers,
1692
- schema: UserSchema,
3086
+ schema: zUser,
1693
3087
  isList: true,
1694
3088
  queryParams: {
1695
3089
  created_since: z2.string().optional().describe("ISO date \u2014 return records created after this date"),
@@ -1752,15 +3146,15 @@ for (const tool of tools) {
1752
3146
  ]
1753
3147
  };
1754
3148
  }
1755
- if (tool.isList) {
1756
- return {
1757
- content: [],
1758
- structuredContent: { items: res.data }
1759
- };
1760
- }
3149
+ const structured = tool.isList ? { items: res.data } : res.data;
1761
3150
  return {
1762
- content: [],
1763
- structuredContent: res.data
3151
+ content: [
3152
+ {
3153
+ type: "text",
3154
+ text: JSON.stringify(structured, null, 2)
3155
+ }
3156
+ ],
3157
+ structuredContent: tool.schema ? structured : void 0
1764
3158
  };
1765
3159
  } catch (e) {
1766
3160
  return err(e);