@constructive-io/react 1.9.2 → 1.9.3

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 (220) hide show
  1. package/admin/hooks/index.d.ts +1 -1
  2. package/admin/hooks/index.js +1 -1
  3. package/admin/hooks/invalidation.d.ts +24 -0
  4. package/admin/hooks/invalidation.js +64 -0
  5. package/admin/hooks/mutation-keys.d.ts +48 -0
  6. package/admin/hooks/mutation-keys.js +32 -1
  7. package/admin/hooks/mutations/index.d.ts +8 -0
  8. package/admin/hooks/mutations/index.js +8 -0
  9. package/admin/hooks/mutations/useCreateOrgChartEdgeGrantMutation.d.ts +34 -0
  10. package/{api/hooks/mutations/useCreatePlatformApiModuleMutation.js → admin/hooks/mutations/useCreateOrgChartEdgeGrantMutation.js} +6 -6
  11. package/admin/hooks/mutations/useCreateOrgChartEdgeMutation.d.ts +34 -0
  12. package/admin/hooks/mutations/useCreateOrgChartEdgeMutation.js +34 -0
  13. package/admin/hooks/mutations/useCreateOrgGetManagersRecordMutation.d.ts +34 -0
  14. package/admin/hooks/mutations/useCreateOrgGetManagersRecordMutation.js +34 -0
  15. package/admin/hooks/mutations/useCreateOrgGetSubordinatesRecordMutation.d.ts +34 -0
  16. package/admin/hooks/mutations/useCreateOrgGetSubordinatesRecordMutation.js +34 -0
  17. package/admin/hooks/mutations/useDeleteOrgChartEdgeGrantMutation.d.ts +38 -0
  18. package/{api/hooks/mutations/useDeletePlatformApiModuleMutation.js → admin/hooks/mutations/useDeleteOrgChartEdgeGrantMutation.js} +7 -7
  19. package/admin/hooks/mutations/useDeleteOrgChartEdgeMutation.d.ts +38 -0
  20. package/admin/hooks/mutations/useDeleteOrgChartEdgeMutation.js +39 -0
  21. package/admin/hooks/mutations/useUpdateOrgChartEdgeGrantMutation.d.ts +40 -0
  22. package/{api/hooks/mutations/useUpdatePlatformApiModuleMutation.js → admin/hooks/mutations/useUpdateOrgChartEdgeGrantMutation.js} +9 -9
  23. package/admin/hooks/mutations/useUpdateOrgChartEdgeMutation.d.ts +40 -0
  24. package/admin/hooks/mutations/useUpdateOrgChartEdgeMutation.js +40 -0
  25. package/admin/hooks/queries/index.d.ts +7 -0
  26. package/admin/hooks/queries/index.js +7 -0
  27. package/admin/hooks/queries/useOrgChartEdgeGrantQuery.d.ts +65 -0
  28. package/{api/hooks/queries/usePlatformApiModuleQuery.js → admin/hooks/queries/useOrgChartEdgeGrantQuery.js} +14 -14
  29. package/admin/hooks/queries/useOrgChartEdgeGrantsQuery.d.ts +69 -0
  30. package/admin/hooks/queries/useOrgChartEdgeGrantsQuery.js +38 -0
  31. package/admin/hooks/queries/useOrgChartEdgeQuery.d.ts +65 -0
  32. package/admin/hooks/queries/useOrgChartEdgeQuery.js +53 -0
  33. package/admin/hooks/queries/useOrgChartEdgesQuery.d.ts +69 -0
  34. package/admin/hooks/queries/useOrgChartEdgesQuery.js +38 -0
  35. package/admin/hooks/queries/useOrgGetManagersQuery.d.ts +69 -0
  36. package/admin/hooks/queries/useOrgGetManagersQuery.js +38 -0
  37. package/admin/hooks/queries/useOrgGetSubordinatesQuery.d.ts +69 -0
  38. package/admin/hooks/queries/useOrgGetSubordinatesQuery.js +38 -0
  39. package/admin/hooks/queries/useOrgIsManagerOfQuery.d.ts +53 -0
  40. package/admin/hooks/queries/useOrgIsManagerOfQuery.js +53 -0
  41. package/admin/hooks/query-keys.d.ts +58 -0
  42. package/admin/hooks/query-keys.js +34 -1
  43. package/admin/orm/index.d.ts +13 -0
  44. package/admin/orm/index.js +8 -0
  45. package/admin/orm/input-types.d.ts +399 -0
  46. package/admin/orm/models/index.d.ts +4 -0
  47. package/admin/orm/models/index.js +9 -1
  48. package/admin/orm/models/orgChartEdge.d.ts +54 -0
  49. package/admin/orm/models/orgChartEdge.js +104 -0
  50. package/admin/orm/models/orgChartEdgeGrant.d.ts +54 -0
  51. package/{api/orm/models/platformApiModule.js → admin/orm/models/orgChartEdgeGrant.js} +27 -27
  52. package/admin/orm/models/orgGetManagersRecord.d.ts +30 -0
  53. package/admin/orm/models/orgGetManagersRecord.js +59 -0
  54. package/admin/orm/models/orgGetSubordinatesRecord.d.ts +30 -0
  55. package/admin/orm/models/orgGetSubordinatesRecord.js +59 -0
  56. package/admin/orm/query/index.d.ts +11 -0
  57. package/admin/orm/query/index.js +24 -0
  58. package/admin/schema-types.d.ts +247 -1
  59. package/admin/types.d.ts +29 -0
  60. package/api/hooks/index.d.ts +1 -1
  61. package/api/hooks/index.js +1 -1
  62. package/api/hooks/invalidation.d.ts +6 -12
  63. package/api/hooks/invalidation.js +16 -32
  64. package/api/hooks/mutation-keys.d.ts +12 -24
  65. package/api/hooks/mutation-keys.js +9 -16
  66. package/api/hooks/mutations/index.d.ts +3 -6
  67. package/api/hooks/mutations/index.js +3 -6
  68. package/api/hooks/mutations/useCreateDomainTypeMutation.d.ts +34 -0
  69. package/api/hooks/mutations/{useCreateApiModuleMutation.js → useCreateDomainTypeMutation.js} +6 -6
  70. package/api/hooks/mutations/useDeleteDomainTypeMutation.d.ts +38 -0
  71. package/api/hooks/mutations/{useDeleteApiModuleMutation.js → useDeleteDomainTypeMutation.js} +7 -7
  72. package/api/hooks/mutations/useUpdateDomainTypeMutation.d.ts +40 -0
  73. package/api/hooks/mutations/{useUpdateApiModuleMutation.js → useUpdateDomainTypeMutation.js} +9 -9
  74. package/api/hooks/queries/index.d.ts +2 -4
  75. package/api/hooks/queries/index.js +2 -4
  76. package/api/hooks/queries/useDomainTypeQuery.d.ts +65 -0
  77. package/api/hooks/queries/{useApiModuleQuery.js → useDomainTypeQuery.js} +14 -14
  78. package/api/hooks/queries/useDomainTypesQuery.d.ts +69 -0
  79. package/api/hooks/queries/{useApiModulesQuery.js → useDomainTypesQuery.js} +14 -14
  80. package/api/hooks/query-keys.d.ts +14 -28
  81. package/api/hooks/query-keys.js +10 -18
  82. package/api/orm/index.d.ts +2 -4
  83. package/api/orm/index.js +2 -4
  84. package/api/orm/input-types.d.ts +378 -468
  85. package/api/orm/input-types.js +2 -2
  86. package/api/orm/models/domainType.d.ts +54 -0
  87. package/api/orm/models/{apiModule.js → domainType.js} +27 -27
  88. package/api/orm/models/index.d.ts +1 -2
  89. package/api/orm/models/index.js +4 -6
  90. package/api/schema-types.d.ts +157 -226
  91. package/api/types.d.ts +16 -17
  92. package/compute/orm/input-types.d.ts +42 -3
  93. package/compute/schema-types.d.ts +25 -3
  94. package/compute/types.d.ts +5 -0
  95. package/esm/admin/hooks/index.d.ts +1 -1
  96. package/esm/admin/hooks/index.js +1 -1
  97. package/esm/admin/hooks/invalidation.d.ts +24 -0
  98. package/esm/admin/hooks/invalidation.js +65 -1
  99. package/esm/admin/hooks/mutation-keys.d.ts +48 -0
  100. package/esm/admin/hooks/mutation-keys.js +31 -0
  101. package/esm/admin/hooks/mutations/index.d.ts +8 -0
  102. package/esm/admin/hooks/mutations/index.js +8 -0
  103. package/esm/admin/hooks/mutations/useCreateOrgChartEdgeGrantMutation.d.ts +34 -0
  104. package/esm/admin/hooks/mutations/useCreateOrgChartEdgeGrantMutation.js +31 -0
  105. package/esm/admin/hooks/mutations/useCreateOrgChartEdgeMutation.d.ts +34 -0
  106. package/esm/{api/hooks/mutations/useCreatePlatformApiModuleMutation.js → admin/hooks/mutations/useCreateOrgChartEdgeMutation.js} +7 -7
  107. package/esm/admin/hooks/mutations/useCreateOrgGetManagersRecordMutation.d.ts +34 -0
  108. package/esm/admin/hooks/mutations/useCreateOrgGetManagersRecordMutation.js +31 -0
  109. package/esm/admin/hooks/mutations/useCreateOrgGetSubordinatesRecordMutation.d.ts +34 -0
  110. package/esm/admin/hooks/mutations/useCreateOrgGetSubordinatesRecordMutation.js +31 -0
  111. package/esm/admin/hooks/mutations/useDeleteOrgChartEdgeGrantMutation.d.ts +38 -0
  112. package/esm/{api/hooks/mutations/useDeletePlatformApiModuleMutation.js → admin/hooks/mutations/useDeleteOrgChartEdgeGrantMutation.js} +8 -8
  113. package/esm/admin/hooks/mutations/useDeleteOrgChartEdgeMutation.d.ts +38 -0
  114. package/esm/admin/hooks/mutations/useDeleteOrgChartEdgeMutation.js +36 -0
  115. package/esm/admin/hooks/mutations/useUpdateOrgChartEdgeGrantMutation.d.ts +40 -0
  116. package/esm/{api/hooks/mutations/useUpdatePlatformApiModuleMutation.js → admin/hooks/mutations/useUpdateOrgChartEdgeGrantMutation.js} +10 -10
  117. package/esm/admin/hooks/mutations/useUpdateOrgChartEdgeMutation.d.ts +40 -0
  118. package/esm/admin/hooks/mutations/useUpdateOrgChartEdgeMutation.js +37 -0
  119. package/esm/admin/hooks/queries/index.d.ts +7 -0
  120. package/esm/admin/hooks/queries/index.js +7 -0
  121. package/esm/admin/hooks/queries/useOrgChartEdgeGrantQuery.d.ts +65 -0
  122. package/esm/{api/hooks/queries/usePlatformApiModuleQuery.js → admin/hooks/queries/useOrgChartEdgeGrantQuery.js} +11 -11
  123. package/esm/admin/hooks/queries/useOrgChartEdgeGrantsQuery.d.ts +69 -0
  124. package/esm/{api/hooks/queries/usePlatformApiModulesQuery.js → admin/hooks/queries/useOrgChartEdgeGrantsQuery.js} +11 -11
  125. package/esm/admin/hooks/queries/useOrgChartEdgeQuery.d.ts +65 -0
  126. package/esm/admin/hooks/queries/useOrgChartEdgeQuery.js +47 -0
  127. package/esm/admin/hooks/queries/useOrgChartEdgesQuery.d.ts +69 -0
  128. package/esm/admin/hooks/queries/useOrgChartEdgesQuery.js +32 -0
  129. package/esm/admin/hooks/queries/useOrgGetManagersQuery.d.ts +69 -0
  130. package/esm/admin/hooks/queries/useOrgGetManagersQuery.js +32 -0
  131. package/esm/admin/hooks/queries/useOrgGetSubordinatesQuery.d.ts +69 -0
  132. package/esm/admin/hooks/queries/useOrgGetSubordinatesQuery.js +32 -0
  133. package/esm/admin/hooks/queries/useOrgIsManagerOfQuery.d.ts +53 -0
  134. package/esm/admin/hooks/queries/useOrgIsManagerOfQuery.js +47 -0
  135. package/esm/admin/hooks/query-keys.d.ts +58 -0
  136. package/esm/admin/hooks/query-keys.js +33 -0
  137. package/esm/admin/orm/index.d.ts +13 -0
  138. package/esm/admin/orm/index.js +8 -0
  139. package/esm/admin/orm/input-types.d.ts +399 -0
  140. package/esm/admin/orm/models/index.d.ts +4 -0
  141. package/esm/admin/orm/models/index.js +4 -0
  142. package/esm/admin/orm/models/orgChartEdge.d.ts +54 -0
  143. package/esm/admin/orm/models/orgChartEdge.js +100 -0
  144. package/esm/admin/orm/models/orgChartEdgeGrant.d.ts +54 -0
  145. package/esm/{api/orm/models/platformApiModule.js → admin/orm/models/orgChartEdgeGrant.js} +25 -25
  146. package/esm/admin/orm/models/orgGetManagersRecord.d.ts +30 -0
  147. package/esm/admin/orm/models/orgGetManagersRecord.js +55 -0
  148. package/esm/admin/orm/models/orgGetSubordinatesRecord.d.ts +30 -0
  149. package/esm/admin/orm/models/orgGetSubordinatesRecord.js +55 -0
  150. package/esm/admin/orm/query/index.d.ts +11 -0
  151. package/esm/admin/orm/query/index.js +24 -0
  152. package/esm/admin/schema-types.d.ts +247 -1
  153. package/esm/admin/types.d.ts +29 -0
  154. package/esm/api/hooks/index.d.ts +1 -1
  155. package/esm/api/hooks/index.js +1 -1
  156. package/esm/api/hooks/invalidation.d.ts +6 -12
  157. package/esm/api/hooks/invalidation.js +17 -33
  158. package/esm/api/hooks/mutation-keys.d.ts +12 -24
  159. package/esm/api/hooks/mutation-keys.js +7 -14
  160. package/esm/api/hooks/mutations/index.d.ts +3 -6
  161. package/esm/api/hooks/mutations/index.js +3 -6
  162. package/esm/api/hooks/mutations/useCreateDomainTypeMutation.d.ts +34 -0
  163. package/esm/api/hooks/mutations/{useCreateApiModuleMutation.js → useCreateDomainTypeMutation.js} +7 -7
  164. package/esm/api/hooks/mutations/useDeleteDomainTypeMutation.d.ts +38 -0
  165. package/esm/api/hooks/mutations/{useDeleteApiModuleMutation.js → useDeleteDomainTypeMutation.js} +8 -8
  166. package/esm/api/hooks/mutations/useUpdateDomainTypeMutation.d.ts +40 -0
  167. package/esm/api/hooks/mutations/{useUpdateApiModuleMutation.js → useUpdateDomainTypeMutation.js} +10 -10
  168. package/esm/api/hooks/queries/index.d.ts +2 -4
  169. package/esm/api/hooks/queries/index.js +2 -4
  170. package/esm/api/hooks/queries/useDomainTypeQuery.d.ts +65 -0
  171. package/esm/api/hooks/queries/{useApiModuleQuery.js → useDomainTypeQuery.js} +11 -11
  172. package/esm/api/hooks/queries/useDomainTypesQuery.d.ts +69 -0
  173. package/esm/api/hooks/queries/{useApiModulesQuery.js → useDomainTypesQuery.js} +11 -11
  174. package/esm/api/hooks/query-keys.d.ts +14 -28
  175. package/esm/api/hooks/query-keys.js +8 -16
  176. package/esm/api/orm/index.d.ts +2 -4
  177. package/esm/api/orm/index.js +2 -4
  178. package/esm/api/orm/input-types.d.ts +378 -468
  179. package/esm/api/orm/input-types.js +2 -2
  180. package/esm/api/orm/models/domainType.d.ts +54 -0
  181. package/esm/api/orm/models/{apiModule.js → domainType.js} +25 -25
  182. package/esm/api/orm/models/index.d.ts +1 -2
  183. package/esm/api/orm/models/index.js +1 -2
  184. package/esm/api/schema-types.d.ts +157 -226
  185. package/esm/api/types.d.ts +16 -17
  186. package/esm/compute/orm/input-types.d.ts +42 -3
  187. package/esm/compute/schema-types.d.ts +25 -3
  188. package/esm/compute/types.d.ts +5 -0
  189. package/esm/modules/orm/input-types.d.ts +9 -16
  190. package/esm/modules/schema-types.d.ts +6 -10
  191. package/esm/modules/types.d.ts +1 -2
  192. package/modules/orm/input-types.d.ts +9 -16
  193. package/modules/schema-types.d.ts +6 -10
  194. package/modules/types.d.ts +1 -2
  195. package/package.json +5 -5
  196. package/api/hooks/mutations/useCreateApiModuleMutation.d.ts +0 -34
  197. package/api/hooks/mutations/useCreatePlatformApiModuleMutation.d.ts +0 -34
  198. package/api/hooks/mutations/useDeleteApiModuleMutation.d.ts +0 -38
  199. package/api/hooks/mutations/useDeletePlatformApiModuleMutation.d.ts +0 -38
  200. package/api/hooks/mutations/useUpdateApiModuleMutation.d.ts +0 -40
  201. package/api/hooks/mutations/useUpdatePlatformApiModuleMutation.d.ts +0 -40
  202. package/api/hooks/queries/useApiModuleQuery.d.ts +0 -65
  203. package/api/hooks/queries/useApiModulesQuery.d.ts +0 -69
  204. package/api/hooks/queries/usePlatformApiModuleQuery.d.ts +0 -65
  205. package/api/hooks/queries/usePlatformApiModulesQuery.d.ts +0 -69
  206. package/api/hooks/queries/usePlatformApiModulesQuery.js +0 -38
  207. package/api/orm/models/apiModule.d.ts +0 -54
  208. package/api/orm/models/platformApiModule.d.ts +0 -54
  209. package/esm/api/hooks/mutations/useCreateApiModuleMutation.d.ts +0 -34
  210. package/esm/api/hooks/mutations/useCreatePlatformApiModuleMutation.d.ts +0 -34
  211. package/esm/api/hooks/mutations/useDeleteApiModuleMutation.d.ts +0 -38
  212. package/esm/api/hooks/mutations/useDeletePlatformApiModuleMutation.d.ts +0 -38
  213. package/esm/api/hooks/mutations/useUpdateApiModuleMutation.d.ts +0 -40
  214. package/esm/api/hooks/mutations/useUpdatePlatformApiModuleMutation.d.ts +0 -40
  215. package/esm/api/hooks/queries/useApiModuleQuery.d.ts +0 -65
  216. package/esm/api/hooks/queries/useApiModulesQuery.d.ts +0 -69
  217. package/esm/api/hooks/queries/usePlatformApiModuleQuery.d.ts +0 -65
  218. package/esm/api/hooks/queries/usePlatformApiModulesQuery.d.ts +0 -69
  219. package/esm/api/orm/models/apiModule.d.ts +0 -54
  220. package/esm/api/orm/models/platformApiModule.d.ts +0 -54
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Append-only log of hierarchy edge grants and revocations; triggers apply changes to the edges table
3
+ * @generated by @constructive-io/graphql-codegen
4
+ * DO NOT EDIT - changes will be overwritten
5
+ */
6
+ import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query';
7
+ import type { OrgChartEdgeGrantSelect, OrgChartEdgeGrantWithRelations } from '../../orm/input-types';
8
+ import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types';
9
+ export type { OrgChartEdgeGrantSelect, OrgChartEdgeGrantWithRelations, } from '../../orm/input-types';
10
+ /**
11
+ * Append-only log of hierarchy edge grants and revocations; triggers apply changes to the edges table
12
+ *
13
+ * @example
14
+ * ```tsx
15
+ * const { mutate, isPending } = useDeleteOrgChartEdgeGrantMutation({
16
+ * selection: { fields: { id: true } },
17
+ * });
18
+ *
19
+ * mutate({ id: 'value-to-delete' });
20
+ * ```
21
+ */
22
+ export declare function useDeleteOrgChartEdgeGrantMutation<S extends OrgChartEdgeGrantSelect>(params: {
23
+ selection: {
24
+ fields: S & OrgChartEdgeGrantSelect;
25
+ } & HookStrictSelect<NoInfer<S>, OrgChartEdgeGrantSelect>;
26
+ } & Omit<UseMutationOptions<{
27
+ deleteOrgChartEdgeGrant: {
28
+ orgChartEdgeGrant: InferSelectResult<OrgChartEdgeGrantWithRelations, S>;
29
+ };
30
+ }, Error, {
31
+ id: string;
32
+ }>, 'mutationFn'>): UseMutationResult<{
33
+ deleteOrgChartEdgeGrant: {
34
+ orgChartEdgeGrant: InferSelectResult<OrgChartEdgeGrantWithRelations, S>;
35
+ };
36
+ }, Error, {
37
+ id: string;
38
+ }>;
@@ -1,25 +1,25 @@
1
1
  "use strict";
