@constructive-io/react 1.19.7 → 1.19.8

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 (203) hide show
  1. package/agent/orm/input-types.d.ts +4 -4
  2. package/agent/schema-types.d.ts +4 -4
  3. package/api/hooks/index.d.ts +1 -1
  4. package/api/hooks/index.js +1 -1
  5. package/api/hooks/invalidation.d.ts +6 -0
  6. package/api/hooks/invalidation.js +16 -0
  7. package/api/hooks/mutation-keys.d.ts +12 -0
  8. package/api/hooks/mutation-keys.js +12 -2
  9. package/api/hooks/mutations/index.d.ts +1 -0
  10. package/api/hooks/mutations/index.js +1 -0
  11. package/api/hooks/mutations/useCreateListSuspendedDatabasesRecordMutation.d.ts +34 -0
  12. package/api/hooks/mutations/useCreateListSuspendedDatabasesRecordMutation.js +34 -0
  13. package/api/hooks/queries/index.d.ts +2 -0
  14. package/api/hooks/queries/index.js +2 -0
  15. package/api/hooks/queries/useListSuspendedDatabasesQuery.d.ts +69 -0
  16. package/api/hooks/queries/useListSuspendedDatabasesQuery.js +38 -0
  17. package/api/hooks/queries/useListSuspendedDatabasesRecordQuery.d.ts +65 -0
  18. package/api/hooks/queries/useListSuspendedDatabasesRecordQuery.js +53 -0
  19. package/api/hooks/query-keys.d.ts +14 -0
  20. package/api/hooks/query-keys.js +10 -2
  21. package/api/orm/index.d.ts +2 -0
  22. package/api/orm/index.js +2 -0
  23. package/api/orm/input-types.d.ts +60 -30
  24. package/api/orm/models/index.d.ts +1 -0
  25. package/api/orm/models/index.js +4 -2
  26. package/api/orm/models/listSuspendedDatabasesRecord.d.ts +36 -0
  27. package/api/orm/models/listSuspendedDatabasesRecord.js +80 -0
  28. package/api/schema-types.d.ts +22 -21
  29. package/api/types.d.ts +7 -2
  30. package/auth/hooks/mutation-keys.d.ts +6 -2
  31. package/auth/hooks/mutation-keys.js +9 -3
  32. package/auth/hooks/mutations/index.d.ts +3 -1
  33. package/auth/hooks/mutations/index.js +3 -1
  34. package/auth/hooks/mutations/useRequestMagicLinkMutation.d.ts +20 -0
  35. package/auth/hooks/mutations/{useProvisionNewUserMutation.js → useRequestMagicLinkMutation.js} +5 -5
  36. package/auth/hooks/mutations/useSendMfaChallengeCodeMutation.d.ts +20 -0
  37. package/auth/hooks/mutations/useSendMfaChallengeCodeMutation.js +26 -0
  38. package/auth/hooks/mutations/useSendSmsOtpMutation.d.ts +20 -0
  39. package/auth/hooks/mutations/useSendSmsOtpMutation.js +26 -0
  40. package/auth/orm/index.d.ts +15 -5
  41. package/auth/orm/input-types.d.ts +44 -14
  42. package/auth/orm/mutation/index.d.ts +25 -9
  43. package/auth/orm/mutation/index.js +36 -12
  44. package/auth/schema-types.d.ts +29 -10
  45. package/compute/hooks/index.d.ts +1 -1
  46. package/compute/hooks/index.js +1 -1
  47. package/compute/hooks/invalidation.d.ts +12 -0
  48. package/compute/hooks/invalidation.js +32 -0
  49. package/compute/hooks/mutation-keys.d.ts +28 -0
  50. package/compute/hooks/mutation-keys.js +26 -3
  51. package/compute/hooks/mutations/index.d.ts +8 -0
  52. package/compute/hooks/mutations/index.js +8 -0
  53. package/compute/hooks/mutations/useCreateFunctionScheduleMutation.d.ts +34 -0
  54. package/compute/hooks/mutations/useCreateFunctionScheduleMutation.js +34 -0
  55. package/compute/hooks/mutations/useCreatePlatformFunctionScheduleMutation.d.ts +34 -0
  56. package/compute/hooks/mutations/useCreatePlatformFunctionScheduleMutation.js +34 -0
  57. package/compute/hooks/mutations/useDeleteFunctionScheduleMutation.d.ts +38 -0
  58. package/compute/hooks/mutations/useDeleteFunctionScheduleMutation.js +39 -0
  59. package/compute/hooks/mutations/useDeletePlatformFunctionScheduleMutation.d.ts +38 -0
  60. package/compute/hooks/mutations/useDeletePlatformFunctionScheduleMutation.js +39 -0
  61. package/compute/hooks/mutations/useFunctionExecutionLogsAppendMutation.d.ts +20 -0
  62. package/compute/hooks/mutations/useFunctionExecutionLogsAppendMutation.js +26 -0
  63. package/compute/hooks/mutations/usePlatformFunctionExecutionLogsAppendMutation.d.ts +20 -0
  64. package/compute/hooks/mutations/usePlatformFunctionExecutionLogsAppendMutation.js +26 -0
  65. package/compute/hooks/mutations/useUpdateFunctionScheduleMutation.d.ts +40 -0
  66. package/compute/hooks/mutations/useUpdateFunctionScheduleMutation.js +40 -0
  67. package/compute/hooks/mutations/useUpdatePlatformFunctionScheduleMutation.d.ts +40 -0
  68. package/compute/hooks/mutations/useUpdatePlatformFunctionScheduleMutation.js +40 -0
  69. package/compute/hooks/queries/index.d.ts +4 -0
  70. package/compute/hooks/queries/index.js +4 -0
  71. package/compute/hooks/queries/useFunctionScheduleQuery.d.ts +65 -0
  72. package/compute/hooks/queries/useFunctionScheduleQuery.js +53 -0
  73. package/compute/hooks/queries/useFunctionSchedulesQuery.d.ts +69 -0
  74. package/compute/hooks/queries/useFunctionSchedulesQuery.js +38 -0
  75. package/compute/hooks/queries/usePlatformFunctionScheduleQuery.d.ts +65 -0
  76. package/compute/hooks/queries/usePlatformFunctionScheduleQuery.js +53 -0
  77. package/compute/hooks/queries/usePlatformFunctionSchedulesQuery.d.ts +69 -0
  78. package/compute/hooks/queries/usePlatformFunctionSchedulesQuery.js +38 -0
  79. package/compute/hooks/query-keys.d.ts +28 -0
  80. package/compute/hooks/query-keys.js +19 -3
  81. package/compute/orm/index.d.ts +14 -0
  82. package/compute/orm/index.js +4 -0
  83. package/compute/orm/input-types.d.ts +553 -4
  84. package/compute/orm/input-types.js +2 -0
  85. package/compute/orm/models/functionSchedule.d.ts +54 -0
  86. package/compute/orm/models/functionSchedule.js +104 -0
  87. package/compute/orm/models/index.d.ts +2 -0
  88. package/compute/orm/models/index.js +7 -3
  89. package/compute/orm/models/platformFunctionSchedule.d.ts +54 -0
  90. package/compute/orm/models/platformFunctionSchedule.js +104 -0
  91. package/compute/orm/mutation/index.d.ts +17 -1
  92. package/compute/orm/mutation/index.js +24 -0
  93. package/compute/schema-types.d.ts +319 -1
  94. package/compute/types.d.ts +29 -0
  95. package/esm/agent/orm/input-types.d.ts +4 -4
  96. package/esm/agent/schema-types.d.ts +4 -4
  97. package/esm/api/hooks/index.d.ts +1 -1
  98. package/esm/api/hooks/index.js +1 -1
  99. package/esm/api/hooks/invalidation.d.ts +6 -0
  100. package/esm/api/hooks/invalidation.js +17 -1
  101. package/esm/api/hooks/mutation-keys.d.ts +12 -0
  102. package/esm/api/hooks/mutation-keys.js +10 -0
  103. package/esm/api/hooks/mutations/index.d.ts +1 -0
  104. package/esm/api/hooks/mutations/index.js +1 -0
  105. package/esm/api/hooks/mutations/useCreateListSuspendedDatabasesRecordMutation.d.ts +34 -0
  106. package/esm/api/hooks/mutations/useCreateListSuspendedDatabasesRecordMutation.js +31 -0
  107. package/esm/api/hooks/queries/index.d.ts +2 -0
  108. package/esm/api/hooks/queries/index.js +2 -0
  109. package/esm/api/hooks/queries/useListSuspendedDatabasesQuery.d.ts +69 -0
  110. package/esm/api/hooks/queries/useListSuspendedDatabasesQuery.js +32 -0
  111. package/esm/api/hooks/queries/useListSuspendedDatabasesRecordQuery.d.ts +65 -0
  112. package/esm/api/hooks/queries/useListSuspendedDatabasesRecordQuery.js +47 -0
  113. package/esm/api/hooks/query-keys.d.ts +14 -0
  114. package/esm/api/hooks/query-keys.js +8 -0
  115. package/esm/api/orm/index.d.ts +2 -0
  116. package/esm/api/orm/index.js +2 -0
  117. package/esm/api/orm/input-types.d.ts +60 -30
  118. package/esm/api/orm/models/index.d.ts +1 -0
  119. package/esm/api/orm/models/index.js +1 -0
  120. package/esm/api/orm/models/listSuspendedDatabasesRecord.d.ts +36 -0
  121. package/esm/api/orm/models/listSuspendedDatabasesRecord.js +76 -0
  122. package/esm/api/schema-types.d.ts +22 -21
  123. package/esm/api/types.d.ts +7 -2
  124. package/esm/auth/hooks/mutation-keys.d.ts +6 -2
  125. package/esm/auth/hooks/mutation-keys.js +9 -3
  126. package/esm/auth/hooks/mutations/index.d.ts +3 -1
  127. package/esm/auth/hooks/mutations/index.js +3 -1
  128. package/esm/auth/hooks/mutations/useRequestMagicLinkMutation.d.ts +20 -0
  129. package/esm/auth/hooks/mutations/{useProvisionNewUserMutation.js → useRequestMagicLinkMutation.js} +4 -4
  130. package/esm/auth/hooks/mutations/useSendMfaChallengeCodeMutation.d.ts +20 -0
  131. package/esm/auth/hooks/mutations/useSendMfaChallengeCodeMutation.js +23 -0
  132. package/esm/auth/hooks/mutations/useSendSmsOtpMutation.d.ts +20 -0
  133. package/esm/auth/hooks/mutations/useSendSmsOtpMutation.js +23 -0
  134. package/esm/auth/orm/index.d.ts +15 -5
  135. package/esm/auth/orm/input-types.d.ts +44 -14
  136. package/esm/auth/orm/mutation/index.d.ts +25 -9
  137. package/esm/auth/orm/mutation/index.js +36 -12
  138. package/esm/auth/schema-types.d.ts +29 -10
  139. package/esm/compute/hooks/index.d.ts +1 -1
  140. package/esm/compute/hooks/index.js +1 -1
  141. package/esm/compute/hooks/invalidation.d.ts +12 -0
  142. package/esm/compute/hooks/invalidation.js +33 -1
  143. package/esm/compute/hooks/mutation-keys.d.ts +28 -0
  144. package/esm/compute/hooks/mutation-keys.js +23 -0
  145. package/esm/compute/hooks/mutations/index.d.ts +8 -0
  146. package/esm/compute/hooks/mutations/index.js +8 -0
  147. package/esm/compute/hooks/mutations/useCreateFunctionScheduleMutation.d.ts +34 -0
  148. package/esm/compute/hooks/mutations/useCreateFunctionScheduleMutation.js +31 -0
  149. package/esm/compute/hooks/mutations/useCreatePlatformFunctionScheduleMutation.d.ts +34 -0
  150. package/esm/compute/hooks/mutations/useCreatePlatformFunctionScheduleMutation.js +31 -0
  151. package/esm/compute/hooks/mutations/useDeleteFunctionScheduleMutation.d.ts +38 -0
  152. package/esm/compute/hooks/mutations/useDeleteFunctionScheduleMutation.js +36 -0
  153. package/esm/compute/hooks/mutations/useDeletePlatformFunctionScheduleMutation.d.ts +38 -0
  154. package/esm/compute/hooks/mutations/useDeletePlatformFunctionScheduleMutation.js +36 -0
  155. package/esm/compute/hooks/mutations/useFunctionExecutionLogsAppendMutation.d.ts +20 -0
  156. package/esm/compute/hooks/mutations/useFunctionExecutionLogsAppendMutation.js +23 -0
  157. package/esm/compute/hooks/mutations/usePlatformFunctionExecutionLogsAppendMutation.d.ts +20 -0
  158. package/esm/compute/hooks/mutations/usePlatformFunctionExecutionLogsAppendMutation.js +23 -0
  159. package/esm/compute/hooks/mutations/useUpdateFunctionScheduleMutation.d.ts +40 -0
  160. package/esm/compute/hooks/mutations/useUpdateFunctionScheduleMutation.js +37 -0
  161. package/esm/compute/hooks/mutations/useUpdatePlatformFunctionScheduleMutation.d.ts +40 -0
  162. package/esm/compute/hooks/mutations/useUpdatePlatformFunctionScheduleMutation.js +37 -0
  163. package/esm/compute/hooks/queries/index.d.ts +4 -0
  164. package/esm/compute/hooks/queries/index.js +4 -0
  165. package/esm/compute/hooks/queries/useFunctionScheduleQuery.d.ts +65 -0
  166. package/esm/compute/hooks/queries/useFunctionScheduleQuery.js +47 -0
  167. package/esm/compute/hooks/queries/useFunctionSchedulesQuery.d.ts +69 -0
  168. package/esm/compute/hooks/queries/useFunctionSchedulesQuery.js +32 -0
  169. package/esm/compute/hooks/queries/usePlatformFunctionScheduleQuery.d.ts +65 -0
  170. package/esm/compute/hooks/queries/usePlatformFunctionScheduleQuery.js +47 -0
  171. package/esm/compute/hooks/queries/usePlatformFunctionSchedulesQuery.d.ts +69 -0
  172. package/esm/compute/hooks/queries/usePlatformFunctionSchedulesQuery.js +32 -0
  173. package/esm/compute/hooks/query-keys.d.ts +28 -0
  174. package/esm/compute/hooks/query-keys.js +16 -0
  175. package/esm/compute/orm/index.d.ts +14 -0
  176. package/esm/compute/orm/index.js +4 -0
  177. package/esm/compute/orm/input-types.d.ts +553 -4
  178. package/esm/compute/orm/input-types.js +2 -0
  179. package/esm/compute/orm/models/functionSchedule.d.ts +54 -0
  180. package/esm/compute/orm/models/functionSchedule.js +100 -0
  181. package/esm/compute/orm/models/index.d.ts +2 -0
  182. package/esm/compute/orm/models/index.js +2 -0
  183. package/esm/compute/orm/models/platformFunctionSchedule.d.ts +54 -0
  184. package/esm/compute/orm/models/platformFunctionSchedule.js +100 -0
  185. package/esm/compute/orm/mutation/index.d.ts +17 -1
  186. package/esm/compute/orm/mutation/index.js +24 -0
  187. package/esm/compute/schema-types.d.ts +319 -1
  188. package/esm/compute/types.d.ts +29 -0
  189. package/esm/modules/orm/input-types.d.ts +26 -48
  190. package/esm/modules/schema-types.d.ts +17 -33
  191. package/esm/modules/types.d.ts +3 -5
  192. package/esm/remote/orm/input-types.d.ts +13 -1
  193. package/esm/remote/schema-types.d.ts +8 -1
  194. package/esm/remote/types.d.ts +1 -0
  195. package/modules/orm/input-types.d.ts +26 -48
  196. package/modules/schema-types.d.ts +17 -33
  197. package/modules/types.d.ts +3 -5
  198. package/package.json +2 -2
  199. package/remote/orm/input-types.d.ts +13 -1
  200. package/remote/schema-types.d.ts +8 -1
  201. package/remote/types.d.ts +1 -0
  202. package/auth/hooks/mutations/useProvisionNewUserMutation.d.ts +0 -20
  203. package/esm/auth/hooks/mutations/useProvisionNewUserMutation.d.ts +0 -20
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Function schedules — user-facing cron schedules synced into the worker scheduler (app_jobs.scheduled_jobs)
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 { functionScheduleKeys } from '../query-keys';
10
+ import { functionScheduleMutationKeys } from '../mutation-keys';
11
+ export function useCreateFunctionScheduleMutation(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: functionScheduleMutationKeys.create(),
18
+ mutationFn: (data) => getClient()
19
+ .functionSchedule.create({
20
+ data,
21
+ select: args.select,
22
+ })
23
+ .unwrap(),
24
+ onSuccess: () => {
25
+ queryClient.invalidateQueries({
26
+ queryKey: functionScheduleKeys.lists(),
27
+ });
28
+ },
29
+ ...mutationOptions,
30
+ });
31
+ }
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Function schedules — user-facing cron schedules synced into the worker scheduler (app_jobs.scheduled_jobs)
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 { PlatformFunctionScheduleSelect, PlatformFunctionScheduleWithRelations, CreatePlatformFunctionScheduleInput } from '../../orm/input-types';
8
+ import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types';
9
+ export type { PlatformFunctionScheduleSelect, PlatformFunctionScheduleWithRelations, CreatePlatformFunctionScheduleInput, } from '../../orm/input-types';
10
+ /**
11
+ * Function schedules — user-facing cron schedules synced into the worker scheduler (app_jobs.scheduled_jobs)
12
+ *
13
+ * @example
14
+ * ```tsx
15
+ * const { mutate, isPending } = useCreatePlatformFunctionScheduleMutation({
16
+ * selection: { fields: { id: true, name: true } },
17
+ * });
18
+ *
19
+ * mutate({ name: 'New item' });
20
+ * ```
21
+ */
22
+ export declare function useCreatePlatformFunctionScheduleMutation<S extends PlatformFunctionScheduleSelect>(params: {
23
+ selection: {
24
+ fields: S & PlatformFunctionScheduleSelect;
25
+ } & HookStrictSelect<NoInfer<S>, PlatformFunctionScheduleSelect>;
26
+ } & Omit<UseMutationOptions<{
27
+ createPlatformFunctionSchedule: {
28
+ platformFunctionSchedule: InferSelectResult<PlatformFunctionScheduleWithRelations, S>;
29
+ };
30
+ }, Error, CreatePlatformFunctionScheduleInput['platformFunctionSchedule']>, 'mutationFn'>): UseMutationResult<{
31
+ createPlatformFunctionSchedule: {
32
+ platformFunctionSchedule: InferSelectResult<PlatformFunctionScheduleWithRelations, S>;
33
+ };
34
+ }, Error, CreatePlatformFunctionScheduleInput['platformFunctionSchedule']>;
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Function schedules — user-facing cron schedules synced into the worker scheduler (app_jobs.scheduled_jobs)
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 { platformFunctionScheduleKeys } from '../query-keys';
10
+ import { platformFunctionScheduleMutationKeys } from '../mutation-keys';
11
+ export function useCreatePlatformFunctionScheduleMutation(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: platformFunctionScheduleMutationKeys.create(),
18
+ mutationFn: (data) => getClient()
19
+ .platformFunctionSchedule.create({
20
+ data,
21
+ select: args.select,
22
+ })
23
+ .unwrap(),
24
+ onSuccess: () => {
25
+ queryClient.invalidateQueries({
26
+ queryKey: platformFunctionScheduleKeys.lists(),
27
+ });
28
+ },
29
+ ...mutationOptions,
30
+ });
31
+ }
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Function schedules — user-facing cron schedules synced into the worker scheduler (app_jobs.scheduled_jobs)
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 { FunctionScheduleSelect, FunctionScheduleWithRelations } from '../../orm/input-types';
8
+ import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types';
9
+ export type { FunctionScheduleSelect, FunctionScheduleWithRelations } from '../../orm/input-types';
10
+ /**
11
+ * Function schedules — user-facing cron schedules synced into the worker scheduler (app_jobs.scheduled_jobs)
12
+ *
13
+ * @example
14
+ * ```tsx
15
+ * const { mutate, isPending } = useDeleteFunctionScheduleMutation({
16
+ * selection: { fields: { id: true } },
17
+ * });
18
+ *
19
+ * mutate({ id: 'value-to-delete' });
20
+ * ```
21
+ */
22
+ export declare function useDeleteFunctionScheduleMutation<S extends FunctionScheduleSelect>(params: {
23
+ selection: {
24
+ fields: S & FunctionScheduleSelect;
25
+ } & HookStrictSelect<NoInfer<S>, FunctionScheduleSelect>;
26
+ } & Omit<UseMutationOptions<{
27
+ deleteFunctionSchedule: {
28
+ functionSchedule: InferSelectResult<FunctionScheduleWithRelations, S>;
29
+ };
30
+ }, Error, {
31
+ id: string;
32
+ }>, 'mutationFn'>): UseMutationResult<{
33
+ deleteFunctionSchedule: {
34
+ functionSchedule: InferSelectResult<FunctionScheduleWithRelations, S>;
35
+ };
36
+ }, Error, {
37
+ id: string;
38
+ }>;
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Function schedules — user-facing cron schedules synced into the worker scheduler (app_jobs.scheduled_jobs)
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 { functionScheduleKeys } from '../query-keys';
10
+ import { functionScheduleMutationKeys } from '../mutation-keys';
11
+ export function useDeleteFunctionScheduleMutation(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: functionScheduleMutationKeys.all,
18
+ mutationFn: ({ id }) => getClient()
19
+ .functionSchedule.delete({
20
+ where: {
21
+ id,
22
+ },
23
+ select: args.select,
24
+ })
25
+ .unwrap(),
26
+ onSuccess: (_, variables) => {
27
+ queryClient.removeQueries({
28
+ queryKey: functionScheduleKeys.detail(variables.id),
29
+ });
30
+ queryClient.invalidateQueries({
31
+ queryKey: functionScheduleKeys.lists(),
32
+ });
33
+ },
34
+ ...mutationOptions,
35
+ });
36
+ }
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Function schedules — user-facing cron schedules synced into the worker scheduler (app_jobs.scheduled_jobs)
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 { PlatformFunctionScheduleSelect, PlatformFunctionScheduleWithRelations } from '../../orm/input-types';
8
+ import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types';
9
+ export type { PlatformFunctionScheduleSelect, PlatformFunctionScheduleWithRelations, } from '../../orm/input-types';
10
+ /**
11
+ * Function schedules — user-facing cron schedules synced into the worker scheduler (app_jobs.scheduled_jobs)
12
+ *
13
+ * @example
14
+ * ```tsx
15
+ * const { mutate, isPending } = useDeletePlatformFunctionScheduleMutation({
16
+ * selection: { fields: { id: true } },
17
+ * });
18
+ *
19
+ * mutate({ id: 'value-to-delete' });
20
+ * ```
21
+ */
22
+ export declare function useDeletePlatformFunctionScheduleMutation<S extends PlatformFunctionScheduleSelect>(params: {
23
+ selection: {
24
+ fields: S & PlatformFunctionScheduleSelect;
25
+ } & HookStrictSelect<NoInfer<S>, PlatformFunctionScheduleSelect>;
26
+ } & Omit<UseMutationOptions<{
27
+ deletePlatformFunctionSchedule: {
28
+ platformFunctionSchedule: InferSelectResult<PlatformFunctionScheduleWithRelations, S>;
29
+ };
30
+ }, Error, {
31
+ id: string;
32
+ }>, 'mutationFn'>): UseMutationResult<{
33
+ deletePlatformFunctionSchedule: {
34
+ platformFunctionSchedule: InferSelectResult<PlatformFunctionScheduleWithRelations, S>;
35
+ };
36
+ }, Error, {
37
+ id: string;
38
+ }>;
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Function schedules — user-facing cron schedules synced into the worker scheduler (app_jobs.scheduled_jobs)
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 { platformFunctionScheduleKeys } from '../query-keys';
10
+ import { platformFunctionScheduleMutationKeys } from '../mutation-keys';
11
+ export function useDeletePlatformFunctionScheduleMutation(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: platformFunctionScheduleMutationKeys.all,
18
+ mutationFn: ({ id }) => getClient()
19
+ .platformFunctionSchedule.delete({
20
+ where: {
21
+ id,
22
+ },
23
+ select: args.select,
24
+ })
25
+ .unwrap(),
26
+ onSuccess: (_, variables) => {
27
+ queryClient.removeQueries({
28
+ queryKey: platformFunctionScheduleKeys.detail(variables.id),
29
+ });
30
+ queryClient.invalidateQueries({
31
+ queryKey: platformFunctionScheduleKeys.lists(),
32
+ });
33
+ },
34
+ ...mutationOptions,
35
+ });
36
+ }
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Custom mutation hook for functionExecutionLogsAppend
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 { FunctionExecutionLogsAppendVariables } from '../../orm/mutation';
8
+ import type { FunctionExecutionLogsAppendPayloadSelect, FunctionExecutionLogsAppendPayload } from '../../orm/input-types';
9
+ import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types';
10
+ export type { FunctionExecutionLogsAppendVariables } from '../../orm/mutation';
11
+ export type { FunctionExecutionLogsAppendPayloadSelect } from '../../orm/input-types';
12
+ export declare function useFunctionExecutionLogsAppendMutation<S extends FunctionExecutionLogsAppendPayloadSelect>(params: {
13
+ selection: {
14
+ fields: S & FunctionExecutionLogsAppendPayloadSelect;
15
+ } & HookStrictSelect<NoInfer<S>, FunctionExecutionLogsAppendPayloadSelect>;
16
+ } & Omit<UseMutationOptions<{
17
+ functionExecutionLogsAppend: InferSelectResult<FunctionExecutionLogsAppendPayload, S> | null;
18
+ }, Error, FunctionExecutionLogsAppendVariables>, 'mutationFn'>): UseMutationResult<{
19
+ functionExecutionLogsAppend: InferSelectResult<FunctionExecutionLogsAppendPayload, S> | null;
20
+ }, Error, FunctionExecutionLogsAppendVariables>;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Custom mutation hook for functionExecutionLogsAppend
3
+ * @generated by @constructive-io/graphql-codegen
4
+ * DO NOT EDIT - changes will be overwritten
5
+ */
6
+ import { useMutation } from '@tanstack/react-query';
7
+ import { getClient } from '../client';
8
+ import { buildSelectionArgs } from '../selection';
9
+ import { customMutationKeys } from '../mutation-keys';
10
+ export function useFunctionExecutionLogsAppendMutation(params) {
11
+ const args = buildSelectionArgs(params.selection);
12
+ const { selection: _selection, ...mutationOptions } = params ?? {};
13
+ void _selection;
14
+ return useMutation({
15
+ mutationKey: customMutationKeys.functionExecutionLogsAppend(),
16
+ mutationFn: (variables) => getClient()
17
+ .mutation.functionExecutionLogsAppend(variables, {
18
+ select: args.select,
19
+ })
20
+ .unwrap(),
21
+ ...mutationOptions,
22
+ });
23
+ }
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Custom mutation hook for platformFunctionExecutionLogsAppend
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 { PlatformFunctionExecutionLogsAppendVariables } from '../../orm/mutation';
8
+ import type { PlatformFunctionExecutionLogsAppendPayloadSelect, PlatformFunctionExecutionLogsAppendPayload } from '../../orm/input-types';
9
+ import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types';
10
+ export type { PlatformFunctionExecutionLogsAppendVariables } from '../../orm/mutation';
11
+ export type { PlatformFunctionExecutionLogsAppendPayloadSelect } from '../../orm/input-types';
12
+ export declare function usePlatformFunctionExecutionLogsAppendMutation<S extends PlatformFunctionExecutionLogsAppendPayloadSelect>(params: {
13
+ selection: {
14
+ fields: S & PlatformFunctionExecutionLogsAppendPayloadSelect;
15
+ } & HookStrictSelect<NoInfer<S>, PlatformFunctionExecutionLogsAppendPayloadSelect>;
16
+ } & Omit<UseMutationOptions<{
17
+ platformFunctionExecutionLogsAppend: InferSelectResult<PlatformFunctionExecutionLogsAppendPayload, S> | null;
18
+ }, Error, PlatformFunctionExecutionLogsAppendVariables>, 'mutationFn'>): UseMutationResult<{
19
+ platformFunctionExecutionLogsAppend: InferSelectResult<PlatformFunctionExecutionLogsAppendPayload, S> | null;
20
+ }, Error, PlatformFunctionExecutionLogsAppendVariables>;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Custom mutation hook for platformFunctionExecutionLogsAppend
3
+ * @generated by @constructive-io/graphql-codegen
4
+ * DO NOT EDIT - changes will be overwritten
5
+ */
6
+ import { useMutation } from '@tanstack/react-query';
7
+ import { getClient } from '../client';
8
+ import { buildSelectionArgs } from '../selection';
9
+ import { customMutationKeys } from '../mutation-keys';
10
+ export function usePlatformFunctionExecutionLogsAppendMutation(params) {
11
+ const args = buildSelectionArgs(params.selection);
12
+ const { selection: _selection, ...mutationOptions } = params ?? {};
13
+ void _selection;
14
+ return useMutation({
15
+ mutationKey: customMutationKeys.platformFunctionExecutionLogsAppend(),
16
+ mutationFn: (variables) => getClient()
17
+ .mutation.platformFunctionExecutionLogsAppend(variables, {
18
+ select: args.select,
19
+ })
20
+ .unwrap(),
21
+ ...mutationOptions,
22
+ });
23
+ }
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Function schedules — user-facing cron schedules synced into the worker scheduler (app_jobs.scheduled_jobs)
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 { FunctionScheduleSelect, FunctionScheduleWithRelations, FunctionSchedulePatch } from '../../orm/input-types';
8
+ import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types';
9
+ export type { FunctionScheduleSelect, FunctionScheduleWithRelations, FunctionSchedulePatch, } from '../../orm/input-types';
10
+ /**
11
+ * Function schedules — user-facing cron schedules synced into the worker scheduler (app_jobs.scheduled_jobs)
12
+ *
13
+ * @example
14
+ * ```tsx
15
+ * const { mutate, isPending } = useUpdateFunctionScheduleMutation({
16
+ * selection: { fields: { id: true, name: true } },
17
+ * });
18
+ *
19
+ * mutate({ id: 'value-here', functionSchedulePatch: { name: 'Updated' } });
20
+ * ```
21
+ */
22
+ export declare function useUpdateFunctionScheduleMutation<S extends FunctionScheduleSelect>(params: {
23
+ selection: {
24
+ fields: S & FunctionScheduleSelect;
25
+ } & HookStrictSelect<NoInfer<S>, FunctionScheduleSelect>;
26
+ } & Omit<UseMutationOptions<{
27
+ updateFunctionSchedule: {
28
+ functionSchedule: InferSelectResult<FunctionScheduleWithRelations, S>;
29
+ };
30
+ }, Error, {
31
+ id: string;
32
+ functionSchedulePatch: FunctionSchedulePatch;
33
+ }>, 'mutationFn'>): UseMutationResult<{
34
+ updateFunctionSchedule: {
35
+ functionSchedule: InferSelectResult<FunctionScheduleWithRelations, S>;
36
+ };
37
+ }, Error, {
38
+ id: string;
39
+ functionSchedulePatch: FunctionSchedulePatch;
40
+ }>;
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Function schedules — user-facing cron schedules synced into the worker scheduler (app_jobs.scheduled_jobs)
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 { functionScheduleKeys } from '../query-keys';
10
+ import { functionScheduleMutationKeys } from '../mutation-keys';
11
+ export function useUpdateFunctionScheduleMutation(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: functionScheduleMutationKeys.all,
18
+ mutationFn: ({ id, functionSchedulePatch, }) => getClient()
19
+ .functionSchedule.update({
20
+ where: {
21
+ id,
22
+ },
23
+ data: functionSchedulePatch,
24
+ select: args.select,
25
+ })
26
+ .unwrap(),
27
+ onSuccess: (_, variables) => {
28
+ queryClient.invalidateQueries({
29
+ queryKey: functionScheduleKeys.detail(variables.id),
30
+ });
31
+ queryClient.invalidateQueries({
32
+ queryKey: functionScheduleKeys.lists(),
33
+ });
34
+ },
35
+ ...mutationOptions,
36
+ });
37
+ }
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Function schedules — user-facing cron schedules synced into the worker scheduler (app_jobs.scheduled_jobs)
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 { PlatformFunctionScheduleSelect, PlatformFunctionScheduleWithRelations, PlatformFunctionSchedulePatch } from '../../orm/input-types';
8
+ import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types';
9
+ export type { PlatformFunctionScheduleSelect, PlatformFunctionScheduleWithRelations, PlatformFunctionSchedulePatch, } from '../../orm/input-types';
10
+ /**
11
+ * Function schedules — user-facing cron schedules synced into the worker scheduler (app_jobs.scheduled_jobs)
12
+ *
13
+ * @example
14
+ * ```tsx
15
+ * const { mutate, isPending } = useUpdatePlatformFunctionScheduleMutation({
16
+ * selection: { fields: { id: true, name: true } },
17
+ * });
18
+ *
19
+ * mutate({ id: 'value-here', platformFunctionSchedulePatch: { name: 'Updated' } });
20
+ * ```
21
+ */
22
+ export declare function useUpdatePlatformFunctionScheduleMutation<S extends PlatformFunctionScheduleSelect>(params: {
23
+ selection: {
24
+ fields: S & PlatformFunctionScheduleSelect;
25
+ } & HookStrictSelect<NoInfer<S>, PlatformFunctionScheduleSelect>;
26
+ } & Omit<UseMutationOptions<{
27
+ updatePlatformFunctionSchedule: {
28
+ platformFunctionSchedule: InferSelectResult<PlatformFunctionScheduleWithRelations, S>;
29
+ };
30
+ }, Error, {
31
+ id: string;
32
+ platformFunctionSchedulePatch: PlatformFunctionSchedulePatch;
33
+ }>, 'mutationFn'>): UseMutationResult<{
34
+ updatePlatformFunctionSchedule: {
35
+ platformFunctionSchedule: InferSelectResult<PlatformFunctionScheduleWithRelations, S>;
36
+ };
37
+ }, Error, {
38
+ id: string;
39
+ platformFunctionSchedulePatch: PlatformFunctionSchedulePatch;
40
+ }>;
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Function schedules — user-facing cron schedules synced into the worker scheduler (app_jobs.scheduled_jobs)
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 { platformFunctionScheduleKeys } from '../query-keys';
10
+ import { platformFunctionScheduleMutationKeys } from '../mutation-keys';
11
+ export function useUpdatePlatformFunctionScheduleMutation(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: platformFunctionScheduleMutationKeys.all,
18
+ mutationFn: ({ id, platformFunctionSchedulePatch, }) => getClient()
19
+ .platformFunctionSchedule.update({
20
+ where: {
21
+ id,
22
+ },
23
+ data: platformFunctionSchedulePatch,
24
+ select: args.select,
25
+ })
26
+ .unwrap(),
27
+ onSuccess: (_, variables) => {
28
+ queryClient.invalidateQueries({
29
+ queryKey: platformFunctionScheduleKeys.detail(variables.id),
30
+ });
31
+ queryClient.invalidateQueries({
32
+ queryKey: platformFunctionScheduleKeys.lists(),
33
+ });
34
+ },
35
+ ...mutationOptions,
36
+ });
37
+ }
@@ -62,6 +62,8 @@ export * from './useFunctionInvocationAttemptsQuery';
62
62
  export * from './useFunctionInvocationAttemptQuery';
