@greensecurity/javascript-sdk 0.44.0-beta.17 → 0.44.0-beta.19

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 (187) hide show
  1. package/README.md +9 -0
  2. package/dist/commonjs/__tests__/organizations.test.js +57 -0
  3. package/dist/commonjs/__tests__/organizations.test.js.map +1 -1
  4. package/dist/commonjs/__tests__/zones.test.js +9 -37
  5. package/dist/commonjs/__tests__/zones.test.js.map +1 -1
  6. package/dist/commonjs/funcs/organizationsDownloadFacilityVendorsExport.d.ts +22 -0
  7. package/dist/commonjs/funcs/organizationsDownloadFacilityVendorsExport.d.ts.map +1 -0
  8. package/dist/commonjs/funcs/organizationsDownloadFacilityVendorsExport.js +132 -0
  9. package/dist/commonjs/funcs/organizationsDownloadFacilityVendorsExport.js.map +1 -0
  10. package/dist/commonjs/funcs/organizationsExportFacilityVendors.d.ts +34 -0
  11. package/dist/commonjs/funcs/organizationsExportFacilityVendors.d.ts.map +1 -0
  12. package/dist/commonjs/funcs/organizationsExportFacilityVendors.js +148 -0
  13. package/dist/commonjs/funcs/organizationsExportFacilityVendors.js.map +1 -0
  14. package/dist/commonjs/funcs/organizationsGetFacilityVendorsExportStatus.d.ts +22 -0
  15. package/dist/commonjs/funcs/organizationsGetFacilityVendorsExportStatus.d.ts.map +1 -0
  16. package/dist/commonjs/funcs/organizationsGetFacilityVendorsExportStatus.js +131 -0
  17. package/dist/commonjs/funcs/organizationsGetFacilityVendorsExportStatus.js.map +1 -0
  18. package/dist/commonjs/lib/config.d.ts +3 -3
  19. package/dist/commonjs/lib/config.js +3 -3
  20. package/dist/commonjs/lib/sdks.d.ts.map +1 -1
  21. package/dist/commonjs/lib/sdks.js +37 -12
  22. package/dist/commonjs/lib/sdks.js.map +1 -1
  23. package/dist/commonjs/models/components/csvexportstatusresponse.d.ts +43 -0
  24. package/dist/commonjs/models/components/csvexportstatusresponse.d.ts.map +1 -0
  25. package/dist/commonjs/models/components/csvexportstatusresponse.js +65 -0
  26. package/dist/commonjs/models/components/csvexportstatusresponse.js.map +1 -0
  27. package/dist/commonjs/models/components/index.d.ts +1 -0
  28. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  29. package/dist/commonjs/models/components/index.js +1 -0
  30. package/dist/commonjs/models/components/index.js.map +1 -1
  31. package/dist/commonjs/models/components/productvariant.d.ts +10 -0
  32. package/dist/commonjs/models/components/productvariant.d.ts.map +1 -1
  33. package/dist/commonjs/models/components/productvariant.js +4 -0
  34. package/dist/commonjs/models/components/productvariant.js.map +1 -1
  35. package/dist/commonjs/models/operations/downloadfacilityvendorsexport.d.ts +47 -0
  36. package/dist/commonjs/models/operations/downloadfacilityvendorsexport.d.ts.map +1 -0
  37. package/dist/commonjs/models/operations/downloadfacilityvendorsexport.js +80 -0
  38. package/dist/commonjs/models/operations/downloadfacilityvendorsexport.js.map +1 -0
  39. package/dist/commonjs/models/operations/exportfacilityvendors.d.ts +118 -0
  40. package/dist/commonjs/models/operations/exportfacilityvendors.d.ts.map +1 -0
  41. package/dist/commonjs/models/operations/exportfacilityvendors.js +115 -0
  42. package/dist/commonjs/models/operations/exportfacilityvendors.js.map +1 -0
  43. package/dist/commonjs/models/operations/getfacilityvendorsexportstatus.d.ts +20 -0
  44. package/dist/commonjs/models/operations/getfacilityvendorsexportstatus.d.ts.map +1 -0
  45. package/dist/commonjs/models/operations/getfacilityvendorsexportstatus.js +55 -0
  46. package/dist/commonjs/models/operations/getfacilityvendorsexportstatus.js.map +1 -0
  47. package/dist/commonjs/models/operations/index.d.ts +3 -0
  48. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  49. package/dist/commonjs/models/operations/index.js +3 -0
  50. package/dist/commonjs/models/operations/index.js.map +1 -1
  51. package/dist/commonjs/react-query/index.d.ts +3 -0
  52. package/dist/commonjs/react-query/index.d.ts.map +1 -1
  53. package/dist/commonjs/react-query/index.js +3 -0
  54. package/dist/commonjs/react-query/index.js.map +1 -1
  55. package/dist/commonjs/react-query/organizationsDownloadFacilityVendorsExport.core.d.ts +12 -0
  56. package/dist/commonjs/react-query/organizationsDownloadFacilityVendorsExport.core.d.ts.map +1 -0
  57. package/dist/commonjs/react-query/organizationsDownloadFacilityVendorsExport.core.js +40 -0
  58. package/dist/commonjs/react-query/organizationsDownloadFacilityVendorsExport.core.js.map +1 -0
  59. package/dist/commonjs/react-query/organizationsDownloadFacilityVendorsExport.d.ts +33 -0
  60. package/dist/commonjs/react-query/organizationsDownloadFacilityVendorsExport.d.ts.map +1 -0
  61. package/dist/commonjs/react-query/organizationsDownloadFacilityVendorsExport.js +73 -0
  62. package/dist/commonjs/react-query/organizationsDownloadFacilityVendorsExport.js.map +1 -0
  63. package/dist/commonjs/react-query/organizationsExportFacilityVendors.core.d.ts +19 -0
  64. package/dist/commonjs/react-query/organizationsExportFacilityVendors.core.d.ts.map +1 -0
  65. package/dist/commonjs/react-query/organizationsExportFacilityVendors.core.js +47 -0
  66. package/dist/commonjs/react-query/organizationsExportFacilityVendors.core.js.map +1 -0
  67. package/dist/commonjs/react-query/organizationsExportFacilityVendors.d.ts +77 -0
  68. package/dist/commonjs/react-query/organizationsExportFacilityVendors.d.ts.map +1 -0
  69. package/dist/commonjs/react-query/organizationsExportFacilityVendors.js +97 -0
  70. package/dist/commonjs/react-query/organizationsExportFacilityVendors.js.map +1 -0
  71. package/dist/commonjs/react-query/organizationsGetFacilityVendorsExportStatus.core.d.ts +13 -0
  72. package/dist/commonjs/react-query/organizationsGetFacilityVendorsExportStatus.core.d.ts.map +1 -0
  73. package/dist/commonjs/react-query/organizationsGetFacilityVendorsExportStatus.core.js +40 -0
  74. package/dist/commonjs/react-query/organizationsGetFacilityVendorsExportStatus.core.js.map +1 -0
  75. package/dist/commonjs/react-query/organizationsGetFacilityVendorsExportStatus.d.ts +31 -0
  76. package/dist/commonjs/react-query/organizationsGetFacilityVendorsExportStatus.d.ts.map +1 -0
  77. package/dist/commonjs/react-query/organizationsGetFacilityVendorsExportStatus.js +71 -0
  78. package/dist/commonjs/react-query/organizationsGetFacilityVendorsExportStatus.js.map +1 -0
  79. package/dist/commonjs/sdk/organizations.d.ts +38 -0
  80. package/dist/commonjs/sdk/organizations.d.ts.map +1 -1
  81. package/dist/commonjs/sdk/organizations.js +47 -0
  82. package/dist/commonjs/sdk/organizations.js.map +1 -1
  83. package/dist/esm/__tests__/organizations.test.js +57 -0
  84. package/dist/esm/__tests__/organizations.test.js.map +1 -1
  85. package/dist/esm/__tests__/zones.test.js +9 -37
  86. package/dist/esm/__tests__/zones.test.js.map +1 -1
  87. package/dist/esm/funcs/organizationsDownloadFacilityVendorsExport.d.ts +22 -0
  88. package/dist/esm/funcs/organizationsDownloadFacilityVendorsExport.d.ts.map +1 -0
  89. package/dist/esm/funcs/organizationsDownloadFacilityVendorsExport.js +96 -0
  90. package/dist/esm/funcs/organizationsDownloadFacilityVendorsExport.js.map +1 -0
  91. package/dist/esm/funcs/organizationsExportFacilityVendors.d.ts +34 -0
  92. package/dist/esm/funcs/organizationsExportFacilityVendors.d.ts.map +1 -0
  93. package/dist/esm/funcs/organizationsExportFacilityVendors.js +112 -0
  94. package/dist/esm/funcs/organizationsExportFacilityVendors.js.map +1 -0
  95. package/dist/esm/funcs/organizationsGetFacilityVendorsExportStatus.d.ts +22 -0
  96. package/dist/esm/funcs/organizationsGetFacilityVendorsExportStatus.d.ts.map +1 -0
  97. package/dist/esm/funcs/organizationsGetFacilityVendorsExportStatus.js +95 -0
  98. package/dist/esm/funcs/organizationsGetFacilityVendorsExportStatus.js.map +1 -0
  99. package/dist/esm/lib/config.d.ts +3 -3
  100. package/dist/esm/lib/config.js +3 -3
  101. package/dist/esm/lib/sdks.d.ts.map +1 -1
  102. package/dist/esm/lib/sdks.js +37 -12
  103. package/dist/esm/lib/sdks.js.map +1 -1
  104. package/dist/esm/models/components/csvexportstatusresponse.d.ts +43 -0
  105. package/dist/esm/models/components/csvexportstatusresponse.d.ts.map +1 -0
  106. package/dist/esm/models/components/csvexportstatusresponse.js +28 -0
  107. package/dist/esm/models/components/csvexportstatusresponse.js.map +1 -0
  108. package/dist/esm/models/components/index.d.ts +1 -0
  109. package/dist/esm/models/components/index.d.ts.map +1 -1
  110. package/dist/esm/models/components/index.js +1 -0
  111. package/dist/esm/models/components/index.js.map +1 -1
  112. package/dist/esm/models/components/productvariant.d.ts +10 -0
  113. package/dist/esm/models/components/productvariant.d.ts.map +1 -1
  114. package/dist/esm/models/components/productvariant.js +4 -0
  115. package/dist/esm/models/components/productvariant.js.map +1 -1
  116. package/dist/esm/models/operations/downloadfacilityvendorsexport.d.ts +47 -0
  117. package/dist/esm/models/operations/downloadfacilityvendorsexport.d.ts.map +1 -0
  118. package/dist/esm/models/operations/downloadfacilityvendorsexport.js +41 -0
  119. package/dist/esm/models/operations/downloadfacilityvendorsexport.js.map +1 -0
  120. package/dist/esm/models/operations/exportfacilityvendors.d.ts +118 -0
  121. package/dist/esm/models/operations/exportfacilityvendors.d.ts.map +1 -0
  122. package/dist/esm/models/operations/exportfacilityvendors.js +76 -0
  123. package/dist/esm/models/operations/exportfacilityvendors.js.map +1 -0
  124. package/dist/esm/models/operations/getfacilityvendorsexportstatus.d.ts +20 -0
  125. package/dist/esm/models/operations/getfacilityvendorsexportstatus.d.ts.map +1 -0
  126. package/dist/esm/models/operations/getfacilityvendorsexportstatus.js +18 -0
  127. package/dist/esm/models/operations/getfacilityvendorsexportstatus.js.map +1 -0
  128. package/dist/esm/models/operations/index.d.ts +3 -0
  129. package/dist/esm/models/operations/index.d.ts.map +1 -1
  130. package/dist/esm/models/operations/index.js +3 -0
  131. package/dist/esm/models/operations/index.js.map +1 -1
  132. package/dist/esm/react-query/index.d.ts +3 -0
  133. package/dist/esm/react-query/index.d.ts.map +1 -1
  134. package/dist/esm/react-query/index.js +3 -0
  135. package/dist/esm/react-query/index.js.map +1 -1
  136. package/dist/esm/react-query/organizationsDownloadFacilityVendorsExport.core.d.ts +12 -0
  137. package/dist/esm/react-query/organizationsDownloadFacilityVendorsExport.core.d.ts.map +1 -0
  138. package/dist/esm/react-query/organizationsDownloadFacilityVendorsExport.core.js +35 -0
  139. package/dist/esm/react-query/organizationsDownloadFacilityVendorsExport.core.js.map +1 -0
  140. package/dist/esm/react-query/organizationsDownloadFacilityVendorsExport.d.ts +33 -0
  141. package/dist/esm/react-query/organizationsDownloadFacilityVendorsExport.d.ts.map +1 -0
  142. package/dist/esm/react-query/organizationsDownloadFacilityVendorsExport.js +63 -0
  143. package/dist/esm/react-query/organizationsDownloadFacilityVendorsExport.js.map +1 -0
  144. package/dist/esm/react-query/organizationsExportFacilityVendors.core.d.ts +19 -0
  145. package/dist/esm/react-query/organizationsExportFacilityVendors.core.d.ts.map +1 -0
  146. package/dist/esm/react-query/organizationsExportFacilityVendors.core.js +42 -0
  147. package/dist/esm/react-query/organizationsExportFacilityVendors.core.js.map +1 -0
  148. package/dist/esm/react-query/organizationsExportFacilityVendors.d.ts +77 -0
  149. package/dist/esm/react-query/organizationsExportFacilityVendors.d.ts.map +1 -0
  150. package/dist/esm/react-query/organizationsExportFacilityVendors.js +87 -0
  151. package/dist/esm/react-query/organizationsExportFacilityVendors.js.map +1 -0
  152. package/dist/esm/react-query/organizationsGetFacilityVendorsExportStatus.core.d.ts +13 -0
  153. package/dist/esm/react-query/organizationsGetFacilityVendorsExportStatus.core.d.ts.map +1 -0
  154. package/dist/esm/react-query/organizationsGetFacilityVendorsExportStatus.core.js +35 -0
  155. package/dist/esm/react-query/organizationsGetFacilityVendorsExportStatus.core.js.map +1 -0
  156. package/dist/esm/react-query/organizationsGetFacilityVendorsExportStatus.d.ts +31 -0
  157. package/dist/esm/react-query/organizationsGetFacilityVendorsExportStatus.d.ts.map +1 -0
  158. package/dist/esm/react-query/organizationsGetFacilityVendorsExportStatus.js +61 -0
  159. package/dist/esm/react-query/organizationsGetFacilityVendorsExportStatus.js.map +1 -0
  160. package/dist/esm/sdk/organizations.d.ts +38 -0
  161. package/dist/esm/sdk/organizations.d.ts.map +1 -1
  162. package/dist/esm/sdk/organizations.js +47 -0
  163. package/dist/esm/sdk/organizations.js.map +1 -1
  164. package/jsr.json +1 -1
  165. package/package.json +1 -1
  166. package/src/__tests__/organizations.test.ts +66 -0
  167. package/src/__tests__/zones.test.ts +9 -37
  168. package/src/funcs/organizationsDownloadFacilityVendorsExport.ts +202 -0
  169. package/src/funcs/organizationsExportFacilityVendors.ts +202 -0
  170. package/src/funcs/organizationsGetFacilityVendorsExportStatus.ts +188 -0
  171. package/src/lib/config.ts +3 -3
  172. package/src/lib/sdks.ts +41 -13
  173. package/src/models/components/csvexportstatusresponse.ts +79 -0
  174. package/src/models/components/index.ts +1 -0
  175. package/src/models/components/productvariant.ts +10 -0
  176. package/src/models/operations/downloadfacilityvendorsexport.ts +124 -0
  177. package/src/models/operations/exportfacilityvendors.ts +206 -0
  178. package/src/models/operations/getfacilityvendorsexportstatus.ts +47 -0
  179. package/src/models/operations/index.ts +3 -0
  180. package/src/react-query/index.ts +3 -0
  181. package/src/react-query/organizationsDownloadFacilityVendorsExport.core.ts +84 -0
  182. package/src/react-query/organizationsDownloadFacilityVendorsExport.ts +155 -0
  183. package/src/react-query/organizationsExportFacilityVendors.core.ts +94 -0
  184. package/src/react-query/organizationsExportFacilityVendors.ts +200 -0
  185. package/src/react-query/organizationsGetFacilityVendorsExportStatus.core.ts +84 -0
  186. package/src/react-query/organizationsGetFacilityVendorsExportStatus.ts +153 -0
  187. package/src/sdk/organizations.ts +71 -0
