@wilnertech/halopsa-mcp-server 1.0.1 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +54 -7
- package/dist/api/client.d.ts +7 -2
- package/dist/api/client.d.ts.map +1 -1
- package/dist/api/client.js +35 -8
- package/dist/api/client.js.map +1 -1
- package/dist/cache/memory-cache.d.ts +7 -0
- package/dist/cache/memory-cache.d.ts.map +1 -1
- package/dist/cache/memory-cache.js +7 -0
- package/dist/cache/memory-cache.js.map +1 -1
- package/dist/cache/prewarm.d.ts +3 -1
- package/dist/cache/prewarm.d.ts.map +1 -1
- package/dist/cache/prewarm.js +17 -1
- package/dist/cache/prewarm.js.map +1 -1
- package/dist/schemas/common.d.ts +30 -99
- package/dist/schemas/common.d.ts.map +1 -1
- package/dist/schemas/common.js +2 -2
- package/dist/schemas/common.js.map +1 -1
- package/dist/tools/assets.d.ts +73 -298
- package/dist/tools/assets.d.ts.map +1 -1
- package/dist/tools/assets.js +15 -7
- package/dist/tools/assets.js.map +1 -1
- package/dist/tools/batch-operations.d.ts +49 -81
- package/dist/tools/batch-operations.d.ts.map +1 -1
- package/dist/tools/batch-operations.js +62 -0
- package/dist/tools/batch-operations.js.map +1 -1
- package/dist/tools/clients.d.ts +24 -92
- package/dist/tools/clients.d.ts.map +1 -1
- package/dist/tools/reference-data.d.ts +44 -72
- package/dist/tools/reference-data.d.ts.map +1 -1
- package/dist/tools/reference-data.js +37 -4
- package/dist/tools/reference-data.js.map +1 -1
- package/dist/tools/registrations.d.ts +7 -1
- package/dist/tools/registrations.d.ts.map +1 -1
- package/dist/tools/registrations.js +43 -7
- package/dist/tools/registrations.js.map +1 -1
- package/dist/tools/registry.d.ts +12 -5
- package/dist/tools/registry.d.ts.map +1 -1
- package/dist/tools/registry.js +26 -2
- package/dist/tools/registry.js.map +1 -1
- package/dist/tools/sites.d.ts +19 -111
- package/dist/tools/sites.d.ts.map +1 -1
- package/dist/tools/sites.js +3 -3
- package/dist/tools/sites.js.map +1 -1
- package/dist/tools/ticket-actions.d.ts +41 -0
- package/dist/tools/ticket-actions.d.ts.map +1 -0
- package/dist/tools/ticket-actions.js +222 -0
- package/dist/tools/ticket-actions.js.map +1 -0
- package/dist/tools/ticket-custom-fields.d.ts +33 -0
- package/dist/tools/ticket-custom-fields.d.ts.map +1 -0
- package/dist/tools/ticket-custom-fields.js +155 -0
- package/dist/tools/ticket-custom-fields.js.map +1 -0
- package/dist/tools/ticket-reference-data.d.ts +88 -0
- package/dist/tools/ticket-reference-data.d.ts.map +1 -0
- package/dist/tools/ticket-reference-data.js +185 -0
- package/dist/tools/ticket-reference-data.js.map +1 -0
- package/dist/tools/tickets.d.ts +168 -0
- package/dist/tools/tickets.d.ts.map +1 -0
- package/dist/tools/tickets.js +572 -0
- package/dist/tools/tickets.js.map +1 -0
- package/dist/tools/users.d.ts +43 -190
- package/dist/tools/users.d.ts.map +1 -1
- package/dist/tools/users.js +25 -7
- package/dist/tools/users.js.map +1 -1
- package/dist/types/tickets.d.ts +193 -0
- package/dist/types/tickets.d.ts.map +1 -0
- package/dist/types/tickets.js +14 -0
- package/dist/types/tickets.js.map +1 -0
- package/dist/utils/formatter.d.ts +15 -1
- package/dist/utils/formatter.d.ts.map +1 -1
- package/dist/utils/formatter.js +52 -6
- package/dist/utils/formatter.js.map +1 -1
- package/package.json +10 -3
- package/dist/utils/zod-to-schema.d.ts +0 -29
- package/dist/utils/zod-to-schema.d.ts.map +0 -1
- package/dist/utils/zod-to-schema.js +0 -182
- package/dist/utils/zod-to-schema.js.map +0 -1
|
@@ -9,101 +9,62 @@ import type { ZodToolDefinition } from './registry.js';
|
|
|
9
9
|
* Get assets batch schema
|
|
10
10
|
*/
|
|
11
11
|
export declare const GetAssetsBatchArgsSchema: z.ZodObject<{
|
|
12
|
-
asset_ids: z.ZodArray<z.ZodNumber
|
|
12
|
+
asset_ids: z.ZodArray<z.ZodNumber>;
|
|
13
13
|
format_options: z.ZodOptional<z.ZodObject<{
|
|
14
|
-
format: z.ZodOptional<z.ZodEnum<
|
|
15
|
-
|
|
14
|
+
format: z.ZodOptional<z.ZodEnum<{
|
|
15
|
+
compact: "compact";
|
|
16
|
+
standard: "standard";
|
|
17
|
+
detailed: "detailed";
|
|
18
|
+
}>>;
|
|
19
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
16
20
|
omit_empty: z.ZodOptional<z.ZodBoolean>;
|
|
17
|
-
},
|
|
18
|
-
|
|
19
|
-
fields?: string[] | undefined;
|
|
20
|
-
omit_empty?: boolean | undefined;
|
|
21
|
-
}, {
|
|
22
|
-
format?: "compact" | "standard" | "detailed" | undefined;
|
|
23
|
-
fields?: string[] | undefined;
|
|
24
|
-
omit_empty?: boolean | undefined;
|
|
25
|
-
}>>;
|
|
26
|
-
}, "strip", z.ZodTypeAny, {
|
|
27
|
-
asset_ids: number[];
|
|
28
|
-
format_options?: {
|
|
29
|
-
format?: "compact" | "standard" | "detailed" | undefined;
|
|
30
|
-
fields?: string[] | undefined;
|
|
31
|
-
omit_empty?: boolean | undefined;
|
|
32
|
-
} | undefined;
|
|
33
|
-
}, {
|
|
34
|
-
asset_ids: number[];
|
|
35
|
-
format_options?: {
|
|
36
|
-
format?: "compact" | "standard" | "detailed" | undefined;
|
|
37
|
-
fields?: string[] | undefined;
|
|
38
|
-
omit_empty?: boolean | undefined;
|
|
39
|
-
} | undefined;
|
|
40
|
-
}>;
|
|
21
|
+
}, z.core.$strip>>;
|
|
22
|
+
}, z.core.$strip>;
|
|
41
23
|
/**
|
|
42
24
|
* Get users batch schema
|
|
43
25
|
*/
|
|
44
26
|
export declare const GetUsersBatchArgsSchema: z.ZodObject<{
|
|
45
|
-
user_ids: z.ZodArray<z.ZodNumber
|
|
27
|
+
user_ids: z.ZodArray<z.ZodNumber>;
|
|
46
28
|
format_options: z.ZodOptional<z.ZodObject<{
|
|
47
|
-
format: z.ZodOptional<z.ZodEnum<
|
|
48
|
-
|
|
29
|
+
format: z.ZodOptional<z.ZodEnum<{
|
|
30
|
+
compact: "compact";
|
|
31
|
+
standard: "standard";
|
|
32
|
+
detailed: "detailed";
|
|
33
|
+
}>>;
|
|
34
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
49
35
|
omit_empty: z.ZodOptional<z.ZodBoolean>;
|
|
50
|
-
},
|
|
51
|
-
|
|
52
|
-
fields?: string[] | undefined;
|
|
53
|
-
omit_empty?: boolean | undefined;
|
|
54
|
-
}, {
|
|
55
|
-
format?: "compact" | "standard" | "detailed" | undefined;
|
|
56
|
-
fields?: string[] | undefined;
|
|
57
|
-
omit_empty?: boolean | undefined;
|
|
58
|
-
}>>;
|
|
59
|
-
}, "strip", z.ZodTypeAny, {
|
|
60
|
-
user_ids: number[];
|
|
61
|
-
format_options?: {
|
|
62
|
-
format?: "compact" | "standard" | "detailed" | undefined;
|
|
63
|
-
fields?: string[] | undefined;
|
|
64
|
-
omit_empty?: boolean | undefined;
|
|
65
|
-
} | undefined;
|
|
66
|
-
}, {
|
|
67
|
-
user_ids: number[];
|
|
68
|
-
format_options?: {
|
|
69
|
-
format?: "compact" | "standard" | "detailed" | undefined;
|
|
70
|
-
fields?: string[] | undefined;
|
|
71
|
-
omit_empty?: boolean | undefined;
|
|
72
|
-
} | undefined;
|
|
73
|
-
}>;
|
|
36
|
+
}, z.core.$strip>>;
|
|
37
|
+
}, z.core.$strip>;
|
|
74
38
|
/**
|
|
75
39
|
* Get sites batch schema
|
|
76
40
|
*/
|
|
77
41
|
export declare const GetSitesBatchArgsSchema: z.ZodObject<{
|
|
78
|
-
site_ids: z.ZodArray<z.ZodNumber
|
|
42
|
+
site_ids: z.ZodArray<z.ZodNumber>;
|
|
79
43
|
format_options: z.ZodOptional<z.ZodObject<{
|
|
80
|
-
format: z.ZodOptional<z.ZodEnum<
|
|
81
|
-
|
|
44
|
+
format: z.ZodOptional<z.ZodEnum<{
|
|
45
|
+
compact: "compact";
|
|
46
|
+
standard: "standard";
|
|
47
|
+
detailed: "detailed";
|
|
48
|
+
}>>;
|
|
49
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
82
50
|
omit_empty: z.ZodOptional<z.ZodBoolean>;
|
|
83
|
-
},
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
fields
|
|
97
|
-
omit_empty
|
|
98
|
-
}
|
|
99
|
-
},
|
|
100
|
-
site_ids: number[];
|
|
101
|
-
format_options?: {
|
|
102
|
-
format?: "compact" | "standard" | "detailed" | undefined;
|
|
103
|
-
fields?: string[] | undefined;
|
|
104
|
-
omit_empty?: boolean | undefined;
|
|
105
|
-
} | undefined;
|
|
106
|
-
}>;
|
|
51
|
+
}, z.core.$strip>>;
|
|
52
|
+
}, z.core.$strip>;
|
|
53
|
+
/**
|
|
54
|
+
* Get tickets batch schema
|
|
55
|
+
*/
|
|
56
|
+
export declare const GetTicketsBatchArgsSchema: z.ZodObject<{
|
|
57
|
+
ticket_ids: z.ZodArray<z.ZodNumber>;
|
|
58
|
+
format_options: z.ZodOptional<z.ZodObject<{
|
|
59
|
+
format: z.ZodOptional<z.ZodEnum<{
|
|
60
|
+
compact: "compact";
|
|
61
|
+
standard: "standard";
|
|
62
|
+
detailed: "detailed";
|
|
63
|
+
}>>;
|
|
64
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
65
|
+
omit_empty: z.ZodOptional<z.ZodBoolean>;
|
|
66
|
+
}, z.core.$strip>>;
|
|
67
|
+
}, z.core.$strip>;
|
|
107
68
|
/**
|
|
108
69
|
* Get multiple assets in a single logical operation
|
|
109
70
|
* More efficient than individual calls - reduces overall token usage
|
|
@@ -122,4 +83,11 @@ export declare function getSitesBatch(client: HaloPSAAPIClient, args: z.infer<ty
|
|
|
122
83
|
export declare const getAssetsBatchTool: ZodToolDefinition;
|
|
123
84
|
export declare const getUsersBatchTool: ZodToolDefinition;
|
|
124
85
|
export declare const getSitesBatchTool: ZodToolDefinition;
|
|
86
|
+
/**
|
|
87
|
+
* Get multiple tickets in a single logical operation.
|
|
88
|
+
* Parallel /Tickets/{id} calls with TICKET_LIST cache; failed lookups
|
|
89
|
+
* surface in the `errors` array rather than aborting the batch.
|
|
90
|
+
*/
|
|
91
|
+
export declare function getTicketsBatch(client: HaloPSAAPIClient, args: z.infer<typeof GetTicketsBatchArgsSchema>): Promise<string>;
|
|
92
|
+
export declare const getTicketsBatchTool: ZodToolDefinition;
|
|
125
93
|
//# sourceMappingURL=batch-operations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"batch-operations.d.ts","sourceRoot":"","sources":["../../src/tools/batch-operations.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"batch-operations.d.ts","sourceRoot":"","sources":["../../src/tools/batch-operations.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAevD;;GAEG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;iBAInC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;iBAIlC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;iBAIlC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;iBAIpC,CAAC;AAMH;;;;;GAKG;AACH,wBAAsB,cAAc,CAClC,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,GAC7C,OAAO,CAAC,MAAM,CAAC,CAsDjB;AAED;;GAEG;AACH,wBAAsB,aAAa,CACjC,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,GAC5C,OAAO,CAAC,MAAM,CAAC,CAsDjB;AAED;;GAEG;AACH,wBAAsB,aAAa,CACjC,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,GAC5C,OAAO,CAAC,MAAM,CAAC,CAsDjB;AAMD,eAAO,MAAM,kBAAkB,EAAE,iBAKhC,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,iBAK/B,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,iBAK/B,CAAC;AAEF;;;;GAIG;AACH,wBAAsB,eAAe,CACnC,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,GAC9C,OAAO,CAAC,MAAM,CAAC,CAoDjB;AAED,eAAO,MAAM,mBAAmB,EAAE,iBAKjC,CAAC"}
|
|
@@ -33,6 +33,14 @@ export const GetSitesBatchArgsSchema = z.object({
|
|
|
33
33
|
.describe('Array of site IDs to retrieve (max 50)'),
|
|
34
34
|
format_options: FormatOptionsSchema,
|
|
35
35
|
});
|
|
36
|
+
/**
|
|
37
|
+
* Get tickets batch schema
|
|
38
|
+
*/
|
|
39
|
+
export const GetTicketsBatchArgsSchema = z.object({
|
|
40
|
+
ticket_ids: z.array(z.number().int()).min(1).max(50)
|
|
41
|
+
.describe('Array of ticket IDs to retrieve (max 50)'),
|
|
42
|
+
format_options: FormatOptionsSchema,
|
|
43
|
+
});
|
|
36
44
|
// =============================================================================
|
|
37
45
|
// Tool Implementations
|
|
38
46
|
// =============================================================================
|
|
@@ -204,4 +212,58 @@ export const getSitesBatchTool = {
|
|
|
204
212
|
schema: GetSitesBatchArgsSchema,
|
|
205
213
|
handler: getSitesBatch,
|
|
206
214
|
};
|
|
215
|
+
/**
|
|
216
|
+
* Get multiple tickets in a single logical operation.
|
|
217
|
+
* Parallel /Tickets/{id} calls with TICKET_LIST cache; failed lookups
|
|
218
|
+
* surface in the `errors` array rather than aborting the batch.
|
|
219
|
+
*/
|
|
220
|
+
export async function getTicketsBatch(client, args) {
|
|
221
|
+
const formatOptions = args.format_options || {};
|
|
222
|
+
if (args.ticket_ids.length > 50) {
|
|
223
|
+
return JSON.stringify({
|
|
224
|
+
error: true,
|
|
225
|
+
message: 'Maximum 50 ticket IDs per batch request',
|
|
226
|
+
}, null, 2);
|
|
227
|
+
}
|
|
228
|
+
const ticketPromises = args.ticket_ids.map(async (id) => {
|
|
229
|
+
try {
|
|
230
|
+
const ticket = await client.getCached(`/Tickets/${id}`, { includedetails: true }, {
|
|
231
|
+
enabled: true,
|
|
232
|
+
ttl: TTL.TICKET_LIST,
|
|
233
|
+
keyPrefix: `ticket:${id}`,
|
|
234
|
+
});
|
|
235
|
+
return { success: true, id, data: ticket };
|
|
236
|
+
}
|
|
237
|
+
catch (error) {
|
|
238
|
+
return {
|
|
239
|
+
success: false,
|
|
240
|
+
id,
|
|
241
|
+
error: error instanceof Error ? error.message : 'Unknown error',
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
});
|
|
245
|
+
const results = await Promise.all(ticketPromises);
|
|
246
|
+
const successful = results.filter((r) => r.success).map((r) => r.data);
|
|
247
|
+
const failed = results.filter((r) => !r.success).map((r) => ({
|
|
248
|
+
id: r.id,
|
|
249
|
+
error: r.error,
|
|
250
|
+
}));
|
|
251
|
+
const result = {
|
|
252
|
+
requested: args.ticket_ids.length,
|
|
253
|
+
retrieved: successful.length,
|
|
254
|
+
failed: failed.length,
|
|
255
|
+
tickets: JSON.parse(formatResponse(successful, formatOptions)),
|
|
256
|
+
...(failed.length > 0 && { errors: failed }),
|
|
257
|
+
};
|
|
258
|
+
if (formatOptions.format === 'detailed') {
|
|
259
|
+
return JSON.stringify(result, null, 2);
|
|
260
|
+
}
|
|
261
|
+
return JSON.stringify(result);
|
|
262
|
+
}
|
|
263
|
+
export const getTicketsBatchTool = {
|
|
264
|
+
name: 'get_halopsa_tickets_batch',
|
|
265
|
+
description: 'Get multiple tickets in a single call with caching. Max 50 IDs. Each ticket fetched with includedetails=true (full body + customfields).',
|
|
266
|
+
schema: GetTicketsBatchArgsSchema,
|
|
267
|
+
handler: getTicketsBatch,
|
|
268
|
+
};
|
|
207
269
|
//# sourceMappingURL=batch-operations.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"batch-operations.js","sourceRoot":"","sources":["../../src/tools/batch-operations.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"batch-operations.js","sourceRoot":"","sources":["../../src/tools/batch-operations.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,OAAO,EAAE,cAAc,EAAsB,MAAM,uBAAuB,CAAC;AAC3E,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE3D,gFAAgF;AAChF,mCAAmC;AACnC,gFAAgF;AAEhF;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;SAChD,QAAQ,CAAC,yCAA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J,MAAM,EAAE,yBAAyB;IACjC,OAAO,EAAE,eAAe;CACzB,CAAC"}
|
package/dist/tools/clients.d.ts
CHANGED
|
@@ -16,76 +16,30 @@ export declare const ListClientsArgsSchema: z.ZodObject<{
|
|
|
16
16
|
includeactive: z.ZodOptional<z.ZodBoolean>;
|
|
17
17
|
includeinactive: z.ZodOptional<z.ZodBoolean>;
|
|
18
18
|
format_options: z.ZodOptional<z.ZodObject<{
|
|
19
|
-
format: z.ZodOptional<z.ZodEnum<
|
|
20
|
-
|
|
19
|
+
format: z.ZodOptional<z.ZodEnum<{
|
|
20
|
+
compact: "compact";
|
|
21
|
+
standard: "standard";
|
|
22
|
+
detailed: "detailed";
|
|
23
|
+
}>>;
|
|
24
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
21
25
|
omit_empty: z.ZodOptional<z.ZodBoolean>;
|
|
22
|
-
},
|
|
23
|
-
|
|
24
|
-
fields?: string[] | undefined;
|
|
25
|
-
omit_empty?: boolean | undefined;
|
|
26
|
-
}, {
|
|
27
|
-
format?: "compact" | "standard" | "detailed" | undefined;
|
|
28
|
-
fields?: string[] | undefined;
|
|
29
|
-
omit_empty?: boolean | undefined;
|
|
30
|
-
}>>;
|
|
31
|
-
}, "strip", z.ZodTypeAny, {
|
|
32
|
-
count?: number | undefined;
|
|
33
|
-
page_no?: number | undefined;
|
|
34
|
-
search?: string | undefined;
|
|
35
|
-
includeactive?: boolean | undefined;
|
|
36
|
-
includeinactive?: boolean | undefined;
|
|
37
|
-
format_options?: {
|
|
38
|
-
format?: "compact" | "standard" | "detailed" | undefined;
|
|
39
|
-
fields?: string[] | undefined;
|
|
40
|
-
omit_empty?: boolean | undefined;
|
|
41
|
-
} | undefined;
|
|
42
|
-
toplevel_id?: number | undefined;
|
|
43
|
-
}, {
|
|
44
|
-
count?: number | undefined;
|
|
45
|
-
page_no?: number | undefined;
|
|
46
|
-
search?: string | undefined;
|
|
47
|
-
includeactive?: boolean | undefined;
|
|
48
|
-
includeinactive?: boolean | undefined;
|
|
49
|
-
format_options?: {
|
|
50
|
-
format?: "compact" | "standard" | "detailed" | undefined;
|
|
51
|
-
fields?: string[] | undefined;
|
|
52
|
-
omit_empty?: boolean | undefined;
|
|
53
|
-
} | undefined;
|
|
54
|
-
toplevel_id?: number | undefined;
|
|
55
|
-
}>;
|
|
26
|
+
}, z.core.$strip>>;
|
|
27
|
+
}, z.core.$strip>;
|
|
56
28
|
/**
|
|
57
29
|
* Get single client schema
|
|
58
30
|
*/
|
|
59
31
|
export declare const GetClientArgsSchema: z.ZodObject<{
|
|
60
32
|
client_id: z.ZodNumber;
|
|
61
33
|
format_options: z.ZodOptional<z.ZodObject<{
|
|
62
|
-
format: z.ZodOptional<z.ZodEnum<
|
|
63
|
-
|
|
34
|
+
format: z.ZodOptional<z.ZodEnum<{
|
|
35
|
+
compact: "compact";
|
|
36
|
+
standard: "standard";
|
|
37
|
+
detailed: "detailed";
|
|
38
|
+
}>>;
|
|
39
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
64
40
|
omit_empty: z.ZodOptional<z.ZodBoolean>;
|
|
65
|
-
},
|
|
66
|
-
|
|
67
|
-
fields?: string[] | undefined;
|
|
68
|
-
omit_empty?: boolean | undefined;
|
|
69
|
-
}, {
|
|
70
|
-
format?: "compact" | "standard" | "detailed" | undefined;
|
|
71
|
-
fields?: string[] | undefined;
|
|
72
|
-
omit_empty?: boolean | undefined;
|
|
73
|
-
}>>;
|
|
74
|
-
}, "strip", z.ZodTypeAny, {
|
|
75
|
-
client_id: number;
|
|
76
|
-
format_options?: {
|
|
77
|
-
format?: "compact" | "standard" | "detailed" | undefined;
|
|
78
|
-
fields?: string[] | undefined;
|
|
79
|
-
omit_empty?: boolean | undefined;
|
|
80
|
-
} | undefined;
|
|
81
|
-
}, {
|
|
82
|
-
client_id: number;
|
|
83
|
-
format_options?: {
|
|
84
|
-
format?: "compact" | "standard" | "detailed" | undefined;
|
|
85
|
-
fields?: string[] | undefined;
|
|
86
|
-
omit_empty?: boolean | undefined;
|
|
87
|
-
} | undefined;
|
|
88
|
-
}>;
|
|
41
|
+
}, z.core.$strip>>;
|
|
42
|
+
}, z.core.$strip>;
|
|
89
43
|
/**
|
|
90
44
|
* Search clients by name schema
|
|
91
45
|
*/
|
|
@@ -94,37 +48,15 @@ export declare const SearchClientsArgsSchema: z.ZodObject<{
|
|
|
94
48
|
includeactive: z.ZodOptional<z.ZodBoolean>;
|
|
95
49
|
includeinactive: z.ZodOptional<z.ZodBoolean>;
|
|
96
50
|
format_options: z.ZodOptional<z.ZodObject<{
|
|
97
|
-
format: z.ZodOptional<z.ZodEnum<
|
|
98
|
-
|
|
51
|
+
format: z.ZodOptional<z.ZodEnum<{
|
|
52
|
+
compact: "compact";
|
|
53
|
+
standard: "standard";
|
|
54
|
+
detailed: "detailed";
|
|
55
|
+
}>>;
|
|
56
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
99
57
|
omit_empty: z.ZodOptional<z.ZodBoolean>;
|
|
100
|
-
},
|
|
101
|
-
|
|
102
|
-
fields?: string[] | undefined;
|
|
103
|
-
omit_empty?: boolean | undefined;
|
|
104
|
-
}, {
|
|
105
|
-
format?: "compact" | "standard" | "detailed" | undefined;
|
|
106
|
-
fields?: string[] | undefined;
|
|
107
|
-
omit_empty?: boolean | undefined;
|
|
108
|
-
}>>;
|
|
109
|
-
}, "strip", z.ZodTypeAny, {
|
|
110
|
-
name: string;
|
|
111
|
-
includeactive?: boolean | undefined;
|
|
112
|
-
includeinactive?: boolean | undefined;
|
|
113
|
-
format_options?: {
|
|
114
|
-
format?: "compact" | "standard" | "detailed" | undefined;
|
|
115
|
-
fields?: string[] | undefined;
|
|
116
|
-
omit_empty?: boolean | undefined;
|
|
117
|
-
} | undefined;
|
|
118
|
-
}, {
|
|
119
|
-
name: string;
|
|
120
|
-
includeactive?: boolean | undefined;
|
|
121
|
-
includeinactive?: boolean | undefined;
|
|
122
|
-
format_options?: {
|
|
123
|
-
format?: "compact" | "standard" | "detailed" | undefined;
|
|
124
|
-
fields?: string[] | undefined;
|
|
125
|
-
omit_empty?: boolean | undefined;
|
|
126
|
-
} | undefined;
|
|
127
|
-
}>;
|
|
58
|
+
}, z.core.$strip>>;
|
|
59
|
+
}, z.core.$strip>;
|
|
128
60
|
/**
|
|
129
61
|
* List clients with optional filtering and token optimization
|
|
130
62
|
* Uses 5-minute cache TTL
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clients.d.ts","sourceRoot":"","sources":["../../src/tools/clients.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAavD;;GAEG;AACH,eAAO,MAAM,qBAAqB
|
|
1
|
+
{"version":3,"file":"clients.d.ts","sourceRoot":"","sources":["../../src/tools/clients.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAavD;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;iBAchC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;iBAI9B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;iBAQlC,CAAC;AAMH;;;GAGG;AACH,wBAAsB,WAAW,CAC/B,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,GAC1C,OAAO,CAAC,MAAM,CAAC,CAwCjB;AAED;;GAEG;AACH,wBAAsB,SAAS,CAC7B,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,GACxC,OAAO,CAAC,MAAM,CAAC,CAQjB;AAED;;;GAGG;AACH,wBAAsB,aAAa,CACjC,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,GAC5C,OAAO,CAAC,MAAM,CAAC,CAqCjB;AAMD,eAAO,MAAM,eAAe,EAAE,iBAK7B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,iBAK3B,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,iBAK/B,CAAC"}
|
|
@@ -11,91 +11,57 @@ import type { ZodToolDefinition } from './registry.js';
|
|
|
11
11
|
*/
|
|
12
12
|
export declare const ListAssetTypesArgsSchema: z.ZodObject<{
|
|
13
13
|
format_options: z.ZodOptional<z.ZodObject<{
|
|
14
|
-
format: z.ZodOptional<z.ZodEnum<
|
|
15
|
-
|
|
14
|
+
format: z.ZodOptional<z.ZodEnum<{
|
|
15
|
+
compact: "compact";
|
|
16
|
+
standard: "standard";
|
|
17
|
+
detailed: "detailed";
|
|
18
|
+
}>>;
|
|
19
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
16
20
|
omit_empty: z.ZodOptional<z.ZodBoolean>;
|
|
17
|
-
},
|
|
18
|
-
|
|
19
|
-
fields?: string[] | undefined;
|
|
20
|
-
omit_empty?: boolean | undefined;
|
|
21
|
-
}, {
|
|
22
|
-
format?: "compact" | "standard" | "detailed" | undefined;
|
|
23
|
-
fields?: string[] | undefined;
|
|
24
|
-
omit_empty?: boolean | undefined;
|
|
25
|
-
}>>;
|
|
26
|
-
}, "strip", z.ZodTypeAny, {
|
|
27
|
-
format_options?: {
|
|
28
|
-
format?: "compact" | "standard" | "detailed" | undefined;
|
|
29
|
-
fields?: string[] | undefined;
|
|
30
|
-
omit_empty?: boolean | undefined;
|
|
31
|
-
} | undefined;
|
|
32
|
-
}, {
|
|
33
|
-
format_options?: {
|
|
34
|
-
format?: "compact" | "standard" | "detailed" | undefined;
|
|
35
|
-
fields?: string[] | undefined;
|
|
36
|
-
omit_empty?: boolean | undefined;
|
|
37
|
-
} | undefined;
|
|
38
|
-
}>;
|
|
21
|
+
}, z.core.$strip>>;
|
|
22
|
+
}, z.core.$strip>;
|
|
39
23
|
/**
|
|
40
24
|
* List asset statuses schema
|
|
41
25
|
*/
|
|
42
26
|
export declare const ListAssetStatusesArgsSchema: z.ZodObject<{
|
|
43
27
|
format_options: z.ZodOptional<z.ZodObject<{
|
|
44
|
-
format: z.ZodOptional<z.ZodEnum<
|
|
45
|
-
|
|
28
|
+
format: z.ZodOptional<z.ZodEnum<{
|
|
29
|
+
compact: "compact";
|
|
30
|
+
standard: "standard";
|
|
31
|
+
detailed: "detailed";
|
|
32
|
+
}>>;
|
|
33
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
46
34
|
omit_empty: z.ZodOptional<z.ZodBoolean>;
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
fields?: string[] | undefined;
|
|
50
|
-
omit_empty?: boolean | undefined;
|
|
51
|
-
}, {
|
|
52
|
-
format?: "compact" | "standard" | "detailed" | undefined;
|
|
53
|
-
fields?: string[] | undefined;
|
|
54
|
-
omit_empty?: boolean | undefined;
|
|
55
|
-
}>>;
|
|
56
|
-
}, "strip", z.ZodTypeAny, {
|
|
57
|
-
format_options?: {
|
|
58
|
-
format?: "compact" | "standard" | "detailed" | undefined;
|
|
59
|
-
fields?: string[] | undefined;
|
|
60
|
-
omit_empty?: boolean | undefined;
|
|
61
|
-
} | undefined;
|
|
62
|
-
}, {
|
|
63
|
-
format_options?: {
|
|
64
|
-
format?: "compact" | "standard" | "detailed" | undefined;
|
|
65
|
-
fields?: string[] | undefined;
|
|
66
|
-
omit_empty?: boolean | undefined;
|
|
67
|
-
} | undefined;
|
|
68
|
-
}>;
|
|
35
|
+
}, z.core.$strip>>;
|
|
36
|
+
}, z.core.$strip>;
|
|
69
37
|
/**
|
|
70
38
|
* List contact types schema
|
|
71
39
|
*/
|
|
72
40
|
export declare const ListContactTypesArgsSchema: z.ZodObject<{
|
|
73
41
|
format_options: z.ZodOptional<z.ZodObject<{
|
|
74
|
-
format: z.ZodOptional<z.ZodEnum<
|
|
75
|
-
|
|
42
|
+
format: z.ZodOptional<z.ZodEnum<{
|
|
43
|
+
compact: "compact";
|
|
44
|
+
standard: "standard";
|
|
45
|
+
detailed: "detailed";
|
|
46
|
+
}>>;
|
|
47
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
76
48
|
omit_empty: z.ZodOptional<z.ZodBoolean>;
|
|
77
|
-
},
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
fields
|
|
90
|
-
omit_empty
|
|
91
|
-
}
|
|
92
|
-
},
|
|
93
|
-
format_options?: {
|
|
94
|
-
format?: "compact" | "standard" | "detailed" | undefined;
|
|
95
|
-
fields?: string[] | undefined;
|
|
96
|
-
omit_empty?: boolean | undefined;
|
|
97
|
-
} | undefined;
|
|
98
|
-
}>;
|
|
49
|
+
}, z.core.$strip>>;
|
|
50
|
+
}, z.core.$strip>;
|
|
51
|
+
/**
|
|
52
|
+
* List agents schema
|
|
53
|
+
*/
|
|
54
|
+
export declare const ListAgentsArgsSchema: z.ZodObject<{
|
|
55
|
+
format_options: z.ZodOptional<z.ZodObject<{
|
|
56
|
+
format: z.ZodOptional<z.ZodEnum<{
|
|
57
|
+
compact: "compact";
|
|
58
|
+
standard: "standard";
|
|
59
|
+
detailed: "detailed";
|
|
60
|
+
}>>;
|
|
61
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
62
|
+
omit_empty: z.ZodOptional<z.ZodBoolean>;
|
|
63
|
+
}, z.core.$strip>>;
|
|
64
|
+
}, z.core.$strip>;
|
|
99
65
|
/**
|
|
100
66
|
* List all asset types (reference data)
|
|
101
67
|
* Uses 1-hour cache TTL
|
|
@@ -112,7 +78,13 @@ export declare function listAssetStatuses(client: HaloPSAAPIClient, args: z.infe
|
|
|
112
78
|
* Uses 1-hour cache TTL
|
|
113
79
|
*/
|
|
114
80
|
export declare function listContactTypes(client: HaloPSAAPIClient, args: z.infer<typeof ListContactTypesArgsSchema>): Promise<string>;
|
|
81
|
+
/**
|
|
82
|
+
* List all agents (reference data)
|
|
83
|
+
* Uses 1-hour cache TTL
|
|
84
|
+
*/
|
|
85
|
+
export declare function listAgents(client: HaloPSAAPIClient, args: z.infer<typeof ListAgentsArgsSchema>): Promise<string>;
|
|
115
86
|
export declare const listAssetTypesTool: ZodToolDefinition;
|
|
116
87
|
export declare const listAssetStatusesTool: ZodToolDefinition;
|
|
117
88
|
export declare const listContactTypesTool: ZodToolDefinition;
|
|
89
|
+
export declare const listAgentsTool: ZodToolDefinition;
|
|
118
90
|
//# sourceMappingURL=reference-data.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reference-data.d.ts","sourceRoot":"","sources":["../../src/tools/reference-data.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"reference-data.d.ts","sourceRoot":"","sources":["../../src/tools/reference-data.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAkDvD;;GAEG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;iBAEnC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;iBAEtC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;iBAErC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;iBAE/B,CAAC;AAMH;;;GAGG;AACH,wBAAsB,cAAc,CAClC,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,GAC7C,OAAO,CAAC,MAAM,CAAC,CAqBjB;AAED;;;;GAIG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,GAChD,OAAO,CAAC,MAAM,CAAC,CA8BjB;AAED;;;GAGG;AACH,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,GAC/C,OAAO,CAAC,MAAM,CAAC,CAqBjB;AAED;;;GAGG;AACH,wBAAsB,UAAU,CAC9B,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,GACzC,OAAO,CAAC,MAAM,CAAC,CAqBjB;AAMD,eAAO,MAAM,kBAAkB,EAAE,iBAKhC,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,iBAKnC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,iBAKlC,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,iBAK5B,CAAC"}
|
|
@@ -28,6 +28,12 @@ export const ListAssetStatusesArgsSchema = z.object({
|
|
|
28
28
|
export const ListContactTypesArgsSchema = z.object({
|
|
29
29
|
format_options: FormatOptionsSchema,
|
|
30
30
|
});
|
|
31
|
+
/**
|
|
32
|
+
* List agents schema
|
|
33
|
+
*/
|
|
34
|
+
export const ListAgentsArgsSchema = z.object({
|
|
35
|
+
format_options: FormatOptionsSchema,
|
|
36
|
+
});
|
|
31
37
|
// =============================================================================
|
|
32
38
|
// Tool Implementations
|
|
33
39
|
// =============================================================================
|
|
@@ -42,7 +48,9 @@ export async function listAssetTypes(client, args) {
|
|
|
42
48
|
ttl: TTL.ASSET_TYPES,
|
|
43
49
|
keyPrefix: 'assettypes:all',
|
|
44
50
|
});
|
|
45
|
-
|
|
51
|
+
const assettypes = Array.isArray(response) ? response : response.assettypes;
|
|
52
|
+
const recordCount = Array.isArray(response) ? response.length : response.record_count;
|
|
53
|
+
return formatResponse(assettypes, formatOptions, { record_count: recordCount });
|
|
46
54
|
}
|
|
47
55
|
/**
|
|
48
56
|
* List all asset statuses (reference data)
|
|
@@ -56,15 +64,17 @@ export async function listAssetStatuses(client, args) {
|
|
|
56
64
|
ttl: TTL.ASSET_STATUSES,
|
|
57
65
|
keyPrefix: 'assetstatuses:all',
|
|
58
66
|
});
|
|
67
|
+
const assetstatuses = Array.isArray(response) ? response : response.assetstatuses;
|
|
68
|
+
const recordCount = Array.isArray(response) ? response.length : response.record_count;
|
|
59
69
|
// Add billing note to each status
|
|
60
|
-
const statusesWithNotes =
|
|
70
|
+
const statusesWithNotes = assetstatuses.map((status) => ({
|
|
61
71
|
...status,
|
|
62
72
|
billing_eligible: status.id === 1, // Only Active status counts for billing
|
|
63
73
|
billing_note: status.id === 1
|
|
64
74
|
? 'COUNTS toward billing'
|
|
65
75
|
: 'Does NOT count toward billing',
|
|
66
76
|
}));
|
|
67
|
-
return formatResponse(statusesWithNotes, formatOptions, { record_count:
|
|
77
|
+
return formatResponse(statusesWithNotes, formatOptions, { record_count: recordCount });
|
|
68
78
|
}
|
|
69
79
|
/**
|
|
70
80
|
* List all contact types (reference data)
|
|
@@ -77,7 +87,24 @@ export async function listContactTypes(client, args) {
|
|
|
77
87
|
ttl: TTL.CONTACT_TYPES,
|
|
78
88
|
keyPrefix: 'contacttypes:all',
|
|
79
89
|
});
|
|
80
|
-
|
|
90
|
+
const contacttypes = Array.isArray(response) ? response : response.contacttypes;
|
|
91
|
+
const recordCount = Array.isArray(response) ? response.length : response.record_count;
|
|
92
|
+
return formatResponse(contacttypes, formatOptions, { record_count: recordCount });
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* List all agents (reference data)
|
|
96
|
+
* Uses 1-hour cache TTL
|
|
97
|
+
*/
|
|
98
|
+
export async function listAgents(client, args) {
|
|
99
|
+
const formatOptions = args.format_options || {};
|
|
100
|
+
const response = await client.getCached('/Agent', { count: 500 }, {
|
|
101
|
+
enabled: true,
|
|
102
|
+
ttl: TTL.AGENT_LIST,
|
|
103
|
+
keyPrefix: 'agents:all',
|
|
104
|
+
});
|
|
105
|
+
const agents = Array.isArray(response) ? response : response.agents;
|
|
106
|
+
const recordCount = Array.isArray(response) ? response.length : response.record_count;
|
|
107
|
+
return formatResponse(agents, formatOptions, { record_count: recordCount });
|
|
81
108
|
}
|
|
82
109
|
// =============================================================================
|
|
83
110
|
// Tool Definitions (for ToolRegistry)
|
|
@@ -100,4 +127,10 @@ export const listContactTypesTool = {
|
|
|
100
127
|
schema: ListContactTypesArgsSchema,
|
|
101
128
|
handler: listContactTypes,
|
|
102
129
|
};
|
|
130
|
+
export const listAgentsTool = {
|
|
131
|
+
name: 'list_halopsa_agents',
|
|
132
|
+
description: 'List all HaloPSA agents (reference data) with caching (1hour TTL)',
|
|
133
|
+
schema: ListAgentsArgsSchema,
|
|
134
|
+
handler: listAgents,
|
|
135
|
+
};
|
|
103
136
|
//# sourceMappingURL=reference-data.js.map
|