2
2
  /**
3
- * Server-side module configuration for an API surface; stores module name and JSON settings
3
+ * Append-only log of hierarchy edge grants and revocations; triggers apply changes to the edges table
4
4
  * @generated by @constructive-io/graphql-codegen
5
5
  * DO NOT EDIT - changes will be overwritten
6
6
  */
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.useDeletePlatformApiModuleMutation = useDeletePlatformApiModuleMutation;
8
+ exports.useDeleteOrgChartEdgeGrantMutation = useDeleteOrgChartEdgeGrantMutation;
9
9
  const react_query_1 = require("@tanstack/react-query");
10
10
  const client_1 = require("../client");
11
11
  const selection_1 = require("../selection");
12
12
  const query_keys_1 = require("../query-keys");
13
13
  const mutation_keys_1 = require("../mutation-keys");
14
- function useDeletePlatformApiModuleMutation(params) {
14
+ function useDeleteOrgChartEdgeGrantMutation(params) {
15
15
  const args = (0, selection_1.buildSelectionArgs)(params.selection);
16
16
  const { selection: _selection, ...mutationOptions } = params ?? {};
17
17
  void _selection;
18
18
  const queryClient = (0, react_query_1.useQueryClient)();
19
19
  return (0, react_query_1.useMutation)({
20
- mutationKey: mutation_keys_1.platformApiModuleMutationKeys.all,
20
+ mutationKey: mutation_keys_1.orgChartEdgeGrantMutationKeys.all,
21
21
  mutationFn: ({ id }) => (0, client_1.getClient)()
22
- .platformApiModule.delete({
22
+ .orgChartEdgeGrant.delete({
23
23
  where: {
24
24
  id,
25
25
  },
@@ -28,10 +28,10 @@ function useDeletePlatformApiModuleMutation(params) {
28
28
  .unwrap(),
29
29
  onSuccess: (_, variables) => {
30
30
  queryClient.removeQueries({
31
- queryKey: query_keys_1.platformApiModuleKeys.detail(variables.id),
31
+ queryKey: query_keys_1.orgChartEdgeGrantKeys.detail(variables.id),
32
32
  });
33
33
  queryClient.invalidateQueries({
34
- queryKey: query_keys_1.platformApiModuleKeys.lists(),
34
+ queryKey: query_keys_1.orgChartEdgeGrantKeys.lists(),
35
35
  });
36
36
  },
37
37
  ...mutationOptions,
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Organizational chart edges defining parent-child reporting relationships between members within an entity
3
+ * @generated by @constructive-io/graphql-codegen
4
+ * DO NOT EDIT - changes will be overwritten
5
+ */
6
+ import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query';
7
+ import type { OrgChartEdgeSelect, OrgChartEdgeWithRelations } from '../../orm/input-types';
8
+ import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types';
9
+ export type { OrgChartEdgeSelect, OrgChartEdgeWithRelations } from '../../orm/input-types';
10
+ /**
11
+ * Organizational chart edges defining parent-child reporting relationships between members within an entity
12
+ *
13
+ * @example
14
+ * ```tsx
15
+ * const { mutate, isPending } = useDeleteOrgChartEdgeMutation({
16
+ * selection: { fields: { id: true } },
17
+ * });
18
+ *
19
+ * mutate({ id: 'value-to-delete' });
20
+ * ```
21
+ */
22
+ export declare function useDeleteOrgChartEdgeMutation<S extends OrgChartEdgeSelect>(params: {
23
+ selection: {
24
+ fields: S & OrgChartEdgeSelect;
25
+ } & HookStrictSelect<NoInfer<S>, OrgChartEdgeSelect>;
26
+ } & Omit<UseMutationOptions<{
27
+ deleteOrgChartEdge: {
28
+ orgChartEdge: InferSelectResult<OrgChartEdgeWithRelations, S>;
29
+ };
30
+ }, Error, {
31
+ id: string;
32
+ }>, 'mutationFn'>): UseMutationResult<{
33
+ deleteOrgChartEdge: {
34
+ orgChartEdge: InferSelectResult<OrgChartEdgeWithRelations, S>;
35
+ };
36
+ }, Error, {
37
+ id: string;
38
+ }>;
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ /**
3
+ * Organizational chart edges defining parent-child reporting relationships between members within an entity
4
+ * @generated by @constructive-io/graphql-codegen
5
+ * DO NOT EDIT - changes will be overwritten
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.useDeleteOrgChartEdgeMutation = useDeleteOrgChartEdgeMutation;
9
+ const react_query_1 = require("@tanstack/react-query");
10
+ const client_1 = require("../client");
11
+ const selection_1 = require("../selection");
12
+ const query_keys_1 = require("../query-keys");
13
+ const mutation_keys_1 = require("../mutation-keys");
14
+ function useDeleteOrgChartEdgeMutation(params) {
15
+ const args = (0, selection_1.buildSelectionArgs)(params.selection);
16
+ const { selection: _selection, ...mutationOptions } = params ?? {};
17
+ void _selection;
18
+ const queryClient = (0, react_query_1.useQueryClient)();
19
+ return (0, react_query_1.useMutation)({
20
+ mutationKey: mutation_keys_1.orgChartEdgeMutationKeys.all,
21
+ mutationFn: ({ id }) => (0, client_1.getClient)()
22
+ .orgChartEdge.delete({
23
+ where: {
24
+ id,
25
+ },
26
+ select: args.select,
27
+ })
28
+ .unwrap(),
29
+ onSuccess: (_, variables) => {
30
+ queryClient.removeQueries({
31
+ queryKey: query_keys_1.orgChartEdgeKeys.detail(variables.id),
32
+ });
33
+ queryClient.invalidateQueries({
34
+ queryKey: query_keys_1.orgChartEdgeKeys.lists(),
35
+ });
36
+ },
37
+ ...mutationOptions,
38
+ });
39
+ }
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Append-only log of hierarchy edge grants and revocations; triggers apply changes to the edges table
3
+ * @generated by @constructive-io/graphql-codegen
4
+ * DO NOT EDIT - changes will be overwritten
5
+ */
6
+ import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query';
7
+ import type { OrgChartEdgeGrantSelect, OrgChartEdgeGrantWithRelations, OrgChartEdgeGrantPatch } from '../../orm/input-types';
8
+ import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types';
9
+ export type { OrgChartEdgeGrantSelect, OrgChartEdgeGrantWithRelations, OrgChartEdgeGrantPatch, } from '../../orm/input-types';
10
+ /**
11
+ * Append-only log of hierarchy edge grants and revocations; triggers apply changes to the edges table
12
+ *
13
+ * @example
14
+ * ```tsx
15
+ * const { mutate, isPending } = useUpdateOrgChartEdgeGrantMutation({
16
+ * selection: { fields: { id: true, name: true } },
17
+ * });
18
+ *
19
+ * mutate({ id: 'value-here', orgChartEdgeGrantPatch: { name: 'Updated' } });
20
+ * ```
21
+ */
22
+ export declare function useUpdateOrgChartEdgeGrantMutation<S extends OrgChartEdgeGrantSelect>(params: {
23
+ selection: {
24
+ fields: S & OrgChartEdgeGrantSelect;
25
+ } & HookStrictSelect<NoInfer<S>, OrgChartEdgeGrantSelect>;
26
+ } & Omit<UseMutationOptions<{
27
+ updateOrgChartEdgeGrant: {
28
+ orgChartEdgeGrant: InferSelectResult<OrgChartEdgeGrantWithRelations, S>;
29
+ };
30
+ }, Error, {
31
+ id: string;
32
+ orgChartEdgeGrantPatch: OrgChartEdgeGrantPatch;
33
+ }>, 'mutationFn'>): UseMutationResult<{
34
+ updateOrgChartEdgeGrant: {
35
+ orgChartEdgeGrant: InferSelectResult<OrgChartEdgeGrantWithRelations, S>;
36
+ };
37
+ }, Error, {
38
+ id: string;
39
+ orgChartEdgeGrantPatch: OrgChartEdgeGrantPatch;
40
+ }>;
@@ -1,38 +1,38 @@
1
1
  "use strict";
2
2
  /**
3
- * Server-side module configuration for an API surface; stores module name and JSON settings
3
+ * Append-only log of hierarchy edge grants and revocations; triggers apply changes to the edges table
4
4
  * @generated by @constructive-io/graphql-codegen
5
5
  * DO NOT EDIT - changes will be overwritten
6
6
  */
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.useUpdatePlatformApiModuleMutation = useUpdatePlatformApiModuleMutation;
8
+ exports.useUpdateOrgChartEdgeGrantMutation = useUpdateOrgChartEdgeGrantMutation;
9
9
  const react_query_1 = require("@tanstack/react-query");
10
10
  const client_1 = require("../client");
11
11
  const selection_1 = require("../selection");
12
12
  const query_keys_1 = require("../query-keys");
13
13
  const mutation_keys_1 = require("../mutation-keys");
14
- function useUpdatePlatformApiModuleMutation(params) {
14
+ function useUpdateOrgChartEdgeGrantMutation(params) {
15
15
  const args = (0, selection_1.buildSelectionArgs)(params.selection);
16
16
  const { selection: _selection, ...mutationOptions } = params ?? {};
17
17
  void _selection;
18
18
  const queryClient = (0, react_query_1.useQueryClient)();
19
19
  return (0, react_query_1.useMutation)({
20
- mutationKey: mutation_keys_1.platformApiModuleMutationKeys.all,
21
- mutationFn: ({ id, platformApiModulePatch, }) => (0, client_1.getClient)()
22
- .platformApiModule.update({
20
+ mutationKey: mutation_keys_1.orgChartEdgeGrantMutationKeys.all,
21
+ mutationFn: ({ id, orgChartEdgeGrantPatch, }) => (0, client_1.getClient)()
22
+ .orgChartEdgeGrant.update({
23
23
  where: {
24
24
  id,
25
25
  },
26
- data: platformApiModulePatch,
26
+ data: orgChartEdgeGrantPatch,
27
27
  select: args.select,
28
28
  })
29
29
  .unwrap(),
30
30
  onSuccess: (_, variables) => {
31
31
  queryClient.invalidateQueries({
32
- queryKey: query_keys_1.platformApiModuleKeys.detail(variables.id),
32
+ queryKey: query_keys_1.orgChartEdgeGrantKeys.detail(variables.id),
33
33
  });
34
34
  queryClient.invalidateQueries({
35
- queryKey: query_keys_1.platformApiModuleKeys.lists(),
35
+ queryKey: query_keys_1.orgChartEdgeGrantKeys.lists(),
36
36
  });
37
37
  },
38
38
  ...mutationOptions,
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Organizational chart edges defining parent-child reporting relationships between members within an entity
3
+ * @generated by @constructive-io/graphql-codegen
4
+ * DO NOT EDIT - changes will be overwritten
5
+ */
6
+ import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query';
7
+ import type { OrgChartEdgeSelect, OrgChartEdgeWithRelations, OrgChartEdgePatch } from '../../orm/input-types';
8
+ import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types';
9
+ export type { OrgChartEdgeSelect, OrgChartEdgeWithRelations, OrgChartEdgePatch, } from '../../orm/input-types';
10
+ /**
11
+ * Organizational chart edges defining parent-child reporting relationships between members within an entity
12
+ *
13
+ * @example
14
+ * ```tsx
15
+ * const { mutate, isPending } = useUpdateOrgChartEdgeMutation({
16
+ * selection: { fields: { id: true, name: true } },
17
+ * });
18
+ *
19
+ * mutate({ id: 'value-here', orgChartEdgePatch: { name: 'Updated' } });
20
+ * ```
21
+ */
22
+ export declare function useUpdateOrgChartEdgeMutation<S extends OrgChartEdgeSelect>(params: {
23
+ selection: {
24
+ fields: S & OrgChartEdgeSelect;
25
+ } & HookStrictSelect<NoInfer<S>, OrgChartEdgeSelect>;
26
+ } & Omit<UseMutationOptions<{
27
+ updateOrgChartEdge: {
28
+ orgChartEdge: InferSelectResult<OrgChartEdgeWithRelations, S>;
29
+ };
30
+ }, Error, {
31
+ id: string;
32
+ orgChartEdgePatch: OrgChartEdgePatch;
33
+ }>, 'mutationFn'>): UseMutationResult<{
34
+ updateOrgChartEdge: {
35
+ orgChartEdge: InferSelectResult<OrgChartEdgeWithRelations, S>;
36
+ };
37
+ }, Error, {
38
+ id: string;
39
+ orgChartEdgePatch: OrgChartEdgePatch;
40
+ }>;
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ /**
3
+ * Organizational chart edges defining parent-child reporting relationships between members within an entity
4
+ * @generated by @constructive-io/graphql-codegen
5
+ * DO NOT EDIT - changes will be overwritten
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.useUpdateOrgChartEdgeMutation = useUpdateOrgChartEdgeMutation;
9
+ const react_query_1 = require("@tanstack/react-query");
10
+ const client_1 = require("../client");
11
+ const selection_1 = require("../selection");
12
+ const query_keys_1 = require("../query-keys");
13
+ const mutation_keys_1 = require("../mutation-keys");
14
+ function useUpdateOrgChartEdgeMutation(params) {
15
+ const args = (0, selection_1.buildSelectionArgs)(params.selection);
16
+ const { selection: _selection, ...mutationOptions } = params ?? {};
17
+ void _selection;
18
+ const queryClient = (0, react_query_1.useQueryClient)();
19
+ return (0, react_query_1.useMutation)({
20
+ mutationKey: mutation_keys_1.orgChartEdgeMutationKeys.all,
21
+ mutationFn: ({ id, orgChartEdgePatch }) => (0, client_1.getClient)()
22
+ .orgChartEdge.update({
23
+ where: {
24
+ id,
25
+ },
26
+ data: orgChartEdgePatch,
27
+ select: args.select,
28
+ })
29
+ .unwrap(),
30
+ onSuccess: (_, variables) => {
31
+ queryClient.invalidateQueries({
32
+ queryKey: query_keys_1.orgChartEdgeKeys.detail(variables.id),
33
+ });
34
+ queryClient.invalidateQueries({
35
+ queryKey: query_keys_1.orgChartEdgeKeys.lists(),
36
+ });
37
+ },
38
+ ...mutationOptions,
39
+ });
40
+ }
@@ -29,8 +29,14 @@ export * from './useMembershipTypesQuery';
29
29
  export * from './useMembershipTypeQuery';
30
30
  export * from './useOrgAdminGrantsQuery';
31
31
  export * from './useOrgAdminGrantQuery';
32
+ export * from './useOrgChartEdgesQuery';
33
+ export * from './useOrgChartEdgeQuery';
34
+ export * from './useOrgChartEdgeGrantsQuery';
35
+ export * from './useOrgChartEdgeGrantQuery';
32
36
  export * from './useOrgClaimedInvitesQuery';
33
37
  export * from './useOrgClaimedInviteQuery';
38
+ export * from './useOrgGetManagersQuery';
39
+ export * from './useOrgGetSubordinatesQuery';
34
40
  export * from './useOrgGrantsQuery';
35
41
  export * from './useOrgGrantQuery';
36
42
  export * from './useOrgInvitesQuery';
@@ -59,6 +65,7 @@ export * from './useAppPermissionsGetByMaskQuery';
59
65
  export * from './useAppPermissionsGetMaskQuery';
60
66
  export * from './useAppPermissionsGetMaskByNamesQuery';
61
67
  export * from './useAppPermissionsGetPaddedMaskQuery';
68
+ export * from './useOrgIsManagerOfQuery';
62
69
  export * from './useOrgPermissionsGetByMaskQuery';
63
70
  export * from './useOrgPermissionsGetMaskQuery';
64
71
  export * from './useOrgPermissionsGetMaskByNamesQuery';
@@ -45,8 +45,14 @@ __exportStar(require("./useMembershipTypesQuery"), exports);
45
45
  __exportStar(require("./useMembershipTypeQuery"), exports);
46
46
  __exportStar(require("./useOrgAdminGrantsQuery"), exports);
47
47
  __exportStar(require("./useOrgAdminGrantQuery"), exports);
48
+ __exportStar(require("./useOrgChartEdgesQuery"), exports);
49
+ __exportStar(require("./useOrgChartEdgeQuery"), exports);
50
+ __exportStar(require("./useOrgChartEdgeGrantsQuery"), exports);
51
+ __exportStar(require("./useOrgChartEdgeGrantQuery"), exports);
48
52
  __exportStar(require("./useOrgClaimedInvitesQuery"), exports);
49
53
  __exportStar(require("./useOrgClaimedInviteQuery"), exports);
54
+ __exportStar(require("./useOrgGetManagersQuery"), exports);
55
+ __exportStar(require("./useOrgGetSubordinatesQuery"), exports);
50
56
  __exportStar(require("./useOrgGrantsQuery"), exports);
51
57
  __exportStar(require("./useOrgGrantQuery"), exports);
52
58
  __exportStar(require("./useOrgInvitesQuery"), exports);
@@ -75,6 +81,7 @@ __exportStar(require("./useAppPermissionsGetByMaskQuery"), exports);
75
81
  __exportStar(require("./useAppPermissionsGetMaskQuery"), exports);
76
82
  __exportStar(require("./useAppPermissionsGetMaskByNamesQuery"), exports);
77
83
  __exportStar(require("./useAppPermissionsGetPaddedMaskQuery"), exports);
84
+ __exportStar(require("./useOrgIsManagerOfQuery"), exports);
78
85
  __exportStar(require("./useOrgPermissionsGetByMaskQuery"), exports);
79
86
  __exportStar(require("./useOrgPermissionsGetMaskQuery"), exports);
80
87
  __exportStar(require("./useOrgPermissionsGetMaskByNamesQuery"), exports);
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Append-only log of hierarchy edge grants and revocations; triggers apply changes to the edges table
3
+ * @generated by @constructive-io/graphql-codegen
4
+ * DO NOT EDIT - changes will be overwritten
5
+ */
6
+ import type { UseQueryOptions, UseQueryResult, QueryClient } from '@tanstack/react-query';
7
+ import type { OrgChartEdgeGrantSelect, OrgChartEdgeGrantWithRelations } from '../../orm/input-types';
8
+ import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types';
9
+ export type { OrgChartEdgeGrantSelect, OrgChartEdgeGrantWithRelations, } from '../../orm/input-types';
10
+ /** Query key factory - re-exported from query-keys.ts */
11
+ export declare const orgChartEdgeGrantQueryKey: (id: string | number) => readonly ["orgchartedgegrant", "detail", string | number];
12
+ /**
13
+ * Append-only log of hierarchy edge grants and revocations; triggers apply changes to the edges table
14
+ *
15
+ * @example
16
+ * ```tsx
17
+ * const { data, isLoading } = useOrgChartEdgeGrantQuery({
18
+ * id: 'some-id',
19
+ * selection: { fields: { id: true, name: true } },
20
+ * });
21
+ * ```
22
+ */
23
+ export declare function useOrgChartEdgeGrantQuery<S extends OrgChartEdgeGrantSelect, TData = {
24
+ orgChartEdgeGrant: InferSelectResult<OrgChartEdgeGrantWithRelations, S> | null;
25
+ }>(params: {
26
+ id: string;
27
+ selection: {
28
+ fields: S;
29
+ } & HookStrictSelect<NoInfer<S>, OrgChartEdgeGrantSelect>;
30
+ } & Omit<UseQueryOptions<{
31
+ orgChartEdgeGrant: InferSelectResult<OrgChartEdgeGrantWithRelations, S> | null;
32
+ }, Error, TData>, 'queryKey' | 'queryFn'>): UseQueryResult<TData>;
33
+ /**
34
+ * Append-only log of hierarchy edge grants and revocations; triggers apply changes to the edges table
35
+ *
36
+ * @example
37
+ * ```ts
38
+ * const data = await fetchOrgChartEdgeGrantQuery({
39
+ * id: 'some-id',
40
+ * selection: { fields: { id: true } },
41
+ * });
42
+ * ```
43
+ */
44
+ export declare function fetchOrgChartEdgeGrantQuery<S extends OrgChartEdgeGrantSelect>(params: {
45
+ id: string;
46
+ selection: {
47
+ fields: S;
48
+ } & HookStrictSelect<NoInfer<S>, OrgChartEdgeGrantSelect>;
49
+ }): Promise<{
50
+ orgChartEdgeGrant: InferSelectResult<OrgChartEdgeGrantWithRelations, S> | null;
51
+ }>;
52
+ /**
53
+ * Append-only log of hierarchy edge grants and revocations; triggers apply changes to the edges table
54
+ *
55
+ * @example
56
+ * ```ts
57
+ * await prefetchOrgChartEdgeGrantQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } });
58
+ * ```
59
+ */
60
+ export declare function prefetchOrgChartEdgeGrantQuery<S extends OrgChartEdgeGrantSelect>(queryClient: QueryClient, params: {
61
+ id: string;
62
+ selection: {
63
+ fields: S;
64
+ } & HookStrictSelect<NoInfer<S>, OrgChartEdgeGrantSelect>;
65
+ }): Promise<void>;
@@ -1,28 +1,28 @@
1
1
  "use strict";
2
2
  /**
3
- * Server-side module configuration for an API surface; stores module name and JSON settings
3
+ * Append-only log of hierarchy edge grants and revocations; triggers apply changes to the edges table
4
4
  * @generated by @constructive-io/graphql-codegen
5
5
  * DO NOT EDIT - changes will be overwritten
6
6
  */
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.platformApiModuleQueryKey = void 0;
9
- exports.usePlatformApiModuleQuery = usePlatformApiModuleQuery;
10
- exports.fetchPlatformApiModuleQuery = fetchPlatformApiModuleQuery;
11
- exports.prefetchPlatformApiModuleQuery = prefetchPlatformApiModuleQuery;
8
+ exports.orgChartEdgeGrantQueryKey = void 0;
9
+ exports.useOrgChartEdgeGrantQuery = useOrgChartEdgeGrantQuery;
10
+ exports.fetchOrgChartEdgeGrantQuery = fetchOrgChartEdgeGrantQuery;
11
+ exports.prefetchOrgChartEdgeGrantQuery = prefetchOrgChartEdgeGrantQuery;
12
12
  const react_query_1 = require("@tanstack/react-query");
13
13
  const client_1 = require("../client");
14
14
  const selection_1 = require("../selection");
15
15
  const query_keys_1 = require("../query-keys");
16
16
  /** Query key factory - re-exported from query-keys.ts */
17
- exports.platformApiModuleQueryKey = query_keys_1.platformApiModuleKeys.detail;
18
- function usePlatformApiModuleQuery(params) {
17
+ exports.orgChartEdgeGrantQueryKey = query_keys_1.orgChartEdgeGrantKeys.detail;
18
+ function useOrgChartEdgeGrantQuery(params) {
19
19
  const args = (0, selection_1.buildSelectionArgs)(params.selection);
20
20
  const { selection: _selection, ...queryOptions } = params ?? {};
21
21
  void _selection;
22
22
  return (0, react_query_1.useQuery)({
23
- queryKey: query_keys_1.platformApiModuleKeys.detail(params.id),
23
+ queryKey: query_keys_1.orgChartEdgeGrantKeys.detail(params.id),
24
24
  queryFn: () => (0, client_1.getClient)()
25
- .platformApiModule.findOne({
25
+ .orgChartEdgeGrant.findOne({
26
26
  id: params.id,
27
27
  select: args.select,
28
28
  })
@@ -30,21 +30,21 @@ function usePlatformApiModuleQuery(params) {
30
30
  ...queryOptions,
31
31
  });
32
32
  }
33
- async function fetchPlatformApiModuleQuery(params) {
33
+ async function fetchOrgChartEdgeGrantQuery(params) {
34
34
  const args = (0, selection_1.buildSelectionArgs)(params.selection);
35
35
  return (0, client_1.getClient)()
36
- .platformApiModule.findOne({
36
+ .orgChartEdgeGrant.findOne({
37
37
  id: params.id,
38
38
  select: args.select,
39
39
  })
40
40
  .unwrap();
41
41
  }
42
- async function prefetchPlatformApiModuleQuery(queryClient, params) {
42
+ async function prefetchOrgChartEdgeGrantQuery(queryClient, params) {
43
43
  const args = (0, selection_1.buildSelectionArgs)(params.selection);
44
44
  await queryClient.prefetchQuery({
45
- queryKey: query_keys_1.platformApiModuleKeys.detail(params.id),
45
+ queryKey: query_keys_1.orgChartEdgeGrantKeys.detail(params.id),
46
46
  queryFn: () => (0, client_1.getClient)()
47
- .platformApiModule.findOne({
47
+ .orgChartEdgeGrant.findOne({
48
48
  id: params.id,
49
49
  select: args.select,
50
50
  })
@@ -0,0 +1,69 @@
1
+ /**
2
+ * Append-only log of hierarchy edge grants and revocations; triggers apply changes to the edges table
3
+ * @generated by @constructive-io/graphql-codegen
4
+ * DO NOT EDIT - changes will be overwritten
5
+ */
6
+ import type { UseQueryOptions, UseQueryResult, QueryClient } from '@tanstack/react-query';
7
+ import type { ListSelectionConfig } from '../selection';
8
+ import type { OrgChartEdgeGrantSelect, OrgChartEdgeGrantWithRelations, OrgChartEdgeGrantFilter, OrgChartEdgeGrantOrderBy } from '../../orm/input-types';
9
+ import type { InferSelectResult, ConnectionResult, HookStrictSelect } from '../../orm/select-types';
10
+ export type { OrgChartEdgeGrantSelect, OrgChartEdgeGrantWithRelations, OrgChartEdgeGrantFilter, OrgChartEdgeGrantOrderBy, } from '../../orm/input-types';
11
+ /** Query key factory - re-exported from query-keys.ts */
12
+ export declare const orgChartEdgeGrantsQueryKey: (variables?: object) => readonly ["orgchartedgegrant", "list", object];
13
+ /**
14
+ * Append-only log of hierarchy edge grants and revocations; triggers apply changes to the edges table
15
+ *
16
+ * @example
17
+ * ```tsx
18
+ * const { data, isLoading } = useOrgChartEdgeGrantsQuery({
19
+ * selection: {
20
+ * fields: { id: true, name: true },
21
+ * where: { name: { equalTo: "example" } },
22
+ * orderBy: ['CREATED_AT_DESC'],
23
+ * first: 10,
24
+ * },
25
+ * });
26
+ * ```
27
+ */
28
+ export declare function useOrgChartEdgeGrantsQuery<S extends OrgChartEdgeGrantSelect, TData = {
29
+ orgChartEdgeGrants: ConnectionResult<InferSelectResult<OrgChartEdgeGrantWithRelations, S>>;
30
+ }>(params: {
31
+ selection: {
32
+ fields: S;
33
+ } & Omit<ListSelectionConfig<S, OrgChartEdgeGrantFilter, OrgChartEdgeGrantOrderBy>, 'fields'> & HookStrictSelect<NoInfer<S>, OrgChartEdgeGrantSelect>;
34
+ } & Omit<UseQueryOptions<{
35
+ orgChartEdgeGrants: ConnectionResult<InferSelectResult<OrgChartEdgeGrantWithRelations, S>>;
36
+ }, Error, TData>, 'queryKey' | 'queryFn'>): UseQueryResult<TData>;
37
+ /**
38
+ * Append-only log of hierarchy edge grants and revocations; triggers apply changes to the edges table
39
+ *
40
+ * @example
41
+ * ```ts
42
+ * const data = await fetchOrgChartEdgeGrantsQuery({
43
+ * selection: {
44
+ * fields: { id: true },
45
+ * first: 10,
46
+ * },
47
+ * });
48
+ * ```
49
+ */
50
+ export declare function fetchOrgChartEdgeGrantsQuery<S extends OrgChartEdgeGrantSelect>(params: {
51
+ selection: {
52
+ fields: S;
53
+ } & Omit<ListSelectionConfig<S, OrgChartEdgeGrantFilter, OrgChartEdgeGrantOrderBy>, 'fields'> & HookStrictSelect<NoInfer<S>, OrgChartEdgeGrantSelect>;
54
+ }): Promise<{
55
+ orgChartEdgeGrants: ConnectionResult<InferSelectResult<OrgChartEdgeGrantWithRelations, S>>;
56
+ }>;
57
+ /**
58
+ * Append-only log of hierarchy edge grants and revocations; triggers apply changes to the edges table
59
+ *
60
+ * @example
61
+ * ```ts
62
+ * await prefetchOrgChartEdgeGrantsQuery(queryClient, { selection: { fields: { id: true }, first: 10 } });
63
+ * ```
64
+ */
65
+ export declare function prefetchOrgChartEdgeGrantsQuery<S extends OrgChartEdgeGrantSelect>(queryClient: QueryClient, params: {
66
+ selection: {
67
+ fields: S;
68
+ } & Omit<ListSelectionConfig<S, OrgChartEdgeGrantFilter, OrgChartEdgeGrantOrderBy>, 'fields'> & HookStrictSelect<NoInfer<S>, OrgChartEdgeGrantSelect>;
69
+ }): Promise<void>;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ /**
3
+ * Append-only log of hierarchy edge grants and revocations; triggers apply changes to the edges table
4
+ * @generated by @constructive-io/graphql-codegen
5
+ * DO NOT EDIT - changes will be overwritten
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.orgChartEdgeGrantsQueryKey = void 0;
9
+ exports.useOrgChartEdgeGrantsQuery = useOrgChartEdgeGrantsQuery;
10
+ exports.fetchOrgChartEdgeGrantsQuery = fetchOrgChartEdgeGrantsQuery;
11
+ exports.prefetchOrgChartEdgeGrantsQuery = prefetchOrgChartEdgeGrantsQuery;
12
+ const react_query_1 = require("@tanstack/react-query");
13
+ const client_1 = require("../client");
14
+ const selection_1 = require("../selection");
15
+ const query_keys_1 = require("../query-keys");
16
+ /** Query key factory - re-exported from query-keys.ts */
17
+ exports.orgChartEdgeGrantsQueryKey = query_keys_1.orgChartEdgeGrantKeys.list;
18
+ function useOrgChartEdgeGrantsQuery(params) {
19
+ const args = (0, selection_1.buildListSelectionArgs)(params.selection);
20
+ const { selection: _selection, ...queryOptions } = params ?? {};
21
+ void _selection;
22
+ return (0, react_query_1.useQuery)({
23
+ queryKey: query_keys_1.orgChartEdgeGrantKeys.list(args),
24
+ queryFn: () => (0, client_1.getClient)().orgChartEdgeGrant.findMany(args).unwrap(),
25
+ ...queryOptions,
26
+ });
27
+ }
28
+ async function fetchOrgChartEdgeGrantsQuery(params) {
29
+ const args = (0, selection_1.buildListSelectionArgs)(params.selection);
30
+ return (0, client_1.getClient)().orgChartEdgeGrant.findMany(args).unwrap();
31
+ }
32
+ async function prefetchOrgChartEdgeGrantsQuery(queryClient, params) {
33
+ const args = (0, selection_1.buildListSelectionArgs)(params.selection);
34
+ await queryClient.prefetchQuery({
35
+ queryKey: query_keys_1.orgChartEdgeGrantKeys.list(args),
36
+ queryFn: () => (0, client_1.getClient)().orgChartEdgeGrant.findMany(args).unwrap(),
37
+ });
38
+ }