@@ -0,0 +1,33 @@
1
+ import { InvalidateQueryFilters, QueryClient, UseQueryResult, UseSuspenseQueryResult } from "@tanstack/react-query";
2
+ import { GreenSecurityError } from "../models/errors/greensecurityerror.js";
3
+ import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
4
+ import * as errors from "../models/errors/index.js";
5
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
6
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
7
+ import * as operations from "../models/operations/index.js";
8
+ import { QueryHookOptions, SuspenseQueryHookOptions, TupleToPrefixes } from "./_types.js";
9
+ import { buildOrganizationsDownloadFacilityVendorsExportQuery, OrganizationsDownloadFacilityVendorsExportQueryData, prefetchOrganizationsDownloadFacilityVendorsExport, queryKeyOrganizationsDownloadFacilityVendorsExport } from "./organizationsDownloadFacilityVendorsExport.core.js";
10
+ export { buildOrganizationsDownloadFacilityVendorsExportQuery, type OrganizationsDownloadFacilityVendorsExportQueryData, prefetchOrganizationsDownloadFacilityVendorsExport, queryKeyOrganizationsDownloadFacilityVendorsExport, };
11
+ export type OrganizationsDownloadFacilityVendorsExportQueryError = errors.ApiErrorResponse | GreenSecurityError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError;
12
+ /**
13
+ * Download facility vendors CSV
14
+ *
15
+ * @remarks
16
+ * Returns the exported facility vendors CSV via a 302 redirect to a short-lived
17
+ * presigned S3 URL. If the export is still being generated, returns 202 with a JSON
18
+ * `{ ready: false }` payload.
19
+ */
20
+ export declare function useOrganizationsDownloadFacilityVendorsExport(request: operations.DownloadFacilityVendorsExportRequest, options?: QueryHookOptions<OrganizationsDownloadFacilityVendorsExportQueryData, OrganizationsDownloadFacilityVendorsExportQueryError>): UseQueryResult<OrganizationsDownloadFacilityVendorsExportQueryData, OrganizationsDownloadFacilityVendorsExportQueryError>;
21
+ /**
22
+ * Download facility vendors CSV
23
+ *
24
+ * @remarks
25
+ * Returns the exported facility vendors CSV via a 302 redirect to a short-lived
26
+ * presigned S3 URL. If the export is still being generated, returns 202 with a JSON
27
+ * `{ ready: false }` payload.
28
+ */
29
+ export declare function useOrganizationsDownloadFacilityVendorsExportSuspense(request: operations.DownloadFacilityVendorsExportRequest, options?: SuspenseQueryHookOptions<OrganizationsDownloadFacilityVendorsExportQueryData, OrganizationsDownloadFacilityVendorsExportQueryError>): UseSuspenseQueryResult<OrganizationsDownloadFacilityVendorsExportQueryData, OrganizationsDownloadFacilityVendorsExportQueryError>;
30
+ export declare function setOrganizationsDownloadFacilityVendorsExportData(client: QueryClient, queryKeyBase: [id: number, exportId: string], data: OrganizationsDownloadFacilityVendorsExportQueryData): OrganizationsDownloadFacilityVendorsExportQueryData | undefined;
31
+ export declare function invalidateOrganizationsDownloadFacilityVendorsExport(client: QueryClient, queryKeyBase: TupleToPrefixes<[id: number, exportId: string]>, filters?: Omit<InvalidateQueryFilters, "queryKey" | "predicate" | "exact">): Promise<void>;
32
+ export declare function invalidateAllOrganizationsDownloadFacilityVendorsExport(client: QueryClient, filters?: Omit<InvalidateQueryFilters, "queryKey" | "predicate" | "exact">): Promise<void>;
33
+ //# sourceMappingURL=organizationsDownloadFacilityVendorsExport.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organizationsDownloadFacilityVendorsExport.d.ts","sourceRoot":"","sources":["../../../src/react-query/organizationsDownloadFacilityVendorsExport.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,sBAAsB,EACtB,WAAW,EAEX,cAAc,EAEd,sBAAsB,EACvB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAE5D,OAAO,EACL,gBAAgB,EAChB,wBAAwB,EACxB,eAAe,EAChB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,oDAAoD,EACpD,mDAAmD,EACnD,kDAAkD,EAClD,kDAAkD,EACnD,MAAM,sDAAsD,CAAC;AAC9D,OAAO,EACL,oDAAoD,EACpD,KAAK,mDAAmD,EACxD,kDAAkD,EAClD,kDAAkD,GACnD,CAAC;AAEF,MAAM,MAAM,oDAAoD,GAC5D,MAAM,CAAC,gBAAgB,GACvB,kBAAkB,GAClB,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CAAC;AAEvB;;;;;;;GAOG;AACH,wBAAgB,6CAA6C,CAC3D,OAAO,EAAE,UAAU,CAAC,oCAAoC,EACxD,OAAO,CAAC,EAAE,gBAAgB,CACxB,mDAAmD,EACnD,oDAAoD,CACrD,GACA,cAAc,CACf,mDAAmD,EACnD,oDAAoD,CACrD,CAUA;AAED;;;;;;;GAOG;AACH,wBAAgB,qDAAqD,CACnE,OAAO,EAAE,UAAU,CAAC,oCAAoC,EACxD,OAAO,CAAC,EAAE,wBAAwB,CAChC,mDAAmD,EACnD,oDAAoD,CACrD,GACA,sBAAsB,CACvB,mDAAmD,EACnD,oDAAoD,CACrD,CAUA;AAED,wBAAgB,iDAAiD,CAC/D,MAAM,EAAE,WAAW,EACnB,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,EAC5C,IAAI,EAAE,mDAAmD,GACxD,mDAAmD,GAAG,SAAS,CAQjE;AAED,wBAAgB,oDAAoD,CAClE,MAAM,EAAE,WAAW,EACnB,YAAY,EAAE,eAAe,CAAC,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC,EAC7D,OAAO,CAAC,EAAE,IAAI,CAAC,sBAAsB,EAAE,UAAU,GAAG,WAAW,GAAG,OAAO,CAAC,GACzE,OAAO,CAAC,IAAI,CAAC,CAUf;AAED,wBAAgB,uDAAuD,CACrE,MAAM,EAAE,WAAW,EACnB,OAAO,CAAC,EAAE,IAAI,CAAC,sBAAsB,EAAE,UAAU,GAAG,WAAW,GAAG,OAAO,CAAC,GACzE,OAAO,CAAC,IAAI,CAAC,CASf"}
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+ /*
3
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.queryKeyOrganizationsDownloadFacilityVendorsExport = exports.prefetchOrganizationsDownloadFacilityVendorsExport = exports.buildOrganizationsDownloadFacilityVendorsExportQuery = void 0;
7
+ exports.useOrganizationsDownloadFacilityVendorsExport = useOrganizationsDownloadFacilityVendorsExport;
8
+ exports.useOrganizationsDownloadFacilityVendorsExportSuspense = useOrganizationsDownloadFacilityVendorsExportSuspense;
9
+ exports.setOrganizationsDownloadFacilityVendorsExportData = setOrganizationsDownloadFacilityVendorsExportData;
10
+ exports.invalidateOrganizationsDownloadFacilityVendorsExport = invalidateOrganizationsDownloadFacilityVendorsExport;
11
+ exports.invalidateAllOrganizationsDownloadFacilityVendorsExport = invalidateAllOrganizationsDownloadFacilityVendorsExport;
12
+ const react_query_1 = require("@tanstack/react-query");
13
+ const _context_js_1 = require("./_context.js");
14
+ const organizationsDownloadFacilityVendorsExport_core_js_1 = require("./organizationsDownloadFacilityVendorsExport.core.js");
15
+ Object.defineProperty(exports, "buildOrganizationsDownloadFacilityVendorsExportQuery", { enumerable: true, get: function () { return organizationsDownloadFacilityVendorsExport_core_js_1.buildOrganizationsDownloadFacilityVendorsExportQuery; } });
16
+ Object.defineProperty(exports, "prefetchOrganizationsDownloadFacilityVendorsExport", { enumerable: true, get: function () { return organizationsDownloadFacilityVendorsExport_core_js_1.prefetchOrganizationsDownloadFacilityVendorsExport; } });
17
+ Object.defineProperty(exports, "queryKeyOrganizationsDownloadFacilityVendorsExport", { enumerable: true, get: function () { return organizationsDownloadFacilityVendorsExport_core_js_1.queryKeyOrganizationsDownloadFacilityVendorsExport; } });
18
+ /**
19
+ * Download facility vendors CSV
20
+ *
21
+ * @remarks
22
+ * Returns the exported facility vendors CSV via a 302 redirect to a short-lived
23
+ * presigned S3 URL. If the export is still being generated, returns 202 with a JSON
24
+ * `{ ready: false }` payload.
25
+ */
26
+ function useOrganizationsDownloadFacilityVendorsExport(request, options) {
27
+ const client = (0, _context_js_1.useGreenSecurityContext)();
28
+ return (0, react_query_1.useQuery)({
29
+ ...(0, organizationsDownloadFacilityVendorsExport_core_js_1.buildOrganizationsDownloadFacilityVendorsExportQuery)(client, request, options),
30
+ ...options,
31
+ });
32
+ }
33
+ /**
34
+ * Download facility vendors CSV
35
+ *
36
+ * @remarks
37
+ * Returns the exported facility vendors CSV via a 302 redirect to a short-lived
38
+ * presigned S3 URL. If the export is still being generated, returns 202 with a JSON
39
+ * `{ ready: false }` payload.
40
+ */
41
+ function useOrganizationsDownloadFacilityVendorsExportSuspense(request, options) {
42
+ const client = (0, _context_js_1.useGreenSecurityContext)();
43
+ return (0, react_query_1.useSuspenseQuery)({
44
+ ...(0, organizationsDownloadFacilityVendorsExport_core_js_1.buildOrganizationsDownloadFacilityVendorsExportQuery)(client, request, options),
45
+ ...options,
46
+ });
47
+ }
48
+ function setOrganizationsDownloadFacilityVendorsExportData(client, queryKeyBase, data) {
49
+ const key = (0, organizationsDownloadFacilityVendorsExport_core_js_1.queryKeyOrganizationsDownloadFacilityVendorsExport)(...queryKeyBase);
50
+ return client.setQueryData(key, data);
51
+ }
52
+ function invalidateOrganizationsDownloadFacilityVendorsExport(client, queryKeyBase, filters) {
53
+ return client.invalidateQueries({
54
+ ...filters,
55
+ queryKey: [
56
+ "@greensecurity/javascript-sdk",
57
+ "organizations",
58
+ "downloadFacilityVendorsExport",
59
+ ...queryKeyBase,
60
+ ],
61
+ });
62
+ }
63
+ function invalidateAllOrganizationsDownloadFacilityVendorsExport(client, filters) {
64
+ return client.invalidateQueries({
65
+ ...filters,
66
+ queryKey: [
67
+ "@greensecurity/javascript-sdk",
68
+ "organizations",
69
+ "downloadFacilityVendorsExport",
70
+ ],
71
+ });
72
+ }
73
+ //# sourceMappingURL=organizationsDownloadFacilityVendorsExport.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organizationsDownloadFacilityVendorsExport.js","sourceRoot":"","sources":["../../../src/react-query/organizationsDownloadFacilityVendorsExport.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AA4DH,sGAmBC;AAUD,sHAmBC;AAED,8GAYC;AAED,oHAcC;AAED,0HAYC;AAtJD,uDAO+B;AAa/B,+CAAwD;AAMxD,6HAK8D;AAE5D,qIANA,yGAAoD,OAMA;AAEpD,mIANA,uGAAkD,OAMA;AAClD,mIANA,uGAAkD,OAMA;AAcpD;;;;;;;GAOG;AACH,SAAgB,6CAA6C,CAC3D,OAAwD,EACxD,OAGC;IAKD,MAAM,MAAM,GAAG,IAAA,qCAAuB,GAAE,CAAC;IACzC,OAAO,IAAA,sBAAQ,EAAC;QACd,GAAG,IAAA,yGAAoD,EACrD,MAAM,EACN,OAAO,EACP,OAAO,CACR;QACD,GAAG,OAAO;KACX,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;GAOG;AACH,SAAgB,qDAAqD,CACnE,OAAwD,EACxD,OAGC;IAKD,MAAM,MAAM,GAAG,IAAA,qCAAuB,GAAE,CAAC;IACzC,OAAO,IAAA,8BAAgB,EAAC;QACtB,GAAG,IAAA,yGAAoD,EACrD,MAAM,EACN,OAAO,EACP,OAAO,CACR;QACD,GAAG,OAAO;KACX,CAAC,CAAC;AACL,CAAC;AAED,SAAgB,iDAAiD,CAC/D,MAAmB,EACnB,YAA4C,EAC5C,IAAyD;IAEzD,MAAM,GAAG,GAAG,IAAA,uGAAkD,EAC5D,GAAG,YAAY,CAChB,CAAC;IAEF,OAAO,MAAM,CAAC,YAAY,CAExB,GAAG,EAAE,IAAI,CAAC,CAAC;AACf,CAAC;AAED,SAAgB,oDAAoD,CAClE,MAAmB,EACnB,YAA6D,EAC7D,OAA0E;IAE1E,OAAO,MAAM,CAAC,iBAAiB,CAAC;QAC9B,GAAG,OAAO;QACV,QAAQ,EAAE;YACR,+BAA+B;YAC/B,eAAe;YACf,+BAA+B;YAC/B,GAAG,YAAY;SAChB;KACF,CAAC,CAAC;AACL,CAAC;AAED,SAAgB,uDAAuD,CACrE,MAAmB,EACnB,OAA0E;IAE1E,OAAO,MAAM,CAAC,iBAAiB,CAAC;QAC9B,GAAG,OAAO;QACV,QAAQ,EAAE;YACR,+BAA+B;YAC/B,eAAe;YACf,+BAA+B;SAChC;KACF,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { QueryClient, QueryFunctionContext, QueryKey } from "@tanstack/react-query";
2
+ import { GreenSecurityCore } from "../core.js";
3
+ import { RequestOptions } from "../lib/sdks.js";
4
+ import * as operations from "../models/operations/index.js";
5
+ export type OrganizationsExportFacilityVendorsQueryData = operations.ExportFacilityVendorsResponseBody;
6
+ export declare function prefetchOrganizationsExportFacilityVendors(queryClient: QueryClient, client$: GreenSecurityCore, request: operations.ExportFacilityVendorsRequest, options?: RequestOptions): Promise<void>;
7
+ export declare function buildOrganizationsExportFacilityVendorsQuery(client$: GreenSecurityCore, request: operations.ExportFacilityVendorsRequest, options?: RequestOptions): {
8
+ queryKey: QueryKey;
9
+ queryFn: (context: QueryFunctionContext) => Promise<OrganizationsExportFacilityVendorsQueryData>;
10
+ };
11
+ export declare function queryKeyOrganizationsExportFacilityVendors(id: number, parameters: {
12
+ companyId?: number | undefined;
13
+ status?: operations.ExportFacilityVendorsQueryParamStatus | undefined;
14
+ search?: string | undefined;
15
+ sort?: operations.ExportFacilityVendorsQueryParamSort | undefined;
16
+ desc?: operations.QueryParamDesc | undefined;
17
+ itemsPerPage?: number | undefined;
18
+ }): QueryKey;
19
+ //# sourceMappingURL=organizationsExportFacilityVendors.core.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organizationsExportFacilityVendors.core.d.ts","sourceRoot":"","sources":["../../../src/react-query/organizationsExportFacilityVendors.core.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,WAAW,EACX,oBAAoB,EACpB,QAAQ,EACT,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAG/C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAE5D,MAAM,MAAM,2CAA2C,GACrD,UAAU,CAAC,iCAAiC,CAAC;AAE/C,wBAAgB,0CAA0C,CACxD,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,iBAAiB,EAC1B,OAAO,EAAE,UAAU,CAAC,4BAA4B,EAChD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,IAAI,CAAC,CAQf;AAED,wBAAgB,4CAA4C,CAC1D,OAAO,EAAE,iBAAiB,EAC1B,OAAO,EAAE,UAAU,CAAC,4BAA4B,EAChD,OAAO,CAAC,EAAE,cAAc,GACvB;IACD,QAAQ,EAAE,QAAQ,CAAC;IACnB,OAAO,EAAE,CACP,OAAO,EAAE,oBAAoB,KAC1B,OAAO,CAAC,2CAA2C,CAAC,CAAC;CAC3D,CA+BA;AAED,wBAAgB,0CAA0C,CACxD,EAAE,EAAE,MAAM,EACV,UAAU,EAAE;IACV,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,MAAM,CAAC,EAAE,UAAU,CAAC,qCAAqC,GAAG,SAAS,CAAC;IACtE,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,IAAI,CAAC,EAAE,UAAU,CAAC,mCAAmC,GAAG,SAAS,CAAC;IAClE,IAAI,CAAC,EAAE,UAAU,CAAC,cAAc,GAAG,SAAS,CAAC;IAC7C,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACnC,GACA,QAAQ,CAQV"}
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ /*
3
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.prefetchOrganizationsExportFacilityVendors = prefetchOrganizationsExportFacilityVendors;
7
+ exports.buildOrganizationsExportFacilityVendorsQuery = buildOrganizationsExportFacilityVendorsQuery;
8
+ exports.queryKeyOrganizationsExportFacilityVendors = queryKeyOrganizationsExportFacilityVendors;
9
+ const organizationsExportFacilityVendors_js_1 = require("../funcs/organizationsExportFacilityVendors.js");
10
+ const primitives_js_1 = require("../lib/primitives.js");
11
+ const fp_js_1 = require("../types/fp.js");
12
+ function prefetchOrganizationsExportFacilityVendors(queryClient, client$, request, options) {
13
+ return queryClient.prefetchQuery({
14
+ ...buildOrganizationsExportFacilityVendorsQuery(client$, request, options),
15
+ });
16
+ }
17
+ function buildOrganizationsExportFacilityVendorsQuery(client$, request, options) {
18
+ return {
19
+ queryKey: queryKeyOrganizationsExportFacilityVendors(request.id, {
20
+ companyId: request.companyId,
21
+ status: request.status,
22
+ search: request.search,
23
+ sort: request.sort,
24
+ desc: request.desc,
25
+ itemsPerPage: request.itemsPerPage,
26
+ }),
27
+ queryFn: async function organizationsExportFacilityVendorsQueryFn(ctx) {
28
+ const sig = (0, primitives_js_1.combineSignals)(ctx.signal, options?.signal, options?.fetchOptions?.signal);
29
+ const mergedOptions = {
30
+ ...options?.fetchOptions,
31
+ ...options,
32
+ signal: sig,
33
+ };
34
+ return (0, fp_js_1.unwrapAsync)((0, organizationsExportFacilityVendors_js_1.organizationsExportFacilityVendors)(client$, request, mergedOptions));
35
+ },
36
+ };
37
+ }
38
+ function queryKeyOrganizationsExportFacilityVendors(id, parameters) {
39
+ return [
40
+ "@greensecurity/javascript-sdk",
41
+ "organizations",
42
+ "exportFacilityVendors",
43
+ id,
44
+ parameters,
45
+ ];
46
+ }
47
+ //# sourceMappingURL=organizationsExportFacilityVendors.core.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organizationsExportFacilityVendors.core.js","sourceRoot":"","sources":["../../../src/react-query/organizationsExportFacilityVendors.core.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAgBH,gGAaC;AAED,oGAwCC;AAED,gGAkBC;AAnFD,0GAAoG;AACpG,wDAAsD;AAGtD,0CAA6C;AAI7C,SAAgB,0CAA0C,CACxD,WAAwB,EACxB,OAA0B,EAC1B,OAAgD,EAChD,OAAwB;IAExB,OAAO,WAAW,CAAC,aAAa,CAAC;QAC/B,GAAG,4CAA4C,CAC7C,OAAO,EACP,OAAO,EACP,OAAO,CACR;KACF,CAAC,CAAC;AACL,CAAC;AAED,SAAgB,4CAA4C,CAC1D,OAA0B,EAC1B,OAAgD,EAChD,OAAwB;IAOxB,OAAO;QACL,QAAQ,EAAE,0CAA0C,CAAC,OAAO,CAAC,EAAE,EAAE;YAC/D,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,YAAY,EAAE,OAAO,CAAC,YAAY;SACnC,CAAC;QACF,OAAO,EAAE,KAAK,UAAU,yCAAyC,CAC/D,GAAG;YAEH,MAAM,GAAG,GAAG,IAAA,8BAAc,EACxB,GAAG,CAAC,MAAM,EACV,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,YAAY,EAAE,MAAM,CAC9B,CAAC;YACF,MAAM,aAAa,GAAG;gBACpB,GAAG,OAAO,EAAE,YAAY;gBACxB,GAAG,OAAO;gBACV,MAAM,EAAE,GAAG;aACZ,CAAC;YAEF,OAAO,IAAA,mBAAW,EAAC,IAAA,0EAAkC,EACnD,OAAO,EACP,OAAO,EACP,aAAa,CACd,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC;AAED,SAAgB,0CAA0C,CACxD,EAAU,EACV,UAOC;IAED,OAAO;QACL,+BAA+B;QAC/B,eAAe;QACf,uBAAuB;QACvB,EAAE;QACF,UAAU;KACX,CAAC;AACJ,CAAC"}
@@ -0,0 +1,77 @@
1
+ import { InvalidateQueryFilters, QueryClient, UseQueryResult, UseSuspenseQueryResult } from "@tanstack/react-query";
2
+ import { GreenSecurityError } from "../models/errors/greensecurityerror.js";
3
+ import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
4
+ import * as errors from "../models/errors/index.js";
5
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
6
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
7
+ import * as operations from "../models/operations/index.js";
8
+ import { QueryHookOptions, SuspenseQueryHookOptions, TupleToPrefixes } from "./_types.js";
9
+ import { buildOrganizationsExportFacilityVendorsQuery, OrganizationsExportFacilityVendorsQueryData, prefetchOrganizationsExportFacilityVendors, queryKeyOrganizationsExportFacilityVendors } from "./organizationsExportFacilityVendors.core.js";
10
+ export { buildOrganizationsExportFacilityVendorsQuery, type OrganizationsExportFacilityVendorsQueryData, prefetchOrganizationsExportFacilityVendors, queryKeyOrganizationsExportFacilityVendors, };
11
+ export type OrganizationsExportFacilityVendorsQueryError = errors.ApiErrorResponse | GreenSecurityError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError;
12
+ /**
13
+ * Export facility vendors to CSV (async)
14
+ *
15
+ * @remarks
16
+ * Enqueues an asynchronous job to generate a CSV export of the vendors (vendor reps)
17
+ * targeting the given facility, applying the same access scope and filter parameters as
18
+ * the listing endpoint. The CSV contains: Name, Email, one column per company custom field
19
+ * flagged `show_to_vendor` (e.g. Employee ID), Last Visit, and Status.
20
+ *
21
+ * Returns a `status_url` for polling until the export is ready, along with a `download_url`
22
+ * and `status_id`.
23
+ *
24
+ * Access control mirrors the list endpoint:
25
+ * * Regular users — facility must be in the caller's read scope (via
26
+ * `has_facility_access_policy`); company resolved from the session. Out-of-scope or
27
+ * soft-deleted facilities return `404 Facility not found`.
28
+ * * API users — `company_id` required; both the company AND the facility must be
29
+ * activated for the caller's marketplace app via the join-scoped
30
+ * `MarketplaceAppActivation` check.
31
+ */
32
+ export declare function useOrganizationsExportFacilityVendors(request: operations.ExportFacilityVendorsRequest, options?: QueryHookOptions<OrganizationsExportFacilityVendorsQueryData, OrganizationsExportFacilityVendorsQueryError>): UseQueryResult<OrganizationsExportFacilityVendorsQueryData, OrganizationsExportFacilityVendorsQueryError>;
33
+ /**
34
+ * Export facility vendors to CSV (async)
35
+ *
36
+ * @remarks
37
+ * Enqueues an asynchronous job to generate a CSV export of the vendors (vendor reps)
38
+ * targeting the given facility, applying the same access scope and filter parameters as
39
+ * the listing endpoint. The CSV contains: Name, Email, one column per company custom field
40
+ * flagged `show_to_vendor` (e.g. Employee ID), Last Visit, and Status.
41
+ *
42
+ * Returns a `status_url` for polling until the export is ready, along with a `download_url`
43
+ * and `status_id`.
44
+ *
45
+ * Access control mirrors the list endpoint:
46
+ * * Regular users — facility must be in the caller's read scope (via
47
+ * `has_facility_access_policy`); company resolved from the session. Out-of-scope or
48
+ * soft-deleted facilities return `404 Facility not found`.
49
+ * * API users — `company_id` required; both the company AND the facility must be
50
+ * activated for the caller's marketplace app via the join-scoped
51
+ * `MarketplaceAppActivation` check.
52
+ */
53
+ export declare function useOrganizationsExportFacilityVendorsSuspense(request: operations.ExportFacilityVendorsRequest, options?: SuspenseQueryHookOptions<OrganizationsExportFacilityVendorsQueryData, OrganizationsExportFacilityVendorsQueryError>): UseSuspenseQueryResult<OrganizationsExportFacilityVendorsQueryData, OrganizationsExportFacilityVendorsQueryError>;
54
+ export declare function setOrganizationsExportFacilityVendorsData(client: QueryClient, queryKeyBase: [
55
+ id: number,
56
+ parameters: {
57
+ companyId?: number | undefined;
58
+ status?: operations.ExportFacilityVendorsQueryParamStatus | undefined;
59
+ search?: string | undefined;
60
+ sort?: operations.ExportFacilityVendorsQueryParamSort | undefined;
61
+ desc?: operations.QueryParamDesc | undefined;
62
+ itemsPerPage?: number | undefined;
63
+ }
64
+ ], data: OrganizationsExportFacilityVendorsQueryData): OrganizationsExportFacilityVendorsQueryData | undefined;
65
+ export declare function invalidateOrganizationsExportFacilityVendors(client: QueryClient, queryKeyBase: TupleToPrefixes<[
66
+ id: number,
67
+ parameters: {
68
+ companyId?: number | undefined;
69
+ status?: operations.ExportFacilityVendorsQueryParamStatus | undefined;
70
+ search?: string | undefined;
71
+ sort?: operations.ExportFacilityVendorsQueryParamSort | undefined;
72
+ desc?: operations.QueryParamDesc | undefined;
73
+ itemsPerPage?: number | undefined;
74
+ }
75
+ ]>, filters?: Omit<InvalidateQueryFilters, "queryKey" | "predicate" | "exact">): Promise<void>;
76
+ export declare function invalidateAllOrganizationsExportFacilityVendors(client: QueryClient, filters?: Omit<InvalidateQueryFilters, "queryKey" | "predicate" | "exact">): Promise<void>;
77
+ //# sourceMappingURL=organizationsExportFacilityVendors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organizationsExportFacilityVendors.d.ts","sourceRoot":"","sources":["../../../src/react-query/organizationsExportFacilityVendors.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,sBAAsB,EACtB,WAAW,EAEX,cAAc,EAEd,sBAAsB,EACvB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAE5D,OAAO,EACL,gBAAgB,EAChB,wBAAwB,EACxB,eAAe,EAChB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,4CAA4C,EAC5C,2CAA2C,EAC3C,0CAA0C,EAC1C,0CAA0C,EAC3C,MAAM,8CAA8C,CAAC;AACtD,OAAO,EACL,4CAA4C,EAC5C,KAAK,2CAA2C,EAChD,0CAA0C,EAC1C,0CAA0C,GAC3C,CAAC;AAEF,MAAM,MAAM,4CAA4C,GACpD,MAAM,CAAC,gBAAgB,GACvB,kBAAkB,GAClB,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CAAC;AAEvB;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,qCAAqC,CACnD,OAAO,EAAE,UAAU,CAAC,4BAA4B,EAChD,OAAO,CAAC,EAAE,gBAAgB,CACxB,2CAA2C,EAC3C,4CAA4C,CAC7C,GACA,cAAc,CACf,2CAA2C,EAC3C,4CAA4C,CAC7C,CAUA;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,6CAA6C,CAC3D,OAAO,EAAE,UAAU,CAAC,4BAA4B,EAChD,OAAO,CAAC,EAAE,wBAAwB,CAChC,2CAA2C,EAC3C,4CAA4C,CAC7C,GACA,sBAAsB,CACvB,2CAA2C,EAC3C,4CAA4C,CAC7C,CAUA;AAED,wBAAgB,yCAAyC,CACvD,MAAM,EAAE,WAAW,EACnB,YAAY,EAAE;IACZ,EAAE,EAAE,MAAM;IACV,UAAU,EAAE;QACV,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAC/B,MAAM,CAAC,EAAE,UAAU,CAAC,qCAAqC,GAAG,SAAS,CAAC;QACtE,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,EAAE,UAAU,CAAC,mCAAmC,GAAG,SAAS,CAAC;QAClE,IAAI,CAAC,EAAE,UAAU,CAAC,cAAc,GAAG,SAAS,CAAC;QAC7C,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;KACnC;CACF,EACD,IAAI,EAAE,2CAA2C,GAChD,2CAA2C,GAAG,SAAS,CAOzD;AAED,wBAAgB,4CAA4C,CAC1D,MAAM,EAAE,WAAW,EACnB,YAAY,EAAE,eAAe,CAC3B;IACE,EAAE,EAAE,MAAM;IACV,UAAU,EAAE;QACV,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAC/B,MAAM,CAAC,EAAE,UAAU,CAAC,qCAAqC,GAAG,SAAS,CAAC;QACtE,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,EAAE,UAAU,CAAC,mCAAmC,GAAG,SAAS,CAAC;QAClE,IAAI,CAAC,EAAE,UAAU,CAAC,cAAc,GAAG,SAAS,CAAC;QAC7C,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;KACnC;CACF,CACF,EACD,OAAO,CAAC,EAAE,IAAI,CAAC,sBAAsB,EAAE,UAAU,GAAG,WAAW,GAAG,OAAO,CAAC,GACzE,OAAO,CAAC,IAAI,CAAC,CAUf;AAED,wBAAgB,+CAA+C,CAC7D,MAAM,EAAE,WAAW,EACnB,OAAO,CAAC,EAAE,IAAI,CAAC,sBAAsB,EAAE,UAAU,GAAG,WAAW,GAAG,OAAO,CAAC,GACzE,OAAO,CAAC,IAAI,CAAC,CASf"}
@@ -0,0 +1,97 @@
1
+ "use strict";
2
+ /*
3
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.queryKeyOrganizationsExportFacilityVendors = exports.prefetchOrganizationsExportFacilityVendors = exports.buildOrganizationsExportFacilityVendorsQuery = void 0;
7
+ exports.useOrganizationsExportFacilityVendors = useOrganizationsExportFacilityVendors;
8
+ exports.useOrganizationsExportFacilityVendorsSuspense = useOrganizationsExportFacilityVendorsSuspense;
9
+ exports.setOrganizationsExportFacilityVendorsData = setOrganizationsExportFacilityVendorsData;
10
+ exports.invalidateOrganizationsExportFacilityVendors = invalidateOrganizationsExportFacilityVendors;
11
+ exports.invalidateAllOrganizationsExportFacilityVendors = invalidateAllOrganizationsExportFacilityVendors;
12
+ const react_query_1 = require("@tanstack/react-query");
13
+ const _context_js_1 = require("./_context.js");
14
+ const organizationsExportFacilityVendors_core_js_1 = require("./organizationsExportFacilityVendors.core.js");
15
+ Object.defineProperty(exports, "buildOrganizationsExportFacilityVendorsQuery", { enumerable: true, get: function () { return organizationsExportFacilityVendors_core_js_1.buildOrganizationsExportFacilityVendorsQuery; } });
16
+ Object.defineProperty(exports, "prefetchOrganizationsExportFacilityVendors", { enumerable: true, get: function () { return organizationsExportFacilityVendors_core_js_1.prefetchOrganizationsExportFacilityVendors; } });
17
+ Object.defineProperty(exports, "queryKeyOrganizationsExportFacilityVendors", { enumerable: true, get: function () { return organizationsExportFacilityVendors_core_js_1.queryKeyOrganizationsExportFacilityVendors; } });
18
+ /**
19
+ * Export facility vendors to CSV (async)
20
+ *
21
+ * @remarks
22
+ * Enqueues an asynchronous job to generate a CSV export of the vendors (vendor reps)
23
+ * targeting the given facility, applying the same access scope and filter parameters as
24
+ * the listing endpoint. The CSV contains: Name, Email, one column per company custom field
25
+ * flagged `show_to_vendor` (e.g. Employee ID), Last Visit, and Status.
26
+ *
27
+ * Returns a `status_url` for polling until the export is ready, along with a `download_url`
28
+ * and `status_id`.
29
+ *
30
+ * Access control mirrors the list endpoint:
31
+ * * Regular users — facility must be in the caller's read scope (via
32
+ * `has_facility_access_policy`); company resolved from the session. Out-of-scope or
33
+ * soft-deleted facilities return `404 Facility not found`.
34
+ * * API users — `company_id` required; both the company AND the facility must be
35
+ * activated for the caller's marketplace app via the join-scoped
36
+ * `MarketplaceAppActivation` check.
37
+ */
38
+ function useOrganizationsExportFacilityVendors(request, options) {
39
+ const client = (0, _context_js_1.useGreenSecurityContext)();
40
+ return (0, react_query_1.useQuery)({
41
+ ...(0, organizationsExportFacilityVendors_core_js_1.buildOrganizationsExportFacilityVendorsQuery)(client, request, options),
42
+ ...options,
43
+ });
44
+ }
45
+ /**
46
+ * Export facility vendors to CSV (async)
47
+ *
48
+ * @remarks
49
+ * Enqueues an asynchronous job to generate a CSV export of the vendors (vendor reps)
50
+ * targeting the given facility, applying the same access scope and filter parameters as
51
+ * the listing endpoint. The CSV contains: Name, Email, one column per company custom field
52
+ * flagged `show_to_vendor` (e.g. Employee ID), Last Visit, and Status.
53
+ *
54
+ * Returns a `status_url` for polling until the export is ready, along with a `download_url`
55
+ * and `status_id`.
56
+ *
57
+ * Access control mirrors the list endpoint:
58
+ * * Regular users — facility must be in the caller's read scope (via
59
+ * `has_facility_access_policy`); company resolved from the session. Out-of-scope or
60
+ * soft-deleted facilities return `404 Facility not found`.
61
+ * * API users — `company_id` required; both the company AND the facility must be
62
+ * activated for the caller's marketplace app via the join-scoped
63
+ * `MarketplaceAppActivation` check.
64
+ */
65
+ function useOrganizationsExportFacilityVendorsSuspense(request, options) {
66
+ const client = (0, _context_js_1.useGreenSecurityContext)();
67
+ return (0, react_query_1.useSuspenseQuery)({
68
+ ...(0, organizationsExportFacilityVendors_core_js_1.buildOrganizationsExportFacilityVendorsQuery)(client, request, options),
69
+ ...options,
70
+ });
71
+ }
72
+ function setOrganizationsExportFacilityVendorsData(client, queryKeyBase, data) {
73
+ const key = (0, organizationsExportFacilityVendors_core_js_1.queryKeyOrganizationsExportFacilityVendors)(...queryKeyBase);
74
+ return client.setQueryData(key, data);
75
+ }
76
+ function invalidateOrganizationsExportFacilityVendors(client, queryKeyBase, filters) {
77
+ return client.invalidateQueries({
78
+ ...filters,
79
+ queryKey: [
80
+ "@greensecurity/javascript-sdk",
81
+ "organizations",
82
+ "exportFacilityVendors",
83
+ ...queryKeyBase,
84
+ ],
85
+ });
86
+ }
87
+ function invalidateAllOrganizationsExportFacilityVendors(client, filters) {
88
+ return client.invalidateQueries({
89
+ ...filters,
90
+ queryKey: [
91
+ "@greensecurity/javascript-sdk",
92
+ "organizations",
93
+ "exportFacilityVendors",
94
+ ],
95
+ });
96
+ }
97
+ //# sourceMappingURL=organizationsExportFacilityVendors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organizationsExportFacilityVendors.js","sourceRoot":"","sources":["../../../src/react-query/organizationsExportFacilityVendors.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAwEH,sFAmBC;AAsBD,sGAmBC;AAED,8FAqBC;AAED,oGA0BC;AAED,0GAYC;AAnMD,uDAO+B;AAa/B,+CAAwD;AAMxD,6GAKsD;AAEpD,6HANA,yFAA4C,OAMA;AAE5C,2HANA,uFAA0C,OAMA;AAC1C,2HANA,uFAA0C,OAMA;AAc5C;;;;;;;;;;;;;;;;;;;GAmBG;AACH,SAAgB,qCAAqC,CACnD,OAAgD,EAChD,OAGC;IAKD,MAAM,MAAM,GAAG,IAAA,qCAAuB,GAAE,CAAC;IACzC,OAAO,IAAA,sBAAQ,EAAC;QACd,GAAG,IAAA,yFAA4C,EAC7C,MAAM,EACN,OAAO,EACP,OAAO,CACR;QACD,GAAG,OAAO;KACX,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,SAAgB,6CAA6C,CAC3D,OAAgD,EAChD,OAGC;IAKD,MAAM,MAAM,GAAG,IAAA,qCAAuB,GAAE,CAAC;IACzC,OAAO,IAAA,8BAAgB,EAAC;QACtB,GAAG,IAAA,yFAA4C,EAC7C,MAAM,EACN,OAAO,EACP,OAAO,CACR;QACD,GAAG,OAAO;KACX,CAAC,CAAC;AACL,CAAC;AAED,SAAgB,yCAAyC,CACvD,MAAmB,EACnB,YAUC,EACD,IAAiD;IAEjD,MAAM,GAAG,GAAG,IAAA,uFAA0C,EAAC,GAAG,YAAY,CAAC,CAAC;IAExE,OAAO,MAAM,CAAC,YAAY,CACxB,GAAG,EACH,IAAI,CACL,CAAC;AACJ,CAAC;AAED,SAAgB,4CAA4C,CAC1D,MAAmB,EACnB,YAYC,EACD,OAA0E;IAE1E,OAAO,MAAM,CAAC,iBAAiB,CAAC;QAC9B,GAAG,OAAO;QACV,QAAQ,EAAE;YACR,+BAA+B;YAC/B,eAAe;YACf,uBAAuB;YACvB,GAAG,YAAY;SAChB;KACF,CAAC,CAAC;AACL,CAAC;AAED,SAAgB,+CAA+C,CAC7D,MAAmB,EACnB,OAA0E;IAE1E,OAAO,MAAM,CAAC,iBAAiB,CAAC;QAC9B,GAAG,OAAO;QACV,QAAQ,EAAE;YACR,+BAA+B;YAC/B,eAAe;YACf,uBAAuB;SACxB;KACF,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { QueryClient, QueryFunctionContext, QueryKey } from "@tanstack/react-query";
2
+ import { GreenSecurityCore } from "../core.js";
3
+ import { RequestOptions } from "../lib/sdks.js";
4
+ import * as components from "../models/components/index.js";
5
+ import * as operations from "../models/operations/index.js";
6
+ export type OrganizationsGetFacilityVendorsExportStatusQueryData = components.CsvExportStatusResponse;
7
+ export declare function prefetchOrganizationsGetFacilityVendorsExportStatus(queryClient: QueryClient, client$: GreenSecurityCore, request: operations.GetFacilityVendorsExportStatusRequest, options?: RequestOptions): Promise<void>;
8
+ export declare function buildOrganizationsGetFacilityVendorsExportStatusQuery(client$: GreenSecurityCore, request: operations.GetFacilityVendorsExportStatusRequest, options?: RequestOptions): {
9
+ queryKey: QueryKey;
10
+ queryFn: (context: QueryFunctionContext) => Promise<OrganizationsGetFacilityVendorsExportStatusQueryData>;
11
+ };
12
+ export declare function queryKeyOrganizationsGetFacilityVendorsExportStatus(id: number, exportId: string): QueryKey;
13
+ //# sourceMappingURL=organizationsGetFacilityVendorsExportStatus.core.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organizationsGetFacilityVendorsExportStatus.core.d.ts","sourceRoot":"","sources":["../../../src/react-query/organizationsGetFacilityVendorsExportStatus.core.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,WAAW,EACX,oBAAoB,EACpB,QAAQ,EACT,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAG/C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAE5D,MAAM,MAAM,oDAAoD,GAC9D,UAAU,CAAC,uBAAuB,CAAC;AAErC,wBAAgB,mDAAmD,CACjE,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,iBAAiB,EAC1B,OAAO,EAAE,UAAU,CAAC,qCAAqC,EACzD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,IAAI,CAAC,CAQf;AAED,wBAAgB,qDAAqD,CACnE,OAAO,EAAE,iBAAiB,EAC1B,OAAO,EAAE,UAAU,CAAC,qCAAqC,EACzD,OAAO,CAAC,EAAE,cAAc,GACvB;IACD,QAAQ,EAAE,QAAQ,CAAC;IACnB,OAAO,EAAE,CACP,OAAO,EAAE,oBAAoB,KAC1B,OAAO,CAAC,oDAAoD,CAAC,CAAC;CACpE,CA2BA;AAED,wBAAgB,mDAAmD,CACjE,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,MAAM,GACf,QAAQ,CAQV"}
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ /*
3
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.prefetchOrganizationsGetFacilityVendorsExportStatus = prefetchOrganizationsGetFacilityVendorsExportStatus;
7
+ exports.buildOrganizationsGetFacilityVendorsExportStatusQuery = buildOrganizationsGetFacilityVendorsExportStatusQuery;
8
+ exports.queryKeyOrganizationsGetFacilityVendorsExportStatus = queryKeyOrganizationsGetFacilityVendorsExportStatus;
9
+ const organizationsGetFacilityVendorsExportStatus_js_1 = require("../funcs/organizationsGetFacilityVendorsExportStatus.js");
10
+ const primitives_js_1 = require("../lib/primitives.js");
11
+ const fp_js_1 = require("../types/fp.js");
12
+ function prefetchOrganizationsGetFacilityVendorsExportStatus(queryClient, client$, request, options) {
13
+ return queryClient.prefetchQuery({
14
+ ...buildOrganizationsGetFacilityVendorsExportStatusQuery(client$, request, options),
15
+ });
16
+ }
17
+ function buildOrganizationsGetFacilityVendorsExportStatusQuery(client$, request, options) {
18
+ return {
19
+ queryKey: queryKeyOrganizationsGetFacilityVendorsExportStatus(request.id, request.exportId),
20
+ queryFn: async function organizationsGetFacilityVendorsExportStatusQueryFn(ctx) {
21
+ const sig = (0, primitives_js_1.combineSignals)(ctx.signal, options?.signal, options?.fetchOptions?.signal);
22
+ const mergedOptions = {
23
+ ...options?.fetchOptions,
24
+ ...options,
25
+ signal: sig,
26
+ };
27
+ return (0, fp_js_1.unwrapAsync)((0, organizationsGetFacilityVendorsExportStatus_js_1.organizationsGetFacilityVendorsExportStatus)(client$, request, mergedOptions));
28
+ },
29
+ };
30
+ }
31
+ function queryKeyOrganizationsGetFacilityVendorsExportStatus(id, exportId) {
32
+ return [
33
+ "@greensecurity/javascript-sdk",
34
+ "organizations",
35
+ "getFacilityVendorsExportStatus",
36
+ id,
37
+ exportId,
38
+ ];
39
+ }
40
+ //# sourceMappingURL=organizationsGetFacilityVendorsExportStatus.core.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organizationsGetFacilityVendorsExportStatus.core.js","sourceRoot":"","sources":["../../../src/react-query/organizationsGetFacilityVendorsExportStatus.core.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAiBH,kHAaC;AAED,sHAoCC;AAED,kHAWC;AAzED,4HAAsH;AACtH,wDAAsD;AAItD,0CAA6C;AAI7C,SAAgB,mDAAmD,CACjE,WAAwB,EACxB,OAA0B,EAC1B,OAAyD,EACzD,OAAwB;IAExB,OAAO,WAAW,CAAC,aAAa,CAAC;QAC/B,GAAG,qDAAqD,CACtD,OAAO,EACP,OAAO,EACP,OAAO,CACR;KACF,CAAC,CAAC;AACL,CAAC;AAED,SAAgB,qDAAqD,CACnE,OAA0B,EAC1B,OAAyD,EACzD,OAAwB;IAOxB,OAAO;QACL,QAAQ,EAAE,mDAAmD,CAC3D,OAAO,CAAC,EAAE,EACV,OAAO,CAAC,QAAQ,CACjB;QACD,OAAO,EAAE,KAAK,UAAU,kDAAkD,CACxE,GAAG;YAEH,MAAM,GAAG,GAAG,IAAA,8BAAc,EACxB,GAAG,CAAC,MAAM,EACV,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,YAAY,EAAE,MAAM,CAC9B,CAAC;YACF,MAAM,aAAa,GAAG;gBACpB,GAAG,OAAO,EAAE,YAAY;gBACxB,GAAG,OAAO;gBACV,MAAM,EAAE,GAAG;aACZ,CAAC;YAEF,OAAO,IAAA,mBAAW,EAAC,IAAA,4FAA2C,EAC5D,OAAO,EACP,OAAO,EACP,aAAa,CACd,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC;AAED,SAAgB,mDAAmD,CACjE,EAAU,EACV,QAAgB;IAEhB,OAAO;QACL,+BAA+B;QAC/B,eAAe;QACf,gCAAgC;QAChC,EAAE;QACF,QAAQ;KACT,CAAC;AACJ,CAAC"}
@@ -0,0 +1,31 @@
1
+ import { InvalidateQueryFilters, QueryClient, UseQueryResult, UseSuspenseQueryResult } from "@tanstack/react-query";
2
+ import { GreenSecurityError } from "../models/errors/greensecurityerror.js";
3
+ import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
4
+ import * as errors from "../models/errors/index.js";
5
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
6
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
7
+ import * as operations from "../models/operations/index.js";
8
+ import { QueryHookOptions, SuspenseQueryHookOptions, TupleToPrefixes } from "./_types.js";
9
+ import { buildOrganizationsGetFacilityVendorsExportStatusQuery, OrganizationsGetFacilityVendorsExportStatusQueryData, prefetchOrganizationsGetFacilityVendorsExportStatus, queryKeyOrganizationsGetFacilityVendorsExportStatus } from "./organizationsGetFacilityVendorsExportStatus.core.js";
10
+ export { buildOrganizationsGetFacilityVendorsExportStatusQuery, type OrganizationsGetFacilityVendorsExportStatusQueryData, prefetchOrganizationsGetFacilityVendorsExportStatus, queryKeyOrganizationsGetFacilityVendorsExportStatus, };
11
+ export type OrganizationsGetFacilityVendorsExportStatusQueryError = errors.ApiErrorResponse | GreenSecurityError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError;
12
+ /**
13
+ * Get facility vendors export status
14
+ *
15
+ * @remarks
16
+ * Poll the state of an asynchronous facility vendors export job. When `ready` is true,
17
+ * the export is complete and can be downloaded via the download endpoint.
18
+ */
19
+ export declare function useOrganizationsGetFacilityVendorsExportStatus(request: operations.GetFacilityVendorsExportStatusRequest, options?: QueryHookOptions<OrganizationsGetFacilityVendorsExportStatusQueryData, OrganizationsGetFacilityVendorsExportStatusQueryError>): UseQueryResult<OrganizationsGetFacilityVendorsExportStatusQueryData, OrganizationsGetFacilityVendorsExportStatusQueryError>;
20
+ /**
21
+ * Get facility vendors export status
22
+ *
23
+ * @remarks
24
+ * Poll the state of an asynchronous facility vendors export job. When `ready` is true,
25
+ * the export is complete and can be downloaded via the download endpoint.
26
+ */
27
+ export declare function useOrganizationsGetFacilityVendorsExportStatusSuspense(request: operations.GetFacilityVendorsExportStatusRequest, options?: SuspenseQueryHookOptions<OrganizationsGetFacilityVendorsExportStatusQueryData, OrganizationsGetFacilityVendorsExportStatusQueryError>): UseSuspenseQueryResult<OrganizationsGetFacilityVendorsExportStatusQueryData, OrganizationsGetFacilityVendorsExportStatusQueryError>;
28
+ export declare function setOrganizationsGetFacilityVendorsExportStatusData(client: QueryClient, queryKeyBase: [id: number, exportId: string], data: OrganizationsGetFacilityVendorsExportStatusQueryData): OrganizationsGetFacilityVendorsExportStatusQueryData | undefined;
29
+ export declare function invalidateOrganizationsGetFacilityVendorsExportStatus(client: QueryClient, queryKeyBase: TupleToPrefixes<[id: number, exportId: string]>, filters?: Omit<InvalidateQueryFilters, "queryKey" | "predicate" | "exact">): Promise<void>;
30
+ export declare function invalidateAllOrganizationsGetFacilityVendorsExportStatus(client: QueryClient, filters?: Omit<InvalidateQueryFilters, "queryKey" | "predicate" | "exact">): Promise<void>;
31
+ //# sourceMappingURL=organizationsGetFacilityVendorsExportStatus.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organizationsGetFacilityVendorsExportStatus.d.ts","sourceRoot":"","sources":["../../../src/react-query/organizationsGetFacilityVendorsExportStatus.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,sBAAsB,EACtB,WAAW,EAEX,cAAc,EAEd,sBAAsB,EACvB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAE5D,OAAO,EACL,gBAAgB,EAChB,wBAAwB,EACxB,eAAe,EAChB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,qDAAqD,EACrD,oDAAoD,EACpD,mDAAmD,EACnD,mDAAmD,EACpD,MAAM,uDAAuD,CAAC;AAC/D,OAAO,EACL,qDAAqD,EACrD,KAAK,oDAAoD,EACzD,mDAAmD,EACnD,mDAAmD,GACpD,CAAC;AAEF,MAAM,MAAM,qDAAqD,GAC7D,MAAM,CAAC,gBAAgB,GACvB,kBAAkB,GAClB,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CAAC;AAEvB;;;;;;GAMG;AACH,wBAAgB,8CAA8C,CAC5D,OAAO,EAAE,UAAU,CAAC,qCAAqC,EACzD,OAAO,CAAC,EAAE,gBAAgB,CACxB,oDAAoD,EACpD,qDAAqD,CACtD,GACA,cAAc,CACf,oDAAoD,EACpD,qDAAqD,CACtD,CAUA;AAED;;;;;;GAMG;AACH,wBAAgB,sDAAsD,CACpE,OAAO,EAAE,UAAU,CAAC,qCAAqC,EACzD,OAAO,CAAC,EAAE,wBAAwB,CAChC,oDAAoD,EACpD,qDAAqD,CACtD,GACA,sBAAsB,CACvB,oDAAoD,EACpD,qDAAqD,CACtD,CAUA;AAED,wBAAgB,kDAAkD,CAChE,MAAM,EAAE,WAAW,EACnB,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,EAC5C,IAAI,EAAE,oDAAoD,GACzD,oDAAoD,GAAG,SAAS,CAQlE;AAED,wBAAgB,qDAAqD,CACnE,MAAM,EAAE,WAAW,EACnB,YAAY,EAAE,eAAe,CAAC,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC,EAC7D,OAAO,CAAC,EAAE,IAAI,CAAC,sBAAsB,EAAE,UAAU,GAAG,WAAW,GAAG,OAAO,CAAC,GACzE,OAAO,CAAC,IAAI,CAAC,CAUf;AAED,wBAAgB,wDAAwD,CACtE,MAAM,EAAE,WAAW,EACnB,OAAO,CAAC,EAAE,IAAI,CAAC,sBAAsB,EAAE,UAAU,GAAG,WAAW,GAAG,OAAO,CAAC,GACzE,OAAO,CAAC,IAAI,CAAC,CASf"}
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+ /*
3
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.queryKeyOrganizationsGetFacilityVendorsExportStatus = exports.prefetchOrganizationsGetFacilityVendorsExportStatus = exports.buildOrganizationsGetFacilityVendorsExportStatusQuery = void 0;
7
+ exports.useOrganizationsGetFacilityVendorsExportStatus = useOrganizationsGetFacilityVendorsExportStatus;
8
+ exports.useOrganizationsGetFacilityVendorsExportStatusSuspense = useOrganizationsGetFacilityVendorsExportStatusSuspense;
9
+ exports.setOrganizationsGetFacilityVendorsExportStatusData = setOrganizationsGetFacilityVendorsExportStatusData;
10
+ exports.invalidateOrganizationsGetFacilityVendorsExportStatus = invalidateOrganizationsGetFacilityVendorsExportStatus;
11
+ exports.invalidateAllOrganizationsGetFacilityVendorsExportStatus = invalidateAllOrganizationsGetFacilityVendorsExportStatus;
12
+ const react_query_1 = require("@tanstack/react-query");
13
+ const _context_js_1 = require("./_context.js");
14
+ const organizationsGetFacilityVendorsExportStatus_core_js_1 = require("./organizationsGetFacilityVendorsExportStatus.core.js");
15
+ Object.defineProperty(exports, "buildOrganizationsGetFacilityVendorsExportStatusQuery", { enumerable: true, get: function () { return organizationsGetFacilityVendorsExportStatus_core_js_1.buildOrganizationsGetFacilityVendorsExportStatusQuery; } });
16
+ Object.defineProperty(exports, "prefetchOrganizationsGetFacilityVendorsExportStatus", { enumerable: true, get: function () { return organizationsGetFacilityVendorsExportStatus_core_js_1.prefetchOrganizationsGetFacilityVendorsExportStatus; } });
17
+ Object.defineProperty(exports, "queryKeyOrganizationsGetFacilityVendorsExportStatus", { enumerable: true, get: function () { return organizationsGetFacilityVendorsExportStatus_core_js_1.queryKeyOrganizationsGetFacilityVendorsExportStatus; } });
18
+ /**
19
+ * Get facility vendors export status
20
+ *
21
+ * @remarks
22
+ * Poll the state of an asynchronous facility vendors export job. When `ready` is true,
23
+ * the export is complete and can be downloaded via the download endpoint.
24
+ */
25
+ function useOrganizationsGetFacilityVendorsExportStatus(request, options) {
26
+ const client = (0, _context_js_1.useGreenSecurityContext)();
27
+ return (0, react_query_1.useQuery)({
28
+ ...(0, organizationsGetFacilityVendorsExportStatus_core_js_1.buildOrganizationsGetFacilityVendorsExportStatusQuery)(client, request, options),
29
+ ...options,
30
+ });
31
+ }
32
+ /**
33
+ * Get facility vendors export status
34
+ *
35
+ * @remarks
36
+ * Poll the state of an asynchronous facility vendors export job. When `ready` is true,
37
+ * the export is complete and can be downloaded via the download endpoint.
38
+ */
39
+ function useOrganizationsGetFacilityVendorsExportStatusSuspense(request, options) {
40
+ const client = (0, _context_js_1.useGreenSecurityContext)();
41
+ return (0, react_query_1.useSuspenseQuery)({
42
+ ...(0, organizationsGetFacilityVendorsExportStatus_core_js_1.buildOrganizationsGetFacilityVendorsExportStatusQuery)(client, request, options),
43
+ ...options,
44
+ });
45
+ }
46
+ function setOrganizationsGetFacilityVendorsExportStatusData(client, queryKeyBase, data) {
47
+ const key = (0, organizationsGetFacilityVendorsExportStatus_core_js_1.queryKeyOrganizationsGetFacilityVendorsExportStatus)(...queryKeyBase);
48
+ return client.setQueryData(key, data);
49
+ }
50
+ function invalidateOrganizationsGetFacilityVendorsExportStatus(client, queryKeyBase, filters) {
51
+ return client.invalidateQueries({
52
+ ...filters,
53
+ queryKey: [
54
+ "@greensecurity/javascript-sdk",
55
+ "organizations",
56
+ "getFacilityVendorsExportStatus",
57
+ ...queryKeyBase,
58
+ ],
59
+ });
60
+ }
61
+ function invalidateAllOrganizationsGetFacilityVendorsExportStatus(client, filters) {
62
+ return client.invalidateQueries({
63
+ ...filters,
64
+ queryKey: [
65
+ "@greensecurity/javascript-sdk",
66
+ "organizations",
67
+ "getFacilityVendorsExportStatus",
68
+ ],
69
+ });
70
+ }
71
+ //# sourceMappingURL=organizationsGetFacilityVendorsExportStatus.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organizationsGetFacilityVendorsExportStatus.js","sourceRoot":"","sources":["../../../src/react-query/organizationsGetFacilityVendorsExportStatus.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AA2DH,wGAmBC;AASD,wHAmBC;AAED,gHAYC;AAED,sHAcC;AAED,4HAYC;AApJD,uDAO+B;AAa/B,+CAAwD;AAMxD,+HAK+D;AAE7D,sIANA,2GAAqD,OAMA;AAErD,oIANA,yGAAmD,OAMA;AACnD,oIANA,yGAAmD,OAMA;AAcrD;;;;;;GAMG;AACH,SAAgB,8CAA8C,CAC5D,OAAyD,EACzD,OAGC;IAKD,MAAM,MAAM,GAAG,IAAA,qCAAuB,GAAE,CAAC;IACzC,OAAO,IAAA,sBAAQ,EAAC;QACd,GAAG,IAAA,2GAAqD,EACtD,MAAM,EACN,OAAO,EACP,OAAO,CACR;QACD,GAAG,OAAO;KACX,CAAC,CAAC;AACL,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,sDAAsD,CACpE,OAAyD,EACzD,OAGC;IAKD,MAAM,MAAM,GAAG,IAAA,qCAAuB,GAAE,CAAC;IACzC,OAAO,IAAA,8BAAgB,EAAC;QACtB,GAAG,IAAA,2GAAqD,EACtD,MAAM,EACN,OAAO,EACP,OAAO,CACR;QACD,GAAG,OAAO;KACX,CAAC,CAAC;AACL,CAAC;AAED,SAAgB,kDAAkD,CAChE,MAAmB,EACnB,YAA4C,EAC5C,IAA0D;IAE1D,MAAM,GAAG,GAAG,IAAA,yGAAmD,EAC7D,GAAG,YAAY,CAChB,CAAC;IAEF,OAAO,MAAM,CAAC,YAAY,CAExB,GAAG,EAAE,IAAI,CAAC,CAAC;AACf,CAAC;AAED,SAAgB,qDAAqD,CACnE,MAAmB,EACnB,YAA6D,EAC7D,OAA0E;IAE1E,OAAO,MAAM,CAAC,iBAAiB,CAAC;QAC9B,GAAG,OAAO;QACV,QAAQ,EAAE;YACR,+BAA+B;YAC/B,eAAe;YACf,gCAAgC;YAChC,GAAG,YAAY;SAChB;KACF,CAAC,CAAC;AACL,CAAC;AAED,SAAgB,wDAAwD,CACtE,MAAmB,EACnB,OAA0E;IAE1E,OAAO,MAAM,CAAC,iBAAiB,CAAC;QAC9B,GAAG,OAAO;QACV,QAAQ,EAAE;YACR,+BAA+B;YAC/B,eAAe;YACf,gCAAgC;SACjC;KACF,CAAC,CAAC;AACL,CAAC"}
@@ -163,6 +163,44 @@ export declare class Organizations extends ClientSDK {
163
163
  listFacilityVendors(request: operations.ListFacilityVendorsRequest, options?: RequestOptions): Promise<PageIterator<operations.ListFacilityVendorsResponse, {
164
164
  page: number;
165
165
  }>>;
166
+ /**
167
+ * Export facility vendors to CSV (async)
168
+ *
169
+ * @remarks
170
+ * Enqueues an asynchronous job to generate a CSV export of the vendors (vendor reps)
171
+ * targeting the given facility, applying the same access scope and filter parameters as
172
+ * the listing endpoint. The CSV contains: Name, Email, one column per company custom field
173
+ * flagged `show_to_vendor` (e.g. Employee ID), Last Visit, and Status.
174
+ *
175
+ * Returns a `status_url` for polling until the export is ready, along with a `download_url`
176
+ * and `status_id`.
177
+ *
178
+ * Access control mirrors the list endpoint:
179
+ * * Regular users — facility must be in the caller's read scope (via
180
+ * `has_facility_access_policy`); company resolved from the session. Out-of-scope or
181
+ * soft-deleted facilities return `404 Facility not found`.
182
+ * * API users — `company_id` required; both the company AND the facility must be
183
+ * activated for the caller's marketplace app via the join-scoped
184
+ * `MarketplaceAppActivation` check.
185
+ */
186
+ exportFacilityVendors(request: operations.ExportFacilityVendorsRequest, options?: RequestOptions): Promise<operations.ExportFacilityVendorsResponseBody>;
187
+ /**
188
+ * Get facility vendors export status
189
+ *
190
+ * @remarks
191
+ * Poll the state of an asynchronous facility vendors export job. When `ready` is true,
192
+ * the export is complete and can be downloaded via the download endpoint.
193
+ */
194
+ getFacilityVendorsExportStatus(request: operations.GetFacilityVendorsExportStatusRequest, options?: RequestOptions): Promise<components.CsvExportStatusResponse>;
195
+ /**
196
+ * Download facility vendors CSV
197
+ *
198
+ * @remarks
199
+ * Returns the exported facility vendors CSV via a 302 redirect to a short-lived
200
+ * presigned S3 URL. If the export is still being generated, returns 202 with a JSON
201
+ * `{ ready: false }` payload.
202
+ */
203
+ downloadFacilityVendorsExport(request: operations.DownloadFacilityVendorsExportRequest, options?: RequestOptions): Promise<operations.DownloadFacilityVendorsExportResponse | undefined>;
166
204
  /**
167
205
  * List or search department contacts
168
206
  *