@steuerboard/mcp 0.0.1 → 0.0.7

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.
Files changed (99) hide show
  1. package/README.md +18 -23
  2. package/bin/mcp-server.js +362 -173
  3. package/bin/mcp-server.js.map +23 -19
  4. package/esm/src/cloudflare-worker/cloudflare-worker.d.ts +1 -1
  5. package/esm/src/cloudflare-worker/cloudflare-worker.d.ts.map +1 -1
  6. package/esm/src/cloudflare-worker/cloudflare-worker.js +8 -5
  7. package/esm/src/cloudflare-worker/cloudflare-worker.js.map +1 -1
  8. package/esm/src/cloudflare-worker/landing-page.d.ts +1 -1
  9. package/esm/src/cloudflare-worker/landing-page.d.ts.map +1 -1
  10. package/esm/src/cloudflare-worker/landing-page.js +9 -9
  11. package/esm/src/cloudflare-worker/landing-page.js.map +1 -1
  12. package/esm/src/funcs/adminClientsCreateClient.d.ts +17 -0
  13. package/esm/src/funcs/adminClientsCreateClient.d.ts.map +1 -0
  14. package/esm/src/funcs/adminClientsCreateClient.js +91 -0
  15. package/esm/src/funcs/adminClientsCreateClient.js.map +1 -0
  16. package/esm/src/funcs/adminClientsListClients.d.ts.map +1 -1
  17. package/esm/src/funcs/adminClientsListClients.js +23 -15
  18. package/esm/src/funcs/adminClientsListClients.js.map +1 -1
  19. package/esm/src/funcs/filesListFiles.d.ts.map +1 -1
  20. package/esm/src/funcs/filesListFiles.js +18 -10
  21. package/esm/src/funcs/filesListFiles.js.map +1 -1
  22. package/esm/src/funcs/healthCheckGetV1Ping.d.ts +1 -1
  23. package/esm/src/funcs/healthCheckGetV1Ping.d.ts.map +1 -1
  24. package/esm/src/funcs/healthCheckGetV1Ping.js +3 -7
  25. package/esm/src/funcs/healthCheckGetV1Ping.js.map +1 -1
  26. package/esm/src/funcs/tasksListTasks.d.ts.map +1 -1
  27. package/esm/src/funcs/tasksListTasks.js +17 -10
  28. package/esm/src/funcs/tasksListTasks.js.map +1 -1
  29. package/esm/src/funcs/workspacesListWorkspaces.d.ts.map +1 -1
  30. package/esm/src/funcs/workspacesListWorkspaces.js +17 -9
  31. package/esm/src/funcs/workspacesListWorkspaces.js.map +1 -1
  32. package/esm/src/lib/config.d.ts +3 -3
  33. package/esm/src/lib/config.d.ts.map +1 -1
  34. package/esm/src/lib/config.js +3 -3
  35. package/esm/src/lib/config.js.map +1 -1
  36. package/esm/src/mcp-server/mcp-server.js +1 -1
  37. package/esm/src/mcp-server/server.d.ts.map +1 -1
  38. package/esm/src/mcp-server/server.js +3 -1
  39. package/esm/src/mcp-server/server.js.map +1 -1
  40. package/esm/src/mcp-server/tools/adminClientsCreateClient.d.ts +7 -0
  41. package/esm/src/mcp-server/tools/adminClientsCreateClient.d.ts.map +1 -0
  42. package/esm/src/mcp-server/tools/adminClientsCreateClient.js +28 -0
  43. package/esm/src/mcp-server/tools/adminClientsCreateClient.js.map +1 -0
  44. package/esm/src/mcp-server/tools/adminClientsListClients.d.ts.map +1 -1
  45. package/esm/src/mcp-server/tools/adminClientsListClients.js +1 -2
  46. package/esm/src/mcp-server/tools/adminClientsListClients.js.map +1 -1
  47. package/esm/src/mcp-server/tools/healthCheckGetV1Ping.js +1 -1
  48. package/esm/src/mcp-server/tools/healthCheckGetV1Ping.js.map +1 -1
  49. package/esm/src/mcp-server/tools.d.ts.map +1 -1
  50. package/esm/src/mcp-server/tools.js +10 -11
  51. package/esm/src/mcp-server/tools.js.map +1 -1
  52. package/esm/src/models/client.d.ts +4 -4
  53. package/esm/src/models/client.d.ts.map +1 -1
  54. package/esm/src/models/client.js +4 -4
  55. package/esm/src/models/client.js.map +1 -1
  56. package/esm/src/models/clientcreate.d.ts +25 -0
  57. package/esm/src/models/clientcreate.d.ts.map +1 -0
  58. package/esm/src/models/clientcreate.js +27 -0
  59. package/esm/src/models/clientcreate.js.map +1 -0
  60. package/esm/src/models/createclientop.d.ts +40 -0
  61. package/esm/src/models/createclientop.d.ts.map +1 -0
  62. package/esm/src/models/createclientop.js +37 -0
  63. package/esm/src/models/createclientop.js.map +1 -0
  64. package/esm/src/models/getv1meop.d.ts +2 -1
  65. package/esm/src/models/getv1meop.d.ts.map +1 -1
  66. package/esm/src/models/getv1meop.js +2 -1
  67. package/esm/src/models/getv1meop.js.map +1 -1
  68. package/esm/src/models/listclientsop.d.ts +1 -1
  69. package/esm/src/models/listclientsop.d.ts.map +1 -1
  70. package/esm/src/models/listclientsop.js +2 -2
  71. package/esm/src/models/listclientsop.js.map +1 -1
  72. package/esm/src/models/listtasksop.d.ts +0 -1
  73. package/esm/src/models/listtasksop.d.ts.map +1 -1
  74. package/esm/src/models/listtasksop.js +0 -1
  75. package/esm/src/models/listtasksop.js.map +1 -1
  76. package/manifest.json +10 -6
  77. package/package.json +7 -6
  78. package/src/cloudflare-worker/cloudflare-worker.ts +12 -9
  79. package/src/cloudflare-worker/landing-page.ts +9 -9
  80. package/src/funcs/adminClientsCreateClient.ts +171 -0
  81. package/src/funcs/adminClientsListClients.ts +137 -131
  82. package/src/funcs/filesListFiles.ts +136 -130
  83. package/src/funcs/healthCheckGetV1Ping.ts +3 -7
  84. package/src/funcs/tasksListTasks.ts +129 -124
  85. package/src/funcs/workspacesListWorkspaces.ts +135 -129
  86. package/src/lib/config.ts +4 -3
  87. package/src/mcp-server/mcp-server.ts +1 -1
  88. package/src/mcp-server/server.ts +3 -1
  89. package/src/mcp-server/tools/adminClientsCreateClient.ts +37 -0
  90. package/src/mcp-server/tools/adminClientsListClients.ts +22 -24
  91. package/src/mcp-server/tools/healthCheckGetV1Ping.ts +1 -1
  92. package/src/mcp-server/tools.ts +96 -98
  93. package/src/models/client.ts +8 -6
  94. package/src/models/clientcreate.ts +56 -0
  95. package/src/models/createclientop.ts +112 -0
  96. package/src/models/getv1meop.ts +4 -2
  97. package/src/models/listclientsop.ts +4 -2
  98. package/src/models/listtasksop.ts +0 -2
  99. package/worker-configuration.d.ts +7024 -6203
