@greensecurity/javascript-sdk 0.44.0-beta.12 → 0.44.0-beta.14

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 (157) hide show
  1. package/README.md +3 -0
  2. package/dist/commonjs/__tests__/organizations.test.js +29 -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 +30 -2
  7. package/dist/commonjs/__tests__/zones.test.js.map +1 -1
  8. package/dist/commonjs/admin-funcs/companyManagerGetPaymentForm.d.ts +3 -0
  9. package/dist/commonjs/admin-funcs/companyManagerGetPaymentForm.d.ts.map +1 -0
  10. package/dist/commonjs/admin-funcs/companyManagerGetPaymentForm.js +9 -0
  11. package/dist/commonjs/admin-funcs/companyManagerGetPaymentForm.js.map +1 -0
  12. package/dist/commonjs/admin-funcs/vendorGetPaymentForm.d.ts +3 -0
  13. package/dist/commonjs/admin-funcs/vendorGetPaymentForm.d.ts.map +1 -0
  14. package/dist/commonjs/admin-funcs/vendorGetPaymentForm.js +9 -0
  15. package/dist/commonjs/admin-funcs/vendorGetPaymentForm.js.map +1 -0
  16. package/dist/commonjs/funcs/organizationsListFacilityVendors.d.ts +42 -0
  17. package/dist/commonjs/funcs/organizationsListFacilityVendors.d.ts.map +1 -0
  18. package/dist/commonjs/funcs/organizationsListFacilityVendors.js +187 -0
  19. package/dist/commonjs/funcs/organizationsListFacilityVendors.js.map +1 -0
  20. package/dist/commonjs/hooks/types.d.ts +1 -0
  21. package/dist/commonjs/hooks/types.d.ts.map +1 -1
  22. package/dist/commonjs/index.extras.d.ts +8 -0
  23. package/dist/commonjs/index.extras.d.ts.map +1 -1
  24. package/dist/commonjs/index.extras.js +8 -0
  25. package/dist/commonjs/index.extras.js.map +1 -1
  26. package/dist/commonjs/lib/config.d.ts +4 -4
  27. package/dist/commonjs/lib/config.js +4 -4
  28. package/dist/commonjs/lib/sdks.d.ts.map +1 -1
  29. package/dist/commonjs/lib/sdks.js +13 -4
  30. package/dist/commonjs/lib/sdks.js.map +1 -1
  31. package/dist/commonjs/models/operations/exportcompanytargetfacilities.d.ts +4 -4
  32. package/dist/commonjs/models/operations/exportcompanytargetfacilities.d.ts.map +1 -1
  33. package/dist/commonjs/models/operations/exportcompanytargetfacilities.js +6 -4
  34. package/dist/commonjs/models/operations/exportcompanytargetfacilities.js.map +1 -1
  35. package/dist/commonjs/models/operations/index.d.ts +1 -0
  36. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  37. package/dist/commonjs/models/operations/index.js +1 -0
  38. package/dist/commonjs/models/operations/index.js.map +1 -1
  39. package/dist/commonjs/models/operations/listfacilityvendors.d.ts +162 -0
  40. package/dist/commonjs/models/operations/listfacilityvendors.d.ts.map +1 -0
  41. package/dist/commonjs/models/operations/listfacilityvendors.js +150 -0
  42. package/dist/commonjs/models/operations/listfacilityvendors.js.map +1 -0
  43. package/dist/commonjs/models/operations/listvendoradditionalfacilityfields.d.ts +4 -4
  44. package/dist/commonjs/models/operations/listvendoradditionalfacilityfields.d.ts.map +1 -1
  45. package/dist/commonjs/models/operations/listvendoradditionalfacilityfields.js +6 -7
  46. package/dist/commonjs/models/operations/listvendoradditionalfacilityfields.js.map +1 -1
  47. package/dist/commonjs/react-query/index.d.ts +1 -0
  48. package/dist/commonjs/react-query/index.d.ts.map +1 -1
  49. package/dist/commonjs/react-query/index.js +1 -0
  50. package/dist/commonjs/react-query/index.js.map +1 -1
  51. package/dist/commonjs/react-query/organizationsExportCompanyTargetFacilities.core.d.ts +1 -1
  52. package/dist/commonjs/react-query/organizationsExportCompanyTargetFacilities.core.d.ts.map +1 -1
  53. package/dist/commonjs/react-query/organizationsExportCompanyTargetFacilities.core.js.map +1 -1
  54. package/dist/commonjs/react-query/organizationsExportCompanyTargetFacilities.d.ts +2 -2
  55. package/dist/commonjs/react-query/organizationsExportCompanyTargetFacilities.d.ts.map +1 -1
  56. package/dist/commonjs/react-query/organizationsExportCompanyTargetFacilities.js.map +1 -1
  57. package/dist/commonjs/react-query/organizationsListFacilityVendors.core.d.ts +42 -0
  58. package/dist/commonjs/react-query/organizationsListFacilityVendors.core.d.ts.map +1 -0
  59. package/dist/commonjs/react-query/organizationsListFacilityVendors.core.js +99 -0
  60. package/dist/commonjs/react-query/organizationsListFacilityVendors.core.js.map +1 -0
  61. package/dist/commonjs/react-query/organizationsListFacilityVendors.d.ts +142 -0
  62. package/dist/commonjs/react-query/organizationsListFacilityVendors.d.ts.map +1 -0
  63. package/dist/commonjs/react-query/organizationsListFacilityVendors.js +180 -0
  64. package/dist/commonjs/react-query/organizationsListFacilityVendors.js.map +1 -0
  65. package/dist/commonjs/sdk/organizations.d.ts +28 -0
  66. package/dist/commonjs/sdk/organizations.d.ts.map +1 -1
  67. package/dist/commonjs/sdk/organizations.js +29 -0
  68. package/dist/commonjs/sdk/organizations.js.map +1 -1
  69. package/dist/esm/__tests__/organizations.test.js +29 -0
  70. package/dist/esm/__tests__/organizations.test.js.map +1 -1
  71. package/dist/esm/__tests__/webhooks.test.js +1 -1
  72. package/dist/esm/__tests__/webhooks.test.js.map +1 -1
  73. package/dist/esm/__tests__/zones.test.js +30 -2
  74. package/dist/esm/__tests__/zones.test.js.map +1 -1
  75. package/dist/esm/admin-funcs/companyManagerGetPaymentForm.d.ts +3 -0
  76. package/dist/esm/admin-funcs/companyManagerGetPaymentForm.d.ts.map +1 -0
  77. package/dist/esm/admin-funcs/companyManagerGetPaymentForm.js +6 -0
  78. package/dist/esm/admin-funcs/companyManagerGetPaymentForm.js.map +1 -0
  79. package/dist/esm/admin-funcs/vendorGetPaymentForm.d.ts +3 -0
  80. package/dist/esm/admin-funcs/vendorGetPaymentForm.d.ts.map +1 -0
  81. package/dist/esm/admin-funcs/vendorGetPaymentForm.js +6 -0
  82. package/dist/esm/admin-funcs/vendorGetPaymentForm.js.map +1 -0
  83. package/dist/esm/funcs/organizationsListFacilityVendors.d.ts +42 -0
  84. package/dist/esm/funcs/organizationsListFacilityVendors.d.ts.map +1 -0
  85. package/dist/esm/funcs/organizationsListFacilityVendors.js +151 -0
  86. package/dist/esm/funcs/organizationsListFacilityVendors.js.map +1 -0
  87. package/dist/esm/hooks/types.d.ts +1 -0
  88. package/dist/esm/hooks/types.d.ts.map +1 -1
  89. package/dist/esm/index.extras.d.ts +8 -0
  90. package/dist/esm/index.extras.d.ts.map +1 -1
  91. package/dist/esm/index.extras.js +8 -0
  92. package/dist/esm/index.extras.js.map +1 -1
  93. package/dist/esm/lib/config.d.ts +4 -4
  94. package/dist/esm/lib/config.js +4 -4
  95. package/dist/esm/lib/sdks.d.ts.map +1 -1
  96. package/dist/esm/lib/sdks.js +13 -4
  97. package/dist/esm/lib/sdks.js.map +1 -1
  98. package/dist/esm/models/operations/exportcompanytargetfacilities.d.ts +4 -4
  99. package/dist/esm/models/operations/exportcompanytargetfacilities.d.ts.map +1 -1
  100. package/dist/esm/models/operations/exportcompanytargetfacilities.js +5 -3
  101. package/dist/esm/models/operations/exportcompanytargetfacilities.js.map +1 -1
  102. package/dist/esm/models/operations/index.d.ts +1 -0
  103. package/dist/esm/models/operations/index.d.ts.map +1 -1
  104. package/dist/esm/models/operations/index.js +1 -0
  105. package/dist/esm/models/operations/index.js.map +1 -1
  106. package/dist/esm/models/operations/listfacilityvendors.d.ts +162 -0
  107. package/dist/esm/models/operations/listfacilityvendors.d.ts.map +1 -0
  108. package/dist/esm/models/operations/listfacilityvendors.js +109 -0
  109. package/dist/esm/models/operations/listfacilityvendors.js.map +1 -0
  110. package/dist/esm/models/operations/listvendoradditionalfacilityfields.d.ts +4 -4
  111. package/dist/esm/models/operations/listvendoradditionalfacilityfields.d.ts.map +1 -1
  112. package/dist/esm/models/operations/listvendoradditionalfacilityfields.js +4 -5
  113. package/dist/esm/models/operations/listvendoradditionalfacilityfields.js.map +1 -1
  114. package/dist/esm/react-query/index.d.ts +1 -0
  115. package/dist/esm/react-query/index.d.ts.map +1 -1
  116. package/dist/esm/react-query/index.js +1 -0
  117. package/dist/esm/react-query/index.js.map +1 -1
  118. package/dist/esm/react-query/organizationsExportCompanyTargetFacilities.core.d.ts +1 -1
  119. package/dist/esm/react-query/organizationsExportCompanyTargetFacilities.core.d.ts.map +1 -1
  120. package/dist/esm/react-query/organizationsExportCompanyTargetFacilities.core.js.map +1 -1
  121. package/dist/esm/react-query/organizationsExportCompanyTargetFacilities.d.ts +2 -2
  122. package/dist/esm/react-query/organizationsExportCompanyTargetFacilities.d.ts.map +1 -1
  123. package/dist/esm/react-query/organizationsExportCompanyTargetFacilities.js.map +1 -1
  124. package/dist/esm/react-query/organizationsListFacilityVendors.core.d.ts +42 -0
  125. package/dist/esm/react-query/organizationsListFacilityVendors.core.d.ts.map +1 -0
  126. package/dist/esm/react-query/organizationsListFacilityVendors.core.js +91 -0
  127. package/dist/esm/react-query/organizationsListFacilityVendors.core.js.map +1 -0
  128. package/dist/esm/react-query/organizationsListFacilityVendors.d.ts +142 -0
  129. package/dist/esm/react-query/organizationsListFacilityVendors.d.ts.map +1 -0
  130. package/dist/esm/react-query/organizationsListFacilityVendors.js +165 -0
  131. package/dist/esm/react-query/organizationsListFacilityVendors.js.map +1 -0
  132. package/dist/esm/sdk/organizations.d.ts +28 -0
  133. package/dist/esm/sdk/organizations.d.ts.map +1 -1
  134. package/dist/esm/sdk/organizations.js +29 -0
  135. package/dist/esm/sdk/organizations.js.map +1 -1
  136. package/jsr.json +1 -1
  137. package/package.json +1 -1
  138. package/src/__tests__/organizations.test.ts +32 -0
  139. package/src/__tests__/webhooks.test.ts +1 -1
  140. package/src/__tests__/zones.test.ts +30 -2
  141. package/src/admin-funcs/companyManagerGetPaymentForm.ts +6 -0
  142. package/src/admin-funcs/vendorGetPaymentForm.ts +6 -0
  143. package/src/funcs/organizationsListFacilityVendors.ts +279 -0
  144. package/src/hooks/types.ts +1 -0
  145. package/src/index.extras.ts +13 -3
  146. package/src/lib/config.ts +4 -4
  147. package/src/lib/sdks.ts +13 -4
  148. package/src/models/operations/exportcompanytargetfacilities.ts +10 -7
  149. package/src/models/operations/index.ts +1 -0
  150. package/src/models/operations/listfacilityvendors.ts +307 -0
  151. package/src/models/operations/listvendoradditionalfacilityfields.ts +26 -15
  152. package/src/react-query/index.ts +1 -0
  153. package/src/react-query/organizationsExportCompanyTargetFacilities.core.ts +3 -1
  154. package/src/react-query/organizationsExportCompanyTargetFacilities.ts +6 -2
  155. package/src/react-query/organizationsListFacilityVendors.core.ts +207 -0
  156. package/src/react-query/organizationsListFacilityVendors.ts +351 -0
  157. package/src/sdk/organizations.ts +39 -0
