@greensecurity/javascript-sdk 0.30.37 → 0.30.42

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.
Files changed (125) hide show
  1. package/README.md +3 -0
  2. package/bin/mcp-server.js +2120 -1899
  3. package/bin/mcp-server.js.map +14 -10
  4. package/dist/commonjs/__tests__/vendormanagedbycompanies.test.js +1 -1
  5. package/dist/commonjs/__tests__/vendormanagedbycompanies.test.js.map +1 -1
  6. package/dist/commonjs/__tests__/vendors.test.js +2 -2
  7. package/dist/commonjs/__tests__/vendors.test.js.map +1 -1
  8. package/dist/commonjs/__tests__/zones.test.js +52 -2
  9. package/dist/commonjs/__tests__/zones.test.js.map +1 -1
  10. package/dist/commonjs/funcs/zonesSecurityZoneCheckin.d.ts +18 -0
  11. package/dist/commonjs/funcs/zonesSecurityZoneCheckin.d.ts.map +1 -0
  12. package/dist/commonjs/funcs/zonesSecurityZoneCheckin.js +116 -0
  13. package/dist/commonjs/funcs/zonesSecurityZoneCheckin.js.map +1 -0
  14. package/dist/commonjs/lib/config.d.ts +3 -3
  15. package/dist/commonjs/lib/config.js +3 -3
  16. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  17. package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
  18. package/dist/commonjs/mcp-server/server.js +3 -1
  19. package/dist/commonjs/mcp-server/server.js.map +1 -1
  20. package/dist/commonjs/mcp-server/tools/zonesSecurityZoneCheckin.d.ts +8 -0
  21. package/dist/commonjs/mcp-server/tools/zonesSecurityZoneCheckin.d.ts.map +1 -0
  22. package/dist/commonjs/mcp-server/tools/zonesSecurityZoneCheckin.js +64 -0
  23. package/dist/commonjs/mcp-server/tools/zonesSecurityZoneCheckin.js.map +1 -0
  24. package/dist/commonjs/models/components/handoff.d.ts +50 -0
  25. package/dist/commonjs/models/components/handoff.d.ts.map +1 -0
  26. package/dist/commonjs/models/components/handoff.js +101 -0
  27. package/dist/commonjs/models/components/handoff.js.map +1 -0
  28. package/dist/commonjs/models/components/index.d.ts +1 -0
  29. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  30. package/dist/commonjs/models/components/index.js +1 -0
  31. package/dist/commonjs/models/components/index.js.map +1 -1
  32. package/dist/commonjs/models/components/zone.d.ts +33 -6
  33. package/dist/commonjs/models/components/zone.d.ts.map +1 -1
  34. package/dist/commonjs/models/components/zone.js +38 -9
  35. package/dist/commonjs/models/components/zone.js.map +1 -1
  36. package/dist/commonjs/models/operations/index.d.ts +1 -0
  37. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  38. package/dist/commonjs/models/operations/index.js +1 -0
  39. package/dist/commonjs/models/operations/index.js.map +1 -1
  40. package/dist/commonjs/models/operations/securityzonecheckin.d.ts +85 -0
  41. package/dist/commonjs/models/operations/securityzonecheckin.d.ts.map +1 -0
  42. package/dist/commonjs/models/operations/securityzonecheckin.js +147 -0
  43. package/dist/commonjs/models/operations/securityzonecheckin.js.map +1 -0
  44. package/dist/commonjs/react-query/index.d.ts +1 -0
  45. package/dist/commonjs/react-query/index.d.ts.map +1 -1
  46. package/dist/commonjs/react-query/index.js +1 -0
  47. package/dist/commonjs/react-query/index.js.map +1 -1
  48. package/dist/commonjs/react-query/zonesSecurityZoneCheckin.d.ts +24 -0
  49. package/dist/commonjs/react-query/zonesSecurityZoneCheckin.d.ts.map +1 -0
  50. package/dist/commonjs/react-query/zonesSecurityZoneCheckin.js +47 -0
  51. package/dist/commonjs/react-query/zonesSecurityZoneCheckin.js.map +1 -0
  52. package/dist/commonjs/sdk/zones.d.ts +8 -0
  53. package/dist/commonjs/sdk/zones.d.ts.map +1 -1
  54. package/dist/commonjs/sdk/zones.js +11 -0
  55. package/dist/commonjs/sdk/zones.js.map +1 -1
  56. package/dist/esm/__tests__/vendormanagedbycompanies.test.js +1 -1
  57. package/dist/esm/__tests__/vendormanagedbycompanies.test.js.map +1 -1
  58. package/dist/esm/__tests__/vendors.test.js +2 -2
  59. package/dist/esm/__tests__/vendors.test.js.map +1 -1
  60. package/dist/esm/__tests__/zones.test.js +52 -2
  61. package/dist/esm/__tests__/zones.test.js.map +1 -1
  62. package/dist/esm/funcs/zonesSecurityZoneCheckin.d.ts +18 -0
  63. package/dist/esm/funcs/zonesSecurityZoneCheckin.d.ts.map +1 -0
  64. package/dist/esm/funcs/zonesSecurityZoneCheckin.js +80 -0
  65. package/dist/esm/funcs/zonesSecurityZoneCheckin.js.map +1 -0
  66. package/dist/esm/lib/config.d.ts +3 -3
  67. package/dist/esm/lib/config.js +3 -3
  68. package/dist/esm/mcp-server/mcp-server.js +1 -1
  69. package/dist/esm/mcp-server/server.d.ts.map +1 -1
  70. package/dist/esm/mcp-server/server.js +3 -1
  71. package/dist/esm/mcp-server/server.js.map +1 -1
  72. package/dist/esm/mcp-server/tools/zonesSecurityZoneCheckin.d.ts +8 -0
  73. package/dist/esm/mcp-server/tools/zonesSecurityZoneCheckin.d.ts.map +1 -0
  74. package/dist/esm/mcp-server/tools/zonesSecurityZoneCheckin.js +28 -0
  75. package/dist/esm/mcp-server/tools/zonesSecurityZoneCheckin.js.map +1 -0
  76. package/dist/esm/models/components/handoff.d.ts +50 -0
  77. package/dist/esm/models/components/handoff.d.ts.map +1 -0
  78. package/dist/esm/models/components/handoff.js +63 -0
  79. package/dist/esm/models/components/handoff.js.map +1 -0
  80. package/dist/esm/models/components/index.d.ts +1 -0
  81. package/dist/esm/models/components/index.d.ts.map +1 -1
  82. package/dist/esm/models/components/index.js +1 -0
  83. package/dist/esm/models/components/index.js.map +1 -1
  84. package/dist/esm/models/components/zone.d.ts +33 -6
  85. package/dist/esm/models/components/zone.d.ts.map +1 -1
  86. package/dist/esm/models/components/zone.js +35 -8
  87. package/dist/esm/models/components/zone.js.map +1 -1
  88. package/dist/esm/models/operations/index.d.ts +1 -0
  89. package/dist/esm/models/operations/index.d.ts.map +1 -1
  90. package/dist/esm/models/operations/index.js +1 -0
  91. package/dist/esm/models/operations/index.js.map +1 -1
  92. package/dist/esm/models/operations/securityzonecheckin.d.ts +85 -0
  93. package/dist/esm/models/operations/securityzonecheckin.d.ts.map +1 -0
  94. package/dist/esm/models/operations/securityzonecheckin.js +105 -0
  95. package/dist/esm/models/operations/securityzonecheckin.js.map +1 -0
  96. package/dist/esm/react-query/index.d.ts +1 -0
  97. package/dist/esm/react-query/index.d.ts.map +1 -1
  98. package/dist/esm/react-query/index.js +1 -0
  99. package/dist/esm/react-query/index.js.map +1 -1
  100. package/dist/esm/react-query/zonesSecurityZoneCheckin.d.ts +24 -0
  101. package/dist/esm/react-query/zonesSecurityZoneCheckin.d.ts.map +1 -0
  102. package/dist/esm/react-query/zonesSecurityZoneCheckin.js +42 -0
  103. package/dist/esm/react-query/zonesSecurityZoneCheckin.js.map +1 -0
  104. package/dist/esm/sdk/zones.d.ts +8 -0
  105. package/dist/esm/sdk/zones.d.ts.map +1 -1
  106. package/dist/esm/sdk/zones.js +11 -0
  107. package/dist/esm/sdk/zones.js.map +1 -1
  108. package/jsr.json +1 -1
  109. package/package.json +1 -1
  110. package/src/__tests__/vendormanagedbycompanies.test.ts +1 -1
  111. package/src/__tests__/vendors.test.ts +2 -2
  112. package/src/__tests__/zones.test.ts +55 -2
  113. package/src/funcs/zonesSecurityZoneCheckin.ts +168 -0
  114. package/src/lib/config.ts +3 -3
  115. package/src/mcp-server/mcp-server.ts +1 -1
  116. package/src/mcp-server/server.ts +3 -1
  117. package/src/mcp-server/tools/zonesSecurityZoneCheckin.ts +37 -0
  118. package/src/models/components/handoff.ts +116 -0
  119. package/src/models/components/index.ts +1 -0
  120. package/src/models/components/zone.ts +68 -14
  121. package/src/models/operations/index.ts +1 -0
  122. package/src/models/operations/securityzonecheckin.ts +192 -0
  123. package/src/react-query/index.ts +1 -0
  124. package/src/react-query/zonesSecurityZoneCheckin.ts +89 -0
  125. package/src/sdk/zones.ts +20 -0
