@greensecurity/javascript-sdk 0.43.1-beta.119 → 0.43.1-beta.122

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 (229) hide show
  1. package/README.md +9 -0
  2. package/dist/commonjs/__tests__/events.test.js +21 -0
  3. package/dist/commonjs/__tests__/events.test.js.map +1 -1
  4. package/dist/commonjs/__tests__/fhirconfigs.test.js +4 -0
  5. package/dist/commonjs/__tests__/fhirconfigs.test.js.map +1 -1
  6. package/dist/commonjs/__tests__/vendorscans.test.js +49 -0
  7. package/dist/commonjs/__tests__/vendorscans.test.js.map +1 -1
  8. package/dist/commonjs/__tests__/zones.test.js +3 -29
  9. package/dist/commonjs/__tests__/zones.test.js.map +1 -1
  10. package/dist/commonjs/funcs/eventsGetEvent.d.ts +26 -0
  11. package/dist/commonjs/funcs/eventsGetEvent.d.ts.map +1 -0
  12. package/dist/commonjs/funcs/eventsGetEvent.js +136 -0
  13. package/dist/commonjs/funcs/eventsGetEvent.js.map +1 -0
  14. package/dist/commonjs/funcs/systemsListSystems.js +2 -0
  15. package/dist/commonjs/funcs/systemsListSystems.js.map +1 -1
  16. package/dist/commonjs/funcs/vendorScansGetVendorScan.d.ts +28 -0
  17. package/dist/commonjs/funcs/vendorScansGetVendorScan.d.ts.map +1 -0
  18. package/dist/commonjs/funcs/vendorScansGetVendorScan.js +138 -0
  19. package/dist/commonjs/funcs/vendorScansGetVendorScan.js.map +1 -0
  20. package/dist/commonjs/funcs/vendorScansListVendorScans.d.ts +23 -0
  21. package/dist/commonjs/funcs/vendorScansListVendorScans.d.ts.map +1 -0
  22. package/dist/commonjs/funcs/vendorScansListVendorScans.js +165 -0
  23. package/dist/commonjs/funcs/vendorScansListVendorScans.js.map +1 -0
  24. package/dist/commonjs/lib/config.d.ts +3 -3
  25. package/dist/commonjs/lib/config.js +3 -3
  26. package/dist/commonjs/models/components/fhirconfig.d.ts +8 -0
  27. package/dist/commonjs/models/components/fhirconfig.d.ts.map +1 -1
  28. package/dist/commonjs/models/components/fhirconfig.js +4 -0
  29. package/dist/commonjs/models/components/fhirconfig.js.map +1 -1
  30. package/dist/commonjs/models/components/fhirconfigpartialupdate.d.ts +10 -0
  31. package/dist/commonjs/models/components/fhirconfigpartialupdate.d.ts.map +1 -1
  32. package/dist/commonjs/models/components/fhirconfigpartialupdate.js +4 -0
  33. package/dist/commonjs/models/components/fhirconfigpartialupdate.js.map +1 -1
  34. package/dist/commonjs/models/components/vendorscan.d.ts +5 -0
  35. package/dist/commonjs/models/components/vendorscan.d.ts.map +1 -1
  36. package/dist/commonjs/models/components/vendorscan.js +4 -0
  37. package/dist/commonjs/models/components/vendorscan.js.map +1 -1
  38. package/dist/commonjs/models/operations/getevent.d.ts +110 -0
  39. package/dist/commonjs/models/operations/getevent.d.ts.map +1 -0
  40. package/dist/commonjs/models/operations/getevent.js +128 -0
  41. package/dist/commonjs/models/operations/getevent.js.map +1 -0
  42. package/dist/commonjs/models/operations/getvendorscan.d.ts +21 -0
  43. package/dist/commonjs/models/operations/getvendorscan.d.ts.map +1 -0
  44. package/dist/commonjs/models/operations/getvendorscan.js +52 -0
  45. package/dist/commonjs/models/operations/getvendorscan.js.map +1 -0
  46. package/dist/commonjs/models/operations/index.d.ts +3 -0
  47. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  48. package/dist/commonjs/models/operations/index.js +3 -0
  49. package/dist/commonjs/models/operations/index.js.map +1 -1
  50. package/dist/commonjs/models/operations/listsystems.d.ts +10 -0
  51. package/dist/commonjs/models/operations/listsystems.d.ts.map +1 -1
  52. package/dist/commonjs/models/operations/listsystems.js +4 -0
  53. package/dist/commonjs/models/operations/listsystems.js.map +1 -1
  54. package/dist/commonjs/models/operations/listvendorscans.d.ts +92 -0
  55. package/dist/commonjs/models/operations/listvendorscans.d.ts.map +1 -0
  56. package/dist/commonjs/models/operations/listvendorscans.js +103 -0
  57. package/dist/commonjs/models/operations/listvendorscans.js.map +1 -0
  58. package/dist/commonjs/react-query/eventsGetEvent.core.d.ts +15 -0
  59. package/dist/commonjs/react-query/eventsGetEvent.core.d.ts.map +1 -0
  60. package/dist/commonjs/react-query/eventsGetEvent.core.js +41 -0
  61. package/dist/commonjs/react-query/eventsGetEvent.core.js.map +1 -0
  62. package/dist/commonjs/react-query/eventsGetEvent.d.ts +52 -0
  63. package/dist/commonjs/react-query/eventsGetEvent.d.ts.map +1 -0
  64. package/dist/commonjs/react-query/eventsGetEvent.js +78 -0
  65. package/dist/commonjs/react-query/eventsGetEvent.js.map +1 -0
  66. package/dist/commonjs/react-query/index.d.ts +3 -0
  67. package/dist/commonjs/react-query/index.d.ts.map +1 -1
  68. package/dist/commonjs/react-query/index.js +3 -0
  69. package/dist/commonjs/react-query/index.js.map +1 -1
  70. package/dist/commonjs/react-query/systemsListSystems.core.d.ts +4 -0
  71. package/dist/commonjs/react-query/systemsListSystems.core.d.ts.map +1 -1
  72. package/dist/commonjs/react-query/systemsListSystems.core.js +4 -0
  73. package/dist/commonjs/react-query/systemsListSystems.core.js.map +1 -1
  74. package/dist/commonjs/react-query/systemsListSystems.d.ts +4 -0
  75. package/dist/commonjs/react-query/systemsListSystems.d.ts.map +1 -1
  76. package/dist/commonjs/react-query/systemsListSystems.js.map +1 -1
  77. package/dist/commonjs/react-query/vendorScansGetVendorScan.core.d.ts +15 -0
  78. package/dist/commonjs/react-query/vendorScansGetVendorScan.core.d.ts.map +1 -0
  79. package/dist/commonjs/react-query/vendorScansGetVendorScan.core.js +43 -0
  80. package/dist/commonjs/react-query/vendorScansGetVendorScan.core.js.map +1 -0
  81. package/dist/commonjs/react-query/vendorScansGetVendorScan.d.ts +54 -0
  82. package/dist/commonjs/react-query/vendorScansGetVendorScan.d.ts.map +1 -0
  83. package/dist/commonjs/react-query/vendorScansGetVendorScan.js +84 -0
  84. package/dist/commonjs/react-query/vendorScansGetVendorScan.js.map +1 -0
  85. package/dist/commonjs/react-query/vendorScansListVendorScans.core.d.ts +46 -0
  86. package/dist/commonjs/react-query/vendorScansListVendorScans.core.d.ts.map +1 -0
  87. package/dist/commonjs/react-query/vendorScansListVendorScans.core.js +102 -0
  88. package/dist/commonjs/react-query/vendorScansListVendorScans.core.js.map +1 -0
  89. package/dist/commonjs/react-query/vendorScansListVendorScans.d.ts +68 -0
  90. package/dist/commonjs/react-query/vendorScansListVendorScans.d.ts.map +1 -0
  91. package/dist/commonjs/react-query/vendorScansListVendorScans.js +105 -0
  92. package/dist/commonjs/react-query/vendorScansListVendorScans.js.map +1 -0
  93. package/dist/commonjs/sdk/events.d.ts +13 -0
  94. package/dist/commonjs/sdk/events.d.ts.map +1 -1
  95. package/dist/commonjs/sdk/events.js +16 -0
  96. package/dist/commonjs/sdk/events.js.map +1 -1
  97. package/dist/commonjs/sdk/vendorscans.d.ts +25 -0
  98. package/dist/commonjs/sdk/vendorscans.d.ts.map +1 -1
  99. package/dist/commonjs/sdk/vendorscans.js +28 -0
  100. package/dist/commonjs/sdk/vendorscans.js.map +1 -1
  101. package/dist/esm/__tests__/events.test.js +21 -0
  102. package/dist/esm/__tests__/events.test.js.map +1 -1
  103. package/dist/esm/__tests__/fhirconfigs.test.js +4 -0
  104. package/dist/esm/__tests__/fhirconfigs.test.js.map +1 -1
  105. package/dist/esm/__tests__/vendorscans.test.js +49 -0
  106. package/dist/esm/__tests__/vendorscans.test.js.map +1 -1
  107. package/dist/esm/__tests__/zones.test.js +3 -29
  108. package/dist/esm/__tests__/zones.test.js.map +1 -1
  109. package/dist/esm/funcs/eventsGetEvent.d.ts +26 -0
  110. package/dist/esm/funcs/eventsGetEvent.d.ts.map +1 -0
  111. package/dist/esm/funcs/eventsGetEvent.js +100 -0
  112. package/dist/esm/funcs/eventsGetEvent.js.map +1 -0
  113. package/dist/esm/funcs/systemsListSystems.js +2 -0
  114. package/dist/esm/funcs/systemsListSystems.js.map +1 -1
  115. package/dist/esm/funcs/vendorScansGetVendorScan.d.ts +28 -0
  116. package/dist/esm/funcs/vendorScansGetVendorScan.d.ts.map +1 -0
  117. package/dist/esm/funcs/vendorScansGetVendorScan.js +102 -0
  118. package/dist/esm/funcs/vendorScansGetVendorScan.js.map +1 -0
  119. package/dist/esm/funcs/vendorScansListVendorScans.d.ts +23 -0
  120. package/dist/esm/funcs/vendorScansListVendorScans.d.ts.map +1 -0
  121. package/dist/esm/funcs/vendorScansListVendorScans.js +129 -0
  122. package/dist/esm/funcs/vendorScansListVendorScans.js.map +1 -0
  123. package/dist/esm/lib/config.d.ts +3 -3
  124. package/dist/esm/lib/config.js +3 -3
  125. package/dist/esm/models/components/fhirconfig.d.ts +8 -0
  126. package/dist/esm/models/components/fhirconfig.d.ts.map +1 -1
  127. package/dist/esm/models/components/fhirconfig.js +4 -0
  128. package/dist/esm/models/components/fhirconfig.js.map +1 -1
  129. package/dist/esm/models/components/fhirconfigpartialupdate.d.ts +10 -0
  130. package/dist/esm/models/components/fhirconfigpartialupdate.d.ts.map +1 -1
  131. package/dist/esm/models/components/fhirconfigpartialupdate.js +4 -0
  132. package/dist/esm/models/components/fhirconfigpartialupdate.js.map +1 -1
  133. package/dist/esm/models/components/vendorscan.d.ts +5 -0
  134. package/dist/esm/models/components/vendorscan.d.ts.map +1 -1
  135. package/dist/esm/models/components/vendorscan.js +4 -0
  136. package/dist/esm/models/components/vendorscan.js.map +1 -1
  137. package/dist/esm/models/operations/getevent.d.ts +110 -0
  138. package/dist/esm/models/operations/getevent.d.ts.map +1 -0
  139. package/dist/esm/models/operations/getevent.js +85 -0
  140. package/dist/esm/models/operations/getevent.js.map +1 -0
  141. package/dist/esm/models/operations/getvendorscan.d.ts +21 -0
  142. package/dist/esm/models/operations/getvendorscan.d.ts.map +1 -0
  143. package/dist/esm/models/operations/getvendorscan.js +15 -0
  144. package/dist/esm/models/operations/getvendorscan.js.map +1 -0
  145. package/dist/esm/models/operations/index.d.ts +3 -0
  146. package/dist/esm/models/operations/index.d.ts.map +1 -1
  147. package/dist/esm/models/operations/index.js +3 -0
  148. package/dist/esm/models/operations/index.js.map +1 -1
  149. package/dist/esm/models/operations/listsystems.d.ts +10 -0
  150. package/dist/esm/models/operations/listsystems.d.ts.map +1 -1
  151. package/dist/esm/models/operations/listsystems.js +4 -0
  152. package/dist/esm/models/operations/listsystems.js.map +1 -1
  153. package/dist/esm/models/operations/listvendorscans.d.ts +92 -0
  154. package/dist/esm/models/operations/listvendorscans.d.ts.map +1 -0
  155. package/dist/esm/models/operations/listvendorscans.js +64 -0
  156. package/dist/esm/models/operations/listvendorscans.js.map +1 -0
  157. package/dist/esm/react-query/eventsGetEvent.core.d.ts +15 -0
  158. package/dist/esm/react-query/eventsGetEvent.core.d.ts.map +1 -0
  159. package/dist/esm/react-query/eventsGetEvent.core.js +36 -0
  160. package/dist/esm/react-query/eventsGetEvent.core.js.map +1 -0
  161. package/dist/esm/react-query/eventsGetEvent.d.ts +52 -0
  162. package/dist/esm/react-query/eventsGetEvent.d.ts.map +1 -0
  163. package/dist/esm/react-query/eventsGetEvent.js +68 -0
  164. package/dist/esm/react-query/eventsGetEvent.js.map +1 -0
  165. package/dist/esm/react-query/index.d.ts +3 -0
  166. package/dist/esm/react-query/index.d.ts.map +1 -1
  167. package/dist/esm/react-query/index.js +3 -0
  168. package/dist/esm/react-query/index.js.map +1 -1
  169. package/dist/esm/react-query/systemsListSystems.core.d.ts +4 -0
  170. package/dist/esm/react-query/systemsListSystems.core.d.ts.map +1 -1
  171. package/dist/esm/react-query/systemsListSystems.core.js +4 -0
  172. package/dist/esm/react-query/systemsListSystems.core.js.map +1 -1
  173. package/dist/esm/react-query/systemsListSystems.d.ts +4 -0
  174. package/dist/esm/react-query/systemsListSystems.d.ts.map +1 -1
  175. package/dist/esm/react-query/systemsListSystems.js.map +1 -1
  176. package/dist/esm/react-query/vendorScansGetVendorScan.core.d.ts +15 -0
  177. package/dist/esm/react-query/vendorScansGetVendorScan.core.d.ts.map +1 -0
  178. package/dist/esm/react-query/vendorScansGetVendorScan.core.js +38 -0
  179. package/dist/esm/react-query/vendorScansGetVendorScan.core.js.map +1 -0
  180. package/dist/esm/react-query/vendorScansGetVendorScan.d.ts +54 -0
  181. package/dist/esm/react-query/vendorScansGetVendorScan.d.ts.map +1 -0
  182. package/dist/esm/react-query/vendorScansGetVendorScan.js +74 -0
  183. package/dist/esm/react-query/vendorScansGetVendorScan.js.map +1 -0
  184. package/dist/esm/react-query/vendorScansListVendorScans.core.d.ts +46 -0
  185. package/dist/esm/react-query/vendorScansListVendorScans.core.d.ts.map +1 -0
  186. package/dist/esm/react-query/vendorScansListVendorScans.core.js +94 -0
  187. package/dist/esm/react-query/vendorScansListVendorScans.core.js.map +1 -0
  188. package/dist/esm/react-query/vendorScansListVendorScans.d.ts +68 -0
  189. package/dist/esm/react-query/vendorScansListVendorScans.d.ts.map +1 -0
  190. package/dist/esm/react-query/vendorScansListVendorScans.js +90 -0
  191. package/dist/esm/react-query/vendorScansListVendorScans.js.map +1 -0
  192. package/dist/esm/sdk/events.d.ts +13 -0
  193. package/dist/esm/sdk/events.d.ts.map +1 -1
  194. package/dist/esm/sdk/events.js +16 -0
  195. package/dist/esm/sdk/events.js.map +1 -1
  196. package/dist/esm/sdk/vendorscans.d.ts +25 -0
  197. package/dist/esm/sdk/vendorscans.d.ts.map +1 -1
  198. package/dist/esm/sdk/vendorscans.js +28 -0
  199. package/dist/esm/sdk/vendorscans.js.map +1 -1
  200. package/jsr.json +1 -1
  201. package/package.json +1 -1
  202. package/src/__tests__/events.test.ts +24 -0
  203. package/src/__tests__/fhirconfigs.test.ts +4 -0
  204. package/src/__tests__/vendorscans.test.ts +55 -0
  205. package/src/__tests__/zones.test.ts +3 -29
  206. package/src/funcs/eventsGetEvent.ts +189 -0
  207. package/src/funcs/systemsListSystems.ts +2 -0
  208. package/src/funcs/vendorScansGetVendorScan.ts +191 -0
  209. package/src/funcs/vendorScansListVendorScans.ts +256 -0
  210. package/src/lib/config.ts +3 -3
  211. package/src/models/components/fhirconfig.ts +12 -0
  212. package/src/models/components/fhirconfigpartialupdate.ts +14 -0
  213. package/src/models/components/vendorscan.ts +9 -0
  214. package/src/models/operations/getevent.ts +263 -0
  215. package/src/models/operations/getvendorscan.ts +42 -0
  216. package/src/models/operations/index.ts +3 -0
  217. package/src/models/operations/listsystems.ts +14 -0
  218. package/src/models/operations/listvendorscans.ts +174 -0
  219. package/src/react-query/eventsGetEvent.core.ts +79 -0
  220. package/src/react-query/eventsGetEvent.ts +153 -0
  221. package/src/react-query/index.ts +3 -0
  222. package/src/react-query/systemsListSystems.core.ts +8 -0
  223. package/src/react-query/systemsListSystems.ts +4 -0
  224. package/src/react-query/vendorScansGetVendorScan.core.ts +83 -0
  225. package/src/react-query/vendorScansGetVendorScan.ts +168 -0
  226. package/src/react-query/vendorScansListVendorScans.core.ts +210 -0
  227. package/src/react-query/vendorScansListVendorScans.ts +273 -0
  228. package/src/sdk/events.ts +24 -0
  229. package/src/sdk/vendorscans.ts +47 -0
