@greensecurity/javascript-sdk 0.44.0-beta.13 → 0.44.0-beta.15

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 (140) 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__/zones.test.js +8 -9
  5. package/dist/commonjs/__tests__/zones.test.js.map +1 -1
  6. package/dist/commonjs/admin-funcs/companyManagerGetPaymentForm.d.ts +3 -0
  7. package/dist/commonjs/admin-funcs/companyManagerGetPaymentForm.d.ts.map +1 -0
  8. package/dist/commonjs/admin-funcs/companyManagerGetPaymentForm.js +9 -0
  9. package/dist/commonjs/admin-funcs/companyManagerGetPaymentForm.js.map +1 -0
  10. package/dist/commonjs/admin-funcs/vendorGetPaymentForm.d.ts +3 -0
  11. package/dist/commonjs/admin-funcs/vendorGetPaymentForm.d.ts.map +1 -0
  12. package/dist/commonjs/admin-funcs/vendorGetPaymentForm.js +9 -0
  13. package/dist/commonjs/admin-funcs/vendorGetPaymentForm.js.map +1 -0
  14. package/dist/commonjs/funcs/organizationsListFacilityVendors.d.ts +42 -0
  15. package/dist/commonjs/funcs/organizationsListFacilityVendors.d.ts.map +1 -0
  16. package/dist/commonjs/funcs/organizationsListFacilityVendors.js +187 -0
  17. package/dist/commonjs/funcs/organizationsListFacilityVendors.js.map +1 -0
  18. package/dist/commonjs/index.extras.d.ts +8 -0
  19. package/dist/commonjs/index.extras.d.ts.map +1 -1
  20. package/dist/commonjs/index.extras.js +8 -0
  21. package/dist/commonjs/index.extras.js.map +1 -1
  22. package/dist/commonjs/lib/config.d.ts +2 -2
  23. package/dist/commonjs/lib/config.js +2 -2
  24. package/dist/commonjs/models/operations/exportcompanytargetfacilities.d.ts +4 -4
  25. package/dist/commonjs/models/operations/exportcompanytargetfacilities.d.ts.map +1 -1
  26. package/dist/commonjs/models/operations/exportcompanytargetfacilities.js +6 -4
  27. package/dist/commonjs/models/operations/exportcompanytargetfacilities.js.map +1 -1
  28. package/dist/commonjs/models/operations/index.d.ts +1 -0
  29. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  30. package/dist/commonjs/models/operations/index.js +1 -0
  31. package/dist/commonjs/models/operations/index.js.map +1 -1
  32. package/dist/commonjs/models/operations/listfacilityvendors.d.ts +162 -0
  33. package/dist/commonjs/models/operations/listfacilityvendors.d.ts.map +1 -0
  34. package/dist/commonjs/models/operations/listfacilityvendors.js +150 -0
  35. package/dist/commonjs/models/operations/listfacilityvendors.js.map +1 -0
  36. package/dist/commonjs/models/operations/listvendoradditionalfacilityfields.d.ts +4 -4
  37. package/dist/commonjs/models/operations/listvendoradditionalfacilityfields.d.ts.map +1 -1
  38. package/dist/commonjs/models/operations/listvendoradditionalfacilityfields.js +6 -7
  39. package/dist/commonjs/models/operations/listvendoradditionalfacilityfields.js.map +1 -1
  40. package/dist/commonjs/react-query/index.d.ts +1 -0
  41. package/dist/commonjs/react-query/index.d.ts.map +1 -1
  42. package/dist/commonjs/react-query/index.js +1 -0
  43. package/dist/commonjs/react-query/index.js.map +1 -1
  44. package/dist/commonjs/react-query/organizationsExportCompanyTargetFacilities.core.d.ts +1 -1
  45. package/dist/commonjs/react-query/organizationsExportCompanyTargetFacilities.core.d.ts.map +1 -1
  46. package/dist/commonjs/react-query/organizationsExportCompanyTargetFacilities.core.js.map +1 -1
  47. package/dist/commonjs/react-query/organizationsExportCompanyTargetFacilities.d.ts +2 -2
  48. package/dist/commonjs/react-query/organizationsExportCompanyTargetFacilities.d.ts.map +1 -1
  49. package/dist/commonjs/react-query/organizationsExportCompanyTargetFacilities.js.map +1 -1
  50. package/dist/commonjs/react-query/organizationsListFacilityVendors.core.d.ts +42 -0
  51. package/dist/commonjs/react-query/organizationsListFacilityVendors.core.d.ts.map +1 -0
  52. package/dist/commonjs/react-query/organizationsListFacilityVendors.core.js +99 -0
  53. package/dist/commonjs/react-query/organizationsListFacilityVendors.core.js.map +1 -0
  54. package/dist/commonjs/react-query/organizationsListFacilityVendors.d.ts +142 -0
  55. package/dist/commonjs/react-query/organizationsListFacilityVendors.d.ts.map +1 -0
  56. package/dist/commonjs/react-query/organizationsListFacilityVendors.js +180 -0
  57. package/dist/commonjs/react-query/organizationsListFacilityVendors.js.map +1 -0
  58. package/dist/commonjs/sdk/organizations.d.ts +28 -0
  59. package/dist/commonjs/sdk/organizations.d.ts.map +1 -1
  60. package/dist/commonjs/sdk/organizations.js +29 -0
  61. package/dist/commonjs/sdk/organizations.js.map +1 -1
  62. package/dist/esm/__tests__/organizations.test.js +29 -0
  63. package/dist/esm/__tests__/organizations.test.js.map +1 -1
  64. package/dist/esm/__tests__/zones.test.js +8 -9
  65. package/dist/esm/__tests__/zones.test.js.map +1 -1
  66. package/dist/esm/admin-funcs/companyManagerGetPaymentForm.d.ts +3 -0
  67. package/dist/esm/admin-funcs/companyManagerGetPaymentForm.d.ts.map +1 -0
  68. package/dist/esm/admin-funcs/companyManagerGetPaymentForm.js +6 -0
  69. package/dist/esm/admin-funcs/companyManagerGetPaymentForm.js.map +1 -0
  70. package/dist/esm/admin-funcs/vendorGetPaymentForm.d.ts +3 -0
  71. package/dist/esm/admin-funcs/vendorGetPaymentForm.d.ts.map +1 -0
  72. package/dist/esm/admin-funcs/vendorGetPaymentForm.js +6 -0
  73. package/dist/esm/admin-funcs/vendorGetPaymentForm.js.map +1 -0
  74. package/dist/esm/funcs/organizationsListFacilityVendors.d.ts +42 -0
  75. package/dist/esm/funcs/organizationsListFacilityVendors.d.ts.map +1 -0
  76. package/dist/esm/funcs/organizationsListFacilityVendors.js +151 -0
  77. package/dist/esm/funcs/organizationsListFacilityVendors.js.map +1 -0
  78. package/dist/esm/index.extras.d.ts +8 -0
  79. package/dist/esm/index.extras.d.ts.map +1 -1
  80. package/dist/esm/index.extras.js +8 -0
  81. package/dist/esm/index.extras.js.map +1 -1
  82. package/dist/esm/lib/config.d.ts +2 -2
  83. package/dist/esm/lib/config.js +2 -2
  84. package/dist/esm/models/operations/exportcompanytargetfacilities.d.ts +4 -4
  85. package/dist/esm/models/operations/exportcompanytargetfacilities.d.ts.map +1 -1
  86. package/dist/esm/models/operations/exportcompanytargetfacilities.js +5 -3
  87. package/dist/esm/models/operations/exportcompanytargetfacilities.js.map +1 -1
  88. package/dist/esm/models/operations/index.d.ts +1 -0
  89. package/dist/esm/models/operations/index.d.ts.map +1 -1
  90. package/dist/esm/models/operations/index.js +1 -0
  91. package/dist/esm/models/operations/index.js.map +1 -1
  92. package/dist/esm/models/operations/listfacilityvendors.d.ts +162 -0
  93. package/dist/esm/models/operations/listfacilityvendors.d.ts.map +1 -0
  94. package/dist/esm/models/operations/listfacilityvendors.js +109 -0
  95. package/dist/esm/models/operations/listfacilityvendors.js.map +1 -0
  96. package/dist/esm/models/operations/listvendoradditionalfacilityfields.d.ts +4 -4
  97. package/dist/esm/models/operations/listvendoradditionalfacilityfields.d.ts.map +1 -1
  98. package/dist/esm/models/operations/listvendoradditionalfacilityfields.js +4 -5
  99. package/dist/esm/models/operations/listvendoradditionalfacilityfields.js.map +1 -1
  100. package/dist/esm/react-query/index.d.ts +1 -0
  101. package/dist/esm/react-query/index.d.ts.map +1 -1
  102. package/dist/esm/react-query/index.js +1 -0
  103. package/dist/esm/react-query/index.js.map +1 -1
  104. package/dist/esm/react-query/organizationsExportCompanyTargetFacilities.core.d.ts +1 -1
  105. package/dist/esm/react-query/organizationsExportCompanyTargetFacilities.core.d.ts.map +1 -1
  106. package/dist/esm/react-query/organizationsExportCompanyTargetFacilities.core.js.map +1 -1
  107. package/dist/esm/react-query/organizationsExportCompanyTargetFacilities.d.ts +2 -2
  108. package/dist/esm/react-query/organizationsExportCompanyTargetFacilities.d.ts.map +1 -1
  109. package/dist/esm/react-query/organizationsExportCompanyTargetFacilities.js.map +1 -1
  110. package/dist/esm/react-query/organizationsListFacilityVendors.core.d.ts +42 -0
  111. package/dist/esm/react-query/organizationsListFacilityVendors.core.d.ts.map +1 -0
  112. package/dist/esm/react-query/organizationsListFacilityVendors.core.js +91 -0
  113. package/dist/esm/react-query/organizationsListFacilityVendors.core.js.map +1 -0
  114. package/dist/esm/react-query/organizationsListFacilityVendors.d.ts +142 -0
  115. package/dist/esm/react-query/organizationsListFacilityVendors.d.ts.map +1 -0
  116. package/dist/esm/react-query/organizationsListFacilityVendors.js +165 -0
  117. package/dist/esm/react-query/organizationsListFacilityVendors.js.map +1 -0
  118. package/dist/esm/sdk/organizations.d.ts +28 -0
  119. package/dist/esm/sdk/organizations.d.ts.map +1 -1
  120. package/dist/esm/sdk/organizations.js +29 -0
  121. package/dist/esm/sdk/organizations.js.map +1 -1
  122. package/jsr.json +1 -1
  123. package/package.json +1 -1
  124. package/src/__tests__/organizations.test.ts +32 -0
  125. package/src/__tests__/zones.test.ts +8 -9
  126. package/src/admin-funcs/companyManagerGetPaymentForm.ts +6 -0
  127. package/src/admin-funcs/vendorGetPaymentForm.ts +6 -0
  128. package/src/funcs/organizationsListFacilityVendors.ts +279 -0
  129. package/src/index.extras.ts +13 -3
  130. package/src/lib/config.ts +2 -2
  131. package/src/models/operations/exportcompanytargetfacilities.ts +10 -7
  132. package/src/models/operations/index.ts +1 -0
  133. package/src/models/operations/listfacilityvendors.ts +307 -0
  134. package/src/models/operations/listvendoradditionalfacilityfields.ts +26 -15
  135. package/src/react-query/index.ts +1 -0
  136. package/src/react-query/organizationsExportCompanyTargetFacilities.core.ts +3 -1
  137. package/src/react-query/organizationsExportCompanyTargetFacilities.ts +6 -2
  138. package/src/react-query/organizationsListFacilityVendors.core.ts +207 -0
  139. package/src/react-query/organizationsListFacilityVendors.ts +351 -0
  140. package/src/sdk/organizations.ts +39 -0
