@greensecurity/javascript-sdk 0.47.0-beta.1 → 0.47.0-beta.11

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 (235) hide show
  1. package/dist/commonjs/__tests__/doAdmin.test.js +26 -0
  2. package/dist/commonjs/__tests__/doAdmin.test.js.map +1 -1
  3. package/dist/commonjs/__tests__/vendors.test.js +1 -1
  4. package/dist/commonjs/__tests__/zoneDevicesCreate.test.js +19 -1
  5. package/dist/commonjs/__tests__/zoneDevicesCreate.test.js.map +1 -1
  6. package/dist/commonjs/__tests__/zoneDevicesList.test.js +13 -1
  7. package/dist/commonjs/__tests__/zoneDevicesList.test.js.map +1 -1
  8. package/dist/commonjs/admin-funcs/doAdmin.d.ts +3 -1
  9. package/dist/commonjs/admin-funcs/doAdmin.d.ts.map +1 -1
  10. package/dist/commonjs/admin-funcs/doAdmin.js +11 -3
  11. package/dist/commonjs/admin-funcs/doAdmin.js.map +1 -1
  12. package/dist/commonjs/admin-funcs/lookupsAddressAutocomplete.d.ts +4 -0
  13. package/dist/commonjs/admin-funcs/lookupsAddressAutocomplete.d.ts.map +1 -0
  14. package/dist/commonjs/admin-funcs/lookupsAddressAutocomplete.js +17 -0
  15. package/dist/commonjs/admin-funcs/lookupsAddressAutocomplete.js.map +1 -0
  16. package/dist/commonjs/admin-funcs/lookupsAddressPlace.d.ts +4 -0
  17. package/dist/commonjs/admin-funcs/lookupsAddressPlace.d.ts.map +1 -0
  18. package/dist/commonjs/admin-funcs/lookupsAddressPlace.js +16 -0
  19. package/dist/commonjs/admin-funcs/lookupsAddressPlace.js.map +1 -0
  20. package/dist/commonjs/admin-funcs/lookupsAddressValidation.d.ts +13 -0
  21. package/dist/commonjs/admin-funcs/lookupsAddressValidation.d.ts.map +1 -0
  22. package/dist/commonjs/admin-funcs/lookupsAddressValidation.js +10 -0
  23. package/dist/commonjs/admin-funcs/lookupsAddressValidation.js.map +1 -0
  24. package/dist/commonjs/admin-funcs/networksCreate.d.ts +4 -0
  25. package/dist/commonjs/admin-funcs/networksCreate.d.ts.map +1 -1
  26. package/dist/commonjs/admin-funcs/networksCreate.js.map +1 -1
  27. package/dist/commonjs/admin-funcs/vendorCredentialCreateFormQuote.d.ts +18 -1
  28. package/dist/commonjs/admin-funcs/vendorCredentialCreateFormQuote.d.ts.map +1 -1
  29. package/dist/commonjs/admin-funcs/vendorCredentialCreateFormQuote.js +18 -2
  30. package/dist/commonjs/admin-funcs/vendorCredentialCreateFormQuote.js.map +1 -1
  31. package/dist/commonjs/admin-funcs/vendorCredentialGetFormLineItems.d.ts +5 -1
  32. package/dist/commonjs/admin-funcs/vendorCredentialGetFormLineItems.d.ts.map +1 -1
  33. package/dist/commonjs/admin-funcs/vendorCredentialGetFormLineItems.js +5 -2
  34. package/dist/commonjs/admin-funcs/vendorCredentialGetFormLineItems.js.map +1 -1
  35. package/dist/commonjs/admin-funcs/zoneDevicesDelete.d.ts +3 -0
  36. package/dist/commonjs/admin-funcs/zoneDevicesDelete.d.ts.map +1 -0
  37. package/dist/commonjs/admin-funcs/zoneDevicesDelete.js +11 -0
  38. package/dist/commonjs/admin-funcs/zoneDevicesDelete.js.map +1 -0
  39. package/dist/commonjs/admin-funcs/zoneDevicesList.d.ts +1 -0
  40. package/dist/commonjs/admin-funcs/zoneDevicesList.d.ts.map +1 -1
  41. package/dist/commonjs/admin-funcs/zoneDevicesList.js +3 -0
  42. package/dist/commonjs/admin-funcs/zoneDevicesList.js.map +1 -1
  43. package/dist/commonjs/admin-funcs/zoneDevicesProvisioning.d.ts +3 -0
  44. package/dist/commonjs/admin-funcs/zoneDevicesProvisioning.d.ts.map +1 -0
  45. package/dist/commonjs/admin-funcs/zoneDevicesProvisioning.js +15 -0
  46. package/dist/commonjs/admin-funcs/zoneDevicesProvisioning.js.map +1 -0
  47. package/dist/commonjs/admin-funcs/zoneDevicesUpdate.d.ts +10 -0
  48. package/dist/commonjs/admin-funcs/zoneDevicesUpdate.d.ts.map +1 -0
  49. package/dist/commonjs/admin-funcs/zoneDevicesUpdate.js +14 -0
  50. package/dist/commonjs/admin-funcs/zoneDevicesUpdate.js.map +1 -0
  51. package/dist/commonjs/apps/components.d.ts.map +1 -1
  52. package/dist/commonjs/apps/components.js +5 -0
  53. package/dist/commonjs/apps/components.js.map +1 -1
  54. package/dist/commonjs/funcs/vendorsGetVendorTargetFacilities.d.ts +3 -0
  55. package/dist/commonjs/funcs/vendorsGetVendorTargetFacilities.d.ts.map +1 -1
  56. package/dist/commonjs/funcs/vendorsGetVendorTargetFacilities.js +6 -0
  57. package/dist/commonjs/funcs/vendorsGetVendorTargetFacilities.js.map +1 -1
  58. package/dist/commonjs/index.extras.d.ts +14 -0
  59. package/dist/commonjs/index.extras.d.ts.map +1 -1
  60. package/dist/commonjs/index.extras.js +14 -0
  61. package/dist/commonjs/index.extras.js.map +1 -1
  62. package/dist/commonjs/lib/config.d.ts +3 -3
  63. package/dist/commonjs/lib/config.js +3 -3
  64. package/dist/commonjs/lib/config.js.map +1 -1
  65. package/dist/commonjs/models/components/expand.d.ts +1 -0
  66. package/dist/commonjs/models/components/expand.d.ts.map +1 -1
  67. package/dist/commonjs/models/components/expand.js +1 -0
  68. package/dist/commonjs/models/components/expand.js.map +1 -1
  69. package/dist/commonjs/models/components/index.d.ts +1 -0
  70. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  71. package/dist/commonjs/models/components/index.js +1 -0
  72. package/dist/commonjs/models/components/index.js.map +1 -1
  73. package/dist/commonjs/models/components/vendortargetfacility.d.ts +4 -0
  74. package/dist/commonjs/models/components/vendortargetfacility.d.ts.map +1 -1
  75. package/dist/commonjs/models/components/vendortargetfacility.js +2 -0
  76. package/dist/commonjs/models/components/vendortargetfacility.js.map +1 -1
  77. package/dist/commonjs/models/components/vendortargetfacilitystatuscounts.d.ts +24 -0
  78. package/dist/commonjs/models/components/vendortargetfacilitystatuscounts.d.ts.map +1 -0
  79. package/dist/commonjs/models/components/vendortargetfacilitystatuscounts.js +58 -0
  80. package/dist/commonjs/models/components/vendortargetfacilitystatuscounts.js.map +1 -0
  81. package/dist/commonjs/models/operations/createinvoice.d.ts +25 -0
  82. package/dist/commonjs/models/operations/createinvoice.d.ts.map +1 -1
  83. package/dist/commonjs/models/operations/createinvoice.js +10 -0
  84. package/dist/commonjs/models/operations/createinvoice.js.map +1 -1
  85. package/dist/commonjs/models/operations/getvendortargetfacilities.d.ts +54 -7
  86. package/dist/commonjs/models/operations/getvendortargetfacilities.d.ts.map +1 -1
  87. package/dist/commonjs/models/operations/getvendortargetfacilities.js +35 -3
  88. package/dist/commonjs/models/operations/getvendortargetfacilities.js.map +1 -1
  89. package/dist/commonjs/react-query/vendorsGetVendorTargetFacilities.core.d.ts +6 -0
  90. package/dist/commonjs/react-query/vendorsGetVendorTargetFacilities.core.d.ts.map +1 -1
  91. package/dist/commonjs/react-query/vendorsGetVendorTargetFacilities.core.js +6 -0
  92. package/dist/commonjs/react-query/vendorsGetVendorTargetFacilities.core.js.map +1 -1
  93. package/dist/commonjs/react-query/vendorsGetVendorTargetFacilities.d.ts +18 -0
  94. package/dist/commonjs/react-query/vendorsGetVendorTargetFacilities.d.ts.map +1 -1
  95. package/dist/commonjs/react-query/vendorsGetVendorTargetFacilities.js +12 -0
  96. package/dist/commonjs/react-query/vendorsGetVendorTargetFacilities.js.map +1 -1
  97. package/dist/commonjs/sdk/vendors.d.ts +3 -0
  98. package/dist/commonjs/sdk/vendors.d.ts.map +1 -1
  99. package/dist/commonjs/sdk/vendors.js +3 -0
  100. package/dist/commonjs/sdk/vendors.js.map +1 -1
  101. package/dist/commonjs/types/smartUnion.js +3 -3
  102. package/dist/commonjs/types/smartUnion.js.map +1 -1
  103. package/dist/esm/__tests__/doAdmin.test.js +27 -1
  104. package/dist/esm/__tests__/doAdmin.test.js.map +1 -1
  105. package/dist/esm/__tests__/vendors.test.js +1 -1
  106. package/dist/esm/__tests__/zoneDevicesCreate.test.js +19 -1
  107. package/dist/esm/__tests__/zoneDevicesCreate.test.js.map +1 -1
  108. package/dist/esm/__tests__/zoneDevicesList.test.js +13 -1
  109. package/dist/esm/__tests__/zoneDevicesList.test.js.map +1 -1
  110. package/dist/esm/admin-funcs/doAdmin.d.ts +3 -1
  111. package/dist/esm/admin-funcs/doAdmin.d.ts.map +1 -1
  112. package/dist/esm/admin-funcs/doAdmin.js +10 -3
  113. package/dist/esm/admin-funcs/doAdmin.js.map +1 -1
  114. package/dist/esm/admin-funcs/lookupsAddressAutocomplete.d.ts +4 -0
  115. package/dist/esm/admin-funcs/lookupsAddressAutocomplete.d.ts.map +1 -0
  116. package/dist/esm/admin-funcs/lookupsAddressAutocomplete.js +14 -0
  117. package/dist/esm/admin-funcs/lookupsAddressAutocomplete.js.map +1 -0
  118. package/dist/esm/admin-funcs/lookupsAddressPlace.d.ts +4 -0
  119. package/dist/esm/admin-funcs/lookupsAddressPlace.d.ts.map +1 -0
  120. package/dist/esm/admin-funcs/lookupsAddressPlace.js +13 -0
  121. package/dist/esm/admin-funcs/lookupsAddressPlace.js.map +1 -0
  122. package/dist/esm/admin-funcs/lookupsAddressValidation.d.ts +13 -0
  123. package/dist/esm/admin-funcs/lookupsAddressValidation.d.ts.map +1 -0
  124. package/dist/esm/admin-funcs/lookupsAddressValidation.js +7 -0
  125. package/dist/esm/admin-funcs/lookupsAddressValidation.js.map +1 -0
  126. package/dist/esm/admin-funcs/networksCreate.d.ts +4 -0
  127. package/dist/esm/admin-funcs/networksCreate.d.ts.map +1 -1
  128. package/dist/esm/admin-funcs/networksCreate.js.map +1 -1
  129. package/dist/esm/admin-funcs/vendorCredentialCreateFormQuote.d.ts +18 -1
  130. package/dist/esm/admin-funcs/vendorCredentialCreateFormQuote.d.ts.map +1 -1
  131. package/dist/esm/admin-funcs/vendorCredentialCreateFormQuote.js +18 -2
  132. package/dist/esm/admin-funcs/vendorCredentialCreateFormQuote.js.map +1 -1
  133. package/dist/esm/admin-funcs/vendorCredentialGetFormLineItems.d.ts +5 -1
  134. package/dist/esm/admin-funcs/vendorCredentialGetFormLineItems.d.ts.map +1 -1
  135. package/dist/esm/admin-funcs/vendorCredentialGetFormLineItems.js +5 -2
  136. package/dist/esm/admin-funcs/vendorCredentialGetFormLineItems.js.map +1 -1
  137. package/dist/esm/admin-funcs/zoneDevicesDelete.d.ts +3 -0
  138. package/dist/esm/admin-funcs/zoneDevicesDelete.d.ts.map +1 -0
  139. package/dist/esm/admin-funcs/zoneDevicesDelete.js +8 -0
  140. package/dist/esm/admin-funcs/zoneDevicesDelete.js.map +1 -0
  141. package/dist/esm/admin-funcs/zoneDevicesList.d.ts +1 -0
  142. package/dist/esm/admin-funcs/zoneDevicesList.d.ts.map +1 -1
  143. package/dist/esm/admin-funcs/zoneDevicesList.js +3 -0
  144. package/dist/esm/admin-funcs/zoneDevicesList.js.map +1 -1
  145. package/dist/esm/admin-funcs/zoneDevicesProvisioning.d.ts +3 -0
  146. package/dist/esm/admin-funcs/zoneDevicesProvisioning.d.ts.map +1 -0
  147. package/dist/esm/admin-funcs/zoneDevicesProvisioning.js +12 -0
  148. package/dist/esm/admin-funcs/zoneDevicesProvisioning.js.map +1 -0
  149. package/dist/esm/admin-funcs/zoneDevicesUpdate.d.ts +10 -0
  150. package/dist/esm/admin-funcs/zoneDevicesUpdate.d.ts.map +1 -0
  151. package/dist/esm/admin-funcs/zoneDevicesUpdate.js +11 -0
  152. package/dist/esm/admin-funcs/zoneDevicesUpdate.js.map +1 -0
  153. package/dist/esm/apps/components.d.ts.map +1 -1
  154. package/dist/esm/apps/components.js +5 -0
  155. package/dist/esm/apps/components.js.map +1 -1
  156. package/dist/esm/funcs/vendorsGetVendorTargetFacilities.d.ts +3 -0
  157. package/dist/esm/funcs/vendorsGetVendorTargetFacilities.d.ts.map +1 -1
  158. package/dist/esm/funcs/vendorsGetVendorTargetFacilities.js +6 -0
  159. package/dist/esm/funcs/vendorsGetVendorTargetFacilities.js.map +1 -1
  160. package/dist/esm/index.extras.d.ts +14 -0
  161. package/dist/esm/index.extras.d.ts.map +1 -1
  162. package/dist/esm/index.extras.js +14 -0
  163. package/dist/esm/index.extras.js.map +1 -1
  164. package/dist/esm/lib/config.d.ts +3 -3
  165. package/dist/esm/lib/config.js +3 -3
  166. package/dist/esm/lib/config.js.map +1 -1
  167. package/dist/esm/models/components/expand.d.ts +1 -0
  168. package/dist/esm/models/components/expand.d.ts.map +1 -1
  169. package/dist/esm/models/components/expand.js +1 -0
  170. package/dist/esm/models/components/expand.js.map +1 -1
  171. package/dist/esm/models/components/index.d.ts +1 -0
  172. package/dist/esm/models/components/index.d.ts.map +1 -1
  173. package/dist/esm/models/components/index.js +1 -0
  174. package/dist/esm/models/components/index.js.map +1 -1
  175. package/dist/esm/models/components/vendortargetfacility.d.ts +4 -0
  176. package/dist/esm/models/components/vendortargetfacility.d.ts.map +1 -1
  177. package/dist/esm/models/components/vendortargetfacility.js +2 -0
  178. package/dist/esm/models/components/vendortargetfacility.js.map +1 -1
  179. package/dist/esm/models/components/vendortargetfacilitystatuscounts.d.ts +24 -0
  180. package/dist/esm/models/components/vendortargetfacilitystatuscounts.d.ts.map +1 -0
  181. package/dist/esm/models/components/vendortargetfacilitystatuscounts.js +21 -0
  182. package/dist/esm/models/components/vendortargetfacilitystatuscounts.js.map +1 -0
  183. package/dist/esm/models/operations/createinvoice.d.ts +25 -0
  184. package/dist/esm/models/operations/createinvoice.d.ts.map +1 -1
  185. package/dist/esm/models/operations/createinvoice.js +10 -0
  186. package/dist/esm/models/operations/createinvoice.js.map +1 -1
  187. package/dist/esm/models/operations/getvendortargetfacilities.d.ts +54 -7
  188. package/dist/esm/models/operations/getvendortargetfacilities.d.ts.map +1 -1
  189. package/dist/esm/models/operations/getvendortargetfacilities.js +34 -2
  190. package/dist/esm/models/operations/getvendortargetfacilities.js.map +1 -1
  191. package/dist/esm/react-query/vendorsGetVendorTargetFacilities.core.d.ts +6 -0
  192. package/dist/esm/react-query/vendorsGetVendorTargetFacilities.core.d.ts.map +1 -1
  193. package/dist/esm/react-query/vendorsGetVendorTargetFacilities.core.js +6 -0
  194. package/dist/esm/react-query/vendorsGetVendorTargetFacilities.core.js.map +1 -1
  195. package/dist/esm/react-query/vendorsGetVendorTargetFacilities.d.ts +18 -0
  196. package/dist/esm/react-query/vendorsGetVendorTargetFacilities.d.ts.map +1 -1
  197. package/dist/esm/react-query/vendorsGetVendorTargetFacilities.js +12 -0
  198. package/dist/esm/react-query/vendorsGetVendorTargetFacilities.js.map +1 -1
  199. package/dist/esm/sdk/vendors.d.ts +3 -0
  200. package/dist/esm/sdk/vendors.d.ts.map +1 -1
  201. package/dist/esm/sdk/vendors.js +3 -0
  202. package/dist/esm/sdk/vendors.js.map +1 -1
  203. package/dist/esm/types/smartUnion.js +3 -3
  204. package/dist/esm/types/smartUnion.js.map +1 -1
  205. package/jsr.json +1 -1
  206. package/package.json +1 -1
  207. package/src/__tests__/doAdmin.test.ts +35 -0
  208. package/src/__tests__/vendors.test.ts +1 -1
  209. package/src/__tests__/zoneDevicesCreate.test.ts +25 -1
  210. package/src/__tests__/zoneDevicesList.test.ts +15 -1
  211. package/src/admin-funcs/doAdmin.ts +20 -3
  212. package/src/admin-funcs/lookupsAddressAutocomplete.ts +23 -0
  213. package/src/admin-funcs/lookupsAddressPlace.ts +20 -0
  214. package/src/admin-funcs/lookupsAddressValidation.ts +21 -0
  215. package/src/admin-funcs/networksCreate.ts +5 -0
  216. package/src/admin-funcs/vendorCredentialCreateFormQuote.ts +20 -1
  217. package/src/admin-funcs/vendorCredentialGetFormLineItems.ts +5 -0
  218. package/src/admin-funcs/zoneDevicesDelete.ts +8 -0
  219. package/src/admin-funcs/zoneDevicesList.ts +4 -0
  220. package/src/admin-funcs/zoneDevicesProvisioning.ts +12 -0
  221. package/src/admin-funcs/zoneDevicesUpdate.ts +21 -0
  222. package/src/apps/components.ts +5 -0
  223. package/src/funcs/vendorsGetVendorTargetFacilities.ts +6 -0
  224. package/src/index.extras.ts +15 -0
  225. package/src/lib/config.ts +3 -3
  226. package/src/models/components/expand.ts +2 -0
  227. package/src/models/components/index.ts +1 -0
  228. package/src/models/components/vendortargetfacility.ts +6 -0
  229. package/src/models/components/vendortargetfacilitystatuscounts.ts +53 -0
  230. package/src/models/operations/createinvoice.ts +35 -0
  231. package/src/models/operations/getvendortargetfacilities.ts +76 -7
  232. package/src/react-query/vendorsGetVendorTargetFacilities.core.ts +12 -0
  233. package/src/react-query/vendorsGetVendorTargetFacilities.ts +18 -0
  234. package/src/sdk/vendors.ts +3 -0
  235. package/src/types/smartUnion.ts +3 -3