@@ -0,0 +1,263 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 11693e309f47
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 { smartUnion } from "../../types/smartUnion.js";
12
+ import * as components from "../components/index.js";
13
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
14
+
15
+ export type GetEventRequest = {
16
+ /**
17
+ * The identifier of the object
18
+ */
19
+ id: number;
20
+ /**
21
+ * An array-style parameter to identify which sections of an object to expand. See documentation for the endpoint for a list of valid expansion values.
22
+ */
23
+ expand?: Array<components.Expand> | undefined;
24
+ };
25
+
26
+ export type Facility2 = {};
27
+
28
+ /**
29
+ * The facility ID, or the expanded facility object when `event.facility` is passed to `expand`.
30
+ */
31
+ export type Facility = number | Facility2;
32
+
33
+ export type Department2 = {};
34
+
35
+ /**
36
+ * The department ID, or the expanded department object when `event.department` is passed to `expand`.
37
+ */
38
+ export type Department = number | Department2;
39
+
40
+ export type Invitees = {
41
+ id?: number | undefined;
42
+ userId?: number | null | undefined;
43
+ companyId?: number | null | undefined;
44
+ departmentId?: number | null | undefined;
45
+ status?: string | undefined;
46
+ dateReviewed?: string | null | undefined;
47
+ };
48
+
49
+ /**
50
+ * The request was successful, and the server has returned the requested resource in the response body.
51
+ */
52
+ export type GetEventGetEventOk = {
53
+ id?: number | undefined;
54
+ /**
55
+ * The event name.
56
+ */
57
+ title?: string | undefined;
58
+ /**
59
+ * Date and time in 12-hour format with 15-minute precision.
60
+ *
61
+ * @remarks
62
+ * Format: MM/DD/YYYY h:mm am/pm (e.g., "07/18/2025 12:15 pm" or "7:15 pm").
63
+ * - Hours: 1 to 12 (zero-padded or not)
64
+ * - Minutes: 00, 15, 30, or 45
65
+ * - AM/PM in lowercase
66
+ */
67
+ start?: string | undefined;
68
+ /**
69
+ * Date and time in 12-hour format with 15-minute precision.
70
+ *
71
+ * @remarks
72
+ * Format: MM/DD/YYYY h:mm am/pm (e.g., "07/18/2025 12:15 pm" or "7:15 pm").
73
+ * - Hours: 1 to 12 (zero-padded or not)
74
+ * - Minutes: 00, 15, 30, or 45
75
+ * - AM/PM in lowercase
76
+ */
77
+ end?: string | undefined;
78
+ allDay?: boolean | undefined;
79
+ standingAppt?: boolean | undefined;
80
+ bringingFood?: boolean | undefined;
81
+ notes?: string | null | undefined;
82
+ status?: string | undefined;
83
+ /**
84
+ * ISO 8601 date-time when the event was approved.
85
+ */
86
+ dateApproved?: string | null | undefined;
87
+ /**
88
+ * The facility ID, or the expanded facility object when `event.facility` is passed to `expand`.
89
+ */
90
+ facility?: number | Facility2 | undefined;
91
+ /**
92
+ * The department ID, or the expanded department object when `event.department` is passed to `expand`.
93
+ */
94
+ department?: number | Department2 | undefined;
95
+ /**
96
+ * Populated when `event.invitees` is passed to `expand`.
97
+ */
98
+ invitees?: Array<Invitees> | null | undefined;
99
+ };
100
+
101
+ /** @internal */
102
+ export type GetEventRequest$Outbound = {
103
+ id: number;
104
+ expand?: Array<string> | undefined;
105
+ };
106
+
107
+ /** @internal */
108
+ export const GetEventRequest$outboundSchema: z.ZodType<
109
+ GetEventRequest$Outbound,
110
+ z.ZodTypeDef,
111
+ GetEventRequest
112
+ > = z.object({
113
+ id: z.number().int(),
114
+ expand: z.array(components.Expand$outboundSchema).optional(),
115
+ });
116
+
117
+ export function getEventRequestToJSON(
118
+ getEventRequest: GetEventRequest,
119
+ ): string {
120
+ return JSON.stringify(GetEventRequest$outboundSchema.parse(getEventRequest));
121
+ }
122
+
123
+ /** @internal */
124
+ export const Facility2$inboundSchema: z.ZodType<
125
+ Facility2,
126
+ z.ZodTypeDef,
127
+ unknown
128
+ > = z.object({});
129
+
130
+ export function facility2FromJSON(
131
+ jsonString: string,
132
+ ): SafeParseResult<Facility2, SDKValidationError> {
133
+ return safeParse(
134
+ jsonString,
135
+ (x) => Facility2$inboundSchema.parse(JSON.parse(x)),
136
+ `Failed to parse 'Facility2' from JSON`,
137
+ );
138
+ }
139
+
140
+ /** @internal */
141
+ export const Facility$inboundSchema: z.ZodType<
142
+ Facility,
143
+ z.ZodTypeDef,
144
+ unknown
145
+ > = smartUnion([types.number(), z.lazy(() => Facility2$inboundSchema)]);
146
+
147
+ export function facilityFromJSON(
148
+ jsonString: string,
149
+ ): SafeParseResult<Facility, SDKValidationError> {
150
+ return safeParse(
151
+ jsonString,
152
+ (x) => Facility$inboundSchema.parse(JSON.parse(x)),
153
+ `Failed to parse 'Facility' from JSON`,
154
+ );
155
+ }
156
+
157
+ /** @internal */
158
+ export const Department2$inboundSchema: z.ZodType<
159
+ Department2,
160
+ z.ZodTypeDef,
161
+ unknown
162
+ > = z.object({});
163
+
164
+ export function department2FromJSON(
165
+ jsonString: string,
166
+ ): SafeParseResult<Department2, SDKValidationError> {
167
+ return safeParse(
168
+ jsonString,
169
+ (x) => Department2$inboundSchema.parse(JSON.parse(x)),
170
+ `Failed to parse 'Department2' from JSON`,
171
+ );
172
+ }
173
+
174
+ /** @internal */
175
+ export const Department$inboundSchema: z.ZodType<
176
+ Department,
177
+ z.ZodTypeDef,
178
+ unknown
179
+ > = smartUnion([types.number(), z.lazy(() => Department2$inboundSchema)]);
180
+
181
+ export function departmentFromJSON(
182
+ jsonString: string,
183
+ ): SafeParseResult<Department, SDKValidationError> {
184
+ return safeParse(
185
+ jsonString,
186
+ (x) => Department$inboundSchema.parse(JSON.parse(x)),
187
+ `Failed to parse 'Department' from JSON`,
188
+ );
189
+ }
190
+
191
+ /** @internal */
192
+ export const Invitees$inboundSchema: z.ZodType<
193
+ Invitees,
194
+ z.ZodTypeDef,
195
+ unknown
196
+ > = z.object({
197
+ id: types.optional(types.number()),
198
+ user_id: z.nullable(types.number()).optional(),
199
+ company_id: z.nullable(types.number()).optional(),
200
+ department_id: z.nullable(types.number()).optional(),
201
+ status: types.optional(types.string()),
202
+ date_reviewed: z.nullable(types.string()).optional(),
203
+ }).transform((v) => {
204
+ return remap$(v, {
205
+ "user_id": "userId",
206
+ "company_id": "companyId",
207
+ "department_id": "departmentId",
208
+ "date_reviewed": "dateReviewed",
209
+ });
210
+ });
211
+
212
+ export function inviteesFromJSON(
213
+ jsonString: string,
214
+ ): SafeParseResult<Invitees, SDKValidationError> {
215
+ return safeParse(
216
+ jsonString,
217
+ (x) => Invitees$inboundSchema.parse(JSON.parse(x)),
218
+ `Failed to parse 'Invitees' from JSON`,
219
+ );
220
+ }
221
+
222
+ /** @internal */
223
+ export const GetEventGetEventOk$inboundSchema: z.ZodType<
224
+ GetEventGetEventOk,
225
+ z.ZodTypeDef,
226
+ unknown
227
+ > = z.object({
228
+ id: types.optional(types.number()),
229
+ title: types.optional(types.string()),
230
+ start: types.optional(types.string()),
231
+ end: types.optional(types.string()),
232
+ all_day: types.optional(types.boolean()),
233
+ standing_appt: types.optional(types.boolean()),
234
+ bringing_food: types.optional(types.boolean()),
235
+ notes: z.nullable(types.string()).optional(),
236
+ status: types.optional(types.string()),
237
+ date_approved: z.nullable(types.string()).optional(),
238
+ facility: types.optional(
239
+ smartUnion([types.number(), z.lazy(() => Facility2$inboundSchema)]),
240
+ ),
241
+ department: types.optional(
242
+ smartUnion([types.number(), z.lazy(() => Department2$inboundSchema)]),
243
+ ),
244
+ invitees: z.nullable(z.array(z.lazy(() => Invitees$inboundSchema)))
245
+ .optional(),
246
+ }).transform((v) => {
247
+ return remap$(v, {
248
+ "all_day": "allDay",
249
+ "standing_appt": "standingAppt",
250
+ "bringing_food": "bringingFood",
251
+ "date_approved": "dateApproved",
252
+ });
253
+ });
254
+
255
+ export function getEventGetEventOkFromJSON(
256
+ jsonString: string,
257
+ ): SafeParseResult<GetEventGetEventOk, SDKValidationError> {
258
+ return safeParse(
259
+ jsonString,
260
+ (x) => GetEventGetEventOk$inboundSchema.parse(JSON.parse(x)),
261
+ `Failed to parse 'GetEventGetEventOk' from JSON`,
262
+ );
263
+ }
@@ -0,0 +1,42 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 02be1874a518
4
+ */
5
+
6
+ import * as z from "zod/v3";
7
+ import * as components from "../components/index.js";
8
+
9
+ export type GetVendorScanRequest = {
10
+ /**
11
+ * The ID of the vendor scan to retrieve.
12
+ */
13
+ id: number;
14
+ /**
15
+ * An array-style parameter to identify which sections of an object to expand. See documentation for the endpoint for a list of valid expansion values.
16
+ */
17
+ expand?: Array<components.Expand> | undefined;
18
+ };
19
+
20
+ /** @internal */
21
+ export type GetVendorScanRequest$Outbound = {
22
+ id: number;
23
+ expand?: Array<string> | undefined;
24
+ };
25
+
26
+ /** @internal */
27
+ export const GetVendorScanRequest$outboundSchema: z.ZodType<
28
+ GetVendorScanRequest$Outbound,
29
+ z.ZodTypeDef,
30
+ GetVendorScanRequest
31
+ > = z.object({
32
+ id: z.number().int(),
33
+ expand: z.array(components.Expand$outboundSchema).optional(),
34
+ });
35
+
36
+ export function getVendorScanRequestToJSON(
37
+ getVendorScanRequest: GetVendorScanRequest,
38
+ ): string {
39
+ return JSON.stringify(
40
+ GetVendorScanRequest$outboundSchema.parse(getVendorScanRequest),
41
+ );
42
+ }
@@ -33,6 +33,7 @@ export * from "./downloadinvoicesexport.js";
33
33
  export * from "./expeditetimeremaining.js";
