@greensecurity/javascript-sdk 0.39.6 → 0.39.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (242) hide show
  1. package/README.md +15 -0
  2. package/bin/mcp-server.js +1423 -591
  3. package/bin/mcp-server.js.map +22 -7
  4. package/dist/commonjs/__tests__/events.test.js +86 -0
  5. package/dist/commonjs/__tests__/events.test.js.map +1 -1
  6. package/dist/commonjs/__tests__/zones.test.js +2 -5
  7. package/dist/commonjs/__tests__/zones.test.js.map +1 -1
  8. package/dist/commonjs/funcs/eventsAcceptInvitation.d.ts +18 -0
  9. package/dist/commonjs/funcs/eventsAcceptInvitation.d.ts.map +1 -0
  10. package/dist/commonjs/funcs/eventsAcceptInvitation.js +127 -0
  11. package/dist/commonjs/funcs/eventsAcceptInvitation.js.map +1 -0
  12. package/dist/commonjs/funcs/eventsCreateEvent.d.ts +18 -0
  13. package/dist/commonjs/funcs/eventsCreateEvent.d.ts.map +1 -0
  14. package/dist/commonjs/funcs/eventsCreateEvent.js +117 -0
  15. package/dist/commonjs/funcs/eventsCreateEvent.js.map +1 -0
  16. package/dist/commonjs/funcs/eventsDeclineInvitation.d.ts +18 -0
  17. package/dist/commonjs/funcs/eventsDeclineInvitation.d.ts.map +1 -0
  18. package/dist/commonjs/funcs/eventsDeclineInvitation.js +127 -0
  19. package/dist/commonjs/funcs/eventsDeclineInvitation.js.map +1 -0
  20. package/dist/commonjs/funcs/eventsDeleteEvent.d.ts +18 -0
  21. package/dist/commonjs/funcs/eventsDeleteEvent.d.ts.map +1 -0
  22. package/dist/commonjs/funcs/eventsDeleteEvent.js +122 -0
  23. package/dist/commonjs/funcs/eventsDeleteEvent.js.map +1 -0
  24. package/dist/commonjs/funcs/eventsUpdateEvent.d.ts +18 -0
  25. package/dist/commonjs/funcs/eventsUpdateEvent.d.ts.map +1 -0
  26. package/dist/commonjs/funcs/eventsUpdateEvent.js +123 -0
  27. package/dist/commonjs/funcs/eventsUpdateEvent.js.map +1 -0
  28. package/dist/commonjs/lib/config.d.ts +3 -3
  29. package/dist/commonjs/lib/config.js +3 -3
  30. package/dist/commonjs/lib/config.js.map +1 -1
  31. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  32. package/dist/commonjs/mcp-server/mcp-server.js.map +1 -1
  33. package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
  34. package/dist/commonjs/mcp-server/server.js +11 -1
  35. package/dist/commonjs/mcp-server/server.js.map +1 -1
  36. package/dist/commonjs/mcp-server/tools/eventsAcceptInvitation.d.ts +8 -0
  37. package/dist/commonjs/mcp-server/tools/eventsAcceptInvitation.d.ts.map +1 -0
  38. package/dist/commonjs/mcp-server/tools/eventsAcceptInvitation.js +64 -0
  39. package/dist/commonjs/mcp-server/tools/eventsAcceptInvitation.js.map +1 -0
  40. package/dist/commonjs/mcp-server/tools/eventsCreateEvent.d.ts +8 -0
  41. package/dist/commonjs/mcp-server/tools/eventsCreateEvent.d.ts.map +1 -0
  42. package/dist/commonjs/mcp-server/tools/eventsCreateEvent.js +64 -0
  43. package/dist/commonjs/mcp-server/tools/eventsCreateEvent.js.map +1 -0
  44. package/dist/commonjs/mcp-server/tools/eventsDeclineInvitation.d.ts +8 -0
  45. package/dist/commonjs/mcp-server/tools/eventsDeclineInvitation.d.ts.map +1 -0
  46. package/dist/commonjs/mcp-server/tools/eventsDeclineInvitation.js +64 -0
  47. package/dist/commonjs/mcp-server/tools/eventsDeclineInvitation.js.map +1 -0
  48. package/dist/commonjs/mcp-server/tools/eventsDeleteEvent.d.ts +8 -0
  49. package/dist/commonjs/mcp-server/tools/eventsDeleteEvent.d.ts.map +1 -0
  50. package/dist/commonjs/mcp-server/tools/eventsDeleteEvent.js +64 -0
  51. package/dist/commonjs/mcp-server/tools/eventsDeleteEvent.js.map +1 -0
  52. package/dist/commonjs/mcp-server/tools/eventsUpdateEvent.d.ts +8 -0
  53. package/dist/commonjs/mcp-server/tools/eventsUpdateEvent.d.ts.map +1 -0
  54. package/dist/commonjs/mcp-server/tools/eventsUpdateEvent.js +64 -0
  55. package/dist/commonjs/mcp-server/tools/eventsUpdateEvent.js.map +1 -0
  56. package/dist/commonjs/models/operations/acceptinvitation.d.ts +92 -0
  57. package/dist/commonjs/models/operations/acceptinvitation.d.ts.map +1 -0
  58. package/dist/commonjs/models/operations/acceptinvitation.js +138 -0
  59. package/dist/commonjs/models/operations/acceptinvitation.js.map +1 -0
  60. package/dist/commonjs/models/operations/createevent.d.ts +99 -0
  61. package/dist/commonjs/models/operations/createevent.d.ts.map +1 -0
  62. package/dist/commonjs/models/operations/createevent.js +151 -0
  63. package/dist/commonjs/models/operations/createevent.js.map +1 -0
  64. package/dist/commonjs/models/operations/declineinvitation.d.ts +92 -0
  65. package/dist/commonjs/models/operations/declineinvitation.d.ts.map +1 -0
  66. package/dist/commonjs/models/operations/declineinvitation.js +138 -0
  67. package/dist/commonjs/models/operations/declineinvitation.js.map +1 -0
  68. package/dist/commonjs/models/operations/deleteevent.d.ts +60 -0
  69. package/dist/commonjs/models/operations/deleteevent.d.ts.map +1 -0
  70. package/dist/commonjs/models/operations/deleteevent.js +96 -0
  71. package/dist/commonjs/models/operations/deleteevent.js.map +1 -0
  72. package/dist/commonjs/models/operations/index.d.ts +5 -0
  73. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  74. package/dist/commonjs/models/operations/index.js +5 -0
  75. package/dist/commonjs/models/operations/index.js.map +1 -1
  76. package/dist/commonjs/models/operations/updateevent.d.ts +113 -0
  77. package/dist/commonjs/models/operations/updateevent.d.ts.map +1 -0
  78. package/dist/commonjs/models/operations/updateevent.js +154 -0
  79. package/dist/commonjs/models/operations/updateevent.js.map +1 -0
  80. package/dist/commonjs/react-query/eventsAcceptInvitation.d.ts +23 -0
  81. package/dist/commonjs/react-query/eventsAcceptInvitation.d.ts.map +1 -0
  82. package/dist/commonjs/react-query/eventsAcceptInvitation.js +47 -0
  83. package/dist/commonjs/react-query/eventsAcceptInvitation.js.map +1 -0
  84. package/dist/commonjs/react-query/eventsCreateEvent.d.ts +23 -0
  85. package/dist/commonjs/react-query/eventsCreateEvent.d.ts.map +1 -0
  86. package/dist/commonjs/react-query/eventsCreateEvent.js +47 -0
  87. package/dist/commonjs/react-query/eventsCreateEvent.js.map +1 -0
  88. package/dist/commonjs/react-query/eventsDeclineInvitation.d.ts +23 -0
  89. package/dist/commonjs/react-query/eventsDeclineInvitation.d.ts.map +1 -0
  90. package/dist/commonjs/react-query/eventsDeclineInvitation.js +47 -0
  91. package/dist/commonjs/react-query/eventsDeclineInvitation.js.map +1 -0
  92. package/dist/commonjs/react-query/eventsDeleteEvent.d.ts +23 -0
  93. package/dist/commonjs/react-query/eventsDeleteEvent.d.ts.map +1 -0
  94. package/dist/commonjs/react-query/eventsDeleteEvent.js +47 -0
  95. package/dist/commonjs/react-query/eventsDeleteEvent.js.map +1 -0
  96. package/dist/commonjs/react-query/eventsUpdateEvent.d.ts +23 -0
  97. package/dist/commonjs/react-query/eventsUpdateEvent.d.ts.map +1 -0
  98. package/dist/commonjs/react-query/eventsUpdateEvent.js +47 -0
  99. package/dist/commonjs/react-query/eventsUpdateEvent.js.map +1 -0
  100. package/dist/commonjs/react-query/index.d.ts +5 -0
  101. package/dist/commonjs/react-query/index.d.ts.map +1 -1
  102. package/dist/commonjs/react-query/index.js +5 -0
  103. package/dist/commonjs/react-query/index.js.map +1 -1
  104. package/dist/commonjs/sdk/events.d.ts +35 -0
  105. package/dist/commonjs/sdk/events.d.ts.map +1 -1
  106. package/dist/commonjs/sdk/events.js +51 -0
  107. package/dist/commonjs/sdk/events.js.map +1 -1
  108. package/dist/esm/__tests__/events.test.js +86 -0
  109. package/dist/esm/__tests__/events.test.js.map +1 -1
  110. package/dist/esm/__tests__/zones.test.js +2 -5
  111. package/dist/esm/__tests__/zones.test.js.map +1 -1
  112. package/dist/esm/funcs/eventsAcceptInvitation.d.ts +18 -0
  113. package/dist/esm/funcs/eventsAcceptInvitation.d.ts.map +1 -0
  114. package/dist/esm/funcs/eventsAcceptInvitation.js +91 -0
  115. package/dist/esm/funcs/eventsAcceptInvitation.js.map +1 -0
  116. package/dist/esm/funcs/eventsCreateEvent.d.ts +18 -0
  117. package/dist/esm/funcs/eventsCreateEvent.d.ts.map +1 -0
  118. package/dist/esm/funcs/eventsCreateEvent.js +81 -0
  119. package/dist/esm/funcs/eventsCreateEvent.js.map +1 -0
  120. package/dist/esm/funcs/eventsDeclineInvitation.d.ts +18 -0
  121. package/dist/esm/funcs/eventsDeclineInvitation.d.ts.map +1 -0
  122. package/dist/esm/funcs/eventsDeclineInvitation.js +91 -0
  123. package/dist/esm/funcs/eventsDeclineInvitation.js.map +1 -0
  124. package/dist/esm/funcs/eventsDeleteEvent.d.ts +18 -0
  125. package/dist/esm/funcs/eventsDeleteEvent.d.ts.map +1 -0
  126. package/dist/esm/funcs/eventsDeleteEvent.js +86 -0
  127. package/dist/esm/funcs/eventsDeleteEvent.js.map +1 -0
  128. package/dist/esm/funcs/eventsUpdateEvent.d.ts +18 -0
  129. package/dist/esm/funcs/eventsUpdateEvent.d.ts.map +1 -0
  130. package/dist/esm/funcs/eventsUpdateEvent.js +87 -0
  131. package/dist/esm/funcs/eventsUpdateEvent.js.map +1 -0
  132. package/dist/esm/lib/config.d.ts +3 -3
  133. package/dist/esm/lib/config.js +3 -3
  134. package/dist/esm/lib/config.js.map +1 -1
  135. package/dist/esm/mcp-server/mcp-server.js +1 -1
  136. package/dist/esm/mcp-server/mcp-server.js.map +1 -1
  137. package/dist/esm/mcp-server/server.d.ts.map +1 -1
  138. package/dist/esm/mcp-server/server.js +11 -1
  139. package/dist/esm/mcp-server/server.js.map +1 -1
  140. package/dist/esm/mcp-server/tools/eventsAcceptInvitation.d.ts +8 -0
  141. package/dist/esm/mcp-server/tools/eventsAcceptInvitation.d.ts.map +1 -0
  142. package/dist/esm/mcp-server/tools/eventsAcceptInvitation.js +28 -0
  143. package/dist/esm/mcp-server/tools/eventsAcceptInvitation.js.map +1 -0
  144. package/dist/esm/mcp-server/tools/eventsCreateEvent.d.ts +8 -0
  145. package/dist/esm/mcp-server/tools/eventsCreateEvent.d.ts.map +1 -0
  146. package/dist/esm/mcp-server/tools/eventsCreateEvent.js +28 -0
  147. package/dist/esm/mcp-server/tools/eventsCreateEvent.js.map +1 -0
  148. package/dist/esm/mcp-server/tools/eventsDeclineInvitation.d.ts +8 -0
  149. package/dist/esm/mcp-server/tools/eventsDeclineInvitation.d.ts.map +1 -0
  150. package/dist/esm/mcp-server/tools/eventsDeclineInvitation.js +28 -0
  151. package/dist/esm/mcp-server/tools/eventsDeclineInvitation.js.map +1 -0
  152. package/dist/esm/mcp-server/tools/eventsDeleteEvent.d.ts +8 -0
  153. package/dist/esm/mcp-server/tools/eventsDeleteEvent.d.ts.map +1 -0
  154. package/dist/esm/mcp-server/tools/eventsDeleteEvent.js +28 -0
  155. package/dist/esm/mcp-server/tools/eventsDeleteEvent.js.map +1 -0
  156. package/dist/esm/mcp-server/tools/eventsUpdateEvent.d.ts +8 -0
  157. package/dist/esm/mcp-server/tools/eventsUpdateEvent.d.ts.map +1 -0
  158. package/dist/esm/mcp-server/tools/eventsUpdateEvent.js +28 -0
  159. package/dist/esm/mcp-server/tools/eventsUpdateEvent.js.map +1 -0
  160. package/dist/esm/models/operations/acceptinvitation.d.ts +92 -0
  161. package/dist/esm/models/operations/acceptinvitation.d.ts.map +1 -0
  162. package/dist/esm/models/operations/acceptinvitation.js +96 -0
  163. package/dist/esm/models/operations/acceptinvitation.js.map +1 -0
  164. package/dist/esm/models/operations/createevent.d.ts +99 -0
  165. package/dist/esm/models/operations/createevent.d.ts.map +1 -0
  166. package/dist/esm/models/operations/createevent.js +111 -0
  167. package/dist/esm/models/operations/createevent.js.map +1 -0
  168. package/dist/esm/models/operations/declineinvitation.d.ts +92 -0
  169. package/dist/esm/models/operations/declineinvitation.d.ts.map +1 -0
  170. package/dist/esm/models/operations/declineinvitation.js +96 -0
  171. package/dist/esm/models/operations/declineinvitation.js.map +1 -0
  172. package/dist/esm/models/operations/deleteevent.d.ts +60 -0
  173. package/dist/esm/models/operations/deleteevent.d.ts.map +1 -0
  174. package/dist/esm/models/operations/deleteevent.js +56 -0
  175. package/dist/esm/models/operations/deleteevent.js.map +1 -0
  176. package/dist/esm/models/operations/index.d.ts +5 -0
  177. package/dist/esm/models/operations/index.d.ts.map +1 -1
  178. package/dist/esm/models/operations/index.js +5 -0
  179. package/dist/esm/models/operations/index.js.map +1 -1
  180. package/dist/esm/models/operations/updateevent.d.ts +113 -0
  181. package/dist/esm/models/operations/updateevent.d.ts.map +1 -0
  182. package/dist/esm/models/operations/updateevent.js +112 -0
  183. package/dist/esm/models/operations/updateevent.js.map +1 -0
  184. package/dist/esm/react-query/eventsAcceptInvitation.d.ts +23 -0
  185. package/dist/esm/react-query/eventsAcceptInvitation.d.ts.map +1 -0
  186. package/dist/esm/react-query/eventsAcceptInvitation.js +42 -0
  187. package/dist/esm/react-query/eventsAcceptInvitation.js.map +1 -0
  188. package/dist/esm/react-query/eventsCreateEvent.d.ts +23 -0
  189. package/dist/esm/react-query/eventsCreateEvent.d.ts.map +1 -0
  190. package/dist/esm/react-query/eventsCreateEvent.js +42 -0
  191. package/dist/esm/react-query/eventsCreateEvent.js.map +1 -0
  192. package/dist/esm/react-query/eventsDeclineInvitation.d.ts +23 -0
  193. package/dist/esm/react-query/eventsDeclineInvitation.d.ts.map +1 -0
  194. package/dist/esm/react-query/eventsDeclineInvitation.js +42 -0
  195. package/dist/esm/react-query/eventsDeclineInvitation.js.map +1 -0
  196. package/dist/esm/react-query/eventsDeleteEvent.d.ts +23 -0
  197. package/dist/esm/react-query/eventsDeleteEvent.d.ts.map +1 -0
  198. package/dist/esm/react-query/eventsDeleteEvent.js +42 -0
  199. package/dist/esm/react-query/eventsDeleteEvent.js.map +1 -0
  200. package/dist/esm/react-query/eventsUpdateEvent.d.ts +23 -0
  201. package/dist/esm/react-query/eventsUpdateEvent.d.ts.map +1 -0
  202. package/dist/esm/react-query/eventsUpdateEvent.js +42 -0
  203. package/dist/esm/react-query/eventsUpdateEvent.js.map +1 -0
  204. package/dist/esm/react-query/index.d.ts +5 -0
  205. package/dist/esm/react-query/index.d.ts.map +1 -1
  206. package/dist/esm/react-query/index.js +5 -0
  207. package/dist/esm/react-query/index.js.map +1 -1
  208. package/dist/esm/sdk/events.d.ts +35 -0
  209. package/dist/esm/sdk/events.d.ts.map +1 -1
  210. package/dist/esm/sdk/events.js +51 -0
  211. package/dist/esm/sdk/events.js.map +1 -1
  212. package/examples/package-lock.json +1 -1
  213. package/jsr.json +1 -1
  214. package/package.json +1 -1
  215. package/src/__tests__/events.test.ts +101 -0
  216. package/src/__tests__/zones.test.ts +2 -5
  217. package/src/funcs/eventsAcceptInvitation.ts +182 -0
  218. package/src/funcs/eventsCreateEvent.ts +169 -0
  219. package/src/funcs/eventsDeclineInvitation.ts +182 -0
  220. package/src/funcs/eventsDeleteEvent.ts +175 -0
  221. package/src/funcs/eventsUpdateEvent.ts +176 -0
  222. package/src/lib/config.ts +3 -3
  223. package/src/mcp-server/mcp-server.ts +1 -1
  224. package/src/mcp-server/server.ts +11 -1
  225. package/src/mcp-server/tools/eventsAcceptInvitation.ts +37 -0
  226. package/src/mcp-server/tools/eventsCreateEvent.ts +37 -0
  227. package/src/mcp-server/tools/eventsDeclineInvitation.ts +37 -0
  228. package/src/mcp-server/tools/eventsDeleteEvent.ts +37 -0
  229. package/src/mcp-server/tools/eventsUpdateEvent.ts +37 -0
  230. package/src/models/operations/acceptinvitation.ts +214 -0
  231. package/src/models/operations/createevent.ts +224 -0
  232. package/src/models/operations/declineinvitation.ts +214 -0
  233. package/src/models/operations/deleteevent.ts +130 -0
  234. package/src/models/operations/index.ts +5 -0
  235. package/src/models/operations/updateevent.ts +247 -0
  236. package/src/react-query/eventsAcceptInvitation.ts +89 -0
  237. package/src/react-query/eventsCreateEvent.ts +88 -0
  238. package/src/react-query/eventsDeclineInvitation.ts +89 -0
  239. package/src/react-query/eventsDeleteEvent.ts +88 -0
  240. package/src/react-query/eventsUpdateEvent.ts +88 -0
  241. package/src/react-query/index.ts +5 -0
  242. 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
+ }