@greensecurity/javascript-sdk 0.37.12 → 0.38.2
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 +858 -436
- package/bin/mcp-server.js.map +18 -10
- package/dist/commonjs/__tests__/organizations.test.js +42 -0
- package/dist/commonjs/__tests__/organizations.test.js.map +1 -1
- package/dist/commonjs/__tests__/vendors.test.js +16 -0
- package/dist/commonjs/__tests__/vendors.test.js.map +1 -1
- package/dist/commonjs/__tests__/zones.test.js +4 -19
- package/dist/commonjs/__tests__/zones.test.js.map +1 -1
- package/dist/commonjs/funcs/organizationsListOrSearchDepartmentContacts.d.ts +26 -0
- package/dist/commonjs/funcs/organizationsListOrSearchDepartmentContacts.d.ts.map +1 -0
- package/dist/commonjs/funcs/organizationsListOrSearchDepartmentContacts.js +168 -0
- package/dist/commonjs/funcs/organizationsListOrSearchDepartmentContacts.js.map +1 -0
- package/dist/commonjs/funcs/vendorsGetVendorInvoiceReceipt.d.ts +18 -0
- package/dist/commonjs/funcs/vendorsGetVendorInvoiceReceipt.d.ts.map +1 -0
- package/dist/commonjs/funcs/vendorsGetVendorInvoiceReceipt.js +125 -0
- package/dist/commonjs/funcs/vendorsGetVendorInvoiceReceipt.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/lib/config.js.map +1 -1
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/mcp-server.js.map +1 -1
- package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/server.js +5 -1
- package/dist/commonjs/mcp-server/server.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/organizationsListOrSearchDepartmentContacts.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/organizationsListOrSearchDepartmentContacts.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/organizationsListOrSearchDepartmentContacts.js +69 -0
- package/dist/commonjs/mcp-server/tools/organizationsListOrSearchDepartmentContacts.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/vendorsGetVendorInvoiceReceipt.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/vendorsGetVendorInvoiceReceipt.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/vendorsGetVendorInvoiceReceipt.js +64 -0
- package/dist/commonjs/mcp-server/tools/vendorsGetVendorInvoiceReceipt.js.map +1 -0
- package/dist/commonjs/models/components/contact.d.ts +30 -4
- package/dist/commonjs/models/components/contact.d.ts.map +1 -1
- package/dist/commonjs/models/components/contact.js +35 -5
- package/dist/commonjs/models/components/contact.js.map +1 -1
- package/dist/commonjs/models/components/departmentmembership.d.ts +80 -0
- package/dist/commonjs/models/components/departmentmembership.d.ts.map +1 -0
- package/dist/commonjs/models/components/departmentmembership.js +123 -0
- package/dist/commonjs/models/components/departmentmembership.js.map +1 -0
- package/dist/commonjs/models/components/expand.d.ts +6 -0
- package/dist/commonjs/models/components/expand.d.ts.map +1 -1
- package/dist/commonjs/models/components/expand.js +2 -0
- package/dist/commonjs/models/components/expand.js.map +1 -1
- package/dist/commonjs/models/components/index.d.ts +2 -0
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +2 -0
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/components/usersummary.d.ts +34 -0
- package/dist/commonjs/models/components/usersummary.d.ts.map +1 -0
- package/dist/commonjs/models/components/usersummary.js +71 -0
- package/dist/commonjs/models/components/usersummary.js.map +1 -0
- package/dist/commonjs/models/operations/getvendorinvoicereceipt.d.ts +32 -0
- package/dist/commonjs/models/operations/getvendorinvoicereceipt.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getvendorinvoicereceipt.js +69 -0
- package/dist/commonjs/models/operations/getvendorinvoicereceipt.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +2 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +2 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/listorsearchdepartmentcontacts.d.ts +121 -0
- package/dist/commonjs/models/operations/listorsearchdepartmentcontacts.d.ts.map +1 -0
- package/dist/commonjs/models/operations/listorsearchdepartmentcontacts.js +155 -0
- package/dist/commonjs/models/operations/listorsearchdepartmentcontacts.js.map +1 -0
- package/dist/commonjs/react-query/index.d.ts +2 -0
- package/dist/commonjs/react-query/index.d.ts.map +1 -1
- package/dist/commonjs/react-query/index.js +2 -0
- package/dist/commonjs/react-query/index.js.map +1 -1
- package/dist/commonjs/react-query/organizationsListOrSearchDepartmentContacts.d.ts +103 -0
- package/dist/commonjs/react-query/organizationsListOrSearchDepartmentContacts.d.ts.map +1 -0
- package/dist/commonjs/react-query/organizationsListOrSearchDepartmentContacts.js +184 -0
- package/dist/commonjs/react-query/organizationsListOrSearchDepartmentContacts.js.map +1 -0
- package/dist/commonjs/react-query/vendorsGetVendorInvoiceReceipt.d.ts +30 -0
- package/dist/commonjs/react-query/vendorsGetVendorInvoiceReceipt.d.ts.map +1 -0
- package/dist/commonjs/react-query/vendorsGetVendorInvoiceReceipt.js +96 -0
- package/dist/commonjs/react-query/vendorsGetVendorInvoiceReceipt.js.map +1 -0
- package/dist/commonjs/sdk/organizations.d.ts +14 -0
- package/dist/commonjs/sdk/organizations.d.ts.map +1 -1
- package/dist/commonjs/sdk/organizations.js +15 -0
- package/dist/commonjs/sdk/organizations.js.map +1 -1
- package/dist/commonjs/sdk/vendors.d.ts +7 -0
- package/dist/commonjs/sdk/vendors.d.ts.map +1 -1
- package/dist/commonjs/sdk/vendors.js +10 -0
- package/dist/commonjs/sdk/vendors.js.map +1 -1
- package/dist/esm/__tests__/organizations.test.js +42 -0
- package/dist/esm/__tests__/organizations.test.js.map +1 -1
- package/dist/esm/__tests__/vendors.test.js +16 -0
- package/dist/esm/__tests__/vendors.test.js.map +1 -1
- package/dist/esm/__tests__/zones.test.js +4 -19
- package/dist/esm/__tests__/zones.test.js.map +1 -1
- package/dist/esm/funcs/organizationsListOrSearchDepartmentContacts.d.ts +26 -0
- package/dist/esm/funcs/organizationsListOrSearchDepartmentContacts.d.ts.map +1 -0
- package/dist/esm/funcs/organizationsListOrSearchDepartmentContacts.js +132 -0
- package/dist/esm/funcs/organizationsListOrSearchDepartmentContacts.js.map +1 -0
- package/dist/esm/funcs/vendorsGetVendorInvoiceReceipt.d.ts +18 -0
- package/dist/esm/funcs/vendorsGetVendorInvoiceReceipt.d.ts.map +1 -0
- package/dist/esm/funcs/vendorsGetVendorInvoiceReceipt.js +89 -0
- package/dist/esm/funcs/vendorsGetVendorInvoiceReceipt.js.map +1 -0
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/lib/config.js.map +1 -1
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/mcp-server.js.map +1 -1
- package/dist/esm/mcp-server/server.d.ts.map +1 -1
- package/dist/esm/mcp-server/server.js +5 -1
- package/dist/esm/mcp-server/server.js.map +1 -1
- package/dist/esm/mcp-server/tools/organizationsListOrSearchDepartmentContacts.d.ts +8 -0
- package/dist/esm/mcp-server/tools/organizationsListOrSearchDepartmentContacts.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/organizationsListOrSearchDepartmentContacts.js +33 -0
- package/dist/esm/mcp-server/tools/organizationsListOrSearchDepartmentContacts.js.map +1 -0
- package/dist/esm/mcp-server/tools/vendorsGetVendorInvoiceReceipt.d.ts +8 -0
- package/dist/esm/mcp-server/tools/vendorsGetVendorInvoiceReceipt.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/vendorsGetVendorInvoiceReceipt.js +28 -0
- package/dist/esm/mcp-server/tools/vendorsGetVendorInvoiceReceipt.js.map +1 -0
- package/dist/esm/models/components/contact.d.ts +30 -4
- package/dist/esm/models/components/contact.d.ts.map +1 -1
- package/dist/esm/models/components/contact.js +32 -4
- package/dist/esm/models/components/contact.js.map +1 -1
- package/dist/esm/models/components/departmentmembership.d.ts +80 -0
- package/dist/esm/models/components/departmentmembership.d.ts.map +1 -0
- package/dist/esm/models/components/departmentmembership.js +81 -0
- package/dist/esm/models/components/departmentmembership.js.map +1 -0
- package/dist/esm/models/components/expand.d.ts +6 -0
- package/dist/esm/models/components/expand.d.ts.map +1 -1
- package/dist/esm/models/components/expand.js +2 -0
- package/dist/esm/models/components/expand.js.map +1 -1
- package/dist/esm/models/components/index.d.ts +2 -0
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +2 -0
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/components/usersummary.d.ts +34 -0
- package/dist/esm/models/components/usersummary.d.ts.map +1 -0
- package/dist/esm/models/components/usersummary.js +33 -0
- package/dist/esm/models/components/usersummary.js.map +1 -0
- package/dist/esm/models/operations/getvendorinvoicereceipt.d.ts +32 -0
- package/dist/esm/models/operations/getvendorinvoicereceipt.d.ts.map +1 -0
- package/dist/esm/models/operations/getvendorinvoicereceipt.js +31 -0
- package/dist/esm/models/operations/getvendorinvoicereceipt.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +2 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +2 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/listorsearchdepartmentcontacts.d.ts +121 -0
- package/dist/esm/models/operations/listorsearchdepartmentcontacts.d.ts.map +1 -0
- package/dist/esm/models/operations/listorsearchdepartmentcontacts.js +113 -0
- package/dist/esm/models/operations/listorsearchdepartmentcontacts.js.map +1 -0
- package/dist/esm/react-query/index.d.ts +2 -0
- package/dist/esm/react-query/index.d.ts.map +1 -1
- package/dist/esm/react-query/index.js +2 -0
- package/dist/esm/react-query/index.js.map +1 -1
- package/dist/esm/react-query/organizationsListOrSearchDepartmentContacts.d.ts +103 -0
- package/dist/esm/react-query/organizationsListOrSearchDepartmentContacts.d.ts.map +1 -0
- package/dist/esm/react-query/organizationsListOrSearchDepartmentContacts.js +171 -0
- package/dist/esm/react-query/organizationsListOrSearchDepartmentContacts.js.map +1 -0
- package/dist/esm/react-query/vendorsGetVendorInvoiceReceipt.d.ts +30 -0
- package/dist/esm/react-query/vendorsGetVendorInvoiceReceipt.d.ts.map +1 -0
- package/dist/esm/react-query/vendorsGetVendorInvoiceReceipt.js +86 -0
- package/dist/esm/react-query/vendorsGetVendorInvoiceReceipt.js.map +1 -0
- package/dist/esm/sdk/organizations.d.ts +14 -0
- package/dist/esm/sdk/organizations.d.ts.map +1 -1
- package/dist/esm/sdk/organizations.js +15 -0
- package/dist/esm/sdk/organizations.js.map +1 -1
- package/dist/esm/sdk/vendors.d.ts +7 -0
- package/dist/esm/sdk/vendors.d.ts.map +1 -1
- package/dist/esm/sdk/vendors.js +10 -0
- package/dist/esm/sdk/vendors.js.map +1 -1
- package/examples/package-lock.json +1 -1
- package/examples/vendorsCreateVendorRegistration.example.ts +2 -0
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/__tests__/organizations.test.ts +45 -0
- package/src/__tests__/vendors.test.ts +21 -0
- package/src/__tests__/zones.test.ts +4 -19
- package/src/funcs/organizationsListOrSearchDepartmentContacts.ts +270 -0
- package/src/funcs/vendorsGetVendorInvoiceReceipt.ts +179 -0
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +5 -1
- package/src/mcp-server/tools/organizationsListOrSearchDepartmentContacts.ts +44 -0
- package/src/mcp-server/tools/vendorsGetVendorInvoiceReceipt.ts +38 -0
- package/src/models/components/contact.ts +74 -8
- package/src/models/components/departmentmembership.ts +201 -0
- package/src/models/components/expand.ts +2 -0
- package/src/models/components/index.ts +2 -0
- package/src/models/components/usersummary.ts +69 -0
- package/src/models/operations/getvendorinvoicereceipt.ts +71 -0
- package/src/models/operations/index.ts +2 -0
- package/src/models/operations/listorsearchdepartmentcontacts.ts +280 -0
- package/src/react-query/index.ts +2 -0
- package/src/react-query/organizationsListOrSearchDepartmentContacts.ts +386 -0
- package/src/react-query/vendorsGetVendorInvoiceReceipt.ts +167 -0
- package/src/sdk/organizations.ts +28 -0
- package/src/sdk/vendors.ts +18 -0
|
@@ -25,11 +25,19 @@ import {
|
|
|
25
25
|
SystemSummary$Outbound,
|
|
26
26
|
SystemSummary$outboundSchema,
|
|
27
27
|
} from "./systemsummary.js";
|
|
28
|
+
import {
|
|
29
|
+
UserSummary,
|
|
30
|
+
UserSummary$inboundSchema,
|
|
31
|
+
UserSummary$Outbound,
|
|
32
|
+
UserSummary$outboundSchema,
|
|
33
|
+
} from "./usersummary.js";
|
|
28
34
|
|
|
29
35
|
export type ContactFacility = FacilitySummary | number;
|
|
30
36
|
|
|
31
37
|
export type System = SystemSummary | number;
|
|
32
38
|
|
|
39
|
+
export type ContactUser = UserSummary | number;
|
|
40
|
+
|
|
33
41
|
export const Status = {
|
|
34
42
|
Active: "Active",
|
|
35
43
|
Inactive: "Inactive",
|
|
@@ -43,8 +51,10 @@ export type ContactDepartment = DepartmentSummary | number;
|
|
|
43
51
|
* This object represents a contact at the system or facility level. Use it to verify vendors, create appointments, or check in visitors.
|
|
44
52
|
*/
|
|
45
53
|
export type Contact = {
|
|
46
|
-
|
|
47
|
-
|
|
54
|
+
id?: number | undefined;
|
|
55
|
+
facility?: FacilitySummary | number | null | undefined;
|
|
56
|
+
system?: SystemSummary | number | null | undefined;
|
|
57
|
+
user?: UserSummary | number | null | undefined;
|
|
48
58
|
status: Status;
|
|
49
59
|
position?: string | null | undefined;
|
|
50
60
|
department?: DepartmentSummary | number | null | undefined;
|
|
@@ -137,6 +147,50 @@ export function systemFromJSON(
|
|
|
137
147
|
);
|
|
138
148
|
}
|
|
139
149
|
|
|
150
|
+
/** @internal */
|
|
151
|
+
export const ContactUser$inboundSchema: z.ZodType<
|
|
152
|
+
ContactUser,
|
|
153
|
+
z.ZodTypeDef,
|
|
154
|
+
unknown
|
|
155
|
+
> = z.union([UserSummary$inboundSchema, z.number().int()]);
|
|
156
|
+
|
|
157
|
+
/** @internal */
|
|
158
|
+
export type ContactUser$Outbound = UserSummary$Outbound | number;
|
|
159
|
+
|
|
160
|
+
/** @internal */
|
|
161
|
+
export const ContactUser$outboundSchema: z.ZodType<
|
|
162
|
+
ContactUser$Outbound,
|
|
163
|
+
z.ZodTypeDef,
|
|
164
|
+
ContactUser
|
|
165
|
+
> = z.union([UserSummary$outboundSchema, z.number().int()]);
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* @internal
|
|
169
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
170
|
+
*/
|
|
171
|
+
export namespace ContactUser$ {
|
|
172
|
+
/** @deprecated use `ContactUser$inboundSchema` instead. */
|
|
173
|
+
export const inboundSchema = ContactUser$inboundSchema;
|
|
174
|
+
/** @deprecated use `ContactUser$outboundSchema` instead. */
|
|
175
|
+
export const outboundSchema = ContactUser$outboundSchema;
|
|
176
|
+
/** @deprecated use `ContactUser$Outbound` instead. */
|
|
177
|
+
export type Outbound = ContactUser$Outbound;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export function contactUserToJSON(contactUser: ContactUser): string {
|
|
181
|
+
return JSON.stringify(ContactUser$outboundSchema.parse(contactUser));
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
export function contactUserFromJSON(
|
|
185
|
+
jsonString: string,
|
|
186
|
+
): SafeParseResult<ContactUser, SDKValidationError> {
|
|
187
|
+
return safeParse(
|
|
188
|
+
jsonString,
|
|
189
|
+
(x) => ContactUser$inboundSchema.parse(JSON.parse(x)),
|
|
190
|
+
`Failed to parse 'ContactUser' from JSON`,
|
|
191
|
+
);
|
|
192
|
+
}
|
|
193
|
+
|
|
140
194
|
/** @internal */
|
|
141
195
|
export const Status$inboundSchema: z.ZodNativeEnum<typeof Status> = z
|
|
142
196
|
.nativeEnum(Status);
|
|
@@ -207,9 +261,14 @@ export function contactDepartmentFromJSON(
|
|
|
207
261
|
/** @internal */
|
|
208
262
|
export const Contact$inboundSchema: z.ZodType<Contact, z.ZodTypeDef, unknown> =
|
|
209
263
|
z.object({
|
|
210
|
-
|
|
264
|
+
id: z.number().int().optional(),
|
|
265
|
+
facility: z.nullable(
|
|
266
|
+
z.union([FacilitySummary$inboundSchema, z.number().int()]),
|
|
267
|
+
).optional(),
|
|
268
|
+
system: z.nullable(z.union([SystemSummary$inboundSchema, z.number().int()]))
|
|
269
|
+
.optional(),
|
|
270
|
+
user: z.nullable(z.union([UserSummary$inboundSchema, z.number().int()]))
|
|
211
271
|
.optional(),
|
|
212
|
-
system: z.union([SystemSummary$inboundSchema, z.number().int()]).optional(),
|
|
213
272
|
status: Status$inboundSchema,
|
|
214
273
|
position: z.nullable(z.string()).optional(),
|
|
215
274
|
department: z.nullable(
|
|
@@ -219,8 +278,10 @@ export const Contact$inboundSchema: z.ZodType<Contact, z.ZodTypeDef, unknown> =
|
|
|
219
278
|
|
|
220
279
|
/** @internal */
|
|
221
280
|
export type Contact$Outbound = {
|
|
222
|
-
|
|
223
|
-
|
|
281
|
+
id?: number | undefined;
|
|
282
|
+
facility?: FacilitySummary$Outbound | number | null | undefined;
|
|
283
|
+
system?: SystemSummary$Outbound | number | null | undefined;
|
|
284
|
+
user?: UserSummary$Outbound | number | null | undefined;
|
|
224
285
|
status: string;
|
|
225
286
|
position?: string | null | undefined;
|
|
226
287
|
department?: DepartmentSummary$Outbound | number | null | undefined;
|
|
@@ -232,9 +293,14 @@ export const Contact$outboundSchema: z.ZodType<
|
|
|
232
293
|
z.ZodTypeDef,
|
|
233
294
|
Contact
|
|
234
295
|
> = z.object({
|
|
235
|
-
|
|
296
|
+
id: z.number().int().optional(),
|
|
297
|
+
facility: z.nullable(
|
|
298
|
+
z.union([FacilitySummary$outboundSchema, z.number().int()]),
|
|
299
|
+
).optional(),
|
|
300
|
+
system: z.nullable(z.union([SystemSummary$outboundSchema, z.number().int()]))
|
|
301
|
+
.optional(),
|
|
302
|
+
user: z.nullable(z.union([UserSummary$outboundSchema, z.number().int()]))
|
|
236
303
|
.optional(),
|
|
237
|
-
system: z.union([SystemSummary$outboundSchema, z.number().int()]).optional(),
|
|
238
304
|
status: Status$outboundSchema,
|
|
239
305
|
position: z.nullable(z.string()).optional(),
|
|
240
306
|
department: z.nullable(
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import {
|
|
10
|
+
Contact,
|
|
11
|
+
Contact$inboundSchema,
|
|
12
|
+
Contact$Outbound,
|
|
13
|
+
Contact$outboundSchema,
|
|
14
|
+
} from "./contact.js";
|
|
15
|
+
import {
|
|
16
|
+
DepartmentSummary,
|
|
17
|
+
DepartmentSummary$inboundSchema,
|
|
18
|
+
DepartmentSummary$Outbound,
|
|
19
|
+
DepartmentSummary$outboundSchema,
|
|
20
|
+
} from "./departmentsummary.js";
|
|
21
|
+
|
|
22
|
+
export type DepartmentMembershipDepartment = DepartmentSummary | number;
|
|
23
|
+
|
|
24
|
+
export type DepartmentMembershipContact = Contact | number;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* A simplified representation of a DepartmentMembership, typically used in list views.
|
|
28
|
+
*/
|
|
29
|
+
export type DepartmentMembership = {
|
|
30
|
+
id: number;
|
|
31
|
+
department?: DepartmentSummary | number | null | undefined;
|
|
32
|
+
contact?: Contact | number | null | undefined;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
/** @internal */
|
|
36
|
+
export const DepartmentMembershipDepartment$inboundSchema: z.ZodType<
|
|
37
|
+
DepartmentMembershipDepartment,
|
|
38
|
+
z.ZodTypeDef,
|
|
39
|
+
unknown
|
|
40
|
+
> = z.union([DepartmentSummary$inboundSchema, z.number().int()]);
|
|
41
|
+
|
|
42
|
+
/** @internal */
|
|
43
|
+
export type DepartmentMembershipDepartment$Outbound =
|
|
44
|
+
| DepartmentSummary$Outbound
|
|
45
|
+
| number;
|
|
46
|
+
|
|
47
|
+
/** @internal */
|
|
48
|
+
export const DepartmentMembershipDepartment$outboundSchema: z.ZodType<
|
|
49
|
+
DepartmentMembershipDepartment$Outbound,
|
|
50
|
+
z.ZodTypeDef,
|
|
51
|
+
DepartmentMembershipDepartment
|
|
52
|
+
> = z.union([DepartmentSummary$outboundSchema, z.number().int()]);
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* @internal
|
|
56
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
57
|
+
*/
|
|
58
|
+
export namespace DepartmentMembershipDepartment$ {
|
|
59
|
+
/** @deprecated use `DepartmentMembershipDepartment$inboundSchema` instead. */
|
|
60
|
+
export const inboundSchema = DepartmentMembershipDepartment$inboundSchema;
|
|
61
|
+
/** @deprecated use `DepartmentMembershipDepartment$outboundSchema` instead. */
|
|
62
|
+
export const outboundSchema = DepartmentMembershipDepartment$outboundSchema;
|
|
63
|
+
/** @deprecated use `DepartmentMembershipDepartment$Outbound` instead. */
|
|
64
|
+
export type Outbound = DepartmentMembershipDepartment$Outbound;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function departmentMembershipDepartmentToJSON(
|
|
68
|
+
departmentMembershipDepartment: DepartmentMembershipDepartment,
|
|
69
|
+
): string {
|
|
70
|
+
return JSON.stringify(
|
|
71
|
+
DepartmentMembershipDepartment$outboundSchema.parse(
|
|
72
|
+
departmentMembershipDepartment,
|
|
73
|
+
),
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function departmentMembershipDepartmentFromJSON(
|
|
78
|
+
jsonString: string,
|
|
79
|
+
): SafeParseResult<DepartmentMembershipDepartment, SDKValidationError> {
|
|
80
|
+
return safeParse(
|
|
81
|
+
jsonString,
|
|
82
|
+
(x) => DepartmentMembershipDepartment$inboundSchema.parse(JSON.parse(x)),
|
|
83
|
+
`Failed to parse 'DepartmentMembershipDepartment' from JSON`,
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/** @internal */
|
|
88
|
+
export const DepartmentMembershipContact$inboundSchema: z.ZodType<
|
|
89
|
+
DepartmentMembershipContact,
|
|
90
|
+
z.ZodTypeDef,
|
|
91
|
+
unknown
|
|
92
|
+
> = z.union([Contact$inboundSchema, z.number().int()]);
|
|
93
|
+
|
|
94
|
+
/** @internal */
|
|
95
|
+
export type DepartmentMembershipContact$Outbound = Contact$Outbound | number;
|
|
96
|
+
|
|
97
|
+
/** @internal */
|
|
98
|
+
export const DepartmentMembershipContact$outboundSchema: z.ZodType<
|
|
99
|
+
DepartmentMembershipContact$Outbound,
|
|
100
|
+
z.ZodTypeDef,
|
|
101
|
+
DepartmentMembershipContact
|
|
102
|
+
> = z.union([Contact$outboundSchema, z.number().int()]);
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* @internal
|
|
106
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
107
|
+
*/
|
|
108
|
+
export namespace DepartmentMembershipContact$ {
|
|
109
|
+
/** @deprecated use `DepartmentMembershipContact$inboundSchema` instead. */
|
|
110
|
+
export const inboundSchema = DepartmentMembershipContact$inboundSchema;
|
|
111
|
+
/** @deprecated use `DepartmentMembershipContact$outboundSchema` instead. */
|
|
112
|
+
export const outboundSchema = DepartmentMembershipContact$outboundSchema;
|
|
113
|
+
/** @deprecated use `DepartmentMembershipContact$Outbound` instead. */
|
|
114
|
+
export type Outbound = DepartmentMembershipContact$Outbound;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export function departmentMembershipContactToJSON(
|
|
118
|
+
departmentMembershipContact: DepartmentMembershipContact,
|
|
119
|
+
): string {
|
|
120
|
+
return JSON.stringify(
|
|
121
|
+
DepartmentMembershipContact$outboundSchema.parse(
|
|
122
|
+
departmentMembershipContact,
|
|
123
|
+
),
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export function departmentMembershipContactFromJSON(
|
|
128
|
+
jsonString: string,
|
|
129
|
+
): SafeParseResult<DepartmentMembershipContact, SDKValidationError> {
|
|
130
|
+
return safeParse(
|
|
131
|
+
jsonString,
|
|
132
|
+
(x) => DepartmentMembershipContact$inboundSchema.parse(JSON.parse(x)),
|
|
133
|
+
`Failed to parse 'DepartmentMembershipContact' from JSON`,
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/** @internal */
|
|
138
|
+
export const DepartmentMembership$inboundSchema: z.ZodType<
|
|
139
|
+
DepartmentMembership,
|
|
140
|
+
z.ZodTypeDef,
|
|
141
|
+
unknown
|
|
142
|
+
> = z.object({
|
|
143
|
+
id: z.number().int(),
|
|
144
|
+
department: z.nullable(
|
|
145
|
+
z.union([DepartmentSummary$inboundSchema, z.number().int()]),
|
|
146
|
+
).optional(),
|
|
147
|
+
contact: z.nullable(z.union([Contact$inboundSchema, z.number().int()]))
|
|
148
|
+
.optional(),
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
/** @internal */
|
|
152
|
+
export type DepartmentMembership$Outbound = {
|
|
153
|
+
id: number;
|
|
154
|
+
department?: DepartmentSummary$Outbound | number | null | undefined;
|
|
155
|
+
contact?: Contact$Outbound | number | null | undefined;
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
/** @internal */
|
|
159
|
+
export const DepartmentMembership$outboundSchema: z.ZodType<
|
|
160
|
+
DepartmentMembership$Outbound,
|
|
161
|
+
z.ZodTypeDef,
|
|
162
|
+
DepartmentMembership
|
|
163
|
+
> = z.object({
|
|
164
|
+
id: z.number().int(),
|
|
165
|
+
department: z.nullable(
|
|
166
|
+
z.union([DepartmentSummary$outboundSchema, z.number().int()]),
|
|
167
|
+
).optional(),
|
|
168
|
+
contact: z.nullable(z.union([Contact$outboundSchema, z.number().int()]))
|
|
169
|
+
.optional(),
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* @internal
|
|
174
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
175
|
+
*/
|
|
176
|
+
export namespace DepartmentMembership$ {
|
|
177
|
+
/** @deprecated use `DepartmentMembership$inboundSchema` instead. */
|
|
178
|
+
export const inboundSchema = DepartmentMembership$inboundSchema;
|
|
179
|
+
/** @deprecated use `DepartmentMembership$outboundSchema` instead. */
|
|
180
|
+
export const outboundSchema = DepartmentMembership$outboundSchema;
|
|
181
|
+
/** @deprecated use `DepartmentMembership$Outbound` instead. */
|
|
182
|
+
export type Outbound = DepartmentMembership$Outbound;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export function departmentMembershipToJSON(
|
|
186
|
+
departmentMembership: DepartmentMembership,
|
|
187
|
+
): string {
|
|
188
|
+
return JSON.stringify(
|
|
189
|
+
DepartmentMembership$outboundSchema.parse(departmentMembership),
|
|
190
|
+
);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export function departmentMembershipFromJSON(
|
|
194
|
+
jsonString: string,
|
|
195
|
+
): SafeParseResult<DepartmentMembership, SDKValidationError> {
|
|
196
|
+
return safeParse(
|
|
197
|
+
jsonString,
|
|
198
|
+
(x) => DepartmentMembership$inboundSchema.parse(JSON.parse(x)),
|
|
199
|
+
`Failed to parse 'DepartmentMembership' from JSON`,
|
|
200
|
+
);
|
|
201
|
+
}
|
|
@@ -84,6 +84,8 @@ export const Expand = {
|
|
|
84
84
|
ZoneRules: "zone.rules",
|
|
85
85
|
SystemFacilities: "system.facilities",
|
|
86
86
|
SubscriptionExpeditedOffer: "subscription.expedited_offer",
|
|
87
|
+
DepartmentMembershipContact: "department_membership.contact",
|
|
88
|
+
DepartmentMembershipDepartment: "department_membership.department",
|
|
87
89
|
} as const;
|
|
88
90
|
/**
|
|
89
91
|
* An expansion scope that is valid for the object being requested.
|
|
@@ -14,6 +14,7 @@ export * from "./credentialstatus.js";
|
|
|
14
14
|
export * from "./credit.js";
|
|
15
15
|
export * from "./datarequest.js";
|
|
16
16
|
export * from "./department.js";
|
|
17
|
+
export * from "./departmentmembership.js";
|
|
17
18
|
export * from "./departmentsummary.js";
|
|
18
19
|
export * from "./desc.js";
|
|
19
20
|
export * from "./expand.js";
|
|
@@ -46,6 +47,7 @@ export * from "./supportarticle.js";
|
|
|
46
47
|
export * from "./systemsummary.js";
|
|
47
48
|
export * from "./user.js";
|
|
48
49
|
export * from "./userlocation.js";
|
|
50
|
+
export * from "./usersummary.js";
|
|
49
51
|
export * from "./vendor.js";
|
|
50
52
|
export * from "./vendoradditionalfacilityfields.js";
|
|
51
53
|
export * from "./vendorcredentialdatarequest.js";
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* A simplified representation of a User, typically used in list views.
|
|
12
|
+
*/
|
|
13
|
+
export type UserSummary = {
|
|
14
|
+
id: number;
|
|
15
|
+
name: string;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/** @internal */
|
|
19
|
+
export const UserSummary$inboundSchema: z.ZodType<
|
|
20
|
+
UserSummary,
|
|
21
|
+
z.ZodTypeDef,
|
|
22
|
+
unknown
|
|
23
|
+
> = z.object({
|
|
24
|
+
id: z.number().int(),
|
|
25
|
+
name: z.string(),
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
/** @internal */
|
|
29
|
+
export type UserSummary$Outbound = {
|
|
30
|
+
id: number;
|
|
31
|
+
name: string;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/** @internal */
|
|
35
|
+
export const UserSummary$outboundSchema: z.ZodType<
|
|
36
|
+
UserSummary$Outbound,
|
|
37
|
+
z.ZodTypeDef,
|
|
38
|
+
UserSummary
|
|
39
|
+
> = z.object({
|
|
40
|
+
id: z.number().int(),
|
|
41
|
+
name: z.string(),
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* @internal
|
|
46
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
47
|
+
*/
|
|
48
|
+
export namespace UserSummary$ {
|
|
49
|
+
/** @deprecated use `UserSummary$inboundSchema` instead. */
|
|
50
|
+
export const inboundSchema = UserSummary$inboundSchema;
|
|
51
|
+
/** @deprecated use `UserSummary$outboundSchema` instead. */
|
|
52
|
+
export const outboundSchema = UserSummary$outboundSchema;
|
|
53
|
+
/** @deprecated use `UserSummary$Outbound` instead. */
|
|
54
|
+
export type Outbound = UserSummary$Outbound;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function userSummaryToJSON(userSummary: UserSummary): string {
|
|
58
|
+
return JSON.stringify(UserSummary$outboundSchema.parse(userSummary));
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function userSummaryFromJSON(
|
|
62
|
+
jsonString: string,
|
|
63
|
+
): SafeParseResult<UserSummary, SDKValidationError> {
|
|
64
|
+
return safeParse(
|
|
65
|
+
jsonString,
|
|
66
|
+
(x) => UserSummary$inboundSchema.parse(JSON.parse(x)),
|
|
67
|
+
`Failed to parse 'UserSummary' from JSON`,
|
|
68
|
+
);
|
|
69
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
export type GetVendorInvoiceReceiptRequest = {
|
|
11
|
+
/**
|
|
12
|
+
* The identifier of the object
|
|
13
|
+
*/
|
|
14
|
+
id: number;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/** @internal */
|
|
18
|
+
export const GetVendorInvoiceReceiptRequest$inboundSchema: z.ZodType<
|
|
19
|
+
GetVendorInvoiceReceiptRequest,
|
|
20
|
+
z.ZodTypeDef,
|
|
21
|
+
unknown
|
|
22
|
+
> = z.object({
|
|
23
|
+
id: z.number().int(),
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
/** @internal */
|
|
27
|
+
export type GetVendorInvoiceReceiptRequest$Outbound = {
|
|
28
|
+
id: number;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/** @internal */
|
|
32
|
+
export const GetVendorInvoiceReceiptRequest$outboundSchema: z.ZodType<
|
|
33
|
+
GetVendorInvoiceReceiptRequest$Outbound,
|
|
34
|
+
z.ZodTypeDef,
|
|
35
|
+
GetVendorInvoiceReceiptRequest
|
|
36
|
+
> = z.object({
|
|
37
|
+
id: z.number().int(),
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* @internal
|
|
42
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
43
|
+
*/
|
|
44
|
+
export namespace GetVendorInvoiceReceiptRequest$ {
|
|
45
|
+
/** @deprecated use `GetVendorInvoiceReceiptRequest$inboundSchema` instead. */
|
|
46
|
+
export const inboundSchema = GetVendorInvoiceReceiptRequest$inboundSchema;
|
|
47
|
+
/** @deprecated use `GetVendorInvoiceReceiptRequest$outboundSchema` instead. */
|
|
48
|
+
export const outboundSchema = GetVendorInvoiceReceiptRequest$outboundSchema;
|
|
49
|
+
/** @deprecated use `GetVendorInvoiceReceiptRequest$Outbound` instead. */
|
|
50
|
+
export type Outbound = GetVendorInvoiceReceiptRequest$Outbound;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function getVendorInvoiceReceiptRequestToJSON(
|
|
54
|
+
getVendorInvoiceReceiptRequest: GetVendorInvoiceReceiptRequest,
|
|
55
|
+
): string {
|
|
56
|
+
return JSON.stringify(
|
|
57
|
+
GetVendorInvoiceReceiptRequest$outboundSchema.parse(
|
|
58
|
+
getVendorInvoiceReceiptRequest,
|
|
59
|
+
),
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function getVendorInvoiceReceiptRequestFromJSON(
|
|
64
|
+
jsonString: string,
|
|
65
|
+
): SafeParseResult<GetVendorInvoiceReceiptRequest, SDKValidationError> {
|
|
66
|
+
return safeParse(
|
|
67
|
+
jsonString,
|
|
68
|
+
(x) => GetVendorInvoiceReceiptRequest$inboundSchema.parse(JSON.parse(x)),
|
|
69
|
+
`Failed to parse 'GetVendorInvoiceReceiptRequest' from JSON`,
|
|
70
|
+
);
|
|
71
|
+
}
|
|
@@ -28,11 +28,13 @@ export * from "./getuserbyid.js";
|
|
|
28
28
|
export * from "./getvendorcredentialdetails.js";
|
|
29
29
|
export * from "./getvendorcredentialfile.js";
|
|
30
30
|
export * from "./getvendorinvoicedetails.js";
|
|
31
|
+
export * from "./getvendorinvoicereceipt.js";
|
|
31
32
|
export * from "./getvendorlegalname.js";
|
|
32
33
|
export * from "./getvendorsdetails.js";
|
|
33
34
|
export * from "./getwebhookendpoint.js";
|
|
34
35
|
export * from "./listallwebhookendpoints.js";
|
|
35
36
|
export * from "./listorsearchcompanies.js";
|
|
37
|
+
export * from "./listorsearchdepartmentcontacts.js";
|
|
36
38
|
export * from "./listorsearchdepartments.js";
|
|
37
39
|
export * from "./listorsearchfacilities.js";
|
|
38
40
|
export * from "./listorsearchsecurityzones.js";
|