@greensecurity/javascript-sdk 0.39.6 → 0.39.8
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 +15 -0
- package/bin/mcp-server.js +1423 -591
- package/bin/mcp-server.js.map +22 -7
- package/dist/commonjs/__tests__/events.test.js +86 -0
- package/dist/commonjs/__tests__/events.test.js.map +1 -1
- package/dist/commonjs/__tests__/zones.test.js +16 -4
- package/dist/commonjs/__tests__/zones.test.js.map +1 -1
- package/dist/commonjs/funcs/eventsAcceptInvitation.d.ts +18 -0
- package/dist/commonjs/funcs/eventsAcceptInvitation.d.ts.map +1 -0
- package/dist/commonjs/funcs/eventsAcceptInvitation.js +127 -0
- package/dist/commonjs/funcs/eventsAcceptInvitation.js.map +1 -0
- package/dist/commonjs/funcs/eventsCreateEvent.d.ts +18 -0
- package/dist/commonjs/funcs/eventsCreateEvent.d.ts.map +1 -0
- package/dist/commonjs/funcs/eventsCreateEvent.js +117 -0
- package/dist/commonjs/funcs/eventsCreateEvent.js.map +1 -0
- package/dist/commonjs/funcs/eventsDeclineInvitation.d.ts +18 -0
- package/dist/commonjs/funcs/eventsDeclineInvitation.d.ts.map +1 -0
- package/dist/commonjs/funcs/eventsDeclineInvitation.js +127 -0
- package/dist/commonjs/funcs/eventsDeclineInvitation.js.map +1 -0
- package/dist/commonjs/funcs/eventsDeleteEvent.d.ts +18 -0
- package/dist/commonjs/funcs/eventsDeleteEvent.d.ts.map +1 -0
- package/dist/commonjs/funcs/eventsDeleteEvent.js +122 -0
- package/dist/commonjs/funcs/eventsDeleteEvent.js.map +1 -0
- package/dist/commonjs/funcs/eventsUpdateEvent.d.ts +18 -0
- package/dist/commonjs/funcs/eventsUpdateEvent.d.ts.map +1 -0
- package/dist/commonjs/funcs/eventsUpdateEvent.js +123 -0
- package/dist/commonjs/funcs/eventsUpdateEvent.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/server.js +11 -1
- package/dist/commonjs/mcp-server/server.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/eventsAcceptInvitation.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/eventsAcceptInvitation.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/eventsAcceptInvitation.js +64 -0
- package/dist/commonjs/mcp-server/tools/eventsAcceptInvitation.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/eventsCreateEvent.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/eventsCreateEvent.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/eventsCreateEvent.js +64 -0
- package/dist/commonjs/mcp-server/tools/eventsCreateEvent.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/eventsDeclineInvitation.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/eventsDeclineInvitation.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/eventsDeclineInvitation.js +64 -0
- package/dist/commonjs/mcp-server/tools/eventsDeclineInvitation.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/eventsDeleteEvent.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/eventsDeleteEvent.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/eventsDeleteEvent.js +64 -0
- package/dist/commonjs/mcp-server/tools/eventsDeleteEvent.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/eventsUpdateEvent.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/eventsUpdateEvent.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/eventsUpdateEvent.js +64 -0
- package/dist/commonjs/mcp-server/tools/eventsUpdateEvent.js.map +1 -0
- package/dist/commonjs/models/operations/acceptinvitation.d.ts +92 -0
- package/dist/commonjs/models/operations/acceptinvitation.d.ts.map +1 -0
- package/dist/commonjs/models/operations/acceptinvitation.js +138 -0
- package/dist/commonjs/models/operations/acceptinvitation.js.map +1 -0
- package/dist/commonjs/models/operations/createevent.d.ts +99 -0
- package/dist/commonjs/models/operations/createevent.d.ts.map +1 -0
- package/dist/commonjs/models/operations/createevent.js +151 -0
- package/dist/commonjs/models/operations/createevent.js.map +1 -0
- package/dist/commonjs/models/operations/declineinvitation.d.ts +92 -0
- package/dist/commonjs/models/operations/declineinvitation.d.ts.map +1 -0
- package/dist/commonjs/models/operations/declineinvitation.js +138 -0
- package/dist/commonjs/models/operations/declineinvitation.js.map +1 -0
- package/dist/commonjs/models/operations/deleteevent.d.ts +60 -0
- package/dist/commonjs/models/operations/deleteevent.d.ts.map +1 -0
- package/dist/commonjs/models/operations/deleteevent.js +96 -0
- package/dist/commonjs/models/operations/deleteevent.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +5 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +5 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/updateevent.d.ts +113 -0
- package/dist/commonjs/models/operations/updateevent.d.ts.map +1 -0
- package/dist/commonjs/models/operations/updateevent.js +154 -0
- package/dist/commonjs/models/operations/updateevent.js.map +1 -0
- package/dist/commonjs/react-query/eventsAcceptInvitation.d.ts +23 -0
- package/dist/commonjs/react-query/eventsAcceptInvitation.d.ts.map +1 -0
- package/dist/commonjs/react-query/eventsAcceptInvitation.js +47 -0
- package/dist/commonjs/react-query/eventsAcceptInvitation.js.map +1 -0
- package/dist/commonjs/react-query/eventsCreateEvent.d.ts +23 -0
- package/dist/commonjs/react-query/eventsCreateEvent.d.ts.map +1 -0
- package/dist/commonjs/react-query/eventsCreateEvent.js +47 -0
- package/dist/commonjs/react-query/eventsCreateEvent.js.map +1 -0
- package/dist/commonjs/react-query/eventsDeclineInvitation.d.ts +23 -0
- package/dist/commonjs/react-query/eventsDeclineInvitation.d.ts.map +1 -0
- package/dist/commonjs/react-query/eventsDeclineInvitation.js +47 -0
- package/dist/commonjs/react-query/eventsDeclineInvitation.js.map +1 -0
- package/dist/commonjs/react-query/eventsDeleteEvent.d.ts +23 -0
- package/dist/commonjs/react-query/eventsDeleteEvent.d.ts.map +1 -0
- package/dist/commonjs/react-query/eventsDeleteEvent.js +47 -0
- package/dist/commonjs/react-query/eventsDeleteEvent.js.map +1 -0
- package/dist/commonjs/react-query/eventsUpdateEvent.d.ts +23 -0
- package/dist/commonjs/react-query/eventsUpdateEvent.d.ts.map +1 -0
- package/dist/commonjs/react-query/eventsUpdateEvent.js +47 -0
- package/dist/commonjs/react-query/eventsUpdateEvent.js.map +1 -0
- package/dist/commonjs/react-query/index.d.ts +5 -0
- package/dist/commonjs/react-query/index.d.ts.map +1 -1
- package/dist/commonjs/react-query/index.js +5 -0
- package/dist/commonjs/react-query/index.js.map +1 -1
- package/dist/commonjs/sdk/events.d.ts +35 -0
- package/dist/commonjs/sdk/events.d.ts.map +1 -1
- package/dist/commonjs/sdk/events.js +51 -0
- package/dist/commonjs/sdk/events.js.map +1 -1
- package/dist/esm/__tests__/events.test.js +86 -0
- package/dist/esm/__tests__/events.test.js.map +1 -1
- package/dist/esm/__tests__/zones.test.js +16 -4
- package/dist/esm/__tests__/zones.test.js.map +1 -1
- package/dist/esm/funcs/eventsAcceptInvitation.d.ts +18 -0
- package/dist/esm/funcs/eventsAcceptInvitation.d.ts.map +1 -0
- package/dist/esm/funcs/eventsAcceptInvitation.js +91 -0
- package/dist/esm/funcs/eventsAcceptInvitation.js.map +1 -0
- package/dist/esm/funcs/eventsCreateEvent.d.ts +18 -0
- package/dist/esm/funcs/eventsCreateEvent.d.ts.map +1 -0
- package/dist/esm/funcs/eventsCreateEvent.js +81 -0
- package/dist/esm/funcs/eventsCreateEvent.js.map +1 -0
- package/dist/esm/funcs/eventsDeclineInvitation.d.ts +18 -0
- package/dist/esm/funcs/eventsDeclineInvitation.d.ts.map +1 -0
- package/dist/esm/funcs/eventsDeclineInvitation.js +91 -0
- package/dist/esm/funcs/eventsDeclineInvitation.js.map +1 -0
- package/dist/esm/funcs/eventsDeleteEvent.d.ts +18 -0
- package/dist/esm/funcs/eventsDeleteEvent.d.ts.map +1 -0
- package/dist/esm/funcs/eventsDeleteEvent.js +86 -0
- package/dist/esm/funcs/eventsDeleteEvent.js.map +1 -0
- package/dist/esm/funcs/eventsUpdateEvent.d.ts +18 -0
- package/dist/esm/funcs/eventsUpdateEvent.d.ts.map +1 -0
- package/dist/esm/funcs/eventsUpdateEvent.js +87 -0
- package/dist/esm/funcs/eventsUpdateEvent.js.map +1 -0
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.d.ts.map +1 -1
- package/dist/esm/mcp-server/server.js +11 -1
- package/dist/esm/mcp-server/server.js.map +1 -1
- package/dist/esm/mcp-server/tools/eventsAcceptInvitation.d.ts +8 -0
- package/dist/esm/mcp-server/tools/eventsAcceptInvitation.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/eventsAcceptInvitation.js +28 -0
- package/dist/esm/mcp-server/tools/eventsAcceptInvitation.js.map +1 -0
- package/dist/esm/mcp-server/tools/eventsCreateEvent.d.ts +8 -0
- package/dist/esm/mcp-server/tools/eventsCreateEvent.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/eventsCreateEvent.js +28 -0
- package/dist/esm/mcp-server/tools/eventsCreateEvent.js.map +1 -0
- package/dist/esm/mcp-server/tools/eventsDeclineInvitation.d.ts +8 -0
- package/dist/esm/mcp-server/tools/eventsDeclineInvitation.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/eventsDeclineInvitation.js +28 -0
- package/dist/esm/mcp-server/tools/eventsDeclineInvitation.js.map +1 -0
- package/dist/esm/mcp-server/tools/eventsDeleteEvent.d.ts +8 -0
- package/dist/esm/mcp-server/tools/eventsDeleteEvent.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/eventsDeleteEvent.js +28 -0
- package/dist/esm/mcp-server/tools/eventsDeleteEvent.js.map +1 -0
- package/dist/esm/mcp-server/tools/eventsUpdateEvent.d.ts +8 -0
- package/dist/esm/mcp-server/tools/eventsUpdateEvent.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/eventsUpdateEvent.js +28 -0
- package/dist/esm/mcp-server/tools/eventsUpdateEvent.js.map +1 -0
- package/dist/esm/models/operations/acceptinvitation.d.ts +92 -0
- package/dist/esm/models/operations/acceptinvitation.d.ts.map +1 -0
- package/dist/esm/models/operations/acceptinvitation.js +96 -0
- package/dist/esm/models/operations/acceptinvitation.js.map +1 -0
- package/dist/esm/models/operations/createevent.d.ts +99 -0
- package/dist/esm/models/operations/createevent.d.ts.map +1 -0
- package/dist/esm/models/operations/createevent.js +111 -0
- package/dist/esm/models/operations/createevent.js.map +1 -0
- package/dist/esm/models/operations/declineinvitation.d.ts +92 -0
- package/dist/esm/models/operations/declineinvitation.d.ts.map +1 -0
- package/dist/esm/models/operations/declineinvitation.js +96 -0
- package/dist/esm/models/operations/declineinvitation.js.map +1 -0
- package/dist/esm/models/operations/deleteevent.d.ts +60 -0
- package/dist/esm/models/operations/deleteevent.d.ts.map +1 -0
- package/dist/esm/models/operations/deleteevent.js +56 -0
- package/dist/esm/models/operations/deleteevent.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +5 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +5 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/updateevent.d.ts +113 -0
- package/dist/esm/models/operations/updateevent.d.ts.map +1 -0
- package/dist/esm/models/operations/updateevent.js +112 -0
- package/dist/esm/models/operations/updateevent.js.map +1 -0
- package/dist/esm/react-query/eventsAcceptInvitation.d.ts +23 -0
- package/dist/esm/react-query/eventsAcceptInvitation.d.ts.map +1 -0
- package/dist/esm/react-query/eventsAcceptInvitation.js +42 -0
- package/dist/esm/react-query/eventsAcceptInvitation.js.map +1 -0
- package/dist/esm/react-query/eventsCreateEvent.d.ts +23 -0
- package/dist/esm/react-query/eventsCreateEvent.d.ts.map +1 -0
- package/dist/esm/react-query/eventsCreateEvent.js +42 -0
- package/dist/esm/react-query/eventsCreateEvent.js.map +1 -0
- package/dist/esm/react-query/eventsDeclineInvitation.d.ts +23 -0
- package/dist/esm/react-query/eventsDeclineInvitation.d.ts.map +1 -0
- package/dist/esm/react-query/eventsDeclineInvitation.js +42 -0
- package/dist/esm/react-query/eventsDeclineInvitation.js.map +1 -0
- package/dist/esm/react-query/eventsDeleteEvent.d.ts +23 -0
- package/dist/esm/react-query/eventsDeleteEvent.d.ts.map +1 -0
- package/dist/esm/react-query/eventsDeleteEvent.js +42 -0
- package/dist/esm/react-query/eventsDeleteEvent.js.map +1 -0
- package/dist/esm/react-query/eventsUpdateEvent.d.ts +23 -0
- package/dist/esm/react-query/eventsUpdateEvent.d.ts.map +1 -0
- package/dist/esm/react-query/eventsUpdateEvent.js +42 -0
- package/dist/esm/react-query/eventsUpdateEvent.js.map +1 -0
- package/dist/esm/react-query/index.d.ts +5 -0
- package/dist/esm/react-query/index.d.ts.map +1 -1
- package/dist/esm/react-query/index.js +5 -0
- package/dist/esm/react-query/index.js.map +1 -1
- package/dist/esm/sdk/events.d.ts +35 -0
- package/dist/esm/sdk/events.d.ts.map +1 -1
- package/dist/esm/sdk/events.js +51 -0
- package/dist/esm/sdk/events.js.map +1 -1
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/__tests__/events.test.ts +101 -0
- package/src/__tests__/zones.test.ts +16 -4
- package/src/funcs/eventsAcceptInvitation.ts +182 -0
- package/src/funcs/eventsCreateEvent.ts +169 -0
- package/src/funcs/eventsDeclineInvitation.ts +182 -0
- package/src/funcs/eventsDeleteEvent.ts +175 -0
- package/src/funcs/eventsUpdateEvent.ts +176 -0
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +11 -1
- package/src/mcp-server/tools/eventsAcceptInvitation.ts +37 -0
- package/src/mcp-server/tools/eventsCreateEvent.ts +37 -0
- package/src/mcp-server/tools/eventsDeclineInvitation.ts +37 -0
- package/src/mcp-server/tools/eventsDeleteEvent.ts +37 -0
- package/src/mcp-server/tools/eventsUpdateEvent.ts +37 -0
- package/src/models/operations/acceptinvitation.ts +214 -0
- package/src/models/operations/createevent.ts +224 -0
- package/src/models/operations/declineinvitation.ts +214 -0
- package/src/models/operations/deleteevent.ts +130 -0
- package/src/models/operations/index.ts +5 -0
- package/src/models/operations/updateevent.ts +247 -0
- package/src/react-query/eventsAcceptInvitation.ts +89 -0
- package/src/react-query/eventsCreateEvent.ts +88 -0
- package/src/react-query/eventsDeclineInvitation.ts +89 -0
- package/src/react-query/eventsDeleteEvent.ts +88 -0
- package/src/react-query/eventsUpdateEvent.ts +88 -0
- package/src/react-query/index.ts +5 -0
- package/src/sdk/events.ts +91 -0
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
export type DeclineInvitationRequestBody = {
|
|
12
|
+
notes?: string | undefined;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export type DeclineInvitationRequest = {
|
|
16
|
+
/**
|
|
17
|
+
* ID of the event rep.
|
|
18
|
+
*/
|
|
19
|
+
eventId: number;
|
|
20
|
+
/**
|
|
21
|
+
* The identifier of the object
|
|
22
|
+
*/
|
|
23
|
+
id: number;
|
|
24
|
+
requestBody: DeclineInvitationRequestBody;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* The request was successful, and the server has returned the requested resource in the response body.
|
|
29
|
+
*/
|
|
30
|
+
export type DeclineInvitationResponseBody = {
|
|
31
|
+
success?: boolean | undefined;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/** @internal */
|
|
35
|
+
export const DeclineInvitationRequestBody$inboundSchema: z.ZodType<
|
|
36
|
+
DeclineInvitationRequestBody,
|
|
37
|
+
z.ZodTypeDef,
|
|
38
|
+
unknown
|
|
39
|
+
> = z.object({
|
|
40
|
+
notes: z.string().optional(),
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
/** @internal */
|
|
44
|
+
export type DeclineInvitationRequestBody$Outbound = {
|
|
45
|
+
notes?: string | undefined;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
/** @internal */
|
|
49
|
+
export const DeclineInvitationRequestBody$outboundSchema: z.ZodType<
|
|
50
|
+
DeclineInvitationRequestBody$Outbound,
|
|
51
|
+
z.ZodTypeDef,
|
|
52
|
+
DeclineInvitationRequestBody
|
|
53
|
+
> = z.object({
|
|
54
|
+
notes: z.string().optional(),
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* @internal
|
|
59
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
60
|
+
*/
|
|
61
|
+
export namespace DeclineInvitationRequestBody$ {
|
|
62
|
+
/** @deprecated use `DeclineInvitationRequestBody$inboundSchema` instead. */
|
|
63
|
+
export const inboundSchema = DeclineInvitationRequestBody$inboundSchema;
|
|
64
|
+
/** @deprecated use `DeclineInvitationRequestBody$outboundSchema` instead. */
|
|
65
|
+
export const outboundSchema = DeclineInvitationRequestBody$outboundSchema;
|
|
66
|
+
/** @deprecated use `DeclineInvitationRequestBody$Outbound` instead. */
|
|
67
|
+
export type Outbound = DeclineInvitationRequestBody$Outbound;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function declineInvitationRequestBodyToJSON(
|
|
71
|
+
declineInvitationRequestBody: DeclineInvitationRequestBody,
|
|
72
|
+
): string {
|
|
73
|
+
return JSON.stringify(
|
|
74
|
+
DeclineInvitationRequestBody$outboundSchema.parse(
|
|
75
|
+
declineInvitationRequestBody,
|
|
76
|
+
),
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function declineInvitationRequestBodyFromJSON(
|
|
81
|
+
jsonString: string,
|
|
82
|
+
): SafeParseResult<DeclineInvitationRequestBody, SDKValidationError> {
|
|
83
|
+
return safeParse(
|
|
84
|
+
jsonString,
|
|
85
|
+
(x) => DeclineInvitationRequestBody$inboundSchema.parse(JSON.parse(x)),
|
|
86
|
+
`Failed to parse 'DeclineInvitationRequestBody' from JSON`,
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/** @internal */
|
|
91
|
+
export const DeclineInvitationRequest$inboundSchema: z.ZodType<
|
|
92
|
+
DeclineInvitationRequest,
|
|
93
|
+
z.ZodTypeDef,
|
|
94
|
+
unknown
|
|
95
|
+
> = z.object({
|
|
96
|
+
event_id: z.number().int(),
|
|
97
|
+
id: z.number().int(),
|
|
98
|
+
RequestBody: z.lazy(() => DeclineInvitationRequestBody$inboundSchema),
|
|
99
|
+
}).transform((v) => {
|
|
100
|
+
return remap$(v, {
|
|
101
|
+
"event_id": "eventId",
|
|
102
|
+
"RequestBody": "requestBody",
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
/** @internal */
|
|
107
|
+
export type DeclineInvitationRequest$Outbound = {
|
|
108
|
+
event_id: number;
|
|
109
|
+
id: number;
|
|
110
|
+
RequestBody: DeclineInvitationRequestBody$Outbound;
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
/** @internal */
|
|
114
|
+
export const DeclineInvitationRequest$outboundSchema: z.ZodType<
|
|
115
|
+
DeclineInvitationRequest$Outbound,
|
|
116
|
+
z.ZodTypeDef,
|
|
117
|
+
DeclineInvitationRequest
|
|
118
|
+
> = z.object({
|
|
119
|
+
eventId: z.number().int(),
|
|
120
|
+
id: z.number().int(),
|
|
121
|
+
requestBody: z.lazy(() => DeclineInvitationRequestBody$outboundSchema),
|
|
122
|
+
}).transform((v) => {
|
|
123
|
+
return remap$(v, {
|
|
124
|
+
eventId: "event_id",
|
|
125
|
+
requestBody: "RequestBody",
|
|
126
|
+
});
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* @internal
|
|
131
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
132
|
+
*/
|
|
133
|
+
export namespace DeclineInvitationRequest$ {
|
|
134
|
+
/** @deprecated use `DeclineInvitationRequest$inboundSchema` instead. */
|
|
135
|
+
export const inboundSchema = DeclineInvitationRequest$inboundSchema;
|
|
136
|
+
/** @deprecated use `DeclineInvitationRequest$outboundSchema` instead. */
|
|
137
|
+
export const outboundSchema = DeclineInvitationRequest$outboundSchema;
|
|
138
|
+
/** @deprecated use `DeclineInvitationRequest$Outbound` instead. */
|
|
139
|
+
export type Outbound = DeclineInvitationRequest$Outbound;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export function declineInvitationRequestToJSON(
|
|
143
|
+
declineInvitationRequest: DeclineInvitationRequest,
|
|
144
|
+
): string {
|
|
145
|
+
return JSON.stringify(
|
|
146
|
+
DeclineInvitationRequest$outboundSchema.parse(declineInvitationRequest),
|
|
147
|
+
);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export function declineInvitationRequestFromJSON(
|
|
151
|
+
jsonString: string,
|
|
152
|
+
): SafeParseResult<DeclineInvitationRequest, SDKValidationError> {
|
|
153
|
+
return safeParse(
|
|
154
|
+
jsonString,
|
|
155
|
+
(x) => DeclineInvitationRequest$inboundSchema.parse(JSON.parse(x)),
|
|
156
|
+
`Failed to parse 'DeclineInvitationRequest' from JSON`,
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/** @internal */
|
|
161
|
+
export const DeclineInvitationResponseBody$inboundSchema: z.ZodType<
|
|
162
|
+
DeclineInvitationResponseBody,
|
|
163
|
+
z.ZodTypeDef,
|
|
164
|
+
unknown
|
|
165
|
+
> = z.object({
|
|
166
|
+
success: z.boolean().optional(),
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
/** @internal */
|
|
170
|
+
export type DeclineInvitationResponseBody$Outbound = {
|
|
171
|
+
success?: boolean | undefined;
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
/** @internal */
|
|
175
|
+
export const DeclineInvitationResponseBody$outboundSchema: z.ZodType<
|
|
176
|
+
DeclineInvitationResponseBody$Outbound,
|
|
177
|
+
z.ZodTypeDef,
|
|
178
|
+
DeclineInvitationResponseBody
|
|
179
|
+
> = z.object({
|
|
180
|
+
success: z.boolean().optional(),
|
|
181
|
+
});
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* @internal
|
|
185
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
186
|
+
*/
|
|
187
|
+
export namespace DeclineInvitationResponseBody$ {
|
|
188
|
+
/** @deprecated use `DeclineInvitationResponseBody$inboundSchema` instead. */
|
|
189
|
+
export const inboundSchema = DeclineInvitationResponseBody$inboundSchema;
|
|
190
|
+
/** @deprecated use `DeclineInvitationResponseBody$outboundSchema` instead. */
|
|
191
|
+
export const outboundSchema = DeclineInvitationResponseBody$outboundSchema;
|
|
192
|
+
/** @deprecated use `DeclineInvitationResponseBody$Outbound` instead. */
|
|
193
|
+
export type Outbound = DeclineInvitationResponseBody$Outbound;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export function declineInvitationResponseBodyToJSON(
|
|
197
|
+
declineInvitationResponseBody: DeclineInvitationResponseBody,
|
|
198
|
+
): string {
|
|
199
|
+
return JSON.stringify(
|
|
200
|
+
DeclineInvitationResponseBody$outboundSchema.parse(
|
|
201
|
+
declineInvitationResponseBody,
|
|
202
|
+
),
|
|
203
|
+
);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export function declineInvitationResponseBodyFromJSON(
|
|
207
|
+
jsonString: string,
|
|
208
|
+
): SafeParseResult<DeclineInvitationResponseBody, SDKValidationError> {
|
|
209
|
+
return safeParse(
|
|
210
|
+
jsonString,
|
|
211
|
+
(x) => DeclineInvitationResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
212
|
+
`Failed to parse 'DeclineInvitationResponseBody' from JSON`,
|
|
213
|
+
);
|
|
214
|
+
}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
export type DeleteEventRequest = {
|
|
11
|
+
/**
|
|
12
|
+
* The identifier of the object
|
|
13
|
+
*/
|
|
14
|
+
id: number;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The request was successful, and the server has returned the requested resource in the response body.
|
|
19
|
+
*/
|
|
20
|
+
export type DeleteEventResponseBody = {
|
|
21
|
+
success?: boolean | undefined;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/** @internal */
|
|
25
|
+
export const DeleteEventRequest$inboundSchema: z.ZodType<
|
|
26
|
+
DeleteEventRequest,
|
|
27
|
+
z.ZodTypeDef,
|
|
28
|
+
unknown
|
|
29
|
+
> = z.object({
|
|
30
|
+
id: z.number().int(),
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
/** @internal */
|
|
34
|
+
export type DeleteEventRequest$Outbound = {
|
|
35
|
+
id: number;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/** @internal */
|
|
39
|
+
export const DeleteEventRequest$outboundSchema: z.ZodType<
|
|
40
|
+
DeleteEventRequest$Outbound,
|
|
41
|
+
z.ZodTypeDef,
|
|
42
|
+
DeleteEventRequest
|
|
43
|
+
> = z.object({
|
|
44
|
+
id: z.number().int(),
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* @internal
|
|
49
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
50
|
+
*/
|
|
51
|
+
export namespace DeleteEventRequest$ {
|
|
52
|
+
/** @deprecated use `DeleteEventRequest$inboundSchema` instead. */
|
|
53
|
+
export const inboundSchema = DeleteEventRequest$inboundSchema;
|
|
54
|
+
/** @deprecated use `DeleteEventRequest$outboundSchema` instead. */
|
|
55
|
+
export const outboundSchema = DeleteEventRequest$outboundSchema;
|
|
56
|
+
/** @deprecated use `DeleteEventRequest$Outbound` instead. */
|
|
57
|
+
export type Outbound = DeleteEventRequest$Outbound;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function deleteEventRequestToJSON(
|
|
61
|
+
deleteEventRequest: DeleteEventRequest,
|
|
62
|
+
): string {
|
|
63
|
+
return JSON.stringify(
|
|
64
|
+
DeleteEventRequest$outboundSchema.parse(deleteEventRequest),
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function deleteEventRequestFromJSON(
|
|
69
|
+
jsonString: string,
|
|
70
|
+
): SafeParseResult<DeleteEventRequest, SDKValidationError> {
|
|
71
|
+
return safeParse(
|
|
72
|
+
jsonString,
|
|
73
|
+
(x) => DeleteEventRequest$inboundSchema.parse(JSON.parse(x)),
|
|
74
|
+
`Failed to parse 'DeleteEventRequest' from JSON`,
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/** @internal */
|
|
79
|
+
export const DeleteEventResponseBody$inboundSchema: z.ZodType<
|
|
80
|
+
DeleteEventResponseBody,
|
|
81
|
+
z.ZodTypeDef,
|
|
82
|
+
unknown
|
|
83
|
+
> = z.object({
|
|
84
|
+
success: z.boolean().optional(),
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
/** @internal */
|
|
88
|
+
export type DeleteEventResponseBody$Outbound = {
|
|
89
|
+
success?: boolean | undefined;
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
/** @internal */
|
|
93
|
+
export const DeleteEventResponseBody$outboundSchema: z.ZodType<
|
|
94
|
+
DeleteEventResponseBody$Outbound,
|
|
95
|
+
z.ZodTypeDef,
|
|
96
|
+
DeleteEventResponseBody
|
|
97
|
+
> = z.object({
|
|
98
|
+
success: z.boolean().optional(),
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* @internal
|
|
103
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
104
|
+
*/
|
|
105
|
+
export namespace DeleteEventResponseBody$ {
|
|
106
|
+
/** @deprecated use `DeleteEventResponseBody$inboundSchema` instead. */
|
|
107
|
+
export const inboundSchema = DeleteEventResponseBody$inboundSchema;
|
|
108
|
+
/** @deprecated use `DeleteEventResponseBody$outboundSchema` instead. */
|
|
109
|
+
export const outboundSchema = DeleteEventResponseBody$outboundSchema;
|
|
110
|
+
/** @deprecated use `DeleteEventResponseBody$Outbound` instead. */
|
|
111
|
+
export type Outbound = DeleteEventResponseBody$Outbound;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export function deleteEventResponseBodyToJSON(
|
|
115
|
+
deleteEventResponseBody: DeleteEventResponseBody,
|
|
116
|
+
): string {
|
|
117
|
+
return JSON.stringify(
|
|
118
|
+
DeleteEventResponseBody$outboundSchema.parse(deleteEventResponseBody),
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export function deleteEventResponseBodyFromJSON(
|
|
123
|
+
jsonString: string,
|
|
124
|
+
): SafeParseResult<DeleteEventResponseBody, SDKValidationError> {
|
|
125
|
+
return safeParse(
|
|
126
|
+
jsonString,
|
|
127
|
+
(x) => DeleteEventResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
128
|
+
`Failed to parse 'DeleteEventResponseBody' from JSON`,
|
|
129
|
+
);
|
|
130
|
+
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
export * from "./acceptinvitation.js";
|
|
5
6
|
export * from "./acceptvendorcredential.js";
|
|
6
7
|
export * from "./adddatarequestfile.js";
|
|
7
8
|
export * from "./addvendorcredentialfile.js";
|
|
@@ -10,13 +11,16 @@ export * from "./calculatesubscriptionprice.js";
|
|
|
10
11
|
export * from "./changepassword.js";
|
|
11
12
|
export * from "./changesubscription.js";
|
|
12
13
|
export * from "./checkdownloadcode.js";
|
|
14
|
+
export * from "./createevent.js";
|
|
13
15
|
export * from "./createinvoice.js";
|
|
14
16
|
export * from "./createnewvendorcredentialversion.js";
|
|
15
17
|
export * from "./createorupdatebcr.js";
|
|
16
18
|
export * from "./createvendorcompany.js";
|
|
17
19
|
export * from "./createvendorregistration.js";
|
|
20
|
+
export * from "./declineinvitation.js";
|
|
18
21
|
export * from "./declinevendorcredential.js";
|
|
19
22
|
export * from "./deletedatarequestfile.js";
|
|
23
|
+
export * from "./deleteevent.js";
|
|
20
24
|
export * from "./deletevendorcredentialfile.js";
|
|
21
25
|
export * from "./deletevendormanagedbycompany.js";
|
|
22
26
|
export * from "./expeditetimeremaining.js";
|
|
@@ -66,6 +70,7 @@ export * from "./securityzonecheckin.js";
|
|
|
66
70
|
export * from "./senddownloadcode.js";
|
|
67
71
|
export * from "./submitvendorcredential.js";
|
|
68
72
|
export * from "./updatedatarequest.js";
|
|
73
|
+
export * from "./updateevent.js";
|
|
69
74
|
export * from "./updateinvoice.js";
|
|
70
75
|
export * from "./updatesthewebhookendpointwiththegivenid.js";
|
|
71
76
|
export * from "./updatevendorcredentialdata.js";
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
export type UpdateEventRequestBody = {
|
|
12
|
+
name?: string | undefined;
|
|
13
|
+
bringingFood?: boolean | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* Date and time in 12-hour format with 15-minute precision.
|
|
16
|
+
*
|
|
17
|
+
* @remarks
|
|
18
|
+
* Format: MM/DD/YYYY h:mm am/pm (e.g., "07/18/2025 12:15 pm" or "7:15 pm").
|
|
19
|
+
* - Hours: 1 to 12 (zero-padded or not)
|
|
20
|
+
* - Minutes: 00, 15, 30, or 45
|
|
21
|
+
* - AM/PM in lowercase
|
|
22
|
+
*/
|
|
23
|
+
beginDate?: string | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* Date and time in 12-hour format with 15-minute precision.
|
|
26
|
+
*
|
|
27
|
+
* @remarks
|
|
28
|
+
* Format: MM/DD/YYYY h:mm am/pm (e.g., "07/18/2025 12:15 pm" or "7:15 pm").
|
|
29
|
+
* - Hours: 1 to 12 (zero-padded or not)
|
|
30
|
+
* - Minutes: 00, 15, 30, or 45
|
|
31
|
+
* - AM/PM in lowercase
|
|
32
|
+
*/
|
|
33
|
+
endDate?: string | undefined;
|
|
34
|
+
notes?: string | undefined;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export type UpdateEventRequest = {
|
|
38
|
+
/**
|
|
39
|
+
* The identifier of the object
|
|
40
|
+
*/
|
|
41
|
+
id: number;
|
|
42
|
+
requestBody: UpdateEventRequestBody;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* The request was successful, and the server has returned the requested resource in the response body.
|
|
47
|
+
*/
|
|
48
|
+
export type UpdateEventResponseBody = {
|
|
49
|
+
success?: boolean | undefined;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
/** @internal */
|
|
53
|
+
export const UpdateEventRequestBody$inboundSchema: z.ZodType<
|
|
54
|
+
UpdateEventRequestBody,
|
|
55
|
+
z.ZodTypeDef,
|
|
56
|
+
unknown
|
|
57
|
+
> = z.object({
|
|
58
|
+
name: z.string().optional(),
|
|
59
|
+
bringing_food: z.boolean().optional(),
|
|
60
|
+
begin_date: z.string().optional(),
|
|
61
|
+
end_date: z.string().optional(),
|
|
62
|
+
notes: z.string().optional(),
|
|
63
|
+
}).transform((v) => {
|
|
64
|
+
return remap$(v, {
|
|
65
|
+
"bringing_food": "bringingFood",
|
|
66
|
+
"begin_date": "beginDate",
|
|
67
|
+
"end_date": "endDate",
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
/** @internal */
|
|
72
|
+
export type UpdateEventRequestBody$Outbound = {
|
|
73
|
+
name?: string | undefined;
|
|
74
|
+
bringing_food?: boolean | undefined;
|
|
75
|
+
begin_date?: string | undefined;
|
|
76
|
+
end_date?: string | undefined;
|
|
77
|
+
notes?: string | undefined;
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
/** @internal */
|
|
81
|
+
export const UpdateEventRequestBody$outboundSchema: z.ZodType<
|
|
82
|
+
UpdateEventRequestBody$Outbound,
|
|
83
|
+
z.ZodTypeDef,
|
|
84
|
+
UpdateEventRequestBody
|
|
85
|
+
> = z.object({
|
|
86
|
+
name: z.string().optional(),
|
|
87
|
+
bringingFood: z.boolean().optional(),
|
|
88
|
+
beginDate: z.string().optional(),
|
|
89
|
+
endDate: z.string().optional(),
|
|
90
|
+
notes: z.string().optional(),
|
|
91
|
+
}).transform((v) => {
|
|
92
|
+
return remap$(v, {
|
|
93
|
+
bringingFood: "bringing_food",
|
|
94
|
+
beginDate: "begin_date",
|
|
95
|
+
endDate: "end_date",
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* @internal
|
|
101
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
102
|
+
*/
|
|
103
|
+
export namespace UpdateEventRequestBody$ {
|
|
104
|
+
/** @deprecated use `UpdateEventRequestBody$inboundSchema` instead. */
|
|
105
|
+
export const inboundSchema = UpdateEventRequestBody$inboundSchema;
|
|
106
|
+
/** @deprecated use `UpdateEventRequestBody$outboundSchema` instead. */
|
|
107
|
+
export const outboundSchema = UpdateEventRequestBody$outboundSchema;
|
|
108
|
+
/** @deprecated use `UpdateEventRequestBody$Outbound` instead. */
|
|
109
|
+
export type Outbound = UpdateEventRequestBody$Outbound;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export function updateEventRequestBodyToJSON(
|
|
113
|
+
updateEventRequestBody: UpdateEventRequestBody,
|
|
114
|
+
): string {
|
|
115
|
+
return JSON.stringify(
|
|
116
|
+
UpdateEventRequestBody$outboundSchema.parse(updateEventRequestBody),
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export function updateEventRequestBodyFromJSON(
|
|
121
|
+
jsonString: string,
|
|
122
|
+
): SafeParseResult<UpdateEventRequestBody, SDKValidationError> {
|
|
123
|
+
return safeParse(
|
|
124
|
+
jsonString,
|
|
125
|
+
(x) => UpdateEventRequestBody$inboundSchema.parse(JSON.parse(x)),
|
|
126
|
+
`Failed to parse 'UpdateEventRequestBody' from JSON`,
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/** @internal */
|
|
131
|
+
export const UpdateEventRequest$inboundSchema: z.ZodType<
|
|
132
|
+
UpdateEventRequest,
|
|
133
|
+
z.ZodTypeDef,
|
|
134
|
+
unknown
|
|
135
|
+
> = z.object({
|
|
136
|
+
id: z.number().int(),
|
|
137
|
+
RequestBody: z.lazy(() => UpdateEventRequestBody$inboundSchema),
|
|
138
|
+
}).transform((v) => {
|
|
139
|
+
return remap$(v, {
|
|
140
|
+
"RequestBody": "requestBody",
|
|
141
|
+
});
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
/** @internal */
|
|
145
|
+
export type UpdateEventRequest$Outbound = {
|
|
146
|
+
id: number;
|
|
147
|
+
RequestBody: UpdateEventRequestBody$Outbound;
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
/** @internal */
|
|
151
|
+
export const UpdateEventRequest$outboundSchema: z.ZodType<
|
|
152
|
+
UpdateEventRequest$Outbound,
|
|
153
|
+
z.ZodTypeDef,
|
|
154
|
+
UpdateEventRequest
|
|
155
|
+
> = z.object({
|
|
156
|
+
id: z.number().int(),
|
|
157
|
+
requestBody: z.lazy(() => UpdateEventRequestBody$outboundSchema),
|
|
158
|
+
}).transform((v) => {
|
|
159
|
+
return remap$(v, {
|
|
160
|
+
requestBody: "RequestBody",
|
|
161
|
+
});
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* @internal
|
|
166
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
167
|
+
*/
|
|
168
|
+
export namespace UpdateEventRequest$ {
|
|
169
|
+
/** @deprecated use `UpdateEventRequest$inboundSchema` instead. */
|
|
170
|
+
export const inboundSchema = UpdateEventRequest$inboundSchema;
|
|
171
|
+
/** @deprecated use `UpdateEventRequest$outboundSchema` instead. */
|
|
172
|
+
export const outboundSchema = UpdateEventRequest$outboundSchema;
|
|
173
|
+
/** @deprecated use `UpdateEventRequest$Outbound` instead. */
|
|
174
|
+
export type Outbound = UpdateEventRequest$Outbound;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export function updateEventRequestToJSON(
|
|
178
|
+
updateEventRequest: UpdateEventRequest,
|
|
179
|
+
): string {
|
|
180
|
+
return JSON.stringify(
|
|
181
|
+
UpdateEventRequest$outboundSchema.parse(updateEventRequest),
|
|
182
|
+
);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export function updateEventRequestFromJSON(
|
|
186
|
+
jsonString: string,
|
|
187
|
+
): SafeParseResult<UpdateEventRequest, SDKValidationError> {
|
|
188
|
+
return safeParse(
|
|
189
|
+
jsonString,
|
|
190
|
+
(x) => UpdateEventRequest$inboundSchema.parse(JSON.parse(x)),
|
|
191
|
+
`Failed to parse 'UpdateEventRequest' from JSON`,
|
|
192
|
+
);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/** @internal */
|
|
196
|
+
export const UpdateEventResponseBody$inboundSchema: z.ZodType<
|
|
197
|
+
UpdateEventResponseBody,
|
|
198
|
+
z.ZodTypeDef,
|
|
199
|
+
unknown
|
|
200
|
+
> = z.object({
|
|
201
|
+
success: z.boolean().optional(),
|
|
202
|
+
});
|
|
203
|
+
|
|
204
|
+
/** @internal */
|
|
205
|
+
export type UpdateEventResponseBody$Outbound = {
|
|
206
|
+
success?: boolean | undefined;
|
|
207
|
+
};
|
|
208
|
+
|
|
209
|
+
/** @internal */
|
|
210
|
+
export const UpdateEventResponseBody$outboundSchema: z.ZodType<
|
|
211
|
+
UpdateEventResponseBody$Outbound,
|
|
212
|
+
z.ZodTypeDef,
|
|
213
|
+
UpdateEventResponseBody
|
|
214
|
+
> = z.object({
|
|
215
|
+
success: z.boolean().optional(),
|
|
216
|
+
});
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* @internal
|
|
220
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
221
|
+
*/
|
|
222
|
+
export namespace UpdateEventResponseBody$ {
|
|
223
|
+
/** @deprecated use `UpdateEventResponseBody$inboundSchema` instead. */
|
|
224
|
+
export const inboundSchema = UpdateEventResponseBody$inboundSchema;
|
|
225
|
+
/** @deprecated use `UpdateEventResponseBody$outboundSchema` instead. */
|
|
226
|
+
export const outboundSchema = UpdateEventResponseBody$outboundSchema;
|
|
227
|
+
/** @deprecated use `UpdateEventResponseBody$Outbound` instead. */
|
|
228
|
+
export type Outbound = UpdateEventResponseBody$Outbound;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
export function updateEventResponseBodyToJSON(
|
|
232
|
+
updateEventResponseBody: UpdateEventResponseBody,
|
|
233
|
+
): string {
|
|
234
|
+
return JSON.stringify(
|
|
235
|
+
UpdateEventResponseBody$outboundSchema.parse(updateEventResponseBody),
|
|
236
|
+
);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
export function updateEventResponseBodyFromJSON(
|
|
240
|
+
jsonString: string,
|
|
241
|
+
): SafeParseResult<UpdateEventResponseBody, SDKValidationError> {
|
|
242
|
+
return safeParse(
|
|
243
|
+
jsonString,
|
|
244
|
+
(x) => UpdateEventResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
245
|
+
`Failed to parse 'UpdateEventResponseBody' from JSON`,
|
|
246
|
+
);
|
|
247
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
MutationKey,
|
|
7
|
+
useMutation,
|
|
8
|
+
UseMutationResult,
|
|
9
|
+
} from "@tanstack/react-query";
|
|
10
|
+
import { GreenSecurityCore } from "../core.js";
|
|
11
|
+
import { eventsAcceptInvitation } from "../funcs/eventsAcceptInvitation.js";
|
|
12
|
+
import { combineSignals } from "../lib/primitives.js";
|
|
13
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
14
|
+
import * as operations from "../models/operations/index.js";
|
|
15
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
16
|
+
import { useGreenSecurityContext } from "./_context.js";
|
|
17
|
+
import { MutationHookOptions } from "./_types.js";
|
|
18
|
+
|
|
19
|
+
export type EventsAcceptInvitationMutationVariables = {
|
|
20
|
+
request: operations.AcceptInvitationRequest;
|
|
21
|
+
options?: RequestOptions;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export type EventsAcceptInvitationMutationData =
|
|
25
|
+
operations.AcceptInvitationResponseBody;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Accept event invitation
|
|
29
|
+
*
|
|
30
|
+
* @remarks
|
|
31
|
+
* Accept event invitation
|
|
32
|
+
*/
|
|
33
|
+
export function useEventsAcceptInvitationMutation(
|
|
34
|
+
options?: MutationHookOptions<
|
|
35
|
+
EventsAcceptInvitationMutationData,
|
|
36
|
+
Error,
|
|
37
|
+
EventsAcceptInvitationMutationVariables
|
|
38
|
+
>,
|
|
39
|
+
): UseMutationResult<
|
|
40
|
+
EventsAcceptInvitationMutationData,
|
|
41
|
+
Error,
|
|
42
|
+
EventsAcceptInvitationMutationVariables
|
|
43
|
+
> {
|
|
44
|
+
const client = useGreenSecurityContext();
|
|
45
|
+
return useMutation({
|
|
46
|
+
...buildEventsAcceptInvitationMutation(client, options),
|
|
47
|
+
...options,
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function mutationKeyEventsAcceptInvitation(): MutationKey {
|
|
52
|
+
return ["@greensecurity/javascript-sdk", "events", "acceptInvitation"];
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function buildEventsAcceptInvitationMutation(
|
|
56
|
+
client$: GreenSecurityCore,
|
|
57
|
+
hookOptions?: RequestOptions,
|
|
58
|
+
): {
|
|
59
|
+
mutationKey: MutationKey;
|
|
60
|
+
mutationFn: (
|
|
61
|
+
variables: EventsAcceptInvitationMutationVariables,
|
|
62
|
+
) => Promise<EventsAcceptInvitationMutationData>;
|
|
63
|
+
} {
|
|
64
|
+
return {
|
|
65
|
+
mutationKey: mutationKeyEventsAcceptInvitation(),
|
|
66
|
+
mutationFn: function eventsAcceptInvitationMutationFn({
|
|
67
|
+
request,
|
|
68
|
+
options,
|
|
69
|
+
}): Promise<EventsAcceptInvitationMutationData> {
|
|
70
|
+
const mergedOptions = {
|
|
71
|
+
...hookOptions,
|
|
72
|
+
...options,
|
|
73
|
+
fetchOptions: {
|
|
74
|
+
...hookOptions?.fetchOptions,
|
|
75
|
+
...options?.fetchOptions,
|
|
76
|
+
signal: combineSignals(
|
|
77
|
+
hookOptions?.fetchOptions?.signal,
|
|
78
|
+
options?.fetchOptions?.signal,
|
|
79
|
+
),
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
return unwrapAsync(eventsAcceptInvitation(
|
|
83
|
+
client$,
|
|
84
|
+
request,
|
|
85
|
+
mergedOptions,
|
|
86
|
+
));
|
|
87
|
+
},
|
|
88
|
+
};
|
|
89
|
+
}
|