@greensecurity/javascript-sdk 0.43.1-beta.137 → 0.43.1-beta.138
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 +36 -0
- package/dist/commonjs/__tests__/vendors.test.js.map +1 -1
- package/dist/commonjs/__tests__/zones.test.js +30 -2
- package/dist/commonjs/__tests__/zones.test.js.map +1 -1
- package/dist/commonjs/funcs/vendorsGetVendorUploadHistory.d.ts +23 -0
- package/dist/commonjs/funcs/vendorsGetVendorUploadHistory.d.ts.map +1 -0
- package/dist/commonjs/funcs/vendorsGetVendorUploadHistory.js +166 -0
- package/dist/commonjs/funcs/vendorsGetVendorUploadHistory.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/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/uploadhistoryitem.d.ts +14 -0
- package/dist/commonjs/models/components/uploadhistoryitem.d.ts.map +1 -0
- package/dist/commonjs/models/components/uploadhistoryitem.js +63 -0
- package/dist/commonjs/models/components/uploadhistoryitem.js.map +1 -0
- package/dist/commonjs/models/operations/getvendoruploadhistory.d.ts +63 -0
- package/dist/commonjs/models/operations/getvendoruploadhistory.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getvendoruploadhistory.js +83 -0
- package/dist/commonjs/models/operations/getvendoruploadhistory.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/vendorsGetVendorUploadHistory.core.d.ts +36 -0
- package/dist/commonjs/react-query/vendorsGetVendorUploadHistory.core.d.ts.map +1 -0
- package/dist/commonjs/react-query/vendorsGetVendorUploadHistory.core.js +94 -0
- package/dist/commonjs/react-query/vendorsGetVendorUploadHistory.core.js.map +1 -0
- package/dist/commonjs/react-query/vendorsGetVendorUploadHistory.d.ts +60 -0
- package/dist/commonjs/react-query/vendorsGetVendorUploadHistory.d.ts.map +1 -0
- package/dist/commonjs/react-query/vendorsGetVendorUploadHistory.js +105 -0
- package/dist/commonjs/react-query/vendorsGetVendorUploadHistory.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 +36 -0
- package/dist/esm/__tests__/vendors.test.js.map +1 -1
- package/dist/esm/__tests__/zones.test.js +30 -2
- package/dist/esm/__tests__/zones.test.js.map +1 -1
- package/dist/esm/funcs/vendorsGetVendorUploadHistory.d.ts +23 -0
- package/dist/esm/funcs/vendorsGetVendorUploadHistory.d.ts.map +1 -0
- package/dist/esm/funcs/vendorsGetVendorUploadHistory.js +130 -0
- package/dist/esm/funcs/vendorsGetVendorUploadHistory.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/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/uploadhistoryitem.d.ts +14 -0
- package/dist/esm/models/components/uploadhistoryitem.d.ts.map +1 -0
- package/dist/esm/models/components/uploadhistoryitem.js +26 -0
- package/dist/esm/models/components/uploadhistoryitem.js.map +1 -0
- package/dist/esm/models/operations/getvendoruploadhistory.d.ts +63 -0
- package/dist/esm/models/operations/getvendoruploadhistory.d.ts.map +1 -0
- package/dist/esm/models/operations/getvendoruploadhistory.js +44 -0
- package/dist/esm/models/operations/getvendoruploadhistory.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/vendorsGetVendorUploadHistory.core.d.ts +36 -0
- package/dist/esm/react-query/vendorsGetVendorUploadHistory.core.d.ts.map +1 -0
- package/dist/esm/react-query/vendorsGetVendorUploadHistory.core.js +86 -0
- package/dist/esm/react-query/vendorsGetVendorUploadHistory.core.js.map +1 -0
- package/dist/esm/react-query/vendorsGetVendorUploadHistory.d.ts +60 -0
- package/dist/esm/react-query/vendorsGetVendorUploadHistory.d.ts.map +1 -0
- package/dist/esm/react-query/vendorsGetVendorUploadHistory.js +90 -0
- package/dist/esm/react-query/vendorsGetVendorUploadHistory.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 +39 -0
- package/src/__tests__/zones.test.ts +30 -2
- package/src/funcs/vendorsGetVendorUploadHistory.ts +260 -0
- package/src/lib/config.ts +2 -2
- package/src/models/components/index.ts +1 -0
- package/src/models/components/uploadhistoryitem.ts +48 -0
- package/src/models/operations/getvendoruploadhistory.ts +144 -0
- package/src/models/operations/index.ts +1 -0
- package/src/react-query/index.ts +1 -0
- package/src/react-query/vendorsGetVendorUploadHistory.core.ts +199 -0
- package/src/react-query/vendorsGetVendorUploadHistory.ts +267 -0
- package/src/sdk/vendors.ts +20 -0
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: e3ca8c943345
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import {
|
|
7
|
+
QueryClient,
|
|
8
|
+
QueryFunctionContext,
|
|
9
|
+
QueryKey,
|
|
10
|
+
} from "@tanstack/react-query";
|
|
11
|
+
import { GreenSecurityCore } from "../core.js";
|
|
12
|
+
import { vendorsGetVendorUploadHistory } from "../funcs/vendorsGetVendorUploadHistory.js";
|
|
13
|
+
import { combineSignals } from "../lib/primitives.js";
|
|
14
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
15
|
+
import * as components from "../models/components/index.js";
|
|
16
|
+
import * as operations from "../models/operations/index.js";
|
|
17
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
18
|
+
import { PageIterator, unwrapResultIterator } from "../types/operations.js";
|
|
19
|
+
import { pageIteratorToJSON } from "./_types.js";
|
|
20
|
+
export type VendorsGetVendorUploadHistoryQueryData =
|
|
21
|
+
operations.GetVendorUploadHistoryResponse;
|
|
22
|
+
|
|
23
|
+
export type VendorsGetVendorUploadHistoryInfiniteQueryData = PageIterator<
|
|
24
|
+
operations.GetVendorUploadHistoryResponse,
|
|
25
|
+
{ page: number }
|
|
26
|
+
>;
|
|
27
|
+
|
|
28
|
+
export type VendorsGetVendorUploadHistoryPageParams = PageIterator<
|
|
29
|
+
operations.GetVendorUploadHistoryResponse,
|
|
30
|
+
{ page: number }
|
|
31
|
+
>["~next"];
|
|
32
|
+
|
|
33
|
+
export function prefetchVendorsGetVendorUploadHistory(
|
|
34
|
+
queryClient: QueryClient,
|
|
35
|
+
client$: GreenSecurityCore,
|
|
36
|
+
request: operations.GetVendorUploadHistoryRequest,
|
|
37
|
+
options?: RequestOptions,
|
|
38
|
+
): Promise<void> {
|
|
39
|
+
return queryClient.prefetchQuery({
|
|
40
|
+
...buildVendorsGetVendorUploadHistoryQuery(
|
|
41
|
+
client$,
|
|
42
|
+
request,
|
|
43
|
+
options,
|
|
44
|
+
),
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function prefetchVendorsGetVendorUploadHistoryInfinite(
|
|
49
|
+
queryClient: QueryClient,
|
|
50
|
+
client$: GreenSecurityCore,
|
|
51
|
+
request: operations.GetVendorUploadHistoryRequest,
|
|
52
|
+
options?: RequestOptions,
|
|
53
|
+
): Promise<void> {
|
|
54
|
+
return queryClient.prefetchInfiniteQuery({
|
|
55
|
+
...buildVendorsGetVendorUploadHistoryInfiniteQuery(
|
|
56
|
+
client$,
|
|
57
|
+
request,
|
|
58
|
+
options,
|
|
59
|
+
),
|
|
60
|
+
initialPageParam: undefined as VendorsGetVendorUploadHistoryPageParams,
|
|
61
|
+
getNextPageParam: (
|
|
62
|
+
previousPage: VendorsGetVendorUploadHistoryInfiniteQueryData,
|
|
63
|
+
) => previousPage["~next"],
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function buildVendorsGetVendorUploadHistoryQuery(
|
|
68
|
+
client$: GreenSecurityCore,
|
|
69
|
+
request: operations.GetVendorUploadHistoryRequest,
|
|
70
|
+
options?: RequestOptions,
|
|
71
|
+
): {
|
|
72
|
+
queryKey: QueryKey;
|
|
73
|
+
queryFn: (
|
|
74
|
+
context: QueryFunctionContext,
|
|
75
|
+
) => Promise<VendorsGetVendorUploadHistoryQueryData>;
|
|
76
|
+
} {
|
|
77
|
+
return {
|
|
78
|
+
queryKey: queryKeyVendorsGetVendorUploadHistory(request.vendorIdOrMe, {
|
|
79
|
+
sort: request.sort,
|
|
80
|
+
desc: request.desc,
|
|
81
|
+
page: request.page,
|
|
82
|
+
itemsPerPage: request.itemsPerPage,
|
|
83
|
+
}),
|
|
84
|
+
queryFn: async function vendorsGetVendorUploadHistoryQueryFn(
|
|
85
|
+
ctx,
|
|
86
|
+
): Promise<VendorsGetVendorUploadHistoryQueryData> {
|
|
87
|
+
const sig = combineSignals(
|
|
88
|
+
ctx.signal,
|
|
89
|
+
options?.signal,
|
|
90
|
+
options?.fetchOptions?.signal,
|
|
91
|
+
);
|
|
92
|
+
const mergedOptions = {
|
|
93
|
+
...options?.fetchOptions,
|
|
94
|
+
...options,
|
|
95
|
+
signal: sig,
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
return unwrapAsync(vendorsGetVendorUploadHistory(
|
|
99
|
+
client$,
|
|
100
|
+
request,
|
|
101
|
+
mergedOptions,
|
|
102
|
+
));
|
|
103
|
+
},
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export function buildVendorsGetVendorUploadHistoryInfiniteQuery(
|
|
108
|
+
client$: GreenSecurityCore,
|
|
109
|
+
request: operations.GetVendorUploadHistoryRequest,
|
|
110
|
+
options?: RequestOptions,
|
|
111
|
+
): {
|
|
112
|
+
queryKey: QueryKey;
|
|
113
|
+
queryFn: (
|
|
114
|
+
context: QueryFunctionContext<
|
|
115
|
+
QueryKey,
|
|
116
|
+
VendorsGetVendorUploadHistoryPageParams
|
|
117
|
+
>,
|
|
118
|
+
) => Promise<VendorsGetVendorUploadHistoryInfiniteQueryData>;
|
|
119
|
+
} {
|
|
120
|
+
return {
|
|
121
|
+
queryKey: queryKeyVendorsGetVendorUploadHistoryInfinite(
|
|
122
|
+
request.vendorIdOrMe,
|
|
123
|
+
{
|
|
124
|
+
sort: request.sort,
|
|
125
|
+
desc: request.desc,
|
|
126
|
+
page: request.page,
|
|
127
|
+
itemsPerPage: request.itemsPerPage,
|
|
128
|
+
},
|
|
129
|
+
),
|
|
130
|
+
queryFn: async function vendorsGetVendorUploadHistoryQuery(
|
|
131
|
+
ctx,
|
|
132
|
+
): Promise<VendorsGetVendorUploadHistoryInfiniteQueryData> {
|
|
133
|
+
const sig = combineSignals(ctx.signal, options?.fetchOptions?.signal);
|
|
134
|
+
const mergedOptions = {
|
|
135
|
+
...options,
|
|
136
|
+
fetchOptions: { ...options?.fetchOptions, signal: sig },
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
if (!ctx.pageParam) {
|
|
140
|
+
const pageResult = await unwrapResultIterator(
|
|
141
|
+
vendorsGetVendorUploadHistory(
|
|
142
|
+
client$,
|
|
143
|
+
request,
|
|
144
|
+
mergedOptions,
|
|
145
|
+
),
|
|
146
|
+
);
|
|
147
|
+
return pageIteratorToJSON(pageResult);
|
|
148
|
+
}
|
|
149
|
+
const pageResult = await unwrapResultIterator(
|
|
150
|
+
vendorsGetVendorUploadHistory(
|
|
151
|
+
client$,
|
|
152
|
+
{
|
|
153
|
+
...request,
|
|
154
|
+
page: ctx.pageParam.page,
|
|
155
|
+
},
|
|
156
|
+
mergedOptions,
|
|
157
|
+
),
|
|
158
|
+
);
|
|
159
|
+
return pageIteratorToJSON(pageResult);
|
|
160
|
+
},
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
export function queryKeyVendorsGetVendorUploadHistory(
|
|
165
|
+
vendorIdOrMe: string,
|
|
166
|
+
parameters: {
|
|
167
|
+
sort?: string | null | undefined;
|
|
168
|
+
desc?: components.Desc | undefined;
|
|
169
|
+
page?: number | undefined;
|
|
170
|
+
itemsPerPage?: number | undefined;
|
|
171
|
+
},
|
|
172
|
+
): QueryKey {
|
|
173
|
+
return [
|
|
174
|
+
"@greensecurity/javascript-sdk",
|
|
175
|
+
"vendors",
|
|
176
|
+
"getVendorUploadHistory",
|
|
177
|
+
vendorIdOrMe,
|
|
178
|
+
parameters,
|
|
179
|
+
];
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export function queryKeyVendorsGetVendorUploadHistoryInfinite(
|
|
183
|
+
vendorIdOrMe: string,
|
|
184
|
+
parameters: {
|
|
185
|
+
sort?: string | null | undefined;
|
|
186
|
+
desc?: components.Desc | undefined;
|
|
187
|
+
page?: number | undefined;
|
|
188
|
+
itemsPerPage?: number | undefined;
|
|
189
|
+
},
|
|
190
|
+
): QueryKey {
|
|
191
|
+
return [
|
|
192
|
+
"@greensecurity/javascript-sdk",
|
|
193
|
+
"vendors",
|
|
194
|
+
"getVendorUploadHistory",
|
|
195
|
+
"infinite",
|
|
196
|
+
vendorIdOrMe,
|
|
197
|
+
parameters,
|
|
198
|
+
];
|
|
199
|
+
}
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: d5ed03adbdf5
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import {
|
|
7
|
+
InfiniteData,
|
|
8
|
+
InvalidateQueryFilters,
|
|
9
|
+
QueryClient,
|
|
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 * as components from "../models/components/index.js";
|
|
21
|
+
import { GreenSecurityError } from "../models/errors/greensecurityerror.js";
|
|
22
|
+
import {
|
|
23
|
+
ConnectionError,
|
|
24
|
+
InvalidRequestError,
|
|
25
|
+
RequestAbortedError,
|
|
26
|
+
RequestTimeoutError,
|
|
27
|
+
UnexpectedClientError,
|
|
28
|
+
} from "../models/errors/httpclienterrors.js";
|
|
29
|
+
import * as errors from "../models/errors/index.js";
|
|
30
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
31
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
32
|
+
import * as operations from "../models/operations/index.js";
|
|
33
|
+
import { useGreenSecurityContext } from "./_context.js";
|
|
34
|
+
import {
|
|
35
|
+
InfiniteQueryHookOptions,
|
|
36
|
+
QueryHookOptions,
|
|
37
|
+
SuspenseInfiniteQueryHookOptions,
|
|
38
|
+
SuspenseQueryHookOptions,
|
|
39
|
+
TupleToPrefixes,
|
|
40
|
+
} from "./_types.js";
|
|
41
|
+
import {
|
|
42
|
+
buildVendorsGetVendorUploadHistoryInfiniteQuery,
|
|
43
|
+
buildVendorsGetVendorUploadHistoryQuery,
|
|
44
|
+
prefetchVendorsGetVendorUploadHistory,
|
|
45
|
+
prefetchVendorsGetVendorUploadHistoryInfinite,
|
|
46
|
+
queryKeyVendorsGetVendorUploadHistory,
|
|
47
|
+
queryKeyVendorsGetVendorUploadHistoryInfinite,
|
|
48
|
+
VendorsGetVendorUploadHistoryInfiniteQueryData,
|
|
49
|
+
VendorsGetVendorUploadHistoryPageParams,
|
|
50
|
+
VendorsGetVendorUploadHistoryQueryData,
|
|
51
|
+
} from "./vendorsGetVendorUploadHistory.core.js";
|
|
52
|
+
export {
|
|
53
|
+
buildVendorsGetVendorUploadHistoryInfiniteQuery,
|
|
54
|
+
buildVendorsGetVendorUploadHistoryQuery,
|
|
55
|
+
prefetchVendorsGetVendorUploadHistory,
|
|
56
|
+
prefetchVendorsGetVendorUploadHistoryInfinite,
|
|
57
|
+
queryKeyVendorsGetVendorUploadHistory,
|
|
58
|
+
queryKeyVendorsGetVendorUploadHistoryInfinite,
|
|
59
|
+
type VendorsGetVendorUploadHistoryInfiniteQueryData,
|
|
60
|
+
type VendorsGetVendorUploadHistoryPageParams,
|
|
61
|
+
type VendorsGetVendorUploadHistoryQueryData,
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export type VendorsGetVendorUploadHistoryQueryError =
|
|
65
|
+
| errors.ApiErrorResponse
|
|
66
|
+
| GreenSecurityError
|
|
67
|
+
| ResponseValidationError
|
|
68
|
+
| ConnectionError
|
|
69
|
+
| RequestAbortedError
|
|
70
|
+
| RequestTimeoutError
|
|
71
|
+
| InvalidRequestError
|
|
72
|
+
| UnexpectedClientError
|
|
73
|
+
| SDKValidationError;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Get vendor upload history
|
|
77
|
+
*
|
|
78
|
+
* @remarks
|
|
79
|
+
* Lists files the vendor has uploaded across all their credentials, ordered by upload date descending. Excludes decline-document uploads.
|
|
80
|
+
*/
|
|
81
|
+
export function useVendorsGetVendorUploadHistory(
|
|
82
|
+
request: operations.GetVendorUploadHistoryRequest,
|
|
83
|
+
options?: QueryHookOptions<
|
|
84
|
+
VendorsGetVendorUploadHistoryQueryData,
|
|
85
|
+
VendorsGetVendorUploadHistoryQueryError
|
|
86
|
+
>,
|
|
87
|
+
): UseQueryResult<
|
|
88
|
+
VendorsGetVendorUploadHistoryQueryData,
|
|
89
|
+
VendorsGetVendorUploadHistoryQueryError
|
|
90
|
+
> {
|
|
91
|
+
const client = useGreenSecurityContext();
|
|
92
|
+
return useQuery({
|
|
93
|
+
...buildVendorsGetVendorUploadHistoryQuery(
|
|
94
|
+
client,
|
|
95
|
+
request,
|
|
96
|
+
options,
|
|
97
|
+
),
|
|
98
|
+
...options,
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Get vendor upload history
|
|
104
|
+
*
|
|
105
|
+
* @remarks
|
|
106
|
+
* Lists files the vendor has uploaded across all their credentials, ordered by upload date descending. Excludes decline-document uploads.
|
|
107
|
+
*/
|
|
108
|
+
export function useVendorsGetVendorUploadHistorySuspense(
|
|
109
|
+
request: operations.GetVendorUploadHistoryRequest,
|
|
110
|
+
options?: SuspenseQueryHookOptions<
|
|
111
|
+
VendorsGetVendorUploadHistoryQueryData,
|
|
112
|
+
VendorsGetVendorUploadHistoryQueryError
|
|
113
|
+
>,
|
|
114
|
+
): UseSuspenseQueryResult<
|
|
115
|
+
VendorsGetVendorUploadHistoryQueryData,
|
|
116
|
+
VendorsGetVendorUploadHistoryQueryError
|
|
117
|
+
> {
|
|
118
|
+
const client = useGreenSecurityContext();
|
|
119
|
+
return useSuspenseQuery({
|
|
120
|
+
...buildVendorsGetVendorUploadHistoryQuery(
|
|
121
|
+
client,
|
|
122
|
+
request,
|
|
123
|
+
options,
|
|
124
|
+
),
|
|
125
|
+
...options,
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Get vendor upload history
|
|
131
|
+
*
|
|
132
|
+
* @remarks
|
|
133
|
+
* Lists files the vendor has uploaded across all their credentials, ordered by upload date descending. Excludes decline-document uploads.
|
|
134
|
+
*/
|
|
135
|
+
export function useVendorsGetVendorUploadHistoryInfinite(
|
|
136
|
+
request: operations.GetVendorUploadHistoryRequest,
|
|
137
|
+
options?: InfiniteQueryHookOptions<
|
|
138
|
+
VendorsGetVendorUploadHistoryInfiniteQueryData,
|
|
139
|
+
VendorsGetVendorUploadHistoryQueryError
|
|
140
|
+
>,
|
|
141
|
+
): UseInfiniteQueryResult<
|
|
142
|
+
InfiniteData<
|
|
143
|
+
VendorsGetVendorUploadHistoryInfiniteQueryData,
|
|
144
|
+
VendorsGetVendorUploadHistoryPageParams
|
|
145
|
+
>,
|
|
146
|
+
VendorsGetVendorUploadHistoryQueryError
|
|
147
|
+
> {
|
|
148
|
+
const client = useGreenSecurityContext();
|
|
149
|
+
return useInfiniteQuery<
|
|
150
|
+
VendorsGetVendorUploadHistoryInfiniteQueryData,
|
|
151
|
+
VendorsGetVendorUploadHistoryQueryError,
|
|
152
|
+
InfiniteData<
|
|
153
|
+
VendorsGetVendorUploadHistoryInfiniteQueryData,
|
|
154
|
+
VendorsGetVendorUploadHistoryPageParams
|
|
155
|
+
>,
|
|
156
|
+
QueryKey,
|
|
157
|
+
VendorsGetVendorUploadHistoryPageParams
|
|
158
|
+
>({
|
|
159
|
+
...buildVendorsGetVendorUploadHistoryInfiniteQuery(
|
|
160
|
+
client,
|
|
161
|
+
request,
|
|
162
|
+
options,
|
|
163
|
+
),
|
|
164
|
+
initialPageParam: options?.initialPageParam,
|
|
165
|
+
getNextPageParam: (previousPage) => previousPage["~next"],
|
|
166
|
+
...options,
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Get vendor upload history
|
|
172
|
+
*
|
|
173
|
+
* @remarks
|
|
174
|
+
* Lists files the vendor has uploaded across all their credentials, ordered by upload date descending. Excludes decline-document uploads.
|
|
175
|
+
*/
|
|
176
|
+
export function useVendorsGetVendorUploadHistoryInfiniteSuspense(
|
|
177
|
+
request: operations.GetVendorUploadHistoryRequest,
|
|
178
|
+
options?: SuspenseInfiniteQueryHookOptions<
|
|
179
|
+
VendorsGetVendorUploadHistoryInfiniteQueryData,
|
|
180
|
+
VendorsGetVendorUploadHistoryQueryError
|
|
181
|
+
>,
|
|
182
|
+
): UseSuspenseInfiniteQueryResult<
|
|
183
|
+
InfiniteData<
|
|
184
|
+
VendorsGetVendorUploadHistoryInfiniteQueryData,
|
|
185
|
+
VendorsGetVendorUploadHistoryPageParams
|
|
186
|
+
>,
|
|
187
|
+
VendorsGetVendorUploadHistoryQueryError
|
|
188
|
+
> {
|
|
189
|
+
const client = useGreenSecurityContext();
|
|
190
|
+
return useSuspenseInfiniteQuery<
|
|
191
|
+
VendorsGetVendorUploadHistoryInfiniteQueryData,
|
|
192
|
+
VendorsGetVendorUploadHistoryQueryError,
|
|
193
|
+
InfiniteData<
|
|
194
|
+
VendorsGetVendorUploadHistoryInfiniteQueryData,
|
|
195
|
+
VendorsGetVendorUploadHistoryPageParams
|
|
196
|
+
>,
|
|
197
|
+
QueryKey,
|
|
198
|
+
VendorsGetVendorUploadHistoryPageParams
|
|
199
|
+
>({
|
|
200
|
+
...buildVendorsGetVendorUploadHistoryInfiniteQuery(
|
|
201
|
+
client,
|
|
202
|
+
request,
|
|
203
|
+
options,
|
|
204
|
+
),
|
|
205
|
+
initialPageParam: options?.initialPageParam,
|
|
206
|
+
getNextPageParam: (previousPage) => previousPage["~next"],
|
|
207
|
+
...options,
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
export function setVendorsGetVendorUploadHistoryData(
|
|
212
|
+
client: QueryClient,
|
|
213
|
+
queryKeyBase: [
|
|
214
|
+
vendorIdOrMe: string,
|
|
215
|
+
parameters: {
|
|
216
|
+
sort?: string | null | undefined;
|
|
217
|
+
desc?: components.Desc | undefined;
|
|
218
|
+
page?: number | undefined;
|
|
219
|
+
itemsPerPage?: number | undefined;
|
|
220
|
+
},
|
|
221
|
+
],
|
|
222
|
+
data: VendorsGetVendorUploadHistoryQueryData,
|
|
223
|
+
): VendorsGetVendorUploadHistoryQueryData | undefined {
|
|
224
|
+
const key = queryKeyVendorsGetVendorUploadHistory(...queryKeyBase);
|
|
225
|
+
|
|
226
|
+
return client.setQueryData<VendorsGetVendorUploadHistoryQueryData>(key, data);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
export function invalidateVendorsGetVendorUploadHistory(
|
|
230
|
+
client: QueryClient,
|
|
231
|
+
queryKeyBase: TupleToPrefixes<
|
|
232
|
+
[
|
|
233
|
+
vendorIdOrMe: string,
|
|
234
|
+
parameters: {
|
|
235
|
+
sort?: string | null | undefined;
|
|
236
|
+
desc?: components.Desc | undefined;
|
|
237
|
+
page?: number | undefined;
|
|
238
|
+
itemsPerPage?: number | undefined;
|
|
239
|
+
},
|
|
240
|
+
]
|
|
241
|
+
>,
|
|
242
|
+
filters?: Omit<InvalidateQueryFilters, "queryKey" | "predicate" | "exact">,
|
|
243
|
+
): Promise<void> {
|
|
244
|
+
return client.invalidateQueries({
|
|
245
|
+
...filters,
|
|
246
|
+
queryKey: [
|
|
247
|
+
"@greensecurity/javascript-sdk",
|
|
248
|
+
"vendors",
|
|
249
|
+
"getVendorUploadHistory",
|
|
250
|
+
...queryKeyBase,
|
|
251
|
+
],
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
export function invalidateAllVendorsGetVendorUploadHistory(
|
|
256
|
+
client: QueryClient,
|
|
257
|
+
filters?: Omit<InvalidateQueryFilters, "queryKey" | "predicate" | "exact">,
|
|
258
|
+
): Promise<void> {
|
|
259
|
+
return client.invalidateQueries({
|
|
260
|
+
...filters,
|
|
261
|
+
queryKey: [
|
|
262
|
+
"@greensecurity/javascript-sdk",
|
|
263
|
+
"vendors",
|
|
264
|
+
"getVendorUploadHistory",
|
|
265
|
+
],
|
|
266
|
+
});
|
|
267
|
+
}
|
package/src/sdk/vendors.ts
CHANGED
|
@@ -28,6 +28,7 @@ import { vendorsGetVendorInvoiceDetails } from "../funcs/vendorsGetVendorInvoice
|
|
|
28
28
|
import { vendorsGetVendorInvoiceReceipt } from "../funcs/vendorsGetVendorInvoiceReceipt.js";
|
|
29
29
|
import { vendorsGetVendorLegalName } from "../funcs/vendorsGetVendorLegalName.js";
|
|
30
30
|
import { vendorsGetVendorsDetails } from "../funcs/vendorsGetVendorsDetails.js";
|
|
31
|
+
import { vendorsGetVendorUploadHistory } from "../funcs/vendorsGetVendorUploadHistory.js";
|
|
31
32
|
import { vendorsListVendorAdditionalFacilityFields } from "../funcs/vendorsListVendorAdditionalFacilityFields.js";
|
|
32
33
|
import { vendorsListVendorCredentialDataRequests } from "../funcs/vendorsListVendorCredentialDataRequests.js";
|
|
33
34
|
import { vendorsListVendorCredentialFiles } from "../funcs/vendorsListVendorCredentialFiles.js";
|
|
@@ -1086,6 +1087,25 @@ export class Vendors extends ClientSDK {
|
|
|
1086
1087
|
));
|
|
1087
1088
|
}
|
|
1088
1089
|
|
|
1090
|
+
/**
|
|
1091
|
+
* Get vendor upload history
|
|
1092
|
+
*
|
|
1093
|
+
* @remarks
|
|
1094
|
+
* Lists files the vendor has uploaded across all their credentials, ordered by upload date descending. Excludes decline-document uploads.
|
|
1095
|
+
*/
|
|
1096
|
+
async getVendorUploadHistory(
|
|
1097
|
+
request: operations.GetVendorUploadHistoryRequest,
|
|
1098
|
+
options?: RequestOptions,
|
|
1099
|
+
): Promise<
|
|
1100
|
+
PageIterator<operations.GetVendorUploadHistoryResponse, { page: number }>
|
|
1101
|
+
> {
|
|
1102
|
+
return unwrapResultIterator(vendorsGetVendorUploadHistory(
|
|
1103
|
+
this,
|
|
1104
|
+
request,
|
|
1105
|
+
options,
|
|
1106
|
+
));
|
|
1107
|
+
}
|
|
1108
|
+
|
|
1089
1109
|
/**
|
|
1090
1110
|
* Get a one-time URL for uploading a credential file for automatic classification (Emerald vendors only)
|
|
1091
1111
|
*
|