@avallon-labs/mcp 70.2.0-staging.1509 → 70.3.0-staging.1510

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.js CHANGED
@@ -56,5 +56,5 @@ function describeErrors(body) {
56
56
 
57
57
  // src/index.ts
58
58
  setupFetch();
59
- await import("./server-NDNGGNCB.js");
59
+ await import("./server-GCA6K2SY.js");
60
60
  //# sourceMappingURL=index.js.map
@@ -4019,6 +4019,21 @@ var getCaseTypeVersion = async (caseTypeSlug, version, options) => {
4019
4019
  const data = body ? JSON.parse(body) : {};
4020
4020
  return { data, status: res.status, headers: res.headers };
4021
4021
  };
4022
+ var getGetCaseTypeViewTemplateUrl = (caseTypeSlug, version) => {
4023
+ return `/v1/case-types/${caseTypeSlug}/versions/${version}/view-template`;
4024
+ };
4025
+ var getCaseTypeViewTemplate = async (caseTypeSlug, version, options) => {
4026
+ const res = await fetch(
4027
+ getGetCaseTypeViewTemplateUrl(caseTypeSlug, version),
4028
+ {
4029
+ ...options,
4030
+ method: "GET"
4031
+ }
4032
+ );
4033
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
4034
+ const data = body ? JSON.parse(body) : {};
4035
+ return { data, status: res.status, headers: res.headers };
4036
+ };
4022
4037
  var getPromoteCaseTypeVersionUrl = (caseTypeSlug, version) => {
4023
4038
  return `/v1/case-types/${caseTypeSlug}/versions/${version}/promote`;
4024
4039
  };
@@ -9253,6 +9268,29 @@ var getCaseTypeVersionHandler = async (args, options) => {
9253
9268
  structuredContent: res.data
9254
9269
  };
9255
9270
  };
9271
+ var getCaseTypeViewTemplateHandler = async (args, options) => {
9272
+ const res = await getCaseTypeViewTemplate(args.pathParams.caseTypeSlug, args.pathParams.version, options);
9273
+ if (res.status >= 400) {
9274
+ return {
9275
+ content: [
9276
+ {
9277
+ type: "text",
9278
+ text: JSON.stringify(res.data ?? null)
9279
+ }
9280
+ ],
9281
+ isError: true
9282
+ };
9283
+ }
9284
+ return {
9285
+ content: [
9286
+ {
9287
+ type: "text",
9288
+ text: JSON.stringify(res.data ?? null)
9289
+ }
9290
+ ],
9291
+ structuredContent: res.data
9292
+ };
9293
+ };
9256
9294
  var promoteCaseTypeVersionHandler = async (args, options) => {
9257
9295
  const res = await promoteCaseTypeVersion(args.pathParams.caseTypeSlug, args.pathParams.version, args.bodyParams, options);
9258
9296
  if (res.status >= 400) {
@@ -15804,7 +15842,8 @@ var UpdateCaseTypeParams = zod.object({
15804
15842
  "caseTypeSlug": zod.string()
15805
15843
  });
15806
15844
  var UpdateCaseTypeBody = zod.object({
15807
- "name": zod.string().min(1).optional()
15845
+ "name": zod.string().min(1).optional(),
15846
+ "view_template": zod.union([zod.string().min(1), zod.null()]).optional()
15808
15847
  });
15809
15848
  var UpdateCaseTypeResponse = zod.object({
15810
15849
  "data": zod.object({
@@ -15892,6 +15931,18 @@ var GetCaseTypeVersionResponse = zod.object({
15892
15931
  }),
15893
15932
  "message": zod.string()
15894
15933
  });
15934
+ var getCaseTypeViewTemplatePathVersionMax = 9007199254740991;
15935
+ var GetCaseTypeViewTemplateParams = zod.object({
15936
+ "caseTypeSlug": zod.string(),
15937
+ "version": zod.number().int().min(1).max(getCaseTypeViewTemplatePathVersionMax)
15938
+ });
15939
+ var GetCaseTypeViewTemplateResponse = zod.object({
15940
+ "data": zod.object({
15941
+ "version": zod.number(),
15942
+ "view_template": zod.union([zod.string(), zod.null()])
15943
+ }),
15944
+ "message": zod.string()
15945
+ });
15895
15946
  var PromoteCaseTypeVersionParams = zod.object({
15896
15947
  "caseTypeSlug": zod.string(),
15897
15948
  "version": zod.number()
@@ -19961,7 +20012,7 @@ var createMcpServer = (options) => {
19961
20012
  "updateCaseType",
19962
20013
  {
19963
20014
  title: "Update case type",
19964
- description: "Update a case type. Its fields are changed through `/v1/case-types/{caseTypeSlug}/fields`.",
20015
+ description: "Update a case type. Its fields are changed through `/v1/case-types/{caseTypeSlug}/fields`. Setting `view_template`, or removing it with null, creates a new version; its placeholders must name fields of the case type.",
19965
20016
  inputSchema: {
19966
20017
  pathParams: UpdateCaseTypeParams,
19967
20018
  bodyParams: UpdateCaseTypeBody.optional()
@@ -20007,6 +20058,22 @@ var createMcpServer = (options) => {
20007
20058
  signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
20008
20059
  })
20009
20060
  );
20061
+ tools.getCaseTypeViewTemplate = server2.registerTool(
20062
+ "getCaseTypeViewTemplate",
20063
+ {
20064
+ title: "Get case type view template",
20065
+ description: "Retrieve the Overview template of a case type at a specific version, or null when it has none.",
20066
+ inputSchema: {
20067
+ pathParams: GetCaseTypeViewTemplateParams
20068
+ },
20069
+ outputSchema: GetCaseTypeViewTemplateResponse,
20070
+ annotations: { readOnlyHint: true }
20071
+ },
20072
+ (args, ctx) => getCaseTypeViewTemplateHandler(args, {
20073
+ ...options,
20074
+ signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
20075
+ })
20076
+ );
20010
20077
  tools.promoteCaseTypeVersion = server2.registerTool(
20011
20078
  "promoteCaseTypeVersion",
20012
20079
  {
@@ -20575,4 +20642,4 @@ var transport = new StdioServerTransport();
20575
20642
  server.connect(transport).then(() => {
20576
20643
  console.error("MCP server running on stdio");
20577
20644
  }).catch(console.error);
20578
- //# sourceMappingURL=server-NDNGGNCB.js.map
20645
+ //# sourceMappingURL=server-GCA6K2SY.js.map