@@ -0,0 +1,168 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { GreenSecurityCore } from "../core.js";
6
+ import { encodeJSON } from "../lib/encodings.js";
7
+ import * as M from "../lib/matchers.js";
8
+ import { compactMap } from "../lib/primitives.js";
9
+ import { safeParse } from "../lib/schemas.js";
10
+ import { RequestOptions } from "../lib/sdks.js";
11
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
12
+ import { pathToFunc } from "../lib/url.js";
13
+ import * as components from "../models/components/index.js";
14
+ import { APIError } from "../models/errors/apierror.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 { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
24
+ import * as operations from "../models/operations/index.js";
25
+ import { APICall, APIPromise } from "../types/async.js";
26
+ import { Result } from "../types/fp.js";
27
+
28
+ /**
29
+ * Security zone checkin request
30
+ *
31
+ * @remarks
32
+ * It will create a handoff record in the db for security zone check in request
33
+ */
34
+ export function zonesSecurityZoneCheckin(
35
+ client: GreenSecurityCore,
36
+ request: operations.SecurityZoneCheckinRequestBody,
37
+ options?: RequestOptions,
38
+ ): APIPromise<
39
+ Result<
40
+ components.Handoff,
41
+ | errors.ApiErrorResponse
42
+ | errors.ApiErrorResponse
43
+ | APIError
44
+ | SDKValidationError
45
+ | UnexpectedClientError
46
+ | InvalidRequestError
47
+ | RequestAbortedError
48
+ | RequestTimeoutError
49
+ | ConnectionError
50
+ >
51
+ > {
52
+ return new APIPromise($do(
53
+ client,
54
+ request,
55
+ options,
56
+ ));
57
+ }
58
+
59
+ async function $do(
60
+ client: GreenSecurityCore,
61
+ request: operations.SecurityZoneCheckinRequestBody,
62
+ options?: RequestOptions,
63
+ ): Promise<
64
+ [
65
+ Result<
66
+ components.Handoff,
67
+ | errors.ApiErrorResponse
68
+ | errors.ApiErrorResponse
69
+ | APIError
70
+ | SDKValidationError
71
+ | UnexpectedClientError
72
+ | InvalidRequestError
73
+ | RequestAbortedError
74
+ | RequestTimeoutError
75
+ | ConnectionError
76
+ >,
77
+ APICall,
78
+ ]
79
+ > {
80
+ const parsed = safeParse(
81
+ request,
82
+ (value) =>
83
+ operations.SecurityZoneCheckinRequestBody$outboundSchema.parse(value),
84
+ "Input validation failed",
85
+ );
86
+ if (!parsed.ok) {
87
+ return [parsed, { status: "invalid" }];
88
+ }
89
+ const payload = parsed.value;
90
+ const body = encodeJSON("body", payload, { explode: true });
91
+
92
+ const path = pathToFunc("/security_zones/checkin_request")();
93
+
94
+ const headers = new Headers(compactMap({
95
+ "Content-Type": "application/json",
96
+ Accept: "application/json",
97
+ }));
98
+
99
+ const securityInput = await extractSecurity(client._options.security);
100
+ const requestSecurity = resolveGlobalSecurity(securityInput);
101
+
102
+ const context = {
103
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
104
+ operationID: "securityZoneCheckin",
105
+ oAuth2Scopes: [],
106
+
107
+ resolvedSecurity: requestSecurity,
108
+
109
+ securitySource: client._options.security,
110
+ retryConfig: options?.retries
111
+ || client._options.retryConfig
112
+ || { strategy: "none" },
113
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
114
+ };
115
+
116
+ const requestRes = client._createRequest(context, {
117
+ security: requestSecurity,
118
+ method: "POST",
119
+ baseURL: options?.serverURL,
120
+ path: path,
121
+ headers: headers,
122
+ body: body,
123
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
124
+ }, options);
125
+ if (!requestRes.ok) {
126
+ return [requestRes, { status: "invalid" }];
127
+ }
128
+ const req = requestRes.value;
129
+
130
+ const doResult = await client._do(req, {
131
+ context,
132
+ errorCodes: ["400", "401", "403", "404", "4XX", "500", "5XX"],
133
+ retryConfig: context.retryConfig,
134
+ retryCodes: context.retryCodes,
135
+ });
136
+ if (!doResult.ok) {
137
+ return [doResult, { status: "request-error", request: req }];
138
+ }
139
+ const response = doResult.value;
140
+
141
+ const responseFields = {
142
+ HttpMeta: { Response: response, Request: req },
143
+ };
144
+
145
+ const [result] = await M.match<
146
+ components.Handoff,
147
+ | errors.ApiErrorResponse
148
+ | errors.ApiErrorResponse
149
+ | APIError
150
+ | SDKValidationError
151
+ | UnexpectedClientError
152
+ | InvalidRequestError
153
+ | RequestAbortedError
154
+ | RequestTimeoutError
155
+ | ConnectionError
156
+ >(
157
+ M.json(200, components.Handoff$inboundSchema),
158
+ M.jsonErr([400, 401, 403, 404], errors.ApiErrorResponse$inboundSchema),
159
+ M.jsonErr(500, errors.ApiErrorResponse$inboundSchema),
160
+ M.fail("4XX"),
161
+ M.fail("5XX"),
162
+ )(response, { extraFields: responseFields });
163
+ if (!result.ok) {
164
+ return [result, { status: "complete", request: req, response }];
165
+ }
166
+
167
+ return [result, { status: "complete", request: req, response }];
168
+ }
package/src/lib/config.ts CHANGED
@@ -72,8 +72,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
72
72
  export const SDK_METADATA = {
73
73
  language: "typescript",
74
74
  openapiDocVersion: "0.0.3",
75
- sdkVersion: "0.30.37",
76
- genVersion: "2.596.2",
75
+ sdkVersion: "0.30.42",
76
+ genVersion: "2.597.9",
77
77
  userAgent:
78
- "speakeasy-sdk/typescript 0.30.37 2.596.2 0.0.3 @greensecurity/javascript-sdk",
78
+ "speakeasy-sdk/typescript 0.30.42 2.597.9 0.0.3 @greensecurity/javascript-sdk",
79
79
  } as const;
