@umbraco-cms/mcp-dev 17.6.2 → 17.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-KDAEC7HU.cjs → chunk-4MRMRMFC.cjs} +446 -83
- package/dist/chunk-4MRMRMFC.cjs.map +1 -0
- package/dist/{chunk-MWSQU2CY.js → chunk-H6OBIRHB.js} +2300 -1937
- package/dist/chunk-H6OBIRHB.js.map +1 -0
- package/dist/collections.cjs +2 -2
- package/dist/collections.js +1 -1
- package/dist/index.cjs +152 -152
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-KDAEC7HU.cjs.map +0 -1
- package/dist/chunk-MWSQU2CY.js.map +0 -1
|
@@ -15248,6 +15248,185 @@ var CreateDocumentTool = {
|
|
|
15248
15248
|
};
|
|
15249
15249
|
var create_document_default = _mcpserversdk.withStandardDecorators.call(void 0, CreateDocumentTool);
|
|
15250
15250
|
|
|
15251
|
+
// src/umbraco-api/tools/document/post/create-and-publish-document.ts
|
|
15252
|
+
|
|
15253
|
+
|
|
15254
|
+
|
|
15255
|
+
|
|
15256
|
+
|
|
15257
|
+
|
|
15258
|
+
|
|
15259
|
+
|
|
15260
|
+
var createAndPublishOutputSchema = _zod.z.object({
|
|
15261
|
+
message: _zod.z.string(),
|
|
15262
|
+
id: _zod.z.string().guid()
|
|
15263
|
+
});
|
|
15264
|
+
var createAndPublishDocumentSchema = _zod.z.object({
|
|
15265
|
+
documentTypeId: _zod.z.string().uuid("Must be a valid document type type UUID"),
|
|
15266
|
+
parentId: _zod.z.string().uuid("Must be a valid document UUID").optional(),
|
|
15267
|
+
name: _zod.z.string(),
|
|
15268
|
+
templateId: _zod.z.string().uuid("Must be a valid template UUID").optional().describe(
|
|
15269
|
+
"Optional template ID to apply to the document. If omitted, the document type's default template is applied automatically. Provide a value only when you need a specific allowed template other than the default."
|
|
15270
|
+
),
|
|
15271
|
+
cultures: _zod.z.array(_zod.z.string()).optional().describe("Array of culture codes. If not provided or empty array, will create single variant with null culture."),
|
|
15272
|
+
culturesToPublish: _zod.z.array(_zod.z.string()).optional().describe(
|
|
15273
|
+
'Culture codes to publish immediately after creation. Must contain real culture codes only - wildcards ("*") and nulls are rejected by Umbraco. If omitted, defaults to publishing every culture in the cultures array, or an empty array (which publishes the single invariant variant) when the document type does not vary by culture.'
|
|
15274
|
+
),
|
|
15275
|
+
values: _zod.z.array(
|
|
15276
|
+
_zod.z.object({
|
|
15277
|
+
editorAlias: _zod.z.string(),
|
|
15278
|
+
culture: _zod.z.string().nullable(),
|
|
15279
|
+
segment: _zod.z.string().nullable(),
|
|
15280
|
+
alias: _zod.z.string(),
|
|
15281
|
+
value: _zod.z.any()
|
|
15282
|
+
})
|
|
15283
|
+
).default([])
|
|
15284
|
+
});
|
|
15285
|
+
var CreateAndPublishDocumentTool = {
|
|
15286
|
+
name: "create-and-publish-document",
|
|
15287
|
+
description: `Creates a document and publishes it in a single operation, with support for multiple cultures.
|
|
15288
|
+
|
|
15289
|
+
Always follow these requirements when creating documents exactly, do not deviate in any way.
|
|
15290
|
+
|
|
15291
|
+
## COPY-FIRST APPROACH (RECOMMENDED)
|
|
15292
|
+
|
|
15293
|
+
**FIRST: Try to copy an existing document**
|
|
15294
|
+
1. Only use this if copy-document and search-document tools are available
|
|
15295
|
+
2. Use search-document to find documents with the same document type
|
|
15296
|
+
3. If similar documents exist AND copy-document tool is available:
|
|
15297
|
+
- Use copy-document to duplicate the existing structure
|
|
15298
|
+
- Use search-document to find the new document (copy returns empty string, not the new ID)
|
|
15299
|
+
- Update and publish with update-and-publish-document as needed
|
|
15300
|
+
|
|
15301
|
+
**SECOND: Only create from scratch when:**
|
|
15302
|
+
- No similar documents exist in Umbraco
|
|
15303
|
+
- Copy-document tool doesn't exist
|
|
15304
|
+
- You need to create from scratch with unique structure
|
|
15305
|
+
|
|
15306
|
+
Benefits: Preserves structure, inherits properties, maintains consistency with existing content.
|
|
15307
|
+
|
|
15308
|
+
## Introduction
|
|
15309
|
+
|
|
15310
|
+
This tool creates and publishes documents with multi-culture support:
|
|
15311
|
+
- If cultures parameter is provided, a variant will be created for each culture code
|
|
15312
|
+
- If cultures parameter is not provided or is an empty array, will create a single variant with null culture (original behavior)
|
|
15313
|
+
- IMPORTANT: If workflow approval is required, use create-document followed by initiate-workflow-action instead.
|
|
15314
|
+
This tool bypasses approval workflows and publishes directly to the live site.
|
|
15315
|
+
|
|
15316
|
+
## Critical Requirements
|
|
15317
|
+
|
|
15318
|
+
### Document Type Analysis (When Creating from Scratch)
|
|
15319
|
+
1. Use get-document-type-by-id to understand the document type structure and required properties
|
|
15320
|
+
2. Ensure all required properties are included in the values array
|
|
15321
|
+
|
|
15322
|
+
### Document Types and Data Types
|
|
15323
|
+
1. BEFORE creating any new document type, ALWAYS search for existing ones using get-all-document-types
|
|
15324
|
+
2. BEFORE creating any new data type, ALWAYS search for existing ones using get-all-data-types
|
|
15325
|
+
3. ONLY create a new document type or data type if NO suitable existing ones are found
|
|
15326
|
+
4. If similar types exist, inform the user and suggest using the existing types instead
|
|
15327
|
+
5. Creation of new types should be a last resort when nothing suitable exists
|
|
15328
|
+
|
|
15329
|
+
### Parent ID Handling
|
|
15330
|
+
For document types with allowedAsRoot=true, DO NOT include the parentId parameter at all in the function call.
|
|
15331
|
+
When adding a parent, first find the parent using get-document-root or get-document-children and then use the id of the parent in the parentId parameter. Alway makes sure that the id is valid.
|
|
15332
|
+
|
|
15333
|
+
### Values Matching
|
|
15334
|
+
- Values must match the aliases of the document type structure
|
|
15335
|
+
- Block lists, Block Grids and Rich Text Blocks items and settings must match the defined blocks document type structures
|
|
15336
|
+
|
|
15337
|
+
### Unique Keys
|
|
15338
|
+
All generated keys must be unique and randomly generated.
|
|
15339
|
+
|
|
15340
|
+
### Cultures To Publish
|
|
15341
|
+
- culturesToPublish controls which of the created variants get published immediately.
|
|
15342
|
+
- Umbraco only accepts real culture codes here - wildcards ("*") and nulls are rejected with an error.
|
|
15343
|
+
- When the document type does not vary by culture (invariant content), pass an empty array \`[]\` to publish the single invariant variant (this is the default when omitted).
|
|
15344
|
+
- When the document type varies by culture, culturesToPublish defaults to every culture supplied in the cultures array. Pass a subset to only publish some of the created variants.
|
|
15345
|
+
|
|
15346
|
+
## Property Editor Values Reference
|
|
15347
|
+
|
|
15348
|
+
When creating documents, you need to provide property values that match the property editors defined in the document type.
|
|
15349
|
+
|
|
15350
|
+
IMPORTANT: Use the get-document-type-schema tool to:
|
|
15351
|
+
- Get the JSON Schema describing the expected property structure for a specific document type
|
|
15352
|
+
- The schema includes all property definitions and their value formats
|
|
15353
|
+
- Use the schema to construct the correct values array for your document
|
|
15354
|
+
|
|
15355
|
+
The values parameter is an array of property value objects following this structure:
|
|
15356
|
+
{
|
|
15357
|
+
"editorAlias": "Umbraco.TextBox", // The property editor type
|
|
15358
|
+
"culture": null, // Document-specific - culture code or null
|
|
15359
|
+
"segment": null, // Document-specific - segment or null
|
|
15360
|
+
"alias": "propertyAlias", // Property alias from document type
|
|
15361
|
+
"value": "your value here" // Value matching the schema structure
|
|
15362
|
+
}
|
|
15363
|
+
|
|
15364
|
+
## Default Template
|
|
15365
|
+
|
|
15366
|
+
The document type's default template is applied automatically. Pass an explicit \`templateId\` only when you need a specific allowed template other than the default. If the document type has no default template, the document is created without one.
|
|
15367
|
+
`,
|
|
15368
|
+
inputSchema: createAndPublishDocumentSchema.shape,
|
|
15369
|
+
outputSchema: createAndPublishOutputSchema.shape,
|
|
15370
|
+
slices: ["create"],
|
|
15371
|
+
enabled: (user) => user.fallbackPermissions.includes(UmbracoDocumentPermissions.Create) && user.fallbackPermissions.includes(UmbracoDocumentPermissions.Publish),
|
|
15372
|
+
handler: (async (model) => {
|
|
15373
|
+
const client = UmbracoManagementClient3.getClient();
|
|
15374
|
+
const documentId = _uuid.v4.call(void 0, );
|
|
15375
|
+
let culturesToUse = [];
|
|
15376
|
+
if (model.cultures === void 0 || model.cultures.length === 0) {
|
|
15377
|
+
culturesToUse = [null];
|
|
15378
|
+
} else {
|
|
15379
|
+
culturesToUse = model.cultures;
|
|
15380
|
+
}
|
|
15381
|
+
const variants = culturesToUse.map((culture) => ({
|
|
15382
|
+
culture,
|
|
15383
|
+
name: model.name,
|
|
15384
|
+
segment: null
|
|
15385
|
+
}));
|
|
15386
|
+
let culturesToPublish;
|
|
15387
|
+
if (model.culturesToPublish && model.culturesToPublish.length > 0) {
|
|
15388
|
+
culturesToPublish = model.culturesToPublish;
|
|
15389
|
+
} else if (model.cultures === void 0 || model.cultures.length === 0) {
|
|
15390
|
+
culturesToPublish = [];
|
|
15391
|
+
} else {
|
|
15392
|
+
culturesToPublish = model.cultures;
|
|
15393
|
+
}
|
|
15394
|
+
let template;
|
|
15395
|
+
if (model.templateId) {
|
|
15396
|
+
template = { id: model.templateId };
|
|
15397
|
+
} else {
|
|
15398
|
+
const docType = await client.getDocumentTypeById(model.documentTypeId);
|
|
15399
|
+
template = _optionalChain([docType, 'access', _24 => _24.defaultTemplate, 'optionalAccess', _25 => _25.id]) ? { id: docType.defaultTemplate.id } : null;
|
|
15400
|
+
}
|
|
15401
|
+
const payload = {
|
|
15402
|
+
id: documentId,
|
|
15403
|
+
documentType: {
|
|
15404
|
+
id: model.documentTypeId
|
|
15405
|
+
},
|
|
15406
|
+
parent: model.parentId ? {
|
|
15407
|
+
id: model.parentId
|
|
15408
|
+
} : void 0,
|
|
15409
|
+
template,
|
|
15410
|
+
culturesToPublish,
|
|
15411
|
+
values: model.values,
|
|
15412
|
+
variants
|
|
15413
|
+
};
|
|
15414
|
+
const response = await client.postDocumentCreateAndPublish(payload, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE);
|
|
15415
|
+
if (response.status === 201 || response.status === 200) {
|
|
15416
|
+
return _mcpserversdk.createToolResult.call(void 0, {
|
|
15417
|
+
message: "Document created and published successfully",
|
|
15418
|
+
id: documentId
|
|
15419
|
+
});
|
|
15420
|
+
} else {
|
|
15421
|
+
return _mcpserversdk.createToolResultError.call(void 0, response.data || {
|
|
15422
|
+
status: response.status,
|
|
15423
|
+
detail: response.statusText
|
|
15424
|
+
});
|
|
15425
|
+
}
|
|
15426
|
+
})
|
|
15427
|
+
};
|
|
15428
|
+
var create_and_publish_document_default = _mcpserversdk.withStandardDecorators.call(void 0, CreateAndPublishDocumentTool);
|
|
15429
|
+
|
|
15251
15430
|
// src/umbraco-api/tools/document/put/put-document-public-access.ts
|
|
15252
15431
|
|
|
15253
15432
|
|
|
@@ -15465,7 +15644,7 @@ var SortDocumentTool = {
|
|
|
15465
15644
|
};
|
|
15466
15645
|
var sort_document_default = _mcpserversdk.withStandardDecorators.call(void 0, SortDocumentTool);
|
|
15467
15646
|
|
|
15468
|
-
// src/umbraco-api/tools/document/put/
|
|
15647
|
+
// src/umbraco-api/tools/document/put/sort-document-children.ts
|
|
15469
15648
|
|
|
15470
15649
|
|
|
15471
15650
|
|
|
@@ -15473,13 +15652,68 @@ var sort_document_default = _mcpserversdk.withStandardDecorators.call(void 0, So
|
|
|
15473
15652
|
|
|
15474
15653
|
|
|
15475
15654
|
var inputSchema13 = {
|
|
15655
|
+
id: putDocumentByIdSortChildrenParams.shape.id,
|
|
15656
|
+
data: _zod.z.object(putDocumentByIdSortChildrenBody.shape)
|
|
15657
|
+
};
|
|
15658
|
+
var SortDocumentChildrenTool = {
|
|
15659
|
+
name: "sort-document-children",
|
|
15660
|
+
description: `Sorts the children of the document identified by Id by a system field (Name, CreateDate or UpdateDate) in the given direction (Ascending or Descending).
|
|
15661
|
+
|
|
15662
|
+
This is DIFFERENT from sort-document: sort-document reorders children according to an explicit list of ids and sort orders you provide, whereas sort-document-children sorts every child of {id} automatically by the chosen field and direction - no explicit ordering is required.
|
|
15663
|
+
|
|
15664
|
+
When sorting by Name, an optional culture selects which variant name to sort by; the culture is not validated, so children that do not vary by it (or an unrecognised culture) fall back to the invariant name.`,
|
|
15665
|
+
inputSchema: inputSchema13,
|
|
15666
|
+
annotations: {},
|
|
15667
|
+
slices: ["sort"],
|
|
15668
|
+
enabled: (user) => user.fallbackPermissions.includes(UmbracoDocumentPermissions.Sort),
|
|
15669
|
+
handler: (async (model) => {
|
|
15670
|
+
return _mcpserversdk.executeVoidApiCall.call(void 0,
|
|
15671
|
+
(client) => client.putDocumentByIdSortChildren(model.id, model.data, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE)
|
|
15672
|
+
);
|
|
15673
|
+
})
|
|
15674
|
+
};
|
|
15675
|
+
var sort_document_children_default = _mcpserversdk.withStandardDecorators.call(void 0, SortDocumentChildrenTool);
|
|
15676
|
+
|
|
15677
|
+
// src/umbraco-api/tools/document/put/sort-document-root-children.ts
|
|
15678
|
+
|
|
15679
|
+
|
|
15680
|
+
|
|
15681
|
+
|
|
15682
|
+
|
|
15683
|
+
var SortDocumentRootChildrenTool = {
|
|
15684
|
+
name: "sort-document-root-children",
|
|
15685
|
+
description: `Sorts the root-level documents by a system field (Name, CreateDate or UpdateDate) in the given direction (Ascending or Descending).
|
|
15686
|
+
|
|
15687
|
+
This is the root-level equivalent of sort-document-children: it sorts every document at the root of the content tree automatically by the chosen field and direction - no explicit ordering is required. This is DIFFERENT from sort-document, which reorders documents according to an explicit list of ids and sort orders you provide.
|
|
15688
|
+
|
|
15689
|
+
When sorting by Name, an optional culture selects which variant name to sort by; the culture is not validated, so documents that do not vary by it (or an unrecognised culture) fall back to the invariant name.`,
|
|
15690
|
+
inputSchema: putDocumentRootSortChildrenBody.shape,
|
|
15691
|
+
annotations: {},
|
|
15692
|
+
slices: ["sort"],
|
|
15693
|
+
enabled: (user) => user.fallbackPermissions.includes(UmbracoDocumentPermissions.Sort),
|
|
15694
|
+
handler: (async (model) => {
|
|
15695
|
+
return _mcpserversdk.executeVoidApiCall.call(void 0,
|
|
15696
|
+
(client) => client.putDocumentRootSortChildren(model, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE)
|
|
15697
|
+
);
|
|
15698
|
+
})
|
|
15699
|
+
};
|
|
15700
|
+
var sort_document_root_children_default = _mcpserversdk.withStandardDecorators.call(void 0, SortDocumentRootChildrenTool);
|
|
15701
|
+
|
|
15702
|
+
// src/umbraco-api/tools/document/put/move-document.ts
|
|
15703
|
+
|
|
15704
|
+
|
|
15705
|
+
|
|
15706
|
+
|
|
15707
|
+
|
|
15708
|
+
|
|
15709
|
+
var inputSchema14 = {
|
|
15476
15710
|
id: _zod.z.string().uuid(),
|
|
15477
15711
|
data: _zod.z.object(putDocumentByIdMoveBody.shape)
|
|
15478
15712
|
};
|
|
15479
15713
|
var MoveDocumentTool = {
|
|
15480
15714
|
name: "move-document",
|
|
15481
15715
|
description: "Move a document to a new location",
|
|
15482
|
-
inputSchema:
|
|
15716
|
+
inputSchema: inputSchema14,
|
|
15483
15717
|
annotations: {},
|
|
15484
15718
|
slices: ["move"],
|
|
15485
15719
|
enabled: (user) => user.fallbackPermissions.includes(UmbracoDocumentPermissions.Move),
|
|
@@ -15498,7 +15732,7 @@ var move_document_default = _mcpserversdk.withStandardDecorators.call(void 0, Mo
|
|
|
15498
15732
|
|
|
15499
15733
|
|
|
15500
15734
|
|
|
15501
|
-
var
|
|
15735
|
+
var inputSchema15 = {
|
|
15502
15736
|
id: _zod.z.string().uuid(),
|
|
15503
15737
|
data: _zod.z.object(putDocumentByIdPublishBody.shape)
|
|
15504
15738
|
};
|
|
@@ -15508,7 +15742,7 @@ var PublishDocumentTool = {
|
|
|
15508
15742
|
This function bypasses approval workflows and publishes directly to the live site.
|
|
15509
15743
|
When the culture is not provided, the default culture is null.
|
|
15510
15744
|
When the schedule is not provided, the default schedule is null.`,
|
|
15511
|
-
inputSchema:
|
|
15745
|
+
inputSchema: inputSchema15,
|
|
15512
15746
|
annotations: {},
|
|
15513
15747
|
slices: ["publish"],
|
|
15514
15748
|
enabled: (user) => user.fallbackPermissions.includes(UmbracoDocumentPermissions.Publish),
|
|
@@ -15596,7 +15830,7 @@ var move_to_recycle_bin_default = _mcpserversdk.withStandardDecorators.call(void
|
|
|
15596
15830
|
|
|
15597
15831
|
|
|
15598
15832
|
|
|
15599
|
-
var
|
|
15833
|
+
var inputSchema16 = {
|
|
15600
15834
|
id: putDocumentByIdParams.shape.id,
|
|
15601
15835
|
data: _zod.z.object(putDocumentByIdBody.shape),
|
|
15602
15836
|
confirmClearValues: _zod.z.boolean().optional().describe(
|
|
@@ -15623,21 +15857,21 @@ var UpdateDocumentTool = {
|
|
|
15623
15857
|
Always include the full, unmodified "values" array from the document you just read unless you
|
|
15624
15858
|
intend to clear every property. If the document currently has values, an empty "values" array is
|
|
15625
15859
|
rejected unless "confirmClearValues" is set to true.`,
|
|
15626
|
-
inputSchema:
|
|
15860
|
+
inputSchema: inputSchema16,
|
|
15627
15861
|
annotations: {
|
|
15628
15862
|
idempotentHint: true
|
|
15629
15863
|
},
|
|
15630
15864
|
slices: ["update"],
|
|
15631
15865
|
enabled: (user) => user.fallbackPermissions.includes(UmbracoDocumentPermissions.Update),
|
|
15632
15866
|
handler: (async (model) => {
|
|
15633
|
-
const incomingValues = _optionalChain([model, 'access',
|
|
15867
|
+
const incomingValues = _optionalChain([model, 'access', _26 => _26.data, 'optionalAccess', _27 => _27.values]);
|
|
15634
15868
|
if (Array.isArray(incomingValues) && incomingValues.length === 0 && !model.confirmClearValues) {
|
|
15635
15869
|
const client = UmbracoManagementClient3.getClient();
|
|
15636
15870
|
let currentDocument;
|
|
15637
15871
|
try {
|
|
15638
15872
|
currentDocument = await client.getDocumentById(model.id);
|
|
15639
15873
|
} catch (error) {
|
|
15640
|
-
const status = _optionalChain([error, 'optionalAccess',
|
|
15874
|
+
const status = _optionalChain([error, 'optionalAccess', _28 => _28.response, 'optionalAccess', _29 => _29.status]);
|
|
15641
15875
|
if (status !== 404) {
|
|
15642
15876
|
throw error;
|
|
15643
15877
|
}
|
|
@@ -15656,6 +15890,48 @@ var UpdateDocumentTool = {
|
|
|
15656
15890
|
};
|
|
15657
15891
|
var update_document_default = _mcpserversdk.withStandardDecorators.call(void 0, UpdateDocumentTool);
|
|
15658
15892
|
|
|
15893
|
+
// src/umbraco-api/tools/document/put/update-and-publish-document.ts
|
|
15894
|
+
|
|
15895
|
+
|
|
15896
|
+
|
|
15897
|
+
|
|
15898
|
+
|
|
15899
|
+
|
|
15900
|
+
var inputSchema17 = {
|
|
15901
|
+
id: putDocumentByIdUpdateAndPublishParams.shape.id,
|
|
15902
|
+
data: _zod.z.object(putDocumentByIdUpdateAndPublishBody.shape)
|
|
15903
|
+
};
|
|
15904
|
+
var UpdateAndPublishDocumentTool = {
|
|
15905
|
+
name: "update-and-publish-document",
|
|
15906
|
+
description: `Updates a document by Id and publishes it in a single operation.
|
|
15907
|
+
|
|
15908
|
+
IMPORTANT: If workflow approval is required, use update-document followed by initiate-workflow-action instead.
|
|
15909
|
+
This function bypasses approval workflows and publishes directly to the live site.
|
|
15910
|
+
|
|
15911
|
+
### Cultures To Publish
|
|
15912
|
+
- culturesToPublish controls which of the document's variants get published.
|
|
15913
|
+
- Umbraco only accepts real culture codes here - wildcards ("*") and nulls are rejected with an error.
|
|
15914
|
+
- When the document does not vary by culture (invariant content), pass an empty array \`[]\` to publish the single invariant variant.
|
|
15915
|
+
- When the document varies by culture, provide the culture codes of the variants you want published.
|
|
15916
|
+
|
|
15917
|
+
If you must use this tool:
|
|
15918
|
+
- Always read the current document value first
|
|
15919
|
+
- Only update the required values
|
|
15920
|
+
- Don't miss any properties from the original document`,
|
|
15921
|
+
inputSchema: inputSchema17,
|
|
15922
|
+
annotations: {
|
|
15923
|
+
idempotentHint: true
|
|
15924
|
+
},
|
|
15925
|
+
slices: ["update"],
|
|
15926
|
+
enabled: (user) => user.fallbackPermissions.includes(UmbracoDocumentPermissions.Publish),
|
|
15927
|
+
handler: (async (model) => {
|
|
15928
|
+
return _mcpserversdk.executeVoidApiCall.call(void 0,
|
|
15929
|
+
(client) => client.putDocumentByIdUpdateAndPublish(model.id, model.data, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE)
|
|
15930
|
+
);
|
|
15931
|
+
})
|
|
15932
|
+
};
|
|
15933
|
+
var update_and_publish_document_default = _mcpserversdk.withStandardDecorators.call(void 0, UpdateAndPublishDocumentTool);
|
|
15934
|
+
|
|
15659
15935
|
// src/umbraco-api/tools/document/put/update-document-properties.ts
|
|
15660
15936
|
|
|
15661
15937
|
|
|
@@ -16025,7 +16301,7 @@ var UpdateDocumentPropertiesTool = {
|
|
|
16025
16301
|
const docTypeProps = await getDocumentTypeProperties();
|
|
16026
16302
|
const propsToValidate = allPropertiesToValidate.map((p) => {
|
|
16027
16303
|
const def = docTypeProps.find((d) => d.alias === p.alias);
|
|
16028
|
-
return { alias: p.alias, value: p.value, dataTypeId: _nullishCoalesce(_optionalChain([def, 'optionalAccess',
|
|
16304
|
+
return { alias: p.alias, value: p.value, dataTypeId: _nullishCoalesce(_optionalChain([def, 'optionalAccess', _30 => _30.dataTypeId]), () => ( "")) };
|
|
16029
16305
|
}).filter((p) => p.dataTypeId);
|
|
16030
16306
|
if (propsToValidate.length > 0) {
|
|
16031
16307
|
const valueValidation = await validatePropertiesBeforeSave(propsToValidate);
|
|
@@ -16425,7 +16701,7 @@ var UpdateBlockPropertyTool = {
|
|
|
16425
16701
|
if (!isUmbracoAtLeast(17, 4) && elementTypeProperties.length > 0) {
|
|
16426
16702
|
const propsToValidate = update.properties.map((p) => {
|
|
16427
16703
|
const def = elementTypeProperties.find((d) => d.alias === p.alias);
|
|
16428
|
-
return { alias: p.alias, value: p.value, dataTypeId: _nullishCoalesce(_optionalChain([def, 'optionalAccess',
|
|
16704
|
+
return { alias: p.alias, value: p.value, dataTypeId: _nullishCoalesce(_optionalChain([def, 'optionalAccess', _31 => _31.dataTypeId]), () => ( "")) };
|
|
16429
16705
|
}).filter((p) => p.dataTypeId);
|
|
16430
16706
|
if (propsToValidate.length > 0) {
|
|
16431
16707
|
const valueValidation = await validatePropertiesBeforeSave(propsToValidate);
|
|
@@ -16739,6 +17015,9 @@ var DocumentCollection = {
|
|
|
16739
17015
|
tools.push(get_document_type_schema_default);
|
|
16740
17016
|
tools.push(copy_document_default);
|
|
16741
17017
|
tools.push(create_document_default);
|
|
17018
|
+
if (isUmbracoAtLeast(17, 6)) {
|
|
17019
|
+
tools.push(create_and_publish_document_default);
|
|
17020
|
+
}
|
|
16742
17021
|
tools.push(post_document_public_access_default);
|
|
16743
17022
|
tools.push(delete_document_default);
|
|
16744
17023
|
tools.push(delete_document_public_access_default);
|
|
@@ -16753,8 +17032,15 @@ var DocumentCollection = {
|
|
|
16753
17032
|
tools.push(publish_document_default);
|
|
16754
17033
|
tools.push(publish_document_with_descendants_default);
|
|
16755
17034
|
tools.push(sort_document_default);
|
|
17035
|
+
if (isUmbracoAtLeast(17, 6)) {
|
|
17036
|
+
tools.push(sort_document_children_default);
|
|
17037
|
+
tools.push(sort_document_root_children_default);
|
|
17038
|
+
}
|
|
16756
17039
|
tools.push(unpublish_document_default);
|
|
16757
17040
|
tools.push(update_document_default);
|
|
17041
|
+
if (isUmbracoAtLeast(17, 6)) {
|
|
17042
|
+
tools.push(update_and_publish_document_default);
|
|
17043
|
+
}
|
|
16758
17044
|
tools.push(update_document_properties_default);
|
|
16759
17045
|
tools.push(update_document_name_default);
|
|
16760
17046
|
tools.push(update_block_property_default);
|
|
@@ -17086,7 +17372,7 @@ var CopyDocumentTypeTool = {
|
|
|
17086
17372
|
validateStatus: () => true
|
|
17087
17373
|
});
|
|
17088
17374
|
if (response.status === 201) {
|
|
17089
|
-
const location = _optionalChain([response, 'access',
|
|
17375
|
+
const location = _optionalChain([response, 'access', _32 => _32.headers, 'optionalAccess', _33 => _33.location]) || "";
|
|
17090
17376
|
const newId = location.split("/").pop() || "";
|
|
17091
17377
|
const output = { id: newId };
|
|
17092
17378
|
return _mcpserversdk.createToolResult.call(void 0, output);
|
|
@@ -18817,14 +19103,14 @@ var create_language_default = _mcpserversdk.withStandardDecorators.call(void 0,
|
|
|
18817
19103
|
|
|
18818
19104
|
|
|
18819
19105
|
|
|
18820
|
-
var
|
|
19106
|
+
var inputSchema18 = {
|
|
18821
19107
|
isoCode: putLanguageByIsoCodeParams.shape.isoCode,
|
|
18822
19108
|
data: _zod.z.object(putLanguageByIsoCodeBody.shape)
|
|
18823
19109
|
};
|
|
18824
19110
|
var UpdateLanguageTool = {
|
|
18825
19111
|
name: "update-language",
|
|
18826
19112
|
description: "Updates an existing language by ISO code",
|
|
18827
|
-
inputSchema:
|
|
19113
|
+
inputSchema: inputSchema18,
|
|
18828
19114
|
annotations: {
|
|
18829
19115
|
idempotentHint: true
|
|
18830
19116
|
},
|
|
@@ -19292,7 +19578,7 @@ function getExtensionFromMimeType(mimeType) {
|
|
|
19292
19578
|
return extension ? `.${extension}` : void 0;
|
|
19293
19579
|
}
|
|
19294
19580
|
function validateMediaTypeForSvg(filePath, fileUrl, fileName, mediaTypeName) {
|
|
19295
|
-
const isSvg = _optionalChain([filePath, 'optionalAccess',
|
|
19581
|
+
const isSvg = _optionalChain([filePath, 'optionalAccess', _34 => _34.toLowerCase, 'call', _35 => _35(), 'access', _36 => _36.endsWith, 'call', _37 => _37(".svg")]) || _optionalChain([fileUrl, 'optionalAccess', _38 => _38.toLowerCase, 'call', _39 => _39(), 'access', _40 => _40.endsWith, 'call', _41 => _41(".svg")]) || fileName.toLowerCase().endsWith(".svg");
|
|
19296
19582
|
if (isSvg && mediaTypeName === _mcpserversdk.MEDIA_TYPE_IMAGE) {
|
|
19297
19583
|
console.warn(`SVG detected - using ${_mcpserversdk.MEDIA_TYPE_VECTOR_GRAPHICS} media type instead of ${_mcpserversdk.MEDIA_TYPE_IMAGE}`);
|
|
19298
19584
|
return _mcpserversdk.MEDIA_TYPE_VECTOR_GRAPHICS;
|
|
@@ -19446,8 +19732,8 @@ async function uploadMediaFile(client, params) {
|
|
|
19446
19732
|
});
|
|
19447
19733
|
} catch (error) {
|
|
19448
19734
|
const err = error;
|
|
19449
|
-
const errorData = _optionalChain([err, 'access',
|
|
19450
|
-
throw new Error(`Failed to upload temporary file: ${_optionalChain([err, 'access',
|
|
19735
|
+
const errorData = _optionalChain([err, 'access', _42 => _42.response, 'optionalAccess', _43 => _43.data]) ? typeof err.response.data === "string" ? err.response.data : JSON.stringify(err.response.data) : err.message;
|
|
19736
|
+
throw new Error(`Failed to upload temporary file: ${_optionalChain([err, 'access', _44 => _44.response, 'optionalAccess', _45 => _45.status]) || "Unknown error"} - ${errorData}`);
|
|
19451
19737
|
}
|
|
19452
19738
|
const valueStructure = buildValueStructure(validatedMediaTypeName, params.temporaryFileId);
|
|
19453
19739
|
let response;
|
|
@@ -19467,12 +19753,12 @@ async function uploadMediaFile(client, params) {
|
|
|
19467
19753
|
}, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE);
|
|
19468
19754
|
} catch (error) {
|
|
19469
19755
|
const err = error;
|
|
19470
|
-
throw new Error(`Failed to create media item: ${_optionalChain([err, 'access',
|
|
19756
|
+
throw new Error(`Failed to create media item: ${_optionalChain([err, 'access', _46 => _46.response, 'optionalAccess', _47 => _47.status]) || "Unknown error"} - ${JSON.stringify(_optionalChain([err, 'access', _48 => _48.response, 'optionalAccess', _49 => _49.data])) || err.message}`);
|
|
19471
19757
|
}
|
|
19472
19758
|
if (response.status < 200 || response.status >= 300) {
|
|
19473
19759
|
throw new Error(`Request failed with status code ${response.status}`);
|
|
19474
19760
|
}
|
|
19475
|
-
const locationHeader = _optionalChain([response, 'access',
|
|
19761
|
+
const locationHeader = _optionalChain([response, 'access', _50 => _50.headers, 'optionalAccess', _51 => _51.location]) || _optionalChain([response, 'access', _52 => _52.headers, 'optionalAccess', _53 => _53.Location]);
|
|
19476
19762
|
if (!locationHeader) {
|
|
19477
19763
|
throw new Error("No Location header in response - cannot determine created media ID");
|
|
19478
19764
|
}
|
|
@@ -19515,10 +19801,10 @@ async function resolveAuth() {
|
|
|
19515
19801
|
);
|
|
19516
19802
|
}
|
|
19517
19803
|
const entry = await _mcphosted.getStoredUmbracoToken.call(void 0, authContext.env.OAUTH_KV, authContext.tokenKey);
|
|
19518
|
-
if (!_optionalChain([entry, 'optionalAccess',
|
|
19804
|
+
if (!_optionalChain([entry, 'optionalAccess', _54 => _54.tokens, 'optionalAccess', _55 => _55.access_token])) {
|
|
19519
19805
|
throw new Error("No Umbraco access token in KV. Reconnect the MCP connector.");
|
|
19520
19806
|
}
|
|
19521
|
-
const baseUrl = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([entry, 'access',
|
|
19807
|
+
const baseUrl = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([entry, 'access', _56 => _56.site, 'optionalAccess', _57 => _57.serverUrl]), () => ( _optionalChain([entry, 'access', _58 => _58.site, 'optionalAccess', _59 => _59.baseUrl]))), () => ( authContext.env.UMBRACO_SERVER_URL)), () => ( authContext.env.UMBRACO_BASE_URL));
|
|
19522
19808
|
if (!baseUrl) {
|
|
19523
19809
|
throw new Error("No Umbraco base URL resolvable from site or env.");
|
|
19524
19810
|
}
|
|
@@ -19526,7 +19812,7 @@ async function resolveAuth() {
|
|
|
19526
19812
|
}
|
|
19527
19813
|
function ensureExtension(name, contentType, urlPath) {
|
|
19528
19814
|
if (name.includes(".")) return name;
|
|
19529
|
-
const fromUrl = _optionalChain([urlPath, 'access',
|
|
19815
|
+
const fromUrl = _optionalChain([urlPath, 'access', _60 => _60.match, 'call', _61 => _61(/\.([a-z0-9]{1,8})$/i), 'optionalAccess', _62 => _62[0]]);
|
|
19530
19816
|
if (fromUrl) return `${name}${fromUrl}`;
|
|
19531
19817
|
if (contentType) {
|
|
19532
19818
|
const subtype = contentType.split(";")[0].split("/")[1];
|
|
@@ -19635,8 +19921,8 @@ Content-Type: ${sourceContentType}\r
|
|
|
19635
19921
|
if (response.status < 200 || response.status >= 300) {
|
|
19636
19922
|
throw new Error(`postMedia failed with status ${response.status}`);
|
|
19637
19923
|
}
|
|
19638
|
-
const locationHeader = _nullishCoalesce(_optionalChain([response, 'access',
|
|
19639
|
-
const idMatch = _optionalChain([locationHeader, 'optionalAccess',
|
|
19924
|
+
const locationHeader = _nullishCoalesce(_optionalChain([response, 'access', _63 => _63.headers, 'optionalAccess', _64 => _64.location]), () => ( _optionalChain([response, 'access', _65 => _65.headers, 'optionalAccess', _66 => _66.Location])));
|
|
19925
|
+
const idMatch = _optionalChain([locationHeader, 'optionalAccess', _67 => _67.match, 'call', _68 => _68(/\/([a-f0-9-]{36})$/i)]);
|
|
19640
19926
|
if (!idMatch) {
|
|
19641
19927
|
throw new Error(
|
|
19642
19928
|
`Could not extract media id from Location header: ${_nullishCoalesce(locationHeader, () => ( "(missing)"))}`
|
|
@@ -19741,7 +20027,7 @@ ${filePathSection}
|
|
|
19741
20027
|
let effectiveSourceType;
|
|
19742
20028
|
let effectiveFileUrl = model.fileUrl;
|
|
19743
20029
|
if (model.sourceType === "file") {
|
|
19744
|
-
if (!_optionalChain([model, 'access',
|
|
20030
|
+
if (!_optionalChain([model, 'access', _69 => _69.file, 'optionalAccess', _70 => _70.download_url])) {
|
|
19745
20031
|
return _mcpserversdk.createToolResultError.call(void 0, {
|
|
19746
20032
|
detail: "Error creating media: sourceType is 'file' but no file object was provided. ChatGPT's connector should inject this automatically when a file is attached \u2014 if it didn't, the user has nothing attached or your client doesn't support openai/fileParams."
|
|
19747
20033
|
});
|
|
@@ -19890,7 +20176,7 @@ ${filePathSection}
|
|
|
19890
20176
|
let effectiveSourceType;
|
|
19891
20177
|
let effectiveFileUrl = file.fileUrl;
|
|
19892
20178
|
if (model.sourceType === "file") {
|
|
19893
|
-
if (!_optionalChain([file, 'access',
|
|
20179
|
+
if (!_optionalChain([file, 'access', _71 => _71.file, 'optionalAccess', _72 => _72.download_url])) {
|
|
19894
20180
|
return {
|
|
19895
20181
|
success: false,
|
|
19896
20182
|
name: file.name,
|
|
@@ -19989,7 +20275,7 @@ var CreateMediaFolderTool = {
|
|
|
19989
20275
|
if (response.status < 200 || response.status >= 300) {
|
|
19990
20276
|
throw new Error(`Request failed with status code ${response.status}`);
|
|
19991
20277
|
}
|
|
19992
|
-
const locationHeader = _optionalChain([response, 'access',
|
|
20278
|
+
const locationHeader = _optionalChain([response, 'access', _73 => _73.headers, 'optionalAccess', _74 => _74.location]) || _optionalChain([response, 'access', _75 => _75.headers, 'optionalAccess', _76 => _76.Location]);
|
|
19993
20279
|
if (!locationHeader) {
|
|
19994
20280
|
throw new Error("No Location header in response - cannot determine created folder ID");
|
|
19995
20281
|
}
|
|
@@ -20063,7 +20349,7 @@ var get_media_by_id_default = _mcpserversdk.withStandardDecorators.call(void 0,
|
|
|
20063
20349
|
|
|
20064
20350
|
|
|
20065
20351
|
|
|
20066
|
-
var
|
|
20352
|
+
var inputSchema19 = {
|
|
20067
20353
|
id: putMediaByIdParams.shape.id,
|
|
20068
20354
|
data: _zod.z.object(putMediaByIdBody.shape)
|
|
20069
20355
|
};
|
|
@@ -20073,7 +20359,7 @@ var UpdateMediaTool = {
|
|
|
20073
20359
|
Always read the current media value first and only update the required values.
|
|
20074
20360
|
Don't miss any properties from the original media that you are updating.
|
|
20075
20361
|
This cannot be used for moving media to a new folder. Use the move endpoint to do that.`,
|
|
20076
|
-
inputSchema:
|
|
20362
|
+
inputSchema: inputSchema19,
|
|
20077
20363
|
annotations: {
|
|
20078
20364
|
idempotentHint: true
|
|
20079
20365
|
},
|
|
@@ -20159,14 +20445,14 @@ var validate_media_default = _mcpserversdk.withStandardDecorators.call(void 0, V
|
|
|
20159
20445
|
|
|
20160
20446
|
|
|
20161
20447
|
|
|
20162
|
-
var
|
|
20448
|
+
var inputSchema20 = {
|
|
20163
20449
|
id: putMediaByIdValidateParams.shape.id,
|
|
20164
20450
|
data: _zod.z.object(putMediaByIdValidateBody.shape)
|
|
20165
20451
|
};
|
|
20166
20452
|
var ValidateMediaUpdateTool = {
|
|
20167
20453
|
name: "validate-media-update",
|
|
20168
20454
|
description: "Validates media data before updating an existing media item by Id",
|
|
20169
|
-
inputSchema:
|
|
20455
|
+
inputSchema: inputSchema20,
|
|
20170
20456
|
annotations: { readOnlyHint: true },
|
|
20171
20457
|
slices: ["validate"],
|
|
20172
20458
|
handler: (async (model) => {
|
|
@@ -20199,6 +20485,55 @@ var SortMediaTool = {
|
|
|
20199
20485
|
};
|
|
20200
20486
|
var sort_media_default = _mcpserversdk.withStandardDecorators.call(void 0, SortMediaTool);
|
|
20201
20487
|
|
|
20488
|
+
// src/umbraco-api/tools/media/put/sort-media-children.ts
|
|
20489
|
+
|
|
20490
|
+
|
|
20491
|
+
|
|
20492
|
+
|
|
20493
|
+
|
|
20494
|
+
|
|
20495
|
+
var inputSchema21 = {
|
|
20496
|
+
id: putMediaByIdSortChildrenParams.shape.id,
|
|
20497
|
+
data: _zod.z.object(putMediaByIdSortChildrenBody.shape)
|
|
20498
|
+
};
|
|
20499
|
+
var SortMediaChildrenTool = {
|
|
20500
|
+
name: "sort-media-children",
|
|
20501
|
+
description: `Sorts the children of the media item identified by Id by a system field (Name, CreateDate or UpdateDate) in the given direction (Ascending or Descending).
|
|
20502
|
+
|
|
20503
|
+
This is DIFFERENT from sort-media: sort-media reorders children according to an explicit list of ids and sort orders you provide, whereas sort-media-children sorts every child of {id} automatically by the chosen field and direction - no explicit ordering is required.`,
|
|
20504
|
+
inputSchema: inputSchema21,
|
|
20505
|
+
annotations: {},
|
|
20506
|
+
slices: ["sort"],
|
|
20507
|
+
handler: (async (model) => {
|
|
20508
|
+
return _mcpserversdk.executeVoidApiCall.call(void 0,
|
|
20509
|
+
(client) => client.putMediaByIdSortChildren(model.id, model.data, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE)
|
|
20510
|
+
);
|
|
20511
|
+
})
|
|
20512
|
+
};
|
|
20513
|
+
var sort_media_children_default = _mcpserversdk.withStandardDecorators.call(void 0, SortMediaChildrenTool);
|
|
20514
|
+
|
|
20515
|
+
// src/umbraco-api/tools/media/put/sort-media-root-children.ts
|
|
20516
|
+
|
|
20517
|
+
|
|
20518
|
+
|
|
20519
|
+
|
|
20520
|
+
|
|
20521
|
+
var SortMediaRootChildrenTool = {
|
|
20522
|
+
name: "sort-media-root-children",
|
|
20523
|
+
description: `Sorts the root-level media items by a system field (Name, CreateDate or UpdateDate) in the given direction (Ascending or Descending).
|
|
20524
|
+
|
|
20525
|
+
This is the root-level equivalent of sort-media-children: it sorts every media item at the root of the media library automatically by the chosen field and direction - no explicit ordering is required. This is DIFFERENT from sort-media, which reorders media items according to an explicit list of ids and sort orders you provide.`,
|
|
20526
|
+
inputSchema: putMediaRootSortChildrenBody.shape,
|
|
20527
|
+
annotations: {},
|
|
20528
|
+
slices: ["sort"],
|
|
20529
|
+
handler: (async (model) => {
|
|
20530
|
+
return _mcpserversdk.executeVoidApiCall.call(void 0,
|
|
20531
|
+
(client) => client.putMediaRootSortChildren(model, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE)
|
|
20532
|
+
);
|
|
20533
|
+
})
|
|
20534
|
+
};
|
|
20535
|
+
var sort_media_root_children_default = _mcpserversdk.withStandardDecorators.call(void 0, SortMediaRootChildrenTool);
|
|
20536
|
+
|
|
20202
20537
|
// src/umbraco-api/tools/media/get/get-media-by-id-array.ts
|
|
20203
20538
|
|
|
20204
20539
|
|
|
@@ -20231,14 +20566,14 @@ var get_media_by_id_array_default = _mcpserversdk.withStandardDecorators.call(vo
|
|
|
20231
20566
|
|
|
20232
20567
|
|
|
20233
20568
|
|
|
20234
|
-
var
|
|
20569
|
+
var inputSchema22 = {
|
|
20235
20570
|
id: putMediaByIdMoveParams.shape.id,
|
|
20236
20571
|
data: _zod.z.object(putMediaByIdMoveBody.shape)
|
|
20237
20572
|
};
|
|
20238
20573
|
var MoveMediaTool = {
|
|
20239
20574
|
name: "move-media",
|
|
20240
20575
|
description: "Move a media item to a new location",
|
|
20241
|
-
inputSchema:
|
|
20576
|
+
inputSchema: inputSchema22,
|
|
20242
20577
|
annotations: {
|
|
20243
20578
|
idempotentHint: true
|
|
20244
20579
|
},
|
|
@@ -20374,14 +20709,14 @@ var get_root_default6 = _mcpserversdk.withStandardDecorators.call(void 0, GetMed
|
|
|
20374
20709
|
|
|
20375
20710
|
|
|
20376
20711
|
|
|
20377
|
-
var
|
|
20712
|
+
var inputSchema23 = {
|
|
20378
20713
|
id: getMediaByIdAuditLogParams.shape.id,
|
|
20379
20714
|
...getMediaByIdAuditLogQueryParams.shape
|
|
20380
20715
|
};
|
|
20381
20716
|
var GetMediaAuditLogTool = {
|
|
20382
20717
|
name: "get-media-audit-log",
|
|
20383
20718
|
description: "Fetches the audit log for a media item by Id.",
|
|
20384
|
-
inputSchema:
|
|
20719
|
+
inputSchema: inputSchema23,
|
|
20385
20720
|
outputSchema: getMediaByIdAuditLogResponse.shape,
|
|
20386
20721
|
annotations: { readOnlyHint: true },
|
|
20387
20722
|
slices: ["audit"],
|
|
@@ -20596,7 +20931,7 @@ var get_media_are_referenced_default = _mcpserversdk.withStandardDecorators.call
|
|
|
20596
20931
|
|
|
20597
20932
|
|
|
20598
20933
|
|
|
20599
|
-
var
|
|
20934
|
+
var inputSchema24 = _zod.z.object({
|
|
20600
20935
|
...getMediaByIdReferencedByParams.shape,
|
|
20601
20936
|
...getMediaByIdReferencedByQueryParams.shape
|
|
20602
20937
|
}).shape;
|
|
@@ -20604,7 +20939,7 @@ var GetMediaByIdReferencedByTool = {
|
|
|
20604
20939
|
name: "get-media-by-id-referenced-by",
|
|
20605
20940
|
description: `Get items that reference a specific media item
|
|
20606
20941
|
Use this to find all content, documents, or other items that are currently referencing a specific media item.`,
|
|
20607
|
-
inputSchema:
|
|
20942
|
+
inputSchema: inputSchema24,
|
|
20608
20943
|
outputSchema: getMediaByIdReferencedByResponse.shape,
|
|
20609
20944
|
annotations: { readOnlyHint: true },
|
|
20610
20945
|
slices: ["references"],
|
|
@@ -20623,7 +20958,7 @@ var get_media_by_id_referenced_by_default = _mcpserversdk.withStandardDecorators
|
|
|
20623
20958
|
|
|
20624
20959
|
|
|
20625
20960
|
|
|
20626
|
-
var
|
|
20961
|
+
var inputSchema25 = _zod.z.object({
|
|
20627
20962
|
...getMediaByIdReferencedDescendantsParams.shape,
|
|
20628
20963
|
...getMediaByIdReferencedDescendantsQueryParams.shape
|
|
20629
20964
|
}).shape;
|
|
@@ -20636,7 +20971,7 @@ var GetMediaByIdReferencedDescendantsTool = {
|
|
|
20636
20971
|
\u2022 Impact analysis: Before deleting a media folder, see what content would be affected
|
|
20637
20972
|
\u2022 Dependency tracking: Find all content using media from a specific folder hierarchy
|
|
20638
20973
|
\u2022 Content auditing: Identify which descendant media items are actually being used`,
|
|
20639
|
-
inputSchema:
|
|
20974
|
+
inputSchema: inputSchema25,
|
|
20640
20975
|
outputSchema: getMediaByIdReferencedDescendantsResponse.shape,
|
|
20641
20976
|
annotations: { readOnlyHint: true },
|
|
20642
20977
|
slices: ["references"],
|
|
@@ -20775,6 +21110,10 @@ var MediaCollection = {
|
|
|
20775
21110
|
tools.push(validate_media_default);
|
|
20776
21111
|
tools.push(validate_media_default2);
|
|
20777
21112
|
tools.push(sort_media_default);
|
|
21113
|
+
if (isUmbracoAtLeast(17, 6)) {
|
|
21114
|
+
tools.push(sort_media_children_default);
|
|
21115
|
+
tools.push(sort_media_root_children_default);
|
|
21116
|
+
}
|
|
20778
21117
|
tools.push(get_media_by_id_array_default);
|
|
20779
21118
|
tools.push(move_media_default);
|
|
20780
21119
|
tools.push(get_media_audit_log_default);
|
|
@@ -20850,7 +21189,7 @@ var get_media_type_by_id_default = _mcpserversdk.withStandardDecorators.call(voi
|
|
|
20850
21189
|
|
|
20851
21190
|
|
|
20852
21191
|
|
|
20853
|
-
var
|
|
21192
|
+
var inputSchema26 = _zod.z.object({
|
|
20854
21193
|
ids: _zod.z.array(_zod.z.string())
|
|
20855
21194
|
});
|
|
20856
21195
|
var outputSchema35 = _zod.z.object({
|
|
@@ -20859,7 +21198,7 @@ var outputSchema35 = _zod.z.object({
|
|
|
20859
21198
|
var GetMediaTypeByIdsTool = {
|
|
20860
21199
|
name: "get-media-type-by-ids",
|
|
20861
21200
|
description: "Gets media types by ids",
|
|
20862
|
-
inputSchema:
|
|
21201
|
+
inputSchema: inputSchema26.shape,
|
|
20863
21202
|
outputSchema: outputSchema35.shape,
|
|
20864
21203
|
annotations: { readOnlyHint: true },
|
|
20865
21204
|
slices: ["list"],
|
|
@@ -20972,13 +21311,13 @@ var get_media_type_allowed_at_root_default = _mcpserversdk.withStandardDecorator
|
|
|
20972
21311
|
|
|
20973
21312
|
|
|
20974
21313
|
|
|
20975
|
-
var
|
|
21314
|
+
var inputSchema27 = getMediaTypeByIdAllowedChildrenParams.merge(
|
|
20976
21315
|
getMediaTypeByIdAllowedChildrenQueryParams
|
|
20977
21316
|
);
|
|
20978
21317
|
var GetMediaTypeAllowedChildrenTool = {
|
|
20979
21318
|
name: "get-media-type-allowed-children",
|
|
20980
21319
|
description: "Gets the media types that are allowed as children of a media type",
|
|
20981
|
-
inputSchema:
|
|
21320
|
+
inputSchema: inputSchema27.shape,
|
|
20982
21321
|
outputSchema: getMediaTypeByIdAllowedChildrenResponse.shape,
|
|
20983
21322
|
annotations: { readOnlyHint: true },
|
|
20984
21323
|
slices: ["configuration"],
|
|
@@ -21226,7 +21565,7 @@ var CreateMediaTypeFolderTool = {
|
|
|
21226
21565
|
validateStatus: () => true
|
|
21227
21566
|
});
|
|
21228
21567
|
if (response.status === 201) {
|
|
21229
|
-
const locationHeader = _optionalChain([response, 'access',
|
|
21568
|
+
const locationHeader = _optionalChain([response, 'access', _77 => _77.headers, 'optionalAccess', _78 => _78["location"]]) || _optionalChain([response, 'access', _79 => _79.headers, 'optionalAccess', _80 => _80["Location"]]);
|
|
21230
21569
|
let createdId = model.id || "";
|
|
21231
21570
|
if (locationHeader) {
|
|
21232
21571
|
const idMatch = locationHeader.match(/([0-9a-f-]{36})$/i);
|
|
@@ -21278,14 +21617,14 @@ var delete_folder_default4 = _mcpserversdk.withStandardDecorators.call(void 0, D
|
|
|
21278
21617
|
|
|
21279
21618
|
|
|
21280
21619
|
|
|
21281
|
-
var
|
|
21620
|
+
var inputSchema28 = _zod.z.object({
|
|
21282
21621
|
id: putMediaTypeFolderByIdParams.shape.id,
|
|
21283
21622
|
data: _zod.z.object(putMediaTypeFolderByIdBody.shape)
|
|
21284
21623
|
});
|
|
21285
21624
|
var UpdateMediaTypeFolderTool = {
|
|
21286
21625
|
name: "update-media-type-folder",
|
|
21287
21626
|
description: "Updates a media type folder by Id",
|
|
21288
|
-
inputSchema:
|
|
21627
|
+
inputSchema: inputSchema28.shape,
|
|
21289
21628
|
annotations: { idempotentHint: true },
|
|
21290
21629
|
slices: ["update", "folders"],
|
|
21291
21630
|
handler: (async (model) => {
|
|
@@ -21360,7 +21699,7 @@ var CreateMediaTypeTool = {
|
|
|
21360
21699
|
validateStatus: () => true
|
|
21361
21700
|
});
|
|
21362
21701
|
if (response.status === 201) {
|
|
21363
|
-
const locationHeader = _optionalChain([response, 'access',
|
|
21702
|
+
const locationHeader = _optionalChain([response, 'access', _81 => _81.headers, 'optionalAccess', _82 => _82["location"]]) || _optionalChain([response, 'access', _83 => _83.headers, 'optionalAccess', _84 => _84["Location"]]);
|
|
21364
21703
|
let createdId = model.id || "";
|
|
21365
21704
|
if (locationHeader) {
|
|
21366
21705
|
const idMatch = locationHeader.match(/([0-9a-f-]{36})$/i);
|
|
@@ -21390,7 +21729,7 @@ var create_media_type_default = _mcpserversdk.withStandardDecorators.call(void 0
|
|
|
21390
21729
|
|
|
21391
21730
|
|
|
21392
21731
|
|
|
21393
|
-
var
|
|
21732
|
+
var inputSchema29 = _zod.z.object({
|
|
21394
21733
|
id: _zod.z.string().uuid(),
|
|
21395
21734
|
data: _zod.z.object(postMediaTypeByIdCopyBody.shape)
|
|
21396
21735
|
});
|
|
@@ -21401,7 +21740,7 @@ var copyMediaTypeOutputSchema = _zod.z.object({
|
|
|
21401
21740
|
var CopyMediaTypeTool = {
|
|
21402
21741
|
name: "copy-media-type",
|
|
21403
21742
|
description: "Copy a media type to a new location",
|
|
21404
|
-
inputSchema:
|
|
21743
|
+
inputSchema: inputSchema29.shape,
|
|
21405
21744
|
outputSchema: copyMediaTypeOutputSchema.shape,
|
|
21406
21745
|
slices: ["copy"],
|
|
21407
21746
|
handler: (async (model) => {
|
|
@@ -21411,7 +21750,7 @@ var CopyMediaTypeTool = {
|
|
|
21411
21750
|
validateStatus: () => true
|
|
21412
21751
|
});
|
|
21413
21752
|
if (response.status === 201) {
|
|
21414
|
-
const locationHeader = _optionalChain([response, 'access',
|
|
21753
|
+
const locationHeader = _optionalChain([response, 'access', _85 => _85.headers, 'optionalAccess', _86 => _86["location"]]) || _optionalChain([response, 'access', _87 => _87.headers, 'optionalAccess', _88 => _88["Location"]]);
|
|
21415
21754
|
let createdId = "";
|
|
21416
21755
|
if (locationHeader) {
|
|
21417
21756
|
const idMatch = locationHeader.match(/([0-9a-f-]{36})$/i);
|
|
@@ -21466,14 +21805,14 @@ var get_media_type_available_compositions_default = _mcpserversdk.withStandardDe
|
|
|
21466
21805
|
|
|
21467
21806
|
|
|
21468
21807
|
|
|
21469
|
-
var
|
|
21808
|
+
var inputSchema30 = _zod.z.object({
|
|
21470
21809
|
id: putMediaTypeByIdParams.shape.id,
|
|
21471
21810
|
data: _zod.z.object(putMediaTypeByIdBody.shape)
|
|
21472
21811
|
});
|
|
21473
21812
|
var UpdateMediaTypeTool = {
|
|
21474
21813
|
name: "update-media-type",
|
|
21475
21814
|
description: "Updates a media type by Id",
|
|
21476
|
-
inputSchema:
|
|
21815
|
+
inputSchema: inputSchema30.shape,
|
|
21477
21816
|
annotations: { idempotentHint: true },
|
|
21478
21817
|
slices: ["update"],
|
|
21479
21818
|
handler: (async (model) => {
|
|
@@ -21491,14 +21830,14 @@ var update_media_type_default = _mcpserversdk.withStandardDecorators.call(void 0
|
|
|
21491
21830
|
|
|
21492
21831
|
|
|
21493
21832
|
|
|
21494
|
-
var
|
|
21833
|
+
var inputSchema31 = _zod.z.object({
|
|
21495
21834
|
id: _zod.z.string().uuid(),
|
|
21496
21835
|
data: _zod.z.object(putMediaTypeByIdMoveBody.shape)
|
|
21497
21836
|
});
|
|
21498
21837
|
var MoveMediaTypeTool = {
|
|
21499
21838
|
name: "move-media-type",
|
|
21500
21839
|
description: "Move a media type to a new location",
|
|
21501
|
-
inputSchema:
|
|
21840
|
+
inputSchema: inputSchema31.shape,
|
|
21502
21841
|
annotations: { idempotentHint: true },
|
|
21503
21842
|
slices: ["move"],
|
|
21504
21843
|
handler: (async (model) => {
|
|
@@ -21621,7 +21960,7 @@ var CreateMemberTool = {
|
|
|
21621
21960
|
validateStatus: () => true
|
|
21622
21961
|
});
|
|
21623
21962
|
if (response.status === 201) {
|
|
21624
|
-
const locationHeader = _optionalChain([response, 'access',
|
|
21963
|
+
const locationHeader = _optionalChain([response, 'access', _89 => _89.headers, 'optionalAccess', _90 => _90["location"]]) || _optionalChain([response, 'access', _91 => _91.headers, 'optionalAccess', _92 => _92["Location"]]);
|
|
21625
21964
|
let createdId = model.id || "";
|
|
21626
21965
|
if (locationHeader) {
|
|
21627
21966
|
const idMatch = locationHeader.match(/([0-9a-f-]{36})$/i);
|
|
@@ -21694,14 +22033,14 @@ var delete_member_default = _mcpserversdk.withStandardDecorators.call(void 0, De
|
|
|
21694
22033
|
|
|
21695
22034
|
|
|
21696
22035
|
|
|
21697
|
-
var
|
|
22036
|
+
var inputSchema32 = _zod.z.object({
|
|
21698
22037
|
id: putMemberByIdParams.shape.id,
|
|
21699
22038
|
data: _zod.z.object(putMemberByIdBody.shape)
|
|
21700
22039
|
});
|
|
21701
22040
|
var UpdateMemberTool = {
|
|
21702
22041
|
name: "update-member",
|
|
21703
22042
|
description: "Updates a member by Id",
|
|
21704
|
-
inputSchema:
|
|
22043
|
+
inputSchema: inputSchema32.shape,
|
|
21705
22044
|
annotations: { idempotentHint: true },
|
|
21706
22045
|
slices: ["update"],
|
|
21707
22046
|
handler: (async (model) => {
|
|
@@ -21719,7 +22058,7 @@ var update_member_default = _mcpserversdk.withStandardDecorators.call(void 0, Up
|
|
|
21719
22058
|
|
|
21720
22059
|
|
|
21721
22060
|
|
|
21722
|
-
var
|
|
22061
|
+
var inputSchema33 = _zod.z.object({
|
|
21723
22062
|
id: putMemberByIdValidateParams.shape.id,
|
|
21724
22063
|
data: _zod.z.object(putMemberByIdValidateBody.shape)
|
|
21725
22064
|
});
|
|
@@ -21727,7 +22066,7 @@ var ValidateMemberUpdateTool = {
|
|
|
21727
22066
|
name: "validate-member-update",
|
|
21728
22067
|
description: `Validates member data before updating using the Umbraco API.
|
|
21729
22068
|
Use this endpoint to validate member data structure, properties, and business rules before attempting to update an existing member.`,
|
|
21730
|
-
inputSchema:
|
|
22069
|
+
inputSchema: inputSchema33.shape,
|
|
21731
22070
|
annotations: { readOnlyHint: true },
|
|
21732
22071
|
slices: ["validate"],
|
|
21733
22072
|
handler: (async (model) => {
|
|
@@ -21787,12 +22126,12 @@ var get_member_are_referenced_default = _mcpserversdk.withStandardDecorators.cal
|
|
|
21787
22126
|
|
|
21788
22127
|
|
|
21789
22128
|
|
|
21790
|
-
var
|
|
22129
|
+
var inputSchema34 = getMemberByIdReferencedByParams.merge(getMemberByIdReferencedByQueryParams);
|
|
21791
22130
|
var GetMemberByIdReferencedByTool = {
|
|
21792
22131
|
name: "get-member-by-id-referenced-by",
|
|
21793
22132
|
description: `Get items that reference a specific member
|
|
21794
22133
|
Use this to find all content, documents, or other items that are currently referencing a specific member account.`,
|
|
21795
|
-
inputSchema:
|
|
22134
|
+
inputSchema: inputSchema34.shape,
|
|
21796
22135
|
outputSchema: getMemberByIdReferencedByResponse.shape,
|
|
21797
22136
|
annotations: { readOnlyHint: true },
|
|
21798
22137
|
slices: ["references"],
|
|
@@ -21810,12 +22149,12 @@ var get_member_by_id_referenced_by_default = _mcpserversdk.withStandardDecorator
|
|
|
21810
22149
|
|
|
21811
22150
|
|
|
21812
22151
|
|
|
21813
|
-
var
|
|
22152
|
+
var inputSchema35 = getMemberByIdReferencedDescendantsParams.merge(getMemberByIdReferencedDescendantsQueryParams);
|
|
21814
22153
|
var GetMemberByIdReferencedDescendantsTool = {
|
|
21815
22154
|
name: "get-member-by-id-referenced-descendants",
|
|
21816
22155
|
description: `Get descendant references for a member
|
|
21817
22156
|
Use this to find all descendant references that are being referenced for a specific member account.`,
|
|
21818
|
-
inputSchema:
|
|
22157
|
+
inputSchema: inputSchema35.shape,
|
|
21819
22158
|
outputSchema: getMemberByIdReferencedDescendantsResponse.shape,
|
|
21820
22159
|
annotations: { readOnlyHint: true },
|
|
21821
22160
|
slices: ["references"],
|
|
@@ -22081,14 +22420,14 @@ var create_member_group_default = _mcpserversdk.withStandardDecorators.call(void
|
|
|
22081
22420
|
|
|
22082
22421
|
|
|
22083
22422
|
|
|
22084
|
-
var
|
|
22423
|
+
var inputSchema36 = {
|
|
22085
22424
|
id: putMemberGroupByIdParams.shape.id,
|
|
22086
22425
|
data: _zod.z.object(putMemberGroupByIdBody.shape)
|
|
22087
22426
|
};
|
|
22088
22427
|
var UpdateMemberGroupTool = {
|
|
22089
22428
|
name: "update-member-group",
|
|
22090
22429
|
description: "Updates a member group by Id",
|
|
22091
|
-
inputSchema:
|
|
22430
|
+
inputSchema: inputSchema36,
|
|
22092
22431
|
annotations: {
|
|
22093
22432
|
idempotentHint: true
|
|
22094
22433
|
},
|
|
@@ -22172,7 +22511,7 @@ var CreateMemberTypeTool = {
|
|
|
22172
22511
|
validateStatus: () => true
|
|
22173
22512
|
});
|
|
22174
22513
|
if (response.status === 201) {
|
|
22175
|
-
const locationHeader = _optionalChain([response, 'access',
|
|
22514
|
+
const locationHeader = _optionalChain([response, 'access', _93 => _93.headers, 'optionalAccess', _94 => _94["location"]]) || _optionalChain([response, 'access', _95 => _95.headers, 'optionalAccess', _96 => _96["Location"]]);
|
|
22176
22515
|
let createdId = model.id || "";
|
|
22177
22516
|
if (locationHeader) {
|
|
22178
22517
|
const idMatch = locationHeader.match(/([0-9a-f-]{36})$/i);
|
|
@@ -22297,14 +22636,14 @@ var delete_member_type_default = _mcpserversdk.withStandardDecorators.call(void
|
|
|
22297
22636
|
|
|
22298
22637
|
|
|
22299
22638
|
|
|
22300
|
-
var
|
|
22639
|
+
var inputSchema37 = _zod.z.object({
|
|
22301
22640
|
id: putMemberTypeByIdParams.shape.id,
|
|
22302
22641
|
data: _zod.z.object(putMemberTypeByIdBody.shape)
|
|
22303
22642
|
});
|
|
22304
22643
|
var UpdateMemberTypeTool = {
|
|
22305
22644
|
name: "update-member-type",
|
|
22306
22645
|
description: "Updates a member type by id",
|
|
22307
|
-
inputSchema:
|
|
22646
|
+
inputSchema: inputSchema37.shape,
|
|
22308
22647
|
annotations: { idempotentHint: true },
|
|
22309
22648
|
slices: ["update"],
|
|
22310
22649
|
handler: (async (model) => {
|
|
@@ -22322,7 +22661,7 @@ var update_member_type_default = _mcpserversdk.withStandardDecorators.call(void
|
|
|
22322
22661
|
|
|
22323
22662
|
|
|
22324
22663
|
|
|
22325
|
-
var
|
|
22664
|
+
var inputSchema38 = _zod.z.object({
|
|
22326
22665
|
id: _zod.z.string().uuid()
|
|
22327
22666
|
});
|
|
22328
22667
|
var copyMemberTypeOutputSchema = _zod.z.object({
|
|
@@ -22332,7 +22671,7 @@ var copyMemberTypeOutputSchema = _zod.z.object({
|
|
|
22332
22671
|
var CopyMemberTypeTool = {
|
|
22333
22672
|
name: "copy-member-type",
|
|
22334
22673
|
description: "Copy a member type to a new location",
|
|
22335
|
-
inputSchema:
|
|
22674
|
+
inputSchema: inputSchema38.shape,
|
|
22336
22675
|
outputSchema: copyMemberTypeOutputSchema.shape,
|
|
22337
22676
|
slices: ["copy"],
|
|
22338
22677
|
handler: (async (model) => {
|
|
@@ -22342,7 +22681,7 @@ var CopyMemberTypeTool = {
|
|
|
22342
22681
|
validateStatus: () => true
|
|
22343
22682
|
});
|
|
22344
22683
|
if (response.status === 201) {
|
|
22345
|
-
const locationHeader = _optionalChain([response, 'access',
|
|
22684
|
+
const locationHeader = _optionalChain([response, 'access', _97 => _97.headers, 'optionalAccess', _98 => _98["location"]]) || _optionalChain([response, 'access', _99 => _99.headers, 'optionalAccess', _100 => _100["Location"]]);
|
|
22346
22685
|
let createdId = "";
|
|
22347
22686
|
if (locationHeader) {
|
|
22348
22687
|
const idMatch = locationHeader.match(/([0-9a-f-]{36})$/i);
|
|
@@ -22702,7 +23041,7 @@ var CreatePartialViewTool = {
|
|
|
22702
23041
|
validateStatus: () => true
|
|
22703
23042
|
});
|
|
22704
23043
|
if (response.status === 201) {
|
|
22705
|
-
const locationHeader = _optionalChain([response, 'access',
|
|
23044
|
+
const locationHeader = _optionalChain([response, 'access', _101 => _101.headers, 'optionalAccess', _102 => _102["location"]]) || _optionalChain([response, 'access', _103 => _103.headers, 'optionalAccess', _104 => _104["Location"]]);
|
|
22706
23045
|
let createdPath = "";
|
|
22707
23046
|
if (locationHeader) {
|
|
22708
23047
|
const pathMatch = locationHeader.match(/partial-view\/(.+)$/);
|
|
@@ -22749,7 +23088,7 @@ var CreatePartialViewFolderTool = {
|
|
|
22749
23088
|
validateStatus: () => true
|
|
22750
23089
|
});
|
|
22751
23090
|
if (response.status === 201) {
|
|
22752
|
-
const locationHeader = _optionalChain([response, 'access',
|
|
23091
|
+
const locationHeader = _optionalChain([response, 'access', _105 => _105.headers, 'optionalAccess', _106 => _106["location"]]) || _optionalChain([response, 'access', _107 => _107.headers, 'optionalAccess', _108 => _108["Location"]]);
|
|
22753
23092
|
let createdPath = "";
|
|
22754
23093
|
if (locationHeader) {
|
|
22755
23094
|
const pathMatch = locationHeader.match(/partial-view\/folder\/(.+)$/);
|
|
@@ -23576,7 +23915,7 @@ var CreateScriptTool = {
|
|
|
23576
23915
|
validateStatus: () => true
|
|
23577
23916
|
});
|
|
23578
23917
|
if (response.status === 201) {
|
|
23579
|
-
const locationHeader = _optionalChain([response, 'access',
|
|
23918
|
+
const locationHeader = _optionalChain([response, 'access', _109 => _109.headers, 'optionalAccess', _110 => _110["location"]]) || _optionalChain([response, 'access', _111 => _111.headers, 'optionalAccess', _112 => _112["Location"]]);
|
|
23580
23919
|
let createdPath = "";
|
|
23581
23920
|
if (locationHeader) {
|
|
23582
23921
|
const pathMatch = locationHeader.match(/script\/(.+)$/);
|
|
@@ -23623,7 +23962,7 @@ var CreateScriptFolderTool = {
|
|
|
23623
23962
|
validateStatus: () => true
|
|
23624
23963
|
});
|
|
23625
23964
|
if (response.status === 201) {
|
|
23626
|
-
const locationHeader = _optionalChain([response, 'access',
|
|
23965
|
+
const locationHeader = _optionalChain([response, 'access', _113 => _113.headers, 'optionalAccess', _114 => _114["location"]]) || _optionalChain([response, 'access', _115 => _115.headers, 'optionalAccess', _116 => _116["Location"]]);
|
|
23627
23966
|
let createdPath = "";
|
|
23628
23967
|
if (locationHeader) {
|
|
23629
23968
|
const pathMatch = locationHeader.match(/script\/folder\/(.+)$/);
|
|
@@ -24220,7 +24559,7 @@ var CreateStylesheetTool = {
|
|
|
24220
24559
|
validateStatus: () => true
|
|
24221
24560
|
});
|
|
24222
24561
|
if (response.status === 201) {
|
|
24223
|
-
const locationHeader = _optionalChain([response, 'access',
|
|
24562
|
+
const locationHeader = _optionalChain([response, 'access', _117 => _117.headers, 'optionalAccess', _118 => _118["location"]]) || _optionalChain([response, 'access', _119 => _119.headers, 'optionalAccess', _120 => _120["Location"]]);
|
|
24224
24563
|
let createdPath = "";
|
|
24225
24564
|
if (locationHeader) {
|
|
24226
24565
|
const pathMatch = locationHeader.match(/stylesheet\/(.+)$/);
|
|
@@ -24267,7 +24606,7 @@ var CreateStylesheetFolderTool = {
|
|
|
24267
24606
|
validateStatus: () => true
|
|
24268
24607
|
});
|
|
24269
24608
|
if (response.status === 201) {
|
|
24270
|
-
const locationHeader = _optionalChain([response, 'access',
|
|
24609
|
+
const locationHeader = _optionalChain([response, 'access', _121 => _121.headers, 'optionalAccess', _122 => _122["location"]]) || _optionalChain([response, 'access', _123 => _123.headers, 'optionalAccess', _124 => _124["Location"]]);
|
|
24271
24610
|
let createdPath = "";
|
|
24272
24611
|
if (locationHeader) {
|
|
24273
24612
|
const pathMatch = locationHeader.match(/stylesheet\/folder\/(.+)$/);
|
|
@@ -24631,7 +24970,7 @@ var CreateTemplateTool = {
|
|
|
24631
24970
|
validateStatus: () => true
|
|
24632
24971
|
});
|
|
24633
24972
|
if (response.status === 201) {
|
|
24634
|
-
const locationHeader = _optionalChain([response, 'access',
|
|
24973
|
+
const locationHeader = _optionalChain([response, 'access', _125 => _125.headers, 'optionalAccess', _126 => _126["location"]]) || _optionalChain([response, 'access', _127 => _127.headers, 'optionalAccess', _128 => _128["Location"]]);
|
|
24635
24974
|
let createdId = "";
|
|
24636
24975
|
if (locationHeader) {
|
|
24637
24976
|
const idMatch = locationHeader.match(/template\/([a-f0-9-]+)$/i);
|
|
@@ -25421,6 +25760,27 @@ var GetUserByIdCalculateStartNodesTool = {
|
|
|
25421
25760
|
};
|
|
25422
25761
|
var get_user_by_id_calculate_start_nodes_default = _mcpserversdk.withStandardDecorators.call(void 0, GetUserByIdCalculateStartNodesTool);
|
|
25423
25762
|
|
|
25763
|
+
// src/umbraco-api/tools/user/get/get-user-batch.ts
|
|
25764
|
+
|
|
25765
|
+
|
|
25766
|
+
|
|
25767
|
+
|
|
25768
|
+
|
|
25769
|
+
var GetUserBatchTool = {
|
|
25770
|
+
name: "get-user-batch",
|
|
25771
|
+
description: "Gets multiple users identified by the provided Ids in one call.",
|
|
25772
|
+
inputSchema: getUserBatchQueryParams.shape,
|
|
25773
|
+
outputSchema: getUserBatchResponse.shape,
|
|
25774
|
+
annotations: { readOnlyHint: true },
|
|
25775
|
+
slices: ["read"],
|
|
25776
|
+
handler: (async (params) => {
|
|
25777
|
+
return _mcpserversdk.executeGetApiCall.call(void 0,
|
|
25778
|
+
(client) => client.getUserBatch(params, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE)
|
|
25779
|
+
);
|
|
25780
|
+
})
|
|
25781
|
+
};
|
|
25782
|
+
var get_user_batch_default = _mcpserversdk.withStandardDecorators.call(void 0, GetUserBatchTool);
|
|
25783
|
+
|
|
25424
25784
|
// src/umbraco-api/tools/user/post/upload-user-avatar-by-id.ts
|
|
25425
25785
|
|
|
25426
25786
|
|
|
@@ -25428,14 +25788,14 @@ var get_user_by_id_calculate_start_nodes_default = _mcpserversdk.withStandardDec
|
|
|
25428
25788
|
|
|
25429
25789
|
|
|
25430
25790
|
|
|
25431
|
-
var
|
|
25791
|
+
var inputSchema39 = _zod.z.object({
|
|
25432
25792
|
...postUserAvatarByIdParams.shape,
|
|
25433
25793
|
...postUserAvatarByIdBody.shape
|
|
25434
25794
|
});
|
|
25435
25795
|
var UploadUserAvatarByIdTool = {
|
|
25436
25796
|
name: "upload-user-avatar-by-id",
|
|
25437
25797
|
description: "Uploads an avatar for a specific user by ID (admin only or self-service)",
|
|
25438
|
-
inputSchema:
|
|
25798
|
+
inputSchema: inputSchema39.shape,
|
|
25439
25799
|
slices: ["update"],
|
|
25440
25800
|
handler: (async ({ id, file }) => {
|
|
25441
25801
|
return _mcpserversdk.executeVoidApiCall.call(void 0,
|
|
@@ -25556,6 +25916,9 @@ var UserCollection = {
|
|
|
25556
25916
|
tools.push(get_item_user_default);
|
|
25557
25917
|
tools.push(get_user_configuration_default);
|
|
25558
25918
|
tools.push(get_user_by_id_calculate_start_nodes_default);
|
|
25919
|
+
if (isUmbracoAtLeast(17, 6)) {
|
|
25920
|
+
tools.push(get_user_batch_default);
|
|
25921
|
+
}
|
|
25559
25922
|
tools.push(upload_user_avatar_by_id_default);
|
|
25560
25923
|
tools.push(delete_user_avatar_by_id_default);
|
|
25561
25924
|
}
|
|
@@ -25587,7 +25950,7 @@ var CreateUserDataTool = {
|
|
|
25587
25950
|
validateStatus: () => true
|
|
25588
25951
|
});
|
|
25589
25952
|
if (response.status === 201) {
|
|
25590
|
-
const locationHeader = _optionalChain([response, 'access',
|
|
25953
|
+
const locationHeader = _optionalChain([response, 'access', _129 => _129.headers, 'optionalAccess', _130 => _130["location"]]) || _optionalChain([response, 'access', _131 => _131.headers, 'optionalAccess', _132 => _132["Location"]]);
|
|
25591
25954
|
let createdId = "";
|
|
25592
25955
|
if (locationHeader) {
|
|
25593
25956
|
const idMatch = locationHeader.match(/user-data\/([a-f0-9-]+)$/i);
|
|
@@ -25825,7 +26188,7 @@ var CreateUserGroupTool = {
|
|
|
25825
26188
|
validateStatus: () => true
|
|
25826
26189
|
});
|
|
25827
26190
|
if (response.status === 201) {
|
|
25828
|
-
const locationHeader = _optionalChain([response, 'access',
|
|
26191
|
+
const locationHeader = _optionalChain([response, 'access', _133 => _133.headers, 'optionalAccess', _134 => _134["location"]]) || _optionalChain([response, 'access', _135 => _135.headers, 'optionalAccess', _136 => _136["Location"]]);
|
|
25829
26192
|
let createdId = "";
|
|
25830
26193
|
if (locationHeader) {
|
|
25831
26194
|
const idMatch = locationHeader.match(/user-group\/([a-f0-9-]+)$/i);
|
|
@@ -26123,7 +26486,7 @@ var CreateWebhookTool = {
|
|
|
26123
26486
|
validateStatus: () => true
|
|
26124
26487
|
});
|
|
26125
26488
|
if (response.status === 201) {
|
|
26126
|
-
const locationHeader = _optionalChain([response, 'access',
|
|
26489
|
+
const locationHeader = _optionalChain([response, 'access', _137 => _137.headers, 'optionalAccess', _138 => _138["location"]]) || _optionalChain([response, 'access', _139 => _139.headers, 'optionalAccess', _140 => _140["Location"]]);
|
|
26127
26490
|
let createdId = "";
|
|
26128
26491
|
if (locationHeader) {
|
|
26129
26492
|
const idMatch = locationHeader.match(/webhook\/([a-f0-9-]+)$/i);
|
|
@@ -26359,4 +26722,4 @@ var allSliceNames = [...toolSliceNames, "other"];
|
|
|
26359
26722
|
|
|
26360
26723
|
|
|
26361
26724
|
exports.__commonJS = __commonJS; exports.__toESM = __toESM; exports.UmbracoManagementClient = UmbracoManagementClient3; exports.setAllowFilePathUploads = setAllowFilePathUploads; exports.setUmbracoVersion = setUmbracoVersion; exports.availableCollections = availableCollections; exports.allModes = allModes; exports.allModeNames = allModeNames; exports.allSliceNames = allSliceNames;
|
|
26362
|
-
//# sourceMappingURL=chunk-
|
|
26725
|
+
//# sourceMappingURL=chunk-4MRMRMFC.cjs.map
|