@greensecurity/javascript-sdk 0.10.2 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +53 -0
- package/bin/mcp-server.js +39429 -0
- package/bin/mcp-server.js.map +301 -0
- package/funcs/organizationsGetFacility.js +1 -1
- package/funcs/organizationsGetFacility.js.map +1 -1
- package/funcs/organizationsListOrSearchFacilities.js +1 -1
- package/funcs/organizationsListOrSearchFacilities.js.map +1 -1
- package/funcs/userGetCurrentUser.js +1 -1
- package/funcs/userGetCurrentUser.js.map +1 -1
- package/funcs/userGetUserById.js +1 -1
- package/funcs/userGetUserById.js.map +1 -1
- package/funcs/userLogsUserIntoTheSystem.js +1 -1
- package/funcs/userLogsUserIntoTheSystem.js.map +1 -1
- package/funcs/userMagiclink.js +1 -1
- package/funcs/userMagiclink.js.map +1 -1
- package/funcs/userPassword.js +1 -1
- package/funcs/userPassword.js.map +1 -1
- package/funcs/userPasswordResetRequest.js +1 -1
- package/funcs/userPasswordResetRequest.js.map +1 -1
- package/funcs/vendorsCreateVendorRegistration.js +1 -1
- package/funcs/vendorsCreateVendorRegistration.js.map +1 -1
- package/funcs/vendorsListVendorJobTitles.js +1 -1
- package/funcs/vendorsListVendorJobTitles.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +6 -6
- package/lib/config.d.ts.map +1 -1
- package/lib/config.js +3 -3
- package/lib/config.js.map +1 -1
- package/lib/files.js.map +1 -1
- package/lib/primitives.d.ts +3 -0
- package/lib/primitives.d.ts.map +1 -1
- package/lib/primitives.js +7 -0
- package/lib/primitives.js.map +1 -1
- package/mcp-server/build.d.mts.map +1 -0
- package/mcp-server/build.mjs +14 -0
- package/mcp-server/build.mjs.map +1 -0
- package/mcp-server/cli/start/command.d.ts +2 -0
- package/mcp-server/cli/start/command.d.ts.map +1 -0
- package/mcp-server/cli/start/command.js +137 -0
- package/mcp-server/cli/start/command.js.map +1 -0
- package/mcp-server/cli/start/impl.d.ts +18 -0
- package/mcp-server/cli/start/impl.d.ts.map +1 -0
- package/mcp-server/cli/start/impl.js +102 -0
- package/mcp-server/cli/start/impl.js.map +1 -0
- package/mcp-server/cli.d.ts +6 -0
- package/mcp-server/cli.d.ts.map +1 -0
- package/mcp-server/cli.js +10 -0
- package/mcp-server/cli.js.map +1 -0
- package/mcp-server/console-logger.d.ts +7 -0
- package/mcp-server/console-logger.d.ts.map +1 -0
- package/mcp-server/console-logger.js +59 -0
- package/mcp-server/console-logger.js.map +1 -0
- package/mcp-server/mcp-server.d.ts +2 -0
- package/mcp-server/mcp-server.d.ts.map +1 -0
- package/mcp-server/mcp-server.js +29 -0
- package/mcp-server/mcp-server.js.map +1 -0
- package/mcp-server/resources.d.ts +27 -0
- package/mcp-server/resources.d.ts.map +1 -0
- package/mcp-server/resources.js +51 -0
- package/mcp-server/resources.js.map +1 -0
- package/mcp-server/scopes.d.ts +3 -0
- package/mcp-server/scopes.d.ts.map +1 -0
- package/mcp-server/scopes.js +8 -0
- package/mcp-server/scopes.js.map +1 -0
- package/mcp-server/server.d.ts +12 -0
- package/mcp-server/server.d.ts.map +1 -0
- package/mcp-server/server.js +45 -0
- package/mcp-server/server.js.map +1 -0
- package/mcp-server/shared.d.ts +7 -0
- package/mcp-server/shared.d.ts.map +1 -0
- package/mcp-server/shared.js +98 -0
- package/mcp-server/shared.js.map +1 -0
- package/mcp-server/tools/organizationsGetFacility.d.ts +8 -0
- package/mcp-server/tools/organizationsGetFacility.d.ts.map +1 -0
- package/mcp-server/tools/organizationsGetFacility.js +64 -0
- package/mcp-server/tools/organizationsGetFacility.js.map +1 -0
- package/mcp-server/tools/organizationsListOrSearchFacilities.d.ts +8 -0
- package/mcp-server/tools/organizationsListOrSearchFacilities.d.ts.map +1 -0
- package/mcp-server/tools/organizationsListOrSearchFacilities.js +77 -0
- package/mcp-server/tools/organizationsListOrSearchFacilities.js.map +1 -0
- package/mcp-server/tools/userGetCurrentUser.d.ts +3 -0
- package/mcp-server/tools/userGetCurrentUser.d.ts.map +1 -0
- package/mcp-server/tools/userGetCurrentUser.js +26 -0
- package/mcp-server/tools/userGetCurrentUser.js.map +1 -0
- package/mcp-server/tools/userGetUserById.d.ts +8 -0
- package/mcp-server/tools/userGetUserById.d.ts.map +1 -0
- package/mcp-server/tools/userGetUserById.js +64 -0
- package/mcp-server/tools/userGetUserById.js.map +1 -0
- package/mcp-server/tools/userLogsUserIntoTheSystem.d.ts +8 -0
- package/mcp-server/tools/userLogsUserIntoTheSystem.d.ts.map +1 -0
- package/mcp-server/tools/userLogsUserIntoTheSystem.js +94 -0
- package/mcp-server/tools/userLogsUserIntoTheSystem.js.map +1 -0
- package/mcp-server/tools/userMagiclink.d.ts +8 -0
- package/mcp-server/tools/userMagiclink.d.ts.map +1 -0
- package/mcp-server/tools/userMagiclink.js +64 -0
- package/mcp-server/tools/userMagiclink.js.map +1 -0
- package/mcp-server/tools/userPassword.d.ts +8 -0
- package/mcp-server/tools/userPassword.d.ts.map +1 -0
- package/mcp-server/tools/userPassword.js +65 -0
- package/mcp-server/tools/userPassword.js.map +1 -0
- package/mcp-server/tools/userPasswordResetRequest.d.ts +8 -0
- package/mcp-server/tools/userPasswordResetRequest.d.ts.map +1 -0
- package/mcp-server/tools/userPasswordResetRequest.js +64 -0
- package/mcp-server/tools/userPasswordResetRequest.js.map +1 -0
- package/mcp-server/tools/vendorsCreateVendorRegistration.d.ts +8 -0
- package/mcp-server/tools/vendorsCreateVendorRegistration.d.ts.map +1 -0
- package/mcp-server/tools/vendorsCreateVendorRegistration.js +64 -0
- package/mcp-server/tools/vendorsCreateVendorRegistration.js.map +1 -0
- package/mcp-server/tools/vendorsListVendorJobTitles.d.ts +8 -0
- package/mcp-server/tools/vendorsListVendorJobTitles.d.ts.map +1 -0
- package/mcp-server/tools/vendorsListVendorJobTitles.js +64 -0
- package/mcp-server/tools/vendorsListVendorJobTitles.js.map +1 -0
- package/mcp-server/tools.d.ts +25 -0
- package/mcp-server/tools.d.ts.map +1 -0
- package/mcp-server/tools.js +74 -0
- package/mcp-server/tools.js.map +1 -0
- package/models/components/facility.d.ts +0 -4
- package/models/components/facility.d.ts.map +1 -1
- package/models/components/facility.js +0 -4
- package/models/components/facility.js.map +1 -1
- package/models/components/user.d.ts +6 -0
- package/models/components/user.d.ts.map +1 -1
- package/models/components/user.js +5 -0
- package/models/components/user.js.map +1 -1
- package/models/operations/password.d.ts +2 -2
- package/models/operations/password.d.ts.map +1 -1
- package/models/operations/password.js +2 -2
- package/models/operations/password.js.map +1 -1
- package/package.json +18 -2
- package/src/__tests__/assertions.ts +13 -0
- package/src/__tests__/files.ts +56 -0
- package/src/__tests__/organizations.test.ts +244 -0
- package/src/__tests__/testclient.ts +48 -0
- package/src/__tests__/user.test.ts +200 -0
- package/src/__tests__/vendors.test.ts +65 -0
- package/src/funcs/organizationsGetFacility.ts +1 -1
- package/src/funcs/organizationsListOrSearchFacilities.ts +1 -1
- package/src/funcs/userGetCurrentUser.ts +1 -1
- package/src/funcs/userGetUserById.ts +1 -1
- package/src/funcs/userLogsUserIntoTheSystem.ts +1 -1
- package/src/funcs/userMagiclink.ts +1 -1
- package/src/funcs/userPassword.ts +1 -1
- package/src/funcs/userPasswordResetRequest.ts +1 -1
- package/src/funcs/vendorsCreateVendorRegistration.ts +1 -1
- package/src/funcs/vendorsListVendorJobTitles.ts +1 -1
- package/src/lib/config.ts +9 -6
- package/src/lib/files.ts +1 -1
- package/src/lib/primitives.ts +14 -0
- package/src/mcp-server/cli/start/command.ts +106 -0
- package/src/mcp-server/cli/start/impl.ts +132 -0
- package/src/mcp-server/cli.ts +13 -0
- package/src/mcp-server/console-logger.ts +71 -0
- package/src/mcp-server/mcp-server.ts +26 -0
- package/src/mcp-server/resources.ts +96 -0
- package/src/mcp-server/scopes.ts +7 -0
- package/src/mcp-server/server.ts +54 -0
- package/src/mcp-server/shared.ts +75 -0
- package/src/mcp-server/tools/organizationsGetFacility.ts +37 -0
- package/src/mcp-server/tools/organizationsListOrSearchFacilities.ts +52 -0
- package/src/mcp-server/tools/userGetCurrentUser.ts +30 -0
- package/src/mcp-server/tools/userGetUserById.ts +37 -0
- package/src/mcp-server/tools/userLogsUserIntoTheSystem.ts +67 -0
- package/src/mcp-server/tools/userMagiclink.ts +37 -0
- package/src/mcp-server/tools/userPassword.ts +38 -0
- package/src/mcp-server/tools/userPasswordResetRequest.ts +37 -0
- package/src/mcp-server/tools/vendorsCreateVendorRegistration.ts +38 -0
- package/src/mcp-server/tools/vendorsListVendorJobTitles.ts +37 -0
- package/src/mcp-server/tools.ts +116 -0
- package/src/models/components/facility.ts +0 -8
- package/src/models/components/user.ts +15 -0
- package/src/models/operations/password.ts +4 -4
- package/src/vitest.config.js +5 -0
- package/vitest.config.d.ts +7 -0
- package/vitest.config.d.ts.map +1 -0
- package/vitest.config.js +8 -0
- package/vitest.config.js.map +1 -0
- package/vitest.config.ts +8 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { vendorsCreateVendorRegistration } from "../../funcs/vendorsCreateVendorRegistration.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.CreateVendorRegistrationRequestBody$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$vendorsCreateVendorRegistration: ToolDefinition<typeof args> =
|
|
14
|
+
{
|
|
15
|
+
name: "vendors_create-vendor-registration",
|
|
16
|
+
description: `Create vendor registration
|
|
17
|
+
|
|
18
|
+
Create an initial vendor registration. Once successful, the vendor will be able to continue to filling out the rest of their onboarding profile.`,
|
|
19
|
+
args,
|
|
20
|
+
tool: async (client, args, ctx) => {
|
|
21
|
+
const [result, apiCall] = await vendorsCreateVendorRegistration(
|
|
22
|
+
client,
|
|
23
|
+
args.request,
|
|
24
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
25
|
+
).$inspect();
|
|
26
|
+
|
|
27
|
+
if (!result.ok) {
|
|
28
|
+
return {
|
|
29
|
+
content: [{ type: "text", text: result.error.message }],
|
|
30
|
+
isError: true,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const value = result.value;
|
|
35
|
+
|
|
36
|
+
return formatResult(value, apiCall);
|
|
37
|
+
},
|
|
38
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { vendorsListVendorJobTitles } from "../../funcs/vendorsListVendorJobTitles.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.ListVendorJobTitlesRequest$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$vendorsListVendorJobTitles: ToolDefinition<typeof args> = {
|
|
14
|
+
name: "vendors_list-vendor-job-titles",
|
|
15
|
+
description: `List vendor job titles
|
|
16
|
+
|
|
17
|
+
List valid job titles for Vendors. This can be used during sign up or in a filter.`,
|
|
18
|
+
args,
|
|
19
|
+
tool: async (client, args, ctx) => {
|
|
20
|
+
const [result, apiCall] = await vendorsListVendorJobTitles(
|
|
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
|
+
},
|
|
37
|
+
};
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
6
|
+
import { RequestHandlerExtra } from "@modelcontextprotocol/sdk/shared/protocol.js";
|
|
7
|
+
import { CallToolResult } from "@modelcontextprotocol/sdk/types.js";
|
|
8
|
+
import { objectOutputType, ZodRawShape, ZodTypeAny } from "zod";
|
|
9
|
+
import { GreenSecurityCore } from "../core.js";
|
|
10
|
+
import { ConsoleLogger } from "./console-logger.js";
|
|
11
|
+
import { MCPScope } from "./scopes.js";
|
|
12
|
+
import { isAsyncIterable, isBinaryData, valueToBase64 } from "./shared.js";
|
|
13
|
+
|
|
14
|
+
export type ToolDefinition<Args extends undefined | ZodRawShape = undefined> =
|
|
15
|
+
Args extends ZodRawShape ? {
|
|
16
|
+
name: string;
|
|
17
|
+
description: string;
|
|
18
|
+
scopes?: MCPScope[];
|
|
19
|
+
args: Args;
|
|
20
|
+
tool: (
|
|
21
|
+
client: GreenSecurityCore,
|
|
22
|
+
args: objectOutputType<Args, ZodTypeAny>,
|
|
23
|
+
extra: RequestHandlerExtra,
|
|
24
|
+
) => CallToolResult | Promise<CallToolResult>;
|
|
25
|
+
}
|
|
26
|
+
: {
|
|
27
|
+
name: string;
|
|
28
|
+
description: string;
|
|
29
|
+
scopes?: MCPScope[];
|
|
30
|
+
args?: undefined;
|
|
31
|
+
tool: (
|
|
32
|
+
client: GreenSecurityCore,
|
|
33
|
+
extra: RequestHandlerExtra,
|
|
34
|
+
) => CallToolResult | Promise<CallToolResult>;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export async function formatResult(
|
|
38
|
+
value: unknown,
|
|
39
|
+
init: { response?: Response | undefined },
|
|
40
|
+
): Promise<CallToolResult> {
|
|
41
|
+
if (typeof value === "undefined") {
|
|
42
|
+
return { content: [] };
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const { response } = init;
|
|
46
|
+
const contentType = response?.headers.get("content-type") ?? "";
|
|
47
|
+
let content: CallToolResult["content"] = [];
|
|
48
|
+
|
|
49
|
+
if (contentType.search(/\bjson\b/g)) {
|
|
50
|
+
content = [{ type: "text", text: JSON.stringify(value) }];
|
|
51
|
+
} else if (
|
|
52
|
+
contentType.startsWith("text/event-stream")
|
|
53
|
+
&& isAsyncIterable(value)
|
|
54
|
+
) {
|
|
55
|
+
content = await consumeSSE(value);
|
|
56
|
+
} else if (contentType.startsWith("text/") && typeof value === "string") {
|
|
57
|
+
content = [{ type: "text", text: value }];
|
|
58
|
+
} else if (isBinaryData(value) && contentType.startsWith("image/")) {
|
|
59
|
+
const data = await valueToBase64(value);
|
|
60
|
+
content = data == null
|
|
61
|
+
? []
|
|
62
|
+
: [{ type: "image", data, mimeType: contentType }];
|
|
63
|
+
} else {
|
|
64
|
+
return {
|
|
65
|
+
content: [{
|
|
66
|
+
type: "text",
|
|
67
|
+
text: `Unsupported content type: "${contentType}"`,
|
|
68
|
+
}],
|
|
69
|
+
isError: true,
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
return { content };
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
async function consumeSSE(
|
|
77
|
+
value: AsyncIterable<unknown>,
|
|
78
|
+
): Promise<CallToolResult["content"]> {
|
|
79
|
+
const content: CallToolResult["content"] = [];
|
|
80
|
+
|
|
81
|
+
for await (const chunk of value) {
|
|
82
|
+
if (typeof chunk === "string") {
|
|
83
|
+
content.push({ type: "text", text: chunk });
|
|
84
|
+
} else {
|
|
85
|
+
content.push({ type: "text", text: JSON.stringify(chunk) });
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
return content;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export function createRegisterTool(
|
|
93
|
+
logger: ConsoleLogger,
|
|
94
|
+
server: McpServer,
|
|
95
|
+
sdk: GreenSecurityCore,
|
|
96
|
+
allowedScopes: Set<MCPScope>,
|
|
97
|
+
): <A extends ZodRawShape | undefined>(tool: ToolDefinition<A>) => void {
|
|
98
|
+
return <A extends ZodRawShape | undefined>(tool: ToolDefinition<A>): void => {
|
|
99
|
+
const toolScopes = tool.scopes ?? [];
|
|
100
|
+
if (!toolScopes.every((s) => allowedScopes.has(s))) {
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
if (tool.args) {
|
|
105
|
+
server.tool(tool.name, tool.description, tool.args, async (args, ctx) => {
|
|
106
|
+
return tool.tool(sdk, args, ctx);
|
|
107
|
+
});
|
|
108
|
+
} else {
|
|
109
|
+
server.tool(tool.name, tool.description, async (ctx) => {
|
|
110
|
+
return tool.tool(sdk, ctx);
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
logger.debug("Registered tool", { name: tool.name });
|
|
115
|
+
};
|
|
116
|
+
}
|
|
@@ -97,8 +97,6 @@ export type Location = {
|
|
|
97
97
|
website?: string | null | undefined;
|
|
98
98
|
utcOffset?: number | null | undefined;
|
|
99
99
|
timezone?: string | null | undefined;
|
|
100
|
-
latitude?: number | null | undefined;
|
|
101
|
-
longitude?: number | null | undefined;
|
|
102
100
|
};
|
|
103
101
|
|
|
104
102
|
export type ScrubsPolicy = {
|
|
@@ -584,8 +582,6 @@ export const Location$inboundSchema: z.ZodType<
|
|
|
584
582
|
website: z.nullable(z.string()).optional(),
|
|
585
583
|
utc_offset: z.nullable(z.number()).optional(),
|
|
586
584
|
timezone: z.nullable(z.string()).optional(),
|
|
587
|
-
latitude: z.nullable(z.number()).optional(),
|
|
588
|
-
longitude: z.nullable(z.number()).optional(),
|
|
589
585
|
}).transform((v) => {
|
|
590
586
|
return remap$(v, {
|
|
591
587
|
"street_address": "streetAddress",
|
|
@@ -605,8 +601,6 @@ export type Location$Outbound = {
|
|
|
605
601
|
website?: string | null | undefined;
|
|
606
602
|
utc_offset?: number | null | undefined;
|
|
607
603
|
timezone?: string | null | undefined;
|
|
608
|
-
latitude?: number | null | undefined;
|
|
609
|
-
longitude?: number | null | undefined;
|
|
610
604
|
};
|
|
611
605
|
|
|
612
606
|
/** @internal */
|
|
@@ -625,8 +619,6 @@ export const Location$outboundSchema: z.ZodType<
|
|
|
625
619
|
website: z.nullable(z.string()).optional(),
|
|
626
620
|
utcOffset: z.nullable(z.number()).optional(),
|
|
627
621
|
timezone: z.nullable(z.string()).optional(),
|
|
628
|
-
latitude: z.nullable(z.number()).optional(),
|
|
629
|
-
longitude: z.nullable(z.number()).optional(),
|
|
630
622
|
}).transform((v) => {
|
|
631
623
|
return remap$(v, {
|
|
632
624
|
streetAddress: "street_address",
|
|
@@ -14,6 +14,12 @@ import {
|
|
|
14
14
|
Contact$Outbound,
|
|
15
15
|
Contact$outboundSchema,
|
|
16
16
|
} from "./contact.js";
|
|
17
|
+
import {
|
|
18
|
+
ImageSet,
|
|
19
|
+
ImageSet$inboundSchema,
|
|
20
|
+
ImageSet$Outbound,
|
|
21
|
+
ImageSet$outboundSchema,
|
|
22
|
+
} from "./imageset.js";
|
|
17
23
|
|
|
18
24
|
/**
|
|
19
25
|
* The flavor of user will determine the most relevant user experience for this user as well as permissions
|
|
@@ -60,6 +66,10 @@ export type UserUser = {
|
|
|
60
66
|
* The timezone of the user. This is used to display times in the user's local time. If not present, use the device's local timezone.
|
|
61
67
|
*/
|
|
62
68
|
timezone?: string | null | undefined;
|
|
69
|
+
/**
|
|
70
|
+
* A set of images in different sizes
|
|
71
|
+
*/
|
|
72
|
+
imageUrls?: ImageSet | undefined;
|
|
63
73
|
};
|
|
64
74
|
|
|
65
75
|
/**
|
|
@@ -140,11 +150,13 @@ export const UserUser$inboundSchema: z.ZodType<
|
|
|
140
150
|
phone: z.nullable(z.string()).optional(),
|
|
141
151
|
user_type: UserType$inboundSchema,
|
|
142
152
|
timezone: z.nullable(z.string()).optional(),
|
|
153
|
+
image_urls: ImageSet$inboundSchema.optional(),
|
|
143
154
|
}).transform((v) => {
|
|
144
155
|
return remap$(v, {
|
|
145
156
|
"first_name": "firstName",
|
|
146
157
|
"last_name": "lastName",
|
|
147
158
|
"user_type": "userType",
|
|
159
|
+
"image_urls": "imageUrls",
|
|
148
160
|
});
|
|
149
161
|
});
|
|
150
162
|
|
|
@@ -157,6 +169,7 @@ export type UserUser$Outbound = {
|
|
|
157
169
|
phone?: string | null | undefined;
|
|
158
170
|
user_type: string;
|
|
159
171
|
timezone?: string | null | undefined;
|
|
172
|
+
image_urls?: ImageSet$Outbound | undefined;
|
|
160
173
|
};
|
|
161
174
|
|
|
162
175
|
/** @internal */
|
|
@@ -172,11 +185,13 @@ export const UserUser$outboundSchema: z.ZodType<
|
|
|
172
185
|
phone: z.nullable(z.string()).optional(),
|
|
173
186
|
userType: UserType$outboundSchema,
|
|
174
187
|
timezone: z.nullable(z.string()).optional(),
|
|
188
|
+
imageUrls: ImageSet$outboundSchema.optional(),
|
|
175
189
|
}).transform((v) => {
|
|
176
190
|
return remap$(v, {
|
|
177
191
|
firstName: "first_name",
|
|
178
192
|
lastName: "last_name",
|
|
179
193
|
userType: "user_type",
|
|
194
|
+
imageUrls: "image_urls",
|
|
180
195
|
});
|
|
181
196
|
});
|
|
182
197
|
|
|
@@ -17,7 +17,7 @@ export type PasswordRequestBody = {
|
|
|
17
17
|
* The request was successful, and the server has returned the requested resource in the response body.
|
|
18
18
|
*/
|
|
19
19
|
export type PasswordResponseBody = {
|
|
20
|
-
success
|
|
20
|
+
success?: boolean | null | undefined;
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
/** @internal */
|
|
@@ -91,12 +91,12 @@ export const PasswordResponseBody$inboundSchema: z.ZodType<
|
|
|
91
91
|
z.ZodTypeDef,
|
|
92
92
|
unknown
|
|
93
93
|
> = z.object({
|
|
94
|
-
success: z.
|
|
94
|
+
success: z.nullable(z.boolean()).optional(),
|
|
95
95
|
});
|
|
96
96
|
|
|
97
97
|
/** @internal */
|
|
98
98
|
export type PasswordResponseBody$Outbound = {
|
|
99
|
-
success
|
|
99
|
+
success?: boolean | null | undefined;
|
|
100
100
|
};
|
|
101
101
|
|
|
102
102
|
/** @internal */
|
|
@@ -105,7 +105,7 @@ export const PasswordResponseBody$outboundSchema: z.ZodType<
|
|
|
105
105
|
z.ZodTypeDef,
|
|
106
106
|
PasswordResponseBody
|
|
107
107
|
> = z.object({
|
|
108
|
-
success: z.
|
|
108
|
+
success: z.nullable(z.boolean()).optional(),
|
|
109
109
|
});
|
|
110
110
|
|
|
111
111
|
/**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vitest.config.d.ts","sourceRoot":"","sources":["src/vitest.config.js"],"names":[],"mappings":""}
|
package/vitest.config.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vitest.config.js","sourceRoot":"","sources":["src/vitest.config.js"],"names":[],"mappings":";;AAAA,kBAAe;IACb,IAAI,EAAE;QACJ,OAAO,EAAE,KAAK,EAAE,uCAAuC;KACxD;CACF,CAAA"}
|