@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
|
@@ -39,50 +39,19 @@ test("Zones List Or Search Security Zones", async () => {
|
|
|
39
39
|
facility: {
|
|
40
40
|
contacts: {
|
|
41
41
|
contact: {
|
|
42
|
-
status: "Active",
|
|
43
|
-
department: 123,
|
|
44
|
-
},
|
|
45
|
-
adminContact: {
|
|
46
|
-
status: "Deleted",
|
|
47
|
-
department: null,
|
|
48
|
-
},
|
|
49
|
-
techContact: {
|
|
50
|
-
status: "Inactive",
|
|
51
|
-
department: 123,
|
|
52
|
-
},
|
|
53
|
-
greenSecurityCsm: {
|
|
54
42
|
status: "Deleted",
|
|
55
43
|
department: 123,
|
|
56
44
|
},
|
|
57
|
-
|
|
58
|
-
status: "Active",
|
|
59
|
-
department: 123,
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
|
-
vendorGuestPolicy: {
|
|
63
|
-
enabled: true,
|
|
64
|
-
vendorGuestLimitAndOr: "and",
|
|
65
|
-
vendorGuestRequireEmail: true,
|
|
66
|
-
},
|
|
67
|
-
},
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
facility: {
|
|
71
|
-
contacts: {
|
|
72
|
-
contact: {
|
|
45
|
+
adminContact: {
|
|
73
46
|
status: "Active",
|
|
74
47
|
department: 123,
|
|
75
48
|
},
|
|
76
|
-
adminContact: {
|
|
77
|
-
status: "Deleted",
|
|
78
|
-
department: null,
|
|
79
|
-
},
|
|
80
49
|
techContact: {
|
|
81
|
-
status: "
|
|
50
|
+
status: "Deleted",
|
|
82
51
|
department: 123,
|
|
83
52
|
},
|
|
84
53
|
greenSecurityCsm: {
|
|
85
|
-
status: "
|
|
54
|
+
status: "Inactive",
|
|
86
55
|
department: 123,
|
|
87
56
|
},
|
|
88
57
|
accountManager: {
|
|
@@ -91,12 +60,15 @@ test("Zones List Or Search Security Zones", async () => {
|
|
|
91
60
|
},
|
|
92
61
|
},
|
|
93
62
|
vendorGuestPolicy: {
|
|
94
|
-
enabled:
|
|
63
|
+
enabled: false,
|
|
95
64
|
vendorGuestLimitAndOr: "and",
|
|
96
|
-
vendorGuestRequireEmail:
|
|
65
|
+
vendorGuestRequireEmail: false,
|
|
97
66
|
},
|
|
98
67
|
},
|
|
99
68
|
},
|
|
69
|
+
{
|
|
70
|
+
facility: {},
|
|
71
|
+
},
|
|
100
72
|
],
|
|
101
73
|
});
|
|
102
74
|
});
|
|
@@ -114,7 +86,7 @@ test("Zones Security Zone Checkin", async () => {
|
|
|
114
86
|
|
|
115
87
|
const result = await greenSecurity.zones.securityZoneCheckin({
|
|
116
88
|
qrCode: "<value>",
|
|
117
|
-
zoneId:
|
|
89
|
+
zoneId: 185875,
|
|
118
90
|
});
|
|
119
91
|
expect(result).toBeDefined();
|
|
120
92
|
expect(result).toEqual({});
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { GreenSecurityCore } from "../core.js";
|
|
6
|
+
import { encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
8
|
+
import * as M from "../lib/matchers.js";
|
|
9
|
+
import { compactMap } from "../lib/primitives.js";
|
|
10
|
+
import { safeParse } from "../lib/schemas.js";
|
|
11
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
12
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
13
|
+
import { pathToFunc } from "../lib/url.js";
|
|
14
|
+
import { GreenSecurityError } from "../models/errors/greensecurityerror.js";
|
|
15
|
+
import {
|
|
16
|
+
ConnectionError,
|
|
17
|
+
InvalidRequestError,
|
|
18
|
+
RequestAbortedError,
|
|
19
|
+
RequestTimeoutError,
|
|
20
|
+
UnexpectedClientError,
|
|
21
|
+
} from "../models/errors/httpclienterrors.js";
|
|
22
|
+
import * as errors from "../models/errors/index.js";
|
|
23
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
24
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
25
|
+
import * as operations from "../models/operations/index.js";
|
|
26
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
27
|
+
import { Result } from "../types/fp.js";
|
|
28
|
+
import * as types$ from "../types/primitives.js";
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Download facility vendors CSV
|
|
32
|
+
*
|
|
33
|
+
* @remarks
|
|
34
|
+
* Returns the exported facility vendors CSV via a 302 redirect to a short-lived
|
|
35
|
+
* presigned S3 URL. If the export is still being generated, returns 202 with a JSON
|
|
36
|
+
* `{ ready: false }` payload.
|
|
37
|
+
*
|
|
38
|
+
* If set, this operation will use {@link Security.bearerJwt} from the global security.
|
|
39
|
+
*/
|
|
40
|
+
export function organizationsDownloadFacilityVendorsExport(
|
|
41
|
+
client: GreenSecurityCore,
|
|
42
|
+
request: operations.DownloadFacilityVendorsExportRequest,
|
|
43
|
+
options?: RequestOptions,
|
|
44
|
+
): APIPromise<
|
|
45
|
+
Result<
|
|
46
|
+
operations.DownloadFacilityVendorsExportResponse | undefined,
|
|
47
|
+
| errors.ApiErrorResponse
|
|
48
|
+
| GreenSecurityError
|
|
49
|
+
| ResponseValidationError
|
|
50
|
+
| ConnectionError
|
|
51
|
+
| RequestAbortedError
|
|
52
|
+
| RequestTimeoutError
|
|
53
|
+
| InvalidRequestError
|
|
54
|
+
| UnexpectedClientError
|
|
55
|
+
| SDKValidationError
|
|
56
|
+
>
|
|
57
|
+
> {
|
|
58
|
+
return new APIPromise($do(
|
|
59
|
+
client,
|
|
60
|
+
request,
|
|
61
|
+
options,
|
|
62
|
+
));
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
async function $do(
|
|
66
|
+
client: GreenSecurityCore,
|
|
67
|
+
request: operations.DownloadFacilityVendorsExportRequest,
|
|
68
|
+
options?: RequestOptions,
|
|
69
|
+
): Promise<
|
|
70
|
+
[
|
|
71
|
+
Result<
|
|
72
|
+
operations.DownloadFacilityVendorsExportResponse | undefined,
|
|
73
|
+
| errors.ApiErrorResponse
|
|
74
|
+
| GreenSecurityError
|
|
75
|
+
| ResponseValidationError
|
|
76
|
+
| ConnectionError
|
|
77
|
+
| RequestAbortedError
|
|
78
|
+
| RequestTimeoutError
|
|
79
|
+
| InvalidRequestError
|
|
80
|
+
| UnexpectedClientError
|
|
81
|
+
| SDKValidationError
|
|
82
|
+
>,
|
|
83
|
+
APICall,
|
|
84
|
+
]
|
|
85
|
+
> {
|
|
86
|
+
const parsed = safeParse(
|
|
87
|
+
request,
|
|
88
|
+
(value) =>
|
|
89
|
+
operations.DownloadFacilityVendorsExportRequest$outboundSchema.parse(
|
|
90
|
+
value,
|
|
91
|
+
),
|
|
92
|
+
"Input validation failed",
|
|
93
|
+
);
|
|
94
|
+
if (!parsed.ok) {
|
|
95
|
+
return [parsed, { status: "invalid" }];
|
|
96
|
+
}
|
|
97
|
+
const payload = parsed.value;
|
|
98
|
+
const body = null;
|
|
99
|
+
|
|
100
|
+
const pathParams = {
|
|
101
|
+
export_id: encodeSimple("export_id", payload.export_id, {
|
|
102
|
+
explode: false,
|
|
103
|
+
charEncoding: "percent",
|
|
104
|
+
}),
|
|
105
|
+
id: encodeSimple("id", payload.id, {
|
|
106
|
+
explode: false,
|
|
107
|
+
charEncoding: "percent",
|
|
108
|
+
}),
|
|
109
|
+
};
|
|
110
|
+
const path = pathToFunc("/facilities/{id}/vendors/export/{export_id}")(
|
|
111
|
+
pathParams,
|
|
112
|
+
);
|
|
113
|
+
|
|
114
|
+
const headers = new Headers(compactMap({
|
|
115
|
+
Accept: "application/json",
|
|
116
|
+
}));
|
|
117
|
+
|
|
118
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
119
|
+
const requestSecurity = resolveGlobalSecurity(securityInput, [1]);
|
|
120
|
+
|
|
121
|
+
const context = {
|
|
122
|
+
options: client._options,
|
|
123
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
124
|
+
operationID: "downloadFacilityVendorsExport",
|
|
125
|
+
oAuth2Scopes: null,
|
|
126
|
+
|
|
127
|
+
resolvedSecurity: requestSecurity,
|
|
128
|
+
|
|
129
|
+
securitySource: client._options.security,
|
|
130
|
+
retryConfig: options?.retries
|
|
131
|
+
|| client._options.retryConfig
|
|
132
|
+
|| { strategy: "none" },
|
|
133
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
const requestRes = client._createRequest(context, {
|
|
137
|
+
security: requestSecurity,
|
|
138
|
+
method: "GET",
|
|
139
|
+
baseURL: options?.serverURL,
|
|
140
|
+
path: path,
|
|
141
|
+
headers: headers,
|
|
142
|
+
body: body,
|
|
143
|
+
userAgent: client._options.userAgent,
|
|
144
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
145
|
+
}, options);
|
|
146
|
+
if (!requestRes.ok) {
|
|
147
|
+
return [requestRes, { status: "invalid" }];
|
|
148
|
+
}
|
|
149
|
+
const req = requestRes.value;
|
|
150
|
+
|
|
151
|
+
const doResult = await client._do(req, {
|
|
152
|
+
context,
|
|
153
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
154
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
155
|
+
retryConfig: context.retryConfig,
|
|
156
|
+
retryCodes: context.retryCodes,
|
|
157
|
+
});
|
|
158
|
+
if (!doResult.ok) {
|
|
159
|
+
return [doResult, { status: "request-error", request: req }];
|
|
160
|
+
}
|
|
161
|
+
const response = doResult.value;
|
|
162
|
+
|
|
163
|
+
const responseFields = {
|
|
164
|
+
HttpMeta: { Response: response, Request: req },
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
const [result] = await M.match<
|
|
168
|
+
operations.DownloadFacilityVendorsExportResponse | undefined,
|
|
169
|
+
| errors.ApiErrorResponse
|
|
170
|
+
| GreenSecurityError
|
|
171
|
+
| ResponseValidationError
|
|
172
|
+
| ConnectionError
|
|
173
|
+
| RequestAbortedError
|
|
174
|
+
| RequestTimeoutError
|
|
175
|
+
| InvalidRequestError
|
|
176
|
+
| UnexpectedClientError
|
|
177
|
+
| SDKValidationError
|
|
178
|
+
>(
|
|
179
|
+
M.json(
|
|
180
|
+
202,
|
|
181
|
+
types$.optional(
|
|
182
|
+
operations.DownloadFacilityVendorsExportResponse$inboundSchema,
|
|
183
|
+
),
|
|
184
|
+
{ key: "Result" },
|
|
185
|
+
),
|
|
186
|
+
M.nil(
|
|
187
|
+
302,
|
|
188
|
+
types$.optional(
|
|
189
|
+
operations.DownloadFacilityVendorsExportResponse$inboundSchema,
|
|
190
|
+
),
|
|
191
|
+
{ hdrs: true },
|
|
192
|
+
),
|
|
193
|
+
M.jsonErr([400, 401, 403, 404, 422], errors.ApiErrorResponse$inboundSchema),
|
|
194
|
+
M.fail("4XX"),
|
|
195
|
+
M.fail([500, "5XX"]),
|
|
196
|
+
)(response, req, { extraFields: responseFields });
|
|
197
|
+
if (!result.ok) {
|
|
198
|
+
return [result, { status: "complete", request: req, response }];
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
return [result, { status: "complete", request: req, response }];
|
|
202
|
+
}
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { GreenSecurityCore } from "../core.js";
|
|
6
|
+
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
8
|
+
import * as M from "../lib/matchers.js";
|
|
9
|
+
import { compactMap } from "../lib/primitives.js";
|
|
10
|
+
import { safeParse } from "../lib/schemas.js";
|
|
11
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
12
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
13
|
+
import { pathToFunc } from "../lib/url.js";
|
|
14
|
+
import { GreenSecurityError } from "../models/errors/greensecurityerror.js";
|
|
15
|
+
import {
|
|
16
|
+
ConnectionError,
|
|
17
|
+
InvalidRequestError,
|
|
18
|
+
RequestAbortedError,
|
|
19
|
+
RequestTimeoutError,
|
|
20
|
+
UnexpectedClientError,
|
|
21
|
+
} from "../models/errors/httpclienterrors.js";
|
|
22
|
+
import * as errors from "../models/errors/index.js";
|
|
23
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
24
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
25
|
+
import * as operations from "../models/operations/index.js";
|
|
26
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
27
|
+
import { Result } from "../types/fp.js";
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Export facility vendors to CSV (async)
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
* Enqueues an asynchronous job to generate a CSV export of the vendors (vendor reps)
|
|
34
|
+
* targeting the given facility, applying the same access scope and filter parameters as
|
|
35
|
+
* the listing endpoint. The CSV contains: Name, Email, one column per company custom field
|
|
36
|
+
* flagged `show_to_vendor` (e.g. Employee ID), Last Visit, and Status.
|
|
37
|
+
*
|
|
38
|
+
* Returns a `status_url` for polling until the export is ready, along with a `download_url`
|
|
39
|
+
* and `status_id`.
|
|
40
|
+
*
|
|
41
|
+
* Access control mirrors the list endpoint:
|
|
42
|
+
* * Regular users — facility must be in the caller's read scope (via
|
|
43
|
+
* `has_facility_access_policy`); company resolved from the session. Out-of-scope or
|
|
44
|
+
* soft-deleted facilities return `404 Facility not found`.
|
|
45
|
+
* * API users — `company_id` required; both the company AND the facility must be
|
|
46
|
+
* activated for the caller's marketplace app via the join-scoped
|
|
47
|
+
* `MarketplaceAppActivation` check.
|
|
48
|
+
*
|
|
49
|
+
* If set, this operation will use {@link Security.bearerJwt} from the global security.
|
|
50
|
+
*/
|
|
51
|
+
export function organizationsExportFacilityVendors(
|
|
52
|
+
client: GreenSecurityCore,
|
|
53
|
+
request: operations.ExportFacilityVendorsRequest,
|
|
54
|
+
options?: RequestOptions,
|
|
55
|
+
): APIPromise<
|
|
56
|
+
Result<
|
|
57
|
+
operations.ExportFacilityVendorsResponseBody,
|
|
58
|
+
| errors.ApiErrorResponse
|
|
59
|
+
| GreenSecurityError
|
|
60
|
+
| ResponseValidationError
|
|
61
|
+
| ConnectionError
|
|
62
|
+
| RequestAbortedError
|
|
63
|
+
| RequestTimeoutError
|
|
64
|
+
| InvalidRequestError
|
|
65
|
+
| UnexpectedClientError
|
|
66
|
+
| SDKValidationError
|
|
67
|
+
>
|
|
68
|
+
> {
|
|
69
|
+
return new APIPromise($do(
|
|
70
|
+
client,
|
|
71
|
+
request,
|
|
72
|
+
options,
|
|
73
|
+
));
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
async function $do(
|
|
77
|
+
client: GreenSecurityCore,
|
|
78
|
+
request: operations.ExportFacilityVendorsRequest,
|
|
79
|
+
options?: RequestOptions,
|
|
80
|
+
): Promise<
|
|
81
|
+
[
|
|
82
|
+
Result<
|
|
83
|
+
operations.ExportFacilityVendorsResponseBody,
|
|
84
|
+
| errors.ApiErrorResponse
|
|
85
|
+
| GreenSecurityError
|
|
86
|
+
| ResponseValidationError
|
|
87
|
+
| ConnectionError
|
|
88
|
+
| RequestAbortedError
|
|
89
|
+
| RequestTimeoutError
|
|
90
|
+
| InvalidRequestError
|
|
91
|
+
| UnexpectedClientError
|
|
92
|
+
| SDKValidationError
|
|
93
|
+
>,
|
|
94
|
+
APICall,
|
|
95
|
+
]
|
|
96
|
+
> {
|
|
97
|
+
const parsed = safeParse(
|
|
98
|
+
request,
|
|
99
|
+
(value) =>
|
|
100
|
+
operations.ExportFacilityVendorsRequest$outboundSchema.parse(value),
|
|
101
|
+
"Input validation failed",
|
|
102
|
+
);
|
|
103
|
+
if (!parsed.ok) {
|
|
104
|
+
return [parsed, { status: "invalid" }];
|
|
105
|
+
}
|
|
106
|
+
const payload = parsed.value;
|
|
107
|
+
const body = null;
|
|
108
|
+
|
|
109
|
+
const pathParams = {
|
|
110
|
+
id: encodeSimple("id", payload.id, {
|
|
111
|
+
explode: false,
|
|
112
|
+
charEncoding: "percent",
|
|
113
|
+
}),
|
|
114
|
+
};
|
|
115
|
+
const path = pathToFunc("/facilities/{id}/vendors/export")(pathParams);
|
|
116
|
+
|
|
117
|
+
const query = encodeFormQuery({
|
|
118
|
+
"company_id": payload.company_id,
|
|
119
|
+
"desc": payload.desc,
|
|
120
|
+
"items_per_page": payload.items_per_page,
|
|
121
|
+
"search": payload.search,
|
|
122
|
+
"sort": payload.sort,
|
|
123
|
+
"status": payload.status,
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
const headers = new Headers(compactMap({
|
|
127
|
+
Accept: "application/json",
|
|
128
|
+
}));
|
|
129
|
+
|
|
130
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
131
|
+
const requestSecurity = resolveGlobalSecurity(securityInput, [1]);
|
|
132
|
+
|
|
133
|
+
const context = {
|
|
134
|
+
options: client._options,
|
|
135
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
136
|
+
operationID: "exportFacilityVendors",
|
|
137
|
+
oAuth2Scopes: null,
|
|
138
|
+
|
|
139
|
+
resolvedSecurity: requestSecurity,
|
|
140
|
+
|
|
141
|
+
securitySource: client._options.security,
|
|
142
|
+
retryConfig: options?.retries
|
|
143
|
+
|| client._options.retryConfig
|
|
144
|
+
|| { strategy: "none" },
|
|
145
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
const requestRes = client._createRequest(context, {
|
|
149
|
+
security: requestSecurity,
|
|
150
|
+
method: "GET",
|
|
151
|
+
baseURL: options?.serverURL,
|
|
152
|
+
path: path,
|
|
153
|
+
headers: headers,
|
|
154
|
+
query: query,
|
|
155
|
+
body: body,
|
|
156
|
+
userAgent: client._options.userAgent,
|
|
157
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
158
|
+
}, options);
|
|
159
|
+
if (!requestRes.ok) {
|
|
160
|
+
return [requestRes, { status: "invalid" }];
|
|
161
|
+
}
|
|
162
|
+
const req = requestRes.value;
|
|
163
|
+
|
|
164
|
+
const doResult = await client._do(req, {
|
|
165
|
+
context,
|
|
166
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
167
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
168
|
+
retryConfig: context.retryConfig,
|
|
169
|
+
retryCodes: context.retryCodes,
|
|
170
|
+
});
|
|
171
|
+
if (!doResult.ok) {
|
|
172
|
+
return [doResult, { status: "request-error", request: req }];
|
|
173
|
+
}
|
|
174
|
+
const response = doResult.value;
|
|
175
|
+
|
|
176
|
+
const responseFields = {
|
|
177
|
+
HttpMeta: { Response: response, Request: req },
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
const [result] = await M.match<
|
|
181
|
+
operations.ExportFacilityVendorsResponseBody,
|
|
182
|
+
| errors.ApiErrorResponse
|
|
183
|
+
| GreenSecurityError
|
|
184
|
+
| ResponseValidationError
|
|
185
|
+
| ConnectionError
|
|
186
|
+
| RequestAbortedError
|
|
187
|
+
| RequestTimeoutError
|
|
188
|
+
| InvalidRequestError
|
|
189
|
+
| UnexpectedClientError
|
|
190
|
+
| SDKValidationError
|
|
191
|
+
>(
|
|
192
|
+
M.json(200, operations.ExportFacilityVendorsResponseBody$inboundSchema),
|
|
193
|
+
M.jsonErr([400, 401, 403, 404, 422], errors.ApiErrorResponse$inboundSchema),
|
|
194
|
+
M.fail("4XX"),
|
|
195
|
+
M.fail([500, "5XX"]),
|
|
196
|
+
)(response, req, { extraFields: responseFields });
|
|
197
|
+
if (!result.ok) {
|
|
198
|
+
return [result, { status: "complete", request: req, response }];
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
return [result, { status: "complete", request: req, response }];
|
|
202
|
+
}
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { GreenSecurityCore } from "../core.js";
|
|
6
|
+
import { encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
8
|
+
import * as M from "../lib/matchers.js";
|
|
9
|
+
import { compactMap } from "../lib/primitives.js";
|
|
10
|
+
import { safeParse } from "../lib/schemas.js";
|
|
11
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
12
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
13
|
+
import { pathToFunc } from "../lib/url.js";
|
|
14
|
+
import * as components from "../models/components/index.js";
|
|
15
|
+
import { GreenSecurityError } from "../models/errors/greensecurityerror.js";
|
|
16
|
+
import {
|
|
17
|
+
ConnectionError,
|
|
18
|
+
InvalidRequestError,
|
|
19
|
+
RequestAbortedError,
|
|
20
|
+
RequestTimeoutError,
|
|
21
|
+
UnexpectedClientError,
|
|
22
|
+
} from "../models/errors/httpclienterrors.js";
|
|
23
|
+
import * as errors from "../models/errors/index.js";
|
|
24
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
25
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
26
|
+
import * as operations from "../models/operations/index.js";
|
|
27
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
28
|
+
import { Result } from "../types/fp.js";
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Get facility vendors export status
|
|
32
|
+
*
|
|
33
|
+
* @remarks
|
|
34
|
+
* Poll the state of an asynchronous facility vendors export job. When `ready` is true,
|
|
35
|
+
* the export is complete and can be downloaded via the download endpoint.
|
|
36
|
+
*
|
|
37
|
+
* If set, this operation will use {@link Security.bearerJwt} from the global security.
|
|
38
|
+
*/
|
|
39
|
+
export function organizationsGetFacilityVendorsExportStatus(
|
|
40
|
+
client: GreenSecurityCore,
|
|
41
|
+
request: operations.GetFacilityVendorsExportStatusRequest,
|
|
42
|
+
options?: RequestOptions,
|
|
43
|
+
): APIPromise<
|
|
44
|
+
Result<
|
|
45
|
+
components.CsvExportStatusResponse,
|
|
46
|
+
| errors.ApiErrorResponse
|
|
47
|
+
| GreenSecurityError
|
|
48
|
+
| ResponseValidationError
|
|
49
|
+
| ConnectionError
|
|
50
|
+
| RequestAbortedError
|
|
51
|
+
| RequestTimeoutError
|
|
52
|
+
| InvalidRequestError
|
|
53
|
+
| UnexpectedClientError
|
|
54
|
+
| SDKValidationError
|
|
55
|
+
>
|
|
56
|
+
> {
|
|
57
|
+
return new APIPromise($do(
|
|
58
|
+
client,
|
|
59
|
+
request,
|
|
60
|
+
options,
|
|
61
|
+
));
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
async function $do(
|
|
65
|
+
client: GreenSecurityCore,
|
|
66
|
+
request: operations.GetFacilityVendorsExportStatusRequest,
|
|
67
|
+
options?: RequestOptions,
|
|
68
|
+
): Promise<
|
|
69
|
+
[
|
|
70
|
+
Result<
|
|
71
|
+
components.CsvExportStatusResponse,
|
|
72
|
+
| errors.ApiErrorResponse
|
|
73
|
+
| GreenSecurityError
|
|
74
|
+
| ResponseValidationError
|
|
75
|
+
| ConnectionError
|
|
76
|
+
| RequestAbortedError
|
|
77
|
+
| RequestTimeoutError
|
|
78
|
+
| InvalidRequestError
|
|
79
|
+
| UnexpectedClientError
|
|
80
|
+
| SDKValidationError
|
|
81
|
+
>,
|
|
82
|
+
APICall,
|
|
83
|
+
]
|
|
84
|
+
> {
|
|
85
|
+
const parsed = safeParse(
|
|
86
|
+
request,
|
|
87
|
+
(value) =>
|
|
88
|
+
operations.GetFacilityVendorsExportStatusRequest$outboundSchema.parse(
|
|
89
|
+
value,
|
|
90
|
+
),
|
|
91
|
+
"Input validation failed",
|
|
92
|
+
);
|
|
93
|
+
if (!parsed.ok) {
|
|
94
|
+
return [parsed, { status: "invalid" }];
|
|
95
|
+
}
|
|
96
|
+
const payload = parsed.value;
|
|
97
|
+
const body = null;
|
|
98
|
+
|
|
99
|
+
const pathParams = {
|
|
100
|
+
export_id: encodeSimple("export_id", payload.export_id, {
|
|
101
|
+
explode: false,
|
|
102
|
+
charEncoding: "percent",
|
|
103
|
+
}),
|
|
104
|
+
id: encodeSimple("id", payload.id, {
|
|
105
|
+
explode: false,
|
|
106
|
+
charEncoding: "percent",
|
|
107
|
+
}),
|
|
108
|
+
};
|
|
109
|
+
const path = pathToFunc("/facilities/{id}/vendors/export/status/{export_id}")(
|
|
110
|
+
pathParams,
|
|
111
|
+
);
|
|
112
|
+
|
|
113
|
+
const headers = new Headers(compactMap({
|
|
114
|
+
Accept: "application/json",
|
|
115
|
+
}));
|
|
116
|
+
|
|
117
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
118
|
+
const requestSecurity = resolveGlobalSecurity(securityInput, [1]);
|
|
119
|
+
|
|
120
|
+
const context = {
|
|
121
|
+
options: client._options,
|
|
122
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
123
|
+
operationID: "getFacilityVendorsExportStatus",
|
|
124
|
+
oAuth2Scopes: null,
|
|
125
|
+
|
|
126
|
+
resolvedSecurity: requestSecurity,
|
|
127
|
+
|
|
128
|
+
securitySource: client._options.security,
|
|
129
|
+
retryConfig: options?.retries
|
|
130
|
+
|| client._options.retryConfig
|
|
131
|
+
|| { strategy: "none" },
|
|
132
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
const requestRes = client._createRequest(context, {
|
|
136
|
+
security: requestSecurity,
|
|
137
|
+
method: "GET",
|
|
138
|
+
baseURL: options?.serverURL,
|
|
139
|
+
path: path,
|
|
140
|
+
headers: headers,
|
|
141
|
+
body: body,
|
|
142
|
+
userAgent: client._options.userAgent,
|
|
143
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
144
|
+
}, options);
|
|
145
|
+
if (!requestRes.ok) {
|
|
146
|
+
return [requestRes, { status: "invalid" }];
|
|
147
|
+
}
|
|
148
|
+
const req = requestRes.value;
|
|
149
|
+
|
|
150
|
+
const doResult = await client._do(req, {
|
|
151
|
+
context,
|
|
152
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
153
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
154
|
+
retryConfig: context.retryConfig,
|
|
155
|
+
retryCodes: context.retryCodes,
|
|
156
|
+
});
|
|
157
|
+
if (!doResult.ok) {
|
|
158
|
+
return [doResult, { status: "request-error", request: req }];
|
|
159
|
+
}
|
|
160
|
+
const response = doResult.value;
|
|
161
|
+
|
|
162
|
+
const responseFields = {
|
|
163
|
+
HttpMeta: { Response: response, Request: req },
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
const [result] = await M.match<
|
|
167
|
+
components.CsvExportStatusResponse,
|
|
168
|
+
| errors.ApiErrorResponse
|
|
169
|
+
| GreenSecurityError
|
|
170
|
+
| ResponseValidationError
|
|
171
|
+
| ConnectionError
|
|
172
|
+
| RequestAbortedError
|
|
173
|
+
| RequestTimeoutError
|
|
174
|
+
| InvalidRequestError
|
|
175
|
+
| UnexpectedClientError
|
|
176
|
+
| SDKValidationError
|
|
177
|
+
>(
|
|
178
|
+
M.json(200, components.CsvExportStatusResponse$inboundSchema),
|
|
179
|
+
M.jsonErr([400, 401, 403, 404, 422], errors.ApiErrorResponse$inboundSchema),
|
|
180
|
+
M.fail("4XX"),
|
|
181
|
+
M.fail([500, "5XX"]),
|
|
182
|
+
)(response, req, { extraFields: responseFields });
|
|
183
|
+
if (!result.ok) {
|
|
184
|
+
return [result, { status: "complete", request: req, response }];
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
return [result, { status: "complete", request: req, response }];
|
|
188
|
+
}
|
package/src/lib/config.ts
CHANGED
|
@@ -80,8 +80,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
80
80
|
export const SDK_METADATA = {
|
|
81
81
|
language: "typescript",
|
|
82
82
|
openapiDocVersion: "0.43.5",
|
|
83
|
-
sdkVersion: "0.44.0-beta.
|
|
84
|
-
genVersion: "2.
|
|
83
|
+
sdkVersion: "0.44.0-beta.19",
|
|
84
|
+
genVersion: "2.900.1",
|
|
85
85
|
userAgent:
|
|
86
|
-
"speakeasy-sdk/typescript 0.44.0-beta.
|
|
86
|
+
"speakeasy-sdk/typescript 0.44.0-beta.19 2.900.1 0.43.5 @greensecurity/javascript-sdk",
|
|
87
87
|
} as const;
|