@greensecurity/javascript-sdk 0.39.1 → 0.39.4
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 +6 -0
- package/bin/mcp-server.js +692 -472
- package/bin/mcp-server.js.map +11 -8
- package/dist/commonjs/__tests__/events.test.d.ts +2 -0
- package/dist/commonjs/__tests__/events.test.d.ts.map +1 -0
- package/dist/commonjs/__tests__/events.test.js +41 -0
- package/dist/commonjs/__tests__/events.test.js.map +1 -0
- package/dist/commonjs/funcs/eventsListOrSearchVendorInvitees.d.ts +28 -0
- package/dist/commonjs/funcs/eventsListOrSearchVendorInvitees.d.ts.map +1 -0
- package/dist/commonjs/funcs/eventsListOrSearchVendorInvitees.js +166 -0
- package/dist/commonjs/funcs/eventsListOrSearchVendorInvitees.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 +3 -1
- package/dist/commonjs/mcp-server/server.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/eventsListOrSearchVendorInvitees.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/eventsListOrSearchVendorInvitees.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/eventsListOrSearchVendorInvitees.js +71 -0
- package/dist/commonjs/mcp-server/tools/eventsListOrSearchVendorInvitees.js.map +1 -0
- package/dist/commonjs/models/components/expand.d.ts +3 -0
- package/dist/commonjs/models/components/expand.d.ts.map +1 -1
- package/dist/commonjs/models/components/expand.js +1 -0
- package/dist/commonjs/models/components/expand.js.map +1 -1
- package/dist/commonjs/models/operations/index.d.ts +1 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +1 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/listorsearchvendorinvitees.d.ts +116 -0
- package/dist/commonjs/models/operations/listorsearchvendorinvitees.d.ts.map +1 -0
- package/dist/commonjs/models/operations/listorsearchvendorinvitees.js +153 -0
- package/dist/commonjs/models/operations/listorsearchvendorinvitees.js.map +1 -0
- package/dist/commonjs/react-query/eventsListOrSearchVendorInvitees.d.ts +109 -0
- package/dist/commonjs/react-query/eventsListOrSearchVendorInvitees.d.ts.map +1 -0
- package/dist/commonjs/react-query/eventsListOrSearchVendorInvitees.js +191 -0
- package/dist/commonjs/react-query/eventsListOrSearchVendorInvitees.js.map +1 -0
- package/dist/commonjs/react-query/index.d.ts +1 -0
- package/dist/commonjs/react-query/index.d.ts.map +1 -1
- package/dist/commonjs/react-query/index.js +1 -0
- package/dist/commonjs/react-query/index.js.map +1 -1
- package/dist/commonjs/sdk/events.d.ts +22 -0
- package/dist/commonjs/sdk/events.d.ts.map +1 -0
- package/dist/commonjs/sdk/events.js +29 -0
- package/dist/commonjs/sdk/events.js.map +1 -0
- package/dist/commonjs/sdk/sdk.d.ts +3 -0
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
- package/dist/commonjs/sdk/sdk.js +4 -0
- package/dist/commonjs/sdk/sdk.js.map +1 -1
- package/dist/esm/__tests__/events.test.d.ts +2 -0
- package/dist/esm/__tests__/events.test.d.ts.map +1 -0
- package/dist/esm/__tests__/events.test.js +39 -0
- package/dist/esm/__tests__/events.test.js.map +1 -0
- package/dist/esm/funcs/eventsListOrSearchVendorInvitees.d.ts +28 -0
- package/dist/esm/funcs/eventsListOrSearchVendorInvitees.d.ts.map +1 -0
- package/dist/esm/funcs/eventsListOrSearchVendorInvitees.js +130 -0
- package/dist/esm/funcs/eventsListOrSearchVendorInvitees.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 +3 -1
- package/dist/esm/mcp-server/server.js.map +1 -1
- package/dist/esm/mcp-server/tools/eventsListOrSearchVendorInvitees.d.ts +8 -0
- package/dist/esm/mcp-server/tools/eventsListOrSearchVendorInvitees.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/eventsListOrSearchVendorInvitees.js +35 -0
- package/dist/esm/mcp-server/tools/eventsListOrSearchVendorInvitees.js.map +1 -0
- package/dist/esm/models/components/expand.d.ts +3 -0
- package/dist/esm/models/components/expand.d.ts.map +1 -1
- package/dist/esm/models/components/expand.js +1 -0
- package/dist/esm/models/components/expand.js.map +1 -1
- package/dist/esm/models/operations/index.d.ts +1 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +1 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/listorsearchvendorinvitees.d.ts +116 -0
- package/dist/esm/models/operations/listorsearchvendorinvitees.d.ts.map +1 -0
- package/dist/esm/models/operations/listorsearchvendorinvitees.js +111 -0
- package/dist/esm/models/operations/listorsearchvendorinvitees.js.map +1 -0
- package/dist/esm/react-query/eventsListOrSearchVendorInvitees.d.ts +109 -0
- package/dist/esm/react-query/eventsListOrSearchVendorInvitees.d.ts.map +1 -0
- package/dist/esm/react-query/eventsListOrSearchVendorInvitees.js +178 -0
- package/dist/esm/react-query/eventsListOrSearchVendorInvitees.js.map +1 -0
- package/dist/esm/react-query/index.d.ts +1 -0
- package/dist/esm/react-query/index.d.ts.map +1 -1
- package/dist/esm/react-query/index.js +1 -0
- package/dist/esm/react-query/index.js.map +1 -1
- package/dist/esm/sdk/events.d.ts +22 -0
- package/dist/esm/sdk/events.d.ts.map +1 -0
- package/dist/esm/sdk/events.js +25 -0
- package/dist/esm/sdk/events.js.map +1 -0
- package/dist/esm/sdk/sdk.d.ts +3 -0
- package/dist/esm/sdk/sdk.d.ts.map +1 -1
- package/dist/esm/sdk/sdk.js +4 -0
- package/dist/esm/sdk/sdk.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 +42 -0
- package/src/funcs/eventsListOrSearchVendorInvitees.ts +261 -0
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +3 -1
- package/src/mcp-server/tools/eventsListOrSearchVendorInvitees.ts +46 -0
- package/src/models/components/expand.ts +1 -0
- package/src/models/operations/index.ts +1 -0
- package/src/models/operations/listorsearchvendorinvitees.ts +261 -0
- package/src/react-query/eventsListOrSearchVendorInvitees.ts +378 -0
- package/src/react-query/index.ts +1 -0
- package/src/sdk/events.ts +39 -0
- package/src/sdk/sdk.ts +6 -0
|
@@ -0,0 +1,261 @@
|
|
|
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 * as components from "../components/index.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type ListOrSearchVendorInviteesRequest = {
|
|
13
|
+
/**
|
|
14
|
+
* A comma-separated list of object attributes to sort on.
|
|
15
|
+
*/
|
|
16
|
+
sort?: string | null | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Sort desc
|
|
19
|
+
*/
|
|
20
|
+
desc?: components.Desc | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* A 1-based offset for which page to request (defaults to 1)
|
|
23
|
+
*/
|
|
24
|
+
page?: number | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Number of items to show in a given page
|
|
27
|
+
*/
|
|
28
|
+
itemsPerPage?: number | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* An array-style parameter to identify which sections of an object to expand. See documentation for the endpoint for a list of valid expansion values.
|
|
31
|
+
*/
|
|
32
|
+
expand?: Array<components.Expand> | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* Search for objects by the search string
|
|
35
|
+
*/
|
|
36
|
+
search?: string | undefined;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* The request was successful, and the server has returned the requested resource in the response body.
|
|
41
|
+
*/
|
|
42
|
+
export type ListOrSearchVendorInviteesResponseBody = {
|
|
43
|
+
/**
|
|
44
|
+
* Pagination information for a pageable list
|
|
45
|
+
*/
|
|
46
|
+
pager: components.Pager;
|
|
47
|
+
items: Array<components.Contact | null>;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export type ListOrSearchVendorInviteesResponse = {
|
|
51
|
+
result: ListOrSearchVendorInviteesResponseBody;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/** @internal */
|
|
55
|
+
export const ListOrSearchVendorInviteesRequest$inboundSchema: z.ZodType<
|
|
56
|
+
ListOrSearchVendorInviteesRequest,
|
|
57
|
+
z.ZodTypeDef,
|
|
58
|
+
unknown
|
|
59
|
+
> = z.object({
|
|
60
|
+
sort: z.nullable(z.string()).optional(),
|
|
61
|
+
desc: components.Desc$inboundSchema.optional(),
|
|
62
|
+
page: z.number().int().optional(),
|
|
63
|
+
items_per_page: z.number().int().optional(),
|
|
64
|
+
expand: z.array(components.Expand$inboundSchema).optional(),
|
|
65
|
+
search: z.string().optional(),
|
|
66
|
+
}).transform((v) => {
|
|
67
|
+
return remap$(v, {
|
|
68
|
+
"items_per_page": "itemsPerPage",
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
/** @internal */
|
|
73
|
+
export type ListOrSearchVendorInviteesRequest$Outbound = {
|
|
74
|
+
sort?: string | null | undefined;
|
|
75
|
+
desc?: components.Desc$Outbound | undefined;
|
|
76
|
+
page?: number | undefined;
|
|
77
|
+
items_per_page?: number | undefined;
|
|
78
|
+
expand?: Array<string> | undefined;
|
|
79
|
+
search?: string | undefined;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
/** @internal */
|
|
83
|
+
export const ListOrSearchVendorInviteesRequest$outboundSchema: z.ZodType<
|
|
84
|
+
ListOrSearchVendorInviteesRequest$Outbound,
|
|
85
|
+
z.ZodTypeDef,
|
|
86
|
+
ListOrSearchVendorInviteesRequest
|
|
87
|
+
> = z.object({
|
|
88
|
+
sort: z.nullable(z.string()).optional(),
|
|
89
|
+
desc: components.Desc$outboundSchema.optional(),
|
|
90
|
+
page: z.number().int().optional(),
|
|
91
|
+
itemsPerPage: z.number().int().optional(),
|
|
92
|
+
expand: z.array(components.Expand$outboundSchema).optional(),
|
|
93
|
+
search: z.string().optional(),
|
|
94
|
+
}).transform((v) => {
|
|
95
|
+
return remap$(v, {
|
|
96
|
+
itemsPerPage: "items_per_page",
|
|
97
|
+
});
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* @internal
|
|
102
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
103
|
+
*/
|
|
104
|
+
export namespace ListOrSearchVendorInviteesRequest$ {
|
|
105
|
+
/** @deprecated use `ListOrSearchVendorInviteesRequest$inboundSchema` instead. */
|
|
106
|
+
export const inboundSchema = ListOrSearchVendorInviteesRequest$inboundSchema;
|
|
107
|
+
/** @deprecated use `ListOrSearchVendorInviteesRequest$outboundSchema` instead. */
|
|
108
|
+
export const outboundSchema =
|
|
109
|
+
ListOrSearchVendorInviteesRequest$outboundSchema;
|
|
110
|
+
/** @deprecated use `ListOrSearchVendorInviteesRequest$Outbound` instead. */
|
|
111
|
+
export type Outbound = ListOrSearchVendorInviteesRequest$Outbound;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export function listOrSearchVendorInviteesRequestToJSON(
|
|
115
|
+
listOrSearchVendorInviteesRequest: ListOrSearchVendorInviteesRequest,
|
|
116
|
+
): string {
|
|
117
|
+
return JSON.stringify(
|
|
118
|
+
ListOrSearchVendorInviteesRequest$outboundSchema.parse(
|
|
119
|
+
listOrSearchVendorInviteesRequest,
|
|
120
|
+
),
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export function listOrSearchVendorInviteesRequestFromJSON(
|
|
125
|
+
jsonString: string,
|
|
126
|
+
): SafeParseResult<ListOrSearchVendorInviteesRequest, SDKValidationError> {
|
|
127
|
+
return safeParse(
|
|
128
|
+
jsonString,
|
|
129
|
+
(x) => ListOrSearchVendorInviteesRequest$inboundSchema.parse(JSON.parse(x)),
|
|
130
|
+
`Failed to parse 'ListOrSearchVendorInviteesRequest' from JSON`,
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/** @internal */
|
|
135
|
+
export const ListOrSearchVendorInviteesResponseBody$inboundSchema: z.ZodType<
|
|
136
|
+
ListOrSearchVendorInviteesResponseBody,
|
|
137
|
+
z.ZodTypeDef,
|
|
138
|
+
unknown
|
|
139
|
+
> = z.object({
|
|
140
|
+
pager: components.Pager$inboundSchema,
|
|
141
|
+
items: z.array(z.nullable(components.Contact$inboundSchema)),
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
/** @internal */
|
|
145
|
+
export type ListOrSearchVendorInviteesResponseBody$Outbound = {
|
|
146
|
+
pager: components.Pager$Outbound;
|
|
147
|
+
items: Array<components.Contact$Outbound | null>;
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
/** @internal */
|
|
151
|
+
export const ListOrSearchVendorInviteesResponseBody$outboundSchema: z.ZodType<
|
|
152
|
+
ListOrSearchVendorInviteesResponseBody$Outbound,
|
|
153
|
+
z.ZodTypeDef,
|
|
154
|
+
ListOrSearchVendorInviteesResponseBody
|
|
155
|
+
> = z.object({
|
|
156
|
+
pager: components.Pager$outboundSchema,
|
|
157
|
+
items: z.array(z.nullable(components.Contact$outboundSchema)),
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* @internal
|
|
162
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
163
|
+
*/
|
|
164
|
+
export namespace ListOrSearchVendorInviteesResponseBody$ {
|
|
165
|
+
/** @deprecated use `ListOrSearchVendorInviteesResponseBody$inboundSchema` instead. */
|
|
166
|
+
export const inboundSchema =
|
|
167
|
+
ListOrSearchVendorInviteesResponseBody$inboundSchema;
|
|
168
|
+
/** @deprecated use `ListOrSearchVendorInviteesResponseBody$outboundSchema` instead. */
|
|
169
|
+
export const outboundSchema =
|
|
170
|
+
ListOrSearchVendorInviteesResponseBody$outboundSchema;
|
|
171
|
+
/** @deprecated use `ListOrSearchVendorInviteesResponseBody$Outbound` instead. */
|
|
172
|
+
export type Outbound = ListOrSearchVendorInviteesResponseBody$Outbound;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
export function listOrSearchVendorInviteesResponseBodyToJSON(
|
|
176
|
+
listOrSearchVendorInviteesResponseBody:
|
|
177
|
+
ListOrSearchVendorInviteesResponseBody,
|
|
178
|
+
): string {
|
|
179
|
+
return JSON.stringify(
|
|
180
|
+
ListOrSearchVendorInviteesResponseBody$outboundSchema.parse(
|
|
181
|
+
listOrSearchVendorInviteesResponseBody,
|
|
182
|
+
),
|
|
183
|
+
);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
export function listOrSearchVendorInviteesResponseBodyFromJSON(
|
|
187
|
+
jsonString: string,
|
|
188
|
+
): SafeParseResult<ListOrSearchVendorInviteesResponseBody, SDKValidationError> {
|
|
189
|
+
return safeParse(
|
|
190
|
+
jsonString,
|
|
191
|
+
(x) =>
|
|
192
|
+
ListOrSearchVendorInviteesResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
193
|
+
`Failed to parse 'ListOrSearchVendorInviteesResponseBody' from JSON`,
|
|
194
|
+
);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/** @internal */
|
|
198
|
+
export const ListOrSearchVendorInviteesResponse$inboundSchema: z.ZodType<
|
|
199
|
+
ListOrSearchVendorInviteesResponse,
|
|
200
|
+
z.ZodTypeDef,
|
|
201
|
+
unknown
|
|
202
|
+
> = z.object({
|
|
203
|
+
Result: z.lazy(() => ListOrSearchVendorInviteesResponseBody$inboundSchema),
|
|
204
|
+
}).transform((v) => {
|
|
205
|
+
return remap$(v, {
|
|
206
|
+
"Result": "result",
|
|
207
|
+
});
|
|
208
|
+
});
|
|
209
|
+
|
|
210
|
+
/** @internal */
|
|
211
|
+
export type ListOrSearchVendorInviteesResponse$Outbound = {
|
|
212
|
+
Result: ListOrSearchVendorInviteesResponseBody$Outbound;
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
/** @internal */
|
|
216
|
+
export const ListOrSearchVendorInviteesResponse$outboundSchema: z.ZodType<
|
|
217
|
+
ListOrSearchVendorInviteesResponse$Outbound,
|
|
218
|
+
z.ZodTypeDef,
|
|
219
|
+
ListOrSearchVendorInviteesResponse
|
|
220
|
+
> = z.object({
|
|
221
|
+
result: z.lazy(() => ListOrSearchVendorInviteesResponseBody$outboundSchema),
|
|
222
|
+
}).transform((v) => {
|
|
223
|
+
return remap$(v, {
|
|
224
|
+
result: "Result",
|
|
225
|
+
});
|
|
226
|
+
});
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* @internal
|
|
230
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
231
|
+
*/
|
|
232
|
+
export namespace ListOrSearchVendorInviteesResponse$ {
|
|
233
|
+
/** @deprecated use `ListOrSearchVendorInviteesResponse$inboundSchema` instead. */
|
|
234
|
+
export const inboundSchema = ListOrSearchVendorInviteesResponse$inboundSchema;
|
|
235
|
+
/** @deprecated use `ListOrSearchVendorInviteesResponse$outboundSchema` instead. */
|
|
236
|
+
export const outboundSchema =
|
|
237
|
+
ListOrSearchVendorInviteesResponse$outboundSchema;
|
|
238
|
+
/** @deprecated use `ListOrSearchVendorInviteesResponse$Outbound` instead. */
|
|
239
|
+
export type Outbound = ListOrSearchVendorInviteesResponse$Outbound;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
export function listOrSearchVendorInviteesResponseToJSON(
|
|
243
|
+
listOrSearchVendorInviteesResponse: ListOrSearchVendorInviteesResponse,
|
|
244
|
+
): string {
|
|
245
|
+
return JSON.stringify(
|
|
246
|
+
ListOrSearchVendorInviteesResponse$outboundSchema.parse(
|
|
247
|
+
listOrSearchVendorInviteesResponse,
|
|
248
|
+
),
|
|
249
|
+
);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
export function listOrSearchVendorInviteesResponseFromJSON(
|
|
253
|
+
jsonString: string,
|
|
254
|
+
): SafeParseResult<ListOrSearchVendorInviteesResponse, SDKValidationError> {
|
|
255
|
+
return safeParse(
|
|
256
|
+
jsonString,
|
|
257
|
+
(x) =>
|
|
258
|
+
ListOrSearchVendorInviteesResponse$inboundSchema.parse(JSON.parse(x)),
|
|
259
|
+
`Failed to parse 'ListOrSearchVendorInviteesResponse' from JSON`,
|
|
260
|
+
);
|
|
261
|
+
}
|
|
@@ -0,0 +1,378 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
InfiniteData,
|
|
7
|
+
InvalidateQueryFilters,
|
|
8
|
+
QueryClient,
|
|
9
|
+
QueryFunctionContext,
|
|
10
|
+
QueryKey,
|
|
11
|
+
useInfiniteQuery,
|
|
12
|
+
UseInfiniteQueryResult,
|
|
13
|
+
useQuery,
|
|
14
|
+
UseQueryResult,
|
|
15
|
+
useSuspenseInfiniteQuery,
|
|
16
|
+
UseSuspenseInfiniteQueryResult,
|
|
17
|
+
useSuspenseQuery,
|
|
18
|
+
UseSuspenseQueryResult,
|
|
19
|
+
} from "@tanstack/react-query";
|
|
20
|
+
import { GreenSecurityCore } from "../core.js";
|
|
21
|
+
import { eventsListOrSearchVendorInvitees } from "../funcs/eventsListOrSearchVendorInvitees.js";
|
|
22
|
+
import { combineSignals } from "../lib/primitives.js";
|
|
23
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
24
|
+
import * as components from "../models/components/index.js";
|
|
25
|
+
import * as operations from "../models/operations/index.js";
|
|
26
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
27
|
+
import { PageIterator, unwrapResultIterator } from "../types/operations.js";
|
|
28
|
+
import { useGreenSecurityContext } from "./_context.js";
|
|
29
|
+
import {
|
|
30
|
+
InfiniteQueryHookOptions,
|
|
31
|
+
QueryHookOptions,
|
|
32
|
+
SuspenseInfiniteQueryHookOptions,
|
|
33
|
+
SuspenseQueryHookOptions,
|
|
34
|
+
TupleToPrefixes,
|
|
35
|
+
} from "./_types.js";
|
|
36
|
+
|
|
37
|
+
export type EventsListOrSearchVendorInviteesQueryData =
|
|
38
|
+
operations.ListOrSearchVendorInviteesResponse;
|
|
39
|
+
|
|
40
|
+
export type EventsListOrSearchVendorInviteesInfiniteQueryData = PageIterator<
|
|
41
|
+
operations.ListOrSearchVendorInviteesResponse,
|
|
42
|
+
{ page: number }
|
|
43
|
+
>;
|
|
44
|
+
|
|
45
|
+
export type EventsListOrSearchVendorInviteesPageParams = PageIterator<
|
|
46
|
+
operations.ListOrSearchVendorInviteesResponse,
|
|
47
|
+
{ page: number }
|
|
48
|
+
>["~next"];
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* List or search vendor invitees
|
|
52
|
+
*
|
|
53
|
+
* @remarks
|
|
54
|
+
* List or search vendor invitees.
|
|
55
|
+
*
|
|
56
|
+
* Available `expand` scopes are:
|
|
57
|
+
*
|
|
58
|
+
* - contact.facility
|
|
59
|
+
* - contact.system
|
|
60
|
+
* - contact.department
|
|
61
|
+
* - contact.user
|
|
62
|
+
*/
|
|
63
|
+
export function useEventsListOrSearchVendorInvitees(
|
|
64
|
+
request: operations.ListOrSearchVendorInviteesRequest,
|
|
65
|
+
options?: QueryHookOptions<EventsListOrSearchVendorInviteesQueryData>,
|
|
66
|
+
): UseQueryResult<EventsListOrSearchVendorInviteesQueryData, Error> {
|
|
67
|
+
const client = useGreenSecurityContext();
|
|
68
|
+
return useQuery({
|
|
69
|
+
...buildEventsListOrSearchVendorInviteesQuery(
|
|
70
|
+
client,
|
|
71
|
+
request,
|
|
72
|
+
options,
|
|
73
|
+
),
|
|
74
|
+
...options,
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* List or search vendor invitees
|
|
80
|
+
*
|
|
81
|
+
* @remarks
|
|
82
|
+
* List or search vendor invitees.
|
|
83
|
+
*
|
|
84
|
+
* Available `expand` scopes are:
|
|
85
|
+
*
|
|
86
|
+
* - contact.facility
|
|
87
|
+
* - contact.system
|
|
88
|
+
* - contact.department
|
|
89
|
+
* - contact.user
|
|
90
|
+
*/
|
|
91
|
+
export function useEventsListOrSearchVendorInviteesSuspense(
|
|
92
|
+
request: operations.ListOrSearchVendorInviteesRequest,
|
|
93
|
+
options?: SuspenseQueryHookOptions<EventsListOrSearchVendorInviteesQueryData>,
|
|
94
|
+
): UseSuspenseQueryResult<EventsListOrSearchVendorInviteesQueryData, Error> {
|
|
95
|
+
const client = useGreenSecurityContext();
|
|
96
|
+
return useSuspenseQuery({
|
|
97
|
+
...buildEventsListOrSearchVendorInviteesQuery(
|
|
98
|
+
client,
|
|
99
|
+
request,
|
|
100
|
+
options,
|
|
101
|
+
),
|
|
102
|
+
...options,
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* List or search vendor invitees
|
|
108
|
+
*
|
|
109
|
+
* @remarks
|
|
110
|
+
* List or search vendor invitees.
|
|
111
|
+
*
|
|
112
|
+
* Available `expand` scopes are:
|
|
113
|
+
*
|
|
114
|
+
* - contact.facility
|
|
115
|
+
* - contact.system
|
|
116
|
+
* - contact.department
|
|
117
|
+
* - contact.user
|
|
118
|
+
*/
|
|
119
|
+
export function useEventsListOrSearchVendorInviteesInfinite(
|
|
120
|
+
request: operations.ListOrSearchVendorInviteesRequest,
|
|
121
|
+
options?: InfiniteQueryHookOptions<
|
|
122
|
+
EventsListOrSearchVendorInviteesInfiniteQueryData
|
|
123
|
+
>,
|
|
124
|
+
): UseInfiniteQueryResult<
|
|
125
|
+
InfiniteData<
|
|
126
|
+
EventsListOrSearchVendorInviteesInfiniteQueryData,
|
|
127
|
+
EventsListOrSearchVendorInviteesPageParams
|
|
128
|
+
>,
|
|
129
|
+
Error
|
|
130
|
+
> {
|
|
131
|
+
const client = useGreenSecurityContext();
|
|
132
|
+
return useInfiniteQuery<
|
|
133
|
+
EventsListOrSearchVendorInviteesInfiniteQueryData,
|
|
134
|
+
Error,
|
|
135
|
+
InfiniteData<
|
|
136
|
+
EventsListOrSearchVendorInviteesInfiniteQueryData,
|
|
137
|
+
EventsListOrSearchVendorInviteesPageParams
|
|
138
|
+
>,
|
|
139
|
+
QueryKey,
|
|
140
|
+
EventsListOrSearchVendorInviteesPageParams
|
|
141
|
+
>({
|
|
142
|
+
...buildEventsListOrSearchVendorInviteesInfiniteQuery(
|
|
143
|
+
client,
|
|
144
|
+
request,
|
|
145
|
+
options,
|
|
146
|
+
),
|
|
147
|
+
initialPageParam: options?.initialPageParam,
|
|
148
|
+
getNextPageParam: (previousPage) => previousPage["~next"],
|
|
149
|
+
...options,
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* List or search vendor invitees
|
|
155
|
+
*
|
|
156
|
+
* @remarks
|
|
157
|
+
* List or search vendor invitees.
|
|
158
|
+
*
|
|
159
|
+
* Available `expand` scopes are:
|
|
160
|
+
*
|
|
161
|
+
* - contact.facility
|
|
162
|
+
* - contact.system
|
|
163
|
+
* - contact.department
|
|
164
|
+
* - contact.user
|
|
165
|
+
*/
|
|
166
|
+
export function useEventsListOrSearchVendorInviteesInfiniteSuspense(
|
|
167
|
+
request: operations.ListOrSearchVendorInviteesRequest,
|
|
168
|
+
options?: SuspenseInfiniteQueryHookOptions<
|
|
169
|
+
EventsListOrSearchVendorInviteesInfiniteQueryData
|
|
170
|
+
>,
|
|
171
|
+
): UseSuspenseInfiniteQueryResult<
|
|
172
|
+
InfiniteData<
|
|
173
|
+
EventsListOrSearchVendorInviteesInfiniteQueryData,
|
|
174
|
+
EventsListOrSearchVendorInviteesPageParams
|
|
175
|
+
>,
|
|
176
|
+
Error
|
|
177
|
+
> {
|
|
178
|
+
const client = useGreenSecurityContext();
|
|
179
|
+
return useSuspenseInfiniteQuery<
|
|
180
|
+
EventsListOrSearchVendorInviteesInfiniteQueryData,
|
|
181
|
+
Error,
|
|
182
|
+
InfiniteData<
|
|
183
|
+
EventsListOrSearchVendorInviteesInfiniteQueryData,
|
|
184
|
+
EventsListOrSearchVendorInviteesPageParams
|
|
185
|
+
>,
|
|
186
|
+
QueryKey,
|
|
187
|
+
EventsListOrSearchVendorInviteesPageParams
|
|
188
|
+
>({
|
|
189
|
+
...buildEventsListOrSearchVendorInviteesInfiniteQuery(
|
|
190
|
+
client,
|
|
191
|
+
request,
|
|
192
|
+
options,
|
|
193
|
+
),
|
|
194
|
+
initialPageParam: options?.initialPageParam,
|
|
195
|
+
getNextPageParam: (previousPage) => previousPage["~next"],
|
|
196
|
+
...options,
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
export function prefetchEventsListOrSearchVendorInvitees(
|
|
201
|
+
queryClient: QueryClient,
|
|
202
|
+
client$: GreenSecurityCore,
|
|
203
|
+
request: operations.ListOrSearchVendorInviteesRequest,
|
|
204
|
+
): Promise<void> {
|
|
205
|
+
return queryClient.prefetchQuery({
|
|
206
|
+
...buildEventsListOrSearchVendorInviteesQuery(
|
|
207
|
+
client$,
|
|
208
|
+
request,
|
|
209
|
+
),
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
export function setEventsListOrSearchVendorInviteesData(
|
|
214
|
+
client: QueryClient,
|
|
215
|
+
queryKeyBase: [
|
|
216
|
+
parameters: {
|
|
217
|
+
sort?: string | null | undefined;
|
|
218
|
+
desc?: components.Desc | undefined;
|
|
219
|
+
page?: number | undefined;
|
|
220
|
+
itemsPerPage?: number | undefined;
|
|
221
|
+
expand?: Array<components.Expand> | undefined;
|
|
222
|
+
search?: string | undefined;
|
|
223
|
+
},
|
|
224
|
+
],
|
|
225
|
+
data: EventsListOrSearchVendorInviteesQueryData,
|
|
226
|
+
): EventsListOrSearchVendorInviteesQueryData | undefined {
|
|
227
|
+
const key = queryKeyEventsListOrSearchVendorInvitees(...queryKeyBase);
|
|
228
|
+
|
|
229
|
+
return client.setQueryData<EventsListOrSearchVendorInviteesQueryData>(
|
|
230
|
+
key,
|
|
231
|
+
data,
|
|
232
|
+
);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
export function invalidateEventsListOrSearchVendorInvitees(
|
|
236
|
+
client: QueryClient,
|
|
237
|
+
queryKeyBase: TupleToPrefixes<
|
|
238
|
+
[parameters: {
|
|
239
|
+
sort?: string | null | undefined;
|
|
240
|
+
desc?: components.Desc | undefined;
|
|
241
|
+
page?: number | undefined;
|
|
242
|
+
itemsPerPage?: number | undefined;
|
|
243
|
+
expand?: Array<components.Expand> | undefined;
|
|
244
|
+
search?: string | undefined;
|
|
245
|
+
}]
|
|
246
|
+
>,
|
|
247
|
+
filters?: Omit<InvalidateQueryFilters, "queryKey" | "predicate" | "exact">,
|
|
248
|
+
): Promise<void> {
|
|
249
|
+
return client.invalidateQueries({
|
|
250
|
+
...filters,
|
|
251
|
+
queryKey: [
|
|
252
|
+
"@greensecurity/javascript-sdk",
|
|
253
|
+
"events",
|
|
254
|
+
"listOrSearchVendorInvitees",
|
|
255
|
+
...queryKeyBase,
|
|
256
|
+
],
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
export function invalidateAllEventsListOrSearchVendorInvitees(
|
|
261
|
+
client: QueryClient,
|
|
262
|
+
filters?: Omit<InvalidateQueryFilters, "queryKey" | "predicate" | "exact">,
|
|
263
|
+
): Promise<void> {
|
|
264
|
+
return client.invalidateQueries({
|
|
265
|
+
...filters,
|
|
266
|
+
queryKey: [
|
|
267
|
+
"@greensecurity/javascript-sdk",
|
|
268
|
+
"events",
|
|
269
|
+
"listOrSearchVendorInvitees",
|
|
270
|
+
],
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
export function buildEventsListOrSearchVendorInviteesQuery(
|
|
275
|
+
client$: GreenSecurityCore,
|
|
276
|
+
request: operations.ListOrSearchVendorInviteesRequest,
|
|
277
|
+
options?: RequestOptions,
|
|
278
|
+
): {
|
|
279
|
+
queryKey: QueryKey;
|
|
280
|
+
queryFn: (
|
|
281
|
+
context: QueryFunctionContext,
|
|
282
|
+
) => Promise<EventsListOrSearchVendorInviteesQueryData>;
|
|
283
|
+
} {
|
|
284
|
+
return {
|
|
285
|
+
queryKey: queryKeyEventsListOrSearchVendorInvitees({
|
|
286
|
+
sort: request.sort,
|
|
287
|
+
desc: request.desc,
|
|
288
|
+
page: request.page,
|
|
289
|
+
itemsPerPage: request.itemsPerPage,
|
|
290
|
+
expand: request.expand,
|
|
291
|
+
search: request.search,
|
|
292
|
+
}),
|
|
293
|
+
queryFn: async function eventsListOrSearchVendorInviteesQueryFn(
|
|
294
|
+
ctx,
|
|
295
|
+
): Promise<EventsListOrSearchVendorInviteesQueryData> {
|
|
296
|
+
const sig = combineSignals(ctx.signal, options?.fetchOptions?.signal);
|
|
297
|
+
const mergedOptions = {
|
|
298
|
+
...options,
|
|
299
|
+
fetchOptions: { ...options?.fetchOptions, signal: sig },
|
|
300
|
+
};
|
|
301
|
+
|
|
302
|
+
return unwrapAsync(eventsListOrSearchVendorInvitees(
|
|
303
|
+
client$,
|
|
304
|
+
request,
|
|
305
|
+
mergedOptions,
|
|
306
|
+
));
|
|
307
|
+
},
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
export function buildEventsListOrSearchVendorInviteesInfiniteQuery(
|
|
312
|
+
client$: GreenSecurityCore,
|
|
313
|
+
request: operations.ListOrSearchVendorInviteesRequest,
|
|
314
|
+
options?: RequestOptions,
|
|
315
|
+
): {
|
|
316
|
+
queryKey: QueryKey;
|
|
317
|
+
queryFn: (
|
|
318
|
+
context: QueryFunctionContext<
|
|
319
|
+
QueryKey,
|
|
320
|
+
EventsListOrSearchVendorInviteesPageParams
|
|
321
|
+
>,
|
|
322
|
+
) => Promise<EventsListOrSearchVendorInviteesInfiniteQueryData>;
|
|
323
|
+
} {
|
|
324
|
+
return {
|
|
325
|
+
queryKey: queryKeyEventsListOrSearchVendorInvitees({
|
|
326
|
+
sort: request.sort,
|
|
327
|
+
desc: request.desc,
|
|
328
|
+
page: request.page,
|
|
329
|
+
itemsPerPage: request.itemsPerPage,
|
|
330
|
+
expand: request.expand,
|
|
331
|
+
search: request.search,
|
|
332
|
+
}),
|
|
333
|
+
queryFn: async function eventsListOrSearchVendorInviteesQuery(
|
|
334
|
+
ctx,
|
|
335
|
+
): Promise<EventsListOrSearchVendorInviteesInfiniteQueryData> {
|
|
336
|
+
const sig = combineSignals(ctx.signal, options?.fetchOptions?.signal);
|
|
337
|
+
const mergedOptions = {
|
|
338
|
+
...options,
|
|
339
|
+
fetchOptions: { ...options?.fetchOptions, signal: sig },
|
|
340
|
+
};
|
|
341
|
+
|
|
342
|
+
if (!ctx.pageParam) {
|
|
343
|
+
return unwrapResultIterator(eventsListOrSearchVendorInvitees(
|
|
344
|
+
client$,
|
|
345
|
+
request,
|
|
346
|
+
mergedOptions,
|
|
347
|
+
));
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
return unwrapResultIterator(eventsListOrSearchVendorInvitees(
|
|
351
|
+
client$,
|
|
352
|
+
{
|
|
353
|
+
...request,
|
|
354
|
+
page: ctx.pageParam.page,
|
|
355
|
+
},
|
|
356
|
+
mergedOptions,
|
|
357
|
+
));
|
|
358
|
+
},
|
|
359
|
+
};
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
export function queryKeyEventsListOrSearchVendorInvitees(
|
|
363
|
+
parameters: {
|
|
364
|
+
sort?: string | null | undefined;
|
|
365
|
+
desc?: components.Desc | undefined;
|
|
366
|
+
page?: number | undefined;
|
|
367
|
+
itemsPerPage?: number | undefined;
|
|
368
|
+
expand?: Array<components.Expand> | undefined;
|
|
369
|
+
search?: string | undefined;
|
|
370
|
+
},
|
|
371
|
+
): QueryKey {
|
|
372
|
+
return [
|
|
373
|
+
"@greensecurity/javascript-sdk",
|
|
374
|
+
"events",
|
|
375
|
+
"listOrSearchVendorInvitees",
|
|
376
|
+
parameters,
|
|
377
|
+
];
|
|
378
|
+
}
|
package/src/react-query/index.ts
CHANGED
|
@@ -9,6 +9,7 @@ export * from "./companiesListOrSearchCompanies.js";
|
|
|
9
9
|
export * from "./dataRequestsAddDataRequestFile.js";
|
|
10
10
|
export * from "./dataRequestsDeleteDataRequestFile.js";
|
|
11
11
|
export * from "./dataRequestsUpdateDataRequest.js";
|
|
12
|
+
export * from "./eventsListOrSearchVendorInvitees.js";
|
|
12
13
|
export * from "./invoicesCreateInvoice.js";
|
|
13
14
|
export * from "./invoicesMakePayment.js";
|
|
14
15
|
export * from "./invoicesUpdateInvoice.js";
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { eventsListOrSearchVendorInvitees } from "../funcs/eventsListOrSearchVendorInvitees.js";
|
|
6
|
+
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
7
|
+
import * as operations from "../models/operations/index.js";
|
|
8
|
+
import { PageIterator, unwrapResultIterator } from "../types/operations.js";
|
|
9
|
+
|
|
10
|
+
export class Events extends ClientSDK {
|
|
11
|
+
/**
|
|
12
|
+
* List or search vendor invitees
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
15
|
+
* List or search vendor invitees.
|
|
16
|
+
*
|
|
17
|
+
* Available `expand` scopes are:
|
|
18
|
+
*
|
|
19
|
+
* - contact.facility
|
|
20
|
+
* - contact.system
|
|
21
|
+
* - contact.department
|
|
22
|
+
* - contact.user
|
|
23
|
+
*/
|
|
24
|
+
async listOrSearchVendorInvitees(
|
|
25
|
+
request: operations.ListOrSearchVendorInviteesRequest,
|
|
26
|
+
options?: RequestOptions,
|
|
27
|
+
): Promise<
|
|
28
|
+
PageIterator<
|
|
29
|
+
operations.ListOrSearchVendorInviteesResponse,
|
|
30
|
+
{ page: number }
|
|
31
|
+
>
|
|
32
|
+
> {
|
|
33
|
+
return unwrapResultIterator(eventsListOrSearchVendorInvitees(
|
|
34
|
+
this,
|
|
35
|
+
request,
|
|
36
|
+
options,
|
|
37
|
+
));
|
|
38
|
+
}
|
|
39
|
+
}
|
package/src/sdk/sdk.ts
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import { ClientSDK } from "../lib/sdks.js";
|
|
6
6
|
import { Companies } from "./companies.js";
|
|
7
7
|
import { DataRequests } from "./datarequests.js";
|
|
8
|
+
import { Events } from "./events.js";
|
|
8
9
|
import { Invoices } from "./invoices.js";
|
|
9
10
|
import { Organizations } from "./organizations.js";
|
|
10
11
|
import { SupportArticles } from "./supportarticles.js";
|
|
@@ -66,6 +67,11 @@ export class GreenSecurity extends ClientSDK {
|
|
|
66
67
|
return (this._invoices ??= new Invoices(this._options));
|
|
67
68
|
}
|
|
68
69
|
|
|
70
|
+
private _events?: Events;
|
|
71
|
+
get events(): Events {
|
|
72
|
+
return (this._events ??= new Events(this._options));
|
|
73
|
+
}
|
|
74
|
+
|
|
69
75
|
private _systems?: Systems;
|
|
70
76
|
get systems(): Systems {
|
|
71
77
|
return (this._systems ??= new Systems(this._options));
|