@contentful/mcp-tools 0.12.9 → 0.12.10
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/index.d.ts +146 -208
- package/dist/index.js +459 -518
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5728,7 +5728,7 @@ function createUsageTools(config) {
|
|
|
5728
5728
|
};
|
|
5729
5729
|
}
|
|
5730
5730
|
|
|
5731
|
-
// src/tools/jobs/space-to-space-migration/
|
|
5731
|
+
// src/tools/jobs/space-to-space-migration/types.ts
|
|
5732
5732
|
import { z as z82 } from "zod";
|
|
5733
5733
|
|
|
5734
5734
|
// src/types/querySchema.ts
|
|
@@ -5750,8 +5750,22 @@ var AssetQuerySchema = z81.object({
|
|
|
5750
5750
|
order: z81.string().optional().describe("Order assets by this field")
|
|
5751
5751
|
});
|
|
5752
5752
|
|
|
5753
|
-
// src/tools/jobs/space-to-space-migration/
|
|
5754
|
-
var
|
|
5753
|
+
// src/tools/jobs/space-to-space-migration/types.ts
|
|
5754
|
+
var DYNAMIC_QUERY_KEY_PATTERN = /^(fields|sys|metadata)\./;
|
|
5755
|
+
function stripUnsupportedQueryKeys(knownKeys) {
|
|
5756
|
+
const knownKeySet = new Set(knownKeys);
|
|
5757
|
+
return (value) => {
|
|
5758
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
5759
|
+
return value;
|
|
5760
|
+
}
|
|
5761
|
+
return Object.fromEntries(
|
|
5762
|
+
Object.entries(value).filter(
|
|
5763
|
+
([key]) => knownKeySet.has(key) || DYNAMIC_QUERY_KEY_PATTERN.test(key)
|
|
5764
|
+
)
|
|
5765
|
+
);
|
|
5766
|
+
};
|
|
5767
|
+
}
|
|
5768
|
+
var ExportParamsSchema = BaseToolSchema.extend({
|
|
5755
5769
|
exportDir: z82.string().optional().describe(
|
|
5756
5770
|
"Directory to save the exported space data (optional, defaults to current directory)"
|
|
5757
5771
|
),
|
|
@@ -5767,17 +5781,34 @@ var ExportSpaceToolParams = BaseToolSchema.extend({
|
|
|
5767
5781
|
skipWebhooks: z82.boolean().optional().default(false).describe("Skip exporting webhooks"),
|
|
5768
5782
|
stripTags: z82.boolean().optional().default(false).describe("Untag assets and entries"),
|
|
5769
5783
|
contentOnly: z82.boolean().optional().default(false).describe("Only export assets and entries"),
|
|
5770
|
-
queryEntries: EntryQuerySchema.optional().describe(
|
|
5771
|
-
|
|
5772
|
-
),
|
|
5773
|
-
queryAssets: AssetQuerySchema.optional().describe(
|
|
5774
|
-
"Export only assets that match query parameters"
|
|
5775
|
-
),
|
|
5784
|
+
queryEntries: EntryQuerySchema.passthrough().transform(stripUnsupportedQueryKeys(Object.keys(EntryQuerySchema.shape))).optional().describe("Export only entries that match query parameters"),
|
|
5785
|
+
queryAssets: AssetQuerySchema.passthrough().transform(stripUnsupportedQueryKeys(Object.keys(AssetQuerySchema.shape))).optional().describe("Export only assets that match query parameters"),
|
|
5776
5786
|
downloadAssets: z82.boolean().optional().default(false).describe("Download actual asset files"),
|
|
5777
5787
|
maxAllowedLimit: z82.number().optional().default(1e3).describe("Maximum number of items per request"),
|
|
5778
5788
|
errorLogFile: z82.string().optional().describe("Path to error log output file"),
|
|
5779
5789
|
useVerboseRenderer: z82.boolean().optional().describe("Line-by-line logging, useful for CI")
|
|
5780
5790
|
});
|
|
5791
|
+
var ImportParamsSchema = BaseToolSchema.extend({
|
|
5792
|
+
contentFile: z82.string().optional().describe("Path to JSON file containing the content to import"),
|
|
5793
|
+
content: z82.record(z82.any()).optional().describe(
|
|
5794
|
+
"JS object containing import content (must match expected structure)"
|
|
5795
|
+
),
|
|
5796
|
+
contentModelOnly: z82.boolean().optional().default(false).describe("Import only content types"),
|
|
5797
|
+
skipContentModel: z82.boolean().optional().default(false).describe("Skip importing content types and locales"),
|
|
5798
|
+
skipLocales: z82.boolean().optional().default(false).describe("Skip importing locales"),
|
|
5799
|
+
skipContentUpdates: z82.boolean().optional().default(false).describe("Do not update existing content"),
|
|
5800
|
+
skipContentPublishing: z82.boolean().optional().default(false).describe("Create but do not publish content"),
|
|
5801
|
+
uploadAssets: z82.boolean().optional().default(false).describe("Upload asset files (requires assetsDirectory)"),
|
|
5802
|
+
skipAssetUpdates: z82.boolean().optional().default(false).describe("Do not update existing assets"),
|
|
5803
|
+
assetsDirectory: z82.string().optional().describe("Path to directory containing exported asset files"),
|
|
5804
|
+
timeout: z82.number().optional().default(3e3).describe("Time between retries during asset processing (ms)"),
|
|
5805
|
+
retryLimit: z82.number().optional().default(10).describe("Max retries for asset processing"),
|
|
5806
|
+
rateLimit: z82.number().optional().default(7).describe("Max requests per second to the API"),
|
|
5807
|
+
errorLogFile: z82.string().optional().describe("Path to error log file"),
|
|
5808
|
+
useVerboseRenderer: z82.boolean().optional().describe("Line-by-line progress output (good for CI)")
|
|
5809
|
+
});
|
|
5810
|
+
|
|
5811
|
+
// src/tools/jobs/space-to-space-migration/exportSpace.ts
|
|
5781
5812
|
function createExportSpaceTool(config) {
|
|
5782
5813
|
async function tool2(args) {
|
|
5783
5814
|
const clientConfig = createClientConfig(config);
|
|
@@ -5785,15 +5816,18 @@ function createExportSpaceTool(config) {
|
|
|
5785
5816
|
if (!managementToken) {
|
|
5786
5817
|
throw new Error("Contentful management token is not configured");
|
|
5787
5818
|
}
|
|
5788
|
-
const
|
|
5819
|
+
const safeOptions = ExportParamsSchema.parse({
|
|
5789
5820
|
...args,
|
|
5790
|
-
managementToken,
|
|
5791
|
-
host: config.host ?? "api.contentful.com",
|
|
5792
|
-
...config.deliveryToken && { deliveryToken: config.deliveryToken },
|
|
5793
|
-
...config.hostDelivery && { hostDelivery: config.hostDelivery },
|
|
5794
5821
|
environmentId: args.environmentId || "master",
|
|
5795
5822
|
exportDir: args.exportDir || process.cwd(),
|
|
5796
5823
|
contentFile: args.contentFile || `contentful-export-${args.spaceId}.json`
|
|
5824
|
+
});
|
|
5825
|
+
const exportOptions = {
|
|
5826
|
+
...safeOptions,
|
|
5827
|
+
managementToken,
|
|
5828
|
+
host: config.host ?? "api.contentful.com",
|
|
5829
|
+
...config.deliveryToken && { deliveryToken: config.deliveryToken },
|
|
5830
|
+
...config.hostDelivery && { hostDelivery: config.hostDelivery }
|
|
5797
5831
|
};
|
|
5798
5832
|
try {
|
|
5799
5833
|
const contentfulExport = await import("contentful-export");
|
|
@@ -5829,66 +5863,8 @@ var ParamCollectionToolParams = BaseToolSchema.extend({
|
|
|
5829
5863
|
confirmation: z83.boolean().optional().describe(
|
|
5830
5864
|
"User confirmation that they are ready to proceed with the workflow"
|
|
5831
5865
|
),
|
|
5832
|
-
export:
|
|
5833
|
-
|
|
5834
|
-
environmentId: z83.string().optional().describe("ID of the environment in the source space"),
|
|
5835
|
-
deliveryToken: z83.string().optional().describe("CDA token to export only published content (excludes tags)"),
|
|
5836
|
-
exportDir: z83.string().optional().describe("Path to export JSON output"),
|
|
5837
|
-
saveFile: z83.boolean().optional().describe("Save the export as a JSON file"),
|
|
5838
|
-
contentFile: z83.string().optional().describe("Filename for exported data"),
|
|
5839
|
-
includeDrafts: z83.boolean().optional().describe("Include drafts in exported entries"),
|
|
5840
|
-
includeArchived: z83.boolean().optional().describe("Include archived entries"),
|
|
5841
|
-
skipContentModel: z83.boolean().optional().describe("Skip exporting content models"),
|
|
5842
|
-
skipEditorInterfaces: z83.boolean().optional().describe("Skip exporting editor interfaces"),
|
|
5843
|
-
skipContent: z83.boolean().optional().describe("Skip exporting entries and assets"),
|
|
5844
|
-
skipRoles: z83.boolean().optional().describe("Skip exporting roles and permissions"),
|
|
5845
|
-
skipTags: z83.boolean().optional().describe("Skip exporting tags"),
|
|
5846
|
-
skipWebhooks: z83.boolean().optional().describe("Skip exporting webhooks"),
|
|
5847
|
-
stripTags: z83.boolean().optional().describe("Remove tags from entries and assets"),
|
|
5848
|
-
contentOnly: z83.boolean().optional().describe("Export only entries and assets"),
|
|
5849
|
-
queryEntries: EntryQuerySchema.optional().describe(
|
|
5850
|
-
"Export only entries that match query parameters"
|
|
5851
|
-
),
|
|
5852
|
-
queryAssets: AssetQuerySchema.optional().describe(
|
|
5853
|
-
"Export only assets that match query parameters"
|
|
5854
|
-
),
|
|
5855
|
-
downloadAssets: z83.boolean().optional().describe("Download asset files to disk"),
|
|
5856
|
-
host: z83.string().optional().describe("Management API host"),
|
|
5857
|
-
hostDelivery: z83.string().optional().describe("Delivery API host"),
|
|
5858
|
-
proxy: z83.string().optional().describe("HTTP/HTTPS proxy config"),
|
|
5859
|
-
rawProxy: z83.boolean().optional().describe("Pass raw proxy config directly to Axios"),
|
|
5860
|
-
maxAllowedLimit: z83.number().optional().describe("Page size for requests"),
|
|
5861
|
-
headers: z83.record(z83.any()).optional().describe("Additional headers to include in requests"),
|
|
5862
|
-
errorLogFile: z83.string().optional().describe("Path to error log output file"),
|
|
5863
|
-
useVerboseRenderer: z83.boolean().optional().describe("Line-by-line logging, useful for CI"),
|
|
5864
|
-
config: z83.string().optional().describe("Path to a JSON config file with all options")
|
|
5865
|
-
}).optional(),
|
|
5866
|
-
import: z83.object({
|
|
5867
|
-
spaceId: z83.string().optional().describe("ID of the space to import into"),
|
|
5868
|
-
environmentId: z83.string().optional().describe("Target environment in destination space"),
|
|
5869
|
-
contentFile: z83.string().optional().describe("Path to JSON file containing the content to import"),
|
|
5870
|
-
content: z83.record(z83.any()).optional().describe(
|
|
5871
|
-
"JS object containing import content (must match expected structure)"
|
|
5872
|
-
),
|
|
5873
|
-
contentModelOnly: z83.boolean().optional().describe("Import only content types"),
|
|
5874
|
-
skipContentModel: z83.boolean().optional().describe("Skip importing content types and locales"),
|
|
5875
|
-
skipLocales: z83.boolean().optional().describe("Skip importing locales"),
|
|
5876
|
-
skipContentUpdates: z83.boolean().optional().describe("Do not update existing content"),
|
|
5877
|
-
skipContentPublishing: z83.boolean().optional().describe("Create but do not publish content"),
|
|
5878
|
-
uploadAssets: z83.boolean().optional().describe("Upload asset files (requires assetsDirectory)"),
|
|
5879
|
-
skipAssetUpdates: z83.boolean().optional().describe("Do not update existing assets"),
|
|
5880
|
-
assetsDirectory: z83.string().optional().describe("Path to directory containing exported asset files"),
|
|
5881
|
-
timeout: z83.number().optional().describe("Time between retries during asset processing (ms)"),
|
|
5882
|
-
retryLimit: z83.number().optional().describe("Max retries for asset processing"),
|
|
5883
|
-
host: z83.string().optional().describe("Management API host"),
|
|
5884
|
-
proxy: z83.string().optional().describe("HTTP/HTTPS proxy string (host:port or user:pass@host:port)"),
|
|
5885
|
-
rawProxy: z83.boolean().optional().describe("Pass proxy config directly to Axios"),
|
|
5886
|
-
rateLimit: z83.number().optional().describe("Max requests per second to the API"),
|
|
5887
|
-
headers: z83.record(z83.any()).optional().describe("Additional headers to attach to requests"),
|
|
5888
|
-
errorLogFile: z83.string().optional().describe("Path to error log file"),
|
|
5889
|
-
useVerboseRenderer: z83.boolean().optional().describe("Line-by-line progress output (good for CI)"),
|
|
5890
|
-
config: z83.string().optional().describe("Path to config JSON file (merged with CLI args)")
|
|
5891
|
-
}).optional()
|
|
5866
|
+
export: ExportParamsSchema.partial().optional(),
|
|
5867
|
+
import: ImportParamsSchema.partial().optional()
|
|
5892
5868
|
});
|
|
5893
5869
|
var paramCollectionConfig = {
|
|
5894
5870
|
export: {
|
|
@@ -5897,8 +5873,6 @@ spaceId // [string] [required] - ID of the space with source dat
|
|
|
5897
5873
|
`,
|
|
5898
5874
|
optionalParams: `
|
|
5899
5875
|
environmentId // [string] [default: 'master'] - ID of the environment in the source space
|
|
5900
|
-
deliveryToken // [string] - CDA token to export only published content (excludes tags)
|
|
5901
|
-
|
|
5902
5876
|
exportDir // [string] [default: process.cwd()] - Path to export JSON output
|
|
5903
5877
|
saveFile // [boolean] [default: true] - Save the export as a JSON file
|
|
5904
5878
|
contentFile // [string] - Filename for exported data
|
|
@@ -5918,22 +5892,15 @@ queryEntries // [array] - Export only entries that match query parame
|
|
|
5918
5892
|
queryAssets // [array] - Export only assets that match query parameters
|
|
5919
5893
|
downloadAssets // [boolean] - Download asset files to disk
|
|
5920
5894
|
|
|
5921
|
-
host // [string] [default: 'api.contentful.com'] - Management API host
|
|
5922
|
-
hostDelivery // [string] [default: 'cdn.contentful.com'] - Delivery API host
|
|
5923
|
-
proxy // [string] - HTTP/HTTPS proxy config
|
|
5924
|
-
rawProxy // [boolean] - Pass raw proxy config directly to Axios
|
|
5925
5895
|
maxAllowedLimit // [number] [default: 1000] - Page size for requests
|
|
5926
|
-
headers // [object] - Additional headers to include in requests
|
|
5927
5896
|
|
|
5928
5897
|
errorLogFile // [string] - Path to error log output file
|
|
5929
5898
|
useVerboseRenderer // [boolean] [default: false] - Line-by-line logging, useful for CI
|
|
5930
|
-
config // [string] - Path to a JSON config file with all options
|
|
5931
5899
|
`
|
|
5932
5900
|
},
|
|
5933
5901
|
import: {
|
|
5934
5902
|
requiredParams: `
|
|
5935
5903
|
spaceId // [string] [required] - ID of the space to import into
|
|
5936
|
-
managementToken // [string] [required] - Contentful Management API token
|
|
5937
5904
|
`,
|
|
5938
5905
|
optionalParams: `
|
|
5939
5906
|
environmentId // [string] [default: 'master'] - Target environment in destination space
|
|
@@ -5952,25 +5919,16 @@ assetsDirectory // [string] - Path to directory containing exported asse
|
|
|
5952
5919
|
timeout // [number] [default: 3000] - Time between retries during asset processing (ms)
|
|
5953
5920
|
retryLimit // [number] [default: 10] - Max retries for asset processing
|
|
5954
5921
|
|
|
5955
|
-
host // [string] [default: 'api.contentful.com'] - Management API host
|
|
5956
|
-
proxy // [string] - HTTP/HTTPS proxy string (host:port or user:pass@host:port)
|
|
5957
|
-
rawProxy // [boolean] - Pass proxy config directly to Axios
|
|
5958
5922
|
rateLimit // [number] [default: 7] - Max requests per second to the API
|
|
5959
|
-
headers // [object] - Additional headers to attach to requests
|
|
5960
5923
|
|
|
5961
5924
|
errorLogFile // [string] - Path to error log file
|
|
5962
5925
|
useVerboseRenderer // [boolean] [default: false] - Line-by-line progress output (good for CI)
|
|
5963
|
-
config // [string] - Path to config JSON file (merged with CLI args)
|
|
5964
5926
|
`
|
|
5965
5927
|
}
|
|
5966
5928
|
};
|
|
5967
5929
|
async function tool(args) {
|
|
5968
|
-
const exportParams = args.export ?
|
|
5969
|
-
|
|
5970
|
-
) : {};
|
|
5971
|
-
const importParams = args.import ? Object.fromEntries(
|
|
5972
|
-
Object.entries(args.import).filter(([, value]) => value !== void 0)
|
|
5973
|
-
) : {};
|
|
5930
|
+
const exportParams = args.export ? ExportParamsSchema.partial().parse(args.export) : {};
|
|
5931
|
+
const importParams = args.import ? ImportParamsSchema.partial().parse(args.import) : {};
|
|
5974
5932
|
const params = {
|
|
5975
5933
|
export: Object.keys(exportParams).length > 0 ? exportParams : void 0,
|
|
5976
5934
|
import: Object.keys(importParams).length > 0 ? importParams : void 0
|
|
@@ -6003,26 +5961,6 @@ var createParamCollectionTool = withErrorHandling(
|
|
|
6003
5961
|
);
|
|
6004
5962
|
|
|
6005
5963
|
// src/tools/jobs/space-to-space-migration/importSpace.ts
|
|
6006
|
-
import { z as z84 } from "zod";
|
|
6007
|
-
var ImportSpaceToolParams = BaseToolSchema.extend({
|
|
6008
|
-
contentFile: z84.string().optional().describe("Path to JSON file containing the content to import"),
|
|
6009
|
-
content: z84.record(z84.any()).optional().describe(
|
|
6010
|
-
"JS object containing import content (must match expected structure)"
|
|
6011
|
-
),
|
|
6012
|
-
contentModelOnly: z84.boolean().optional().default(false).describe("Import only content types"),
|
|
6013
|
-
skipContentModel: z84.boolean().optional().default(false).describe("Skip importing content types and locales"),
|
|
6014
|
-
skipLocales: z84.boolean().optional().default(false).describe("Skip importing locales"),
|
|
6015
|
-
skipContentUpdates: z84.boolean().optional().default(false).describe("Do not update existing content"),
|
|
6016
|
-
skipContentPublishing: z84.boolean().optional().default(false).describe("Create but do not publish content"),
|
|
6017
|
-
uploadAssets: z84.boolean().optional().default(false).describe("Upload asset files (requires assetsDirectory)"),
|
|
6018
|
-
skipAssetUpdates: z84.boolean().optional().default(false).describe("Do not update existing assets"),
|
|
6019
|
-
assetsDirectory: z84.string().optional().describe("Path to directory containing exported asset files"),
|
|
6020
|
-
timeout: z84.number().optional().default(3e3).describe("Time between retries during asset processing (ms)"),
|
|
6021
|
-
retryLimit: z84.number().optional().default(10).describe("Max retries for asset processing"),
|
|
6022
|
-
rateLimit: z84.number().optional().default(7).describe("Max requests per second to the API"),
|
|
6023
|
-
errorLogFile: z84.string().optional().describe("Path to error log file"),
|
|
6024
|
-
useVerboseRenderer: z84.boolean().optional().describe("Line-by-line progress output (good for CI)")
|
|
6025
|
-
});
|
|
6026
5964
|
function createImportSpaceTool(config) {
|
|
6027
5965
|
async function tool2(args) {
|
|
6028
5966
|
const targetEnvironmentId = args.environmentId || "master";
|
|
@@ -6035,11 +5973,14 @@ function createImportSpaceTool(config) {
|
|
|
6035
5973
|
if (!managementToken) {
|
|
6036
5974
|
throw new Error("Contentful management token is not configured");
|
|
6037
5975
|
}
|
|
6038
|
-
const
|
|
5976
|
+
const safeOptions = ImportParamsSchema.parse({
|
|
6039
5977
|
...args,
|
|
6040
|
-
managementToken,
|
|
6041
|
-
host: config.host ?? "api.contentful.com",
|
|
6042
5978
|
environmentId: targetEnvironmentId
|
|
5979
|
+
});
|
|
5980
|
+
const importOptions = {
|
|
5981
|
+
...safeOptions,
|
|
5982
|
+
managementToken,
|
|
5983
|
+
host: config.host ?? "api.contentful.com"
|
|
6043
5984
|
};
|
|
6044
5985
|
try {
|
|
6045
5986
|
const contentfulImport = await import("contentful-import");
|
|
@@ -6064,7 +6005,7 @@ function createImportSpaceTool(config) {
|
|
|
6064
6005
|
}
|
|
6065
6006
|
|
|
6066
6007
|
// src/tools/jobs/space-to-space-migration/migrationHandler.ts
|
|
6067
|
-
import { z as
|
|
6008
|
+
import { z as z84 } from "zod";
|
|
6068
6009
|
|
|
6069
6010
|
// src/tools/jobs/space-to-space-migration/instructions.ts
|
|
6070
6011
|
var S2S_MIGRATION_INSTRUCTIONS = `
|
|
@@ -6107,7 +6048,7 @@ The space to space migration workflow has been concluded and all related tools h
|
|
|
6107
6048
|
The workflow is now complete. You can start a new migration workflow by calling space_to_space_migration_handler with enableWorkflow=true if needed.
|
|
6108
6049
|
`;
|
|
6109
6050
|
var SpaceToSpaceMigrationHandlerToolParams = BaseToolSchema.extend({
|
|
6110
|
-
enableWorkflow:
|
|
6051
|
+
enableWorkflow: z84.boolean().describe(
|
|
6111
6052
|
"Set to true to enable the workflow tools, false to disable them and conclude the workflow"
|
|
6112
6053
|
)
|
|
6113
6054
|
});
|
|
@@ -6169,7 +6110,7 @@ function createJobTools(config) {
|
|
|
6169
6110
|
exportSpace: {
|
|
6170
6111
|
title: "export_space",
|
|
6171
6112
|
description: "Export a space to a file",
|
|
6172
|
-
inputParams:
|
|
6113
|
+
inputParams: ExportParamsSchema.shape,
|
|
6173
6114
|
annotations: {
|
|
6174
6115
|
readOnlyHint: true,
|
|
6175
6116
|
destructiveHint: false,
|
|
@@ -6180,7 +6121,7 @@ function createJobTools(config) {
|
|
|
6180
6121
|
importSpace: {
|
|
6181
6122
|
title: "import_space",
|
|
6182
6123
|
description: "Import a space from a file. Step 4 of the space to space migration workflow.",
|
|
6183
|
-
inputParams:
|
|
6124
|
+
inputParams: ImportParamsSchema.shape,
|
|
6184
6125
|
annotations: {
|
|
6185
6126
|
readOnlyHint: false,
|
|
6186
6127
|
destructiveHint: false,
|
|
@@ -6205,9 +6146,9 @@ function createJobTools(config) {
|
|
|
6205
6146
|
}
|
|
6206
6147
|
|
|
6207
6148
|
// src/tools/exo/components/getComponent.ts
|
|
6208
|
-
import { z as
|
|
6149
|
+
import { z as z85 } from "zod";
|
|
6209
6150
|
var GetComponentToolParams = BaseToolSchema.extend({
|
|
6210
|
-
componentId:
|
|
6151
|
+
componentId: z85.string().describe("The ID of the component to retrieve details for")
|
|
6211
6152
|
});
|
|
6212
6153
|
function getComponentTool(config) {
|
|
6213
6154
|
async function tool2(args) {
|
|
@@ -6225,12 +6166,12 @@ function getComponentTool(config) {
|
|
|
6225
6166
|
}
|
|
6226
6167
|
|
|
6227
6168
|
// src/tools/exo/components/listComponents.ts
|
|
6228
|
-
import { z as
|
|
6169
|
+
import { z as z86 } from "zod";
|
|
6229
6170
|
var ListComponentsToolParams = BaseToolSchema.extend({
|
|
6230
|
-
limit:
|
|
6231
|
-
pageNext:
|
|
6232
|
-
pagePrev:
|
|
6233
|
-
order:
|
|
6171
|
+
limit: z86.number().optional().describe("Maximum number of components to return (max 10)"),
|
|
6172
|
+
pageNext: z86.string().optional().describe("Cursor token to fetch the next page of results"),
|
|
6173
|
+
pagePrev: z86.string().optional().describe("Cursor token to fetch the previous page of results"),
|
|
6174
|
+
order: z86.string().optional().describe("Order components by this field (e.g. sys.createdAt)")
|
|
6234
6175
|
});
|
|
6235
6176
|
function listComponentsTool(config) {
|
|
6236
6177
|
async function tool2(args) {
|
|
@@ -6260,10 +6201,10 @@ function listComponentsTool(config) {
|
|
|
6260
6201
|
}
|
|
6261
6202
|
|
|
6262
6203
|
// src/tools/exo/components/createComponent.ts
|
|
6263
|
-
import { z as
|
|
6204
|
+
import { z as z88 } from "zod";
|
|
6264
6205
|
|
|
6265
6206
|
// src/types/exoSchemas.ts
|
|
6266
|
-
import { z as
|
|
6207
|
+
import { z as z87 } from "zod";
|
|
6267
6208
|
var URN_EXAMPLES = {
|
|
6268
6209
|
"Contentful:Component": "crn:contentful:::experience:spaces/{spaceId}/environments/{envId}/components/{id}",
|
|
6269
6210
|
"Contentful:ExperienceFragment": "crn:contentful:::experience:spaces/{spaceId}/environments/{envId}/experienceFragments/{id}",
|
|
@@ -6273,19 +6214,19 @@ var URN_EXAMPLES = {
|
|
|
6273
6214
|
var resourceLinkSchema2 = (linkType) => {
|
|
6274
6215
|
const example = URN_EXAMPLES[linkType];
|
|
6275
6216
|
const urnDesc = example ? `URN of the linked resource (e.g. "${example}")` : "URN of the linked resource";
|
|
6276
|
-
return
|
|
6277
|
-
sys:
|
|
6278
|
-
type:
|
|
6279
|
-
linkType:
|
|
6280
|
-
urn:
|
|
6217
|
+
return z87.object({
|
|
6218
|
+
sys: z87.object({
|
|
6219
|
+
type: z87.literal("ResourceLink"),
|
|
6220
|
+
linkType: z87.literal(linkType),
|
|
6221
|
+
urn: z87.string().describe(urnDesc)
|
|
6281
6222
|
})
|
|
6282
6223
|
});
|
|
6283
6224
|
};
|
|
6284
|
-
var linkSchema2 = (linkType) =>
|
|
6285
|
-
sys:
|
|
6286
|
-
type:
|
|
6287
|
-
linkType:
|
|
6288
|
-
id:
|
|
6225
|
+
var linkSchema2 = (linkType) => z87.object({
|
|
6226
|
+
sys: z87.object({
|
|
6227
|
+
type: z87.literal("Link"),
|
|
6228
|
+
linkType: z87.literal(linkType),
|
|
6229
|
+
id: z87.string()
|
|
6289
6230
|
})
|
|
6290
6231
|
});
|
|
6291
6232
|
var ComponentResourceLinkSchema = resourceLinkSchema2(
|
|
@@ -6297,71 +6238,71 @@ var ExperienceFragmentResourceLinkSchema = resourceLinkSchema2(
|
|
|
6297
6238
|
var ExperienceTemplateResourceLinkSchema = resourceLinkSchema2(
|
|
6298
6239
|
"Contentful:ExperienceTemplate"
|
|
6299
6240
|
);
|
|
6300
|
-
var ViewportSchema =
|
|
6301
|
-
id:
|
|
6302
|
-
query:
|
|
6303
|
-
displayName:
|
|
6304
|
-
previewSize:
|
|
6305
|
-
});
|
|
6306
|
-
var DataTypeDefinitionSchema =
|
|
6307
|
-
() =>
|
|
6308
|
-
|
|
6309
|
-
type:
|
|
6310
|
-
name:
|
|
6311
|
-
required:
|
|
6241
|
+
var ViewportSchema = z87.object({
|
|
6242
|
+
id: z87.string().describe("Viewport identifier"),
|
|
6243
|
+
query: z87.string().describe("CSS media query string"),
|
|
6244
|
+
displayName: z87.string().describe("Human-readable viewport name"),
|
|
6245
|
+
previewSize: z87.string().describe('Preview size (e.g. "1024px")')
|
|
6246
|
+
});
|
|
6247
|
+
var DataTypeDefinitionSchema = z87.lazy(
|
|
6248
|
+
() => z87.discriminatedUnion("type", [
|
|
6249
|
+
z87.object({
|
|
6250
|
+
type: z87.enum(["String", "Number", "Integer", "Boolean"]),
|
|
6251
|
+
name: z87.string().optional(),
|
|
6252
|
+
required: z87.boolean().optional()
|
|
6312
6253
|
}),
|
|
6313
|
-
|
|
6314
|
-
type:
|
|
6315
|
-
name:
|
|
6316
|
-
required:
|
|
6254
|
+
z87.object({
|
|
6255
|
+
type: z87.literal("RichText"),
|
|
6256
|
+
name: z87.string().optional(),
|
|
6257
|
+
required: z87.boolean().optional()
|
|
6317
6258
|
}),
|
|
6318
|
-
|
|
6319
|
-
type:
|
|
6320
|
-
name:
|
|
6321
|
-
required:
|
|
6259
|
+
z87.object({
|
|
6260
|
+
type: z87.literal("Array"),
|
|
6261
|
+
name: z87.string().optional(),
|
|
6262
|
+
required: z87.boolean().optional(),
|
|
6322
6263
|
items: DataTypeDefinitionSchema
|
|
6323
6264
|
}),
|
|
6324
|
-
|
|
6325
|
-
type:
|
|
6326
|
-
name:
|
|
6327
|
-
required:
|
|
6328
|
-
fields:
|
|
6265
|
+
z87.object({
|
|
6266
|
+
type: z87.literal("Record"),
|
|
6267
|
+
name: z87.string().optional(),
|
|
6268
|
+
required: z87.boolean().optional(),
|
|
6269
|
+
fields: z87.record(z87.string(), DataTypeDefinitionSchema)
|
|
6329
6270
|
}),
|
|
6330
|
-
|
|
6331
|
-
type:
|
|
6332
|
-
name:
|
|
6333
|
-
required:
|
|
6334
|
-
ref:
|
|
6335
|
-
sys:
|
|
6336
|
-
type:
|
|
6337
|
-
linkType:
|
|
6338
|
-
urn:
|
|
6271
|
+
z87.object({
|
|
6272
|
+
type: z87.literal("TypeRef"),
|
|
6273
|
+
name: z87.string().optional(),
|
|
6274
|
+
required: z87.boolean().optional(),
|
|
6275
|
+
ref: z87.object({
|
|
6276
|
+
sys: z87.object({
|
|
6277
|
+
type: z87.literal("ResourceLink"),
|
|
6278
|
+
linkType: z87.string(),
|
|
6279
|
+
urn: z87.string()
|
|
6339
6280
|
})
|
|
6340
6281
|
})
|
|
6341
6282
|
}),
|
|
6342
|
-
|
|
6343
|
-
type:
|
|
6344
|
-
name:
|
|
6345
|
-
required:
|
|
6346
|
-
value:
|
|
6283
|
+
z87.object({
|
|
6284
|
+
type: z87.literal("Literal"),
|
|
6285
|
+
name: z87.string().optional(),
|
|
6286
|
+
required: z87.boolean().optional(),
|
|
6287
|
+
value: z87.custom().describe("JSON literal value"),
|
|
6347
6288
|
valueType: DataTypeDefinitionSchema
|
|
6348
6289
|
}),
|
|
6349
|
-
|
|
6350
|
-
type:
|
|
6351
|
-
name:
|
|
6352
|
-
required:
|
|
6353
|
-
discriminator:
|
|
6354
|
-
members:
|
|
6290
|
+
z87.object({
|
|
6291
|
+
type: z87.literal("DiscriminatedUnion"),
|
|
6292
|
+
name: z87.string().optional(),
|
|
6293
|
+
required: z87.boolean().optional(),
|
|
6294
|
+
discriminator: z87.string(),
|
|
6295
|
+
members: z87.array(DataTypeDefinitionSchema)
|
|
6355
6296
|
})
|
|
6356
6297
|
])
|
|
6357
6298
|
);
|
|
6358
|
-
var ContentPropertySchema =
|
|
6299
|
+
var ContentPropertySchema = z87.intersection(
|
|
6359
6300
|
DataTypeDefinitionSchema,
|
|
6360
|
-
|
|
6361
|
-
id:
|
|
6362
|
-
name:
|
|
6363
|
-
required:
|
|
6364
|
-
defaultValue:
|
|
6301
|
+
z87.object({
|
|
6302
|
+
id: z87.string().describe("Content property identifier"),
|
|
6303
|
+
name: z87.string().describe("Human-readable name"),
|
|
6304
|
+
required: z87.boolean().describe("Whether the property is required"),
|
|
6305
|
+
defaultValue: z87.unknown().optional().describe("Default value")
|
|
6365
6306
|
})
|
|
6366
6307
|
);
|
|
6367
6308
|
var DTCG_DESIGN_PROPERTY_TYPES = [
|
|
@@ -6379,189 +6320,189 @@ var DTCG_DESIGN_PROPERTY_TYPES = [
|
|
|
6379
6320
|
"DTCG.Gradient",
|
|
6380
6321
|
"DTCG.Typography"
|
|
6381
6322
|
];
|
|
6382
|
-
var DesignPropertyCommonFieldsSchema =
|
|
6383
|
-
id:
|
|
6384
|
-
name:
|
|
6385
|
-
description:
|
|
6323
|
+
var DesignPropertyCommonFieldsSchema = z87.object({
|
|
6324
|
+
id: z87.string().describe("Design property identifier"),
|
|
6325
|
+
name: z87.string().describe("Human-readable name"),
|
|
6326
|
+
description: z87.string().optional().describe("Optional description")
|
|
6386
6327
|
});
|
|
6387
6328
|
var StringDesignPropertySchema = DesignPropertyCommonFieldsSchema.extend({
|
|
6388
|
-
type:
|
|
6389
|
-
fallbackValue:
|
|
6390
|
-
type:
|
|
6391
|
-
value:
|
|
6329
|
+
type: z87.literal("String"),
|
|
6330
|
+
fallbackValue: z87.object({
|
|
6331
|
+
type: z87.literal("ManualDesignValue"),
|
|
6332
|
+
value: z87.string()
|
|
6392
6333
|
}).optional().describe("Manual fallback value for this design property"),
|
|
6393
|
-
validations:
|
|
6394
|
-
|
|
6395
|
-
regexp:
|
|
6396
|
-
pattern:
|
|
6334
|
+
validations: z87.array(
|
|
6335
|
+
z87.object({
|
|
6336
|
+
regexp: z87.object({
|
|
6337
|
+
pattern: z87.string().describe("Regular expression pattern")
|
|
6397
6338
|
})
|
|
6398
6339
|
})
|
|
6399
6340
|
).optional().describe("Regexp validations constraining allowed string values")
|
|
6400
6341
|
});
|
|
6401
6342
|
var BooleanDesignPropertySchema = DesignPropertyCommonFieldsSchema.extend({
|
|
6402
|
-
type:
|
|
6403
|
-
fallbackValue:
|
|
6404
|
-
type:
|
|
6405
|
-
value:
|
|
6343
|
+
type: z87.literal("Boolean"),
|
|
6344
|
+
fallbackValue: z87.object({
|
|
6345
|
+
type: z87.literal("ManualDesignValue"),
|
|
6346
|
+
value: z87.boolean()
|
|
6406
6347
|
}).optional().describe("Manual fallback value for this design property")
|
|
6407
6348
|
});
|
|
6408
|
-
var DesignTokenValueSchema =
|
|
6409
|
-
type:
|
|
6410
|
-
value:
|
|
6349
|
+
var DesignTokenValueSchema = z87.object({
|
|
6350
|
+
type: z87.literal("DesignToken"),
|
|
6351
|
+
value: z87.string().min(1).describe("Design token reference (non-empty)")
|
|
6411
6352
|
});
|
|
6412
6353
|
var TokenBackedDesignPropertySchema = DesignPropertyCommonFieldsSchema.extend(
|
|
6413
6354
|
{
|
|
6414
|
-
type:
|
|
6355
|
+
type: z87.enum(DTCG_DESIGN_PROPERTY_TYPES),
|
|
6415
6356
|
fallbackValue: DesignTokenValueSchema.optional().describe(
|
|
6416
6357
|
"Design-token-backed fallback value for this design property"
|
|
6417
6358
|
),
|
|
6418
|
-
allowedResources:
|
|
6419
|
-
|
|
6420
|
-
type:
|
|
6421
|
-
value:
|
|
6422
|
-
name:
|
|
6359
|
+
allowedResources: z87.array(
|
|
6360
|
+
z87.object({
|
|
6361
|
+
type: z87.literal("DesignToken"),
|
|
6362
|
+
value: z87.string(),
|
|
6363
|
+
name: z87.string().optional()
|
|
6423
6364
|
})
|
|
6424
6365
|
).optional().describe("Allowed design token resources")
|
|
6425
6366
|
}
|
|
6426
6367
|
);
|
|
6427
|
-
var DesignPropertySchema =
|
|
6368
|
+
var DesignPropertySchema = z87.union([
|
|
6428
6369
|
StringDesignPropertySchema,
|
|
6429
6370
|
BooleanDesignPropertySchema,
|
|
6430
6371
|
TokenBackedDesignPropertySchema
|
|
6431
6372
|
]);
|
|
6432
|
-
var ManualDesignValueSchema =
|
|
6433
|
-
type:
|
|
6434
|
-
value:
|
|
6373
|
+
var ManualDesignValueSchema = z87.object({
|
|
6374
|
+
type: z87.literal("ManualDesignValue"),
|
|
6375
|
+
value: z87.union([z87.string(), z87.number(), z87.boolean()])
|
|
6435
6376
|
});
|
|
6436
|
-
var DesignPropertyValueSchema =
|
|
6377
|
+
var DesignPropertyValueSchema = z87.union([
|
|
6437
6378
|
ManualDesignValueSchema,
|
|
6438
6379
|
DesignTokenValueSchema
|
|
6439
6380
|
]);
|
|
6440
|
-
var DesignPropertyPointerValueSchema =
|
|
6381
|
+
var DesignPropertyPointerValueSchema = z87.custom(
|
|
6441
6382
|
(val) => typeof val === "string" && /^\$designProperties\//.test(val),
|
|
6442
6383
|
{ message: 'Must be a "$designProperties/..." pointer' }
|
|
6443
6384
|
);
|
|
6444
|
-
var DimensionedDesignPropertyValueSchema =
|
|
6445
|
-
|
|
6385
|
+
var DimensionedDesignPropertyValueSchema = z87.record(
|
|
6386
|
+
z87.string(),
|
|
6446
6387
|
DesignPropertyValueSchema
|
|
6447
6388
|
);
|
|
6448
|
-
var ComponentTreeDesignPropertyValueSchema =
|
|
6389
|
+
var ComponentTreeDesignPropertyValueSchema = z87.union([
|
|
6449
6390
|
DesignPropertyValueSchema,
|
|
6450
6391
|
DesignPropertyPointerValueSchema,
|
|
6451
6392
|
DimensionedDesignPropertyValueSchema
|
|
6452
6393
|
]);
|
|
6453
6394
|
var COMPONENT_TYPE_ALLOWED_RESOURCE_SOURCE = "crn:contentful:::experience:spaces/$self/environments/$self";
|
|
6454
|
-
var SlotDefinitionSchema =
|
|
6455
|
-
id:
|
|
6456
|
-
name:
|
|
6457
|
-
required:
|
|
6458
|
-
validations:
|
|
6459
|
-
|
|
6460
|
-
size:
|
|
6461
|
-
min:
|
|
6462
|
-
max:
|
|
6395
|
+
var SlotDefinitionSchema = z87.object({
|
|
6396
|
+
id: z87.string().describe("Slot identifier"),
|
|
6397
|
+
name: z87.string().describe("Human-readable name"),
|
|
6398
|
+
required: z87.boolean().describe("Whether the slot must be filled"),
|
|
6399
|
+
validations: z87.array(
|
|
6400
|
+
z87.object({
|
|
6401
|
+
size: z87.object({
|
|
6402
|
+
min: z87.number().optional(),
|
|
6403
|
+
max: z87.number().optional()
|
|
6463
6404
|
}).optional()
|
|
6464
6405
|
})
|
|
6465
6406
|
).describe("Slot cardinality validations"),
|
|
6466
|
-
allowedResources:
|
|
6467
|
-
|
|
6468
|
-
type:
|
|
6469
|
-
source:
|
|
6470
|
-
allowedTypes:
|
|
6407
|
+
allowedResources: z87.array(
|
|
6408
|
+
z87.object({
|
|
6409
|
+
type: z87.literal("Contentful:Component"),
|
|
6410
|
+
source: z87.literal(COMPONENT_TYPE_ALLOWED_RESOURCE_SOURCE),
|
|
6411
|
+
allowedTypes: z87.array(z87.string()).describe("IDs of components allowed in this slot")
|
|
6471
6412
|
})
|
|
6472
6413
|
).optional().describe("Constrains which components may be placed in this slot")
|
|
6473
6414
|
});
|
|
6474
|
-
var ExperienceFragmentNodeSchema =
|
|
6475
|
-
id:
|
|
6476
|
-
name:
|
|
6477
|
-
nodeType:
|
|
6415
|
+
var ExperienceFragmentNodeSchema = z87.object({
|
|
6416
|
+
id: z87.string().describe("Node identifier"),
|
|
6417
|
+
name: z87.string().optional().describe("Optional display name"),
|
|
6418
|
+
nodeType: z87.literal("ExperienceFragment").describe('Must be "ExperienceFragment"'),
|
|
6478
6419
|
experienceFragment: ExperienceFragmentResourceLinkSchema.describe(
|
|
6479
6420
|
"Resource link to the referenced experience fragment"
|
|
6480
6421
|
)
|
|
6481
6422
|
});
|
|
6482
|
-
var SlotNodeSchema =
|
|
6483
|
-
id:
|
|
6484
|
-
nodeType:
|
|
6485
|
-
slotId:
|
|
6423
|
+
var SlotNodeSchema = z87.object({
|
|
6424
|
+
id: z87.string().describe("Node identifier"),
|
|
6425
|
+
nodeType: z87.literal("Slot").describe('Must be "Slot"'),
|
|
6426
|
+
slotId: z87.string().describe("ID of the slot definition to render")
|
|
6486
6427
|
});
|
|
6487
|
-
var TreeNodeSchema =
|
|
6488
|
-
() =>
|
|
6428
|
+
var TreeNodeSchema = z87.lazy(
|
|
6429
|
+
() => z87.union([ComponentNodeSchema, ExperienceFragmentNodeSchema, SlotNodeSchema])
|
|
6489
6430
|
);
|
|
6490
|
-
var ComponentNodeSchema =
|
|
6491
|
-
() =>
|
|
6492
|
-
id:
|
|
6493
|
-
name:
|
|
6494
|
-
nodeType:
|
|
6431
|
+
var ComponentNodeSchema = z87.lazy(
|
|
6432
|
+
() => z87.object({
|
|
6433
|
+
id: z87.string().describe("Node identifier"),
|
|
6434
|
+
name: z87.string().optional().describe("Optional display name"),
|
|
6435
|
+
nodeType: z87.literal("Component").describe('Must be "Component"'),
|
|
6495
6436
|
component: ComponentResourceLinkSchema.describe(
|
|
6496
6437
|
"Resource link to the component to render"
|
|
6497
6438
|
),
|
|
6498
|
-
contentProperties:
|
|
6499
|
-
|
|
6500
|
-
|
|
6439
|
+
contentProperties: z87.union([
|
|
6440
|
+
z87.record(z87.string(), z87.unknown()),
|
|
6441
|
+
z87.string().describe('"$contentProperties/..." pointer')
|
|
6501
6442
|
]).describe(
|
|
6502
6443
|
'Content property bindings \u2014 values or "$contentProperties/..." pointers'
|
|
6503
6444
|
),
|
|
6504
|
-
designProperties:
|
|
6445
|
+
designProperties: z87.record(z87.string(), ComponentTreeDesignPropertyValueSchema).describe(
|
|
6505
6446
|
'Design property values \u2014 ManualDesignValue, DesignTokenValue, or "$designProperties/..." pointers'
|
|
6506
6447
|
),
|
|
6507
|
-
slots:
|
|
6448
|
+
slots: z87.record(z87.string(), z87.array(TreeNodeSchema)).describe("Child tree nodes keyed by slot ID")
|
|
6508
6449
|
})
|
|
6509
6450
|
);
|
|
6510
6451
|
var TagLinkSchema = linkSchema2("Tag");
|
|
6511
6452
|
var ConceptLinkSchema = linkSchema2("TaxonomyConcept");
|
|
6512
|
-
var ExoMetadataSchema =
|
|
6513
|
-
tags:
|
|
6514
|
-
concepts:
|
|
6453
|
+
var ExoMetadataSchema = z87.object({
|
|
6454
|
+
tags: z87.array(TagLinkSchema).optional().describe("Tags attached to this entity"),
|
|
6455
|
+
concepts: z87.array(ConceptLinkSchema).optional().describe("Taxonomy concepts attached to this entity")
|
|
6515
6456
|
});
|
|
6516
6457
|
var ExperienceMetadataSchema = ExoMetadataSchema.extend({
|
|
6517
|
-
name:
|
|
6458
|
+
name: z87.string().optional().describe("Variant label for this metadata entry")
|
|
6518
6459
|
});
|
|
6519
6460
|
var DataAssemblyResourceLinkSchema = resourceLinkSchema2(
|
|
6520
6461
|
"Contentful:DataAssembly"
|
|
6521
6462
|
);
|
|
6522
|
-
var ExperienceContentBindingsSchema =
|
|
6463
|
+
var ExperienceContentBindingsSchema = z87.object({
|
|
6523
6464
|
sys: DataAssemblyResourceLinkSchema.shape.sys,
|
|
6524
|
-
parameters:
|
|
6525
|
-
|
|
6526
|
-
|
|
6527
|
-
sys:
|
|
6528
|
-
type:
|
|
6529
|
-
linkType:
|
|
6530
|
-
urn:
|
|
6465
|
+
parameters: z87.record(
|
|
6466
|
+
z87.string(),
|
|
6467
|
+
z87.object({
|
|
6468
|
+
sys: z87.object({
|
|
6469
|
+
type: z87.literal("ResourceLink"),
|
|
6470
|
+
linkType: z87.string(),
|
|
6471
|
+
urn: z87.string()
|
|
6531
6472
|
})
|
|
6532
6473
|
})
|
|
6533
6474
|
).describe("Parameter bindings keyed by parameter ID")
|
|
6534
6475
|
});
|
|
6535
|
-
var InlineExperienceFragmentNodeSchema =
|
|
6536
|
-
() =>
|
|
6537
|
-
id:
|
|
6538
|
-
nodeType:
|
|
6476
|
+
var InlineExperienceFragmentNodeSchema = z87.lazy(
|
|
6477
|
+
() => z87.object({
|
|
6478
|
+
id: z87.string().describe("Node identifier"),
|
|
6479
|
+
nodeType: z87.literal("InlineExperienceFragment").describe('Must be "InlineExperienceFragment"'),
|
|
6539
6480
|
component: ComponentResourceLinkSchema.describe(
|
|
6540
6481
|
"Resource link to the component this inline experience fragment renders"
|
|
6541
6482
|
),
|
|
6542
|
-
designProperties:
|
|
6483
|
+
designProperties: z87.record(z87.string(), DimensionedDesignPropertyValueSchema).describe("Design property values for this inline experience fragment"),
|
|
6543
6484
|
contentBindings: ExperienceContentBindingsSchema.optional().describe(
|
|
6544
6485
|
"Optional content bindings linking this inline experience fragment to a data assembly"
|
|
6545
6486
|
),
|
|
6546
|
-
slots:
|
|
6487
|
+
slots: z87.record(z87.string(), z87.array(ExperienceSlotNodeSchema)).optional().describe("Child slot contents keyed by slot ID")
|
|
6547
6488
|
})
|
|
6548
6489
|
);
|
|
6549
|
-
var ExperienceSlotNodeSchema =
|
|
6550
|
-
() =>
|
|
6490
|
+
var ExperienceSlotNodeSchema = z87.lazy(
|
|
6491
|
+
() => z87.union([ExperienceFragmentNodeSchema, InlineExperienceFragmentNodeSchema])
|
|
6551
6492
|
);
|
|
6552
6493
|
|
|
6553
6494
|
// src/tools/exo/components/createComponent.ts
|
|
6554
6495
|
var CreateComponentToolParams = BaseToolSchema.extend({
|
|
6555
|
-
componentId:
|
|
6496
|
+
componentId: z88.string().optional().describe(
|
|
6556
6497
|
"Optional ID for the component. If provided, will use upsert (create via PUT) with this ID"
|
|
6557
6498
|
),
|
|
6558
|
-
name:
|
|
6559
|
-
description:
|
|
6560
|
-
viewports:
|
|
6561
|
-
contentProperties:
|
|
6562
|
-
designProperties:
|
|
6563
|
-
componentTree:
|
|
6564
|
-
slots:
|
|
6499
|
+
name: z88.string().describe("The name of the component"),
|
|
6500
|
+
description: z88.string().describe("Description of the component"),
|
|
6501
|
+
viewports: z88.array(ViewportSchema).describe("Viewport definitions for the component (may be empty)"),
|
|
6502
|
+
contentProperties: z88.array(ContentPropertySchema).describe("Content property definitions (may be empty)"),
|
|
6503
|
+
designProperties: z88.array(DesignPropertySchema).describe("Design property definitions (may be empty)"),
|
|
6504
|
+
componentTree: z88.array(TreeNodeSchema).optional().describe("Optional component tree node definitions"),
|
|
6505
|
+
slots: z88.array(SlotDefinitionSchema).optional().describe("Optional slot definitions"),
|
|
6565
6506
|
metadata: ExoMetadataSchema.optional().describe(
|
|
6566
6507
|
"Optional ExO metadata (tags, concepts)"
|
|
6567
6508
|
)
|
|
@@ -6605,19 +6546,19 @@ function createComponentTool(config) {
|
|
|
6605
6546
|
}
|
|
6606
6547
|
|
|
6607
6548
|
// src/tools/exo/components/upsertComponent.ts
|
|
6608
|
-
import { z as
|
|
6549
|
+
import { z as z89 } from "zod";
|
|
6609
6550
|
var UpsertComponentToolParams = BaseToolSchema.extend({
|
|
6610
|
-
componentId:
|
|
6611
|
-
version:
|
|
6551
|
+
componentId: z89.string().describe("The ID of the component to update"),
|
|
6552
|
+
version: z89.number().describe(
|
|
6612
6553
|
"REQUIRED. The component's sys.version as returned by get_component. You must call get_component first to read the current state and version. The update is rejected if this does not match the current version, which means the component changed since you read it."
|
|
6613
6554
|
),
|
|
6614
|
-
name:
|
|
6615
|
-
description:
|
|
6616
|
-
viewports:
|
|
6617
|
-
contentProperties:
|
|
6618
|
-
designProperties:
|
|
6619
|
-
componentTree:
|
|
6620
|
-
slots:
|
|
6555
|
+
name: z89.string().optional().describe("The name of the component"),
|
|
6556
|
+
description: z89.string().optional().describe("Description of the component"),
|
|
6557
|
+
viewports: z89.array(ViewportSchema).optional().describe("Viewport definitions; replaces existing viewports if provided"),
|
|
6558
|
+
contentProperties: z89.array(ContentPropertySchema).optional().describe("Content property definitions; replaces existing if provided"),
|
|
6559
|
+
designProperties: z89.array(DesignPropertySchema).optional().describe("Design property definitions; replaces existing if provided"),
|
|
6560
|
+
componentTree: z89.array(TreeNodeSchema).optional().describe("Component tree node definitions; replaces existing if provided"),
|
|
6561
|
+
slots: z89.array(SlotDefinitionSchema).optional().describe("Slot definitions; replaces existing if provided"),
|
|
6621
6562
|
metadata: ExoMetadataSchema.optional().describe(
|
|
6622
6563
|
"ExO metadata (tags, concepts); replaces existing if provided"
|
|
6623
6564
|
)
|
|
@@ -6664,13 +6605,13 @@ function upsertComponentTool(config) {
|
|
|
6664
6605
|
}
|
|
6665
6606
|
|
|
6666
6607
|
// src/tools/exo/components/deleteComponent.ts
|
|
6667
|
-
import { z as
|
|
6608
|
+
import { z as z90 } from "zod";
|
|
6668
6609
|
var DeleteComponentToolParams = BaseToolSchema.extend({
|
|
6669
|
-
componentId:
|
|
6670
|
-
confirm:
|
|
6610
|
+
componentId: z90.string().describe("The ID of the component to delete"),
|
|
6611
|
+
confirm: z90.boolean().optional().describe(
|
|
6671
6612
|
"Set to true on the second call to actually perform the deletion. Required together with confirmToken."
|
|
6672
6613
|
),
|
|
6673
|
-
confirmToken:
|
|
6614
|
+
confirmToken: z90.string().optional().describe(
|
|
6674
6615
|
"Token returned by the preview call; must be supplied with confirm: true."
|
|
6675
6616
|
)
|
|
6676
6617
|
});
|
|
@@ -6712,10 +6653,10 @@ function deleteComponentTool(config) {
|
|
|
6712
6653
|
}
|
|
6713
6654
|
|
|
6714
6655
|
// src/tools/exo/components/publishComponent.ts
|
|
6715
|
-
import { z as
|
|
6656
|
+
import { z as z91 } from "zod";
|
|
6716
6657
|
var PublishComponentToolParams = BaseToolSchema.extend({
|
|
6717
|
-
componentId:
|
|
6718
|
-
version:
|
|
6658
|
+
componentId: z91.string().describe("The ID of the component to publish"),
|
|
6659
|
+
version: z91.number().describe(
|
|
6719
6660
|
"REQUIRED. The component's sys.version as returned by get_component. You must call get_component first to read the current state and version. The publish is rejected if this does not match the current version, which means the component changed since you read it."
|
|
6720
6661
|
)
|
|
6721
6662
|
});
|
|
@@ -6749,10 +6690,10 @@ function publishComponentTool(config) {
|
|
|
6749
6690
|
}
|
|
6750
6691
|
|
|
6751
6692
|
// src/tools/exo/components/unpublishComponent.ts
|
|
6752
|
-
import { z as
|
|
6693
|
+
import { z as z92 } from "zod";
|
|
6753
6694
|
var UnpublishComponentToolParams = BaseToolSchema.extend({
|
|
6754
|
-
componentId:
|
|
6755
|
-
version:
|
|
6695
|
+
componentId: z92.string().describe("The ID of the component to unpublish"),
|
|
6696
|
+
version: z92.number().describe(
|
|
6756
6697
|
"REQUIRED. The component's sys.version as returned by get_component. You must call get_component first to read the current state and version. The unpublish is rejected if this does not match the current version, which means the component changed since you read it."
|
|
6757
6698
|
)
|
|
6758
6699
|
});
|
|
@@ -6881,9 +6822,9 @@ function createComponentTools(config) {
|
|
|
6881
6822
|
}
|
|
6882
6823
|
|
|
6883
6824
|
// src/tools/exo/experience-fragments/getExperienceFragment.ts
|
|
6884
|
-
import { z as
|
|
6825
|
+
import { z as z93 } from "zod";
|
|
6885
6826
|
var GetExperienceFragmentToolParams = BaseToolSchema.extend({
|
|
6886
|
-
experienceFragmentId:
|
|
6827
|
+
experienceFragmentId: z93.string().describe("The ID of the experience fragment to retrieve details for")
|
|
6887
6828
|
});
|
|
6888
6829
|
function getExperienceFragmentTool(config) {
|
|
6889
6830
|
async function tool2(args) {
|
|
@@ -6901,12 +6842,12 @@ function getExperienceFragmentTool(config) {
|
|
|
6901
6842
|
}
|
|
6902
6843
|
|
|
6903
6844
|
// src/tools/exo/experience-fragments/listExperienceFragments.ts
|
|
6904
|
-
import { z as
|
|
6845
|
+
import { z as z94 } from "zod";
|
|
6905
6846
|
var ListExperienceFragmentsToolParams = BaseToolSchema.extend({
|
|
6906
|
-
limit:
|
|
6907
|
-
pageNext:
|
|
6908
|
-
pagePrev:
|
|
6909
|
-
order:
|
|
6847
|
+
limit: z94.number().optional().describe("Maximum number of experience fragments to return (max 10)"),
|
|
6848
|
+
pageNext: z94.string().optional().describe("Cursor token to fetch the next page of results"),
|
|
6849
|
+
pagePrev: z94.string().optional().describe("Cursor token to fetch the previous page of results"),
|
|
6850
|
+
order: z94.string().optional().describe("Order experience fragments by this field (e.g. sys.createdAt)")
|
|
6910
6851
|
});
|
|
6911
6852
|
function listExperienceFragmentsTool(config) {
|
|
6912
6853
|
async function tool2(args) {
|
|
@@ -6936,21 +6877,21 @@ function listExperienceFragmentsTool(config) {
|
|
|
6936
6877
|
}
|
|
6937
6878
|
|
|
6938
6879
|
// src/tools/exo/experience-fragments/createExperienceFragment.ts
|
|
6939
|
-
import { z as
|
|
6880
|
+
import { z as z95 } from "zod";
|
|
6940
6881
|
var CreateExperienceFragmentToolParams = BaseToolSchema.extend({
|
|
6941
|
-
name:
|
|
6942
|
-
description:
|
|
6882
|
+
name: z95.string().describe("The name of the experience fragment"),
|
|
6883
|
+
description: z95.string().describe("Description of the experience fragment"),
|
|
6943
6884
|
component: ComponentResourceLinkSchema.describe(
|
|
6944
6885
|
"Resource link to the component this experience fragment is based on"
|
|
6945
6886
|
),
|
|
6946
|
-
viewports:
|
|
6947
|
-
designProperties:
|
|
6887
|
+
viewports: z95.array(ViewportSchema).describe("Viewport definitions (may be empty)"),
|
|
6888
|
+
designProperties: z95.record(z95.string(), DimensionedDesignPropertyValueSchema).describe(
|
|
6948
6889
|
"Design property values keyed by property ID (may be empty object)"
|
|
6949
6890
|
),
|
|
6950
6891
|
contentBindings: ExperienceContentBindingsSchema.optional().describe(
|
|
6951
6892
|
"Optional content bindings for the experience fragment"
|
|
6952
6893
|
),
|
|
6953
|
-
slots:
|
|
6894
|
+
slots: z95.record(z95.string(), z95.array(ExperienceSlotNodeSchema)).optional().describe("Optional slot node definitions keyed by slot ID"),
|
|
6954
6895
|
metadata: ExperienceMetadataSchema.optional().describe(
|
|
6955
6896
|
"Optional ExO metadata (tags, concepts)"
|
|
6956
6897
|
)
|
|
@@ -6983,20 +6924,20 @@ function createExperienceFragmentTool(config) {
|
|
|
6983
6924
|
}
|
|
6984
6925
|
|
|
6985
6926
|
// src/tools/exo/experience-fragments/updateExperienceFragment.ts
|
|
6986
|
-
import { z as
|
|
6927
|
+
import { z as z96 } from "zod";
|
|
6987
6928
|
var UpdateExperienceFragmentToolParams = BaseToolSchema.extend({
|
|
6988
|
-
experienceFragmentId:
|
|
6989
|
-
version:
|
|
6929
|
+
experienceFragmentId: z96.string().describe("The ID of the experience fragment to update"),
|
|
6930
|
+
version: z96.number().describe(
|
|
6990
6931
|
"REQUIRED. The experience fragment's sys.version as returned by get_experience_fragment. You must call get_experience_fragment first to read the current state and version. The update is rejected if this does not match the current version, which means the experience fragment changed since you read it."
|
|
6991
6932
|
),
|
|
6992
|
-
name:
|
|
6993
|
-
description:
|
|
6994
|
-
viewports:
|
|
6995
|
-
designProperties:
|
|
6933
|
+
name: z96.string().optional().describe("The name of the experience fragment"),
|
|
6934
|
+
description: z96.string().optional().describe("Description of the experience fragment"),
|
|
6935
|
+
viewports: z96.array(ViewportSchema).optional().describe("Viewport definitions; replaces existing viewports if provided"),
|
|
6936
|
+
designProperties: z96.record(z96.string(), DimensionedDesignPropertyValueSchema).optional().describe("Design property values; replaces existing if provided"),
|
|
6996
6937
|
contentBindings: ExperienceContentBindingsSchema.optional().describe(
|
|
6997
6938
|
"Content bindings; replaces existing if provided"
|
|
6998
6939
|
),
|
|
6999
|
-
slots:
|
|
6940
|
+
slots: z96.record(z96.string(), z96.array(ExperienceSlotNodeSchema)).optional().describe("Slot node definitions; replaces existing if provided"),
|
|
7000
6941
|
metadata: ExperienceMetadataSchema.optional().describe(
|
|
7001
6942
|
"ExO metadata (tags, concepts); replaces existing if provided"
|
|
7002
6943
|
)
|
|
@@ -7044,13 +6985,13 @@ function updateExperienceFragmentTool(config) {
|
|
|
7044
6985
|
}
|
|
7045
6986
|
|
|
7046
6987
|
// src/tools/exo/experience-fragments/deleteExperienceFragment.ts
|
|
7047
|
-
import { z as
|
|
6988
|
+
import { z as z97 } from "zod";
|
|
7048
6989
|
var DeleteExperienceFragmentToolParams = BaseToolSchema.extend({
|
|
7049
|
-
experienceFragmentId:
|
|
7050
|
-
confirm:
|
|
6990
|
+
experienceFragmentId: z97.string().describe("The ID of the experience fragment to delete"),
|
|
6991
|
+
confirm: z97.boolean().optional().describe(
|
|
7051
6992
|
"Set to true on the second call to actually perform the deletion. Required together with confirmToken."
|
|
7052
6993
|
),
|
|
7053
|
-
confirmToken:
|
|
6994
|
+
confirmToken: z97.string().optional().describe(
|
|
7054
6995
|
"Token returned by the preview call; must be supplied with confirm: true."
|
|
7055
6996
|
)
|
|
7056
6997
|
});
|
|
@@ -7092,10 +7033,10 @@ function deleteExperienceFragmentTool(config) {
|
|
|
7092
7033
|
}
|
|
7093
7034
|
|
|
7094
7035
|
// src/tools/exo/experience-fragments/publishExperienceFragment.ts
|
|
7095
|
-
import { z as
|
|
7036
|
+
import { z as z98 } from "zod";
|
|
7096
7037
|
var PublishExperienceFragmentToolParams = BaseToolSchema.extend({
|
|
7097
|
-
experienceFragmentId:
|
|
7098
|
-
version:
|
|
7038
|
+
experienceFragmentId: z98.string().describe("The ID of the experience fragment to publish"),
|
|
7039
|
+
version: z98.number().describe(
|
|
7099
7040
|
"REQUIRED. The experience fragment's sys.version as returned by get_experience_fragment. You must call get_experience_fragment first to read the current state and version. The publish is rejected if this does not match the current version, which means the experience fragment changed since you read it."
|
|
7100
7041
|
)
|
|
7101
7042
|
});
|
|
@@ -7129,10 +7070,10 @@ function publishExperienceFragmentTool(config) {
|
|
|
7129
7070
|
}
|
|
7130
7071
|
|
|
7131
7072
|
// src/tools/exo/experience-fragments/unpublishExperienceFragment.ts
|
|
7132
|
-
import { z as
|
|
7073
|
+
import { z as z99 } from "zod";
|
|
7133
7074
|
var UnpublishExperienceFragmentToolParams = BaseToolSchema.extend({
|
|
7134
|
-
experienceFragmentId:
|
|
7135
|
-
version:
|
|
7075
|
+
experienceFragmentId: z99.string().describe("The ID of the experience fragment to unpublish"),
|
|
7076
|
+
version: z99.number().describe(
|
|
7136
7077
|
"REQUIRED. The experience fragment's sys.version as returned by get_experience_fragment. You must call get_experience_fragment first to read the current state and version. The unpublish is rejected if this does not match the current version, which means the experience fragment changed since you read it."
|
|
7137
7078
|
)
|
|
7138
7079
|
});
|
|
@@ -7264,9 +7205,9 @@ function createExperienceFragmentTools(config) {
|
|
|
7264
7205
|
}
|
|
7265
7206
|
|
|
7266
7207
|
// src/tools/exo/experience-templates/getExperienceTemplate.ts
|
|
7267
|
-
import { z as
|
|
7208
|
+
import { z as z100 } from "zod";
|
|
7268
7209
|
var GetExperienceTemplateToolParams = BaseToolSchema.extend({
|
|
7269
|
-
experienceTemplateId:
|
|
7210
|
+
experienceTemplateId: z100.string().describe("The ID of the experience template to retrieve details for")
|
|
7270
7211
|
});
|
|
7271
7212
|
function getExperienceTemplateTool(config) {
|
|
7272
7213
|
async function tool2(args) {
|
|
@@ -7284,12 +7225,12 @@ function getExperienceTemplateTool(config) {
|
|
|
7284
7225
|
}
|
|
7285
7226
|
|
|
7286
7227
|
// src/tools/exo/experience-templates/listExperienceTemplates.ts
|
|
7287
|
-
import { z as
|
|
7228
|
+
import { z as z101 } from "zod";
|
|
7288
7229
|
var ListExperienceTemplatesToolParams = BaseToolSchema.extend({
|
|
7289
|
-
limit:
|
|
7290
|
-
pageNext:
|
|
7291
|
-
pagePrev:
|
|
7292
|
-
order:
|
|
7230
|
+
limit: z101.number().optional().describe("Maximum number of experience templates to return (max 10)"),
|
|
7231
|
+
pageNext: z101.string().optional().describe("Cursor token to fetch the next page of results"),
|
|
7232
|
+
pagePrev: z101.string().optional().describe("Cursor token to fetch the previous page of results"),
|
|
7233
|
+
order: z101.string().optional().describe("Order experience templates by this field (e.g. sys.createdAt)")
|
|
7293
7234
|
});
|
|
7294
7235
|
function listExperienceTemplatesTool(config) {
|
|
7295
7236
|
async function tool2(args) {
|
|
@@ -7319,17 +7260,17 @@ function listExperienceTemplatesTool(config) {
|
|
|
7319
7260
|
}
|
|
7320
7261
|
|
|
7321
7262
|
// src/tools/exo/experience-templates/createExperienceTemplate.ts
|
|
7322
|
-
import { z as
|
|
7263
|
+
import { z as z102 } from "zod";
|
|
7323
7264
|
var CreateExperienceTemplateToolParams = BaseToolSchema.extend({
|
|
7324
|
-
name:
|
|
7325
|
-
description:
|
|
7326
|
-
viewports:
|
|
7265
|
+
name: z102.string().describe("The name of the experience template"),
|
|
7266
|
+
description: z102.string().describe("Description of the experience template"),
|
|
7267
|
+
viewports: z102.array(ViewportSchema).describe(
|
|
7327
7268
|
"Viewport definitions for the experience template (may be empty)"
|
|
7328
7269
|
),
|
|
7329
|
-
contentProperties:
|
|
7330
|
-
designProperties:
|
|
7331
|
-
componentTree:
|
|
7332
|
-
slots:
|
|
7270
|
+
contentProperties: z102.array(ContentPropertySchema).describe("Content property definitions (may be empty)"),
|
|
7271
|
+
designProperties: z102.array(DesignPropertySchema).describe("Design property definitions (may be empty)"),
|
|
7272
|
+
componentTree: z102.array(TreeNodeSchema).optional().describe("Optional component tree node definitions"),
|
|
7273
|
+
slots: z102.array(SlotDefinitionSchema).optional().describe("Optional slot definitions"),
|
|
7333
7274
|
metadata: ExoMetadataSchema.optional().describe(
|
|
7334
7275
|
"Optional ExO metadata (tags, concepts)"
|
|
7335
7276
|
)
|
|
@@ -7362,19 +7303,19 @@ function createExperienceTemplateTool(config) {
|
|
|
7362
7303
|
}
|
|
7363
7304
|
|
|
7364
7305
|
// src/tools/exo/experience-templates/upsertExperienceTemplate.ts
|
|
7365
|
-
import { z as
|
|
7306
|
+
import { z as z103 } from "zod";
|
|
7366
7307
|
var UpsertExperienceTemplateToolParams = BaseToolSchema.extend({
|
|
7367
|
-
experienceTemplateId:
|
|
7368
|
-
version:
|
|
7308
|
+
experienceTemplateId: z103.string().describe("The ID of the experience template to update"),
|
|
7309
|
+
version: z103.number().describe(
|
|
7369
7310
|
"REQUIRED. The experience template's sys.version as returned by get_experience_template. You must call get_experience_template first to read the current state and version. The update is rejected if this does not match the current version, which means the experience template changed since you read it."
|
|
7370
7311
|
),
|
|
7371
|
-
name:
|
|
7372
|
-
description:
|
|
7373
|
-
viewports:
|
|
7374
|
-
contentProperties:
|
|
7375
|
-
designProperties:
|
|
7376
|
-
componentTree:
|
|
7377
|
-
slots:
|
|
7312
|
+
name: z103.string().optional().describe("The name of the experience template"),
|
|
7313
|
+
description: z103.string().optional().describe("Description of the experience template"),
|
|
7314
|
+
viewports: z103.array(ViewportSchema).optional().describe("Viewport definitions; replaces existing viewports if provided"),
|
|
7315
|
+
contentProperties: z103.array(ContentPropertySchema).optional().describe("Content property definitions; replaces existing if provided"),
|
|
7316
|
+
designProperties: z103.array(DesignPropertySchema).optional().describe("Design property definitions; replaces existing if provided"),
|
|
7317
|
+
componentTree: z103.array(TreeNodeSchema).optional().describe("Component tree node definitions; replaces existing if provided"),
|
|
7318
|
+
slots: z103.array(SlotDefinitionSchema).optional().describe("Slot definitions; replaces existing if provided"),
|
|
7378
7319
|
metadata: ExoMetadataSchema.optional().describe(
|
|
7379
7320
|
"ExO metadata (tags, concepts); replaces existing if provided"
|
|
7380
7321
|
)
|
|
@@ -7424,13 +7365,13 @@ function upsertExperienceTemplateTool(config) {
|
|
|
7424
7365
|
}
|
|
7425
7366
|
|
|
7426
7367
|
// src/tools/exo/experience-templates/deleteExperienceTemplate.ts
|
|
7427
|
-
import { z as
|
|
7368
|
+
import { z as z104 } from "zod";
|
|
7428
7369
|
var DeleteExperienceTemplateToolParams = BaseToolSchema.extend({
|
|
7429
|
-
experienceTemplateId:
|
|
7430
|
-
confirm:
|
|
7370
|
+
experienceTemplateId: z104.string().describe("The ID of the experience template to delete"),
|
|
7371
|
+
confirm: z104.boolean().optional().describe(
|
|
7431
7372
|
"Set to true on the second call to actually perform the deletion. Required together with confirmToken."
|
|
7432
7373
|
),
|
|
7433
|
-
confirmToken:
|
|
7374
|
+
confirmToken: z104.string().optional().describe(
|
|
7434
7375
|
"Token returned by the preview call; must be supplied with confirm: true."
|
|
7435
7376
|
)
|
|
7436
7377
|
});
|
|
@@ -7472,10 +7413,10 @@ function deleteExperienceTemplateTool(config) {
|
|
|
7472
7413
|
}
|
|
7473
7414
|
|
|
7474
7415
|
// src/tools/exo/experience-templates/publishExperienceTemplate.ts
|
|
7475
|
-
import { z as
|
|
7416
|
+
import { z as z105 } from "zod";
|
|
7476
7417
|
var PublishExperienceTemplateToolParams = BaseToolSchema.extend({
|
|
7477
|
-
experienceTemplateId:
|
|
7478
|
-
version:
|
|
7418
|
+
experienceTemplateId: z105.string().describe("The ID of the experience template to publish"),
|
|
7419
|
+
version: z105.number().describe(
|
|
7479
7420
|
"REQUIRED. The experience template's sys.version as returned by get_experience_template. You must call get_experience_template first to read the current state and version. The publish is rejected if this does not match the current version, which means the experience template changed since you read it."
|
|
7480
7421
|
)
|
|
7481
7422
|
});
|
|
@@ -7509,10 +7450,10 @@ function publishExperienceTemplateTool(config) {
|
|
|
7509
7450
|
}
|
|
7510
7451
|
|
|
7511
7452
|
// src/tools/exo/experience-templates/unpublishExperienceTemplate.ts
|
|
7512
|
-
import { z as
|
|
7453
|
+
import { z as z106 } from "zod";
|
|
7513
7454
|
var UnpublishExperienceTemplateToolParams = BaseToolSchema.extend({
|
|
7514
|
-
experienceTemplateId:
|
|
7515
|
-
version:
|
|
7455
|
+
experienceTemplateId: z106.string().describe("The ID of the experience template to unpublish"),
|
|
7456
|
+
version: z106.number().describe(
|
|
7516
7457
|
"REQUIRED. The experience template's sys.version as returned by get_experience_template. You must call get_experience_template first to read the current state and version. The unpublish is rejected if this does not match the current version, which means the experience template changed since you read it."
|
|
7517
7458
|
)
|
|
7518
7459
|
});
|
|
@@ -7644,9 +7585,9 @@ function createExperienceTemplateTools(config) {
|
|
|
7644
7585
|
}
|
|
7645
7586
|
|
|
7646
7587
|
// src/tools/exo/experiences/getExperience.ts
|
|
7647
|
-
import { z as
|
|
7588
|
+
import { z as z107 } from "zod";
|
|
7648
7589
|
var GetExperienceToolParams = BaseToolSchema.extend({
|
|
7649
|
-
experienceId:
|
|
7590
|
+
experienceId: z107.string().describe("The ID of the experience to retrieve")
|
|
7650
7591
|
});
|
|
7651
7592
|
function getExperienceTool(config) {
|
|
7652
7593
|
async function tool2(args) {
|
|
@@ -7664,12 +7605,12 @@ function getExperienceTool(config) {
|
|
|
7664
7605
|
}
|
|
7665
7606
|
|
|
7666
7607
|
// src/tools/exo/experiences/listExperiences.ts
|
|
7667
|
-
import { z as
|
|
7608
|
+
import { z as z108 } from "zod";
|
|
7668
7609
|
var ListExperiencesToolParams = BaseToolSchema.extend({
|
|
7669
|
-
limit:
|
|
7670
|
-
pageNext:
|
|
7671
|
-
pagePrev:
|
|
7672
|
-
order:
|
|
7610
|
+
limit: z108.number().optional().describe("Maximum number of experiences to return (max 10)"),
|
|
7611
|
+
pageNext: z108.string().optional().describe("Cursor token to fetch the next page of results"),
|
|
7612
|
+
pagePrev: z108.string().optional().describe("Cursor token to fetch the previous page of results"),
|
|
7613
|
+
order: z108.string().optional().describe("Order experiences by this field (e.g. sys.createdAt)")
|
|
7673
7614
|
});
|
|
7674
7615
|
function listExperiencesTool(config) {
|
|
7675
7616
|
async function tool2(args) {
|
|
@@ -7699,21 +7640,21 @@ function listExperiencesTool(config) {
|
|
|
7699
7640
|
}
|
|
7700
7641
|
|
|
7701
7642
|
// src/tools/exo/experiences/createExperience.ts
|
|
7702
|
-
import { z as
|
|
7643
|
+
import { z as z109 } from "zod";
|
|
7703
7644
|
var CreateExperienceToolParams = BaseToolSchema.extend({
|
|
7704
|
-
name:
|
|
7705
|
-
description:
|
|
7645
|
+
name: z109.string().describe("The name of the experience"),
|
|
7646
|
+
description: z109.string().describe("Description of the experience"),
|
|
7706
7647
|
experienceTemplate: ExperienceTemplateResourceLinkSchema.describe(
|
|
7707
7648
|
"Resource link to the ExperienceTemplate this experience is backed by"
|
|
7708
7649
|
),
|
|
7709
|
-
viewports:
|
|
7710
|
-
designProperties:
|
|
7650
|
+
viewports: z109.array(ViewportSchema).describe("Viewport definitions for the experience (may be empty)"),
|
|
7651
|
+
designProperties: z109.record(z109.string(), DimensionedDesignPropertyValueSchema).describe(
|
|
7711
7652
|
"Design property values keyed by property ID. Each value is a dimensioned map (viewport ID \u2192 design value). May be an empty object."
|
|
7712
7653
|
),
|
|
7713
7654
|
contentBindings: ExperienceContentBindingsSchema.optional().describe(
|
|
7714
7655
|
"Optional content bindings linking this experience to a data assembly"
|
|
7715
7656
|
),
|
|
7716
|
-
slots:
|
|
7657
|
+
slots: z109.record(z109.string(), z109.array(ExperienceSlotNodeSchema)).optional().describe(
|
|
7717
7658
|
"Optional slot contents keyed by slot ID. Each value is an array of ExperienceFragmentNode or InlineExperienceFragmentNode."
|
|
7718
7659
|
),
|
|
7719
7660
|
metadata: ExperienceMetadataSchema.optional().describe(
|
|
@@ -7748,22 +7689,22 @@ function createExperienceTool(config) {
|
|
|
7748
7689
|
}
|
|
7749
7690
|
|
|
7750
7691
|
// src/tools/exo/experiences/upsertExperience.ts
|
|
7751
|
-
import { z as
|
|
7692
|
+
import { z as z110 } from "zod";
|
|
7752
7693
|
var UpsertExperienceToolParams = BaseToolSchema.extend({
|
|
7753
|
-
experienceId:
|
|
7754
|
-
version:
|
|
7694
|
+
experienceId: z110.string().describe("The ID of the experience to update"),
|
|
7695
|
+
version: z110.number().describe(
|
|
7755
7696
|
"REQUIRED. The experience's sys.version as returned by get_experience. You must call get_experience first to read the current state and version. The update is rejected if this does not match the current version, which means the experience changed since you read it."
|
|
7756
7697
|
),
|
|
7757
|
-
name:
|
|
7758
|
-
description:
|
|
7759
|
-
viewports:
|
|
7760
|
-
designProperties:
|
|
7698
|
+
name: z110.string().optional().describe("The name of the experience"),
|
|
7699
|
+
description: z110.string().optional().describe("Description of the experience"),
|
|
7700
|
+
viewports: z110.array(ViewportSchema).optional().describe("Viewport definitions; replaces existing viewports if provided"),
|
|
7701
|
+
designProperties: z110.record(z110.string(), DimensionedDesignPropertyValueSchema).optional().describe(
|
|
7761
7702
|
"Design property values keyed by property ID; replaces existing if provided"
|
|
7762
7703
|
),
|
|
7763
7704
|
contentBindings: ExperienceContentBindingsSchema.optional().describe(
|
|
7764
7705
|
"Content bindings linking this experience to a data assembly; replaces existing if provided"
|
|
7765
7706
|
),
|
|
7766
|
-
slots:
|
|
7707
|
+
slots: z110.record(z110.string(), z110.array(ExperienceSlotNodeSchema)).optional().describe("Slot contents keyed by slot ID; replaces existing if provided"),
|
|
7767
7708
|
metadata: ExperienceMetadataSchema.optional().describe(
|
|
7768
7709
|
"ExO metadata (tags, concepts); replaces existing if provided"
|
|
7769
7710
|
)
|
|
@@ -7808,13 +7749,13 @@ function upsertExperienceTool(config) {
|
|
|
7808
7749
|
}
|
|
7809
7750
|
|
|
7810
7751
|
// src/tools/exo/experiences/deleteExperience.ts
|
|
7811
|
-
import { z as
|
|
7752
|
+
import { z as z111 } from "zod";
|
|
7812
7753
|
var DeleteExperienceToolParams = BaseToolSchema.extend({
|
|
7813
|
-
experienceId:
|
|
7814
|
-
confirm:
|
|
7754
|
+
experienceId: z111.string().describe("The ID of the experience to delete"),
|
|
7755
|
+
confirm: z111.boolean().optional().describe(
|
|
7815
7756
|
"Set to true on the second call to actually perform the deletion. Required together with confirmToken."
|
|
7816
7757
|
),
|
|
7817
|
-
confirmToken:
|
|
7758
|
+
confirmToken: z111.string().optional().describe(
|
|
7818
7759
|
"Token returned by the preview call; must be supplied with confirm: true."
|
|
7819
7760
|
)
|
|
7820
7761
|
});
|
|
@@ -7856,10 +7797,10 @@ function deleteExperienceTool(config) {
|
|
|
7856
7797
|
}
|
|
7857
7798
|
|
|
7858
7799
|
// src/tools/exo/experiences/publishExperience.ts
|
|
7859
|
-
import { z as
|
|
7800
|
+
import { z as z112 } from "zod";
|
|
7860
7801
|
var PublishExperienceToolParams = BaseToolSchema.extend({
|
|
7861
|
-
experienceId:
|
|
7862
|
-
version:
|
|
7802
|
+
experienceId: z112.string().describe("The ID of the experience to publish"),
|
|
7803
|
+
version: z112.number().describe(
|
|
7863
7804
|
"REQUIRED. The experience's sys.version as returned by get_experience. You must call get_experience first to read the current state and version. The publish is rejected if this does not match the current version, which means the experience changed since you read it."
|
|
7864
7805
|
)
|
|
7865
7806
|
});
|
|
@@ -7893,10 +7834,10 @@ function publishExperienceTool(config) {
|
|
|
7893
7834
|
}
|
|
7894
7835
|
|
|
7895
7836
|
// src/tools/exo/experiences/unpublishExperience.ts
|
|
7896
|
-
import { z as
|
|
7837
|
+
import { z as z113 } from "zod";
|
|
7897
7838
|
var UnpublishExperienceToolParams = BaseToolSchema.extend({
|
|
7898
|
-
experienceId:
|
|
7899
|
-
version:
|
|
7839
|
+
experienceId: z113.string().describe("The ID of the experience to unpublish"),
|
|
7840
|
+
version: z113.number().describe(
|
|
7900
7841
|
"REQUIRED. The experience's sys.version as returned by get_experience. You must call get_experience first to read the current state and version. The unpublish is rejected if this does not match the current version, which means the experience changed since you read it."
|
|
7901
7842
|
)
|
|
7902
7843
|
});
|
|
@@ -8025,9 +7966,9 @@ function createExperienceTools(config) {
|
|
|
8025
7966
|
}
|
|
8026
7967
|
|
|
8027
7968
|
// src/tools/exo/data-assemblies/getDataAssembly.ts
|
|
8028
|
-
import { z as
|
|
7969
|
+
import { z as z114 } from "zod";
|
|
8029
7970
|
var GetDataAssemblyToolParams = BaseToolSchema.extend({
|
|
8030
|
-
dataAssemblyId:
|
|
7971
|
+
dataAssemblyId: z114.string().describe("The ID of the data assembly to retrieve")
|
|
8031
7972
|
});
|
|
8032
7973
|
function getDataAssemblyTool(config) {
|
|
8033
7974
|
async function tool2(args) {
|
|
@@ -8045,9 +7986,9 @@ function getDataAssemblyTool(config) {
|
|
|
8045
7986
|
}
|
|
8046
7987
|
|
|
8047
7988
|
// src/tools/exo/data-assemblies/getPublishedDataAssembly.ts
|
|
8048
|
-
import { z as
|
|
7989
|
+
import { z as z115 } from "zod";
|
|
8049
7990
|
var GetPublishedDataAssemblyToolParams = BaseToolSchema.extend({
|
|
8050
|
-
dataAssemblyId:
|
|
7991
|
+
dataAssemblyId: z115.string().describe("The ID of the published data assembly to retrieve")
|
|
8051
7992
|
});
|
|
8052
7993
|
function getPublishedDataAssemblyTool(config) {
|
|
8053
7994
|
async function tool2(args) {
|
|
@@ -8065,12 +8006,12 @@ function getPublishedDataAssemblyTool(config) {
|
|
|
8065
8006
|
}
|
|
8066
8007
|
|
|
8067
8008
|
// src/tools/exo/data-assemblies/listDataAssemblies.ts
|
|
8068
|
-
import { z as
|
|
8009
|
+
import { z as z116 } from "zod";
|
|
8069
8010
|
var ListDataAssembliesToolParams = BaseToolSchema.extend({
|
|
8070
|
-
limit:
|
|
8071
|
-
pageNext:
|
|
8072
|
-
pagePrev:
|
|
8073
|
-
sysIdIn:
|
|
8011
|
+
limit: z116.number().optional().describe("Maximum number of data assemblies to return (max 10)"),
|
|
8012
|
+
pageNext: z116.string().optional().describe("Cursor token to fetch the next page of results"),
|
|
8013
|
+
pagePrev: z116.string().optional().describe("Cursor token to fetch the previous page of results"),
|
|
8014
|
+
sysIdIn: z116.string().optional().describe("Comma-separated list of data assembly IDs to filter by")
|
|
8074
8015
|
});
|
|
8075
8016
|
function listDataAssembliesTool(config) {
|
|
8076
8017
|
async function tool2(args) {
|
|
@@ -8099,12 +8040,12 @@ function listDataAssembliesTool(config) {
|
|
|
8099
8040
|
}
|
|
8100
8041
|
|
|
8101
8042
|
// src/tools/exo/data-assemblies/listPublishedDataAssemblies.ts
|
|
8102
|
-
import { z as
|
|
8043
|
+
import { z as z117 } from "zod";
|
|
8103
8044
|
var ListPublishedDataAssembliesToolParams = BaseToolSchema.extend({
|
|
8104
|
-
limit:
|
|
8105
|
-
pageNext:
|
|
8106
|
-
pagePrev:
|
|
8107
|
-
sysIdIn:
|
|
8045
|
+
limit: z117.number().optional().describe("Maximum number of published data assemblies to return (max 10)"),
|
|
8046
|
+
pageNext: z117.string().optional().describe("Cursor token to fetch the next page of results"),
|
|
8047
|
+
pagePrev: z117.string().optional().describe("Cursor token to fetch the previous page of results"),
|
|
8048
|
+
sysIdIn: z117.string().optional().describe("Comma-separated list of data assembly IDs to filter by")
|
|
8108
8049
|
});
|
|
8109
8050
|
function listPublishedDataAssembliesTool(config) {
|
|
8110
8051
|
async function tool2(args) {
|
|
@@ -8133,35 +8074,35 @@ function listPublishedDataAssembliesTool(config) {
|
|
|
8133
8074
|
}
|
|
8134
8075
|
|
|
8135
8076
|
// src/tools/exo/data-assemblies/createDataAssembly.ts
|
|
8136
|
-
import { z as
|
|
8077
|
+
import { z as z119 } from "zod";
|
|
8137
8078
|
|
|
8138
8079
|
// src/types/dataAssemblySchemas.ts
|
|
8139
|
-
import { z as
|
|
8140
|
-
var PointerExpressionValueSchema =
|
|
8141
|
-
() =>
|
|
8142
|
-
|
|
8143
|
-
|
|
8144
|
-
$from:
|
|
8145
|
-
|
|
8146
|
-
|
|
8147
|
-
source:
|
|
8080
|
+
import { z as z118 } from "zod";
|
|
8081
|
+
var PointerExpressionValueSchema = z118.lazy(
|
|
8082
|
+
() => z118.union([
|
|
8083
|
+
z118.string(),
|
|
8084
|
+
z118.object({
|
|
8085
|
+
$from: z118.union([
|
|
8086
|
+
z118.string(),
|
|
8087
|
+
z118.object({
|
|
8088
|
+
source: z118.string(),
|
|
8148
8089
|
select: PointerExpressionValueSchema.optional()
|
|
8149
8090
|
})
|
|
8150
8091
|
])
|
|
8151
8092
|
}),
|
|
8152
|
-
|
|
8153
|
-
|
|
8154
|
-
|
|
8155
|
-
$on:
|
|
8156
|
-
type:
|
|
8093
|
+
z118.object({ $literal: z118.custom() }),
|
|
8094
|
+
z118.object({ $object: z118.record(z118.string(), PointerExpressionValueSchema) }),
|
|
8095
|
+
z118.object({
|
|
8096
|
+
$on: z118.object({
|
|
8097
|
+
type: z118.record(z118.string(), PointerExpressionValueSchema),
|
|
8157
8098
|
default: PointerExpressionValueSchema.optional()
|
|
8158
8099
|
})
|
|
8159
8100
|
}),
|
|
8160
|
-
|
|
8101
|
+
z118.record(z118.string(), PointerExpressionValueSchema)
|
|
8161
8102
|
])
|
|
8162
8103
|
);
|
|
8163
|
-
var CanonicalDataTypeArmSchema =
|
|
8164
|
-
type:
|
|
8104
|
+
var CanonicalDataTypeArmSchema = z118.object({
|
|
8105
|
+
type: z118.enum([
|
|
8165
8106
|
"String",
|
|
8166
8107
|
"Number",
|
|
8167
8108
|
"Integer",
|
|
@@ -8173,72 +8114,72 @@ var CanonicalDataTypeArmSchema = z119.object({
|
|
|
8173
8114
|
"Literal",
|
|
8174
8115
|
"DiscriminatedUnion"
|
|
8175
8116
|
]),
|
|
8176
|
-
id:
|
|
8177
|
-
name:
|
|
8178
|
-
required:
|
|
8179
|
-
}).catchall(
|
|
8180
|
-
var LegacyDataTypeArmSchema =
|
|
8181
|
-
id:
|
|
8182
|
-
name:
|
|
8183
|
-
type:
|
|
8184
|
-
required:
|
|
8185
|
-
source:
|
|
8186
|
-
ref:
|
|
8187
|
-
});
|
|
8188
|
-
var DataAssemblyDataTypeFieldSchema =
|
|
8117
|
+
id: z118.string().describe("Data type field identifier"),
|
|
8118
|
+
name: z118.string().describe("Human-readable name"),
|
|
8119
|
+
required: z118.boolean().optional()
|
|
8120
|
+
}).catchall(z118.unknown());
|
|
8121
|
+
var LegacyDataTypeArmSchema = z118.object({
|
|
8122
|
+
id: z118.string().describe("Data type field identifier"),
|
|
8123
|
+
name: z118.string().describe("Human-readable name"),
|
|
8124
|
+
type: z118.string(),
|
|
8125
|
+
required: z118.boolean().optional(),
|
|
8126
|
+
source: z118.string().optional(),
|
|
8127
|
+
ref: z118.unknown().optional()
|
|
8128
|
+
});
|
|
8129
|
+
var DataAssemblyDataTypeFieldSchema = z118.union([
|
|
8189
8130
|
CanonicalDataTypeArmSchema,
|
|
8190
8131
|
LegacyDataTypeArmSchema
|
|
8191
8132
|
]);
|
|
8192
8133
|
var SAME_SPACE_CONTENT_SOURCE = "crn:contentful:::content:spaces/$self/environments/$self";
|
|
8193
|
-
var DataAssemblyResourceLinkParameterSchema =
|
|
8194
|
-
name:
|
|
8195
|
-
description:
|
|
8196
|
-
type:
|
|
8197
|
-
linkType:
|
|
8198
|
-
allowedResources:
|
|
8199
|
-
|
|
8200
|
-
type:
|
|
8201
|
-
source:
|
|
8202
|
-
allowedTypes:
|
|
8134
|
+
var DataAssemblyResourceLinkParameterSchema = z118.object({
|
|
8135
|
+
name: z118.string().optional(),
|
|
8136
|
+
description: z118.string().optional(),
|
|
8137
|
+
type: z118.literal("ResourceLink"),
|
|
8138
|
+
linkType: z118.literal("Contentful:Entry"),
|
|
8139
|
+
allowedResources: z118.array(
|
|
8140
|
+
z118.object({
|
|
8141
|
+
type: z118.literal("Contentful:Entry"),
|
|
8142
|
+
source: z118.literal(SAME_SPACE_CONTENT_SOURCE),
|
|
8143
|
+
allowedTypes: z118.array(z118.string())
|
|
8203
8144
|
})
|
|
8204
8145
|
)
|
|
8205
8146
|
});
|
|
8206
|
-
var DataAssemblyParameterConfigSchema =
|
|
8207
|
-
|
|
8147
|
+
var DataAssemblyParameterConfigSchema = z118.record(
|
|
8148
|
+
z118.string(),
|
|
8208
8149
|
DataAssemblyResourceLinkParameterSchema
|
|
8209
8150
|
);
|
|
8210
|
-
var DataAssemblyGraphQLResolverSchema =
|
|
8211
|
-
source:
|
|
8212
|
-
query:
|
|
8151
|
+
var DataAssemblyGraphQLResolverSchema = z118.object({
|
|
8152
|
+
source: z118.literal("Contentful:GraphQL"),
|
|
8153
|
+
query: z118.string().describe("GraphQL query string"),
|
|
8213
8154
|
parameters: PointerExpressionValueSchema.optional()
|
|
8214
8155
|
});
|
|
8215
|
-
var DataAssemblyNestedResolverSchema =
|
|
8216
|
-
source:
|
|
8217
|
-
dataAssembly:
|
|
8218
|
-
sys:
|
|
8219
|
-
type:
|
|
8220
|
-
linkType:
|
|
8221
|
-
urn:
|
|
8156
|
+
var DataAssemblyNestedResolverSchema = z118.object({
|
|
8157
|
+
source: z118.literal("Contentful:DataAssembly"),
|
|
8158
|
+
dataAssembly: z118.object({
|
|
8159
|
+
sys: z118.object({
|
|
8160
|
+
type: z118.literal("ResourceLink"),
|
|
8161
|
+
linkType: z118.literal("Contentful:DataAssembly"),
|
|
8162
|
+
urn: z118.string()
|
|
8222
8163
|
})
|
|
8223
8164
|
}),
|
|
8224
8165
|
parameters: PointerExpressionValueSchema.optional()
|
|
8225
8166
|
});
|
|
8226
|
-
var DataAssemblyResolverDefinitionSchema =
|
|
8167
|
+
var DataAssemblyResolverDefinitionSchema = z118.union([
|
|
8227
8168
|
DataAssemblyGraphQLResolverSchema,
|
|
8228
8169
|
DataAssemblyNestedResolverSchema
|
|
8229
8170
|
]);
|
|
8230
|
-
var DataAssemblyResolverConfigSchema =
|
|
8231
|
-
|
|
8171
|
+
var DataAssemblyResolverConfigSchema = z118.record(
|
|
8172
|
+
z118.string(),
|
|
8232
8173
|
DataAssemblyResolverDefinitionSchema
|
|
8233
8174
|
);
|
|
8234
8175
|
var DataAssemblyReturnMappingConfigSchema = PointerExpressionValueSchema;
|
|
8235
|
-
var DataAssemblyMetadataSchema =
|
|
8236
|
-
tags:
|
|
8237
|
-
|
|
8238
|
-
sys:
|
|
8239
|
-
type:
|
|
8240
|
-
linkType:
|
|
8241
|
-
id:
|
|
8176
|
+
var DataAssemblyMetadataSchema = z118.object({
|
|
8177
|
+
tags: z118.array(
|
|
8178
|
+
z118.object({
|
|
8179
|
+
sys: z118.object({
|
|
8180
|
+
type: z118.literal("Link"),
|
|
8181
|
+
linkType: z118.literal("Tag"),
|
|
8182
|
+
id: z118.string()
|
|
8242
8183
|
})
|
|
8243
8184
|
})
|
|
8244
8185
|
)
|
|
@@ -8246,8 +8187,8 @@ var DataAssemblyMetadataSchema = z119.object({
|
|
|
8246
8187
|
|
|
8247
8188
|
// src/tools/exo/data-assemblies/createDataAssembly.ts
|
|
8248
8189
|
var CreateDataAssemblyToolParams = BaseToolSchema.extend({
|
|
8249
|
-
name:
|
|
8250
|
-
description:
|
|
8190
|
+
name: z119.string().describe("The name of the data assembly"),
|
|
8191
|
+
description: z119.string().describe("Description of the data assembly"),
|
|
8251
8192
|
parameters: DataAssemblyParameterConfigSchema.describe(
|
|
8252
8193
|
"Parameter definitions keyed by parameter name (may be empty object)"
|
|
8253
8194
|
),
|
|
@@ -8257,8 +8198,8 @@ var CreateDataAssemblyToolParams = BaseToolSchema.extend({
|
|
|
8257
8198
|
return: DataAssemblyReturnMappingConfigSchema.describe(
|
|
8258
8199
|
"Return mapping configuration specifying how to map resolved data"
|
|
8259
8200
|
),
|
|
8260
|
-
dataType:
|
|
8261
|
-
variant:
|
|
8201
|
+
dataType: z119.array(DataAssemblyDataTypeFieldSchema).describe("Data type field definitions for this data assembly (may be empty array)"),
|
|
8202
|
+
variant: z119.string().optional().describe("Optional variant identifier for this data assembly"),
|
|
8262
8203
|
metadata: DataAssemblyMetadataSchema.optional().describe("Optional metadata (tags)")
|
|
8263
8204
|
});
|
|
8264
8205
|
function createDataAssemblyTool(config) {
|
|
@@ -8292,14 +8233,14 @@ function createDataAssemblyTool(config) {
|
|
|
8292
8233
|
}
|
|
8293
8234
|
|
|
8294
8235
|
// src/tools/exo/data-assemblies/updateDataAssembly.ts
|
|
8295
|
-
import { z as
|
|
8236
|
+
import { z as z120 } from "zod";
|
|
8296
8237
|
var UpdateDataAssemblyToolParams = BaseToolSchema.extend({
|
|
8297
|
-
dataAssemblyId:
|
|
8298
|
-
version:
|
|
8238
|
+
dataAssemblyId: z120.string().describe("The ID of the data assembly to update"),
|
|
8239
|
+
version: z120.number().describe(
|
|
8299
8240
|
"REQUIRED. The data assembly's sys.version as returned by get_data_assembly. You must call get_data_assembly first to read the current state and version. The update is rejected if this does not match the current version, which means the data assembly changed since you read it."
|
|
8300
8241
|
),
|
|
8301
|
-
name:
|
|
8302
|
-
description:
|
|
8242
|
+
name: z120.string().optional().describe("The name of the data assembly"),
|
|
8243
|
+
description: z120.string().optional().describe("Description of the data assembly"),
|
|
8303
8244
|
parameters: DataAssemblyParameterConfigSchema.optional().describe(
|
|
8304
8245
|
"Parameter definitions; replaces existing if provided"
|
|
8305
8246
|
),
|
|
@@ -8309,8 +8250,8 @@ var UpdateDataAssemblyToolParams = BaseToolSchema.extend({
|
|
|
8309
8250
|
return: DataAssemblyReturnMappingConfigSchema.optional().describe(
|
|
8310
8251
|
"Return mapping configuration; replaces existing if provided"
|
|
8311
8252
|
),
|
|
8312
|
-
dataType:
|
|
8313
|
-
variant:
|
|
8253
|
+
dataType: z120.array(DataAssemblyDataTypeFieldSchema).optional().describe("Data type field definitions; replaces existing if provided"),
|
|
8254
|
+
variant: z120.string().optional().describe("Optional variant identifier; replaces existing if provided"),
|
|
8314
8255
|
metadata: DataAssemblyMetadataSchema.optional().describe(
|
|
8315
8256
|
"Metadata (tags); replaces existing if provided"
|
|
8316
8257
|
)
|
|
@@ -8356,13 +8297,13 @@ function updateDataAssemblyTool(config) {
|
|
|
8356
8297
|
}
|
|
8357
8298
|
|
|
8358
8299
|
// src/tools/exo/data-assemblies/deleteDataAssembly.ts
|
|
8359
|
-
import { z as
|
|
8300
|
+
import { z as z121 } from "zod";
|
|
8360
8301
|
var DeleteDataAssemblyToolParams = BaseToolSchema.extend({
|
|
8361
|
-
dataAssemblyId:
|
|
8362
|
-
confirm:
|
|
8302
|
+
dataAssemblyId: z121.string().describe("The ID of the data assembly to delete"),
|
|
8303
|
+
confirm: z121.boolean().optional().describe(
|
|
8363
8304
|
"Set to true on the second call to actually perform the deletion. Required together with confirmToken."
|
|
8364
8305
|
),
|
|
8365
|
-
confirmToken:
|
|
8306
|
+
confirmToken: z121.string().optional().describe(
|
|
8366
8307
|
"Token returned by the preview call; must be supplied with confirm: true."
|
|
8367
8308
|
)
|
|
8368
8309
|
});
|
|
@@ -8404,10 +8345,10 @@ function deleteDataAssemblyTool(config) {
|
|
|
8404
8345
|
}
|
|
8405
8346
|
|
|
8406
8347
|
// src/tools/exo/data-assemblies/publishDataAssembly.ts
|
|
8407
|
-
import { z as
|
|
8348
|
+
import { z as z122 } from "zod";
|
|
8408
8349
|
var PublishDataAssemblyToolParams = BaseToolSchema.extend({
|
|
8409
|
-
dataAssemblyId:
|
|
8410
|
-
version:
|
|
8350
|
+
dataAssemblyId: z122.string().describe("The ID of the data assembly to publish"),
|
|
8351
|
+
version: z122.number().describe(
|
|
8411
8352
|
"REQUIRED. The data assembly's sys.version as returned by get_data_assembly. You must call get_data_assembly first to read the current state and version. The publish is rejected if this does not match the current version, which means the data assembly changed since you read it."
|
|
8412
8353
|
)
|
|
8413
8354
|
});
|
|
@@ -8441,10 +8382,10 @@ function publishDataAssemblyTool(config) {
|
|
|
8441
8382
|
}
|
|
8442
8383
|
|
|
8443
8384
|
// src/tools/exo/data-assemblies/unpublishDataAssembly.ts
|
|
8444
|
-
import { z as
|
|
8385
|
+
import { z as z123 } from "zod";
|
|
8445
8386
|
var UnpublishDataAssemblyToolParams = BaseToolSchema.extend({
|
|
8446
|
-
dataAssemblyId:
|
|
8447
|
-
version:
|
|
8387
|
+
dataAssemblyId: z123.string().describe("The ID of the data assembly to unpublish"),
|
|
8388
|
+
version: z123.number().describe(
|
|
8448
8389
|
"REQUIRED. The data assembly's sys.version as returned by get_data_assembly. You must call get_data_assembly first to read the current state and version. The unpublish is rejected if this does not match the current version, which means the data assembly changed since you read it."
|
|
8449
8390
|
)
|
|
8450
8391
|
});
|
|
@@ -8597,9 +8538,9 @@ function createDataAssemblyTools(config) {
|
|
|
8597
8538
|
}
|
|
8598
8539
|
|
|
8599
8540
|
// src/tools/exo/design-tokens/getDesignToken.ts
|
|
8600
|
-
import { z as
|
|
8541
|
+
import { z as z124 } from "zod";
|
|
8601
8542
|
var GetDesignTokenToolParams = BaseToolSchema.extend({
|
|
8602
|
-
designTokenId:
|
|
8543
|
+
designTokenId: z124.string().describe("The ID of the design token to retrieve details for")
|
|
8603
8544
|
});
|
|
8604
8545
|
function getDesignTokenTool(config) {
|
|
8605
8546
|
async function tool2(args) {
|
|
@@ -8617,12 +8558,12 @@ function getDesignTokenTool(config) {
|
|
|
8617
8558
|
}
|
|
8618
8559
|
|
|
8619
8560
|
// src/tools/exo/design-tokens/listDesignTokens.ts
|
|
8620
|
-
import { z as
|
|
8561
|
+
import { z as z125 } from "zod";
|
|
8621
8562
|
var ListDesignTokensToolParams = BaseToolSchema.extend({
|
|
8622
|
-
limit:
|
|
8623
|
-
pageNext:
|
|
8624
|
-
pagePrev:
|
|
8625
|
-
type:
|
|
8563
|
+
limit: z125.number().optional().describe("Maximum number of design tokens to return (max 10)"),
|
|
8564
|
+
pageNext: z125.string().optional().describe("Cursor token to fetch the next page of results"),
|
|
8565
|
+
pagePrev: z125.string().optional().describe("Cursor token to fetch the previous page of results"),
|
|
8566
|
+
type: z125.enum(DTCG_DESIGN_PROPERTY_TYPES).optional().describe("Filter to design tokens of this DTCG type (e.g. DTCG.Color)")
|
|
8626
8567
|
});
|
|
8627
8568
|
function listDesignTokensTool(config) {
|
|
8628
8569
|
async function tool2(args) {
|
|
@@ -8652,14 +8593,14 @@ function listDesignTokensTool(config) {
|
|
|
8652
8593
|
}
|
|
8653
8594
|
|
|
8654
8595
|
// src/tools/exo/design-tokens/upsertDesignToken.ts
|
|
8655
|
-
import { z as
|
|
8596
|
+
import { z as z126 } from "zod";
|
|
8656
8597
|
var UpsertDesignTokenToolParams = BaseToolSchema.extend({
|
|
8657
|
-
designTokenId:
|
|
8658
|
-
version:
|
|
8598
|
+
designTokenId: z126.string().describe("The ID of the design token to create or update"),
|
|
8599
|
+
version: z126.number().optional().describe(
|
|
8659
8600
|
"The design token's sys.version, required when updating an existing token. You must call get_design_token first to read the current state and version. The update is rejected if this does not match the current version, which means the token changed since you read it. Omit this entirely to create a new design token with this designTokenId \u2014 in that case name and type are required. Design tokens have no separate publish step: every upsert auto-publishes server-side, which bumps sys.version by 2 (not 1) per call."
|
|
8660
8601
|
),
|
|
8661
|
-
name:
|
|
8662
|
-
type:
|
|
8602
|
+
name: z126.string().optional().describe("The name of the design token; required when creating"),
|
|
8603
|
+
type: z126.enum(DTCG_DESIGN_PROPERTY_TYPES).optional().describe("The DTCG type of the design token; required when creating"),
|
|
8663
8604
|
metadata: ExoMetadataSchema.optional().describe(
|
|
8664
8605
|
"ExO metadata (tags, concepts); replaces existing if provided"
|
|
8665
8606
|
)
|
|
@@ -8718,13 +8659,13 @@ function upsertDesignTokenTool(config) {
|
|
|
8718
8659
|
}
|
|
8719
8660
|
|
|
8720
8661
|
// src/tools/exo/design-tokens/deleteDesignToken.ts
|
|
8721
|
-
import { z as
|
|
8662
|
+
import { z as z127 } from "zod";
|
|
8722
8663
|
var DeleteDesignTokenToolParams = BaseToolSchema.extend({
|
|
8723
|
-
designTokenId:
|
|
8724
|
-
confirm:
|
|
8664
|
+
designTokenId: z127.string().describe("The ID of the design token to delete"),
|
|
8665
|
+
confirm: z127.boolean().optional().describe(
|
|
8725
8666
|
"Set to true on the second call to actually perform the deletion. Required together with confirmToken."
|
|
8726
8667
|
),
|
|
8727
|
-
confirmToken:
|
|
8668
|
+
confirmToken: z127.string().optional().describe(
|
|
8728
8669
|
"Token returned by the preview call; must be supplied with confirm: true."
|
|
8729
8670
|
)
|
|
8730
8671
|
});
|