@greensecurity/javascript-sdk 0.39.4 → 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 +1431 -591
- package/bin/mcp-server.js.map +23 -8
- 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/components/vendorfacilitystatusview.d.ts +4 -0
- package/dist/commonjs/models/components/vendorfacilitystatusview.d.ts.map +1 -1
- package/dist/commonjs/models/components/vendorfacilitystatusview.js +8 -0
- package/dist/commonjs/models/components/vendorfacilitystatusview.js.map +1 -1
- 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/components/vendorfacilitystatusview.d.ts +4 -0
- package/dist/esm/models/components/vendorfacilitystatusview.d.ts.map +1 -1
- package/dist/esm/models/components/vendorfacilitystatusview.js +8 -0
- package/dist/esm/models/components/vendorfacilitystatusview.js.map +1 -1
- 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/components/vendorfacilitystatusview.ts +12 -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,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
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
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 { eventsCreateEvent } from "../funcs/eventsCreateEvent.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 EventsCreateEventMutationVariables = {
|
|
20
|
+
request: operations.CreateEventRequestBody;
|
|
21
|
+
options?: RequestOptions;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export type EventsCreateEventMutationData = operations.CreateEventResponseBody;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Create a new event for calendar
|
|
28
|
+
*
|
|
29
|
+
* @remarks
|
|
30
|
+
* Create a new event for calendar
|
|
31
|
+
*/
|
|
32
|
+
export function useEventsCreateEventMutation(
|
|
33
|
+
options?: MutationHookOptions<
|
|
34
|
+
EventsCreateEventMutationData,
|
|
35
|
+
Error,
|
|
36
|
+
EventsCreateEventMutationVariables
|
|
37
|
+
>,
|
|
38
|
+
): UseMutationResult<
|
|
39
|
+
EventsCreateEventMutationData,
|
|
40
|
+
Error,
|
|
41
|
+
EventsCreateEventMutationVariables
|
|
42
|
+
> {
|
|
43
|
+
const client = useGreenSecurityContext();
|
|
44
|
+
return useMutation({
|
|
45
|
+
...buildEventsCreateEventMutation(client, options),
|
|
46
|
+
...options,
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function mutationKeyEventsCreateEvent(): MutationKey {
|
|
51
|
+
return ["@greensecurity/javascript-sdk", "events", "createEvent"];
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function buildEventsCreateEventMutation(
|
|
55
|
+
client$: GreenSecurityCore,
|
|
56
|
+
hookOptions?: RequestOptions,
|
|
57
|
+
): {
|
|
58
|
+
mutationKey: MutationKey;
|
|
59
|
+
mutationFn: (
|
|
60
|
+
variables: EventsCreateEventMutationVariables,
|
|
61
|
+
) => Promise<EventsCreateEventMutationData>;
|
|
62
|
+
} {
|
|
63
|
+
return {
|
|
64
|
+
mutationKey: mutationKeyEventsCreateEvent(),
|
|
65
|
+
mutationFn: function eventsCreateEventMutationFn({
|
|
66
|
+
request,
|
|
67
|
+
options,
|
|
68
|
+
}): Promise<EventsCreateEventMutationData> {
|
|
69
|
+
const mergedOptions = {
|
|
70
|
+
...hookOptions,
|
|
71
|
+
...options,
|
|
72
|
+
fetchOptions: {
|
|
73
|
+
...hookOptions?.fetchOptions,
|
|
74
|
+
...options?.fetchOptions,
|
|
75
|
+
signal: combineSignals(
|
|
76
|
+
hookOptions?.fetchOptions?.signal,
|
|
77
|
+
options?.fetchOptions?.signal,
|
|
78
|
+
),
|
|
79
|
+
},
|
|
80
|
+
};
|
|
81
|
+
return unwrapAsync(eventsCreateEvent(
|
|
82
|
+
client$,
|
|
83
|
+
request,
|
|
84
|
+
mergedOptions,
|
|
85
|
+
));
|
|
86
|
+
},
|
|
87
|
+
};
|
|
88
|
+
}
|
|
@@ -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 { eventsDeclineInvitation } from "../funcs/eventsDeclineInvitation.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 EventsDeclineInvitationMutationVariables = {
|
|
20
|
+
request: operations.DeclineInvitationRequest;
|
|
21
|
+
options?: RequestOptions;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export type EventsDeclineInvitationMutationData =
|
|
25
|
+
operations.DeclineInvitationResponseBody;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Decline event invitation
|
|
29
|
+
*
|
|
30
|
+
* @remarks
|
|
31
|
+
* Decline event invitation
|
|
32
|
+
*/
|
|
33
|
+
export function useEventsDeclineInvitationMutation(
|
|
34
|
+
options?: MutationHookOptions<
|
|
35
|
+
EventsDeclineInvitationMutationData,
|
|
36
|
+
Error,
|
|
37
|
+
EventsDeclineInvitationMutationVariables
|
|
38
|
+
>,
|
|
39
|
+
): UseMutationResult<
|
|
40
|
+
EventsDeclineInvitationMutationData,
|
|
41
|
+
Error,
|
|
42
|
+
EventsDeclineInvitationMutationVariables
|
|
43
|
+
> {
|
|
44
|
+
const client = useGreenSecurityContext();
|
|
45
|
+
return useMutation({
|
|
46
|
+
...buildEventsDeclineInvitationMutation(client, options),
|
|
47
|
+
...options,
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function mutationKeyEventsDeclineInvitation(): MutationKey {
|
|
52
|
+
return ["@greensecurity/javascript-sdk", "events", "declineInvitation"];
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function buildEventsDeclineInvitationMutation(
|
|
56
|
+
client$: GreenSecurityCore,
|
|
57
|
+
hookOptions?: RequestOptions,
|
|
58
|
+
): {
|
|
59
|
+
mutationKey: MutationKey;
|
|
60
|
+
mutationFn: (
|
|
61
|
+
variables: EventsDeclineInvitationMutationVariables,
|
|
62
|
+
) => Promise<EventsDeclineInvitationMutationData>;
|
|
63
|
+
} {
|
|
64
|
+
return {
|
|
65
|
+
mutationKey: mutationKeyEventsDeclineInvitation(),
|
|
66
|
+
mutationFn: function eventsDeclineInvitationMutationFn({
|
|
67
|
+
request,
|
|
68
|
+
options,
|
|
69
|
+
}): Promise<EventsDeclineInvitationMutationData> {
|
|
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(eventsDeclineInvitation(
|
|
83
|
+
client$,
|
|
84
|
+
request,
|
|
85
|
+
mergedOptions,
|
|
86
|
+
));
|
|
87
|
+
},
|
|
88
|
+
};
|
|
89
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
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 { eventsDeleteEvent } from "../funcs/eventsDeleteEvent.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 EventsDeleteEventMutationVariables = {
|
|
20
|
+
request: operations.DeleteEventRequest;
|
|
21
|
+
options?: RequestOptions;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export type EventsDeleteEventMutationData = operations.DeleteEventResponseBody;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Delete event for calendar
|
|
28
|
+
*
|
|
29
|
+
* @remarks
|
|
30
|
+
* Delete event for calendar
|
|
31
|
+
*/
|
|
32
|
+
export function useEventsDeleteEventMutation(
|
|
33
|
+
options?: MutationHookOptions<
|
|
34
|
+
EventsDeleteEventMutationData,
|
|
35
|
+
Error,
|
|
36
|
+
EventsDeleteEventMutationVariables
|
|
37
|
+
>,
|
|
38
|
+
): UseMutationResult<
|
|
39
|
+
EventsDeleteEventMutationData,
|
|
40
|
+
Error,
|
|
41
|
+
EventsDeleteEventMutationVariables
|
|
42
|
+
> {
|
|
43
|
+
const client = useGreenSecurityContext();
|
|
44
|
+
return useMutation({
|
|
45
|
+
...buildEventsDeleteEventMutation(client, options),
|
|
46
|
+
...options,
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function mutationKeyEventsDeleteEvent(): MutationKey {
|
|
51
|
+
return ["@greensecurity/javascript-sdk", "events", "deleteEvent"];
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function buildEventsDeleteEventMutation(
|
|
55
|
+
client$: GreenSecurityCore,
|
|
56
|
+
hookOptions?: RequestOptions,
|
|
57
|
+
): {
|
|
58
|
+
mutationKey: MutationKey;
|
|
59
|
+
mutationFn: (
|
|
60
|
+
variables: EventsDeleteEventMutationVariables,
|
|
61
|
+
) => Promise<EventsDeleteEventMutationData>;
|
|
62
|
+
} {
|
|
63
|
+
return {
|
|
64
|
+
mutationKey: mutationKeyEventsDeleteEvent(),
|
|
65
|
+
mutationFn: function eventsDeleteEventMutationFn({
|
|
66
|
+
request,
|
|
67
|
+
options,
|
|
68
|
+
}): Promise<EventsDeleteEventMutationData> {
|
|
69
|
+
const mergedOptions = {
|
|
70
|
+
...hookOptions,
|
|
71
|
+
...options,
|
|
72
|
+
fetchOptions: {
|
|
73
|
+
...hookOptions?.fetchOptions,
|
|
74
|
+
...options?.fetchOptions,
|
|
75
|
+
signal: combineSignals(
|
|
76
|
+
hookOptions?.fetchOptions?.signal,
|
|
77
|
+
options?.fetchOptions?.signal,
|
|
78
|
+
),
|
|
79
|
+
},
|
|
80
|
+
};
|
|
81
|
+
return unwrapAsync(eventsDeleteEvent(
|
|
82
|
+
client$,
|
|
83
|
+
request,
|
|
84
|
+
mergedOptions,
|
|
85
|
+
));
|
|
86
|
+
},
|
|
87
|
+
};
|
|
88
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
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 { eventsUpdateEvent } from "../funcs/eventsUpdateEvent.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 EventsUpdateEventMutationVariables = {
|
|
20
|
+
request: operations.UpdateEventRequest;
|
|
21
|
+
options?: RequestOptions;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export type EventsUpdateEventMutationData = operations.UpdateEventResponseBody;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Update event for calendar
|
|
28
|
+
*
|
|
29
|
+
* @remarks
|
|
30
|
+
* Update event for calendar
|
|
31
|
+
*/
|
|
32
|
+
export function useEventsUpdateEventMutation(
|
|
33
|
+
options?: MutationHookOptions<
|
|
34
|
+
EventsUpdateEventMutationData,
|
|
35
|
+
Error,
|
|
36
|
+
EventsUpdateEventMutationVariables
|
|
37
|
+
>,
|
|
38
|
+
): UseMutationResult<
|
|
39
|
+
EventsUpdateEventMutationData,
|
|
40
|
+
Error,
|
|
41
|
+
EventsUpdateEventMutationVariables
|
|
42
|
+
> {
|
|
43
|
+
const client = useGreenSecurityContext();
|
|
44
|
+
return useMutation({
|
|
45
|
+
...buildEventsUpdateEventMutation(client, options),
|
|
46
|
+
...options,
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function mutationKeyEventsUpdateEvent(): MutationKey {
|
|
51
|
+
return ["@greensecurity/javascript-sdk", "events", "updateEvent"];
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function buildEventsUpdateEventMutation(
|
|
55
|
+
client$: GreenSecurityCore,
|
|
56
|
+
hookOptions?: RequestOptions,
|
|
57
|
+
): {
|
|
58
|
+
mutationKey: MutationKey;
|
|
59
|
+
mutationFn: (
|
|
60
|
+
variables: EventsUpdateEventMutationVariables,
|
|
61
|
+
) => Promise<EventsUpdateEventMutationData>;
|
|
62
|
+
} {
|
|
63
|
+
return {
|
|
64
|
+
mutationKey: mutationKeyEventsUpdateEvent(),
|
|
65
|
+
mutationFn: function eventsUpdateEventMutationFn({
|
|
66
|
+
request,
|
|
67
|
+
options,
|
|
68
|
+
}): Promise<EventsUpdateEventMutationData> {
|
|
69
|
+
const mergedOptions = {
|
|
70
|
+
...hookOptions,
|
|
71
|
+
...options,
|
|
72
|
+
fetchOptions: {
|
|
73
|
+
...hookOptions?.fetchOptions,
|
|
74
|
+
...options?.fetchOptions,
|
|
75
|
+
signal: combineSignals(
|
|
76
|
+
hookOptions?.fetchOptions?.signal,
|
|
77
|
+
options?.fetchOptions?.signal,
|
|
78
|
+
),
|
|
79
|
+
},
|
|
80
|
+
};
|
|
81
|
+
return unwrapAsync(eventsUpdateEvent(
|
|
82
|
+
client$,
|
|
83
|
+
request,
|
|
84
|
+
mergedOptions,
|
|
85
|
+
));
|
|
86
|
+
},
|
|
87
|
+
};
|
|
88
|
+
}
|
package/src/react-query/index.ts
CHANGED
|
@@ -9,7 +9,12 @@ export * from "./companiesListOrSearchCompanies.js";
|
|
|
9
9
|
export * from "./dataRequestsAddDataRequestFile.js";
|
|
10
10
|
export * from "./dataRequestsDeleteDataRequestFile.js";
|
|
11
11
|
export * from "./dataRequestsUpdateDataRequest.js";
|
|
12
|
+
export * from "./eventsAcceptInvitation.js";
|
|
13
|
+
export * from "./eventsCreateEvent.js";
|
|
14
|
+
export * from "./eventsDeclineInvitation.js";
|
|
15
|
+
export * from "./eventsDeleteEvent.js";
|
|
12
16
|
export * from "./eventsListOrSearchVendorInvitees.js";
|
|
17
|
+
export * from "./eventsUpdateEvent.js";
|
|
13
18
|
export * from "./invoicesCreateInvoice.js";
|
|
14
19
|
export * from "./invoicesMakePayment.js";
|
|
15
20
|
export * from "./invoicesUpdateInvoice.js";
|