63
63
  export * from './useFunctionInvocationsQuery';
64
64
  export * from './useFunctionInvocationQuery';
65
+ export * from './useFunctionSchedulesQuery';
66
+ export * from './useFunctionScheduleQuery';
65
67
  export * from './useGetAllTreeNodesQuery';
66
68
  export * from './useImagesQuery';
67
69
  export * from './useImageQuery';
@@ -104,6 +106,8 @@ export * from './usePlatformFunctionInvocationAttemptsQuery';
104
106
  export * from './usePlatformFunctionInvocationAttemptQuery';
105
107
  export * from './usePlatformFunctionInvocationsQuery';
106
108
  export * from './usePlatformFunctionInvocationQuery';
109
+ export * from './usePlatformFunctionSchedulesQuery';
110
+ export * from './usePlatformFunctionScheduleQuery';
107
111
  export * from './usePlatformImagesQuery';
108
112
  export * from './usePlatformImageQuery';
109
113
  export * from './usePlatformImageGrantsQuery';
@@ -62,6 +62,8 @@ export * from './useFunctionInvocationAttemptsQuery';
62
62
  export * from './useFunctionInvocationAttemptQuery';
63
63
  export * from './useFunctionInvocationsQuery';
64
64
  export * from './useFunctionInvocationQuery';