@@ -1,12 +1,17 @@
1
1
  import { APIPromise } from "../types/async.js";
2
+ import { RequestOptions } from "../lib/sdks.js";
2
3
  import { $doPost, internalApiResult } from "./doAdmin.js";
3
4
 
4
5
  export function vendorCredentialGetFormLineItems(
5
6
  vendorCredentialId: number,
6
7
  jsonData: string,
8
+ /** Carries the caller's AbortSignal: the form re-prices as it is filled in, so a
9
+ * superseded request has to be droppable in flight. */
10
+ options?: RequestOptions,
7
11
  ): internalApiResult {
8
12
  return new APIPromise($doPost(
9
13
  `/vendors/credentials/${vendorCredentialId}/line-items`,
10
14
  { json_data: jsonData },
15
+ options,
11
16
  ));
12
17
  }
@@ -0,0 +1,8 @@
1
+ import { APIPromise } from "../types/async.js";
2
+ import { $doDelete, internalApiResult } from "./doAdmin.js";
3
+
4
+ // Removes a gateway from the Gatekeeper device details screen and revokes its AWS IoT thing.
5
+ // Internal for the same reason as zoneDevicesCreate. 404 covers a gateway outside the caller's scope.
6
+ export function zoneDevicesDelete(zoneDeviceId: number): internalApiResult {
7
+ return new APIPromise($doDelete(`/zone-devices/${zoneDeviceId}`));
8
+ }
@@ -6,6 +6,7 @@ export type zoneDevicesListSortField = "id" | "name";
6
6
  export type zoneDevicesListRequest = {
7
7
  facilityId?: number;
8
8
  zoneId?: number;
9
+ networkId?: number;
9
10
  page?: number;
10
11
  itemsPerPage?: number;
11
12
  sort?: zoneDevicesListSortField;
@@ -36,6 +37,9 @@ export function zoneDevicesList(
36
37
  if (request.zoneId !== undefined) {
37
38
  query["zone_id"] = request.zoneId;
38
39
  }
40
+ if (request.networkId !== undefined) {
41
+ query["network_id"] = request.networkId;
42
+ }
39
43
  if (request.page !== undefined) {
40
44
  query["page"] = request.page;
41
45
  }
@@ -0,0 +1,12 @@
1
+ import { APIPromise } from "../types/async.js";
2
+ import { $doPost, internalApiResult } from "./doAdmin.js";
3
+
4
+ // Everything the Gatekeeper app writes to a gateway when it provisions it over the gateway's own
5
+ // Wi-Fi: the admin password, the AWS IoT certificate and broker, and the settings and
6
+ // secrets of the network it joins. The first call mints the password and certificate, hence POST.
7
+ //
8
+ // Internal for the same reason as zoneDevicesCreate. The response carries secrets: callers keep it
9
+ // in memory for the provisioning run and never persist or log it.
10
+ export function zoneDevicesProvisioning(zoneDeviceId: number): internalApiResult {
11
+ return new APIPromise($doPost(`/zone-devices/${zoneDeviceId}/provisioning`, {}));
12
+ }
@@ -0,0 +1,21 @@
1
+ import { APIPromise } from "../types/async.js";
2
+ import { $doPut, internalApiResult } from "./doAdmin.js";
3
+ import type { zoneDeviceConnectionType } from "./zoneDevicesCreate.js";
4
+
5
+ // Wire names, posted verbatim like zoneDevicesCreateRequest. Every field is optional: only what
6
+ // the edit changed is sent.
7
+ export type zoneDevicesUpdateRequest = {
8
+ zone_id?: number;
9
+ network_id?: number;
10
+ connection_type?: zoneDeviceConnectionType;
11
+ name?: string;
12
+ };
13
+
14
+ // Edits a gateway from the Gatekeeper device details screen. This only updates the record; the
15
+ // app pushes the new network to the hardware using zoneDevicesProvisioning.
16
+ //
17
+ // Internal for the same reason as zoneDevicesCreate. 404 covers a gateway, zone or network outside
18
+ // the caller's scope, and a network not linked to the zone's facility.
19
+ export function zoneDevicesUpdate(zoneDeviceId: number, request: zoneDevicesUpdateRequest): internalApiResult {
20
+ return new APIPromise($doPut(`/zone-devices/${zoneDeviceId}`, request));
21
+ }
@@ -8,6 +8,11 @@
8
8
  *
9
9
  * Styling is tokens only. There is no `style`, `className` or colour value an app can pass, and
10
10
  * every URL-shaped prop is typed so the host can refuse what the manifest did not grant.
11
+ *
12
+ * The Apps guides show screenshots of representative states and options for each component
13
+ * (not every contract state, such as a disabled Link, is pictured). A new component, or a change to
14
+ * how one looks or behaves, needs new or recaptured pictures in the same change; see
15
+ * .github/instructions/app-platform-ui.instructions.md.
11
16
  */
12
17
 
13
18
  import { isHttpsUrl } from "./url.js";
@@ -44,8 +44,11 @@ import {
44
44
  *
45
45
  * - `vendor_target_facility.facility`
46
46
  * - `vendor_target_facility.has_screening_responses`
47
+ * - `vendor_target_facility.expiring_credential_count`
47
48
  *
48
49
  * The endpoint rejects any other value with `422 Unprocessable Entity`.
50
+ *
51
+ * Pass `include_status_counts=true` to also receive `status_counts`, the number of approved and not approved rows. The counts honor `active_facilities_only` and `facility_id`, and ignore the search, name, and status filters.
49
52
  */
50
53
  export function vendorsGetVendorTargetFacilities(
51
54
  client: GreenSecurityCore,
@@ -126,8 +129,11 @@ async function $do(
126
129
  "expand": payload.expand,
127
130
  }, { explode: false }),
128
131
  encodeFormQuery({
132
+ "active_facilities_only": payload.active_facilities_only,
129
133
  "desc": payload.desc,
134
+ "facility_id": payload.facility_id,
130
135
  "facility_name_like": payload.facility_name_like,
136
+ "include_status_counts": payload.include_status_counts,
131
137
  "items_per_page": payload.items_per_page,
132
138
  "page": payload.page,
133
139
  "search_like": payload.search_like,
@@ -66,6 +66,12 @@ import { zoneDevicesList } from "./admin-funcs/zoneDevicesList.js";
66
66
  import { zoneDevicesGet } from "./admin-funcs/zoneDevicesGet.js";
67
67
  import { zoneDevicesCreate } from "./admin-funcs/zoneDevicesCreate.js";
68
68
  import { zoneDevicesMacAvailability } from "./admin-funcs/zoneDevicesMacAvailability.js";
69
+ import { zoneDevicesUpdate } from "./admin-funcs/zoneDevicesUpdate.js";
70
+ import { zoneDevicesProvisioning } from "./admin-funcs/zoneDevicesProvisioning.js";
71
+ import { zoneDevicesDelete } from "./admin-funcs/zoneDevicesDelete.js";
72
+ import { lookupsAddressValidation } from "./admin-funcs/lookupsAddressValidation.js";
73
+ import { lookupsAddressAutocomplete } from "./admin-funcs/lookupsAddressAutocomplete.js";
74
+ import { lookupsAddressPlace } from "./admin-funcs/lookupsAddressPlace.js";
69
75
 
70
76
  // Third-party app platform contract (surfaces, manifest, host/sandbox protocol, components).
71
77
  export * as apps from "./apps/index.js";
@@ -139,6 +145,12 @@ export const __internal = {
139
145
  dismiss: dismissCommunication
140
146
  },
141
147
 
148
+ lookups: {
149
+ validateAddress: lookupsAddressValidation,
150
+ autocompleteAddress: lookupsAddressAutocomplete,
151
+ getAddressPlace: lookupsAddressPlace
152
+ },
153
+
142
154
  // Third-party app platform host (web-mobile-client, docs/third-party-apps/plan.md C8).
143
155
  apps: {
144
156
  listInstalledApps: appsListInstalledApps,
@@ -181,6 +193,9 @@ export const __internal = {
181
193
  list: zoneDevicesList,
182
194
  get: zoneDevicesGet,
183
195
  create: zoneDevicesCreate,
196
+ update: zoneDevicesUpdate,
197
+ provisioning: zoneDevicesProvisioning,
198
+ delete: zoneDevicesDelete,
184
199
  macAvailability: zoneDevicesMacAvailability
185
200
  }
186
201
  };
package/src/lib/config.ts CHANGED
@@ -80,8 +80,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
80
80
  export const SDK_METADATA = {
81
81
  language: "typescript",
82
82
  openapiDocVersion: "0.46.0",
83
- sdkVersion: "0.47.0-beta.1",
84
- genVersion: "2.943.0",
83
+ sdkVersion: "0.47.0-beta.11",
84
+ genVersion: "2.948.4",
85
85
  userAgent:
86
- "speakeasy-sdk/typescript 0.47.0-beta.1 2.943.0 0.46.0 @greensecurity/javascript-sdk",
86
+ "speakeasy-sdk/typescript 0.47.0-beta.11 2.948.4 0.46.0 @greensecurity/javascript-sdk",
87
87
  } as const;
@@ -19,6 +19,8 @@ export const Expand = {
19
19
  VendorTargetFacilityFacility: "vendor_target_facility.facility",
20
20
  VendorTargetFacilityHasScreeningResponses:
21
21
  "vendor_target_facility.has_screening_responses",
22
+ VendorTargetFacilityExpiringCredentialCount:
23
+ "vendor_target_facility.expiring_credential_count",
22
24
  ContactFacility: "contact.facility",
23
25
  ContactSystem: "contact.system",
24
26
  ContactDepartment: "contact.department",
@@ -177,6 +177,7 @@ export * from "./vendorscrubdetails.js";
177
177
  export * from "./vendorscrubpurchase.js";
178
178
  export * from "./vendortargetfacility.js";
179
179
  export * from "./vendortargetfacilityscreeningresponse.js";
180
+ export * from "./vendortargetfacilitystatuscounts.js";
180
181
  export * from "./vendortype.js";
181
182
  export * from "./visitorcheckin.js";
182
183
  export * from "./webhookconsumers.js";
@@ -40,6 +40,10 @@ export type VendorTargetFacility = {
40
40
  * Whether the vendor has answered at least one target-facility screening question for this facility. Present only when you pass `vendor_target_facility.has_screening_responses` to `expand`. Combined with `questions_answered` it distinguishes "View" (answered some) from "None" (no questions answered) in the individual's subscription view.
41
41
  */
42
42
  hasScreeningResponses?: boolean | undefined;
43
+ /**
44
+ * How many credentials the facility requires from the vendor have an approved version that expires within 30 days, with no newer version approved or waiting for approval. Company-owned credentials are left out when the caller is a vendor whose company has company managers. Present only when you pass `vendor_target_facility.expiring_credential_count` to `expand`.
45
+ */
46
+ expiringCredentialCount?: number | undefined;
43
47
  /**
44
48
  * The date and time the target facility was added to the vendor, in ISO 8601 format, or `null` if not available.
45
49
  */
@@ -76,11 +80,13 @@ export const VendorTargetFacility$inboundSchema: z.ZodType<
76
80
  status: types.nullable(types.string()),
77
81
  questions_answered: types.nullable(types.boolean()),
78
82
  has_screening_responses: types.optional(types.boolean()),
83
+ expiring_credential_count: types.optional(types.number()),
79
84
  date_created: z.nullable(types.date()).optional(),
80
85
  }).transform((v) => {
81
86
  return remap$(v, {
82
87
  "questions_answered": "questionsAnswered",
83
88
  "has_screening_responses": "hasScreeningResponses",
89
+ "expiring_credential_count": "expiringCredentialCount",
84
90
  "date_created": "dateCreated",
85
91
  });
86
92
  });
@@ -0,0 +1,53 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
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 * as types from "../../types/primitives.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+
12
+ /**
13
+ * How many of a vendor's target facility rows are approved and not approved. Returned when you pass `include_status_counts=true`.
14
+ */
15
+ export type VendorTargetFacilityStatusCounts = {
16
+ /**
17
+ * Rows with the `Approved` status.
18
+ */
19
+ approved: number;
20
+ /**
21
+ * Rows with any other status, including no status.
22
+ */
23
+ notApproved: number;
24
+ /**
25
+ * All rows the counts cover.
26
+ */
27
+ total: number;
28
+ };
29
+
30
+ /** @internal */
31
+ export const VendorTargetFacilityStatusCounts$inboundSchema: z.ZodType<
32
+ VendorTargetFacilityStatusCounts,
33
+ z.ZodTypeDef,
34
+ unknown
35
+ > = z.object({
36
+ approved: types.number(),
37
+ not_approved: types.number(),
38
+ total: types.number(),
39
+ }).transform((v) => {
40
+ return remap$(v, {
41
+ "not_approved": "notApproved",
42
+ });
43
+ });
44
+
45
+ export function vendorTargetFacilityStatusCountsFromJSON(
46
+ jsonString: string,
47
+ ): SafeParseResult<VendorTargetFacilityStatusCounts, SDKValidationError> {
48
+ return safeParse(
49
+ jsonString,
50
+ (x) => VendorTargetFacilityStatusCounts$inboundSchema.parse(JSON.parse(x)),
51
+ `Failed to parse 'VendorTargetFacilityStatusCounts' from JSON`,
52
+ );
53
+ }
@@ -58,6 +58,10 @@ export type Five = {
58
58
  * A campaign opt-in code, taken from the link that carried the offer Deliberately not an enumeration. The server decides which codes are live, what each one grants, and who qualifies for it. These decisions change as campaigns come and go. The server ignores an unrecognized code, or one the account does not qualify for, and creates the invoice as if the code were absent, never returning an error. The server adds any line item the code earns, and it appears on the quote.
59
59
  */
60
60
  promo?: string | undefined;
61
+ /**
62
+ * Set to `true` when the payer intends to settle this order from their credit balance before their payment method is charged. This affects only how the convenience fee is calculated: the fee pays for card processing, so it is assessed on the amount the card is left to cover once credits have been applied, and an order a balance covers in full carries none. No credits are debited here, and the balance is read from the payer's own ledger rather than taken from this request. Settle the credits with `POST /invoices/{id}/payment` and `use_credits: true`.
63
+ */
64
+ useCredits?: boolean | undefined;
61
65
  };
62
66
 
63
67
  export const CreateInvoiceRequestBodyInvoicesPaymentHandler = {
@@ -105,6 +109,10 @@ export type Four = {
105
109
  * A campaign opt-in code, taken from the link that carried the offer Deliberately not an enumeration. The server decides which codes are live, what each one grants, and who qualifies for it. These decisions change as campaigns come and go. The server ignores an unrecognized code, or one the account does not qualify for, and creates the invoice as if the code were absent, never returning an error. The server adds any line item the code earns, and it appears on the quote.
106
110
  */
107
111
  promo?: string | undefined;
112
+ /**
113
+ * Set to `true` when the payer intends to settle this order from their credit balance before their payment method is charged. This affects only how the convenience fee is calculated: the fee pays for card processing, so it is assessed on the amount the card is left to cover once credits have been applied, and an order a balance covers in full carries none. No credits are debited here, and the balance is read from the payer's own ledger rather than taken from this request. Settle the credits with `POST /invoices/{id}/payment` and `use_credits: true`.
114
+ */
115
+ useCredits?: boolean | undefined;
108
116
  };
109
117
 
110
118
  export const CreateInvoiceRequestBodyPaymentHandler = {
@@ -152,6 +160,10 @@ export type Three = {
152
160
  * A campaign opt-in code, taken from the link that carried the offer Deliberately not an enumeration. The server decides which codes are live, what each one grants, and who qualifies for it. These decisions change as campaigns come and go. The server ignores an unrecognized code, or one the account does not qualify for, and creates the invoice as if the code were absent, never returning an error. The server adds any line item the code earns, and it appears on the quote.
153
161
  */
154
162
  promo?: string | undefined;
163
+ /**
164
+ * Set to `true` when the payer intends to settle this order from their credit balance before their payment method is charged. This affects only how the convenience fee is calculated: the fee pays for card processing, so it is assessed on the amount the card is left to cover once credits have been applied, and an order a balance covers in full carries none. No credits are debited here, and the balance is read from the payer's own ledger rather than taken from this request. Settle the credits with `POST /invoices/{id}/payment` and `use_credits: true`.
165
+ */
166
+ useCredits?: boolean | undefined;
155
167
  };
156
168
 
157
169
  export const RequestBodyPaymentHandler = {
@@ -197,6 +209,10 @@ export type CreateInvoiceRequestBody2 = {
197
209
  * A campaign opt-in code, taken from the link that carried the offer Deliberately not an enumeration. The server decides which codes are live, what each one grants, and who qualifies for it. These decisions change as campaigns come and go. The server ignores an unrecognized code, or one the account does not qualify for, and creates the invoice as if the code were absent, never returning an error. The server adds any line item the code earns, and it appears on the quote.
198
210
  */
199
211
  promo?: string | undefined;
212
+ /**
213
+ * Set to `true` when the payer intends to settle this order from their credit balance before their payment method is charged. This affects only how the convenience fee is calculated: the fee pays for card processing, so it is assessed on the amount the card is left to cover once credits have been applied, and an order a balance covers in full carries none. No credits are debited here, and the balance is read from the payer's own ledger rather than taken from this request. Settle the credits with `POST /invoices/{id}/payment` and `use_credits: true`.
214
+ */
215
+ useCredits?: boolean | undefined;
200
216
  };
201
217
 
202
218
  export const PaymentHandler = {
@@ -240,6 +256,10 @@ export type RequestBody1 = {
240
256
  * A campaign opt-in code, taken from the link that carried the offer Deliberately not an enumeration. The server decides which codes are live, what each one grants, and who qualifies for it. These decisions change as campaigns come and go. The server ignores an unrecognized code, or one the account does not qualify for, and creates the invoice as if the code were absent, never returning an error. The server adds any line item the code earns, and it appears on the quote.
241
257
  */
242
258
  promo?: string | undefined;
259
+ /**
260
+ * Set to `true` when the payer intends to settle this order from their credit balance before their payment method is charged. This affects only how the convenience fee is calculated: the fee pays for card processing, so it is assessed on the amount the card is left to cover once credits have been applied, and an order a balance covers in full carries none. No credits are debited here, and the balance is read from the payer's own ledger rather than taken from this request. Settle the credits with `POST /invoices/{id}/payment` and `use_credits: true`.
261
+ */
262
+ useCredits?: boolean | undefined;
243
263
  };
244
264
 
245
265
  /**
@@ -336,6 +356,7 @@ export type Five$Outbound = {
336
356
  credential_pricing_ids?: Array<number> | null | undefined;
337
357
  invoice_type?: string | undefined;
338
358
  promo?: string | undefined;
359
+ use_credits: boolean;
339
360
  };
340
361
 
341
362
  /** @internal */
@@ -350,11 +371,13 @@ export const Five$outboundSchema: z.ZodType<Five$Outbound, z.ZodTypeDef, Five> =
350
371
  CreateInvoiceRequestBodyInvoicesRequestInvoiceType$outboundSchema
351
372
  .optional(),
352
373
  promo: z.string().optional(),
374
+ useCredits: z.boolean().default(false),
353
375
  }).transform((v) => {
354
376
  return remap$(v, {
355
377
  vendorCredentialId: "vendor_credential_id",
356
378
  credentialPricingIds: "credential_pricing_ids",
357
379
  invoiceType: "invoice_type",
380
+ useCredits: "use_credits",
358
381
  });
359
382
  });
360
383
 
@@ -432,6 +455,7 @@ export type Four$Outbound = {
432
455
  credential_pricing_ids?: Array<number> | null | undefined;
433
456
  invoice_type?: string | undefined;
434
457
  promo?: string | undefined;
458
+ use_credits: boolean;
435
459
  };
436
460
 
437
461
  /** @internal */
@@ -445,11 +469,13 @@ export const Four$outboundSchema: z.ZodType<Four$Outbound, z.ZodTypeDef, Four> =
445
469
  invoiceType: CreateInvoiceRequestBodyInvoicesInvoiceType$outboundSchema
446
470
  .optional(),
447
471
  promo: z.string().optional(),
472
+ useCredits: z.boolean().default(false),
448
473
  }).transform((v) => {
449
474
  return remap$(v, {
450
475
  systemId: "system_id",
451
476
  credentialPricingIds: "credential_pricing_ids",
452
477
  invoiceType: "invoice_type",
478
+ useCredits: "use_credits",
453
479
  });
454
480
  });
455
481
 
@@ -529,6 +555,7 @@ export type Three$Outbound = {
529
555
  credential_pricing_ids?: Array<number> | null | undefined;
530
556
  invoice_type?: string | undefined;
531
557
  promo?: string | undefined;
558
+ use_credits: boolean;
532
559
  };
533
560
 
534
561
  /** @internal */
@@ -543,11 +570,13 @@ export const Three$outboundSchema: z.ZodType<
543
570
  credentialPricingIds: z.nullable(z.array(z.number().int())).optional(),
544
571
  invoiceType: CreateInvoiceRequestBodyInvoiceType$outboundSchema.optional(),
545
572
  promo: z.string().optional(),
573
+ useCredits: z.boolean().default(false),
546
574
  }).transform((v) => {
547
575
  return remap$(v, {
548
576
  facilityId: "facility_id",
549
577
  credentialPricingIds: "credential_pricing_ids",
550
578
  invoiceType: "invoice_type",
579
+ useCredits: "use_credits",
551
580
  });
552
581
  });
553
582
 
@@ -622,6 +651,7 @@ export type CreateInvoiceRequestBody2$Outbound = {
622
651
  credential_pricing_ids?: Array<number> | null | undefined;
623
652
  invoice_type?: string | undefined;
624
653
  promo?: string | undefined;
654
+ use_credits: boolean;
625
655
  };
626
656
 
627
657
  /** @internal */
@@ -635,11 +665,13 @@ export const CreateInvoiceRequestBody2$outboundSchema: z.ZodType<
635
665
  credentialPricingIds: z.nullable(z.array(z.number().int())).optional(),
636
666
  invoiceType: RequestBodyInvoiceType$outboundSchema.optional(),
637
667
  promo: z.string().optional(),
668
+ useCredits: z.boolean().default(false),
638
669
  }).transform((v) => {
639
670
  return remap$(v, {
640
671
  companyId: "company_id",
641
672
  credentialPricingIds: "credential_pricing_ids",
642
673
  invoiceType: "invoice_type",
674
+ useCredits: "use_credits",
643
675
  });
644
676
  });
645
677
 
@@ -713,6 +745,7 @@ export type RequestBody1$Outbound = {
713
745
  credential_pricing_ids?: Array<number> | null | undefined;
714
746
  invoice_type?: string | undefined;
715
747
  promo?: string | undefined;
748
+ use_credits: boolean;
716
749
  };
717
750
 
718
751
  /** @internal */
@@ -726,11 +759,13 @@ export const RequestBody1$outboundSchema: z.ZodType<
726
759
  credentialPricingIds: z.nullable(z.array(z.number().int())).optional(),
727
760
  invoiceType: InvoiceType$outboundSchema.optional(),
728
761
  promo: z.string().optional(),
762
+ useCredits: z.boolean().default(false),
729
763
  }).transform((v) => {
730
764
  return remap$(v, {
731
765
  vendorId: "vendor_id",
732
766
  credentialPricingIds: "credential_pricing_ids",
733
767
  invoiceType: "invoice_type",
768
+ useCredits: "use_credits",
734
769
  });
735
770
  });
