@antonytm/mcp-sitecore-server 0.11.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/dist/bundle.js +198 -129
- package/dist/register.js +49 -30
- package/dist/register.js.map +1 -1
- package/dist/tools/item-service/{composite → logic/composite}/get-item-descendants.d.ts +1 -1
- package/dist/tools/item-service/{composite → logic/composite}/get-item-descendants.js +2 -2
- package/dist/tools/item-service/logic/composite/get-item-descendants.js.map +1 -0
- package/dist/tools/item-service/{composite → logic/composite}/get-languages.d.ts +1 -1
- package/dist/tools/item-service/{composite → logic/composite}/get-languages.js +2 -2
- package/dist/tools/item-service/logic/composite/get-languages.js.map +1 -0
- package/dist/tools/item-service/{simple → logic/simple}/create-item.d.ts +1 -1
- package/dist/tools/item-service/{simple → logic/simple}/create-item.js +2 -2
- package/dist/tools/item-service/logic/simple/create-item.js.map +1 -0
- package/dist/tools/item-service/{simple → logic/simple}/delete-item.d.ts +1 -1
- package/dist/tools/item-service/{simple → logic/simple}/delete-item.js +2 -2
- package/dist/tools/item-service/logic/simple/delete-item.js.map +1 -0
- package/dist/tools/item-service/{simple → logic/simple}/edit-item.js +1 -1
- package/dist/tools/item-service/logic/simple/edit-item.js.map +1 -0
- package/dist/tools/item-service/{simple → logic/simple}/get-item-by-path.d.ts +1 -1
- package/dist/tools/item-service/{simple → logic/simple}/get-item-by-path.js +2 -2
- package/dist/tools/item-service/logic/simple/get-item-by-path.js.map +1 -0
- package/dist/tools/item-service/{simple → logic/simple}/get-item-children.d.ts +1 -1
- package/dist/tools/item-service/{simple → logic/simple}/get-item-children.js +2 -2
- package/dist/tools/item-service/logic/simple/get-item-children.js.map +1 -0
- package/dist/tools/item-service/{simple → logic/simple}/get-item.d.ts +1 -1
- package/dist/tools/item-service/{simple → logic/simple}/get-item.js +2 -2
- package/dist/tools/item-service/logic/simple/get-item.js.map +1 -0
- package/dist/tools/item-service/{simple → logic/simple}/run-stored-query.d.ts +1 -1
- package/dist/tools/item-service/{simple → logic/simple}/run-stored-query.js +2 -2
- package/dist/tools/item-service/logic/simple/run-stored-query.js.map +1 -0
- package/dist/tools/item-service/{simple → logic/simple}/run-stored-search.d.ts +1 -1
- package/dist/tools/item-service/{simple → logic/simple}/run-stored-search.js +2 -2
- package/dist/tools/item-service/logic/simple/run-stored-search.js.map +1 -0
- package/dist/tools/item-service/{simple → logic/simple}/search-items.d.ts +1 -1
- package/dist/tools/item-service/{simple → logic/simple}/search-items.js +2 -2
- package/dist/tools/item-service/logic/simple/search-items.js.map +1 -0
- package/dist/tools/item-service/{tool-registrations/composite/get-item-descendants.registration.js → tools/composite/get-item-descendants.js} +2 -2
- package/dist/tools/item-service/tools/composite/get-item-descendants.js.map +1 -0
- package/dist/tools/item-service/{tool-registrations/composite/get-languages.registration.js → tools/composite/get-languages.js} +2 -2
- package/dist/tools/item-service/tools/composite/get-languages.js.map +1 -0
- package/dist/tools/item-service/{tool-registrations/simple/create-item.registration.js → tools/simple/create-item.js} +2 -2
- package/dist/tools/item-service/tools/simple/create-item.js.map +1 -0
- package/dist/tools/item-service/{tool-registrations/simple/delete-item.registration.js → tools/simple/delete-item.js} +2 -2
- package/dist/tools/item-service/tools/simple/delete-item.js.map +1 -0
- package/dist/tools/item-service/{tool-registrations/simple/edit-item.registration.js → tools/simple/edit-item.js} +2 -2
- package/dist/tools/item-service/tools/simple/edit-item.js.map +1 -0
- package/dist/tools/item-service/{tool-registrations/simple/get-item-by-path.registration.js → tools/simple/get-item-by-path.js} +2 -2
- package/dist/tools/item-service/tools/simple/get-item-by-path.js.map +1 -0
- package/dist/tools/item-service/{tool-registrations/simple/get-item-children.registration.js → tools/simple/get-item-children.js} +2 -2
- package/dist/tools/item-service/tools/simple/get-item-children.js.map +1 -0
- package/dist/tools/item-service/{tool-registrations/simple/get-item.registration.js → tools/simple/get-item.js} +2 -2
- package/dist/tools/item-service/tools/simple/get-item.js.map +1 -0
- package/dist/tools/item-service/{tool-registrations/simple/run-stored-query.registration.js → tools/simple/run-stored-query.js} +2 -2
- package/dist/tools/item-service/tools/simple/run-stored-query.js.map +1 -0
- package/dist/tools/item-service/{tool-registrations/simple/run-stored-search.registration.js → tools/simple/run-stored-search.js} +2 -2
- package/dist/tools/item-service/tools/simple/run-stored-search.js.map +1 -0
- package/dist/tools/item-service/{tool-registrations/simple/search-items.registration.js → tools/simple/search-items.js} +2 -2
- package/dist/tools/item-service/tools/simple/search-items.js.map +1 -0
- package/dist/tools/powershell/simple/indexing/resume-search-index.d.ts +3 -0
- package/dist/tools/powershell/simple/indexing/resume-search-index.js +16 -0
- package/dist/tools/powershell/simple/indexing/resume-search-index.js.map +1 -0
- package/dist/tools/powershell/simple/{security/lock-item.d.ts → indexing/stop-search-index.d.ts} +1 -1
- package/dist/tools/powershell/simple/indexing/stop-search-index.js +16 -0
- package/dist/tools/powershell/simple/indexing/stop-search-index.js.map +1 -0
- package/dist/tools/powershell/simple/indexing/suspend-search-index.d.ts +3 -0
- package/dist/tools/powershell/simple/indexing/suspend-search-index.js +16 -0
- package/dist/tools/powershell/simple/indexing/suspend-search-index.js.map +1 -0
- package/dist/tools/powershell/simple/security/{unprotect-item.d.ts → get-all-domains.d.ts} +1 -1
- package/dist/tools/powershell/simple/security/get-all-domains.js +10 -0
- package/dist/tools/powershell/simple/security/get-all-domains.js.map +1 -0
- package/dist/tools/powershell/simple/security/{get-role.d.ts → get-current-user.d.ts} +1 -1
- package/dist/tools/powershell/simple/security/get-current-user.js +12 -0
- package/dist/tools/powershell/simple/security/get-current-user.js.map +1 -0
- package/dist/tools/powershell/simple/security/get-domain-by-name.d.ts +3 -0
- package/dist/tools/powershell/simple/security/{get-domain.js → get-domain-by-name.js} +2 -7
- package/dist/tools/powershell/simple/security/get-domain-by-name.js.map +1 -0
- package/dist/tools/powershell/simple/security/get-role-by-filter.d.ts +3 -0
- package/dist/tools/powershell/simple/security/{get-role.js → get-role-by-filter.js} +2 -11
- package/dist/tools/powershell/simple/security/get-role-by-filter.js.map +1 -0
- package/dist/tools/powershell/simple/security/get-role-by-identity.d.ts +3 -0
- package/dist/tools/powershell/simple/security/get-role-by-identity.js +15 -0
- package/dist/tools/powershell/simple/security/get-role-by-identity.js.map +1 -0
- package/dist/tools/powershell/simple/security/get-user-by-filter.d.ts +3 -0
- package/dist/tools/powershell/simple/security/get-user-by-filter.js +15 -0
- package/dist/tools/powershell/simple/security/get-user-by-filter.js.map +1 -0
- package/dist/tools/powershell/simple/security/get-user-by-identity.d.ts +3 -0
- package/dist/tools/powershell/simple/security/get-user-by-identity.js +15 -0
- package/dist/tools/powershell/simple/security/get-user-by-identity.js.map +1 -0
- package/dist/tools/powershell/simple/security/{get-domain.d.ts → lock-item-by-id.d.ts} +1 -1
- package/dist/tools/powershell/simple/security/lock-item-by-id.js +31 -0
- package/dist/tools/powershell/simple/security/lock-item-by-id.js.map +1 -0
- package/dist/tools/powershell/simple/security/{get-user.d.ts → lock-item-by-path.d.ts} +1 -1
- package/dist/tools/powershell/simple/security/{lock-item.js → lock-item-by-path.js} +2 -27
- package/dist/tools/powershell/simple/security/lock-item-by-path.js.map +1 -0
- package/dist/tools/powershell/simple/security/protect-item-by-id.d.ts +3 -0
- package/dist/tools/powershell/simple/security/protect-item-by-id.js +26 -0
- package/dist/tools/powershell/simple/security/protect-item-by-id.js.map +1 -0
- package/dist/tools/powershell/simple/security/protect-item-by-path.d.ts +3 -0
- package/dist/tools/powershell/simple/security/{protect-item.js → protect-item-by-path.js} +2 -22
- package/dist/tools/powershell/simple/security/protect-item-by-path.js.map +1 -0
- package/dist/tools/powershell/simple/security/unprotect-item-by-id.d.ts +3 -0
- package/dist/tools/powershell/simple/security/unprotect-item-by-id.js +26 -0
- package/dist/tools/powershell/simple/security/unprotect-item-by-id.js.map +1 -0
- package/dist/tools/powershell/simple/security/unprotect-item-by-path.d.ts +3 -0
- package/dist/tools/powershell/simple/security/{unprotect-item.js → unprotect-item-by-path.js} +2 -22
- package/dist/tools/powershell/simple/security/unprotect-item-by-path.js.map +1 -0
- package/package.json +1 -1
- package/dist/tools/item-service/composite/get-item-descendants.js.map +0 -1
- package/dist/tools/item-service/composite/get-languages.js.map +0 -1
- package/dist/tools/item-service/simple/create-item.js.map +0 -1
- package/dist/tools/item-service/simple/delete-item.js.map +0 -1
- package/dist/tools/item-service/simple/edit-item.js.map +0 -1
- package/dist/tools/item-service/simple/get-item-by-path.js.map +0 -1
- package/dist/tools/item-service/simple/get-item-children.js.map +0 -1
- package/dist/tools/item-service/simple/get-item.js.map +0 -1
- package/dist/tools/item-service/simple/run-stored-query.js.map +0 -1
- package/dist/tools/item-service/simple/run-stored-search.js.map +0 -1
- package/dist/tools/item-service/simple/search-items.js.map +0 -1
- package/dist/tools/item-service/tool-registrations/composite/get-item-descendants.registration.js.map +0 -1
- package/dist/tools/item-service/tool-registrations/composite/get-languages.registration.js.map +0 -1
- package/dist/tools/item-service/tool-registrations/simple/create-item.registration.js.map +0 -1
- package/dist/tools/item-service/tool-registrations/simple/delete-item.registration.js.map +0 -1
- package/dist/tools/item-service/tool-registrations/simple/edit-item.registration.js.map +0 -1
- package/dist/tools/item-service/tool-registrations/simple/get-item-by-path.registration.js.map +0 -1
- package/dist/tools/item-service/tool-registrations/simple/get-item-children.registration.js.map +0 -1
- package/dist/tools/item-service/tool-registrations/simple/get-item.registration.js.map +0 -1
- package/dist/tools/item-service/tool-registrations/simple/run-stored-query.registration.js.map +0 -1
- package/dist/tools/item-service/tool-registrations/simple/run-stored-search.registration.js.map +0 -1
- package/dist/tools/item-service/tool-registrations/simple/search-items.registration.js.map +0 -1
- package/dist/tools/powershell/simple/media/media-management.d.ts +0 -0
- package/dist/tools/powershell/simple/media/media-management.js +0 -2
- package/dist/tools/powershell/simple/media/media-management.js.map +0 -1
- package/dist/tools/powershell/simple/packages/package-management.d.ts +0 -0
- package/dist/tools/powershell/simple/packages/package-management.js +0 -2
- package/dist/tools/powershell/simple/packages/package-management.js.map +0 -1
- package/dist/tools/powershell/simple/security/get-domain.js.map +0 -1
- package/dist/tools/powershell/simple/security/get-role.js.map +0 -1
- package/dist/tools/powershell/simple/security/get-user.js +0 -31
- package/dist/tools/powershell/simple/security/get-user.js.map +0 -1
- package/dist/tools/powershell/simple/security/lock-item.js.map +0 -1
- package/dist/tools/powershell/simple/security/protect-item.d.ts +0 -3
- package/dist/tools/powershell/simple/security/protect-item.js.map +0 -1
- package/dist/tools/powershell/simple/security/unprotect-item.js.map +0 -1
- /package/dist/tools/item-service/{simple → logic/simple}/edit-item.d.ts +0 -0
- /package/dist/tools/item-service/{tool-registrations/composite/get-item-descendants.registration.d.ts → tools/composite/get-item-descendants.d.ts} +0 -0
- /package/dist/tools/item-service/{tool-registrations/composite/get-languages.registration.d.ts → tools/composite/get-languages.d.ts} +0 -0
- /package/dist/tools/item-service/{tool-registrations/simple/create-item.registration.d.ts → tools/simple/create-item.d.ts} +0 -0
- /package/dist/tools/item-service/{tool-registrations/simple/delete-item.registration.d.ts → tools/simple/delete-item.d.ts} +0 -0
- /package/dist/tools/item-service/{tool-registrations/simple/edit-item.registration.d.ts → tools/simple/edit-item.d.ts} +0 -0
- /package/dist/tools/item-service/{tool-registrations/simple/get-item-by-path.registration.d.ts → tools/simple/get-item-by-path.d.ts} +0 -0
- /package/dist/tools/item-service/{tool-registrations/simple/get-item-children.registration.d.ts → tools/simple/get-item-children.d.ts} +0 -0
- /package/dist/tools/item-service/{tool-registrations/simple/get-item.registration.d.ts → tools/simple/get-item.d.ts} +0 -0
- /package/dist/tools/item-service/{tool-registrations/simple/run-stored-query.registration.d.ts → tools/simple/run-stored-query.d.ts} +0 -0
- /package/dist/tools/item-service/{tool-registrations/simple/run-stored-search.registration.d.ts → tools/simple/run-stored-search.d.ts} +0 -0
- /package/dist/tools/item-service/{tool-registrations/simple/search-items.registration.d.ts → tools/simple/search-items.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -76,7 +76,9 @@
|
|
|
76
76
|
- [x] Indexing
|
|
77
77
|
- [x] `indexing-initialize-search-index`: initializes one or more search indexes
|
|
78
78
|
- [x] `indexing-get-search-index`: returns a search index
|
|
79
|
-
- [x] `indexing-find-item`: finds an item in a search index
|
|
79
|
+
- [x] `indexing-find-item`: finds an item in a search index - [x] `indexing-suspend-search-index`: suspends one or more running search indexes
|
|
80
|
+
- [x] `indexing-stop-search-index`: stops one or more running search indexes
|
|
81
|
+
- [x] `indexing-resume-search-index`: resumes one or more paused search indexes
|
|
80
82
|
- [x] `indexing-initialize-search-index-item-by-id`: rebuilds the index for a given tree with the specified root item by ID and index name
|
|
81
83
|
- [x] `indexing-initialize-search-index-item-by-path`: rebuilds the index for a given tree with the specified root item by path and index name
|
|
82
84
|
- [x] `indexing-remove-search-index-item-by-id`: removes the item with the specified ID from the search index
|
package/dist/bundle.js
CHANGED
|
@@ -24271,7 +24271,7 @@ async function runGenericPowershellCommand(config, command, options, outputForma
|
|
|
24271
24271
|
};
|
|
24272
24272
|
}
|
|
24273
24273
|
|
|
24274
|
-
function
|
|
24274
|
+
function getUserByIdentityPowerShellTool(server, config) {
|
|
24275
24275
|
server.tool("security-get-user-by-identity", "Get a Sitecore user by its name.", {
|
|
24276
24276
|
identity: stringType(),
|
|
24277
24277
|
}, async (params) => {
|
|
@@ -24281,6 +24281,9 @@ function getUserPowerShellTool(server, config) {
|
|
|
24281
24281
|
};
|
|
24282
24282
|
return safeMcpResponse(runGenericPowershellCommand(config, command, options));
|
|
24283
24283
|
});
|
|
24284
|
+
}
|
|
24285
|
+
|
|
24286
|
+
function getCurrentUserPowerShellTool(server, config) {
|
|
24284
24287
|
server.tool("security-get-current-user", "Get the current Sitecore user.", {}, async () => {
|
|
24285
24288
|
const command = `Get-User`;
|
|
24286
24289
|
const options = {
|
|
@@ -24288,6 +24291,9 @@ function getUserPowerShellTool(server, config) {
|
|
|
24288
24291
|
};
|
|
24289
24292
|
return safeMcpResponse(runGenericPowershellCommand(config, command, options));
|
|
24290
24293
|
});
|
|
24294
|
+
}
|
|
24295
|
+
|
|
24296
|
+
function getUserByFilterPowerShellTool(server, config) {
|
|
24291
24297
|
server.tool("security-get-user-by-filter", "Get a Sitecore users by filter.", {
|
|
24292
24298
|
filter: stringType(),
|
|
24293
24299
|
}, async (params) => {
|
|
@@ -24477,24 +24483,7 @@ function setUserPasswordPowerShellTool(server, config) {
|
|
|
24477
24483
|
});
|
|
24478
24484
|
}
|
|
24479
24485
|
|
|
24480
|
-
function
|
|
24481
|
-
server.tool("security-get-domain-by-name", "Get a Sitecore domain by its name.", {
|
|
24482
|
-
name: stringType(),
|
|
24483
|
-
}, async (params) => {
|
|
24484
|
-
const command = `Get-Domain`;
|
|
24485
|
-
const options = {
|
|
24486
|
-
"Name": params.name,
|
|
24487
|
-
};
|
|
24488
|
-
return safeMcpResponse(runGenericPowershellCommand(config, command, options));
|
|
24489
|
-
});
|
|
24490
|
-
server.tool("security-get-domain", "Get all Sitecore domains.", {}, async () => {
|
|
24491
|
-
const command = `Get-Domain`;
|
|
24492
|
-
const options = {};
|
|
24493
|
-
return safeMcpResponse(runGenericPowershellCommand(config, command, options));
|
|
24494
|
-
});
|
|
24495
|
-
}
|
|
24496
|
-
|
|
24497
|
-
function getRolePowerShellTool(server, config) {
|
|
24486
|
+
function getRoleByIdentityPowerShellTool(server, config) {
|
|
24498
24487
|
server.tool("security-get-role-by-identity", "Get a Sitecore role by its identity.", {
|
|
24499
24488
|
identity: stringType().describe("The identity of the role to retrieve (e.g. 'sitecore\\Author')"),
|
|
24500
24489
|
}, async (params) => {
|
|
@@ -24504,6 +24493,9 @@ function getRolePowerShellTool(server, config) {
|
|
|
24504
24493
|
};
|
|
24505
24494
|
return safeMcpResponse(runGenericPowershellCommand(config, command, options));
|
|
24506
24495
|
});
|
|
24496
|
+
}
|
|
24497
|
+
|
|
24498
|
+
function getRoleByFilterPowerShellTool(server, config) {
|
|
24507
24499
|
server.tool("security-get-role-by-filter", "Get Sitecore roles by filter criteria.", {
|
|
24508
24500
|
filter: stringType().describe("The filter criteria to search for roles (e.g. 'sitecore\\*' or '*Author*')"),
|
|
24509
24501
|
}, async (params) => {
|
|
@@ -24575,59 +24567,6 @@ function removeRoleMemberPowerShellTool(server, config) {
|
|
|
24575
24567
|
});
|
|
24576
24568
|
}
|
|
24577
24569
|
|
|
24578
|
-
function lockItemPowerShellTool(server, config) {
|
|
24579
|
-
server.tool("security-lock-item-by-path", "Lock a Sitecore item by its path.", {
|
|
24580
|
-
path: stringType()
|
|
24581
|
-
.describe("The path of the item to lock (e.g. /sitecore/content/Home)"),
|
|
24582
|
-
force: booleanType()
|
|
24583
|
-
.optional().describe("If set to true, will force the lock even if the item is locked by another user"),
|
|
24584
|
-
passThru: booleanType().optional()
|
|
24585
|
-
.describe("If set to true, passes the processed object back to the pipeline"),
|
|
24586
|
-
database: stringType().optional()
|
|
24587
|
-
.describe("The database containing the item (defaults to the context database)")
|
|
24588
|
-
}, async (params) => {
|
|
24589
|
-
const command = `Lock-Item`;
|
|
24590
|
-
const options = {
|
|
24591
|
-
"Path": params.path,
|
|
24592
|
-
};
|
|
24593
|
-
if (params.force) {
|
|
24594
|
-
options["Force"] = "";
|
|
24595
|
-
}
|
|
24596
|
-
if (params.passThru) {
|
|
24597
|
-
options["PassThru"] = "";
|
|
24598
|
-
}
|
|
24599
|
-
if (params.database) {
|
|
24600
|
-
options["Database"] = params.database;
|
|
24601
|
-
}
|
|
24602
|
-
return safeMcpResponse(runGenericPowershellCommand(config, command, options));
|
|
24603
|
-
});
|
|
24604
|
-
server.tool("security-lock-item-by-id", "Lock a Sitecore item by its ID.", {
|
|
24605
|
-
id: stringType()
|
|
24606
|
-
.describe("The ID of the item to lock"),
|
|
24607
|
-
force: booleanType().optional()
|
|
24608
|
-
.describe("If set to true, will force the lock even if the item is locked by another user"),
|
|
24609
|
-
passThru: booleanType().optional()
|
|
24610
|
-
.describe("If set to true, passes the processed object back to the pipeline"),
|
|
24611
|
-
database: stringType().optional()
|
|
24612
|
-
.describe("The database containing the item (defaults to the context database)")
|
|
24613
|
-
}, async (params) => {
|
|
24614
|
-
const command = `Lock-Item`;
|
|
24615
|
-
const options = {
|
|
24616
|
-
"Id": params.id,
|
|
24617
|
-
};
|
|
24618
|
-
if (params.force) {
|
|
24619
|
-
options["Force"] = "";
|
|
24620
|
-
}
|
|
24621
|
-
if (params.passThru) {
|
|
24622
|
-
options["PassThru"] = "";
|
|
24623
|
-
}
|
|
24624
|
-
if (params.database) {
|
|
24625
|
-
options["Database"] = params.database;
|
|
24626
|
-
}
|
|
24627
|
-
return safeMcpResponse(runGenericPowershellCommand(config, command, options));
|
|
24628
|
-
});
|
|
24629
|
-
}
|
|
24630
|
-
|
|
24631
24570
|
function unlockItemPowerShellTool(server, config) {
|
|
24632
24571
|
server.tool("security-unlock-item-by-id", "Unlocks a Sitecore item by its ID.", {
|
|
24633
24572
|
id: stringType().describe("The ID of the item to unlock"),
|
|
@@ -24677,7 +24616,7 @@ function unlockItemPowerShellTool(server, config) {
|
|
|
24677
24616
|
});
|
|
24678
24617
|
}
|
|
24679
24618
|
|
|
24680
|
-
function
|
|
24619
|
+
function protectItemByPathPowerShellTool(server, config) {
|
|
24681
24620
|
server.tool("security-protect-item-by-path", "Protect a Sitecore item by its path.", {
|
|
24682
24621
|
path: stringType()
|
|
24683
24622
|
.describe("The path of the item to protect (e.g. /sitecore/content/Home)"),
|
|
@@ -24698,6 +24637,9 @@ function protectItemPowerShellTool(server, config) {
|
|
|
24698
24637
|
}
|
|
24699
24638
|
return safeMcpResponse(runGenericPowershellCommand(config, command, options));
|
|
24700
24639
|
});
|
|
24640
|
+
}
|
|
24641
|
+
|
|
24642
|
+
function protectItemByIdPowerShellTool(server, config) {
|
|
24701
24643
|
server.tool("security-protect-item-by-id", "Protect a Sitecore item by its ID.", {
|
|
24702
24644
|
id: stringType()
|
|
24703
24645
|
.describe("The ID of the item to protect"),
|
|
@@ -24720,49 +24662,6 @@ function protectItemPowerShellTool(server, config) {
|
|
|
24720
24662
|
});
|
|
24721
24663
|
}
|
|
24722
24664
|
|
|
24723
|
-
function unprotectItemPowerShellTool(server, config) {
|
|
24724
|
-
server.tool("security-unprotect-item-by-path", "Unprotect a Sitecore item by its path.", {
|
|
24725
|
-
path: stringType()
|
|
24726
|
-
.describe("The path of the item to unprotect (e.g. /sitecore/content/Home)"),
|
|
24727
|
-
passThru: booleanType().optional()
|
|
24728
|
-
.describe("If set to true, passes the processed object back to the pipeline"),
|
|
24729
|
-
database: stringType().optional()
|
|
24730
|
-
.describe("The database containing the item (defaults to the context database)")
|
|
24731
|
-
}, async (params) => {
|
|
24732
|
-
const command = `Unprotect-Item`;
|
|
24733
|
-
const options = {
|
|
24734
|
-
"Path": params.path,
|
|
24735
|
-
};
|
|
24736
|
-
if (params.passThru) {
|
|
24737
|
-
options["PassThru"] = "";
|
|
24738
|
-
}
|
|
24739
|
-
if (params.database) {
|
|
24740
|
-
options["Database"] = params.database;
|
|
24741
|
-
}
|
|
24742
|
-
return safeMcpResponse(runGenericPowershellCommand(config, command, options));
|
|
24743
|
-
});
|
|
24744
|
-
server.tool("security-unprotect-item-by-id", "Unprotect a Sitecore item by its ID.", {
|
|
24745
|
-
id: stringType()
|
|
24746
|
-
.describe("The ID of the item to unprotect"),
|
|
24747
|
-
passThru: booleanType().optional()
|
|
24748
|
-
.describe("If set to true, passes the processed object back to the pipeline"),
|
|
24749
|
-
database: stringType().optional()
|
|
24750
|
-
.describe("The database containing the item (defaults to the context database)")
|
|
24751
|
-
}, async (params) => {
|
|
24752
|
-
const command = `Unprotect-Item`;
|
|
24753
|
-
const options = {
|
|
24754
|
-
"Id": params.id,
|
|
24755
|
-
};
|
|
24756
|
-
if (params.passThru) {
|
|
24757
|
-
options["PassThru"] = "";
|
|
24758
|
-
}
|
|
24759
|
-
if (params.database) {
|
|
24760
|
-
options["Database"] = params.database;
|
|
24761
|
-
}
|
|
24762
|
-
return safeMcpResponse(runGenericPowershellCommand(config, command, options));
|
|
24763
|
-
});
|
|
24764
|
-
}
|
|
24765
|
-
|
|
24766
24665
|
function newRolePowerShellTool(server, config) {
|
|
24767
24666
|
server.tool("security-new-role", "Creates a new Sitecore role.", {
|
|
24768
24667
|
identity: stringType()
|
|
@@ -25365,6 +25264,45 @@ async function findItemPowerShellTool(server, config) {
|
|
|
25365
25264
|
});
|
|
25366
25265
|
}
|
|
25367
25266
|
|
|
25267
|
+
function resumeSearchIndexPowerShellTool(server, config) {
|
|
25268
|
+
server.tool("indexing-resume-search-index", "Resume one or more Sitecore search indexes. If no name is provided, all paused indexes will be resumed.", {
|
|
25269
|
+
name: stringType().optional().describe("The name of the index to resume. If not provided, all paused indexes will be resumed."),
|
|
25270
|
+
}, async (params) => {
|
|
25271
|
+
const command = `Resume-SearchIndex`;
|
|
25272
|
+
const options = {};
|
|
25273
|
+
if (params.name) {
|
|
25274
|
+
options["Name"] = params.name;
|
|
25275
|
+
}
|
|
25276
|
+
return safeMcpResponse(runGenericPowershellCommand(config, command, options));
|
|
25277
|
+
});
|
|
25278
|
+
}
|
|
25279
|
+
|
|
25280
|
+
function suspendSearchIndexPowerShellTool(server, config) {
|
|
25281
|
+
server.tool("indexing-suspend-search-index", "Suspend one or more Sitecore search indexes. If no name is provided, all running indexes will be suspended.", {
|
|
25282
|
+
name: stringType().optional().describe("The name of the index to suspend. If not provided, all running indexes will be suspended."),
|
|
25283
|
+
}, async (params) => {
|
|
25284
|
+
const command = `Suspend-SearchIndex`;
|
|
25285
|
+
const options = {};
|
|
25286
|
+
if (params.name) {
|
|
25287
|
+
options["Name"] = params.name;
|
|
25288
|
+
}
|
|
25289
|
+
return safeMcpResponse(runGenericPowershellCommand(config, command, options));
|
|
25290
|
+
});
|
|
25291
|
+
}
|
|
25292
|
+
|
|
25293
|
+
function stopSearchIndexPowerShellTool(server, config) {
|
|
25294
|
+
server.tool("indexing-stop-search-index", "Stop one or more Sitecore search indexes. If no name is provided, all running indexes will be stopped.", {
|
|
25295
|
+
name: stringType().optional().describe("The name of the index to stop. If not provided, all running indexes will be stopped."),
|
|
25296
|
+
}, async (params) => {
|
|
25297
|
+
const command = `Stop-SearchIndex`;
|
|
25298
|
+
const options = {};
|
|
25299
|
+
if (params.name) {
|
|
25300
|
+
options["Name"] = params.name;
|
|
25301
|
+
}
|
|
25302
|
+
return safeMcpResponse(runGenericPowershellCommand(config, command, options));
|
|
25303
|
+
});
|
|
25304
|
+
}
|
|
25305
|
+
|
|
25368
25306
|
function prepareArgsString(parameters) {
|
|
25369
25307
|
let scriptWithParameters = "";
|
|
25370
25308
|
if (parameters) {
|
|
@@ -25518,6 +25456,128 @@ function removeSearchIndexItemByPathPowerShellTool(server, config) {
|
|
|
25518
25456
|
});
|
|
25519
25457
|
}
|
|
25520
25458
|
|
|
25459
|
+
function lockItemByIdPowerShellTool(server, config) {
|
|
25460
|
+
server.tool("security-lock-item-by-id", "Lock a Sitecore item by its ID.", {
|
|
25461
|
+
id: stringType()
|
|
25462
|
+
.describe("The ID of the item to lock"),
|
|
25463
|
+
force: booleanType().optional()
|
|
25464
|
+
.describe("If set to true, will force the lock even if the item is locked by another user"),
|
|
25465
|
+
passThru: booleanType().optional()
|
|
25466
|
+
.describe("If set to true, passes the processed object back to the pipeline"),
|
|
25467
|
+
database: stringType().optional()
|
|
25468
|
+
.describe("The database containing the item (defaults to the context database)")
|
|
25469
|
+
}, async (params) => {
|
|
25470
|
+
const command = `Lock-Item`;
|
|
25471
|
+
const options = {
|
|
25472
|
+
"Id": params.id,
|
|
25473
|
+
};
|
|
25474
|
+
if (params.force) {
|
|
25475
|
+
options["Force"] = "";
|
|
25476
|
+
}
|
|
25477
|
+
if (params.passThru) {
|
|
25478
|
+
options["PassThru"] = "";
|
|
25479
|
+
}
|
|
25480
|
+
if (params.database) {
|
|
25481
|
+
options["Database"] = params.database;
|
|
25482
|
+
}
|
|
25483
|
+
return safeMcpResponse(runGenericPowershellCommand(config, command, options));
|
|
25484
|
+
});
|
|
25485
|
+
}
|
|
25486
|
+
|
|
25487
|
+
function lockItemByPathPowerShellTool(server, config) {
|
|
25488
|
+
server.tool("security-lock-item-by-path", "Lock a Sitecore item by its path.", {
|
|
25489
|
+
path: stringType()
|
|
25490
|
+
.describe("The path of the item to lock (e.g. /sitecore/content/Home)"),
|
|
25491
|
+
force: booleanType()
|
|
25492
|
+
.optional().describe("If set to true, will force the lock even if the item is locked by another user"),
|
|
25493
|
+
passThru: booleanType().optional()
|
|
25494
|
+
.describe("If set to true, passes the processed object back to the pipeline"),
|
|
25495
|
+
database: stringType().optional()
|
|
25496
|
+
.describe("The database containing the item (defaults to the context database)")
|
|
25497
|
+
}, async (params) => {
|
|
25498
|
+
const command = `Lock-Item`;
|
|
25499
|
+
const options = {
|
|
25500
|
+
"Path": params.path,
|
|
25501
|
+
};
|
|
25502
|
+
if (params.force) {
|
|
25503
|
+
options["Force"] = "";
|
|
25504
|
+
}
|
|
25505
|
+
if (params.passThru) {
|
|
25506
|
+
options["PassThru"] = "";
|
|
25507
|
+
}
|
|
25508
|
+
if (params.database) {
|
|
25509
|
+
options["Database"] = params.database;
|
|
25510
|
+
}
|
|
25511
|
+
return safeMcpResponse(runGenericPowershellCommand(config, command, options));
|
|
25512
|
+
});
|
|
25513
|
+
}
|
|
25514
|
+
|
|
25515
|
+
function unprotectItemByIdPowerShellTool(server, config) {
|
|
25516
|
+
server.tool("security-unprotect-item-by-id", "Unprotect a Sitecore item by its ID.", {
|
|
25517
|
+
id: stringType()
|
|
25518
|
+
.describe("The ID of the item to unprotect"),
|
|
25519
|
+
passThru: booleanType().optional()
|
|
25520
|
+
.describe("If set to true, passes the processed object back to the pipeline"),
|
|
25521
|
+
database: stringType().optional()
|
|
25522
|
+
.describe("The database containing the item (defaults to the context database)")
|
|
25523
|
+
}, async (params) => {
|
|
25524
|
+
const command = `Unprotect-Item`;
|
|
25525
|
+
const options = {
|
|
25526
|
+
"Id": params.id,
|
|
25527
|
+
};
|
|
25528
|
+
if (params.passThru) {
|
|
25529
|
+
options["PassThru"] = "";
|
|
25530
|
+
}
|
|
25531
|
+
if (params.database) {
|
|
25532
|
+
options["Database"] = params.database;
|
|
25533
|
+
}
|
|
25534
|
+
return safeMcpResponse(runGenericPowershellCommand(config, command, options));
|
|
25535
|
+
});
|
|
25536
|
+
}
|
|
25537
|
+
|
|
25538
|
+
function unprotectItemByPathPowerShellTool(server, config) {
|
|
25539
|
+
server.tool("security-unprotect-item-by-path", "Unprotect a Sitecore item by its path.", {
|
|
25540
|
+
path: stringType()
|
|
25541
|
+
.describe("The path of the item to unprotect (e.g. /sitecore/content/Home)"),
|
|
25542
|
+
passThru: booleanType().optional()
|
|
25543
|
+
.describe("If set to true, passes the processed object back to the pipeline"),
|
|
25544
|
+
database: stringType().optional()
|
|
25545
|
+
.describe("The database containing the item (defaults to the context database)")
|
|
25546
|
+
}, async (params) => {
|
|
25547
|
+
const command = `Unprotect-Item`;
|
|
25548
|
+
const options = {
|
|
25549
|
+
"Path": params.path,
|
|
25550
|
+
};
|
|
25551
|
+
if (params.passThru) {
|
|
25552
|
+
options["PassThru"] = "";
|
|
25553
|
+
}
|
|
25554
|
+
if (params.database) {
|
|
25555
|
+
options["Database"] = params.database;
|
|
25556
|
+
}
|
|
25557
|
+
return safeMcpResponse(runGenericPowershellCommand(config, command, options));
|
|
25558
|
+
});
|
|
25559
|
+
}
|
|
25560
|
+
|
|
25561
|
+
function getDomainByNamePowerShellTool(server, config) {
|
|
25562
|
+
server.tool("security-get-domain-by-name", "Get a Sitecore domain by its name.", {
|
|
25563
|
+
name: stringType(),
|
|
25564
|
+
}, async (params) => {
|
|
25565
|
+
const command = `Get-Domain`;
|
|
25566
|
+
const options = {
|
|
25567
|
+
"Name": params.name,
|
|
25568
|
+
};
|
|
25569
|
+
return safeMcpResponse(runGenericPowershellCommand(config, command, options));
|
|
25570
|
+
});
|
|
25571
|
+
}
|
|
25572
|
+
|
|
25573
|
+
function getAllDomainsPowerShellTool(server, config) {
|
|
25574
|
+
server.tool("security-get-domain", "Get all Sitecore domains.", {}, async () => {
|
|
25575
|
+
const command = `Get-Domain`;
|
|
25576
|
+
const options = {};
|
|
25577
|
+
return safeMcpResponse(runGenericPowershellCommand(config, command, options));
|
|
25578
|
+
});
|
|
25579
|
+
}
|
|
25580
|
+
|
|
25521
25581
|
async function register(array, server, config) {
|
|
25522
25582
|
for (const register of array) {
|
|
25523
25583
|
await register(server, config);
|
|
@@ -25525,7 +25585,8 @@ async function register(array, server, config) {
|
|
|
25525
25585
|
}
|
|
25526
25586
|
async function registerAll(server, config) {
|
|
25527
25587
|
await register([
|
|
25528
|
-
registerGraphQL,
|
|
25588
|
+
registerGraphQL,
|
|
25589
|
+
//Item Service
|
|
25529
25590
|
//Simple Item Service Tools
|
|
25530
25591
|
getItemTool,
|
|
25531
25592
|
getItemChildrenTool,
|
|
@@ -25538,10 +25599,13 @@ async function registerAll(server, config) {
|
|
|
25538
25599
|
runStoredSearchTool,
|
|
25539
25600
|
//Composite Item Service Tools
|
|
25540
25601
|
getItemDescendantsTool,
|
|
25541
|
-
getLanguagesTool,
|
|
25602
|
+
getLanguagesTool,
|
|
25603
|
+
//PowerShell tools
|
|
25542
25604
|
//Security
|
|
25543
25605
|
//Simple Security PowerShell Tools
|
|
25544
|
-
|
|
25606
|
+
getUserByIdentityPowerShellTool,
|
|
25607
|
+
getCurrentUserPowerShellTool,
|
|
25608
|
+
getUserByFilterPowerShellTool,
|
|
25545
25609
|
newUserPowerShellTool,
|
|
25546
25610
|
removeUserPowerShellTool,
|
|
25547
25611
|
disableUserPowerShellTool,
|
|
@@ -25549,15 +25613,20 @@ async function registerAll(server, config) {
|
|
|
25549
25613
|
unlockUserPowerShellTool,
|
|
25550
25614
|
setUserPowerShellTool,
|
|
25551
25615
|
setUserPasswordPowerShellTool,
|
|
25552
|
-
|
|
25553
|
-
|
|
25616
|
+
getDomainByNamePowerShellTool,
|
|
25617
|
+
getAllDomainsPowerShellTool,
|
|
25618
|
+
getRoleByIdentityPowerShellTool,
|
|
25619
|
+
getRoleByFilterPowerShellTool,
|
|
25554
25620
|
getRoleMemberPowerShellTool,
|
|
25555
25621
|
addRoleMemberPowerShellTool,
|
|
25556
25622
|
removeRoleMemberPowerShellTool,
|
|
25557
|
-
|
|
25623
|
+
lockItemByIdPowerShellTool,
|
|
25624
|
+
lockItemByPathPowerShellTool,
|
|
25558
25625
|
unlockItemPowerShellTool,
|
|
25559
|
-
|
|
25560
|
-
|
|
25626
|
+
protectItemByPathPowerShellTool,
|
|
25627
|
+
protectItemByIdPowerShellTool,
|
|
25628
|
+
unprotectItemByIdPowerShellTool,
|
|
25629
|
+
unprotectItemByPathPowerShellTool,
|
|
25561
25630
|
newRolePowerShellTool,
|
|
25562
25631
|
removeRolePowerShellTool,
|
|
25563
25632
|
newDomainPowerShellTool,
|
|
@@ -25571,11 +25640,11 @@ async function registerAll(server, config) {
|
|
|
25571
25640
|
setItemAclByIdPowerShellTool,
|
|
25572
25641
|
setItemAclByPathPowerShellTool,
|
|
25573
25642
|
//Provider
|
|
25574
|
-
getItemPowerShellTool,
|
|
25575
|
-
|
|
25576
|
-
|
|
25577
|
-
|
|
25578
|
-
|
|
25643
|
+
getItemPowerShellTool, //Indexing PowerShell Tools
|
|
25644
|
+
initializeSearchIndexPowerShellTool, getSearchIndexPowerShellTool, findItemPowerShellTool,
|
|
25645
|
+
resumeSearchIndexPowerShellTool,
|
|
25646
|
+
suspendSearchIndexPowerShellTool,
|
|
25647
|
+
stopSearchIndexPowerShellTool,
|
|
25579
25648
|
//Composite Indexing PowerShell Tools
|
|
25580
25649
|
initializeSearchIndexingItemByIdPowerShellTool,
|
|
25581
25650
|
initializeSearchIndexingItemByPathPowerShellTool,
|
package/dist/register.js
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import { registerGraphQL } from "./tools/graphql/register-graphql.js";
|
|
2
|
-
import { getItemTool } from "./tools/item-service/
|
|
3
|
-
import { getItemChildrenTool } from "./tools/item-service/
|
|
4
|
-
import { getItemByPathTool } from "./tools/item-service/
|
|
5
|
-
import { createItemTool } from "./tools/item-service/
|
|
6
|
-
import { editItemTool } from "./tools/item-service/
|
|
7
|
-
import { deleteItemTool } from "./tools/item-service/
|
|
8
|
-
import { searchItemsTool } from "./tools/item-service/
|
|
9
|
-
import { runStoredQueryTool } from "./tools/item-service/
|
|
10
|
-
import { runStoredSearchTool } from "./tools/item-service/
|
|
11
|
-
import { getItemDescendantsTool } from "./tools/item-service/
|
|
12
|
-
import { getLanguagesTool } from "./tools/item-service/
|
|
13
|
-
import {
|
|
2
|
+
import { getItemTool } from "./tools/item-service/tools/simple/get-item.js";
|
|
3
|
+
import { getItemChildrenTool } from "./tools/item-service/tools/simple/get-item-children.js";
|
|
4
|
+
import { getItemByPathTool } from "./tools/item-service/tools/simple/get-item-by-path.js";
|
|
5
|
+
import { createItemTool } from "./tools/item-service/tools/simple/create-item.js";
|
|
6
|
+
import { editItemTool } from "./tools/item-service/tools/simple/edit-item.js";
|
|
7
|
+
import { deleteItemTool } from "./tools/item-service/tools/simple/delete-item.js";
|
|
8
|
+
import { searchItemsTool } from "./tools/item-service/tools/simple/search-items.js";
|
|
9
|
+
import { runStoredQueryTool } from "./tools/item-service/tools/simple/run-stored-query.js";
|
|
10
|
+
import { runStoredSearchTool } from "./tools/item-service/tools/simple/run-stored-search.js";
|
|
11
|
+
import { getItemDescendantsTool } from "./tools/item-service/tools/composite/get-item-descendants.js";
|
|
12
|
+
import { getLanguagesTool } from "./tools/item-service/tools/composite/get-languages.js";
|
|
13
|
+
import { getUserByIdentityPowerShellTool } from "./tools/powershell/simple/security/get-user-by-identity.js";
|
|
14
|
+
import { getCurrentUserPowerShellTool } from "./tools/powershell/simple/security/get-current-user.js";
|
|
15
|
+
import { getUserByFilterPowerShellTool } from "./tools/powershell/simple/security/get-user-by-filter.js";
|
|
14
16
|
import { newUserPowerShellTool } from "./tools/powershell/simple/security/new-user.js";
|
|
15
17
|
import { removeUserPowerShellTool } from "./tools/powershell/simple/security/remove-user.js";
|
|
16
18
|
import { disableUserPowerShellTool } from "./tools/powershell/simple/security/disable-user.js";
|
|
@@ -18,15 +20,14 @@ import { enableUserPowerShellTool } from "./tools/powershell/simple/security/ena
|
|
|
18
20
|
import { unlockUserPowerShellTool } from "./tools/powershell/simple/security/unlock-user.js";
|
|
19
21
|
import { setUserPowerShellTool } from "./tools/powershell/simple/security/set-user.js";
|
|
20
22
|
import { setUserPasswordPowerShellTool } from "./tools/powershell/simple/security/set-user-password.js";
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
+
import { getRoleByIdentityPowerShellTool } from "./tools/powershell/simple/security/get-role-by-identity.js";
|
|
24
|
+
import { getRoleByFilterPowerShellTool } from "./tools/powershell/simple/security/get-role-by-filter.js";
|
|
23
25
|
import { getRoleMemberPowerShellTool } from "./tools/powershell/simple/security/get-role-member.js";
|
|
24
26
|
import { addRoleMemberPowerShellTool } from "./tools/powershell/simple/security/add-role-member.js";
|
|
25
27
|
import { removeRoleMemberPowerShellTool } from "./tools/powershell/simple/security/remove-role-member.js";
|
|
26
|
-
import { lockItemPowerShellTool } from "./tools/powershell/simple/security/lock-item.js";
|
|
27
28
|
import { unlockItemPowerShellTool } from "./tools/powershell/simple/security/unlock-item.js";
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
29
|
+
import { protectItemByPathPowerShellTool } from "./tools/powershell/simple/security/protect-item-by-path.js";
|
|
30
|
+
import { protectItemByIdPowerShellTool } from "./tools/powershell/simple/security/protect-item-by-id.js";
|
|
30
31
|
import { newRolePowerShellTool } from "./tools/powershell/simple/security/new-role.js";
|
|
31
32
|
import { removeRolePowerShellTool } from "./tools/powershell/simple/security/remove-role.js";
|
|
32
33
|
import { newDomainPowerShellTool } from "./tools/powershell/simple/security/new-domain.js";
|
|
@@ -40,12 +41,21 @@ import { getItemPowerShellTool } from "./tools/powershell/simple/provider/get-it
|
|
|
40
41
|
import { initializeSearchIndexPowerShellTool } from "./tools/powershell/simple/indexing/initialize-search-index.js";
|
|
41
42
|
import { getSearchIndexPowerShellTool } from "./tools/powershell/simple/indexing/get-search-index.js";
|
|
42
43
|
import { findItemPowerShellTool } from "./tools/powershell/simple/indexing/find-item.js";
|
|
44
|
+
import { resumeSearchIndexPowerShellTool } from "./tools/powershell/simple/indexing/resume-search-index.js";
|
|
45
|
+
import { suspendSearchIndexPowerShellTool } from "./tools/powershell/simple/indexing/suspend-search-index.js";
|
|
46
|
+
import { stopSearchIndexPowerShellTool } from "./tools/powershell/simple/indexing/stop-search-index.js";
|
|
43
47
|
import { setItemAclByIdPowerShellTool } from "./tools/powershell/composite/security/set-item-acl-by-id.js";
|
|
44
48
|
import { setItemAclByPathPowerShellTool } from "./tools/powershell/composite/security/set-item-acl-by-path.js";
|
|
45
49
|
import { initializeSearchIndexingItemByIdPowerShellTool } from "./tools/powershell/composite/indexing/initialialize-search-indexing-item-by-id.js";
|
|
46
50
|
import { initializeSearchIndexingItemByPathPowerShellTool } from "./tools/powershell/composite/indexing/initialialize-search-indexing-item-by-path.js";
|
|
47
51
|
import { removeSearchIndexItemByIdPowerShellTool } from "./tools/powershell/composite/indexing/remove-search-index-item-by-id.js";
|
|
48
52
|
import { removeSearchIndexItemByPathPowerShellTool } from "./tools/powershell/composite/indexing/remove-search-index-item-by-path.js";
|
|
53
|
+
import { lockItemByIdPowerShellTool } from "./tools/powershell/simple/security/lock-item-by-id.js";
|
|
54
|
+
import { lockItemByPathPowerShellTool } from "./tools/powershell/simple/security/lock-item-by-path.js";
|
|
55
|
+
import { unprotectItemByIdPowerShellTool } from "./tools/powershell/simple/security/unprotect-item-by-id.js";
|
|
56
|
+
import { unprotectItemByPathPowerShellTool } from "./tools/powershell/simple/security/unprotect-item-by-path.js";
|
|
57
|
+
import { getDomainByNamePowerShellTool } from "./tools/powershell/simple/security/get-domain-by-name.js";
|
|
58
|
+
import { getAllDomainsPowerShellTool } from "./tools/powershell/simple/security/get-all-domains.js";
|
|
49
59
|
export async function register(array, server, config) {
|
|
50
60
|
for (const register of array) {
|
|
51
61
|
await register(server, config);
|
|
@@ -53,7 +63,8 @@ export async function register(array, server, config) {
|
|
|
53
63
|
}
|
|
54
64
|
export async function registerAll(server, config) {
|
|
55
65
|
await register([
|
|
56
|
-
registerGraphQL,
|
|
66
|
+
registerGraphQL,
|
|
67
|
+
//Item Service
|
|
57
68
|
//Simple Item Service Tools
|
|
58
69
|
getItemTool,
|
|
59
70
|
getItemChildrenTool,
|
|
@@ -66,10 +77,13 @@ export async function registerAll(server, config) {
|
|
|
66
77
|
runStoredSearchTool,
|
|
67
78
|
//Composite Item Service Tools
|
|
68
79
|
getItemDescendantsTool,
|
|
69
|
-
getLanguagesTool,
|
|
80
|
+
getLanguagesTool,
|
|
81
|
+
//PowerShell tools
|
|
70
82
|
//Security
|
|
71
83
|
//Simple Security PowerShell Tools
|
|
72
|
-
|
|
84
|
+
getUserByIdentityPowerShellTool,
|
|
85
|
+
getCurrentUserPowerShellTool,
|
|
86
|
+
getUserByFilterPowerShellTool,
|
|
73
87
|
newUserPowerShellTool,
|
|
74
88
|
removeUserPowerShellTool,
|
|
75
89
|
disableUserPowerShellTool,
|
|
@@ -77,15 +91,20 @@ export async function registerAll(server, config) {
|
|
|
77
91
|
unlockUserPowerShellTool,
|
|
78
92
|
setUserPowerShellTool,
|
|
79
93
|
setUserPasswordPowerShellTool,
|
|
80
|
-
|
|
81
|
-
|
|
94
|
+
getDomainByNamePowerShellTool,
|
|
95
|
+
getAllDomainsPowerShellTool,
|
|
96
|
+
getRoleByIdentityPowerShellTool,
|
|
97
|
+
getRoleByFilterPowerShellTool,
|
|
82
98
|
getRoleMemberPowerShellTool,
|
|
83
99
|
addRoleMemberPowerShellTool,
|
|
84
100
|
removeRoleMemberPowerShellTool,
|
|
85
|
-
|
|
101
|
+
lockItemByIdPowerShellTool,
|
|
102
|
+
lockItemByPathPowerShellTool,
|
|
86
103
|
unlockItemPowerShellTool,
|
|
87
|
-
|
|
88
|
-
|
|
104
|
+
protectItemByPathPowerShellTool,
|
|
105
|
+
protectItemByIdPowerShellTool,
|
|
106
|
+
unprotectItemByIdPowerShellTool,
|
|
107
|
+
unprotectItemByPathPowerShellTool,
|
|
89
108
|
newRolePowerShellTool,
|
|
90
109
|
removeRolePowerShellTool,
|
|
91
110
|
newDomainPowerShellTool,
|
|
@@ -99,11 +118,11 @@ export async function registerAll(server, config) {
|
|
|
99
118
|
setItemAclByIdPowerShellTool,
|
|
100
119
|
setItemAclByPathPowerShellTool,
|
|
101
120
|
//Provider
|
|
102
|
-
getItemPowerShellTool,
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
121
|
+
getItemPowerShellTool, //Indexing PowerShell Tools
|
|
122
|
+
initializeSearchIndexPowerShellTool, getSearchIndexPowerShellTool, findItemPowerShellTool,
|
|
123
|
+
resumeSearchIndexPowerShellTool,
|
|
124
|
+
suspendSearchIndexPowerShellTool,
|
|
125
|
+
stopSearchIndexPowerShellTool,
|
|
107
126
|
//Composite Indexing PowerShell Tools
|
|
108
127
|
initializeSearchIndexingItemByIdPowerShellTool,
|
|
109
128
|
initializeSearchIndexingItemByPathPowerShellTool,
|
package/dist/register.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register.js","sourceRoot":"","sources":["../src/register.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"register.js","sourceRoot":"","sources":["../src/register.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAC5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,wDAAwD,CAAC;AAC7F,OAAO,EAAE,iBAAiB,EAAE,MAAM,uDAAuD,CAAC;AAC1F,OAAO,EAAE,cAAc,EAAE,MAAM,kDAAkD,CAAC;AAClF,OAAO,EAAE,YAAY,EAAE,MAAM,gDAAgD,CAAC;AAC9E,OAAO,EAAE,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B,0BAA0B;QAC1B,yBAAyB;QACzB,wBAAwB;QACxB,yBAAyB;QACzB,wBAAwB;QACxB,0BAA0B;QAC1B,qCAAqC;QACrC,4BAA4B;QAC5B,8BAA8B;QAE9B,UAAU;QACV,qBAAqB,EAAS,2BAA2B;QACzD,mCAAmC,EAAS,4BAA4B,EAAS,sBAAsB;QACvG,+BAA+B;QAC/B,gCAAgC;QAChC,6BAA6B;QAC7B,qCAAqC;QACrC,8CAA8C;QAC9C,gDAAgD;QAChD,uCAAuC;QACvC,yCAAyC;KAE5C,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AACvB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type CallToolResult } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
-
import { type Config } from "
|
|
2
|
+
import { type Config } from "../../../../config.js";
|
|
3
3
|
export declare function getItemDescendants(conf: Config, id: string, options: {
|
|
4
4
|
database?: string;
|
|
5
5
|
language?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {} from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
-
import {} from "
|
|
3
|
-
import RestfulItemServiceClient from "
|
|
2
|
+
import {} from "../../../../config.js";
|
|
3
|
+
import RestfulItemServiceClient from "../../client.js";
|
|
4
4
|
export async function getItemDescendants(conf, id, options) {
|
|
5
5
|
const client = new RestfulItemServiceClient(conf.itemService.serverUrl, conf.itemService.username, conf.itemService.password, conf.itemService.domain);
|
|
6
6
|
const responseArray = [];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-item-descendants.js","sourceRoot":"","sources":["../../../../../src/tools/item-service/logic/composite/get-item-descendants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAe,MAAM,aAAa,CAAC;AAC1C,OAAO,wBAAwB,MAAM,iBAAiB,CAAC;AAEvD,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,IAAY,EACjD,EAAU,EAAE,OAOX;IAED,MAAM,MAAM,GAAG,IAAI,wBAAwB,CAAC,IAAI,CAAC,WAAW,CAAC,SAAS,EAClE,IAAI,CAAC,WAAW,CAAC,QAAQ,EACzB,IAAI,CAAC,WAAW,CAAC,QAAQ,EACzB,IAAI,CAAC,WAAW,CAAC,MAAM,CAC1B,CAAC;IAEF,MAAM,aAAa,GAAG,EAAE,CAAC;IACzB,MAAM,MAAM,GAAG,IAAI,GAAG,EAAU,CAAC;IAEjC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAEf,OAAM,MAAM,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC;QACpB,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,EAAE,CAAC;QACvD,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;QAC3B,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC,WAAW,EAAE,OAAO,CAAQ,CAAC;QAE3E,IAAI,QAAQ,EAAE,CAAC;YACX,KAAK,MAAM,KAAK,IAAI,QAAQ,EAAE,CAAC;gBAC3B,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;YAC7B,CAAC;YACD,aAAa,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,CAAC;QACpC,CAAC;IACL,CAAC;IAED,OAAO;QACH,OAAO,EAAE;YACL;gBACI,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;aAC/C;SACJ;QACD,OAAO,EAAE,KAAK;KACjB,CAAA;AACL,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {} from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
-
import {} from "
|
|
3
|
-
import RestfulItemServiceClient from "
|
|
2
|
+
import {} from "../../../../config.js";
|
|
3
|
+
import RestfulItemServiceClient from "../../client.js";
|
|
4
4
|
export async function getLanguages(conf) {
|
|
5
5
|
const client = new RestfulItemServiceClient(conf.itemService.serverUrl, conf.itemService.username, conf.itemService.password, conf.itemService.domain);
|
|
6
6
|
const languagesItemResponse = await client.getItemByPath("/sitecore/system/Languages");
|