65
+ export * from './useFunctionSchedulesQuery';
66
+ export * from './useFunctionScheduleQuery';
65
67
  export * from './useGetAllTreeNodesQuery';
66
68
  export * from './useImagesQuery';
67
69
  export * from './useImageQuery';
@@ -104,6 +106,8 @@ export * from './usePlatformFunctionInvocationAttemptsQuery';
104
106
  export * from './usePlatformFunctionInvocationAttemptQuery';
105
107
  export * from './usePlatformFunctionInvocationsQuery';
106
108
  export * from './usePlatformFunctionInvocationQuery';
109
+ export * from './usePlatformFunctionSchedulesQuery';
110
+ export * from './usePlatformFunctionScheduleQuery';
107
111
  export * from './usePlatformImagesQuery';
108
112
  export * from './usePlatformImageQuery';
109
113
  export * from './usePlatformImageGrantsQuery';
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Function schedules — user-facing cron schedules synced into the worker scheduler (app_jobs.scheduled_jobs)
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 { FunctionScheduleSelect, FunctionScheduleWithRelations } from '../../orm/input-types';
8
+ import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types';
9
+ export type { FunctionScheduleSelect, FunctionScheduleWithRelations } from '../../orm/input-types';
10
+ /** Query key factory - re-exported from query-keys.ts */
11
+ export declare const functionScheduleQueryKey: (id: string | number) => readonly ["functionschedule", "detail", string | number];
12
+ /**
13
+ * Function schedules — user-facing cron schedules synced into the worker scheduler (app_jobs.scheduled_jobs)
14
+ *
15
+ * @example
16
+ * ```tsx
17
+ * const { data, isLoading } = useFunctionScheduleQuery({
18
+ * id: 'some-id',
19
+ * selection: { fields: { id: true, name: true } },
20
+ * });
21
+ * ```
22
+ */
23
+ export declare function useFunctionScheduleQuery<S extends FunctionScheduleSelect, TData = {
24
+ functionSchedule: InferSelectResult<FunctionScheduleWithRelations, S> | null;
25
+ }>(params: {
26
+ id: string;
27
+ selection: {
28
+ fields: S;
29
+ } & HookStrictSelect<NoInfer<S>, FunctionScheduleSelect>;
30
+ } & Omit<UseQueryOptions<{
31
+ functionSchedule: InferSelectResult<FunctionScheduleWithRelations, S> | null;
32
+ }, Error, TData>, 'queryKey' | 'queryFn'>): UseQueryResult<TData>;
33
+ /**
34
+ * Function schedules — user-facing cron schedules synced into the worker scheduler (app_jobs.scheduled_jobs)
35
+ *
36
+ * @example
37
+ * ```ts
38
+ * const data = await fetchFunctionScheduleQuery({
39
+ * id: 'some-id',
40
+ * selection: { fields: { id: true } },
41
+ * });
42
+ * ```
43
+ */
44
+ export declare function fetchFunctionScheduleQuery<S extends FunctionScheduleSelect>(params: {
45
+ id: string;
46
+ selection: {
47
+ fields: S;
48
+ } & HookStrictSelect<NoInfer<S>, FunctionScheduleSelect>;
49
+ }): Promise<{
50
+ functionSchedule: InferSelectResult<FunctionScheduleWithRelations, S> | null;
51
+ }>;
52
+ /**
53
+ * Function schedules — user-facing cron schedules synced into the worker scheduler (app_jobs.scheduled_jobs)
54
+ *
55
+ * @example
56
+ * ```ts
57
+ * await prefetchFunctionScheduleQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } });
58
+ * ```
59
+ */
60
+ export declare function prefetchFunctionScheduleQuery<S extends FunctionScheduleSelect>(queryClient: QueryClient, params: {
61
+ id: string;
62
+ selection: {
63
+ fields: S;
64
+ } & HookStrictSelect<NoInfer<S>, FunctionScheduleSelect>;
65
+ }): Promise<void>;
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Function schedules — user-facing cron schedules synced into the worker scheduler (app_jobs.scheduled_jobs)
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 { functionScheduleKeys } from '../query-keys';
10
+ /** Query key factory - re-exported from query-keys.ts */
11
+ export const functionScheduleQueryKey = functionScheduleKeys.detail;
12
+ export function useFunctionScheduleQuery(params) {
13
+ const args = buildSelectionArgs(params.selection);
14
+ const { selection: _selection, ...queryOptions } = params ?? {};
15
+ void _selection;
16
+ return useQuery({
17
+ queryKey: functionScheduleKeys.detail(params.id),
18
+ queryFn: () => getClient()
19
+ .functionSchedule.findOne({
20
+ id: params.id,
21
+ select: args.select,
22
+ })
23
+ .unwrap(),
24
+ ...queryOptions,
25
+ });
26
+ }
27
+ export async function fetchFunctionScheduleQuery(params) {
28
+ const args = buildSelectionArgs(params.selection);
29
+ return getClient()
30
+ .functionSchedule.findOne({
31
+ id: params.id,
32
+ select: args.select,
33
+ })
34
+ .unwrap();
35
+ }
36
+ export async function prefetchFunctionScheduleQuery(queryClient, params) {
37
+ const args = buildSelectionArgs(params.selection);
38
+ await queryClient.prefetchQuery({
39
+ queryKey: functionScheduleKeys.detail(params.id),
40
+ queryFn: () => getClient()
41
+ .functionSchedule.findOne({
42
+ id: params.id,
43
+ select: args.select,
44
+ })
45
+ .unwrap(),
46
+ });
47
+ }