@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
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
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { eventsDeleteEvent } from "../../funcs/eventsDeleteEvent.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.DeleteEventRequest$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$eventsDeleteEvent: ToolDefinition<typeof args> = {
|
|
14
|
+
name: "events-delete-event",
|
|
15
|
+
description: `Delete event for calendar
|
|
16
|
+
|
|
17
|
+
Delete event for calendar`,
|
|
18
|
+
args,
|
|
19
|
+
tool: async (client, args, ctx) => {
|
|
20
|
+
const [result, apiCall] = await eventsDeleteEvent(
|
|
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 { eventsUpdateEvent } from "../../funcs/eventsUpdateEvent.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.UpdateEventRequest$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$eventsUpdateEvent: ToolDefinition<typeof args> = {
|
|
14
|
+
name: "events-update-event",
|
|
15
|
+
description: `Update event for calendar
|
|
16
|
+
|
|
17
|
+
Update event for calendar`,
|
|
18
|
+
args,
|
|
19
|
+
tool: async (client, args, ctx) => {
|
|
20
|
+
const [result, apiCall] = await eventsUpdateEvent(
|
|
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
|
+
};
|
|
@@ -19,6 +19,8 @@ export type VendorFacilityStatusView = {
|
|
|
19
19
|
vendorScanId?: number | null | undefined;
|
|
20
20
|
vendorScanType?: number | null | undefined;
|
|
21
21
|
dateScanned?: string | null | undefined;
|
|
22
|
+
facilityCity?: string | null | undefined;
|
|
23
|
+
facilityState?: string | null | undefined;
|
|
22
24
|
};
|
|
23
25
|
|
|
24
26
|
/** @internal */
|
|
@@ -34,6 +36,8 @@ export const VendorFacilityStatusView$inboundSchema: z.ZodType<
|
|
|
34
36
|
vendor_scan_id: z.nullable(z.number().int()).optional(),
|
|
35
37
|
vendor_scan_type: z.nullable(z.number().int()).optional(),
|
|
36
38
|
date_scanned: z.nullable(z.string()).optional(),
|
|
39
|
+
facility_city: z.nullable(z.string()).optional(),
|
|
40
|
+
facility_state: z.nullable(z.string()).optional(),
|
|
37
41
|
}).transform((v) => {
|
|
38
42
|
return remap$(v, {
|
|
39
43
|
"vendor_id": "vendorId",
|
|
@@ -43,6 +47,8 @@ export const VendorFacilityStatusView$inboundSchema: z.ZodType<
|
|
|
43
47
|
"vendor_scan_id": "vendorScanId",
|
|
44
48
|
"vendor_scan_type": "vendorScanType",
|
|
45
49
|
"date_scanned": "dateScanned",
|
|
50
|
+
"facility_city": "facilityCity",
|
|
51
|
+
"facility_state": "facilityState",
|
|
46
52
|
});
|
|
47
53
|
});
|
|
48
54
|
|
|
@@ -55,6 +61,8 @@ export type VendorFacilityStatusView$Outbound = {
|
|
|
55
61
|
vendor_scan_id?: number | null | undefined;
|
|
56
62
|
vendor_scan_type?: number | null | undefined;
|
|
57
63
|
date_scanned?: string | null | undefined;
|
|
64
|
+
facility_city?: string | null | undefined;
|
|
65
|
+
facility_state?: string | null | undefined;
|
|
58
66
|
};
|
|
59
67
|
|
|
60
68
|
/** @internal */
|
|
@@ -70,6 +78,8 @@ export const VendorFacilityStatusView$outboundSchema: z.ZodType<
|
|
|
70
78
|
vendorScanId: z.nullable(z.number().int()).optional(),
|
|
71
79
|
vendorScanType: z.nullable(z.number().int()).optional(),
|
|
72
80
|
dateScanned: z.nullable(z.string()).optional(),
|
|
81
|
+
facilityCity: z.nullable(z.string()).optional(),
|
|
82
|
+
facilityState: z.nullable(z.string()).optional(),
|
|
73
83
|
}).transform((v) => {
|
|
74
84
|
return remap$(v, {
|
|
75
85
|
vendorId: "vendor_id",
|
|
@@ -79,6 +89,8 @@ export const VendorFacilityStatusView$outboundSchema: z.ZodType<
|
|
|
79
89
|
vendorScanId: "vendor_scan_id",
|
|
80
90
|
vendorScanType: "vendor_scan_type",
|
|
81
91
|
dateScanned: "date_scanned",
|
|
92
|
+
facilityCity: "facility_city",
|
|
93
|
+
facilityState: "facility_state",
|
|
82
94
|
});
|
|
83
95
|
});
|
|
84
96
|
|
|
@@ -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 AcceptInvitationRequestBody = {
|
|
12
|
+
notes?: string | undefined;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export type AcceptInvitationRequest = {
|
|
16
|
+
/**
|
|
17
|
+
* ID of the event rep.
|
|
18
|
+
*/
|
|
19
|
+
eventId: number;
|
|
20
|
+
/**
|
|
21
|
+
* The identifier of the object
|
|
22
|
+
*/
|
|
23
|
+
id: number;
|
|
24
|
+
requestBody: AcceptInvitationRequestBody;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* The request was successful, and the server has returned the requested resource in the response body.
|
|
29
|
+
*/
|
|
30
|
+
export type AcceptInvitationResponseBody = {
|
|
31
|
+
success?: boolean | undefined;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/** @internal */
|
|
35
|
+
export const AcceptInvitationRequestBody$inboundSchema: z.ZodType<
|
|
36
|
+
AcceptInvitationRequestBody,
|
|
37
|
+
z.ZodTypeDef,
|
|
38
|
+
unknown
|
|
39
|
+
> = z.object({
|
|
40
|
+
notes: z.string().optional(),
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
/** @internal */
|
|
44
|
+
export type AcceptInvitationRequestBody$Outbound = {
|
|
45
|
+
notes?: string | undefined;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
/** @internal */
|
|
49
|
+
export const AcceptInvitationRequestBody$outboundSchema: z.ZodType<
|
|
50
|
+
AcceptInvitationRequestBody$Outbound,
|
|
51
|
+
z.ZodTypeDef,
|
|
52
|
+
AcceptInvitationRequestBody
|
|
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 AcceptInvitationRequestBody$ {
|
|
62
|
+
/** @deprecated use `AcceptInvitationRequestBody$inboundSchema` instead. */
|
|
63
|
+
export const inboundSchema = AcceptInvitationRequestBody$inboundSchema;
|
|
64
|
+
/** @deprecated use `AcceptInvitationRequestBody$outboundSchema` instead. */
|
|
65
|
+
export const outboundSchema = AcceptInvitationRequestBody$outboundSchema;
|
|
66
|
+
/** @deprecated use `AcceptInvitationRequestBody$Outbound` instead. */
|
|
67
|
+
export type Outbound = AcceptInvitationRequestBody$Outbound;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function acceptInvitationRequestBodyToJSON(
|
|
71
|
+
acceptInvitationRequestBody: AcceptInvitationRequestBody,
|
|
72
|
+
): string {
|
|
73
|
+
return JSON.stringify(
|
|
74
|
+
AcceptInvitationRequestBody$outboundSchema.parse(
|
|
75
|
+
acceptInvitationRequestBody,
|
|
76
|
+
),
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function acceptInvitationRequestBodyFromJSON(
|
|
81
|
+
jsonString: string,
|
|
82
|
+
): SafeParseResult<AcceptInvitationRequestBody, SDKValidationError> {
|
|
83
|
+
return safeParse(
|
|
84
|
+
jsonString,
|
|
85
|
+
(x) => AcceptInvitationRequestBody$inboundSchema.parse(JSON.parse(x)),
|
|
86
|
+
`Failed to parse 'AcceptInvitationRequestBody' from JSON`,
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/** @internal */
|
|
91
|
+
export const AcceptInvitationRequest$inboundSchema: z.ZodType<
|
|
92
|
+
AcceptInvitationRequest,
|
|
93
|
+
z.ZodTypeDef,
|
|
94
|
+
unknown
|
|
95
|
+
> = z.object({
|
|
96
|
+
event_id: z.number().int(),
|
|
97
|
+
id: z.number().int(),
|
|
98
|
+
RequestBody: z.lazy(() => AcceptInvitationRequestBody$inboundSchema),
|
|
99
|
+
}).transform((v) => {
|
|
100
|
+
return remap$(v, {
|
|
101
|
+
"event_id": "eventId",
|
|
102
|
+
"RequestBody": "requestBody",
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
/** @internal */
|
|
107
|
+
export type AcceptInvitationRequest$Outbound = {
|
|
108
|
+
event_id: number;
|
|
109
|
+
id: number;
|
|
110
|
+
RequestBody: AcceptInvitationRequestBody$Outbound;
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
/** @internal */
|
|
114
|
+
export const AcceptInvitationRequest$outboundSchema: z.ZodType<
|
|
115
|
+
AcceptInvitationRequest$Outbound,
|
|
116
|
+
z.ZodTypeDef,
|
|
117
|
+
AcceptInvitationRequest
|
|
118
|
+
> = z.object({
|
|
119
|
+
eventId: z.number().int(),
|
|
120
|
+
id: z.number().int(),
|
|
121
|
+
requestBody: z.lazy(() => AcceptInvitationRequestBody$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 AcceptInvitationRequest$ {
|
|
134
|
+
/** @deprecated use `AcceptInvitationRequest$inboundSchema` instead. */
|
|
135
|
+
export const inboundSchema = AcceptInvitationRequest$inboundSchema;
|
|
136
|
+
/** @deprecated use `AcceptInvitationRequest$outboundSchema` instead. */
|
|
137
|
+
export const outboundSchema = AcceptInvitationRequest$outboundSchema;
|
|
138
|
+
/** @deprecated use `AcceptInvitationRequest$Outbound` instead. */
|
|
139
|
+
export type Outbound = AcceptInvitationRequest$Outbound;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export function acceptInvitationRequestToJSON(
|
|
143
|
+
acceptInvitationRequest: AcceptInvitationRequest,
|
|
144
|
+
): string {
|
|
145
|
+
return JSON.stringify(
|
|
146
|
+
AcceptInvitationRequest$outboundSchema.parse(acceptInvitationRequest),
|
|
147
|
+
);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export function acceptInvitationRequestFromJSON(
|
|
151
|
+
jsonString: string,
|
|
152
|
+
): SafeParseResult<AcceptInvitationRequest, SDKValidationError> {
|
|
153
|
+
return safeParse(
|
|
154
|
+
jsonString,
|
|
155
|
+
(x) => AcceptInvitationRequest$inboundSchema.parse(JSON.parse(x)),
|
|
156
|
+
`Failed to parse 'AcceptInvitationRequest' from JSON`,
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/** @internal */
|
|
161
|
+
export const AcceptInvitationResponseBody$inboundSchema: z.ZodType<
|
|
162
|
+
AcceptInvitationResponseBody,
|
|
163
|
+
z.ZodTypeDef,
|
|
164
|
+
unknown
|
|
165
|
+
> = z.object({
|
|
166
|
+
success: z.boolean().optional(),
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
/** @internal */
|
|
170
|
+
export type AcceptInvitationResponseBody$Outbound = {
|
|
171
|
+
success?: boolean | undefined;
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
/** @internal */
|
|
175
|
+
export const AcceptInvitationResponseBody$outboundSchema: z.ZodType<
|
|
176
|
+
AcceptInvitationResponseBody$Outbound,
|
|
177
|
+
z.ZodTypeDef,
|
|
178
|
+
AcceptInvitationResponseBody
|
|
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 AcceptInvitationResponseBody$ {
|
|
188
|
+
/** @deprecated use `AcceptInvitationResponseBody$inboundSchema` instead. */
|
|
189
|
+
export const inboundSchema = AcceptInvitationResponseBody$inboundSchema;
|
|
190
|
+
/** @deprecated use `AcceptInvitationResponseBody$outboundSchema` instead. */
|
|
191
|
+
export const outboundSchema = AcceptInvitationResponseBody$outboundSchema;
|
|
192
|
+
/** @deprecated use `AcceptInvitationResponseBody$Outbound` instead. */
|
|
193
|
+
export type Outbound = AcceptInvitationResponseBody$Outbound;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export function acceptInvitationResponseBodyToJSON(
|
|
197
|
+
acceptInvitationResponseBody: AcceptInvitationResponseBody,
|
|
198
|
+
): string {
|
|
199
|
+
return JSON.stringify(
|
|
200
|
+
AcceptInvitationResponseBody$outboundSchema.parse(
|
|
201
|
+
acceptInvitationResponseBody,
|
|
202
|
+
),
|
|
203
|
+
);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export function acceptInvitationResponseBodyFromJSON(
|
|
207
|
+
jsonString: string,
|
|
208
|
+
): SafeParseResult<AcceptInvitationResponseBody, SDKValidationError> {
|
|
209
|
+
return safeParse(
|
|
210
|
+
jsonString,
|
|
211
|
+
(x) => AcceptInvitationResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
212
|
+
`Failed to parse 'AcceptInvitationResponseBody' from JSON`,
|
|
213
|
+
);
|
|
214
|
+
}
|