@@ -7,33 +7,31 @@ import { ListClientsRequest$zodSchema } from "../../models/listclientsop.js";
7
7
  import { formatResult, ToolDefinition } from "../tools.js";
8
8
 
9
9
  const args = {
10
- request: ListClientsRequest$zodSchema.optional(),
10
+ request: ListClientsRequest$zodSchema.optional(),
11
11
  };
12
12
 
13
13
  export const tool$adminClientsListClients: ToolDefinition<typeof args> = {
14
- name: "admin-clients-list-clients",
15
- description: `List clients
14
+ name: "admin-clients-list-clients",
15
+ description: `List clients
16
16
 
17
17
  Returns a list of clients.`,
18
- args,
19
- tool: async (client, args, ctx) => {
20
- const [result, apiCall] = await adminClientsListClients(
21
- client,
22
- args.request,
23
- { fetchOptions: { signal: ctx.signal } },
24
- ).$inspect();
25
-
26
- if (!result.ok) {
27
- return {
28
- content: [{ type: "text", text: result.error.message }],
29
- isError: true,
30
- };
31
- }
32
-
33
- const value = result.value;
34
-
35
- const formattedResult = await formatResult(value, apiCall);
36
-
37
- return formattedResult;
38
- },
18
+ args,
19
+ tool: async (client, args, ctx) => {
20
+ const [result, apiCall] = await adminClientsListClients(
21
+ client,
22
+ args.request,
23
+ { fetchOptions: { signal: ctx.signal } },
24
+ ).$inspect();
25
+
26
+ if (!result.ok) {
27
+ return {
28
+ content: [{ type: "text", text: result.error.message }],
29
+ isError: true,
30
+ };
31
+ }
32
+
33
+ const value = result.value;
34
+
35
+ return formatResult(value, apiCall);
36
+ },
39
37
  };
@@ -7,7 +7,7 @@ import { formatResult, ToolDefinition } from "../tools.js";
7
7
 
8
8
  export const tool$healthCheckGetV1Ping: ToolDefinition = {
9
9
  name: "health-check-get-v1-ping",
10
- description: `Ping`,
10
+ description: `Ping Pong`,
11
11
  tool: async (client, ctx) => {
12
12
  const [result, apiCall] = await healthCheckGetV1Ping(
13
13
  client,
@@ -5,9 +5,9 @@
5
5
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
6
6
  import { RequestHandlerExtra } from "@modelcontextprotocol/sdk/shared/protocol.js";
7
7
  import {
8
- CallToolResult,
9
- ServerNotification,
10
- ServerRequest,
8
+ CallToolResult,
9
+ ServerNotification,
10
+ ServerRequest,
11
11
  } from "@modelcontextprotocol/sdk/types.js";
12
12
  import { objectOutputType, ZodRawShape, ZodTypeAny } from "zod";
13
13
  import { SteuerboardCore } from "../core.js";
@@ -16,120 +16,118 @@ import { MCPScope } from "./scopes.js";
16
16
  import { isAsyncIterable, isBinaryData, valueToBase64 } from "./shared.js";
17
17
 
18
18
  export type ToolDefinition<Args extends undefined | ZodRawShape = undefined> =
19
- Args extends ZodRawShape
20
- ? {
21
- name: string;
22
- description: string;
23
- scopes?: MCPScope[];
24
- args: Args;
25
- tool: (
26
- client: SteuerboardCore,
27
- args: objectOutputType<Args, ZodTypeAny>,
28
- extra: RequestHandlerExtra<ServerRequest, ServerNotification>,
29
- ) => CallToolResult | Promise<CallToolResult>;
30
- }
31
- : {
32
- name: string;
33
- description: string;
34
- scopes?: MCPScope[];
35
- args?: undefined;
36
- tool: (
37
- client: SteuerboardCore,
38
- extra: RequestHandlerExtra<ServerRequest, ServerNotification>,
39
- ) => CallToolResult | Promise<CallToolResult>;
40
- };
19
+ Args extends ZodRawShape ? {
20
+ name: string;
21
+ description: string;
22
+ scopes?: MCPScope[];
23
+ args: Args;
24
+ tool: (
25
+ client: SteuerboardCore,
26
+ args: objectOutputType<Args, ZodTypeAny>,
27
+ extra: RequestHandlerExtra<ServerRequest, ServerNotification>,
28
+ ) => CallToolResult | Promise<CallToolResult>;
29
+ }
30
+ : {
31
+ name: string;
32
+ description: string;
33
+ scopes?: MCPScope[];
34
+ args?: undefined;
35
+ tool: (
36
+ client: SteuerboardCore,
37
+ extra: RequestHandlerExtra<ServerRequest, ServerNotification>,
38
+ ) => CallToolResult | Promise<CallToolResult>;
39
+ };
41
40
 
42
41
  // Optional function to assist with formatting tool results
43
42
  export async function formatResult(
44
- value: unknown,
45
- init: { response?: Response | undefined },
43
+ value: unknown,
44
+ init: { response?: Response | undefined },
46
45
  ): Promise<CallToolResult> {
47
- if (typeof value === "undefined") {
48
- return { content: [] };
49
- }
46
+ if (typeof value === "undefined") {
47
+ return { content: [] };
48
+ }
50
49
 
51
- const { response } = init;
52
- const contentType = response?.headers.get("content-type") ?? "";
53
- let content: CallToolResult["content"] = [];
50
+ const { response } = init;
51
+ const contentType = response?.headers.get("content-type") ?? "";
52
+ let content: CallToolResult["content"] = [];
54
53
 
55
- if (/\bjson\b/i.test(contentType)) {
56
- content = [{ type: "text", text: JSON.stringify(value) }];
57
- } else if (
58
- contentType.startsWith("text/event-stream") &&
59
- isAsyncIterable(value)
60
- ) {
61
- content = await consumeSSE(value);
62
- } else if (contentType.startsWith("text/") && typeof value === "string") {
63
- content = [{ type: "text", text: value }];
64
- } else if (isBinaryData(value) && contentType.startsWith("image/")) {
65
- const data = await valueToBase64(value);
66
- content =
67
- data == null ? [] : [{ type: "image", data, mimeType: contentType }];
68
- } else {
69
- return {
70
- content: [
71
- {
72
- type: "text",
73
- text: `Unsupported content type: "${contentType}"`,
74
- },
75
- ],
76
- isError: true,
77
- };
78
- }
54
+ if (contentType.search(/\bjson\b/g)) {
55
+ content = [{ type: "text", text: JSON.stringify(value) }];
56
+ } else if (
57
+ contentType.startsWith("text/event-stream")
58
+ && isAsyncIterable(value)
59
+ ) {
60
+ content = await consumeSSE(value);
61
+ } else if (contentType.startsWith("text/") && typeof value === "string") {
62
+ content = [{ type: "text", text: value }];
63
+ } else if (isBinaryData(value) && contentType.startsWith("image/")) {
64
+ const data = await valueToBase64(value);
65
+ content = data == null
66
+ ? []
67
+ : [{ type: "image", data, mimeType: contentType }];
68
+ } else {
69
+ return {
70
+ content: [{
71
+ type: "text",
72
+ text: `Unsupported content type: "${contentType}"`,
73
+ }],
74
+ isError: true,
75
+ };
76
+ }
79
77
 
80
- return { content };
78
+ return { content };
81
79
  }
82
80
 
83
81
  async function consumeSSE(
84
- value: AsyncIterable<unknown>,
82
+ value: AsyncIterable<unknown>,
85
83
  ): Promise<CallToolResult["content"]> {
86
- const content: CallToolResult["content"] = [];
84
+ const content: CallToolResult["content"] = [];
87
85
 
88
- for await (const chunk of value) {
89
- if (typeof chunk === "string") {
90
- content.push({ type: "text", text: chunk });
91
- } else {
92
- content.push({ type: "text", text: JSON.stringify(chunk) });
93
- }
94
- }
86
+ for await (const chunk of value) {
87
+ if (typeof chunk === "string") {
88
+ content.push({ type: "text", text: chunk });
89
+ } else {
90
+ content.push({ type: "text", text: JSON.stringify(chunk) });
91
+ }
92
+ }
95
93
 
96
- return content;
94
+ return content;
97
95
  }
98
96
 
99
97
  export function createRegisterTool(
100
- logger: ConsoleLogger,
101
- server: McpServer,
102
- getSDK: () => SteuerboardCore,
103
- allowedScopes: Set<MCPScope>,
104
- allowedTools?: Set<string>,
98
+ logger: ConsoleLogger,
99
+ server: McpServer,
100
+ getSDK: () => SteuerboardCore,
101
+ allowedScopes: Set<MCPScope>,
102
+ allowedTools?: Set<string>,
105
103
  ): <A extends ZodRawShape | undefined>(tool: ToolDefinition<A>) => void {
106
- return <A extends ZodRawShape | undefined>(tool: ToolDefinition<A>): void => {
107
- if (allowedTools && !allowedTools.has(tool.name)) {
108
- return;
109
- }
104
+ return <A extends ZodRawShape | undefined>(tool: ToolDefinition<A>): void => {
105
+ if (allowedTools && !allowedTools.has(tool.name)) {
106
+ return;
107
+ }
110
108
 
111
- const scopes = tool.scopes ?? [];
112
- if (allowedScopes.size > 0 && scopes.length === 0) {
113
- return;
114
- }
109
+ const scopes = tool.scopes ?? [];
110
+ if (allowedScopes.size > 0 && scopes.length === 0) {
111
+ return;
112
+ }
115
113
 
116
- if (
117
- allowedScopes.size > 0 &&
118
- !scopes.every((s: MCPScope) => allowedScopes.has(s))
119
- ) {
120
- return;
121
- }
114
+ if (
115
+ allowedScopes.size > 0
116
+ && !scopes.every((s: MCPScope) => allowedScopes.has(s))
117
+ ) {
118
+ return;
119
+ }
122
120
 
123
- if (tool.args) {
124
- server.tool(tool.name, tool.description, tool.args, async (args, ctx) => {
125
- return tool.tool(getSDK(), args, ctx);
126
- });
127
- } else {
128
- server.tool(tool.name, tool.description, async (ctx) => {
129
- return tool.tool(getSDK(), ctx);
130
- });
131
- }
121
+ if (tool.args) {
122
+ server.tool(tool.name, tool.description, tool.args, async (args, ctx) => {
123
+ return tool.tool(getSDK(), args, ctx);
124
+ });
125
+ } else {
126
+ server.tool(tool.name, tool.description, async (ctx) => {
127
+ return tool.tool(getSDK(), ctx);
128
+ });
129
+ }
132
130
 
133
- logger.debug("Registered tool", { name: tool.name });
134
- };
131
+ logger.debug("Registered tool", { name: tool.name });
132
+ };
135
133
  }
@@ -5,21 +5,23 @@
5
5
  import * as z from "zod";
6
6
 
7
7
  /**
8
- * The type of the client
8
+ * The type of the client. 'natural_person' for individuals, 'legal_person' for companies like UG, GmbH, AG, Ltd., Inc., etc. and 'individual_enterprise' for sole proprietorships.
9
9
  */
10
- export const Type$zodSchema = z.enum([
10
+ export const ClientType$zodSchema = z.enum([
11
11
  "natural_person",
12
12
  "individual_enterprise",
13
13
  "legal_person",
14
- ]).describe("The type of the client");
14
+ ]).describe(
15
+ "The type of the client. 'natural_person' for individuals, 'legal_person' for companies like UG, GmbH, AG, Ltd., Inc., etc. and 'individual_enterprise' for sole proprietorships.",
16
+ );
15
17
 
16
- export type Type = z.infer<typeof Type$zodSchema>;
18
+ export type ClientType = z.infer<typeof ClientType$zodSchema>;
17
19
 
18
20
  export type Client = {
19
21
  id: string;
20
22
  name: string;
21
23
  slug: string;
22
- type: Type;
24
+ type: ClientType;
23
25
  customId: string | null;
24
26
  legalName: string | null;
25
27
  archivedAt: string | null;
@@ -38,6 +40,6 @@ export const Client$zodSchema: z.ZodType<Client, z.ZodTypeDef, unknown> = z
38
40
  legalName: z.string().nullable(),
39
41
  name: z.string(),
40
42
  slug: z.string(),
41
- type: Type$zodSchema,
43
+ type: ClientType$zodSchema,
42
44
  updatedAt: z.string(),
43
45
  });
@@ -0,0 +1,56 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+
7
+ /**
8
+ * The type of the client. 'natural_person' for individuals, 'legal_person' for companies like UG, GmbH, AG, Ltd., Inc., etc. and 'individual_enterprise' for sole proprietorships.
9
+ */
10
+ export const ClientCreateType$zodSchema = z.enum([
11
+ "natural_person",
12
+ "individual_enterprise",
13
+ "legal_person",
14
+ ]).describe(
15
+ "The type of the client. 'natural_person' for individuals, 'legal_person' for companies like UG, GmbH, AG, Ltd., Inc., etc. and 'individual_enterprise' for sole proprietorships.",
16
+ );
17
+
18
+ export type ClientCreateType = z.infer<typeof ClientCreateType$zodSchema>;
19
+
20
+ /**
21
+ * The address of the client
22
+ */
23
+ export type Address = {
24
+ line1: string;
25
+ line2?: string | undefined;
26
+ city: string;
27
+ postalCode: string;
28
+ countryCode?: string | undefined;
29
+ };
30
+
31
+ export const Address$zodSchema: z.ZodType<Address, z.ZodTypeDef, unknown> = z
32
+ .object({
33
+ city: z.string(),
34
+ countryCode: z.string().default("DE"),
35
+ line1: z.string(),
36
+ line2: z.string().optional(),
37
+ postalCode: z.string(),
38
+ }).describe("The address of the client");
39
+
40
+ export type ClientCreate = {
41
+ name: string;
42
+ type: ClientCreateType;
43
+ customId?: string | undefined;
44
+ address?: Address | undefined;
45
+ };
46
+
47
+ export const ClientCreate$zodSchema: z.ZodType<
48
+ ClientCreate,
49
+ z.ZodTypeDef,
50
+ unknown
51
+ > = z.object({
52
+ address: z.lazy(() => Address$zodSchema).optional(),
53
+ customId: z.string().optional(),
54
+ name: z.string(),
55
+ type: ClientCreateType$zodSchema,
56
+ });
@@ -0,0 +1,112 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { Client, Client$zodSchema } from "./client.js";
7
+
8
+ /**
9
+ * Rate limit exceeded. Slow down requests or retry after the time specified in the rate limit response headers
10
+ */
11
+ export type CreateClientTooManyRequestsResponseBody = { message: string };
12
+
13
+ export const CreateClientTooManyRequestsResponseBody$zodSchema: z.ZodType<
14
+ CreateClientTooManyRequestsResponseBody,
15
+ z.ZodTypeDef,
16
+ unknown
17
+ > = z.object({
18
+ message: z.string(),
19
+ }).describe(
20
+ "Rate limit exceeded. Slow down requests or retry after the time specified in the rate limit response headers",
21
+ );
22
+
23
+ export type CreateClientPath = string | number;
24
+
25
+ export const CreateClientPath$zodSchema: z.ZodType<
26
+ CreateClientPath,
27
+ z.ZodTypeDef,
28
+ unknown
29
+ > = z.union([
30
+ z.string(),
31
+ z.number(),
32
+ ]);
33
+
34
+ export type CreateClientIssue = {
35
+ code: string;
36
+ path: Array<string | number>;
37
+ message?: string | undefined;
38
+ };
39
+
40
+ export const CreateClientIssue$zodSchema: z.ZodType<
41
+ CreateClientIssue,
42
+ z.ZodTypeDef,
43
+ unknown
44
+ > = z.object({
45
+ code: z.string(),
46
+ message: z.string().optional(),
47
+ path: z.array(z.union([
48
+ z.string(),
49
+ z.number(),
50
+ ])),
51
+ });
52
+
53
+ export type CreateClientError = {
54
+ issues: Array<CreateClientIssue>;
55
+ name: string;
56
+ };
57
+
58
+ export const CreateClientError$zodSchema: z.ZodType<
59
+ CreateClientError,
60
+ z.ZodTypeDef,
61
+ unknown
62
+ > = z.object({
63
+ issues: z.array(z.lazy(() => CreateClientIssue$zodSchema)),
64
+ name: z.string(),
65
+ });
66
+
67
+ /**
68
+ * The validation error(s)
69
+ */
70
+ export type CreateClientUnprocessableEntityResponseBody = {
71
+ success: boolean;
72
+ error: CreateClientError;
73
+ };
74
+
75
+ export const CreateClientUnprocessableEntityResponseBody$zodSchema: z.ZodType<
76
+ CreateClientUnprocessableEntityResponseBody,
77
+ z.ZodTypeDef,
78
+ unknown
79
+ > = z.object({
80
+ error: z.lazy(() => CreateClientError$zodSchema),
81
+ success: z.boolean(),
82
+ }).describe("The validation error(s)");
83
+
84
+ export type CreateClientResponse = {
85
+ ContentType: string;
86
+ StatusCode: number;
87
+ RawResponse: Response;
88
+ Client?: Client | undefined;
89
+ fourHundredAndTwentyTwoApplicationJsonObject?:
90
+ | CreateClientUnprocessableEntityResponseBody
91
+ | undefined;
92
+ fourHundredAndTwentyNineApplicationJsonObject?:
93
+ | CreateClientTooManyRequestsResponseBody
94
+ | undefined;
95
+ };
96
+
97
+ export const CreateClientResponse$zodSchema: z.ZodType<
98
+ CreateClientResponse,
99
+ z.ZodTypeDef,
100
+ unknown
101
+ > = z.object({
102
+ Client: Client$zodSchema.optional(),
103
+ ContentType: z.string(),
104
+ RawResponse: z.instanceof(Response),
105
+ StatusCode: z.number().int(),
106
+ fourHundredAndTwentyNineApplicationJsonObject: z.lazy(() =>
107
+ CreateClientTooManyRequestsResponseBody$zodSchema
108
+ ).optional(),
109
+ fourHundredAndTwentyTwoApplicationJsonObject: z.lazy(() =>
110
+ CreateClientUnprocessableEntityResponseBody$zodSchema
111
+ ).optional(),
112
+ });
@@ -10,10 +10,11 @@ import * as z from "zod";
10
10
  export type GetV1MeResponseBody = {
11
11
  type: string;
12
12
  accountantId: string;
13
- clientId?: string | undefined;
13
+ clientId: string | null;
14
14
  apiKeyId: string;
15
15
  rateLimitMax: number;
16
16
  rateLimitTimeWindow: number;
17
+ permissions: Array<string>;
17
18
  };
18
19
 
19
20
  export const GetV1MeResponseBody$zodSchema: z.ZodType<
@@ -23,7 +24,8 @@ export const GetV1MeResponseBody$zodSchema: z.ZodType<
23
24
  > = z.object({
24
25
  accountantId: z.string(),
25
26
  apiKeyId: z.string(),
26
- clientId: z.string().optional(),
27
+ clientId: z.string().nullable(),
28
+ permissions: z.array(z.string()),
27
29
  rateLimitMax: z.number(),
28
30
  rateLimitTimeWindow: z.number(),
29
31
  type: z.string(),
@@ -17,13 +17,15 @@ export const Archived$zodSchema = z.enum([
17
17
  export type Archived = z.infer<typeof Archived$zodSchema>;
18
18
 
19
19
  /**
20
- * The type of the client
20
+ * The type of the client. 'natural_person' for individuals, 'legal_person' for companies like UG, GmbH, AG, Ltd., Inc., etc. and 'individual_enterprise' for sole proprietorships.
21
21
  */
22
22
  export const ListClientsType$zodSchema = z.enum([
23
23
  "natural_person",
24
24
  "individual_enterprise",
25
25
  "legal_person",
26
- ]).describe("The type of the client");
26
+ ]).describe(
27
+ "The type of the client. 'natural_person' for individuals, 'legal_person' for companies like UG, GmbH, AG, Ltd., Inc., etc. and 'individual_enterprise' for sole proprietorships.",
28
+ );
27
29
 
28
30
  export type ListClientsType = z.infer<typeof ListClientsType$zodSchema>;
29
31
 
@@ -9,7 +9,6 @@ import { Task, Task$zodSchema } from "./task.js";
9
9
  export type ListTasksRequest = {
10
10
  limit?: number | undefined;
11
11
  cursor?: string | undefined;
12
- clientId?: string | undefined;
13
12
  workspaceId?: string | undefined;
14
13
  };
15
14
 
@@ -18,7 +17,6 @@ export const ListTasksRequest$zodSchema: z.ZodType<
18
17
  z.ZodTypeDef,
19
18
  unknown
20
19
  > = z.object({
21
- clientId: z.string().optional(),
22
20
  cursor: z.string().optional(),
23
21
  limit: z.number().default(20),
24
22
  workspaceId: z.string().optional(),