@greensecurity/javascript-sdk 0.43.1-beta.124 → 0.43.1-beta.125
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/FUNCTIONS.md +2 -2
- package/README.md +9 -0
- package/dist/commonjs/__tests__/lookups.test.d.ts +2 -0
- package/dist/commonjs/__tests__/lookups.test.d.ts.map +1 -0
- package/dist/commonjs/__tests__/lookups.test.js +29 -0
- package/dist/commonjs/__tests__/lookups.test.js.map +1 -0
- package/dist/commonjs/__tests__/vendors.test.js +30 -0
- package/dist/commonjs/__tests__/vendors.test.js.map +1 -1
- package/dist/commonjs/__tests__/zones.test.js +13 -17
- package/dist/commonjs/__tests__/zones.test.js.map +1 -1
- package/dist/commonjs/funcs/lookupsListLookupSystems.d.ts +27 -0
- package/dist/commonjs/funcs/lookupsListLookupSystems.d.ts.map +1 -0
- package/dist/commonjs/funcs/lookupsListLookupSystems.js +133 -0
- package/dist/commonjs/funcs/lookupsListLookupSystems.js.map +1 -0
- package/dist/commonjs/funcs/vendorsCreateVendorByCompanyManager.d.ts +24 -0
- package/dist/commonjs/funcs/vendorsCreateVendorByCompanyManager.d.ts.map +1 -0
- package/dist/commonjs/funcs/vendorsCreateVendorByCompanyManager.js +125 -0
- package/dist/commonjs/funcs/vendorsCreateVendorByCompanyManager.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/config.js.map +1 -1
- package/dist/commonjs/models/operations/createvendorbycompanymanager.d.ts +122 -0
- package/dist/commonjs/models/operations/createvendorbycompanymanager.d.ts.map +1 -0
- package/dist/commonjs/models/operations/createvendorbycompanymanager.js +93 -0
- package/dist/commonjs/models/operations/createvendorbycompanymanager.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +2 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +2 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/listlookupsystems.d.ts +52 -0
- package/dist/commonjs/models/operations/listlookupsystems.d.ts.map +1 -0
- package/dist/commonjs/models/operations/listlookupsystems.js +76 -0
- package/dist/commonjs/models/operations/listlookupsystems.js.map +1 -0
- package/dist/commonjs/models/operations/securityzonecheckin.d.ts +4 -4
- package/dist/commonjs/models/operations/securityzonecheckin.d.ts.map +1 -1
- package/dist/commonjs/models/operations/securityzonecheckin.js +5 -5
- package/dist/commonjs/models/operations/securityzonecheckin.js.map +1 -1
- package/dist/commonjs/react-query/index.d.ts +2 -0
- package/dist/commonjs/react-query/index.d.ts.map +1 -1
- package/dist/commonjs/react-query/index.js +2 -0
- package/dist/commonjs/react-query/index.js.map +1 -1
- package/dist/commonjs/react-query/lookupsListLookupSystems.core.d.ts +15 -0
- package/dist/commonjs/react-query/lookupsListLookupSystems.core.d.ts.map +1 -0
- package/dist/commonjs/react-query/lookupsListLookupSystems.core.js +43 -0
- package/dist/commonjs/react-query/lookupsListLookupSystems.core.js.map +1 -0
- package/dist/commonjs/react-query/lookupsListLookupSystems.d.ts +53 -0
- package/dist/commonjs/react-query/lookupsListLookupSystems.d.ts.map +1 -0
- package/dist/commonjs/react-query/lookupsListLookupSystems.js +80 -0
- package/dist/commonjs/react-query/lookupsListLookupSystems.js.map +1 -0
- package/dist/commonjs/react-query/vendorsCreateVendorByCompanyManager.d.ts +33 -0
- package/dist/commonjs/react-query/vendorsCreateVendorByCompanyManager.d.ts.map +1 -0
- package/dist/commonjs/react-query/vendorsCreateVendorByCompanyManager.js +56 -0
- package/dist/commonjs/react-query/vendorsCreateVendorByCompanyManager.js.map +1 -0
- package/dist/commonjs/sdk/lookups.d.ts +19 -0
- package/dist/commonjs/sdk/lookups.d.ts.map +1 -0
- package/dist/commonjs/sdk/lookups.js +30 -0
- package/dist/commonjs/sdk/lookups.js.map +1 -0
- package/dist/commonjs/sdk/sdk.d.ts +3 -0
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
- package/dist/commonjs/sdk/sdk.js +4 -0
- package/dist/commonjs/sdk/sdk.js.map +1 -1
- package/dist/commonjs/sdk/vendors.d.ts +11 -0
- package/dist/commonjs/sdk/vendors.d.ts.map +1 -1
- package/dist/commonjs/sdk/vendors.js +14 -0
- package/dist/commonjs/sdk/vendors.js.map +1 -1
- package/dist/commonjs/types/primitives.d.ts +1 -1
- package/dist/commonjs/types/primitives.d.ts.map +1 -1
- package/dist/commonjs/types/primitives.js +1 -2
- package/dist/commonjs/types/primitives.js.map +1 -1
- package/dist/esm/__tests__/lookups.test.d.ts +2 -0
- package/dist/esm/__tests__/lookups.test.d.ts.map +1 -0
- package/dist/esm/__tests__/lookups.test.js +27 -0
- package/dist/esm/__tests__/lookups.test.js.map +1 -0
- package/dist/esm/__tests__/vendors.test.js +30 -0
- package/dist/esm/__tests__/vendors.test.js.map +1 -1
- package/dist/esm/__tests__/zones.test.js +13 -17
- package/dist/esm/__tests__/zones.test.js.map +1 -1
- package/dist/esm/funcs/lookupsListLookupSystems.d.ts +27 -0
- package/dist/esm/funcs/lookupsListLookupSystems.d.ts.map +1 -0
- package/dist/esm/funcs/lookupsListLookupSystems.js +97 -0
- package/dist/esm/funcs/lookupsListLookupSystems.js.map +1 -0
- package/dist/esm/funcs/vendorsCreateVendorByCompanyManager.d.ts +24 -0
- package/dist/esm/funcs/vendorsCreateVendorByCompanyManager.d.ts.map +1 -0
- package/dist/esm/funcs/vendorsCreateVendorByCompanyManager.js +89 -0
- package/dist/esm/funcs/vendorsCreateVendorByCompanyManager.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/config.js.map +1 -1
- package/dist/esm/models/operations/createvendorbycompanymanager.d.ts +122 -0
- package/dist/esm/models/operations/createvendorbycompanymanager.d.ts.map +1 -0
- package/dist/esm/models/operations/createvendorbycompanymanager.js +55 -0
- package/dist/esm/models/operations/createvendorbycompanymanager.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +2 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +2 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/listlookupsystems.d.ts +52 -0
- package/dist/esm/models/operations/listlookupsystems.d.ts.map +1 -0
- package/dist/esm/models/operations/listlookupsystems.js +38 -0
- package/dist/esm/models/operations/listlookupsystems.js.map +1 -0
- package/dist/esm/models/operations/securityzonecheckin.d.ts +4 -4
- package/dist/esm/models/operations/securityzonecheckin.d.ts.map +1 -1
- package/dist/esm/models/operations/securityzonecheckin.js +4 -4
- package/dist/esm/models/operations/securityzonecheckin.js.map +1 -1
- package/dist/esm/react-query/index.d.ts +2 -0
- package/dist/esm/react-query/index.d.ts.map +1 -1
- package/dist/esm/react-query/index.js +2 -0
- package/dist/esm/react-query/index.js.map +1 -1
- package/dist/esm/react-query/lookupsListLookupSystems.core.d.ts +15 -0
- package/dist/esm/react-query/lookupsListLookupSystems.core.d.ts.map +1 -0
- package/dist/esm/react-query/lookupsListLookupSystems.core.js +38 -0
- package/dist/esm/react-query/lookupsListLookupSystems.core.js.map +1 -0
- package/dist/esm/react-query/lookupsListLookupSystems.d.ts +53 -0
- package/dist/esm/react-query/lookupsListLookupSystems.d.ts.map +1 -0
- package/dist/esm/react-query/lookupsListLookupSystems.js +70 -0
- package/dist/esm/react-query/lookupsListLookupSystems.js.map +1 -0
- package/dist/esm/react-query/vendorsCreateVendorByCompanyManager.d.ts +33 -0
- package/dist/esm/react-query/vendorsCreateVendorByCompanyManager.d.ts.map +1 -0
- package/dist/esm/react-query/vendorsCreateVendorByCompanyManager.js +51 -0
- package/dist/esm/react-query/vendorsCreateVendorByCompanyManager.js.map +1 -0
- package/dist/esm/sdk/lookups.d.ts +19 -0
- package/dist/esm/sdk/lookups.d.ts.map +1 -0
- package/dist/esm/sdk/lookups.js +26 -0
- package/dist/esm/sdk/lookups.js.map +1 -0
- package/dist/esm/sdk/sdk.d.ts +3 -0
- package/dist/esm/sdk/sdk.d.ts.map +1 -1
- package/dist/esm/sdk/sdk.js +4 -0
- package/dist/esm/sdk/sdk.js.map +1 -1
- package/dist/esm/sdk/vendors.d.ts +11 -0
- package/dist/esm/sdk/vendors.d.ts.map +1 -1
- package/dist/esm/sdk/vendors.js +14 -0
- package/dist/esm/sdk/vendors.js.map +1 -1
- package/dist/esm/types/primitives.d.ts +1 -1
- package/dist/esm/types/primitives.d.ts.map +1 -1
- package/dist/esm/types/primitives.js +1 -2
- package/dist/esm/types/primitives.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/__tests__/lookups.test.ts +30 -0
- package/src/__tests__/vendors.test.ts +33 -0
- package/src/__tests__/zones.test.ts +13 -17
- package/src/funcs/lookupsListLookupSystems.ts +189 -0
- package/src/funcs/vendorsCreateVendorByCompanyManager.ts +183 -0
- package/src/lib/config.ts +3 -3
- package/src/models/operations/createvendorbycompanymanager.ts +203 -0
- package/src/models/operations/index.ts +2 -0
- package/src/models/operations/listlookupsystems.ts +98 -0
- package/src/models/operations/securityzonecheckin.ts +11 -6
- package/src/react-query/index.ts +2 -0
- package/src/react-query/lookupsListLookupSystems.core.ts +85 -0
- package/src/react-query/lookupsListLookupSystems.ts +168 -0
- package/src/react-query/vendorsCreateVendorByCompanyManager.ts +120 -0
- package/src/sdk/lookups.ts +35 -0
- package/src/sdk/sdk.ts +6 -0
- package/src/sdk/vendors.ts +22 -0
- package/src/types/primitives.ts +1 -3
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 4813c9f81c74
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import * as z from "zod/v3";
|
|
7
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
8
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import * as types from "../../types/primitives.js";
|
|
11
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
12
|
+
|
|
13
|
+
export type CreateVendorByCompanyManagerRequestBody = {
|
|
14
|
+
/**
|
|
15
|
+
* The vendor's email address
|
|
16
|
+
*/
|
|
17
|
+
email: string;
|
|
18
|
+
/**
|
|
19
|
+
* Vendor's first name
|
|
20
|
+
*/
|
|
21
|
+
firstName: string;
|
|
22
|
+
/**
|
|
23
|
+
* Vendor's last name
|
|
24
|
+
*/
|
|
25
|
+
lastName: string;
|
|
26
|
+
/**
|
|
27
|
+
* Vendor's job title (free text)
|
|
28
|
+
*/
|
|
29
|
+
title: string;
|
|
30
|
+
/**
|
|
31
|
+
* Vendor's phone number
|
|
32
|
+
*/
|
|
33
|
+
phone: string;
|
|
34
|
+
/**
|
|
35
|
+
* Vendor's fax number (optional)
|
|
36
|
+
*/
|
|
37
|
+
fax?: string | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* Rails timezone name (e.g. Eastern Time (US & Canada))
|
|
40
|
+
*/
|
|
41
|
+
timezone?: string | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* Whether the vendor has been listed by a federal agency as disbarred or excluded
|
|
44
|
+
*/
|
|
45
|
+
federal?: boolean | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* ID of the vendor's primary facility
|
|
48
|
+
*/
|
|
49
|
+
primaryFacilityId: number;
|
|
50
|
+
/**
|
|
51
|
+
* Vendor's supervisor name
|
|
52
|
+
*/
|
|
53
|
+
supervisorName: string;
|
|
54
|
+
/**
|
|
55
|
+
* Vendor's supervisor email
|
|
56
|
+
*/
|
|
57
|
+
supervisorEmail: string;
|
|
58
|
+
/**
|
|
59
|
+
* Vendor's supervisor phone
|
|
60
|
+
*/
|
|
61
|
+
supervisorPhone: string;
|
|
62
|
+
/**
|
|
63
|
+
* Country code (e.g. US, CA)
|
|
64
|
+
*/
|
|
65
|
+
country: string;
|
|
66
|
+
/**
|
|
67
|
+
* Street address line 1
|
|
68
|
+
*/
|
|
69
|
+
address1: string;
|
|
70
|
+
/**
|
|
71
|
+
* Street address line 2 (optional)
|
|
72
|
+
*/
|
|
73
|
+
address2?: string | undefined;
|
|
74
|
+
/**
|
|
75
|
+
* City
|
|
76
|
+
*/
|
|
77
|
+
city: string;
|
|
78
|
+
/**
|
|
79
|
+
* State or province code
|
|
80
|
+
*/
|
|
81
|
+
state: string;
|
|
82
|
+
/**
|
|
83
|
+
* Zip or postal code
|
|
84
|
+
*/
|
|
85
|
+
zip: string;
|
|
86
|
+
/**
|
|
87
|
+
* Required for API users. The company manager user ID to act on behalf of.
|
|
88
|
+
*
|
|
89
|
+
* @remarks
|
|
90
|
+
* The marketplace app must be activated for this user.
|
|
91
|
+
*/
|
|
92
|
+
sourceUserId?: number | undefined;
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Vendor created successfully.
|
|
97
|
+
*/
|
|
98
|
+
export type CreateVendorByCompanyManagerResponseBody = {
|
|
99
|
+
/**
|
|
100
|
+
* ID of the newly created vendor
|
|
101
|
+
*/
|
|
102
|
+
vendorId: number;
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
/** @internal */
|
|
106
|
+
export type CreateVendorByCompanyManagerRequestBody$Outbound = {
|
|
107
|
+
email: string;
|
|
108
|
+
first_name: string;
|
|
109
|
+
last_name: string;
|
|
110
|
+
title: string;
|
|
111
|
+
phone: string;
|
|
112
|
+
fax?: string | undefined;
|
|
113
|
+
timezone?: string | undefined;
|
|
114
|
+
federal?: boolean | undefined;
|
|
115
|
+
primary_facility_id: number;
|
|
116
|
+
supervisor_name: string;
|
|
117
|
+
supervisor_email: string;
|
|
118
|
+
supervisor_phone: string;
|
|
119
|
+
country: string;
|
|
120
|
+
address1: string;
|
|
121
|
+
address2?: string | undefined;
|
|
122
|
+
city: string;
|
|
123
|
+
state: string;
|
|
124
|
+
zip: string;
|
|
125
|
+
source_user_id?: number | undefined;
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
/** @internal */
|
|
129
|
+
export const CreateVendorByCompanyManagerRequestBody$outboundSchema: z.ZodType<
|
|
130
|
+
CreateVendorByCompanyManagerRequestBody$Outbound,
|
|
131
|
+
z.ZodTypeDef,
|
|
132
|
+
CreateVendorByCompanyManagerRequestBody
|
|
133
|
+
> = z.object({
|
|
134
|
+
email: z.string(),
|
|
135
|
+
firstName: z.string(),
|
|
136
|
+
lastName: z.string(),
|
|
137
|
+
title: z.string(),
|
|
138
|
+
phone: z.string(),
|
|
139
|
+
fax: z.string().optional(),
|
|
140
|
+
timezone: z.string().optional(),
|
|
141
|
+
federal: z.boolean().optional(),
|
|
142
|
+
primaryFacilityId: z.number().int(),
|
|
143
|
+
supervisorName: z.string(),
|
|
144
|
+
supervisorEmail: z.string(),
|
|
145
|
+
supervisorPhone: z.string(),
|
|
146
|
+
country: z.string(),
|
|
147
|
+
address1: z.string(),
|
|
148
|
+
address2: z.string().optional(),
|
|
149
|
+
city: z.string(),
|
|
150
|
+
state: z.string(),
|
|
151
|
+
zip: z.string(),
|
|
152
|
+
sourceUserId: z.number().int().optional(),
|
|
153
|
+
}).transform((v) => {
|
|
154
|
+
return remap$(v, {
|
|
155
|
+
firstName: "first_name",
|
|
156
|
+
lastName: "last_name",
|
|
157
|
+
primaryFacilityId: "primary_facility_id",
|
|
158
|
+
supervisorName: "supervisor_name",
|
|
159
|
+
supervisorEmail: "supervisor_email",
|
|
160
|
+
supervisorPhone: "supervisor_phone",
|
|
161
|
+
sourceUserId: "source_user_id",
|
|
162
|
+
});
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
export function createVendorByCompanyManagerRequestBodyToJSON(
|
|
166
|
+
createVendorByCompanyManagerRequestBody:
|
|
167
|
+
CreateVendorByCompanyManagerRequestBody,
|
|
168
|
+
): string {
|
|
169
|
+
return JSON.stringify(
|
|
170
|
+
CreateVendorByCompanyManagerRequestBody$outboundSchema.parse(
|
|
171
|
+
createVendorByCompanyManagerRequestBody,
|
|
172
|
+
),
|
|
173
|
+
);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/** @internal */
|
|
177
|
+
export const CreateVendorByCompanyManagerResponseBody$inboundSchema: z.ZodType<
|
|
178
|
+
CreateVendorByCompanyManagerResponseBody,
|
|
179
|
+
z.ZodTypeDef,
|
|
180
|
+
unknown
|
|
181
|
+
> = z.object({
|
|
182
|
+
vendor_id: types.number(),
|
|
183
|
+
}).transform((v) => {
|
|
184
|
+
return remap$(v, {
|
|
185
|
+
"vendor_id": "vendorId",
|
|
186
|
+
});
|
|
187
|
+
});
|
|
188
|
+
|
|
189
|
+
export function createVendorByCompanyManagerResponseBodyFromJSON(
|
|
190
|
+
jsonString: string,
|
|
191
|
+
): SafeParseResult<
|
|
192
|
+
CreateVendorByCompanyManagerResponseBody,
|
|
193
|
+
SDKValidationError
|
|
194
|
+
> {
|
|
195
|
+
return safeParse(
|
|
196
|
+
jsonString,
|
|
197
|
+
(x) =>
|
|
198
|
+
CreateVendorByCompanyManagerResponseBody$inboundSchema.parse(
|
|
199
|
+
JSON.parse(x),
|
|
200
|
+
),
|
|
201
|
+
`Failed to parse 'CreateVendorByCompanyManagerResponseBody' from JSON`,
|
|
202
|
+
);
|
|
203
|
+
}
|
|
@@ -19,6 +19,7 @@ export * from "./createevent.js";
|
|
|
19
19
|
export * from "./createinvoice.js";
|
|
20
20
|
export * from "./createnewvendorcredentialversion.js";
|
|
21
21
|
export * from "./createorupdatebcr.js";
|
|
22
|
+
export * from "./createvendorbycompanymanager.js";
|
|
22
23
|
export * from "./createvendorcompany.js";
|
|
23
24
|
export * from "./createvendorfield.js";
|
|
24
25
|
export * from "./createvendorregistration.js";
|
|
@@ -60,6 +61,7 @@ export * from "./listcompanymanagers.js";
|
|
|
60
61
|
export * from "./listfeed.js";
|
|
61
62
|
export * from "./listinvoices.js";
|
|
62
63
|
export * from "./listlocations.js";
|
|
64
|
+
export * from "./listlookupsystems.js";
|
|
63
65
|
export * from "./listoffhirconfigurations.js";
|
|
64
66
|
export * from "./listorsearchcompanies.js";
|
|
65
67
|
export * from "./listorsearchdepartmentcontacts.js";
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: d2e563b6fe83
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import * as z from "zod/v3";
|
|
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 components from "../components/index.js";
|
|
11
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
12
|
+
|
|
13
|
+
export const Expand = {
|
|
14
|
+
SystemFacilities: "system.facilities",
|
|
15
|
+
} as const;
|
|
16
|
+
export type Expand = ClosedEnum<typeof Expand>;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Filter systems to those with facilities of the given use type.
|
|
20
|
+
*/
|
|
21
|
+
export const Use = {
|
|
22
|
+
Credentialing: "credentialing",
|
|
23
|
+
VisitorManagement: "visitor_management",
|
|
24
|
+
} as const;
|
|
25
|
+
/**
|
|
26
|
+
* Filter systems to those with facilities of the given use type.
|
|
27
|
+
*/
|
|
28
|
+
export type Use = ClosedEnum<typeof Use>;
|
|
29
|
+
|
|
30
|
+
export type ListLookupSystemsRequest = {
|
|
31
|
+
/**
|
|
32
|
+
* Expand values to include in the response. Allowed: `system.facilities`
|
|
33
|
+
*/
|
|
34
|
+
expand?: Array<Expand> | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* Filter systems to those with facilities of the given use type.
|
|
37
|
+
*/
|
|
38
|
+
use?: Use | undefined;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* The request was successful.
|
|
43
|
+
*/
|
|
44
|
+
export type ListLookupSystemsResponseBody = {
|
|
45
|
+
systems: Array<components.SystemSummary>;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
/** @internal */
|
|
49
|
+
export const Expand$outboundSchema: z.ZodNativeEnum<typeof Expand> = z
|
|
50
|
+
.nativeEnum(Expand);
|
|
51
|
+
|
|
52
|
+
/** @internal */
|
|
53
|
+
export const Use$outboundSchema: z.ZodNativeEnum<typeof Use> = z.nativeEnum(
|
|
54
|
+
Use,
|
|
55
|
+
);
|
|
56
|
+
|
|
57
|
+
/** @internal */
|
|
58
|
+
export type ListLookupSystemsRequest$Outbound = {
|
|
59
|
+
expand?: Array<string> | undefined;
|
|
60
|
+
use?: string | undefined;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
/** @internal */
|
|
64
|
+
export const ListLookupSystemsRequest$outboundSchema: z.ZodType<
|
|
65
|
+
ListLookupSystemsRequest$Outbound,
|
|
66
|
+
z.ZodTypeDef,
|
|
67
|
+
ListLookupSystemsRequest
|
|
68
|
+
> = z.object({
|
|
69
|
+
expand: z.array(Expand$outboundSchema).optional(),
|
|
70
|
+
use: Use$outboundSchema.optional(),
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
export function listLookupSystemsRequestToJSON(
|
|
74
|
+
listLookupSystemsRequest: ListLookupSystemsRequest,
|
|
75
|
+
): string {
|
|
76
|
+
return JSON.stringify(
|
|
77
|
+
ListLookupSystemsRequest$outboundSchema.parse(listLookupSystemsRequest),
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/** @internal */
|
|
82
|
+
export const ListLookupSystemsResponseBody$inboundSchema: z.ZodType<
|
|
83
|
+
ListLookupSystemsResponseBody,
|
|
84
|
+
z.ZodTypeDef,
|
|
85
|
+
unknown
|
|
86
|
+
> = z.object({
|
|
87
|
+
systems: z.array(components.SystemSummary$inboundSchema),
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
export function listLookupSystemsResponseBodyFromJSON(
|
|
91
|
+
jsonString: string,
|
|
92
|
+
): SafeParseResult<ListLookupSystemsResponseBody, SDKValidationError> {
|
|
93
|
+
return safeParse(
|
|
94
|
+
jsonString,
|
|
95
|
+
(x) => ListLookupSystemsResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
96
|
+
`Failed to parse 'ListLookupSystemsResponseBody' from JSON`,
|
|
97
|
+
);
|
|
98
|
+
}
|
|
@@ -50,10 +50,12 @@ export type SecurityZoneCheckinRequestBody2 = {
|
|
|
50
50
|
expand?: Array<RequestBodyExpand> | undefined;
|
|
51
51
|
};
|
|
52
52
|
|
|
53
|
-
export const
|
|
53
|
+
export const SecurityZoneCheckinRequestBodyExpand = {
|
|
54
54
|
VendorScanBadgeData: "vendor_scan.badge_data",
|
|
55
55
|
} as const;
|
|
56
|
-
export type
|
|
56
|
+
export type SecurityZoneCheckinRequestBodyExpand = ClosedEnum<
|
|
57
|
+
typeof SecurityZoneCheckinRequestBodyExpand
|
|
58
|
+
>;
|
|
57
59
|
|
|
58
60
|
export type One = {
|
|
59
61
|
/**
|
|
@@ -84,7 +86,7 @@ export type One = {
|
|
|
84
86
|
scanType?: components.ScanType | undefined;
|
|
85
87
|
recheckVendorScanId?: number | undefined;
|
|
86
88
|
temperature?: number | undefined;
|
|
87
|
-
expand?: Array<
|
|
89
|
+
expand?: Array<SecurityZoneCheckinRequestBodyExpand> | undefined;
|
|
88
90
|
};
|
|
89
91
|
|
|
90
92
|
export type SecurityZoneCheckinRequestBody =
|
|
@@ -231,8 +233,10 @@ export function securityZoneCheckinRequestBody2ToJSON(
|
|
|
231
233
|
}
|
|
232
234
|
|
|
233
235
|
/** @internal */
|
|
234
|
-
export const
|
|
235
|
-
.nativeEnum(
|
|
236
|
+
export const SecurityZoneCheckinRequestBodyExpand$outboundSchema:
|
|
237
|
+
z.ZodNativeEnum<typeof SecurityZoneCheckinRequestBodyExpand> = z.nativeEnum(
|
|
238
|
+
SecurityZoneCheckinRequestBodyExpand,
|
|
239
|
+
);
|
|
236
240
|
|
|
237
241
|
/** @internal */
|
|
238
242
|
export type One$Outbound = {
|
|
@@ -280,7 +284,8 @@ export const One$outboundSchema: z.ZodType<One$Outbound, z.ZodTypeDef, One> = z
|
|
|
280
284
|
scanType: components.ScanType$outboundSchema.optional(),
|
|
281
285
|
recheckVendorScanId: z.number().int().optional(),
|
|
282
286
|
temperature: z.number().optional(),
|
|
283
|
-
expand: z.array(
|
|
287
|
+
expand: z.array(SecurityZoneCheckinRequestBodyExpand$outboundSchema)
|
|
288
|
+
.optional(),
|
|
284
289
|
}).transform((v) => {
|
|
285
290
|
return remap$(v, {
|
|
286
291
|
qrCode: "qr_code",
|
package/src/react-query/index.ts
CHANGED
|
@@ -40,6 +40,7 @@ export * from "./invoicesInvoicesExport.js";
|
|
|
40
40
|
export * from "./invoicesListInvoices.js";
|
|
41
41
|
export * from "./invoicesMakePayment.js";
|
|
42
42
|
export * from "./invoicesUpdateInvoice.js";
|
|
43
|
+
export * from "./lookupsListLookupSystems.js";
|
|
43
44
|
export * from "./mobileDevicesAddMobileDevice.js";
|
|
44
45
|
export * from "./organizationsGetFacility.js";
|
|
45
46
|
export * from "./organizationsListOrSearchDepartmentContacts.js";
|
|
@@ -77,6 +78,7 @@ export * from "./vendorsChangeSubscription.js";
|
|
|
77
78
|
export * from "./vendorsCheckDownloadCode.js";
|
|
78
79
|
export * from "./vendorsCreateNewVendorCredentialVersion.js";
|
|
79
80
|
export * from "./vendorsCreateOrUpdateBcr.js";
|
|
81
|
+
export * from "./vendorsCreateVendorByCompanyManager.js";
|
|
80
82
|
export * from "./vendorsCreateVendorCompany.js";
|
|
81
83
|
export * from "./vendorsCreateVendorRegistration.js";
|
|
82
84
|
export * from "./vendorsDeclineVendorCredential.js";
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: dcc4b9055b7d
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import {
|
|
7
|
+
QueryClient,
|
|
8
|
+
QueryFunctionContext,
|
|
9
|
+
QueryKey,
|
|
10
|
+
} from "@tanstack/react-query";
|
|
11
|
+
import { GreenSecurityCore } from "../core.js";
|
|
12
|
+
import { lookupsListLookupSystems } from "../funcs/lookupsListLookupSystems.js";
|
|
13
|
+
import { combineSignals } from "../lib/primitives.js";
|
|
14
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
15
|
+
import * as operations from "../models/operations/index.js";
|
|
16
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
17
|
+
export type LookupsListLookupSystemsQueryData =
|
|
18
|
+
operations.ListLookupSystemsResponseBody;
|
|
19
|
+
|
|
20
|
+
export function prefetchLookupsListLookupSystems(
|
|
21
|
+
queryClient: QueryClient,
|
|
22
|
+
client$: GreenSecurityCore,
|
|
23
|
+
request: operations.ListLookupSystemsRequest,
|
|
24
|
+
options?: RequestOptions,
|
|
25
|
+
): Promise<void> {
|
|
26
|
+
return queryClient.prefetchQuery({
|
|
27
|
+
...buildLookupsListLookupSystemsQuery(
|
|
28
|
+
client$,
|
|
29
|
+
request,
|
|
30
|
+
options,
|
|
31
|
+
),
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export function buildLookupsListLookupSystemsQuery(
|
|
36
|
+
client$: GreenSecurityCore,
|
|
37
|
+
request: operations.ListLookupSystemsRequest,
|
|
38
|
+
options?: RequestOptions,
|
|
39
|
+
): {
|
|
40
|
+
queryKey: QueryKey;
|
|
41
|
+
queryFn: (
|
|
42
|
+
context: QueryFunctionContext,
|
|
43
|
+
) => Promise<LookupsListLookupSystemsQueryData>;
|
|
44
|
+
} {
|
|
45
|
+
return {
|
|
46
|
+
queryKey: queryKeyLookupsListLookupSystems({
|
|
47
|
+
expand: request.expand,
|
|
48
|
+
use: request.use,
|
|
49
|
+
}),
|
|
50
|
+
queryFn: async function lookupsListLookupSystemsQueryFn(
|
|
51
|
+
ctx,
|
|
52
|
+
): Promise<LookupsListLookupSystemsQueryData> {
|
|
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(lookupsListLookupSystems(
|
|
65
|
+
client$,
|
|
66
|
+
request,
|
|
67
|
+
mergedOptions,
|
|
68
|
+
));
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function queryKeyLookupsListLookupSystems(
|
|
74
|
+
parameters: {
|
|
75
|
+
expand?: Array<operations.Expand> | undefined;
|
|
76
|
+
use?: operations.Use | undefined;
|
|
77
|
+
},
|
|
78
|
+
): QueryKey {
|
|
79
|
+
return [
|
|
80
|
+
"@greensecurity/javascript-sdk",
|
|
81
|
+
"lookups",
|
|
82
|
+
"listLookupSystems",
|
|
83
|
+
parameters,
|
|
84
|
+
];
|
|
85
|
+
}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: a3c073cb1932
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import {
|
|
7
|
+
InvalidateQueryFilters,
|
|
8
|
+
QueryClient,
|
|
9
|
+
useQuery,
|
|
10
|
+
UseQueryResult,
|
|
11
|
+
useSuspenseQuery,
|
|
12
|
+
UseSuspenseQueryResult,
|
|
13
|
+
} from "@tanstack/react-query";
|
|
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 { useGreenSecurityContext } from "./_context.js";
|
|
27
|
+
import {
|
|
28
|
+
QueryHookOptions,
|
|
29
|
+
SuspenseQueryHookOptions,
|
|
30
|
+
TupleToPrefixes,
|
|
31
|
+
} from "./_types.js";
|
|
32
|
+
import {
|
|
33
|
+
buildLookupsListLookupSystemsQuery,
|
|
34
|
+
LookupsListLookupSystemsQueryData,
|
|
35
|
+
prefetchLookupsListLookupSystems,
|
|
36
|
+
queryKeyLookupsListLookupSystems,
|
|
37
|
+
} from "./lookupsListLookupSystems.core.js";
|
|
38
|
+
export {
|
|
39
|
+
buildLookupsListLookupSystemsQuery,
|
|
40
|
+
type LookupsListLookupSystemsQueryData,
|
|
41
|
+
prefetchLookupsListLookupSystems,
|
|
42
|
+
queryKeyLookupsListLookupSystems,
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export type LookupsListLookupSystemsQueryError =
|
|
46
|
+
| errors.ApiErrorResponse
|
|
47
|
+
| GreenSecurityError
|
|
48
|
+
| ResponseValidationError
|
|
49
|
+
| ConnectionError
|
|
50
|
+
| RequestAbortedError
|
|
51
|
+
| RequestTimeoutError
|
|
52
|
+
| InvalidRequestError
|
|
53
|
+
| UnexpectedClientError
|
|
54
|
+
| SDKValidationError;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* List systems for dropdown/picker use
|
|
58
|
+
*
|
|
59
|
+
* @remarks
|
|
60
|
+
* Returns all credentialing-eligible systems (and optionally their facilities) for the authenticated user.
|
|
61
|
+
* Designed for lightweight dropdown and picker UIs.
|
|
62
|
+
*
|
|
63
|
+
* - **Company manager**: returns systems scoped to their site.
|
|
64
|
+
* - **Vendor**: returns systems available to that vendor.
|
|
65
|
+
* - **API user**: returns systems scoped to their MarketplaceAppActivation (facility, system, or site level).
|
|
66
|
+
*
|
|
67
|
+
* Use `expand=system.facilities` to include the facilities array on each system.
|
|
68
|
+
*/
|
|
69
|
+
export function useLookupsListLookupSystems(
|
|
70
|
+
request: operations.ListLookupSystemsRequest,
|
|
71
|
+
options?: QueryHookOptions<
|
|
72
|
+
LookupsListLookupSystemsQueryData,
|
|
73
|
+
LookupsListLookupSystemsQueryError
|
|
74
|
+
>,
|
|
75
|
+
): UseQueryResult<
|
|
76
|
+
LookupsListLookupSystemsQueryData,
|
|
77
|
+
LookupsListLookupSystemsQueryError
|
|
78
|
+
> {
|
|
79
|
+
const client = useGreenSecurityContext();
|
|
80
|
+
return useQuery({
|
|
81
|
+
...buildLookupsListLookupSystemsQuery(
|
|
82
|
+
client,
|
|
83
|
+
request,
|
|
84
|
+
options,
|
|
85
|
+
),
|
|
86
|
+
...options,
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* List systems for dropdown/picker use
|
|
92
|
+
*
|
|
93
|
+
* @remarks
|
|
94
|
+
* Returns all credentialing-eligible systems (and optionally their facilities) for the authenticated user.
|
|
95
|
+
* Designed for lightweight dropdown and picker UIs.
|
|
96
|
+
*
|
|
97
|
+
* - **Company manager**: returns systems scoped to their site.
|
|
98
|
+
* - **Vendor**: returns systems available to that vendor.
|
|
99
|
+
* - **API user**: returns systems scoped to their MarketplaceAppActivation (facility, system, or site level).
|
|
100
|
+
*
|
|
101
|
+
* Use `expand=system.facilities` to include the facilities array on each system.
|
|
102
|
+
*/
|
|
103
|
+
export function useLookupsListLookupSystemsSuspense(
|
|
104
|
+
request: operations.ListLookupSystemsRequest,
|
|
105
|
+
options?: SuspenseQueryHookOptions<
|
|
106
|
+
LookupsListLookupSystemsQueryData,
|
|
107
|
+
LookupsListLookupSystemsQueryError
|
|
108
|
+
>,
|
|
109
|
+
): UseSuspenseQueryResult<
|
|
110
|
+
LookupsListLookupSystemsQueryData,
|
|
111
|
+
LookupsListLookupSystemsQueryError
|
|
112
|
+
> {
|
|
113
|
+
const client = useGreenSecurityContext();
|
|
114
|
+
return useSuspenseQuery({
|
|
115
|
+
...buildLookupsListLookupSystemsQuery(
|
|
116
|
+
client,
|
|
117
|
+
request,
|
|
118
|
+
options,
|
|
119
|
+
),
|
|
120
|
+
...options,
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export function setLookupsListLookupSystemsData(
|
|
125
|
+
client: QueryClient,
|
|
126
|
+
queryKeyBase: [
|
|
127
|
+
parameters: {
|
|
128
|
+
expand?: Array<operations.Expand> | undefined;
|
|
129
|
+
use?: operations.Use | undefined;
|
|
130
|
+
},
|
|
131
|
+
],
|
|
132
|
+
data: LookupsListLookupSystemsQueryData,
|
|
133
|
+
): LookupsListLookupSystemsQueryData | undefined {
|
|
134
|
+
const key = queryKeyLookupsListLookupSystems(...queryKeyBase);
|
|
135
|
+
|
|
136
|
+
return client.setQueryData<LookupsListLookupSystemsQueryData>(key, data);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export function invalidateLookupsListLookupSystems(
|
|
140
|
+
client: QueryClient,
|
|
141
|
+
queryKeyBase: TupleToPrefixes<
|
|
142
|
+
[parameters: {
|
|
143
|
+
expand?: Array<operations.Expand> | undefined;
|
|
144
|
+
use?: operations.Use | undefined;
|
|
145
|
+
}]
|
|
146
|
+
>,
|
|
147
|
+
filters?: Omit<InvalidateQueryFilters, "queryKey" | "predicate" | "exact">,
|
|
148
|
+
): Promise<void> {
|
|
149
|
+
return client.invalidateQueries({
|
|
150
|
+
...filters,
|
|
151
|
+
queryKey: [
|
|
152
|
+
"@greensecurity/javascript-sdk",
|
|
153
|
+
"lookups",
|
|
154
|
+
"listLookupSystems",
|
|
155
|
+
...queryKeyBase,
|
|
156
|
+
],
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export function invalidateAllLookupsListLookupSystems(
|
|
161
|
+
client: QueryClient,
|
|
162
|
+
filters?: Omit<InvalidateQueryFilters, "queryKey" | "predicate" | "exact">,
|
|
163
|
+
): Promise<void> {
|
|
164
|
+
return client.invalidateQueries({
|
|
165
|
+
...filters,
|
|
166
|
+
queryKey: ["@greensecurity/javascript-sdk", "lookups", "listLookupSystems"],
|
|
167
|
+
});
|
|
168
|
+
}
|