34
34
  export * from "./getcompany.js";
35
35
  export * from "./getcurrentuser.js";
36
+ export * from "./getevent.js";
36
37
  export * from "./getfacility.js";
37
38
  export * from "./getfhirconfig.js";
38
39
  export * from "./getinvoice.js";
@@ -49,6 +50,7 @@ export * from "./getvendorcredentialfile.js";
49
50
  export * from "./getvendorinvoicedetails.js";
50
51
  export * from "./getvendorinvoicereceipt.js";
51
52
  export * from "./getvendorlegalname.js";
53
+ export * from "./getvendorscan.js";
52
54
  export * from "./getvendorsdetails.js";
53
55
  export * from "./getwebhookendpoint.js";
54
56
  export * from "./invoicesexport.js";
@@ -80,6 +82,7 @@ export * from "./listvendorfacilitystatuses.js";
80
82
  export * from "./listvendorinvoices.js";
81
83
  export * from "./listvendorjobtitles.js";
82
84
  export * from "./listvendormanagedbycompanies.js";
85
+ export * from "./listvendorscans.js";
83
86
  export * from "./listvendorscrubdetails.js";
84
87
  export * from "./listvendorscrubpackages.js";
85
88
  export * from "./listvendorscrubpurchases.js";
@@ -35,6 +35,14 @@ export type ListSystemsRequest = {
35
35
  * An array-style parameter to identify which sections of an object to expand. See documentation for the endpoint for a list of valid expansion values.
36
36
  */
37
37
  expand?: Array<components.Expand> | undefined;
38
+ /**
39
+ * Filter systems with a start_date on or after this date (YYYY-MM-DD). Also excludes systems with no start_date set.
40
+ */
41
+ startDateGte?: string | undefined;
42
+ /**
43
+ * Filter systems with a start_date on or before this date (YYYY-MM-DD).
44
+ */
45
+ startDateLte?: string | undefined;
38
46
  };
