@greensecurity/javascript-sdk 0.30.33 → 0.30.37
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 +12 -0
- package/bin/mcp-server.js +1338 -520
- package/bin/mcp-server.js.map +30 -25
- package/dist/commonjs/__tests__/vendors.test.js +2 -2
- package/dist/commonjs/__tests__/vendors.test.js.map +1 -1
- package/dist/commonjs/__tests__/webhooks.test.js +1 -1
- package/dist/commonjs/__tests__/zones.test.d.ts +2 -0
- package/dist/commonjs/__tests__/zones.test.d.ts.map +1 -0
- package/dist/commonjs/__tests__/zones.test.js +45 -0
- package/dist/commonjs/__tests__/zones.test.js.map +1 -0
- package/dist/commonjs/funcs/vendorsCreateVendorRegistration.d.ts +2 -1
- package/dist/commonjs/funcs/vendorsCreateVendorRegistration.d.ts.map +1 -1
- package/dist/commonjs/funcs/vendorsCreateVendorRegistration.js +3 -3
- package/dist/commonjs/funcs/vendorsCreateVendorRegistration.js.map +1 -1
- package/dist/commonjs/funcs/zonesListOrSearchSecurityZones.d.ts +20 -0
- package/dist/commonjs/funcs/zonesListOrSearchSecurityZones.d.ts.map +1 -0
- package/dist/commonjs/funcs/zonesListOrSearchSecurityZones.js +160 -0
- package/dist/commonjs/funcs/zonesListOrSearchSecurityZones.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/encodings.d.ts.map +1 -1
- package/dist/commonjs/lib/sdks.d.ts +3 -1
- package/dist/commonjs/lib/sdks.d.ts.map +1 -1
- package/dist/commonjs/lib/sdks.js +6 -11
- package/dist/commonjs/lib/sdks.js.map +1 -1
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/server.js +3 -1
- package/dist/commonjs/mcp-server/server.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/zonesListOrSearchSecurityZones.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/zonesListOrSearchSecurityZones.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/zonesListOrSearchSecurityZones.js +64 -0
- package/dist/commonjs/mcp-server/tools/zonesListOrSearchSecurityZones.js.map +1 -0
- package/dist/commonjs/models/components/index.d.ts +2 -0
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +2 -0
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/components/user.d.ts +6 -6
- package/dist/commonjs/models/components/user.d.ts.map +1 -1
- package/dist/commonjs/models/components/user.js +6 -6
- package/dist/commonjs/models/components/user.js.map +1 -1
- package/dist/commonjs/models/components/zone.d.ts +354 -0
- package/dist/commonjs/models/components/zone.d.ts.map +1 -0
- package/dist/commonjs/models/components/zone.js +538 -0
- package/dist/commonjs/models/components/zone.js.map +1 -0
- package/dist/commonjs/models/components/zoneconfig.d.ts +298 -0
- package/dist/commonjs/models/components/zoneconfig.d.ts.map +1 -0
- package/dist/commonjs/models/components/zoneconfig.js +454 -0
- package/dist/commonjs/models/components/zoneconfig.js.map +1 -0
- package/dist/commonjs/models/operations/createvendorregistration.d.ts +0 -49
- package/dist/commonjs/models/operations/createvendorregistration.d.ts.map +1 -1
- package/dist/commonjs/models/operations/createvendorregistration.js +1 -54
- package/dist/commonjs/models/operations/createvendorregistration.js.map +1 -1
- package/dist/commonjs/models/operations/index.d.ts +1 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +1 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/listorsearchsecurityzones.d.ts +136 -0
- package/dist/commonjs/models/operations/listorsearchsecurityzones.d.ts.map +1 -0
- package/dist/commonjs/models/operations/listorsearchsecurityzones.js +169 -0
- package/dist/commonjs/models/operations/listorsearchsecurityzones.js.map +1 -0
- package/dist/commonjs/react-query/index.d.ts +1 -0
- package/dist/commonjs/react-query/index.d.ts.map +1 -1
- package/dist/commonjs/react-query/index.js +1 -0
- package/dist/commonjs/react-query/index.js.map +1 -1
- package/dist/commonjs/react-query/vendorsCreateVendorRegistration.d.ts +2 -1
- package/dist/commonjs/react-query/vendorsCreateVendorRegistration.d.ts.map +1 -1
- package/dist/commonjs/react-query/vendorsCreateVendorRegistration.js.map +1 -1
- package/dist/commonjs/react-query/zonesListOrSearchSecurityZones.d.ts +93 -0
- package/dist/commonjs/react-query/zonesListOrSearchSecurityZones.d.ts.map +1 -0
- package/dist/commonjs/react-query/zonesListOrSearchSecurityZones.js +171 -0
- package/dist/commonjs/react-query/zonesListOrSearchSecurityZones.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 +1 -1
- package/dist/commonjs/sdk/vendors.d.ts.map +1 -1
- package/dist/commonjs/sdk/vendors.js.map +1 -1
- package/dist/commonjs/sdk/zones.d.ts +15 -0
- package/dist/commonjs/sdk/zones.d.ts.map +1 -0
- package/dist/commonjs/sdk/zones.js +22 -0
- package/dist/commonjs/sdk/zones.js.map +1 -0
- package/dist/esm/__tests__/vendors.test.js +2 -2
- package/dist/esm/__tests__/vendors.test.js.map +1 -1
- package/dist/esm/__tests__/webhooks.test.js +1 -1
- package/dist/esm/__tests__/zones.test.d.ts +2 -0
- package/dist/esm/__tests__/zones.test.d.ts.map +1 -0
- package/dist/esm/__tests__/zones.test.js +43 -0
- package/dist/esm/__tests__/zones.test.js.map +1 -0
- package/dist/esm/funcs/vendorsCreateVendorRegistration.d.ts +2 -1
- package/dist/esm/funcs/vendorsCreateVendorRegistration.d.ts.map +1 -1
- package/dist/esm/funcs/vendorsCreateVendorRegistration.js +3 -3
- package/dist/esm/funcs/vendorsCreateVendorRegistration.js.map +1 -1
- package/dist/esm/funcs/zonesListOrSearchSecurityZones.d.ts +20 -0
- package/dist/esm/funcs/zonesListOrSearchSecurityZones.d.ts.map +1 -0
- package/dist/esm/funcs/zonesListOrSearchSecurityZones.js +124 -0
- package/dist/esm/funcs/zonesListOrSearchSecurityZones.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/encodings.d.ts.map +1 -1
- package/dist/esm/lib/sdks.d.ts +3 -1
- package/dist/esm/lib/sdks.d.ts.map +1 -1
- package/dist/esm/lib/sdks.js +6 -11
- package/dist/esm/lib/sdks.js.map +1 -1
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.d.ts.map +1 -1
- package/dist/esm/mcp-server/server.js +3 -1
- package/dist/esm/mcp-server/server.js.map +1 -1
- package/dist/esm/mcp-server/tools/zonesListOrSearchSecurityZones.d.ts +8 -0
- package/dist/esm/mcp-server/tools/zonesListOrSearchSecurityZones.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/zonesListOrSearchSecurityZones.js +28 -0
- package/dist/esm/mcp-server/tools/zonesListOrSearchSecurityZones.js.map +1 -0
- package/dist/esm/models/components/index.d.ts +2 -0
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +2 -0
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/components/user.d.ts +6 -6
- package/dist/esm/models/components/user.d.ts.map +1 -1
- package/dist/esm/models/components/user.js +6 -6
- package/dist/esm/models/components/user.js.map +1 -1
- package/dist/esm/models/components/zone.d.ts +354 -0
- package/dist/esm/models/components/zone.d.ts.map +1 -0
- package/dist/esm/models/components/zone.js +482 -0
- package/dist/esm/models/components/zone.js.map +1 -0
- package/dist/esm/models/components/zoneconfig.d.ts +298 -0
- package/dist/esm/models/components/zoneconfig.d.ts.map +1 -0
- package/dist/esm/models/components/zoneconfig.js +400 -0
- package/dist/esm/models/components/zoneconfig.js.map +1 -0
- package/dist/esm/models/operations/createvendorregistration.d.ts +0 -49
- package/dist/esm/models/operations/createvendorregistration.d.ts.map +1 -1
- package/dist/esm/models/operations/createvendorregistration.js +0 -49
- package/dist/esm/models/operations/createvendorregistration.js.map +1 -1
- package/dist/esm/models/operations/index.d.ts +1 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +1 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/listorsearchsecurityzones.d.ts +136 -0
- package/dist/esm/models/operations/listorsearchsecurityzones.d.ts.map +1 -0
- package/dist/esm/models/operations/listorsearchsecurityzones.js +127 -0
- package/dist/esm/models/operations/listorsearchsecurityzones.js.map +1 -0
- package/dist/esm/react-query/index.d.ts +1 -0
- package/dist/esm/react-query/index.d.ts.map +1 -1
- package/dist/esm/react-query/index.js +1 -0
- package/dist/esm/react-query/index.js.map +1 -1
- package/dist/esm/react-query/vendorsCreateVendorRegistration.d.ts +2 -1
- package/dist/esm/react-query/vendorsCreateVendorRegistration.d.ts.map +1 -1
- package/dist/esm/react-query/vendorsCreateVendorRegistration.js.map +1 -1
- package/dist/esm/react-query/zonesListOrSearchSecurityZones.d.ts +93 -0
- package/dist/esm/react-query/zonesListOrSearchSecurityZones.d.ts.map +1 -0
- package/dist/esm/react-query/zonesListOrSearchSecurityZones.js +158 -0
- package/dist/esm/react-query/zonesListOrSearchSecurityZones.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 +1 -1
- package/dist/esm/sdk/vendors.d.ts.map +1 -1
- package/dist/esm/sdk/vendors.js.map +1 -1
- package/dist/esm/sdk/zones.d.ts +15 -0
- package/dist/esm/sdk/zones.d.ts.map +1 -0
- package/dist/esm/sdk/zones.js +18 -0
- package/dist/esm/sdk/zones.js.map +1 -0
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/__tests__/vendors.test.ts +2 -2
- package/src/__tests__/webhooks.test.ts +1 -1
- package/src/__tests__/zones.test.ts +46 -0
- package/src/funcs/vendorsCreateVendorRegistration.ts +10 -9
- package/src/funcs/zonesListOrSearchSecurityZones.ts +246 -0
- package/src/lib/config.ts +3 -3
- package/src/lib/sdks.ts +11 -11
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +3 -1
- package/src/mcp-server/tools/zonesListOrSearchSecurityZones.ts +38 -0
- package/src/models/components/index.ts +2 -0
- package/src/models/components/user.ts +12 -12
- package/src/models/components/zone.ts +907 -0
- package/src/models/components/zoneconfig.ts +761 -0
- package/src/models/operations/createvendorregistration.ts +0 -113
- package/src/models/operations/index.ts +1 -0
- package/src/models/operations/listorsearchsecurityzones.ts +294 -0
- package/src/react-query/index.ts +1 -0
- package/src/react-query/vendorsCreateVendorRegistration.ts +2 -2
- package/src/react-query/zonesListOrSearchSecurityZones.ts +370 -0
- package/src/sdk/sdk.ts +6 -0
- package/src/sdk/vendors.ts +1 -3
- package/src/sdk/zones.ts +29 -0
|
@@ -0,0 +1,907 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
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 { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
Department,
|
|
12
|
+
Department$inboundSchema,
|
|
13
|
+
Department$Outbound,
|
|
14
|
+
Department$outboundSchema,
|
|
15
|
+
} from "./department.js";
|
|
16
|
+
import {
|
|
17
|
+
Facility,
|
|
18
|
+
Facility$inboundSchema,
|
|
19
|
+
Facility$Outbound,
|
|
20
|
+
Facility$outboundSchema,
|
|
21
|
+
} from "./facility.js";
|
|
22
|
+
import {
|
|
23
|
+
ZoneConfig,
|
|
24
|
+
ZoneConfig$inboundSchema,
|
|
25
|
+
ZoneConfig$Outbound,
|
|
26
|
+
ZoneConfig$outboundSchema,
|
|
27
|
+
} from "./zoneconfig.js";
|
|
28
|
+
|
|
29
|
+
export type ZoneFacility = Facility | number;
|
|
30
|
+
|
|
31
|
+
export type ZoneDepartment = Department | number;
|
|
32
|
+
|
|
33
|
+
export type ZoneLocation = {
|
|
34
|
+
streetAddress?: string | null | undefined;
|
|
35
|
+
city?: string | null | undefined;
|
|
36
|
+
state?: string | null | undefined;
|
|
37
|
+
zip?: string | null | undefined;
|
|
38
|
+
floorNumber?: number | null | undefined;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export type KioskOfflineNotification = {
|
|
42
|
+
isOffline?: boolean | null | undefined;
|
|
43
|
+
message?: string | null | undefined;
|
|
44
|
+
autoActivate?: string | null | undefined;
|
|
45
|
+
autoDeactivate?: string | null | undefined;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export type ZoneVendorPolicy = {
|
|
49
|
+
allowGpsCheckin?: boolean | undefined;
|
|
50
|
+
allowScrubs?: boolean | undefined;
|
|
51
|
+
allowVendorScans?: boolean | undefined;
|
|
52
|
+
requiresCheckinForScrubs?: boolean | undefined;
|
|
53
|
+
overrideLimit?: number | null | undefined;
|
|
54
|
+
overrideLimitDays?: number | null | undefined;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export type ZoneVisitorCheckinPolicy = {
|
|
58
|
+
allowCheckin?: boolean | undefined;
|
|
59
|
+
allowVisiting?: boolean | undefined;
|
|
60
|
+
allowVisitingRooms?: boolean | undefined;
|
|
61
|
+
autoCheckout?: boolean | undefined;
|
|
62
|
+
maxVisitorCount?: number | null | undefined;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export type ZoneVisitRequestPolicy = {
|
|
66
|
+
allowVisiting?: boolean | undefined;
|
|
67
|
+
watchlistHitMessage?: string | null | undefined;
|
|
68
|
+
watchdogHitMessage?: string | null | undefined;
|
|
69
|
+
guestLimitExceededMessage?: string | null | undefined;
|
|
70
|
+
deniedBackgroundVendorMessage?: string | null | undefined;
|
|
71
|
+
lockedVendorMessage?: string | null | undefined;
|
|
72
|
+
stopCheckinMessage?: string | null | undefined;
|
|
73
|
+
successMessage?: string | null | undefined;
|
|
74
|
+
showGeneralVisitor?: boolean | undefined;
|
|
75
|
+
restrictToScanOnly?: boolean | undefined;
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
export type PrinterConfig = {
|
|
79
|
+
type?: string | null | undefined;
|
|
80
|
+
name?: string | null | undefined;
|
|
81
|
+
dpi?: string | null | undefined;
|
|
82
|
+
ip?: string | null | undefined;
|
|
83
|
+
port?: string | null | undefined;
|
|
84
|
+
email?: string | null | undefined;
|
|
85
|
+
flip?: boolean | undefined;
|
|
86
|
+
orientation?: string | null | undefined;
|
|
87
|
+
dymoBrightnessAdjust?: number | null | undefined;
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
export type GpsCheckinPolicy = {
|
|
91
|
+
latitude?: string | null | undefined;
|
|
92
|
+
longitude?: string | null | undefined;
|
|
93
|
+
gpsCheckinRadius?: number | null | undefined;
|
|
94
|
+
geocodeError?: string | null | undefined;
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Reduced list of attributes of Zone record
|
|
99
|
+
*/
|
|
100
|
+
export type Zone = {
|
|
101
|
+
id?: number | undefined;
|
|
102
|
+
facility?: Facility | number | null | undefined;
|
|
103
|
+
department?: Department | number | null | undefined;
|
|
104
|
+
name?: string | null | undefined;
|
|
105
|
+
shortName?: string | null | undefined;
|
|
106
|
+
description?: string | null | undefined;
|
|
107
|
+
status?: string | null | undefined;
|
|
108
|
+
notes?: string | null | undefined;
|
|
109
|
+
rules?: Array<ZoneConfig | null> | null | undefined;
|
|
110
|
+
location?: ZoneLocation | undefined;
|
|
111
|
+
kioskOfflineNotification?: KioskOfflineNotification | undefined;
|
|
112
|
+
vendorPolicy?: ZoneVendorPolicy | undefined;
|
|
113
|
+
visitorCheckinPolicy?: ZoneVisitorCheckinPolicy | undefined;
|
|
114
|
+
visitRequestPolicy?: ZoneVisitRequestPolicy | undefined;
|
|
115
|
+
printerConfig?: PrinterConfig | undefined;
|
|
116
|
+
gpsCheckinPolicy?: GpsCheckinPolicy | undefined;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
/** @internal */
|
|
120
|
+
export const ZoneFacility$inboundSchema: z.ZodType<
|
|
121
|
+
ZoneFacility,
|
|
122
|
+
z.ZodTypeDef,
|
|
123
|
+
unknown
|
|
124
|
+
> = z.union([Facility$inboundSchema, z.number().int()]);
|
|
125
|
+
|
|
126
|
+
/** @internal */
|
|
127
|
+
export type ZoneFacility$Outbound = Facility$Outbound | number;
|
|
128
|
+
|
|
129
|
+
/** @internal */
|
|
130
|
+
export const ZoneFacility$outboundSchema: z.ZodType<
|
|
131
|
+
ZoneFacility$Outbound,
|
|
132
|
+
z.ZodTypeDef,
|
|
133
|
+
ZoneFacility
|
|
134
|
+
> = z.union([Facility$outboundSchema, z.number().int()]);
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* @internal
|
|
138
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
139
|
+
*/
|
|
140
|
+
export namespace ZoneFacility$ {
|
|
141
|
+
/** @deprecated use `ZoneFacility$inboundSchema` instead. */
|
|
142
|
+
export const inboundSchema = ZoneFacility$inboundSchema;
|
|
143
|
+
/** @deprecated use `ZoneFacility$outboundSchema` instead. */
|
|
144
|
+
export const outboundSchema = ZoneFacility$outboundSchema;
|
|
145
|
+
/** @deprecated use `ZoneFacility$Outbound` instead. */
|
|
146
|
+
export type Outbound = ZoneFacility$Outbound;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export function zoneFacilityToJSON(zoneFacility: ZoneFacility): string {
|
|
150
|
+
return JSON.stringify(ZoneFacility$outboundSchema.parse(zoneFacility));
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export function zoneFacilityFromJSON(
|
|
154
|
+
jsonString: string,
|
|
155
|
+
): SafeParseResult<ZoneFacility, SDKValidationError> {
|
|
156
|
+
return safeParse(
|
|
157
|
+
jsonString,
|
|
158
|
+
(x) => ZoneFacility$inboundSchema.parse(JSON.parse(x)),
|
|
159
|
+
`Failed to parse 'ZoneFacility' from JSON`,
|
|
160
|
+
);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/** @internal */
|
|
164
|
+
export const ZoneDepartment$inboundSchema: z.ZodType<
|
|
165
|
+
ZoneDepartment,
|
|
166
|
+
z.ZodTypeDef,
|
|
167
|
+
unknown
|
|
168
|
+
> = z.union([Department$inboundSchema, z.number().int()]);
|
|
169
|
+
|
|
170
|
+
/** @internal */
|
|
171
|
+
export type ZoneDepartment$Outbound = Department$Outbound | number;
|
|
172
|
+
|
|
173
|
+
/** @internal */
|
|
174
|
+
export const ZoneDepartment$outboundSchema: z.ZodType<
|
|
175
|
+
ZoneDepartment$Outbound,
|
|
176
|
+
z.ZodTypeDef,
|
|
177
|
+
ZoneDepartment
|
|
178
|
+
> = z.union([Department$outboundSchema, z.number().int()]);
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* @internal
|
|
182
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
183
|
+
*/
|
|
184
|
+
export namespace ZoneDepartment$ {
|
|
185
|
+
/** @deprecated use `ZoneDepartment$inboundSchema` instead. */
|
|
186
|
+
export const inboundSchema = ZoneDepartment$inboundSchema;
|
|
187
|
+
/** @deprecated use `ZoneDepartment$outboundSchema` instead. */
|
|
188
|
+
export const outboundSchema = ZoneDepartment$outboundSchema;
|
|
189
|
+
/** @deprecated use `ZoneDepartment$Outbound` instead. */
|
|
190
|
+
export type Outbound = ZoneDepartment$Outbound;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export function zoneDepartmentToJSON(zoneDepartment: ZoneDepartment): string {
|
|
194
|
+
return JSON.stringify(ZoneDepartment$outboundSchema.parse(zoneDepartment));
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
export function zoneDepartmentFromJSON(
|
|
198
|
+
jsonString: string,
|
|
199
|
+
): SafeParseResult<ZoneDepartment, SDKValidationError> {
|
|
200
|
+
return safeParse(
|
|
201
|
+
jsonString,
|
|
202
|
+
(x) => ZoneDepartment$inboundSchema.parse(JSON.parse(x)),
|
|
203
|
+
`Failed to parse 'ZoneDepartment' from JSON`,
|
|
204
|
+
);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/** @internal */
|
|
208
|
+
export const ZoneLocation$inboundSchema: z.ZodType<
|
|
209
|
+
ZoneLocation,
|
|
210
|
+
z.ZodTypeDef,
|
|
211
|
+
unknown
|
|
212
|
+
> = z.object({
|
|
213
|
+
street_address: z.nullable(z.string()).optional(),
|
|
214
|
+
city: z.nullable(z.string()).optional(),
|
|
215
|
+
state: z.nullable(z.string()).optional(),
|
|
216
|
+
zip: z.nullable(z.string()).optional(),
|
|
217
|
+
floor_number: z.nullable(z.number().int()).optional(),
|
|
218
|
+
}).transform((v) => {
|
|
219
|
+
return remap$(v, {
|
|
220
|
+
"street_address": "streetAddress",
|
|
221
|
+
"floor_number": "floorNumber",
|
|
222
|
+
});
|
|
223
|
+
});
|
|
224
|
+
|
|
225
|
+
/** @internal */
|
|
226
|
+
export type ZoneLocation$Outbound = {
|
|
227
|
+
street_address?: string | null | undefined;
|
|
228
|
+
city?: string | null | undefined;
|
|
229
|
+
state?: string | null | undefined;
|
|
230
|
+
zip?: string | null | undefined;
|
|
231
|
+
floor_number?: number | null | undefined;
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
/** @internal */
|
|
235
|
+
export const ZoneLocation$outboundSchema: z.ZodType<
|
|
236
|
+
ZoneLocation$Outbound,
|
|
237
|
+
z.ZodTypeDef,
|
|
238
|
+
ZoneLocation
|
|
239
|
+
> = z.object({
|
|
240
|
+
streetAddress: z.nullable(z.string()).optional(),
|
|
241
|
+
city: z.nullable(z.string()).optional(),
|
|
242
|
+
state: z.nullable(z.string()).optional(),
|
|
243
|
+
zip: z.nullable(z.string()).optional(),
|
|
244
|
+
floorNumber: z.nullable(z.number().int()).optional(),
|
|
245
|
+
}).transform((v) => {
|
|
246
|
+
return remap$(v, {
|
|
247
|
+
streetAddress: "street_address",
|
|
248
|
+
floorNumber: "floor_number",
|
|
249
|
+
});
|
|
250
|
+
});
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* @internal
|
|
254
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
255
|
+
*/
|
|
256
|
+
export namespace ZoneLocation$ {
|
|
257
|
+
/** @deprecated use `ZoneLocation$inboundSchema` instead. */
|
|
258
|
+
export const inboundSchema = ZoneLocation$inboundSchema;
|
|
259
|
+
/** @deprecated use `ZoneLocation$outboundSchema` instead. */
|
|
260
|
+
export const outboundSchema = ZoneLocation$outboundSchema;
|
|
261
|
+
/** @deprecated use `ZoneLocation$Outbound` instead. */
|
|
262
|
+
export type Outbound = ZoneLocation$Outbound;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
export function zoneLocationToJSON(zoneLocation: ZoneLocation): string {
|
|
266
|
+
return JSON.stringify(ZoneLocation$outboundSchema.parse(zoneLocation));
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
export function zoneLocationFromJSON(
|
|
270
|
+
jsonString: string,
|
|
271
|
+
): SafeParseResult<ZoneLocation, SDKValidationError> {
|
|
272
|
+
return safeParse(
|
|
273
|
+
jsonString,
|
|
274
|
+
(x) => ZoneLocation$inboundSchema.parse(JSON.parse(x)),
|
|
275
|
+
`Failed to parse 'ZoneLocation' from JSON`,
|
|
276
|
+
);
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
/** @internal */
|
|
280
|
+
export const KioskOfflineNotification$inboundSchema: z.ZodType<
|
|
281
|
+
KioskOfflineNotification,
|
|
282
|
+
z.ZodTypeDef,
|
|
283
|
+
unknown
|
|
284
|
+
> = z.object({
|
|
285
|
+
is_offline: z.nullable(z.boolean()).optional(),
|
|
286
|
+
message: z.nullable(z.string()).optional(),
|
|
287
|
+
auto_activate: z.nullable(z.string()).optional(),
|
|
288
|
+
auto_deactivate: z.nullable(z.string()).optional(),
|
|
289
|
+
}).transform((v) => {
|
|
290
|
+
return remap$(v, {
|
|
291
|
+
"is_offline": "isOffline",
|
|
292
|
+
"auto_activate": "autoActivate",
|
|
293
|
+
"auto_deactivate": "autoDeactivate",
|
|
294
|
+
});
|
|
295
|
+
});
|
|
296
|
+
|
|
297
|
+
/** @internal */
|
|
298
|
+
export type KioskOfflineNotification$Outbound = {
|
|
299
|
+
is_offline?: boolean | null | undefined;
|
|
300
|
+
message?: string | null | undefined;
|
|
301
|
+
auto_activate?: string | null | undefined;
|
|
302
|
+
auto_deactivate?: string | null | undefined;
|
|
303
|
+
};
|
|
304
|
+
|
|
305
|
+
/** @internal */
|
|
306
|
+
export const KioskOfflineNotification$outboundSchema: z.ZodType<
|
|
307
|
+
KioskOfflineNotification$Outbound,
|
|
308
|
+
z.ZodTypeDef,
|
|
309
|
+
KioskOfflineNotification
|
|
310
|
+
> = z.object({
|
|
311
|
+
isOffline: z.nullable(z.boolean()).optional(),
|
|
312
|
+
message: z.nullable(z.string()).optional(),
|
|
313
|
+
autoActivate: z.nullable(z.string()).optional(),
|
|
314
|
+
autoDeactivate: z.nullable(z.string()).optional(),
|
|
315
|
+
}).transform((v) => {
|
|
316
|
+
return remap$(v, {
|
|
317
|
+
isOffline: "is_offline",
|
|
318
|
+
autoActivate: "auto_activate",
|
|
319
|
+
autoDeactivate: "auto_deactivate",
|
|
320
|
+
});
|
|
321
|
+
});
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* @internal
|
|
325
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
326
|
+
*/
|
|
327
|
+
export namespace KioskOfflineNotification$ {
|
|
328
|
+
/** @deprecated use `KioskOfflineNotification$inboundSchema` instead. */
|
|
329
|
+
export const inboundSchema = KioskOfflineNotification$inboundSchema;
|
|
330
|
+
/** @deprecated use `KioskOfflineNotification$outboundSchema` instead. */
|
|
331
|
+
export const outboundSchema = KioskOfflineNotification$outboundSchema;
|
|
332
|
+
/** @deprecated use `KioskOfflineNotification$Outbound` instead. */
|
|
333
|
+
export type Outbound = KioskOfflineNotification$Outbound;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
export function kioskOfflineNotificationToJSON(
|
|
337
|
+
kioskOfflineNotification: KioskOfflineNotification,
|
|
338
|
+
): string {
|
|
339
|
+
return JSON.stringify(
|
|
340
|
+
KioskOfflineNotification$outboundSchema.parse(kioskOfflineNotification),
|
|
341
|
+
);
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
export function kioskOfflineNotificationFromJSON(
|
|
345
|
+
jsonString: string,
|
|
346
|
+
): SafeParseResult<KioskOfflineNotification, SDKValidationError> {
|
|
347
|
+
return safeParse(
|
|
348
|
+
jsonString,
|
|
349
|
+
(x) => KioskOfflineNotification$inboundSchema.parse(JSON.parse(x)),
|
|
350
|
+
`Failed to parse 'KioskOfflineNotification' from JSON`,
|
|
351
|
+
);
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
/** @internal */
|
|
355
|
+
export const ZoneVendorPolicy$inboundSchema: z.ZodType<
|
|
356
|
+
ZoneVendorPolicy,
|
|
357
|
+
z.ZodTypeDef,
|
|
358
|
+
unknown
|
|
359
|
+
> = z.object({
|
|
360
|
+
allow_gps_checkin: z.boolean().optional(),
|
|
361
|
+
allow_scrubs: z.boolean().optional(),
|
|
362
|
+
allow_vendor_scans: z.boolean().optional(),
|
|
363
|
+
requires_checkin_for_scrubs: z.boolean().optional(),
|
|
364
|
+
override_limit: z.nullable(z.number().int()).optional(),
|
|
365
|
+
override_limit_days: z.nullable(z.number().int()).optional(),
|
|
366
|
+
}).transform((v) => {
|
|
367
|
+
return remap$(v, {
|
|
368
|
+
"allow_gps_checkin": "allowGpsCheckin",
|
|
369
|
+
"allow_scrubs": "allowScrubs",
|
|
370
|
+
"allow_vendor_scans": "allowVendorScans",
|
|
371
|
+
"requires_checkin_for_scrubs": "requiresCheckinForScrubs",
|
|
372
|
+
"override_limit": "overrideLimit",
|
|
373
|
+
"override_limit_days": "overrideLimitDays",
|
|
374
|
+
});
|
|
375
|
+
});
|
|
376
|
+
|
|
377
|
+
/** @internal */
|
|
378
|
+
export type ZoneVendorPolicy$Outbound = {
|
|
379
|
+
allow_gps_checkin?: boolean | undefined;
|
|
380
|
+
allow_scrubs?: boolean | undefined;
|
|
381
|
+
allow_vendor_scans?: boolean | undefined;
|
|
382
|
+
requires_checkin_for_scrubs?: boolean | undefined;
|
|
383
|
+
override_limit?: number | null | undefined;
|
|
384
|
+
override_limit_days?: number | null | undefined;
|
|
385
|
+
};
|
|
386
|
+
|
|
387
|
+
/** @internal */
|
|
388
|
+
export const ZoneVendorPolicy$outboundSchema: z.ZodType<
|
|
389
|
+
ZoneVendorPolicy$Outbound,
|
|
390
|
+
z.ZodTypeDef,
|
|
391
|
+
ZoneVendorPolicy
|
|
392
|
+
> = z.object({
|
|
393
|
+
allowGpsCheckin: z.boolean().optional(),
|
|
394
|
+
allowScrubs: z.boolean().optional(),
|
|
395
|
+
allowVendorScans: z.boolean().optional(),
|
|
396
|
+
requiresCheckinForScrubs: z.boolean().optional(),
|
|
397
|
+
overrideLimit: z.nullable(z.number().int()).optional(),
|
|
398
|
+
overrideLimitDays: z.nullable(z.number().int()).optional(),
|
|
399
|
+
}).transform((v) => {
|
|
400
|
+
return remap$(v, {
|
|
401
|
+
allowGpsCheckin: "allow_gps_checkin",
|
|
402
|
+
allowScrubs: "allow_scrubs",
|
|
403
|
+
allowVendorScans: "allow_vendor_scans",
|
|
404
|
+
requiresCheckinForScrubs: "requires_checkin_for_scrubs",
|
|
405
|
+
overrideLimit: "override_limit",
|
|
406
|
+
overrideLimitDays: "override_limit_days",
|
|
407
|
+
});
|
|
408
|
+
});
|
|
409
|
+
|
|
410
|
+
/**
|
|
411
|
+
* @internal
|
|
412
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
413
|
+
*/
|
|
414
|
+
export namespace ZoneVendorPolicy$ {
|
|
415
|
+
/** @deprecated use `ZoneVendorPolicy$inboundSchema` instead. */
|
|
416
|
+
export const inboundSchema = ZoneVendorPolicy$inboundSchema;
|
|
417
|
+
/** @deprecated use `ZoneVendorPolicy$outboundSchema` instead. */
|
|
418
|
+
export const outboundSchema = ZoneVendorPolicy$outboundSchema;
|
|
419
|
+
/** @deprecated use `ZoneVendorPolicy$Outbound` instead. */
|
|
420
|
+
export type Outbound = ZoneVendorPolicy$Outbound;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
export function zoneVendorPolicyToJSON(
|
|
424
|
+
zoneVendorPolicy: ZoneVendorPolicy,
|
|
425
|
+
): string {
|
|
426
|
+
return JSON.stringify(
|
|
427
|
+
ZoneVendorPolicy$outboundSchema.parse(zoneVendorPolicy),
|
|
428
|
+
);
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
export function zoneVendorPolicyFromJSON(
|
|
432
|
+
jsonString: string,
|
|
433
|
+
): SafeParseResult<ZoneVendorPolicy, SDKValidationError> {
|
|
434
|
+
return safeParse(
|
|
435
|
+
jsonString,
|
|
436
|
+
(x) => ZoneVendorPolicy$inboundSchema.parse(JSON.parse(x)),
|
|
437
|
+
`Failed to parse 'ZoneVendorPolicy' from JSON`,
|
|
438
|
+
);
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
/** @internal */
|
|
442
|
+
export const ZoneVisitorCheckinPolicy$inboundSchema: z.ZodType<
|
|
443
|
+
ZoneVisitorCheckinPolicy,
|
|
444
|
+
z.ZodTypeDef,
|
|
445
|
+
unknown
|
|
446
|
+
> = z.object({
|
|
447
|
+
allow_checkin: z.boolean().optional(),
|
|
448
|
+
allow_visiting: z.boolean().optional(),
|
|
449
|
+
allow_visiting_rooms: z.boolean().optional(),
|
|
450
|
+
auto_checkout: z.boolean().optional(),
|
|
451
|
+
max_visitor_count: z.nullable(z.number().int()).optional(),
|
|
452
|
+
}).transform((v) => {
|
|
453
|
+
return remap$(v, {
|
|
454
|
+
"allow_checkin": "allowCheckin",
|
|
455
|
+
"allow_visiting": "allowVisiting",
|
|
456
|
+
"allow_visiting_rooms": "allowVisitingRooms",
|
|
457
|
+
"auto_checkout": "autoCheckout",
|
|
458
|
+
"max_visitor_count": "maxVisitorCount",
|
|
459
|
+
});
|
|
460
|
+
});
|
|
461
|
+
|
|
462
|
+
/** @internal */
|
|
463
|
+
export type ZoneVisitorCheckinPolicy$Outbound = {
|
|
464
|
+
allow_checkin?: boolean | undefined;
|
|
465
|
+
allow_visiting?: boolean | undefined;
|
|
466
|
+
allow_visiting_rooms?: boolean | undefined;
|
|
467
|
+
auto_checkout?: boolean | undefined;
|
|
468
|
+
max_visitor_count?: number | null | undefined;
|
|
469
|
+
};
|
|
470
|
+
|
|
471
|
+
/** @internal */
|
|
472
|
+
export const ZoneVisitorCheckinPolicy$outboundSchema: z.ZodType<
|
|
473
|
+
ZoneVisitorCheckinPolicy$Outbound,
|
|
474
|
+
z.ZodTypeDef,
|
|
475
|
+
ZoneVisitorCheckinPolicy
|
|
476
|
+
> = z.object({
|
|
477
|
+
allowCheckin: z.boolean().optional(),
|
|
478
|
+
allowVisiting: z.boolean().optional(),
|
|
479
|
+
allowVisitingRooms: z.boolean().optional(),
|
|
480
|
+
autoCheckout: z.boolean().optional(),
|
|
481
|
+
maxVisitorCount: z.nullable(z.number().int()).optional(),
|
|
482
|
+
}).transform((v) => {
|
|
483
|
+
return remap$(v, {
|
|
484
|
+
allowCheckin: "allow_checkin",
|
|
485
|
+
allowVisiting: "allow_visiting",
|
|
486
|
+
allowVisitingRooms: "allow_visiting_rooms",
|
|
487
|
+
autoCheckout: "auto_checkout",
|
|
488
|
+
maxVisitorCount: "max_visitor_count",
|
|
489
|
+
});
|
|
490
|
+
});
|
|
491
|
+
|
|
492
|
+
/**
|
|
493
|
+
* @internal
|
|
494
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
495
|
+
*/
|
|
496
|
+
export namespace ZoneVisitorCheckinPolicy$ {
|
|
497
|
+
/** @deprecated use `ZoneVisitorCheckinPolicy$inboundSchema` instead. */
|
|
498
|
+
export const inboundSchema = ZoneVisitorCheckinPolicy$inboundSchema;
|
|
499
|
+
/** @deprecated use `ZoneVisitorCheckinPolicy$outboundSchema` instead. */
|
|
500
|
+
export const outboundSchema = ZoneVisitorCheckinPolicy$outboundSchema;
|
|
501
|
+
/** @deprecated use `ZoneVisitorCheckinPolicy$Outbound` instead. */
|
|
502
|
+
export type Outbound = ZoneVisitorCheckinPolicy$Outbound;
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
export function zoneVisitorCheckinPolicyToJSON(
|
|
506
|
+
zoneVisitorCheckinPolicy: ZoneVisitorCheckinPolicy,
|
|
507
|
+
): string {
|
|
508
|
+
return JSON.stringify(
|
|
509
|
+
ZoneVisitorCheckinPolicy$outboundSchema.parse(zoneVisitorCheckinPolicy),
|
|
510
|
+
);
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
export function zoneVisitorCheckinPolicyFromJSON(
|
|
514
|
+
jsonString: string,
|
|
515
|
+
): SafeParseResult<ZoneVisitorCheckinPolicy, SDKValidationError> {
|
|
516
|
+
return safeParse(
|
|
517
|
+
jsonString,
|
|
518
|
+
(x) => ZoneVisitorCheckinPolicy$inboundSchema.parse(JSON.parse(x)),
|
|
519
|
+
`Failed to parse 'ZoneVisitorCheckinPolicy' from JSON`,
|
|
520
|
+
);
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
/** @internal */
|
|
524
|
+
export const ZoneVisitRequestPolicy$inboundSchema: z.ZodType<
|
|
525
|
+
ZoneVisitRequestPolicy,
|
|
526
|
+
z.ZodTypeDef,
|
|
527
|
+
unknown
|
|
528
|
+
> = z.object({
|
|
529
|
+
allow_visiting: z.boolean().optional(),
|
|
530
|
+
watchlist_hit_message: z.nullable(z.string()).optional(),
|
|
531
|
+
watchdog_hit_message: z.nullable(z.string()).optional(),
|
|
532
|
+
guest_limit_exceeded_message: z.nullable(z.string()).optional(),
|
|
533
|
+
denied_background_vendor_message: z.nullable(z.string()).optional(),
|
|
534
|
+
locked_vendor_message: z.nullable(z.string()).optional(),
|
|
535
|
+
stop_checkin_message: z.nullable(z.string()).optional(),
|
|
536
|
+
success_message: z.nullable(z.string()).optional(),
|
|
537
|
+
show_general_visitor: z.boolean().optional(),
|
|
538
|
+
restrict_to_scan_only: z.boolean().optional(),
|
|
539
|
+
}).transform((v) => {
|
|
540
|
+
return remap$(v, {
|
|
541
|
+
"allow_visiting": "allowVisiting",
|
|
542
|
+
"watchlist_hit_message": "watchlistHitMessage",
|
|
543
|
+
"watchdog_hit_message": "watchdogHitMessage",
|
|
544
|
+
"guest_limit_exceeded_message": "guestLimitExceededMessage",
|
|
545
|
+
"denied_background_vendor_message": "deniedBackgroundVendorMessage",
|
|
546
|
+
"locked_vendor_message": "lockedVendorMessage",
|
|
547
|
+
"stop_checkin_message": "stopCheckinMessage",
|
|
548
|
+
"success_message": "successMessage",
|
|
549
|
+
"show_general_visitor": "showGeneralVisitor",
|
|
550
|
+
"restrict_to_scan_only": "restrictToScanOnly",
|
|
551
|
+
});
|
|
552
|
+
});
|
|
553
|
+
|
|
554
|
+
/** @internal */
|
|
555
|
+
export type ZoneVisitRequestPolicy$Outbound = {
|
|
556
|
+
allow_visiting?: boolean | undefined;
|
|
557
|
+
watchlist_hit_message?: string | null | undefined;
|
|
558
|
+
watchdog_hit_message?: string | null | undefined;
|
|
559
|
+
guest_limit_exceeded_message?: string | null | undefined;
|
|
560
|
+
denied_background_vendor_message?: string | null | undefined;
|
|
561
|
+
locked_vendor_message?: string | null | undefined;
|
|
562
|
+
stop_checkin_message?: string | null | undefined;
|
|
563
|
+
success_message?: string | null | undefined;
|
|
564
|
+
show_general_visitor?: boolean | undefined;
|
|
565
|
+
restrict_to_scan_only?: boolean | undefined;
|
|
566
|
+
};
|
|
567
|
+
|
|
568
|
+
/** @internal */
|
|
569
|
+
export const ZoneVisitRequestPolicy$outboundSchema: z.ZodType<
|
|
570
|
+
ZoneVisitRequestPolicy$Outbound,
|
|
571
|
+
z.ZodTypeDef,
|
|
572
|
+
ZoneVisitRequestPolicy
|
|
573
|
+
> = z.object({
|
|
574
|
+
allowVisiting: z.boolean().optional(),
|
|
575
|
+
watchlistHitMessage: z.nullable(z.string()).optional(),
|
|
576
|
+
watchdogHitMessage: z.nullable(z.string()).optional(),
|
|
577
|
+
guestLimitExceededMessage: z.nullable(z.string()).optional(),
|
|
578
|
+
deniedBackgroundVendorMessage: z.nullable(z.string()).optional(),
|
|
579
|
+
lockedVendorMessage: z.nullable(z.string()).optional(),
|
|
580
|
+
stopCheckinMessage: z.nullable(z.string()).optional(),
|
|
581
|
+
successMessage: z.nullable(z.string()).optional(),
|
|
582
|
+
showGeneralVisitor: z.boolean().optional(),
|
|
583
|
+
restrictToScanOnly: z.boolean().optional(),
|
|
584
|
+
}).transform((v) => {
|
|
585
|
+
return remap$(v, {
|
|
586
|
+
allowVisiting: "allow_visiting",
|
|
587
|
+
watchlistHitMessage: "watchlist_hit_message",
|
|
588
|
+
watchdogHitMessage: "watchdog_hit_message",
|
|
589
|
+
guestLimitExceededMessage: "guest_limit_exceeded_message",
|
|
590
|
+
deniedBackgroundVendorMessage: "denied_background_vendor_message",
|
|
591
|
+
lockedVendorMessage: "locked_vendor_message",
|
|
592
|
+
stopCheckinMessage: "stop_checkin_message",
|
|
593
|
+
successMessage: "success_message",
|
|
594
|
+
showGeneralVisitor: "show_general_visitor",
|
|
595
|
+
restrictToScanOnly: "restrict_to_scan_only",
|
|
596
|
+
});
|
|
597
|
+
});
|
|
598
|
+
|
|
599
|
+
/**
|
|
600
|
+
* @internal
|
|
601
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
602
|
+
*/
|
|
603
|
+
export namespace ZoneVisitRequestPolicy$ {
|
|
604
|
+
/** @deprecated use `ZoneVisitRequestPolicy$inboundSchema` instead. */
|
|
605
|
+
export const inboundSchema = ZoneVisitRequestPolicy$inboundSchema;
|
|
606
|
+
/** @deprecated use `ZoneVisitRequestPolicy$outboundSchema` instead. */
|
|
607
|
+
export const outboundSchema = ZoneVisitRequestPolicy$outboundSchema;
|
|
608
|
+
/** @deprecated use `ZoneVisitRequestPolicy$Outbound` instead. */
|
|
609
|
+
export type Outbound = ZoneVisitRequestPolicy$Outbound;
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
export function zoneVisitRequestPolicyToJSON(
|
|
613
|
+
zoneVisitRequestPolicy: ZoneVisitRequestPolicy,
|
|
614
|
+
): string {
|
|
615
|
+
return JSON.stringify(
|
|
616
|
+
ZoneVisitRequestPolicy$outboundSchema.parse(zoneVisitRequestPolicy),
|
|
617
|
+
);
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
export function zoneVisitRequestPolicyFromJSON(
|
|
621
|
+
jsonString: string,
|
|
622
|
+
): SafeParseResult<ZoneVisitRequestPolicy, SDKValidationError> {
|
|
623
|
+
return safeParse(
|
|
624
|
+
jsonString,
|
|
625
|
+
(x) => ZoneVisitRequestPolicy$inboundSchema.parse(JSON.parse(x)),
|
|
626
|
+
`Failed to parse 'ZoneVisitRequestPolicy' from JSON`,
|
|
627
|
+
);
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
/** @internal */
|
|
631
|
+
export const PrinterConfig$inboundSchema: z.ZodType<
|
|
632
|
+
PrinterConfig,
|
|
633
|
+
z.ZodTypeDef,
|
|
634
|
+
unknown
|
|
635
|
+
> = z.object({
|
|
636
|
+
type: z.nullable(z.string()).optional(),
|
|
637
|
+
name: z.nullable(z.string()).optional(),
|
|
638
|
+
dpi: z.nullable(z.string()).optional(),
|
|
639
|
+
ip: z.nullable(z.string()).optional(),
|
|
640
|
+
port: z.nullable(z.string()).optional(),
|
|
641
|
+
email: z.nullable(z.string()).optional(),
|
|
642
|
+
flip: z.boolean().optional(),
|
|
643
|
+
orientation: z.nullable(z.string()).optional(),
|
|
644
|
+
dymo_brightness_adjust: z.nullable(z.number().int()).optional(),
|
|
645
|
+
}).transform((v) => {
|
|
646
|
+
return remap$(v, {
|
|
647
|
+
"dymo_brightness_adjust": "dymoBrightnessAdjust",
|
|
648
|
+
});
|
|
649
|
+
});
|
|
650
|
+
|
|
651
|
+
/** @internal */
|
|
652
|
+
export type PrinterConfig$Outbound = {
|
|
653
|
+
type?: string | null | undefined;
|
|
654
|
+
name?: string | null | undefined;
|
|
655
|
+
dpi?: string | null | undefined;
|
|
656
|
+
ip?: string | null | undefined;
|
|
657
|
+
port?: string | null | undefined;
|
|
658
|
+
email?: string | null | undefined;
|
|
659
|
+
flip?: boolean | undefined;
|
|
660
|
+
orientation?: string | null | undefined;
|
|
661
|
+
dymo_brightness_adjust?: number | null | undefined;
|
|
662
|
+
};
|
|
663
|
+
|
|
664
|
+
/** @internal */
|
|
665
|
+
export const PrinterConfig$outboundSchema: z.ZodType<
|
|
666
|
+
PrinterConfig$Outbound,
|
|
667
|
+
z.ZodTypeDef,
|
|
668
|
+
PrinterConfig
|
|
669
|
+
> = z.object({
|
|
670
|
+
type: z.nullable(z.string()).optional(),
|
|
671
|
+
name: z.nullable(z.string()).optional(),
|
|
672
|
+
dpi: z.nullable(z.string()).optional(),
|
|
673
|
+
ip: z.nullable(z.string()).optional(),
|
|
674
|
+
port: z.nullable(z.string()).optional(),
|
|
675
|
+
email: z.nullable(z.string()).optional(),
|
|
676
|
+
flip: z.boolean().optional(),
|
|
677
|
+
orientation: z.nullable(z.string()).optional(),
|
|
678
|
+
dymoBrightnessAdjust: z.nullable(z.number().int()).optional(),
|
|
679
|
+
}).transform((v) => {
|
|
680
|
+
return remap$(v, {
|
|
681
|
+
dymoBrightnessAdjust: "dymo_brightness_adjust",
|
|
682
|
+
});
|
|
683
|
+
});
|
|
684
|
+
|
|
685
|
+
/**
|
|
686
|
+
* @internal
|
|
687
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
688
|
+
*/
|
|
689
|
+
export namespace PrinterConfig$ {
|
|
690
|
+
/** @deprecated use `PrinterConfig$inboundSchema` instead. */
|
|
691
|
+
export const inboundSchema = PrinterConfig$inboundSchema;
|
|
692
|
+
/** @deprecated use `PrinterConfig$outboundSchema` instead. */
|
|
693
|
+
export const outboundSchema = PrinterConfig$outboundSchema;
|
|
694
|
+
/** @deprecated use `PrinterConfig$Outbound` instead. */
|
|
695
|
+
export type Outbound = PrinterConfig$Outbound;
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
export function printerConfigToJSON(printerConfig: PrinterConfig): string {
|
|
699
|
+
return JSON.stringify(PrinterConfig$outboundSchema.parse(printerConfig));
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
export function printerConfigFromJSON(
|
|
703
|
+
jsonString: string,
|
|
704
|
+
): SafeParseResult<PrinterConfig, SDKValidationError> {
|
|
705
|
+
return safeParse(
|
|
706
|
+
jsonString,
|
|
707
|
+
(x) => PrinterConfig$inboundSchema.parse(JSON.parse(x)),
|
|
708
|
+
`Failed to parse 'PrinterConfig' from JSON`,
|
|
709
|
+
);
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
/** @internal */
|
|
713
|
+
export const GpsCheckinPolicy$inboundSchema: z.ZodType<
|
|
714
|
+
GpsCheckinPolicy,
|
|
715
|
+
z.ZodTypeDef,
|
|
716
|
+
unknown
|
|
717
|
+
> = z.object({
|
|
718
|
+
latitude: z.nullable(z.string()).optional(),
|
|
719
|
+
longitude: z.nullable(z.string()).optional(),
|
|
720
|
+
gps_checkin_radius: z.nullable(z.number().int()).optional(),
|
|
721
|
+
geocode_error: z.nullable(z.string()).optional(),
|
|
722
|
+
}).transform((v) => {
|
|
723
|
+
return remap$(v, {
|
|
724
|
+
"gps_checkin_radius": "gpsCheckinRadius",
|
|
725
|
+
"geocode_error": "geocodeError",
|
|
726
|
+
});
|
|
727
|
+
});
|
|
728
|
+
|
|
729
|
+
/** @internal */
|
|
730
|
+
export type GpsCheckinPolicy$Outbound = {
|
|
731
|
+
latitude?: string | null | undefined;
|
|
732
|
+
longitude?: string | null | undefined;
|
|
733
|
+
gps_checkin_radius?: number | null | undefined;
|
|
734
|
+
geocode_error?: string | null | undefined;
|
|
735
|
+
};
|
|
736
|
+
|
|
737
|
+
/** @internal */
|
|
738
|
+
export const GpsCheckinPolicy$outboundSchema: z.ZodType<
|
|
739
|
+
GpsCheckinPolicy$Outbound,
|
|
740
|
+
z.ZodTypeDef,
|
|
741
|
+
GpsCheckinPolicy
|
|
742
|
+
> = z.object({
|
|
743
|
+
latitude: z.nullable(z.string()).optional(),
|
|
744
|
+
longitude: z.nullable(z.string()).optional(),
|
|
745
|
+
gpsCheckinRadius: z.nullable(z.number().int()).optional(),
|
|
746
|
+
geocodeError: z.nullable(z.string()).optional(),
|
|
747
|
+
}).transform((v) => {
|
|
748
|
+
return remap$(v, {
|
|
749
|
+
gpsCheckinRadius: "gps_checkin_radius",
|
|
750
|
+
geocodeError: "geocode_error",
|
|
751
|
+
});
|
|
752
|
+
});
|
|
753
|
+
|
|
754
|
+
/**
|
|
755
|
+
* @internal
|
|
756
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
757
|
+
*/
|
|
758
|
+
export namespace GpsCheckinPolicy$ {
|
|
759
|
+
/** @deprecated use `GpsCheckinPolicy$inboundSchema` instead. */
|
|
760
|
+
export const inboundSchema = GpsCheckinPolicy$inboundSchema;
|
|
761
|
+
/** @deprecated use `GpsCheckinPolicy$outboundSchema` instead. */
|
|
762
|
+
export const outboundSchema = GpsCheckinPolicy$outboundSchema;
|
|
763
|
+
/** @deprecated use `GpsCheckinPolicy$Outbound` instead. */
|
|
764
|
+
export type Outbound = GpsCheckinPolicy$Outbound;
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
export function gpsCheckinPolicyToJSON(
|
|
768
|
+
gpsCheckinPolicy: GpsCheckinPolicy,
|
|
769
|
+
): string {
|
|
770
|
+
return JSON.stringify(
|
|
771
|
+
GpsCheckinPolicy$outboundSchema.parse(gpsCheckinPolicy),
|
|
772
|
+
);
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
export function gpsCheckinPolicyFromJSON(
|
|
776
|
+
jsonString: string,
|
|
777
|
+
): SafeParseResult<GpsCheckinPolicy, SDKValidationError> {
|
|
778
|
+
return safeParse(
|
|
779
|
+
jsonString,
|
|
780
|
+
(x) => GpsCheckinPolicy$inboundSchema.parse(JSON.parse(x)),
|
|
781
|
+
`Failed to parse 'GpsCheckinPolicy' from JSON`,
|
|
782
|
+
);
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
/** @internal */
|
|
786
|
+
export const Zone$inboundSchema: z.ZodType<Zone, z.ZodTypeDef, unknown> = z
|
|
787
|
+
.object({
|
|
788
|
+
id: z.number().int().optional(),
|
|
789
|
+
facility: z.nullable(z.union([Facility$inboundSchema, z.number().int()]))
|
|
790
|
+
.optional(),
|
|
791
|
+
department: z.nullable(
|
|
792
|
+
z.union([Department$inboundSchema, z.number().int()]),
|
|
793
|
+
).optional(),
|
|
794
|
+
name: z.nullable(z.string()).optional(),
|
|
795
|
+
short_name: z.nullable(z.string()).optional(),
|
|
796
|
+
description: z.nullable(z.string()).optional(),
|
|
797
|
+
status: z.nullable(z.string()).optional(),
|
|
798
|
+
notes: z.nullable(z.string()).optional(),
|
|
799
|
+
rules: z.nullable(z.array(z.nullable(ZoneConfig$inboundSchema))).optional(),
|
|
800
|
+
location: z.lazy(() => ZoneLocation$inboundSchema).optional(),
|
|
801
|
+
kiosk_offline_notification: z.lazy(() =>
|
|
802
|
+
KioskOfflineNotification$inboundSchema
|
|
803
|
+
).optional(),
|
|
804
|
+
vendor_policy: z.lazy(() => ZoneVendorPolicy$inboundSchema).optional(),
|
|
805
|
+
visitor_checkin_policy: z.lazy(() => ZoneVisitorCheckinPolicy$inboundSchema)
|
|
806
|
+
.optional(),
|
|
807
|
+
visit_request_policy: z.lazy(() => ZoneVisitRequestPolicy$inboundSchema)
|
|
808
|
+
.optional(),
|
|
809
|
+
printer_config: z.lazy(() => PrinterConfig$inboundSchema).optional(),
|
|
810
|
+
gps_checkin_policy: z.lazy(() => GpsCheckinPolicy$inboundSchema).optional(),
|
|
811
|
+
}).transform((v) => {
|
|
812
|
+
return remap$(v, {
|
|
813
|
+
"short_name": "shortName",
|
|
814
|
+
"kiosk_offline_notification": "kioskOfflineNotification",
|
|
815
|
+
"vendor_policy": "vendorPolicy",
|
|
816
|
+
"visitor_checkin_policy": "visitorCheckinPolicy",
|
|
817
|
+
"visit_request_policy": "visitRequestPolicy",
|
|
818
|
+
"printer_config": "printerConfig",
|
|
819
|
+
"gps_checkin_policy": "gpsCheckinPolicy",
|
|
820
|
+
});
|
|
821
|
+
});
|
|
822
|
+
|
|
823
|
+
/** @internal */
|
|
824
|
+
export type Zone$Outbound = {
|
|
825
|
+
id?: number | undefined;
|
|
826
|
+
facility?: Facility$Outbound | number | null | undefined;
|
|
827
|
+
department?: Department$Outbound | number | null | undefined;
|
|
828
|
+
name?: string | null | undefined;
|
|
829
|
+
short_name?: string | null | undefined;
|
|
830
|
+
description?: string | null | undefined;
|
|
831
|
+
status?: string | null | undefined;
|
|
832
|
+
notes?: string | null | undefined;
|
|
833
|
+
rules?: Array<ZoneConfig$Outbound | null> | null | undefined;
|
|
834
|
+
location?: ZoneLocation$Outbound | undefined;
|
|
835
|
+
kiosk_offline_notification?: KioskOfflineNotification$Outbound | undefined;
|
|
836
|
+
vendor_policy?: ZoneVendorPolicy$Outbound | undefined;
|
|
837
|
+
visitor_checkin_policy?: ZoneVisitorCheckinPolicy$Outbound | undefined;
|
|
838
|
+
visit_request_policy?: ZoneVisitRequestPolicy$Outbound | undefined;
|
|
839
|
+
printer_config?: PrinterConfig$Outbound | undefined;
|
|
840
|
+
gps_checkin_policy?: GpsCheckinPolicy$Outbound | undefined;
|
|
841
|
+
};
|
|
842
|
+
|
|
843
|
+
/** @internal */
|
|
844
|
+
export const Zone$outboundSchema: z.ZodType<Zone$Outbound, z.ZodTypeDef, Zone> =
|
|
845
|
+
z.object({
|
|
846
|
+
id: z.number().int().optional(),
|
|
847
|
+
facility: z.nullable(z.union([Facility$outboundSchema, z.number().int()]))
|
|
848
|
+
.optional(),
|
|
849
|
+
department: z.nullable(
|
|
850
|
+
z.union([Department$outboundSchema, z.number().int()]),
|
|
851
|
+
).optional(),
|
|
852
|
+
name: z.nullable(z.string()).optional(),
|
|
853
|
+
shortName: z.nullable(z.string()).optional(),
|
|
854
|
+
description: z.nullable(z.string()).optional(),
|
|
855
|
+
status: z.nullable(z.string()).optional(),
|
|
856
|
+
notes: z.nullable(z.string()).optional(),
|
|
857
|
+
rules: z.nullable(z.array(z.nullable(ZoneConfig$outboundSchema)))
|
|
858
|
+
.optional(),
|
|
859
|
+
location: z.lazy(() => ZoneLocation$outboundSchema).optional(),
|
|
860
|
+
kioskOfflineNotification: z.lazy(() =>
|
|
861
|
+
KioskOfflineNotification$outboundSchema
|
|
862
|
+
).optional(),
|
|
863
|
+
vendorPolicy: z.lazy(() => ZoneVendorPolicy$outboundSchema).optional(),
|
|
864
|
+
visitorCheckinPolicy: z.lazy(() => ZoneVisitorCheckinPolicy$outboundSchema)
|
|
865
|
+
.optional(),
|
|
866
|
+
visitRequestPolicy: z.lazy(() => ZoneVisitRequestPolicy$outboundSchema)
|
|
867
|
+
.optional(),
|
|
868
|
+
printerConfig: z.lazy(() => PrinterConfig$outboundSchema).optional(),
|
|
869
|
+
gpsCheckinPolicy: z.lazy(() => GpsCheckinPolicy$outboundSchema).optional(),
|
|
870
|
+
}).transform((v) => {
|
|
871
|
+
return remap$(v, {
|
|
872
|
+
shortName: "short_name",
|
|
873
|
+
kioskOfflineNotification: "kiosk_offline_notification",
|
|
874
|
+
vendorPolicy: "vendor_policy",
|
|
875
|
+
visitorCheckinPolicy: "visitor_checkin_policy",
|
|
876
|
+
visitRequestPolicy: "visit_request_policy",
|
|
877
|
+
printerConfig: "printer_config",
|
|
878
|
+
gpsCheckinPolicy: "gps_checkin_policy",
|
|
879
|
+
});
|
|
880
|
+
});
|
|
881
|
+
|
|
882
|
+
/**
|
|
883
|
+
* @internal
|
|
884
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
885
|
+
*/
|
|
886
|
+
export namespace Zone$ {
|
|
887
|
+
/** @deprecated use `Zone$inboundSchema` instead. */
|
|
888
|
+
export const inboundSchema = Zone$inboundSchema;
|
|
889
|
+
/** @deprecated use `Zone$outboundSchema` instead. */
|
|
890
|
+
export const outboundSchema = Zone$outboundSchema;
|
|
891
|
+
/** @deprecated use `Zone$Outbound` instead. */
|
|
892
|
+
export type Outbound = Zone$Outbound;
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
export function zoneToJSON(zone: Zone): string {
|
|
896
|
+
return JSON.stringify(Zone$outboundSchema.parse(zone));
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
export function zoneFromJSON(
|
|
900
|
+
jsonString: string,
|
|
901
|
+
): SafeParseResult<Zone, SDKValidationError> {
|
|
902
|
+
return safeParse(
|
|
903
|
+
jsonString,
|
|
904
|
+
(x) => Zone$inboundSchema.parse(JSON.parse(x)),
|
|
905
|
+
`Failed to parse 'Zone' from JSON`,
|
|
906
|
+
);
|
|
907
|
+
}
|