@constructive-io/react 0.8.0 → 0.8.2

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 (254) hide show
  1. package/README.md +0 -8
  2. package/admin/orm/input-types.d.ts +33 -127
  3. package/admin/schema-types.d.ts +20 -110
  4. package/admin/types.d.ts +0 -19
  5. package/auth/hooks/index.d.ts +1 -1
  6. package/auth/hooks/index.js +1 -1
  7. package/auth/hooks/invalidation.d.ts +16 -16
  8. package/auth/hooks/invalidation.js +33 -33
  9. package/auth/hooks/mutation-keys.d.ts +32 -32
  10. package/auth/hooks/mutation-keys.js +20 -20
  11. package/auth/hooks/mutations/index.d.ts +9 -9
  12. package/auth/hooks/mutations/index.js +9 -9
  13. package/auth/hooks/queries/index.d.ts +6 -6
  14. package/auth/hooks/queries/index.js +6 -6
  15. package/auth/hooks/query-keys.d.ts +38 -38
  16. package/auth/hooks/query-keys.js +23 -23
  17. package/auth/orm/index.d.ts +6 -6
  18. package/auth/orm/index.js +6 -6
  19. package/auth/orm/input-types.d.ts +279 -327
  20. package/auth/orm/input-types.js +9 -1
  21. package/auth/orm/models/index.d.ts +3 -3
  22. package/auth/orm/models/index.js +7 -7
  23. package/auth/schema-types.d.ts +276 -188
  24. package/auth/types.d.ts +14 -24
  25. package/esm/admin/orm/input-types.d.ts +33 -127
  26. package/esm/admin/schema-types.d.ts +20 -110
  27. package/esm/admin/types.d.ts +0 -19
  28. package/esm/auth/hooks/index.d.ts +1 -1
  29. package/esm/auth/hooks/index.js +1 -1
  30. package/esm/auth/hooks/invalidation.d.ts +16 -16
  31. package/esm/auth/hooks/invalidation.js +34 -34
  32. package/esm/auth/hooks/mutation-keys.d.ts +32 -32
  33. package/esm/auth/hooks/mutation-keys.js +19 -19
  34. package/esm/auth/hooks/mutations/index.d.ts +9 -9
  35. package/esm/auth/hooks/mutations/index.js +9 -9
  36. package/esm/auth/hooks/queries/index.d.ts +6 -6
  37. package/esm/auth/hooks/queries/index.js +6 -6
  38. package/esm/auth/hooks/query-keys.d.ts +38 -38
  39. package/esm/auth/hooks/query-keys.js +22 -22
  40. package/esm/auth/orm/index.d.ts +6 -6
  41. package/esm/auth/orm/index.js +6 -6
  42. package/esm/auth/orm/input-types.d.ts +279 -327
  43. package/esm/auth/orm/input-types.js +9 -1
  44. package/esm/auth/orm/models/index.d.ts +3 -3
  45. package/esm/auth/orm/models/index.js +3 -3
  46. package/esm/auth/schema-types.d.ts +276 -188
  47. package/esm/auth/types.d.ts +14 -24
  48. package/esm/index.d.ts +5 -1
  49. package/esm/index.js +5 -1
  50. package/esm/objects/orm/input-types.d.ts +17 -48
  51. package/esm/objects/schema-types.d.ts +3 -37
  52. package/esm/objects/types.d.ts +0 -6
  53. package/esm/public/hooks/index.d.ts +1 -1
  54. package/esm/public/hooks/index.js +1 -1
  55. package/esm/public/hooks/invalidation.d.ts +77 -53
  56. package/esm/public/hooks/invalidation.js +202 -138
  57. package/esm/public/hooks/mutation-keys.d.ts +180 -122
  58. package/esm/public/hooks/mutation-keys.js +129 -86
  59. package/esm/public/hooks/mutations/index.d.ts +50 -33
  60. package/esm/public/hooks/mutations/index.js +50 -33
  61. package/esm/public/hooks/mutations/useAcceptDatabaseTransferMutation.d.ts +20 -0
  62. package/esm/public/hooks/mutations/useAcceptDatabaseTransferMutation.js +23 -0
  63. package/esm/public/hooks/mutations/useCancelDatabaseTransferMutation.d.ts +20 -0
  64. package/esm/public/hooks/mutations/useCancelDatabaseTransferMutation.js +23 -0
  65. package/esm/public/hooks/mutations/useConstructBlueprintMutation.d.ts +20 -0
  66. package/esm/public/hooks/mutations/useConstructBlueprintMutation.js +23 -0
  67. package/esm/public/hooks/mutations/useCopyTemplateToBlueprintMutation.d.ts +20 -0
  68. package/esm/public/hooks/mutations/useCopyTemplateToBlueprintMutation.js +23 -0
  69. package/esm/public/hooks/mutations/useCreateBlueprintMutation.d.ts +34 -0
  70. package/esm/public/hooks/mutations/useCreateBlueprintMutation.js +31 -0
  71. package/esm/public/hooks/mutations/useCreateBlueprintTemplateMutation.d.ts +34 -0
  72. package/esm/public/hooks/mutations/useCreateBlueprintTemplateMutation.js +31 -0
  73. package/esm/public/hooks/mutations/useCreateDatabaseTransferMutation.d.ts +34 -0
  74. package/esm/public/hooks/mutations/useCreateDatabaseTransferMutation.js +31 -0
  75. package/esm/public/hooks/mutations/useCreateEmbeddingChunkMutation.d.ts +34 -0
  76. package/esm/public/hooks/mutations/useCreateEmbeddingChunkMutation.js +31 -0
  77. package/esm/public/hooks/mutations/useCreateEnumMutation.d.ts +34 -0
  78. package/esm/public/hooks/mutations/{useCreateUuidModuleMutation.js → useCreateEnumMutation.js} +7 -7
  79. package/esm/public/hooks/mutations/useDeleteBlueprintMutation.d.ts +38 -0
  80. package/esm/public/hooks/mutations/useDeleteBlueprintMutation.js +36 -0
  81. package/esm/public/hooks/mutations/useDeleteBlueprintTemplateMutation.d.ts +38 -0
  82. package/esm/public/hooks/mutations/useDeleteBlueprintTemplateMutation.js +36 -0
  83. package/esm/public/hooks/mutations/useDeleteDatabaseTransferMutation.d.ts +38 -0
  84. package/esm/public/hooks/mutations/useDeleteDatabaseTransferMutation.js +36 -0
  85. package/esm/public/hooks/mutations/useDeleteEmbeddingChunkMutation.d.ts +38 -0
  86. package/esm/public/hooks/mutations/useDeleteEmbeddingChunkMutation.js +36 -0
  87. package/esm/public/hooks/mutations/useDeleteEnumMutation.d.ts +38 -0
  88. package/esm/public/hooks/mutations/{useDeleteUuidModuleMutation.js → useDeleteEnumMutation.js} +8 -8
  89. package/esm/public/hooks/mutations/useRejectDatabaseTransferMutation.d.ts +20 -0
  90. package/esm/public/hooks/mutations/useRejectDatabaseTransferMutation.js +23 -0
  91. package/esm/public/hooks/mutations/useUpdateBlueprintMutation.d.ts +40 -0
  92. package/esm/public/hooks/mutations/useUpdateBlueprintMutation.js +37 -0
  93. package/esm/public/hooks/mutations/useUpdateBlueprintTemplateMutation.d.ts +40 -0
  94. package/esm/public/hooks/mutations/useUpdateBlueprintTemplateMutation.js +37 -0
  95. package/esm/public/hooks/mutations/useUpdateDatabaseTransferMutation.d.ts +40 -0
  96. package/esm/public/hooks/mutations/useUpdateDatabaseTransferMutation.js +37 -0
  97. package/esm/public/hooks/mutations/useUpdateEmbeddingChunkMutation.d.ts +40 -0
  98. package/esm/public/hooks/mutations/useUpdateEmbeddingChunkMutation.js +37 -0
  99. package/esm/public/hooks/mutations/useUpdateEnumMutation.d.ts +40 -0
  100. package/esm/public/hooks/mutations/{useUpdateUuidModuleMutation.js → useUpdateEnumMutation.js} +10 -10
  101. package/esm/public/hooks/queries/index.d.ts +25 -17
  102. package/esm/public/hooks/queries/index.js +25 -17
  103. package/esm/public/hooks/queries/useBlueprintQuery.d.ts +65 -0
  104. package/esm/public/hooks/queries/useBlueprintQuery.js +47 -0
  105. package/esm/public/hooks/queries/useBlueprintTemplateQuery.d.ts +65 -0
  106. package/esm/public/hooks/queries/useBlueprintTemplateQuery.js +47 -0
  107. package/esm/public/hooks/queries/useBlueprintTemplatesQuery.d.ts +69 -0
  108. package/esm/public/hooks/queries/useBlueprintTemplatesQuery.js +32 -0
  109. package/esm/public/hooks/queries/useBlueprintsQuery.d.ts +69 -0
  110. package/esm/public/hooks/queries/useBlueprintsQuery.js +32 -0
  111. package/esm/public/hooks/queries/useDatabaseTransferQuery.d.ts +65 -0
  112. package/esm/public/hooks/queries/useDatabaseTransferQuery.js +47 -0
  113. package/esm/public/hooks/queries/useDatabaseTransfersQuery.d.ts +69 -0
  114. package/esm/public/hooks/queries/useDatabaseTransfersQuery.js +32 -0
  115. package/esm/public/hooks/queries/useEmbeddingChunkQuery.d.ts +65 -0
  116. package/esm/public/hooks/queries/useEmbeddingChunkQuery.js +47 -0
  117. package/esm/public/hooks/queries/useEmbeddingChunksQuery.d.ts +69 -0
  118. package/esm/public/hooks/queries/useEmbeddingChunksQuery.js +32 -0
  119. package/esm/public/hooks/queries/useEnumQuery.d.ts +65 -0
  120. package/esm/public/hooks/queries/{useUuidModuleQuery.js → useEnumQuery.js} +11 -11
  121. package/esm/public/hooks/queries/useEnumsQuery.d.ts +69 -0
  122. package/esm/public/hooks/queries/{useUuidModulesQuery.js → useEnumsQuery.js} +11 -11
  123. package/esm/public/hooks/query-keys.d.ts +180 -124
  124. package/esm/public/hooks/query-keys.js +103 -71
  125. package/esm/public/orm/index.d.ts +81 -48
  126. package/esm/public/orm/index.js +26 -18
  127. package/esm/public/orm/input-types.d.ts +2447 -2980
  128. package/esm/public/orm/input-types.js +26 -1
  129. package/esm/public/orm/models/blueprint.d.ts +56 -0
  130. package/esm/public/orm/models/blueprint.js +94 -0
  131. package/esm/public/orm/models/blueprintTemplate.d.ts +56 -0
  132. package/esm/public/orm/models/blueprintTemplate.js +94 -0
  133. package/esm/public/orm/models/databaseTransfer.d.ts +56 -0
  134. package/esm/public/orm/models/databaseTransfer.js +94 -0
  135. package/esm/public/orm/models/embeddingChunk.d.ts +56 -0
  136. package/esm/public/orm/models/embeddingChunk.js +94 -0
  137. package/esm/public/orm/models/enum.d.ts +56 -0
  138. package/esm/public/orm/models/{uuidModule.js → enum.js} +23 -23
  139. package/esm/public/orm/models/index.d.ts +13 -9
  140. package/esm/public/orm/models/index.js +13 -9
  141. package/esm/public/orm/mutation/index.d.ts +98 -50
  142. package/esm/public/orm/mutation/index.js +126 -66
  143. package/esm/public/schema-types.d.ts +2328 -2206
  144. package/esm/public/types.d.ts +161 -379
  145. package/index.d.ts +5 -1
  146. package/index.js +5 -1
  147. package/objects/orm/input-types.d.ts +17 -48
  148. package/objects/schema-types.d.ts +3 -37
  149. package/objects/types.d.ts +0 -6
  150. package/package.json +3 -3
  151. package/public/hooks/index.d.ts +1 -1
  152. package/public/hooks/index.js +1 -1
  153. package/public/hooks/invalidation.d.ts +77 -53
  154. package/public/hooks/invalidation.js +201 -137
  155. package/public/hooks/mutation-keys.d.ts +180 -122
  156. package/public/hooks/mutation-keys.js +132 -89
  157. package/public/hooks/mutations/index.d.ts +50 -33
  158. package/public/hooks/mutations/index.js +50 -33
  159. package/public/hooks/mutations/useAcceptDatabaseTransferMutation.d.ts +20 -0
  160. package/public/hooks/mutations/useAcceptDatabaseTransferMutation.js +26 -0
  161. package/public/hooks/mutations/useCancelDatabaseTransferMutation.d.ts +20 -0
  162. package/public/hooks/mutations/useCancelDatabaseTransferMutation.js +26 -0
  163. package/public/hooks/mutations/useConstructBlueprintMutation.d.ts +20 -0
  164. package/public/hooks/mutations/useConstructBlueprintMutation.js +26 -0
  165. package/public/hooks/mutations/useCopyTemplateToBlueprintMutation.d.ts +20 -0
  166. package/public/hooks/mutations/useCopyTemplateToBlueprintMutation.js +26 -0
  167. package/public/hooks/mutations/useCreateBlueprintMutation.d.ts +34 -0
  168. package/public/hooks/mutations/useCreateBlueprintMutation.js +34 -0
  169. package/public/hooks/mutations/useCreateBlueprintTemplateMutation.d.ts +34 -0
  170. package/public/hooks/mutations/useCreateBlueprintTemplateMutation.js +34 -0
  171. package/public/hooks/mutations/useCreateDatabaseTransferMutation.d.ts +34 -0
  172. package/public/hooks/mutations/useCreateDatabaseTransferMutation.js +34 -0
  173. package/public/hooks/mutations/useCreateEmbeddingChunkMutation.d.ts +34 -0
  174. package/public/hooks/mutations/useCreateEmbeddingChunkMutation.js +34 -0
  175. package/public/hooks/mutations/useCreateEnumMutation.d.ts +34 -0
  176. package/public/hooks/mutations/{useCreateUuidModuleMutation.js → useCreateEnumMutation.js} +6 -6
  177. package/public/hooks/mutations/useDeleteBlueprintMutation.d.ts +38 -0
  178. package/public/hooks/mutations/useDeleteBlueprintMutation.js +39 -0
  179. package/public/hooks/mutations/useDeleteBlueprintTemplateMutation.d.ts +38 -0
  180. package/public/hooks/mutations/useDeleteBlueprintTemplateMutation.js +39 -0
  181. package/public/hooks/mutations/useDeleteDatabaseTransferMutation.d.ts +38 -0
  182. package/public/hooks/mutations/useDeleteDatabaseTransferMutation.js +39 -0
  183. package/public/hooks/mutations/useDeleteEmbeddingChunkMutation.d.ts +38 -0
  184. package/public/hooks/mutations/useDeleteEmbeddingChunkMutation.js +39 -0
  185. package/public/hooks/mutations/useDeleteEnumMutation.d.ts +38 -0
  186. package/public/hooks/mutations/{useDeleteUuidModuleMutation.js → useDeleteEnumMutation.js} +7 -7
  187. package/public/hooks/mutations/useRejectDatabaseTransferMutation.d.ts +20 -0
  188. package/public/hooks/mutations/useRejectDatabaseTransferMutation.js +26 -0
  189. package/public/hooks/mutations/useUpdateBlueprintMutation.d.ts +40 -0
  190. package/public/hooks/mutations/useUpdateBlueprintMutation.js +40 -0
  191. package/public/hooks/mutations/useUpdateBlueprintTemplateMutation.d.ts +40 -0
  192. package/public/hooks/mutations/useUpdateBlueprintTemplateMutation.js +40 -0
  193. package/public/hooks/mutations/useUpdateDatabaseTransferMutation.d.ts +40 -0
  194. package/public/hooks/mutations/useUpdateDatabaseTransferMutation.js +40 -0
  195. package/public/hooks/mutations/useUpdateEmbeddingChunkMutation.d.ts +40 -0
  196. package/public/hooks/mutations/useUpdateEmbeddingChunkMutation.js +40 -0
  197. package/public/hooks/mutations/useUpdateEnumMutation.d.ts +40 -0
  198. package/public/hooks/mutations/{useUpdateUuidModuleMutation.js → useUpdateEnumMutation.js} +9 -9
  199. package/public/hooks/queries/index.d.ts +25 -17
  200. package/public/hooks/queries/index.js +25 -17
  201. package/public/hooks/queries/useBlueprintQuery.d.ts +65 -0
  202. package/public/hooks/queries/useBlueprintQuery.js +53 -0
  203. package/public/hooks/queries/useBlueprintTemplateQuery.d.ts +65 -0
  204. package/public/hooks/queries/useBlueprintTemplateQuery.js +53 -0
  205. package/public/hooks/queries/useBlueprintTemplatesQuery.d.ts +69 -0
  206. package/public/hooks/queries/useBlueprintTemplatesQuery.js +38 -0
  207. package/public/hooks/queries/useBlueprintsQuery.d.ts +69 -0
  208. package/public/hooks/queries/useBlueprintsQuery.js +38 -0
  209. package/public/hooks/queries/useDatabaseTransferQuery.d.ts +65 -0
  210. package/public/hooks/queries/useDatabaseTransferQuery.js +53 -0
  211. package/public/hooks/queries/useDatabaseTransfersQuery.d.ts +69 -0
  212. package/public/hooks/queries/useDatabaseTransfersQuery.js +38 -0
  213. package/public/hooks/queries/useEmbeddingChunkQuery.d.ts +65 -0
  214. package/public/hooks/queries/useEmbeddingChunkQuery.js +53 -0
  215. package/public/hooks/queries/useEmbeddingChunksQuery.d.ts +69 -0
  216. package/public/hooks/queries/useEmbeddingChunksQuery.js +38 -0
  217. package/public/hooks/queries/useEnumQuery.d.ts +65 -0
  218. package/public/hooks/queries/{useUuidModuleQuery.js → useEnumQuery.js} +14 -14
  219. package/public/hooks/queries/useEnumsQuery.d.ts +69 -0
  220. package/public/hooks/queries/{useUuidModulesQuery.js → useEnumsQuery.js} +14 -14
  221. package/public/hooks/query-keys.d.ts +180 -124
  222. package/public/hooks/query-keys.js +106 -74
  223. package/public/orm/index.d.ts +81 -48
  224. package/public/orm/index.js +26 -18
  225. package/public/orm/input-types.d.ts +2447 -2980
  226. package/public/orm/input-types.js +26 -1
  227. package/public/orm/models/blueprint.d.ts +56 -0
  228. package/public/orm/models/blueprint.js +98 -0
  229. package/public/orm/models/blueprintTemplate.d.ts +56 -0
  230. package/public/orm/models/blueprintTemplate.js +98 -0
  231. package/public/orm/models/databaseTransfer.d.ts +56 -0
  232. package/public/orm/models/databaseTransfer.js +98 -0
  233. package/public/orm/models/embeddingChunk.d.ts +56 -0
  234. package/public/orm/models/embeddingChunk.js +98 -0
  235. package/public/orm/models/enum.d.ts +56 -0
  236. package/public/orm/models/{uuidModule.js → enum.js} +25 -25
  237. package/public/orm/models/index.d.ts +13 -9
  238. package/public/orm/models/index.js +29 -21
  239. package/public/orm/mutation/index.d.ts +98 -50
  240. package/public/orm/mutation/index.js +126 -66
  241. package/public/schema-types.d.ts +2328 -2206
  242. package/public/types.d.ts +161 -379
  243. package/esm/public/hooks/mutations/useCreateUuidModuleMutation.d.ts +0 -34
  244. package/esm/public/hooks/mutations/useDeleteUuidModuleMutation.d.ts +0 -38
  245. package/esm/public/hooks/mutations/useUpdateUuidModuleMutation.d.ts +0 -40
  246. package/esm/public/hooks/queries/useUuidModuleQuery.d.ts +0 -65
  247. package/esm/public/hooks/queries/useUuidModulesQuery.d.ts +0 -69
  248. package/esm/public/orm/models/uuidModule.d.ts +0 -56
  249. package/public/hooks/mutations/useCreateUuidModuleMutation.d.ts +0 -34
  250. package/public/hooks/mutations/useDeleteUuidModuleMutation.d.ts +0 -38
  251. package/public/hooks/mutations/useUpdateUuidModuleMutation.d.ts +0 -40
  252. package/public/hooks/queries/useUuidModuleQuery.d.ts +0 -65
  253. package/public/hooks/queries/useUuidModulesQuery.d.ts +0 -69
  254. package/public/orm/models/uuidModule.d.ts +0 -56
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ /**
3
+ * An owned, executable blueprint scoped to a specific database. Created by copying from a blueprint_template via copy_template_to_blueprint() or built from scratch. The owner can customize the definition before executing it with construct_blueprint(). Each blueprint tracks its execution status (draft/constructed/failed) and stores the ref_map of created table IDs after construction.
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.blueprintQueryKey = void 0;
9
+ exports.useBlueprintQuery = useBlueprintQuery;
10
+ exports.fetchBlueprintQuery = fetchBlueprintQuery;
11
+ exports.prefetchBlueprintQuery = prefetchBlueprintQuery;
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.blueprintQueryKey = query_keys_1.blueprintKeys.detail;
18
+ function useBlueprintQuery(params) {
19
+ const args = (0, selection_1.buildSelectionArgs)(params.selection);
20
+ const { selection: _selection, ...queryOptions } = params ?? {};
21
+ void _selection;
22
+ return (0, react_query_1.useQuery)({
23
+ queryKey: query_keys_1.blueprintKeys.detail(params.id),
24
+ queryFn: () => (0, client_1.getClient)()
25
+ .blueprint.findOne({
26
+ id: params.id,
27
+ select: args.select,
28
+ })
29
+ .unwrap(),
30
+ ...queryOptions,
31
+ });
32
+ }
33
+ async function fetchBlueprintQuery(params) {
34
+ const args = (0, selection_1.buildSelectionArgs)(params.selection);
35
+ return (0, client_1.getClient)()
36
+ .blueprint.findOne({
37
+ id: params.id,
38
+ select: args.select,
39
+ })
40
+ .unwrap();
41
+ }
42
+ async function prefetchBlueprintQuery(queryClient, params) {
43
+ const args = (0, selection_1.buildSelectionArgs)(params.selection);
44
+ await queryClient.prefetchQuery({
45
+ queryKey: query_keys_1.blueprintKeys.detail(params.id),
46
+ queryFn: () => (0, client_1.getClient)()
47
+ .blueprint.findOne({
48
+ id: params.id,
49
+ select: args.select,
50
+ })
51
+ .unwrap(),
52
+ });
53
+ }
@@ -0,0 +1,65 @@
1
+ /**
2
+ * A shareable, versioned schema recipe for the blueprint marketplace. Templates define arrays of secure_table_provision + relation_provision inputs that together describe a complete domain schema (e.g. e-commerce, telemedicine, habit tracker). Templates are never executed directly — they are copied into a blueprint first via copy_template_to_blueprint(). Can be private (owner-only) or public (marketplace-visible).
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 { BlueprintTemplateSelect, BlueprintTemplateWithRelations } from '../../orm/input-types';
8
+ import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types';
9
+ export type { BlueprintTemplateSelect, BlueprintTemplateWithRelations, } from '../../orm/input-types';
10
+ /** Query key factory - re-exported from query-keys.ts */
11
+ export declare const blueprintTemplateQueryKey: (id: string | number) => readonly ["blueprinttemplate", "detail", string | number];
12
+ /**
13
+ * A shareable, versioned schema recipe for the blueprint marketplace. Templates define arrays of secure_table_provision + relation_provision inputs that together describe a complete domain schema (e.g. e-commerce, telemedicine, habit tracker). Templates are never executed directly — they are copied into a blueprint first via copy_template_to_blueprint(). Can be private (owner-only) or public (marketplace-visible).
14
+ *
15
+ * @example
16
+ * ```tsx
17
+ * const { data, isLoading } = useBlueprintTemplateQuery({
18
+ * id: 'some-id',
19
+ * selection: { fields: { id: true, name: true } },
20
+ * });
21
+ * ```
22
+ */
23
+ export declare function useBlueprintTemplateQuery<S extends BlueprintTemplateSelect, TData = {
24
+ blueprintTemplate: InferSelectResult<BlueprintTemplateWithRelations, S> | null;
25
+ }>(params: {
26
+ id: string;
27
+ selection: {
28
+ fields: S;
29
+ } & HookStrictSelect<NoInfer<S>, BlueprintTemplateSelect>;
30
+ } & Omit<UseQueryOptions<{
31
+ blueprintTemplate: InferSelectResult<BlueprintTemplateWithRelations, S> | null;
32
+ }, Error, TData>, 'queryKey' | 'queryFn'>): UseQueryResult<TData>;
33
+ /**
34
+ * A shareable, versioned schema recipe for the blueprint marketplace. Templates define arrays of secure_table_provision + relation_provision inputs that together describe a complete domain schema (e.g. e-commerce, telemedicine, habit tracker). Templates are never executed directly — they are copied into a blueprint first via copy_template_to_blueprint(). Can be private (owner-only) or public (marketplace-visible).
35
+ *
36
+ * @example
37
+ * ```ts
38
+ * const data = await fetchBlueprintTemplateQuery({
39
+ * id: 'some-id',
40
+ * selection: { fields: { id: true } },
41
+ * });
42
+ * ```
43
+ */
44
+ export declare function fetchBlueprintTemplateQuery<S extends BlueprintTemplateSelect>(params: {
45
+ id: string;
46
+ selection: {
47
+ fields: S;
48
+ } & HookStrictSelect<NoInfer<S>, BlueprintTemplateSelect>;
49
+ }): Promise<{
50
+ blueprintTemplate: InferSelectResult<BlueprintTemplateWithRelations, S> | null;
51
+ }>;
52
+ /**
53
+ * A shareable, versioned schema recipe for the blueprint marketplace. Templates define arrays of secure_table_provision + relation_provision inputs that together describe a complete domain schema (e.g. e-commerce, telemedicine, habit tracker). Templates are never executed directly — they are copied into a blueprint first via copy_template_to_blueprint(). Can be private (owner-only) or public (marketplace-visible).
54
+ *
55
+ * @example
56
+ * ```ts
57
+ * await prefetchBlueprintTemplateQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } });
58
+ * ```
59
+ */
60
+ export declare function prefetchBlueprintTemplateQuery<S extends BlueprintTemplateSelect>(queryClient: QueryClient, params: {
61
+ id: string;
62
+ selection: {
63
+ fields: S;
64
+ } & HookStrictSelect<NoInfer<S>, BlueprintTemplateSelect>;
65
+ }): Promise<void>;
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ /**
3
+ * A shareable, versioned schema recipe for the blueprint marketplace. Templates define arrays of secure_table_provision + relation_provision inputs that together describe a complete domain schema (e.g. e-commerce, telemedicine, habit tracker). Templates are never executed directly — they are copied into a blueprint first via copy_template_to_blueprint(). Can be private (owner-only) or public (marketplace-visible).
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.blueprintTemplateQueryKey = void 0;
9
+ exports.useBlueprintTemplateQuery = useBlueprintTemplateQuery;
10
+ exports.fetchBlueprintTemplateQuery = fetchBlueprintTemplateQuery;
11
+ exports.prefetchBlueprintTemplateQuery = prefetchBlueprintTemplateQuery;
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.blueprintTemplateQueryKey = query_keys_1.blueprintTemplateKeys.detail;
18
+ function useBlueprintTemplateQuery(params) {
19
+ const args = (0, selection_1.buildSelectionArgs)(params.selection);
20
+ const { selection: _selection, ...queryOptions } = params ?? {};
21
+ void _selection;
22
+ return (0, react_query_1.useQuery)({
23
+ queryKey: query_keys_1.blueprintTemplateKeys.detail(params.id),
24
+ queryFn: () => (0, client_1.getClient)()
25
+ .blueprintTemplate.findOne({
26
+ id: params.id,
27
+ select: args.select,
28
+ })
29
+ .unwrap(),
30
+ ...queryOptions,
31
+ });
32
+ }
33
+ async function fetchBlueprintTemplateQuery(params) {
34
+ const args = (0, selection_1.buildSelectionArgs)(params.selection);
35
+ return (0, client_1.getClient)()
36
+ .blueprintTemplate.findOne({
37
+ id: params.id,
38
+ select: args.select,
39
+ })
40
+ .unwrap();
41
+ }
42
+ async function prefetchBlueprintTemplateQuery(queryClient, params) {
43
+ const args = (0, selection_1.buildSelectionArgs)(params.selection);
44
+ await queryClient.prefetchQuery({
45
+ queryKey: query_keys_1.blueprintTemplateKeys.detail(params.id),
46
+ queryFn: () => (0, client_1.getClient)()
47
+ .blueprintTemplate.findOne({
48
+ id: params.id,
49
+ select: args.select,
50
+ })
51
+ .unwrap(),
52
+ });
53
+ }
@@ -0,0 +1,69 @@
1
+ /**
2
+ * A shareable, versioned schema recipe for the blueprint marketplace. Templates define arrays of secure_table_provision + relation_provision inputs that together describe a complete domain schema (e.g. e-commerce, telemedicine, habit tracker). Templates are never executed directly — they are copied into a blueprint first via copy_template_to_blueprint(). Can be private (owner-only) or public (marketplace-visible).
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 { BlueprintTemplateSelect, BlueprintTemplateWithRelations, BlueprintTemplateFilter, BlueprintTemplateOrderBy } from '../../orm/input-types';
9
+ import type { InferSelectResult, ConnectionResult, HookStrictSelect } from '../../orm/select-types';
10
+ export type { BlueprintTemplateSelect, BlueprintTemplateWithRelations, BlueprintTemplateFilter, BlueprintTemplateOrderBy, } from '../../orm/input-types';
11
+ /** Query key factory - re-exported from query-keys.ts */
12
+ export declare const blueprintTemplatesQueryKey: (variables?: object) => readonly ["blueprinttemplate", "list", object];
13
+ /**
14
+ * A shareable, versioned schema recipe for the blueprint marketplace. Templates define arrays of secure_table_provision + relation_provision inputs that together describe a complete domain schema (e.g. e-commerce, telemedicine, habit tracker). Templates are never executed directly — they are copied into a blueprint first via copy_template_to_blueprint(). Can be private (owner-only) or public (marketplace-visible).
15
+ *
16
+ * @example
17
+ * ```tsx
18
+ * const { data, isLoading } = useBlueprintTemplatesQuery({
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 useBlueprintTemplatesQuery<S extends BlueprintTemplateSelect, TData = {
29
+ blueprintTemplates: ConnectionResult<InferSelectResult<BlueprintTemplateWithRelations, S>>;
30
+ }>(params: {
31
+ selection: {
32
+ fields: S;
33
+ } & Omit<ListSelectionConfig<S, BlueprintTemplateFilter, BlueprintTemplateOrderBy>, 'fields'> & HookStrictSelect<NoInfer<S>, BlueprintTemplateSelect>;
34
+ } & Omit<UseQueryOptions<{
35
+ blueprintTemplates: ConnectionResult<InferSelectResult<BlueprintTemplateWithRelations, S>>;
36
+ }, Error, TData>, 'queryKey' | 'queryFn'>): UseQueryResult<TData>;
37
+ /**
38
+ * A shareable, versioned schema recipe for the blueprint marketplace. Templates define arrays of secure_table_provision + relation_provision inputs that together describe a complete domain schema (e.g. e-commerce, telemedicine, habit tracker). Templates are never executed directly — they are copied into a blueprint first via copy_template_to_blueprint(). Can be private (owner-only) or public (marketplace-visible).
39
+ *
40
+ * @example
41
+ * ```ts
42
+ * const data = await fetchBlueprintTemplatesQuery({
43
+ * selection: {
44
+ * fields: { id: true },
45
+ * first: 10,
46
+ * },
47
+ * });
48
+ * ```
49
+ */
50
+ export declare function fetchBlueprintTemplatesQuery<S extends BlueprintTemplateSelect>(params: {
51
+ selection: {
52
+ fields: S;
53
+ } & Omit<ListSelectionConfig<S, BlueprintTemplateFilter, BlueprintTemplateOrderBy>, 'fields'> & HookStrictSelect<NoInfer<S>, BlueprintTemplateSelect>;
54
+ }): Promise<{
55
+ blueprintTemplates: ConnectionResult<InferSelectResult<BlueprintTemplateWithRelations, S>>;
56
+ }>;
57
+ /**
58
+ * A shareable, versioned schema recipe for the blueprint marketplace. Templates define arrays of secure_table_provision + relation_provision inputs that together describe a complete domain schema (e.g. e-commerce, telemedicine, habit tracker). Templates are never executed directly — they are copied into a blueprint first via copy_template_to_blueprint(). Can be private (owner-only) or public (marketplace-visible).
59
+ *
60
+ * @example
61
+ * ```ts
62
+ * await prefetchBlueprintTemplatesQuery(queryClient, { selection: { fields: { id: true }, first: 10 } });
63
+ * ```
64
+ */
65
+ export declare function prefetchBlueprintTemplatesQuery<S extends BlueprintTemplateSelect>(queryClient: QueryClient, params: {
66
+ selection: {
67
+ fields: S;
68
+ } & Omit<ListSelectionConfig<S, BlueprintTemplateFilter, BlueprintTemplateOrderBy>, 'fields'> & HookStrictSelect<NoInfer<S>, BlueprintTemplateSelect>;
69
+ }): Promise<void>;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ /**
3
+ * A shareable, versioned schema recipe for the blueprint marketplace. Templates define arrays of secure_table_provision + relation_provision inputs that together describe a complete domain schema (e.g. e-commerce, telemedicine, habit tracker). Templates are never executed directly — they are copied into a blueprint first via copy_template_to_blueprint(). Can be private (owner-only) or public (marketplace-visible).
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.blueprintTemplatesQueryKey = void 0;
9
+ exports.useBlueprintTemplatesQuery = useBlueprintTemplatesQuery;
10
+ exports.fetchBlueprintTemplatesQuery = fetchBlueprintTemplatesQuery;
11
+ exports.prefetchBlueprintTemplatesQuery = prefetchBlueprintTemplatesQuery;
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.blueprintTemplatesQueryKey = query_keys_1.blueprintTemplateKeys.list;
18
+ function useBlueprintTemplatesQuery(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.blueprintTemplateKeys.list(args),
24
+ queryFn: () => (0, client_1.getClient)().blueprintTemplate.findMany(args).unwrap(),
25
+ ...queryOptions,
26
+ });
27
+ }
28
+ async function fetchBlueprintTemplatesQuery(params) {
29
+ const args = (0, selection_1.buildListSelectionArgs)(params.selection);
30
+ return (0, client_1.getClient)().blueprintTemplate.findMany(args).unwrap();
31
+ }
32
+ async function prefetchBlueprintTemplatesQuery(queryClient, params) {
33
+ const args = (0, selection_1.buildListSelectionArgs)(params.selection);
34
+ await queryClient.prefetchQuery({
35
+ queryKey: query_keys_1.blueprintTemplateKeys.list(args),
36
+ queryFn: () => (0, client_1.getClient)().blueprintTemplate.findMany(args).unwrap(),
37
+ });
38
+ }
@@ -0,0 +1,69 @@
1
+ /**
2
+ * An owned, executable blueprint scoped to a specific database. Created by copying from a blueprint_template via copy_template_to_blueprint() or built from scratch. The owner can customize the definition before executing it with construct_blueprint(). Each blueprint tracks its execution status (draft/constructed/failed) and stores the ref_map of created table IDs after construction.
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 { BlueprintSelect, BlueprintWithRelations, BlueprintFilter, BlueprintOrderBy } from '../../orm/input-types';
9
+ import type { InferSelectResult, ConnectionResult, HookStrictSelect } from '../../orm/select-types';
10
+ export type { BlueprintSelect, BlueprintWithRelations, BlueprintFilter, BlueprintOrderBy, } from '../../orm/input-types';
11
+ /** Query key factory - re-exported from query-keys.ts */
12
+ export declare const blueprintsQueryKey: (variables?: object) => readonly ["blueprint", "list", object];
13
+ /**
14
+ * An owned, executable blueprint scoped to a specific database. Created by copying from a blueprint_template via copy_template_to_blueprint() or built from scratch. The owner can customize the definition before executing it with construct_blueprint(). Each blueprint tracks its execution status (draft/constructed/failed) and stores the ref_map of created table IDs after construction.
15
+ *
16
+ * @example
17
+ * ```tsx
18
+ * const { data, isLoading } = useBlueprintsQuery({
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 useBlueprintsQuery<S extends BlueprintSelect, TData = {
29
+ blueprints: ConnectionResult<InferSelectResult<BlueprintWithRelations, S>>;
30
+ }>(params: {
31
+ selection: {
32
+ fields: S;
33
+ } & Omit<ListSelectionConfig<S, BlueprintFilter, BlueprintOrderBy>, 'fields'> & HookStrictSelect<NoInfer<S>, BlueprintSelect>;
34
+ } & Omit<UseQueryOptions<{
35
+ blueprints: ConnectionResult<InferSelectResult<BlueprintWithRelations, S>>;
36
+ }, Error, TData>, 'queryKey' | 'queryFn'>): UseQueryResult<TData>;
37
+ /**
38
+ * An owned, executable blueprint scoped to a specific database. Created by copying from a blueprint_template via copy_template_to_blueprint() or built from scratch. The owner can customize the definition before executing it with construct_blueprint(). Each blueprint tracks its execution status (draft/constructed/failed) and stores the ref_map of created table IDs after construction.
39
+ *
40
+ * @example
41
+ * ```ts
42
+ * const data = await fetchBlueprintsQuery({
43
+ * selection: {
44
+ * fields: { id: true },
45
+ * first: 10,
46
+ * },
47
+ * });
48
+ * ```
49
+ */
50
+ export declare function fetchBlueprintsQuery<S extends BlueprintSelect>(params: {
51
+ selection: {
52
+ fields: S;
53
+ } & Omit<ListSelectionConfig<S, BlueprintFilter, BlueprintOrderBy>, 'fields'> & HookStrictSelect<NoInfer<S>, BlueprintSelect>;
54
+ }): Promise<{
55
+ blueprints: ConnectionResult<InferSelectResult<BlueprintWithRelations, S>>;
56
+ }>;
57
+ /**
58
+ * An owned, executable blueprint scoped to a specific database. Created by copying from a blueprint_template via copy_template_to_blueprint() or built from scratch. The owner can customize the definition before executing it with construct_blueprint(). Each blueprint tracks its execution status (draft/constructed/failed) and stores the ref_map of created table IDs after construction.
59
+ *
60
+ * @example
61
+ * ```ts
62
+ * await prefetchBlueprintsQuery(queryClient, { selection: { fields: { id: true }, first: 10 } });
63
+ * ```
64
+ */
65
+ export declare function prefetchBlueprintsQuery<S extends BlueprintSelect>(queryClient: QueryClient, params: {
66
+ selection: {
67
+ fields: S;
68
+ } & Omit<ListSelectionConfig<S, BlueprintFilter, BlueprintOrderBy>, 'fields'> & HookStrictSelect<NoInfer<S>, BlueprintSelect>;
69
+ }): Promise<void>;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ /**
3
+ * An owned, executable blueprint scoped to a specific database. Created by copying from a blueprint_template via copy_template_to_blueprint() or built from scratch. The owner can customize the definition before executing it with construct_blueprint(). Each blueprint tracks its execution status (draft/constructed/failed) and stores the ref_map of created table IDs after construction.
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.blueprintsQueryKey = void 0;
9
+ exports.useBlueprintsQuery = useBlueprintsQuery;
10
+ exports.fetchBlueprintsQuery = fetchBlueprintsQuery;
11
+ exports.prefetchBlueprintsQuery = prefetchBlueprintsQuery;
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.blueprintsQueryKey = query_keys_1.blueprintKeys.list;
18
+ function useBlueprintsQuery(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.blueprintKeys.list(args),
24
+ queryFn: () => (0, client_1.getClient)().blueprint.findMany(args).unwrap(),
25
+ ...queryOptions,
26
+ });
27
+ }
28
+ async function fetchBlueprintsQuery(params) {
29
+ const args = (0, selection_1.buildListSelectionArgs)(params.selection);
30
+ return (0, client_1.getClient)().blueprint.findMany(args).unwrap();
31
+ }
32
+ async function prefetchBlueprintsQuery(queryClient, params) {
33
+ const args = (0, selection_1.buildListSelectionArgs)(params.selection);
34
+ await queryClient.prefetchQuery({
35
+ queryKey: query_keys_1.blueprintKeys.list(args),
36
+ queryFn: () => (0, client_1.getClient)().blueprint.findMany(args).unwrap(),
37
+ });
38
+ }
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Single item query hook for DatabaseTransfer
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 { DatabaseTransferSelect, DatabaseTransferWithRelations } from '../../orm/input-types';
8
+ import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types';
9
+ export type { DatabaseTransferSelect, DatabaseTransferWithRelations } from '../../orm/input-types';
10
+ /** Query key factory - re-exported from query-keys.ts */
11
+ export declare const databaseTransferQueryKey: (id: string | number) => readonly ["databasetransfer", "detail", string | number];
12
+ /**
13
+ * Query hook for fetching a single DatabaseTransfer
14
+ *
15
+ * @example
16
+ * ```tsx
17
+ * const { data, isLoading } = useDatabaseTransferQuery({
18
+ * id: 'some-id',
19
+ * selection: { fields: { id: true, name: true } },
20
+ * });
21
+ * ```
22
+ */
23
+ export declare function useDatabaseTransferQuery<S extends DatabaseTransferSelect, TData = {
24
+ databaseTransfer: InferSelectResult<DatabaseTransferWithRelations, S> | null;
25
+ }>(params: {
26
+ id: string;
27
+ selection: {
28
+ fields: S;
29
+ } & HookStrictSelect<NoInfer<S>, DatabaseTransferSelect>;
30
+ } & Omit<UseQueryOptions<{
31
+ databaseTransfer: InferSelectResult<DatabaseTransferWithRelations, S> | null;
32
+ }, Error, TData>, 'queryKey' | 'queryFn'>): UseQueryResult<TData>;
33
+ /**
34
+ * Fetch a single DatabaseTransfer without React hooks
35
+ *
36
+ * @example
37
+ * ```ts
38
+ * const data = await fetchDatabaseTransferQuery({
39
+ * id: 'some-id',
40
+ * selection: { fields: { id: true } },
41
+ * });
42
+ * ```
43
+ */
44
+ export declare function fetchDatabaseTransferQuery<S extends DatabaseTransferSelect>(params: {
45
+ id: string;
46
+ selection: {
47
+ fields: S;
48
+ } & HookStrictSelect<NoInfer<S>, DatabaseTransferSelect>;
49
+ }): Promise<{
50
+ databaseTransfer: InferSelectResult<DatabaseTransferWithRelations, S> | null;
51
+ }>;
52
+ /**
53
+ * Prefetch a single DatabaseTransfer for SSR or cache warming
54
+ *
55
+ * @example
56
+ * ```ts
57
+ * await prefetchDatabaseTransferQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } });
58
+ * ```
59
+ */
60
+ export declare function prefetchDatabaseTransferQuery<S extends DatabaseTransferSelect>(queryClient: QueryClient, params: {
61
+ id: string;
62
+ selection: {
63
+ fields: S;
64
+ } & HookStrictSelect<NoInfer<S>, DatabaseTransferSelect>;
65
+ }): Promise<void>;
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ /**
3
+ * Single item query hook for DatabaseTransfer
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.databaseTransferQueryKey = void 0;
9
+ exports.useDatabaseTransferQuery = useDatabaseTransferQuery;
10
+ exports.fetchDatabaseTransferQuery = fetchDatabaseTransferQuery;
11
+ exports.prefetchDatabaseTransferQuery = prefetchDatabaseTransferQuery;
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.databaseTransferQueryKey = query_keys_1.databaseTransferKeys.detail;
18
+ function useDatabaseTransferQuery(params) {
19
+ const args = (0, selection_1.buildSelectionArgs)(params.selection);
20
+ const { selection: _selection, ...queryOptions } = params ?? {};
21
+ void _selection;
22
+ return (0, react_query_1.useQuery)({
23
+ queryKey: query_keys_1.databaseTransferKeys.detail(params.id),
24
+ queryFn: () => (0, client_1.getClient)()
25
+ .databaseTransfer.findOne({
26
+ id: params.id,
27
+ select: args.select,
28
+ })
29
+ .unwrap(),
30
+ ...queryOptions,
31
+ });
32
+ }
33
+ async function fetchDatabaseTransferQuery(params) {
34
+ const args = (0, selection_1.buildSelectionArgs)(params.selection);
35
+ return (0, client_1.getClient)()
36
+ .databaseTransfer.findOne({
37
+ id: params.id,
38
+ select: args.select,
39
+ })
40
+ .unwrap();
41
+ }
42
+ async function prefetchDatabaseTransferQuery(queryClient, params) {
43
+ const args = (0, selection_1.buildSelectionArgs)(params.selection);
44
+ await queryClient.prefetchQuery({
45
+ queryKey: query_keys_1.databaseTransferKeys.detail(params.id),
46
+ queryFn: () => (0, client_1.getClient)()
47
+ .databaseTransfer.findOne({
48
+ id: params.id,
49
+ select: args.select,
50
+ })
51
+ .unwrap(),
52
+ });
53
+ }
@@ -0,0 +1,69 @@
1
+ /**
2
+ * List query hook for DatabaseTransfer
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 { DatabaseTransferSelect, DatabaseTransferWithRelations, DatabaseTransferFilter, DatabaseTransferOrderBy } from '../../orm/input-types';
9
+ import type { InferSelectResult, ConnectionResult, HookStrictSelect } from '../../orm/select-types';
10
+ export type { DatabaseTransferSelect, DatabaseTransferWithRelations, DatabaseTransferFilter, DatabaseTransferOrderBy, } from '../../orm/input-types';
11
+ /** Query key factory - re-exported from query-keys.ts */
12
+ export declare const databaseTransfersQueryKey: (variables?: object) => readonly ["databasetransfer", "list", object];
13
+ /**
14
+ * Query hook for fetching DatabaseTransfer list
15
+ *
16
+ * @example
17
+ * ```tsx
18
+ * const { data, isLoading } = useDatabaseTransfersQuery({
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 useDatabaseTransfersQuery<S extends DatabaseTransferSelect, TData = {
29
+ databaseTransfers: ConnectionResult<InferSelectResult<DatabaseTransferWithRelations, S>>;
30
+ }>(params: {
31
+ selection: {
32
+ fields: S;
33
+ } & Omit<ListSelectionConfig<S, DatabaseTransferFilter, DatabaseTransferOrderBy>, 'fields'> & HookStrictSelect<NoInfer<S>, DatabaseTransferSelect>;
34
+ } & Omit<UseQueryOptions<{
35
+ databaseTransfers: ConnectionResult<InferSelectResult<DatabaseTransferWithRelations, S>>;
36
+ }, Error, TData>, 'queryKey' | 'queryFn'>): UseQueryResult<TData>;
37
+ /**
38
+ * Fetch DatabaseTransfer list without React hooks
39
+ *
40
+ * @example
41
+ * ```ts
42
+ * const data = await fetchDatabaseTransfersQuery({
43
+ * selection: {
44
+ * fields: { id: true },
45
+ * first: 10,
46
+ * },
47
+ * });
48
+ * ```
49
+ */
50
+ export declare function fetchDatabaseTransfersQuery<S extends DatabaseTransferSelect>(params: {
51
+ selection: {
52
+ fields: S;
53
+ } & Omit<ListSelectionConfig<S, DatabaseTransferFilter, DatabaseTransferOrderBy>, 'fields'> & HookStrictSelect<NoInfer<S>, DatabaseTransferSelect>;
54
+ }): Promise<{
55
+ databaseTransfers: ConnectionResult<InferSelectResult<DatabaseTransferWithRelations, S>>;
56
+ }>;
57
+ /**
58
+ * Prefetch DatabaseTransfer list for SSR or cache warming
59
+ *
60
+ * @example
61
+ * ```ts
62
+ * await prefetchDatabaseTransfersQuery(queryClient, { selection: { fields: { id: true }, first: 10 } });
63
+ * ```
64
+ */
65
+ export declare function prefetchDatabaseTransfersQuery<S extends DatabaseTransferSelect>(queryClient: QueryClient, params: {
66
+ selection: {
67
+ fields: S;
68
+ } & Omit<ListSelectionConfig<S, DatabaseTransferFilter, DatabaseTransferOrderBy>, 'fields'> & HookStrictSelect<NoInfer<S>, DatabaseTransferSelect>;
69
+ }): Promise<void>;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ /**
3
+ * List query hook for DatabaseTransfer
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.databaseTransfersQueryKey = void 0;
9
+ exports.useDatabaseTransfersQuery = useDatabaseTransfersQuery;
10
+ exports.fetchDatabaseTransfersQuery = fetchDatabaseTransfersQuery;
11
+ exports.prefetchDatabaseTransfersQuery = prefetchDatabaseTransfersQuery;
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.databaseTransfersQueryKey = query_keys_1.databaseTransferKeys.list;
18
+ function useDatabaseTransfersQuery(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.databaseTransferKeys.list(args),
24
+ queryFn: () => (0, client_1.getClient)().databaseTransfer.findMany(args).unwrap(),
25
+ ...queryOptions,
26
+ });
27
+ }
28
+ async function fetchDatabaseTransfersQuery(params) {
29
+ const args = (0, selection_1.buildListSelectionArgs)(params.selection);
30
+ return (0, client_1.getClient)().databaseTransfer.findMany(args).unwrap();
31
+ }
32
+ async function prefetchDatabaseTransfersQuery(queryClient, params) {
33
+ const args = (0, selection_1.buildListSelectionArgs)(params.selection);
34
+ await queryClient.prefetchQuery({
35
+ queryKey: query_keys_1.databaseTransferKeys.list(args),
36
+ queryFn: () => (0, client_1.getClient)().databaseTransfer.findMany(args).unwrap(),
37
+ });
38
+ }