@constructive-io/react 1.9.2 → 1.9.4

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
+ * 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,36 @@
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 { useMutation, useQueryClient } from '@tanstack/react-query';
7
+ import { getClient } from '../client';
8
+ import { buildSelectionArgs } from '../selection';
9
+ import { orgChartEdgeKeys } from '../query-keys';
10
+ import { orgChartEdgeMutationKeys } from '../mutation-keys';
11
+ export function useDeleteOrgChartEdgeMutation(params) {
12
+ const args = buildSelectionArgs(params.selection);
13
+ const { selection: _selection, ...mutationOptions } = params ?? {};
14
+ void _selection;
15
+ const queryClient = useQueryClient();
16
+ return useMutation({
17
+ mutationKey: orgChartEdgeMutationKeys.all,
18
+ mutationFn: ({ id }) => getClient()
19
+ .orgChartEdge.delete({
20
+ where: {
21
+ id,
22
+ },
23
+ select: args.select,
24
+ })
25
+ .unwrap(),
26
+ onSuccess: (_, variables) => {
27
+ queryClient.removeQueries({
28
+ queryKey: orgChartEdgeKeys.detail(variables.id),
29
+ });
30
+ queryClient.invalidateQueries({
31
+ queryKey: orgChartEdgeKeys.lists(),
32
+ });
33
+ },
34
+ ...mutationOptions,
35
+ });
36
+ }
@@ -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,35 +1,35 @@
1
1
  /**
2
- * Server-side module configuration for an API surface; stores module name and JSON settings
2
+ * Append-only log of hierarchy edge grants and revocations; triggers apply changes to the edges table
3
3
  * @generated by @constructive-io/graphql-codegen
4
4
  * DO NOT EDIT - changes will be overwritten
5
5
  */
6
6
  import { useMutation, useQueryClient } from '@tanstack/react-query';
7
7
  import { getClient } from '../client';
8
8
  import { buildSelectionArgs } from '../selection';
