@greensecurity/javascript-sdk 0.44.0-beta.18 → 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 (176) 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__/webhooks.test.js +1 -1
  5. package/dist/commonjs/__tests__/webhooks.test.js.map +1 -1
  6. package/dist/commonjs/__tests__/zones.test.js +27 -6
  7. package/dist/commonjs/__tests__/zones.test.js.map +1 -1
  8. package/dist/commonjs/funcs/organizationsDownloadFacilityVendorsExport.d.ts +22 -0
  9. package/dist/commonjs/funcs/organizationsDownloadFacilityVendorsExport.d.ts.map +1 -0
  10. package/dist/commonjs/funcs/organizationsDownloadFacilityVendorsExport.js +132 -0
  11. package/dist/commonjs/funcs/organizationsDownloadFacilityVendorsExport.js.map +1 -0
  12. package/dist/commonjs/funcs/organizationsExportFacilityVendors.d.ts +34 -0
  13. package/dist/commonjs/funcs/organizationsExportFacilityVendors.d.ts.map +1 -0
  14. package/dist/commonjs/funcs/organizationsExportFacilityVendors.js +148 -0
  15. package/dist/commonjs/funcs/organizationsExportFacilityVendors.js.map +1 -0
  16. package/dist/commonjs/funcs/organizationsGetFacilityVendorsExportStatus.d.ts +22 -0
  17. package/dist/commonjs/funcs/organizationsGetFacilityVendorsExportStatus.d.ts.map +1 -0
  18. package/dist/commonjs/funcs/organizationsGetFacilityVendorsExportStatus.js +131 -0
  19. package/dist/commonjs/funcs/organizationsGetFacilityVendorsExportStatus.js.map +1 -0
  20. package/dist/commonjs/lib/config.d.ts +2 -2
  21. package/dist/commonjs/lib/config.js +2 -2
  22. package/dist/commonjs/models/components/csvexportstatusresponse.d.ts +43 -0
  23. package/dist/commonjs/models/components/csvexportstatusresponse.d.ts.map +1 -0
  24. package/dist/commonjs/models/components/csvexportstatusresponse.js +65 -0
  25. package/dist/commonjs/models/components/csvexportstatusresponse.js.map +1 -0
  26. package/dist/commonjs/models/components/index.d.ts +1 -0
  27. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  28. package/dist/commonjs/models/components/index.js +1 -0
  29. package/dist/commonjs/models/components/index.js.map +1 -1
  30. package/dist/commonjs/models/operations/downloadfacilityvendorsexport.d.ts +47 -0
  31. package/dist/commonjs/models/operations/downloadfacilityvendorsexport.d.ts.map +1 -0
  32. package/dist/commonjs/models/operations/downloadfacilityvendorsexport.js +80 -0
  33. package/dist/commonjs/models/operations/downloadfacilityvendorsexport.js.map +1 -0
  34. package/dist/commonjs/models/operations/exportfacilityvendors.d.ts +118 -0
  35. package/dist/commonjs/models/operations/exportfacilityvendors.d.ts.map +1 -0
  36. package/dist/commonjs/models/operations/exportfacilityvendors.js +115 -0
  37. package/dist/commonjs/models/operations/exportfacilityvendors.js.map +1 -0
  38. package/dist/commonjs/models/operations/getfacilityvendorsexportstatus.d.ts +20 -0
  39. package/dist/commonjs/models/operations/getfacilityvendorsexportstatus.d.ts.map +1 -0
  40. package/dist/commonjs/models/operations/getfacilityvendorsexportstatus.js +55 -0
  41. package/dist/commonjs/models/operations/getfacilityvendorsexportstatus.js.map +1 -0
  42. package/dist/commonjs/models/operations/index.d.ts +3 -0
  43. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  44. package/dist/commonjs/models/operations/index.js +3 -0
  45. package/dist/commonjs/models/operations/index.js.map +1 -1
  46. package/dist/commonjs/react-query/index.d.ts +3 -0
  47. package/dist/commonjs/react-query/index.d.ts.map +1 -1
  48. package/dist/commonjs/react-query/index.js +3 -0
  49. package/dist/commonjs/react-query/index.js.map +1 -1
  50. package/dist/commonjs/react-query/organizationsDownloadFacilityVendorsExport.core.d.ts +12 -0
  51. package/dist/commonjs/react-query/organizationsDownloadFacilityVendorsExport.core.d.ts.map +1 -0
  52. package/dist/commonjs/react-query/organizationsDownloadFacilityVendorsExport.core.js +40 -0
  53. package/dist/commonjs/react-query/organizationsDownloadFacilityVendorsExport.core.js.map +1 -0
  54. package/dist/commonjs/react-query/organizationsDownloadFacilityVendorsExport.d.ts +33 -0
  55. package/dist/commonjs/react-query/organizationsDownloadFacilityVendorsExport.d.ts.map +1 -0
  56. package/dist/commonjs/react-query/organizationsDownloadFacilityVendorsExport.js +73 -0
  57. package/dist/commonjs/react-query/organizationsDownloadFacilityVendorsExport.js.map +1 -0
  58. package/dist/commonjs/react-query/organizationsExportFacilityVendors.core.d.ts +19 -0
  59. package/dist/commonjs/react-query/organizationsExportFacilityVendors.core.d.ts.map +1 -0
  60. package/dist/commonjs/react-query/organizationsExportFacilityVendors.core.js +47 -0
  61. package/dist/commonjs/react-query/organizationsExportFacilityVendors.core.js.map +1 -0
  62. package/dist/commonjs/react-query/organizationsExportFacilityVendors.d.ts +77 -0
  63. package/dist/commonjs/react-query/organizationsExportFacilityVendors.d.ts.map +1 -0
  64. package/dist/commonjs/react-query/organizationsExportFacilityVendors.js +97 -0
  65. package/dist/commonjs/react-query/organizationsExportFacilityVendors.js.map +1 -0
  66. package/dist/commonjs/react-query/organizationsGetFacilityVendorsExportStatus.core.d.ts +13 -0
  67. package/dist/commonjs/react-query/organizationsGetFacilityVendorsExportStatus.core.d.ts.map +1 -0
  68. package/dist/commonjs/react-query/organizationsGetFacilityVendorsExportStatus.core.js +40 -0
  69. package/dist/commonjs/react-query/organizationsGetFacilityVendorsExportStatus.core.js.map +1 -0
  70. package/dist/commonjs/react-query/organizationsGetFacilityVendorsExportStatus.d.ts +31 -0
  71. package/dist/commonjs/react-query/organizationsGetFacilityVendorsExportStatus.d.ts.map +1 -0
  72. package/dist/commonjs/react-query/organizationsGetFacilityVendorsExportStatus.js +71 -0
  73. package/dist/commonjs/react-query/organizationsGetFacilityVendorsExportStatus.js.map +1 -0
  74. package/dist/commonjs/sdk/organizations.d.ts +38 -0
  75. package/dist/commonjs/sdk/organizations.d.ts.map +1 -1
  76. package/dist/commonjs/sdk/organizations.js +47 -0
  77. package/dist/commonjs/sdk/organizations.js.map +1 -1
  78. package/dist/esm/__tests__/organizations.test.js +57 -0
  79. package/dist/esm/__tests__/organizations.test.js.map +1 -1
  80. package/dist/esm/__tests__/webhooks.test.js +1 -1
  81. package/dist/esm/__tests__/webhooks.test.js.map +1 -1
  82. package/dist/esm/__tests__/zones.test.js +27 -6
  83. package/dist/esm/__tests__/zones.test.js.map +1 -1
  84. package/dist/esm/funcs/organizationsDownloadFacilityVendorsExport.d.ts +22 -0
  85. package/dist/esm/funcs/organizationsDownloadFacilityVendorsExport.d.ts.map +1 -0
  86. package/dist/esm/funcs/organizationsDownloadFacilityVendorsExport.js +96 -0
  87. package/dist/esm/funcs/organizationsDownloadFacilityVendorsExport.js.map +1 -0
  88. package/dist/esm/funcs/organizationsExportFacilityVendors.d.ts +34 -0
  89. package/dist/esm/funcs/organizationsExportFacilityVendors.d.ts.map +1 -0
  90. package/dist/esm/funcs/organizationsExportFacilityVendors.js +112 -0
  91. package/dist/esm/funcs/organizationsExportFacilityVendors.js.map +1 -0
  92. package/dist/esm/funcs/organizationsGetFacilityVendorsExportStatus.d.ts +22 -0
  93. package/dist/esm/funcs/organizationsGetFacilityVendorsExportStatus.d.ts.map +1 -0
  94. package/dist/esm/funcs/organizationsGetFacilityVendorsExportStatus.js +95 -0
  95. package/dist/esm/funcs/organizationsGetFacilityVendorsExportStatus.js.map +1 -0
  96. package/dist/esm/lib/config.d.ts +2 -2
  97. package/dist/esm/lib/config.js +2 -2
  98. package/dist/esm/models/components/csvexportstatusresponse.d.ts +43 -0
  99. package/dist/esm/models/components/csvexportstatusresponse.d.ts.map +1 -0
  100. package/dist/esm/models/components/csvexportstatusresponse.js +28 -0
  101. package/dist/esm/models/components/csvexportstatusresponse.js.map +1 -0
  102. package/dist/esm/models/components/index.d.ts +1 -0
  103. package/dist/esm/models/components/index.d.ts.map +1 -1
  104. package/dist/esm/models/components/index.js +1 -0
  105. package/dist/esm/models/components/index.js.map +1 -1
  106. package/dist/esm/models/operations/downloadfacilityvendorsexport.d.ts +47 -0
  107. package/dist/esm/models/operations/downloadfacilityvendorsexport.d.ts.map +1 -0
  108. package/dist/esm/models/operations/downloadfacilityvendorsexport.js +41 -0
  109. package/dist/esm/models/operations/downloadfacilityvendorsexport.js.map +1 -0
  110. package/dist/esm/models/operations/exportfacilityvendors.d.ts +118 -0
  111. package/dist/esm/models/operations/exportfacilityvendors.d.ts.map +1 -0
  112. package/dist/esm/models/operations/exportfacilityvendors.js +76 -0
  113. package/dist/esm/models/operations/exportfacilityvendors.js.map +1 -0
  114. package/dist/esm/models/operations/getfacilityvendorsexportstatus.d.ts +20 -0
  115. package/dist/esm/models/operations/getfacilityvendorsexportstatus.d.ts.map +1 -0
  116. package/dist/esm/models/operations/getfacilityvendorsexportstatus.js +18 -0
  117. package/dist/esm/models/operations/getfacilityvendorsexportstatus.js.map +1 -0
  118. package/dist/esm/models/operations/index.d.ts +3 -0
  119. package/dist/esm/models/operations/index.d.ts.map +1 -1
  120. package/dist/esm/models/operations/index.js +3 -0
  121. package/dist/esm/models/operations/index.js.map +1 -1
  122. package/dist/esm/react-query/index.d.ts +3 -0
  123. package/dist/esm/react-query/index.d.ts.map +1 -1
  124. package/dist/esm/react-query/index.js +3 -0
  125. package/dist/esm/react-query/index.js.map +1 -1
  126. package/dist/esm/react-query/organizationsDownloadFacilityVendorsExport.core.d.ts +12 -0
  127. package/dist/esm/react-query/organizationsDownloadFacilityVendorsExport.core.d.ts.map +1 -0
  128. package/dist/esm/react-query/organizationsDownloadFacilityVendorsExport.core.js +35 -0
  129. package/dist/esm/react-query/organizationsDownloadFacilityVendorsExport.core.js.map +1 -0
  130. package/dist/esm/react-query/organizationsDownloadFacilityVendorsExport.d.ts +33 -0
  131. package/dist/esm/react-query/organizationsDownloadFacilityVendorsExport.d.ts.map +1 -0
  132. package/dist/esm/react-query/organizationsDownloadFacilityVendorsExport.js +63 -0
  133. package/dist/esm/react-query/organizationsDownloadFacilityVendorsExport.js.map +1 -0
  134. package/dist/esm/react-query/organizationsExportFacilityVendors.core.d.ts +19 -0
  135. package/dist/esm/react-query/organizationsExportFacilityVendors.core.d.ts.map +1 -0
  136. package/dist/esm/react-query/organizationsExportFacilityVendors.core.js +42 -0
  137. package/dist/esm/react-query/organizationsExportFacilityVendors.core.js.map +1 -0
  138. package/dist/esm/react-query/organizationsExportFacilityVendors.d.ts +77 -0
  139. package/dist/esm/react-query/organizationsExportFacilityVendors.d.ts.map +1 -0
  140. package/dist/esm/react-query/organizationsExportFacilityVendors.js +87 -0
  141. package/dist/esm/react-query/organizationsExportFacilityVendors.js.map +1 -0
  142. package/dist/esm/react-query/organizationsGetFacilityVendorsExportStatus.core.d.ts +13 -0
  143. package/dist/esm/react-query/organizationsGetFacilityVendorsExportStatus.core.d.ts.map +1 -0
  144. package/dist/esm/react-query/organizationsGetFacilityVendorsExportStatus.core.js +35 -0
  145. package/dist/esm/react-query/organizationsGetFacilityVendorsExportStatus.core.js.map +1 -0
  146. package/dist/esm/react-query/organizationsGetFacilityVendorsExportStatus.d.ts +31 -0
  147. package/dist/esm/react-query/organizationsGetFacilityVendorsExportStatus.d.ts.map +1 -0
  148. package/dist/esm/react-query/organizationsGetFacilityVendorsExportStatus.js +61 -0
  149. package/dist/esm/react-query/organizationsGetFacilityVendorsExportStatus.js.map +1 -0
  150. package/dist/esm/sdk/organizations.d.ts +38 -0
  151. package/dist/esm/sdk/organizations.d.ts.map +1 -1
  152. package/dist/esm/sdk/organizations.js +47 -0
  153. package/dist/esm/sdk/organizations.js.map +1 -1
  154. package/jsr.json +1 -1
  155. package/package.json +1 -1
  156. package/src/__tests__/organizations.test.ts +66 -0
  157. package/src/__tests__/webhooks.test.ts +1 -1
  158. package/src/__tests__/zones.test.ts +27 -6
  159. package/src/funcs/organizationsDownloadFacilityVendorsExport.ts +202 -0
  160. package/src/funcs/organizationsExportFacilityVendors.ts +202 -0
  161. package/src/funcs/organizationsGetFacilityVendorsExportStatus.ts +188 -0
  162. package/src/lib/config.ts +2 -2
  163. package/src/models/components/csvexportstatusresponse.ts +79 -0
  164. package/src/models/components/index.ts +1 -0
  165. package/src/models/operations/downloadfacilityvendorsexport.ts +124 -0
  166. package/src/models/operations/exportfacilityvendors.ts +206 -0
  167. package/src/models/operations/getfacilityvendorsexportstatus.ts +47 -0
  168. package/src/models/operations/index.ts +3 -0
  169. package/src/react-query/index.ts +3 -0
  170. package/src/react-query/organizationsDownloadFacilityVendorsExport.core.ts +84 -0
  171. package/src/react-query/organizationsDownloadFacilityVendorsExport.ts +155 -0
  172. package/src/react-query/organizationsExportFacilityVendors.core.ts +94 -0
  173. package/src/react-query/organizationsExportFacilityVendors.ts +200 -0
  174. package/src/react-query/organizationsGetFacilityVendorsExportStatus.core.ts +84 -0
  175. package/src/react-query/organizationsGetFacilityVendorsExportStatus.ts +153 -0
  176. 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,63 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+ import { useQuery, useSuspenseQuery, } from "@tanstack/react-query";