39
47
 
40
48
  /**
@@ -60,6 +68,8 @@ export type ListSystemsRequest$Outbound = {
60
68
  items_per_page?: number | undefined;
61
69
  name_like?: string | undefined;
62
70
  expand?: Array<string> | undefined;
71
+ start_date_gte?: string | undefined;
72
+ start_date_lte?: string | undefined;
63
73
  };
64
74
 
65
75
  /** @internal */
@@ -74,10 +84,14 @@ export const ListSystemsRequest$outboundSchema: z.ZodType<
74
84
  itemsPerPage: z.number().int().optional(),
75
85
  nameLike: z.string().optional(),
76
86
  expand: z.array(components.Expand$outboundSchema).optional(),
87
+ startDateGte: z.string().optional(),
88
+ startDateLte: z.string().optional(),
77
89
  }).transform((v) => {
78
90
  return remap$(v, {
79
91
  itemsPerPage: "items_per_page",
80
92
  nameLike: "name_like",
93
+ startDateGte: "start_date_gte",
94
+ startDateLte: "start_date_lte",
81
95
  });
82
96
  });
83
97
 
@@ -0,0 +1,174 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 55982c508708
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 { ClosedEnum } from "../../types/enums.js";
10
+ import { Result as SafeParseResult } from "../../types/fp.js";
11
+ import * as types from "../../types/primitives.js";
12
+ import * as components from "../components/index.js";
13
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
14
+
15
+ /**
16
+ * Filter by scan type. One of: `in`, `out`, `spot_check`.
17
+ */
18
+ export const ScanType = {
19
+ In: "in",
20
+ Out: "out",
21
+ SpotCheck: "spot_check",
22
+ } as const;
23
+ /**
24
+ * Filter by scan type. One of: `in`, `out`, `spot_check`.
25
+ */
26
+ export type ScanType = ClosedEnum<typeof ScanType>;
27
+
28
+ export type ListVendorScansRequest = {
29
+ /**
30
+ * A comma-separated list of object attributes to sort on.
31
+ */
32
+ sort?: string | null | undefined;
33
+ /**
34
+ * Sort desc
35
+ */
36
+ desc?: components.Desc | undefined;
37
+ /**
38
+ * A 1-based offset for which page to request (defaults to 1)
39
+ */
40
+ page?: number | undefined;
41
+ /**
42
+ * Number of items to show in a given page
43
+ */
44
+ itemsPerPage?: number | undefined;
45
+ /**
46
+ * An ID representing a Hospital
47
+ */
48
+ facilityId?: number | undefined;
49
+ /**
50
+ * An ID representing a Hospital System
51
+ */
52
+ systemId?: number | undefined;
53
+ /**
54
+ * Filter scans by company ID.
55
+ */
56
+ companyId?: number | undefined;
57
+ /**
58
+ * Filter scans by vendor ID, or pass `me` to use the currently authenticated vendor.
59
+ */
60
+ vendorId?: string | undefined;
61
+ /**
62
+ * Filter by scan type. One of: `in`, `out`, `spot_check`.
63
+ */
64
+ scanType?: ScanType | undefined;
65
+ };
66
+
67
+ /**
68
+ * The request was successful, and the server has returned the requested resource in the response body.
69
+ */
70
+ export type ListVendorScansListVendorScansOk = {
71
+ /**
72
+ * Pagination information for a pageable list
73
+ */
74
+ pager: components.Pager;
75
+ items: Array<components.VendorScan | null>;
76
+ };
77
+
78
+ export type ListVendorScansResponse = {
79
+ result: ListVendorScansListVendorScansOk;
80
+ };
81
+
82
+ /** @internal */
83
+ export const ScanType$outboundSchema: z.ZodNativeEnum<typeof ScanType> = z
84
+ .nativeEnum(ScanType);
85
+
86
+ /** @internal */
87
+ export type ListVendorScansRequest$Outbound = {
88
+ sort?: string | null | undefined;
89
+ desc?: components.Desc$Outbound | undefined;
90
+ page?: number | undefined;
91
+ items_per_page?: number | undefined;
92
+ facility_id?: number | undefined;
93
+ system_id?: number | undefined;
94
+ company_id?: number | undefined;
95
+ vendor_id?: string | undefined;
96
+ scan_type?: string | undefined;
97
+ };
98
+
99
+ /** @internal */
100
+ export const ListVendorScansRequest$outboundSchema: z.ZodType<
101
+ ListVendorScansRequest$Outbound,
102
+ z.ZodTypeDef,
103
+ ListVendorScansRequest
104
+ > = z.object({
105
+ sort: z.nullable(z.string()).optional(),
106
+ desc: components.Desc$outboundSchema.optional(),
107
+ page: z.number().int().optional(),
108
+ itemsPerPage: z.number().int().optional(),
109
+ facilityId: z.number().int().optional(),
110
+ systemId: z.number().int().optional(),
111
+ companyId: z.number().int().optional(),
112
+ vendorId: z.string().optional(),
113
+ scanType: ScanType$outboundSchema.optional(),
114
+ }).transform((v) => {
115
+ return remap$(v, {
116
+ itemsPerPage: "items_per_page",
117
+ facilityId: "facility_id",
118
+ systemId: "system_id",
119
+ companyId: "company_id",
120
+ vendorId: "vendor_id",
121
+ scanType: "scan_type",
122
+ });
123
+ });
124
+
125
+ export function listVendorScansRequestToJSON(
126
+ listVendorScansRequest: ListVendorScansRequest,
127
+ ): string {
128
+ return JSON.stringify(
129
+ ListVendorScansRequest$outboundSchema.parse(listVendorScansRequest),
130
+ );
131
+ }
132
+
133
+ /** @internal */
134
+ export const ListVendorScansListVendorScansOk$inboundSchema: z.ZodType<
135
+ ListVendorScansListVendorScansOk,
136
+ z.ZodTypeDef,
137
+ unknown
138
+ > = z.object({
139
+ pager: components.Pager$inboundSchema,
140
+ items: z.array(types.nullable(components.VendorScan$inboundSchema)),
141
+ });
142
+
143
+ export function listVendorScansListVendorScansOkFromJSON(
144
+ jsonString: string,
145
+ ): SafeParseResult<ListVendorScansListVendorScansOk, SDKValidationError> {
146
+ return safeParse(
147
+ jsonString,
148
+ (x) => ListVendorScansListVendorScansOk$inboundSchema.parse(JSON.parse(x)),
149
+ `Failed to parse 'ListVendorScansListVendorScansOk' from JSON`,
150
+ );
151
+ }
152
+
153
+ /** @internal */
154
+ export const ListVendorScansResponse$inboundSchema: z.ZodType<
155
+ ListVendorScansResponse,
156
+ z.ZodTypeDef,
157
+ unknown
158
+ > = z.object({
159
+ Result: z.lazy(() => ListVendorScansListVendorScansOk$inboundSchema),
160
+ }).transform((v) => {
161
+ return remap$(v, {
162
+ "Result": "result",
163
+ });
164
+ });
165
+
166
+ export function listVendorScansResponseFromJSON(
167
+ jsonString: string,
168
+ ): SafeParseResult<ListVendorScansResponse, SDKValidationError> {
169
+ return safeParse(
170
+ jsonString,
171
+ (x) => ListVendorScansResponse$inboundSchema.parse(JSON.parse(x)),
172
+ `Failed to parse 'ListVendorScansResponse' from JSON`,
173
+ );
174
+ }
@@ -0,0 +1,79 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 18f0158e5fe5
4
+ */
5
+
6
+ import {
7
+ QueryClient,
8
+ QueryFunctionContext,
9
+ QueryKey,
10
+ } from "@tanstack/react-query";
11
+ import { GreenSecurityCore } from "../core.js";
12
+ import { eventsGetEvent } from "../funcs/eventsGetEvent.js";
13
+ import { combineSignals } from "../lib/primitives.js";
14
+ import { RequestOptions } from "../lib/sdks.js";
15
+ import * as components from "../models/components/index.js";
16
+ import * as operations from "../models/operations/index.js";
17
+ import { unwrapAsync } from "../types/fp.js";
18
+ export type EventsGetEventQueryData = operations.GetEventGetEventOk;
19
+
20
+ export function prefetchEventsGetEvent(
21
+ queryClient: QueryClient,
22
+ client$: GreenSecurityCore,
23
+ request: operations.GetEventRequest,
24
+ options?: RequestOptions,
25
+ ): Promise<void> {
26
+ return queryClient.prefetchQuery({
27
+ ...buildEventsGetEventQuery(
28
+ client$,
29
+ request,
30
+ options,
31
+ ),
32
+ });
33
+ }
34
+
35
+ export function buildEventsGetEventQuery(
36
+ client$: GreenSecurityCore,
37
+ request: operations.GetEventRequest,
38
+ options?: RequestOptions,
39
+ ): {
40
+ queryKey: QueryKey;
41
+ queryFn: (context: QueryFunctionContext) => Promise<EventsGetEventQueryData>;
42
+ } {
43
+ return {
44
+ queryKey: queryKeyEventsGetEvent(request.id, { expand: request.expand }),
45
+ queryFn: async function eventsGetEventQueryFn(
46
+ ctx,
47
+ ): Promise<EventsGetEventQueryData> {
48
+ const sig = combineSignals(
49
+ ctx.signal,
50
+ options?.signal,
51
+ options?.fetchOptions?.signal,
52
+ );
53
+ const mergedOptions = {
54
+ ...options?.fetchOptions,
55
+ ...options,
56
+ signal: sig,
57
+ };
58
+
59
+ return unwrapAsync(eventsGetEvent(
60
+ client$,
61
+ request,
62
+ mergedOptions,
63
+ ));
64
+ },
65
+ };
66
+ }
67
+
68
+ export function queryKeyEventsGetEvent(
69
+ id: number,
70
+ parameters: { expand?: Array<components.Expand> | undefined },
71
+ ): QueryKey {
72
+ return [
73
+ "@greensecurity/javascript-sdk",
74
+ "events",
75
+ "getEvent",
76
+ id,
77
+ parameters,
78
+ ];
79
+ }