@@ -0,0 +1,91 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+ import { organizationsListFacilityVendors } from "../funcs/organizationsListFacilityVendors.js";
5
+ import { combineSignals } from "../lib/primitives.js";
6
+ import { unwrapAsync } from "../types/fp.js";
7
+ import { unwrapResultIterator } from "../types/operations.js";
8
+ import { pageIteratorToJSON } from "./_types.js";
9
+ export function prefetchOrganizationsListFacilityVendors(queryClient, client$, request, options) {
10
+ return queryClient.prefetchQuery({
11
+ ...buildOrganizationsListFacilityVendorsQuery(client$, request, options),
12
+ });
13
+ }
14
+ export function prefetchOrganizationsListFacilityVendorsInfinite(queryClient, client$, request, options) {
15
+ return queryClient.prefetchInfiniteQuery({
16
+ ...buildOrganizationsListFacilityVendorsInfiniteQuery(client$, request, options),
17
+ initialPageParam: undefined,
18
+ getNextPageParam: (previousPage) => previousPage["~next"],
19
+ });
20
+ }
21
+ export function buildOrganizationsListFacilityVendorsQuery(client$, request, options) {
22
+ return {
23
+ queryKey: queryKeyOrganizationsListFacilityVendors(request.id, {
24
+ companyId: request.companyId,
25
+ status: request.status,
26
+ search: request.search,
27
+ page: request.page,
28
+ itemsPerPage: request.itemsPerPage,
29
+ sort: request.sort,
30
+ desc: request.desc,
31
+ }),
32
+ queryFn: async function organizationsListFacilityVendorsQueryFn(ctx) {
33
+ const sig = combineSignals(ctx.signal, options?.signal, options?.fetchOptions?.signal);
34
+ const mergedOptions = {
35
+ ...options?.fetchOptions,
36
+ ...options,
37
+ signal: sig,
38
+ };
39
+ return unwrapAsync(organizationsListFacilityVendors(client$, request, mergedOptions));
40
+ },
41
+ };
42
+ }
43
+ export function buildOrganizationsListFacilityVendorsInfiniteQuery(client$, request, options) {
44
+ return {
45
+ queryKey: queryKeyOrganizationsListFacilityVendorsInfinite(request.id, {
46
+ companyId: request.companyId,
47
+ status: request.status,
48
+ search: request.search,
49
+ page: request.page,
50
+ itemsPerPage: request.itemsPerPage,
51
+ sort: request.sort,
52
+ desc: request.desc,
53
+ }),
54
+ queryFn: async function organizationsListFacilityVendorsQuery(ctx) {
55
+ const sig = combineSignals(ctx.signal, options?.fetchOptions?.signal);
56
+ const mergedOptions = {
57
+ ...options,
58
+ fetchOptions: { ...options?.fetchOptions, signal: sig },
59
+ };
60
+ if (!ctx.pageParam) {
61
+ const pageResult = await unwrapResultIterator(organizationsListFacilityVendors(client$, request, mergedOptions));
62
+ return pageIteratorToJSON(pageResult);
63
+ }
64
+ const pageResult = await unwrapResultIterator(organizationsListFacilityVendors(client$, {
65
+ ...request,
66
+ page: ctx.pageParam.page,
67
+ }, mergedOptions));
68
+ return pageIteratorToJSON(pageResult);
69
+ },
70
+ };
71
+ }
72
+ export function queryKeyOrganizationsListFacilityVendors(id, parameters) {
73
+ return [
74
+ "@greensecurity/javascript-sdk",
75
+ "organizations",
76
+ "listFacilityVendors",
77
+ id,
78
+ parameters,
79
+ ];
80
+ }
81
+ export function queryKeyOrganizationsListFacilityVendorsInfinite(id, parameters) {
82
+ return [
83
+ "@greensecurity/javascript-sdk",
84
+ "organizations",
85
+ "listFacilityVendors",
86
+ "infinite",
87
+ id,
88
+ parameters,
89
+ ];
90
+ }
91
+ //# sourceMappingURL=organizationsListFacilityVendors.core.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organizationsListFacilityVendors.core.js","sourceRoot":"","sources":["../../../src/react-query/organizationsListFacilityVendors.core.ts"],"names":[],"mappings":"AAAA;;GAEG;AAQH,OAAO,EAAE,gCAAgC,EAAE,MAAM,8CAA8C,CAAC;AAChG,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAItD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAgB,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAcjD,MAAM,UAAU,wCAAwC,CACtD,WAAwB,EACxB,OAA0B,EAC1B,OAA8C,EAC9C,OAAwB;IAExB,OAAO,WAAW,CAAC,aAAa,CAAC;QAC/B,GAAG,0CAA0C,CAC3C,OAAO,EACP,OAAO,EACP,OAAO,CACR;KACF,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,gDAAgD,CAC9D,WAAwB,EACxB,OAA0B,EAC1B,OAA8C,EAC9C,OAAwB;IAExB,OAAO,WAAW,CAAC,qBAAqB,CAAC;QACvC,GAAG,kDAAkD,CACnD,OAAO,EACP,OAAO,EACP,OAAO,CACR;QACD,gBAAgB,EAAE,SAAuD;QACzE,gBAAgB,EAAE,CAChB,YAA+D,EAC/D,EAAE,CAAC,YAAY,CAAC,OAAO,CAAC;KAC3B,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,0CAA0C,CACxD,OAA0B,EAC1B,OAA8C,EAC9C,OAAwB;IAOxB,OAAO;QACL,QAAQ,EAAE,wCAAwC,CAAC,OAAO,CAAC,EAAE,EAAE;YAC7D,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,YAAY,EAAE,OAAO,CAAC,YAAY;YAClC,IAAI,EAAE,OAAO,CAAC,IAAI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3C,gCAAgC,CAC9B,OAAO,EACP,OAAO,EACP,aAAa,CACd,CACF,CAAC;gBACF,OAAO,kBAAkB,CAAC,UAAU,CAAC,CAAC;YACxC,CAAC;YACD,MAAM,UAAU,GAAG,MAAM,oBAAoB,CAC3C,gCAAgC,CAC9B,OAAO,EACP;gBACE,GAAG,OAAO;gBACV,IAAI,EAAE,GAAG,CAAC,SAAS,CAAC,IAAI;aACzB,EACD,aAAa,CACd,CACF,CAAC;YACF,OAAO,kBAAkB,CAAC,UAAU,CAAC,CAAC;QACxC,CAAC;KACF,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,wCAAwC,CACtD,EAAU,EACV,UAQC;IAED,OAAO;QACL,+BAA+B;QAC/B,eAAe;QACf,qBAAqB;QACrB,EAAE;QACF,UAAU;KACX,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,gDAAgD,CAC9D,EAAU,EACV,UAQC;IAED,OAAO;QACL,+BAA+B;QAC/B,eAAe;QACf,qBAAqB;QACrB,UAAU;QACV,EAAE;QACF,UAAU;KACX,CAAC;AACJ,CAAC"}
@@ -0,0 +1,142 @@
1
+ import { InfiniteData, InvalidateQueryFilters, QueryClient, UseInfiniteQueryResult, UseQueryResult, UseSuspenseInfiniteQueryResult, UseSuspenseQueryResult } from "@tanstack/react-query";
2
+ import * as components from "../models/components/index.js";
3
+ import { GreenSecurityError } from "../models/errors/greensecurityerror.js";
4
+ import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
5
+ import * as errors from "../models/errors/index.js";
6
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
7
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
8
+ import * as operations from "../models/operations/index.js";
9
+ import { InfiniteQueryHookOptions, QueryHookOptions, SuspenseInfiniteQueryHookOptions, SuspenseQueryHookOptions, TupleToPrefixes } from "./_types.js";
10
+ import { buildOrganizationsListFacilityVendorsInfiniteQuery, buildOrganizationsListFacilityVendorsQuery, OrganizationsListFacilityVendorsInfiniteQueryData, OrganizationsListFacilityVendorsPageParams, OrganizationsListFacilityVendorsQueryData, prefetchOrganizationsListFacilityVendors, prefetchOrganizationsListFacilityVendorsInfinite, queryKeyOrganizationsListFacilityVendors, queryKeyOrganizationsListFacilityVendorsInfinite } from "./organizationsListFacilityVendors.core.js";
11
+ export { buildOrganizationsListFacilityVendorsInfiniteQuery, buildOrganizationsListFacilityVendorsQuery, type OrganizationsListFacilityVendorsInfiniteQueryData, type OrganizationsListFacilityVendorsPageParams, type OrganizationsListFacilityVendorsQueryData, prefetchOrganizationsListFacilityVendors, prefetchOrganizationsListFacilityVendorsInfinite, queryKeyOrganizationsListFacilityVendors, queryKeyOrganizationsListFacilityVendorsInfinite, };
12
+ export type OrganizationsListFacilityVendorsQueryError = errors.ApiErrorResponse | GreenSecurityError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError;
13
+ /**
14
+ * List vendors targeting a facility
15
+ *
16
+ * @remarks
17
+ * Powers the Company Portal → Facility Details page. Returns the
18
+ * paginated list of company-scoped vendor reps that are targeting the
19
+ * given facility, with each row carrying the rep's name + email, their
20
+ * last visit to this facility, their facility access status, and any
21
+ * company custom fields the company has flagged `show_to_vendor` (which
22
+ * is where the "Employee ID" column on the UI lives).
23
+ *
24
+ * Filtering: pass `status=approved|pending|denied` to scope the rows to a
25
+ * single status tab. Pass `search=<term>` for a single search box that
26
+ * matches first name, last name, full name, email, OR any visible custom
27
+ * field value (covering the "search by name / email / Employee ID"
28
+ * requirement).
29
+ *
30
+ * Access control:
31
+ * * Regular users: the URL's `:id` must be in the caller's read scope for
32
+ * Facility (resolved via `has_facility_access_policy`). Out-of-scope or
33
+ * soft-deleted facilities return `404 Facility not found`.
34
+ * * API users: must pass `company_id`. Both the company and the facility
35
+ * must be activated for the caller's marketplace app
36
+ * (`MarketplaceAppActivation`).
37
+ */
38
+ export declare function useOrganizationsListFacilityVendors(request: operations.ListFacilityVendorsRequest, options?: QueryHookOptions<OrganizationsListFacilityVendorsQueryData, OrganizationsListFacilityVendorsQueryError>): UseQueryResult<OrganizationsListFacilityVendorsQueryData, OrganizationsListFacilityVendorsQueryError>;
39
+ /**
40
+ * List vendors targeting a facility
41
+ *
42
+ * @remarks
43
+ * Powers the Company Portal → Facility Details page. Returns the
44
+ * paginated list of company-scoped vendor reps that are targeting the
45
+ * given facility, with each row carrying the rep's name + email, their
46
+ * last visit to this facility, their facility access status, and any
47
+ * company custom fields the company has flagged `show_to_vendor` (which
48
+ * is where the "Employee ID" column on the UI lives).
49
+ *
50
+ * Filtering: pass `status=approved|pending|denied` to scope the rows to a
51
+ * single status tab. Pass `search=<term>` for a single search box that
52
+ * matches first name, last name, full name, email, OR any visible custom
53
+ * field value (covering the "search by name / email / Employee ID"
54
+ * requirement).
55
+ *
56
+ * Access control:
57
+ * * Regular users: the URL's `:id` must be in the caller's read scope for
58
+ * Facility (resolved via `has_facility_access_policy`). Out-of-scope or
59
+ * soft-deleted facilities return `404 Facility not found`.
60
+ * * API users: must pass `company_id`. Both the company and the facility
61
+ * must be activated for the caller's marketplace app
62
+ * (`MarketplaceAppActivation`).
63
+ */
64
+ export declare function useOrganizationsListFacilityVendorsSuspense(request: operations.ListFacilityVendorsRequest, options?: SuspenseQueryHookOptions<OrganizationsListFacilityVendorsQueryData, OrganizationsListFacilityVendorsQueryError>): UseSuspenseQueryResult<OrganizationsListFacilityVendorsQueryData, OrganizationsListFacilityVendorsQueryError>;
65
+ /**
66
+ * List vendors targeting a facility
67
+ *
68
+ * @remarks
69
+ * Powers the Company Portal → Facility Details page. Returns the
70
+ * paginated list of company-scoped vendor reps that are targeting the
71
+ * given facility, with each row carrying the rep's name + email, their
72
+ * last visit to this facility, their facility access status, and any
73
+ * company custom fields the company has flagged `show_to_vendor` (which
74
+ * is where the "Employee ID" column on the UI lives).
75
+ *
76
+ * Filtering: pass `status=approved|pending|denied` to scope the rows to a
77
+ * single status tab. Pass `search=<term>` for a single search box that
78
+ * matches first name, last name, full name, email, OR any visible custom
79
+ * field value (covering the "search by name / email / Employee ID"
80
+ * requirement).
81
+ *
82
+ * Access control:
83
+ * * Regular users: the URL's `:id` must be in the caller's read scope for
84
+ * Facility (resolved via `has_facility_access_policy`). Out-of-scope or
85
+ * soft-deleted facilities return `404 Facility not found`.
86
+ * * API users: must pass `company_id`. Both the company and the facility
87
+ * must be activated for the caller's marketplace app
88
+ * (`MarketplaceAppActivation`).
89
+ */
90
+ export declare function useOrganizationsListFacilityVendorsInfinite(request: operations.ListFacilityVendorsRequest, options?: InfiniteQueryHookOptions<OrganizationsListFacilityVendorsInfiniteQueryData, OrganizationsListFacilityVendorsQueryError>): UseInfiniteQueryResult<InfiniteData<OrganizationsListFacilityVendorsInfiniteQueryData, OrganizationsListFacilityVendorsPageParams>, OrganizationsListFacilityVendorsQueryError>;
91
+ /**
92
+ * List vendors targeting a facility
93
+ *
94
+ * @remarks
95
+ * Powers the Company Portal → Facility Details page. Returns the
96
+ * paginated list of company-scoped vendor reps that are targeting the
97
+ * given facility, with each row carrying the rep's name + email, their
98
+ * last visit to this facility, their facility access status, and any
99
+ * company custom fields the company has flagged `show_to_vendor` (which
100
+ * is where the "Employee ID" column on the UI lives).
101
+ *
102
+ * Filtering: pass `status=approved|pending|denied` to scope the rows to a
103
+ * single status tab. Pass `search=<term>` for a single search box that
104
+ * matches first name, last name, full name, email, OR any visible custom
105
+ * field value (covering the "search by name / email / Employee ID"
106
+ * requirement).
107
+ *
108
+ * Access control:
109
+ * * Regular users: the URL's `:id` must be in the caller's read scope for
110
+ * Facility (resolved via `has_facility_access_policy`). Out-of-scope or
111
+ * soft-deleted facilities return `404 Facility not found`.
112
+ * * API users: must pass `company_id`. Both the company and the facility
113
+ * must be activated for the caller's marketplace app
114
+ * (`MarketplaceAppActivation`).
115
+ */
116
+ export declare function useOrganizationsListFacilityVendorsInfiniteSuspense(request: operations.ListFacilityVendorsRequest, options?: SuspenseInfiniteQueryHookOptions<OrganizationsListFacilityVendorsInfiniteQueryData, OrganizationsListFacilityVendorsQueryError>): UseSuspenseInfiniteQueryResult<InfiniteData<OrganizationsListFacilityVendorsInfiniteQueryData, OrganizationsListFacilityVendorsPageParams>, OrganizationsListFacilityVendorsQueryError>;
117
+ export declare function setOrganizationsListFacilityVendorsData(client: QueryClient, queryKeyBase: [
118
+ id: number,
119
+ parameters: {
120
+ companyId?: number | undefined;
121
+ status?: operations.QueryParamStatus | undefined;
122
+ search?: string | undefined;
123
+ page?: number | undefined;
124
+ itemsPerPage?: number | undefined;
125
+ sort?: operations.ListFacilityVendorsQueryParamSort | undefined;
126
+ desc?: components.Desc | undefined;
127
+ }
128
+ ], data: OrganizationsListFacilityVendorsQueryData): OrganizationsListFacilityVendorsQueryData | undefined;
129
+ export declare function invalidateOrganizationsListFacilityVendors(client: QueryClient, queryKeyBase: TupleToPrefixes<[
130
+ id: number,
131
+ parameters: {
132
+ companyId?: number | undefined;
133
+ status?: operations.QueryParamStatus | undefined;
134
+ search?: string | undefined;
135
+ page?: number | undefined;
136
+ itemsPerPage?: number | undefined;
137
+ sort?: operations.ListFacilityVendorsQueryParamSort | undefined;
138
+ desc?: components.Desc | undefined;
139
+ }
140
+ ]>, filters?: Omit<InvalidateQueryFilters, "queryKey" | "predicate" | "exact">): Promise<void>;
141
+ export declare function invalidateAllOrganizationsListFacilityVendors(client: QueryClient, filters?: Omit<InvalidateQueryFilters, "queryKey" | "predicate" | "exact">): Promise<void>;
142
+ //# sourceMappingURL=organizationsListFacilityVendors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organizationsListFacilityVendors.d.ts","sourceRoot":"","sources":["../../../src/react-query/organizationsListFacilityVendors.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,YAAY,EACZ,sBAAsB,EACtB,WAAW,EAGX,sBAAsB,EAEtB,cAAc,EAEd,8BAA8B,EAE9B,sBAAsB,EACvB,MAAM,uBAAuB,CAAC;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AAS,CAAC;KACpC;CACF,EACD,IAAI,EAAE,yCAAyC,GAC9C,yCAAyC,GAAG,SAAS,CAOvD;AAED,wBAAgB,0CAA0C,CACxD,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,gBAAgB,GAAG,SAAS,CAAC;QACjD,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAC1B,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAClC,IAAI,CAAC,EAAE,UAAU,CAAC,iCAAiC,GAAG,SAAS,CAAC;QAChE,IAAI,CAAC,EAAE,UAAU,CAAC,IAAI,GAAG,SAAS,CAAC;KACpC;CACF,CACF,EACD,OAAO,CAAC,EAAE,IAAI,CAAC,sBAAsB,EAAE,UAAU,GAAG,WAAW,GAAG,OAAO,CAAC,GACzE,OAAO,CAAC,IAAI,CAAC,CAUf;AAED,wBAAgB,6CAA6C,CAC3D,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,165 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+ import { useInfiniteQuery, useQuery, useSuspenseInfiniteQuery, useSuspenseQuery, } from "@tanstack/react-query";
5
+ import { useGreenSecurityContext } from "./_context.js";
6
+ import { buildOrganizationsListFacilityVendorsInfiniteQuery, buildOrganizationsListFacilityVendorsQuery, prefetchOrganizationsListFacilityVendors, prefetchOrganizationsListFacilityVendorsInfinite, queryKeyOrganizationsListFacilityVendors, queryKeyOrganizationsListFacilityVendorsInfinite, } from "./organizationsListFacilityVendors.core.js";
7
+ export { buildOrganizationsListFacilityVendorsInfiniteQuery, buildOrganizationsListFacilityVendorsQuery, prefetchOrganizationsListFacilityVendors, prefetchOrganizationsListFacilityVendorsInfinite, queryKeyOrganizationsListFacilityVendors, queryKeyOrganizationsListFacilityVendorsInfinite, };
8
+ /**
9
+ * List vendors targeting a facility
10
+ *
11
+ * @remarks
12
+ * Powers the Company Portal → Facility Details page. Returns the
13
+ * paginated list of company-scoped vendor reps that are targeting the
14
+ * given facility, with each row carrying the rep's name + email, their
15
+ * last visit to this facility, their facility access status, and any
16
+ * company custom fields the company has flagged `show_to_vendor` (which
17
+ * is where the "Employee ID" column on the UI lives).
18
+ *
19
+ * Filtering: pass `status=approved|pending|denied` to scope the rows to a
20
+ * single status tab. Pass `search=<term>` for a single search box that
21
+ * matches first name, last name, full name, email, OR any visible custom
22
+ * field value (covering the "search by name / email / Employee ID"
23
+ * requirement).
24
+ *
25
+ * Access control:
26
+ * * Regular users: the URL's `:id` must be in the caller's read scope for
27
+ * Facility (resolved via `has_facility_access_policy`). Out-of-scope or
28
+ * soft-deleted facilities return `404 Facility not found`.
29
+ * * API users: must pass `company_id`. Both the company and the facility
30
+ * must be activated for the caller's marketplace app
31
+ * (`MarketplaceAppActivation`).
32
+ */
33
+ export function useOrganizationsListFacilityVendors(request, options) {
34
+ const client = useGreenSecurityContext();
35
+ return useQuery({
36
+ ...buildOrganizationsListFacilityVendorsQuery(client, request, options),
37
+ ...options,
38
+ });
39
+ }
40
+ /**
41
+ * List vendors targeting a facility
42
+ *
43
+ * @remarks
44
+ * Powers the Company Portal → Facility Details page. Returns the
45
+ * paginated list of company-scoped vendor reps that are targeting the
46
+ * given facility, with each row carrying the rep's name + email, their
47
+ * last visit to this facility, their facility access status, and any
48
+ * company custom fields the company has flagged `show_to_vendor` (which
49
+ * is where the "Employee ID" column on the UI lives).
50
+ *
51
+ * Filtering: pass `status=approved|pending|denied` to scope the rows to a
52
+ * single status tab. Pass `search=<term>` for a single search box that
53
+ * matches first name, last name, full name, email, OR any visible custom
54
+ * field value (covering the "search by name / email / Employee ID"
55
+ * requirement).
56
+ *
57
+ * Access control:
58
+ * * Regular users: the URL's `:id` must be in the caller's read scope for
59
+ * Facility (resolved via `has_facility_access_policy`). Out-of-scope or
60
+ * soft-deleted facilities return `404 Facility not found`.
61
+ * * API users: must pass `company_id`. Both the company and the facility
62
+ * must be activated for the caller's marketplace app
63
+ * (`MarketplaceAppActivation`).
64
+ */
65
+ export function useOrganizationsListFacilityVendorsSuspense(request, options) {
66
+ const client = useGreenSecurityContext();
67
+ return useSuspenseQuery({
68
+ ...buildOrganizationsListFacilityVendorsQuery(client, request, options),
69
+ ...options,
70
+ });
71
+ }
72
+ /**
73
+ * List vendors targeting a facility
74
+ *
75
+ * @remarks
76
+ * Powers the Company Portal → Facility Details page. Returns the
77
+ * paginated list of company-scoped vendor reps that are targeting the
78
+ * given facility, with each row carrying the rep's name + email, their
79
+ * last visit to this facility, their facility access status, and any
80
+ * company custom fields the company has flagged `show_to_vendor` (which
81
+ * is where the "Employee ID" column on the UI lives).
82
+ *
83
+ * Filtering: pass `status=approved|pending|denied` to scope the rows to a
84
+ * single status tab. Pass `search=<term>` for a single search box that
85
+ * matches first name, last name, full name, email, OR any visible custom
86
+ * field value (covering the "search by name / email / Employee ID"
87
+ * requirement).
88
+ *
89
+ * Access control:
90
+ * * Regular users: the URL's `:id` must be in the caller's read scope for
91
+ * Facility (resolved via `has_facility_access_policy`). Out-of-scope or
92
+ * soft-deleted facilities return `404 Facility not found`.
93
+ * * API users: must pass `company_id`. Both the company and the facility
94
+ * must be activated for the caller's marketplace app
95
+ * (`MarketplaceAppActivation`).
96
+ */
97
+ export function useOrganizationsListFacilityVendorsInfinite(request, options) {
98
+ const client = useGreenSecurityContext();
99
+ return useInfiniteQuery({
100
+ ...buildOrganizationsListFacilityVendorsInfiniteQuery(client, request, options),
101
+ initialPageParam: options?.initialPageParam,
102
+ getNextPageParam: (previousPage) => previousPage["~next"],
103
+ ...options,
104
+ });
105
+ }
106
+ /**
107
+ * List vendors targeting a facility
108
+ *
109
+ * @remarks
110
+ * Powers the Company Portal → Facility Details page. Returns the
111
+ * paginated list of company-scoped vendor reps that are targeting the
112
+ * given facility, with each row carrying the rep's name + email, their
113
+ * last visit to this facility, their facility access status, and any
114
+ * company custom fields the company has flagged `show_to_vendor` (which
115
+ * is where the "Employee ID" column on the UI lives).
116
+ *
117
+ * Filtering: pass `status=approved|pending|denied` to scope the rows to a
118
+ * single status tab. Pass `search=<term>` for a single search box that
119
+ * matches first name, last name, full name, email, OR any visible custom
120
+ * field value (covering the "search by name / email / Employee ID"
121
+ * requirement).
122
+ *
123
+ * Access control:
124
+ * * Regular users: the URL's `:id` must be in the caller's read scope for
125
+ * Facility (resolved via `has_facility_access_policy`). Out-of-scope or
126
+ * soft-deleted facilities return `404 Facility not found`.
127
+ * * API users: must pass `company_id`. Both the company and the facility
128
+ * must be activated for the caller's marketplace app
129
+ * (`MarketplaceAppActivation`).
130
+ */
131
+ export function useOrganizationsListFacilityVendorsInfiniteSuspense(request, options) {
132
+ const client = useGreenSecurityContext();
133
+ return useSuspenseInfiniteQuery({
134
+ ...buildOrganizationsListFacilityVendorsInfiniteQuery(client, request, options),
135
+ initialPageParam: options?.initialPageParam,
136
+ getNextPageParam: (previousPage) => previousPage["~next"],
137
+ ...options,
138
+ });
139
+ }
140
+ export function setOrganizationsListFacilityVendorsData(client, queryKeyBase, data) {
141
+ const key = queryKeyOrganizationsListFacilityVendors(...queryKeyBase);
142
+ return client.setQueryData(key, data);
143
+ }
144
+ export function invalidateOrganizationsListFacilityVendors(client, queryKeyBase, filters) {
145
+ return client.invalidateQueries({
146
+ ...filters,
147
+ queryKey: [
148
+ "@greensecurity/javascript-sdk",
149
+ "organizations",
150
+ "listFacilityVendors",
151
+ ...queryKeyBase,
152
+ ],
153
+ });
154
+ }
155
+ export function invalidateAllOrganizationsListFacilityVendors(client, filters) {
156
+ return client.invalidateQueries({
157
+ ...filters,
158
+ queryKey: [
159
+ "@greensecurity/javascript-sdk",
160
+ "organizations",
161
+ "listFacilityVendors",
162
+ ],
163
+ });
164
+ }
165
+ //# sourceMappingURL=organizationsListFacilityVendors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organizationsListFacilityVendors.js","sourceRoot":"","sources":["../../../src/react-query/organizationsListFacilityVendors.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAKL,gBAAgB,EAEhB,QAAQ,EAER,wBAAwB,EAExB,gBAAgB,GAEjB,MAAM,uBAAuB,CAAC;AAc/B,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAQxD,OAAO,EACL,kDAAkD,EAClD,0CAA0C,EAI1C,wCAAwC,EACxC,gDAAgD,EAChD,wCAAwC,EACxC,gDAAgD,GACjD,MAAM,4CAA4C,CAAC;AACpD,OAAO,EACL,kDAAkD,EAClD,0CAA0C,EAI1C,wCAAwC,EACxC,gDAAgD,EAChD,wCAAwC,EACxC,gDAAgD,GACjD,CAAC;AAaF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,UAAU,mCAAmC,CACjD,OAA8C,EAC9C,OAGC;IAKD,MAAM,MAAM,GAAG,uBAAuB,EAAE,CAAC;IACzC,OAAO,QAAQ,CAAC;QACd,GAAG,0CAA0C,CAC3C,MAAM,EACN,OAAO,EACP,OAAO,CACR;QACD,GAAG,OAAO;KACX,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,UAAU,2CAA2C,CACzD,OAA8C,EAC9C,OAGC;IAKD,MAAM,MAAM,GAAG,uBAAuB,EAAE,CAAC;IACzC,OAAO,gBAAgB,CAAC;QACtB,GAAG,0CAA0C,CAC3C,MAAM,EACN,OAAO,EACP,OAAO,CACR;QACD,GAAG,OAAO;KACX,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;GA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AM,CAAC,iBAAiB,CAAC;QAC9B,GAAG,OAAO;QACV,QAAQ,EAAE;YACR,+BAA+B;YAC/B,eAAe;YACf,qBAAqB;SACtB;KACF,CAAC,CAAC;AACL,CAAC"}
@@ -71,6 +71,34 @@ export declare class Organizations extends ClientSDK {
71
71
  * If the export is still being generated, returns 202 with a JSON `{ ready: false }` payload.
72
72
  */
73
73
  downloadCompanyTargetFacilitiesExport(request: operations.DownloadCompanyTargetFacilitiesExportRequest, options?: RequestOptions): Promise<operations.DownloadCompanyTargetFacilitiesExportResponse | undefined>;
74
+ /**
75
+ * List vendors targeting a facility
76
+ *
77
+ * @remarks
78
+ * Powers the Company Portal → Facility Details page. Returns the
79
+ * paginated list of company-scoped vendor reps that are targeting the
80
+ * given facility, with each row carrying the rep's name + email, their
81
+ * last visit to this facility, their facility access status, and any
82
+ * company custom fields the company has flagged `show_to_vendor` (which
83
+ * is where the "Employee ID" column on the UI lives).
84
+ *
85
+ * Filtering: pass `status=approved|pending|denied` to scope the rows to a
86
+ * single status tab. Pass `search=<term>` for a single search box that
87
+ * matches first name, last name, full name, email, OR any visible custom
88
+ * field value (covering the "search by name / email / Employee ID"
89
+ * requirement).
90
+ *
91
+ * Access control:
92
+ * * Regular users: the URL's `:id` must be in the caller's read scope for
93
+ * Facility (resolved via `has_facility_access_policy`). Out-of-scope or
94
+ * soft-deleted facilities return `404 Facility not found`.
95
+ * * API users: must pass `company_id`. Both the company and the facility
96
+ * must be activated for the caller's marketplace app
97
+ * (`MarketplaceAppActivation`).
98
+ */
99
+ listFacilityVendors(request: operations.ListFacilityVendorsRequest, options?: RequestOptions): Promise<PageIterator<operations.ListFacilityVendorsResponse, {
100
+ page: number;
101
+ }>>;
74
102
  /**
75
103
  * List or search department contacts
76
104
  *
@@ -1 +1 @@
1
- {"version":3,"file":"organizations.d.ts","sourceRoot":"","sources":["../../../src/sdk/organizations.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,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C;IAQhE;;;;;;OAMG;IACG,sCAAsC,CAC1C,OAAO,EAAE,UAAU,CAAC,6CAA6C,EACjE,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,kDAAkD,CAAC;IAQzE;;;;;;OAMG;IACG,qCAAqC,CACzC,OAAO,EAAE,UAAU,CAAC,4CAA4C,EAChE,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CACR,UAAU,CAAC,6CAA6C,GAAG,SAAS,CACrE;IAQD;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACG,mBAAmB,CACvB,OAAO,EAAE,UAAU,CAAC,0BAA0B,EAC9C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CACR,YAAY,CAAC,UAAU,CAAC,2BAA2B,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CACvE;IAQD;;;;;;;;;;OAUG;IACG,8BAA8B,CAClC,OAAO,EAAE,UAAU,CAAC,qCAAqC,EACzD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CACR,YAAY,CACV,UAAU,CAAC,sCAAsC,EACjD;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CACjB,CACF;CAOF"}
@@ -5,6 +5,7 @@ import { organizationsDownloadCompanyTargetFacilitiesExport } from "../funcs/org
5
5
  import { organizationsExportCompanyTargetFacilities } from "../funcs/organizationsExportCompanyTargetFacilities.js";
6
6
  import { organizationsGetCompanyTargetFacilitiesExportStatus } from "../funcs/organizationsGetCompanyTargetFacilitiesExportStatus.js";
7
7
  import { organizationsGetFacility } from "../funcs/organizationsGetFacility.js";
8
+ import { organizationsListFacilityVendors } from "../funcs/organizationsListFacilityVendors.js";
8
9
  import { organizationsListOrSearchDepartmentContacts } from "../funcs/organizationsListOrSearchDepartmentContacts.js";
9
10
  import { organizationsListOrSearchDepartments } from "../funcs/organizationsListOrSearchDepartments.js";
10
11
  import { organizationsListOrSearchFacilities } from "../funcs/organizationsListOrSearchFacilities.js";
@@ -88,6 +89,34 @@ export class Organizations extends ClientSDK {
88
89
  async downloadCompanyTargetFacilitiesExport(request, options) {
89
90
  return unwrapAsync(organizationsDownloadCompanyTargetFacilitiesExport(this, request, options));
90
91
  }
92
+ /**
93
+ * List vendors targeting a facility
94
+ *
95
+ * @remarks
96
+ * Powers the Company Portal → Facility Details page. Returns the
97
+ * paginated list of company-scoped vendor reps that are targeting the
98
+ * given facility, with each row carrying the rep's name + email, their
99
+ * last visit to this facility, their facility access status, and any
100
+ * company custom fields the company has flagged `show_to_vendor` (which
101
+ * is where the "Employee ID" column on the UI lives).
102
+ *
103
+ * Filtering: pass `status=approved|pending|denied` to scope the rows to a
104
+ * single status tab. Pass `search=<term>` for a single search box that
105
+ * matches first name, last name, full name, email, OR any visible custom
106
+ * field value (covering the "search by name / email / Employee ID"
107
+ * requirement).
108
+ *
109
+ * Access control:
110
+ * * Regular users: the URL's `:id` must be in the caller's read scope for
111
+ * Facility (resolved via `has_facility_access_policy`). Out-of-scope or
112
+ * soft-deleted facilities return `404 Facility not found`.
113
+ * * API users: must pass `company_id`. Both the company and the facility
114
+ * must be activated for the caller's marketplace app
115
+ * (`MarketplaceAppActivation`).
116
+ */
117
+ async listFacilityVendors(request, options) {
118
+ return unwrapResultIterator(organizationsListFacilityVendors(this, request, options));
119
+ }
91
120
  /**
92
121
  * List or search department contacts
93
122
  *
@@ -1 +1 @@
1
- {"version":3,"file":"organizations.js","sourceRoot":"","sources":["../../../src/sdk/organizations.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,kDAAkD,EAAE,MAAM,gEAAgE,CAAC;AACpI,OAAO,EAAE,0CAA0C,EAAE,MAAM,wDAAwD,CAAC;AACpH,OAAO,EAAE,mDAAmD,EAAE,MAAM,iEAAiE,CAAC;AACtI,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,EAAE,2CAA2C,EAAE,MAAM,yDAAyD,CAAC;AACtH,OAAO,EAAE,oCAAo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B,CACzC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,uBAAuB,CAC3B,OAAkD,EAClD,OAAwB;QAIxB,OAAO,oBAAoB,CAAC,oCAAoC,CAC9D,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,KAAK,CAAC,6BAA6B,CACjC,OAAwD,EACxD,OAAwB;QAExB,OAAO,WAAW,CAAC,0CAA0C,CAC3D,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,sCAAsC,CAC1C,OAAiE,EACjE,OAAwB;QAExB,OAAO,WAAW,CAAC,mDAAmD,CACpE,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,qCAAqC,CACzC,OAAgE,EAChE,OAAwB;QAIxB,OAAO,WAAW,CAAC,kDAAkD,CACnE,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,KAAK,CAAC,mBAAmB,CACvB,OAA8C,EAC9C,OAAwB;QAIxB,OAAO,oBAAoB,CAAC,gCAAgC,CAC1D,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;OAUG;IACH,KAAK,CAAC,8BAA8B,CAClC,OAAyD,EACzD,OAAwB;QAOxB,OAAO,oBAAoB,CAAC,2CAA2C,CACrE,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF"}
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@greensecurity/javascript-sdk",
5
- "version": "0.44.0-beta.12",
5
+ "version": "0.44.0-beta.14",
6
6
  "exports": {
7
7
  ".": "./src/index.ts",
8
8
  "./models/errors": "./src/models/errors/index.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@greensecurity/javascript-sdk",
3
- "version": "0.44.0-beta.12",
3
+ "version": "0.44.0-beta.14",
4
4
  "author": "Green Security LLC",
5
5
  "type": "module",
6
6
  "tshy": {
@@ -172,3 +172,35 @@ test("Organizations Download Company Target Facilities Export", async () => {
172
172
  expect(result!.result).toBeDefined();
173
173
  expect(result!.result).toEqual({});
174
174
  });
175
+
176
+ test("Organizations List Facility Vendors", async () => {
177
+ const testHttpClient = createTestHTTPClient("listFacilityVendors");
178
+
179
+ const greenSecurity = new GreenSecurity({
180
+ serverURL: process.env["TEST_SERVER_URL"] ?? "https://localhost:3000/api",
181
+ httpClient: testHttpClient,
182
+ security: {
183
+ token: process.env["GREEN_SECURITY_TOKEN"] ?? "value",
184
+ },
185
+ });
186
+
187
+ const result = await greenSecurity.organizations.listFacilityVendors({
188
+ id: 970801,
189
+ itemsPerPage: 25,
190
+ desc: true,
191
+ });
192
+ expect(result).toBeDefined();
193
+ expect(result!.result).toBeDefined();
194
+ expect(result!.result).toEqual({
195
+ pager: {
196
+ baseUrl: "api/vendors/job_titles",
197
+ sort: "job,title",
198
+ desc: 0,
199
+ itemCount: 228,
200
+ itemsPerPage: 557,
201
+ page: 1,
202
+ useUrlParams: true,
203
+ },
204
+ items: [],
205
+ });
206
+ });
@@ -20,7 +20,7 @@ test("Webhooks List All Webhook Endpoints", async () => {
20
20
  const testWebhookListForVendorUserResult = await greenSecurity.webhooks
21
21
  .listAllWebhookEndpoints({
22
22
  itemsPerPage: 25,
23
- desc: 0,
23
+ desc: true,
24
24
  sort: "",
25
25
  });
26
26
  expect(testWebhookListForVendorUserResult).toBeDefined();
@@ -39,7 +39,35 @@ test("Zones List Or Search Security Zones", async () => {
39
39
  facility: {},
40
40
  },
41
41
  {
42
- facility: {},
42
+ facility: {
43
+ contacts: {
44
+ contact: {
45
+ status: "Inactive",
46
+ department: 123,
47
+ },
48
+ adminContact: {
49
+ status: "Active",
50
+ department: 123,
51
+ },
52
+ techContact: {
53
+ status: "Deleted",
54
+ department: 123,
55
+ },
56
+ greenSecurityCsm: {
57
+ status: "Deleted",
58
+ department: 123,
59
+ },
60
+ accountManager: {
61
+ status: "Inactive",
62
+ department: 123,
63
+ },
64
+ },
65
+ vendorGuestPolicy: {
66
+ enabled: true,
67
+ vendorGuestLimitAndOr: "and",
68
+ vendorGuestRequireEmail: false,
69
+ },
70
+ },
43
71
  },
44
72
  ],
45
73
  });
@@ -58,7 +86,7 @@ test("Zones Security Zone Checkin", async () => {
58
86
 
59
87
  const result = await greenSecurity.zones.securityZoneCheckin({
60
88
  qrCode: "<value>",
61
- zoneId: 544883,
89
+ zoneId: 714947,
62
90
  });
63
91
  expect(result).toBeDefined();
64
92
  expect(result).toEqual({});
@@ -0,0 +1,6 @@
1
+ import { APIPromise } from "../types/async.js";
2
+ import { $doGetSingle, internalApiResult } from "./doAdmin.js";
3
+
4
+ export function companyManagerGetPaymentForm(): internalApiResult {
5
+ return new APIPromise($doGetSingle("/company_managers/me/payment_form", {}));
6
+ }
@@ -0,0 +1,6 @@
1
+ import { APIPromise } from "../types/async.js";
2
+ import { $doGetSingle, internalApiResult } from "./doAdmin.js";
3
+
4
+ export function vendorGetPaymentForm(): internalApiResult {
5
+ return new APIPromise($doGetSingle("/vendors/me/payment_form", {}));
6
+ }