@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,182 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { GreenSecurityCore } from "../core.js";
|
|
6
|
+
import { encodeJSON, encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { safeParse } from "../lib/schemas.js";
|
|
10
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
11
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
|
+
import { pathToFunc } from "../lib/url.js";
|
|
13
|
+
import { GreenSecurityError } from "../models/errors/greensecurityerror.js";
|
|
14
|
+
import {
|
|
15
|
+
ConnectionError,
|
|
16
|
+
InvalidRequestError,
|
|
17
|
+
RequestAbortedError,
|
|
18
|
+
RequestTimeoutError,
|
|
19
|
+
UnexpectedClientError,
|
|
20
|
+
} from "../models/errors/httpclienterrors.js";
|
|
21
|
+
import * as errors from "../models/errors/index.js";
|
|
22
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
23
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
24
|
+
import * as operations from "../models/operations/index.js";
|
|
25
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
26
|
+
import { Result } from "../types/fp.js";
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Decline event invitation
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* Decline event invitation
|
|
33
|
+
*/
|
|
34
|
+
export function eventsDeclineInvitation(
|
|
35
|
+
client: GreenSecurityCore,
|
|
36
|
+
request: operations.DeclineInvitationRequest,
|
|
37
|
+
options?: RequestOptions,
|
|
38
|
+
): APIPromise<
|
|
39
|
+
Result<
|
|
40
|
+
operations.DeclineInvitationResponseBody,
|
|
41
|
+
| errors.ApiErrorResponse
|
|
42
|
+
| GreenSecurityError
|
|
43
|
+
| ResponseValidationError
|
|
44
|
+
| ConnectionError
|
|
45
|
+
| RequestAbortedError
|
|
46
|
+
| RequestTimeoutError
|
|
47
|
+
| InvalidRequestError
|
|
48
|
+
| UnexpectedClientError
|
|
49
|
+
| SDKValidationError
|
|
50
|
+
>
|
|
51
|
+
> {
|
|
52
|
+
return new APIPromise($do(
|
|
53
|
+
client,
|
|
54
|
+
request,
|
|
55
|
+
options,
|
|
56
|
+
));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
async function $do(
|
|
60
|
+
client: GreenSecurityCore,
|
|
61
|
+
request: operations.DeclineInvitationRequest,
|
|
62
|
+
options?: RequestOptions,
|
|
63
|
+
): Promise<
|
|
64
|
+
[
|
|
65
|
+
Result<
|
|
66
|
+
operations.DeclineInvitationResponseBody,
|
|
67
|
+
| errors.ApiErrorResponse
|
|
68
|
+
| GreenSecurityError
|
|
69
|
+
| ResponseValidationError
|
|
70
|
+
| ConnectionError
|
|
71
|
+
| RequestAbortedError
|
|
72
|
+
| RequestTimeoutError
|
|
73
|
+
| InvalidRequestError
|
|
74
|
+
| UnexpectedClientError
|
|
75
|
+
| SDKValidationError
|
|
76
|
+
>,
|
|
77
|
+
APICall,
|
|
78
|
+
]
|
|
79
|
+
> {
|
|
80
|
+
const parsed = safeParse(
|
|
81
|
+
request,
|
|
82
|
+
(value) => operations.DeclineInvitationRequest$outboundSchema.parse(value),
|
|
83
|
+
"Input validation failed",
|
|
84
|
+
);
|
|
85
|
+
if (!parsed.ok) {
|
|
86
|
+
return [parsed, { status: "invalid" }];
|
|
87
|
+
}
|
|
88
|
+
const payload = parsed.value;
|
|
89
|
+
const body = encodeJSON("body", payload.RequestBody, { explode: true });
|
|
90
|
+
|
|
91
|
+
const pathParams = {
|
|
92
|
+
event_id: encodeSimple("event_id", payload.event_id, {
|
|
93
|
+
explode: false,
|
|
94
|
+
charEncoding: "percent",
|
|
95
|
+
}),
|
|
96
|
+
id: encodeSimple("id", payload.id, {
|
|
97
|
+
explode: false,
|
|
98
|
+
charEncoding: "percent",
|
|
99
|
+
}),
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
const path = pathToFunc("/events/{event_id}/invites/{id}/declination")(
|
|
103
|
+
pathParams,
|
|
104
|
+
);
|
|
105
|
+
|
|
106
|
+
const headers = new Headers(compactMap({
|
|
107
|
+
"Content-Type": "application/json",
|
|
108
|
+
Accept: "application/json",
|
|
109
|
+
}));
|
|
110
|
+
|
|
111
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
112
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
113
|
+
|
|
114
|
+
const context = {
|
|
115
|
+
options: client._options,
|
|
116
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
117
|
+
operationID: "declineInvitation",
|
|
118
|
+
oAuth2Scopes: [],
|
|
119
|
+
|
|
120
|
+
resolvedSecurity: requestSecurity,
|
|
121
|
+
|
|
122
|
+
securitySource: client._options.security,
|
|
123
|
+
retryConfig: options?.retries
|
|
124
|
+
|| client._options.retryConfig
|
|
125
|
+
|| { strategy: "none" },
|
|
126
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
const requestRes = client._createRequest(context, {
|
|
130
|
+
security: requestSecurity,
|
|
131
|
+
method: "POST",
|
|
132
|
+
baseURL: options?.serverURL,
|
|
133
|
+
path: path,
|
|
134
|
+
headers: headers,
|
|
135
|
+
body: body,
|
|
136
|
+
userAgent: client._options.userAgent,
|
|
137
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
138
|
+
}, options);
|
|
139
|
+
if (!requestRes.ok) {
|
|
140
|
+
return [requestRes, { status: "invalid" }];
|
|
141
|
+
}
|
|
142
|
+
const req = requestRes.value;
|
|
143
|
+
|
|
144
|
+
const doResult = await client._do(req, {
|
|
145
|
+
context,
|
|
146
|
+
errorCodes: ["400", "401", "403", "404", "4XX", "500", "5XX"],
|
|
147
|
+
retryConfig: context.retryConfig,
|
|
148
|
+
retryCodes: context.retryCodes,
|
|
149
|
+
});
|
|
150
|
+
if (!doResult.ok) {
|
|
151
|
+
return [doResult, { status: "request-error", request: req }];
|
|
152
|
+
}
|
|
153
|
+
const response = doResult.value;
|
|
154
|
+
|
|
155
|
+
const responseFields = {
|
|
156
|
+
HttpMeta: { Response: response, Request: req },
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
const [result] = await M.match<
|
|
160
|
+
operations.DeclineInvitationResponseBody,
|
|
161
|
+
| errors.ApiErrorResponse
|
|
162
|
+
| GreenSecurityError
|
|
163
|
+
| ResponseValidationError
|
|
164
|
+
| ConnectionError
|
|
165
|
+
| RequestAbortedError
|
|
166
|
+
| RequestTimeoutError
|
|
167
|
+
| InvalidRequestError
|
|
168
|
+
| UnexpectedClientError
|
|
169
|
+
| SDKValidationError
|
|
170
|
+
>(
|
|
171
|
+
M.json(200, operations.DeclineInvitationResponseBody$inboundSchema),
|
|
172
|
+
M.jsonErr([400, 401, 403, 404], errors.ApiErrorResponse$inboundSchema),
|
|
173
|
+
M.jsonErr(500, errors.ApiErrorResponse$inboundSchema),
|
|
174
|
+
M.fail("4XX"),
|
|
175
|
+
M.fail("5XX"),
|
|
176
|
+
)(response, req, { extraFields: responseFields });
|
|
177
|
+
if (!result.ok) {
|
|
178
|
+
return [result, { status: "complete", request: req, response }];
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
return [result, { status: "complete", request: req, response }];
|
|
182
|
+
}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { GreenSecurityCore } from "../core.js";
|
|
6
|
+
import { encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { safeParse } from "../lib/schemas.js";
|
|
10
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
11
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
|
+
import { pathToFunc } from "../lib/url.js";
|
|
13
|
+
import { GreenSecurityError } from "../models/errors/greensecurityerror.js";
|
|
14
|
+
import {
|
|
15
|
+
ConnectionError,
|
|
16
|
+
InvalidRequestError,
|
|
17
|
+
RequestAbortedError,
|
|
18
|
+
RequestTimeoutError,
|
|
19
|
+
UnexpectedClientError,
|
|
20
|
+
} from "../models/errors/httpclienterrors.js";
|
|
21
|
+
import * as errors from "../models/errors/index.js";
|
|
22
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
23
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
24
|
+
import * as operations from "../models/operations/index.js";
|
|
25
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
26
|
+
import { Result } from "../types/fp.js";
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Delete event for calendar
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* Delete event for calendar
|
|
33
|
+
*/
|
|
34
|
+
export function eventsDeleteEvent(
|
|
35
|
+
client: GreenSecurityCore,
|
|
36
|
+
request: operations.DeleteEventRequest,
|
|
37
|
+
options?: RequestOptions,
|
|
38
|
+
): APIPromise<
|
|
39
|
+
Result<
|
|
40
|
+
operations.DeleteEventResponseBody,
|
|
41
|
+
| errors.ApiErrorResponse
|
|
42
|
+
| GreenSecurityError
|
|
43
|
+
| ResponseValidationError
|
|
44
|
+
| ConnectionError
|
|
45
|
+
| RequestAbortedError
|
|
46
|
+
| RequestTimeoutError
|
|
47
|
+
| InvalidRequestError
|
|
48
|
+
| UnexpectedClientError
|
|
49
|
+
| SDKValidationError
|
|
50
|
+
>
|
|
51
|
+
> {
|
|
52
|
+
return new APIPromise($do(
|
|
53
|
+
client,
|
|
54
|
+
request,
|
|
55
|
+
options,
|
|
56
|
+
));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
async function $do(
|
|
60
|
+
client: GreenSecurityCore,
|
|
61
|
+
request: operations.DeleteEventRequest,
|
|
62
|
+
options?: RequestOptions,
|
|
63
|
+
): Promise<
|
|
64
|
+
[
|
|
65
|
+
Result<
|
|
66
|
+
operations.DeleteEventResponseBody,
|
|
67
|
+
| errors.ApiErrorResponse
|
|
68
|
+
| GreenSecurityError
|
|
69
|
+
| ResponseValidationError
|
|
70
|
+
| ConnectionError
|
|
71
|
+
| RequestAbortedError
|
|
72
|
+
| RequestTimeoutError
|
|
73
|
+
| InvalidRequestError
|
|
74
|
+
| UnexpectedClientError
|
|
75
|
+
| SDKValidationError
|
|
76
|
+
>,
|
|
77
|
+
APICall,
|
|
78
|
+
]
|
|
79
|
+
> {
|
|
80
|
+
const parsed = safeParse(
|
|
81
|
+
request,
|
|
82
|
+
(value) => operations.DeleteEventRequest$outboundSchema.parse(value),
|
|
83
|
+
"Input validation failed",
|
|
84
|
+
);
|
|
85
|
+
if (!parsed.ok) {
|
|
86
|
+
return [parsed, { status: "invalid" }];
|
|
87
|
+
}
|
|
88
|
+
const payload = parsed.value;
|
|
89
|
+
const body = null;
|
|
90
|
+
|
|
91
|
+
const pathParams = {
|
|
92
|
+
id: encodeSimple("id", payload.id, {
|
|
93
|
+
explode: false,
|
|
94
|
+
charEncoding: "percent",
|
|
95
|
+
}),
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
const path = pathToFunc("/events/{id}")(pathParams);
|
|
99
|
+
|
|
100
|
+
const headers = new Headers(compactMap({
|
|
101
|
+
Accept: "application/json",
|
|
102
|
+
}));
|
|
103
|
+
|
|
104
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
105
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
106
|
+
|
|
107
|
+
const context = {
|
|
108
|
+
options: client._options,
|
|
109
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
110
|
+
operationID: "deleteEvent",
|
|
111
|
+
oAuth2Scopes: [],
|
|
112
|
+
|
|
113
|
+
resolvedSecurity: requestSecurity,
|
|
114
|
+
|
|
115
|
+
securitySource: client._options.security,
|
|
116
|
+
retryConfig: options?.retries
|
|
117
|
+
|| client._options.retryConfig
|
|
118
|
+
|| { strategy: "none" },
|
|
119
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
const requestRes = client._createRequest(context, {
|
|
123
|
+
security: requestSecurity,
|
|
124
|
+
method: "DELETE",
|
|
125
|
+
baseURL: options?.serverURL,
|
|
126
|
+
path: path,
|
|
127
|
+
headers: headers,
|
|
128
|
+
body: body,
|
|
129
|
+
userAgent: client._options.userAgent,
|
|
130
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
131
|
+
}, options);
|
|
132
|
+
if (!requestRes.ok) {
|
|
133
|
+
return [requestRes, { status: "invalid" }];
|
|
134
|
+
}
|
|
135
|
+
const req = requestRes.value;
|
|
136
|
+
|
|
137
|
+
const doResult = await client._do(req, {
|
|
138
|
+
context,
|
|
139
|
+
errorCodes: ["400", "401", "403", "404", "4XX", "500", "5XX"],
|
|
140
|
+
retryConfig: context.retryConfig,
|
|
141
|
+
retryCodes: context.retryCodes,
|
|
142
|
+
});
|
|
143
|
+
if (!doResult.ok) {
|
|
144
|
+
return [doResult, { status: "request-error", request: req }];
|
|
145
|
+
}
|
|
146
|
+
const response = doResult.value;
|
|
147
|
+
|
|
148
|
+
const responseFields = {
|
|
149
|
+
HttpMeta: { Response: response, Request: req },
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
const [result] = await M.match<
|
|
153
|
+
operations.DeleteEventResponseBody,
|
|
154
|
+
| errors.ApiErrorResponse
|
|
155
|
+
| GreenSecurityError
|
|
156
|
+
| ResponseValidationError
|
|
157
|
+
| ConnectionError
|
|
158
|
+
| RequestAbortedError
|
|
159
|
+
| RequestTimeoutError
|
|
160
|
+
| InvalidRequestError
|
|
161
|
+
| UnexpectedClientError
|
|
162
|
+
| SDKValidationError
|
|
163
|
+
>(
|
|
164
|
+
M.json(200, operations.DeleteEventResponseBody$inboundSchema),
|
|
165
|
+
M.jsonErr([400, 401, 403, 404], errors.ApiErrorResponse$inboundSchema),
|
|
166
|
+
M.jsonErr(500, errors.ApiErrorResponse$inboundSchema),
|
|
167
|
+
M.fail("4XX"),
|
|
168
|
+
M.fail("5XX"),
|
|
169
|
+
)(response, req, { extraFields: responseFields });
|
|
170
|
+
if (!result.ok) {
|
|
171
|
+
return [result, { status: "complete", request: req, response }];
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
return [result, { status: "complete", request: req, response }];
|
|
175
|
+
}
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { GreenSecurityCore } from "../core.js";
|
|
6
|
+
import { encodeJSON, encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { safeParse } from "../lib/schemas.js";
|
|
10
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
11
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
|
+
import { pathToFunc } from "../lib/url.js";
|
|
13
|
+
import { GreenSecurityError } from "../models/errors/greensecurityerror.js";
|
|
14
|
+
import {
|
|
15
|
+
ConnectionError,
|
|
16
|
+
InvalidRequestError,
|
|
17
|
+
RequestAbortedError,
|
|
18
|
+
RequestTimeoutError,
|
|
19
|
+
UnexpectedClientError,
|
|
20
|
+
} from "../models/errors/httpclienterrors.js";
|
|
21
|
+
import * as errors from "../models/errors/index.js";
|
|
22
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
23
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
24
|
+
import * as operations from "../models/operations/index.js";
|
|
25
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
26
|
+
import { Result } from "../types/fp.js";
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Update event for calendar
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* Update event for calendar
|
|
33
|
+
*/
|
|
34
|
+
export function eventsUpdateEvent(
|
|
35
|
+
client: GreenSecurityCore,
|
|
36
|
+
request: operations.UpdateEventRequest,
|
|
37
|
+
options?: RequestOptions,
|
|
38
|
+
): APIPromise<
|
|
39
|
+
Result<
|
|
40
|
+
operations.UpdateEventResponseBody,
|
|
41
|
+
| errors.ApiErrorResponse
|
|
42
|
+
| GreenSecurityError
|
|
43
|
+
| ResponseValidationError
|
|
44
|
+
| ConnectionError
|
|
45
|
+
| RequestAbortedError
|
|
46
|
+
| RequestTimeoutError
|
|
47
|
+
| InvalidRequestError
|
|
48
|
+
| UnexpectedClientError
|
|
49
|
+
| SDKValidationError
|
|
50
|
+
>
|
|
51
|
+
> {
|
|
52
|
+
return new APIPromise($do(
|
|
53
|
+
client,
|
|
54
|
+
request,
|
|
55
|
+
options,
|
|
56
|
+
));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
async function $do(
|
|
60
|
+
client: GreenSecurityCore,
|
|
61
|
+
request: operations.UpdateEventRequest,
|
|
62
|
+
options?: RequestOptions,
|
|
63
|
+
): Promise<
|
|
64
|
+
[
|
|
65
|
+
Result<
|
|
66
|
+
operations.UpdateEventResponseBody,
|
|
67
|
+
| errors.ApiErrorResponse
|
|
68
|
+
| GreenSecurityError
|
|
69
|
+
| ResponseValidationError
|
|
70
|
+
| ConnectionError
|
|
71
|
+
| RequestAbortedError
|
|
72
|
+
| RequestTimeoutError
|
|
73
|
+
| InvalidRequestError
|
|
74
|
+
| UnexpectedClientError
|
|
75
|
+
| SDKValidationError
|
|
76
|
+
>,
|
|
77
|
+
APICall,
|
|
78
|
+
]
|
|
79
|
+
> {
|
|
80
|
+
const parsed = safeParse(
|
|
81
|
+
request,
|
|
82
|
+
(value) => operations.UpdateEventRequest$outboundSchema.parse(value),
|
|
83
|
+
"Input validation failed",
|
|
84
|
+
);
|
|
85
|
+
if (!parsed.ok) {
|
|
86
|
+
return [parsed, { status: "invalid" }];
|
|
87
|
+
}
|
|
88
|
+
const payload = parsed.value;
|
|
89
|
+
const body = encodeJSON("body", payload.RequestBody, { explode: true });
|
|
90
|
+
|
|
91
|
+
const pathParams = {
|
|
92
|
+
id: encodeSimple("id", payload.id, {
|
|
93
|
+
explode: false,
|
|
94
|
+
charEncoding: "percent",
|
|
95
|
+
}),
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
const path = pathToFunc("/events/{id}")(pathParams);
|
|
99
|
+
|
|
100
|
+
const headers = new Headers(compactMap({
|
|
101
|
+
"Content-Type": "application/json",
|
|
102
|
+
Accept: "application/json",
|
|
103
|
+
}));
|
|
104
|
+
|
|
105
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
106
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
107
|
+
|
|
108
|
+
const context = {
|
|
109
|
+
options: client._options,
|
|
110
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
111
|
+
operationID: "updateEvent",
|
|
112
|
+
oAuth2Scopes: [],
|
|
113
|
+
|
|
114
|
+
resolvedSecurity: requestSecurity,
|
|
115
|
+
|
|
116
|
+
securitySource: client._options.security,
|
|
117
|
+
retryConfig: options?.retries
|
|
118
|
+
|| client._options.retryConfig
|
|
119
|
+
|| { strategy: "none" },
|
|
120
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
const requestRes = client._createRequest(context, {
|
|
124
|
+
security: requestSecurity,
|
|
125
|
+
method: "PUT",
|
|
126
|
+
baseURL: options?.serverURL,
|
|
127
|
+
path: path,
|
|
128
|
+
headers: headers,
|
|
129
|
+
body: body,
|
|
130
|
+
userAgent: client._options.userAgent,
|
|
131
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
132
|
+
}, options);
|
|
133
|
+
if (!requestRes.ok) {
|
|
134
|
+
return [requestRes, { status: "invalid" }];
|
|
135
|
+
}
|
|
136
|
+
const req = requestRes.value;
|
|
137
|
+
|
|
138
|
+
const doResult = await client._do(req, {
|
|
139
|
+
context,
|
|
140
|
+
errorCodes: ["400", "401", "403", "404", "4XX", "500", "5XX"],
|
|
141
|
+
retryConfig: context.retryConfig,
|
|
142
|
+
retryCodes: context.retryCodes,
|
|
143
|
+
});
|
|
144
|
+
if (!doResult.ok) {
|
|
145
|
+
return [doResult, { status: "request-error", request: req }];
|
|
146
|
+
}
|
|
147
|
+
const response = doResult.value;
|
|
148
|
+
|
|
149
|
+
const responseFields = {
|
|
150
|
+
HttpMeta: { Response: response, Request: req },
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
const [result] = await M.match<
|
|
154
|
+
operations.UpdateEventResponseBody,
|
|
155
|
+
| errors.ApiErrorResponse
|
|
156
|
+
| GreenSecurityError
|
|
157
|
+
| ResponseValidationError
|
|
158
|
+
| ConnectionError
|
|
159
|
+
| RequestAbortedError
|
|
160
|
+
| RequestTimeoutError
|
|
161
|
+
| InvalidRequestError
|
|
162
|
+
| UnexpectedClientError
|
|
163
|
+
| SDKValidationError
|
|
164
|
+
>(
|
|
165
|
+
M.json(200, operations.UpdateEventResponseBody$inboundSchema),
|
|
166
|
+
M.jsonErr([400, 401, 403, 404], errors.ApiErrorResponse$inboundSchema),
|
|
167
|
+
M.jsonErr(500, errors.ApiErrorResponse$inboundSchema),
|
|
168
|
+
M.fail("4XX"),
|
|
169
|
+
M.fail("5XX"),
|
|
170
|
+
)(response, req, { extraFields: responseFields });
|
|
171
|
+
if (!result.ok) {
|
|
172
|
+
return [result, { status: "complete", request: req, response }];
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
return [result, { status: "complete", request: req, response }];
|
|
176
|
+
}
|
package/src/lib/config.ts
CHANGED
|
@@ -80,8 +80,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
80
80
|
export const SDK_METADATA = {
|
|
81
81
|
language: "typescript",
|
|
82
82
|
openapiDocVersion: "0.0.3",
|
|
83
|
-
sdkVersion: "0.39.
|
|
84
|
-
genVersion: "2.
|
|
83
|
+
sdkVersion: "0.39.8",
|
|
84
|
+
genVersion: "2.666.0",
|
|
85
85
|
userAgent:
|
|
86
|
-
"speakeasy-sdk/typescript 0.39.
|
|
86
|
+
"speakeasy-sdk/typescript 0.39.8 2.666.0 0.0.3 @greensecurity/javascript-sdk",
|
|
87
87
|
} as const;
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -17,7 +17,12 @@ import { tool$companiesListOrSearchCompanies } from "./tools/companiesListOrSear
|
|
|
17
17
|
import { tool$dataRequestsAddDataRequestFile } from "./tools/dataRequestsAddDataRequestFile.js";
|
|
18
18
|
import { tool$dataRequestsDeleteDataRequestFile } from "./tools/dataRequestsDeleteDataRequestFile.js";
|
|
19
19
|
import { tool$dataRequestsUpdateDataRequest } from "./tools/dataRequestsUpdateDataRequest.js";
|
|
20
|
+
import { tool$eventsAcceptInvitation } from "./tools/eventsAcceptInvitation.js";
|
|
21
|
+
import { tool$eventsCreateEvent } from "./tools/eventsCreateEvent.js";
|
|
22
|
+
import { tool$eventsDeclineInvitation } from "./tools/eventsDeclineInvitation.js";
|
|
23
|
+
import { tool$eventsDeleteEvent } from "./tools/eventsDeleteEvent.js";
|
|
20
24
|
import { tool$eventsListOrSearchVendorInvitees } from "./tools/eventsListOrSearchVendorInvitees.js";
|
|
25
|
+
import { tool$eventsUpdateEvent } from "./tools/eventsUpdateEvent.js";
|
|
21
26
|
import { tool$invoicesCreateInvoice } from "./tools/invoicesCreateInvoice.js";
|
|
22
27
|
import { tool$invoicesMakePayment } from "./tools/invoicesMakePayment.js";
|
|
23
28
|
import { tool$invoicesUpdateInvoice } from "./tools/invoicesUpdateInvoice.js";
|
|
@@ -97,7 +102,7 @@ export function createMCPServer(deps: {
|
|
|
97
102
|
}) {
|
|
98
103
|
const server = new McpServer({
|
|
99
104
|
name: "GreenSecurity",
|
|
100
|
-
version: "0.39.
|
|
105
|
+
version: "0.39.8",
|
|
101
106
|
});
|
|
102
107
|
|
|
103
108
|
const client = new GreenSecurityCore({
|
|
@@ -198,6 +203,11 @@ export function createMCPServer(deps: {
|
|
|
198
203
|
tool(tool$invoicesCreateInvoice);
|
|
199
204
|
tool(tool$invoicesUpdateInvoice);
|
|
200
205
|
tool(tool$invoicesMakePayment);
|
|
206
|
+
tool(tool$eventsCreateEvent);
|
|
207
|
+
tool(tool$eventsUpdateEvent);
|
|
208
|
+
tool(tool$eventsDeleteEvent);
|
|
209
|
+
tool(tool$eventsAcceptInvitation);
|
|
210
|
+
tool(tool$eventsDeclineInvitation);
|
|
201
211
|
tool(tool$eventsListOrSearchVendorInvitees);
|
|
202
212
|
tool(tool$systemsListSystems);
|
|
203
213
|
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { eventsAcceptInvitation } from "../../funcs/eventsAcceptInvitation.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.AcceptInvitationRequest$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$eventsAcceptInvitation: ToolDefinition<typeof args> = {
|
|
14
|
+
name: "events-accept-invitation",
|
|
15
|
+
description: `Accept event invitation
|
|
16
|
+
|
|
17
|
+
Accept event invitation`,
|
|
18
|
+
args,
|
|
19
|
+
tool: async (client, args, ctx) => {
|
|
20
|
+
const [result, apiCall] = await eventsAcceptInvitation(
|
|
21
|
+
client,
|
|
22
|
+
args.request,
|
|
23
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
24
|
+
).$inspect();
|
|
25
|
+
|
|
26
|
+
if (!result.ok) {
|
|
27
|
+
return {
|
|
28
|
+
content: [{ type: "text", text: result.error.message }],
|
|
29
|
+
isError: true,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const value = result.value;
|
|
34
|
+
|
|
35
|
+
return formatResult(value, apiCall);
|
|
36
|
+
},
|
|
37
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { eventsCreateEvent } from "../../funcs/eventsCreateEvent.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.CreateEventRequestBody$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$eventsCreateEvent: ToolDefinition<typeof args> = {
|
|
14
|
+
name: "events-create-event",
|
|
15
|
+
description: `Create a new event for calendar
|
|
16
|
+
|
|
17
|
+
Create a new event for calendar`,
|
|
18
|
+
args,
|
|
19
|
+
tool: async (client, args, ctx) => {
|
|
20
|
+
const [result, apiCall] = await eventsCreateEvent(
|
|
21
|
+
client,
|
|
22
|
+
args.request,
|
|
23
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
24
|
+
).$inspect();
|
|
25
|
+
|
|
26
|
+
if (!result.ok) {
|
|
27
|
+
return {
|
|
28
|
+
content: [{ type: "text", text: result.error.message }],
|
|
29
|
+
isError: true,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const value = result.value;
|
|
34
|
+
|
|
35
|
+
return formatResult(value, apiCall);
|
|
36
|
+
},
|
|
37
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { eventsDeclineInvitation } from "../../funcs/eventsDeclineInvitation.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.DeclineInvitationRequest$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$eventsDeclineInvitation: ToolDefinition<typeof args> = {
|
|
14
|
+
name: "events-decline-invitation",
|
|
15
|
+
description: `Decline event invitation
|
|
16
|
+
|
|
17
|
+
Decline event invitation`,
|
|
18
|
+
args,
|
|
19
|
+
tool: async (client, args, ctx) => {
|
|
20
|
+
const [result, apiCall] = await eventsDeclineInvitation(
|
|
21
|
+
client,
|
|
22
|
+
args.request,
|
|
23
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
24
|
+
).$inspect();
|
|
25
|
+
|
|
26
|
+
if (!result.ok) {
|
|
27
|
+
return {
|
|
28
|
+
content: [{ type: "text", text: result.error.message }],
|
|
29
|
+
isError: true,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const value = result.value;
|
|
34
|
+
|
|
35
|
+
return formatResult(value, apiCall);
|
|
36
|
+
},
|
|
37
|
+
};
|