9
- import { platformApiModuleKeys } from '../query-keys';
10
- import { platformApiModuleMutationKeys } from '../mutation-keys';
11
- export function useUpdatePlatformApiModuleMutation(params) {
9
+ import { orgChartEdgeGrantKeys } from '../query-keys';
10
+ import { orgChartEdgeGrantMutationKeys } from '../mutation-keys';
11
+ export function useUpdateOrgChartEdgeGrantMutation(params) {
12
12
  const args = buildSelectionArgs(params.selection);
13
13
  const { selection: _selection, ...mutationOptions } = params ?? {};
14
14
  void _selection;
15
15
  const queryClient = useQueryClient();
16
16
  return useMutation({
17
- mutationKey: platformApiModuleMutationKeys.all,
18
- mutationFn: ({ id, platformApiModulePatch, }) => getClient()
19
- .platformApiModule.update({
17
+ mutationKey: orgChartEdgeGrantMutationKeys.all,
18
+ mutationFn: ({ id, orgChartEdgeGrantPatch, }) => getClient()
19
+ .orgChartEdgeGrant.update({
20
20
  where: {
21
21
  id,
22
22
  },
23
- data: platformApiModulePatch,
23
+ data: orgChartEdgeGrantPatch,
24
24
  select: args.select,
25
25
  })
26
26
  .unwrap(),
27
27
  onSuccess: (_, variables) => {
28
28
  queryClient.invalidateQueries({
29
- queryKey: platformApiModuleKeys.detail(variables.id),
29
+ queryKey: orgChartEdgeGrantKeys.detail(variables.id),
30
30
  });
31
31
  queryClient.invalidateQueries({
32
- queryKey: platformApiModuleKeys.lists(),
32
+ queryKey: orgChartEdgeGrantKeys.lists(),
33
33
  });
34
34
  },
35
35
  ...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,37 @@
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 { useMutation, useQueryClient } from '@tanstack/react-query';
7
+ import { getClient } from '../client';
8
+ import { buildSelectionArgs } from '../selection';
9
+ import { orgChartEdgeKeys } from '../query-keys';
10
+ import { orgChartEdgeMutationKeys } from '../mutation-keys';
11
+ export function useUpdateOrgChartEdgeMutation(params) {
12
+ const args = buildSelectionArgs(params.selection);
13
+ const { selection: _selection, ...mutationOptions } = params ?? {};
14
+ void _selection;
15
+ const queryClient = useQueryClient();
16
+ return useMutation({
17
+ mutationKey: orgChartEdgeMutationKeys.all,
18
+ mutationFn: ({ id, orgChartEdgePatch }) => getClient()
19
+ .orgChartEdge.update({
20
+ where: {
21
+ id,
22
+ },
23
+ data: orgChartEdgePatch,
24
+ select: args.select,
25
+ })
26
+ .unwrap(),
27
+ onSuccess: (_, variables) => {
28
+ queryClient.invalidateQueries({
29
+ queryKey: orgChartEdgeKeys.detail(variables.id),
30
+ });
31
+ queryClient.invalidateQueries({
32
+ queryKey: orgChartEdgeKeys.lists(),
33
+ });
34
+ },
35
+ ...mutationOptions,
36
+ });
37
+ }
@@ -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';
@@ -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';
@@ -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,22 +1,22 @@
1
1
  /**
2
- * Server-side module configuration for an API surface; stores module name and JSON settings
2
+ * Append-only log of hierarchy edge grants and revocations; triggers apply changes to the edges table
3
3
  * @generated by @constructive-io/graphql-codegen
4
4
  * DO NOT EDIT - changes will be overwritten
5
5
  */
6
6
  import { useQuery } from '@tanstack/react-query';
7
7
  import { getClient } from '../client';
8
8
  import { buildSelectionArgs } from '../selection';
9
- import { platformApiModuleKeys } from '../query-keys';
9
+ import { orgChartEdgeGrantKeys } from '../query-keys';
10
10
  /** Query key factory - re-exported from query-keys.ts */
11
- export const platformApiModuleQueryKey = platformApiModuleKeys.detail;
12
- export function usePlatformApiModuleQuery(params) {
11
+ export const orgChartEdgeGrantQueryKey = orgChartEdgeGrantKeys.detail;
12
+ export function useOrgChartEdgeGrantQuery(params) {
13
13
  const args = buildSelectionArgs(params.selection);
14
14
  const { selection: _selection, ...queryOptions } = params ?? {};
15
15
  void _selection;
16
16
  return useQuery({
17
- queryKey: platformApiModuleKeys.detail(params.id),
17
+ queryKey: orgChartEdgeGrantKeys.detail(params.id),
18
18
  queryFn: () => getClient()
19
- .platformApiModule.findOne({
19
+ .orgChartEdgeGrant.findOne({
20
20
  id: params.id,
21
21
  select: args.select,
22
22
  })
@@ -24,21 +24,21 @@ export function usePlatformApiModuleQuery(params) {
24
24
  ...queryOptions,
25
25
  });
26
26
  }
27
- export async function fetchPlatformApiModuleQuery(params) {
27
+ export async function fetchOrgChartEdgeGrantQuery(params) {
28
28
  const args = buildSelectionArgs(params.selection);
29
29
  return getClient()
30
- .platformApiModule.findOne({
30
+ .orgChartEdgeGrant.findOne({
31
31
  id: params.id,
32
32
  select: args.select,
33
33
  })
34
34
  .unwrap();
35
35
  }
36
- export async function prefetchPlatformApiModuleQuery(queryClient, params) {
36
+ export async function prefetchOrgChartEdgeGrantQuery(queryClient, params) {
37
37
  const args = buildSelectionArgs(params.selection);
38
38
  await queryClient.prefetchQuery({
39
- queryKey: platformApiModuleKeys.detail(params.id),
39
+ queryKey: orgChartEdgeGrantKeys.detail(params.id),
40
40
  queryFn: () => getClient()
41
- .platformApiModule.findOne({
41
+ .orgChartEdgeGrant.findOne({
42
42
  id: params.id,
43
43
  select: args.select,
44
44
  })
@@ -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>;
@@ -1,32 +1,32 @@
1
1
  /**
2
- * Server-side module configuration for an API surface; stores module name and JSON settings
2
+ * Append-only log of hierarchy edge grants and revocations; triggers apply changes to the edges table
3
3
  * @generated by @constructive-io/graphql-codegen
4
4
  * DO NOT EDIT - changes will be overwritten
5
5
  */
6
6
  import { useQuery } from '@tanstack/react-query';
7
7
  import { getClient } from '../client';
8
8
  import { buildListSelectionArgs } from '../selection';
9
- import { platformApiModuleKeys } from '../query-keys';
9
+ import { orgChartEdgeGrantKeys } from '../query-keys';
10
10
  /** Query key factory - re-exported from query-keys.ts */
11
- export const platformApiModulesQueryKey = platformApiModuleKeys.list;
12
- export function usePlatformApiModulesQuery(params) {
11
+ export const orgChartEdgeGrantsQueryKey = orgChartEdgeGrantKeys.list;
12
+ export function useOrgChartEdgeGrantsQuery(params) {
13
13
  const args = buildListSelectionArgs(params.selection);
14
14
  const { selection: _selection, ...queryOptions } = params ?? {};
15
15
  void _selection;
16
16
  return useQuery({
17
- queryKey: platformApiModuleKeys.list(args),
18
- queryFn: () => getClient().platformApiModule.findMany(args).unwrap(),
17
+ queryKey: orgChartEdgeGrantKeys.list(args),
18
+ queryFn: () => getClient().orgChartEdgeGrant.findMany(args).unwrap(),
19
19
  ...queryOptions,
20
20
  });
21
21
  }
22
- export async function fetchPlatformApiModulesQuery(params) {
22
+ export async function fetchOrgChartEdgeGrantsQuery(params) {
23
23
  const args = buildListSelectionArgs(params.selection);
24
- return getClient().platformApiModule.findMany(args).unwrap();
24
+ return getClient().orgChartEdgeGrant.findMany(args).unwrap();
25
25
  }
26
- export async function prefetchPlatformApiModulesQuery(queryClient, params) {
26
+ export async function prefetchOrgChartEdgeGrantsQuery(queryClient, params) {
27
27
  const args = buildListSelectionArgs(params.selection);
28
28
  await queryClient.prefetchQuery({
29
- queryKey: platformApiModuleKeys.list(args),
30
- queryFn: () => getClient().platformApiModule.findMany(args).unwrap(),
29
+ queryKey: orgChartEdgeGrantKeys.list(args),
30
+ queryFn: () => getClient().orgChartEdgeGrant.findMany(args).unwrap(),
31
31
  });
32
32
  }
@@ -0,0 +1,65 @@
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 { UseQueryOptions, UseQueryResult, QueryClient } 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
+ /** Query key factory - re-exported from query-keys.ts */
11
+ export declare const orgChartEdgeQueryKey: (id: string | number) => readonly ["orgchartedge", "detail", string | number];
12
+ /**
13
+ * Organizational chart edges defining parent-child reporting relationships between members within an entity
14
+ *
15
+ * @example
16
+ * ```tsx
17
+ * const { data, isLoading } = useOrgChartEdgeQuery({
18
+ * id: 'some-id',
19
+ * selection: { fields: { id: true, name: true } },
20
+ * });
21
+ * ```
22
+ */
23
+ export declare function useOrgChartEdgeQuery<S extends OrgChartEdgeSelect, TData = {
24
+ orgChartEdge: InferSelectResult<OrgChartEdgeWithRelations, S> | null;
25
+ }>(params: {
26
+ id: string;
27
+ selection: {
28
+ fields: S;
29
+ } & HookStrictSelect<NoInfer<S>, OrgChartEdgeSelect>;
30
+ } & Omit<UseQueryOptions<{
31
+ orgChartEdge: InferSelectResult<OrgChartEdgeWithRelations, S> | null;
32
+ }, Error, TData>, 'queryKey' | 'queryFn'>): UseQueryResult<TData>;
33
+ /**
34
+ * Organizational chart edges defining parent-child reporting relationships between members within an entity
35
+ *
36
+ * @example
37
+ * ```ts
38
+ * const data = await fetchOrgChartEdgeQuery({
39
+ * id: 'some-id',
40
+ * selection: { fields: { id: true } },
41
+ * });
42
+ * ```
43
+ */
44
+ export declare function fetchOrgChartEdgeQuery<S extends OrgChartEdgeSelect>(params: {
45
+ id: string;
46
+ selection: {
47
+ fields: S;
48
+ } & HookStrictSelect<NoInfer<S>, OrgChartEdgeSelect>;
49
+ }): Promise<{
50
+ orgChartEdge: InferSelectResult<OrgChartEdgeWithRelations, S> | null;
51
+ }>;
52
+ /**
53
+ * Organizational chart edges defining parent-child reporting relationships between members within an entity
54
+ *
55
+ * @example
56
+ * ```ts
57
+ * await prefetchOrgChartEdgeQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } });
58
+ * ```
59
+ */
60
+ export declare function prefetchOrgChartEdgeQuery<S extends OrgChartEdgeSelect>(queryClient: QueryClient, params: {
61
+ id: string;
62
+ selection: {
63
+ fields: S;
64
+ } & HookStrictSelect<NoInfer<S>, OrgChartEdgeSelect>;
65
+ }): Promise<void>;
@@ -0,0 +1,47 @@
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 { useQuery } from '@tanstack/react-query';
7
+ import { getClient } from '../client';
8
+ import { buildSelectionArgs } from '../selection';
9
+ import { orgChartEdgeKeys } from '../query-keys';
10
+ /** Query key factory - re-exported from query-keys.ts */
11
+ export const orgChartEdgeQueryKey = orgChartEdgeKeys.detail;
12
+ export function useOrgChartEdgeQuery(params) {
13
+ const args = buildSelectionArgs(params.selection);
14
+ const { selection: _selection, ...queryOptions } = params ?? {};
15
+ void _selection;
16
+ return useQuery({
17
+ queryKey: orgChartEdgeKeys.detail(params.id),
18
+ queryFn: () => getClient()
19
+ .orgChartEdge.findOne({
20
+ id: params.id,
21
+ select: args.select,
22
+ })
23
+ .unwrap(),
24
+ ...queryOptions,
25
+ });
26
+ }
27
+ export async function fetchOrgChartEdgeQuery(params) {
28
+ const args = buildSelectionArgs(params.selection);
29
+ return getClient()
30
+ .orgChartEdge.findOne({
31
+ id: params.id,
32
+ select: args.select,
33
+ })
34
+ .unwrap();
35
+ }
36
+ export async function prefetchOrgChartEdgeQuery(queryClient, params) {
37
+ const args = buildSelectionArgs(params.selection);
38
+ await queryClient.prefetchQuery({
39
+ queryKey: orgChartEdgeKeys.detail(params.id),
40
+ queryFn: () => getClient()
41
+ .orgChartEdge.findOne({
42
+ id: params.id,
43
+ select: args.select,
44
+ })
45
+ .unwrap(),
46
+ });
47
+ }