736
771
 
@@ -7,26 +7,52 @@ import { remap as remap$ } from "../../lib/primitives.js";
7
7
  import { safeParse } from "../../lib/schemas.js";
8
8
  import { ClosedEnum } from "../../types/enums.js";
9
9
  import { Result as SafeParseResult } from "../../types/fp.js";
10
+ import * as types from "../../types/primitives.js";
10
11
  import * as components from "../components/index.js";
11
12
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
12
13
 
13
14
  /**
14
- * Filters to target facilities with this status.
15
+ * Filters to target facilities with this status. `not_approved` matches every status other than `Approved`, including no status.
15
16
  */
16
17
  export const GetVendorTargetFacilitiesQueryParamStatus = {
17
18
  Pending: "pending",
18
19
  Approved: "approved",
19
20
  Denied: "denied",
21
+ NotApproved: "not_approved",
20
22
  } as const;
21
23
  /**
22
- * Filters to target facilities with this status.
24
+ * Filters to target facilities with this status. `not_approved` matches every status other than `Approved`, including no status.
23
25
  */
24
26
  export type GetVendorTargetFacilitiesQueryParamStatus = ClosedEnum<
25
27
  typeof GetVendorTargetFacilitiesQueryParamStatus
26
28
  >;
27
29
 
28
30
  /**
29
- * The field to sort results by. Defaults to `facility_name`.
31
+ * When `true`, leaves out target facilities whose facility is not active.
32
+ */
33
+ export const ActiveFacilitiesOnly = {
34
+ True: "true",
35
+ False: "false",
36
+ } as const;
37
+ /**
38
+ * When `true`, leaves out target facilities whose facility is not active.
39
+ */
40
+ export type ActiveFacilitiesOnly = ClosedEnum<typeof ActiveFacilitiesOnly>;
41
+
42
+ /**
43
+ * When `true`, the response also includes `status_counts`.
44
+ */
45
+ export const IncludeStatusCounts = {
46
+ True: "true",
47
+ False: "false",
48
+ } as const;
49
+ /**
50
+ * When `true`, the response also includes `status_counts`.
51
+ */
52
+ export type IncludeStatusCounts = ClosedEnum<typeof IncludeStatusCounts>;
53
+
54
+ /**
55
+ * The field to sort results by. Defaults to `facility_name`. `not_approved_first` lists the systems with the most rows that are not approved first, then by system name; within a system it puts the rows that are not approved first, then sorts by facility name. `not_approved_first` ignores `desc`.
30
56
  */
