@greensecurity/javascript-sdk 0.36.5 → 0.37.3
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 +4 -1
- package/bin/mcp-server.js +923 -760
- package/bin/mcp-server.js.map +18 -15
- package/dist/commonjs/__tests__/organizations.test.d.ts +2 -0
- package/dist/commonjs/__tests__/organizations.test.d.ts.map +1 -0
- package/dist/commonjs/__tests__/organizations.test.js +39 -0
- package/dist/commonjs/__tests__/organizations.test.js.map +1 -0
- package/dist/commonjs/__tests__/zones.test.js +2 -5
- package/dist/commonjs/__tests__/zones.test.js.map +1 -1
- package/dist/commonjs/funcs/organizationsListOrSearchDepartments.d.ts +21 -0
- package/dist/commonjs/funcs/organizationsListOrSearchDepartments.d.ts.map +1 -0
- package/dist/commonjs/funcs/organizationsListOrSearchDepartments.js +163 -0
- package/dist/commonjs/funcs/organizationsListOrSearchDepartments.js.map +1 -0
- package/dist/commonjs/funcs/vendorsListVendorFacilityStatuses.js +1 -0
- package/dist/commonjs/funcs/vendorsListVendorFacilityStatuses.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/mcp-server/cli/start/command.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/cli/start/command.js +0 -12
- package/dist/commonjs/mcp-server/cli/start/command.js.map +1 -1
- package/dist/commonjs/mcp-server/cli/start/impl.d.ts +0 -2
- package/dist/commonjs/mcp-server/cli/start/impl.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/cli/start/impl.js +0 -2
- package/dist/commonjs/mcp-server/cli/start/impl.js.map +1 -1
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/server.js +3 -1
- package/dist/commonjs/mcp-server/server.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/organizationsListOrSearchDepartments.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/organizationsListOrSearchDepartments.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/organizationsListOrSearchDepartments.js +64 -0
- package/dist/commonjs/mcp-server/tools/organizationsListOrSearchDepartments.js.map +1 -0
- package/dist/commonjs/models/components/facilitystatus.d.ts +31 -0
- package/dist/commonjs/models/components/facilitystatus.d.ts.map +1 -0
- package/dist/commonjs/models/components/facilitystatus.js +61 -0
- package/dist/commonjs/models/components/facilitystatus.js.map +1 -0
- 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/errors/apierror.d.ts.map +1 -1
- package/dist/commonjs/models/errors/apierror.js +8 -2
- package/dist/commonjs/models/errors/apierror.js.map +1 -1
- package/dist/commonjs/models/operations/index.d.ts +1 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +1 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/listorsearchdepartments.d.ts +116 -0
- package/dist/commonjs/models/operations/listorsearchdepartments.d.ts.map +1 -0
- package/dist/commonjs/models/operations/listorsearchdepartments.js +155 -0
- package/dist/commonjs/models/operations/listorsearchdepartments.js.map +1 -0
- package/dist/commonjs/models/operations/listvendorfacilitystatuses.d.ts +5 -0
- package/dist/commonjs/models/operations/listvendorfacilitystatuses.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listvendorfacilitystatuses.js +4 -0
- package/dist/commonjs/models/operations/listvendorfacilitystatuses.js.map +1 -1
- package/dist/commonjs/models/operations/updatevendordetails.d.ts +5 -0
- package/dist/commonjs/models/operations/updatevendordetails.d.ts.map +1 -1
- package/dist/commonjs/models/operations/updatevendordetails.js +4 -0
- package/dist/commonjs/models/operations/updatevendordetails.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/organizationsListOrSearchDepartments.d.ts +80 -0
- package/dist/commonjs/react-query/organizationsListOrSearchDepartments.d.ts.map +1 -0
- package/dist/commonjs/react-query/organizationsListOrSearchDepartments.js +162 -0
- package/dist/commonjs/react-query/organizationsListOrSearchDepartments.js.map +1 -0
- package/dist/commonjs/react-query/vendorsListVendorFacilityStatuses.d.ts +3 -0
- package/dist/commonjs/react-query/vendorsListVendorFacilityStatuses.d.ts.map +1 -1
- package/dist/commonjs/react-query/vendorsListVendorFacilityStatuses.js +2 -0
- package/dist/commonjs/react-query/vendorsListVendorFacilityStatuses.js.map +1 -1
- package/dist/commonjs/sdk/organizations.d.ts +9 -0
- package/dist/commonjs/sdk/organizations.d.ts.map +1 -1
- package/dist/commonjs/sdk/organizations.js +10 -0
- package/dist/commonjs/sdk/organizations.js.map +1 -1
- package/dist/esm/__tests__/organizations.test.d.ts +2 -0
- package/dist/esm/__tests__/organizations.test.d.ts.map +1 -0
- package/dist/esm/__tests__/organizations.test.js +37 -0
- package/dist/esm/__tests__/organizations.test.js.map +1 -0
- package/dist/esm/__tests__/zones.test.js +2 -5
- package/dist/esm/__tests__/zones.test.js.map +1 -1
- package/dist/esm/funcs/organizationsListOrSearchDepartments.d.ts +21 -0
- package/dist/esm/funcs/organizationsListOrSearchDepartments.d.ts.map +1 -0
- package/dist/esm/funcs/organizationsListOrSearchDepartments.js +127 -0
- package/dist/esm/funcs/organizationsListOrSearchDepartments.js.map +1 -0
- package/dist/esm/funcs/vendorsListVendorFacilityStatuses.js +1 -0
- package/dist/esm/funcs/vendorsListVendorFacilityStatuses.js.map +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/mcp-server/cli/start/command.d.ts.map +1 -1
- package/dist/esm/mcp-server/cli/start/command.js +0 -12
- package/dist/esm/mcp-server/cli/start/command.js.map +1 -1
- package/dist/esm/mcp-server/cli/start/impl.d.ts +0 -2
- package/dist/esm/mcp-server/cli/start/impl.d.ts.map +1 -1
- package/dist/esm/mcp-server/cli/start/impl.js +0 -2
- package/dist/esm/mcp-server/cli/start/impl.js.map +1 -1
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.d.ts.map +1 -1
- package/dist/esm/mcp-server/server.js +3 -1
- package/dist/esm/mcp-server/server.js.map +1 -1
- package/dist/esm/mcp-server/tools/organizationsListOrSearchDepartments.d.ts +8 -0
- package/dist/esm/mcp-server/tools/organizationsListOrSearchDepartments.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/organizationsListOrSearchDepartments.js +28 -0
- package/dist/esm/mcp-server/tools/organizationsListOrSearchDepartments.js.map +1 -0
- package/dist/esm/models/components/facilitystatus.d.ts +31 -0
- package/dist/esm/models/components/facilitystatus.d.ts.map +1 -0
- package/dist/esm/models/components/facilitystatus.js +25 -0
- package/dist/esm/models/components/facilitystatus.js.map +1 -0
- 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/errors/apierror.d.ts.map +1 -1
- package/dist/esm/models/errors/apierror.js +8 -2
- package/dist/esm/models/errors/apierror.js.map +1 -1
- package/dist/esm/models/operations/index.d.ts +1 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +1 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/listorsearchdepartments.d.ts +116 -0
- package/dist/esm/models/operations/listorsearchdepartments.d.ts.map +1 -0
- package/dist/esm/models/operations/listorsearchdepartments.js +113 -0
- package/dist/esm/models/operations/listorsearchdepartments.js.map +1 -0
- package/dist/esm/models/operations/listvendorfacilitystatuses.d.ts +5 -0
- package/dist/esm/models/operations/listvendorfacilitystatuses.d.ts.map +1 -1
- package/dist/esm/models/operations/listvendorfacilitystatuses.js +4 -0
- package/dist/esm/models/operations/listvendorfacilitystatuses.js.map +1 -1
- package/dist/esm/models/operations/updatevendordetails.d.ts +5 -0
- package/dist/esm/models/operations/updatevendordetails.d.ts.map +1 -1
- package/dist/esm/models/operations/updatevendordetails.js +4 -0
- package/dist/esm/models/operations/updatevendordetails.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/organizationsListOrSearchDepartments.d.ts +80 -0
- package/dist/esm/react-query/organizationsListOrSearchDepartments.d.ts.map +1 -0
- package/dist/esm/react-query/organizationsListOrSearchDepartments.js +149 -0
- package/dist/esm/react-query/organizationsListOrSearchDepartments.js.map +1 -0
- package/dist/esm/react-query/vendorsListVendorFacilityStatuses.d.ts +3 -0
- package/dist/esm/react-query/vendorsListVendorFacilityStatuses.d.ts.map +1 -1
- package/dist/esm/react-query/vendorsListVendorFacilityStatuses.js +2 -0
- package/dist/esm/react-query/vendorsListVendorFacilityStatuses.js.map +1 -1
- package/dist/esm/sdk/organizations.d.ts +9 -0
- package/dist/esm/sdk/organizations.d.ts.map +1 -1
- package/dist/esm/sdk/organizations.js +10 -0
- package/dist/esm/sdk/organizations.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +3 -3
- package/src/__tests__/organizations.test.ts +40 -0
- package/src/__tests__/zones.test.ts +2 -5
- package/src/funcs/organizationsListOrSearchDepartments.ts +256 -0
- package/src/funcs/vendorsListVendorFacilityStatuses.ts +1 -0
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/cli/start/command.ts +0 -13
- package/src/mcp-server/cli/start/impl.ts +0 -4
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +3 -1
- package/src/mcp-server/tools/organizationsListOrSearchDepartments.ts +39 -0
- package/src/models/components/facilitystatus.ts +34 -0
- package/src/models/components/index.ts +1 -0
- package/src/models/errors/apierror.ts +8 -2
- package/src/models/operations/index.ts +1 -0
- package/src/models/operations/listorsearchdepartments.ts +259 -0
- package/src/models/operations/listvendorfacilitystatuses.ts +9 -0
- package/src/models/operations/updatevendordetails.ts +9 -0
- package/src/react-query/index.ts +1 -0
- package/src/react-query/organizationsListOrSearchDepartments.ts +354 -0
- package/src/react-query/vendorsListVendorFacilityStatuses.ts +5 -0
- package/src/sdk/organizations.ts +20 -0
|
@@ -0,0 +1,354 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
InfiniteData,
|
|
7
|
+
InvalidateQueryFilters,
|
|
8
|
+
QueryClient,
|
|
9
|
+
QueryFunctionContext,
|
|
10
|
+
QueryKey,
|
|
11
|
+
useInfiniteQuery,
|
|
12
|
+
UseInfiniteQueryResult,
|
|
13
|
+
useQuery,
|
|
14
|
+
UseQueryResult,
|
|
15
|
+
useSuspenseInfiniteQuery,
|
|
16
|
+
UseSuspenseInfiniteQueryResult,
|
|
17
|
+
useSuspenseQuery,
|
|
18
|
+
UseSuspenseQueryResult,
|
|
19
|
+
} from "@tanstack/react-query";
|
|
20
|
+
import { GreenSecurityCore } from "../core.js";
|
|
21
|
+
import { organizationsListOrSearchDepartments } from "../funcs/organizationsListOrSearchDepartments.js";
|
|
22
|
+
import { combineSignals } from "../lib/primitives.js";
|
|
23
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
24
|
+
import * as components from "../models/components/index.js";
|
|
25
|
+
import * as operations from "../models/operations/index.js";
|
|
26
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
27
|
+
import { PageIterator, unwrapResultIterator } from "../types/operations.js";
|
|
28
|
+
import { useGreenSecurityContext } from "./_context.js";
|
|
29
|
+
import {
|
|
30
|
+
InfiniteQueryHookOptions,
|
|
31
|
+
QueryHookOptions,
|
|
32
|
+
SuspenseInfiniteQueryHookOptions,
|
|
33
|
+
SuspenseQueryHookOptions,
|
|
34
|
+
TupleToPrefixes,
|
|
35
|
+
} from "./_types.js";
|
|
36
|
+
|
|
37
|
+
export type OrganizationsListOrSearchDepartmentsQueryData =
|
|
38
|
+
operations.ListOrSearchDepartmentsResponse;
|
|
39
|
+
|
|
40
|
+
export type OrganizationsListOrSearchDepartmentsInfiniteQueryData =
|
|
41
|
+
PageIterator<operations.ListOrSearchDepartmentsResponse, { page: number }>;
|
|
42
|
+
|
|
43
|
+
export type OrganizationsListOrSearchDepartmentsPageParams = PageIterator<
|
|
44
|
+
operations.ListOrSearchDepartmentsResponse,
|
|
45
|
+
{ page: number }
|
|
46
|
+
>["~next"];
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* List or search departments
|
|
50
|
+
*
|
|
51
|
+
* @remarks
|
|
52
|
+
* List or search departments.
|
|
53
|
+
*/
|
|
54
|
+
export function useOrganizationsListOrSearchDepartments(
|
|
55
|
+
request: operations.ListOrSearchDepartmentsRequest,
|
|
56
|
+
options?: QueryHookOptions<OrganizationsListOrSearchDepartmentsQueryData>,
|
|
57
|
+
): UseQueryResult<OrganizationsListOrSearchDepartmentsQueryData, Error> {
|
|
58
|
+
const client = useGreenSecurityContext();
|
|
59
|
+
return useQuery({
|
|
60
|
+
...buildOrganizationsListOrSearchDepartmentsQuery(
|
|
61
|
+
client,
|
|
62
|
+
request,
|
|
63
|
+
options,
|
|
64
|
+
),
|
|
65
|
+
...options,
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* List or search departments
|
|
71
|
+
*
|
|
72
|
+
* @remarks
|
|
73
|
+
* List or search departments.
|
|
74
|
+
*/
|
|
75
|
+
export function useOrganizationsListOrSearchDepartmentsSuspense(
|
|
76
|
+
request: operations.ListOrSearchDepartmentsRequest,
|
|
77
|
+
options?: SuspenseQueryHookOptions<
|
|
78
|
+
OrganizationsListOrSearchDepartmentsQueryData
|
|
79
|
+
>,
|
|
80
|
+
): UseSuspenseQueryResult<
|
|
81
|
+
OrganizationsListOrSearchDepartmentsQueryData,
|
|
82
|
+
Error
|
|
83
|
+
> {
|
|
84
|
+
const client = useGreenSecurityContext();
|
|
85
|
+
return useSuspenseQuery({
|
|
86
|
+
...buildOrganizationsListOrSearchDepartmentsQuery(
|
|
87
|
+
client,
|
|
88
|
+
request,
|
|
89
|
+
options,
|
|
90
|
+
),
|
|
91
|
+
...options,
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* List or search departments
|
|
97
|
+
*
|
|
98
|
+
* @remarks
|
|
99
|
+
* List or search departments.
|
|
100
|
+
*/
|
|
101
|
+
export function useOrganizationsListOrSearchDepartmentsInfinite(
|
|
102
|
+
request: operations.ListOrSearchDepartmentsRequest,
|
|
103
|
+
options?: InfiniteQueryHookOptions<
|
|
104
|
+
OrganizationsListOrSearchDepartmentsInfiniteQueryData
|
|
105
|
+
>,
|
|
106
|
+
): UseInfiniteQueryResult<
|
|
107
|
+
InfiniteData<
|
|
108
|
+
OrganizationsListOrSearchDepartmentsInfiniteQueryData,
|
|
109
|
+
OrganizationsListOrSearchDepartmentsPageParams
|
|
110
|
+
>,
|
|
111
|
+
Error
|
|
112
|
+
> {
|
|
113
|
+
const client = useGreenSecurityContext();
|
|
114
|
+
return useInfiniteQuery<
|
|
115
|
+
OrganizationsListOrSearchDepartmentsInfiniteQueryData,
|
|
116
|
+
Error,
|
|
117
|
+
InfiniteData<
|
|
118
|
+
OrganizationsListOrSearchDepartmentsInfiniteQueryData,
|
|
119
|
+
OrganizationsListOrSearchDepartmentsPageParams
|
|
120
|
+
>,
|
|
121
|
+
QueryKey,
|
|
122
|
+
OrganizationsListOrSearchDepartmentsPageParams
|
|
123
|
+
>({
|
|
124
|
+
...buildOrganizationsListOrSearchDepartmentsInfiniteQuery(
|
|
125
|
+
client,
|
|
126
|
+
request,
|
|
127
|
+
options,
|
|
128
|
+
),
|
|
129
|
+
initialPageParam: options?.initialPageParam,
|
|
130
|
+
getNextPageParam: (previousPage) => previousPage["~next"],
|
|
131
|
+
...options,
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* List or search departments
|
|
137
|
+
*
|
|
138
|
+
* @remarks
|
|
139
|
+
* List or search departments.
|
|
140
|
+
*/
|
|
141
|
+
export function useOrganizationsListOrSearchDepartmentsInfiniteSuspense(
|
|
142
|
+
request: operations.ListOrSearchDepartmentsRequest,
|
|
143
|
+
options?: SuspenseInfiniteQueryHookOptions<
|
|
144
|
+
OrganizationsListOrSearchDepartmentsInfiniteQueryData
|
|
145
|
+
>,
|
|
146
|
+
): UseSuspenseInfiniteQueryResult<
|
|
147
|
+
InfiniteData<
|
|
148
|
+
OrganizationsListOrSearchDepartmentsInfiniteQueryData,
|
|
149
|
+
OrganizationsListOrSearchDepartmentsPageParams
|
|
150
|
+
>,
|
|
151
|
+
Error
|
|
152
|
+
> {
|
|
153
|
+
const client = useGreenSecurityContext();
|
|
154
|
+
return useSuspenseInfiniteQuery<
|
|
155
|
+
OrganizationsListOrSearchDepartmentsInfiniteQueryData,
|
|
156
|
+
Error,
|
|
157
|
+
InfiniteData<
|
|
158
|
+
OrganizationsListOrSearchDepartmentsInfiniteQueryData,
|
|
159
|
+
OrganizationsListOrSearchDepartmentsPageParams
|
|
160
|
+
>,
|
|
161
|
+
QueryKey,
|
|
162
|
+
OrganizationsListOrSearchDepartmentsPageParams
|
|
163
|
+
>({
|
|
164
|
+
...buildOrganizationsListOrSearchDepartmentsInfiniteQuery(
|
|
165
|
+
client,
|
|
166
|
+
request,
|
|
167
|
+
options,
|
|
168
|
+
),
|
|
169
|
+
initialPageParam: options?.initialPageParam,
|
|
170
|
+
getNextPageParam: (previousPage) => previousPage["~next"],
|
|
171
|
+
...options,
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
export function prefetchOrganizationsListOrSearchDepartments(
|
|
176
|
+
queryClient: QueryClient,
|
|
177
|
+
client$: GreenSecurityCore,
|
|
178
|
+
request: operations.ListOrSearchDepartmentsRequest,
|
|
179
|
+
): Promise<void> {
|
|
180
|
+
return queryClient.prefetchQuery({
|
|
181
|
+
...buildOrganizationsListOrSearchDepartmentsQuery(
|
|
182
|
+
client$,
|
|
183
|
+
request,
|
|
184
|
+
),
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
export function setOrganizationsListOrSearchDepartmentsData(
|
|
189
|
+
client: QueryClient,
|
|
190
|
+
queryKeyBase: [
|
|
191
|
+
id: number,
|
|
192
|
+
parameters: {
|
|
193
|
+
sort?: string | null | undefined;
|
|
194
|
+
desc?: components.Desc | undefined;
|
|
195
|
+
page?: number | undefined;
|
|
196
|
+
itemsPerPage?: number | undefined;
|
|
197
|
+
nameLike?: string | undefined;
|
|
198
|
+
},
|
|
199
|
+
],
|
|
200
|
+
data: OrganizationsListOrSearchDepartmentsQueryData,
|
|
201
|
+
): OrganizationsListOrSearchDepartmentsQueryData | undefined {
|
|
202
|
+
const key = queryKeyOrganizationsListOrSearchDepartments(...queryKeyBase);
|
|
203
|
+
|
|
204
|
+
return client.setQueryData<OrganizationsListOrSearchDepartmentsQueryData>(
|
|
205
|
+
key,
|
|
206
|
+
data,
|
|
207
|
+
);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
export function invalidateOrganizationsListOrSearchDepartments(
|
|
211
|
+
client: QueryClient,
|
|
212
|
+
queryKeyBase: TupleToPrefixes<
|
|
213
|
+
[
|
|
214
|
+
id: number,
|
|
215
|
+
parameters: {
|
|
216
|
+
sort?: string | null | undefined;
|
|
217
|
+
desc?: components.Desc | undefined;
|
|
218
|
+
page?: number | undefined;
|
|
219
|
+
itemsPerPage?: number | undefined;
|
|
220
|
+
nameLike?: string | undefined;
|
|
221
|
+
},
|
|
222
|
+
]
|
|
223
|
+
>,
|
|
224
|
+
filters?: Omit<InvalidateQueryFilters, "queryKey" | "predicate" | "exact">,
|
|
225
|
+
): Promise<void> {
|
|
226
|
+
return client.invalidateQueries({
|
|
227
|
+
...filters,
|
|
228
|
+
queryKey: [
|
|
229
|
+
"@greensecurity/javascript-sdk",
|
|
230
|
+
"organizations",
|
|
231
|
+
"listOrSearchDepartments",
|
|
232
|
+
...queryKeyBase,
|
|
233
|
+
],
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
export function invalidateAllOrganizationsListOrSearchDepartments(
|
|
238
|
+
client: QueryClient,
|
|
239
|
+
filters?: Omit<InvalidateQueryFilters, "queryKey" | "predicate" | "exact">,
|
|
240
|
+
): Promise<void> {
|
|
241
|
+
return client.invalidateQueries({
|
|
242
|
+
...filters,
|
|
243
|
+
queryKey: [
|
|
244
|
+
"@greensecurity/javascript-sdk",
|
|
245
|
+
"organizations",
|
|
246
|
+
"listOrSearchDepartments",
|
|
247
|
+
],
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
export function buildOrganizationsListOrSearchDepartmentsQuery(
|
|
252
|
+
client$: GreenSecurityCore,
|
|
253
|
+
request: operations.ListOrSearchDepartmentsRequest,
|
|
254
|
+
options?: RequestOptions,
|
|
255
|
+
): {
|
|
256
|
+
queryKey: QueryKey;
|
|
257
|
+
queryFn: (
|
|
258
|
+
context: QueryFunctionContext,
|
|
259
|
+
) => Promise<OrganizationsListOrSearchDepartmentsQueryData>;
|
|
260
|
+
} {
|
|
261
|
+
return {
|
|
262
|
+
queryKey: queryKeyOrganizationsListOrSearchDepartments(request.id, {
|
|
263
|
+
sort: request.sort,
|
|
264
|
+
desc: request.desc,
|
|
265
|
+
page: request.page,
|
|
266
|
+
itemsPerPage: request.itemsPerPage,
|
|
267
|
+
nameLike: request.nameLike,
|
|
268
|
+
}),
|
|
269
|
+
queryFn: async function organizationsListOrSearchDepartmentsQueryFn(
|
|
270
|
+
ctx,
|
|
271
|
+
): Promise<OrganizationsListOrSearchDepartmentsQueryData> {
|
|
272
|
+
const sig = combineSignals(ctx.signal, options?.fetchOptions?.signal);
|
|
273
|
+
const mergedOptions = {
|
|
274
|
+
...options,
|
|
275
|
+
fetchOptions: { ...options?.fetchOptions, signal: sig },
|
|
276
|
+
};
|
|
277
|
+
|
|
278
|
+
return unwrapAsync(organizationsListOrSearchDepartments(
|
|
279
|
+
client$,
|
|
280
|
+
request,
|
|
281
|
+
mergedOptions,
|
|
282
|
+
));
|
|
283
|
+
},
|
|
284
|
+
};
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
export function buildOrganizationsListOrSearchDepartmentsInfiniteQuery(
|
|
288
|
+
client$: GreenSecurityCore,
|
|
289
|
+
request: operations.ListOrSearchDepartmentsRequest,
|
|
290
|
+
options?: RequestOptions,
|
|
291
|
+
): {
|
|
292
|
+
queryKey: QueryKey;
|
|
293
|
+
queryFn: (
|
|
294
|
+
context: QueryFunctionContext<
|
|
295
|
+
QueryKey,
|
|
296
|
+
OrganizationsListOrSearchDepartmentsPageParams
|
|
297
|
+
>,
|
|
298
|
+
) => Promise<OrganizationsListOrSearchDepartmentsInfiniteQueryData>;
|
|
299
|
+
} {
|
|
300
|
+
return {
|
|
301
|
+
queryKey: queryKeyOrganizationsListOrSearchDepartments(request.id, {
|
|
302
|
+
sort: request.sort,
|
|
303
|
+
desc: request.desc,
|
|
304
|
+
page: request.page,
|
|
305
|
+
itemsPerPage: request.itemsPerPage,
|
|
306
|
+
nameLike: request.nameLike,
|
|
307
|
+
}),
|
|
308
|
+
queryFn: async function organizationsListOrSearchDepartmentsQuery(
|
|
309
|
+
ctx,
|
|
310
|
+
): Promise<OrganizationsListOrSearchDepartmentsInfiniteQueryData> {
|
|
311
|
+
const sig = combineSignals(ctx.signal, options?.fetchOptions?.signal);
|
|
312
|
+
const mergedOptions = {
|
|
313
|
+
...options,
|
|
314
|
+
fetchOptions: { ...options?.fetchOptions, signal: sig },
|
|
315
|
+
};
|
|
316
|
+
|
|
317
|
+
if (!ctx.pageParam) {
|
|
318
|
+
return unwrapResultIterator(organizationsListOrSearchDepartments(
|
|
319
|
+
client$,
|
|
320
|
+
request,
|
|
321
|
+
mergedOptions,
|
|
322
|
+
));
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
return unwrapResultIterator(organizationsListOrSearchDepartments(
|
|
326
|
+
client$,
|
|
327
|
+
{
|
|
328
|
+
...request,
|
|
329
|
+
page: ctx.pageParam.page,
|
|
330
|
+
},
|
|
331
|
+
mergedOptions,
|
|
332
|
+
));
|
|
333
|
+
},
|
|
334
|
+
};
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
export function queryKeyOrganizationsListOrSearchDepartments(
|
|
338
|
+
id: number,
|
|
339
|
+
parameters: {
|
|
340
|
+
sort?: string | null | undefined;
|
|
341
|
+
desc?: components.Desc | undefined;
|
|
342
|
+
page?: number | undefined;
|
|
343
|
+
itemsPerPage?: number | undefined;
|
|
344
|
+
nameLike?: string | undefined;
|
|
345
|
+
},
|
|
346
|
+
): QueryKey {
|
|
347
|
+
return [
|
|
348
|
+
"@greensecurity/javascript-sdk",
|
|
349
|
+
"organizations",
|
|
350
|
+
"listOrSearchDepartments",
|
|
351
|
+
id,
|
|
352
|
+
parameters,
|
|
353
|
+
];
|
|
354
|
+
}
|
|
@@ -196,6 +196,7 @@ export function setVendorsListVendorFacilityStatusesData(
|
|
|
196
196
|
scanType?: components.ScanType | undefined;
|
|
197
197
|
facilityNameLike?: string | undefined;
|
|
198
198
|
facilityId?: number | undefined;
|
|
199
|
+
facilityStatus?: components.FacilityStatus | undefined;
|
|
199
200
|
},
|
|
200
201
|
],
|
|
201
202
|
data: VendorsListVendorFacilityStatusesQueryData,
|
|
@@ -221,6 +222,7 @@ export function invalidateVendorsListVendorFacilityStatuses(
|
|
|
221
222
|
scanType?: components.ScanType | undefined;
|
|
222
223
|
facilityNameLike?: string | undefined;
|
|
223
224
|
facilityId?: number | undefined;
|
|
225
|
+
facilityStatus?: components.FacilityStatus | undefined;
|
|
224
226
|
},
|
|
225
227
|
]
|
|
226
228
|
>,
|
|
@@ -270,6 +272,7 @@ export function buildVendorsListVendorFacilityStatusesQuery(
|
|
|
270
272
|
scanType: request.scanType,
|
|
271
273
|
facilityNameLike: request.facilityNameLike,
|
|
272
274
|
facilityId: request.facilityId,
|
|
275
|
+
facilityStatus: request.facilityStatus,
|
|
273
276
|
}),
|
|
274
277
|
queryFn: async function vendorsListVendorFacilityStatusesQueryFn(
|
|
275
278
|
ctx,
|
|
@@ -311,6 +314,7 @@ export function buildVendorsListVendorFacilityStatusesInfiniteQuery(
|
|
|
311
314
|
scanType: request.scanType,
|
|
312
315
|
facilityNameLike: request.facilityNameLike,
|
|
313
316
|
facilityId: request.facilityId,
|
|
317
|
+
facilityStatus: request.facilityStatus,
|
|
314
318
|
}),
|
|
315
319
|
queryFn: async function vendorsListVendorFacilityStatusesQuery(
|
|
316
320
|
ctx,
|
|
@@ -351,6 +355,7 @@ export function queryKeyVendorsListVendorFacilityStatuses(
|
|
|
351
355
|
scanType?: components.ScanType | undefined;
|
|
352
356
|
facilityNameLike?: string | undefined;
|
|
353
357
|
facilityId?: number | undefined;
|
|
358
|
+
facilityStatus?: components.FacilityStatus | undefined;
|
|
354
359
|
},
|
|
355
360
|
): QueryKey {
|
|
356
361
|
return [
|
package/src/sdk/organizations.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { organizationsGetFacility } from "../funcs/organizationsGetFacility.js";
|
|
6
|
+
import { organizationsListOrSearchDepartments } from "../funcs/organizationsListOrSearchDepartments.js";
|
|
6
7
|
import { organizationsListOrSearchFacilities } from "../funcs/organizationsListOrSearchFacilities.js";
|
|
7
8
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
8
9
|
import * as components from "../models/components/index.js";
|
|
@@ -59,4 +60,23 @@ export class Organizations extends ClientSDK {
|
|
|
59
60
|
options,
|
|
60
61
|
));
|
|
61
62
|
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* List or search departments
|
|
66
|
+
*
|
|
67
|
+
* @remarks
|
|
68
|
+
* List or search departments.
|
|
69
|
+
*/
|
|
70
|
+
async listOrSearchDepartments(
|
|
71
|
+
request: operations.ListOrSearchDepartmentsRequest,
|
|
72
|
+
options?: RequestOptions,
|
|
73
|
+
): Promise<
|
|
74
|
+
PageIterator<operations.ListOrSearchDepartmentsResponse, { page: number }>
|
|
75
|
+
> {
|
|
76
|
+
return unwrapResultIterator(organizationsListOrSearchDepartments(
|
|
77
|
+
this,
|
|
78
|
+
request,
|
|
79
|
+
options,
|
|
80
|
+
));
|
|
81
|
+
}
|
|
62
82
|
}
|