@umbraco-engage/mcp 19.0.0-beta.1 → 19.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/collections.js +20 -3
- package/dist/collections.js.map +1 -1
- package/dist/index.js +21 -4
- package/dist/index.js.map +1 -1
- package/dist/tool-types.d.ts +4 -0
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -12,7 +12,7 @@ import { randomUUID } from 'crypto';
|
|
|
12
12
|
|
|
13
13
|
// package.json
|
|
14
14
|
var package_default = {
|
|
15
|
-
version: "19.0.0-beta.
|
|
15
|
+
version: "19.0.0-beta.2"};
|
|
16
16
|
var isMockMode = () => process.env.USE_MOCK_API === "true" && !process.env.JEST_WORKER_ID;
|
|
17
17
|
var mockItems = /* @__PURE__ */ new Map();
|
|
18
18
|
function initializeMockData() {
|
|
@@ -10480,6 +10480,15 @@ var tool95 = {
|
|
|
10480
10480
|
}
|
|
10481
10481
|
};
|
|
10482
10482
|
var get_profile_details_default = withStandardDecorators(tool95);
|
|
10483
|
+
|
|
10484
|
+
// src/umbraco-api/tools/profile/get/to-export-page.ts
|
|
10485
|
+
function toExportPage(rows, skip, take) {
|
|
10486
|
+
const hasMore = rows.length > take;
|
|
10487
|
+
const items = hasMore ? rows.slice(0, take) : [...rows];
|
|
10488
|
+
return { items, total: skip + items.length + (hasMore ? 1 : 0) };
|
|
10489
|
+
}
|
|
10490
|
+
|
|
10491
|
+
// src/umbraco-api/tools/profile/get/get-profile-export.ts
|
|
10483
10492
|
var inputSchema97 = z.object({
|
|
10484
10493
|
skip: z.number().default(0),
|
|
10485
10494
|
take: z.number().default(25),
|
|
@@ -10495,7 +10504,12 @@ var inputSchema97 = z.object({
|
|
|
10495
10504
|
activeTo: z.iso.datetime().nullish(),
|
|
10496
10505
|
identifiedName: getProfileExportQueryParams.shape.IdentifiedName
|
|
10497
10506
|
});
|
|
10498
|
-
var outputSchema82 = z.object({
|
|
10507
|
+
var outputSchema82 = z.object({
|
|
10508
|
+
items: getProfileExportResponse,
|
|
10509
|
+
total: z.number().describe(
|
|
10510
|
+
"Lower bound on the number of matching profiles, not an exact count (the endpoint reports none): skip + the rows returned, plus 1 when more rows exist beyond this page. It only drives `nextCursor` - use `nextCursor` to page, not this number."
|
|
10511
|
+
)
|
|
10512
|
+
});
|
|
10499
10513
|
var tool96 = {
|
|
10500
10514
|
name: "get-profile-export",
|
|
10501
10515
|
description: "Search visitor profiles with the same filters as post-profile-overview (segment, goal thresholds, identification status, active date range), one row per visitor - but with a different, smaller field set (adds `type`/`url`, omits member/personalization detail). Prefer post-profile-overview unless you specifically need this tool's fields. Paginated via `cursor` (pass the previous response's `nextCursor` for the next page; omit for the first page).",
|
|
@@ -10506,7 +10520,9 @@ var tool96 = {
|
|
|
10506
10520
|
handler: async (params) => {
|
|
10507
10521
|
const apiParams = {
|
|
10508
10522
|
Skip: params.skip,
|
|
10509
|
-
|
|
10523
|
+
// One extra row tells us whether another page exists: the endpoint returns a
|
|
10524
|
+
// bare array with no total, and the SDK's cursor pagination needs a total.
|
|
10525
|
+
Take: params.take + 1,
|
|
10510
10526
|
Order: params.order,
|
|
10511
10527
|
Ascending: params.ascending,
|
|
10512
10528
|
SegmentId: params.segmentId,
|
|
@@ -10523,7 +10539,8 @@ var tool96 = {
|
|
|
10523
10539
|
(client) => client.getProfileExport(apiParams, CAPTURE_RAW_HTTP_RESPONSE)
|
|
10524
10540
|
);
|
|
10525
10541
|
if (!result.isError && Array.isArray(result.structuredContent)) {
|
|
10526
|
-
|
|
10542
|
+
const structuredContent = toExportPage(result.structuredContent, params.skip, params.take);
|
|
10543
|
+
return { ...result, structuredContent, content: [{ type: "text", text: JSON.stringify(structuredContent) }] };
|
|
10527
10544
|
}
|
|
10528
10545
|
return result;
|
|
10529
10546
|
}
|