@greensecurity/javascript-sdk 0.44.0-beta.17 → 0.44.0-beta.19
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 +9 -0
- package/dist/commonjs/__tests__/organizations.test.js +57 -0
- package/dist/commonjs/__tests__/organizations.test.js.map +1 -1
- package/dist/commonjs/__tests__/zones.test.js +9 -37
- package/dist/commonjs/__tests__/zones.test.js.map +1 -1
- package/dist/commonjs/funcs/organizationsDownloadFacilityVendorsExport.d.ts +22 -0
- package/dist/commonjs/funcs/organizationsDownloadFacilityVendorsExport.d.ts.map +1 -0
- package/dist/commonjs/funcs/organizationsDownloadFacilityVendorsExport.js +132 -0
- package/dist/commonjs/funcs/organizationsDownloadFacilityVendorsExport.js.map +1 -0
- package/dist/commonjs/funcs/organizationsExportFacilityVendors.d.ts +34 -0
- package/dist/commonjs/funcs/organizationsExportFacilityVendors.d.ts.map +1 -0
- package/dist/commonjs/funcs/organizationsExportFacilityVendors.js +148 -0
- package/dist/commonjs/funcs/organizationsExportFacilityVendors.js.map +1 -0
- package/dist/commonjs/funcs/organizationsGetFacilityVendorsExportStatus.d.ts +22 -0
- package/dist/commonjs/funcs/organizationsGetFacilityVendorsExportStatus.d.ts.map +1 -0
- package/dist/commonjs/funcs/organizationsGetFacilityVendorsExportStatus.js +131 -0
- package/dist/commonjs/funcs/organizationsGetFacilityVendorsExportStatus.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/lib/sdks.d.ts.map +1 -1
- package/dist/commonjs/lib/sdks.js +37 -12
- package/dist/commonjs/lib/sdks.js.map +1 -1
- package/dist/commonjs/models/components/csvexportstatusresponse.d.ts +43 -0
- package/dist/commonjs/models/components/csvexportstatusresponse.d.ts.map +1 -0
- package/dist/commonjs/models/components/csvexportstatusresponse.js +65 -0
- package/dist/commonjs/models/components/csvexportstatusresponse.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/components/productvariant.d.ts +10 -0
- package/dist/commonjs/models/components/productvariant.d.ts.map +1 -1
- package/dist/commonjs/models/components/productvariant.js +4 -0
- package/dist/commonjs/models/components/productvariant.js.map +1 -1
- package/dist/commonjs/models/operations/downloadfacilityvendorsexport.d.ts +47 -0
- package/dist/commonjs/models/operations/downloadfacilityvendorsexport.d.ts.map +1 -0
- package/dist/commonjs/models/operations/downloadfacilityvendorsexport.js +80 -0
- package/dist/commonjs/models/operations/downloadfacilityvendorsexport.js.map +1 -0
- package/dist/commonjs/models/operations/exportfacilityvendors.d.ts +118 -0
- package/dist/commonjs/models/operations/exportfacilityvendors.d.ts.map +1 -0
- package/dist/commonjs/models/operations/exportfacilityvendors.js +115 -0
- package/dist/commonjs/models/operations/exportfacilityvendors.js.map +1 -0
- package/dist/commonjs/models/operations/getfacilityvendorsexportstatus.d.ts +20 -0
- package/dist/commonjs/models/operations/getfacilityvendorsexportstatus.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getfacilityvendorsexportstatus.js +55 -0
- package/dist/commonjs/models/operations/getfacilityvendorsexportstatus.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +3 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +3 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/react-query/index.d.ts +3 -0
- package/dist/commonjs/react-query/index.d.ts.map +1 -1
- package/dist/commonjs/react-query/index.js +3 -0
- package/dist/commonjs/react-query/index.js.map +1 -1
- package/dist/commonjs/react-query/organizationsDownloadFacilityVendorsExport.core.d.ts +12 -0
- package/dist/commonjs/react-query/organizationsDownloadFacilityVendorsExport.core.d.ts.map +1 -0
- package/dist/commonjs/react-query/organizationsDownloadFacilityVendorsExport.core.js +40 -0
- package/dist/commonjs/react-query/organizationsDownloadFacilityVendorsExport.core.js.map +1 -0
- package/dist/commonjs/react-query/organizationsDownloadFacilityVendorsExport.d.ts +33 -0
- package/dist/commonjs/react-query/organizationsDownloadFacilityVendorsExport.d.ts.map +1 -0
- package/dist/commonjs/react-query/organizationsDownloadFacilityVendorsExport.js +73 -0
- package/dist/commonjs/react-query/organizationsDownloadFacilityVendorsExport.js.map +1 -0
- package/dist/commonjs/react-query/organizationsExportFacilityVendors.core.d.ts +19 -0
- package/dist/commonjs/react-query/organizationsExportFacilityVendors.core.d.ts.map +1 -0
- package/dist/commonjs/react-query/organizationsExportFacilityVendors.core.js +47 -0
- package/dist/commonjs/react-query/organizationsExportFacilityVendors.core.js.map +1 -0
- package/dist/commonjs/react-query/organizationsExportFacilityVendors.d.ts +77 -0
- package/dist/commonjs/react-query/organizationsExportFacilityVendors.d.ts.map +1 -0
- package/dist/commonjs/react-query/organizationsExportFacilityVendors.js +97 -0
- package/dist/commonjs/react-query/organizationsExportFacilityVendors.js.map +1 -0
- package/dist/commonjs/react-query/organizationsGetFacilityVendorsExportStatus.core.d.ts +13 -0
- package/dist/commonjs/react-query/organizationsGetFacilityVendorsExportStatus.core.d.ts.map +1 -0
- package/dist/commonjs/react-query/organizationsGetFacilityVendorsExportStatus.core.js +40 -0
- package/dist/commonjs/react-query/organizationsGetFacilityVendorsExportStatus.core.js.map +1 -0
- package/dist/commonjs/react-query/organizationsGetFacilityVendorsExportStatus.d.ts +31 -0
- package/dist/commonjs/react-query/organizationsGetFacilityVendorsExportStatus.d.ts.map +1 -0
- package/dist/commonjs/react-query/organizationsGetFacilityVendorsExportStatus.js +71 -0
- package/dist/commonjs/react-query/organizationsGetFacilityVendorsExportStatus.js.map +1 -0
- package/dist/commonjs/sdk/organizations.d.ts +38 -0
- package/dist/commonjs/sdk/organizations.d.ts.map +1 -1
- package/dist/commonjs/sdk/organizations.js +47 -0
- package/dist/commonjs/sdk/organizations.js.map +1 -1
- package/dist/esm/__tests__/organizations.test.js +57 -0
- package/dist/esm/__tests__/organizations.test.js.map +1 -1
- package/dist/esm/__tests__/zones.test.js +9 -37
- package/dist/esm/__tests__/zones.test.js.map +1 -1
- package/dist/esm/funcs/organizationsDownloadFacilityVendorsExport.d.ts +22 -0
- package/dist/esm/funcs/organizationsDownloadFacilityVendorsExport.d.ts.map +1 -0
- package/dist/esm/funcs/organizationsDownloadFacilityVendorsExport.js +96 -0
- package/dist/esm/funcs/organizationsDownloadFacilityVendorsExport.js.map +1 -0
- package/dist/esm/funcs/organizationsExportFacilityVendors.d.ts +34 -0
- package/dist/esm/funcs/organizationsExportFacilityVendors.d.ts.map +1 -0
- package/dist/esm/funcs/organizationsExportFacilityVendors.js +112 -0
- package/dist/esm/funcs/organizationsExportFacilityVendors.js.map +1 -0
- package/dist/esm/funcs/organizationsGetFacilityVendorsExportStatus.d.ts +22 -0
- package/dist/esm/funcs/organizationsGetFacilityVendorsExportStatus.d.ts.map +1 -0
- package/dist/esm/funcs/organizationsGetFacilityVendorsExportStatus.js +95 -0
- package/dist/esm/funcs/organizationsGetFacilityVendorsExportStatus.js.map +1 -0
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/lib/sdks.d.ts.map +1 -1
- package/dist/esm/lib/sdks.js +37 -12
- package/dist/esm/lib/sdks.js.map +1 -1
- package/dist/esm/models/components/csvexportstatusresponse.d.ts +43 -0
- package/dist/esm/models/components/csvexportstatusresponse.d.ts.map +1 -0
- package/dist/esm/models/components/csvexportstatusresponse.js +28 -0
- package/dist/esm/models/components/csvexportstatusresponse.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/components/productvariant.d.ts +10 -0
- package/dist/esm/models/components/productvariant.d.ts.map +1 -1
- package/dist/esm/models/components/productvariant.js +4 -0
- package/dist/esm/models/components/productvariant.js.map +1 -1
- package/dist/esm/models/operations/downloadfacilityvendorsexport.d.ts +47 -0
- package/dist/esm/models/operations/downloadfacilityvendorsexport.d.ts.map +1 -0
- package/dist/esm/models/operations/downloadfacilityvendorsexport.js +41 -0
- package/dist/esm/models/operations/downloadfacilityvendorsexport.js.map +1 -0
- package/dist/esm/models/operations/exportfacilityvendors.d.ts +118 -0
- package/dist/esm/models/operations/exportfacilityvendors.d.ts.map +1 -0
- package/dist/esm/models/operations/exportfacilityvendors.js +76 -0
- package/dist/esm/models/operations/exportfacilityvendors.js.map +1 -0
- package/dist/esm/models/operations/getfacilityvendorsexportstatus.d.ts +20 -0
- package/dist/esm/models/operations/getfacilityvendorsexportstatus.d.ts.map +1 -0
- package/dist/esm/models/operations/getfacilityvendorsexportstatus.js +18 -0
- package/dist/esm/models/operations/getfacilityvendorsexportstatus.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +3 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +3 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/react-query/index.d.ts +3 -0
- package/dist/esm/react-query/index.d.ts.map +1 -1
- package/dist/esm/react-query/index.js +3 -0
- package/dist/esm/react-query/index.js.map +1 -1
- package/dist/esm/react-query/organizationsDownloadFacilityVendorsExport.core.d.ts +12 -0
- package/dist/esm/react-query/organizationsDownloadFacilityVendorsExport.core.d.ts.map +1 -0
- package/dist/esm/react-query/organizationsDownloadFacilityVendorsExport.core.js +35 -0
- package/dist/esm/react-query/organizationsDownloadFacilityVendorsExport.core.js.map +1 -0
- package/dist/esm/react-query/organizationsDownloadFacilityVendorsExport.d.ts +33 -0
- package/dist/esm/react-query/organizationsDownloadFacilityVendorsExport.d.ts.map +1 -0
- package/dist/esm/react-query/organizationsDownloadFacilityVendorsExport.js +63 -0
- package/dist/esm/react-query/organizationsDownloadFacilityVendorsExport.js.map +1 -0
- package/dist/esm/react-query/organizationsExportFacilityVendors.core.d.ts +19 -0
- package/dist/esm/react-query/organizationsExportFacilityVendors.core.d.ts.map +1 -0
- package/dist/esm/react-query/organizationsExportFacilityVendors.core.js +42 -0
- package/dist/esm/react-query/organizationsExportFacilityVendors.core.js.map +1 -0
- package/dist/esm/react-query/organizationsExportFacilityVendors.d.ts +77 -0
- package/dist/esm/react-query/organizationsExportFacilityVendors.d.ts.map +1 -0
- package/dist/esm/react-query/organizationsExportFacilityVendors.js +87 -0
- package/dist/esm/react-query/organizationsExportFacilityVendors.js.map +1 -0
- package/dist/esm/react-query/organizationsGetFacilityVendorsExportStatus.core.d.ts +13 -0
- package/dist/esm/react-query/organizationsGetFacilityVendorsExportStatus.core.d.ts.map +1 -0
- package/dist/esm/react-query/organizationsGetFacilityVendorsExportStatus.core.js +35 -0
- package/dist/esm/react-query/organizationsGetFacilityVendorsExportStatus.core.js.map +1 -0
- package/dist/esm/react-query/organizationsGetFacilityVendorsExportStatus.d.ts +31 -0
- package/dist/esm/react-query/organizationsGetFacilityVendorsExportStatus.d.ts.map +1 -0
- package/dist/esm/react-query/organizationsGetFacilityVendorsExportStatus.js +61 -0
- package/dist/esm/react-query/organizationsGetFacilityVendorsExportStatus.js.map +1 -0
- package/dist/esm/sdk/organizations.d.ts +38 -0
- package/dist/esm/sdk/organizations.d.ts.map +1 -1
- package/dist/esm/sdk/organizations.js +47 -0
- package/dist/esm/sdk/organizations.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/__tests__/organizations.test.ts +66 -0
- package/src/__tests__/zones.test.ts +9 -37
- package/src/funcs/organizationsDownloadFacilityVendorsExport.ts +202 -0
- package/src/funcs/organizationsExportFacilityVendors.ts +202 -0
- package/src/funcs/organizationsGetFacilityVendorsExportStatus.ts +188 -0
- package/src/lib/config.ts +3 -3
- package/src/lib/sdks.ts +41 -13
- package/src/models/components/csvexportstatusresponse.ts +79 -0
- package/src/models/components/index.ts +1 -0
- package/src/models/components/productvariant.ts +10 -0
- package/src/models/operations/downloadfacilityvendorsexport.ts +124 -0
- package/src/models/operations/exportfacilityvendors.ts +206 -0
- package/src/models/operations/getfacilityvendorsexportstatus.ts +47 -0
- package/src/models/operations/index.ts +3 -0
- package/src/react-query/index.ts +3 -0
- package/src/react-query/organizationsDownloadFacilityVendorsExport.core.ts +84 -0
- package/src/react-query/organizationsDownloadFacilityVendorsExport.ts +155 -0
- package/src/react-query/organizationsExportFacilityVendors.core.ts +94 -0
- package/src/react-query/organizationsExportFacilityVendors.ts +200 -0
- package/src/react-query/organizationsGetFacilityVendorsExportStatus.core.ts +84 -0
- package/src/react-query/organizationsGetFacilityVendorsExportStatus.ts +153 -0
- package/src/sdk/organizations.ts +71 -0
package/src/lib/sdks.ts
CHANGED
|
@@ -133,27 +133,55 @@ export class ClientSDK {
|
|
|
133
133
|
if (path) {
|
|
134
134
|
baseURL.pathname = baseURL.pathname.replace(/\/+$/, "") + "/";
|
|
135
135
|
reqURL = new URL(path, baseURL);
|
|
136
|
+
if (!reqURL.search && baseURL.search) {
|
|
137
|
+
reqURL.search = baseURL.search;
|
|
138
|
+
}
|
|
136
139
|
} else {
|
|
137
140
|
reqURL = baseURL;
|
|
138
141
|
}
|
|
139
142
|
reqURL.hash = "";
|
|
140
143
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
const
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
if (typeof q !== "undefined") {
|
|
147
|
-
secQuery.push(q);
|
|
144
|
+
// Appends already-encoded query pairs to a query string, replacing any
|
|
145
|
+
// existing pairs with the same key so later sources take precedence.
|
|
146
|
+
const mergeQuery = (current: string, additions: string): string => {
|
|
147
|
+
if (!additions) {
|
|
148
|
+
return current;
|
|
148
149
|
}
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
150
|
+
const additionKeys = new Set(
|
|
151
|
+
additions
|
|
152
|
+
.split("&")
|
|
153
|
+
.filter((pair) => pair !== "")
|
|
154
|
+
.map((pair) => pair.split("=")[0] ?? ""),
|
|
155
|
+
);
|
|
156
|
+
const kept = current.split("&").filter((pair) => {
|
|
157
|
+
return pair !== "" && !additionKeys.has(pair.split("=")[0] ?? "");
|
|
158
|
+
});
|
|
159
|
+
return [...kept, additions].join("&");
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
const encodeQueryRecord = (record: Record<string, unknown>): string => {
|
|
163
|
+
return Object.entries(record)
|
|
164
|
+
.map(([k, v]) => {
|
|
165
|
+
if (v == null) {
|
|
166
|
+
return undefined;
|
|
167
|
+
}
|
|
168
|
+
const value = v;
|
|
169
|
+
return encodeForm(k, value, {
|
|
170
|
+
explode: Array.isArray(value),
|
|
171
|
+
charEncoding: "percent",
|
|
172
|
+
});
|
|
173
|
+
})
|
|
174
|
+
.filter((pair): pair is string => typeof pair !== "undefined")
|
|
175
|
+
.join("&");
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
const finalQuery = [
|
|
179
|
+
query || "",
|
|
180
|
+
encodeQueryRecord(security?.queryParams || {}),
|
|
181
|
+
].reduce(mergeQuery, reqURL.search.slice(1));
|
|
153
182
|
|
|
154
183
|
if (finalQuery) {
|
|
155
|
-
|
|
156
|
-
reqURL.search = `?${q}`;
|
|
184
|
+
reqURL.search = `?${finalQuery}`;
|
|
157
185
|
}
|
|
158
186
|
|
|
159
187
|
const headers = new Headers(opHeaders);
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
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 types from "../../types/primitives.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Returned when polling the status of an asynchronous CSV export job. When `ready` is true,
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
* the export is complete and can be downloaded via the URL in `download_url`.
|
|
17
|
+
*/
|
|
18
|
+
export type CsvExportStatusResponse = {
|
|
19
|
+
/**
|
|
20
|
+
* When true, the export is ready for download.
|
|
21
|
+
*/
|
|
22
|
+
ready: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* The export job identifier.
|
|
25
|
+
*/
|
|
26
|
+
statusId: string;
|
|
27
|
+
/**
|
|
28
|
+
* URL to download the CSV (present only when `ready` is true).
|
|
29
|
+
*/
|
|
30
|
+
downloadUrl?: string | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* When the export job completed.
|
|
33
|
+
*/
|
|
34
|
+
finishedAt?: string | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* When the export job started.
|
|
37
|
+
*/
|
|
38
|
+
startedAt?: string | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* Timestamp of the last progress heartbeat from the background job. Updated on each pagination loop while the job is running; on completion or failure it equals `finished_at`.
|
|
41
|
+
*/
|
|
42
|
+
heartbeat?: string | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* Error message if the export failed.
|
|
45
|
+
*/
|
|
46
|
+
error?: string | undefined;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
/** @internal */
|
|
50
|
+
export const CsvExportStatusResponse$inboundSchema: z.ZodType<
|
|
51
|
+
CsvExportStatusResponse,
|
|
52
|
+
z.ZodTypeDef,
|
|
53
|
+
unknown
|
|
54
|
+
> = z.object({
|
|
55
|
+
ready: types.boolean(),
|
|
56
|
+
status_id: types.string(),
|
|
57
|
+
download_url: types.optional(types.string()),
|
|
58
|
+
finished_at: types.optional(types.string()),
|
|
59
|
+
started_at: types.optional(types.string()),
|
|
60
|
+
heartbeat: types.optional(types.string()),
|
|
61
|
+
error: types.optional(types.string()),
|
|
62
|
+
}).transform((v) => {
|
|
63
|
+
return remap$(v, {
|
|
64
|
+
"status_id": "statusId",
|
|
65
|
+
"download_url": "downloadUrl",
|
|
66
|
+
"finished_at": "finishedAt",
|
|
67
|
+
"started_at": "startedAt",
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
export function csvExportStatusResponseFromJSON(
|
|
72
|
+
jsonString: string,
|
|
73
|
+
): SafeParseResult<CsvExportStatusResponse, SDKValidationError> {
|
|
74
|
+
return safeParse(
|
|
75
|
+
jsonString,
|
|
76
|
+
(x) => CsvExportStatusResponse$inboundSchema.parse(JSON.parse(x)),
|
|
77
|
+
`Failed to parse 'CsvExportStatusResponse' from JSON`,
|
|
78
|
+
);
|
|
79
|
+
}
|
|
@@ -20,6 +20,7 @@ export * from "./credentialdocument.js";
|
|
|
20
20
|
export * from "./credentialstatus.js";
|
|
21
21
|
export * from "./credit.js";
|
|
22
22
|
export * from "./csvexportenqueuedresponse.js";
|
|
23
|
+
export * from "./csvexportstatusresponse.js";
|
|
23
24
|
export * from "./datarequest.js";
|
|
24
25
|
export * from "./deleteapiresponse.js";
|
|
25
26
|
export * from "./department.js";
|
|
@@ -10,11 +10,18 @@ import { Result as SafeParseResult } from "../../types/fp.js";
|
|
|
10
10
|
import * as types from "../../types/primitives.js";
|
|
11
11
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
12
12
|
|
|
13
|
+
/**
|
|
14
|
+
* Subscription interval of variant, if any.
|
|
15
|
+
*/
|
|
13
16
|
export const Recurrence = {
|
|
14
17
|
Monthly: "monthly",
|
|
15
18
|
Yearly: "yearly",
|
|
19
|
+
NinetyDays: "90_days",
|
|
16
20
|
Once: "once",
|
|
17
21
|
} as const;
|
|
22
|
+
/**
|
|
23
|
+
* Subscription interval of variant, if any.
|
|
24
|
+
*/
|
|
18
25
|
export type Recurrence = OpenEnum<typeof Recurrence>;
|
|
19
26
|
|
|
20
27
|
/**
|
|
@@ -24,6 +31,9 @@ export type ProductVariant = {
|
|
|
24
31
|
id?: number | undefined;
|
|
25
32
|
price?: number | undefined;
|
|
26
33
|
title?: string | null | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* Subscription interval of variant, if any.
|
|
36
|
+
*/
|
|
27
37
|
recurrence?: Recurrence | null | undefined;
|
|
28
38
|
};
|
|
29
39
|
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
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 types from "../../types/primitives.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type DownloadFacilityVendorsExportRequest = {
|
|
13
|
+
/**
|
|
14
|
+
* The facility whose export is being downloaded.
|
|
15
|
+
*/
|
|
16
|
+
id: number;
|
|
17
|
+
/**
|
|
18
|
+
* Export id returned by the export endpoint (e.g. `fv_export_42`).
|
|
19
|
+
*/
|
|
20
|
+
exportId: string;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Export is still being generated
|
|
25
|
+
*/
|
|
26
|
+
export type DownloadFacilityVendorsExportResponseBody = {
|
|
27
|
+
/**
|
|
28
|
+
* Always `false` when returned by this endpoint.
|
|
29
|
+
*/
|
|
30
|
+
ready?: boolean | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Human-readable message about the export status.
|
|
33
|
+
*/
|
|
34
|
+
message?: string | undefined;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export type DownloadFacilityVendorsExportResponse = {
|
|
38
|
+
headers: { [k: string]: Array<string> };
|
|
39
|
+
result?: DownloadFacilityVendorsExportResponseBody | undefined;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
/** @internal */
|
|
43
|
+
export type DownloadFacilityVendorsExportRequest$Outbound = {
|
|
44
|
+
id: number;
|
|
45
|
+
export_id: string;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
/** @internal */
|
|
49
|
+
export const DownloadFacilityVendorsExportRequest$outboundSchema: z.ZodType<
|
|
50
|
+
DownloadFacilityVendorsExportRequest$Outbound,
|
|
51
|
+
z.ZodTypeDef,
|
|
52
|
+
DownloadFacilityVendorsExportRequest
|
|
53
|
+
> = z.object({
|
|
54
|
+
id: z.number().int(),
|
|
55
|
+
exportId: z.string(),
|
|
56
|
+
}).transform((v) => {
|
|
57
|
+
return remap$(v, {
|
|
58
|
+
exportId: "export_id",
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
export function downloadFacilityVendorsExportRequestToJSON(
|
|
63
|
+
downloadFacilityVendorsExportRequest: DownloadFacilityVendorsExportRequest,
|
|
64
|
+
): string {
|
|
65
|
+
return JSON.stringify(
|
|
66
|
+
DownloadFacilityVendorsExportRequest$outboundSchema.parse(
|
|
67
|
+
downloadFacilityVendorsExportRequest,
|
|
68
|
+
),
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/** @internal */
|
|
73
|
+
export const DownloadFacilityVendorsExportResponseBody$inboundSchema: z.ZodType<
|
|
74
|
+
DownloadFacilityVendorsExportResponseBody,
|
|
75
|
+
z.ZodTypeDef,
|
|
76
|
+
unknown
|
|
77
|
+
> = z.object({
|
|
78
|
+
ready: types.optional(types.boolean()),
|
|
79
|
+
message: types.optional(types.string()),
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
export function downloadFacilityVendorsExportResponseBodyFromJSON(
|
|
83
|
+
jsonString: string,
|
|
84
|
+
): SafeParseResult<
|
|
85
|
+
DownloadFacilityVendorsExportResponseBody,
|
|
86
|
+
SDKValidationError
|
|
87
|
+
> {
|
|
88
|
+
return safeParse(
|
|
89
|
+
jsonString,
|
|
90
|
+
(x) =>
|
|
91
|
+
DownloadFacilityVendorsExportResponseBody$inboundSchema.parse(
|
|
92
|
+
JSON.parse(x),
|
|
93
|
+
),
|
|
94
|
+
`Failed to parse 'DownloadFacilityVendorsExportResponseBody' from JSON`,
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/** @internal */
|
|
99
|
+
export const DownloadFacilityVendorsExportResponse$inboundSchema: z.ZodType<
|
|
100
|
+
DownloadFacilityVendorsExportResponse,
|
|
101
|
+
z.ZodTypeDef,
|
|
102
|
+
unknown
|
|
103
|
+
> = z.object({
|
|
104
|
+
Headers: z.record(z.array(z.string())).default({}),
|
|
105
|
+
Result: types.optional(
|
|
106
|
+
z.lazy(() => DownloadFacilityVendorsExportResponseBody$inboundSchema),
|
|
107
|
+
),
|
|
108
|
+
}).transform((v) => {
|
|
109
|
+
return remap$(v, {
|
|
110
|
+
"Headers": "headers",
|
|
111
|
+
"Result": "result",
|
|
112
|
+
});
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
export function downloadFacilityVendorsExportResponseFromJSON(
|
|
116
|
+
jsonString: string,
|
|
117
|
+
): SafeParseResult<DownloadFacilityVendorsExportResponse, SDKValidationError> {
|
|
118
|
+
return safeParse(
|
|
119
|
+
jsonString,
|
|
120
|
+
(x) =>
|
|
121
|
+
DownloadFacilityVendorsExportResponse$inboundSchema.parse(JSON.parse(x)),
|
|
122
|
+
`Failed to parse 'DownloadFacilityVendorsExportResponse' from JSON`,
|
|
123
|
+
);
|
|
124
|
+
}
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import * as types from "../../types/primitives.js";
|
|
11
|
+
import { smartUnion } from "../../types/smartUnion.js";
|
|
12
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Filter rows to a single facility access status. Omit for "All".
|
|
16
|
+
*/
|
|
17
|
+
export const ExportFacilityVendorsQueryParamStatus = {
|
|
18
|
+
Approved: "approved",
|
|
19
|
+
Pending: "pending",
|
|
20
|
+
Denied: "denied",
|
|
21
|
+
} as const;
|
|
22
|
+
/**
|
|
23
|
+
* Filter rows to a single facility access status. Omit for "All".
|
|
24
|
+
*/
|
|
25
|
+
export type ExportFacilityVendorsQueryParamStatus = ClosedEnum<
|
|
26
|
+
typeof ExportFacilityVendorsQueryParamStatus
|
|
27
|
+
>;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Sort field used by the exporter when ordering rows in the CSV. Defaults to `name`.
|
|
31
|
+
*/
|
|
32
|
+
export const ExportFacilityVendorsQueryParamSort = {
|
|
33
|
+
Id: "id",
|
|
34
|
+
Name: "name",
|
|
35
|
+
LastName: "last_name",
|
|
36
|
+
Email: "email",
|
|
37
|
+
Status: "status",
|
|
38
|
+
} as const;
|
|
39
|
+
/**
|
|
40
|
+
* Sort field used by the exporter when ordering rows in the CSV. Defaults to `name`.
|
|
41
|
+
*/
|
|
42
|
+
export type ExportFacilityVendorsQueryParamSort = ClosedEnum<
|
|
43
|
+
typeof ExportFacilityVendorsQueryParamSort
|
|
44
|
+
>;
|
|
45
|
+
|
|
46
|
+
export const QueryParam2 = {
|
|
47
|
+
Zero: 0,
|
|
48
|
+
One: 1,
|
|
49
|
+
} as const;
|
|
50
|
+
export type QueryParam2 = ClosedEnum<typeof QueryParam2>;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Sort descending flag.
|
|
54
|
+
*/
|
|
55
|
+
export type QueryParamDesc = boolean | QueryParam2;
|
|
56
|
+
|
|
57
|
+
export type ExportFacilityVendorsRequest = {
|
|
58
|
+
/**
|
|
59
|
+
* The facility whose vendors to export.
|
|
60
|
+
*/
|
|
61
|
+
id: number;
|
|
62
|
+
/**
|
|
63
|
+
* API users only — the company whose vendors to export. Ignored for company managers / vendors (resolved from the session).
|
|
64
|
+
*/
|
|
65
|
+
companyId?: number | undefined;
|
|
66
|
+
/**
|
|
67
|
+
* Filter rows to a single facility access status. Omit for "All".
|
|
68
|
+
*/
|
|
69
|
+
status?: ExportFacilityVendorsQueryParamStatus | undefined;
|
|
70
|
+
/**
|
|
71
|
+
* Single search term applied case-insensitively across first name, last name, full
|
|
72
|
+
*
|
|
73
|
+
* @remarks
|
|
74
|
+
* name, email, and any company custom-field value the vendor has set for a field
|
|
75
|
+
* flagged `show_to_vendor`.
|
|
76
|
+
*/
|
|
77
|
+
search?: string | undefined;
|
|
78
|
+
/**
|
|
79
|
+
* Sort field used by the exporter when ordering rows in the CSV. Defaults to `name`.
|
|
80
|
+
*/
|
|
81
|
+
sort?: ExportFacilityVendorsQueryParamSort | undefined;
|
|
82
|
+
/**
|
|
83
|
+
* Sort descending flag.
|
|
84
|
+
*/
|
|
85
|
+
desc?: boolean | QueryParam2 | undefined;
|
|
86
|
+
/**
|
|
87
|
+
* Page size used by the exporter while paginating results server-side. Does not affect the size of the CSV (all matching rows are included).
|
|
88
|
+
*/
|
|
89
|
+
itemsPerPage?: number | undefined;
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Export request accepted and job enqueued.
|
|
94
|
+
*/
|
|
95
|
+
export type ExportFacilityVendorsResponseBody = {
|
|
96
|
+
/**
|
|
97
|
+
* URL to poll for export status.
|
|
98
|
+
*/
|
|
99
|
+
statusUrl: string;
|
|
100
|
+
/**
|
|
101
|
+
* URL to download the exported file when ready.
|
|
102
|
+
*/
|
|
103
|
+
downloadUrl: string;
|
|
104
|
+
/**
|
|
105
|
+
* Status token used to check the export status.
|
|
106
|
+
*/
|
|
107
|
+
statusId: string;
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
/** @internal */
|
|
111
|
+
export const ExportFacilityVendorsQueryParamStatus$outboundSchema:
|
|
112
|
+
z.ZodNativeEnum<typeof ExportFacilityVendorsQueryParamStatus> = z.nativeEnum(
|
|
113
|
+
ExportFacilityVendorsQueryParamStatus,
|
|
114
|
+
);
|
|
115
|
+
|
|
116
|
+
/** @internal */
|
|
117
|
+
export const ExportFacilityVendorsQueryParamSort$outboundSchema:
|
|
118
|
+
z.ZodNativeEnum<typeof ExportFacilityVendorsQueryParamSort> = z.nativeEnum(
|
|
119
|
+
ExportFacilityVendorsQueryParamSort,
|
|
120
|
+
);
|
|
121
|
+
|
|
122
|
+
/** @internal */
|
|
123
|
+
export const QueryParam2$outboundSchema: z.ZodNativeEnum<typeof QueryParam2> = z
|
|
124
|
+
.nativeEnum(QueryParam2);
|
|
125
|
+
|
|
126
|
+
/** @internal */
|
|
127
|
+
export type QueryParamDesc$Outbound = boolean | number;
|
|
128
|
+
|
|
129
|
+
/** @internal */
|
|
130
|
+
export const QueryParamDesc$outboundSchema: z.ZodType<
|
|
131
|
+
QueryParamDesc$Outbound,
|
|
132
|
+
z.ZodTypeDef,
|
|
133
|
+
QueryParamDesc
|
|
134
|
+
> = smartUnion([z.boolean(), QueryParam2$outboundSchema]);
|
|
135
|
+
|
|
136
|
+
export function queryParamDescToJSON(queryParamDesc: QueryParamDesc): string {
|
|
137
|
+
return JSON.stringify(QueryParamDesc$outboundSchema.parse(queryParamDesc));
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/** @internal */
|
|
141
|
+
export type ExportFacilityVendorsRequest$Outbound = {
|
|
142
|
+
id: number;
|
|
143
|
+
company_id?: number | undefined;
|
|
144
|
+
status?: string | undefined;
|
|
145
|
+
search?: string | undefined;
|
|
146
|
+
sort?: string | undefined;
|
|
147
|
+
desc?: boolean | number | undefined;
|
|
148
|
+
items_per_page?: number | undefined;
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
/** @internal */
|
|
152
|
+
export const ExportFacilityVendorsRequest$outboundSchema: z.ZodType<
|
|
153
|
+
ExportFacilityVendorsRequest$Outbound,
|
|
154
|
+
z.ZodTypeDef,
|
|
155
|
+
ExportFacilityVendorsRequest
|
|
156
|
+
> = z.object({
|
|
157
|
+
id: z.number().int(),
|
|
158
|
+
companyId: z.number().int().optional(),
|
|
159
|
+
status: ExportFacilityVendorsQueryParamStatus$outboundSchema.optional(),
|
|
160
|
+
search: z.string().optional(),
|
|
161
|
+
sort: ExportFacilityVendorsQueryParamSort$outboundSchema.optional(),
|
|
162
|
+
desc: smartUnion([z.boolean(), QueryParam2$outboundSchema]).optional(),
|
|
163
|
+
itemsPerPage: z.number().int().optional(),
|
|
164
|
+
}).transform((v) => {
|
|
165
|
+
return remap$(v, {
|
|
166
|
+
companyId: "company_id",
|
|
167
|
+
itemsPerPage: "items_per_page",
|
|
168
|
+
});
|
|
169
|
+
});
|
|
170
|
+
|
|
171
|
+
export function exportFacilityVendorsRequestToJSON(
|
|
172
|
+
exportFacilityVendorsRequest: ExportFacilityVendorsRequest,
|
|
173
|
+
): string {
|
|
174
|
+
return JSON.stringify(
|
|
175
|
+
ExportFacilityVendorsRequest$outboundSchema.parse(
|
|
176
|
+
exportFacilityVendorsRequest,
|
|
177
|
+
),
|
|
178
|
+
);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/** @internal */
|
|
182
|
+
export const ExportFacilityVendorsResponseBody$inboundSchema: z.ZodType<
|
|
183
|
+
ExportFacilityVendorsResponseBody,
|
|
184
|
+
z.ZodTypeDef,
|
|
185
|
+
unknown
|
|
186
|
+
> = z.object({
|
|
187
|
+
status_url: types.string(),
|
|
188
|
+
download_url: types.string(),
|
|
189
|
+
status_id: types.string(),
|
|
190
|
+
}).transform((v) => {
|
|
191
|
+
return remap$(v, {
|
|
192
|
+
"status_url": "statusUrl",
|
|
193
|
+
"download_url": "downloadUrl",
|
|
194
|
+
"status_id": "statusId",
|
|
195
|
+
});
|
|
196
|
+
});
|
|
197
|
+
|
|
198
|
+
export function exportFacilityVendorsResponseBodyFromJSON(
|
|
199
|
+
jsonString: string,
|
|
200
|
+
): SafeParseResult<ExportFacilityVendorsResponseBody, SDKValidationError> {
|
|
201
|
+
return safeParse(
|
|
202
|
+
jsonString,
|
|
203
|
+
(x) => ExportFacilityVendorsResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
204
|
+
`Failed to parse 'ExportFacilityVendorsResponseBody' from JSON`,
|
|
205
|
+
);
|
|
206
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
|
|
8
|
+
export type GetFacilityVendorsExportStatusRequest = {
|
|
9
|
+
/**
|
|
10
|
+
* The facility whose export is being polled.
|
|
11
|
+
*/
|
|
12
|
+
id: number;
|
|
13
|
+
/**
|
|
14
|
+
* Export status id returned by the export endpoint (e.g. `fv_export_42`).
|
|
15
|
+
*/
|
|
16
|
+
exportId: string;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export type GetFacilityVendorsExportStatusRequest$Outbound = {
|
|
21
|
+
id: number;
|
|
22
|
+
export_id: string;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/** @internal */
|
|
26
|
+
export const GetFacilityVendorsExportStatusRequest$outboundSchema: z.ZodType<
|
|
27
|
+
GetFacilityVendorsExportStatusRequest$Outbound,
|
|
28
|
+
z.ZodTypeDef,
|
|
29
|
+
GetFacilityVendorsExportStatusRequest
|
|
30
|
+
> = z.object({
|
|
31
|
+
id: z.number().int(),
|
|
32
|
+
exportId: z.string(),
|
|
33
|
+
}).transform((v) => {
|
|
34
|
+
return remap$(v, {
|
|
35
|
+
exportId: "export_id",
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
export function getFacilityVendorsExportStatusRequestToJSON(
|
|
40
|
+
getFacilityVendorsExportStatusRequest: GetFacilityVendorsExportStatusRequest,
|
|
41
|
+
): string {
|
|
42
|
+
return JSON.stringify(
|
|
43
|
+
GetFacilityVendorsExportStatusRequest$outboundSchema.parse(
|
|
44
|
+
getFacilityVendorsExportStatusRequest,
|
|
45
|
+
),
|
|
46
|
+
);
|
|
47
|
+
}
|
|
@@ -34,17 +34,20 @@ export * from "./deletepaymentprofile.js";
|
|
|
34
34
|
export * from "./deletevendorcredentialfile.js";
|
|
35
35
|
export * from "./deletevendormanagedbycompany.js";
|
|
36
36
|
export * from "./downloadcompanytargetfacilitiesexport.js";
|
|
37
|
+
export * from "./downloadfacilityvendorsexport.js";
|
|
37
38
|
export * from "./downloadinvoicesexport.js";
|
|
38
39
|
export * from "./downloadvendorscansexport.js";
|
|
39
40
|
export * from "./downloadvendorsexport.js";
|
|
40
41
|
export * from "./expeditetimeremaining.js";
|
|
41
42
|
export * from "./exportcompanytargetfacilities.js";
|
|
43
|
+
export * from "./exportfacilityvendors.js";
|
|
42
44
|
export * from "./exportvendorscans.js";
|
|
43
45
|
export * from "./getcompany.js";
|
|
44
46
|
export * from "./getcompanytargetfacilitiesexportstatus.js";
|
|
45
47
|
export * from "./getcurrentuser.js";
|
|
46
48
|
export * from "./getevent.js";
|
|
47
49
|
export * from "./getfacility.js";
|
|
50
|
+
export * from "./getfacilityvendorsexportstatus.js";
|
|
48
51
|
export * from "./getfhirconfig.js";
|
|
49
52
|
export * from "./getinvoice.js";
|
|
50
53
|
export * from "./getinvoicesexportstatus.js";
|
package/src/react-query/index.ts
CHANGED
|
@@ -46,9 +46,12 @@ export * from "./mobileDevicesAddMobileDevice.js";
|
|
|
46
46
|
export * from "./organizationsCreateCompanyTargetFacility.js";
|
|
47
47
|
export * from "./organizationsDeleteCompanyTargetFacility.js";
|
|
48
48
|
export * from "./organizationsDownloadCompanyTargetFacilitiesExport.js";
|
|
49
|
+
export * from "./organizationsDownloadFacilityVendorsExport.js";
|
|
49
50
|
export * from "./organizationsExportCompanyTargetFacilities.js";
|
|
51
|
+
export * from "./organizationsExportFacilityVendors.js";
|
|
50
52
|
export * from "./organizationsGetCompanyTargetFacilitiesExportStatus.js";
|
|
51
53
|
export * from "./organizationsGetFacility.js";
|
|
54
|
+
export * from "./organizationsGetFacilityVendorsExportStatus.js";
|
|
52
55
|
export * from "./organizationsListCompanyTargetFacilities.js";
|
|
53
56
|
export * from "./organizationsListFacilityVendors.js";
|
|
54
57
|
export * from "./organizationsListOrSearchDepartmentContacts.js";
|
|
@@ -0,0 +1,84 @@
|
|
|
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 { organizationsDownloadFacilityVendorsExport } from "../funcs/organizationsDownloadFacilityVendorsExport.js";
|
|
12
|
+
import { combineSignals } from "../lib/primitives.js";
|
|
13
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
14
|
+
import * as operations from "../models/operations/index.js";
|
|
15
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
16
|
+
export type OrganizationsDownloadFacilityVendorsExportQueryData =
|
|
17
|
+
| operations.DownloadFacilityVendorsExportResponse
|
|
18
|
+
| undefined;
|
|
19
|
+
|
|
20
|
+
export function prefetchOrganizationsDownloadFacilityVendorsExport(
|
|
21
|
+
queryClient: QueryClient,
|
|
22
|
+
client$: GreenSecurityCore,
|
|
23
|
+
request: operations.DownloadFacilityVendorsExportRequest,
|
|
24
|
+
options?: RequestOptions,
|
|
25
|
+
): Promise<void> {
|
|
26
|
+
return queryClient.prefetchQuery({
|
|
27
|
+
...buildOrganizationsDownloadFacilityVendorsExportQuery(
|
|
28
|
+
client$,
|
|
29
|
+
request,
|
|
30
|
+
options,
|
|
31
|
+
),
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export function buildOrganizationsDownloadFacilityVendorsExportQuery(
|
|
36
|
+
client$: GreenSecurityCore,
|
|
37
|
+
request: operations.DownloadFacilityVendorsExportRequest,
|
|
38
|
+
options?: RequestOptions,
|
|
39
|
+
): {
|
|
40
|
+
queryKey: QueryKey;
|
|
41
|
+
queryFn: (
|
|
42
|
+
context: QueryFunctionContext,
|
|
43
|
+
) => Promise<OrganizationsDownloadFacilityVendorsExportQueryData>;
|
|
44
|
+
} {
|
|
45
|
+
return {
|
|
46
|
+
queryKey: queryKeyOrganizationsDownloadFacilityVendorsExport(
|
|
47
|
+
request.id,
|
|
48
|
+
request.exportId,
|
|
49
|
+
),
|
|
50
|
+
queryFn: async function organizationsDownloadFacilityVendorsExportQueryFn(
|
|
51
|
+
ctx,
|
|
52
|
+
): Promise<OrganizationsDownloadFacilityVendorsExportQueryData> {
|
|
53
|
+
const sig = combineSignals(
|
|
54
|
+
ctx.signal,
|
|
55
|
+
options?.signal,
|
|
56
|
+
options?.fetchOptions?.signal,
|
|
57
|
+
);
|
|
58
|
+
const mergedOptions = {
|
|
59
|
+
...options?.fetchOptions,
|
|
60
|
+
...options,
|
|
61
|
+
signal: sig,
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
return unwrapAsync(organizationsDownloadFacilityVendorsExport(
|
|
65
|
+
client$,
|
|
66
|
+
request,
|
|
67
|
+
mergedOptions,
|
|
68
|
+
));
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function queryKeyOrganizationsDownloadFacilityVendorsExport(
|
|
74
|
+
id: number,
|
|
75
|
+
exportId: string,
|
|
76
|
+
): QueryKey {
|
|
77
|
+
return [
|
|
78
|
+
"@greensecurity/javascript-sdk",
|
|
79
|
+
"organizations",
|
|
80
|
+
"downloadFacilityVendorsExport",
|
|
81
|
+
id,
|
|
82
|
+
exportId,
|
|
83
|
+
];
|
|
84
|
+
}
|