5
+ import { useGreenSecurityContext } from "./_context.js";
6
+ import { buildOrganizationsDownloadFacilityVendorsExportQuery, prefetchOrganizationsDownloadFacilityVendorsExport, queryKeyOrganizationsDownloadFacilityVendorsExport, } from "./organizationsDownloadFacilityVendorsExport.core.js";
7
+ export { buildOrganizationsDownloadFacilityVendorsExportQuery, prefetchOrganizationsDownloadFacilityVendorsExport, queryKeyOrganizationsDownloadFacilityVendorsExport, };
8
+ /**
9
+ * Download facility vendors CSV
10
+ *
11
+ * @remarks
12
+ * Returns the exported facility vendors CSV via a 302 redirect to a short-lived
13
+ * presigned S3 URL. If the export is still being generated, returns 202 with a JSON
14
+ * `{ ready: false }` payload.
15
+ */
16
+ export function useOrganizationsDownloadFacilityVendorsExport(request, options) {
17
+ const client = useGreenSecurityContext();
18
+ return useQuery({
19
+ ...buildOrganizationsDownloadFacilityVendorsExportQuery(client, request, options),
20
+ ...options,
21
+ });
22
+ }
23
+ /**
24
+ * Download facility vendors CSV
25
+ *
26
+ * @remarks
27
+ * Returns the exported facility vendors CSV via a 302 redirect to a short-lived
28
+ * presigned S3 URL. If the export is still being generated, returns 202 with a JSON
29
+ * `{ ready: false }` payload.
30
+ */
31
+ export function useOrganizationsDownloadFacilityVendorsExportSuspense(request, options) {
32
+ const client = useGreenSecurityContext();
33
+ return useSuspenseQuery({
34
+ ...buildOrganizationsDownloadFacilityVendorsExportQuery(client, request, options),
35
+ ...options,
36
+ });
37
+ }
38
+ export function setOrganizationsDownloadFacilityVendorsExportData(client, queryKeyBase, data) {
39
+ const key = queryKeyOrganizationsDownloadFacilityVendorsExport(...queryKeyBase);
40
+ return client.setQueryData(key, data);
41
+ }
42
+ export function invalidateOrganizationsDownloadFacilityVendorsExport(client, queryKeyBase, filters) {
43
+ return client.invalidateQueries({
44
+ ...filters,
45
+ queryKey: [
46
+ "@greensecurity/javascript-sdk",
47
+ "organizations",
48
+ "downloadFacilityVendorsExport",
49
+ ...queryKeyBase,
50
+ ],
51
+ });
52
+ }
53
+ export function invalidateAllOrganizationsDownloadFacilityVendorsExport(client, filters) {
54
+ return client.invalidateQueries({
55
+ ...filters,
56
+ queryKey: [
57
+ "@greensecurity/javascript-sdk",
58
+ "organizations",
59
+ "downloadFacilityVendorsExport",
60
+ ],
61
+ });
62
+ }
63
+ //# sourceMappingURL=organizationsDownloadFacilityVendorsExport.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organizationsDownloadFacilityVendorsExport.js","sourceRoot":"","sources":["../../../src/react-query/organizationsDownloadFacilityVendorsExport.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAGL,QAAQ,EAER,gBAAgB,GAEjB,MAAM,uBAAuB,CAAC;AAa/B,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAMxD,OAAO,EACL,oDAAoD,EAEpD,kDAAkD,EAClD,kDAAkD,GACnD,MAAM,sDAAsD,CAAC;AAC9D,OAAO,EACL,oDAAoD,EAEpD,kDAAkD,EAClD,kDAAkD,GACnD,CAAC;AAaF;;;;;;;GAOG;AACH,MAAM,UAAU,6CAA6C,CAC3D,OAAwD,EACxD,OAGC;IAKD,MAAM,MAAM,GAAG,uBAAuB,EAAE,CAAC;IACzC,OAAO,QAAQ,CAAC;QACd,GAAG,oDAAoD,CACrD,MAAM,EACN,OAAO,EACP,OAAO,CACR;QACD,GAAG,OAAO;KACX,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,qDAAqD,CACnE,OAAwD,EACxD,OAGC;IAKD,MAAM,MAAM,GAAG,uBAAuB,EAAE,CAAC;IACzC,OAAO,gBAAgB,CAAC;QACtB,GAAG,oDAAoD,CACrD,MAAM,EACN,OAAO,EACP,OAAO,CACR;QACD,GAAG,OAAO;KACX,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,iDAAiD,CAC/D,MAAmB,EACnB,YAA4C,EAC5C,IAAyD;IAEzD,MAAM,GAAG,GAAG,kDAAkD,CAC5D,GAAG,YAAY,CAChB,CAAC;IAEF,OAAO,MAAM,CAAC,YAAY,CAExB,GAAG,EAAE,IAAI,CAAC,CAAC;AACf,CAAC;AAED,MAAM,UAAU,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,MAAM,UAAU,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,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"../funcs/organizationsExportFacilityVendors.js";
5
+ import { combineSignals } from "../lib/primitives.js";
6
+ import { unwrapAsync } from "../types/fp.js";
7
+ export function prefetchOrganizationsExportFacilityVendors(queryClient, client$, request, options) {
8
+ return queryClient.prefetchQuery({
9
+ ...buildOrganizationsExportFacilityVendorsQuery(client$, request, options),
10
+ });
11
+ }
12
+ export function buildOrganizationsExportFacilityVendorsQuery(client$, request, options) {
13
+ return {
14
+ queryKey: queryKeyOrganizationsExportFacilityVendors(request.id, {
15
+ companyId: request.companyId,
16
+ status: request.status,
17
+ search: request.search,
18
+ sort: request.sort,
19
+ desc: request.desc,
20
+ itemsPerPage: request.itemsPerPage,
21
+ }),
22
+ queryFn: async function organizationsExportFacilityVendorsQueryFn(ctx) {
23
+ const sig = combineSignals(ctx.signal, options?.signal, options?.fetchOptions?.signal);
24
+ const mergedOptions = {
25
+ ...options?.fetchOptions,
26
+ ...options,
27
+ signal: sig,
28
+ };
29
+ return unwrapAsync(organizationsExportFacilityVendors(client$, request, mergedOptions));
30
+ },
31
+ };
32
+ }
33
+ export function queryKeyOrganizationsExportFacilityVendors(id, parameters) {
34
+ return [
35
+ "@greensecurity/javascript-sdk",
36
+ "organizations",
37
+ "exportFacilityVendors",
38
+ id,
39
+ parameters,
40
+ ];
41
+ }
42
+ //# 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;AAQH,OAAO,EAAE,kCAAkC,EAAE,MAAM,gDAAgD,CAAC;AACpG,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAGtD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAI7C,MAAM,UAAU,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,MAAM,UAAU,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,cAAc,CACxB,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,WAAW,CAAC,kCAAkC,CACnD,OAAO,EACP,OAAO,EACP,aAAa,CACd,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,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,GA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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,87 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+ import { useQuery, useSuspenseQuery, } from "@tanstack/react-query";
5
+ import { useGreenSecurityContext } from "./_context.js";
6
+ import { buildOrganizationsExportFacilityVendorsQuery, prefetchOrganizationsExportFacilityVendors, queryKeyOrganizationsExportFacilityVendors, } from "./organizationsExportFacilityVendors.core.js";
7
+ export { buildOrganizationsExportFacilityVendorsQuery, prefetchOrganizationsExportFacilityVendors, queryKeyOrganizationsExportFacilityVendors, };
8
+ /**
9
+ * Export facility vendors to CSV (async)
10
+ *
11
+ * @remarks
12
+ * Enqueues an asynchronous job to generate a CSV export of the vendors (vendor reps)
13
+ * targeting the given facility, applying the same access scope and filter parameters as
14
+ * the listing endpoint. The CSV contains: Name, Email, one column per company custom field
15
+ * flagged `show_to_vendor` (e.g. Employee ID), Last Visit, and Status.
16
+ *
17
+ * Returns a `status_url` for polling until the export is ready, along with a `download_url`
18
+ * and `status_id`.
19
+ *
20
+ * Access control mirrors the list endpoint:
21
+ * * Regular users — facility must be in the caller's read scope (via
22
+ * `has_facility_access_policy`); company resolved from the session. Out-of-scope or
23
+ * soft-deleted facilities return `404 Facility not found`.
24
+ * * API users — `company_id` required; both the company AND the facility must be
25
+ * activated for the caller's marketplace app via the join-scoped
26
+ * `MarketplaceAppActivation` check.
27
+ */
28
+ export function useOrganizationsExportFacilityVendors(request, options) {
29
+ const client = useGreenSecurityContext();
30
+ return useQuery({
31
+ ...buildOrganizationsExportFacilityVendorsQuery(client, request, options),
32
+ ...options,
33
+ });
34
+ }
35
+ /**
36
+ * Export facility vendors to CSV (async)
37
+ *
38
+ * @remarks
39
+ * Enqueues an asynchronous job to generate a CSV export of the vendors (vendor reps)
40
+ * targeting the given facility, applying the same access scope and filter parameters as
41
+ * the listing endpoint. The CSV contains: Name, Email, one column per company custom field
42
+ * flagged `show_to_vendor` (e.g. Employee ID), Last Visit, and Status.
43
+ *
44
+ * Returns a `status_url` for polling until the export is ready, along with a `download_url`
45
+ * and `status_id`.
46
+ *
47
+ * Access control mirrors the list endpoint:
48
+ * * Regular users — facility must be in the caller's read scope (via
49
+ * `has_facility_access_policy`); company resolved from the session. Out-of-scope or
50
+ * soft-deleted facilities return `404 Facility not found`.
51
+ * * API users — `company_id` required; both the company AND the facility must be
52
+ * activated for the caller's marketplace app via the join-scoped
53
+ * `MarketplaceAppActivation` check.
54
+ */
55
+ export function useOrganizationsExportFacilityVendorsSuspense(request, options) {
56
+ const client = useGreenSecurityContext();
57
+ return useSuspenseQuery({
58
+ ...buildOrganizationsExportFacilityVendorsQuery(client, request, options),
59
+ ...options,
60
+ });
61
+ }
62
+ export function setOrganizationsExportFacilityVendorsData(client, queryKeyBase, data) {
63
+ const key = queryKeyOrganizationsExportFacilityVendors(...queryKeyBase);
64
+ return client.setQueryData(key, data);
65
+ }
66
+ export function invalidateOrganizationsExportFacilityVendors(client, queryKeyBase, filters) {
67
+ return client.invalidateQueries({
68
+ ...filters,
69
+ queryKey: [
70
+ "@greensecurity/javascript-sdk",
71
+ "organizations",
72
+ "exportFacilityVendors",
73
+ ...queryKeyBase,
74
+ ],
75
+ });
76
+ }
77
+ export function invalidateAllOrganizationsExportFacilityVendors(client, filters) {
78
+ return client.invalidateQueries({
79
+ ...filters,
80
+ queryKey: [
81
+ "@greensecurity/javascript-sdk",
82
+ "organizations",
83
+ "exportFacilityVendors",
84
+ ],
85
+ });
86
+ }
87
+ //# sourceMappingURL=organizationsExportFacilityVendors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organizationsExportFacilityVendors.js","sourceRoot":"","sources":["../../../src/react-query/organizationsExportFacilityVendors.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAGL,QAAQ,EAER,gBAAgB,GAEjB,MAAM,uBAAuB,CAAC;AAa/B,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAMxD,OAAO,EACL,4CAA4C,EAE5C,0CAA0C,EAC1C,0CAA0C,GAC3C,MAAM,8CAA8C,CAAC;AACtD,OAAO,EACL,4CAA4C,EAE5C,0CAA0C,EAC1C,0CAA0C,GAC3C,CAAC;AAaF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,qCAAqC,CACnD,OAAgD,EAChD,OAGC;IAKD,MAAM,MAAM,GAAG,uBAAuB,EAAE,CAAC;IACzC,OAAO,QAAQ,CAAC;QACd,GAAG,4CAA4C,CAC7C,MAAM,EACN,OAAO,EACP,OAAO,CACR;QACD,GAAG,OAAO;KACX,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,6CAA6C,CAC3D,OAAgD,EAChD,OAGC;IAKD,MAAM,MAAM,GAAG,uBAAuB,EAAE,CAAC;IACzC,OAAO,gBAAgB,CAAC;QACtB,GAAG,4CAA4C,CAC7C,MAAM,EACN,OAAO,EACP,OAAO,CACR;QACD,GAAG,OAAO;KACX,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,yCAAyC,CACvD,MAAmB,EACnB,YAUC,EACD,IAAiD;IAEjD,MAAM,GAAG,GAAG,0CAA0C,CAAC,GAAG,YAAY,CAAC,CAAC;IAExE,OAAO,MAAM,CAAC,YAAY,CACxB,GAAG,EACH,IAAI,CACL,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,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,MAAM,UAAU,+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,35 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+ import { organizationsGetFacilityVendorsExportStatus } from "../funcs/organizationsGetFacilityVendorsExportStatus.js";
5
+ import { combineSignals } from "../lib/primitives.js";
6
+ import { unwrapAsync } from "../types/fp.js";
7
+ export function prefetchOrganizationsGetFacilityVendorsExportStatus(queryClient, client$, request, options) {
8
+ return queryClient.prefetchQuery({
9
+ ...buildOrganizationsGetFacilityVendorsExportStatusQuery(client$, request, options),
10
+ });
11
+ }
12
+ export function buildOrganizationsGetFacilityVendorsExportStatusQuery(client$, request, options) {
13
+ return {
14
+ queryKey: queryKeyOrganizationsGetFacilityVendorsExportStatus(request.id, request.exportId),
15
+ queryFn: async function organizationsGetFacilityVendorsExportStatusQueryFn(ctx) {
16
+ const sig = combineSignals(ctx.signal, options?.signal, options?.fetchOptions?.signal);
17
+ const mergedOptions = {
18
+ ...options?.fetchOptions,
19
+ ...options,
20
+ signal: sig,
21
+ };
22
+ return unwrapAsync(organizationsGetFacilityVendorsExportStatus(client$, request, mergedOptions));
23
+ },
24
+ };
25
+ }
26
+ export function queryKeyOrganizationsGetFacilityVendorsExportStatus(id, exportId) {
27
+ return [
28
+ "@greensecurity/javascript-sdk",
29
+ "organizations",
30
+ "getFacilityVendorsExportStatus",
31
+ id,
32
+ exportId,
33
+ ];
34
+ }
35
+ //# 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;AAQH,OAAO,EAAE,2CAA2C,EAAE,MAAM,yDAAyD,CAAC;AACtH,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAItD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAI7C,MAAM,UAAU,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,MAAM,UAAU,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,cAAc,CACxB,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,WAAW,CAAC,2CAA2C,CAC5D,OAAO,EACP,OAAO,EACP,aAAa,CACd,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,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,61 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+ import { useQuery, useSuspenseQuery, } from "@tanstack/react-query";
5
+ import { useGreenSecurityContext } from "./_context.js";
6
+ import { buildOrganizationsGetFacilityVendorsExportStatusQuery, prefetchOrganizationsGetFacilityVendorsExportStatus, queryKeyOrganizationsGetFacilityVendorsExportStatus, } from "./organizationsGetFacilityVendorsExportStatus.core.js";
7
+ export { buildOrganizationsGetFacilityVendorsExportStatusQuery, prefetchOrganizationsGetFacilityVendorsExportStatus, queryKeyOrganizationsGetFacilityVendorsExportStatus, };
8
+ /**
9
+ * Get facility vendors export status
10
+ *
11
+ * @remarks
12
+ * Poll the state of an asynchronous facility vendors export job. When `ready` is true,
13
+ * the export is complete and can be downloaded via the download endpoint.
14
+ */
15
+ export function useOrganizationsGetFacilityVendorsExportStatus(request, options) {
16
+ const client = useGreenSecurityContext();
17
+ return useQuery({
18
+ ...buildOrganizationsGetFacilityVendorsExportStatusQuery(client, request, options),
19
+ ...options,
20
+ });
21
+ }
22
+ /**
23
+ * Get facility vendors export status
24
+ *
25
+ * @remarks
26
+ * Poll the state of an asynchronous facility vendors export job. When `ready` is true,
27
+ * the export is complete and can be downloaded via the download endpoint.
28
+ */
29
+ export function useOrganizationsGetFacilityVendorsExportStatusSuspense(request, options) {
30
+ const client = useGreenSecurityContext();
31
+ return useSuspenseQuery({
32
+ ...buildOrganizationsGetFacilityVendorsExportStatusQuery(client, request, options),
33
+ ...options,
34
+ });
35
+ }
36
+ export function setOrganizationsGetFacilityVendorsExportStatusData(client, queryKeyBase, data) {
37
+ const key = queryKeyOrganizationsGetFacilityVendorsExportStatus(...queryKeyBase);
38
+ return client.setQueryData(key, data);
39
+ }
40
+ export function invalidateOrganizationsGetFacilityVendorsExportStatus(client, queryKeyBase, filters) {
41
+ return client.invalidateQueries({
42
+ ...filters,
43
+ queryKey: [
44
+ "@greensecurity/javascript-sdk",
45
+ "organizations",
46
+ "getFacilityVendorsExportStatus",
47
+ ...queryKeyBase,
48
+ ],
49
+ });
50
+ }
51
+ export function invalidateAllOrganizationsGetFacilityVendorsExportStatus(client, filters) {
52
+ return client.invalidateQueries({
53
+ ...filters,
54
+ queryKey: [
55
+ "@greensecurity/javascript-sdk",
56
+ "organizations",
57
+ "getFacilityVendorsExportStatus",
58
+ ],
59
+ });
60
+ }
61
+ //# sourceMappingURL=organizationsGetFacilityVendorsExportStatus.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organizationsGetFacilityVendorsExportStatus.js","sourceRoot":"","sources":["../../../src/react-query/organizationsGetFacilityVendorsExportStatus.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAGL,QAAQ,EAER,gBAAgB,GAEjB,MAAM,uBAAuB,CAAC;AAa/B,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAMxD,OAAO,EACL,qDAAqD,EAErD,mDAAmD,EACnD,mDAAmD,GACpD,MAAM,uDAAuD,CAAC;AAC/D,OAAO,EACL,qDAAqD,EAErD,mDAAmD,EACnD,mDAAmD,GACpD,CAAC;AAaF;;;;;;GAMG;AACH,MAAM,UAAU,8CAA8C,CAC5D,OAAyD,EACzD,OAGC;IAKD,MAAM,MAAM,GAAG,uBAAuB,EAAE,CAAC;IACzC,OAAO,QAAQ,CAAC;QACd,GAAG,qDAAqD,CACtD,MAAM,EACN,OAAO,EACP,OAAO,CACR;QACD,GAAG,OAAO;KACX,CAAC,CAAC;AACL,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,sDAAsD,CACpE,OAAyD,EACzD,OAGC;IAKD,MAAM,MAAM,GAAG,uBAAuB,EAAE,CAAC;IACzC,OAAO,gBAAgB,CAAC;QACtB,GAAG,qDAAqD,CACtD,MAAM,EACN,OAAO,EACP,OAAO,CACR;QACD,GAAG,OAAO;KACX,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,kDAAkD,CAChE,MAAmB,EACnB,YAA4C,EAC5C,IAA0D;IAE1D,MAAM,GAAG,GAAG,mDAAmD,CAC7D,GAAG,YAAY,CAChB,CAAC;IAEF,OAAO,MAAM,CAAC,YAAY,CAExB,GAAG,EAAE,IAAI,CAAC,CAAC;AACf,CAAC;AAED,MAAM,UAAU,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,MAAM,UAAU,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
  *
@@ -1 +1 @@
1
- {"version":3,"file":"organizations.d.ts","sourceRoot":"","sources":["../../../src/sdk/organizations.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAE5D,OAAO,EAAE,YAAY,EAAwB,MAAM,wBAAwB,CAAC;AAE5E,qBAAa,aAAc,SAAQ,SAAS;IAC1C;;;;;;;;;;;;;;;;;;OAkBG;IACG,sBAAsB,CAC1B,OAAO,EAAE,UAAU,CAAC,6BAA6B,EACjD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CACR,YAAY,CAAC,UAAU,CAAC,8BAA8B,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAC1E;IAQD;;;;;OAKG;IACG,WAAW,CACf,OAAO,EAAE,UAAU,CAAC,kBAAkB,EACtC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC;IAQ/B;;;;;OAKG;IACG,uBAAuB,CAC3B,OAAO,EAAE,UAAU,CAAC,8BAA8B,EAClD,OAAO,CAAC,EAAE,cAAc,GAC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