@constructive-io/react 1.19.7 → 1.19.9
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.
- package/agent/orm/input-types.d.ts +4 -4
- package/agent/schema-types.d.ts +4 -4
- package/api/hooks/index.d.ts +1 -1
- package/api/hooks/index.js +1 -1
- package/api/hooks/invalidation.d.ts +6 -0
- package/api/hooks/invalidation.js +16 -0
- package/api/hooks/mutation-keys.d.ts +12 -0
- package/api/hooks/mutation-keys.js +12 -2
- package/api/hooks/mutations/index.d.ts +1 -0
- package/api/hooks/mutations/index.js +1 -0
- package/api/hooks/mutations/useCreateListSuspendedDatabasesRecordMutation.d.ts +34 -0
- package/api/hooks/mutations/useCreateListSuspendedDatabasesRecordMutation.js +34 -0
- package/api/hooks/queries/index.d.ts +2 -0
- package/api/hooks/queries/index.js +2 -0
- package/api/hooks/queries/useListSuspendedDatabasesQuery.d.ts +69 -0
- package/api/hooks/queries/useListSuspendedDatabasesQuery.js +38 -0
- package/api/hooks/queries/useListSuspendedDatabasesRecordQuery.d.ts +65 -0
- package/api/hooks/queries/useListSuspendedDatabasesRecordQuery.js +53 -0
- package/api/hooks/query-keys.d.ts +14 -0
- package/api/hooks/query-keys.js +10 -2
- package/api/orm/index.d.ts +2 -0
- package/api/orm/index.js +2 -0
- package/api/orm/input-types.d.ts +60 -30
- package/api/orm/models/index.d.ts +1 -0
- package/api/orm/models/index.js +4 -2
- package/api/orm/models/listSuspendedDatabasesRecord.d.ts +36 -0
- package/api/orm/models/listSuspendedDatabasesRecord.js +80 -0
- package/api/schema-types.d.ts +22 -21
- package/api/types.d.ts +7 -2
- package/auth/hooks/mutation-keys.d.ts +6 -2
- package/auth/hooks/mutation-keys.js +9 -3
- package/auth/hooks/mutations/index.d.ts +3 -1
- package/auth/hooks/mutations/index.js +3 -1
- package/auth/hooks/mutations/useRequestMagicLinkMutation.d.ts +20 -0
- package/auth/hooks/mutations/{useProvisionNewUserMutation.js → useRequestMagicLinkMutation.js} +5 -5
- package/auth/hooks/mutations/useSendMfaChallengeCodeMutation.d.ts +20 -0
- package/auth/hooks/mutations/useSendMfaChallengeCodeMutation.js +26 -0
- package/auth/hooks/mutations/useSendSmsOtpMutation.d.ts +20 -0
- package/auth/hooks/mutations/useSendSmsOtpMutation.js +26 -0
- package/auth/orm/index.d.ts +15 -5
- package/auth/orm/input-types.d.ts +44 -14
- package/auth/orm/mutation/index.d.ts +25 -9
- package/auth/orm/mutation/index.js +36 -12
- package/auth/schema-types.d.ts +29 -10
- package/compute/hooks/index.d.ts +1 -1
- package/compute/hooks/index.js +1 -1
- package/compute/hooks/invalidation.d.ts +12 -0
- package/compute/hooks/invalidation.js +32 -0
- package/compute/hooks/mutation-keys.d.ts +28 -0
- package/compute/hooks/mutation-keys.js +26 -3
- package/compute/hooks/mutations/index.d.ts +8 -0
- package/compute/hooks/mutations/index.js +8 -0
- package/compute/hooks/mutations/useCreateFunctionScheduleMutation.d.ts +34 -0
- package/compute/hooks/mutations/useCreateFunctionScheduleMutation.js +34 -0
- package/compute/hooks/mutations/useCreatePlatformFunctionScheduleMutation.d.ts +34 -0
- package/compute/hooks/mutations/useCreatePlatformFunctionScheduleMutation.js +34 -0
- package/compute/hooks/mutations/useDeleteFunctionScheduleMutation.d.ts +38 -0
- package/compute/hooks/mutations/useDeleteFunctionScheduleMutation.js +39 -0
- package/compute/hooks/mutations/useDeletePlatformFunctionScheduleMutation.d.ts +38 -0
- package/compute/hooks/mutations/useDeletePlatformFunctionScheduleMutation.js +39 -0
- package/compute/hooks/mutations/useFunctionExecutionLogsAppendMutation.d.ts +20 -0
- package/compute/hooks/mutations/useFunctionExecutionLogsAppendMutation.js +26 -0
- package/compute/hooks/mutations/usePlatformFunctionExecutionLogsAppendMutation.d.ts +20 -0
- package/compute/hooks/mutations/usePlatformFunctionExecutionLogsAppendMutation.js +26 -0
- package/compute/hooks/mutations/useUpdateFunctionScheduleMutation.d.ts +40 -0
- package/compute/hooks/mutations/useUpdateFunctionScheduleMutation.js +40 -0
- package/compute/hooks/mutations/useUpdatePlatformFunctionScheduleMutation.d.ts +40 -0
- package/compute/hooks/mutations/useUpdatePlatformFunctionScheduleMutation.js +40 -0
- package/compute/hooks/queries/index.d.ts +4 -0
- package/compute/hooks/queries/index.js +4 -0
- package/compute/hooks/queries/useFunctionScheduleQuery.d.ts +65 -0
- package/compute/hooks/queries/useFunctionScheduleQuery.js +53 -0
- package/compute/hooks/queries/useFunctionSchedulesQuery.d.ts +69 -0
- package/compute/hooks/queries/useFunctionSchedulesQuery.js +38 -0
- package/compute/hooks/queries/usePlatformFunctionScheduleQuery.d.ts +65 -0
- package/compute/hooks/queries/usePlatformFunctionScheduleQuery.js +53 -0
- package/compute/hooks/queries/usePlatformFunctionSchedulesQuery.d.ts +69 -0
- package/compute/hooks/queries/usePlatformFunctionSchedulesQuery.js +38 -0
- package/compute/hooks/query-keys.d.ts +28 -0
- package/compute/hooks/query-keys.js +19 -3
- package/compute/orm/index.d.ts +14 -0
- package/compute/orm/index.js +4 -0
- package/compute/orm/input-types.d.ts +553 -4
- package/compute/orm/input-types.js +2 -0
- package/compute/orm/models/functionSchedule.d.ts +54 -0
- package/compute/orm/models/functionSchedule.js +104 -0
- package/compute/orm/models/index.d.ts +2 -0
- package/compute/orm/models/index.js +7 -3
- package/compute/orm/models/platformFunctionSchedule.d.ts +54 -0
- package/compute/orm/models/platformFunctionSchedule.js +104 -0
- package/compute/orm/mutation/index.d.ts +17 -1
- package/compute/orm/mutation/index.js +24 -0
- package/compute/schema-types.d.ts +319 -1
- package/compute/types.d.ts +29 -0
- package/esm/agent/orm/input-types.d.ts +4 -4
- package/esm/agent/schema-types.d.ts +4 -4
- package/esm/api/hooks/index.d.ts +1 -1
- package/esm/api/hooks/index.js +1 -1
- package/esm/api/hooks/invalidation.d.ts +6 -0
- package/esm/api/hooks/invalidation.js +17 -1
- package/esm/api/hooks/mutation-keys.d.ts +12 -0
- package/esm/api/hooks/mutation-keys.js +10 -0
- package/esm/api/hooks/mutations/index.d.ts +1 -0
- package/esm/api/hooks/mutations/index.js +1 -0
- package/esm/api/hooks/mutations/useCreateListSuspendedDatabasesRecordMutation.d.ts +34 -0
- package/esm/api/hooks/mutations/useCreateListSuspendedDatabasesRecordMutation.js +31 -0
- package/esm/api/hooks/queries/index.d.ts +2 -0
- package/esm/api/hooks/queries/index.js +2 -0
- package/esm/api/hooks/queries/useListSuspendedDatabasesQuery.d.ts +69 -0
- package/esm/api/hooks/queries/useListSuspendedDatabasesQuery.js +32 -0
- package/esm/api/hooks/queries/useListSuspendedDatabasesRecordQuery.d.ts +65 -0
- package/esm/api/hooks/queries/useListSuspendedDatabasesRecordQuery.js +47 -0
- package/esm/api/hooks/query-keys.d.ts +14 -0
- package/esm/api/hooks/query-keys.js +8 -0
- package/esm/api/orm/index.d.ts +2 -0
- package/esm/api/orm/index.js +2 -0
- package/esm/api/orm/input-types.d.ts +60 -30
- package/esm/api/orm/models/index.d.ts +1 -0
- package/esm/api/orm/models/index.js +1 -0
- package/esm/api/orm/models/listSuspendedDatabasesRecord.d.ts +36 -0
- package/esm/api/orm/models/listSuspendedDatabasesRecord.js +76 -0
- package/esm/api/schema-types.d.ts +22 -21
- package/esm/api/types.d.ts +7 -2
- package/esm/auth/hooks/mutation-keys.d.ts +6 -2
- package/esm/auth/hooks/mutation-keys.js +9 -3
- package/esm/auth/hooks/mutations/index.d.ts +3 -1
- package/esm/auth/hooks/mutations/index.js +3 -1
- package/esm/auth/hooks/mutations/useRequestMagicLinkMutation.d.ts +20 -0
- package/esm/auth/hooks/mutations/{useProvisionNewUserMutation.js → useRequestMagicLinkMutation.js} +4 -4
- package/esm/auth/hooks/mutations/useSendMfaChallengeCodeMutation.d.ts +20 -0
- package/esm/auth/hooks/mutations/useSendMfaChallengeCodeMutation.js +23 -0
- package/esm/auth/hooks/mutations/useSendSmsOtpMutation.d.ts +20 -0
- package/esm/auth/hooks/mutations/useSendSmsOtpMutation.js +23 -0
- package/esm/auth/orm/index.d.ts +15 -5
- package/esm/auth/orm/input-types.d.ts +44 -14
- package/esm/auth/orm/mutation/index.d.ts +25 -9
- package/esm/auth/orm/mutation/index.js +36 -12
- package/esm/auth/schema-types.d.ts +29 -10
- package/esm/compute/hooks/index.d.ts +1 -1
- package/esm/compute/hooks/index.js +1 -1
- package/esm/compute/hooks/invalidation.d.ts +12 -0
- package/esm/compute/hooks/invalidation.js +33 -1
- package/esm/compute/hooks/mutation-keys.d.ts +28 -0
- package/esm/compute/hooks/mutation-keys.js +23 -0
- package/esm/compute/hooks/mutations/index.d.ts +8 -0
- package/esm/compute/hooks/mutations/index.js +8 -0
- package/esm/compute/hooks/mutations/useCreateFunctionScheduleMutation.d.ts +34 -0
- package/esm/compute/hooks/mutations/useCreateFunctionScheduleMutation.js +31 -0
- package/esm/compute/hooks/mutations/useCreatePlatformFunctionScheduleMutation.d.ts +34 -0
- package/esm/compute/hooks/mutations/useCreatePlatformFunctionScheduleMutation.js +31 -0
- package/esm/compute/hooks/mutations/useDeleteFunctionScheduleMutation.d.ts +38 -0
- package/esm/compute/hooks/mutations/useDeleteFunctionScheduleMutation.js +36 -0
- package/esm/compute/hooks/mutations/useDeletePlatformFunctionScheduleMutation.d.ts +38 -0
- package/esm/compute/hooks/mutations/useDeletePlatformFunctionScheduleMutation.js +36 -0
- package/esm/compute/hooks/mutations/useFunctionExecutionLogsAppendMutation.d.ts +20 -0
- package/esm/compute/hooks/mutations/useFunctionExecutionLogsAppendMutation.js +23 -0
- package/esm/compute/hooks/mutations/usePlatformFunctionExecutionLogsAppendMutation.d.ts +20 -0
- package/esm/compute/hooks/mutations/usePlatformFunctionExecutionLogsAppendMutation.js +23 -0
- package/esm/compute/hooks/mutations/useUpdateFunctionScheduleMutation.d.ts +40 -0
- package/esm/compute/hooks/mutations/useUpdateFunctionScheduleMutation.js +37 -0
- package/esm/compute/hooks/mutations/useUpdatePlatformFunctionScheduleMutation.d.ts +40 -0
- package/esm/compute/hooks/mutations/useUpdatePlatformFunctionScheduleMutation.js +37 -0
- package/esm/compute/hooks/queries/index.d.ts +4 -0
- package/esm/compute/hooks/queries/index.js +4 -0
- package/esm/compute/hooks/queries/useFunctionScheduleQuery.d.ts +65 -0
- package/esm/compute/hooks/queries/useFunctionScheduleQuery.js +47 -0
- package/esm/compute/hooks/queries/useFunctionSchedulesQuery.d.ts +69 -0
- package/esm/compute/hooks/queries/useFunctionSchedulesQuery.js +32 -0
- package/esm/compute/hooks/queries/usePlatformFunctionScheduleQuery.d.ts +65 -0
- package/esm/compute/hooks/queries/usePlatformFunctionScheduleQuery.js +47 -0
- package/esm/compute/hooks/queries/usePlatformFunctionSchedulesQuery.d.ts +69 -0
- package/esm/compute/hooks/queries/usePlatformFunctionSchedulesQuery.js +32 -0
- package/esm/compute/hooks/query-keys.d.ts +28 -0
- package/esm/compute/hooks/query-keys.js +16 -0
- package/esm/compute/orm/index.d.ts +14 -0
- package/esm/compute/orm/index.js +4 -0
- package/esm/compute/orm/input-types.d.ts +553 -4
- package/esm/compute/orm/input-types.js +2 -0
- package/esm/compute/orm/models/functionSchedule.d.ts +54 -0
- package/esm/compute/orm/models/functionSchedule.js +100 -0
- package/esm/compute/orm/models/index.d.ts +2 -0
- package/esm/compute/orm/models/index.js +2 -0
- package/esm/compute/orm/models/platformFunctionSchedule.d.ts +54 -0
- package/esm/compute/orm/models/platformFunctionSchedule.js +100 -0
- package/esm/compute/orm/mutation/index.d.ts +17 -1
- package/esm/compute/orm/mutation/index.js +24 -0
- package/esm/compute/schema-types.d.ts +319 -1
- package/esm/compute/types.d.ts +29 -0
- package/esm/modules/orm/input-types.d.ts +26 -48
- package/esm/modules/schema-types.d.ts +17 -33
- package/esm/modules/types.d.ts +3 -5
- package/esm/remote/orm/input-types.d.ts +13 -1
- package/esm/remote/schema-types.d.ts +8 -1
- package/esm/remote/types.d.ts +1 -0
- package/modules/orm/input-types.d.ts +26 -48
- package/modules/schema-types.d.ts +17 -33
- package/modules/types.d.ts +3 -5
- package/package.json +5 -5
- package/remote/orm/input-types.d.ts +13 -1
- package/remote/schema-types.d.ts +8 -1
- package/remote/types.d.ts +1 -0
- package/auth/hooks/mutations/useProvisionNewUserMutation.d.ts +0 -20
- 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
|
+
}
|