@umbraco-cms/mcp-dev 18.0.0-rc.3 → 18.0.1
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-JBQAP2FD.js → chunk-KKNLEZQN.js} +694 -1385
- package/dist/chunk-KKNLEZQN.js.map +1 -0
- package/dist/{chunk-QELOM36C.cjs → chunk-MVY77GF3.cjs} +55 -746
- package/dist/chunk-MVY77GF3.cjs.map +1 -0
- package/dist/collections.cjs +2 -2
- package/dist/collections.js +1 -1
- package/dist/index.cjs +88 -89
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -3
- package/dist/index.js.map +1 -1
- package/dist/tool-types.d.ts +37 -0
- package/package.json +1 -2
- package/dist/chunk-JBQAP2FD.js.map +0 -1
- package/dist/chunk-QELOM36C.cjs.map +0 -1
|
@@ -5118,14 +5118,6 @@ function isFilePathUploadAllowed() {
|
|
|
5118
5118
|
function setUmbracoVersion(version) {
|
|
5119
5119
|
umbracoVersion = _nullishCoalesce(version, () => ( null));
|
|
5120
5120
|
}
|
|
5121
|
-
function isUmbracoAtLeast(major, minor) {
|
|
5122
|
-
if (!umbracoVersion) return false;
|
|
5123
|
-
const [maj, min] = umbracoVersion.split(".").map((n) => parseInt(n, 10));
|
|
5124
|
-
if (Number.isNaN(maj) || Number.isNaN(min)) return false;
|
|
5125
|
-
if (maj > major) return true;
|
|
5126
|
-
if (maj < major) return false;
|
|
5127
|
-
return min >= minor;
|
|
5128
|
-
}
|
|
5129
5121
|
|
|
5130
5122
|
// src/umb-management-api/api/umbracoManagementAPI.zod.ts
|
|
5131
5123
|
var _zod = require('zod'); var zod = _interopRequireWildcard(_zod);
|
|
@@ -13767,14 +13759,7 @@ var getWebhookLogsResponse = zod.object({
|
|
|
13767
13759
|
|
|
13768
13760
|
|
|
13769
13761
|
|
|
13770
|
-
|
|
13771
|
-
var outputSchema = _zod.z.object({
|
|
13772
|
-
total: _zod.z.number(),
|
|
13773
|
-
items: _zod.z.array(_zod.z.object({
|
|
13774
|
-
name: _zod.z.string(),
|
|
13775
|
-
englishName: _zod.z.string()
|
|
13776
|
-
}))
|
|
13777
|
-
});
|
|
13762
|
+
var outputSchema = getCultureResponse;
|
|
13778
13763
|
var GetCulturesTool = {
|
|
13779
13764
|
name: "get-culture",
|
|
13780
13765
|
description: "Retrieves a paginated list of cultures that Umbraco can be configured to use",
|
|
@@ -14039,411 +14024,6 @@ var get_data_type_configuration_default = _mcpserversdk.withStandardDecorators.c
|
|
|
14039
14024
|
|
|
14040
14025
|
|
|
14041
14026
|
|
|
14042
|
-
// src/umb-management-api/tools/data-type/get/get-data-type-schema-modern.ts
|
|
14043
|
-
|
|
14044
|
-
async function getDataTypeSchemaFromApi(id) {
|
|
14045
|
-
const client = UmbracoManagementClient3.getClient();
|
|
14046
|
-
const response = await client.getDataTypeByIdSchema(
|
|
14047
|
-
id,
|
|
14048
|
-
_mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE
|
|
14049
|
-
);
|
|
14050
|
-
return _nullishCoalesce(response.data, () => ( {}));
|
|
14051
|
-
}
|
|
14052
|
-
|
|
14053
|
-
// src/umb-management-api/tools/document/post/property-value-templates.ts
|
|
14054
|
-
var propertyValueTemplates = {
|
|
14055
|
-
"BlockList": {
|
|
14056
|
-
editorAlias: "Umbraco.BlockList",
|
|
14057
|
-
value: {
|
|
14058
|
-
layout: {
|
|
14059
|
-
"Umbraco.BlockList": [
|
|
14060
|
-
{
|
|
14061
|
-
contentKey: "7a61b31c-792f-4f6b-a665-960a90b49853"
|
|
14062
|
-
}
|
|
14063
|
-
]
|
|
14064
|
-
},
|
|
14065
|
-
contentData: [
|
|
14066
|
-
{
|
|
14067
|
-
key: "7a61b31c-792f-4f6b-a665-960a90b49853",
|
|
14068
|
-
contentTypeKey: "3a7ec32d-7fd4-49f8-aae6-d9259d5bfee1",
|
|
14069
|
-
values: [
|
|
14070
|
-
{
|
|
14071
|
-
editorAlias: "Umbraco.MediaPicker3",
|
|
14072
|
-
culture: null,
|
|
14073
|
-
segment: null,
|
|
14074
|
-
alias: "recipeImage",
|
|
14075
|
-
value: [
|
|
14076
|
-
{
|
|
14077
|
-
key: "9bac772d-cd63-4bb6-b2db-1449042129a7",
|
|
14078
|
-
mediaKey: "3c6c415c-35a0-4629-891e-683506250c31",
|
|
14079
|
-
mediaTypeAlias: "",
|
|
14080
|
-
crops: [],
|
|
14081
|
-
focalPoint: null
|
|
14082
|
-
}
|
|
14083
|
-
]
|
|
14084
|
-
}
|
|
14085
|
-
]
|
|
14086
|
-
}
|
|
14087
|
-
],
|
|
14088
|
-
settingsData: [],
|
|
14089
|
-
expose: [
|
|
14090
|
-
{
|
|
14091
|
-
contentKey: "7a61b31c-792f-4f6b-a665-960a90b49853",
|
|
14092
|
-
culture: null,
|
|
14093
|
-
segment: null
|
|
14094
|
-
}
|
|
14095
|
-
]
|
|
14096
|
-
},
|
|
14097
|
-
_notes: "Complex structure with layout, contentData, settingsData, and expose arrays. contentData.values contains nested property values. All keys must be unique UUIDs."
|
|
14098
|
-
},
|
|
14099
|
-
"BlockGrid": {
|
|
14100
|
-
editorAlias: "Umbraco.BlockGrid",
|
|
14101
|
-
value: {
|
|
14102
|
-
layout: {
|
|
14103
|
-
"Umbraco.BlockGrid": [
|
|
14104
|
-
{
|
|
14105
|
-
contentKey: "d8fa3d28-79aa-4c60-8e73-5819ed313ea2",
|
|
14106
|
-
columnSpan: 12,
|
|
14107
|
-
rowSpan: 1,
|
|
14108
|
-
areas: [
|
|
14109
|
-
{
|
|
14110
|
-
key: "43743e78-0f2b-465e-a3ce-f381c90b68e0",
|
|
14111
|
-
items: [
|
|
14112
|
-
{
|
|
14113
|
-
contentKey: "3145f922-7ec1-41e0-99a5-d9677e558163",
|
|
14114
|
-
settingsKey: "6248d134-4657-4605-b0d5-ae804858bb88",
|
|
14115
|
-
columnSpan: 6,
|
|
14116
|
-
rowSpan: 1
|
|
14117
|
-
}
|
|
14118
|
-
]
|
|
14119
|
-
}
|
|
14120
|
-
]
|
|
14121
|
-
}
|
|
14122
|
-
]
|
|
14123
|
-
},
|
|
14124
|
-
contentData: [
|
|
14125
|
-
{
|
|
14126
|
-
key: "d8fa3d28-79aa-4c60-8e73-5819ed313ea2",
|
|
14127
|
-
contentTypeKey: "6960aaca-0b26-4fae-9cee-db73405d7a3e",
|
|
14128
|
-
values: [
|
|
14129
|
-
{
|
|
14130
|
-
editorAlias: "Umbraco.TextBox",
|
|
14131
|
-
culture: null,
|
|
14132
|
-
segment: null,
|
|
14133
|
-
alias: "title",
|
|
14134
|
-
value: "Title"
|
|
14135
|
-
},
|
|
14136
|
-
{
|
|
14137
|
-
editorAlias: "Umbraco.RichText",
|
|
14138
|
-
culture: null,
|
|
14139
|
-
segment: null,
|
|
14140
|
-
alias: "bodyText",
|
|
14141
|
-
value: {
|
|
14142
|
-
markup: "<p>Content here</p>",
|
|
14143
|
-
blocks: {
|
|
14144
|
-
layout: {},
|
|
14145
|
-
contentData: [],
|
|
14146
|
-
settingsData: [],
|
|
14147
|
-
expose: []
|
|
14148
|
-
}
|
|
14149
|
-
}
|
|
14150
|
-
},
|
|
14151
|
-
{
|
|
14152
|
-
editorAlias: "Umbraco.MediaPicker3",
|
|
14153
|
-
culture: null,
|
|
14154
|
-
segment: null,
|
|
14155
|
-
alias: "image",
|
|
14156
|
-
value: [
|
|
14157
|
-
{
|
|
14158
|
-
key: "40edd153-31eb-4c61-82fc-1ec2e695197b",
|
|
14159
|
-
mediaKey: "3c6c415c-35a0-4629-891e-683506250c31",
|
|
14160
|
-
mediaTypeAlias: "",
|
|
14161
|
-
crops: [],
|
|
14162
|
-
focalPoint: null
|
|
14163
|
-
}
|
|
14164
|
-
]
|
|
14165
|
-
}
|
|
14166
|
-
]
|
|
14167
|
-
},
|
|
14168
|
-
{
|
|
14169
|
-
key: "3145f922-7ec1-41e0-99a5-d9677e558163",
|
|
14170
|
-
contentTypeKey: "c80027e5-7e87-49c1-9b4f-1b9d3fbc2e90",
|
|
14171
|
-
values: [
|
|
14172
|
-
{
|
|
14173
|
-
editorAlias: "Umbraco.TextBox",
|
|
14174
|
-
culture: null,
|
|
14175
|
-
segment: null,
|
|
14176
|
-
alias: "title",
|
|
14177
|
-
value: "Nested Title"
|
|
14178
|
-
},
|
|
14179
|
-
{
|
|
14180
|
-
editorAlias: "Umbraco.RichText",
|
|
14181
|
-
culture: null,
|
|
14182
|
-
segment: null,
|
|
14183
|
-
alias: "content",
|
|
14184
|
-
value: {
|
|
14185
|
-
markup: "<p>Nested content</p>",
|
|
14186
|
-
blocks: {
|
|
14187
|
-
layout: {},
|
|
14188
|
-
contentData: [],
|
|
14189
|
-
settingsData: [],
|
|
14190
|
-
expose: []
|
|
14191
|
-
}
|
|
14192
|
-
}
|
|
14193
|
-
}
|
|
14194
|
-
]
|
|
14195
|
-
}
|
|
14196
|
-
],
|
|
14197
|
-
settingsData: [
|
|
14198
|
-
{
|
|
14199
|
-
key: "6248d134-4657-4605-b0d5-ae804858bb88",
|
|
14200
|
-
contentTypeKey: "06200e23-1c29-4298-9582-48b2eaa81fbf",
|
|
14201
|
-
values: []
|
|
14202
|
-
}
|
|
14203
|
-
],
|
|
14204
|
-
expose: [
|
|
14205
|
-
{
|
|
14206
|
-
contentKey: "d8fa3d28-79aa-4c60-8e73-5819ed313ea2",
|
|
14207
|
-
culture: null,
|
|
14208
|
-
segment: null
|
|
14209
|
-
},
|
|
14210
|
-
{
|
|
14211
|
-
contentKey: "3145f922-7ec1-41e0-99a5-d9677e558163",
|
|
14212
|
-
culture: null,
|
|
14213
|
-
segment: null
|
|
14214
|
-
}
|
|
14215
|
-
]
|
|
14216
|
-
},
|
|
14217
|
-
_notes: "Complex hierarchical structure with areas and nested items. Layout defines structure with columnSpan/rowSpan. contentData stores actual content. All keys must be unique UUIDs."
|
|
14218
|
-
},
|
|
14219
|
-
"Decimal": {
|
|
14220
|
-
editorAlias: "Umbraco.Decimal",
|
|
14221
|
-
value: 1.2
|
|
14222
|
-
},
|
|
14223
|
-
"EmailAddress": {
|
|
14224
|
-
editorAlias: "Umbraco.EmailAddress",
|
|
14225
|
-
value: "admin@admin.co.uk"
|
|
14226
|
-
},
|
|
14227
|
-
"Integer": {
|
|
14228
|
-
editorAlias: "Umbraco.Integer",
|
|
14229
|
-
value: 1
|
|
14230
|
-
},
|
|
14231
|
-
"Tags": {
|
|
14232
|
-
editorAlias: "Umbraco.Tags",
|
|
14233
|
-
value: [
|
|
14234
|
-
"Tag 1",
|
|
14235
|
-
"Tag 2"
|
|
14236
|
-
]
|
|
14237
|
-
},
|
|
14238
|
-
"ColorPicker": {
|
|
14239
|
-
editorAlias: "Umbraco.ColorPicker",
|
|
14240
|
-
value: {
|
|
14241
|
-
label: "Green",
|
|
14242
|
-
value: "#00FF00"
|
|
14243
|
-
}
|
|
14244
|
-
},
|
|
14245
|
-
"TrueFalse": {
|
|
14246
|
-
editorAlias: "Umbraco.TrueFalse",
|
|
14247
|
-
value: true
|
|
14248
|
-
},
|
|
14249
|
-
"CheckBoxList": {
|
|
14250
|
-
editorAlias: "Umbraco.CheckBoxList",
|
|
14251
|
-
value: [
|
|
14252
|
-
"item 1",
|
|
14253
|
-
"items 2"
|
|
14254
|
-
]
|
|
14255
|
-
},
|
|
14256
|
-
"Dropdown": {
|
|
14257
|
-
editorAlias: "Umbraco.DropDown.Flexible",
|
|
14258
|
-
value: [
|
|
14259
|
-
"Item 3"
|
|
14260
|
-
]
|
|
14261
|
-
},
|
|
14262
|
-
"MultipleTextstring": {
|
|
14263
|
-
editorAlias: "Umbraco.MultipleTextstring",
|
|
14264
|
-
value: [
|
|
14265
|
-
"Item 1",
|
|
14266
|
-
"item 2"
|
|
14267
|
-
]
|
|
14268
|
-
},
|
|
14269
|
-
"RadioButtonList": {
|
|
14270
|
-
editorAlias: "Umbraco.RadioButtonList",
|
|
14271
|
-
value: "item 1"
|
|
14272
|
-
},
|
|
14273
|
-
"ImageCropper": {
|
|
14274
|
-
editorAlias: "Umbraco.ImageCropper",
|
|
14275
|
-
value: {
|
|
14276
|
-
temporaryFileId: "b45eb1dd-2959-4b0b-a675-761b6a19824c",
|
|
14277
|
-
src: "",
|
|
14278
|
-
crops: [],
|
|
14279
|
-
focalPoint: {
|
|
14280
|
-
left: 0.5,
|
|
14281
|
-
top: 0.5
|
|
14282
|
-
}
|
|
14283
|
-
},
|
|
14284
|
-
_notes: "IMPORTANT: Requires a temporary file uploaded first. Use the temporaryFileId from the upload response."
|
|
14285
|
-
},
|
|
14286
|
-
"MediaPicker3": {
|
|
14287
|
-
editorAlias: "Umbraco.MediaPicker3",
|
|
14288
|
-
value: [
|
|
14289
|
-
{
|
|
14290
|
-
key: "4c82123c-cd3e-4d92-84b8-9c79ad5a5319",
|
|
14291
|
-
mediaKey: "3c6c415c-35a0-4629-891e-683506250c31",
|
|
14292
|
-
mediaTypeAlias: "",
|
|
14293
|
-
crops: [],
|
|
14294
|
-
focalPoint: null
|
|
14295
|
-
}
|
|
14296
|
-
],
|
|
14297
|
-
_notes: "The key is generated by you. The mediaKey relates to an existing media item id."
|
|
14298
|
-
},
|
|
14299
|
-
"UploadField": {
|
|
14300
|
-
editorAlias: "Umbraco.UploadField",
|
|
14301
|
-
value: {
|
|
14302
|
-
src: "blob:http://localhost:56472/0884388b-41a3-46c2-a224-9b9ff02de24a",
|
|
14303
|
-
temporaryFileId: "fc76f270-83c2-4daa-ba8b-fde4554dda2a"
|
|
14304
|
-
},
|
|
14305
|
-
_notes: "IMPORTANT: Requires a temporary file uploaded first. Use the temporaryFileId from the upload response."
|
|
14306
|
-
},
|
|
14307
|
-
"Slider": {
|
|
14308
|
-
editorAlias: "Umbraco.Slider",
|
|
14309
|
-
value: {
|
|
14310
|
-
from: 31,
|
|
14311
|
-
to: 31
|
|
14312
|
-
}
|
|
14313
|
-
},
|
|
14314
|
-
"MemberGroupPicker": {
|
|
14315
|
-
editorAlias: "Umbraco.MemberGroupPicker",
|
|
14316
|
-
value: "9815503d-a5a9-487f-aee3-827ca43fdb2c",
|
|
14317
|
-
_notes: "The value relates to an existing member group id."
|
|
14318
|
-
},
|
|
14319
|
-
"MemberPicker": {
|
|
14320
|
-
editorAlias: "Umbraco.MemberPicker",
|
|
14321
|
-
value: "f8abd31e-c78d-46ea-bb6b-c00cb9107bfb",
|
|
14322
|
-
_notes: "The value relates to an existing member id."
|
|
14323
|
-
},
|
|
14324
|
-
"UserPicker": {
|
|
14325
|
-
editorAlias: "Umbraco.UserPicker",
|
|
14326
|
-
value: "1e70f841-c261-413b-abb2-2d68cdb96094",
|
|
14327
|
-
_notes: "The value relates to an existing user id."
|
|
14328
|
-
},
|
|
14329
|
-
"MultiNodeTreePicker": {
|
|
14330
|
-
editorAlias: "Umbraco.MultiNodeTreePicker",
|
|
14331
|
-
value: [
|
|
14332
|
-
{
|
|
14333
|
-
type: "document",
|
|
14334
|
-
unique: "dcf18a51-6919-4cf8-89d1-36b94ce4d963"
|
|
14335
|
-
}
|
|
14336
|
-
],
|
|
14337
|
-
_notes: "The unique property relates to an existing document, media, or member id. Type can be 'document', 'media', or 'member'."
|
|
14338
|
-
},
|
|
14339
|
-
"DateTime": {
|
|
14340
|
-
editorAlias: "Umbraco.DateTime",
|
|
14341
|
-
value: "2025-05-23 00:00:00"
|
|
14342
|
-
},
|
|
14343
|
-
"ContentPicker": {
|
|
14344
|
-
editorAlias: "Umbraco.ContentPicker",
|
|
14345
|
-
value: "dcf18a51-6919-4cf8-89d1-36b94ce4d963",
|
|
14346
|
-
_notes: "The value relates to an existing document id."
|
|
14347
|
-
},
|
|
14348
|
-
"ColorPickerEyeDropper": {
|
|
14349
|
-
editorAlias: "Umbraco.ColorPicker.EyeDropper",
|
|
14350
|
-
value: "#982020"
|
|
14351
|
-
},
|
|
14352
|
-
"MultiUrlPicker": {
|
|
14353
|
-
editorAlias: "Umbraco.MultiUrlPicker",
|
|
14354
|
-
value: [
|
|
14355
|
-
{
|
|
14356
|
-
icon: "icon-home color-blue",
|
|
14357
|
-
name: "Home",
|
|
14358
|
-
type: "document",
|
|
14359
|
-
unique: "dcf18a51-6919-4cf8-89d1-36b94ce4d963",
|
|
14360
|
-
url: "/"
|
|
14361
|
-
},
|
|
14362
|
-
{
|
|
14363
|
-
icon: "icon-picture",
|
|
14364
|
-
name: "Chairs lamps",
|
|
14365
|
-
type: "media",
|
|
14366
|
-
unique: "3c6c415c-35a0-4629-891e-683506250c31",
|
|
14367
|
-
url: "http://localhost:56472/media/0ofdvcwj/chairs-lamps.jpg"
|
|
14368
|
-
},
|
|
14369
|
-
{
|
|
14370
|
-
name: "Title",
|
|
14371
|
-
target: "_blank",
|
|
14372
|
-
type: "external",
|
|
14373
|
-
url: "www.google.com"
|
|
14374
|
-
}
|
|
14375
|
-
],
|
|
14376
|
-
_notes: "Can contain document, media, or external link entries. For document/media, unique is the content id."
|
|
14377
|
-
},
|
|
14378
|
-
"MarkdownEditor": {
|
|
14379
|
-
editorAlias: "Umbraco.MarkdownEditor",
|
|
14380
|
-
value: "Markdown"
|
|
14381
|
-
},
|
|
14382
|
-
"CodeEditor": {
|
|
14383
|
-
editorAlias: "Umbraco.CodeEditor",
|
|
14384
|
-
value: "Code"
|
|
14385
|
-
},
|
|
14386
|
-
"Textbox": {
|
|
14387
|
-
editorAlias: "Umbraco.TextBox",
|
|
14388
|
-
value: "some string"
|
|
14389
|
-
},
|
|
14390
|
-
"TextArea": {
|
|
14391
|
-
editorAlias: "Umbraco.TextArea",
|
|
14392
|
-
value: "some string"
|
|
14393
|
-
},
|
|
14394
|
-
"RichTextEditor": {
|
|
14395
|
-
editorAlias: "Umbraco.RichText",
|
|
14396
|
-
value: {
|
|
14397
|
-
markup: "<p>some string</p>",
|
|
14398
|
-
blocks: {
|
|
14399
|
-
layout: {},
|
|
14400
|
-
contentData: [],
|
|
14401
|
-
settingsData: [],
|
|
14402
|
-
expose: []
|
|
14403
|
-
}
|
|
14404
|
-
},
|
|
14405
|
-
_notes: "The blocks property has the same structure as BlockList. Can include nested block content within the rich text."
|
|
14406
|
-
}
|
|
14407
|
-
};
|
|
14408
|
-
|
|
14409
|
-
// src/umb-management-api/tools/data-type/get/get-data-type-schema-legacy.ts
|
|
14410
|
-
var VALUE_TYPE_BY_EDITOR_ALIAS = {
|
|
14411
|
-
"Umbraco.TextBox": "STRING",
|
|
14412
|
-
"Umbraco.TextArea": "STRING",
|
|
14413
|
-
"Umbraco.MarkdownEditor": "STRING",
|
|
14414
|
-
"Umbraco.CodeEditor": "STRING",
|
|
14415
|
-
"Umbraco.EmailAddress": "STRING",
|
|
14416
|
-
"Umbraco.Integer": "INTEGER",
|
|
14417
|
-
"Umbraco.Decimal": "DECIMAL",
|
|
14418
|
-
"Umbraco.DateTime": "DATETIME",
|
|
14419
|
-
"Umbraco.TrueFalse": "INTEGER",
|
|
14420
|
-
"Umbraco.Label": "STRING"
|
|
14421
|
-
};
|
|
14422
|
-
function findTemplateByEditorAlias(editorAlias) {
|
|
14423
|
-
const key = Object.keys(propertyValueTemplates).find(
|
|
14424
|
-
(k) => propertyValueTemplates[k].editorAlias.toLowerCase() === editorAlias.toLowerCase()
|
|
14425
|
-
);
|
|
14426
|
-
return key ? propertyValueTemplates[key] : void 0;
|
|
14427
|
-
}
|
|
14428
|
-
async function synthesizeDataTypeSchema(id) {
|
|
14429
|
-
const client = UmbracoManagementClient3.getClient();
|
|
14430
|
-
const dataType = await client.getDataTypeById(id);
|
|
14431
|
-
const template = findTemplateByEditorAlias(dataType.editorAlias);
|
|
14432
|
-
const valueTypeName = _nullishCoalesce(VALUE_TYPE_BY_EDITOR_ALIAS[dataType.editorAlias], () => ( (_optionalChain([template, 'optionalAccess', _9 => _9.value]) !== void 0 ? "JSON" : null)));
|
|
14433
|
-
const jsonSchema = {
|
|
14434
|
-
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
14435
|
-
title: dataType.name,
|
|
14436
|
-
description: "Synthesized from hardcoded property-value templates (Umbraco < 17.4 fallback).",
|
|
14437
|
-
dataTypeId: dataType.id,
|
|
14438
|
-
editorAlias: dataType.editorAlias,
|
|
14439
|
-
editorUiAlias: dataType.editorUiAlias,
|
|
14440
|
-
example: _optionalChain([template, 'optionalAccess', _10 => _10.value]),
|
|
14441
|
-
notes: _optionalChain([template, 'optionalAccess', _11 => _11._notes])
|
|
14442
|
-
};
|
|
14443
|
-
return { valueTypeName, jsonSchema };
|
|
14444
|
-
}
|
|
14445
|
-
|
|
14446
|
-
// src/umb-management-api/tools/data-type/get/get-data-type-schema.ts
|
|
14447
14027
|
var dataTypeSchemaOutputSchema = _zod.z.object({
|
|
14448
14028
|
valueTypeName: _zod.z.string().nullish(),
|
|
14449
14029
|
jsonSchema: _zod.z.unknown().nullish()
|
|
@@ -14463,8 +14043,12 @@ IMPORTANT: Use this tool BEFORE creating data types to understand the expected c
|
|
|
14463
14043
|
},
|
|
14464
14044
|
slices: ["read"],
|
|
14465
14045
|
handler: async ({ id }) => {
|
|
14466
|
-
const
|
|
14467
|
-
|
|
14046
|
+
const client = UmbracoManagementClient3.getClient();
|
|
14047
|
+
const response = await client.getDataTypeByIdSchema(
|
|
14048
|
+
id,
|
|
14049
|
+
_mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE
|
|
14050
|
+
);
|
|
14051
|
+
return _mcpserversdk.createToolResult.call(void 0, _nullishCoalesce(response.data, () => ( {})));
|
|
14468
14052
|
}
|
|
14469
14053
|
};
|
|
14470
14054
|
var get_data_type_schema_default = _mcpserversdk.withStandardDecorators.call(void 0, GetDataTypeSchemaTool);
|
|
@@ -14559,7 +14143,7 @@ var CopyDataTypeTool = {
|
|
|
14559
14143
|
validateStatus: () => true
|
|
14560
14144
|
});
|
|
14561
14145
|
if (response.status === 201) {
|
|
14562
|
-
const location = _optionalChain([response, 'access',
|
|
14146
|
+
const location = _optionalChain([response, 'access', _9 => _9.headers, 'optionalAccess', _10 => _10.location]) || "";
|
|
14563
14147
|
const newId = location.split("/").pop() || "";
|
|
14564
14148
|
const output = {
|
|
14565
14149
|
message: "Data type copied successfully",
|
|
@@ -15043,9 +14627,7 @@ var DataTypeCollection = {
|
|
|
15043
14627
|
tools.push(get_data_type_batch_default);
|
|
15044
14628
|
tools.push(get_data_type_configuration_default);
|
|
15045
14629
|
tools.push(get_data_type_schema_default);
|
|
15046
|
-
|
|
15047
|
-
tools.push(get_data_type_schemas_default);
|
|
15048
|
-
}
|
|
14630
|
+
tools.push(get_data_type_schemas_default);
|
|
15049
14631
|
}
|
|
15050
14632
|
if (AuthorizationPolicies.TreeAccessDataTypes(user)) {
|
|
15051
14633
|
tools.push(get_root_default);
|
|
@@ -15202,7 +14784,7 @@ var CreateDictionaryItemTool = {
|
|
|
15202
14784
|
validateStatus: () => true
|
|
15203
14785
|
});
|
|
15204
14786
|
if (response.status === 201) {
|
|
15205
|
-
const locationHeader = _optionalChain([response, 'access',
|
|
14787
|
+
const locationHeader = _optionalChain([response, 'access', _11 => _11.headers, 'optionalAccess', _12 => _12["location"]]) || _optionalChain([response, 'access', _13 => _13.headers, 'optionalAccess', _14 => _14["Location"]]);
|
|
15206
14788
|
let createdId = model.id || "";
|
|
15207
14789
|
if (locationHeader) {
|
|
15208
14790
|
const idMatch = locationHeader.match(/([0-9a-f-]{36})$/i);
|
|
@@ -16134,59 +15716,6 @@ var get_document_urls_default = _mcpserversdk.withStandardDecorators.call(void 0
|
|
|
16134
15716
|
|
|
16135
15717
|
|
|
16136
15718
|
|
|
16137
|
-
// src/umb-management-api/tools/document/get/get-document-type-schema-modern.ts
|
|
16138
|
-
|
|
16139
|
-
async function getDocumentTypeSchemaFromApi(id) {
|
|
16140
|
-
const client = UmbracoManagementClient3.getClient();
|
|
16141
|
-
const response = await client.getDocumentTypeByIdSchema(
|
|
16142
|
-
id,
|
|
16143
|
-
_mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE
|
|
16144
|
-
);
|
|
16145
|
-
return { schema: response.data };
|
|
16146
|
-
}
|
|
16147
|
-
|
|
16148
|
-
// src/umb-management-api/tools/document/get/get-document-type-schema-legacy.ts
|
|
16149
|
-
function findTemplateByEditorAlias2(editorAlias) {
|
|
16150
|
-
const key = Object.keys(propertyValueTemplates).find(
|
|
16151
|
-
(k) => propertyValueTemplates[k].editorAlias.toLowerCase() === editorAlias.toLowerCase()
|
|
16152
|
-
);
|
|
16153
|
-
return key ? propertyValueTemplates[key] : void 0;
|
|
16154
|
-
}
|
|
16155
|
-
function buildPropertyEntry(prop, dataType, template) {
|
|
16156
|
-
return {
|
|
16157
|
-
title: prop.name,
|
|
16158
|
-
description: _nullishCoalesce(prop.description, () => ( void 0)),
|
|
16159
|
-
editorAlias: dataType.editorAlias,
|
|
16160
|
-
dataTypeId: dataType.id,
|
|
16161
|
-
dataTypeName: dataType.name,
|
|
16162
|
-
example: _optionalChain([template, 'optionalAccess', _18 => _18.value]),
|
|
16163
|
-
notes: _optionalChain([template, 'optionalAccess', _19 => _19._notes])
|
|
16164
|
-
};
|
|
16165
|
-
}
|
|
16166
|
-
async function synthesizeDocumentTypeSchema(id) {
|
|
16167
|
-
const client = UmbracoManagementClient3.getClient();
|
|
16168
|
-
const docType = await client.getDocumentTypeById(id);
|
|
16169
|
-
const propertyEntries = {};
|
|
16170
|
-
for (const prop of docType.properties) {
|
|
16171
|
-
const dataType = await client.getDataTypeById(
|
|
16172
|
-
prop.dataType.id
|
|
16173
|
-
);
|
|
16174
|
-
const template = findTemplateByEditorAlias2(dataType.editorAlias);
|
|
16175
|
-
propertyEntries[prop.alias] = buildPropertyEntry(prop, dataType, template);
|
|
16176
|
-
}
|
|
16177
|
-
const schema = {
|
|
16178
|
-
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
16179
|
-
title: docType.name,
|
|
16180
|
-
description: _nullishCoalesce(docType.description, () => ( "Synthesized from hardcoded property-value templates (Umbraco < 17.4 fallback).")),
|
|
16181
|
-
type: "object",
|
|
16182
|
-
documentTypeId: docType.id,
|
|
16183
|
-
documentTypeAlias: docType.alias,
|
|
16184
|
-
properties: propertyEntries
|
|
16185
|
-
};
|
|
16186
|
-
return { schema };
|
|
16187
|
-
}
|
|
16188
|
-
|
|
16189
|
-
// src/umb-management-api/tools/document/get/get-document-type-schema.ts
|
|
16190
15719
|
var documentTypeSchemaOutputSchema = _zod.z.object({
|
|
16191
15720
|
schema: _zod.z.unknown()
|
|
16192
15721
|
});
|
|
@@ -16205,8 +15734,12 @@ IMPORTANT: Use this tool BEFORE creating documents to understand the expected pr
|
|
|
16205
15734
|
},
|
|
16206
15735
|
slices: ["read"],
|
|
16207
15736
|
handler: async ({ id }) => {
|
|
16208
|
-
const
|
|
16209
|
-
|
|
15737
|
+
const client = UmbracoManagementClient3.getClient();
|
|
15738
|
+
const response = await client.getDocumentTypeByIdSchema(
|
|
15739
|
+
id,
|
|
15740
|
+
_mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE
|
|
15741
|
+
);
|
|
15742
|
+
return _mcpserversdk.createToolResult.call(void 0, { schema: response.data });
|
|
16210
15743
|
}
|
|
16211
15744
|
};
|
|
16212
15745
|
var get_document_type_schema_default = _mcpserversdk.withStandardDecorators.call(void 0, GetDocumentTypeSchemaTool);
|
|
@@ -16562,7 +16095,7 @@ var CopyDocumentTool = {
|
|
|
16562
16095
|
validateStatus: () => true
|
|
16563
16096
|
});
|
|
16564
16097
|
if (response.status === 201) {
|
|
16565
|
-
const location = _optionalChain([response, 'access',
|
|
16098
|
+
const location = _optionalChain([response, 'access', _15 => _15.headers, 'optionalAccess', _16 => _16.location]) || "";
|
|
16566
16099
|
const newId = location.split("/").pop() || "";
|
|
16567
16100
|
const output = { id: newId };
|
|
16568
16101
|
return _mcpserversdk.createToolResult.call(void 0, output);
|
|
@@ -16706,7 +16239,7 @@ var CreateDocumentTool = {
|
|
|
16706
16239
|
template = { id: model.templateId };
|
|
16707
16240
|
} else {
|
|
16708
16241
|
const docType = await client.getDocumentTypeById(model.documentTypeId);
|
|
16709
|
-
template = _optionalChain([docType, 'access',
|
|
16242
|
+
template = _optionalChain([docType, 'access', _17 => _17.defaultTemplate, 'optionalAccess', _18 => _18.id]) ? { id: docType.defaultTemplate.id } : null;
|
|
16710
16243
|
}
|
|
16711
16244
|
const payload = {
|
|
16712
16245
|
id: documentId,
|
|
@@ -17164,171 +16697,6 @@ function validateCultureSegment(prop, def) {
|
|
|
17164
16697
|
return null;
|
|
17165
16698
|
}
|
|
17166
16699
|
|
|
17167
|
-
// src/umb-management-api/tools/document/put/helpers/property-value-validator.ts
|
|
17168
|
-
var EDITOR_FORMAT_MAP = {
|
|
17169
|
-
// Editors with allowed values validation
|
|
17170
|
-
"Umbraco.DropDown.Flexible": { valueType: "string[]", allowedValuesKey: "items", validateAllowedValues: true },
|
|
17171
|
-
"Umbraco.RadioButtonList": { valueType: "string", allowedValuesKey: "items", validateAllowedValues: true },
|
|
17172
|
-
"Umbraco.CheckBoxList": { valueType: "string[]", allowedValuesKey: "items", validateAllowedValues: true },
|
|
17173
|
-
"Umbraco.ColorPicker": { valueType: "object", allowedValuesKey: "items", validateAllowedValues: true },
|
|
17174
|
-
// Editors with format-only validation
|
|
17175
|
-
"Umbraco.TextBox": { valueType: "string" },
|
|
17176
|
-
"Umbraco.TextArea": { valueType: "string" },
|
|
17177
|
-
"Umbraco.Integer": { valueType: "number" },
|
|
17178
|
-
"Umbraco.Decimal": { valueType: "number" },
|
|
17179
|
-
"Umbraco.TrueFalse": { valueType: "boolean" },
|
|
17180
|
-
"Umbraco.Tags": { valueType: "string[]" },
|
|
17181
|
-
"Umbraco.MultipleTextstring": { valueType: "string[]" },
|
|
17182
|
-
"Umbraco.DateTime": { valueType: "string" },
|
|
17183
|
-
"Umbraco.EmailAddress": { valueType: "string" },
|
|
17184
|
-
"Umbraco.MarkdownEditor": { valueType: "string" },
|
|
17185
|
-
"Umbraco.ColorPicker.EyeDropper": { valueType: "string" }
|
|
17186
|
-
};
|
|
17187
|
-
function validateValueType(value, expectedType, propertyAlias, editorAlias) {
|
|
17188
|
-
if (value === null || value === void 0) {
|
|
17189
|
-
return null;
|
|
17190
|
-
}
|
|
17191
|
-
switch (expectedType) {
|
|
17192
|
-
case "string":
|
|
17193
|
-
if (typeof value !== "string") {
|
|
17194
|
-
return `Property '${propertyAlias}': Value must be a string for ${editorAlias} editor, got ${typeof value}`;
|
|
17195
|
-
}
|
|
17196
|
-
break;
|
|
17197
|
-
case "string[]":
|
|
17198
|
-
if (!Array.isArray(value)) {
|
|
17199
|
-
return `Property '${propertyAlias}': Value must be an array for ${editorAlias} editor, got ${typeof value}`;
|
|
17200
|
-
}
|
|
17201
|
-
if (!value.every((item) => typeof item === "string")) {
|
|
17202
|
-
return `Property '${propertyAlias}': All array items must be strings for ${editorAlias} editor`;
|
|
17203
|
-
}
|
|
17204
|
-
break;
|
|
17205
|
-
case "number":
|
|
17206
|
-
if (typeof value !== "number") {
|
|
17207
|
-
return `Property '${propertyAlias}': Value must be a number for ${editorAlias} editor, got ${typeof value}`;
|
|
17208
|
-
}
|
|
17209
|
-
break;
|
|
17210
|
-
case "boolean":
|
|
17211
|
-
if (typeof value !== "boolean") {
|
|
17212
|
-
return `Property '${propertyAlias}': Value must be a boolean for ${editorAlias} editor, got ${typeof value}`;
|
|
17213
|
-
}
|
|
17214
|
-
break;
|
|
17215
|
-
case "object":
|
|
17216
|
-
if (typeof value !== "object" || Array.isArray(value)) {
|
|
17217
|
-
return `Property '${propertyAlias}': Value must be an object for ${editorAlias} editor, got ${Array.isArray(value) ? "array" : typeof value}`;
|
|
17218
|
-
}
|
|
17219
|
-
break;
|
|
17220
|
-
}
|
|
17221
|
-
return null;
|
|
17222
|
-
}
|
|
17223
|
-
function extractAllowedValues(dataType, configKey) {
|
|
17224
|
-
const configItem = dataType.values.find((v) => v.alias === configKey);
|
|
17225
|
-
if (!configItem || !configItem.value) {
|
|
17226
|
-
return null;
|
|
17227
|
-
}
|
|
17228
|
-
const value = configItem.value;
|
|
17229
|
-
if (Array.isArray(value)) {
|
|
17230
|
-
if (value.every((item) => typeof item === "string")) {
|
|
17231
|
-
return value;
|
|
17232
|
-
}
|
|
17233
|
-
if (value.every((item) => typeof item === "object" && item !== null && "value" in item)) {
|
|
17234
|
-
return value.map((item) => item.value);
|
|
17235
|
-
}
|
|
17236
|
-
}
|
|
17237
|
-
return null;
|
|
17238
|
-
}
|
|
17239
|
-
function validateAllowedValues(value, allowedValues, propertyAlias, editorAlias, valueType) {
|
|
17240
|
-
const errors = [];
|
|
17241
|
-
if (value === null || value === void 0) {
|
|
17242
|
-
return errors;
|
|
17243
|
-
}
|
|
17244
|
-
if (editorAlias === "Umbraco.ColorPicker" && typeof value === "object" && value !== null && "value" in value) {
|
|
17245
|
-
const colorValue = value.value;
|
|
17246
|
-
if (!allowedValues.includes(colorValue)) {
|
|
17247
|
-
errors.push(`Property '${propertyAlias}': Color value '${colorValue}' is not in allowed values: [${allowedValues.map((v) => `'${v}'`).join(", ")}]`);
|
|
17248
|
-
}
|
|
17249
|
-
return errors;
|
|
17250
|
-
}
|
|
17251
|
-
if (valueType === "string[]" && Array.isArray(value)) {
|
|
17252
|
-
for (const item of value) {
|
|
17253
|
-
if (!allowedValues.includes(item)) {
|
|
17254
|
-
errors.push(`Property '${propertyAlias}': Value '${item}' is not in allowed values: [${allowedValues.map((v) => `'${v}'`).join(", ")}]`);
|
|
17255
|
-
}
|
|
17256
|
-
}
|
|
17257
|
-
return errors;
|
|
17258
|
-
}
|
|
17259
|
-
if (valueType === "string" && typeof value === "string") {
|
|
17260
|
-
if (!allowedValues.includes(value)) {
|
|
17261
|
-
errors.push(`Property '${propertyAlias}': Value '${value}' is not in allowed values: [${allowedValues.map((v) => `'${v}'`).join(", ")}]`);
|
|
17262
|
-
}
|
|
17263
|
-
return errors;
|
|
17264
|
-
}
|
|
17265
|
-
return errors;
|
|
17266
|
-
}
|
|
17267
|
-
function validatePropertyValue(dataType, value, propertyAlias) {
|
|
17268
|
-
const errors = [];
|
|
17269
|
-
const editorAlias = dataType.editorAlias;
|
|
17270
|
-
const formatConfig = EDITOR_FORMAT_MAP[editorAlias];
|
|
17271
|
-
if (!formatConfig) {
|
|
17272
|
-
return { isValid: true, errors: [] };
|
|
17273
|
-
}
|
|
17274
|
-
const typeError = validateValueType(value, formatConfig.valueType, propertyAlias, editorAlias);
|
|
17275
|
-
if (typeError) {
|
|
17276
|
-
errors.push(typeError);
|
|
17277
|
-
return { isValid: false, errors };
|
|
17278
|
-
}
|
|
17279
|
-
if (formatConfig.validateAllowedValues && formatConfig.allowedValuesKey) {
|
|
17280
|
-
const allowedValues = extractAllowedValues(dataType, formatConfig.allowedValuesKey);
|
|
17281
|
-
if (allowedValues && allowedValues.length > 0) {
|
|
17282
|
-
const allowedValueErrors = validateAllowedValues(
|
|
17283
|
-
value,
|
|
17284
|
-
allowedValues,
|
|
17285
|
-
propertyAlias,
|
|
17286
|
-
editorAlias,
|
|
17287
|
-
formatConfig.valueType
|
|
17288
|
-
);
|
|
17289
|
-
errors.push(...allowedValueErrors);
|
|
17290
|
-
}
|
|
17291
|
-
}
|
|
17292
|
-
return {
|
|
17293
|
-
isValid: errors.length === 0,
|
|
17294
|
-
errors
|
|
17295
|
-
};
|
|
17296
|
-
}
|
|
17297
|
-
async function validatePropertiesBeforeSave(properties) {
|
|
17298
|
-
const client = UmbracoManagementClient3.getClient();
|
|
17299
|
-
const errors = [];
|
|
17300
|
-
const dataTypeCache = /* @__PURE__ */ new Map();
|
|
17301
|
-
async function getCachedDataType(dataTypeId) {
|
|
17302
|
-
if (!dataTypeCache.has(dataTypeId)) {
|
|
17303
|
-
try {
|
|
17304
|
-
const dataType = await client.getDataTypeById(dataTypeId);
|
|
17305
|
-
dataTypeCache.set(dataTypeId, dataType);
|
|
17306
|
-
} catch (error) {
|
|
17307
|
-
console.error(`Failed to fetch Data Type ${dataTypeId}:`, error);
|
|
17308
|
-
return null;
|
|
17309
|
-
}
|
|
17310
|
-
}
|
|
17311
|
-
return _nullishCoalesce(dataTypeCache.get(dataTypeId), () => ( null));
|
|
17312
|
-
}
|
|
17313
|
-
for (const prop of properties) {
|
|
17314
|
-
if (!prop.dataTypeId) {
|
|
17315
|
-
continue;
|
|
17316
|
-
}
|
|
17317
|
-
const dataType = await getCachedDataType(prop.dataTypeId);
|
|
17318
|
-
if (!dataType) {
|
|
17319
|
-
continue;
|
|
17320
|
-
}
|
|
17321
|
-
const validation = validatePropertyValue(dataType, prop.value, prop.alias);
|
|
17322
|
-
if (!validation.isValid) {
|
|
17323
|
-
errors.push(...validation.errors);
|
|
17324
|
-
}
|
|
17325
|
-
}
|
|
17326
|
-
return {
|
|
17327
|
-
isValid: errors.length === 0,
|
|
17328
|
-
errors
|
|
17329
|
-
};
|
|
17330
|
-
}
|
|
17331
|
-
|
|
17332
16700
|
// src/umb-management-api/tools/document/put/helpers/property-matching.ts
|
|
17333
16701
|
function matchesProperty(value, alias, culture, segment) {
|
|
17334
16702
|
return value.alias === alias && (_nullishCoalesce(value.culture, () => ( null))) === (_nullishCoalesce(culture, () => ( null))) && (_nullishCoalesce(value.segment, () => ( null))) === (_nullishCoalesce(segment, () => ( null)));
|
|
@@ -17479,28 +16847,6 @@ var UpdateDocumentPropertiesTool = {
|
|
|
17479
16847
|
}
|
|
17480
16848
|
});
|
|
17481
16849
|
}
|
|
17482
|
-
if (!isUmbracoAtLeast(17, 4)) {
|
|
17483
|
-
const allPropertiesToValidate = [...propertiesToUpdate, ...propertiesToAdd];
|
|
17484
|
-
if (allPropertiesToValidate.length > 0) {
|
|
17485
|
-
const docTypeProps = await getDocumentTypeProperties();
|
|
17486
|
-
const propsToValidate = allPropertiesToValidate.map((p) => {
|
|
17487
|
-
const def = docTypeProps.find((d) => d.alias === p.alias);
|
|
17488
|
-
return { alias: p.alias, value: p.value, dataTypeId: _nullishCoalesce(_optionalChain([def, 'optionalAccess', _24 => _24.dataTypeId]), () => ( "")) };
|
|
17489
|
-
}).filter((p) => p.dataTypeId);
|
|
17490
|
-
if (propsToValidate.length > 0) {
|
|
17491
|
-
const valueValidation = await validatePropertiesBeforeSave(propsToValidate);
|
|
17492
|
-
if (!valueValidation.isValid) {
|
|
17493
|
-
throw new (0, _mcpserversdk.ToolValidationError)({
|
|
17494
|
-
title: "Property value validation failed",
|
|
17495
|
-
detail: valueValidation.errors.join("; "),
|
|
17496
|
-
extensions: {
|
|
17497
|
-
errors: valueValidation.errors
|
|
17498
|
-
}
|
|
17499
|
-
});
|
|
17500
|
-
}
|
|
17501
|
-
}
|
|
17502
|
-
}
|
|
17503
|
-
}
|
|
17504
16850
|
const updatedValues = currentDocument.values.map((existingValue) => {
|
|
17505
16851
|
const updateProp = propertiesToUpdate.find(
|
|
17506
16852
|
(p) => matchesProperty(existingValue, p.alias, p.culture, p.segment)
|
|
@@ -17775,18 +17121,6 @@ var UpdateBlockPropertyTool = {
|
|
|
17775
17121
|
let updatedCount = 0;
|
|
17776
17122
|
let addedCount = 0;
|
|
17777
17123
|
const elementTypeProperties = await getElementTypeProperties(foundBlock.block.contentTypeKey);
|
|
17778
|
-
if (!isUmbracoAtLeast(17, 4) && elementTypeProperties.length > 0) {
|
|
17779
|
-
const propsToValidate = update.properties.map((p) => {
|
|
17780
|
-
const def = elementTypeProperties.find((d) => d.alias === p.alias);
|
|
17781
|
-
return { alias: p.alias, value: p.value, dataTypeId: _nullishCoalesce(_optionalChain([def, 'optionalAccess', _25 => _25.dataTypeId]), () => ( "")) };
|
|
17782
|
-
}).filter((p) => p.dataTypeId);
|
|
17783
|
-
if (propsToValidate.length > 0) {
|
|
17784
|
-
const valueValidation = await validatePropertiesBeforeSave(propsToValidate);
|
|
17785
|
-
if (!valueValidation.isValid) {
|
|
17786
|
-
errors.push(...valueValidation.errors);
|
|
17787
|
-
}
|
|
17788
|
-
}
|
|
17789
|
-
}
|
|
17790
17124
|
for (const propUpdate of update.properties) {
|
|
17791
17125
|
const blockProperty = foundBlock.block.values.find(
|
|
17792
17126
|
(v) => matchesProperty(v, propUpdate.alias, propUpdate.culture, propUpdate.segment)
|
|
@@ -18439,7 +17773,7 @@ var CopyDocumentTypeTool = {
|
|
|
18439
17773
|
validateStatus: () => true
|
|
18440
17774
|
});
|
|
18441
17775
|
if (response.status === 201) {
|
|
18442
|
-
const location = _optionalChain([response, 'access',
|
|
17776
|
+
const location = _optionalChain([response, 'access', _19 => _19.headers, 'optionalAccess', _20 => _20.location]) || "";
|
|
18443
17777
|
const newId = location.split("/").pop() || "";
|
|
18444
17778
|
const output = { id: newId };
|
|
18445
17779
|
return _mcpserversdk.createToolResult.call(void 0, output);
|
|
@@ -19464,7 +18798,8 @@ var createElementTypeSchema = _zod.z.object({
|
|
|
19464
18798
|
path: ["tab"]
|
|
19465
18799
|
}
|
|
19466
18800
|
)
|
|
19467
|
-
).default([])
|
|
18801
|
+
).default([]),
|
|
18802
|
+
allowedInLibrary: _zod.z.boolean().default(false).describe("Allow standalone library elements to be created from this element type (Umbraco Element Library). Must be true before create-element will succeed for this type; otherwise create-element returns 'Operation not permitted' (NotAllowed).")
|
|
19468
18803
|
});
|
|
19469
18804
|
var createElementTypeOutputSchema = _zod.z.object({
|
|
19470
18805
|
message: _zod.z.string(),
|
|
@@ -19543,7 +18878,7 @@ IMPORTANT: IMPLEMENTATION REQUIREMENTS
|
|
|
19543
18878
|
compositionType: "Composition"
|
|
19544
18879
|
})),
|
|
19545
18880
|
allowedAsRoot: false,
|
|
19546
|
-
allowedInLibrary:
|
|
18881
|
+
allowedInLibrary: model.allowedInLibrary,
|
|
19547
18882
|
variesByCulture: false,
|
|
19548
18883
|
variesBySegment: false,
|
|
19549
18884
|
allowedTemplates: [],
|
|
@@ -20496,7 +19831,7 @@ var CopyElementTool = {
|
|
|
20496
19831
|
validateStatus: () => true
|
|
20497
19832
|
});
|
|
20498
19833
|
if (response.status === 201) {
|
|
20499
|
-
const location = _optionalChain([response, 'access',
|
|
19834
|
+
const location = _optionalChain([response, 'access', _21 => _21.headers, 'optionalAccess', _22 => _22.location]) || "";
|
|
20500
19835
|
const newId = location.split("/").pop() || "";
|
|
20501
19836
|
const output = { id: newId };
|
|
20502
19837
|
return _mcpserversdk.createToolResult.call(void 0, output);
|
|
@@ -20734,28 +20069,6 @@ var UpdateElementPropertiesTool = {
|
|
|
20734
20069
|
}
|
|
20735
20070
|
});
|
|
20736
20071
|
}
|
|
20737
|
-
if (!isUmbracoAtLeast(17, 4)) {
|
|
20738
|
-
const allPropertiesToValidate = [...propertiesToUpdate, ...propertiesToAdd];
|
|
20739
|
-
if (allPropertiesToValidate.length > 0) {
|
|
20740
|
-
const elemTypeProps = await getElementTypeProperties();
|
|
20741
|
-
const propsToValidate = allPropertiesToValidate.map((p) => {
|
|
20742
|
-
const def = elemTypeProps.find((d) => d.alias === p.alias);
|
|
20743
|
-
return { alias: p.alias, value: p.value, dataTypeId: _nullishCoalesce(_optionalChain([def, 'optionalAccess', _30 => _30.dataTypeId]), () => ( "")) };
|
|
20744
|
-
}).filter((p) => p.dataTypeId);
|
|
20745
|
-
if (propsToValidate.length > 0) {
|
|
20746
|
-
const valueValidation = await validatePropertiesBeforeSave(propsToValidate);
|
|
20747
|
-
if (!valueValidation.isValid) {
|
|
20748
|
-
throw new (0, _mcpserversdk.ToolValidationError)({
|
|
20749
|
-
title: "Property value validation failed",
|
|
20750
|
-
detail: valueValidation.errors.join("; "),
|
|
20751
|
-
extensions: {
|
|
20752
|
-
errors: valueValidation.errors
|
|
20753
|
-
}
|
|
20754
|
-
});
|
|
20755
|
-
}
|
|
20756
|
-
}
|
|
20757
|
-
}
|
|
20758
|
-
}
|
|
20759
20072
|
const updatedValues = currentElement.values.map((existingValue) => {
|
|
20760
20073
|
const updateProp = propertiesToUpdate.find(
|
|
20761
20074
|
(p) => matchesProperty(existingValue, p.alias, p.culture, p.segment)
|
|
@@ -22208,7 +21521,7 @@ function getExtensionFromMimeType(mimeType) {
|
|
|
22208
21521
|
return extension ? `.${extension}` : void 0;
|
|
22209
21522
|
}
|
|
22210
21523
|
function validateMediaTypeForSvg(filePath, fileUrl, fileName, mediaTypeName) {
|
|
22211
|
-
const isSvg = _optionalChain([filePath, 'optionalAccess',
|
|
21524
|
+
const isSvg = _optionalChain([filePath, 'optionalAccess', _23 => _23.toLowerCase, 'call', _24 => _24(), 'access', _25 => _25.endsWith, 'call', _26 => _26(".svg")]) || _optionalChain([fileUrl, 'optionalAccess', _27 => _27.toLowerCase, 'call', _28 => _28(), 'access', _29 => _29.endsWith, 'call', _30 => _30(".svg")]) || fileName.toLowerCase().endsWith(".svg");
|
|
22212
21525
|
if (isSvg && mediaTypeName === _mcpserversdk.MEDIA_TYPE_IMAGE) {
|
|
22213
21526
|
console.warn(`SVG detected - using ${_mcpserversdk.MEDIA_TYPE_VECTOR_GRAPHICS} media type instead of ${_mcpserversdk.MEDIA_TYPE_IMAGE}`);
|
|
22214
21527
|
return _mcpserversdk.MEDIA_TYPE_VECTOR_GRAPHICS;
|
|
@@ -22362,8 +21675,8 @@ async function uploadMediaFile(client, params) {
|
|
|
22362
21675
|
});
|
|
22363
21676
|
} catch (error) {
|
|
22364
21677
|
const err = error;
|
|
22365
|
-
const errorData = _optionalChain([err, 'access',
|
|
22366
|
-
throw new Error(`Failed to upload temporary file: ${_optionalChain([err, 'access',
|
|
21678
|
+
const errorData = _optionalChain([err, 'access', _31 => _31.response, 'optionalAccess', _32 => _32.data]) ? typeof err.response.data === "string" ? err.response.data : JSON.stringify(err.response.data) : err.message;
|
|
21679
|
+
throw new Error(`Failed to upload temporary file: ${_optionalChain([err, 'access', _33 => _33.response, 'optionalAccess', _34 => _34.status]) || "Unknown error"} - ${errorData}`);
|
|
22367
21680
|
}
|
|
22368
21681
|
const valueStructure = buildValueStructure(validatedMediaTypeName, params.temporaryFileId);
|
|
22369
21682
|
let response;
|
|
@@ -22383,12 +21696,12 @@ async function uploadMediaFile(client, params) {
|
|
|
22383
21696
|
}, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE);
|
|
22384
21697
|
} catch (error) {
|
|
22385
21698
|
const err = error;
|
|
22386
|
-
throw new Error(`Failed to create media item: ${_optionalChain([err, 'access',
|
|
21699
|
+
throw new Error(`Failed to create media item: ${_optionalChain([err, 'access', _35 => _35.response, 'optionalAccess', _36 => _36.status]) || "Unknown error"} - ${JSON.stringify(_optionalChain([err, 'access', _37 => _37.response, 'optionalAccess', _38 => _38.data])) || err.message}`);
|
|
22387
21700
|
}
|
|
22388
21701
|
if (response.status < 200 || response.status >= 300) {
|
|
22389
21702
|
throw new Error(`Request failed with status code ${response.status}`);
|
|
22390
21703
|
}
|
|
22391
|
-
const locationHeader = _optionalChain([response, 'access',
|
|
21704
|
+
const locationHeader = _optionalChain([response, 'access', _39 => _39.headers, 'optionalAccess', _40 => _40.location]) || _optionalChain([response, 'access', _41 => _41.headers, 'optionalAccess', _42 => _42.Location]);
|
|
22392
21705
|
if (!locationHeader) {
|
|
22393
21706
|
throw new Error("No Location header in response - cannot determine created media ID");
|
|
22394
21707
|
}
|
|
@@ -22431,10 +21744,10 @@ async function resolveAuth() {
|
|
|
22431
21744
|
);
|
|
22432
21745
|
}
|
|
22433
21746
|
const entry = await _mcphosted.getStoredUmbracoToken.call(void 0, authContext.env.OAUTH_KV, authContext.tokenKey);
|
|
22434
|
-
if (!_optionalChain([entry, 'optionalAccess',
|
|
21747
|
+
if (!_optionalChain([entry, 'optionalAccess', _43 => _43.tokens, 'optionalAccess', _44 => _44.access_token])) {
|
|
22435
21748
|
throw new Error("No Umbraco access token in KV. Reconnect the MCP connector.");
|
|
22436
21749
|
}
|
|
22437
|
-
const baseUrl = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([entry, 'access',
|
|
21750
|
+
const baseUrl = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([entry, 'access', _45 => _45.site, 'optionalAccess', _46 => _46.serverUrl]), () => ( _optionalChain([entry, 'access', _47 => _47.site, 'optionalAccess', _48 => _48.baseUrl]))), () => ( authContext.env.UMBRACO_SERVER_URL)), () => ( authContext.env.UMBRACO_BASE_URL));
|
|
22438
21751
|
if (!baseUrl) {
|
|
22439
21752
|
throw new Error("No Umbraco base URL resolvable from site or env.");
|
|
22440
21753
|
}
|
|
@@ -22442,7 +21755,7 @@ async function resolveAuth() {
|
|
|
22442
21755
|
}
|
|
22443
21756
|
function ensureExtension(name, contentType, urlPath) {
|
|
22444
21757
|
if (name.includes(".")) return name;
|
|
22445
|
-
const fromUrl = _optionalChain([urlPath, 'access',
|
|
21758
|
+
const fromUrl = _optionalChain([urlPath, 'access', _49 => _49.match, 'call', _50 => _50(/\.([a-z0-9]{1,8})$/i), 'optionalAccess', _51 => _51[0]]);
|
|
22446
21759
|
if (fromUrl) return `${name}${fromUrl}`;
|
|
22447
21760
|
if (contentType) {
|
|
22448
21761
|
const subtype = contentType.split(";")[0].split("/")[1];
|
|
@@ -22551,8 +21864,8 @@ Content-Type: ${sourceContentType}\r
|
|
|
22551
21864
|
if (response.status < 200 || response.status >= 300) {
|
|
22552
21865
|
throw new Error(`postMedia failed with status ${response.status}`);
|
|
22553
21866
|
}
|
|
22554
|
-
const locationHeader = _nullishCoalesce(_optionalChain([response, 'access',
|
|
22555
|
-
const idMatch = _optionalChain([locationHeader, 'optionalAccess',
|
|
21867
|
+
const locationHeader = _nullishCoalesce(_optionalChain([response, 'access', _52 => _52.headers, 'optionalAccess', _53 => _53.location]), () => ( _optionalChain([response, 'access', _54 => _54.headers, 'optionalAccess', _55 => _55.Location])));
|
|
21868
|
+
const idMatch = _optionalChain([locationHeader, 'optionalAccess', _56 => _56.match, 'call', _57 => _57(/\/([a-f0-9-]{36})$/i)]);
|
|
22556
21869
|
if (!idMatch) {
|
|
22557
21870
|
throw new Error(
|
|
22558
21871
|
`Could not extract media id from Location header: ${_nullishCoalesce(locationHeader, () => ( "(missing)"))}`
|
|
@@ -22657,7 +21970,7 @@ ${filePathSection}
|
|
|
22657
21970
|
let effectiveSourceType;
|
|
22658
21971
|
let effectiveFileUrl = model.fileUrl;
|
|
22659
21972
|
if (model.sourceType === "file") {
|
|
22660
|
-
if (!_optionalChain([model, 'access',
|
|
21973
|
+
if (!_optionalChain([model, 'access', _58 => _58.file, 'optionalAccess', _59 => _59.download_url])) {
|
|
22661
21974
|
return _mcpserversdk.createToolResultError.call(void 0, {
|
|
22662
21975
|
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."
|
|
22663
21976
|
});
|
|
@@ -22806,7 +22119,7 @@ ${filePathSection}
|
|
|
22806
22119
|
let effectiveSourceType;
|
|
22807
22120
|
let effectiveFileUrl = file.fileUrl;
|
|
22808
22121
|
if (model.sourceType === "file") {
|
|
22809
|
-
if (!_optionalChain([file, 'access',
|
|
22122
|
+
if (!_optionalChain([file, 'access', _60 => _60.file, 'optionalAccess', _61 => _61.download_url])) {
|
|
22810
22123
|
return {
|
|
22811
22124
|
success: false,
|
|
22812
22125
|
name: file.name,
|
|
@@ -22905,7 +22218,7 @@ var CreateMediaFolderTool = {
|
|
|
22905
22218
|
if (response.status < 200 || response.status >= 300) {
|
|
22906
22219
|
throw new Error(`Request failed with status code ${response.status}`);
|
|
22907
22220
|
}
|
|
22908
|
-
const locationHeader = _optionalChain([response, 'access',
|
|
22221
|
+
const locationHeader = _optionalChain([response, 'access', _62 => _62.headers, 'optionalAccess', _63 => _63.location]) || _optionalChain([response, 'access', _64 => _64.headers, 'optionalAccess', _65 => _65.Location]);
|
|
22909
22222
|
if (!locationHeader) {
|
|
22910
22223
|
throw new Error("No Location header in response - cannot determine created folder ID");
|
|
22911
22224
|
}
|
|
@@ -23708,9 +23021,7 @@ var MediaCollection = {
|
|
|
23708
23021
|
tools.push(get_collection_media_default);
|
|
23709
23022
|
tools.push(get_recycle_bin_media_referenced_by_default);
|
|
23710
23023
|
tools.push(get_recycle_bin_media_original_parent_default);
|
|
23711
|
-
|
|
23712
|
-
tools.push(get_media_type_schema_default);
|
|
23713
|
-
}
|
|
23024
|
+
tools.push(get_media_type_schema_default);
|
|
23714
23025
|
}
|
|
23715
23026
|
return tools;
|
|
23716
23027
|
}
|
|
@@ -24142,7 +23453,7 @@ var CreateMediaTypeFolderTool = {
|
|
|
24142
23453
|
validateStatus: () => true
|
|
24143
23454
|
});
|
|
24144
23455
|
if (response.status === 201) {
|
|
24145
|
-
const locationHeader = _optionalChain([response, 'access',
|
|
23456
|
+
const locationHeader = _optionalChain([response, 'access', _66 => _66.headers, 'optionalAccess', _67 => _67["location"]]) || _optionalChain([response, 'access', _68 => _68.headers, 'optionalAccess', _69 => _69["Location"]]);
|
|
24146
23457
|
let createdId = model.id || "";
|
|
24147
23458
|
if (locationHeader) {
|
|
24148
23459
|
const idMatch = locationHeader.match(/([0-9a-f-]{36})$/i);
|
|
@@ -24277,7 +23588,7 @@ var CreateMediaTypeTool = {
|
|
|
24277
23588
|
validateStatus: () => true
|
|
24278
23589
|
});
|
|
24279
23590
|
if (response.status === 201) {
|
|
24280
|
-
const locationHeader = _optionalChain([response, 'access',
|
|
23591
|
+
const locationHeader = _optionalChain([response, 'access', _70 => _70.headers, 'optionalAccess', _71 => _71["location"]]) || _optionalChain([response, 'access', _72 => _72.headers, 'optionalAccess', _73 => _73["Location"]]);
|
|
24281
23592
|
let createdId = model.id || "";
|
|
24282
23593
|
if (locationHeader) {
|
|
24283
23594
|
const idMatch = locationHeader.match(/([0-9a-f-]{36})$/i);
|
|
@@ -24328,7 +23639,7 @@ var CopyMediaTypeTool = {
|
|
|
24328
23639
|
validateStatus: () => true
|
|
24329
23640
|
});
|
|
24330
23641
|
if (response.status === 201) {
|
|
24331
|
-
const locationHeader = _optionalChain([response, 'access',
|
|
23642
|
+
const locationHeader = _optionalChain([response, 'access', _74 => _74.headers, 'optionalAccess', _75 => _75["location"]]) || _optionalChain([response, 'access', _76 => _76.headers, 'optionalAccess', _77 => _77["Location"]]);
|
|
24332
23643
|
let createdId = "";
|
|
24333
23644
|
if (locationHeader) {
|
|
24334
23645
|
const idMatch = locationHeader.match(/([0-9a-f-]{36})$/i);
|
|
@@ -24538,7 +23849,7 @@ var CreateMemberTool = {
|
|
|
24538
23849
|
validateStatus: () => true
|
|
24539
23850
|
});
|
|
24540
23851
|
if (response.status === 201) {
|
|
24541
|
-
const locationHeader = _optionalChain([response, 'access',
|
|
23852
|
+
const locationHeader = _optionalChain([response, 'access', _78 => _78.headers, 'optionalAccess', _79 => _79["location"]]) || _optionalChain([response, 'access', _80 => _80.headers, 'optionalAccess', _81 => _81["Location"]]);
|
|
24542
23853
|
let createdId = model.id || "";
|
|
24543
23854
|
if (locationHeader) {
|
|
24544
23855
|
const idMatch = locationHeader.match(/([0-9a-f-]{36})$/i);
|
|
@@ -24845,9 +24156,7 @@ var MemberCollection = {
|
|
|
24845
24156
|
tools.push(get_member_are_referenced_default);
|
|
24846
24157
|
tools.push(get_member_by_id_referenced_by_default);
|
|
24847
24158
|
tools.push(get_member_by_id_referenced_descendants_default);
|
|
24848
|
-
|
|
24849
|
-
tools.push(get_member_type_schema_default);
|
|
24850
|
-
}
|
|
24159
|
+
tools.push(get_member_type_schema_default);
|
|
24851
24160
|
}
|
|
24852
24161
|
tools.push(find_member_default);
|
|
24853
24162
|
tools.push(get_item_member_search_default);
|
|
@@ -25089,7 +24398,7 @@ var CreateMemberTypeTool = {
|
|
|
25089
24398
|
validateStatus: () => true
|
|
25090
24399
|
});
|
|
25091
24400
|
if (response.status === 201) {
|
|
25092
|
-
const locationHeader = _optionalChain([response, 'access',
|
|
24401
|
+
const locationHeader = _optionalChain([response, 'access', _82 => _82.headers, 'optionalAccess', _83 => _83["location"]]) || _optionalChain([response, 'access', _84 => _84.headers, 'optionalAccess', _85 => _85["Location"]]);
|
|
25093
24402
|
let createdId = model.id || "";
|
|
25094
24403
|
if (locationHeader) {
|
|
25095
24404
|
const idMatch = locationHeader.match(/([0-9a-f-]{36})$/i);
|
|
@@ -25259,7 +24568,7 @@ var CopyMemberTypeTool = {
|
|
|
25259
24568
|
validateStatus: () => true
|
|
25260
24569
|
});
|
|
25261
24570
|
if (response.status === 201) {
|
|
25262
|
-
const locationHeader = _optionalChain([response, 'access',
|
|
24571
|
+
const locationHeader = _optionalChain([response, 'access', _86 => _86.headers, 'optionalAccess', _87 => _87["location"]]) || _optionalChain([response, 'access', _88 => _88.headers, 'optionalAccess', _89 => _89["Location"]]);
|
|
25263
24572
|
let createdId = "";
|
|
25264
24573
|
if (locationHeader) {
|
|
25265
24574
|
const idMatch = locationHeader.match(/([0-9a-f-]{36})$/i);
|
|
@@ -25619,7 +24928,7 @@ var CreatePartialViewTool = {
|
|
|
25619
24928
|
validateStatus: () => true
|
|
25620
24929
|
});
|
|
25621
24930
|
if (response.status === 201) {
|
|
25622
|
-
const locationHeader = _optionalChain([response, 'access',
|
|
24931
|
+
const locationHeader = _optionalChain([response, 'access', _90 => _90.headers, 'optionalAccess', _91 => _91["location"]]) || _optionalChain([response, 'access', _92 => _92.headers, 'optionalAccess', _93 => _93["Location"]]);
|
|
25623
24932
|
let createdPath = "";
|
|
25624
24933
|
if (locationHeader) {
|
|
25625
24934
|
const pathMatch = locationHeader.match(/partial-view\/(.+)$/);
|
|
@@ -25666,7 +24975,7 @@ var CreatePartialViewFolderTool = {
|
|
|
25666
24975
|
validateStatus: () => true
|
|
25667
24976
|
});
|
|
25668
24977
|
if (response.status === 201) {
|
|
25669
|
-
const locationHeader = _optionalChain([response, 'access',
|
|
24978
|
+
const locationHeader = _optionalChain([response, 'access', _94 => _94.headers, 'optionalAccess', _95 => _95["location"]]) || _optionalChain([response, 'access', _96 => _96.headers, 'optionalAccess', _97 => _97["Location"]]);
|
|
25670
24979
|
let createdPath = "";
|
|
25671
24980
|
if (locationHeader) {
|
|
25672
24981
|
const pathMatch = locationHeader.match(/partial-view\/folder\/(.+)$/);
|
|
@@ -26488,7 +25797,7 @@ var CreateScriptTool = {
|
|
|
26488
25797
|
validateStatus: () => true
|
|
26489
25798
|
});
|
|
26490
25799
|
if (response.status === 201) {
|
|
26491
|
-
const locationHeader = _optionalChain([response, 'access',
|
|
25800
|
+
const locationHeader = _optionalChain([response, 'access', _98 => _98.headers, 'optionalAccess', _99 => _99["location"]]) || _optionalChain([response, 'access', _100 => _100.headers, 'optionalAccess', _101 => _101["Location"]]);
|
|
26492
25801
|
let createdPath = "";
|
|
26493
25802
|
if (locationHeader) {
|
|
26494
25803
|
const pathMatch = locationHeader.match(/script\/(.+)$/);
|
|
@@ -26535,7 +25844,7 @@ var CreateScriptFolderTool = {
|
|
|
26535
25844
|
validateStatus: () => true
|
|
26536
25845
|
});
|
|
26537
25846
|
if (response.status === 201) {
|
|
26538
|
-
const locationHeader = _optionalChain([response, 'access',
|
|
25847
|
+
const locationHeader = _optionalChain([response, 'access', _102 => _102.headers, 'optionalAccess', _103 => _103["location"]]) || _optionalChain([response, 'access', _104 => _104.headers, 'optionalAccess', _105 => _105["Location"]]);
|
|
26539
25848
|
let createdPath = "";
|
|
26540
25849
|
if (locationHeader) {
|
|
26541
25850
|
const pathMatch = locationHeader.match(/script\/folder\/(.+)$/);
|
|
@@ -27132,7 +26441,7 @@ var CreateStylesheetTool = {
|
|
|
27132
26441
|
validateStatus: () => true
|
|
27133
26442
|
});
|
|
27134
26443
|
if (response.status === 201) {
|
|
27135
|
-
const locationHeader = _optionalChain([response, 'access',
|
|
26444
|
+
const locationHeader = _optionalChain([response, 'access', _106 => _106.headers, 'optionalAccess', _107 => _107["location"]]) || _optionalChain([response, 'access', _108 => _108.headers, 'optionalAccess', _109 => _109["Location"]]);
|
|
27136
26445
|
let createdPath = "";
|
|
27137
26446
|
if (locationHeader) {
|
|
27138
26447
|
const pathMatch = locationHeader.match(/stylesheet\/(.+)$/);
|
|
@@ -27179,7 +26488,7 @@ var CreateStylesheetFolderTool = {
|
|
|
27179
26488
|
validateStatus: () => true
|
|
27180
26489
|
});
|
|
27181
26490
|
if (response.status === 201) {
|
|
27182
|
-
const locationHeader = _optionalChain([response, 'access',
|
|
26491
|
+
const locationHeader = _optionalChain([response, 'access', _110 => _110.headers, 'optionalAccess', _111 => _111["location"]]) || _optionalChain([response, 'access', _112 => _112.headers, 'optionalAccess', _113 => _113["Location"]]);
|
|
27183
26492
|
let createdPath = "";
|
|
27184
26493
|
if (locationHeader) {
|
|
27185
26494
|
const pathMatch = locationHeader.match(/stylesheet\/folder\/(.+)$/);
|
|
@@ -27543,7 +26852,7 @@ var CreateTemplateTool = {
|
|
|
27543
26852
|
validateStatus: () => true
|
|
27544
26853
|
});
|
|
27545
26854
|
if (response.status === 201) {
|
|
27546
|
-
const locationHeader = _optionalChain([response, 'access',
|
|
26855
|
+
const locationHeader = _optionalChain([response, 'access', _114 => _114.headers, 'optionalAccess', _115 => _115["location"]]) || _optionalChain([response, 'access', _116 => _116.headers, 'optionalAccess', _117 => _117["Location"]]);
|
|
27547
26856
|
let createdId = "";
|
|
27548
26857
|
if (locationHeader) {
|
|
27549
26858
|
const idMatch = locationHeader.match(/template\/([a-f0-9-]+)$/i);
|
|
@@ -28453,7 +27762,7 @@ var CreateUserDataTool = {
|
|
|
28453
27762
|
validateStatus: () => true
|
|
28454
27763
|
});
|
|
28455
27764
|
if (response.status === 201) {
|
|
28456
|
-
const locationHeader = _optionalChain([response, 'access',
|
|
27765
|
+
const locationHeader = _optionalChain([response, 'access', _118 => _118.headers, 'optionalAccess', _119 => _119["location"]]) || _optionalChain([response, 'access', _120 => _120.headers, 'optionalAccess', _121 => _121["Location"]]);
|
|
28457
27766
|
let createdId = "";
|
|
28458
27767
|
if (locationHeader) {
|
|
28459
27768
|
const idMatch = locationHeader.match(/user-data\/([a-f0-9-]+)$/i);
|
|
@@ -28691,7 +28000,7 @@ var CreateUserGroupTool = {
|
|
|
28691
28000
|
validateStatus: () => true
|
|
28692
28001
|
});
|
|
28693
28002
|
if (response.status === 201) {
|
|
28694
|
-
const locationHeader = _optionalChain([response, 'access',
|
|
28003
|
+
const locationHeader = _optionalChain([response, 'access', _122 => _122.headers, 'optionalAccess', _123 => _123["location"]]) || _optionalChain([response, 'access', _124 => _124.headers, 'optionalAccess', _125 => _125["Location"]]);
|
|
28695
28004
|
let createdId = "";
|
|
28696
28005
|
if (locationHeader) {
|
|
28697
28006
|
const idMatch = locationHeader.match(/user-group\/([a-f0-9-]+)$/i);
|
|
@@ -28989,7 +28298,7 @@ var CreateWebhookTool = {
|
|
|
28989
28298
|
validateStatus: () => true
|
|
28990
28299
|
});
|
|
28991
28300
|
if (response.status === 201) {
|
|
28992
|
-
const locationHeader = _optionalChain([response, 'access',
|
|
28301
|
+
const locationHeader = _optionalChain([response, 'access', _126 => _126.headers, 'optionalAccess', _127 => _127["location"]]) || _optionalChain([response, 'access', _128 => _128.headers, 'optionalAccess', _129 => _129["Location"]]);
|
|
28993
28302
|
let createdId = "";
|
|
28994
28303
|
if (locationHeader) {
|
|
28995
28304
|
const idMatch = locationHeader.match(/webhook\/([a-f0-9-]+)$/i);
|
|
@@ -29226,4 +28535,4 @@ var allSliceNames = [...toolSliceNames, "other"];
|
|
|
29226
28535
|
|
|
29227
28536
|
|
|
29228
28537
|
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;
|
|
29229
|
-
//# sourceMappingURL=chunk-
|
|
28538
|
+
//# sourceMappingURL=chunk-MVY77GF3.cjs.map
|