31
57
  export const GetVendorTargetFacilitiesQueryParamSort = {
32
58
  FacilityName: "facility_name",
@@ -34,9 +60,10 @@ export const GetVendorTargetFacilitiesQueryParamSort = {
34
60
  Status: "status",
35
61
  QuestionsAnswered: "questions_answered",
36
62
  DateCreated: "date_created",
63
+ NotApprovedFirst: "not_approved_first",
37
64
  } as const;
38
65
  /**
39
- * The field to sort results by. Defaults to `facility_name`.
66
+ * The field to sort results by. Defaults to `facility_name`. `not_approved_first` lists the systems with the most rows that are not approved first, then by system name; within a system it puts the rows that are not approved first, then sorts by facility name. `not_approved_first` ignores `desc`.
40
67
  */
41
68
  export type GetVendorTargetFacilitiesQueryParamSort = ClosedEnum<
42
69
  typeof GetVendorTargetFacilitiesQueryParamSort
@@ -62,13 +89,25 @@ export type GetVendorTargetFacilitiesRequest = {
62
89
  */
63
90
  systemNameLike?: string | undefined;
64
91
  /**
65
- * Search across facility name and system name.
92
+ * Search across facility name, street address, city, state (code or full name), ZIP code, and system name.
66
93
  */
67
94
  searchLike?: string | undefined;
68
95
  /**
69
- * Filters to target facilities with this status.
96
+ * Filters to target facilities with this status. `not_approved` matches every status other than `Approved`, including no status.
70
97
  */
71
98
  status?: GetVendorTargetFacilitiesQueryParamStatus | undefined;
99
+ /**
100
+ * Filters to the target facility row of this facility.
101
+ */
102
+ facilityId?: number | undefined;
103
+ /**
104
+ * When `true`, leaves out target facilities whose facility is not active.
105
+ */
106
+ activeFacilitiesOnly?: ActiveFacilitiesOnly | undefined;
107
+ /**
108
+ * When `true`, the response also includes `status_counts`.
109
+ */
110
+ includeStatusCounts?: IncludeStatusCounts | undefined;
72
111
  /**
73
112
  * The page number of results to return, starting at 1.
74
113
  */
@@ -78,7 +117,7 @@ export type GetVendorTargetFacilitiesRequest = {
78
117
  */
79
118
  itemsPerPage?: number | undefined;
80
119
  /**
81
- * The field to sort results by. Defaults to `facility_name`.
120
+ * The field to sort results by. Defaults to `facility_name`. `not_approved_first` lists the systems with the most rows that are not approved first, then by system name; within a system it puts the rows that are not approved first, then sorts by facility name. `not_approved_first` ignores `desc`.
82
121
  */
83
122
  sort?: GetVendorTargetFacilitiesQueryParamSort | undefined;
84
123
  /**
@@ -100,6 +139,10 @@ export type GetVendorTargetFacilitiesGetVendorTargetFacilitiesOk = {
100
139
  */
101
140
  pager: components.Pager;
102
141
  items: Array<components.VendorTargetFacility>;
142
+ /**
143
+ * How many of a vendor's target facility rows are approved and not approved. Returned when you pass `include_status_counts=true`.
144
+ */
145
+ statusCounts?: components.VendorTargetFacilityStatusCounts | undefined;
103
146
  };
104
147
 
105
148
  export type GetVendorTargetFacilitiesResponse = {
@@ -111,6 +154,16 @@ export const GetVendorTargetFacilitiesQueryParamStatus$outboundSchema:
111
154
  z.ZodNativeEnum<typeof GetVendorTargetFacilitiesQueryParamStatus> = z
112
155
  .nativeEnum(GetVendorTargetFacilitiesQueryParamStatus);
113
156
 
157
+ /** @internal */
158
+ export const ActiveFacilitiesOnly$outboundSchema: z.ZodNativeEnum<
159
+ typeof ActiveFacilitiesOnly
160
+ > = z.nativeEnum(ActiveFacilitiesOnly);
161
+
162
+ /** @internal */
163
+ export const IncludeStatusCounts$outboundSchema: z.ZodNativeEnum<
164
+ typeof IncludeStatusCounts
165
+ > = z.nativeEnum(IncludeStatusCounts);
166
+
114
167
  /** @internal */
115
168
  export const GetVendorTargetFacilitiesQueryParamSort$outboundSchema:
116
169
  z.ZodNativeEnum<typeof GetVendorTargetFacilitiesQueryParamSort> = z
@@ -123,6 +176,9 @@ export type GetVendorTargetFacilitiesRequest$Outbound = {
123
176
  system_name_like?: string | undefined;
124
177
  search_like?: string | undefined;
125
178
  status?: string | undefined;
179
+ facility_id?: number | undefined;
180
+ active_facilities_only?: string | undefined;
181
+ include_status_counts?: string | undefined;
126
182
  page?: number | undefined;
127
183
  items_per_page?: number | undefined;
128
184
  sort?: string | undefined;
@@ -141,6 +197,9 @@ export const GetVendorTargetFacilitiesRequest$outboundSchema: z.ZodType<
141
197
  systemNameLike: z.string().optional(),
142
198
  searchLike: z.string().optional(),
143
199
  status: GetVendorTargetFacilitiesQueryParamStatus$outboundSchema.optional(),
200
+ facilityId: z.number().int().optional(),
201
+ activeFacilitiesOnly: ActiveFacilitiesOnly$outboundSchema.optional(),
202
+ includeStatusCounts: IncludeStatusCounts$outboundSchema.optional(),
144
203
  page: z.number().int().optional(),
145
204
  itemsPerPage: z.number().int().optional(),
146
205
  sort: GetVendorTargetFacilitiesQueryParamSort$outboundSchema.optional(),
@@ -152,6 +211,9 @@ export const GetVendorTargetFacilitiesRequest$outboundSchema: z.ZodType<
152
211
  facilityNameLike: "facility_name_like",
153
212
  systemNameLike: "system_name_like",
154
213
  searchLike: "search_like",
214
+ facilityId: "facility_id",
215
+ activeFacilitiesOnly: "active_facilities_only",
216
+ includeStatusCounts: "include_status_counts",
155
217
  itemsPerPage: "items_per_page",
156
218
  });
157
219
  });
