@greensecurity/javascript-sdk 0.16.0 → 0.17.0
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/REACT_QUERY.md +68 -30
- package/README.md +43 -0
- package/bin/mcp-server.js +694 -51
- package/bin/mcp-server.js.map +28 -19
- package/funcs/organizationsListOrSearchFacilities.d.ts +4 -1
- package/funcs/organizationsListOrSearchFacilities.d.ts.map +1 -1
- package/funcs/organizationsListOrSearchFacilities.js +46 -9
- package/funcs/organizationsListOrSearchFacilities.js.map +1 -1
- package/funcs/supportArticlesGetSupportArticle.js +1 -1
- package/funcs/supportArticlesGetSupportArticle.js.map +1 -1
- package/funcs/supportArticlesListOrSearchSupportArticles.d.ts +4 -1
- package/funcs/supportArticlesListOrSearchSupportArticles.d.ts.map +1 -1
- package/funcs/supportArticlesListOrSearchSupportArticles.js +42 -7
- package/funcs/supportArticlesListOrSearchSupportArticles.js.map +1 -1
- package/funcs/vendorsExpediteTimeRemaining.d.ts +17 -0
- package/funcs/vendorsExpediteTimeRemaining.d.ts.map +1 -0
- package/funcs/vendorsExpediteTimeRemaining.js +120 -0
- package/funcs/vendorsExpediteTimeRemaining.js.map +1 -0
- package/funcs/vendorsListVendorInvoices.d.ts +24 -0
- package/funcs/vendorsListVendorInvoices.d.ts.map +1 -0
- package/funcs/vendorsListVendorInvoices.js +166 -0
- package/funcs/vendorsListVendorInvoices.js.map +1 -0
- package/funcs/vendorsListVendorJobTitles.d.ts +4 -1
- package/funcs/vendorsListVendorJobTitles.d.ts.map +1 -1
- package/funcs/vendorsListVendorJobTitles.js +39 -6
- package/funcs/vendorsListVendorJobTitles.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.d.ts.map +1 -1
- package/mcp-server/server.js +5 -1
- package/mcp-server/server.js.map +1 -1
- package/mcp-server/tools/organizationsListOrSearchFacilities.js +1 -1
- package/mcp-server/tools/organizationsListOrSearchFacilities.js.map +1 -1
- package/mcp-server/tools/supportArticlesListOrSearchSupportArticles.js +1 -1
- package/mcp-server/tools/supportArticlesListOrSearchSupportArticles.js.map +1 -1
- package/mcp-server/tools/vendorsExpediteTimeRemaining.d.ts +8 -0
- package/mcp-server/tools/vendorsExpediteTimeRemaining.d.ts.map +1 -0
- package/mcp-server/tools/vendorsExpediteTimeRemaining.js +64 -0
- package/mcp-server/tools/vendorsExpediteTimeRemaining.js.map +1 -0
- package/mcp-server/tools/vendorsListVendorInvoices.d.ts +8 -0
- package/mcp-server/tools/vendorsListVendorInvoices.d.ts.map +1 -0
- package/mcp-server/tools/vendorsListVendorInvoices.js +68 -0
- package/mcp-server/tools/vendorsListVendorInvoices.js.map +1 -0
- package/mcp-server/tools/vendorsListVendorJobTitles.js +1 -1
- package/mcp-server/tools/vendorsListVendorJobTitles.js.map +1 -1
- package/models/components/expand.d.ts +3 -0
- package/models/components/expand.d.ts.map +1 -1
- package/models/components/expand.js +1 -0
- package/models/components/expand.js.map +1 -1
- package/models/components/index.d.ts +2 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +2 -0
- package/models/components/index.js.map +1 -1
- package/models/components/invoice.d.ts +43 -0
- package/models/components/invoice.d.ts.map +1 -0
- package/models/components/invoice.js +91 -0
- package/models/components/invoice.js.map +1 -0
- package/models/components/invoiceitem.d.ts +40 -0
- package/models/components/invoiceitem.d.ts.map +1 -0
- package/models/components/invoiceitem.js +94 -0
- package/models/components/invoiceitem.js.map +1 -0
- package/models/operations/expeditetimeremaining.d.ts +60 -0
- package/models/operations/expeditetimeremaining.d.ts.map +1 -0
- package/models/operations/expeditetimeremaining.js +113 -0
- package/models/operations/expeditetimeremaining.js.map +1 -0
- package/models/operations/index.d.ts +2 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +2 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/listorsearchfacilities.d.ts +25 -0
- package/models/operations/listorsearchfacilities.d.ts.map +1 -1
- package/models/operations/listorsearchfacilities.js +36 -1
- package/models/operations/listorsearchfacilities.js.map +1 -1
- package/models/operations/listorsearchsupportarticles.d.ts +25 -0
- package/models/operations/listorsearchsupportarticles.d.ts.map +1 -1
- package/models/operations/listorsearchsupportarticles.js +36 -1
- package/models/operations/listorsearchsupportarticles.js.map +1 -1
- package/models/operations/listvendorinvoices.d.ts +116 -0
- package/models/operations/listvendorinvoices.d.ts.map +1 -0
- package/models/operations/listvendorinvoices.js +155 -0
- package/models/operations/listvendorinvoices.js.map +1 -0
- package/models/operations/listvendorjobtitles.d.ts +25 -0
- package/models/operations/listvendorjobtitles.d.ts.map +1 -1
- package/models/operations/listvendorjobtitles.js +36 -1
- package/models/operations/listvendorjobtitles.js.map +1 -1
- package/package.json +1 -1
- package/react-query/index.d.ts +2 -0
- package/react-query/index.d.ts.map +1 -1
- package/react-query/index.js +2 -0
- package/react-query/index.js.map +1 -1
- package/react-query/organizationsListOrSearchFacilities.d.ts +54 -3
- package/react-query/organizationsListOrSearchFacilities.d.ts.map +1 -1
- package/react-query/organizationsListOrSearchFacilities.js +89 -0
- package/react-query/organizationsListOrSearchFacilities.js.map +1 -1
- package/react-query/supportArticlesListOrSearchSupportArticles.d.ts +28 -3
- package/react-query/supportArticlesListOrSearchSupportArticles.d.ts.map +1 -1
- package/react-query/supportArticlesListOrSearchSupportArticles.js +58 -0
- package/react-query/supportArticlesListOrSearchSupportArticles.js.map +1 -1
- package/react-query/vendorsExpediteTimeRemaining.d.ts +30 -0
- package/react-query/vendorsExpediteTimeRemaining.d.ts.map +1 -0
- package/react-query/vendorsExpediteTimeRemaining.js +96 -0
- package/react-query/vendorsExpediteTimeRemaining.js.map +1 -0
- package/react-query/vendorsListVendorInvoices.d.ts +96 -0
- package/react-query/vendorsListVendorInvoices.d.ts.map +1 -0
- package/react-query/vendorsListVendorInvoices.js +178 -0
- package/react-query/vendorsListVendorInvoices.js.map +1 -0
- package/react-query/vendorsListVendorJobTitles.d.ts +28 -3
- package/react-query/vendorsListVendorJobTitles.d.ts.map +1 -1
- package/react-query/vendorsListVendorJobTitles.js +59 -0
- package/react-query/vendorsListVendorJobTitles.js.map +1 -1
- package/sdk/organizations.d.ts +4 -1
- package/sdk/organizations.d.ts.map +1 -1
- package/sdk/organizations.js +2 -1
- package/sdk/organizations.js.map +1 -1
- package/sdk/supportarticles.d.ts +4 -1
- package/sdk/supportarticles.d.ts.map +1 -1
- package/sdk/supportarticles.js +2 -1
- package/sdk/supportarticles.js.map +1 -1
- package/sdk/vendors.d.ts +24 -1
- package/sdk/vendors.d.ts.map +1 -1
- package/sdk/vendors.js +26 -1
- package/sdk/vendors.js.map +1 -1
- package/src/__tests__/supportarticles.test.ts +2 -1
- package/src/__tests__/vendors.test.ts +58 -1
- package/src/funcs/organizationsListOrSearchFacilities.ts +116 -42
- package/src/funcs/supportArticlesGetSupportArticle.ts +1 -1
- package/src/funcs/supportArticlesListOrSearchSupportArticles.ts +100 -31
- package/src/funcs/vendorsExpediteTimeRemaining.ts +171 -0
- package/src/funcs/vendorsListVendorInvoices.ts +255 -0
- package/src/funcs/vendorsListVendorJobTitles.ts +101 -33
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +5 -1
- package/src/mcp-server/tools/organizationsListOrSearchFacilities.ts +1 -1
- package/src/mcp-server/tools/supportArticlesListOrSearchSupportArticles.ts +1 -1
- package/src/mcp-server/tools/vendorsExpediteTimeRemaining.ts +37 -0
- package/src/mcp-server/tools/vendorsListVendorInvoices.ts +41 -0
- package/src/mcp-server/tools/vendorsListVendorJobTitles.ts +1 -1
- package/src/models/components/expand.ts +1 -0
- package/src/models/components/index.ts +2 -0
- package/src/models/components/invoice.ts +99 -0
- package/src/models/components/invoiceitem.ts +98 -0
- package/src/models/operations/expeditetimeremaining.ts +152 -0
- package/src/models/operations/index.ts +2 -0
- package/src/models/operations/listorsearchfacilities.ts +72 -0
- package/src/models/operations/listorsearchsupportarticles.ts +75 -0
- package/src/models/operations/listvendorinvoices.ts +252 -0
- package/src/models/operations/listvendorjobtitles.ts +68 -0
- package/src/react-query/index.ts +2 -0
- package/src/react-query/organizationsListOrSearchFacilities.ts +179 -1
- package/src/react-query/supportArticlesListOrSearchSupportArticles.ts +149 -1
- package/src/react-query/vendorsExpediteTimeRemaining.ts +165 -0
- package/src/react-query/vendorsListVendorInvoices.ts +364 -0
- package/src/react-query/vendorsListVendorJobTitles.ts +149 -1
- package/src/sdk/organizations.ts +5 -2
- package/src/sdk/supportarticles.ts +8 -2
- package/src/sdk/vendors.ts +47 -2
|
@@ -0,0 +1,252 @@
|
|
|
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 ListVendorInvoicesRequest = {
|
|
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
|
+
* Either the ID of the vendor rep or the keyword "me" to represent the current vendor.
|
|
35
|
+
*/
|
|
36
|
+
vendorIdOrMe: string;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* The request was successful, and the server has returned the requested resource in the response body.
|
|
41
|
+
*/
|
|
42
|
+
export type ListVendorInvoicesResponseBody = {
|
|
43
|
+
items: Array<components.Invoice>;
|
|
44
|
+
/**
|
|
45
|
+
* Pagination information for a pageable list
|
|
46
|
+
*/
|
|
47
|
+
pager: components.Pager;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export type ListVendorInvoicesResponse = {
|
|
51
|
+
result: ListVendorInvoicesResponseBody;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/** @internal */
|
|
55
|
+
export const ListVendorInvoicesRequest$inboundSchema: z.ZodType<
|
|
56
|
+
ListVendorInvoicesRequest,
|
|
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
|
+
vendor_id_or_me: z.string(),
|
|
66
|
+
}).transform((v) => {
|
|
67
|
+
return remap$(v, {
|
|
68
|
+
"items_per_page": "itemsPerPage",
|
|
69
|
+
"vendor_id_or_me": "vendorIdOrMe",
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
/** @internal */
|
|
74
|
+
export type ListVendorInvoicesRequest$Outbound = {
|
|
75
|
+
sort?: string | null | undefined;
|
|
76
|
+
desc?: components.Desc$Outbound | undefined;
|
|
77
|
+
page?: number | undefined;
|
|
78
|
+
items_per_page?: number | undefined;
|
|
79
|
+
expand?: Array<string> | undefined;
|
|
80
|
+
vendor_id_or_me: string;
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
/** @internal */
|
|
84
|
+
export const ListVendorInvoicesRequest$outboundSchema: z.ZodType<
|
|
85
|
+
ListVendorInvoicesRequest$Outbound,
|
|
86
|
+
z.ZodTypeDef,
|
|
87
|
+
ListVendorInvoicesRequest
|
|
88
|
+
> = z.object({
|
|
89
|
+
sort: z.nullable(z.string()).optional(),
|
|
90
|
+
desc: components.Desc$outboundSchema.optional(),
|
|
91
|
+
page: z.number().int().optional(),
|
|
92
|
+
itemsPerPage: z.number().int().optional(),
|
|
93
|
+
expand: z.array(components.Expand$outboundSchema).optional(),
|
|
94
|
+
vendorIdOrMe: z.string(),
|
|
95
|
+
}).transform((v) => {
|
|
96
|
+
return remap$(v, {
|
|
97
|
+
itemsPerPage: "items_per_page",
|
|
98
|
+
vendorIdOrMe: "vendor_id_or_me",
|
|
99
|
+
});
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* @internal
|
|
104
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
105
|
+
*/
|
|
106
|
+
export namespace ListVendorInvoicesRequest$ {
|
|
107
|
+
/** @deprecated use `ListVendorInvoicesRequest$inboundSchema` instead. */
|
|
108
|
+
export const inboundSchema = ListVendorInvoicesRequest$inboundSchema;
|
|
109
|
+
/** @deprecated use `ListVendorInvoicesRequest$outboundSchema` instead. */
|
|
110
|
+
export const outboundSchema = ListVendorInvoicesRequest$outboundSchema;
|
|
111
|
+
/** @deprecated use `ListVendorInvoicesRequest$Outbound` instead. */
|
|
112
|
+
export type Outbound = ListVendorInvoicesRequest$Outbound;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export function listVendorInvoicesRequestToJSON(
|
|
116
|
+
listVendorInvoicesRequest: ListVendorInvoicesRequest,
|
|
117
|
+
): string {
|
|
118
|
+
return JSON.stringify(
|
|
119
|
+
ListVendorInvoicesRequest$outboundSchema.parse(listVendorInvoicesRequest),
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export function listVendorInvoicesRequestFromJSON(
|
|
124
|
+
jsonString: string,
|
|
125
|
+
): SafeParseResult<ListVendorInvoicesRequest, SDKValidationError> {
|
|
126
|
+
return safeParse(
|
|
127
|
+
jsonString,
|
|
128
|
+
(x) => ListVendorInvoicesRequest$inboundSchema.parse(JSON.parse(x)),
|
|
129
|
+
`Failed to parse 'ListVendorInvoicesRequest' from JSON`,
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/** @internal */
|
|
134
|
+
export const ListVendorInvoicesResponseBody$inboundSchema: z.ZodType<
|
|
135
|
+
ListVendorInvoicesResponseBody,
|
|
136
|
+
z.ZodTypeDef,
|
|
137
|
+
unknown
|
|
138
|
+
> = z.object({
|
|
139
|
+
items: z.array(components.Invoice$inboundSchema),
|
|
140
|
+
pager: components.Pager$inboundSchema,
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
/** @internal */
|
|
144
|
+
export type ListVendorInvoicesResponseBody$Outbound = {
|
|
145
|
+
items: Array<components.Invoice$Outbound>;
|
|
146
|
+
pager: components.Pager$Outbound;
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
/** @internal */
|
|
150
|
+
export const ListVendorInvoicesResponseBody$outboundSchema: z.ZodType<
|
|
151
|
+
ListVendorInvoicesResponseBody$Outbound,
|
|
152
|
+
z.ZodTypeDef,
|
|
153
|
+
ListVendorInvoicesResponseBody
|
|
154
|
+
> = z.object({
|
|
155
|
+
items: z.array(components.Invoice$outboundSchema),
|
|
156
|
+
pager: components.Pager$outboundSchema,
|
|
157
|
+
});
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* @internal
|
|
161
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
162
|
+
*/
|
|
163
|
+
export namespace ListVendorInvoicesResponseBody$ {
|
|
164
|
+
/** @deprecated use `ListVendorInvoicesResponseBody$inboundSchema` instead. */
|
|
165
|
+
export const inboundSchema = ListVendorInvoicesResponseBody$inboundSchema;
|
|
166
|
+
/** @deprecated use `ListVendorInvoicesResponseBody$outboundSchema` instead. */
|
|
167
|
+
export const outboundSchema = ListVendorInvoicesResponseBody$outboundSchema;
|
|
168
|
+
/** @deprecated use `ListVendorInvoicesResponseBody$Outbound` instead. */
|
|
169
|
+
export type Outbound = ListVendorInvoicesResponseBody$Outbound;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
export function listVendorInvoicesResponseBodyToJSON(
|
|
173
|
+
listVendorInvoicesResponseBody: ListVendorInvoicesResponseBody,
|
|
174
|
+
): string {
|
|
175
|
+
return JSON.stringify(
|
|
176
|
+
ListVendorInvoicesResponseBody$outboundSchema.parse(
|
|
177
|
+
listVendorInvoicesResponseBody,
|
|
178
|
+
),
|
|
179
|
+
);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export function listVendorInvoicesResponseBodyFromJSON(
|
|
183
|
+
jsonString: string,
|
|
184
|
+
): SafeParseResult<ListVendorInvoicesResponseBody, SDKValidationError> {
|
|
185
|
+
return safeParse(
|
|
186
|
+
jsonString,
|
|
187
|
+
(x) => ListVendorInvoicesResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
188
|
+
`Failed to parse 'ListVendorInvoicesResponseBody' from JSON`,
|
|
189
|
+
);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/** @internal */
|
|
193
|
+
export const ListVendorInvoicesResponse$inboundSchema: z.ZodType<
|
|
194
|
+
ListVendorInvoicesResponse,
|
|
195
|
+
z.ZodTypeDef,
|
|
196
|
+
unknown
|
|
197
|
+
> = z.object({
|
|
198
|
+
Result: z.lazy(() => ListVendorInvoicesResponseBody$inboundSchema),
|
|
199
|
+
}).transform((v) => {
|
|
200
|
+
return remap$(v, {
|
|
201
|
+
"Result": "result",
|
|
202
|
+
});
|
|
203
|
+
});
|
|
204
|
+
|
|
205
|
+
/** @internal */
|
|
206
|
+
export type ListVendorInvoicesResponse$Outbound = {
|
|
207
|
+
Result: ListVendorInvoicesResponseBody$Outbound;
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
/** @internal */
|
|
211
|
+
export const ListVendorInvoicesResponse$outboundSchema: z.ZodType<
|
|
212
|
+
ListVendorInvoicesResponse$Outbound,
|
|
213
|
+
z.ZodTypeDef,
|
|
214
|
+
ListVendorInvoicesResponse
|
|
215
|
+
> = z.object({
|
|
216
|
+
result: z.lazy(() => ListVendorInvoicesResponseBody$outboundSchema),
|
|
217
|
+
}).transform((v) => {
|
|
218
|
+
return remap$(v, {
|
|
219
|
+
result: "Result",
|
|
220
|
+
});
|
|
221
|
+
});
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* @internal
|
|
225
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
226
|
+
*/
|
|
227
|
+
export namespace ListVendorInvoicesResponse$ {
|
|
228
|
+
/** @deprecated use `ListVendorInvoicesResponse$inboundSchema` instead. */
|
|
229
|
+
export const inboundSchema = ListVendorInvoicesResponse$inboundSchema;
|
|
230
|
+
/** @deprecated use `ListVendorInvoicesResponse$outboundSchema` instead. */
|
|
231
|
+
export const outboundSchema = ListVendorInvoicesResponse$outboundSchema;
|
|
232
|
+
/** @deprecated use `ListVendorInvoicesResponse$Outbound` instead. */
|
|
233
|
+
export type Outbound = ListVendorInvoicesResponse$Outbound;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
export function listVendorInvoicesResponseToJSON(
|
|
237
|
+
listVendorInvoicesResponse: ListVendorInvoicesResponse,
|
|
238
|
+
): string {
|
|
239
|
+
return JSON.stringify(
|
|
240
|
+
ListVendorInvoicesResponse$outboundSchema.parse(listVendorInvoicesResponse),
|
|
241
|
+
);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
export function listVendorInvoicesResponseFromJSON(
|
|
245
|
+
jsonString: string,
|
|
246
|
+
): SafeParseResult<ListVendorInvoicesResponse, SDKValidationError> {
|
|
247
|
+
return safeParse(
|
|
248
|
+
jsonString,
|
|
249
|
+
(x) => ListVendorInvoicesResponse$inboundSchema.parse(JSON.parse(x)),
|
|
250
|
+
`Failed to parse 'ListVendorInvoicesResponse' from JSON`,
|
|
251
|
+
);
|
|
252
|
+
}
|
|
@@ -43,6 +43,10 @@ export type ListVendorJobTitlesListVendorJobTitlesOk = {
|
|
|
43
43
|
items: Array<components.VendorJobTitle>;
|
|
44
44
|
};
|
|
45
45
|
|
|
46
|
+
export type ListVendorJobTitlesResponse = {
|
|
47
|
+
result: ListVendorJobTitlesListVendorJobTitlesOk;
|
|
48
|
+
};
|
|
49
|
+
|
|
46
50
|
/** @internal */
|
|
47
51
|
export const ListVendorJobTitlesRequest$inboundSchema: z.ZodType<
|
|
48
52
|
ListVendorJobTitlesRequest,
|
|
@@ -186,3 +190,67 @@ export function listVendorJobTitlesListVendorJobTitlesOkFromJSON(
|
|
|
186
190
|
`Failed to parse 'ListVendorJobTitlesListVendorJobTitlesOk' from JSON`,
|
|
187
191
|
);
|
|
188
192
|
}
|
|
193
|
+
|
|
194
|
+
/** @internal */
|
|
195
|
+
export const ListVendorJobTitlesResponse$inboundSchema: z.ZodType<
|
|
196
|
+
ListVendorJobTitlesResponse,
|
|
197
|
+
z.ZodTypeDef,
|
|
198
|
+
unknown
|
|
199
|
+
> = z.object({
|
|
200
|
+
Result: z.lazy(() => ListVendorJobTitlesListVendorJobTitlesOk$inboundSchema),
|
|
201
|
+
}).transform((v) => {
|
|
202
|
+
return remap$(v, {
|
|
203
|
+
"Result": "result",
|
|
204
|
+
});
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
/** @internal */
|
|
208
|
+
export type ListVendorJobTitlesResponse$Outbound = {
|
|
209
|
+
Result: ListVendorJobTitlesListVendorJobTitlesOk$Outbound;
|
|
210
|
+
};
|
|
211
|
+
|
|
212
|
+
/** @internal */
|
|
213
|
+
export const ListVendorJobTitlesResponse$outboundSchema: z.ZodType<
|
|
214
|
+
ListVendorJobTitlesResponse$Outbound,
|
|
215
|
+
z.ZodTypeDef,
|
|
216
|
+
ListVendorJobTitlesResponse
|
|
217
|
+
> = z.object({
|
|
218
|
+
result: z.lazy(() => ListVendorJobTitlesListVendorJobTitlesOk$outboundSchema),
|
|
219
|
+
}).transform((v) => {
|
|
220
|
+
return remap$(v, {
|
|
221
|
+
result: "Result",
|
|
222
|
+
});
|
|
223
|
+
});
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* @internal
|
|
227
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
228
|
+
*/
|
|
229
|
+
export namespace ListVendorJobTitlesResponse$ {
|
|
230
|
+
/** @deprecated use `ListVendorJobTitlesResponse$inboundSchema` instead. */
|
|
231
|
+
export const inboundSchema = ListVendorJobTitlesResponse$inboundSchema;
|
|
232
|
+
/** @deprecated use `ListVendorJobTitlesResponse$outboundSchema` instead. */
|
|
233
|
+
export const outboundSchema = ListVendorJobTitlesResponse$outboundSchema;
|
|
234
|
+
/** @deprecated use `ListVendorJobTitlesResponse$Outbound` instead. */
|
|
235
|
+
export type Outbound = ListVendorJobTitlesResponse$Outbound;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
export function listVendorJobTitlesResponseToJSON(
|
|
239
|
+
listVendorJobTitlesResponse: ListVendorJobTitlesResponse,
|
|
240
|
+
): string {
|
|
241
|
+
return JSON.stringify(
|
|
242
|
+
ListVendorJobTitlesResponse$outboundSchema.parse(
|
|
243
|
+
listVendorJobTitlesResponse,
|
|
244
|
+
),
|
|
245
|
+
);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
export function listVendorJobTitlesResponseFromJSON(
|
|
249
|
+
jsonString: string,
|
|
250
|
+
): SafeParseResult<ListVendorJobTitlesResponse, SDKValidationError> {
|
|
251
|
+
return safeParse(
|
|
252
|
+
jsonString,
|
|
253
|
+
(x) => ListVendorJobTitlesResponse$inboundSchema.parse(JSON.parse(x)),
|
|
254
|
+
`Failed to parse 'ListVendorJobTitlesResponse' from JSON`,
|
|
255
|
+
);
|
|
256
|
+
}
|
package/src/react-query/index.ts
CHANGED
|
@@ -16,5 +16,7 @@ export * from "./usersMagiclink.js";
|
|
|
16
16
|
export * from "./usersPassword.js";
|
|
17
17
|
export * from "./usersPasswordResetRequest.js";
|
|
18
18
|
export * from "./vendorsCreateVendorRegistration.js";
|
|
19
|
+
export * from "./vendorsExpediteTimeRemaining.js";
|
|
19
20
|
export * from "./vendorsListVendorCredentials.js";
|
|
21
|
+
export * from "./vendorsListVendorInvoices.js";
|
|
20
22
|
export * from "./vendorsListVendorJobTitles.js";
|
|
@@ -3,12 +3,17 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
|
+
InfiniteData,
|
|
6
7
|
InvalidateQueryFilters,
|
|
7
8
|
QueryClient,
|
|
8
9
|
QueryFunctionContext,
|
|
9
10
|
QueryKey,
|
|
11
|
+
useInfiniteQuery,
|
|
12
|
+
UseInfiniteQueryResult,
|
|
10
13
|
useQuery,
|
|
11
14
|
UseQueryResult,
|
|
15
|
+
useSuspenseInfiniteQuery,
|
|
16
|
+
UseSuspenseInfiniteQueryResult,
|
|
12
17
|
useSuspenseQuery,
|
|
13
18
|
UseSuspenseQueryResult,
|
|
14
19
|
} from "@tanstack/react-query";
|
|
@@ -19,15 +24,28 @@ import { RequestOptions } from "../lib/sdks.js";
|
|
|
19
24
|
import * as components from "../models/components/index.js";
|
|
20
25
|
import * as operations from "../models/operations/index.js";
|
|
21
26
|
import { unwrapAsync } from "../types/fp.js";
|
|
27
|
+
import { PageIterator, unwrapResultIterator } from "../types/operations.js";
|
|
22
28
|
import { useGreenSecurityContext } from "./_context.js";
|
|
23
29
|
import {
|
|
30
|
+
InfiniteQueryHookOptions,
|
|
24
31
|
QueryHookOptions,
|
|
32
|
+
SuspenseInfiniteQueryHookOptions,
|
|
25
33
|
SuspenseQueryHookOptions,
|
|
26
34
|
TupleToPrefixes,
|
|
27
35
|
} from "./_types.js";
|
|
28
36
|
|
|
29
37
|
export type OrganizationsListOrSearchFacilitiesQueryData =
|
|
30
|
-
operations.
|
|
38
|
+
operations.ListOrSearchFacilitiesResponse;
|
|
39
|
+
|
|
40
|
+
export type OrganizationsListOrSearchFacilitiesInfiniteQueryData = PageIterator<
|
|
41
|
+
operations.ListOrSearchFacilitiesResponse,
|
|
42
|
+
{ page: number }
|
|
43
|
+
>;
|
|
44
|
+
|
|
45
|
+
export type OrganizationsListOrSearchFacilitiesPageParams = PageIterator<
|
|
46
|
+
operations.ListOrSearchFacilitiesResponse,
|
|
47
|
+
{ page: number }
|
|
48
|
+
>["~next"];
|
|
31
49
|
|
|
32
50
|
/**
|
|
33
51
|
* List or search facilities
|
|
@@ -99,6 +117,112 @@ export function useOrganizationsListOrSearchFacilitiesSuspense(
|
|
|
99
117
|
});
|
|
100
118
|
}
|
|
101
119
|
|
|
120
|
+
/**
|
|
121
|
+
* List or search facilities
|
|
122
|
+
*
|
|
123
|
+
* @remarks
|
|
124
|
+
* List or search facilities.
|
|
125
|
+
*
|
|
126
|
+
* Available `expand` scopes are:
|
|
127
|
+
*
|
|
128
|
+
* - facility.appointment_policy
|
|
129
|
+
* - facility.contacts
|
|
130
|
+
* - facility.vendor_counts
|
|
131
|
+
* - facility.flu_credential
|
|
132
|
+
* - facility.scrubs_policy
|
|
133
|
+
* - facility.system
|
|
134
|
+
* - facility.vendor_guest_policy
|
|
135
|
+
* - facility.vendor_policy
|
|
136
|
+
* - facility.visitor_policy
|
|
137
|
+
* - facility.workflow
|
|
138
|
+
*/
|
|
139
|
+
export function useOrganizationsListOrSearchFacilitiesInfinite(
|
|
140
|
+
request: operations.ListOrSearchFacilitiesRequest,
|
|
141
|
+
options?: InfiniteQueryHookOptions<
|
|
142
|
+
OrganizationsListOrSearchFacilitiesInfiniteQueryData
|
|
143
|
+
>,
|
|
144
|
+
): UseInfiniteQueryResult<
|
|
145
|
+
InfiniteData<
|
|
146
|
+
OrganizationsListOrSearchFacilitiesInfiniteQueryData,
|
|
147
|
+
OrganizationsListOrSearchFacilitiesPageParams
|
|
148
|
+
>,
|
|
149
|
+
Error
|
|
150
|
+
> {
|
|
151
|
+
const client = useGreenSecurityContext();
|
|
152
|
+
return useInfiniteQuery<
|
|
153
|
+
OrganizationsListOrSearchFacilitiesInfiniteQueryData,
|
|
154
|
+
Error,
|
|
155
|
+
InfiniteData<
|
|
156
|
+
OrganizationsListOrSearchFacilitiesInfiniteQueryData,
|
|
157
|
+
OrganizationsListOrSearchFacilitiesPageParams
|
|
158
|
+
>,
|
|
159
|
+
QueryKey,
|
|
160
|
+
OrganizationsListOrSearchFacilitiesPageParams
|
|
161
|
+
>({
|
|
162
|
+
...buildOrganizationsListOrSearchFacilitiesInfiniteQuery(
|
|
163
|
+
client,
|
|
164
|
+
request,
|
|
165
|
+
options,
|
|
166
|
+
),
|
|
167
|
+
initialPageParam: options?.initialPageParam,
|
|
168
|
+
getNextPageParam: (previousPage) => previousPage["~next"],
|
|
169
|
+
...options,
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* List or search facilities
|
|
175
|
+
*
|
|
176
|
+
* @remarks
|
|
177
|
+
* List or search facilities.
|
|
178
|
+
*
|
|
179
|
+
* Available `expand` scopes are:
|
|
180
|
+
*
|
|
181
|
+
* - facility.appointment_policy
|
|
182
|
+
* - facility.contacts
|
|
183
|
+
* - facility.vendor_counts
|
|
184
|
+
* - facility.flu_credential
|
|
185
|
+
* - facility.scrubs_policy
|
|
186
|
+
* - facility.system
|
|
187
|
+
* - facility.vendor_guest_policy
|
|
188
|
+
* - facility.vendor_policy
|
|
189
|
+
* - facility.visitor_policy
|
|
190
|
+
* - facility.workflow
|
|
191
|
+
*/
|
|
192
|
+
export function useOrganizationsListOrSearchFacilitiesInfiniteSuspense(
|
|
193
|
+
request: operations.ListOrSearchFacilitiesRequest,
|
|
194
|
+
options?: SuspenseInfiniteQueryHookOptions<
|
|
195
|
+
OrganizationsListOrSearchFacilitiesInfiniteQueryData
|
|
196
|
+
>,
|
|
197
|
+
): UseSuspenseInfiniteQueryResult<
|
|
198
|
+
InfiniteData<
|
|
199
|
+
OrganizationsListOrSearchFacilitiesInfiniteQueryData,
|
|
200
|
+
OrganizationsListOrSearchFacilitiesPageParams
|
|
201
|
+
>,
|
|
202
|
+
Error
|
|
203
|
+
> {
|
|
204
|
+
const client = useGreenSecurityContext();
|
|
205
|
+
return useSuspenseInfiniteQuery<
|
|
206
|
+
OrganizationsListOrSearchFacilitiesInfiniteQueryData,
|
|
207
|
+
Error,
|
|
208
|
+
InfiniteData<
|
|
209
|
+
OrganizationsListOrSearchFacilitiesInfiniteQueryData,
|
|
210
|
+
OrganizationsListOrSearchFacilitiesPageParams
|
|
211
|
+
>,
|
|
212
|
+
QueryKey,
|
|
213
|
+
OrganizationsListOrSearchFacilitiesPageParams
|
|
214
|
+
>({
|
|
215
|
+
...buildOrganizationsListOrSearchFacilitiesInfiniteQuery(
|
|
216
|
+
client,
|
|
217
|
+
request,
|
|
218
|
+
options,
|
|
219
|
+
),
|
|
220
|
+
initialPageParam: options?.initialPageParam,
|
|
221
|
+
getNextPageParam: (previousPage) => previousPage["~next"],
|
|
222
|
+
...options,
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
|
|
102
226
|
export function prefetchOrganizationsListOrSearchFacilities(
|
|
103
227
|
queryClient: QueryClient,
|
|
104
228
|
client$: GreenSecurityCore,
|
|
@@ -219,6 +343,60 @@ export function buildOrganizationsListOrSearchFacilitiesQuery(
|
|
|
219
343
|
};
|
|
220
344
|
}
|
|
221
345
|
|
|
346
|
+
export function buildOrganizationsListOrSearchFacilitiesInfiniteQuery(
|
|
347
|
+
client$: GreenSecurityCore,
|
|
348
|
+
request: operations.ListOrSearchFacilitiesRequest,
|
|
349
|
+
options?: RequestOptions,
|
|
350
|
+
): {
|
|
351
|
+
queryKey: QueryKey;
|
|
352
|
+
queryFn: (
|
|
353
|
+
context: QueryFunctionContext<
|
|
354
|
+
QueryKey,
|
|
355
|
+
OrganizationsListOrSearchFacilitiesPageParams
|
|
356
|
+
>,
|
|
357
|
+
) => Promise<OrganizationsListOrSearchFacilitiesInfiniteQueryData>;
|
|
358
|
+
} {
|
|
359
|
+
return {
|
|
360
|
+
queryKey: queryKeyOrganizationsListOrSearchFacilities({
|
|
361
|
+
sort: request.sort,
|
|
362
|
+
desc: request.desc,
|
|
363
|
+
page: request.page,
|
|
364
|
+
itemsPerPage: request.itemsPerPage,
|
|
365
|
+
expand: request.expand,
|
|
366
|
+
systemId: request.systemId,
|
|
367
|
+
nameLike: request.nameLike,
|
|
368
|
+
stateLike: request.stateLike,
|
|
369
|
+
activeStatus: request.activeStatus,
|
|
370
|
+
}),
|
|
371
|
+
queryFn: async function organizationsListOrSearchFacilitiesQuery(
|
|
372
|
+
ctx,
|
|
373
|
+
): Promise<OrganizationsListOrSearchFacilitiesInfiniteQueryData> {
|
|
374
|
+
const sig = combineSignals(ctx.signal, options?.fetchOptions?.signal);
|
|
375
|
+
const mergedOptions = {
|
|
376
|
+
...options,
|
|
377
|
+
fetchOptions: { ...options?.fetchOptions, signal: sig },
|
|
378
|
+
};
|
|
379
|
+
|
|
380
|
+
if (!ctx.pageParam) {
|
|
381
|
+
return unwrapResultIterator(organizationsListOrSearchFacilities(
|
|
382
|
+
client$,
|
|
383
|
+
request,
|
|
384
|
+
mergedOptions,
|
|
385
|
+
));
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
return unwrapResultIterator(organizationsListOrSearchFacilities(
|
|
389
|
+
client$,
|
|
390
|
+
{
|
|
391
|
+
...request,
|
|
392
|
+
page: ctx.pageParam.page,
|
|
393
|
+
},
|
|
394
|
+
mergedOptions,
|
|
395
|
+
));
|
|
396
|
+
},
|
|
397
|
+
};
|
|
398
|
+
}
|
|
399
|
+
|
|
222
400
|
export function queryKeyOrganizationsListOrSearchFacilities(
|
|
223
401
|
parameters: {
|
|
224
402
|
sort?: string | null | undefined;
|