@@ -19,7 +19,7 @@ const routes = buildRouteMap({
19
19
  export const app = buildApplication(routes, {
20
20
  name: "mcp",
21
21
  versionInfo: {
22
- currentVersion: "0.30.37",
22
+ currentVersion: "0.30.42",
23
23
  },
24
24
  });
25
25
 
@@ -49,6 +49,7 @@ import { tool$vendorsUpdateVendorScrubDetails } from "./tools/vendorsUpdateVendo
49
49
  import { tool$webhooksGetWebhookEndpoint } from "./tools/webhooksGetWebhookEndpoint.js";
50
50
  import { tool$webhooksListAllWebhookEndpoints } from "./tools/webhooksListAllWebhookEndpoints.js";
51
51
  import { tool$zonesListOrSearchSecurityZones } from "./tools/zonesListOrSearchSecurityZones.js";
52
+ import { tool$zonesSecurityZoneCheckin } from "./tools/zonesSecurityZoneCheckin.js";
52
53
 
53
54
  export function createMCPServer(deps: {
54
55
  logger: ConsoleLogger;
@@ -60,7 +61,7 @@ export function createMCPServer(deps: {
60
61
  }) {
61
62
  const server = new McpServer({
62
63
  name: "GreenSecurity",
63
- version: "0.30.37",
64
+ version: "0.30.42",
64
65
  });
65
66
 
66
67
  const client = new GreenSecurityCore({
@@ -126,6 +127,7 @@ export function createMCPServer(deps: {
126
127
  tool(tool$vendorScansVendorScanOut);
127
128
  tool(tool$companiesListOrSearchCompanies);
128
129
  tool(tool$zonesListOrSearchSecurityZones);
130
+ tool(tool$zonesSecurityZoneCheckin);
129
131
 
130
132
  return server;
131
133
  }
@@ -0,0 +1,37 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { zonesSecurityZoneCheckin } from "../../funcs/zonesSecurityZoneCheckin.js";
6
+ import * as operations from "../../models/operations/index.js";
7
+ import { formatResult, ToolDefinition } from "../tools.js";
8
+
9
+ const args = {
10
+ request: operations.SecurityZoneCheckinRequestBody$inboundSchema,
11
+ };
12
+
13
+ export const tool$zonesSecurityZoneCheckin: ToolDefinition<typeof args> = {
14
+ name: "zones-security-zone-checkin",
15
+ description: `Security zone checkin request
16
+
17
+ It will create a handoff record in the db for security zone check in request`,
18
+ args,
19
+ tool: async (client, args, ctx) => {
20
+ const [result, apiCall] = await zonesSecurityZoneCheckin(
21
+ client,
22
+ args.request,
23
+ { fetchOptions: { signal: ctx.signal } },
24
+ ).$inspect();
25
+
26
+ if (!result.ok) {
27
+ return {
28
+ content: [{ type: "text", text: result.error.message }],
29
+ isError: true,
30
+ };
31
+ }
32
+
33
+ const value = result.value;
34
+
35
+ return formatResult(value, apiCall);
36
+ },
37
+ };
@@ -0,0 +1,116 @@
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
+ Zone,
12
+ Zone$inboundSchema,
13
+ Zone$Outbound,
14
+ Zone$outboundSchema,
15
+ } from "./zone.js";
16
+
17
+ /**
18
+ * Reduced list of attributes of Handoff record
19
+ */
20
+ export type Handoff = {
21
+ id?: number | undefined;
22
+ /**
23
+ * Reduced list of attributes of Zone record
24
+ */
25
+ zone?: Zone | undefined;
26
+ qrCode?: string | null | undefined;
27
+ dateCreated?: string | null | undefined;
28
+ dateReceived?: string | null | undefined;
29
+ dateCompleted?: string | null | undefined;
30
+ status?: string | null | undefined;
31
+ gpsCheckin?: boolean | undefined;
32
+ };
33
+
34
+ /** @internal */
35
+ export const Handoff$inboundSchema: z.ZodType<Handoff, z.ZodTypeDef, unknown> =
36
+ z.object({
37
+ id: z.number().int().optional(),
38
+ zone: Zone$inboundSchema.optional(),
39
+ qr_code: z.nullable(z.string()).optional(),
40
+ date_created: z.nullable(z.string()).optional(),
41
+ date_received: z.nullable(z.string()).optional(),
42
+ date_completed: z.nullable(z.string()).optional(),
43
+ status: z.nullable(z.string()).optional(),
44
+ gps_checkin: z.boolean().optional(),
45
+ }).transform((v) => {
46
+ return remap$(v, {
47
+ "qr_code": "qrCode",
48
+ "date_created": "dateCreated",
49
+ "date_received": "dateReceived",
50
+ "date_completed": "dateCompleted",
51
+ "gps_checkin": "gpsCheckin",
52
+ });
53
+ });
54
+
55
+ /** @internal */
56
+ export type Handoff$Outbound = {
57
+ id?: number | undefined;
58
+ zone?: Zone$Outbound | undefined;
59
+ qr_code?: string | null | undefined;
60
+ date_created?: string | null | undefined;
61
+ date_received?: string | null | undefined;
62
+ date_completed?: string | null | undefined;
63
+ status?: string | null | undefined;
64
+ gps_checkin?: boolean | undefined;
65
+ };
66
+
67
+ /** @internal */
68
+ export const Handoff$outboundSchema: z.ZodType<
69
+ Handoff$Outbound,
70
+ z.ZodTypeDef,
71
+ Handoff
72
+ > = z.object({
73
+ id: z.number().int().optional(),
74
+ zone: Zone$outboundSchema.optional(),
75
+ qrCode: z.nullable(z.string()).optional(),
76
+ dateCreated: z.nullable(z.string()).optional(),
77
+ dateReceived: z.nullable(z.string()).optional(),
78
+ dateCompleted: z.nullable(z.string()).optional(),
79
+ status: z.nullable(z.string()).optional(),
80
+ gpsCheckin: z.boolean().optional(),
81
+ }).transform((v) => {
82
+ return remap$(v, {
83
+ qrCode: "qr_code",
84
+ dateCreated: "date_created",
85
+ dateReceived: "date_received",
86
+ dateCompleted: "date_completed",
87
+ gpsCheckin: "gps_checkin",
88
+ });
89
+ });
90
+
91
+ /**
92
+ * @internal
93
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
94
+ */
95
+ export namespace Handoff$ {
96
+ /** @deprecated use `Handoff$inboundSchema` instead. */
97
+ export const inboundSchema = Handoff$inboundSchema;
98
+ /** @deprecated use `Handoff$outboundSchema` instead. */
99
+ export const outboundSchema = Handoff$outboundSchema;
100
+ /** @deprecated use `Handoff$Outbound` instead. */
101
+ export type Outbound = Handoff$Outbound;
102
+ }
103
+
104
+ export function handoffToJSON(handoff: Handoff): string {
105
+ return JSON.stringify(Handoff$outboundSchema.parse(handoff));
106
+ }
107
+
108
+ export function handoffFromJSON(
109
+ jsonString: string,
110
+ ): SafeParseResult<Handoff, SDKValidationError> {
111
+ return safeParse(
112
+ jsonString,
113
+ (x) => Handoff$inboundSchema.parse(JSON.parse(x)),
114
+ `Failed to parse 'Handoff' from JSON`,
115
+ );
116
+ }
@@ -13,6 +13,7 @@ export * from "./desc.js";
13
13
  export * from "./expand.js";
14
14
  export * from "./facility.js";
15
15
  export * from "./facilitysummary.js";
16
+ export * from "./handoff.js";
16
17
  export * from "./imageset.js";
17
18
  export * from "./invoice.js";
18
19
  export * from "./invoiceitem.js";
@@ -26,7 +26,12 @@ import {
26
26
  ZoneConfig$outboundSchema,
27
27
  } from "./zoneconfig.js";
28
28
 
29
- export type ZoneFacility = Facility | number;
29
+ export type Two = {
30
+ id?: number | undefined;
31
+ name?: string | undefined;
32
+ };
33
+
34
+ export type ZoneFacility = Two | Facility;
30
35
 
31
36
  export type ZoneDepartment = Department | number;
32
37
 
@@ -78,7 +83,7 @@ export type ZoneVisitRequestPolicy = {
78
83
  export type PrinterConfig = {
79
84
  type?: string | null | undefined;
80
85
  name?: string | null | undefined;
81
- dpi?: string | null | undefined;
86
+ dpi?: number | null | undefined;
82
87
  ip?: string | null | undefined;
83
88
  port?: string | null | undefined;
84
89
  email?: string | null | undefined;
@@ -99,7 +104,7 @@ export type GpsCheckinPolicy = {
99
104
  */
100
105
  export type Zone = {
101
106
  id?: number | undefined;
102
- facility?: Facility | number | null | undefined;
107
+ facility?: Two | Facility | null | undefined;
103
108
  department?: Department | number | null | undefined;
104
109
  name?: string | null | undefined;
105
110
  shortName?: string | null | undefined;
@@ -116,22 +121,69 @@ export type Zone = {
116
121
  gpsCheckinPolicy?: GpsCheckinPolicy | undefined;
117
122
  };
118
123
 
124
+ /** @internal */
125
+ export const Two$inboundSchema: z.ZodType<Two, z.ZodTypeDef, unknown> = z
126
+ .object({
127
+ id: z.number().int().optional(),
128
+ name: z.string().optional(),
129
+ });
130
+
131
+ /** @internal */
132
+ export type Two$Outbound = {
133
+ id?: number | undefined;
134
+ name?: string | undefined;
135
+ };
136
+
137
+ /** @internal */
138
+ export const Two$outboundSchema: z.ZodType<Two$Outbound, z.ZodTypeDef, Two> = z
139
+ .object({
140
+ id: z.number().int().optional(),
141
+ name: z.string().optional(),
142
+ });
143
+
144
+ /**
145
+ * @internal
146
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
147
+ */
148
+ export namespace Two$ {
149
+ /** @deprecated use `Two$inboundSchema` instead. */
150
+ export const inboundSchema = Two$inboundSchema;
151
+ /** @deprecated use `Two$outboundSchema` instead. */
152
+ export const outboundSchema = Two$outboundSchema;
153
+ /** @deprecated use `Two$Outbound` instead. */
154
+ export type Outbound = Two$Outbound;
155
+ }
156
+
157
+ export function twoToJSON(two: Two): string {
158
+ return JSON.stringify(Two$outboundSchema.parse(two));
159
+ }
160
+
161
+ export function twoFromJSON(
162
+ jsonString: string,
163
+ ): SafeParseResult<Two, SDKValidationError> {
164
+ return safeParse(
165
+ jsonString,
166
+ (x) => Two$inboundSchema.parse(JSON.parse(x)),
167
+ `Failed to parse 'Two' from JSON`,
168
+ );
169
+ }
170
+
119
171
  /** @internal */
120
172
  export const ZoneFacility$inboundSchema: z.ZodType<
121
173
  ZoneFacility,
122
174
  z.ZodTypeDef,
123
175
  unknown
124
- > = z.union([Facility$inboundSchema, z.number().int()]);
176
+ > = z.union([z.lazy(() => Two$inboundSchema), Facility$inboundSchema]);
125
177
 
126
178
  /** @internal */
127
- export type ZoneFacility$Outbound = Facility$Outbound | number;
179
+ export type ZoneFacility$Outbound = Two$Outbound | Facility$Outbound;
128
180
 
129
181
  /** @internal */
130
182
  export const ZoneFacility$outboundSchema: z.ZodType<
131
183
  ZoneFacility$Outbound,
132
184
  z.ZodTypeDef,
133
185
  ZoneFacility
134
- > = z.union([Facility$outboundSchema, z.number().int()]);
186
+ > = z.union([z.lazy(() => Two$outboundSchema), Facility$outboundSchema]);
135
187
 
136
188
  /**
137
189
  * @internal
@@ -635,7 +687,7 @@ export const PrinterConfig$inboundSchema: z.ZodType<
635
687
  > = z.object({
636
688
  type: z.nullable(z.string()).optional(),
637
689
  name: z.nullable(z.string()).optional(),
638
- dpi: z.nullable(z.string()).optional(),
690
+ dpi: z.nullable(z.number().int()).optional(),
639
691
  ip: z.nullable(z.string()).optional(),
640
692
  port: z.nullable(z.string()).optional(),
641
693
  email: z.nullable(z.string()).optional(),
@@ -652,7 +704,7 @@ export const PrinterConfig$inboundSchema: z.ZodType<
652
704
  export type PrinterConfig$Outbound = {
653
705
  type?: string | null | undefined;
654
706
  name?: string | null | undefined;
655
- dpi?: string | null | undefined;
707
+ dpi?: number | null | undefined;
656
708
  ip?: string | null | undefined;
657
709
  port?: string | null | undefined;
658
710
  email?: string | null | undefined;
@@ -669,7 +721,7 @@ export const PrinterConfig$outboundSchema: z.ZodType<
669
721
  > = z.object({
670
722
  type: z.nullable(z.string()).optional(),
671
723
  name: z.nullable(z.string()).optional(),
672
- dpi: z.nullable(z.string()).optional(),
724
+ dpi: z.nullable(z.number().int()).optional(),
673
725
  ip: z.nullable(z.string()).optional(),
674
726
  port: z.nullable(z.string()).optional(),
675
727
  email: z.nullable(z.string()).optional(),
@@ -786,8 +838,9 @@ export function gpsCheckinPolicyFromJSON(
786
838
  export const Zone$inboundSchema: z.ZodType<Zone, z.ZodTypeDef, unknown> = z
787
839
  .object({
788
840
  id: z.number().int().optional(),
789
- facility: z.nullable(z.union([Facility$inboundSchema, z.number().int()]))
790
- .optional(),
841
+ facility: z.nullable(
842
+ z.union([z.lazy(() => Two$inboundSchema), Facility$inboundSchema]),
843
+ ).optional(),
791
844
  department: z.nullable(
792
845
  z.union([Department$inboundSchema, z.number().int()]),
793
846
  ).optional(),
@@ -823,7 +876,7 @@ export const Zone$inboundSchema: z.ZodType<Zone, z.ZodTypeDef, unknown> = z
823
876
  /** @internal */
824
877
  export type Zone$Outbound = {
825
878
  id?: number | undefined;
826
- facility?: Facility$Outbound | number | null | undefined;
879
+ facility?: Two$Outbound | Facility$Outbound | null | undefined;
827
880
  department?: Department$Outbound | number | null | undefined;
828
881
  name?: string | null | undefined;
829
882
  short_name?: string | null | undefined;
@@ -844,8 +897,9 @@ export type Zone$Outbound = {
844
897
  export const Zone$outboundSchema: z.ZodType<Zone$Outbound, z.ZodTypeDef, Zone> =
845
898
  z.object({
846
899
  id: z.number().int().optional(),
847
- facility: z.nullable(z.union([Facility$outboundSchema, z.number().int()]))
848
- .optional(),
900
+ facility: z.nullable(
901
+ z.union([z.lazy(() => Two$outboundSchema), Facility$outboundSchema]),
902
+ ).optional(),
849
903
  department: z.nullable(
850
904
  z.union([Department$outboundSchema, z.number().int()]),
851
905
  ).optional(),
@@ -34,6 +34,7 @@ export * from "./magiclink.js";
34
34
  export * from "./password.js";
35
35
  export * from "./passwordresetrequest.js";
36
36
  export * from "./purchasescrubcredits.js";
37
+ export * from "./securityzonecheckin.js";
37
38
  export * from "./updatevendordetails.js";
38
39
  export * from "./updatevendormanagedbycompany.js";
39
40
  export * from "./updatevendorscrubdetails.js";