@@ -175,6 +237,13 @@ export const GetVendorTargetFacilitiesGetVendorTargetFacilitiesOk$inboundSchema:
175
237
  > = z.object({
176
238
  pager: components.Pager$inboundSchema,
177
239
  items: z.array(components.VendorTargetFacility$inboundSchema),
240
+ status_counts: types.optional(
241
+ components.VendorTargetFacilityStatusCounts$inboundSchema,
242
+ ),
243
+ }).transform((v) => {
244
+ return remap$(v, {
245
+ "status_counts": "statusCounts",
246
+ });
178
247
  });
179
248
 
180
249
  export function getVendorTargetFacilitiesGetVendorTargetFacilitiesOkFromJSON(
@@ -79,6 +79,9 @@ export function buildVendorsGetVendorTargetFacilitiesQuery(
79
79
  systemNameLike: request.systemNameLike,
80
80
  searchLike: request.searchLike,
81
81
  status: request.status,
82
+ facilityId: request.facilityId,
83
+ activeFacilitiesOnly: request.activeFacilitiesOnly,
84
+ includeStatusCounts: request.includeStatusCounts,
82
85
  page: request.page,
83
86
  itemsPerPage: request.itemsPerPage,
84
87
  sort: request.sort,
@@ -129,6 +132,9 @@ export function buildVendorsGetVendorTargetFacilitiesInfiniteQuery(
129
132
  systemNameLike: request.systemNameLike,
130
133
  searchLike: request.searchLike,
131
134
  status: request.status,
135
+ facilityId: request.facilityId,
136
+ activeFacilitiesOnly: request.activeFacilitiesOnly,
137
+ includeStatusCounts: request.includeStatusCounts,
132
138
  page: request.page,
133
139
  itemsPerPage: request.itemsPerPage,
134
140
  sort: request.sort,
@@ -177,6 +183,9 @@ export function queryKeyVendorsGetVendorTargetFacilities(
177
183
  systemNameLike?: string | undefined;
178
184
  searchLike?: string | undefined;
179
185
  status?: operations.GetVendorTargetFacilitiesQueryParamStatus | undefined;
186
+ facilityId?: number | undefined;
187
+ activeFacilitiesOnly?: operations.ActiveFacilitiesOnly | undefined;
188
+ includeStatusCounts?: operations.IncludeStatusCounts | undefined;
180
189
  page?: number | undefined;
181
190
  itemsPerPage?: number | undefined;
182
191
  sort?: operations.GetVendorTargetFacilitiesQueryParamSort | undefined;
@@ -200,6 +209,9 @@ export function queryKeyVendorsGetVendorTargetFacilitiesInfinite(
200
209
  systemNameLike?: string | undefined;
201
210
  searchLike?: string | undefined;
202
211
  status?: operations.GetVendorTargetFacilitiesQueryParamStatus | undefined;
212
+ facilityId?: number | undefined;
213
+ activeFacilitiesOnly?: operations.ActiveFacilitiesOnly | undefined;
214
+ includeStatusCounts?: operations.IncludeStatusCounts | undefined;
203
215
  page?: number | undefined;
204
216
  itemsPerPage?: number | undefined;
205
217
  sort?: operations.GetVendorTargetFacilitiesQueryParamSort | undefined;