@@ -0,0 +1,42 @@
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
+ import { PageIterator } from "../types/operations.js";
7
+ export type OrganizationsListFacilityVendorsQueryData = operations.ListFacilityVendorsResponse;
8
+ export type OrganizationsListFacilityVendorsInfiniteQueryData = PageIterator<operations.ListFacilityVendorsResponse, {
9
+ page: number;
10
+ }>;
11
+ export type OrganizationsListFacilityVendorsPageParams = PageIterator<operations.ListFacilityVendorsResponse, {
12
+ page: number;
13
+ }>["~next"];
14
+ export declare function prefetchOrganizationsListFacilityVendors(queryClient: QueryClient, client$: GreenSecurityCore, request: operations.ListFacilityVendorsRequest, options?: RequestOptions): Promise<void>;
15
+ export declare function prefetchOrganizationsListFacilityVendorsInfinite(queryClient: QueryClient, client$: GreenSecurityCore, request: operations.ListFacilityVendorsRequest, options?: RequestOptions): Promise<void>;
16
+ export declare function buildOrganizationsListFacilityVendorsQuery(client$: GreenSecurityCore, request: operations.ListFacilityVendorsRequest, options?: RequestOptions): {
17
+ queryKey: QueryKey;
18
+ queryFn: (context: QueryFunctionContext) => Promise<OrganizationsListFacilityVendorsQueryData>;
19
+ };
20
+ export declare function buildOrganizationsListFacilityVendorsInfiniteQuery(client$: GreenSecurityCore, request: operations.ListFacilityVendorsRequest, options?: RequestOptions): {
21
+ queryKey: QueryKey;
22
+ queryFn: (context: QueryFunctionContext<QueryKey, OrganizationsListFacilityVendorsPageParams>) => Promise<OrganizationsListFacilityVendorsInfiniteQueryData>;
23
+ };
24
+ export declare function queryKeyOrganizationsListFacilityVendors(id: number, parameters: {
25
+ companyId?: number | undefined;
26
+ status?: operations.QueryParamStatus | undefined;
27
+ search?: string | undefined;
28
+ page?: number | undefined;
29
+ itemsPerPage?: number | undefined;
30
+ sort?: operations.ListFacilityVendorsQueryParamSort | undefined;
31
+ desc?: components.Desc | undefined;
32
+ }): QueryKey;
33
+ export declare function queryKeyOrganizationsListFacilityVendorsInfinite(id: number, parameters: {
34
+ companyId?: number | undefined;
35
+ status?: operations.QueryParamStatus | undefined;
36
+ search?: string | undefined;
37
+ page?: number | undefined;
38
+ itemsPerPage?: number | undefined;
39
+ sort?: operations.ListFacilityVendorsQueryParamSort | undefined;
40
+ desc?: components.Desc | undefined;
41
+ }): QueryKey;
42
+ //# sourceMappingURL=organizationsListFacilityVendors.core.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organizationsListFacilityVendors.core.d.ts","sourceRoot":"","sources":["../../../src/react-query/organizationsListFacilityVendors.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,OAAO,EAAE,YAAY,EAAwB,MAAM,wBAAwB,CAAC;AAE5E,MAAM,MAAM,yCAAyC,GACnD,UAAU,CAAC,2BAA2B,CAAC;AAEzC,MAAM,MAAM,iDAAiD,GAAG,YAAY,CAC1E,UAAU,CAAC,2BAA2B,EACtC;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CACjB,CAAC;AAEF,MAAM,MAAM,0CAA0C,GAAG,YAAY,CACnE,UAAU,CAAC,2BAA2B,EACtC;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CACjB,CAAC,OAAO,CAAC,CAAC;AAEX,wBAAgB,wCAAwC,CACtD,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,iBAAiB,EAC1B,OAAO,EAAE,UAAU,CAAC,0BAA0B,EAC9C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,IAAI,CAAC,CAQf;AAED,wBAAgB,gDAAgD,CAC9D,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,iBAAiB,EAC1B,OAAO,EAAE,UAAU,CAAC,0BAA0B,EAC9C,OAAO,CAAC,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,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,IAAI,CAAC,EAAE,UAAU,CAAC,iCAAiC,GAAG,SAAS,CAAC;IAChE,IAAI,CAAC,EAAE,UAAU,CAAC,IAAI,GAAG,SAAS,CAAC;CACpC,GACA,QAAQ,CASV"}
@@ -0,0 +1,99 @@
1
+ "use strict";
2
+ /*
3
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.prefetchOrganizationsListFacilityVendors = prefetchOrganizationsListFacilityVendors;
7
+ exports.prefetchOrganizationsListFacilityVendorsInfinite = prefetchOrganizationsListFacilityVendorsInfinite;
8
+ exports.buildOrganizationsListFacilityVendorsQuery = buildOrganizationsListFacilityVendorsQuery;
9
+ exports.buildOrganizationsListFacilityVendorsInfiniteQuery = buildOrganizationsListFacilityVendorsInfiniteQuery;
10
+ exports.queryKeyOrganizationsListFacilityVendors = queryKeyOrganizationsListFacilityVendors;
11
+ exports.queryKeyOrganizationsListFacilityVendorsInfinite = queryKeyOrganizationsListFacilityVendorsInfinite;
12
+ const organizationsListFacilityVendors_js_1 = require("../funcs/organizationsListFacilityVendors.js");
13
+ const primitives_js_1 = require("../lib/primitives.js");
14
+ const fp_js_1 = require("../types/fp.js");
15
+ const operations_js_1 = require("../types/operations.js");
16
+ const _types_js_1 = require("./_types.js");
17
+ function prefetchOrganizationsListFacilityVendors(queryClient, client$, request, options) {
18
+ return queryClient.prefetchQuery({
19
+ ...buildOrganizationsListFacilityVendorsQuery(client$, request, options),
20
+ });
21
+ }
22
+ function prefetchOrganizationsListFacilityVendorsInfinite(queryClient, client$, request, options) {
23
+ return queryClient.prefetchInfiniteQuery({
24
+ ...buildOrganizationsListFacilityVendorsInfiniteQuery(client$, request, options),
25
+ initialPageParam: undefined,
26
+ getNextPageParam: (previousPage) => previousPage["~next"],
27
+ });
28
+ }
29
+ function buildOrganizationsListFacilityVendorsQuery(client$, request, options) {
30
+ return {
31
+ queryKey: queryKeyOrganizationsListFacilityVendors(request.id, {
32
+ companyId: request.companyId,
33
+ status: request.status,
34
+ search: request.search,
35
+ page: request.page,
36
+ itemsPerPage: request.itemsPerPage,
37
+ sort: request.sort,
38
+ desc: request.desc,
39
+ }),
40
+ queryFn: async function organizationsListFacilityVendorsQueryFn(ctx) {
41
+ const sig = (0, primitives_js_1.combineSignals)(ctx.signal, options?.signal, options?.fetchOptions?.signal);
42
+ const mergedOptions = {
43
+ ...options?.fetchOptions,
44
+ ...options,
45
+ signal: sig,
46
+ };
47
+ return (0, fp_js_1.unwrapAsync)((0, organizationsListFacilityVendors_js_1.organizationsListFacilityVendors)(client$, request, mergedOptions));
48
+ },
49
+ };
50
+ }
51
+ function buildOrganizationsListFacilityVendorsInfiniteQuery(client$, request, options) {
52
+ return {
53
+ queryKey: queryKeyOrganizationsListFacilityVendorsInfinite(request.id, {
54
+ companyId: request.companyId,
55
+ status: request.status,
56
+ search: request.search,
57
+ page: request.page,
58
+ itemsPerPage: request.itemsPerPage,
59
+ sort: request.sort,
60
+ desc: request.desc,
61
+ }),
62
+ queryFn: async function organizationsListFacilityVendorsQuery(ctx) {
63
+ const sig = (0, primitives_js_1.combineSignals)(ctx.signal, options?.fetchOptions?.signal);
64
+ const mergedOptions = {
65
+ ...options,
66
+ fetchOptions: { ...options?.fetchOptions, signal: sig },
67
+ };
68
+ if (!ctx.pageParam) {
69
+ const pageResult = await (0, operations_js_1.unwrapResultIterator)((0, organizationsListFacilityVendors_js_1.organizationsListFacilityVendors)(client$, request, mergedOptions));
70
+ return (0, _types_js_1.pageIteratorToJSON)(pageResult);
71
+ }
72
+ const pageResult = await (0, operations_js_1.unwrapResultIterator)((0, organizationsListFacilityVendors_js_1.organizationsListFacilityVendors)(client$, {
73
+ ...request,
74
+ page: ctx.pageParam.page,
75
+ }, mergedOptions));
76
+ return (0, _types_js_1.pageIteratorToJSON)(pageResult);
77
+ },
78
+ };
79
+ }
80
+ function queryKeyOrganizationsListFacilityVendors(id, parameters) {
81
+ return [
82
+ "@greensecurity/javascript-sdk",
83
+ "organizations",
84
+ "listFacilityVendors",
85
+ id,
86
+ parameters,
87
+ ];
88
+ }
89
+ function queryKeyOrganizationsListFacilityVendorsInfinite(id, parameters) {
90
+ return [
91
+ "@greensecurity/javascript-sdk",
92
+ "organizations",
93
+ "listFacilityVendors",
94
+ "infinite",
95
+ id,
96
+ parameters,
97
+ ];
98
+ }
99
+ //# 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;;AA6BH,4FAaC;AAED,4GAiBC;AAED,gGAyCC;AAED,gHAuDC;AAED,4FAmBC;AAED,4GAoBC;AApMD,sGAAgG;AAChG,wDAAsD;AAItD,0CAA6C;AAC7C,0DAA4E;AAC5E,2CAAiD;AAcjD,SAAgB,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,SAAgB,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,SAAgB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UAAU,qCAAqC,CAC3D,GAAG;YAEH,MAAM,GAAG,GAAG,IAAA,8BAAc,EAAC,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,CAAC,CAAC;YACtE,MAAM,aAAa,GAAG;gBACpB,GAAG,OAAO;gBACV,YAAY,EAAE,EAAE,GAAG,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,EAAE;aACxD,CAAC;YAEF,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC;gBACnB,MAAM,UAAU,GAAG,MAAM,IAAA,oCAAoB,EAC3C,IAAA,sEAAgC,EAC9B,OAAO,EACP,OAAO,EACP,aAAa,CACd,CACF,CAAC;gBACF,OAAO,IAAA,8BAAkB,EAAC,UAAU,CAAC,CAAC;YACxC,CAAC;YACD,MAAM,UAAU,GAAG,MAAM,IAAA,oCAAoB,EAC3C,IAAA,sEAAgC,EAC9B,OAAO,EACP;gBACE,GAAG,OAAO;gBACV,IAAI,EAAE,GAAG,CAAC,SAAS,CAAC,IAAI;aACzB,EACD,aAAa,CACd,CACF,CAAC;YACF,OAAO,IAAA,8BAAkB,EAAC,UAAU,CAAC,CAAC;QACxC,CAAC;KACF,CAAC;AACJ,CAAC;AAED,SAAgB,wCAAwC,CACtD,EAAU,EACV,UAQC;IAED,OAAO;QACL,+BAA+B;QAC/B,eAAe;QACf,qBAAqB;QACrB,EAAE;QACF,UAAU;KACX,CAAC;AACJ,CAAC;AAED,SAAgB,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;AAC/B,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,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,wBAAwB,EACxB,gBAAgB,EAChB,gCAAgC,EAChC,wBAAwB,EACxB,eAAe,EAChB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,kDAAkD,EAClD,0CAA0C,EAC1C,iDAAiD,EACjD,0CAA0C,EAC1C,yCAAyC,EACzC,wCAAwC,EACxC,gDAAgD,EAChD,wCAAwC,EACxC,gDAAgD,EACjD,MAAM,4CAA4C,CAAC;AACpD,OAAO,EACL,kDAAkD,EAClD,0CAA0C,EAC1C,KAAK,iDAAiD,EACtD,KAAK,0CAA0C,EAC/C,KAAK,yCAAyC,EAC9C,wCAAwC,EACxC,gDAAgD,EAChD,wCAAwC,EACxC,gDAAgD,G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CAAC,GACzE,OAAO,CAAC,IAAI,CAAC,CASf"}
@@ -0,0 +1,180 @@
1
+ "use strict";
2
+ /*
3
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.queryKeyOrganizationsListFacilityVendorsInfinite = exports.queryKeyOrganizationsListFacilityVendors = exports.prefetchOrganizationsListFacilityVendorsInfinite = exports.prefetchOrganizationsListFacilityVendors = exports.buildOrganizationsListFacilityVendorsQuery = exports.buildOrganizationsListFacilityVendorsInfiniteQuery = void 0;
7
+ exports.useOrganizationsListFacilityVendors = useOrganizationsListFacilityVendors;
8
+ exports.useOrganizationsListFacilityVendorsSuspense = useOrganizationsListFacilityVendorsSuspense;
9
+ exports.useOrganizationsListFacilityVendorsInfinite = useOrganizationsListFacilityVendorsInfinite;
10
+ exports.useOrganizationsListFacilityVendorsInfiniteSuspense = useOrganizationsListFacilityVendorsInfiniteSuspense;
11
+ exports.setOrganizationsListFacilityVendorsData = setOrganizationsListFacilityVendorsData;
12
+ exports.invalidateOrganizationsListFacilityVendors = invalidateOrganizationsListFacilityVendors;
13
+ exports.invalidateAllOrganizationsListFacilityVendors = invalidateAllOrganizationsListFacilityVendors;
14
+ const react_query_1 = require("@tanstack/react-query");
15
+ const _context_js_1 = require("./_context.js");
16
+ const organizationsListFacilityVendors_core_js_1 = require("./organizationsListFacilityVendors.core.js");
17
+ Object.defineProperty(exports, "buildOrganizationsListFacilityVendorsInfiniteQuery", { enumerable: true, get: function () { return organizationsListFacilityVendors_core_js_1.buildOrganizationsListFacilityVendorsInfiniteQuery; } });
18
+ Object.defineProperty(exports, "buildOrganizationsListFacilityVendorsQuery", { enumerable: true, get: function () { return organizationsListFacilityVendors_core_js_1.buildOrganizationsListFacilityVendorsQuery; } });
19
+ Object.defineProperty(exports, "prefetchOrganizationsListFacilityVendors", { enumerable: true, get: function () { return organizationsListFacilityVendors_core_js_1.prefetchOrganizationsListFacilityVendors; } });
20
+ Object.defineProperty(exports, "prefetchOrganizationsListFacilityVendorsInfinite", { enumerable: true, get: function () { return organizationsListFacilityVendors_core_js_1.prefetchOrganizationsListFacilityVendorsInfinite; } });
21
+ Object.defineProperty(exports, "queryKeyOrganizationsListFacilityVendors", { enumerable: true, get: function () { return organizationsListFacilityVendors_core_js_1.queryKeyOrganizationsListFacilityVendors; } });
22
+ Object.defineProperty(exports, "queryKeyOrganizationsListFacilityVendorsInfinite", { enumerable: true, get: function () { return organizationsListFacilityVendors_core_js_1.queryKeyOrganizationsListFacilityVendorsInfinite; } });
23
+ /**
24
+ * List vendors targeting a facility
25
+ *
26
+ * @remarks
27
+ * Powers the Company Portal → Facility Details page. Returns the
28
+ * paginated list of company-scoped vendor reps that are targeting the
29
+ * given facility, with each row carrying the rep's name + email, their
30
+ * last visit to this facility, their facility access status, and any
31
+ * company custom fields the company has flagged `show_to_vendor` (which
32
+ * is where the "Employee ID" column on the UI lives).
33
+ *
34
+ * Filtering: pass `status=approved|pending|denied` to scope the rows to a
35
+ * single status tab. Pass `search=<term>` for a single search box that
36
+ * matches first name, last name, full name, email, OR any visible custom
37
+ * field value (covering the "search by name / email / Employee ID"
38
+ * requirement).
39
+ *
40
+ * Access control:
41
+ * * Regular users: the URL's `:id` must be in the caller's read scope for
42
+ * Facility (resolved via `has_facility_access_policy`). Out-of-scope or
43
+ * soft-deleted facilities return `404 Facility not found`.
44
+ * * API users: must pass `company_id`. Both the company and the facility
45
+ * must be activated for the caller's marketplace app
46
+ * (`MarketplaceAppActivation`).
47
+ */
48
+ function useOrganizationsListFacilityVendors(request, options) {
49
+ const client = (0, _context_js_1.useGreenSecurityContext)();
50
+ return (0, react_query_1.useQuery)({
51
+ ...(0, organizationsListFacilityVendors_core_js_1.buildOrganizationsListFacilityVendorsQuery)(client, request, options),
52
+ ...options,
53
+ });
54
+ }
55
+ /**
56
+ * List vendors targeting a facility
57
+ *
58
+ * @remarks
59
+ * Powers the Company Portal → Facility Details page. Returns the
60
+ * paginated list of company-scoped vendor reps that are targeting the
61
+ * given facility, with each row carrying the rep's name + email, their
62
+ * last visit to this facility, their facility access status, and any
63
+ * company custom fields the company has flagged `show_to_vendor` (which
64
+ * is where the "Employee ID" column on the UI lives).
65
+ *
66
+ * Filtering: pass `status=approved|pending|denied` to scope the rows to a
67
+ * single status tab. Pass `search=<term>` for a single search box that
68
+ * matches first name, last name, full name, email, OR any visible custom
69
+ * field value (covering the "search by name / email / Employee ID"
70
+ * requirement).
71
+ *
72
+ * Access control:
73
+ * * Regular users: the URL's `:id` must be in the caller's read scope for
74
+ * Facility (resolved via `has_facility_access_policy`). Out-of-scope or
75
+ * soft-deleted facilities return `404 Facility not found`.
76
+ * * API users: must pass `company_id`. Both the company and the facility
77
+ * must be activated for the caller's marketplace app
78
+ * (`MarketplaceAppActivation`).
79
+ */
80
+ function useOrganizationsListFacilityVendorsSuspense(request, options) {
81
+ const client = (0, _context_js_1.useGreenSecurityContext)();
82
+ return (0, react_query_1.useSuspenseQuery)({
83
+ ...(0, organizationsListFacilityVendors_core_js_1.buildOrganizationsListFacilityVendorsQuery)(client, request, options),
84
+ ...options,
85
+ });
86
+ }
87
+ /**
88
+ * List vendors targeting a facility
89
+ *
90
+ * @remarks
91
+ * Powers the Company Portal → Facility Details page. Returns the
92
+ * paginated list of company-scoped vendor reps that are targeting the
93
+ * given facility, with each row carrying the rep's name + email, their
94
+ * last visit to this facility, their facility access status, and any
95
+ * company custom fields the company has flagged `show_to_vendor` (which
96
+ * is where the "Employee ID" column on the UI lives).
97
+ *
98
+ * Filtering: pass `status=approved|pending|denied` to scope the rows to a
99
+ * single status tab. Pass `search=<term>` for a single search box that
100
+ * matches first name, last name, full name, email, OR any visible custom
101
+ * field value (covering the "search by name / email / Employee ID"
102
+ * requirement).
103
+ *
104
+ * Access control:
105
+ * * Regular users: the URL's `:id` must be in the caller's read scope for
106
+ * Facility (resolved via `has_facility_access_policy`). Out-of-scope or
107
+ * soft-deleted facilities return `404 Facility not found`.
108
+ * * API users: must pass `company_id`. Both the company and the facility
109
+ * must be activated for the caller's marketplace app
110
+ * (`MarketplaceAppActivation`).
111
+ */
112
+ function useOrganizationsListFacilityVendorsInfinite(request, options) {
113
+ const client = (0, _context_js_1.useGreenSecurityContext)();
114
+ return (0, react_query_1.useInfiniteQuery)({
115
+ ...(0, organizationsListFacilityVendors_core_js_1.buildOrganizationsListFacilityVendorsInfiniteQuery)(client, request, options),
116
+ initialPageParam: options?.initialPageParam,
117
+ getNextPageParam: (previousPage) => previousPage["~next"],
118
+ ...options,
119
+ });
120
+ }
121
+ /**
122
+ * List vendors targeting a facility
123
+ *
124
+ * @remarks
125
+ * Powers the Company Portal → Facility Details page. Returns the
126
+ * paginated list of company-scoped vendor reps that are targeting the
127
+ * given facility, with each row carrying the rep's name + email, their
128
+ * last visit to this facility, their facility access status, and any
129
+ * company custom fields the company has flagged `show_to_vendor` (which
130
+ * is where the "Employee ID" column on the UI lives).
131
+ *
132
+ * Filtering: pass `status=approved|pending|denied` to scope the rows to a
133
+ * single status tab. Pass `search=<term>` for a single search box that
134
+ * matches first name, last name, full name, email, OR any visible custom
135
+ * field value (covering the "search by name / email / Employee ID"
136
+ * requirement).
137
+ *
138
+ * Access control:
139
+ * * Regular users: the URL's `:id` must be in the caller's read scope for
140
+ * Facility (resolved via `has_facility_access_policy`). Out-of-scope or
141
+ * soft-deleted facilities return `404 Facility not found`.
142
+ * * API users: must pass `company_id`. Both the company and the facility
143
+ * must be activated for the caller's marketplace app
144
+ * (`MarketplaceAppActivation`).
145
+ */
146
+ function useOrganizationsListFacilityVendorsInfiniteSuspense(request, options) {
147
+ const client = (0, _context_js_1.useGreenSecurityContext)();
148
+ return (0, react_query_1.useSuspenseInfiniteQuery)({
149
+ ...(0, organizationsListFacilityVendors_core_js_1.buildOrganizationsListFacilityVendorsInfiniteQuery)(client, request, options),
150
+ initialPageParam: options?.initialPageParam,
151
+ getNextPageParam: (previousPage) => previousPage["~next"],
152
+ ...options,
153
+ });
154
+ }
155
+ function setOrganizationsListFacilityVendorsData(client, queryKeyBase, data) {
156
+ const key = (0, organizationsListFacilityVendors_core_js_1.queryKeyOrganizationsListFacilityVendors)(...queryKeyBase);
157
+ return client.setQueryData(key, data);
158
+ }
159
+ function invalidateOrganizationsListFacilityVendors(client, queryKeyBase, filters) {
160
+ return client.invalidateQueries({
161
+ ...filters,
162
+ queryKey: [
163
+ "@greensecurity/javascript-sdk",
164
+ "organizations",
165
+ "listFacilityVendors",
166
+ ...queryKeyBase,
167
+ ],
168
+ });
169
+ }
170
+ function invalidateAllOrganizationsListFacilityVendors(client, filters) {
171
+ return client.invalidateQueries({
172
+ ...filters,
173
+ queryKey: [
174
+ "@greensecurity/javascript-sdk",
175
+ "organizations",
176
+ "listFacilityVendors",
177
+ ],
178
+ });
179
+ }
180
+ //# sourceMappingURL=organizationsListFacilityVendors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organizationsListFacilityVendors.js","sourceRoot":"","sources":["../../../src/react-query/organizationsListFacilityVendors.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAgGH,kFAmBC;AA2BD,kGAmBC;AA2BD,kGAiCC;AA2BD,kHAiCC;AAED,0FAsBC;AAED,gGA2BC;AAED,sGAYC;AA1VD,uDAa+B;AAc/B,+CAAwD;AAQxD,yGAUoD;AAElD,mIAXA,6FAAkD,OAWA;AAClD,2HAXA,qFAA0C,OAWA;AAI1C,yHAXA,mFAAwC,OAWA;AACxC,iIAXA,2FAAgD,OAWA;AAChD,yHAXA,mFAAwC,OAWA;AACxC,iIAXA,2FAAgD,OAWA;AAclD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,SAAgB,mCAAmC,CACjD,OAA8C,EAC9C,OAGC;IAKD,MAAM,MAAM,GAAG,IAAA,qCAAuB,GAAE,CAAC;IACzC,OAAO,IAAA,sBAAQ,EAAC;QACd,GAAG,IAAA,qFAA0C,EAC3C,MAAM,EACN,OAAO,EACP,OAAO,CACR;QACD,GAAG,OAA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tE,OAAO,MAAM,CAAC,YAAY,CACxB,GAAG,EACH,IAAI,CACL,CAAC;AACJ,CAAC;AAED,SAAgB,0CAA0C,CACxD,MAAmB,EACnB,YAaC,EACD,OAA0E;IAE1E,OAAO,MAAM,CAAC,iBAAiB,CAAC;QAC9B,GAAG,OAAO;QACV,QAAQ,EAAE;YACR,+BAA+B;YAC/B,eAAe;YACf,qBAAqB;YACrB,GAAG,YAAY;SAChB;KACF,CAAC,CAAC;AACL,CAAC;AAED,SAAgB,6CAA6C,CAC3D,MAAmB,EACnB,OAA0E;IAE1E,OAAO,MAAM,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,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,GACvB,OAAO,CACR,YAAY,CAAC,UAAU,CAAC,+BAA+B,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAC3E;IAQD;;;;;;;;;;;;OAYG;IACG,6BAA6B,CACjC,OAAO,EAAE,UAAU,CAAC,oCAAoC,EACxD,OAAO,CAAC,EAAE,cAAc,G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,CAAC;IAQ/B;;;;;OAKG;IACG,uBAAuB,CAC3B,OAAO,EAAE,UAAU,CAAC,8BAA8B,EAClD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CACR,YAAY,CAAC,UAAU,CAAC,+BAA+B,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAC3E;IAQD;;;;;;;;;;;;OAYG;IACG,6BAA6B,CACjC,OAAO,EAAE,UAAU,CAAC,oCAAoC,EACxD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,yCAAyC,CAAC;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"}
@@ -8,6 +8,7 @@ const organizationsDownloadCompanyTargetFacilitiesExport_js_1 = require("../func
8
8
  const organizationsExportCompanyTargetFacilities_js_1 = require("../funcs/organizationsExportCompanyTargetFacilities.js");
9
9
  const organizationsGetCompanyTargetFacilitiesExportStatus_js_1 = require("../funcs/organizationsGetCompanyTargetFacilitiesExportStatus.js");
10
10
  const organizationsGetFacility_js_1 = require("../funcs/organizationsGetFacility.js");
11
+ const organizationsListFacilityVendors_js_1 = require("../funcs/organizationsListFacilityVendors.js");
11
12
  const organizationsListOrSearchDepartmentContacts_js_1 = require("../funcs/organizationsListOrSearchDepartmentContacts.js");
12
13
  const organizationsListOrSearchDepartments_js_1 = require("../funcs/organizationsListOrSearchDepartments.js");
13
14
  const organizationsListOrSearchFacilities_js_1 = require("../funcs/organizationsListOrSearchFacilities.js");
@@ -91,6 +92,34 @@ class Organizations extends sdks_js_1.ClientSDK {
91
92
  async downloadCompanyTargetFacilitiesExport(request, options) {
92
93
  return (0, fp_js_1.unwrapAsync)((0, organizationsDownloadCompanyTargetFacilitiesExport_js_1.organizationsDownloadCompanyTargetFacilitiesExport)(this, request, options));
93
94
  }
95
+ /**
96
+ * List vendors targeting a facility
97
+ *
98
+ * @remarks
99
+ * Powers the Company Portal → Facility Details page. Returns the
100
+ * paginated list of company-scoped vendor reps that are targeting the
101
+ * given facility, with each row carrying the rep's name + email, their
102
+ * last visit to this facility, their facility access status, and any
103
+ * company custom fields the company has flagged `show_to_vendor` (which
104
+ * is where the "Employee ID" column on the UI lives).
105
+ *
106
+ * Filtering: pass `status=approved|pending|denied` to scope the rows to a
107
+ * single status tab. Pass `search=<term>` for a single search box that
108
+ * matches first name, last name, full name, email, OR any visible custom
109
+ * field value (covering the "search by name / email / Employee ID"
110
+ * requirement).
111
+ *
112
+ * Access control:
113
+ * * Regular users: the URL's `:id` must be in the caller's read scope for
114
+ * Facility (resolved via `has_facility_access_policy`). Out-of-scope or
115
+ * soft-deleted facilities return `404 Facility not found`.
116
+ * * API users: must pass `company_id`. Both the company and the facility
117
+ * must be activated for the caller's marketplace app
118
+ * (`MarketplaceAppActivation`).
119
+ */
120
+ async listFacilityVendors(request, options) {
121
+ return (0, operations_js_1.unwrapResultIterator)((0, organizationsListFacilityVendors_js_1.organizationsListFacilityVendors)(this, request, options));
122
+ }
94
123
  /**
95
124
  * List or search department contacts
96
125
  *
@@ -1 +1 @@
1
- {"version":3,"file":"organizations.js","sourceRoot":"","sources":["../../../src/sdk/organizations.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,0IAAoI;AACpI,0HAAoH;AACpH,4IAAsI;AACtI,sFAAgF;AAChF,4HAAsH;AACtH,8GAAwG;AACxG,4GAAsG;AACtG,4CAA2D;AAG3D,0CAA6C;AAC7C,0DAA4E;AAE5E,MAAa,aAAc,SAAQ,mBAAS;IAC1C;;;;;;;;;;;;;;;;;;OAkBG;IACH,KAAK,CAAC,sBAAsB,CAC1B,OAAiD,EACjD,OAAwB;QAIxB,OAAO,IAAA,oCAAoB,EAAC,IAAA,4EAAmC,EAC7D,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,WAAW,CACf,OAAsC,EACtC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,sDAAwB,EACzC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,uBAAuB,CAC3B,OAAkD,EAClD,OAAwB;QAIxB,OAAO,IAAA,oCAAoB,EAAC,IAAA,8EAAoC,EAC9D,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,KAAK,CAAC,6BAA6B,CACjC,OAAwD,EACxD,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,0FAA0C,EAC3D,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,sCAAsC,CAC1C,OAAiE,EACjE,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,4GAAmD,EACpE,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,qCAAqC,CACzC,OAAgE,EAChE,OAAwB;QAIxB,OAAO,IAAA,mBAAW,EAAC,IAAA,0GAAkD,EACnE,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;OAUG;IACH,KAAK,CAAC,8BAA8B,CAClC,OAAyD,EACzD,OAAwB;QAOxB,OAAO,IAAA,oCAAoB,EAAC,IAAA,4FAA2C,EACrE,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF;AA7JD,sCA6JC"}
1
+ {"version":3,"file":"organizations.js","sourceRoot":"","sources":["../../../src/sdk/organizations.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,0IAAoI;AACpI,0HAAoH;AACpH,4IAAsI;AACtI,sFAAgF;AAChF,sGAAgG;AAChG,4HAAsH;AACtH,8GAAwG;AACxG,4GAAsG;AACtG,4CAA2D;AAG3D,0CAA6C;AAC7C,0DAA4E;AAE5E,MAAa,aAAc,SAAQ,mBAAS;IAC1C;;;;;;;;;;;;;;;;;;OAkBG;IACH,KAAK,CAAC,sBAAsB,CAC1B,OAAiD,EACjD,OAAwB;QAIxB,OAAO,IAAA,oCAAoB,EAAC,IAAA,4EAAmC,EAC7D,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,WAAW,CACf,OAAsC,EACtC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,sDAAwB,EACzC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,uBAAuB,CAC3B,OAAkD,EAClD,OAAwB;QAIxB,OAAO,IAAA,oCAAoB,EAAC,IAAA,8EAAoC,EAC9D,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,KAAK,CAAC,6BAA6B,CACjC,OAAwD,EACxD,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,0FAA0C,EAC3D,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,sCAAsC,CAC1C,OAAiE,EACjE,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,4GAAmD,EACpE,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,qCAAqC,CACzC,OAAgE,EAChE,OAAwB;QAIxB,OAAO,IAAA,mBAAW,EAAC,IAAA,0GAAkD,EACnE,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,KAAK,CAAC,mBAAmB,CACvB,OAA8C,EAC9C,OAAwB;QAIxB,OAAO,IAAA,oCAAoB,EAAC,IAAA,sEAAgC,EAC1D,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;OAUG;IACH,KAAK,CAAC,8BAA8B,CAClC,OAAyD,EACzD,OAAwB;QAOxB,OAAO,IAAA,oCAAoB,EAAC,IAAA,4FAA2C,EACrE,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF;AAnMD,sCAmMC"}
@@ -143,4 +143,33 @@ test("Organizations Download Company Target Facilities Export", async () => {
143
143
  expect(result.result).toBeDefined();
144
144
  expect(result.result).toEqual({});
145
145
  });
146
+ test("Organizations List Facility Vendors", async () => {
147
+ const testHttpClient = createTestHTTPClient("listFacilityVendors");
148
+ const greenSecurity = new GreenSecurity({
149
+ serverURL: process.env["TEST_SERVER_URL"] ?? "https://localhost:3000/api",
150
+ httpClient: testHttpClient,
151
+ security: {
152
+ token: process.env["GREEN_SECURITY_TOKEN"] ?? "value",
153
+ },
154
+ });
155
+ const result = await greenSecurity.organizations.listFacilityVendors({
156
+ id: 970801,
157
+ itemsPerPage: 25,
158
+ desc: true,
159
+ });
160
+ expect(result).toBeDefined();
161
+ expect(result.result).toBeDefined();
162
+ expect(result.result).toEqual({
163
+ pager: {
164
+ baseUrl: "api/vendors/job_titles",
165
+ sort: "job,title",
166
+ desc: 0,
167
+ itemCount: 228,
168
+ itemsPerPage: 557,
169
+ page: 1,
170
+ useUrlParams: true,
171
+ },
172
+ items: [],
173
+ });
174
+ });
146
175
  //# sourceMappingURL=organizations.test.js.map