@smartbear/mcp 0.12.1 → 0.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -6
- package/dist/bugsnag/client/api/CurrentUser.js +50 -26
- package/dist/bugsnag/client/api/Error.js +156 -93
- package/dist/bugsnag/client/api/Project.js +398 -276
- package/dist/bugsnag/client/api/api.js +4087 -3837
- package/dist/bugsnag/client/api/base.js +155 -173
- package/dist/bugsnag/client/api/configuration.js +28 -25
- package/dist/bugsnag/client/filters.js +11 -20
- package/dist/bugsnag/client.js +1398 -1281
- package/dist/bugsnag/input-schemas.js +39 -57
- package/dist/collaborator/client.js +335 -371
- package/dist/common/bugsnag.js +5 -3
- package/dist/common/cache.js +50 -57
- package/dist/common/client-registry.js +106 -119
- package/dist/common/info.js +7 -3
- package/dist/common/register-clients.js +0 -16
- package/dist/common/server.js +270 -228
- package/dist/common/tools.js +19 -0
- package/dist/common/transport-http.js +252 -343
- package/dist/common/transport-stdio.js +40 -37
- package/dist/common/zod-utils.js +20 -0
- package/dist/index.js +18 -23
- package/dist/package.json.js +11 -0
- package/dist/pactflow/client/ai.js +142 -169
- package/dist/pactflow/client/base.js +41 -51
- package/dist/pactflow/client/prompt-utils.js +93 -84
- package/dist/pactflow/client/prompts.js +95 -92
- package/dist/pactflow/client/tools.js +94 -83
- package/dist/pactflow/client/utils.js +60 -64
- package/dist/pactflow/client.js +399 -320
- package/dist/qmetry/client/api/client-api.js +43 -41
- package/dist/qmetry/client/api/error-handler.js +264 -310
- package/dist/qmetry/client/auto-resolve.js +78 -99
- package/dist/qmetry/client/automation.js +139 -162
- package/dist/qmetry/client/handlers.js +49 -46
- package/dist/qmetry/client/issues.js +133 -115
- package/dist/qmetry/client/project.js +153 -174
- package/dist/qmetry/client/requirement.js +82 -70
- package/dist/qmetry/client/testcase.js +240 -208
- package/dist/qmetry/client/testsuite.js +332 -293
- package/dist/qmetry/client/tools/automation-tools.js +291 -288
- package/dist/qmetry/client/tools/index.js +16 -13
- package/dist/qmetry/client/tools/issue-tools.js +534 -543
- package/dist/qmetry/client/tools/project-tools.js +635 -656
- package/dist/qmetry/client/tools/requirement-tools.js +525 -528
- package/dist/qmetry/client/tools/testcase-tools.js +773 -786
- package/dist/qmetry/client/tools/testsuite-tools.js +1069 -1083
- package/dist/qmetry/client/utils.js +8 -14
- package/dist/qmetry/client.js +111 -109
- package/dist/qmetry/config/constants.js +48 -44
- package/dist/qmetry/config/rest-endpoints.js +51 -48
- package/dist/qmetry/types/automation.js +7 -7
- package/dist/qmetry/types/common.js +763 -1049
- package/dist/qmetry/types/issues.js +26 -19
- package/dist/qmetry/types/project.js +32 -25
- package/dist/qmetry/types/requirements.js +26 -21
- package/dist/qmetry/types/testcase.js +55 -44
- package/dist/qmetry/types/testsuite.js +66 -52
- package/dist/reflect/client.js +284 -226
- package/dist/swagger/client/api.js +645 -662
- package/dist/swagger/client/configuration.js +31 -33
- package/dist/swagger/client/portal-types.js +204 -244
- package/dist/swagger/client/registry-types.js +62 -96
- package/dist/swagger/client/tools.js +148 -158
- package/dist/swagger/client/user-management-types.js +11 -22
- package/dist/swagger/client.js +143 -135
- package/dist/swagger/config-utils.js +10 -16
- package/dist/zephyr/client.js +43 -42
- package/dist/zephyr/common/api-client.js +35 -30
- package/dist/zephyr/common/auth-service.js +16 -13
- package/dist/zephyr/common/rest-api-schemas.js +3173 -5146
- package/dist/zephyr/tool/environment/get-environments.js +66 -66
- package/dist/zephyr/tool/priority/get-priorities.js +41 -41
- package/dist/zephyr/tool/project/get-project.js +37 -37
- package/dist/zephyr/tool/project/get-projects.js +46 -46
- package/dist/zephyr/tool/status/get-statuses.js +47 -47
- package/dist/zephyr/tool/test-case/get-test-case.js +37 -37
- package/dist/zephyr/tool/test-case/get-test-cases.js +62 -62
- package/dist/zephyr/tool/test-cycle/get-test-cycle.js +37 -37
- package/dist/zephyr/tool/test-cycle/get-test-cycles.js +70 -70
- package/dist/zephyr/tool/test-execution/get-test-execution.js +37 -37
- package/dist/zephyr/tool/test-execution/get-test-executions.js +43 -43
- package/package.json +5 -5
- package/dist/bugsnag/client/api/index.js +0 -6
- package/dist/common/types.js +0 -6
- package/dist/qmetry/client/tools/types.js +0 -1
- package/dist/swagger/client/index.js +0 -6
- package/dist/tests/unit/bugsnag/utils/factories.js +0 -86
- package/dist/zephyr/tool/zephyr-tool.js +0 -1
|
@@ -1,34 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
return {
|
|
30
|
-
...this.headers,
|
|
31
|
-
"User-Agent": userAgent,
|
|
32
|
-
};
|
|
33
|
-
}
|
|
1
|
+
class SwaggerConfiguration {
|
|
2
|
+
token;
|
|
3
|
+
portalBasePath;
|
|
4
|
+
registryBasePath;
|
|
5
|
+
uiBasePath;
|
|
6
|
+
userManagementBasePath;
|
|
7
|
+
headers;
|
|
8
|
+
constructor(param) {
|
|
9
|
+
this.token = param.token;
|
|
10
|
+
this.portalBasePath = param.portalBasePath || "https://api.portal.swaggerhub.com/v1";
|
|
11
|
+
this.registryBasePath = param.registryBasePath || "https://api.swaggerhub.com";
|
|
12
|
+
this.uiBasePath = param.uiBasePath || "https://app.swaggerhub.com";
|
|
13
|
+
this.userManagementBasePath = param.userManagementBasePath || `${this.uiBasePath}/user-management/v1`;
|
|
14
|
+
this.headers = {
|
|
15
|
+
Authorization: `Bearer ${this.token}`,
|
|
16
|
+
"Content-Type": "application/json",
|
|
17
|
+
...param.headers
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Get headers with User-Agent included
|
|
22
|
+
*/
|
|
23
|
+
getHeaders(userAgent) {
|
|
24
|
+
return {
|
|
25
|
+
...this.headers,
|
|
26
|
+
"User-Agent": userAgent
|
|
27
|
+
};
|
|
28
|
+
}
|
|
34
29
|
}
|
|
30
|
+
export {
|
|
31
|
+
SwaggerConfiguration
|
|
32
|
+
};
|
|
@@ -1,258 +1,218 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
.describe("Portal UUID or subdomain - unique identifier for the portal instance"),
|
|
2
|
+
const PortalArgsSchema = z.object({
|
|
3
|
+
portalId: z.string().describe(
|
|
4
|
+
"Portal UUID or subdomain - unique identifier for the portal instance"
|
|
5
|
+
)
|
|
7
6
|
});
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
const ProductArgsSchema = z.object({
|
|
8
|
+
productId: z.string().describe(
|
|
9
|
+
"Product UUID or identifier in the format 'portal-subdomain:product-slug' - unique identifier for the product"
|
|
10
|
+
)
|
|
12
11
|
});
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
page
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
.number()
|
|
27
|
-
.optional()
|
|
28
|
-
.describe("Number of items per page for pagination - controls how many results are returned per page (default is 20)"),
|
|
12
|
+
const GetProductSectionsArgsSchema = z.object({
|
|
13
|
+
productId: z.string().describe(
|
|
14
|
+
"Product UUID or identifier in the format 'portal-subdomain:product-slug' - unique identifier for the product"
|
|
15
|
+
),
|
|
16
|
+
embed: z.array(z.string()).optional().describe(
|
|
17
|
+
"List of related entities to embed in the response - e.g., ['tableOfContents', 'tableOfContents.swaggerhubApi'] to include table of contents and SwaggerHub API details"
|
|
18
|
+
),
|
|
19
|
+
page: z.number().optional().describe(
|
|
20
|
+
"Page number for paginated results - specifies which page of results to retrieve (default is 1)"
|
|
21
|
+
),
|
|
22
|
+
size: z.number().optional().describe(
|
|
23
|
+
"Number of items per page for pagination - controls how many results are returned per page (default is 20)"
|
|
24
|
+
)
|
|
29
25
|
});
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
page
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
.number()
|
|
44
|
-
.optional()
|
|
45
|
-
.describe("Number of items per page for pagination - controls how many results are returned per page (default is 20)"),
|
|
26
|
+
const GetTableOfContentsArgsSchema = z.object({
|
|
27
|
+
sectionId: z.string().describe(
|
|
28
|
+
"Section ID - unique identifier for the section within the product"
|
|
29
|
+
),
|
|
30
|
+
embed: z.array(z.string()).optional().describe(
|
|
31
|
+
"List of related entities to embed in the response - e.g., ['swaggerhubApi'] to include SwaggerHub API details"
|
|
32
|
+
),
|
|
33
|
+
page: z.number().optional().describe(
|
|
34
|
+
"Page number for paginated results - specifies which page of results to retrieve (default is 1)"
|
|
35
|
+
),
|
|
36
|
+
size: z.number().optional().describe(
|
|
37
|
+
"Number of items per page for pagination - controls how many results are returned per page (default is 20)"
|
|
38
|
+
)
|
|
46
39
|
});
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
})
|
|
88
|
-
.optional()
|
|
89
|
-
.describe("Content configuration for the table of contents item")
|
|
90
|
-
.refine((content) => {
|
|
91
|
-
if (content?.type === "apiUrl") {
|
|
92
|
-
return (content.url?.endsWith("/swagger.json") ||
|
|
93
|
-
content.url?.endsWith("/swagger.yaml"));
|
|
94
|
-
}
|
|
95
|
-
return true;
|
|
96
|
-
}, {
|
|
97
|
-
message: "URL must end with '/swagger.json' when content type is 'apiUrl'",
|
|
98
|
-
path: ["url"],
|
|
99
|
-
}),
|
|
40
|
+
const CreateTableOfContentsArgsSchema = z.object({
|
|
41
|
+
sectionId: z.string().describe(
|
|
42
|
+
"Section ID - unique identifier for the section within the product"
|
|
43
|
+
),
|
|
44
|
+
type: z.enum(["new", "copy"]).describe(
|
|
45
|
+
"Type of table of contents creation - 'new' to create from scratch or 'copy' to duplicate an existing one"
|
|
46
|
+
),
|
|
47
|
+
title: z.string().describe(
|
|
48
|
+
"Title of the table of contents item - will be displayed in navigation (3-40 characters)"
|
|
49
|
+
),
|
|
50
|
+
slug: z.string().describe(
|
|
51
|
+
"URL-friendly identifier for the table of contents item - must be unique within the section (3-22 characters, lowercase, alphanumeric with hyphens/underscores/dots)"
|
|
52
|
+
),
|
|
53
|
+
order: z.number().describe(
|
|
54
|
+
"Order position of the table of contents item within its parent section or item"
|
|
55
|
+
),
|
|
56
|
+
parentId: z.string().nullable().optional().describe(
|
|
57
|
+
"Parent table of contents item ID - null for top-level items, or ID of parent item for nested structure"
|
|
58
|
+
),
|
|
59
|
+
content: z.object({
|
|
60
|
+
type: z.enum(["apiUrl", "html", "markdown"]).describe(
|
|
61
|
+
"Content type - 'apiUrl' for API references, 'html' for HTML content, or 'markdown' for Markdown content"
|
|
62
|
+
),
|
|
63
|
+
url: z.string().optional().describe(
|
|
64
|
+
"URL for API reference content (required when type is 'apiUrl')"
|
|
65
|
+
),
|
|
66
|
+
apiSpec: z.string().nullable().optional().describe("API specification format for API URL content"),
|
|
67
|
+
documentId: z.string().nullable().optional().describe("Document ID for HTML or Markdown content")
|
|
68
|
+
}).optional().describe("Content configuration for the table of contents item").refine(
|
|
69
|
+
(content) => {
|
|
70
|
+
if (content?.type === "apiUrl") {
|
|
71
|
+
return content.url?.endsWith("/swagger.json") || content.url?.endsWith("/swagger.yaml");
|
|
72
|
+
}
|
|
73
|
+
return true;
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
message: "URL must end with '/swagger.json' or '/swagger.yaml' when content type is 'apiUrl'",
|
|
77
|
+
path: ["url"]
|
|
78
|
+
}
|
|
79
|
+
)
|
|
100
80
|
});
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
subdomain
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
.optional()
|
|
127
|
-
.describe("OpenAPI renderer type: 'SWAGGER_UI' (Swagger UI), 'ELEMENTS' (Stoplight Elements), or 'TOGGLE' (allows switching between both with Elements as default). Defaults to 'TOGGLE'"),
|
|
128
|
-
pageContentFormat: z
|
|
129
|
-
.string()
|
|
130
|
-
.optional()
|
|
131
|
-
.describe("Format for page content rendering - determines how documentation pages are processed: 'HTML', 'MARKDOWN', or 'BOTH'. Defaults to 'HTML'"),
|
|
81
|
+
const CreatePortalArgsSchema = z.object({
|
|
82
|
+
name: z.string().optional().describe(
|
|
83
|
+
"The display name for the portal - shown to users and in branding (3-40 characters)"
|
|
84
|
+
),
|
|
85
|
+
subdomain: z.string().describe(
|
|
86
|
+
"The portal subdomain - used in the portal URL (e.g., 'myportal' for myportal.example.com). Must be unique, lowercase, 3-20 characters, alphanumeric with hyphens"
|
|
87
|
+
),
|
|
88
|
+
offline: z.boolean().optional().describe(
|
|
89
|
+
"If true, the portal will not be visible to customers - useful for development/staging environments. Defaults to false"
|
|
90
|
+
),
|
|
91
|
+
routing: z.string().optional().describe(
|
|
92
|
+
"Routing strategy for the portal - either 'browser' (client-side routing) or 'proxy' (server-side routing). Defaults to 'browser'"
|
|
93
|
+
),
|
|
94
|
+
credentialsEnabled: z.boolean().optional().describe(
|
|
95
|
+
"Whether authentication credentials are enabled for accessing the portal. When true, users can authenticate to access private content. Defaults to true"
|
|
96
|
+
),
|
|
97
|
+
swaggerHubOrganizationId: z.string().describe(
|
|
98
|
+
"The corresponding SwaggerHub organization UUID - required for portal creation. This links the portal to your SwaggerHub organization"
|
|
99
|
+
),
|
|
100
|
+
openapiRenderer: z.string().optional().describe(
|
|
101
|
+
"OpenAPI renderer type: 'SWAGGER_UI' (Swagger UI), 'ELEMENTS' (Stoplight Elements), or 'TOGGLE' (allows switching between both with Elements as default). Defaults to 'TOGGLE'"
|
|
102
|
+
),
|
|
103
|
+
pageContentFormat: z.string().optional().describe(
|
|
104
|
+
"Format for page content rendering - determines how documentation pages are processed: 'HTML', 'MARKDOWN', or 'BOTH'. Defaults to 'HTML'"
|
|
105
|
+
)
|
|
132
106
|
});
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
subdomain
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
.describe("Enable/disable authentication credentials for portal access - controls whether users can authenticate to view private content"),
|
|
162
|
-
openapiRenderer: z
|
|
163
|
-
.string()
|
|
164
|
-
.optional()
|
|
165
|
-
.describe("Change OpenAPI renderer: 'SWAGGER_UI' (Swagger UI), 'ELEMENTS' (Stoplight Elements), or 'TOGGLE' (switch between both)"),
|
|
166
|
-
pageContentFormat: z
|
|
167
|
-
.string()
|
|
168
|
-
.optional()
|
|
169
|
-
.describe("Update page content format for documentation rendering: 'HTML', 'MARKDOWN', or 'BOTH'"),
|
|
107
|
+
const UpdatePortalArgsSchema = PortalArgsSchema.extend({
|
|
108
|
+
name: z.string().optional().describe(
|
|
109
|
+
"Update the portal display name - shown to users and in branding (3-40 characters)"
|
|
110
|
+
),
|
|
111
|
+
subdomain: z.string().optional().describe(
|
|
112
|
+
"Update the portal subdomain - changes the portal URL. Must remain unique across all portals (3-20 characters, lowercase, alphanumeric with hyphens)"
|
|
113
|
+
),
|
|
114
|
+
customDomain: z.boolean().optional().describe(
|
|
115
|
+
"Enable/disable custom domain for the portal - allows using your own domain instead of the default subdomain"
|
|
116
|
+
),
|
|
117
|
+
gtmKey: z.string().optional().describe(
|
|
118
|
+
"Google Tag Manager key for analytics tracking - format: GTM-XXXXXX (max 25 characters)"
|
|
119
|
+
),
|
|
120
|
+
offline: z.boolean().optional().describe(
|
|
121
|
+
"Set portal visibility - true hides portal from customers (useful for maintenance or development)"
|
|
122
|
+
),
|
|
123
|
+
routing: z.string().optional().describe(
|
|
124
|
+
"Update routing strategy - 'browser' for client-side routing or 'proxy' for server-side routing"
|
|
125
|
+
),
|
|
126
|
+
credentialsEnabled: z.boolean().optional().describe(
|
|
127
|
+
"Enable/disable authentication credentials for portal access - controls whether users can authenticate to view private content"
|
|
128
|
+
),
|
|
129
|
+
openapiRenderer: z.string().optional().describe(
|
|
130
|
+
"Change OpenAPI renderer: 'SWAGGER_UI' (Swagger UI), 'ELEMENTS' (Stoplight Elements), or 'TOGGLE' (switch between both)"
|
|
131
|
+
),
|
|
132
|
+
pageContentFormat: z.string().optional().describe(
|
|
133
|
+
"Update page content format for documentation rendering: 'HTML', 'MARKDOWN', or 'BOTH'"
|
|
134
|
+
)
|
|
170
135
|
});
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
.optional()
|
|
197
|
-
.describe("Whether the product is hidden from the portal landing page navigation menus - useful for internal or draft products"),
|
|
198
|
-
role: z
|
|
199
|
-
.boolean()
|
|
200
|
-
.optional()
|
|
201
|
-
.describe("Whether the product has role-based access restrictions - controls if specific user roles are required to access the product"),
|
|
136
|
+
const CreateProductArgsSchema = PortalArgsSchema.extend({
|
|
137
|
+
type: z.string().describe(
|
|
138
|
+
"Product creation type - 'new' to create from scratch or 'copy' to duplicate an existing product"
|
|
139
|
+
),
|
|
140
|
+
productId: z.string().uuid().optional().describe(
|
|
141
|
+
"Source product UUID to copy from - required when type is 'copy', specifies which existing product to duplicate. Omit when type is 'new'"
|
|
142
|
+
),
|
|
143
|
+
name: z.string().describe(
|
|
144
|
+
"Product display name - will be shown to users in the portal navigation and product listings (3-40 characters)"
|
|
145
|
+
),
|
|
146
|
+
slug: z.string().describe(
|
|
147
|
+
"URL-friendly identifier for the product - must be unique within the portal, used in URLs (e.g., 'my-api' becomes /my-api). 3-22 characters, lowercase, alphanumeric with hyphens, underscores, or dots"
|
|
148
|
+
),
|
|
149
|
+
description: z.string().optional().describe(
|
|
150
|
+
"Product description - explains what the API/product does, shown in product listings and cards (max 110 characters)"
|
|
151
|
+
),
|
|
152
|
+
public: z.boolean().optional().describe(
|
|
153
|
+
"Whether the product is publicly visible to all portal visitors - false means only authenticated users with appropriate roles can access it"
|
|
154
|
+
),
|
|
155
|
+
hidden: z.boolean().optional().describe(
|
|
156
|
+
"Whether the product is hidden from the portal landing page navigation menus - useful for internal or draft products"
|
|
157
|
+
),
|
|
158
|
+
role: z.boolean().optional().describe(
|
|
159
|
+
"Whether the product has role-based access restrictions - controls if specific user roles are required to access the product"
|
|
160
|
+
)
|
|
202
161
|
});
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
.describe("Change product visibility - true makes it publicly accessible to all visitors, false restricts to authenticated users with roles"),
|
|
220
|
-
hidden: z
|
|
221
|
-
.boolean()
|
|
222
|
-
.optional()
|
|
223
|
-
.describe("Change navigation visibility - true hides from portal landing page menus while keeping the product accessible via direct links"),
|
|
162
|
+
const UpdateProductArgsSchema = ProductArgsSchema.extend({
|
|
163
|
+
name: z.string().optional().describe(
|
|
164
|
+
"Update product display name - changes how it appears to users in navigation and listings (3-40 characters)"
|
|
165
|
+
),
|
|
166
|
+
slug: z.string().optional().describe(
|
|
167
|
+
"Update URL-friendly identifier - must remain unique within the portal, affects product URLs (3-22 characters, lowercase, alphanumeric with hyphens/underscores/dots)"
|
|
168
|
+
),
|
|
169
|
+
description: z.string().optional().describe(
|
|
170
|
+
"Update product description - explains the API/product functionality, shown in listings (max 110 characters)"
|
|
171
|
+
),
|
|
172
|
+
public: z.boolean().optional().describe(
|
|
173
|
+
"Change product visibility - true makes it publicly accessible to all visitors, false restricts to authenticated users with roles"
|
|
174
|
+
),
|
|
175
|
+
hidden: z.boolean().optional().describe(
|
|
176
|
+
"Change navigation visibility - true hides from portal landing page menus while keeping the product accessible via direct links"
|
|
177
|
+
)
|
|
224
178
|
});
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
.default(false)
|
|
230
|
-
.describe("Whether to publish as preview (true) or live (false). Preview allows testing before going live. Defaults to false (live publication)"),
|
|
179
|
+
const PublishProductArgsSchema = ProductArgsSchema.extend({
|
|
180
|
+
preview: z.boolean().optional().default(false).describe(
|
|
181
|
+
"Whether to publish as preview (true) or live (false). Preview allows testing before going live. Defaults to false (live publication)"
|
|
182
|
+
)
|
|
231
183
|
});
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
documentId: z
|
|
235
|
-
.string()
|
|
236
|
-
.describe("Document UUID - unique identifier for the document"),
|
|
184
|
+
const GetDocumentArgsSchema = z.object({
|
|
185
|
+
documentId: z.string().describe("Document UUID - unique identifier for the document")
|
|
237
186
|
});
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
.enum(["html", "markdown"])
|
|
247
|
-
.optional()
|
|
248
|
-
.describe("Content type - 'html' for HTML content or 'markdown' for Markdown content"),
|
|
187
|
+
const UpdateDocumentArgsSchema = z.object({
|
|
188
|
+
documentId: z.string().describe("Document UUID - unique identifier for the document"),
|
|
189
|
+
content: z.string().describe(
|
|
190
|
+
"The document content to update (HTML or Markdown based on document type)"
|
|
191
|
+
),
|
|
192
|
+
type: z.enum(["html", "markdown"]).optional().describe(
|
|
193
|
+
"Content type - 'html' for HTML content or 'markdown' for Markdown content"
|
|
194
|
+
)
|
|
249
195
|
});
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
.describe("Flag to include all the nested tables of contents (default: false)"),
|
|
196
|
+
const DeleteTableOfContentsArgsSchema = z.object({
|
|
197
|
+
tableOfContentsId: z.string().describe(
|
|
198
|
+
"The table of contents UUID, or identifier in the format 'portal-subdomain:product-slug:section-slug:table-of-contents-slug'"
|
|
199
|
+
),
|
|
200
|
+
recursive: z.boolean().optional().describe(
|
|
201
|
+
"Flag to include all the nested tables of contents (default: false)"
|
|
202
|
+
)
|
|
258
203
|
});
|
|
204
|
+
export {
|
|
205
|
+
CreatePortalArgsSchema,
|
|
206
|
+
CreateProductArgsSchema,
|
|
207
|
+
CreateTableOfContentsArgsSchema,
|
|
208
|
+
DeleteTableOfContentsArgsSchema,
|
|
209
|
+
GetDocumentArgsSchema,
|
|
210
|
+
GetProductSectionsArgsSchema,
|
|
211
|
+
GetTableOfContentsArgsSchema,
|
|
212
|
+
PortalArgsSchema,
|
|
213
|
+
ProductArgsSchema,
|
|
214
|
+
PublishProductArgsSchema,
|
|
215
|
+
UpdateDocumentArgsSchema,
|
|
216
|
+
UpdatePortalArgsSchema,
|
|
217
|
+
UpdateProductArgsSchema
|
|
218
|
+
};
|