@greensecurity/javascript-sdk 0.44.0-beta.34 → 0.44.0-beta.36
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 +3 -0
- package/dist/commonjs/__tests__/vendors.test.js +31 -0
- package/dist/commonjs/__tests__/vendors.test.js.map +1 -1
- package/dist/commonjs/__tests__/webhooks.test.js +1 -1
- package/dist/commonjs/__tests__/webhooks.test.js.map +1 -1
- package/dist/commonjs/__tests__/zones.test.js +4 -23
- package/dist/commonjs/__tests__/zones.test.js.map +1 -1
- package/dist/commonjs/funcs/vendorsGetNextUnansweredScreeningQuestion.js +4 -2
- package/dist/commonjs/funcs/vendorsGetNextUnansweredScreeningQuestion.js.map +1 -1
- package/dist/commonjs/funcs/vendorsGetVendorTargetFacilities.d.ts +21 -0
- package/dist/commonjs/funcs/vendorsGetVendorTargetFacilities.d.ts.map +1 -0
- package/dist/commonjs/funcs/vendorsGetVendorTargetFacilities.js +168 -0
- package/dist/commonjs/funcs/vendorsGetVendorTargetFacilities.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/models/components/expand.d.ts +1 -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/components/index.d.ts +1 -0
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +1 -0
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/components/vendortargetfacility.d.ts +37 -0
- package/dist/commonjs/models/components/vendortargetfacility.d.ts.map +1 -0
- package/dist/commonjs/models/components/vendortargetfacility.js +69 -0
- package/dist/commonjs/models/components/vendortargetfacility.js.map +1 -0
- package/dist/commonjs/models/operations/getnextunansweredscreeningquestion.d.ts +9 -0
- package/dist/commonjs/models/operations/getnextunansweredscreeningquestion.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getnextunansweredscreeningquestion.js +4 -0
- package/dist/commonjs/models/operations/getnextunansweredscreeningquestion.js.map +1 -1
- package/dist/commonjs/models/operations/getvendortargetfacilities.d.ts +86 -0
- package/dist/commonjs/models/operations/getvendortargetfacilities.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getvendortargetfacilities.js +108 -0
- package/dist/commonjs/models/operations/getvendortargetfacilities.js.map +1 -0
- 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/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/react-query/vendorsGetNextUnansweredScreeningQuestion.core.d.ts +1 -0
- package/dist/commonjs/react-query/vendorsGetNextUnansweredScreeningQuestion.core.d.ts.map +1 -1
- package/dist/commonjs/react-query/vendorsGetNextUnansweredScreeningQuestion.core.js +1 -1
- package/dist/commonjs/react-query/vendorsGetNextUnansweredScreeningQuestion.core.js.map +1 -1
- package/dist/commonjs/react-query/vendorsGetNextUnansweredScreeningQuestion.d.ts +2 -0
- package/dist/commonjs/react-query/vendorsGetNextUnansweredScreeningQuestion.d.ts.map +1 -1
- package/dist/commonjs/react-query/vendorsGetNextUnansweredScreeningQuestion.js.map +1 -1
- package/dist/commonjs/react-query/vendorsGetVendorTargetFacilities.core.d.ts +46 -0
- package/dist/commonjs/react-query/vendorsGetVendorTargetFacilities.core.d.ts.map +1 -0
- package/dist/commonjs/react-query/vendorsGetVendorTargetFacilities.core.js +103 -0
- package/dist/commonjs/react-query/vendorsGetVendorTargetFacilities.core.js.map +1 -0
- package/dist/commonjs/react-query/vendorsGetVendorTargetFacilities.d.ts +70 -0
- package/dist/commonjs/react-query/vendorsGetVendorTargetFacilities.d.ts.map +1 -0
- package/dist/commonjs/react-query/vendorsGetVendorTargetFacilities.js +104 -0
- package/dist/commonjs/react-query/vendorsGetVendorTargetFacilities.js.map +1 -0
- package/dist/commonjs/sdk/vendors.d.ts +9 -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__/vendors.test.js +31 -0
- package/dist/esm/__tests__/vendors.test.js.map +1 -1
- package/dist/esm/__tests__/webhooks.test.js +1 -1
- package/dist/esm/__tests__/webhooks.test.js.map +1 -1
- package/dist/esm/__tests__/zones.test.js +4 -23
- package/dist/esm/__tests__/zones.test.js.map +1 -1
- package/dist/esm/funcs/vendorsGetNextUnansweredScreeningQuestion.js +5 -3
- package/dist/esm/funcs/vendorsGetNextUnansweredScreeningQuestion.js.map +1 -1
- package/dist/esm/funcs/vendorsGetVendorTargetFacilities.d.ts +21 -0
- package/dist/esm/funcs/vendorsGetVendorTargetFacilities.d.ts.map +1 -0
- package/dist/esm/funcs/vendorsGetVendorTargetFacilities.js +132 -0
- package/dist/esm/funcs/vendorsGetVendorTargetFacilities.js.map +1 -0
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/models/components/expand.d.ts +1 -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/components/index.d.ts +1 -0
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +1 -0
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/components/vendortargetfacility.d.ts +37 -0
- package/dist/esm/models/components/vendortargetfacility.d.ts.map +1 -0
- package/dist/esm/models/components/vendortargetfacility.js +31 -0
- package/dist/esm/models/components/vendortargetfacility.js.map +1 -0
- package/dist/esm/models/operations/getnextunansweredscreeningquestion.d.ts +9 -0
- package/dist/esm/models/operations/getnextunansweredscreeningquestion.d.ts.map +1 -1
- package/dist/esm/models/operations/getnextunansweredscreeningquestion.js +4 -0
- package/dist/esm/models/operations/getnextunansweredscreeningquestion.js.map +1 -1
- package/dist/esm/models/operations/getvendortargetfacilities.d.ts +86 -0
- package/dist/esm/models/operations/getvendortargetfacilities.d.ts.map +1 -0
- package/dist/esm/models/operations/getvendortargetfacilities.js +69 -0
- package/dist/esm/models/operations/getvendortargetfacilities.js.map +1 -0
- 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/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/react-query/vendorsGetNextUnansweredScreeningQuestion.core.d.ts +1 -0
- package/dist/esm/react-query/vendorsGetNextUnansweredScreeningQuestion.core.d.ts.map +1 -1
- package/dist/esm/react-query/vendorsGetNextUnansweredScreeningQuestion.core.js +1 -1
- package/dist/esm/react-query/vendorsGetNextUnansweredScreeningQuestion.core.js.map +1 -1
- package/dist/esm/react-query/vendorsGetNextUnansweredScreeningQuestion.d.ts +2 -0
- package/dist/esm/react-query/vendorsGetNextUnansweredScreeningQuestion.d.ts.map +1 -1
- package/dist/esm/react-query/vendorsGetNextUnansweredScreeningQuestion.js.map +1 -1
- package/dist/esm/react-query/vendorsGetVendorTargetFacilities.core.d.ts +46 -0
- package/dist/esm/react-query/vendorsGetVendorTargetFacilities.core.d.ts.map +1 -0
- package/dist/esm/react-query/vendorsGetVendorTargetFacilities.core.js +95 -0
- package/dist/esm/react-query/vendorsGetVendorTargetFacilities.core.js.map +1 -0
- package/dist/esm/react-query/vendorsGetVendorTargetFacilities.d.ts +70 -0
- package/dist/esm/react-query/vendorsGetVendorTargetFacilities.d.ts.map +1 -0
- package/dist/esm/react-query/vendorsGetVendorTargetFacilities.js +89 -0
- package/dist/esm/react-query/vendorsGetVendorTargetFacilities.js.map +1 -0
- package/dist/esm/sdk/vendors.d.ts +9 -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/jsr.json +1 -1
- package/package.json +1 -1
- package/src/__tests__/vendors.test.ts +34 -0
- package/src/__tests__/webhooks.test.ts +1 -1
- package/src/__tests__/zones.test.ts +4 -23
- package/src/funcs/vendorsGetNextUnansweredScreeningQuestion.ts +9 -4
- package/src/funcs/vendorsGetVendorTargetFacilities.ts +265 -0
- package/src/lib/config.ts +2 -2
- package/src/models/components/expand.ts +1 -0
- package/src/models/components/index.ts +1 -0
- package/src/models/components/vendortargetfacility.ts +87 -0
- package/src/models/operations/getnextunansweredscreeningquestion.ts +13 -0
- package/src/models/operations/getvendortargetfacilities.ts +186 -0
- package/src/models/operations/index.ts +1 -0
- package/src/react-query/index.ts +1 -0
- package/src/react-query/vendorsGetNextUnansweredScreeningQuestion.core.ts +5 -2
- package/src/react-query/vendorsGetNextUnansweredScreeningQuestion.ts +8 -2
- package/src/react-query/vendorsGetVendorTargetFacilities.core.ts +218 -0
- package/src/react-query/vendorsGetVendorTargetFacilities.ts +281 -0
- package/src/sdk/vendors.ts +20 -0
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
QueryClient,
|
|
7
|
+
QueryFunctionContext,
|
|
8
|
+
QueryKey,
|
|
9
|
+
} from "@tanstack/react-query";
|
|
10
|
+
import { GreenSecurityCore } from "../core.js";
|
|
11
|
+
import { vendorsGetVendorTargetFacilities } from "../funcs/vendorsGetVendorTargetFacilities.js";
|
|
12
|
+
import { combineSignals } from "../lib/primitives.js";
|
|
13
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
14
|
+
import * as components from "../models/components/index.js";
|
|
15
|
+
import * as operations from "../models/operations/index.js";
|
|
16
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
17
|
+
import { PageIterator, unwrapResultIterator } from "../types/operations.js";
|
|
18
|
+
import { pageIteratorToJSON } from "./_types.js";
|
|
19
|
+
export type VendorsGetVendorTargetFacilitiesQueryData =
|
|
20
|
+
operations.GetVendorTargetFacilitiesResponse;
|
|
21
|
+
|
|
22
|
+
export type VendorsGetVendorTargetFacilitiesInfiniteQueryData = PageIterator<
|
|
23
|
+
operations.GetVendorTargetFacilitiesResponse,
|
|
24
|
+
{ page: number }
|
|
25
|
+
>;
|
|
26
|
+
|
|
27
|
+
export type VendorsGetVendorTargetFacilitiesPageParams = PageIterator<
|
|
28
|
+
operations.GetVendorTargetFacilitiesResponse,
|
|
29
|
+
{ page: number }
|
|
30
|
+
>["~next"];
|
|
31
|
+
|
|
32
|
+
export function prefetchVendorsGetVendorTargetFacilities(
|
|
33
|
+
queryClient: QueryClient,
|
|
34
|
+
client$: GreenSecurityCore,
|
|
35
|
+
request: operations.GetVendorTargetFacilitiesRequest,
|
|
36
|
+
options?: RequestOptions,
|
|
37
|
+
): Promise<void> {
|
|
38
|
+
return queryClient.prefetchQuery({
|
|
39
|
+
...buildVendorsGetVendorTargetFacilitiesQuery(
|
|
40
|
+
client$,
|
|
41
|
+
request,
|
|
42
|
+
options,
|
|
43
|
+
),
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function prefetchVendorsGetVendorTargetFacilitiesInfinite(
|
|
48
|
+
queryClient: QueryClient,
|
|
49
|
+
client$: GreenSecurityCore,
|
|
50
|
+
request: operations.GetVendorTargetFacilitiesRequest,
|
|
51
|
+
options?: RequestOptions,
|
|
52
|
+
): Promise<void> {
|
|
53
|
+
return queryClient.prefetchInfiniteQuery({
|
|
54
|
+
...buildVendorsGetVendorTargetFacilitiesInfiniteQuery(
|
|
55
|
+
client$,
|
|
56
|
+
request,
|
|
57
|
+
options,
|
|
58
|
+
),
|
|
59
|
+
initialPageParam: undefined as VendorsGetVendorTargetFacilitiesPageParams,
|
|
60
|
+
getNextPageParam: (
|
|
61
|
+
previousPage: VendorsGetVendorTargetFacilitiesInfiniteQueryData,
|
|
62
|
+
) => previousPage["~next"],
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function buildVendorsGetVendorTargetFacilitiesQuery(
|
|
67
|
+
client$: GreenSecurityCore,
|
|
68
|
+
request: operations.GetVendorTargetFacilitiesRequest,
|
|
69
|
+
options?: RequestOptions,
|
|
70
|
+
): {
|
|
71
|
+
queryKey: QueryKey;
|
|
72
|
+
queryFn: (
|
|
73
|
+
context: QueryFunctionContext,
|
|
74
|
+
) => Promise<VendorsGetVendorTargetFacilitiesQueryData>;
|
|
75
|
+
} {
|
|
76
|
+
return {
|
|
77
|
+
queryKey: queryKeyVendorsGetVendorTargetFacilities(request.vendorIdOrMe, {
|
|
78
|
+
facilityNameLike: request.facilityNameLike,
|
|
79
|
+
systemNameLike: request.systemNameLike,
|
|
80
|
+
searchLike: request.searchLike,
|
|
81
|
+
status: request.status,
|
|
82
|
+
page: request.page,
|
|
83
|
+
itemsPerPage: request.itemsPerPage,
|
|
84
|
+
sort: request.sort,
|
|
85
|
+
desc: request.desc,
|
|
86
|
+
expand: request.expand,
|
|
87
|
+
}),
|
|
88
|
+
queryFn: async function vendorsGetVendorTargetFacilitiesQueryFn(
|
|
89
|
+
ctx,
|
|
90
|
+
): Promise<VendorsGetVendorTargetFacilitiesQueryData> {
|
|
91
|
+
const sig = combineSignals(
|
|
92
|
+
ctx.signal,
|
|
93
|
+
options?.signal,
|
|
94
|
+
options?.fetchOptions?.signal,
|
|
95
|
+
);
|
|
96
|
+
const mergedOptions = {
|
|
97
|
+
...options?.fetchOptions,
|
|
98
|
+
...options,
|
|
99
|
+
signal: sig,
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
return unwrapAsync(vendorsGetVendorTargetFacilities(
|
|
103
|
+
client$,
|
|
104
|
+
request,
|
|
105
|
+
mergedOptions,
|
|
106
|
+
));
|
|
107
|
+
},
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export function buildVendorsGetVendorTargetFacilitiesInfiniteQuery(
|
|
112
|
+
client$: GreenSecurityCore,
|
|
113
|
+
request: operations.GetVendorTargetFacilitiesRequest,
|
|
114
|
+
options?: RequestOptions,
|
|
115
|
+
): {
|
|
116
|
+
queryKey: QueryKey;
|
|
117
|
+
queryFn: (
|
|
118
|
+
context: QueryFunctionContext<
|
|
119
|
+
QueryKey,
|
|
120
|
+
VendorsGetVendorTargetFacilitiesPageParams
|
|
121
|
+
>,
|
|
122
|
+
) => Promise<VendorsGetVendorTargetFacilitiesInfiniteQueryData>;
|
|
123
|
+
} {
|
|
124
|
+
return {
|
|
125
|
+
queryKey: queryKeyVendorsGetVendorTargetFacilitiesInfinite(
|
|
126
|
+
request.vendorIdOrMe,
|
|
127
|
+
{
|
|
128
|
+
facilityNameLike: request.facilityNameLike,
|
|
129
|
+
systemNameLike: request.systemNameLike,
|
|
130
|
+
searchLike: request.searchLike,
|
|
131
|
+
status: request.status,
|
|
132
|
+
page: request.page,
|
|
133
|
+
itemsPerPage: request.itemsPerPage,
|
|
134
|
+
sort: request.sort,
|
|
135
|
+
desc: request.desc,
|
|
136
|
+
expand: request.expand,
|
|
137
|
+
},
|
|
138
|
+
),
|
|
139
|
+
queryFn: async function vendorsGetVendorTargetFacilitiesQuery(
|
|
140
|
+
ctx,
|
|
141
|
+
): Promise<VendorsGetVendorTargetFacilitiesInfiniteQueryData> {
|
|
142
|
+
const sig = combineSignals(ctx.signal, options?.fetchOptions?.signal);
|
|
143
|
+
const mergedOptions = {
|
|
144
|
+
...options,
|
|
145
|
+
fetchOptions: { ...options?.fetchOptions, signal: sig },
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
if (!ctx.pageParam) {
|
|
149
|
+
const pageResult = await unwrapResultIterator(
|
|
150
|
+
vendorsGetVendorTargetFacilities(
|
|
151
|
+
client$,
|
|
152
|
+
request,
|
|
153
|
+
mergedOptions,
|
|
154
|
+
),
|
|
155
|
+
);
|
|
156
|
+
return pageIteratorToJSON(pageResult);
|
|
157
|
+
}
|
|
158
|
+
const pageResult = await unwrapResultIterator(
|
|
159
|
+
vendorsGetVendorTargetFacilities(
|
|
160
|
+
client$,
|
|
161
|
+
{
|
|
162
|
+
...request,
|
|
163
|
+
page: ctx.pageParam.page,
|
|
164
|
+
},
|
|
165
|
+
mergedOptions,
|
|
166
|
+
),
|
|
167
|
+
);
|
|
168
|
+
return pageIteratorToJSON(pageResult);
|
|
169
|
+
},
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export function queryKeyVendorsGetVendorTargetFacilities(
|
|
174
|
+
vendorIdOrMe: string,
|
|
175
|
+
parameters: {
|
|
176
|
+
facilityNameLike?: string | undefined;
|
|
177
|
+
systemNameLike?: string | undefined;
|
|
178
|
+
searchLike?: string | undefined;
|
|
179
|
+
status?: operations.GetVendorTargetFacilitiesQueryParamStatus | undefined;
|
|
180
|
+
page?: number | undefined;
|
|
181
|
+
itemsPerPage?: number | undefined;
|
|
182
|
+
sort?: operations.GetVendorTargetFacilitiesQueryParamSort | undefined;
|
|
183
|
+
desc?: boolean | undefined;
|
|
184
|
+
expand?: Array<components.Expand> | undefined;
|
|
185
|
+
},
|
|
186
|
+
): QueryKey {
|
|
187
|
+
return [
|
|
188
|
+
"@greensecurity/javascript-sdk",
|
|
189
|
+
"vendors",
|
|
190
|
+
"getVendorTargetFacilities",
|
|
191
|
+
vendorIdOrMe,
|
|
192
|
+
parameters,
|
|
193
|
+
];
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export function queryKeyVendorsGetVendorTargetFacilitiesInfinite(
|
|
197
|
+
vendorIdOrMe: string,
|
|
198
|
+
parameters: {
|
|
199
|
+
facilityNameLike?: string | undefined;
|
|
200
|
+
systemNameLike?: string | undefined;
|
|
201
|
+
searchLike?: string | undefined;
|
|
202
|
+
status?: operations.GetVendorTargetFacilitiesQueryParamStatus | undefined;
|
|
203
|
+
page?: number | undefined;
|
|
204
|
+
itemsPerPage?: number | undefined;
|
|
205
|
+
sort?: operations.GetVendorTargetFacilitiesQueryParamSort | undefined;
|
|
206
|
+
desc?: boolean | undefined;
|
|
207
|
+
expand?: Array<components.Expand> | undefined;
|
|
208
|
+
},
|
|
209
|
+
): QueryKey {
|
|
210
|
+
return [
|
|
211
|
+
"@greensecurity/javascript-sdk",
|
|
212
|
+
"vendors",
|
|
213
|
+
"getVendorTargetFacilities",
|
|
214
|
+
"infinite",
|
|
215
|
+
vendorIdOrMe,
|
|
216
|
+
parameters,
|
|
217
|
+
];
|
|
218
|
+
}
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
InfiniteData,
|
|
7
|
+
InvalidateQueryFilters,
|
|
8
|
+
QueryClient,
|
|
9
|
+
QueryKey,
|
|
10
|
+
useInfiniteQuery,
|
|
11
|
+
UseInfiniteQueryResult,
|
|
12
|
+
useQuery,
|
|
13
|
+
UseQueryResult,
|
|
14
|
+
useSuspenseInfiniteQuery,
|
|
15
|
+
UseSuspenseInfiniteQueryResult,
|
|
16
|
+
useSuspenseQuery,
|
|
17
|
+
UseSuspenseQueryResult,
|
|
18
|
+
} from "@tanstack/react-query";
|
|
19
|
+
import * as components from "../models/components/index.js";
|
|
20
|
+
import { GreenSecurityError } from "../models/errors/greensecurityerror.js";
|
|
21
|
+
import {
|
|
22
|
+
ConnectionError,
|
|
23
|
+
InvalidRequestError,
|
|
24
|
+
RequestAbortedError,
|
|
25
|
+
RequestTimeoutError,
|
|
26
|
+
UnexpectedClientError,
|
|
27
|
+
} from "../models/errors/httpclienterrors.js";
|
|
28
|
+
import * as errors from "../models/errors/index.js";
|
|
29
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
30
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
31
|
+
import * as operations from "../models/operations/index.js";
|
|
32
|
+
import { useGreenSecurityContext } from "./_context.js";
|
|
33
|
+
import {
|
|
34
|
+
InfiniteQueryHookOptions,
|
|
35
|
+
QueryHookOptions,
|
|
36
|
+
SuspenseInfiniteQueryHookOptions,
|
|
37
|
+
SuspenseQueryHookOptions,
|
|
38
|
+
TupleToPrefixes,
|
|
39
|
+
} from "./_types.js";
|
|
40
|
+
import {
|
|
41
|
+
buildVendorsGetVendorTargetFacilitiesInfiniteQuery,
|
|
42
|
+
buildVendorsGetVendorTargetFacilitiesQuery,
|
|
43
|
+
prefetchVendorsGetVendorTargetFacilities,
|
|
44
|
+
prefetchVendorsGetVendorTargetFacilitiesInfinite,
|
|
45
|
+
queryKeyVendorsGetVendorTargetFacilities,
|
|
46
|
+
queryKeyVendorsGetVendorTargetFacilitiesInfinite,
|
|
47
|
+
VendorsGetVendorTargetFacilitiesInfiniteQueryData,
|
|
48
|
+
VendorsGetVendorTargetFacilitiesPageParams,
|
|
49
|
+
VendorsGetVendorTargetFacilitiesQueryData,
|
|
50
|
+
} from "./vendorsGetVendorTargetFacilities.core.js";
|
|
51
|
+
export {
|
|
52
|
+
buildVendorsGetVendorTargetFacilitiesInfiniteQuery,
|
|
53
|
+
buildVendorsGetVendorTargetFacilitiesQuery,
|
|
54
|
+
prefetchVendorsGetVendorTargetFacilities,
|
|
55
|
+
prefetchVendorsGetVendorTargetFacilitiesInfinite,
|
|
56
|
+
queryKeyVendorsGetVendorTargetFacilities,
|
|
57
|
+
queryKeyVendorsGetVendorTargetFacilitiesInfinite,
|
|
58
|
+
type VendorsGetVendorTargetFacilitiesInfiniteQueryData,
|
|
59
|
+
type VendorsGetVendorTargetFacilitiesPageParams,
|
|
60
|
+
type VendorsGetVendorTargetFacilitiesQueryData,
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export type VendorsGetVendorTargetFacilitiesQueryError =
|
|
64
|
+
| errors.ApiErrorResponse
|
|
65
|
+
| GreenSecurityError
|
|
66
|
+
| ResponseValidationError
|
|
67
|
+
| ConnectionError
|
|
68
|
+
| RequestAbortedError
|
|
69
|
+
| RequestTimeoutError
|
|
70
|
+
| InvalidRequestError
|
|
71
|
+
| UnexpectedClientError
|
|
72
|
+
| SDKValidationError;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* List a vendor's target facilities
|
|
76
|
+
*
|
|
77
|
+
* @remarks
|
|
78
|
+
* Returns a paginated list of target facility rows for the specified vendor, including per-row screening question status.
|
|
79
|
+
*/
|
|
80
|
+
export function useVendorsGetVendorTargetFacilities(
|
|
81
|
+
request: operations.GetVendorTargetFacilitiesRequest,
|
|
82
|
+
options?: QueryHookOptions<
|
|
83
|
+
VendorsGetVendorTargetFacilitiesQueryData,
|
|
84
|
+
VendorsGetVendorTargetFacilitiesQueryError
|
|
85
|
+
>,
|
|
86
|
+
): UseQueryResult<
|
|
87
|
+
VendorsGetVendorTargetFacilitiesQueryData,
|
|
88
|
+
VendorsGetVendorTargetFacilitiesQueryError
|
|
89
|
+
> {
|
|
90
|
+
const client = useGreenSecurityContext();
|
|
91
|
+
return useQuery({
|
|
92
|
+
...buildVendorsGetVendorTargetFacilitiesQuery(
|
|
93
|
+
client,
|
|
94
|
+
request,
|
|
95
|
+
options,
|
|
96
|
+
),
|
|
97
|
+
...options,
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* List a vendor's target facilities
|
|
103
|
+
*
|
|
104
|
+
* @remarks
|
|
105
|
+
* Returns a paginated list of target facility rows for the specified vendor, including per-row screening question status.
|
|
106
|
+
*/
|
|
107
|
+
export function useVendorsGetVendorTargetFacilitiesSuspense(
|
|
108
|
+
request: operations.GetVendorTargetFacilitiesRequest,
|
|
109
|
+
options?: SuspenseQueryHookOptions<
|
|
110
|
+
VendorsGetVendorTargetFacilitiesQueryData,
|
|
111
|
+
VendorsGetVendorTargetFacilitiesQueryError
|
|
112
|
+
>,
|
|
113
|
+
): UseSuspenseQueryResult<
|
|
114
|
+
VendorsGetVendorTargetFacilitiesQueryData,
|
|
115
|
+
VendorsGetVendorTargetFacilitiesQueryError
|
|
116
|
+
> {
|
|
117
|
+
const client = useGreenSecurityContext();
|
|
118
|
+
return useSuspenseQuery({
|
|
119
|
+
...buildVendorsGetVendorTargetFacilitiesQuery(
|
|
120
|
+
client,
|
|
121
|
+
request,
|
|
122
|
+
options,
|
|
123
|
+
),
|
|
124
|
+
...options,
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* List a vendor's target facilities
|
|
130
|
+
*
|
|
131
|
+
* @remarks
|
|
132
|
+
* Returns a paginated list of target facility rows for the specified vendor, including per-row screening question status.
|
|
133
|
+
*/
|
|
134
|
+
export function useVendorsGetVendorTargetFacilitiesInfinite(
|
|
135
|
+
request: operations.GetVendorTargetFacilitiesRequest,
|
|
136
|
+
options?: InfiniteQueryHookOptions<
|
|
137
|
+
VendorsGetVendorTargetFacilitiesInfiniteQueryData,
|
|
138
|
+
VendorsGetVendorTargetFacilitiesQueryError
|
|
139
|
+
>,
|
|
140
|
+
): UseInfiniteQueryResult<
|
|
141
|
+
InfiniteData<
|
|
142
|
+
VendorsGetVendorTargetFacilitiesInfiniteQueryData,
|
|
143
|
+
VendorsGetVendorTargetFacilitiesPageParams
|
|
144
|
+
>,
|
|
145
|
+
VendorsGetVendorTargetFacilitiesQueryError
|
|
146
|
+
> {
|
|
147
|
+
const client = useGreenSecurityContext();
|
|
148
|
+
return useInfiniteQuery<
|
|
149
|
+
VendorsGetVendorTargetFacilitiesInfiniteQueryData,
|
|
150
|
+
VendorsGetVendorTargetFacilitiesQueryError,
|
|
151
|
+
InfiniteData<
|
|
152
|
+
VendorsGetVendorTargetFacilitiesInfiniteQueryData,
|
|
153
|
+
VendorsGetVendorTargetFacilitiesPageParams
|
|
154
|
+
>,
|
|
155
|
+
QueryKey,
|
|
156
|
+
VendorsGetVendorTargetFacilitiesPageParams
|
|
157
|
+
>({
|
|
158
|
+
...buildVendorsGetVendorTargetFacilitiesInfiniteQuery(
|
|
159
|
+
client,
|
|
160
|
+
request,
|
|
161
|
+
options,
|
|
162
|
+
),
|
|
163
|
+
initialPageParam: options?.initialPageParam,
|
|
164
|
+
getNextPageParam: (previousPage) => previousPage["~next"],
|
|
165
|
+
...options,
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* List a vendor's target facilities
|
|
171
|
+
*
|
|
172
|
+
* @remarks
|
|
173
|
+
* Returns a paginated list of target facility rows for the specified vendor, including per-row screening question status.
|
|
174
|
+
*/
|
|
175
|
+
export function useVendorsGetVendorTargetFacilitiesInfiniteSuspense(
|
|
176
|
+
request: operations.GetVendorTargetFacilitiesRequest,
|
|
177
|
+
options?: SuspenseInfiniteQueryHookOptions<
|
|
178
|
+
VendorsGetVendorTargetFacilitiesInfiniteQueryData,
|
|
179
|
+
VendorsGetVendorTargetFacilitiesQueryError
|
|
180
|
+
>,
|
|
181
|
+
): UseSuspenseInfiniteQueryResult<
|
|
182
|
+
InfiniteData<
|
|
183
|
+
VendorsGetVendorTargetFacilitiesInfiniteQueryData,
|
|
184
|
+
VendorsGetVendorTargetFacilitiesPageParams
|
|
185
|
+
>,
|
|
186
|
+
VendorsGetVendorTargetFacilitiesQueryError
|
|
187
|
+
> {
|
|
188
|
+
const client = useGreenSecurityContext();
|
|
189
|
+
return useSuspenseInfiniteQuery<
|
|
190
|
+
VendorsGetVendorTargetFacilitiesInfiniteQueryData,
|
|
191
|
+
VendorsGetVendorTargetFacilitiesQueryError,
|
|
192
|
+
InfiniteData<
|
|
193
|
+
VendorsGetVendorTargetFacilitiesInfiniteQueryData,
|
|
194
|
+
VendorsGetVendorTargetFacilitiesPageParams
|
|
195
|
+
>,
|
|
196
|
+
QueryKey,
|
|
197
|
+
VendorsGetVendorTargetFacilitiesPageParams
|
|
198
|
+
>({
|
|
199
|
+
...buildVendorsGetVendorTargetFacilitiesInfiniteQuery(
|
|
200
|
+
client,
|
|
201
|
+
request,
|
|
202
|
+
options,
|
|
203
|
+
),
|
|
204
|
+
initialPageParam: options?.initialPageParam,
|
|
205
|
+
getNextPageParam: (previousPage) => previousPage["~next"],
|
|
206
|
+
...options,
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
export function setVendorsGetVendorTargetFacilitiesData(
|
|
211
|
+
client: QueryClient,
|
|
212
|
+
queryKeyBase: [
|
|
213
|
+
vendorIdOrMe: string,
|
|
214
|
+
parameters: {
|
|
215
|
+
facilityNameLike?: string | undefined;
|
|
216
|
+
systemNameLike?: string | undefined;
|
|
217
|
+
searchLike?: string | undefined;
|
|
218
|
+
status?: operations.GetVendorTargetFacilitiesQueryParamStatus | undefined;
|
|
219
|
+
page?: number | undefined;
|
|
220
|
+
itemsPerPage?: number | undefined;
|
|
221
|
+
sort?: operations.GetVendorTargetFacilitiesQueryParamSort | undefined;
|
|
222
|
+
desc?: boolean | undefined;
|
|
223
|
+
expand?: Array<components.Expand> | undefined;
|
|
224
|
+
},
|
|
225
|
+
],
|
|
226
|
+
data: VendorsGetVendorTargetFacilitiesQueryData,
|
|
227
|
+
): VendorsGetVendorTargetFacilitiesQueryData | undefined {
|
|
228
|
+
const key = queryKeyVendorsGetVendorTargetFacilities(...queryKeyBase);
|
|
229
|
+
|
|
230
|
+
return client.setQueryData<VendorsGetVendorTargetFacilitiesQueryData>(
|
|
231
|
+
key,
|
|
232
|
+
data,
|
|
233
|
+
);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
export function invalidateVendorsGetVendorTargetFacilities(
|
|
237
|
+
client: QueryClient,
|
|
238
|
+
queryKeyBase: TupleToPrefixes<
|
|
239
|
+
[
|
|
240
|
+
vendorIdOrMe: string,
|
|
241
|
+
parameters: {
|
|
242
|
+
facilityNameLike?: string | undefined;
|
|
243
|
+
systemNameLike?: string | undefined;
|
|
244
|
+
searchLike?: string | undefined;
|
|
245
|
+
status?:
|
|
246
|
+
| operations.GetVendorTargetFacilitiesQueryParamStatus
|
|
247
|
+
| undefined;
|
|
248
|
+
page?: number | undefined;
|
|
249
|
+
itemsPerPage?: number | undefined;
|
|
250
|
+
sort?: operations.GetVendorTargetFacilitiesQueryParamSort | undefined;
|
|
251
|
+
desc?: boolean | undefined;
|
|
252
|
+
expand?: Array<components.Expand> | undefined;
|
|
253
|
+
},
|
|
254
|
+
]
|
|
255
|
+
>,
|
|
256
|
+
filters?: Omit<InvalidateQueryFilters, "queryKey" | "predicate" | "exact">,
|
|
257
|
+
): Promise<void> {
|
|
258
|
+
return client.invalidateQueries({
|
|
259
|
+
...filters,
|
|
260
|
+
queryKey: [
|
|
261
|
+
"@greensecurity/javascript-sdk",
|
|
262
|
+
"vendors",
|
|
263
|
+
"getVendorTargetFacilities",
|
|
264
|
+
...queryKeyBase,
|
|
265
|
+
],
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
export function invalidateAllVendorsGetVendorTargetFacilities(
|
|
270
|
+
client: QueryClient,
|
|
271
|
+
filters?: Omit<InvalidateQueryFilters, "queryKey" | "predicate" | "exact">,
|
|
272
|
+
): Promise<void> {
|
|
273
|
+
return client.invalidateQueries({
|
|
274
|
+
...filters,
|
|
275
|
+
queryKey: [
|
|
276
|
+
"@greensecurity/javascript-sdk",
|
|
277
|
+
"vendors",
|
|
278
|
+
"getVendorTargetFacilities",
|
|
279
|
+
],
|
|
280
|
+
});
|
|
281
|
+
}
|
package/src/sdk/vendors.ts
CHANGED
|
@@ -30,6 +30,7 @@ import { vendorsGetVendorLegalName } from "../funcs/vendorsGetVendorLegalName.js
|
|
|
30
30
|
import { vendorsGetVendorPaymentResponsibility } from "../funcs/vendorsGetVendorPaymentResponsibility.js";
|
|
31
31
|
import { vendorsGetVendorsDetails } from "../funcs/vendorsGetVendorsDetails.js";
|
|
32
32
|
import { vendorsGetVendorsExportStatus } from "../funcs/vendorsGetVendorsExportStatus.js";
|
|
33
|
+
import { vendorsGetVendorTargetFacilities } from "../funcs/vendorsGetVendorTargetFacilities.js";
|
|
33
34
|
import { vendorsGetVendorUploadHistory } from "../funcs/vendorsGetVendorUploadHistory.js";
|
|
34
35
|
import { vendorsListVendorAdditionalFacilityFields } from "../funcs/vendorsListVendorAdditionalFacilityFields.js";
|
|
35
36
|
import { vendorsListVendorCredentialDataRequests } from "../funcs/vendorsListVendorCredentialDataRequests.js";
|
|
@@ -1183,6 +1184,25 @@ export class Vendors extends ClientSDK {
|
|
|
1183
1184
|
));
|
|
1184
1185
|
}
|
|
1185
1186
|
|
|
1187
|
+
/**
|
|
1188
|
+
* List a vendor's target facilities
|
|
1189
|
+
*
|
|
1190
|
+
* @remarks
|
|
1191
|
+
* Returns a paginated list of target facility rows for the specified vendor, including per-row screening question status.
|
|
1192
|
+
*/
|
|
1193
|
+
async getVendorTargetFacilities(
|
|
1194
|
+
request: operations.GetVendorTargetFacilitiesRequest,
|
|
1195
|
+
options?: RequestOptions,
|
|
1196
|
+
): Promise<
|
|
1197
|
+
PageIterator<operations.GetVendorTargetFacilitiesResponse, { page: number }>
|
|
1198
|
+
> {
|
|
1199
|
+
return unwrapResultIterator(vendorsGetVendorTargetFacilities(
|
|
1200
|
+
this,
|
|
1201
|
+
request,
|
|
1202
|
+
options,
|
|
1203
|
+
));
|
|
1204
|
+
}
|
|
1205
|
+
|
|
1186
1206
|
/**
|
|
1187
1207
|
* Cancels an existing handoff
|
|
1188
1208
|
*
|