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